g-ai-robot3 0.1.12 → 0.1.13

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.
@@ -202,7 +202,7 @@ module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
202
202
 
203
203
  /***/ }),
204
204
 
205
- /***/ 4576:
205
+ /***/ 2195:
206
206
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
207
207
 
208
208
  "use strict";
@@ -321,16 +321,16 @@ module.exports = function (O, key, value, options) {
321
321
 
322
322
  "use strict";
323
323
 
324
- var global = __webpack_require__(4475);
324
+ var globalThis = __webpack_require__(4576);
325
325
 
326
326
  // eslint-disable-next-line es/no-object-defineproperty -- safe
327
327
  var defineProperty = Object.defineProperty;
328
328
 
329
329
  module.exports = function (key, value) {
330
330
  try {
331
- defineProperty(global, key, { value: value, configurable: true, writable: true });
331
+ defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
332
332
  } catch (error) {
333
- global[key] = value;
333
+ globalThis[key] = value;
334
334
  } return value;
335
335
  };
336
336
 
@@ -358,10 +358,10 @@ module.exports = !fails(function () {
358
358
 
359
359
  "use strict";
360
360
 
361
- var global = __webpack_require__(4475);
361
+ var globalThis = __webpack_require__(4576);
362
362
  var isObject = __webpack_require__(34);
363
363
 
364
- var document = global.document;
364
+ var document = globalThis.document;
365
365
  // typeof document.createElement is 'object' in old IE
366
366
  var EXISTS = isObject(document) && isObject(document.createElement);
367
367
 
@@ -388,26 +388,50 @@ module.exports = function (it) {
388
388
 
389
389
  /***/ }),
390
390
 
391
- /***/ 9392:
391
+ /***/ 8727:
392
392
  /***/ (function(module) {
393
393
 
394
394
  "use strict";
395
395
 
396
- module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
396
+ // IE8- don't enum bug keys
397
+ module.exports = [
398
+ 'constructor',
399
+ 'hasOwnProperty',
400
+ 'isPrototypeOf',
401
+ 'propertyIsEnumerable',
402
+ 'toLocaleString',
403
+ 'toString',
404
+ 'valueOf'
405
+ ];
406
+
407
+
408
+ /***/ }),
409
+
410
+ /***/ 2839:
411
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
412
+
413
+ "use strict";
414
+
415
+ var globalThis = __webpack_require__(4576);
416
+
417
+ var navigator = globalThis.navigator;
418
+ var userAgent = navigator && navigator.userAgent;
419
+
420
+ module.exports = userAgent ? String(userAgent) : '';
397
421
 
398
422
 
399
423
  /***/ }),
400
424
 
401
- /***/ 7388:
425
+ /***/ 9519:
402
426
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
403
427
 
404
428
  "use strict";
405
429
 
406
- var global = __webpack_require__(4475);
407
- var userAgent = __webpack_require__(9392);
430
+ var globalThis = __webpack_require__(4576);
431
+ var userAgent = __webpack_require__(2839);
408
432
 
409
- var process = global.process;
410
- var Deno = global.Deno;
433
+ var process = globalThis.process;
434
+ var Deno = globalThis.Deno;
411
435
  var versions = process && process.versions || Deno && Deno.version;
412
436
  var v8 = versions && versions.v8;
413
437
  var match, version;
@@ -432,25 +456,6 @@ if (!version && userAgent) {
432
456
  module.exports = version;
433
457
 
434
458
 
435
- /***/ }),
436
-
437
- /***/ 8727:
438
- /***/ (function(module) {
439
-
440
- "use strict";
441
-
442
- // IE8- don't enum bug keys
443
- module.exports = [
444
- 'constructor',
445
- 'hasOwnProperty',
446
- 'isPrototypeOf',
447
- 'propertyIsEnumerable',
448
- 'toLocaleString',
449
- 'toString',
450
- 'valueOf'
451
- ];
452
-
453
-
454
459
  /***/ }),
455
460
 
456
461
  /***/ 6518:
