ai-error-assistant-pro 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/demo/api/index.js +10 -0
- package/components/demo/src/chat.vue +9 -2
- package/components/demo/src/main.vue +12 -6
- package/dist/ai-error-assistant-pro.common.js +495 -338
- package/dist/ai-error-assistant-pro.common.js.map +1 -1
- package/dist/ai-error-assistant-pro.css +1 -1
- package/dist/ai-error-assistant-pro.umd.js +495 -338
- package/dist/ai-error-assistant-pro.umd.js.map +1 -1
- package/dist/ai-error-assistant-pro.umd.min.js +3 -3
- package/dist/ai-error-assistant-pro.umd.min.js.map +1 -1
- package/package.json +3 -1
|
@@ -6546,7 +6546,7 @@ if (typeof window !== 'undefined') {
|
|
|
6546
6546
|
// Indicate to webpack that this file can be concatenated
|
|
6547
6547
|
/* harmony default export */ var setPublicPath = (null);
|
|
6548
6548
|
|
|
6549
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=
|
|
6549
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=009db85b&scoped=true
|
|
6550
6550
|
var render = function render() {
|
|
6551
6551
|
var _vm = this,
|
|
6552
6552
|
_c = _vm._self._c;
|
|
@@ -6574,6 +6574,7 @@ var render = function render() {
|
|
|
6574
6574
|
attrs: {
|
|
6575
6575
|
"resId": _vm.resId,
|
|
6576
6576
|
"xtId": _vm.xtId,
|
|
6577
|
+
"show-more-q-a": _vm.showMoreQA,
|
|
6577
6578
|
"key-word": _vm.aiMessageKeyWord,
|
|
6578
6579
|
"analy-exercise": _vm.analyExercise
|
|
6579
6580
|
},
|
|
@@ -6622,9 +6623,7 @@ var render = function render() {
|
|
|
6622
6623
|
"src": __webpack_require__(951),
|
|
6623
6624
|
"alt": ""
|
|
6624
6625
|
}
|
|
6625
|
-
})])], 1),
|
|
6626
|
-
staticClass: "disclaimer"
|
|
6627
|
-
}, [_vm._v(" 此功能公测期间对正式版用户开放 ")])]], 2) : _vm._e();
|
|
6626
|
+
})])], 1)]], 2) : _vm._e();
|
|
6628
6627
|
};
|
|
6629
6628
|
var staticRenderFns = [function () {
|
|
6630
6629
|
var _vm = this,
|
|
@@ -6645,10 +6644,10 @@ var staticRenderFns = [function () {
|
|
|
6645
6644
|
}, [_vm._v("智能解析")])]);
|
|
6646
6645
|
}];
|
|
6647
6646
|
|
|
6648
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=
|
|
6647
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=009db85b&scoped=true
|
|
6649
6648
|
|
|
6650
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=template&id=
|
|
6651
|
-
var
|
|
6649
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=template&id=87eb3e4e&scoped=true
|
|
6650
|
+
var chatvue_type_template_id_87eb3e4e_scoped_true_render = function render() {
|
|
6652
6651
|
var _vm = this,
|
|
6653
6652
|
_c = _vm._self._c;
|
|
6654
6653
|
return _c('div', {
|
|
@@ -6743,7 +6742,7 @@ var chatvue_type_template_id_d21026be_scoped_true_render = function render() {
|
|
|
6743
6742
|
}) : _vm._e()], 1)]);
|
|
6744
6743
|
})], 2);
|
|
6745
6744
|
};
|
|
6746
|
-
var
|
|
6745
|
+
var chatvue_type_template_id_87eb3e4e_scoped_true_staticRenderFns = [];
|
|
6747
6746
|
|
|
6748
6747
|
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
|
|
6749
6748
|
|
|
@@ -6984,9 +6983,10 @@ const trim = str => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uF
|
|
|
6984
6983
|
* @param {Boolean} [allOwnKeys = false]
|
|
6985
6984
|
* @returns {any}
|
|
6986
6985
|
*/
|
|
6987
|
-
function forEach(obj, fn
|
|
6988
|
-
|
|
6989
|
-
|
|
6986
|
+
function forEach(obj, fn) {
|
|
6987
|
+
let {
|
|
6988
|
+
allOwnKeys = false
|
|
6989
|
+
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6990
6990
|
// Don't bother if no value provided
|
|
6991
6991
|
if (obj === null || typeof obj === 'undefined') {
|
|
6992
6992
|
return;
|
|
@@ -7087,9 +7087,10 @@ function merge( /* obj1, obj2, obj3, ... */
|
|
|
7087
7087
|
* @param {Boolean} [allOwnKeys]
|
|
7088
7088
|
* @returns {Object} The resulting value of object a
|
|
7089
7089
|
*/
|
|
7090
|
-
const extend = (a, b, thisArg
|
|
7091
|
-
|
|
7092
|
-
|
|
7090
|
+
const extend = function (a, b, thisArg) {
|
|
7091
|
+
let {
|
|
7092
|
+
allOwnKeys
|
|
7093
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7093
7094
|
forEach(b, (val, key) => {
|
|
7094
7095
|
if (thisArg && isFunction(val)) {
|
|
7095
7096
|
a[key] = bind(val, thisArg);
|
|
@@ -7264,9 +7265,12 @@ const toCamelCase = str => {
|
|
|
7264
7265
|
};
|
|
7265
7266
|
|
|
7266
7267
|
/* Creating a function that will check if an object has a property. */
|
|
7267
|
-
const utils_hasOwnProperty = (
|
|
7268
|
-
|
|
7269
|
-
|
|
7268
|
+
const utils_hasOwnProperty = (_ref => {
|
|
7269
|
+
let {
|
|
7270
|
+
hasOwnProperty
|
|
7271
|
+
} = _ref;
|
|
7272
|
+
return (obj, prop) => hasOwnProperty.call(obj, prop);
|
|
7273
|
+
})(Object.prototype);
|
|
7270
7274
|
|
|
7271
7275
|
/**
|
|
7272
7276
|
* Determine if a value is a RegExp object
|
|
@@ -7334,7 +7338,9 @@ const ALPHABET = {
|
|
|
7334
7338
|
ALPHA,
|
|
7335
7339
|
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
7336
7340
|
};
|
|
7337
|
-
const generateString = (
|
|
7341
|
+
const generateString = function () {
|
|
7342
|
+
let size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
|
|
7343
|
+
let alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
|
|
7338
7344
|
let str = '';
|
|
7339
7345
|
const {
|
|
7340
7346
|
length
|
|
@@ -7388,10 +7394,11 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
7388
7394
|
return setImmediate;
|
|
7389
7395
|
}
|
|
7390
7396
|
return postMessageSupported ? ((token, callbacks) => {
|
|
7391
|
-
_global.addEventListener("message",
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7397
|
+
_global.addEventListener("message", _ref2 => {
|
|
7398
|
+
let {
|
|
7399
|
+
source,
|
|
7400
|
+
data
|
|
7401
|
+
} = _ref2;
|
|
7395
7402
|
if (source === _global && data === token) {
|
|
7396
7403
|
callbacks.length && callbacks.shift()();
|
|
7397
7404
|
}
|
|
@@ -8431,7 +8438,10 @@ class AxiosHeaders {
|
|
|
8431
8438
|
});
|
|
8432
8439
|
return this;
|
|
8433
8440
|
}
|
|
8434
|
-
concat(
|
|
8441
|
+
concat() {
|
|
8442
|
+
for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8443
|
+
targets[_key] = arguments[_key];
|
|
8444
|
+
}
|
|
8435
8445
|
return this.constructor.concat(this, ...targets);
|
|
8436
8446
|
}
|
|
8437
8447
|
toJSON(asStrings) {
|
|
@@ -8445,7 +8455,10 @@ class AxiosHeaders {
|
|
|
8445
8455
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
8446
8456
|
}
|
|
8447
8457
|
toString() {
|
|
8448
|
-
return Object.entries(this.toJSON()).map(
|
|
8458
|
+
return Object.entries(this.toJSON()).map(_ref => {
|
|
8459
|
+
let [header, value] = _ref;
|
|
8460
|
+
return header + ': ' + value;
|
|
8461
|
+
}).join('\n');
|
|
8449
8462
|
}
|
|
8450
8463
|
get [Symbol.toStringTag]() {
|
|
8451
8464
|
return 'AxiosHeaders';
|
|
@@ -8453,8 +8466,11 @@ class AxiosHeaders {
|
|
|
8453
8466
|
static from(thing) {
|
|
8454
8467
|
return thing instanceof this ? thing : new this(thing);
|
|
8455
8468
|
}
|
|
8456
|
-
static concat(first
|
|
8469
|
+
static concat(first) {
|
|
8457
8470
|
const computed = new this(first);
|
|
8471
|
+
for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
8472
|
+
targets[_key2 - 1] = arguments[_key2];
|
|
8473
|
+
}
|
|
8458
8474
|
targets.forEach(target => computed.set(target));
|
|
8459
8475
|
return computed;
|
|
8460
8476
|
}
|
|
@@ -8478,9 +8494,10 @@ class AxiosHeaders {
|
|
|
8478
8494
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
8479
8495
|
|
|
8480
8496
|
// reserved names hotfix
|
|
8481
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({
|
|
8482
|
-
|
|
8483
|
-
|
|
8497
|
+
utils.reduceDescriptors(AxiosHeaders.prototype, (_ref2, key) => {
|
|
8498
|
+
let {
|
|
8499
|
+
value
|
|
8500
|
+
} = _ref2;
|
|
8484
8501
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
8485
8502
|
return {
|
|
8486
8503
|
get: () => value,
|
|
@@ -8631,7 +8648,8 @@ function throttle(fn, freq) {
|
|
|
8631
8648
|
let threshold = 1000 / freq;
|
|
8632
8649
|
let lastArgs;
|
|
8633
8650
|
let timer;
|
|
8634
|
-
const invoke = (args
|
|
8651
|
+
const invoke = function (args) {
|
|
8652
|
+
let now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
|
|
8635
8653
|
timestamp = now;
|
|
8636
8654
|
lastArgs = null;
|
|
8637
8655
|
if (timer) {
|
|
@@ -8640,9 +8658,12 @@ function throttle(fn, freq) {
|
|
|
8640
8658
|
}
|
|
8641
8659
|
fn.apply(null, args);
|
|
8642
8660
|
};
|
|
8643
|
-
const throttled = (
|
|
8661
|
+
const throttled = function () {
|
|
8644
8662
|
const now = Date.now();
|
|
8645
8663
|
const passed = now - timestamp;
|
|
8664
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8665
|
+
args[_key] = arguments[_key];
|
|
8666
|
+
}
|
|
8646
8667
|
if (passed >= threshold) {
|
|
8647
8668
|
invoke(args, now);
|
|
8648
8669
|
} else {
|
|
@@ -8663,7 +8684,8 @@ function throttle(fn, freq) {
|
|
|
8663
8684
|
|
|
8664
8685
|
|
|
8665
8686
|
|
|
8666
|
-
const progressEventReducer = (listener, isDownloadStream
|
|
8687
|
+
const progressEventReducer = function (listener, isDownloadStream) {
|
|
8688
|
+
let freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
8667
8689
|
let bytesNotified = 0;
|
|
8668
8690
|
const _speedometer = helpers_speedometer(50, 250);
|
|
8669
8691
|
return helpers_throttle(e => {
|
|
@@ -8695,7 +8717,12 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
8695
8717
|
loaded
|
|
8696
8718
|
}), throttled[1]];
|
|
8697
8719
|
};
|
|
8698
|
-
const asyncDecorator = fn =>
|
|
8720
|
+
const asyncDecorator = fn => function () {
|
|
8721
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8722
|
+
args[_key] = arguments[_key];
|
|
8723
|
+
}
|
|
8724
|
+
return utils.asap(() => fn(...args));
|
|
8725
|
+
};
|
|
8699
8726
|
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
8700
8727
|
|
|
8701
8728
|
|
|
@@ -9288,8 +9315,11 @@ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream ===
|
|
|
9288
9315
|
|
|
9289
9316
|
// used only inside the fetch adapter
|
|
9290
9317
|
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? (encoder => str => encoder.encode(str))(new TextEncoder()) : async str => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
9291
|
-
const test = (fn
|
|
9318
|
+
const test = function (fn) {
|
|
9292
9319
|
try {
|
|
9320
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
9321
|
+
args[_key - 1] = arguments[_key];
|
|
9322
|
+
}
|
|
9293
9323
|
return !!fn(...args);
|
|
9294
9324
|
} catch (e) {
|
|
9295
9325
|
return false;
|
|
@@ -9486,7 +9516,10 @@ const isResolvedHandle = adapter => utils.isFunction(adapter) || adapter === nul
|
|
|
9486
9516
|
rejectedReasons[id || '#' + i] = adapter;
|
|
9487
9517
|
}
|
|
9488
9518
|
if (!adapter) {
|
|
9489
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
9519
|
+
const reasons = Object.entries(rejectedReasons).map(_ref => {
|
|
9520
|
+
let [id, state] = _ref;
|
|
9521
|
+
return `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
|
9522
|
+
});
|
|
9490
9523
|
let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
9491
9524
|
throw new core_AxiosError(`There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT');
|
|
9492
9525
|
}
|
|
@@ -10055,7 +10088,8 @@ const HttpStatusCode = {
|
|
|
10055
10088
|
NotExtended: 510,
|
|
10056
10089
|
NetworkAuthenticationRequired: 511
|
|
10057
10090
|
};
|
|
10058
|
-
Object.entries(HttpStatusCode).forEach(
|
|
10091
|
+
Object.entries(HttpStatusCode).forEach(_ref => {
|
|
10092
|
+
let [key, value] = _ref;
|
|
10059
10093
|
HttpStatusCode[value] = key;
|
|
10060
10094
|
});
|
|
10061
10095
|
/* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode);
|
|
@@ -10250,49 +10284,58 @@ const _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
|
|
|
10250
10284
|
const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
|
|
10251
10285
|
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
10252
10286
|
const b64chs = Array.prototype.slice.call(b64ch);
|
|
10253
|
-
const b64tab = (a => {
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10287
|
+
const b64tab = ((a) => {
|
|
10288
|
+
let tab = {};
|
|
10289
|
+
a.forEach((c, i) => tab[c] = i);
|
|
10290
|
+
return tab;
|
|
10257
10291
|
})(b64chs);
|
|
10258
10292
|
const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
10259
10293
|
const _fromCC = String.fromCharCode.bind(String);
|
|
10260
|
-
const _U8Afrom = typeof Uint8Array.from === 'function'
|
|
10261
|
-
|
|
10262
|
-
|
|
10294
|
+
const _U8Afrom = typeof Uint8Array.from === 'function'
|
|
10295
|
+
? Uint8Array.from.bind(Uint8Array)
|
|
10296
|
+
: (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
|
|
10297
|
+
const _mkUriSafe = (src) => src
|
|
10298
|
+
.replace(/=/g, '').replace(/[+\/]/g, (m0) => m0 == '+' ? '-' : '_');
|
|
10299
|
+
const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
10263
10300
|
/**
|
|
10264
10301
|
* polyfill version of `btoa`
|
|
10265
10302
|
*/
|
|
10266
|
-
const btoaPolyfill = bin => {
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10303
|
+
const btoaPolyfill = (bin) => {
|
|
10304
|
+
// console.log('polyfilled');
|
|
10305
|
+
let u32, c0, c1, c2, asc = '';
|
|
10306
|
+
const pad = bin.length % 3;
|
|
10307
|
+
for (let i = 0; i < bin.length;) {
|
|
10308
|
+
if ((c0 = bin.charCodeAt(i++)) > 255 ||
|
|
10309
|
+
(c1 = bin.charCodeAt(i++)) > 255 ||
|
|
10310
|
+
(c2 = bin.charCodeAt(i++)) > 255)
|
|
10311
|
+
throw new TypeError('invalid character found');
|
|
10312
|
+
u32 = (c0 << 16) | (c1 << 8) | c2;
|
|
10313
|
+
asc += b64chs[u32 >> 18 & 63]
|
|
10314
|
+
+ b64chs[u32 >> 12 & 63]
|
|
10315
|
+
+ b64chs[u32 >> 6 & 63]
|
|
10316
|
+
+ b64chs[u32 & 63];
|
|
10317
|
+
}
|
|
10318
|
+
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
10280
10319
|
};
|
|
10281
10320
|
/**
|
|
10282
10321
|
* does what `window.btoa` of web browsers do.
|
|
10283
10322
|
* @param {String} bin binary string
|
|
10284
10323
|
* @returns {string} Base64-encoded string
|
|
10285
10324
|
*/
|
|
10286
|
-
const _btoa = typeof btoa === 'function' ?
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10325
|
+
const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)
|
|
10326
|
+
: _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')
|
|
10327
|
+
: btoaPolyfill;
|
|
10328
|
+
const _fromUint8Array = _hasBuffer
|
|
10329
|
+
? (u8a) => Buffer.from(u8a).toString('base64')
|
|
10330
|
+
: (u8a) => {
|
|
10331
|
+
// cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
|
|
10332
|
+
const maxargs = 0x1000;
|
|
10333
|
+
let strs = [];
|
|
10334
|
+
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
10335
|
+
strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
|
|
10336
|
+
}
|
|
10337
|
+
return _btoa(strs.join(''));
|
|
10338
|
+
};
|
|
10296
10339
|
/**
|
|
10297
10340
|
* converts a Uint8Array to a Base64 string.
|
|
10298
10341
|
* @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5
|
|
@@ -10302,14 +10345,25 @@ const fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8
|
|
|
10302
10345
|
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
|
|
10303
10346
|
// const utob = (src: string) => unescape(encodeURIComponent(src));
|
|
10304
10347
|
// reverting good old fationed regexp
|
|
10305
|
-
const cb_utob = c => {
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10348
|
+
const cb_utob = (c) => {
|
|
10349
|
+
if (c.length < 2) {
|
|
10350
|
+
var cc = c.charCodeAt(0);
|
|
10351
|
+
return cc < 0x80 ? c
|
|
10352
|
+
: cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))
|
|
10353
|
+
+ _fromCC(0x80 | (cc & 0x3f)))
|
|
10354
|
+
: (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))
|
|
10355
|
+
+ _fromCC(0x80 | ((cc >>> 6) & 0x3f))
|
|
10356
|
+
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
10357
|
+
}
|
|
10358
|
+
else {
|
|
10359
|
+
var cc = 0x10000
|
|
10360
|
+
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
10361
|
+
+ (c.charCodeAt(1) - 0xDC00);
|
|
10362
|
+
return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))
|
|
10363
|
+
+ _fromCC(0x80 | ((cc >>> 12) & 0x3f))
|
|
10364
|
+
+ _fromCC(0x80 | ((cc >>> 6) & 0x3f))
|
|
10365
|
+
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
10366
|
+
}
|
|
10313
10367
|
};
|
|
10314
10368
|
const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
10315
10369
|
/**
|
|
@@ -10317,163 +10371,168 @@ const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
10317
10371
|
* @param {string} src UTF-8 string
|
|
10318
10372
|
* @returns {string} UTF-16 string
|
|
10319
10373
|
*/
|
|
10320
|
-
const utob = u => u.replace(re_utob, cb_utob);
|
|
10374
|
+
const utob = (u) => u.replace(re_utob, cb_utob);
|
|
10321
10375
|
//
|
|
10322
|
-
const _encode = _hasBuffer
|
|
10376
|
+
const _encode = _hasBuffer
|
|
10377
|
+
? (s) => Buffer.from(s, 'utf8').toString('base64')
|
|
10378
|
+
: _TE
|
|
10379
|
+
? (s) => _fromUint8Array(_TE.encode(s))
|
|
10380
|
+
: (s) => _btoa(utob(s));
|
|
10323
10381
|
/**
|
|
10324
10382
|
* converts a UTF-8-encoded string to a Base64 string.
|
|
10325
10383
|
* @param {boolean} [urlsafe] if `true` make the result URL-safe
|
|
10326
10384
|
* @returns {string} Base64 string
|
|
10327
10385
|
*/
|
|
10328
|
-
const base64_encode = (src, urlsafe = false) => urlsafe
|
|
10386
|
+
const base64_encode = (src, urlsafe = false) => urlsafe
|
|
10387
|
+
? _mkUriSafe(_encode(src))
|
|
10388
|
+
: _encode(src);
|
|
10329
10389
|
/**
|
|
10330
10390
|
* converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
|
|
10331
10391
|
* @returns {string} Base64 string
|
|
10332
10392
|
*/
|
|
10333
|
-
const base64_encodeURI = src => base64_encode(src, true);
|
|
10393
|
+
const base64_encodeURI = (src) => base64_encode(src, true);
|
|
10334
10394
|
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
|
|
10335
10395
|
// const btou = (src: string) => decodeURIComponent(escape(src));
|
|
10336
10396
|
// reverting good old fationed regexp
|
|
10337
10397
|
const re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
10338
|
-
const cb_btou = cccc => {
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10398
|
+
const cb_btou = (cccc) => {
|
|
10399
|
+
switch (cccc.length) {
|
|
10400
|
+
case 4:
|
|
10401
|
+
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
10402
|
+
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
10403
|
+
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
10404
|
+
| (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;
|
|
10405
|
+
return (_fromCC((offset >>> 10) + 0xD800)
|
|
10406
|
+
+ _fromCC((offset & 0x3FF) + 0xDC00));
|
|
10407
|
+
case 3:
|
|
10408
|
+
return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)
|
|
10409
|
+
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
10410
|
+
| (0x3f & cccc.charCodeAt(2)));
|
|
10411
|
+
default:
|
|
10412
|
+
return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)
|
|
10413
|
+
| (0x3f & cccc.charCodeAt(1)));
|
|
10414
|
+
}
|
|
10349
10415
|
};
|
|
10350
10416
|
/**
|
|
10351
10417
|
* @deprecated should have been internal use only.
|
|
10352
10418
|
* @param {string} src UTF-16 string
|
|
10353
10419
|
* @returns {string} UTF-8 string
|
|
10354
10420
|
*/
|
|
10355
|
-
const btou = b => b.replace(re_btou, cb_btou);
|
|
10421
|
+
const btou = (b) => b.replace(re_btou, cb_btou);
|
|
10356
10422
|
/**
|
|
10357
10423
|
* polyfill version of `atob`
|
|
10358
10424
|
*/
|
|
10359
|
-
const atobPolyfill = asc => {
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
bin = '',
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10425
|
+
const atobPolyfill = (asc) => {
|
|
10426
|
+
// console.log('polyfilled');
|
|
10427
|
+
asc = asc.replace(/\s+/g, '');
|
|
10428
|
+
if (!b64re.test(asc))
|
|
10429
|
+
throw new TypeError('malformed base64.');
|
|
10430
|
+
asc += '=='.slice(2 - (asc.length & 3));
|
|
10431
|
+
let u24, bin = '', r1, r2;
|
|
10432
|
+
for (let i = 0; i < asc.length;) {
|
|
10433
|
+
u24 = b64tab[asc.charAt(i++)] << 18
|
|
10434
|
+
| b64tab[asc.charAt(i++)] << 12
|
|
10435
|
+
| (r1 = b64tab[asc.charAt(i++)]) << 6
|
|
10436
|
+
| (r2 = b64tab[asc.charAt(i++)]);
|
|
10437
|
+
bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)
|
|
10438
|
+
: r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)
|
|
10439
|
+
: _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
|
|
10440
|
+
}
|
|
10441
|
+
return bin;
|
|
10373
10442
|
};
|
|
10374
10443
|
/**
|
|
10375
10444
|
* does what `window.atob` of web browsers do.
|
|
10376
10445
|
* @param {String} asc Base64-encoded string
|
|
10377
10446
|
* @returns {string} binary string
|
|
10378
10447
|
*/
|
|
10379
|
-
const _atob = typeof atob === 'function' ? asc => atob(_tidyB64(asc))
|
|
10448
|
+
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
|
|
10449
|
+
: _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')
|
|
10450
|
+
: atobPolyfill;
|
|
10380
10451
|
//
|
|
10381
|
-
const _toUint8Array = _hasBuffer
|
|
10452
|
+
const _toUint8Array = _hasBuffer
|
|
10453
|
+
? (a) => _U8Afrom(Buffer.from(a, 'base64'))
|
|
10454
|
+
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
10382
10455
|
/**
|
|
10383
10456
|
* converts a Base64 string to a Uint8Array.
|
|
10384
10457
|
*/
|
|
10385
|
-
const toUint8Array = a => _toUint8Array(_unURI(a));
|
|
10458
|
+
const toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
10386
10459
|
//
|
|
10387
|
-
const _decode = _hasBuffer
|
|
10388
|
-
|
|
10460
|
+
const _decode = _hasBuffer
|
|
10461
|
+
? (a) => Buffer.from(a, 'base64').toString('utf8')
|
|
10462
|
+
: _TD
|
|
10463
|
+
? (a) => _TD.decode(_toUint8Array(a))
|
|
10464
|
+
: (a) => btou(_atob(a));
|
|
10465
|
+
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
|
|
10389
10466
|
/**
|
|
10390
10467
|
* converts a Base64 string to a UTF-8 string.
|
|
10391
10468
|
* @param {String} src Base64 string. Both normal and URL-safe are supported
|
|
10392
10469
|
* @returns {string} UTF-8 string
|
|
10393
10470
|
*/
|
|
10394
|
-
const decode = src => _decode(_unURI(src));
|
|
10471
|
+
const decode = (src) => _decode(_unURI(src));
|
|
10395
10472
|
/**
|
|
10396
10473
|
* check if a value is a valid Base64 string
|
|
10397
10474
|
* @param {String} src a value to check
|
|
10398
10475
|
*/
|
|
10399
|
-
const isValid = src => {
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10476
|
+
const isValid = (src) => {
|
|
10477
|
+
if (typeof src !== 'string')
|
|
10478
|
+
return false;
|
|
10479
|
+
const s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
|
|
10480
|
+
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
|
|
10403
10481
|
};
|
|
10404
10482
|
//
|
|
10405
|
-
const _noEnum = v => {
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
writable: true,
|
|
10410
|
-
configurable: true
|
|
10411
|
-
};
|
|
10483
|
+
const _noEnum = (v) => {
|
|
10484
|
+
return {
|
|
10485
|
+
value: v, enumerable: false, writable: true, configurable: true
|
|
10486
|
+
};
|
|
10412
10487
|
};
|
|
10413
10488
|
/**
|
|
10414
10489
|
* extend String.prototype with relevant methods
|
|
10415
10490
|
*/
|
|
10416
10491
|
const extendString = function () {
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
return
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
return
|
|
10423
|
-
});
|
|
10424
|
-
_add('toBase64URI', function () {
|
|
10425
|
-
return base64_encode(this, true);
|
|
10426
|
-
});
|
|
10427
|
-
_add('toBase64URL', function () {
|
|
10428
|
-
return base64_encode(this, true);
|
|
10429
|
-
});
|
|
10430
|
-
_add('toUint8Array', function () {
|
|
10431
|
-
return toUint8Array(this);
|
|
10432
|
-
});
|
|
10492
|
+
const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
|
|
10493
|
+
_add('fromBase64', function () { return decode(this); });
|
|
10494
|
+
_add('toBase64', function (urlsafe) { return base64_encode(this, urlsafe); });
|
|
10495
|
+
_add('toBase64URI', function () { return base64_encode(this, true); });
|
|
10496
|
+
_add('toBase64URL', function () { return base64_encode(this, true); });
|
|
10497
|
+
_add('toUint8Array', function () { return toUint8Array(this); });
|
|
10433
10498
|
};
|
|
10434
10499
|
/**
|
|
10435
10500
|
* extend Uint8Array.prototype with relevant methods
|
|
10436
10501
|
*/
|
|
10437
10502
|
const extendUint8Array = function () {
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
return fromUint8Array(this,
|
|
10441
|
-
|
|
10442
|
-
_add('toBase64URI', function () {
|
|
10443
|
-
return fromUint8Array(this, true);
|
|
10444
|
-
});
|
|
10445
|
-
_add('toBase64URL', function () {
|
|
10446
|
-
return fromUint8Array(this, true);
|
|
10447
|
-
});
|
|
10503
|
+
const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
|
|
10504
|
+
_add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });
|
|
10505
|
+
_add('toBase64URI', function () { return fromUint8Array(this, true); });
|
|
10506
|
+
_add('toBase64URL', function () { return fromUint8Array(this, true); });
|
|
10448
10507
|
};
|
|
10449
10508
|
/**
|
|
10450
10509
|
* extend Builtin prototypes with relevant methods
|
|
10451
10510
|
*/
|
|
10452
10511
|
const extendBuiltins = () => {
|
|
10453
|
-
|
|
10454
|
-
|
|
10512
|
+
extendString();
|
|
10513
|
+
extendUint8Array();
|
|
10455
10514
|
};
|
|
10456
10515
|
const gBase64 = {
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10516
|
+
version: version,
|
|
10517
|
+
VERSION: base64_VERSION,
|
|
10518
|
+
atob: _atob,
|
|
10519
|
+
atobPolyfill: atobPolyfill,
|
|
10520
|
+
btoa: _btoa,
|
|
10521
|
+
btoaPolyfill: btoaPolyfill,
|
|
10522
|
+
fromBase64: decode,
|
|
10523
|
+
toBase64: base64_encode,
|
|
10524
|
+
encode: base64_encode,
|
|
10525
|
+
encodeURI: base64_encodeURI,
|
|
10526
|
+
encodeURL: base64_encodeURI,
|
|
10527
|
+
utob: utob,
|
|
10528
|
+
btou: btou,
|
|
10529
|
+
decode: decode,
|
|
10530
|
+
isValid: isValid,
|
|
10531
|
+
fromUint8Array: fromUint8Array,
|
|
10532
|
+
toUint8Array: toUint8Array,
|
|
10533
|
+
extendString: extendString,
|
|
10534
|
+
extendUint8Array: extendUint8Array,
|
|
10535
|
+
extendBuiltins: extendBuiltins
|
|
10477
10536
|
};
|
|
10478
10537
|
// makecjs:CUT //
|
|
10479
10538
|
|
|
@@ -10498,6 +10557,7 @@ const gBase64 = {
|
|
|
10498
10557
|
|
|
10499
10558
|
// and finally,
|
|
10500
10559
|
|
|
10560
|
+
|
|
10501
10561
|
;// CONCATENATED MODULE: ./components/demo/utils/aes-utils.js
|
|
10502
10562
|
|
|
10503
10563
|
|
|
@@ -10901,6 +10961,16 @@ async function getAutoQuestioning(iaId, message) {
|
|
|
10901
10961
|
messages: message
|
|
10902
10962
|
});
|
|
10903
10963
|
}
|
|
10964
|
+
|
|
10965
|
+
/**
|
|
10966
|
+
* 开场白及提示词查询
|
|
10967
|
+
* */
|
|
10968
|
+
const queryCallWord = resId => {
|
|
10969
|
+
return utils_request({
|
|
10970
|
+
url: prefix + `/ia/byCourseId?courseId=${resId}`,
|
|
10971
|
+
method: 'get'
|
|
10972
|
+
});
|
|
10973
|
+
};
|
|
10904
10974
|
async function sendMessageEventSource(params, signal, onmessage) {
|
|
10905
10975
|
return fetchEventSource(`${baseURL}${prefix}/assistant/conversation?token=${cache.session.getJSON('SRKJ_TOKEN_CACHE')}`, {
|
|
10906
10976
|
method: 'POST',
|
|
@@ -11697,6 +11767,9 @@ var error_chat_component = normalizeComponent(
|
|
|
11697
11767
|
|
|
11698
11768
|
/* harmony default export */ var error_chat = (error_chat_component.exports);
|
|
11699
11769
|
;// CONCATENATED MODULE: ./node_modules/marked/lib/marked.esm.js
|
|
11770
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11771
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
11772
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11700
11773
|
/**
|
|
11701
11774
|
* marked v14.1.2 - a markdown parser
|
|
11702
11775
|
* Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
|
|
@@ -11917,10 +11990,12 @@ function indentCodeCompensation(raw, text) {
|
|
|
11917
11990
|
* Tokenizer
|
|
11918
11991
|
*/
|
|
11919
11992
|
class _Tokenizer {
|
|
11920
|
-
|
|
11921
|
-
rules; // set by the lexer
|
|
11922
|
-
lexer; // set by the lexer
|
|
11993
|
+
// set by the lexer
|
|
11923
11994
|
constructor(options) {
|
|
11995
|
+
_defineProperty(this, "options", void 0);
|
|
11996
|
+
_defineProperty(this, "rules", void 0);
|
|
11997
|
+
// set by the lexer
|
|
11998
|
+
_defineProperty(this, "lexer", void 0);
|
|
11924
11999
|
this.options = options || _defaults;
|
|
11925
12000
|
}
|
|
11926
12001
|
space(src) {
|
|
@@ -12029,10 +12104,10 @@ class _Tokenizer {
|
|
|
12029
12104
|
break;
|
|
12030
12105
|
}
|
|
12031
12106
|
const lastToken = tokens[tokens.length - 1];
|
|
12032
|
-
if (lastToken
|
|
12107
|
+
if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.type) === 'code') {
|
|
12033
12108
|
// blockquote continuation cannot be preceded by a code block
|
|
12034
12109
|
break;
|
|
12035
|
-
} else if (lastToken
|
|
12110
|
+
} else if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.type) === 'blockquote') {
|
|
12036
12111
|
// include continuation in nested blockquote
|
|
12037
12112
|
const oldToken = lastToken;
|
|
12038
12113
|
const newText = oldToken.raw + '\n' + lines.join('\n');
|
|
@@ -12041,7 +12116,7 @@ class _Tokenizer {
|
|
|
12041
12116
|
raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
|
|
12042
12117
|
text = text.substring(0, text.length - oldToken.text.length) + newToken.text;
|
|
12043
12118
|
break;
|
|
12044
|
-
} else if (lastToken
|
|
12119
|
+
} else if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.type) === 'list') {
|
|
12045
12120
|
// include continuation in nested list
|
|
12046
12121
|
const oldToken = lastToken;
|
|
12047
12122
|
const newText = oldToken.raw + '\n' + lines.join('\n');
|
|
@@ -12458,7 +12533,8 @@ class _Tokenizer {
|
|
|
12458
12533
|
return outputLink(cap, link, cap[0], this.lexer);
|
|
12459
12534
|
}
|
|
12460
12535
|
}
|
|
12461
|
-
emStrong(src, maskedSrc
|
|
12536
|
+
emStrong(src, maskedSrc) {
|
|
12537
|
+
let prevChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
12462
12538
|
let match = this.rules.inline.emStrongLDelim.exec(src);
|
|
12463
12539
|
if (!match) return;
|
|
12464
12540
|
// _ can't be between two alphanumerics. \p{L}\p{N} includes non-english alphabet/numbers as well
|
|
@@ -12590,8 +12666,9 @@ class _Tokenizer {
|
|
|
12590
12666
|
// do extended autolink path validation
|
|
12591
12667
|
let prevCapZero;
|
|
12592
12668
|
do {
|
|
12669
|
+
var _this$rules$inline$_b, _this$rules$inline$_b2;
|
|
12593
12670
|
prevCapZero = cap[0];
|
|
12594
|
-
cap[0] = this.rules.inline._backpedal.exec(cap[0])
|
|
12671
|
+
cap[0] = (_this$rules$inline$_b = (_this$rules$inline$_b2 = this.rules.inline._backpedal.exec(cap[0])) === null || _this$rules$inline$_b2 === void 0 ? void 0 : _this$rules$inline$_b2[0]) !== null && _this$rules$inline$_b !== void 0 ? _this$rules$inline$_b : '';
|
|
12595
12672
|
} while (prevCapZero !== cap[0]);
|
|
12596
12673
|
text = escape$1(cap[0]);
|
|
12597
12674
|
if (cap[1] === 'www.') {
|
|
@@ -12835,12 +12912,12 @@ const inline = {
|
|
|
12835
12912
|
* Block Lexer
|
|
12836
12913
|
*/
|
|
12837
12914
|
class _Lexer {
|
|
12838
|
-
tokens;
|
|
12839
|
-
options;
|
|
12840
|
-
state;
|
|
12841
|
-
tokenizer;
|
|
12842
|
-
inlineQueue;
|
|
12843
12915
|
constructor(options) {
|
|
12916
|
+
_defineProperty(this, "tokens", void 0);
|
|
12917
|
+
_defineProperty(this, "options", void 0);
|
|
12918
|
+
_defineProperty(this, "state", void 0);
|
|
12919
|
+
_defineProperty(this, "tokenizer", void 0);
|
|
12920
|
+
_defineProperty(this, "inlineQueue", void 0);
|
|
12844
12921
|
// TokenList cannot be created in one go
|
|
12845
12922
|
this.tokens = [];
|
|
12846
12923
|
this.tokens.links = Object.create(null);
|
|
@@ -12908,7 +12985,9 @@ class _Lexer {
|
|
|
12908
12985
|
this.inlineQueue = [];
|
|
12909
12986
|
return this.tokens;
|
|
12910
12987
|
}
|
|
12911
|
-
blockTokens(src
|
|
12988
|
+
blockTokens(src) {
|
|
12989
|
+
let tokens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
12990
|
+
let lastParagraphClipped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
12912
12991
|
if (this.options.pedantic) {
|
|
12913
12992
|
src = src.replace(/\t/g, ' ').replace(/^ +$/gm, '');
|
|
12914
12993
|
}
|
|
@@ -13038,8 +13117,9 @@ class _Lexer {
|
|
|
13038
13117
|
}
|
|
13039
13118
|
}
|
|
13040
13119
|
if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
|
|
13120
|
+
var _lastToken;
|
|
13041
13121
|
lastToken = tokens[tokens.length - 1];
|
|
13042
|
-
if (lastParagraphClipped && lastToken
|
|
13122
|
+
if (lastParagraphClipped && ((_lastToken = lastToken) === null || _lastToken === void 0 ? void 0 : _lastToken.type) === 'paragraph') {
|
|
13043
13123
|
lastToken.raw += '\n' + token.raw;
|
|
13044
13124
|
lastToken.text += '\n' + token.text;
|
|
13045
13125
|
this.inlineQueue.pop();
|
|
@@ -13078,7 +13158,8 @@ class _Lexer {
|
|
|
13078
13158
|
this.state.top = true;
|
|
13079
13159
|
return tokens;
|
|
13080
13160
|
}
|
|
13081
|
-
inline(src
|
|
13161
|
+
inline(src) {
|
|
13162
|
+
let tokens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
13082
13163
|
this.inlineQueue.push({
|
|
13083
13164
|
src,
|
|
13084
13165
|
tokens
|
|
@@ -13088,7 +13169,8 @@ class _Lexer {
|
|
|
13088
13169
|
/**
|
|
13089
13170
|
* Lexing/Compiling
|
|
13090
13171
|
*/
|
|
13091
|
-
inlineTokens(src
|
|
13172
|
+
inlineTokens(src) {
|
|
13173
|
+
let tokens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
13092
13174
|
let token, lastToken, cutSrc;
|
|
13093
13175
|
// String with links masked to avoid interference with em and strong
|
|
13094
13176
|
let maskedSrc = src;
|
|
@@ -13256,41 +13338,47 @@ class _Lexer {
|
|
|
13256
13338
|
* Renderer
|
|
13257
13339
|
*/
|
|
13258
13340
|
class _Renderer {
|
|
13259
|
-
|
|
13260
|
-
parser; // set by the parser
|
|
13341
|
+
// set by the parser
|
|
13261
13342
|
constructor(options) {
|
|
13343
|
+
_defineProperty(this, "options", void 0);
|
|
13344
|
+
_defineProperty(this, "parser", void 0);
|
|
13262
13345
|
this.options = options || _defaults;
|
|
13263
13346
|
}
|
|
13264
13347
|
space(token) {
|
|
13265
13348
|
return '';
|
|
13266
13349
|
}
|
|
13267
|
-
code({
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13350
|
+
code(_ref) {
|
|
13351
|
+
var _match;
|
|
13352
|
+
let {
|
|
13353
|
+
text,
|
|
13354
|
+
lang,
|
|
13355
|
+
escaped
|
|
13356
|
+
} = _ref;
|
|
13357
|
+
const langString = (_match = (lang || '').match(/^\S*/)) === null || _match === void 0 ? void 0 : _match[0];
|
|
13273
13358
|
const code = text.replace(/\n$/, '') + '\n';
|
|
13274
13359
|
if (!langString) {
|
|
13275
13360
|
return '<pre><code>' + (escaped ? code : escape$1(code, true)) + '</code></pre>\n';
|
|
13276
13361
|
}
|
|
13277
13362
|
return '<pre><code class="language-' + escape$1(langString) + '">' + (escaped ? code : escape$1(code, true)) + '</code></pre>\n';
|
|
13278
13363
|
}
|
|
13279
|
-
blockquote({
|
|
13280
|
-
|
|
13281
|
-
|
|
13364
|
+
blockquote(_ref2) {
|
|
13365
|
+
let {
|
|
13366
|
+
tokens
|
|
13367
|
+
} = _ref2;
|
|
13282
13368
|
const body = this.parser.parse(tokens);
|
|
13283
13369
|
return `<blockquote>\n${body}</blockquote>\n`;
|
|
13284
13370
|
}
|
|
13285
|
-
html({
|
|
13286
|
-
|
|
13287
|
-
|
|
13371
|
+
html(_ref3) {
|
|
13372
|
+
let {
|
|
13373
|
+
text
|
|
13374
|
+
} = _ref3;
|
|
13288
13375
|
return text;
|
|
13289
13376
|
}
|
|
13290
|
-
heading({
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13377
|
+
heading(_ref4) {
|
|
13378
|
+
let {
|
|
13379
|
+
tokens,
|
|
13380
|
+
depth
|
|
13381
|
+
} = _ref4;
|
|
13294
13382
|
return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>\n`;
|
|
13295
13383
|
}
|
|
13296
13384
|
hr(token) {
|
|
@@ -13334,14 +13422,16 @@ class _Renderer {
|
|
|
13334
13422
|
itemBody += this.parser.parse(item.tokens, !!item.loose);
|
|
13335
13423
|
return `<li>${itemBody}</li>\n`;
|
|
13336
13424
|
}
|
|
13337
|
-
checkbox({
|
|
13338
|
-
|
|
13339
|
-
|
|
13425
|
+
checkbox(_ref5) {
|
|
13426
|
+
let {
|
|
13427
|
+
checked
|
|
13428
|
+
} = _ref5;
|
|
13340
13429
|
return '<input ' + (checked ? 'checked="" ' : '') + 'disabled="" type="checkbox">';
|
|
13341
13430
|
}
|
|
13342
|
-
paragraph({
|
|
13343
|
-
|
|
13344
|
-
|
|
13431
|
+
paragraph(_ref6) {
|
|
13432
|
+
let {
|
|
13433
|
+
tokens
|
|
13434
|
+
} = _ref6;
|
|
13345
13435
|
return `<p>${this.parser.parseInline(tokens)}</p>\n`;
|
|
13346
13436
|
}
|
|
13347
13437
|
table(token) {
|
|
@@ -13368,9 +13458,10 @@ class _Renderer {
|
|
|
13368
13458
|
if (body) body = `<tbody>${body}</tbody>`;
|
|
13369
13459
|
return '<table>\n' + '<thead>\n' + header + '</thead>\n' + body + '</table>\n';
|
|
13370
13460
|
}
|
|
13371
|
-
tablerow({
|
|
13372
|
-
|
|
13373
|
-
|
|
13461
|
+
tablerow(_ref7) {
|
|
13462
|
+
let {
|
|
13463
|
+
text
|
|
13464
|
+
} = _ref7;
|
|
13374
13465
|
return `<tr>\n${text}</tr>\n`;
|
|
13375
13466
|
}
|
|
13376
13467
|
tablecell(token) {
|
|
@@ -13382,34 +13473,39 @@ class _Renderer {
|
|
|
13382
13473
|
/**
|
|
13383
13474
|
* span level renderer
|
|
13384
13475
|
*/
|
|
13385
|
-
strong({
|
|
13386
|
-
|
|
13387
|
-
|
|
13476
|
+
strong(_ref8) {
|
|
13477
|
+
let {
|
|
13478
|
+
tokens
|
|
13479
|
+
} = _ref8;
|
|
13388
13480
|
return `<strong>${this.parser.parseInline(tokens)}</strong>`;
|
|
13389
13481
|
}
|
|
13390
|
-
em({
|
|
13391
|
-
|
|
13392
|
-
|
|
13482
|
+
em(_ref9) {
|
|
13483
|
+
let {
|
|
13484
|
+
tokens
|
|
13485
|
+
} = _ref9;
|
|
13393
13486
|
return `<em>${this.parser.parseInline(tokens)}</em>`;
|
|
13394
13487
|
}
|
|
13395
|
-
codespan({
|
|
13396
|
-
|
|
13397
|
-
|
|
13488
|
+
codespan(_ref10) {
|
|
13489
|
+
let {
|
|
13490
|
+
text
|
|
13491
|
+
} = _ref10;
|
|
13398
13492
|
return `<code>${text}</code>`;
|
|
13399
13493
|
}
|
|
13400
13494
|
br(token) {
|
|
13401
13495
|
return '<br>';
|
|
13402
13496
|
}
|
|
13403
|
-
del({
|
|
13404
|
-
|
|
13405
|
-
|
|
13497
|
+
del(_ref11) {
|
|
13498
|
+
let {
|
|
13499
|
+
tokens
|
|
13500
|
+
} = _ref11;
|
|
13406
13501
|
return `<del>${this.parser.parseInline(tokens)}</del>`;
|
|
13407
13502
|
}
|
|
13408
|
-
link({
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13503
|
+
link(_ref12) {
|
|
13504
|
+
let {
|
|
13505
|
+
href,
|
|
13506
|
+
title,
|
|
13507
|
+
tokens
|
|
13508
|
+
} = _ref12;
|
|
13413
13509
|
const text = this.parser.parseInline(tokens);
|
|
13414
13510
|
const cleanHref = cleanUrl(href);
|
|
13415
13511
|
if (cleanHref === null) {
|
|
@@ -13423,11 +13519,12 @@ class _Renderer {
|
|
|
13423
13519
|
out += '>' + text + '</a>';
|
|
13424
13520
|
return out;
|
|
13425
13521
|
}
|
|
13426
|
-
image({
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
13522
|
+
image(_ref13) {
|
|
13523
|
+
let {
|
|
13524
|
+
href,
|
|
13525
|
+
title,
|
|
13526
|
+
text
|
|
13527
|
+
} = _ref13;
|
|
13431
13528
|
const cleanHref = cleanUrl(href);
|
|
13432
13529
|
if (cleanHref === null) {
|
|
13433
13530
|
return text;
|
|
@@ -13451,44 +13548,52 @@ class _Renderer {
|
|
|
13451
13548
|
*/
|
|
13452
13549
|
class _TextRenderer {
|
|
13453
13550
|
// no need for block level renderers
|
|
13454
|
-
strong({
|
|
13455
|
-
|
|
13456
|
-
|
|
13551
|
+
strong(_ref14) {
|
|
13552
|
+
let {
|
|
13553
|
+
text
|
|
13554
|
+
} = _ref14;
|
|
13457
13555
|
return text;
|
|
13458
13556
|
}
|
|
13459
|
-
em({
|
|
13460
|
-
|
|
13461
|
-
|
|
13557
|
+
em(_ref15) {
|
|
13558
|
+
let {
|
|
13559
|
+
text
|
|
13560
|
+
} = _ref15;
|
|
13462
13561
|
return text;
|
|
13463
13562
|
}
|
|
13464
|
-
codespan({
|
|
13465
|
-
|
|
13466
|
-
|
|
13563
|
+
codespan(_ref16) {
|
|
13564
|
+
let {
|
|
13565
|
+
text
|
|
13566
|
+
} = _ref16;
|
|
13467
13567
|
return text;
|
|
13468
13568
|
}
|
|
13469
|
-
del({
|
|
13470
|
-
|
|
13471
|
-
|
|
13569
|
+
del(_ref17) {
|
|
13570
|
+
let {
|
|
13571
|
+
text
|
|
13572
|
+
} = _ref17;
|
|
13472
13573
|
return text;
|
|
13473
13574
|
}
|
|
13474
|
-
html({
|
|
13475
|
-
|
|
13476
|
-
|
|
13575
|
+
html(_ref18) {
|
|
13576
|
+
let {
|
|
13577
|
+
text
|
|
13578
|
+
} = _ref18;
|
|
13477
13579
|
return text;
|
|
13478
13580
|
}
|
|
13479
|
-
text({
|
|
13480
|
-
|
|
13481
|
-
|
|
13581
|
+
text(_ref19) {
|
|
13582
|
+
let {
|
|
13583
|
+
text
|
|
13584
|
+
} = _ref19;
|
|
13482
13585
|
return text;
|
|
13483
13586
|
}
|
|
13484
|
-
link({
|
|
13485
|
-
|
|
13486
|
-
|
|
13587
|
+
link(_ref20) {
|
|
13588
|
+
let {
|
|
13589
|
+
text
|
|
13590
|
+
} = _ref20;
|
|
13487
13591
|
return '' + text;
|
|
13488
13592
|
}
|
|
13489
|
-
image({
|
|
13490
|
-
|
|
13491
|
-
|
|
13593
|
+
image(_ref21) {
|
|
13594
|
+
let {
|
|
13595
|
+
text
|
|
13596
|
+
} = _ref21;
|
|
13492
13597
|
return '' + text;
|
|
13493
13598
|
}
|
|
13494
13599
|
br() {
|
|
@@ -13500,10 +13605,10 @@ class _TextRenderer {
|
|
|
13500
13605
|
* Parsing & Compiling
|
|
13501
13606
|
*/
|
|
13502
13607
|
class _Parser {
|
|
13503
|
-
options;
|
|
13504
|
-
renderer;
|
|
13505
|
-
textRenderer;
|
|
13506
13608
|
constructor(options) {
|
|
13609
|
+
_defineProperty(this, "options", void 0);
|
|
13610
|
+
_defineProperty(this, "renderer", void 0);
|
|
13611
|
+
_defineProperty(this, "textRenderer", void 0);
|
|
13507
13612
|
this.options = options || _defaults;
|
|
13508
13613
|
this.options.renderer = this.options.renderer || new _Renderer();
|
|
13509
13614
|
this.renderer = this.options.renderer;
|
|
@@ -13528,7 +13633,8 @@ class _Parser {
|
|
|
13528
13633
|
/**
|
|
13529
13634
|
* Parse Loop
|
|
13530
13635
|
*/
|
|
13531
|
-
parse(tokens
|
|
13636
|
+
parse(tokens) {
|
|
13637
|
+
let top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
13532
13638
|
let out = '';
|
|
13533
13639
|
for (let i = 0; i < tokens.length; i++) {
|
|
13534
13640
|
const anyToken = tokens[i];
|
|
@@ -13714,12 +13820,11 @@ class _Parser {
|
|
|
13714
13820
|
}
|
|
13715
13821
|
}
|
|
13716
13822
|
class _Hooks {
|
|
13717
|
-
options;
|
|
13718
|
-
block;
|
|
13719
13823
|
constructor(options) {
|
|
13824
|
+
_defineProperty(this, "options", void 0);
|
|
13825
|
+
_defineProperty(this, "block", void 0);
|
|
13720
13826
|
this.options = options || _defaults;
|
|
13721
13827
|
}
|
|
13722
|
-
static passThroughHooks = new Set(['preprocess', 'postprocess', 'processAllTokens']);
|
|
13723
13828
|
/**
|
|
13724
13829
|
* Process markdown before marked
|
|
13725
13830
|
*/
|
|
@@ -13751,19 +13856,20 @@ class _Hooks {
|
|
|
13751
13856
|
return this.block ? _Parser.parse : _Parser.parseInline;
|
|
13752
13857
|
}
|
|
13753
13858
|
}
|
|
13859
|
+
_defineProperty(_Hooks, "passThroughHooks", new Set(['preprocess', 'postprocess', 'processAllTokens']));
|
|
13754
13860
|
class Marked {
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
this.use(...
|
|
13861
|
+
constructor() {
|
|
13862
|
+
_defineProperty(this, "defaults", _getDefaults());
|
|
13863
|
+
_defineProperty(this, "options", this.setOptions);
|
|
13864
|
+
_defineProperty(this, "parse", this.parseMarkdown(true));
|
|
13865
|
+
_defineProperty(this, "parseInline", this.parseMarkdown(false));
|
|
13866
|
+
_defineProperty(this, "Parser", _Parser);
|
|
13867
|
+
_defineProperty(this, "Renderer", _Renderer);
|
|
13868
|
+
_defineProperty(this, "TextRenderer", _TextRenderer);
|
|
13869
|
+
_defineProperty(this, "Lexer", _Lexer);
|
|
13870
|
+
_defineProperty(this, "Tokenizer", _Tokenizer);
|
|
13871
|
+
_defineProperty(this, "Hooks", _Hooks);
|
|
13872
|
+
this.use(...arguments);
|
|
13767
13873
|
}
|
|
13768
13874
|
/**
|
|
13769
13875
|
* Run callback for every token
|
|
@@ -13794,8 +13900,9 @@ class Marked {
|
|
|
13794
13900
|
}
|
|
13795
13901
|
default:
|
|
13796
13902
|
{
|
|
13903
|
+
var _this$defaults$extens, _this$defaults$extens2;
|
|
13797
13904
|
const genericToken = token;
|
|
13798
|
-
if (this.defaults.extensions
|
|
13905
|
+
if ((_this$defaults$extens = this.defaults.extensions) !== null && _this$defaults$extens !== void 0 && (_this$defaults$extens2 = _this$defaults$extens.childTokens) !== null && _this$defaults$extens2 !== void 0 && _this$defaults$extens2[genericToken.type]) {
|
|
13799
13906
|
this.defaults.extensions.childTokens[genericToken.type].forEach(childTokens => {
|
|
13800
13907
|
const tokens = genericToken[childTokens].flat(Infinity);
|
|
13801
13908
|
values = values.concat(this.walkTokens(tokens, callback));
|
|
@@ -13808,11 +13915,14 @@ class Marked {
|
|
|
13808
13915
|
}
|
|
13809
13916
|
return values;
|
|
13810
13917
|
}
|
|
13811
|
-
use(
|
|
13918
|
+
use() {
|
|
13812
13919
|
const extensions = this.defaults.extensions || {
|
|
13813
13920
|
renderers: {},
|
|
13814
13921
|
childTokens: {}
|
|
13815
13922
|
};
|
|
13923
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13924
|
+
args[_key] = arguments[_key];
|
|
13925
|
+
}
|
|
13816
13926
|
args.forEach(pack => {
|
|
13817
13927
|
// copy options to new object
|
|
13818
13928
|
const opts = {
|
|
@@ -13831,7 +13941,10 @@ class Marked {
|
|
|
13831
13941
|
const prevRenderer = extensions.renderers[ext.name];
|
|
13832
13942
|
if (prevRenderer) {
|
|
13833
13943
|
// Replace extension with func to run new extension but fall back if false
|
|
13834
|
-
extensions.renderers[ext.name] = function (
|
|
13944
|
+
extensions.renderers[ext.name] = function () {
|
|
13945
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
13946
|
+
args[_key2] = arguments[_key2];
|
|
13947
|
+
}
|
|
13835
13948
|
let ret = ext.renderer.apply(this, args);
|
|
13836
13949
|
if (ret === false) {
|
|
13837
13950
|
ret = prevRenderer.apply(this, args);
|
|
@@ -13892,7 +14005,10 @@ class Marked {
|
|
|
13892
14005
|
const rendererFunc = pack.renderer[rendererProp];
|
|
13893
14006
|
const prevRenderer = renderer[rendererProp];
|
|
13894
14007
|
// Replace renderer with func to run extension, but fall back if false
|
|
13895
|
-
renderer[rendererProp] = (
|
|
14008
|
+
renderer[rendererProp] = function () {
|
|
14009
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
14010
|
+
args[_key3] = arguments[_key3];
|
|
14011
|
+
}
|
|
13896
14012
|
let ret = rendererFunc.apply(renderer, args);
|
|
13897
14013
|
if (ret === false) {
|
|
13898
14014
|
ret = prevRenderer.apply(renderer, args);
|
|
@@ -13917,7 +14033,10 @@ class Marked {
|
|
|
13917
14033
|
const prevTokenizer = tokenizer[tokenizerProp];
|
|
13918
14034
|
// Replace tokenizer with func to run extension, but fall back if false
|
|
13919
14035
|
// @ts-expect-error cannot type tokenizer function dynamically
|
|
13920
|
-
tokenizer[tokenizerProp] = (
|
|
14036
|
+
tokenizer[tokenizerProp] = function () {
|
|
14037
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
14038
|
+
args[_key4] = arguments[_key4];
|
|
14039
|
+
}
|
|
13921
14040
|
let ret = tokenizerFunc.apply(tokenizer, args);
|
|
13922
14041
|
if (ret === false) {
|
|
13923
14042
|
ret = prevTokenizer.apply(tokenizer, args);
|
|
@@ -13954,7 +14073,10 @@ class Marked {
|
|
|
13954
14073
|
};
|
|
13955
14074
|
} else {
|
|
13956
14075
|
// @ts-expect-error cannot type hook function dynamically
|
|
13957
|
-
hooks[hooksProp] = (
|
|
14076
|
+
hooks[hooksProp] = function () {
|
|
14077
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
14078
|
+
args[_key5] = arguments[_key5];
|
|
14079
|
+
}
|
|
13958
14080
|
let ret = hooksFunc.apply(hooks, args);
|
|
13959
14081
|
if (ret === false) {
|
|
13960
14082
|
ret = prevHook.apply(hooks, args);
|
|
@@ -13993,10 +14115,10 @@ class Marked {
|
|
|
13993
14115
|
return this;
|
|
13994
14116
|
}
|
|
13995
14117
|
lexer(src, options) {
|
|
13996
|
-
return _Lexer.lex(src, options
|
|
14118
|
+
return _Lexer.lex(src, options !== null && options !== void 0 ? options : this.defaults);
|
|
13997
14119
|
}
|
|
13998
14120
|
parser(tokens, options) {
|
|
13999
|
-
return _Parser.parse(tokens, options
|
|
14121
|
+
return _Parser.parse(tokens, options !== null && options !== void 0 ? options : this.defaults);
|
|
14000
14122
|
}
|
|
14001
14123
|
parseMarkdown(blockType) {
|
|
14002
14124
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14091,8 +14213,8 @@ marked.defaults = _defaults;
|
|
|
14091
14213
|
/**
|
|
14092
14214
|
* Use Extension
|
|
14093
14215
|
*/
|
|
14094
|
-
marked.use = function (
|
|
14095
|
-
markedInstance.use(...
|
|
14216
|
+
marked.use = function () {
|
|
14217
|
+
markedInstance.use(...arguments);
|
|
14096
14218
|
marked.defaults = markedInstance.defaults;
|
|
14097
14219
|
changeDefaults(marked.defaults);
|
|
14098
14220
|
return marked;
|
|
@@ -14159,6 +14281,10 @@ const signal = controller.signal;
|
|
|
14159
14281
|
xtId: {
|
|
14160
14282
|
type: String,
|
|
14161
14283
|
default: ''
|
|
14284
|
+
},
|
|
14285
|
+
showMoreQA: {
|
|
14286
|
+
type: Boolean,
|
|
14287
|
+
default: false
|
|
14162
14288
|
}
|
|
14163
14289
|
},
|
|
14164
14290
|
data() {
|
|
@@ -14265,7 +14391,9 @@ const signal = controller.signal;
|
|
|
14265
14391
|
content: current.message || '正在思考中。'
|
|
14266
14392
|
});
|
|
14267
14393
|
}
|
|
14268
|
-
this.
|
|
14394
|
+
if (this.showMoreQA) {
|
|
14395
|
+
this.makeAutoQuestioning(cacheMessage);
|
|
14396
|
+
}
|
|
14269
14397
|
},
|
|
14270
14398
|
makeMessageLine(res, list) {
|
|
14271
14399
|
const {
|
|
@@ -14328,6 +14456,7 @@ const signal = controller.signal;
|
|
|
14328
14456
|
}
|
|
14329
14457
|
}
|
|
14330
14458
|
} = autoRes;
|
|
14459
|
+
this.messageData[this.messageData.length - 1].followUps = [];
|
|
14331
14460
|
this.messageData[this.messageData.length - 1].followUps = followUps.length > 3 ? followUps.splice(0, 3) : followUps;
|
|
14332
14461
|
},
|
|
14333
14462
|
onStopChat(list) {
|
|
@@ -14397,10 +14526,10 @@ const signal = controller.signal;
|
|
|
14397
14526
|
});
|
|
14398
14527
|
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=script&lang=js
|
|
14399
14528
|
/* harmony default export */ var src_chatvue_type_script_lang_js = (chatvue_type_script_lang_js);
|
|
14400
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14529
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=style&index=0&id=87eb3e4e&prod&lang=scss&scoped=true
|
|
14401
14530
|
// extracted by mini-css-extract-plugin
|
|
14402
14531
|
|
|
14403
|
-
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14532
|
+
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=87eb3e4e&prod&lang=scss&scoped=true
|
|
14404
14533
|
|
|
14405
14534
|
;// CONCATENATED MODULE: ./components/demo/src/chat.vue
|
|
14406
14535
|
|
|
@@ -14413,11 +14542,11 @@ const signal = controller.signal;
|
|
|
14413
14542
|
|
|
14414
14543
|
var chat_component = normalizeComponent(
|
|
14415
14544
|
src_chatvue_type_script_lang_js,
|
|
14416
|
-
|
|
14417
|
-
|
|
14545
|
+
chatvue_type_template_id_87eb3e4e_scoped_true_render,
|
|
14546
|
+
chatvue_type_template_id_87eb3e4e_scoped_true_staticRenderFns,
|
|
14418
14547
|
false,
|
|
14419
14548
|
null,
|
|
14420
|
-
"
|
|
14549
|
+
"87eb3e4e",
|
|
14421
14550
|
null
|
|
14422
14551
|
|
|
14423
14552
|
)
|
|
@@ -14426,14 +14555,14 @@ var chat_component = normalizeComponent(
|
|
|
14426
14555
|
;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
|
|
14427
14556
|
/*! js-cookie v3.0.5 | MIT */
|
|
14428
14557
|
/* eslint-disable no-var */
|
|
14429
|
-
function js_cookie_assign(target) {
|
|
14558
|
+
function js_cookie_assign (target) {
|
|
14430
14559
|
for (var i = 1; i < arguments.length; i++) {
|
|
14431
14560
|
var source = arguments[i];
|
|
14432
14561
|
for (var key in source) {
|
|
14433
14562
|
target[key] = source[key];
|
|
14434
14563
|
}
|
|
14435
14564
|
}
|
|
14436
|
-
return target
|
|
14565
|
+
return target
|
|
14437
14566
|
}
|
|
14438
14567
|
/* eslint-enable no-var */
|
|
14439
14568
|
|
|
@@ -14443,37 +14572,48 @@ var defaultConverter = {
|
|
|
14443
14572
|
if (value[0] === '"') {
|
|
14444
14573
|
value = value.slice(1, -1);
|
|
14445
14574
|
}
|
|
14446
|
-
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
14575
|
+
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
14447
14576
|
},
|
|
14448
14577
|
write: function (value) {
|
|
14449
|
-
return encodeURIComponent(value).replace(
|
|
14578
|
+
return encodeURIComponent(value).replace(
|
|
14579
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
14580
|
+
decodeURIComponent
|
|
14581
|
+
)
|
|
14450
14582
|
}
|
|
14451
14583
|
};
|
|
14452
14584
|
/* eslint-enable no-var */
|
|
14453
14585
|
|
|
14454
14586
|
/* eslint-disable no-var */
|
|
14455
14587
|
|
|
14456
|
-
function init(converter, defaultAttributes) {
|
|
14457
|
-
function set(name, value, attributes) {
|
|
14588
|
+
function init (converter, defaultAttributes) {
|
|
14589
|
+
function set (name, value, attributes) {
|
|
14458
14590
|
if (typeof document === 'undefined') {
|
|
14459
|
-
return
|
|
14591
|
+
return
|
|
14460
14592
|
}
|
|
14593
|
+
|
|
14461
14594
|
attributes = js_cookie_assign({}, defaultAttributes, attributes);
|
|
14595
|
+
|
|
14462
14596
|
if (typeof attributes.expires === 'number') {
|
|
14463
14597
|
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
14464
14598
|
}
|
|
14465
14599
|
if (attributes.expires) {
|
|
14466
14600
|
attributes.expires = attributes.expires.toUTCString();
|
|
14467
14601
|
}
|
|
14468
|
-
|
|
14602
|
+
|
|
14603
|
+
name = encodeURIComponent(name)
|
|
14604
|
+
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
14605
|
+
.replace(/[()]/g, escape);
|
|
14606
|
+
|
|
14469
14607
|
var stringifiedAttributes = '';
|
|
14470
14608
|
for (var attributeName in attributes) {
|
|
14471
14609
|
if (!attributes[attributeName]) {
|
|
14472
|
-
continue
|
|
14610
|
+
continue
|
|
14473
14611
|
}
|
|
14612
|
+
|
|
14474
14613
|
stringifiedAttributes += '; ' + attributeName;
|
|
14614
|
+
|
|
14475
14615
|
if (attributes[attributeName] === true) {
|
|
14476
|
-
continue
|
|
14616
|
+
continue
|
|
14477
14617
|
}
|
|
14478
14618
|
|
|
14479
14619
|
// Considers RFC 6265 section 5.2:
|
|
@@ -14485,11 +14625,14 @@ function init(converter, defaultAttributes) {
|
|
|
14485
14625
|
// ...
|
|
14486
14626
|
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
14487
14627
|
}
|
|
14488
|
-
|
|
14628
|
+
|
|
14629
|
+
return (document.cookie =
|
|
14630
|
+
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
14489
14631
|
}
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14632
|
+
|
|
14633
|
+
function get (name) {
|
|
14634
|
+
if (typeof document === 'undefined' || (arguments.length && !name)) {
|
|
14635
|
+
return
|
|
14493
14636
|
}
|
|
14494
14637
|
|
|
14495
14638
|
// To prevent the for loop in the first place assign an empty array
|
|
@@ -14499,45 +14642,52 @@ function init(converter, defaultAttributes) {
|
|
|
14499
14642
|
for (var i = 0; i < cookies.length; i++) {
|
|
14500
14643
|
var parts = cookies[i].split('=');
|
|
14501
14644
|
var value = parts.slice(1).join('=');
|
|
14645
|
+
|
|
14502
14646
|
try {
|
|
14503
14647
|
var found = decodeURIComponent(parts[0]);
|
|
14504
14648
|
jar[found] = converter.read(value, found);
|
|
14649
|
+
|
|
14505
14650
|
if (name === found) {
|
|
14506
|
-
break
|
|
14651
|
+
break
|
|
14507
14652
|
}
|
|
14508
14653
|
} catch (e) {}
|
|
14509
14654
|
}
|
|
14510
|
-
|
|
14655
|
+
|
|
14656
|
+
return name ? jar[name] : jar
|
|
14511
14657
|
}
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14658
|
+
|
|
14659
|
+
return Object.create(
|
|
14660
|
+
{
|
|
14661
|
+
set,
|
|
14662
|
+
get,
|
|
14663
|
+
remove: function (name, attributes) {
|
|
14664
|
+
set(
|
|
14665
|
+
name,
|
|
14666
|
+
'',
|
|
14667
|
+
js_cookie_assign({}, attributes, {
|
|
14668
|
+
expires: -1
|
|
14669
|
+
})
|
|
14670
|
+
);
|
|
14671
|
+
},
|
|
14672
|
+
withAttributes: function (attributes) {
|
|
14673
|
+
return init(this.converter, js_cookie_assign({}, this.attributes, attributes))
|
|
14674
|
+
},
|
|
14675
|
+
withConverter: function (converter) {
|
|
14676
|
+
return init(js_cookie_assign({}, this.converter, converter), this.attributes)
|
|
14677
|
+
}
|
|
14529
14678
|
},
|
|
14530
|
-
|
|
14531
|
-
value: Object.freeze(
|
|
14679
|
+
{
|
|
14680
|
+
attributes: { value: Object.freeze(defaultAttributes) },
|
|
14681
|
+
converter: { value: Object.freeze(converter) }
|
|
14532
14682
|
}
|
|
14533
|
-
|
|
14683
|
+
)
|
|
14534
14684
|
}
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
});
|
|
14685
|
+
|
|
14686
|
+
var api = init(defaultConverter, { path: '/' });
|
|
14538
14687
|
/* eslint-enable no-var */
|
|
14539
14688
|
|
|
14540
14689
|
|
|
14690
|
+
|
|
14541
14691
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=script&lang=js
|
|
14542
14692
|
|
|
14543
14693
|
|
|
@@ -14582,14 +14732,21 @@ var api = init(defaultConverter, {
|
|
|
14582
14732
|
// 传入组件值
|
|
14583
14733
|
stop: false,
|
|
14584
14734
|
courseFlag: false,
|
|
14585
|
-
message: ''
|
|
14735
|
+
message: '',
|
|
14736
|
+
showMoreQA: false
|
|
14586
14737
|
};
|
|
14587
14738
|
},
|
|
14588
|
-
mounted() {
|
|
14739
|
+
async mounted() {
|
|
14589
14740
|
if (!api.get("token")) {
|
|
14590
14741
|
return this.$message.warning('未获取到登录信息,请重新登录');
|
|
14591
14742
|
}
|
|
14592
14743
|
getUserInfo(api.get("token"));
|
|
14744
|
+
const wordRes = await queryCallWord(this.resId);
|
|
14745
|
+
if (!wordRes) return;
|
|
14746
|
+
const {
|
|
14747
|
+
showMoreQA
|
|
14748
|
+
} = wordRes;
|
|
14749
|
+
this.showMoreQA = showMoreQA;
|
|
14593
14750
|
},
|
|
14594
14751
|
methods: {
|
|
14595
14752
|
closeMessage() {
|
|
@@ -14642,10 +14799,10 @@ var api = init(defaultConverter, {
|
|
|
14642
14799
|
});
|
|
14643
14800
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
14644
14801
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
14645
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
14802
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=009db85b&prod&lang=scss&scoped=true
|
|
14646
14803
|
// extracted by mini-css-extract-plugin
|
|
14647
14804
|
|
|
14648
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
14805
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=009db85b&prod&lang=scss&scoped=true
|
|
14649
14806
|
|
|
14650
14807
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue
|
|
14651
14808
|
|
|
@@ -14662,7 +14819,7 @@ var main_component = normalizeComponent(
|
|
|
14662
14819
|
staticRenderFns,
|
|
14663
14820
|
false,
|
|
14664
14821
|
null,
|
|
14665
|
-
"
|
|
14822
|
+
"009db85b",
|
|
14666
14823
|
null
|
|
14667
14824
|
|
|
14668
14825
|
)
|