@freelog/tools-lib 0.1.126 → 0.1.129

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.
@@ -8,832 +8,422 @@ import { lib, SHA1 } from 'crypto-js';
8
8
  import i18next from 'i18next';
9
9
  import Cookies from 'js-cookie';
10
10
 
11
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
12
- try {
13
- var info = gen[key](arg);
14
- var value = info.value;
15
- } catch (error) {
16
- reject(error);
17
- return;
18
- }
19
-
20
- if (info.done) {
21
- resolve(value);
22
- } else {
23
- Promise.resolve(value).then(_next, _throw);
24
- }
25
- }
26
-
27
- function _asyncToGenerator(fn) {
28
- return function () {
29
- var self = this,
30
- args = arguments;
31
- return new Promise(function (resolve, reject) {
32
- var gen = fn.apply(self, args);
33
-
34
- function _next(value) {
35
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
36
- }
11
+ function _regeneratorRuntime() {
12
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
37
13
 
38
- function _throw(err) {
39
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
40
- }
41
-
42
- _next(undefined);
43
- });
44
- };
45
- }
46
-
47
- function _extends() {
48
- _extends = Object.assign || function (target) {
49
- for (var i = 1; i < arguments.length; i++) {
50
- var source = arguments[i];
51
-
52
- for (var key in source) {
53
- if (Object.prototype.hasOwnProperty.call(source, key)) {
54
- target[key] = source[key];
55
- }
56
- }
57
- }
58
-
59
- return target;
14
+ _regeneratorRuntime = function () {
15
+ return exports;
60
16
  };
61
17
 
62
- return _extends.apply(this, arguments);
63
- }
64
-
65
- function _objectDestructuringEmpty(obj) {
66
- if (obj == null) throw new TypeError("Cannot destructure undefined");
67
- }
68
-
69
- function _objectWithoutPropertiesLoose(source, excluded) {
70
- if (source == null) return {};
71
- var target = {};
72
- var sourceKeys = Object.keys(source);
73
- var key, i;
74
-
75
- for (i = 0; i < sourceKeys.length; i++) {
76
- key = sourceKeys[i];
77
- if (excluded.indexOf(key) >= 0) continue;
78
- target[key] = source[key];
79
- }
80
-
81
- return target;
82
- }
83
-
84
- function createCommonjsModule(fn, module) {
85
- return module = { exports: {} }, fn(module, module.exports), module.exports;
86
- }
87
-
88
- var runtime_1 = createCommonjsModule(function (module) {
89
- /**
90
- * Copyright (c) 2014-present, Facebook, Inc.
91
- *
92
- * This source code is licensed under the MIT license found in the
93
- * LICENSE file in the root directory of this source tree.
94
- */
95
-
96
- var runtime = (function (exports) {
97
-
98
- var Op = Object.prototype;
99
- var hasOwn = Op.hasOwnProperty;
100
- var undefined$1; // More compressible than void 0.
101
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
102
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
103
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
104
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
18
+ var exports = {},
19
+ Op = Object.prototype,
20
+ hasOwn = Op.hasOwnProperty,
21
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
22
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
23
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
24
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
105
25
 
106
26
  function define(obj, key, value) {
107
- Object.defineProperty(obj, key, {
27
+ return Object.defineProperty(obj, key, {
108
28
  value: value,
109
- enumerable: true,
110
- configurable: true,
111
- writable: true
112
- });
113
- return obj[key];
29
+ enumerable: !0,
30
+ configurable: !0,
31
+ writable: !0
32
+ }), obj[key];
114
33
  }
34
+
115
35
  try {
116
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
117
36
  define({}, "");
118
37
  } catch (err) {
119
- define = function(obj, key, value) {
38
+ define = function (obj, key, value) {
120
39
  return obj[key] = value;
121
40
  };
122
41
  }
123
42
 
124
43
  function wrap(innerFn, outerFn, self, tryLocsList) {
125
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
126
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
127
- var generator = Object.create(protoGenerator.prototype);
128
- var context = new Context(tryLocsList || []);
44
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
45
+ generator = Object.create(protoGenerator.prototype),
46
+ context = new Context(tryLocsList || []);
47
+ return generator._invoke = function (innerFn, self, context) {
48
+ var state = "suspendedStart";
49
+ return function (method, arg) {
50
+ if ("executing" === state) throw new Error("Generator is already running");
51
+
52
+ if ("completed" === state) {
53
+ if ("throw" === method) throw arg;
54
+ return doneResult();
55
+ }
56
+
57
+ for (context.method = method, context.arg = arg;;) {
58
+ var delegate = context.delegate;
129
59
 
130
- // The ._invoke method unifies the implementations of the .next,
131
- // .throw, and .return methods.
132
- generator._invoke = makeInvokeMethod(innerFn, self, context);
60
+ if (delegate) {
61
+ var delegateResult = maybeInvokeDelegate(delegate, context);
133
62
 
134
- return generator;
63
+ if (delegateResult) {
64
+ if (delegateResult === ContinueSentinel) continue;
65
+ return delegateResult;
66
+ }
67
+ }
68
+
69
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
70
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
71
+ context.dispatchException(context.arg);
72
+ } else "return" === context.method && context.abrupt("return", context.arg);
73
+ state = "executing";
74
+ var record = tryCatch(innerFn, self, context);
75
+
76
+ if ("normal" === record.type) {
77
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
78
+ return {
79
+ value: record.arg,
80
+ done: context.done
81
+ };
82
+ }
83
+
84
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
85
+ }
86
+ };
87
+ }(innerFn, self, context), generator;
135
88
  }
136
- exports.wrap = wrap;
137
89
 
138
- // Try/catch helper to minimize deoptimizations. Returns a completion
139
- // record like context.tryEntries[i].completion. This interface could
140
- // have been (and was previously) designed to take a closure to be
141
- // invoked without arguments, but in all the cases we care about we
142
- // already have an existing method we want to call, so there's no need
143
- // to create a new function object. We can even get away with assuming
144
- // the method takes exactly one argument, since that happens to be true
145
- // in every case, so we don't have to touch the arguments object. The
146
- // only additional allocation required is the completion record, which
147
- // has a stable shape and so hopefully should be cheap to allocate.
148
90
  function tryCatch(fn, obj, arg) {
149
91
  try {
150
- return { type: "normal", arg: fn.call(obj, arg) };
92
+ return {
93
+ type: "normal",
94
+ arg: fn.call(obj, arg)
95
+ };
151
96
  } catch (err) {
152
- return { type: "throw", arg: err };
97
+ return {
98
+ type: "throw",
99
+ arg: err
100
+ };
153
101
  }
154
102
  }
155
103
 
156
- var GenStateSuspendedStart = "suspendedStart";
157
- var GenStateSuspendedYield = "suspendedYield";
158
- var GenStateExecuting = "executing";
159
- var GenStateCompleted = "completed";
160
-
161
- // Returning this object from the innerFn has the same effect as
162
- // breaking out of the dispatch switch statement.
104
+ exports.wrap = wrap;
163
105
  var ContinueSentinel = {};
164
106
 
165
- // Dummy constructor functions that we use as the .constructor and
166
- // .constructor.prototype properties for functions that return Generator
167
- // objects. For full spec compliance, you may wish to configure your
168
- // minifier not to mangle the names of these two functions.
169
107
  function Generator() {}
108
+
170
109
  function GeneratorFunction() {}
110
+
171
111
  function GeneratorFunctionPrototype() {}
172
112
 
173
- // This is a polyfill for %IteratorPrototype% for environments that
174
- // don't natively support it.
175
113
  var IteratorPrototype = {};
176
- IteratorPrototype[iteratorSymbol] = function () {
114
+ define(IteratorPrototype, iteratorSymbol, function () {
177
115
  return this;
178
- };
179
-
180
- var getProto = Object.getPrototypeOf;
181
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
182
- if (NativeIteratorPrototype &&
183
- NativeIteratorPrototype !== Op &&
184
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
185
- // This environment has a native %IteratorPrototype%; use it instead
186
- // of the polyfill.
187
- IteratorPrototype = NativeIteratorPrototype;
188
- }
116
+ });
117
+ var getProto = Object.getPrototypeOf,
118
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
119
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
120
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
189
121
 
190
- var Gp = GeneratorFunctionPrototype.prototype =
191
- Generator.prototype = Object.create(IteratorPrototype);
192
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
193
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
194
- GeneratorFunction.displayName = define(
195
- GeneratorFunctionPrototype,
196
- toStringTagSymbol,
197
- "GeneratorFunction"
198
- );
199
-
200
- // Helper for defining the .next, .throw, and .return methods of the
201
- // Iterator interface in terms of a single ._invoke method.
202
122
  function defineIteratorMethods(prototype) {
203
- ["next", "throw", "return"].forEach(function(method) {
204
- define(prototype, method, function(arg) {
123
+ ["next", "throw", "return"].forEach(function (method) {
124
+ define(prototype, method, function (arg) {
205
125
  return this._invoke(method, arg);
206
126
  });
207
127
  });
208
128
  }
209
129
 
210
- exports.isGeneratorFunction = function(genFun) {
211
- var ctor = typeof genFun === "function" && genFun.constructor;
212
- return ctor
213
- ? ctor === GeneratorFunction ||
214
- // For the native GeneratorFunction constructor, the best we can
215
- // do is to check its .name property.
216
- (ctor.displayName || ctor.name) === "GeneratorFunction"
217
- : false;
218
- };
219
-
220
- exports.mark = function(genFun) {
221
- if (Object.setPrototypeOf) {
222
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
223
- } else {
224
- genFun.__proto__ = GeneratorFunctionPrototype;
225
- define(genFun, toStringTagSymbol, "GeneratorFunction");
226
- }
227
- genFun.prototype = Object.create(Gp);
228
- return genFun;
229
- };
230
-
231
- // Within the body of any async function, `await x` is transformed to
232
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
233
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
234
- // meant to be awaited.
235
- exports.awrap = function(arg) {
236
- return { __await: arg };
237
- };
238
-
239
130
  function AsyncIterator(generator, PromiseImpl) {
240
131
  function invoke(method, arg, resolve, reject) {
241
132
  var record = tryCatch(generator[method], generator, arg);
242
- if (record.type === "throw") {
243
- reject(record.arg);
244
- } else {
245
- var result = record.arg;
246
- var value = result.value;
247
- if (value &&
248
- typeof value === "object" &&
249
- hasOwn.call(value, "__await")) {
250
- return PromiseImpl.resolve(value.__await).then(function(value) {
251
- invoke("next", value, resolve, reject);
252
- }, function(err) {
253
- invoke("throw", err, resolve, reject);
254
- });
255
- }
256
133
 
257
- return PromiseImpl.resolve(value).then(function(unwrapped) {
258
- // When a yielded Promise is resolved, its final value becomes
259
- // the .value of the Promise<{value,done}> result for the
260
- // current iteration.
261
- result.value = unwrapped;
262
- resolve(result);
263
- }, function(error) {
264
- // If a rejected Promise was yielded, throw the rejection back
265
- // into the async generator function so it can be handled there.
134
+ if ("throw" !== record.type) {
135
+ var result = record.arg,
136
+ value = result.value;
137
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
138
+ invoke("next", value, resolve, reject);
139
+ }, function (err) {
140
+ invoke("throw", err, resolve, reject);
141
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
142
+ result.value = unwrapped, resolve(result);
143
+ }, function (error) {
266
144
  return invoke("throw", error, resolve, reject);
267
145
  });
268
146
  }
147
+
148
+ reject(record.arg);
269
149
  }
270
150
 
271
151
  var previousPromise;
272
152
 
273
- function enqueue(method, arg) {
153
+ this._invoke = function (method, arg) {
274
154
  function callInvokeWithMethodAndArg() {
275
- return new PromiseImpl(function(resolve, reject) {
155
+ return new PromiseImpl(function (resolve, reject) {
276
156
  invoke(method, arg, resolve, reject);
277
157
  });
278
158
  }
279
159
 
280
- return previousPromise =
281
- // If enqueue has been called before, then we want to wait until
282
- // all previous Promises have been resolved before calling invoke,
283
- // so that results are always delivered in the correct order. If
284
- // enqueue has not been called before, then it is important to
285
- // call invoke immediately, without waiting on a callback to fire,
286
- // so that the async generator function has the opportunity to do
287
- // any necessary setup in a predictable way. This predictability
288
- // is why the Promise constructor synchronously invokes its
289
- // executor callback, and why async functions synchronously
290
- // execute code before the first await. Since we implement simple
291
- // async functions in terms of async generators, it is especially
292
- // important to get this right, even though it requires care.
293
- previousPromise ? previousPromise.then(
294
- callInvokeWithMethodAndArg,
295
- // Avoid propagating failures to Promises returned by later
296
- // invocations of the iterator.
297
- callInvokeWithMethodAndArg
298
- ) : callInvokeWithMethodAndArg();
299
- }
300
-
301
- // Define the unified helper method that is used to implement .next,
302
- // .throw, and .return (see defineIteratorMethods).
303
- this._invoke = enqueue;
304
- }
305
-
306
- defineIteratorMethods(AsyncIterator.prototype);
307
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
308
- return this;
309
- };
310
- exports.AsyncIterator = AsyncIterator;
311
-
312
- // Note that simple async functions are implemented on top of
313
- // AsyncIterator objects; they just return a Promise for the value of
314
- // the final result produced by the iterator.
315
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
316
- if (PromiseImpl === void 0) PromiseImpl = Promise;
317
-
318
- var iter = new AsyncIterator(
319
- wrap(innerFn, outerFn, self, tryLocsList),
320
- PromiseImpl
321
- );
322
-
323
- return exports.isGeneratorFunction(outerFn)
324
- ? iter // If outerFn is a generator, return the full iterator.
325
- : iter.next().then(function(result) {
326
- return result.done ? result.value : iter.next();
327
- });
328
- };
329
-
330
- function makeInvokeMethod(innerFn, self, context) {
331
- var state = GenStateSuspendedStart;
332
-
333
- return function invoke(method, arg) {
334
- if (state === GenStateExecuting) {
335
- throw new Error("Generator is already running");
336
- }
337
-
338
- if (state === GenStateCompleted) {
339
- if (method === "throw") {
340
- throw arg;
341
- }
342
-
343
- // Be forgiving, per 25.3.3.3.3 of the spec:
344
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
345
- return doneResult();
346
- }
347
-
348
- context.method = method;
349
- context.arg = arg;
350
-
351
- while (true) {
352
- var delegate = context.delegate;
353
- if (delegate) {
354
- var delegateResult = maybeInvokeDelegate(delegate, context);
355
- if (delegateResult) {
356
- if (delegateResult === ContinueSentinel) continue;
357
- return delegateResult;
358
- }
359
- }
360
-
361
- if (context.method === "next") {
362
- // Setting context._sent for legacy support of Babel's
363
- // function.sent implementation.
364
- context.sent = context._sent = context.arg;
365
-
366
- } else if (context.method === "throw") {
367
- if (state === GenStateSuspendedStart) {
368
- state = GenStateCompleted;
369
- throw context.arg;
370
- }
371
-
372
- context.dispatchException(context.arg);
373
-
374
- } else if (context.method === "return") {
375
- context.abrupt("return", context.arg);
376
- }
377
-
378
- state = GenStateExecuting;
379
-
380
- var record = tryCatch(innerFn, self, context);
381
- if (record.type === "normal") {
382
- // If an exception is thrown from innerFn, we leave state ===
383
- // GenStateExecuting and loop back for another invocation.
384
- state = context.done
385
- ? GenStateCompleted
386
- : GenStateSuspendedYield;
387
-
388
- if (record.arg === ContinueSentinel) {
389
- continue;
390
- }
391
-
392
- return {
393
- value: record.arg,
394
- done: context.done
395
- };
396
-
397
- } else if (record.type === "throw") {
398
- state = GenStateCompleted;
399
- // Dispatch the exception by looping back around to the
400
- // context.dispatchException(context.arg) call above.
401
- context.method = "throw";
402
- context.arg = record.arg;
403
- }
404
- }
160
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
405
161
  };
406
162
  }
407
163
 
408
- // Call delegate.iterator[context.method](context.arg) and handle the
409
- // result, either by returning a { value, done } result from the
410
- // delegate iterator, or by modifying context.method and context.arg,
411
- // setting context.delegate to null, and returning the ContinueSentinel.
412
164
  function maybeInvokeDelegate(delegate, context) {
413
165
  var method = delegate.iterator[context.method];
414
- if (method === undefined$1) {
415
- // A .throw or .return when the delegate iterator has no .throw
416
- // method always terminates the yield* loop.
417
- context.delegate = null;
418
-
419
- if (context.method === "throw") {
420
- // Note: ["return"] must be used for ES3 parsing compatibility.
421
- if (delegate.iterator["return"]) {
422
- // If the delegate iterator has a return method, give it a
423
- // chance to clean up.
424
- context.method = "return";
425
- context.arg = undefined$1;
426
- maybeInvokeDelegate(delegate, context);
427
-
428
- if (context.method === "throw") {
429
- // If maybeInvokeDelegate(context) changed context.method from
430
- // "return" to "throw", let that override the TypeError below.
431
- return ContinueSentinel;
432
- }
433
- }
434
166
 
435
- context.method = "throw";
436
- context.arg = new TypeError(
437
- "The iterator does not provide a 'throw' method");
167
+ if (undefined === method) {
168
+ if (context.delegate = null, "throw" === context.method) {
169
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
170
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
438
171
  }
439
172
 
440
173
  return ContinueSentinel;
441
174
  }
442
175
 
443
176
  var record = tryCatch(method, delegate.iterator, context.arg);
444
-
445
- if (record.type === "throw") {
446
- context.method = "throw";
447
- context.arg = record.arg;
448
- context.delegate = null;
449
- return ContinueSentinel;
450
- }
451
-
177
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
452
178
  var info = record.arg;
453
-
454
- if (! info) {
455
- context.method = "throw";
456
- context.arg = new TypeError("iterator result is not an object");
457
- context.delegate = null;
458
- return ContinueSentinel;
459
- }
460
-
461
- if (info.done) {
462
- // Assign the result of the finished delegate to the temporary
463
- // variable specified by delegate.resultName (see delegateYield).
464
- context[delegate.resultName] = info.value;
465
-
466
- // Resume execution at the desired location (see delegateYield).
467
- context.next = delegate.nextLoc;
468
-
469
- // If context.method was "throw" but the delegate handled the
470
- // exception, let the outer generator proceed normally. If
471
- // context.method was "next", forget context.arg since it has been
472
- // "consumed" by the delegate iterator. If context.method was
473
- // "return", allow the original .return call to continue in the
474
- // outer generator.
475
- if (context.method !== "return") {
476
- context.method = "next";
477
- context.arg = undefined$1;
478
- }
479
-
480
- } else {
481
- // Re-yield the result returned by the delegate method.
482
- return info;
483
- }
484
-
485
- // The delegate iterator is finished, so forget it and continue with
486
- // the outer generator.
487
- context.delegate = null;
488
- return ContinueSentinel;
179
+ 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);
489
180
  }
490
181
 
491
- // Define Generator.prototype.{next,throw,return} in terms of the
492
- // unified ._invoke helper method.
493
- defineIteratorMethods(Gp);
494
-
495
- define(Gp, toStringTagSymbol, "Generator");
496
-
497
- // A Generator should always return itself as the iterator object when the
498
- // @@iterator function is called on it. Some browsers' implementations of the
499
- // iterator prototype chain incorrectly implement this, causing the Generator
500
- // object to not be returned from this call. This ensures that doesn't happen.
501
- // See https://github.com/facebook/regenerator/issues/274 for more details.
502
- Gp[iteratorSymbol] = function() {
503
- return this;
504
- };
505
-
506
- Gp.toString = function() {
507
- return "[object Generator]";
508
- };
509
-
510
182
  function pushTryEntry(locs) {
511
- var entry = { tryLoc: locs[0] };
512
-
513
- if (1 in locs) {
514
- entry.catchLoc = locs[1];
515
- }
516
-
517
- if (2 in locs) {
518
- entry.finallyLoc = locs[2];
519
- entry.afterLoc = locs[3];
520
- }
521
-
522
- this.tryEntries.push(entry);
183
+ var entry = {
184
+ tryLoc: locs[0]
185
+ };
186
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
523
187
  }
524
188
 
525
189
  function resetTryEntry(entry) {
526
190
  var record = entry.completion || {};
527
- record.type = "normal";
528
- delete record.arg;
529
- entry.completion = record;
191
+ record.type = "normal", delete record.arg, entry.completion = record;
530
192
  }
531
193
 
532
194
  function Context(tryLocsList) {
533
- // The root entry object (effectively a try statement without a catch
534
- // or a finally block) gives us a place to store values thrown from
535
- // locations where there is no enclosing try statement.
536
- this.tryEntries = [{ tryLoc: "root" }];
537
- tryLocsList.forEach(pushTryEntry, this);
538
- this.reset(true);
195
+ this.tryEntries = [{
196
+ tryLoc: "root"
197
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
539
198
  }
540
199
 
541
- exports.keys = function(object) {
542
- var keys = [];
543
- for (var key in object) {
544
- keys.push(key);
545
- }
546
- keys.reverse();
547
-
548
- // Rather than returning an object with a next method, we keep
549
- // things simple and return the next function itself.
550
- return function next() {
551
- while (keys.length) {
552
- var key = keys.pop();
553
- if (key in object) {
554
- next.value = key;
555
- next.done = false;
556
- return next;
557
- }
558
- }
559
-
560
- // To avoid creating an additional object, we just hang the .value
561
- // and .done properties off the next function object itself. This
562
- // also ensures that the minifier will not anonymize the function.
563
- next.done = true;
564
- return next;
565
- };
566
- };
567
-
568
200
  function values(iterable) {
569
201
  if (iterable) {
570
202
  var iteratorMethod = iterable[iteratorSymbol];
571
- if (iteratorMethod) {
572
- return iteratorMethod.call(iterable);
573
- }
574
-
575
- if (typeof iterable.next === "function") {
576
- return iterable;
577
- }
203
+ if (iteratorMethod) return iteratorMethod.call(iterable);
204
+ if ("function" == typeof iterable.next) return iterable;
578
205
 
579
206
  if (!isNaN(iterable.length)) {
580
- var i = -1, next = function next() {
581
- while (++i < iterable.length) {
582
- if (hasOwn.call(iterable, i)) {
583
- next.value = iterable[i];
584
- next.done = false;
585
- return next;
586
- }
587
- }
588
-
589
- next.value = undefined$1;
590
- next.done = true;
207
+ var i = -1,
208
+ next = function next() {
209
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
591
210
 
592
- return next;
211
+ return next.value = undefined, next.done = !0, next;
593
212
  };
594
213
 
595
214
  return next.next = next;
596
215
  }
597
216
  }
598
217
 
599
- // Return an iterator with no values.
600
- return { next: doneResult };
218
+ return {
219
+ next: doneResult
220
+ };
601
221
  }
602
- exports.values = values;
603
222
 
604
223
  function doneResult() {
605
- return { value: undefined$1, done: true };
224
+ return {
225
+ value: undefined,
226
+ done: !0
227
+ };
606
228
  }
607
229
 
608
- Context.prototype = {
609
- constructor: Context,
610
-
611
- reset: function(skipTempReset) {
612
- this.prev = 0;
613
- this.next = 0;
614
- // Resetting context._sent for legacy support of Babel's
615
- // function.sent implementation.
616
- this.sent = this._sent = undefined$1;
617
- this.done = false;
618
- this.delegate = null;
619
-
620
- this.method = "next";
621
- this.arg = undefined$1;
622
-
623
- this.tryEntries.forEach(resetTryEntry);
624
-
625
- if (!skipTempReset) {
626
- for (var name in this) {
627
- // Not sure about the optimal order of these conditions:
628
- if (name.charAt(0) === "t" &&
629
- hasOwn.call(this, name) &&
630
- !isNaN(+name.slice(1))) {
631
- this[name] = undefined$1;
632
- }
633
- }
634
- }
635
- },
230
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
231
+ var ctor = "function" == typeof genFun && genFun.constructor;
232
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
233
+ }, exports.mark = function (genFun) {
234
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
235
+ }, exports.awrap = function (arg) {
236
+ return {
237
+ __await: arg
238
+ };
239
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
240
+ return this;
241
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
242
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
243
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
244
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
245
+ return result.done ? result.value : iter.next();
246
+ });
247
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
248
+ return this;
249
+ }), define(Gp, "toString", function () {
250
+ return "[object Generator]";
251
+ }), exports.keys = function (object) {
252
+ var keys = [];
636
253
 
637
- stop: function() {
638
- this.done = true;
254
+ for (var key in object) keys.push(key);
639
255
 
640
- var rootEntry = this.tryEntries[0];
641
- var rootRecord = rootEntry.completion;
642
- if (rootRecord.type === "throw") {
643
- throw rootRecord.arg;
256
+ return keys.reverse(), function next() {
257
+ for (; keys.length;) {
258
+ var key = keys.pop();
259
+ if (key in object) return next.value = key, next.done = !1, next;
644
260
  }
645
261
 
262
+ return next.done = !0, next;
263
+ };
264
+ }, exports.values = values, Context.prototype = {
265
+ constructor: Context,
266
+ reset: function (skipTempReset) {
267
+ 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);
268
+ },
269
+ stop: function () {
270
+ this.done = !0;
271
+ var rootRecord = this.tryEntries[0].completion;
272
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
646
273
  return this.rval;
647
274
  },
648
-
649
- dispatchException: function(exception) {
650
- if (this.done) {
651
- throw exception;
652
- }
653
-
275
+ dispatchException: function (exception) {
276
+ if (this.done) throw exception;
654
277
  var context = this;
655
- function handle(loc, caught) {
656
- record.type = "throw";
657
- record.arg = exception;
658
- context.next = loc;
659
-
660
- if (caught) {
661
- // If the dispatched exception was caught by a catch block,
662
- // then let that catch block handle the exception normally.
663
- context.method = "next";
664
- context.arg = undefined$1;
665
- }
666
278
 
667
- return !! caught;
279
+ function handle(loc, caught) {
280
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
668
281
  }
669
282
 
670
283
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
671
- var entry = this.tryEntries[i];
672
- var record = entry.completion;
673
-
674
- if (entry.tryLoc === "root") {
675
- // Exception thrown outside of any try block that could handle
676
- // it, so set the completion value of the entire function to
677
- // throw the exception.
678
- return handle("end");
679
- }
284
+ var entry = this.tryEntries[i],
285
+ record = entry.completion;
286
+ if ("root" === entry.tryLoc) return handle("end");
680
287
 
681
288
  if (entry.tryLoc <= this.prev) {
682
- var hasCatch = hasOwn.call(entry, "catchLoc");
683
- var hasFinally = hasOwn.call(entry, "finallyLoc");
289
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
290
+ hasFinally = hasOwn.call(entry, "finallyLoc");
684
291
 
685
292
  if (hasCatch && hasFinally) {
686
- if (this.prev < entry.catchLoc) {
687
- return handle(entry.catchLoc, true);
688
- } else if (this.prev < entry.finallyLoc) {
689
- return handle(entry.finallyLoc);
690
- }
691
-
293
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
294
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
692
295
  } else if (hasCatch) {
693
- if (this.prev < entry.catchLoc) {
694
- return handle(entry.catchLoc, true);
695
- }
696
-
697
- } else if (hasFinally) {
698
- if (this.prev < entry.finallyLoc) {
699
- return handle(entry.finallyLoc);
700
- }
701
-
296
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
702
297
  } else {
703
- throw new Error("try statement without catch or finally");
298
+ if (!hasFinally) throw new Error("try statement without catch or finally");
299
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
704
300
  }
705
301
  }
706
302
  }
707
303
  },
708
-
709
- abrupt: function(type, arg) {
304
+ abrupt: function (type, arg) {
710
305
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
711
306
  var entry = this.tryEntries[i];
712
- if (entry.tryLoc <= this.prev &&
713
- hasOwn.call(entry, "finallyLoc") &&
714
- this.prev < entry.finallyLoc) {
307
+
308
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
715
309
  var finallyEntry = entry;
716
310
  break;
717
311
  }
718
312
  }
719
313
 
720
- if (finallyEntry &&
721
- (type === "break" ||
722
- type === "continue") &&
723
- finallyEntry.tryLoc <= arg &&
724
- arg <= finallyEntry.finallyLoc) {
725
- // Ignore the finally entry if control is not jumping to a
726
- // location outside the try/catch block.
727
- finallyEntry = null;
728
- }
729
-
314
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
730
315
  var record = finallyEntry ? finallyEntry.completion : {};
731
- record.type = type;
732
- record.arg = arg;
733
-
734
- if (finallyEntry) {
735
- this.method = "next";
736
- this.next = finallyEntry.finallyLoc;
737
- return ContinueSentinel;
738
- }
739
-
740
- return this.complete(record);
316
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
741
317
  },
742
-
743
- complete: function(record, afterLoc) {
744
- if (record.type === "throw") {
745
- throw record.arg;
746
- }
747
-
748
- if (record.type === "break" ||
749
- record.type === "continue") {
750
- this.next = record.arg;
751
- } else if (record.type === "return") {
752
- this.rval = this.arg = record.arg;
753
- this.method = "return";
754
- this.next = "end";
755
- } else if (record.type === "normal" && afterLoc) {
756
- this.next = afterLoc;
757
- }
758
-
759
- return ContinueSentinel;
318
+ complete: function (record, afterLoc) {
319
+ if ("throw" === record.type) throw record.arg;
320
+ 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;
760
321
  },
761
-
762
- finish: function(finallyLoc) {
322
+ finish: function (finallyLoc) {
763
323
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
764
324
  var entry = this.tryEntries[i];
765
- if (entry.finallyLoc === finallyLoc) {
766
- this.complete(entry.completion, entry.afterLoc);
767
- resetTryEntry(entry);
768
- return ContinueSentinel;
769
- }
325
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
770
326
  }
771
327
  },
772
-
773
- "catch": function(tryLoc) {
328
+ catch: function (tryLoc) {
774
329
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
775
330
  var entry = this.tryEntries[i];
331
+
776
332
  if (entry.tryLoc === tryLoc) {
777
333
  var record = entry.completion;
778
- if (record.type === "throw") {
334
+
335
+ if ("throw" === record.type) {
779
336
  var thrown = record.arg;
780
337
  resetTryEntry(entry);
781
338
  }
339
+
782
340
  return thrown;
783
341
  }
784
342
  }
785
343
 
786
- // The context.catch method must only be called with a location
787
- // argument that corresponds to a known catch block.
788
344
  throw new Error("illegal catch attempt");
789
345
  },
790
-
791
- delegateYield: function(iterable, resultName, nextLoc) {
792
- this.delegate = {
346
+ delegateYield: function (iterable, resultName, nextLoc) {
347
+ return this.delegate = {
793
348
  iterator: values(iterable),
794
349
  resultName: resultName,
795
350
  nextLoc: nextLoc
796
- };
351
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
352
+ }
353
+ }, exports;
354
+ }
355
+
356
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
357
+ try {
358
+ var info = gen[key](arg);
359
+ var value = info.value;
360
+ } catch (error) {
361
+ reject(error);
362
+ return;
363
+ }
797
364
 
798
- if (this.method === "next") {
799
- // Deliberately forget the last sent value so that we don't
800
- // accidentally pass it on to the delegate.
801
- this.arg = undefined$1;
365
+ if (info.done) {
366
+ resolve(value);
367
+ } else {
368
+ Promise.resolve(value).then(_next, _throw);
369
+ }
370
+ }
371
+
372
+ function _asyncToGenerator(fn) {
373
+ return function () {
374
+ var self = this,
375
+ args = arguments;
376
+ return new Promise(function (resolve, reject) {
377
+ var gen = fn.apply(self, args);
378
+
379
+ function _next(value) {
380
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
802
381
  }
803
382
 
804
- return ContinueSentinel;
383
+ function _throw(err) {
384
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
385
+ }
386
+
387
+ _next(undefined);
388
+ });
389
+ };
390
+ }
391
+
392
+ function _extends() {
393
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
394
+ for (var i = 1; i < arguments.length; i++) {
395
+ var source = arguments[i];
396
+
397
+ for (var key in source) {
398
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
399
+ target[key] = source[key];
400
+ }
401
+ }
805
402
  }
403
+
404
+ return target;
806
405
  };
406
+ return _extends.apply(this, arguments);
407
+ }
807
408
 
808
- // Regardless of whether this script is executing as a CommonJS module
809
- // or not, return the runtime object so that we can declare the variable
810
- // regeneratorRuntime in the outer scope, which allows this module to be
811
- // injected easily by `bin/regenerator --include-runtime script.js`.
812
- return exports;
813
-
814
- }(
815
- // If this script is executing as a CommonJS module, use module.exports
816
- // as the regeneratorRuntime namespace. Otherwise create a new empty
817
- // object. Either way, the resulting object will be used to initialize
818
- // the regeneratorRuntime variable at the top of this file.
819
- module.exports
820
- ));
821
-
822
- try {
823
- regeneratorRuntime = runtime;
824
- } catch (accidentalStrictMode) {
825
- // This module should not be running in strict mode, so the above
826
- // assignment should always work unless something is misconfigured. Just
827
- // in case runtime.js accidentally runs in strict mode, we can escape
828
- // strict mode using a global Function call. This could conceivably fail
829
- // if a Content Security Policy forbids using Function, but in that case
830
- // the proper solution is to fix the accidental strict mode problem. If
831
- // you've misconfigured your bundler to force strict mode and applied a
832
- // CSP to forbid Function, and you're not willing to fix either of those
833
- // problems, please detail your unique predicament in a GitHub issue.
834
- Function("r", "regeneratorRuntime = r")(runtime);
409
+ function _objectDestructuringEmpty(obj) {
410
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
411
+ }
412
+
413
+ function _objectWithoutPropertiesLoose(source, excluded) {
414
+ if (source == null) return {};
415
+ var target = {};
416
+ var sourceKeys = Object.keys(source);
417
+ var key, i;
418
+
419
+ for (i = 0; i < sourceKeys.length; i++) {
420
+ key = sourceKeys[i];
421
+ if (excluded.indexOf(key) >= 0) continue;
422
+ target[key] = source[key];
423
+ }
424
+
425
+ return target;
835
426
  }
836
- });
837
427
 
838
428
  var _require = /*#__PURE__*/require('@freelog/resource-policy-lang'),
839
429
  compile = _require.compile;
@@ -896,9 +486,9 @@ function policyCodeTranslationToText(_x, _x2) {
896
486
  */
897
487
 
898
488
  function _policyCodeTranslationToText() {
899
- _policyCodeTranslationToText = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(code, targetType) {
489
+ _policyCodeTranslationToText = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(code, targetType) {
900
490
  var result, contract, rrr;
901
- return runtime_1.wrap(function _callee$(_context) {
491
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
902
492
  while (1) {
903
493
  switch (_context.prev = _context.next) {
904
494
  case 0:
@@ -1242,20 +832,41 @@ function wallet(_temp18) {
1242
832
 
1243
833
  return "/logged/wallet";
1244
834
  }
1245
- function contract(_temp19) {
835
+ function reward(_temp19) {
1246
836
  var _ref35 = _temp19 === void 0 ? {} : _temp19;
1247
837
 
1248
838
  _objectDestructuringEmpty(_ref35);
1249
839
 
1250
- return "/logged/contract";
840
+ return "/logged/reward";
1251
841
  }
1252
- function setting(_temp20) {
842
+ function contract(_temp20) {
1253
843
  var _ref36 = _temp20 === void 0 ? {} : _temp20;
1254
844
 
1255
845
  _objectDestructuringEmpty(_ref36);
1256
846
 
847
+ return "/logged/contract";
848
+ }
849
+ function setting(_temp21) {
850
+ var _ref37 = _temp21 === void 0 ? {} : _temp21;
851
+
852
+ _objectDestructuringEmpty(_ref37);
853
+
1257
854
  return "/logged/setting";
1258
855
  }
856
+ function binding(_temp22) {
857
+ var _ref38 = _temp22 === void 0 ? {} : _temp22;
858
+
859
+ _objectDestructuringEmpty(_ref38);
860
+
861
+ return "/logged/binding";
862
+ }
863
+ function resultBindingSuccess(_temp23) {
864
+ var _ref39 = _temp23 === void 0 ? {} : _temp23;
865
+
866
+ _objectDestructuringEmpty(_ref39);
867
+
868
+ return "/result/binding";
869
+ }
1259
870
  /************** user End ******************************************************/
1260
871
 
1261
872
  function handleQuery(query) {
@@ -1311,8 +922,11 @@ var LinkTo = {
1311
922
  retrievePayPassword: retrievePayPassword,
1312
923
  userFreeze: userFreeze,
1313
924
  wallet: wallet,
925
+ reward: reward,
1314
926
  contract: contract,
1315
- setting: setting
927
+ setting: setting,
928
+ binding: binding,
929
+ resultBindingSuccess: resultBindingSuccess
1316
930
  };
1317
931
 
1318
932
  // export const apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
@@ -1915,7 +1529,10 @@ function update(params) {
1915
1529
  url: "/v2/resources/" + params.resourceId,
1916
1530
  data: params
1917
1531
  });
1918
- }
1532
+ } // interface ListReturnType extends CommonReturn {
1533
+ // data: IResourceInfo[];
1534
+ // }
1535
+
1919
1536
  function list(params) {
1920
1537
  return FUtil.Request({
1921
1538
  method: 'GET',
@@ -2580,13 +2197,21 @@ function transitionRecords(_ref2) {
2580
2197
  params: params
2581
2198
  });
2582
2199
  }
2200
+ function contractsSignCount(params) {
2201
+ return FUtil.Request({
2202
+ method: 'GET',
2203
+ url: "/v2/contracts/signCount",
2204
+ params: params
2205
+ });
2206
+ }
2583
2207
 
2584
2208
  var Contract = {
2585
2209
  __proto__: null,
2586
2210
  contractDetails: contractDetails,
2587
2211
  contracts: contracts,
2588
2212
  batchContracts: batchContracts,
2589
- transitionRecords: transitionRecords
2213
+ transitionRecords: transitionRecords,
2214
+ contractsSignCount: contractsSignCount
2590
2215
  };
2591
2216
 
2592
2217
  var _excluded$7 = ["accountId"],
@@ -2765,6 +2390,77 @@ function getNodeTaskInfo(params) {
2765
2390
  params: params
2766
2391
  });
2767
2392
  }
2393
+ function getRewardRecordInfo(params) {
2394
+ return FUtil.Request({
2395
+ method: 'GET',
2396
+ url: "/v2/activities/facade/getRewardRecordInfo",
2397
+ params: params
2398
+ });
2399
+ }
2400
+ function pushMessageTask(params) {
2401
+ return FUtil.Request({
2402
+ method: 'POST',
2403
+ url: "/v2/activities/facade/pushMessage4Task",
2404
+ data: params
2405
+ });
2406
+ }
2407
+ function getCoinAccount(params) {
2408
+ return FUtil.Request({
2409
+ method: 'GET',
2410
+ url: "/v2/activities/coin/account/find4Client",
2411
+ params: params
2412
+ });
2413
+ }
2414
+ function withdrawCoinAccount(params) {
2415
+ return FUtil.Request({
2416
+ method: 'POST',
2417
+ url: "/v2/activities/coin/account/cash4Client",
2418
+ data: params
2419
+ });
2420
+ }
2421
+ function getCoinAccountRecords(params) {
2422
+ return FUtil.Request({
2423
+ method: 'GET',
2424
+ url: "/v2/activities/coin/record/list4Client",
2425
+ params: params
2426
+ });
2427
+ }
2428
+ function getWechatOfficialAccountInfo(params) {
2429
+ if (params === void 0) {
2430
+ params = {};
2431
+ }
2432
+
2433
+ return FUtil.Request({
2434
+ method: 'GET',
2435
+ url: "/v2/extensions/wechat/getRelationship4Client",
2436
+ params: params
2437
+ });
2438
+ }
2439
+ function lotteryList(params) {
2440
+ if (params === void 0) {
2441
+ params = {};
2442
+ }
2443
+
2444
+ return FUtil.Request({
2445
+ method: 'GET',
2446
+ url: "/v2/activities/lottery/resource/list",
2447
+ params: params
2448
+ });
2449
+ }
2450
+ function lotteryShow(params) {
2451
+ return FUtil.Request({
2452
+ method: 'GET',
2453
+ url: "/v2/activities/lottery/resource/show",
2454
+ params: params
2455
+ });
2456
+ }
2457
+ function listInviteFriendInfos(params) {
2458
+ return FUtil.Request({
2459
+ method: 'POST',
2460
+ url: "/v2/activities/facade/listInviteFriendInfos",
2461
+ data: params
2462
+ });
2463
+ }
2768
2464
 
2769
2465
  var Activity = {
2770
2466
  __proto__: null,
@@ -2774,7 +2470,16 @@ var Activity = {
2774
2470
  adsDetails: adsDetails,
2775
2471
  getBaseTaskInfo: getBaseTaskInfo,
2776
2472
  getResourceTaskInfo: getResourceTaskInfo,
2777
- getNodeTaskInfo: getNodeTaskInfo
2473
+ getNodeTaskInfo: getNodeTaskInfo,
2474
+ getRewardRecordInfo: getRewardRecordInfo,
2475
+ pushMessageTask: pushMessageTask,
2476
+ getCoinAccount: getCoinAccount,
2477
+ withdrawCoinAccount: withdrawCoinAccount,
2478
+ getCoinAccountRecords: getCoinAccountRecords,
2479
+ getWechatOfficialAccountInfo: getWechatOfficialAccountInfo,
2480
+ lotteryList: lotteryList,
2481
+ lotteryShow: lotteryShow,
2482
+ listInviteFriendInfos: listInviteFriendInfos
2778
2483
  };
2779
2484
 
2780
2485
  var _excluded$9 = ["recordId"];
@@ -2837,7 +2542,16 @@ function getBetaApply2(_ref7) {
2837
2542
  return FUtil.Request({
2838
2543
  method: 'GET',
2839
2544
  url: "/v2/testQualifications/beta/apply/" + recordId,
2840
- data: params
2545
+ params: params
2546
+ });
2547
+ }
2548
+ function invitees(_ref8) {
2549
+ var params = _extends({}, _ref8);
2550
+
2551
+ return FUtil.Request({
2552
+ method: 'GET',
2553
+ url: "/v2/testQualifications/beta/codes/invitees",
2554
+ params: params
2841
2555
  });
2842
2556
  }
2843
2557
 
@@ -2849,7 +2563,8 @@ var TestQualification = {
2849
2563
  usedRecords: usedRecords,
2850
2564
  betaApply: betaApply,
2851
2565
  getBetaApply1: getBetaApply1,
2852
- getBetaApply2: getBetaApply2
2566
+ getBetaApply2: getBetaApply2,
2567
+ invitees: invitees
2853
2568
  };
2854
2569
 
2855
2570
  function transactionsCommon(params) {
@@ -2894,6 +2609,39 @@ var I18n = {
2894
2609
  configsList: configsList
2895
2610
  };
2896
2611
 
2612
+ function policies(params) {
2613
+ return FUtil.Request({
2614
+ method: 'GET',
2615
+ url: "/v2/policies",
2616
+ params: params
2617
+ });
2618
+ }
2619
+ function policiesList(params) {
2620
+ return FUtil.Request({
2621
+ method: 'GET',
2622
+ url: "/v2/policies/list",
2623
+ params: params
2624
+ });
2625
+ }
2626
+ function policyTemplates(params) {
2627
+ if (params === void 0) {
2628
+ params = {};
2629
+ }
2630
+
2631
+ return FUtil.Request({
2632
+ method: 'GET',
2633
+ url: "/v2/translate/translate-config/list4Client",
2634
+ params: params
2635
+ });
2636
+ }
2637
+
2638
+ var Policy = {
2639
+ __proto__: null,
2640
+ policies: policies,
2641
+ policiesList: policiesList,
2642
+ policyTemplates: policyTemplates
2643
+ };
2644
+
2897
2645
  /**
2898
2646
  * 根据 File 获取 SHA1 Hash 字符串
2899
2647
  * @param file
@@ -3001,10 +2749,10 @@ function getFilesSha1Info(_x, _x2) {
3001
2749
  }
3002
2750
 
3003
2751
  function _getFilesSha1Info() {
3004
- _getFilesSha1Info = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(_ref, cdPartially) {
2752
+ _getFilesSha1Info = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3005
2753
  var sha1, delay, needHandleSha1, allData, _yield$Storage$filesL, data, finishedInfo;
3006
2754
 
3007
- return runtime_1.wrap(function _callee$(_context) {
2755
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3008
2756
  while (1) {
3009
2757
  switch (_context.prev = _context.next) {
3010
2758
  case 0:
@@ -3112,6 +2860,7 @@ var FServiceAPI = {
3112
2860
  TestQualification: TestQualification,
3113
2861
  Statistic: Statistic,
3114
2862
  I18n: I18n,
2863
+ Policy: Policy,
3115
2864
  recombination: recombination
3116
2865
  };
3117
2866
 
@@ -3229,10 +2978,10 @@ function request(_x, _x2) {
3229
2978
  // }
3230
2979
 
3231
2980
  function _request() {
3232
- _request = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(config, _temp) {
2981
+ _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3233
2982
  var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
3234
2983
 
3235
- return runtime_1.wrap(function _callee$(_context) {
2984
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3236
2985
  while (1) {
3237
2986
  switch (_context.prev = _context.next) {
3238
2987
  case 0:
@@ -3286,6 +3035,7 @@ var FUtil = {
3286
3035
  };
3287
3036
 
3288
3037
  var ossJsonUrl = 'https://freelog-i18n.oss-cn-shenzhen.aliyuncs.com/configs/i18n.json';
3038
+ var ossJsonUrl_Test = 'https://freelog-i18n.oss-cn-shenzhen.aliyuncs.com/configs-test/i18n.json';
3289
3039
  var localStorage_i18nextLng_key = 'locale';
3290
3040
  var localStorage_i18nextResources_key = 'i18nextResources';
3291
3041
  var allLanguage = [{
@@ -3295,7 +3045,6 @@ var allLanguage = [{
3295
3045
  value: 'zh_CN',
3296
3046
  label: '简体中文'
3297
3047
  }];
3298
- var self;
3299
3048
 
3300
3049
  var I18nNext = /*#__PURE__*/function () {
3301
3050
  function I18nNext() {
@@ -3303,34 +3052,40 @@ var I18nNext = /*#__PURE__*/function () {
3303
3052
  this._taskQueue = []; // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3304
3053
 
3305
3054
  this._currentLanguage = Cookies.get(localStorage_i18nextLng_key) || 'zh_CN';
3306
- self = this;
3307
- self.ready();
3055
+ this.ready();
3056
+ this.ready = this.ready.bind(this);
3057
+ this.t = this.t.bind(this);
3058
+ this.changeLanguage = this.changeLanguage.bind(this);
3059
+ this.getAllLanguage = this.getAllLanguage.bind(this);
3060
+ this.getCurrentLanguage = this.getCurrentLanguage.bind(this);
3308
3061
  }
3309
3062
 
3310
3063
  var _proto = I18nNext.prototype;
3311
3064
 
3312
3065
  _proto.ready = /*#__PURE__*/function () {
3313
- var _ready = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
3066
+ var _ready = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3067
+ var _this = this;
3068
+
3314
3069
  var exc, handleTasks, promise;
3315
- return runtime_1.wrap(function _callee2$(_context2) {
3070
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3316
3071
  while (1) {
3317
3072
  switch (_context2.prev = _context2.next) {
3318
3073
  case 0:
3319
3074
  exc = function exc() {
3320
- while (self._taskQueue.length > 0) {
3321
- var task = self._taskQueue.shift();
3075
+ while (_this._taskQueue.length > 0) {
3076
+ var task = _this._taskQueue.shift();
3322
3077
 
3323
3078
  task && task();
3324
3079
  }
3325
3080
  };
3326
3081
 
3327
3082
  handleTasks = /*#__PURE__*/function () {
3328
- var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
3329
- return runtime_1.wrap(function _callee$(_context) {
3083
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3084
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3330
3085
  while (1) {
3331
3086
  switch (_context.prev = _context.next) {
3332
3087
  case 0:
3333
- if (!(self._loadingData === 'End')) {
3088
+ if (!(_this._loadingData === 'End')) {
3334
3089
  _context.next = 3;
3335
3090
  break;
3336
3091
  }
@@ -3339,7 +3094,7 @@ var I18nNext = /*#__PURE__*/function () {
3339
3094
  return _context.abrupt("return");
3340
3095
 
3341
3096
  case 3:
3342
- if (!(self._loadingData === 'Start')) {
3097
+ if (!(_this._loadingData === 'Start')) {
3343
3098
  _context.next = 5;
3344
3099
  break;
3345
3100
  }
@@ -3348,9 +3103,9 @@ var I18nNext = /*#__PURE__*/function () {
3348
3103
 
3349
3104
  case 5:
3350
3105
  // NO_START
3351
- self._loadingData = 'Start';
3106
+ _this._loadingData = 'Start';
3352
3107
  _context.next = 8;
3353
- return self._handleData();
3108
+ return _this._handleData();
3354
3109
 
3355
3110
  case 8:
3356
3111
  // console.log('######');
@@ -3370,7 +3125,7 @@ var I18nNext = /*#__PURE__*/function () {
3370
3125
  }();
3371
3126
 
3372
3127
  promise = new Promise(function (resolve) {
3373
- self._taskQueue.push(resolve);
3128
+ _this._taskQueue.push(resolve);
3374
3129
  });
3375
3130
  handleTasks();
3376
3131
  return _context2.abrupt("return", promise);
@@ -3408,17 +3163,17 @@ var I18nNext = /*#__PURE__*/function () {
3408
3163
  };
3409
3164
 
3410
3165
  _proto.getCurrentLanguage = function getCurrentLanguage() {
3411
- return self._currentLanguage;
3166
+ return this._currentLanguage;
3412
3167
  };
3413
3168
 
3414
3169
  _proto._handleData = /*#__PURE__*/function () {
3415
- var _handleData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3() {
3170
+ var _handleData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3416
3171
  var lng, resource, i18nextResources;
3417
- return runtime_1.wrap(function _callee3$(_context3) {
3172
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3418
3173
  while (1) {
3419
3174
  switch (_context3.prev = _context3.next) {
3420
3175
  case 0:
3421
- lng = self._currentLanguage;
3176
+ lng = this._currentLanguage;
3422
3177
  resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3423
3178
 
3424
3179
  i18nextResources = resource ? JSON.parse(resource) : null;
@@ -3429,7 +3184,7 @@ var I18nNext = /*#__PURE__*/function () {
3429
3184
  }
3430
3185
 
3431
3186
  _context3.next = 6;
3432
- return self._fetchData();
3187
+ return this._fetchData();
3433
3188
 
3434
3189
  case 6:
3435
3190
  i18nextResources = _context3.sent;
@@ -3437,7 +3192,7 @@ var I18nNext = /*#__PURE__*/function () {
3437
3192
  break;
3438
3193
 
3439
3194
  case 9:
3440
- self._fetchData();
3195
+ this._fetchData();
3441
3196
 
3442
3197
  case 10:
3443
3198
  _context3.next = 12;
@@ -3456,11 +3211,14 @@ var I18nNext = /*#__PURE__*/function () {
3456
3211
  });
3457
3212
 
3458
3213
  case 12:
3214
+ this._loadingData = 'End';
3215
+
3216
+ case 13:
3459
3217
  case "end":
3460
3218
  return _context3.stop();
3461
3219
  }
3462
3220
  }
3463
- }, _callee3);
3221
+ }, _callee3, this);
3464
3222
  }));
3465
3223
 
3466
3224
  function _handleData() {
@@ -3471,15 +3229,15 @@ var I18nNext = /*#__PURE__*/function () {
3471
3229
  }();
3472
3230
 
3473
3231
  _proto._fetchData = /*#__PURE__*/function () {
3474
- var _fetchData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
3232
+ var _fetchData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3475
3233
  var res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
3476
3234
 
3477
- return runtime_1.wrap(function _callee4$(_context4) {
3235
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3478
3236
  while (1) {
3479
3237
  switch (_context4.prev = _context4.next) {
3480
3238
  case 0:
3481
3239
  _context4.next = 2;
3482
- return axios.get(ossJsonUrl, {
3240
+ return axios.get(window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test, {
3483
3241
  withCredentials: false
3484
3242
  });
3485
3243