@@ -458,7 +463,7 @@ module.exports = [
458
463
 
459
464
  "use strict";
460
465
 
461
- var global = __webpack_require__(4475);
466
+ var globalThis = __webpack_require__(4576);
462
467
  var getOwnPropertyDescriptor = (__webpack_require__(7347).f);
463
468
  var createNonEnumerableProperty = __webpack_require__(6699);
464
469
  var defineBuiltIn = __webpack_require__(6840);
@@ -487,11 +492,11 @@ module.exports = function (options, source) {
487
492
  var STATIC = options.stat;
488
493
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
489
494
  if (GLOBAL) {
490
- target = global;
495
+ target = globalThis;
491
496
  } else if (STATIC) {
492
- target = global[TARGET] || defineGlobalProperty(TARGET, {});
497
+ target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
493
498
  } else {
494
- target = global[TARGET] && global[TARGET].prototype;
499
+ target = globalThis[TARGET] && globalThis[TARGET].prototype;
495
500
  }
496
501
  if (target) for (key in source) {
497
502
  sourceProperty = source[key];
@@ -616,7 +621,7 @@ module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
616
621
 
617
622
  "use strict";
618
623
 
619
- var global = __webpack_require__(4475);
624
+ var globalThis = __webpack_require__(4576);
620
625
  var isCallable = __webpack_require__(4901);
621
626
 
622
627
  var aFunction = function (argument) {
@@ -624,7 +629,7 @@ var aFunction = function (argument) {
624
629
  };
625
630
 
626
631
  module.exports = function (namespace, method) {
627
- return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
632
+ return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
628
633
  };
629
634
 
630
635
 
@@ -648,7 +653,7 @@ module.exports = function (V, P) {
648
653
 
649
654
  /***/ }),
650
655
 
651
- /***/ 4475:
656
+ /***/ 4576:
652
657
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
653
658
 
654
659
  "use strict";
@@ -729,7 +734,7 @@ module.exports = !DESCRIPTORS && !fails(function () {
729
734
 
730
735
  var uncurryThis = __webpack_require__(9504);
731
736
  var fails = __webpack_require__(9039);
732
- var classof = __webpack_require__(4576);
737
+ var classof = __webpack_require__(2195);
733
738
 
734
739
  var $Object = Object;
735
740
  var split = uncurryThis(''.split);
@@ -775,7 +780,7 @@ module.exports = store.inspectSource;
775
780
  "use strict";
776
781
 
777
782
  var NATIVE_WEAK_MAP = __webpack_require__(8622);
778
- var global = __webpack_require__(4475);
783
+ var globalThis = __webpack_require__(4576);
779
784
  var isObject = __webpack_require__(34);
780
785
  var createNonEnumerableProperty = __webpack_require__(6699);
781
786
  var hasOwn = __webpack_require__(9297);
@@ -784,8 +789,8 @@ var sharedKey = __webpack_require__(6119);
784
789
  var hiddenKeys = __webpack_require__(421);
785
790
 
786
791
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
787
- var TypeError = global.TypeError;
788
- var WeakMap = global.WeakMap;
792
+ var TypeError = globalThis.TypeError;
793
+ var WeakMap = globalThis.WeakMap;
789
794
  var set, get, has;
790
795
 
791
796
  var enforce = function (it) {
@@ -853,7 +858,7 @@ module.exports = {
853
858
 
854
859
  "use strict";
855
860
 
856
- var classof = __webpack_require__(4576);
861
+ var classof = __webpack_require__(2195);
857
862
 
858
863
  // `IsArray` abstract operation
859
864
  // https://tc39.es/ecma262/#sec-isarray
@@ -1340,17 +1345,17 @@ module.exports = function (key) {
1340
1345
  "use strict";
1341
1346
 
1342
1347
  var IS_PURE = __webpack_require__(6395);
1343
- var globalThis = __webpack_require__(4475);
1348
+ var globalThis = __webpack_require__(4576);
1344
1349
  var defineGlobalProperty = __webpack_require__(9433);
1345
1350
 
1346
1351
  var SHARED = '__core-js_shared__';
1347
1352
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
1348
1353
 
1349
1354
  (store.versions || (store.versions = [])).push({
1350
- version: '3.37.1',
1355
+ version: '3.38.0',
1351
1356
  mode: IS_PURE ? 'pure' : 'global',
1352
1357
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
1353
- license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
1358
+ license: 'https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE',
1354
1359
  source: 'https://github.com/zloirock/core-js'
1355
1360
  });
1356
1361
 
@@ -1377,11 +1382,11 @@ module.exports = function (key, value) {
1377
1382
  "use strict";
1378
1383
 
1379
1384
  /* eslint-disable es/no-symbol -- required for testing */
1380
- var V8_VERSION = __webpack_require__(7388);
1385
+ var V8_VERSION = __webpack_require__(9519);
1381
1386
  var fails = __webpack_require__(9039);
1382
- var global = __webpack_require__(4475);
1387
+ var globalThis = __webpack_require__(4576);
1383
1388
 
1384
- var $String = global.String;
1389
+ var $String = globalThis.String;
1385
1390
 
1386
1391
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
1387
1392
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
@@ -1619,10 +1624,10 @@ module.exports = DESCRIPTORS && fails(function () {
1619
1624
 
1620
1625
  "use strict";
1621
1626
 
1622
- var global = __webpack_require__(4475);
1627
+ var globalThis = __webpack_require__(4576);
1623
1628
  var isCallable = __webpack_require__(4901);
1624
1629
 
1625
- var WeakMap = global.WeakMap;
1630
+ var WeakMap = globalThis.WeakMap;
1626
1631
 
1627
1632
  module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
1628
1633
 
@@ -1634,14 +1639,14 @@ module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
1634
1639
 
1635
1640
  "use strict";
1636
1641
 
1637
- var global = __webpack_require__(4475);
1642
+ var globalThis = __webpack_require__(4576);
1638
1643
  var shared = __webpack_require__(5745);
1639
1644
  var hasOwn = __webpack_require__(9297);
1640
1645
  var uid = __webpack_require__(3392);
1641
1646
  var NATIVE_SYMBOL = __webpack_require__(4495);
1642
1647
  var USE_SYMBOL_AS_UID = __webpack_require__(7040);
1643
1648
 
1644
- var Symbol = global.Symbol;
1649
+ var Symbol = globalThis.Symbol;
1645
1650
  var WellKnownSymbolsStore = shared('wks');
1646
1651
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
1647
1652
 
@@ -2518,6 +2523,36 @@ const isAsyncFn = kindOfTest('AsyncFunction');
2518
2523
  const isThenable = (thing) =>
2519
2524
  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
2520
2525
 
2526
+ // original code
2527
+ // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
2528
+
2529
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
2530
+ if (setImmediateSupported) {
2531
+ return setImmediate;
2532
+ }
2533
+
2534
+ return postMessageSupported ? ((token, callbacks) => {
2535
+ _global.addEventListener("message", ({source, data}) => {
2536
+ if (source === _global && data === token) {
2537
+ callbacks.length && callbacks.shift()();
2538
+ }
2539
+ }, false);
2540
+
2541
+ return (cb) => {
2542
+ callbacks.push(cb);
2543
+ _global.postMessage(token, "*");
2544
+ }
2545
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
2546
+ })(
2547
+ typeof setImmediate === 'function',
2548
+ isFunction(_global.postMessage)
2549
+ );
2550
+
2551
+ const asap = typeof queueMicrotask !== 'undefined' ?
2552
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
2553
+
2554
+ // *********************
2555
+
2521
2556
  /* harmony default export */ var utils = ({
2522
2557
  isArray,
2523
2558
  isArrayBuffer,
@@ -2573,7 +2608,9 @@ const isThenable = (thing) =>
2573
2608
  isSpecCompliantForm,
2574
2609
  toJSONObject,
2575
2610
  isAsyncFn,
2576
- isThenable
2611
+ isThenable,
2612
+ setImmediate: _setImmediate,
2613
+ asap
2577
2614
  });
2578
2615
 
2579
2616
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosError.js
@@ -3997,8 +4034,6 @@ function speedometer(samplesCount, min) {
3997
4034
  /* harmony default export */ var helpers_speedometer = (speedometer);
3998
4035
 
3999
4036
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/throttle.js
4000
-
4001
-
4002
4037
  /**
4003
4038
  * Throttle decorator
4004
4039
  * @param {Function} fn
@@ -4007,28 +4042,39 @@ function speedometer(samplesCount, min) {
4007
4042
  */
4008
4043
  function throttle(fn, freq) {
4009
4044
  let timestamp = 0;
4010
- const threshold = 1000 / freq;
4011
- let timer = null;
4012
- return function throttled() {
4013
- const force = this === true;
4045
+ let threshold = 1000 / freq;
4046
+ let lastArgs;
4047
+ let timer;
4048
+
4049
+ const invoke = (args, now = Date.now()) => {
4050
+ timestamp = now;
4051
+ lastArgs = null;
4052
+ if (timer) {
4053
+ clearTimeout(timer);
4054
+ timer = null;
4055
+ }
4056
+ fn.apply(null, args);
4057
+ }
4014
4058
 
4059
+ const throttled = (...args) => {
4015
4060
  const now = Date.now();
4016
- if (force || now - timestamp > threshold) {
4017
- if (timer) {
4018
- clearTimeout(timer);
4019
- timer = null;
4061
+ const passed = now - timestamp;
4062
+ if ( passed >= threshold) {
4063
+ invoke(args, now);
4064
+ } else {
4065
+ lastArgs = args;
4066
+ if (!timer) {
4067
+ timer = setTimeout(() => {
4068
+ timer = null;
4069
+ invoke(lastArgs)
4070
+ }, threshold - passed);
4020
4071
  }
4021
- timestamp = now;
4022
- return fn.apply(null, arguments);
4023
- }
4024
- if (!timer) {
4025
- timer = setTimeout(() => {
4026
- timer = null;
4027
- timestamp = Date.now();
4028
- return fn.apply(null, arguments);
4029
- }, threshold - (now - timestamp));
4030
4072
  }
4031
- };
4073
+ }
4074
+
4075
+ const flush = () => lastArgs && invoke(lastArgs);
4076
+
4077
+ return [throttled, flush];
4032
4078
  }
4033
4079
 
4034
4080
  /* harmony default export */ var helpers_throttle = (throttle);
@@ -4037,7 +4083,8 @@ function throttle(fn, freq) {
4037
4083
 
4038
4084
 
4039
4085
 
4040
- /* harmony default export */ var progressEventReducer = ((listener, isDownloadStream, freq = 3) => {
4086
+
4087
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
4041
4088
  let bytesNotified = 0;
4042
4089
  const _speedometer = helpers_speedometer(50, 250);
4043
4090
 
@@ -4058,14 +4105,25 @@ function throttle(fn, freq) {
4058
4105
  rate: rate ? rate : undefined,
4059
4106
  estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
4060
4107
  event: e,
4061
- lengthComputable: total != null
4108
+ lengthComputable: total != null,
4109
+ [isDownloadStream ? 'download' : 'upload']: true
4062
4110
  };
4063
4111
 
4064
- data[isDownloadStream ? 'download' : 'upload'] = true;
4065
-
4066
4112
  listener(data);
4067
4113
  }, freq);
4068
- });
4114
+ }
4115
+
4116
+ const progressEventDecorator = (total, throttled) => {
4117
+ const lengthComputable = total != null;
4118
+
4119
+ return [(loaded) => throttled[0]({
4120
+ lengthComputable,
4121
+ total,
4122
+ loaded
4123
+ }), throttled[1]];
4124
+ }
4125
+
4126
+ const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));
4069
4127
 
4070
4128
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
4071
4129
 
@@ -4423,16 +4481,18 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4423
4481
  const _config = resolveConfig(config);
4424
4482
  let requestData = _config.data;
4425
4483
  const requestHeaders = core_AxiosHeaders.from(_config.headers).normalize();
4426
- let {responseType} = _config;
4484
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
4427
4485
  let onCanceled;
4486
+ let uploadThrottled, downloadThrottled;
4487
+ let flushUpload, flushDownload;
4488
+
4428
4489
  function done() {
4429
- if (_config.cancelToken) {
4430
- _config.cancelToken.unsubscribe(onCanceled);
4431
- }
4490
+ flushUpload && flushUpload(); // flush events
4491
+ flushDownload && flushDownload(); // flush events
4432
4492
 
4433
- if (_config.signal) {
4434
- _config.signal.removeEventListener('abort', onCanceled);
4435
- }
4493
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
4494
+
4495
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
4436
4496
  }
4437
4497
 
4438
4498
  let request = new XMLHttpRequest();
@@ -4502,7 +4562,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4502
4562
  return;
4503
4563
  }
4504
4564
 
4505
- reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, _config, request));
4565
+ reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
4506
4566
 
4507
4567
  // Clean up request
4508
4568
  request = null;
@@ -4512,7 +4572,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4512
4572
  request.onerror = function handleError() {
4513
4573
  // Real errors are hidden from us by the browser
4514
4574
  // onerror should only fire if it's a network error
4515
- reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, _config, request));
4575
+ reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request));
4516
4576
 
4517
4577
  // Clean up request
4518
4578
  request = null;
@@ -4528,7 +4588,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4528
4588
  reject(new core_AxiosError(
4529
4589
  timeoutErrorMessage,
4530
4590
  transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
4531
- _config,
4591
+ config,
4532
4592
  request));
4533
4593
 
4534
4594
  // Clean up request
@@ -4556,13 +4616,18 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4556
4616
  }
4557
4617
 
4558
4618
  // Handle progress if needed
4559
- if (typeof _config.onDownloadProgress === 'function') {
4560
- request.addEventListener('progress', progressEventReducer(_config.onDownloadProgress, true));
4619
+ if (onDownloadProgress) {
4620
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
4621
+ request.addEventListener('progress', downloadThrottled);
4561
4622
  }
4562
4623
 
4563
4624
  // Not all browsers support upload events
4564
- if (typeof _config.onUploadProgress === 'function' && request.upload) {
4565
- request.upload.addEventListener('progress', progressEventReducer(_config.onUploadProgress));
4625
+ if (onUploadProgress && request.upload) {
4626
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
4627
+
4628
+ request.upload.addEventListener('progress', uploadThrottled);
4629
+
4630
+ request.upload.addEventListener('loadend', flushUpload);
4566
4631
  }
4567
4632
 
4568
4633
  if (_config.cancelToken || _config.signal) {
@@ -4646,7 +4711,6 @@ const composeSignals = (signals, timeout) => {
4646
4711
 
4647
4712
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/trackStream.js
4648
4713
 
4649
-
4650
4714
  const streamChunk = function* (chunk, chunkSize) {
4651
4715
  let len = chunk.byteLength;
4652
4716
 
@@ -4675,25 +4739,38 @@ const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
4675
4739
  const iterator = readBytes(stream, chunkSize, encode);
4676
4740
 
4677
4741
  let bytes = 0;
4742
+ let done;
4743
+ let _onFinish = (e) => {
4744
+ if (!done) {
4745
+ done = true;
4746
+ onFinish && onFinish(e);
4747
+ }
4748
+ }
4678
4749
 
4679
4750
  return new ReadableStream({
4680
- type: 'bytes',
4681
-
4682
4751
  async pull(controller) {
4683
- const {done, value} = await iterator.next();
4752
+ try {
4753
+ const {done, value} = await iterator.next();
4684
4754
 
4685
- if (done) {
4686
- controller.close();
4687
- onFinish();
4688
- return;
4689
- }
4755
+ if (done) {
4756
+ _onFinish();
4757
+ controller.close();
4758
+ return;
4759
+ }
4690
4760
 
4691
- let len = value.byteLength;
4692
- onProgress && onProgress(bytes += len);
4693
- controller.enqueue(new Uint8Array(value));
4761
+ let len = value.byteLength;
4762
+ if (onProgress) {
4763
+ let loadedBytes = bytes += len;
4764
+ onProgress(loadedBytes);
4765
+ }
4766
+ controller.enqueue(new Uint8Array(value));
4767
+ } catch (err) {
4768
+ _onFinish(err);
4769
+ throw err;
4770
+ }
4694
4771
  },
4695
4772
  cancel(reason) {
4696
- onFinish(reason);
4773
+ _onFinish(reason);
4697
4774
  return iterator.return();
4698
4775
  }
4699
4776
  }, {
@@ -4712,15 +4789,6 @@ const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
4712
4789
 
4713
4790
 
4714
4791
 
4715
- const fetchProgressDecorator = (total, fn) => {
4716
- const lengthComputable = total != null;
4717
- return (loaded) => setTimeout(() => fn({
4718
- lengthComputable,
4719
- total,
4720
- loaded
4721
- }));
4722
- }
4723
-
4724
4792
  const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
4725
4793
  const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
4726
4794
 
@@ -4730,7 +4798,15 @@ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
4730
4798
  async (str) => new Uint8Array(await new Response(str).arrayBuffer())
4731
4799
  );
4732
4800
 
4733
- const supportsRequestStream = isReadableStreamSupported && (() => {
4801
+ const test = (fn, ...args) => {
4802
+ try {
4803
+ return !!fn(...args);
4804
+ } catch (e) {
4805
+ return false
4806
+ }
4807
+ }
4808
+
4809
+ const supportsRequestStream = isReadableStreamSupported && test(() => {
4734
4810
  let duplexAccessed = false;
4735
4811
 
4736
4812
  const hasContentType = new Request(platform.origin, {
@@ -4743,17 +4819,13 @@ const supportsRequestStream = isReadableStreamSupported && (() => {
4743
4819
  }).headers.has('Content-Type');
4744
4820
 
4745
4821
  return duplexAccessed && !hasContentType;
4746
- })();
4822
+ });
4747
4823
 
4748
4824
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
4749
4825
 
4750
- const supportsResponseStream = isReadableStreamSupported && !!(()=> {
4751
- try {
4752
- return utils.isReadableStream(new Response('').body);
4753
- } catch(err) {
4754
- // return undefined
4755
- }
4756
- })();
4826
+ const supportsResponseStream = isReadableStreamSupported &&
4827
+ test(() => utils.isReadableStream(new Response('').body));
4828
+
4757
4829
 
4758
4830
  const resolvers = {
4759
4831
  stream: supportsResponseStream && ((res) => res.body)
@@ -4781,7 +4853,7 @@ const getBodyLength = async (body) => {
4781
4853
  return (await new Request(body).arrayBuffer()).byteLength;
4782
4854
  }
4783
4855
 
4784
- if(utils.isArrayBufferView(body)) {
4856
+ if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {
4785
4857
  return body.byteLength;
4786
4858
  }
4787
4859
 
@@ -4851,15 +4923,17 @@ const resolveBodyLength = async (headers, body) => {
4851
4923
  }
4852
4924
 
4853
4925
  if (_request.body) {
4854
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(
4926
+ const [onProgress, flush] = progressEventDecorator(
4855
4927
  requestContentLength,
4856
- progressEventReducer(onUploadProgress)
4857
- ), null, encodeText);
4928
+ progressEventReducer(asyncDecorator(onUploadProgress))
4929
+ );
4930
+
4931
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
4858
4932
  }
4859
4933
  }
4860
4934
 
4861
4935
  if (!utils.isString(withCredentials)) {
4862
- withCredentials = withCredentials ? 'cors' : 'omit';
4936
+ withCredentials = withCredentials ? 'include' : 'omit';
4863
4937
  }
4864
4938
 
4865
4939
  request = new Request(url, {
@@ -4869,7 +4943,7 @@ const resolveBodyLength = async (headers, body) => {
4869
4943
  headers: headers.normalize().toJSON(),
4870
4944
  body: data,
4871
4945
  duplex: "half",
4872
- withCredentials
4946
+ credentials: withCredentials
4873
4947
  });
4874
4948
 
4875
4949
  let response = await fetch(request);
@@ -4885,11 +4959,16 @@ const resolveBodyLength = async (headers, body) => {
4885
4959
 
4886
4960
  const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));
4887
4961
 
4962
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
4963
+ responseContentLength,
4964
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
4965
+ ) || [];
4966
+
4888
4967
  response = new Response(
4889
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(
4890
- responseContentLength,
4891
- progressEventReducer(onDownloadProgress, true)
4892
- ), isStreamResponse && onFinish, encodeText),
4968
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
4969
+ flush && flush();
4970
+ isStreamResponse && onFinish();
4971
+ }, encodeText),
4893
4972
  options
4894
4973
  );
4895
4974
  }
@@ -5095,7 +5174,7 @@ function dispatchRequest(config) {
5095
5174
  }
5096
5175
 
5097
5176
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
5098
- const VERSION = "1.7.2";
5177
+ const VERSION = "1.7.3";
5099
5178
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js
5100
5179
 
5101
5180
 
@@ -5759,7 +5838,7 @@ const audioConfig = {
5759
5838
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=script&setup=true&lang=js
5760
5839
 
5761
5840
 
5762
- const _withScopeId = n => ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.pushScopeId)("data-v-0163468a"), n = n(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.popScopeId)(), n);
5841
+ const _withScopeId = n => ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.pushScopeId)("data-v-17ba2614"), n = n(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.popScopeId)(), n);
5763
5842
  const _hoisted_1 = ["src"];
5764
5843
  const _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("i", {
5765
5844
  class: "iconfont icon-guanbi"
@@ -5878,6 +5957,7 @@ const _hoisted_20 = ["src"];
5878
5957
  let drawPlayId = null;
5879
5958
  let wenetWs = null;
5880
5959
  let wenetTimer = null;
5960
+ let audioSound = null;
5881
5961
  const contentRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(null);
5882
5962
  const scrollContainer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(null);
5883
5963
  const props = __props;
@@ -5888,6 +5968,8 @@ const _hoisted_20 = ["src"];
5888
5968
  input: "",
5889
5969
  list: [],
5890
5970
  findMatch: {},
5971
+ audioSoundState: false,
5972
+ audioSoundType: "",
5891
5973
  recorderCode: 0,
5892
5974
  //1唤醒 0沉睡
5893
5975
  recorder: new (js_audio_recorder_default())({
@@ -6030,11 +6112,9 @@ const _hoisted_20 = ["src"];
6030
6112
  }
6031
6113
  };
6032
6114
  const iAmHere = () => {
6033
- let sound = new Audio();
6034
6115
  var url = audioConfig.here;
6035
- sound.src = url;
6036
6116
  window.setTimeout(() => {
6037
- sound.play();
6117
+ playAudio(url);
6038
6118
  }, 1000);
6039
6119
  };
6040
6120
  const componentDidMount = () => {
@@ -6221,13 +6301,31 @@ const _hoisted_20 = ["src"];
6221
6301
  };
6222
6302
 
6223
6303
  // 语音播放
6224
- const playAudio = audioUrl => {
6225
- // console.log(audioUrl, "audioUrl");
6226
- // let src =
6227
- // "https://model-cloud-dev.obs.cn-east-3.myhuaweicloud.com:443/llm/1a1498112c844322837f484757f142c3male.mp3";
6304
+ const playAudio = (audioUrl, type) => {
6305
+ if (!audioUrl) {
6306
+ return false;
6307
+ }
6308
+ state.audioSoundState = false;
6309
+ state.audioSoundType = "";
6228
6310
  let url = audioUrl;
6229
- let sound = new Audio(url);
6230
- sound.play();
6311
+ if (audioSound) {
6312
+ audioSound.pause();
6313
+ audioSound.src = url;
6314
+ audioSound.load();
6315
+ } else {
6316
+ audioSound = new Audio(url);
6317
+ }
6318
+ setTimeout(() => {
6319
+ audioSound.play();
6320
+ if (type) {
6321
+ state.audioSoundState = true;
6322
+ state.audioSoundType = type;
6323
+ audioSound.addEventListener("ended", () => {
6324
+ state.audioSoundState = false;
6325
+ state.audioSoundType = "";
6326
+ }, false);
6327
+ }
6328
+ }, 100);
6231
6329
  };
6232
6330
  const startRecording = () => {
6233
6331
  state.isAudio = true;
@@ -6330,15 +6428,17 @@ const _hoisted_20 = ["src"];
6330
6428
  class: "iconfont icon-zhongxinhuida",
6331
6429
  onClick: resetQa,
6332
6430
  title: "重新回答"
6333
- }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("i", {
6334
- class: "iconfont icon-nansheng",
6431
+ }), item.ttsMaleAddress ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("i", {
6432
+ key: 0,
6433
+ class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(["iconfont icon-nansheng audio", [state.audioSoundType == 'ttsMaleAddress' && state.audioSoundState ? 'open' : 'close']]),
6335
6434
  title: "男声播报",
6336
- onClick: $event => playAudio(item.ttsMaleAddress)
6337
- }, null, 8, _hoisted_10), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("i", {
6338
- class: "iconfont icon-nvsheng",
6435
+ onClick: $event => playAudio(item.ttsMaleAddress, 'ttsMaleAddress')
6436
+ }, null, 10, _hoisted_10)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), item.ttsFemaleAddress ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("i", {
6437
+ key: 1,
6438
+ class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(["iconfont icon-nvsheng audio", [state.audioSoundType == 'ttsFemaleAddress' && state.audioSoundState ? 'open' : 'close']]),
6339
6439
  title: "女声播报",
6340
- onClick: $event => playAudio(item.ttsFemaleAddress)
6341
- }, null, 8, _hoisted_11)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), item.type == 2 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", _hoisted_12, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("img", {
6440
+ onClick: $event => playAudio(item.ttsFemaleAddress, 'ttsFemaleAddress')
6441
+ }, null, 10, _hoisted_11)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), item.type == 2 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", _hoisted_12, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("img", {
6342
6442
  src: __webpack_require__(7189),
6343
6443
  alt: "",
6344
6444
  draggable: "false"
@@ -6385,15 +6485,15 @@ const _hoisted_20 = ["src"];
6385
6485
  });
6386
6486
  ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=script&setup=true&lang=js
6387
6487
 
6388
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=0&id=0163468a&lang=css
6488
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=0&id=17ba2614&lang=css
6389
6489
  // extracted by mini-css-extract-plugin
6390
6490
 
6391
- ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=0&id=0163468a&lang=css
6491
+ ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=0&id=17ba2614&lang=css
6392
6492
 
6393
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=1&id=0163468a&lang=less&scoped=true
6493
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=1&id=17ba2614&lang=less&scoped=true
6394
6494
  // extracted by mini-css-extract-plugin
6395
6495
 
6396
- ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=1&id=0163468a&lang=less&scoped=true
6496
+ ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=1&id=17ba2614&lang=less&scoped=true
6397
6497
 
6398
6498
  // EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
6399
6499
  var exportHelper = __webpack_require__(6262);
@@ -6405,7 +6505,7 @@ var exportHelper = __webpack_require__(6262);
6405
6505
 
6406
6506
 
6407
6507
 
6408
- const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(mainvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-0163468a"]])
6508
+ const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(mainvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-17ba2614"]])
6409
6509
 
6410
6510
  /* harmony default export */ var main = (__exports__);
6411
6511
  ;// CONCATENATED MODULE: ./src/package/index.js