ai-error-assistant-pro 0.0.7 → 0.0.8
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/src/main.vue +4 -4
- package/dist/ai-error-assistant-pro.common.js +459 -327
- 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 +459 -327
- 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=4661f078&scoped=true
|
|
6550
6550
|
var render = function render() {
|
|
6551
6551
|
var _vm = this,
|
|
6552
6552
|
_c = _vm._self._c;
|
|
@@ -6622,9 +6622,7 @@ var render = function render() {
|
|
|
6622
6622
|
"src": __webpack_require__(951),
|
|
6623
6623
|
"alt": ""
|
|
6624
6624
|
}
|
|
6625
|
-
})])], 1),
|
|
6626
|
-
staticClass: "disclaimer"
|
|
6627
|
-
}, [_vm._v(" 此功能公测期间对正式版用户开放 ")])]], 2) : _vm._e();
|
|
6625
|
+
})])], 1)]], 2) : _vm._e();
|
|
6628
6626
|
};
|
|
6629
6627
|
var staticRenderFns = [function () {
|
|
6630
6628
|
var _vm = this,
|
|
@@ -6645,7 +6643,7 @@ var staticRenderFns = [function () {
|
|
|
6645
6643
|
}, [_vm._v("智能解析")])]);
|
|
6646
6644
|
}];
|
|
6647
6645
|
|
|
6648
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=
|
|
6646
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=4661f078&scoped=true
|
|
6649
6647
|
|
|
6650
6648
|
;// 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=d21026be&scoped=true
|
|
6651
6649
|
var chatvue_type_template_id_d21026be_scoped_true_render = function render() {
|
|
@@ -6984,9 +6982,10 @@ const trim = str => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uF
|
|
|
6984
6982
|
* @param {Boolean} [allOwnKeys = false]
|
|
6985
6983
|
* @returns {any}
|
|
6986
6984
|
*/
|
|
6987
|
-
function forEach(obj, fn
|
|
6988
|
-
|
|
6989
|
-
|
|
6985
|
+
function forEach(obj, fn) {
|
|
6986
|
+
let {
|
|
6987
|
+
allOwnKeys = false
|
|
6988
|
+
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6990
6989
|
// Don't bother if no value provided
|
|
6991
6990
|
if (obj === null || typeof obj === 'undefined') {
|
|
6992
6991
|
return;
|
|
@@ -7087,9 +7086,10 @@ function merge( /* obj1, obj2, obj3, ... */
|
|
|
7087
7086
|
* @param {Boolean} [allOwnKeys]
|
|
7088
7087
|
* @returns {Object} The resulting value of object a
|
|
7089
7088
|
*/
|
|
7090
|
-
const extend = (a, b, thisArg
|
|
7091
|
-
|
|
7092
|
-
|
|
7089
|
+
const extend = function (a, b, thisArg) {
|
|
7090
|
+
let {
|
|
7091
|
+
allOwnKeys
|
|
7092
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
7093
7093
|
forEach(b, (val, key) => {
|
|
7094
7094
|
if (thisArg && isFunction(val)) {
|
|
7095
7095
|
a[key] = bind(val, thisArg);
|
|
@@ -7264,9 +7264,12 @@ const toCamelCase = str => {
|
|
|
7264
7264
|
};
|
|
7265
7265
|
|
|
7266
7266
|
/* Creating a function that will check if an object has a property. */
|
|
7267
|
-
const utils_hasOwnProperty = (
|
|
7268
|
-
|
|
7269
|
-
|
|
7267
|
+
const utils_hasOwnProperty = (_ref => {
|
|
7268
|
+
let {
|
|
7269
|
+
hasOwnProperty
|
|
7270
|
+
} = _ref;
|
|
7271
|
+
return (obj, prop) => hasOwnProperty.call(obj, prop);
|
|
7272
|
+
})(Object.prototype);
|
|
7270
7273
|
|
|
7271
7274
|
/**
|
|
7272
7275
|
* Determine if a value is a RegExp object
|
|
@@ -7334,7 +7337,9 @@ const ALPHABET = {
|
|
|
7334
7337
|
ALPHA,
|
|
7335
7338
|
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
7336
7339
|
};
|
|
7337
|
-
const generateString = (
|
|
7340
|
+
const generateString = function () {
|
|
7341
|
+
let size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
|
|
7342
|
+
let alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
|
|
7338
7343
|
let str = '';
|
|
7339
7344
|
const {
|
|
7340
7345
|
length
|
|
@@ -7388,10 +7393,11 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
7388
7393
|
return setImmediate;
|
|
7389
7394
|
}
|
|
7390
7395
|
return postMessageSupported ? ((token, callbacks) => {
|
|
7391
|
-
_global.addEventListener("message",
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7396
|
+
_global.addEventListener("message", _ref2 => {
|
|
7397
|
+
let {
|
|
7398
|
+
source,
|
|
7399
|
+
data
|
|
7400
|
+
} = _ref2;
|
|
7395
7401
|
if (source === _global && data === token) {
|
|
7396
7402
|
callbacks.length && callbacks.shift()();
|
|
7397
7403
|
}
|
|
@@ -8431,7 +8437,10 @@ class AxiosHeaders {
|
|
|
8431
8437
|
});
|
|
8432
8438
|
return this;
|
|
8433
8439
|
}
|
|
8434
|
-
concat(
|
|
8440
|
+
concat() {
|
|
8441
|
+
for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8442
|
+
targets[_key] = arguments[_key];
|
|
8443
|
+
}
|
|
8435
8444
|
return this.constructor.concat(this, ...targets);
|
|
8436
8445
|
}
|
|
8437
8446
|
toJSON(asStrings) {
|
|
@@ -8445,7 +8454,10 @@ class AxiosHeaders {
|
|
|
8445
8454
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
8446
8455
|
}
|
|
8447
8456
|
toString() {
|
|
8448
|
-
return Object.entries(this.toJSON()).map(
|
|
8457
|
+
return Object.entries(this.toJSON()).map(_ref => {
|
|
8458
|
+
let [header, value] = _ref;
|
|
8459
|
+
return header + ': ' + value;
|
|
8460
|
+
}).join('\n');
|
|
8449
8461
|
}
|
|
8450
8462
|
get [Symbol.toStringTag]() {
|
|
8451
8463
|
return 'AxiosHeaders';
|
|
@@ -8453,8 +8465,11 @@ class AxiosHeaders {
|
|
|
8453
8465
|
static from(thing) {
|
|
8454
8466
|
return thing instanceof this ? thing : new this(thing);
|
|
8455
8467
|
}
|
|
8456
|
-
static concat(first
|
|
8468
|
+
static concat(first) {
|
|
8457
8469
|
const computed = new this(first);
|
|
8470
|
+
for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
8471
|
+
targets[_key2 - 1] = arguments[_key2];
|
|
8472
|
+
}
|
|
8458
8473
|
targets.forEach(target => computed.set(target));
|
|
8459
8474
|
return computed;
|
|
8460
8475
|
}
|
|
@@ -8478,9 +8493,10 @@ class AxiosHeaders {
|
|
|
8478
8493
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
8479
8494
|
|
|
8480
8495
|
// reserved names hotfix
|
|
8481
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({
|
|
8482
|
-
|
|
8483
|
-
|
|
8496
|
+
utils.reduceDescriptors(AxiosHeaders.prototype, (_ref2, key) => {
|
|
8497
|
+
let {
|
|
8498
|
+
value
|
|
8499
|
+
} = _ref2;
|
|
8484
8500
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
8485
8501
|
return {
|
|
8486
8502
|
get: () => value,
|
|
@@ -8631,7 +8647,8 @@ function throttle(fn, freq) {
|
|
|
8631
8647
|
let threshold = 1000 / freq;
|
|
8632
8648
|
let lastArgs;
|
|
8633
8649
|
let timer;
|
|
8634
|
-
const invoke = (args
|
|
8650
|
+
const invoke = function (args) {
|
|
8651
|
+
let now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
|
|
8635
8652
|
timestamp = now;
|
|
8636
8653
|
lastArgs = null;
|
|
8637
8654
|
if (timer) {
|
|
@@ -8640,9 +8657,12 @@ function throttle(fn, freq) {
|
|
|
8640
8657
|
}
|
|
8641
8658
|
fn.apply(null, args);
|
|
8642
8659
|
};
|
|
8643
|
-
const throttled = (
|
|
8660
|
+
const throttled = function () {
|
|
8644
8661
|
const now = Date.now();
|
|
8645
8662
|
const passed = now - timestamp;
|
|
8663
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8664
|
+
args[_key] = arguments[_key];
|
|
8665
|
+
}
|
|
8646
8666
|
if (passed >= threshold) {
|
|
8647
8667
|
invoke(args, now);
|
|
8648
8668
|
} else {
|
|
@@ -8663,7 +8683,8 @@ function throttle(fn, freq) {
|
|
|
8663
8683
|
|
|
8664
8684
|
|
|
8665
8685
|
|
|
8666
|
-
const progressEventReducer = (listener, isDownloadStream
|
|
8686
|
+
const progressEventReducer = function (listener, isDownloadStream) {
|
|
8687
|
+
let freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
8667
8688
|
let bytesNotified = 0;
|
|
8668
8689
|
const _speedometer = helpers_speedometer(50, 250);
|
|
8669
8690
|
return helpers_throttle(e => {
|
|
@@ -8695,7 +8716,12 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
8695
8716
|
loaded
|
|
8696
8717
|
}), throttled[1]];
|
|
8697
8718
|
};
|
|
8698
|
-
const asyncDecorator = fn =>
|
|
8719
|
+
const asyncDecorator = fn => function () {
|
|
8720
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8721
|
+
args[_key] = arguments[_key];
|
|
8722
|
+
}
|
|
8723
|
+
return utils.asap(() => fn(...args));
|
|
8724
|
+
};
|
|
8699
8725
|
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
8700
8726
|
|
|
8701
8727
|
|
|
@@ -9288,8 +9314,11 @@ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream ===
|
|
|
9288
9314
|
|
|
9289
9315
|
// used only inside the fetch adapter
|
|
9290
9316
|
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
|
|
9317
|
+
const test = function (fn) {
|
|
9292
9318
|
try {
|
|
9319
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
9320
|
+
args[_key - 1] = arguments[_key];
|
|
9321
|
+
}
|
|
9293
9322
|
return !!fn(...args);
|
|
9294
9323
|
} catch (e) {
|
|
9295
9324
|
return false;
|
|
@@ -9486,7 +9515,10 @@ const isResolvedHandle = adapter => utils.isFunction(adapter) || adapter === nul
|
|
|
9486
9515
|
rejectedReasons[id || '#' + i] = adapter;
|
|
9487
9516
|
}
|
|
9488
9517
|
if (!adapter) {
|
|
9489
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
9518
|
+
const reasons = Object.entries(rejectedReasons).map(_ref => {
|
|
9519
|
+
let [id, state] = _ref;
|
|
9520
|
+
return `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
|
9521
|
+
});
|
|
9490
9522
|
let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
9491
9523
|
throw new core_AxiosError(`There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT');
|
|
9492
9524
|
}
|
|
@@ -10055,7 +10087,8 @@ const HttpStatusCode = {
|
|
|
10055
10087
|
NotExtended: 510,
|
|
10056
10088
|
NetworkAuthenticationRequired: 511
|
|
10057
10089
|
};
|
|
10058
|
-
Object.entries(HttpStatusCode).forEach(
|
|
10090
|
+
Object.entries(HttpStatusCode).forEach(_ref => {
|
|
10091
|
+
let [key, value] = _ref;
|
|
10059
10092
|
HttpStatusCode[value] = key;
|
|
10060
10093
|
});
|
|
10061
10094
|
/* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode);
|
|
@@ -10250,49 +10283,58 @@ const _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
|
|
|
10250
10283
|
const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
|
|
10251
10284
|
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
10252
10285
|
const b64chs = Array.prototype.slice.call(b64ch);
|
|
10253
|
-
const b64tab = (a => {
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10286
|
+
const b64tab = ((a) => {
|
|
10287
|
+
let tab = {};
|
|
10288
|
+
a.forEach((c, i) => tab[c] = i);
|
|
10289
|
+
return tab;
|
|
10257
10290
|
})(b64chs);
|
|
10258
10291
|
const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
10259
10292
|
const _fromCC = String.fromCharCode.bind(String);
|
|
10260
|
-
const _U8Afrom = typeof Uint8Array.from === 'function'
|
|
10261
|
-
|
|
10262
|
-
|
|
10293
|
+
const _U8Afrom = typeof Uint8Array.from === 'function'
|
|
10294
|
+
? Uint8Array.from.bind(Uint8Array)
|
|
10295
|
+
: (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
|
|
10296
|
+
const _mkUriSafe = (src) => src
|
|
10297
|
+
.replace(/=/g, '').replace(/[+\/]/g, (m0) => m0 == '+' ? '-' : '_');
|
|
10298
|
+
const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
10263
10299
|
/**
|
|
10264
10300
|
* polyfill version of `btoa`
|
|
10265
10301
|
*/
|
|
10266
|
-
const btoaPolyfill = bin => {
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10302
|
+
const btoaPolyfill = (bin) => {
|
|
10303
|
+
// console.log('polyfilled');
|
|
10304
|
+
let u32, c0, c1, c2, asc = '';
|
|
10305
|
+
const pad = bin.length % 3;
|
|
10306
|
+
for (let i = 0; i < bin.length;) {
|
|
10307
|
+
if ((c0 = bin.charCodeAt(i++)) > 255 ||
|
|
10308
|
+
(c1 = bin.charCodeAt(i++)) > 255 ||
|
|
10309
|
+
(c2 = bin.charCodeAt(i++)) > 255)
|
|
10310
|
+
throw new TypeError('invalid character found');
|
|
10311
|
+
u32 = (c0 << 16) | (c1 << 8) | c2;
|
|
10312
|
+
asc += b64chs[u32 >> 18 & 63]
|
|
10313
|
+
+ b64chs[u32 >> 12 & 63]
|
|
10314
|
+
+ b64chs[u32 >> 6 & 63]
|
|
10315
|
+
+ b64chs[u32 & 63];
|
|
10316
|
+
}
|
|
10317
|
+
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
10280
10318
|
};
|
|
10281
10319
|
/**
|
|
10282
10320
|
* does what `window.btoa` of web browsers do.
|
|
10283
10321
|
* @param {String} bin binary string
|
|
10284
10322
|
* @returns {string} Base64-encoded string
|
|
10285
10323
|
*/
|
|
10286
|
-
const _btoa = typeof btoa === 'function' ?
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10324
|
+
const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)
|
|
10325
|
+
: _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')
|
|
10326
|
+
: btoaPolyfill;
|
|
10327
|
+
const _fromUint8Array = _hasBuffer
|
|
10328
|
+
? (u8a) => Buffer.from(u8a).toString('base64')
|
|
10329
|
+
: (u8a) => {
|
|
10330
|
+
// cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
|
|
10331
|
+
const maxargs = 0x1000;
|
|
10332
|
+
let strs = [];
|
|
10333
|
+
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
10334
|
+
strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
|
|
10335
|
+
}
|
|
10336
|
+
return _btoa(strs.join(''));
|
|
10337
|
+
};
|
|
10296
10338
|
/**
|
|
10297
10339
|
* converts a Uint8Array to a Base64 string.
|
|
10298
10340
|
* @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5
|
|
@@ -10302,14 +10344,25 @@ const fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8
|
|
|
10302
10344
|
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
|
|
10303
10345
|
// const utob = (src: string) => unescape(encodeURIComponent(src));
|
|
10304
10346
|
// reverting good old fationed regexp
|
|
10305
|
-
const cb_utob = c => {
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10347
|
+
const cb_utob = (c) => {
|
|
10348
|
+
if (c.length < 2) {
|
|
10349
|
+
var cc = c.charCodeAt(0);
|
|
10350
|
+
return cc < 0x80 ? c
|
|
10351
|
+
: cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))
|
|
10352
|
+
+ _fromCC(0x80 | (cc & 0x3f)))
|
|
10353
|
+
: (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))
|
|
10354
|
+
+ _fromCC(0x80 | ((cc >>> 6) & 0x3f))
|
|
10355
|
+
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
10356
|
+
}
|
|
10357
|
+
else {
|
|
10358
|
+
var cc = 0x10000
|
|
10359
|
+
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
10360
|
+
+ (c.charCodeAt(1) - 0xDC00);
|
|
10361
|
+
return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))
|
|
10362
|
+
+ _fromCC(0x80 | ((cc >>> 12) & 0x3f))
|
|
10363
|
+
+ _fromCC(0x80 | ((cc >>> 6) & 0x3f))
|
|
10364
|
+
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
10365
|
+
}
|
|
10313
10366
|
};
|
|
10314
10367
|
const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
10315
10368
|
/**
|
|
@@ -10317,163 +10370,168 @@ const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
10317
10370
|
* @param {string} src UTF-8 string
|
|
10318
10371
|
* @returns {string} UTF-16 string
|
|
10319
10372
|
*/
|
|
10320
|
-
const utob = u => u.replace(re_utob, cb_utob);
|
|
10373
|
+
const utob = (u) => u.replace(re_utob, cb_utob);
|
|
10321
10374
|
//
|
|
10322
|
-
const _encode = _hasBuffer
|
|
10375
|
+
const _encode = _hasBuffer
|
|
10376
|
+
? (s) => Buffer.from(s, 'utf8').toString('base64')
|
|
10377
|
+
: _TE
|
|
10378
|
+
? (s) => _fromUint8Array(_TE.encode(s))
|
|
10379
|
+
: (s) => _btoa(utob(s));
|
|
10323
10380
|
/**
|
|
10324
10381
|
* converts a UTF-8-encoded string to a Base64 string.
|
|
10325
10382
|
* @param {boolean} [urlsafe] if `true` make the result URL-safe
|
|
10326
10383
|
* @returns {string} Base64 string
|
|
10327
10384
|
*/
|
|
10328
|
-
const base64_encode = (src, urlsafe = false) => urlsafe
|
|
10385
|
+
const base64_encode = (src, urlsafe = false) => urlsafe
|
|
10386
|
+
? _mkUriSafe(_encode(src))
|
|
10387
|
+
: _encode(src);
|
|
10329
10388
|
/**
|
|
10330
10389
|
* converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.
|
|
10331
10390
|
* @returns {string} Base64 string
|
|
10332
10391
|
*/
|
|
10333
|
-
const base64_encodeURI = src => base64_encode(src, true);
|
|
10392
|
+
const base64_encodeURI = (src) => base64_encode(src, true);
|
|
10334
10393
|
// This trick is found broken https://github.com/dankogai/js-base64/issues/130
|
|
10335
10394
|
// const btou = (src: string) => decodeURIComponent(escape(src));
|
|
10336
10395
|
// reverting good old fationed regexp
|
|
10337
10396
|
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
|
-
|
|
10397
|
+
const cb_btou = (cccc) => {
|
|
10398
|
+
switch (cccc.length) {
|
|
10399
|
+
case 4:
|
|
10400
|
+
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
10401
|
+
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
10402
|
+
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
10403
|
+
| (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;
|
|
10404
|
+
return (_fromCC((offset >>> 10) + 0xD800)
|
|
10405
|
+
+ _fromCC((offset & 0x3FF) + 0xDC00));
|
|
10406
|
+
case 3:
|
|
10407
|
+
return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)
|
|
10408
|
+
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
10409
|
+
| (0x3f & cccc.charCodeAt(2)));
|
|
10410
|
+
default:
|
|
10411
|
+
return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)
|
|
10412
|
+
| (0x3f & cccc.charCodeAt(1)));
|
|
10413
|
+
}
|
|
10349
10414
|
};
|
|
10350
10415
|
/**
|
|
10351
10416
|
* @deprecated should have been internal use only.
|
|
10352
10417
|
* @param {string} src UTF-16 string
|
|
10353
10418
|
* @returns {string} UTF-8 string
|
|
10354
10419
|
*/
|
|
10355
|
-
const btou = b => b.replace(re_btou, cb_btou);
|
|
10420
|
+
const btou = (b) => b.replace(re_btou, cb_btou);
|
|
10356
10421
|
/**
|
|
10357
10422
|
* polyfill version of `atob`
|
|
10358
10423
|
*/
|
|
10359
|
-
const atobPolyfill = asc => {
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
bin = '',
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10424
|
+
const atobPolyfill = (asc) => {
|
|
10425
|
+
// console.log('polyfilled');
|
|
10426
|
+
asc = asc.replace(/\s+/g, '');
|
|
10427
|
+
if (!b64re.test(asc))
|
|
10428
|
+
throw new TypeError('malformed base64.');
|
|
10429
|
+
asc += '=='.slice(2 - (asc.length & 3));
|
|
10430
|
+
let u24, bin = '', r1, r2;
|
|
10431
|
+
for (let i = 0; i < asc.length;) {
|
|
10432
|
+
u24 = b64tab[asc.charAt(i++)] << 18
|
|
10433
|
+
| b64tab[asc.charAt(i++)] << 12
|
|
10434
|
+
| (r1 = b64tab[asc.charAt(i++)]) << 6
|
|
10435
|
+
| (r2 = b64tab[asc.charAt(i++)]);
|
|
10436
|
+
bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)
|
|
10437
|
+
: r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)
|
|
10438
|
+
: _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
|
|
10439
|
+
}
|
|
10440
|
+
return bin;
|
|
10373
10441
|
};
|
|
10374
10442
|
/**
|
|
10375
10443
|
* does what `window.atob` of web browsers do.
|
|
10376
10444
|
* @param {String} asc Base64-encoded string
|
|
10377
10445
|
* @returns {string} binary string
|
|
10378
10446
|
*/
|
|
10379
|
-
const _atob = typeof atob === 'function' ? asc => atob(_tidyB64(asc))
|
|
10447
|
+
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
|
|
10448
|
+
: _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')
|
|
10449
|
+
: atobPolyfill;
|
|
10380
10450
|
//
|
|
10381
|
-
const _toUint8Array = _hasBuffer
|
|
10451
|
+
const _toUint8Array = _hasBuffer
|
|
10452
|
+
? (a) => _U8Afrom(Buffer.from(a, 'base64'))
|
|
10453
|
+
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
10382
10454
|
/**
|
|
10383
10455
|
* converts a Base64 string to a Uint8Array.
|
|
10384
10456
|
*/
|
|
10385
|
-
const toUint8Array = a => _toUint8Array(_unURI(a));
|
|
10457
|
+
const toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
10386
10458
|
//
|
|
10387
|
-
const _decode = _hasBuffer
|
|
10388
|
-
|
|
10459
|
+
const _decode = _hasBuffer
|
|
10460
|
+
? (a) => Buffer.from(a, 'base64').toString('utf8')
|
|
10461
|
+
: _TD
|
|
10462
|
+
? (a) => _TD.decode(_toUint8Array(a))
|
|
10463
|
+
: (a) => btou(_atob(a));
|
|
10464
|
+
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
|
|
10389
10465
|
/**
|
|
10390
10466
|
* converts a Base64 string to a UTF-8 string.
|
|
10391
10467
|
* @param {String} src Base64 string. Both normal and URL-safe are supported
|
|
10392
10468
|
* @returns {string} UTF-8 string
|
|
10393
10469
|
*/
|
|
10394
|
-
const decode = src => _decode(_unURI(src));
|
|
10470
|
+
const decode = (src) => _decode(_unURI(src));
|
|
10395
10471
|
/**
|
|
10396
10472
|
* check if a value is a valid Base64 string
|
|
10397
10473
|
* @param {String} src a value to check
|
|
10398
10474
|
*/
|
|
10399
|
-
const isValid = src => {
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10475
|
+
const isValid = (src) => {
|
|
10476
|
+
if (typeof src !== 'string')
|
|
10477
|
+
return false;
|
|
10478
|
+
const s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
|
|
10479
|
+
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
|
|
10403
10480
|
};
|
|
10404
10481
|
//
|
|
10405
|
-
const _noEnum = v => {
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
writable: true,
|
|
10410
|
-
configurable: true
|
|
10411
|
-
};
|
|
10482
|
+
const _noEnum = (v) => {
|
|
10483
|
+
return {
|
|
10484
|
+
value: v, enumerable: false, writable: true, configurable: true
|
|
10485
|
+
};
|
|
10412
10486
|
};
|
|
10413
10487
|
/**
|
|
10414
10488
|
* extend String.prototype with relevant methods
|
|
10415
10489
|
*/
|
|
10416
10490
|
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
|
-
});
|
|
10491
|
+
const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
|
|
10492
|
+
_add('fromBase64', function () { return decode(this); });
|
|
10493
|
+
_add('toBase64', function (urlsafe) { return base64_encode(this, urlsafe); });
|
|
10494
|
+
_add('toBase64URI', function () { return base64_encode(this, true); });
|
|
10495
|
+
_add('toBase64URL', function () { return base64_encode(this, true); });
|
|
10496
|
+
_add('toUint8Array', function () { return toUint8Array(this); });
|
|
10433
10497
|
};
|
|
10434
10498
|
/**
|
|
10435
10499
|
* extend Uint8Array.prototype with relevant methods
|
|
10436
10500
|
*/
|
|
10437
10501
|
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
|
-
});
|
|
10502
|
+
const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
|
|
10503
|
+
_add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });
|
|
10504
|
+
_add('toBase64URI', function () { return fromUint8Array(this, true); });
|
|
10505
|
+
_add('toBase64URL', function () { return fromUint8Array(this, true); });
|
|
10448
10506
|
};
|
|
10449
10507
|
/**
|
|
10450
10508
|
* extend Builtin prototypes with relevant methods
|
|
10451
10509
|
*/
|
|
10452
10510
|
const extendBuiltins = () => {
|
|
10453
|
-
|
|
10454
|
-
|
|
10511
|
+
extendString();
|
|
10512
|
+
extendUint8Array();
|
|
10455
10513
|
};
|
|
10456
10514
|
const gBase64 = {
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10515
|
+
version: version,
|
|
10516
|
+
VERSION: base64_VERSION,
|
|
10517
|
+
atob: _atob,
|
|
10518
|
+
atobPolyfill: atobPolyfill,
|
|
10519
|
+
btoa: _btoa,
|
|
10520
|
+
btoaPolyfill: btoaPolyfill,
|
|
10521
|
+
fromBase64: decode,
|
|
10522
|
+
toBase64: base64_encode,
|
|
10523
|
+
encode: base64_encode,
|
|
10524
|
+
encodeURI: base64_encodeURI,
|
|
10525
|
+
encodeURL: base64_encodeURI,
|
|
10526
|
+
utob: utob,
|
|
10527
|
+
btou: btou,
|
|
10528
|
+
decode: decode,
|
|
10529
|
+
isValid: isValid,
|
|
10530
|
+
fromUint8Array: fromUint8Array,
|
|
10531
|
+
toUint8Array: toUint8Array,
|
|
10532
|
+
extendString: extendString,
|
|
10533
|
+
extendUint8Array: extendUint8Array,
|
|
10534
|
+
extendBuiltins: extendBuiltins
|
|
10477
10535
|
};
|
|
10478
10536
|
// makecjs:CUT //
|
|
10479
10537
|
|
|
@@ -10498,6 +10556,7 @@ const gBase64 = {
|
|
|
10498
10556
|
|
|
10499
10557
|
// and finally,
|
|
10500
10558
|
|
|
10559
|
+
|
|
10501
10560
|
;// CONCATENATED MODULE: ./components/demo/utils/aes-utils.js
|
|
10502
10561
|
|
|
10503
10562
|
|
|
@@ -11697,6 +11756,9 @@ var error_chat_component = normalizeComponent(
|
|
|
11697
11756
|
|
|
11698
11757
|
/* harmony default export */ var error_chat = (error_chat_component.exports);
|
|
11699
11758
|
;// CONCATENATED MODULE: ./node_modules/marked/lib/marked.esm.js
|
|
11759
|
+
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; }
|
|
11760
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
11761
|
+
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
11762
|
/**
|
|
11701
11763
|
* marked v14.1.2 - a markdown parser
|
|
11702
11764
|
* Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
|
|
@@ -11917,10 +11979,12 @@ function indentCodeCompensation(raw, text) {
|
|
|
11917
11979
|
* Tokenizer
|
|
11918
11980
|
*/
|
|
11919
11981
|
class _Tokenizer {
|
|
11920
|
-
|
|
11921
|
-
rules; // set by the lexer
|
|
11922
|
-
lexer; // set by the lexer
|
|
11982
|
+
// set by the lexer
|
|
11923
11983
|
constructor(options) {
|
|
11984
|
+
_defineProperty(this, "options", void 0);
|
|
11985
|
+
_defineProperty(this, "rules", void 0);
|
|
11986
|
+
// set by the lexer
|
|
11987
|
+
_defineProperty(this, "lexer", void 0);
|
|
11924
11988
|
this.options = options || _defaults;
|
|
11925
11989
|
}
|
|
11926
11990
|
space(src) {
|
|
@@ -12029,10 +12093,10 @@ class _Tokenizer {
|
|
|
12029
12093
|
break;
|
|
12030
12094
|
}
|
|
12031
12095
|
const lastToken = tokens[tokens.length - 1];
|
|
12032
|
-
if (lastToken
|
|
12096
|
+
if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.type) === 'code') {
|
|
12033
12097
|
// blockquote continuation cannot be preceded by a code block
|
|
12034
12098
|
break;
|
|
12035
|
-
} else if (lastToken
|
|
12099
|
+
} else if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.type) === 'blockquote') {
|
|
12036
12100
|
// include continuation in nested blockquote
|
|
12037
12101
|
const oldToken = lastToken;
|
|
12038
12102
|
const newText = oldToken.raw + '\n' + lines.join('\n');
|
|
@@ -12041,7 +12105,7 @@ class _Tokenizer {
|
|
|
12041
12105
|
raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
|
|
12042
12106
|
text = text.substring(0, text.length - oldToken.text.length) + newToken.text;
|
|
12043
12107
|
break;
|
|
12044
|
-
} else if (lastToken
|
|
12108
|
+
} else if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.type) === 'list') {
|
|
12045
12109
|
// include continuation in nested list
|
|
12046
12110
|
const oldToken = lastToken;
|
|
12047
12111
|
const newText = oldToken.raw + '\n' + lines.join('\n');
|
|
@@ -12458,7 +12522,8 @@ class _Tokenizer {
|
|
|
12458
12522
|
return outputLink(cap, link, cap[0], this.lexer);
|
|
12459
12523
|
}
|
|
12460
12524
|
}
|
|
12461
|
-
emStrong(src, maskedSrc
|
|
12525
|
+
emStrong(src, maskedSrc) {
|
|
12526
|
+
let prevChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
12462
12527
|
let match = this.rules.inline.emStrongLDelim.exec(src);
|
|
12463
12528
|
if (!match) return;
|
|
12464
12529
|
// _ can't be between two alphanumerics. \p{L}\p{N} includes non-english alphabet/numbers as well
|
|
@@ -12590,8 +12655,9 @@ class _Tokenizer {
|
|
|
12590
12655
|
// do extended autolink path validation
|
|
12591
12656
|
let prevCapZero;
|
|
12592
12657
|
do {
|
|
12658
|
+
var _this$rules$inline$_b, _this$rules$inline$_b2;
|
|
12593
12659
|
prevCapZero = cap[0];
|
|
12594
|
-
cap[0] = this.rules.inline._backpedal.exec(cap[0])
|
|
12660
|
+
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
12661
|
} while (prevCapZero !== cap[0]);
|
|
12596
12662
|
text = escape$1(cap[0]);
|
|
12597
12663
|
if (cap[1] === 'www.') {
|
|
@@ -12835,12 +12901,12 @@ const inline = {
|
|
|
12835
12901
|
* Block Lexer
|
|
12836
12902
|
*/
|
|
12837
12903
|
class _Lexer {
|
|
12838
|
-
tokens;
|
|
12839
|
-
options;
|
|
12840
|
-
state;
|
|
12841
|
-
tokenizer;
|
|
12842
|
-
inlineQueue;
|
|
12843
12904
|
constructor(options) {
|
|
12905
|
+
_defineProperty(this, "tokens", void 0);
|
|
12906
|
+
_defineProperty(this, "options", void 0);
|
|
12907
|
+
_defineProperty(this, "state", void 0);
|
|
12908
|
+
_defineProperty(this, "tokenizer", void 0);
|
|
12909
|
+
_defineProperty(this, "inlineQueue", void 0);
|
|
12844
12910
|
// TokenList cannot be created in one go
|
|
12845
12911
|
this.tokens = [];
|
|
12846
12912
|
this.tokens.links = Object.create(null);
|
|
@@ -12908,7 +12974,9 @@ class _Lexer {
|
|
|
12908
12974
|
this.inlineQueue = [];
|
|
12909
12975
|
return this.tokens;
|
|
12910
12976
|
}
|
|
12911
|
-
blockTokens(src
|
|
12977
|
+
blockTokens(src) {
|
|
12978
|
+
let tokens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
12979
|
+
let lastParagraphClipped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
12912
12980
|
if (this.options.pedantic) {
|
|
12913
12981
|
src = src.replace(/\t/g, ' ').replace(/^ +$/gm, '');
|
|
12914
12982
|
}
|
|
@@ -13038,8 +13106,9 @@ class _Lexer {
|
|
|
13038
13106
|
}
|
|
13039
13107
|
}
|
|
13040
13108
|
if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
|
|
13109
|
+
var _lastToken;
|
|
13041
13110
|
lastToken = tokens[tokens.length - 1];
|
|
13042
|
-
if (lastParagraphClipped && lastToken
|
|
13111
|
+
if (lastParagraphClipped && ((_lastToken = lastToken) === null || _lastToken === void 0 ? void 0 : _lastToken.type) === 'paragraph') {
|
|
13043
13112
|
lastToken.raw += '\n' + token.raw;
|
|
13044
13113
|
lastToken.text += '\n' + token.text;
|
|
13045
13114
|
this.inlineQueue.pop();
|
|
@@ -13078,7 +13147,8 @@ class _Lexer {
|
|
|
13078
13147
|
this.state.top = true;
|
|
13079
13148
|
return tokens;
|
|
13080
13149
|
}
|
|
13081
|
-
inline(src
|
|
13150
|
+
inline(src) {
|
|
13151
|
+
let tokens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
13082
13152
|
this.inlineQueue.push({
|
|
13083
13153
|
src,
|
|
13084
13154
|
tokens
|
|
@@ -13088,7 +13158,8 @@ class _Lexer {
|
|
|
13088
13158
|
/**
|
|
13089
13159
|
* Lexing/Compiling
|
|
13090
13160
|
*/
|
|
13091
|
-
inlineTokens(src
|
|
13161
|
+
inlineTokens(src) {
|
|
13162
|
+
let tokens = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
13092
13163
|
let token, lastToken, cutSrc;
|
|
13093
13164
|
// String with links masked to avoid interference with em and strong
|
|
13094
13165
|
let maskedSrc = src;
|
|
@@ -13256,41 +13327,47 @@ class _Lexer {
|
|
|
13256
13327
|
* Renderer
|
|
13257
13328
|
*/
|
|
13258
13329
|
class _Renderer {
|
|
13259
|
-
|
|
13260
|
-
parser; // set by the parser
|
|
13330
|
+
// set by the parser
|
|
13261
13331
|
constructor(options) {
|
|
13332
|
+
_defineProperty(this, "options", void 0);
|
|
13333
|
+
_defineProperty(this, "parser", void 0);
|
|
13262
13334
|
this.options = options || _defaults;
|
|
13263
13335
|
}
|
|
13264
13336
|
space(token) {
|
|
13265
13337
|
return '';
|
|
13266
13338
|
}
|
|
13267
|
-
code({
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13339
|
+
code(_ref) {
|
|
13340
|
+
var _match;
|
|
13341
|
+
let {
|
|
13342
|
+
text,
|
|
13343
|
+
lang,
|
|
13344
|
+
escaped
|
|
13345
|
+
} = _ref;
|
|
13346
|
+
const langString = (_match = (lang || '').match(/^\S*/)) === null || _match === void 0 ? void 0 : _match[0];
|
|
13273
13347
|
const code = text.replace(/\n$/, '') + '\n';
|
|
13274
13348
|
if (!langString) {
|
|
13275
13349
|
return '<pre><code>' + (escaped ? code : escape$1(code, true)) + '</code></pre>\n';
|
|
13276
13350
|
}
|
|
13277
13351
|
return '<pre><code class="language-' + escape$1(langString) + '">' + (escaped ? code : escape$1(code, true)) + '</code></pre>\n';
|
|
13278
13352
|
}
|
|
13279
|
-
blockquote({
|
|
13280
|
-
|
|
13281
|
-
|
|
13353
|
+
blockquote(_ref2) {
|
|
13354
|
+
let {
|
|
13355
|
+
tokens
|
|
13356
|
+
} = _ref2;
|
|
13282
13357
|
const body = this.parser.parse(tokens);
|
|
13283
13358
|
return `<blockquote>\n${body}</blockquote>\n`;
|
|
13284
13359
|
}
|
|
13285
|
-
html({
|
|
13286
|
-
|
|
13287
|
-
|
|
13360
|
+
html(_ref3) {
|
|
13361
|
+
let {
|
|
13362
|
+
text
|
|
13363
|
+
} = _ref3;
|
|
13288
13364
|
return text;
|
|
13289
13365
|
}
|
|
13290
|
-
heading({
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13366
|
+
heading(_ref4) {
|
|
13367
|
+
let {
|
|
13368
|
+
tokens,
|
|
13369
|
+
depth
|
|
13370
|
+
} = _ref4;
|
|
13294
13371
|
return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>\n`;
|
|
13295
13372
|
}
|
|
13296
13373
|
hr(token) {
|
|
@@ -13334,14 +13411,16 @@ class _Renderer {
|
|
|
13334
13411
|
itemBody += this.parser.parse(item.tokens, !!item.loose);
|
|
13335
13412
|
return `<li>${itemBody}</li>\n`;
|
|
13336
13413
|
}
|
|
13337
|
-
checkbox({
|
|
13338
|
-
|
|
13339
|
-
|
|
13414
|
+
checkbox(_ref5) {
|
|
13415
|
+
let {
|
|
13416
|
+
checked
|
|
13417
|
+
} = _ref5;
|
|
13340
13418
|
return '<input ' + (checked ? 'checked="" ' : '') + 'disabled="" type="checkbox">';
|
|
13341
13419
|
}
|
|
13342
|
-
paragraph({
|
|
13343
|
-
|
|
13344
|
-
|
|
13420
|
+
paragraph(_ref6) {
|
|
13421
|
+
let {
|
|
13422
|
+
tokens
|
|
13423
|
+
} = _ref6;
|
|
13345
13424
|
return `<p>${this.parser.parseInline(tokens)}</p>\n`;
|
|
13346
13425
|
}
|
|
13347
13426
|
table(token) {
|
|
@@ -13368,9 +13447,10 @@ class _Renderer {
|
|
|
13368
13447
|
if (body) body = `<tbody>${body}</tbody>`;
|
|
13369
13448
|
return '<table>\n' + '<thead>\n' + header + '</thead>\n' + body + '</table>\n';
|
|
13370
13449
|
}
|
|
13371
|
-
tablerow({
|
|
13372
|
-
|
|
13373
|
-
|
|
13450
|
+
tablerow(_ref7) {
|
|
13451
|
+
let {
|
|
13452
|
+
text
|
|
13453
|
+
} = _ref7;
|
|
13374
13454
|
return `<tr>\n${text}</tr>\n`;
|
|
13375
13455
|
}
|
|
13376
13456
|
tablecell(token) {
|
|
@@ -13382,34 +13462,39 @@ class _Renderer {
|
|
|
13382
13462
|
/**
|
|
13383
13463
|
* span level renderer
|
|
13384
13464
|
*/
|
|
13385
|
-
strong({
|
|
13386
|
-
|
|
13387
|
-
|
|
13465
|
+
strong(_ref8) {
|
|
13466
|
+
let {
|
|
13467
|
+
tokens
|
|
13468
|
+
} = _ref8;
|
|
13388
13469
|
return `<strong>${this.parser.parseInline(tokens)}</strong>`;
|
|
13389
13470
|
}
|
|
13390
|
-
em({
|
|
13391
|
-
|
|
13392
|
-
|
|
13471
|
+
em(_ref9) {
|
|
13472
|
+
let {
|
|
13473
|
+
tokens
|
|
13474
|
+
} = _ref9;
|
|
13393
13475
|
return `<em>${this.parser.parseInline(tokens)}</em>`;
|
|
13394
13476
|
}
|
|
13395
|
-
codespan({
|
|
13396
|
-
|
|
13397
|
-
|
|
13477
|
+
codespan(_ref10) {
|
|
13478
|
+
let {
|
|
13479
|
+
text
|
|
13480
|
+
} = _ref10;
|
|
13398
13481
|
return `<code>${text}</code>`;
|
|
13399
13482
|
}
|
|
13400
13483
|
br(token) {
|
|
13401
13484
|
return '<br>';
|
|
13402
13485
|
}
|
|
13403
|
-
del({
|
|
13404
|
-
|
|
13405
|
-
|
|
13486
|
+
del(_ref11) {
|
|
13487
|
+
let {
|
|
13488
|
+
tokens
|
|
13489
|
+
} = _ref11;
|
|
13406
13490
|
return `<del>${this.parser.parseInline(tokens)}</del>`;
|
|
13407
13491
|
}
|
|
13408
|
-
link({
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13492
|
+
link(_ref12) {
|
|
13493
|
+
let {
|
|
13494
|
+
href,
|
|
13495
|
+
title,
|
|
13496
|
+
tokens
|
|
13497
|
+
} = _ref12;
|
|
13413
13498
|
const text = this.parser.parseInline(tokens);
|
|
13414
13499
|
const cleanHref = cleanUrl(href);
|
|
13415
13500
|
if (cleanHref === null) {
|
|
@@ -13423,11 +13508,12 @@ class _Renderer {
|
|
|
13423
13508
|
out += '>' + text + '</a>';
|
|
13424
13509
|
return out;
|
|
13425
13510
|
}
|
|
13426
|
-
image({
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
13511
|
+
image(_ref13) {
|
|
13512
|
+
let {
|
|
13513
|
+
href,
|
|
13514
|
+
title,
|
|
13515
|
+
text
|
|
13516
|
+
} = _ref13;
|
|
13431
13517
|
const cleanHref = cleanUrl(href);
|
|
13432
13518
|
if (cleanHref === null) {
|
|
13433
13519
|
return text;
|
|
@@ -13451,44 +13537,52 @@ class _Renderer {
|
|
|
13451
13537
|
*/
|
|
13452
13538
|
class _TextRenderer {
|
|
13453
13539
|
// no need for block level renderers
|
|
13454
|
-
strong({
|
|
13455
|
-
|
|
13456
|
-
|
|
13540
|
+
strong(_ref14) {
|
|
13541
|
+
let {
|
|
13542
|
+
text
|
|
13543
|
+
} = _ref14;
|
|
13457
13544
|
return text;
|
|
13458
13545
|
}
|
|
13459
|
-
em({
|
|
13460
|
-
|
|
13461
|
-
|
|
13546
|
+
em(_ref15) {
|
|
13547
|
+
let {
|
|
13548
|
+
text
|
|
13549
|
+
} = _ref15;
|
|
13462
13550
|
return text;
|
|
13463
13551
|
}
|
|
13464
|
-
codespan({
|
|
13465
|
-
|
|
13466
|
-
|
|
13552
|
+
codespan(_ref16) {
|
|
13553
|
+
let {
|
|
13554
|
+
text
|
|
13555
|
+
} = _ref16;
|
|
13467
13556
|
return text;
|
|
13468
13557
|
}
|
|
13469
|
-
del({
|
|
13470
|
-
|
|
13471
|
-
|
|
13558
|
+
del(_ref17) {
|
|
13559
|
+
let {
|
|
13560
|
+
text
|
|
13561
|
+
} = _ref17;
|
|
13472
13562
|
return text;
|
|
13473
13563
|
}
|
|
13474
|
-
html({
|
|
13475
|
-
|
|
13476
|
-
|
|
13564
|
+
html(_ref18) {
|
|
13565
|
+
let {
|
|
13566
|
+
text
|
|
13567
|
+
} = _ref18;
|
|
13477
13568
|
return text;
|
|
13478
13569
|
}
|
|
13479
|
-
text({
|
|
13480
|
-
|
|
13481
|
-
|
|
13570
|
+
text(_ref19) {
|
|
13571
|
+
let {
|
|
13572
|
+
text
|
|
13573
|
+
} = _ref19;
|
|
13482
13574
|
return text;
|
|
13483
13575
|
}
|
|
13484
|
-
link({
|
|
13485
|
-
|
|
13486
|
-
|
|
13576
|
+
link(_ref20) {
|
|
13577
|
+
let {
|
|
13578
|
+
text
|
|
13579
|
+
} = _ref20;
|
|
13487
13580
|
return '' + text;
|
|
13488
13581
|
}
|
|
13489
|
-
image({
|
|
13490
|
-
|
|
13491
|
-
|
|
13582
|
+
image(_ref21) {
|
|
13583
|
+
let {
|
|
13584
|
+
text
|
|
13585
|
+
} = _ref21;
|
|
13492
13586
|
return '' + text;
|
|
13493
13587
|
}
|
|
13494
13588
|
br() {
|
|
@@ -13500,10 +13594,10 @@ class _TextRenderer {
|
|
|
13500
13594
|
* Parsing & Compiling
|
|
13501
13595
|
*/
|
|
13502
13596
|
class _Parser {
|
|
13503
|
-
options;
|
|
13504
|
-
renderer;
|
|
13505
|
-
textRenderer;
|
|
13506
13597
|
constructor(options) {
|
|
13598
|
+
_defineProperty(this, "options", void 0);
|
|
13599
|
+
_defineProperty(this, "renderer", void 0);
|
|
13600
|
+
_defineProperty(this, "textRenderer", void 0);
|
|
13507
13601
|
this.options = options || _defaults;
|
|
13508
13602
|
this.options.renderer = this.options.renderer || new _Renderer();
|
|
13509
13603
|
this.renderer = this.options.renderer;
|
|
@@ -13528,7 +13622,8 @@ class _Parser {
|
|
|
13528
13622
|
/**
|
|
13529
13623
|
* Parse Loop
|
|
13530
13624
|
*/
|
|
13531
|
-
parse(tokens
|
|
13625
|
+
parse(tokens) {
|
|
13626
|
+
let top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
13532
13627
|
let out = '';
|
|
13533
13628
|
for (let i = 0; i < tokens.length; i++) {
|
|
13534
13629
|
const anyToken = tokens[i];
|
|
@@ -13714,12 +13809,11 @@ class _Parser {
|
|
|
13714
13809
|
}
|
|
13715
13810
|
}
|
|
13716
13811
|
class _Hooks {
|
|
13717
|
-
options;
|
|
13718
|
-
block;
|
|
13719
13812
|
constructor(options) {
|
|
13813
|
+
_defineProperty(this, "options", void 0);
|
|
13814
|
+
_defineProperty(this, "block", void 0);
|
|
13720
13815
|
this.options = options || _defaults;
|
|
13721
13816
|
}
|
|
13722
|
-
static passThroughHooks = new Set(['preprocess', 'postprocess', 'processAllTokens']);
|
|
13723
13817
|
/**
|
|
13724
13818
|
* Process markdown before marked
|
|
13725
13819
|
*/
|
|
@@ -13751,19 +13845,20 @@ class _Hooks {
|
|
|
13751
13845
|
return this.block ? _Parser.parse : _Parser.parseInline;
|
|
13752
13846
|
}
|
|
13753
13847
|
}
|
|
13848
|
+
_defineProperty(_Hooks, "passThroughHooks", new Set(['preprocess', 'postprocess', 'processAllTokens']));
|
|
13754
13849
|
class Marked {
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
this.use(...
|
|
13850
|
+
constructor() {
|
|
13851
|
+
_defineProperty(this, "defaults", _getDefaults());
|
|
13852
|
+
_defineProperty(this, "options", this.setOptions);
|
|
13853
|
+
_defineProperty(this, "parse", this.parseMarkdown(true));
|
|
13854
|
+
_defineProperty(this, "parseInline", this.parseMarkdown(false));
|
|
13855
|
+
_defineProperty(this, "Parser", _Parser);
|
|
13856
|
+
_defineProperty(this, "Renderer", _Renderer);
|
|
13857
|
+
_defineProperty(this, "TextRenderer", _TextRenderer);
|
|
13858
|
+
_defineProperty(this, "Lexer", _Lexer);
|
|
13859
|
+
_defineProperty(this, "Tokenizer", _Tokenizer);
|
|
13860
|
+
_defineProperty(this, "Hooks", _Hooks);
|
|
13861
|
+
this.use(...arguments);
|
|
13767
13862
|
}
|
|
13768
13863
|
/**
|
|
13769
13864
|
* Run callback for every token
|
|
@@ -13794,8 +13889,9 @@ class Marked {
|
|
|
13794
13889
|
}
|
|
13795
13890
|
default:
|
|
13796
13891
|
{
|
|
13892
|
+
var _this$defaults$extens, _this$defaults$extens2;
|
|
13797
13893
|
const genericToken = token;
|
|
13798
|
-
if (this.defaults.extensions
|
|
13894
|
+
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
13895
|
this.defaults.extensions.childTokens[genericToken.type].forEach(childTokens => {
|
|
13800
13896
|
const tokens = genericToken[childTokens].flat(Infinity);
|
|
13801
13897
|
values = values.concat(this.walkTokens(tokens, callback));
|
|
@@ -13808,11 +13904,14 @@ class Marked {
|
|
|
13808
13904
|
}
|
|
13809
13905
|
return values;
|
|
13810
13906
|
}
|
|
13811
|
-
use(
|
|
13907
|
+
use() {
|
|
13812
13908
|
const extensions = this.defaults.extensions || {
|
|
13813
13909
|
renderers: {},
|
|
13814
13910
|
childTokens: {}
|
|
13815
13911
|
};
|
|
13912
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13913
|
+
args[_key] = arguments[_key];
|
|
13914
|
+
}
|
|
13816
13915
|
args.forEach(pack => {
|
|
13817
13916
|
// copy options to new object
|
|
13818
13917
|
const opts = {
|
|
@@ -13831,7 +13930,10 @@ class Marked {
|
|
|
13831
13930
|
const prevRenderer = extensions.renderers[ext.name];
|
|
13832
13931
|
if (prevRenderer) {
|
|
13833
13932
|
// Replace extension with func to run new extension but fall back if false
|
|
13834
|
-
extensions.renderers[ext.name] = function (
|
|
13933
|
+
extensions.renderers[ext.name] = function () {
|
|
13934
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
13935
|
+
args[_key2] = arguments[_key2];
|
|
13936
|
+
}
|
|
13835
13937
|
let ret = ext.renderer.apply(this, args);
|
|
13836
13938
|
if (ret === false) {
|
|
13837
13939
|
ret = prevRenderer.apply(this, args);
|
|
@@ -13892,7 +13994,10 @@ class Marked {
|
|
|
13892
13994
|
const rendererFunc = pack.renderer[rendererProp];
|
|
13893
13995
|
const prevRenderer = renderer[rendererProp];
|
|
13894
13996
|
// Replace renderer with func to run extension, but fall back if false
|
|
13895
|
-
renderer[rendererProp] = (
|
|
13997
|
+
renderer[rendererProp] = function () {
|
|
13998
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
13999
|
+
args[_key3] = arguments[_key3];
|
|
14000
|
+
}
|
|
13896
14001
|
let ret = rendererFunc.apply(renderer, args);
|
|
13897
14002
|
if (ret === false) {
|
|
13898
14003
|
ret = prevRenderer.apply(renderer, args);
|
|
@@ -13917,7 +14022,10 @@ class Marked {
|
|
|
13917
14022
|
const prevTokenizer = tokenizer[tokenizerProp];
|
|
13918
14023
|
// Replace tokenizer with func to run extension, but fall back if false
|
|
13919
14024
|
// @ts-expect-error cannot type tokenizer function dynamically
|
|
13920
|
-
tokenizer[tokenizerProp] = (
|
|
14025
|
+
tokenizer[tokenizerProp] = function () {
|
|
14026
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
14027
|
+
args[_key4] = arguments[_key4];
|
|
14028
|
+
}
|
|
13921
14029
|
let ret = tokenizerFunc.apply(tokenizer, args);
|
|
13922
14030
|
if (ret === false) {
|
|
13923
14031
|
ret = prevTokenizer.apply(tokenizer, args);
|
|
@@ -13954,7 +14062,10 @@ class Marked {
|
|
|
13954
14062
|
};
|
|
13955
14063
|
} else {
|
|
13956
14064
|
// @ts-expect-error cannot type hook function dynamically
|
|
13957
|
-
hooks[hooksProp] = (
|
|
14065
|
+
hooks[hooksProp] = function () {
|
|
14066
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
14067
|
+
args[_key5] = arguments[_key5];
|
|
14068
|
+
}
|
|
13958
14069
|
let ret = hooksFunc.apply(hooks, args);
|
|
13959
14070
|
if (ret === false) {
|
|
13960
14071
|
ret = prevHook.apply(hooks, args);
|
|
@@ -13993,10 +14104,10 @@ class Marked {
|
|
|
13993
14104
|
return this;
|
|
13994
14105
|
}
|
|
13995
14106
|
lexer(src, options) {
|
|
13996
|
-
return _Lexer.lex(src, options
|
|
14107
|
+
return _Lexer.lex(src, options !== null && options !== void 0 ? options : this.defaults);
|
|
13997
14108
|
}
|
|
13998
14109
|
parser(tokens, options) {
|
|
13999
|
-
return _Parser.parse(tokens, options
|
|
14110
|
+
return _Parser.parse(tokens, options !== null && options !== void 0 ? options : this.defaults);
|
|
14000
14111
|
}
|
|
14001
14112
|
parseMarkdown(blockType) {
|
|
14002
14113
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14091,8 +14202,8 @@ marked.defaults = _defaults;
|
|
|
14091
14202
|
/**
|
|
14092
14203
|
* Use Extension
|
|
14093
14204
|
*/
|
|
14094
|
-
marked.use = function (
|
|
14095
|
-
markedInstance.use(...
|
|
14205
|
+
marked.use = function () {
|
|
14206
|
+
markedInstance.use(...arguments);
|
|
14096
14207
|
marked.defaults = markedInstance.defaults;
|
|
14097
14208
|
changeDefaults(marked.defaults);
|
|
14098
14209
|
return marked;
|
|
@@ -14426,14 +14537,14 @@ var chat_component = normalizeComponent(
|
|
|
14426
14537
|
;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
|
|
14427
14538
|
/*! js-cookie v3.0.5 | MIT */
|
|
14428
14539
|
/* eslint-disable no-var */
|
|
14429
|
-
function js_cookie_assign(target) {
|
|
14540
|
+
function js_cookie_assign (target) {
|
|
14430
14541
|
for (var i = 1; i < arguments.length; i++) {
|
|
14431
14542
|
var source = arguments[i];
|
|
14432
14543
|
for (var key in source) {
|
|
14433
14544
|
target[key] = source[key];
|
|
14434
14545
|
}
|
|
14435
14546
|
}
|
|
14436
|
-
return target
|
|
14547
|
+
return target
|
|
14437
14548
|
}
|
|
14438
14549
|
/* eslint-enable no-var */
|
|
14439
14550
|
|
|
@@ -14443,37 +14554,48 @@ var defaultConverter = {
|
|
|
14443
14554
|
if (value[0] === '"') {
|
|
14444
14555
|
value = value.slice(1, -1);
|
|
14445
14556
|
}
|
|
14446
|
-
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
14557
|
+
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
14447
14558
|
},
|
|
14448
14559
|
write: function (value) {
|
|
14449
|
-
return encodeURIComponent(value).replace(
|
|
14560
|
+
return encodeURIComponent(value).replace(
|
|
14561
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
14562
|
+
decodeURIComponent
|
|
14563
|
+
)
|
|
14450
14564
|
}
|
|
14451
14565
|
};
|
|
14452
14566
|
/* eslint-enable no-var */
|
|
14453
14567
|
|
|
14454
14568
|
/* eslint-disable no-var */
|
|
14455
14569
|
|
|
14456
|
-
function init(converter, defaultAttributes) {
|
|
14457
|
-
function set(name, value, attributes) {
|
|
14570
|
+
function init (converter, defaultAttributes) {
|
|
14571
|
+
function set (name, value, attributes) {
|
|
14458
14572
|
if (typeof document === 'undefined') {
|
|
14459
|
-
return
|
|
14573
|
+
return
|
|
14460
14574
|
}
|
|
14575
|
+
|
|
14461
14576
|
attributes = js_cookie_assign({}, defaultAttributes, attributes);
|
|
14577
|
+
|
|
14462
14578
|
if (typeof attributes.expires === 'number') {
|
|
14463
14579
|
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
14464
14580
|
}
|
|
14465
14581
|
if (attributes.expires) {
|
|
14466
14582
|
attributes.expires = attributes.expires.toUTCString();
|
|
14467
14583
|
}
|
|
14468
|
-
|
|
14584
|
+
|
|
14585
|
+
name = encodeURIComponent(name)
|
|
14586
|
+
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
14587
|
+
.replace(/[()]/g, escape);
|
|
14588
|
+
|
|
14469
14589
|
var stringifiedAttributes = '';
|
|
14470
14590
|
for (var attributeName in attributes) {
|
|
14471
14591
|
if (!attributes[attributeName]) {
|
|
14472
|
-
continue
|
|
14592
|
+
continue
|
|
14473
14593
|
}
|
|
14594
|
+
|
|
14474
14595
|
stringifiedAttributes += '; ' + attributeName;
|
|
14596
|
+
|
|
14475
14597
|
if (attributes[attributeName] === true) {
|
|
14476
|
-
continue
|
|
14598
|
+
continue
|
|
14477
14599
|
}
|
|
14478
14600
|
|
|
14479
14601
|
// Considers RFC 6265 section 5.2:
|
|
@@ -14485,11 +14607,14 @@ function init(converter, defaultAttributes) {
|
|
|
14485
14607
|
// ...
|
|
14486
14608
|
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
14487
14609
|
}
|
|
14488
|
-
|
|
14610
|
+
|
|
14611
|
+
return (document.cookie =
|
|
14612
|
+
name + '=' + converter.write(value, name) + stringifiedAttributes)
|
|
14489
14613
|
}
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14614
|
+
|
|
14615
|
+
function get (name) {
|
|
14616
|
+
if (typeof document === 'undefined' || (arguments.length && !name)) {
|
|
14617
|
+
return
|
|
14493
14618
|
}
|
|
14494
14619
|
|
|
14495
14620
|
// To prevent the for loop in the first place assign an empty array
|
|
@@ -14499,45 +14624,52 @@ function init(converter, defaultAttributes) {
|
|
|
14499
14624
|
for (var i = 0; i < cookies.length; i++) {
|
|
14500
14625
|
var parts = cookies[i].split('=');
|
|
14501
14626
|
var value = parts.slice(1).join('=');
|
|
14627
|
+
|
|
14502
14628
|
try {
|
|
14503
14629
|
var found = decodeURIComponent(parts[0]);
|
|
14504
14630
|
jar[found] = converter.read(value, found);
|
|
14631
|
+
|
|
14505
14632
|
if (name === found) {
|
|
14506
|
-
break
|
|
14633
|
+
break
|
|
14507
14634
|
}
|
|
14508
14635
|
} catch (e) {}
|
|
14509
14636
|
}
|
|
14510
|
-
|
|
14637
|
+
|
|
14638
|
+
return name ? jar[name] : jar
|
|
14511
14639
|
}
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14640
|
+
|
|
14641
|
+
return Object.create(
|
|
14642
|
+
{
|
|
14643
|
+
set,
|
|
14644
|
+
get,
|
|
14645
|
+
remove: function (name, attributes) {
|
|
14646
|
+
set(
|
|
14647
|
+
name,
|
|
14648
|
+
'',
|
|
14649
|
+
js_cookie_assign({}, attributes, {
|
|
14650
|
+
expires: -1
|
|
14651
|
+
})
|
|
14652
|
+
);
|
|
14653
|
+
},
|
|
14654
|
+
withAttributes: function (attributes) {
|
|
14655
|
+
return init(this.converter, js_cookie_assign({}, this.attributes, attributes))
|
|
14656
|
+
},
|
|
14657
|
+
withConverter: function (converter) {
|
|
14658
|
+
return init(js_cookie_assign({}, this.converter, converter), this.attributes)
|
|
14659
|
+
}
|
|
14529
14660
|
},
|
|
14530
|
-
|
|
14531
|
-
value: Object.freeze(
|
|
14661
|
+
{
|
|
14662
|
+
attributes: { value: Object.freeze(defaultAttributes) },
|
|
14663
|
+
converter: { value: Object.freeze(converter) }
|
|
14532
14664
|
}
|
|
14533
|
-
|
|
14665
|
+
)
|
|
14534
14666
|
}
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
});
|
|
14667
|
+
|
|
14668
|
+
var api = init(defaultConverter, { path: '/' });
|
|
14538
14669
|
/* eslint-enable no-var */
|
|
14539
14670
|
|
|
14540
14671
|
|
|
14672
|
+
|
|
14541
14673
|
;// 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
14674
|
|
|
14543
14675
|
|
|
@@ -14642,10 +14774,10 @@ var api = init(defaultConverter, {
|
|
|
14642
14774
|
});
|
|
14643
14775
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
14644
14776
|
/* 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=
|
|
14777
|
+
;// 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=4661f078&prod&lang=scss&scoped=true
|
|
14646
14778
|
// extracted by mini-css-extract-plugin
|
|
14647
14779
|
|
|
14648
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
14780
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=4661f078&prod&lang=scss&scoped=true
|
|
14649
14781
|
|
|
14650
14782
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue
|
|
14651
14783
|
|
|
@@ -14662,7 +14794,7 @@ var main_component = normalizeComponent(
|
|
|
14662
14794
|
staticRenderFns,
|
|
14663
14795
|
false,
|
|
14664
14796
|
null,
|
|
14665
|
-
"
|
|
14797
|
+
"4661f078",
|
|
14666
14798
|
null
|
|
14667
14799
|
|
|
14668
14800
|
)
|