@quidgest/chatbot 0.0.5 → 0.0.7

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/dist/index.js CHANGED
@@ -1,4298 +1,9 @@
1
- (function(global2, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("vue")) : typeof define === "function" && define.amd ? define(["vue"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.ChatBotFrontend = factory(global2.vue));
3
- })(this, function(vue) {
4
- "use strict";
5
- function bind(fn, thisArg) {
6
- return function wrap() {
7
- return fn.apply(thisArg, arguments);
8
- };
9
- }
10
- const { toString } = Object.prototype;
11
- const { getPrototypeOf } = Object;
12
- const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
13
- const str = toString.call(thing);
14
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
15
- })(/* @__PURE__ */ Object.create(null));
16
- const kindOfTest = (type) => {
17
- type = type.toLowerCase();
18
- return (thing) => kindOf(thing) === type;
19
- };
20
- const typeOfTest = (type) => (thing) => typeof thing === type;
21
- const { isArray } = Array;
22
- const isUndefined = typeOfTest("undefined");
23
- function isBuffer(val) {
24
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
25
- }
26
- const isArrayBuffer = kindOfTest("ArrayBuffer");
27
- function isArrayBufferView(val) {
28
- let result;
29
- if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
30
- result = ArrayBuffer.isView(val);
31
- } else {
32
- result = val && val.buffer && isArrayBuffer(val.buffer);
33
- }
34
- return result;
35
- }
36
- const isString = typeOfTest("string");
37
- const isFunction = typeOfTest("function");
38
- const isNumber = typeOfTest("number");
39
- const isObject = (thing) => thing !== null && typeof thing === "object";
40
- const isBoolean = (thing) => thing === true || thing === false;
41
- const isPlainObject = (val) => {
42
- if (kindOf(val) !== "object") {
43
- return false;
44
- }
45
- const prototype2 = getPrototypeOf(val);
46
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
47
- };
48
- const isDate = kindOfTest("Date");
49
- const isFile = kindOfTest("File");
50
- const isBlob = kindOfTest("Blob");
51
- const isFileList = kindOfTest("FileList");
52
- const isStream = (val) => isObject(val) && isFunction(val.pipe);
53
- const isFormData = (thing) => {
54
- let kind;
55
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
56
- kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
57
- };
58
- const isURLSearchParams = kindOfTest("URLSearchParams");
59
- const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
60
- function forEach(obj, fn, { allOwnKeys = false } = {}) {
61
- if (obj === null || typeof obj === "undefined") {
62
- return;
63
- }
64
- let i;
65
- let l;
66
- if (typeof obj !== "object") {
67
- obj = [obj];
68
- }
69
- if (isArray(obj)) {
70
- for (i = 0, l = obj.length; i < l; i++) {
71
- fn.call(null, obj[i], i, obj);
72
- }
73
- } else {
74
- const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
75
- const len = keys.length;
76
- let key;
77
- for (i = 0; i < len; i++) {
78
- key = keys[i];
79
- fn.call(null, obj[key], key, obj);
80
- }
81
- }
82
- }
83
- function findKey(obj, key) {
84
- key = key.toLowerCase();
85
- const keys = Object.keys(obj);
86
- let i = keys.length;
87
- let _key;
88
- while (i-- > 0) {
89
- _key = keys[i];
90
- if (key === _key.toLowerCase()) {
91
- return _key;
92
- }
93
- }
94
- return null;
95
- }
96
- const _global = (() => {
97
- if (typeof globalThis !== "undefined")
98
- return globalThis;
99
- return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
100
- })();
101
- const isContextDefined = (context) => !isUndefined(context) && context !== _global;
102
- function merge() {
103
- const { caseless } = isContextDefined(this) && this || {};
104
- const result = {};
105
- const assignValue = (val, key) => {
106
- const targetKey = caseless && findKey(result, key) || key;
107
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
108
- result[targetKey] = merge(result[targetKey], val);
109
- } else if (isPlainObject(val)) {
110
- result[targetKey] = merge({}, val);
111
- } else if (isArray(val)) {
112
- result[targetKey] = val.slice();
113
- } else {
114
- result[targetKey] = val;
115
- }
116
- };
117
- for (let i = 0, l = arguments.length; i < l; i++) {
118
- arguments[i] && forEach(arguments[i], assignValue);
119
- }
120
- return result;
121
- }
122
- const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
123
- forEach(b, (val, key) => {
124
- if (thisArg && isFunction(val)) {
125
- a[key] = bind(val, thisArg);
126
- } else {
127
- a[key] = val;
128
- }
129
- }, { allOwnKeys });
130
- return a;
131
- };
132
- const stripBOM = (content) => {
133
- if (content.charCodeAt(0) === 65279) {
134
- content = content.slice(1);
135
- }
136
- return content;
137
- };
138
- const inherits = (constructor, superConstructor, props, descriptors2) => {
139
- constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
140
- constructor.prototype.constructor = constructor;
141
- Object.defineProperty(constructor, "super", {
142
- value: superConstructor.prototype
143
- });
144
- props && Object.assign(constructor.prototype, props);
145
- };
146
- const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
147
- let props;
148
- let i;
149
- let prop;
150
- const merged = {};
151
- destObj = destObj || {};
152
- if (sourceObj == null)
153
- return destObj;
154
- do {
155
- props = Object.getOwnPropertyNames(sourceObj);
156
- i = props.length;
157
- while (i-- > 0) {
158
- prop = props[i];
159
- if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
160
- destObj[prop] = sourceObj[prop];
161
- merged[prop] = true;
162
- }
163
- }
164
- sourceObj = filter !== false && getPrototypeOf(sourceObj);
165
- } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
166
- return destObj;
167
- };
168
- const endsWith = (str, searchString, position) => {
169
- str = String(str);
170
- if (position === void 0 || position > str.length) {
171
- position = str.length;
172
- }
173
- position -= searchString.length;
174
- const lastIndex = str.indexOf(searchString, position);
175
- return lastIndex !== -1 && lastIndex === position;
176
- };
177
- const toArray = (thing) => {
178
- if (!thing)
179
- return null;
180
- if (isArray(thing))
181
- return thing;
182
- let i = thing.length;
183
- if (!isNumber(i))
184
- return null;
185
- const arr = new Array(i);
186
- while (i-- > 0) {
187
- arr[i] = thing[i];
188
- }
189
- return arr;
190
- };
191
- const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
192
- return (thing) => {
193
- return TypedArray && thing instanceof TypedArray;
194
- };
195
- })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
196
- const forEachEntry = (obj, fn) => {
197
- const generator = obj && obj[Symbol.iterator];
198
- const iterator = generator.call(obj);
199
- let result;
200
- while ((result = iterator.next()) && !result.done) {
201
- const pair = result.value;
202
- fn.call(obj, pair[0], pair[1]);
203
- }
204
- };
205
- const matchAll = (regExp, str) => {
206
- let matches;
207
- const arr = [];
208
- while ((matches = regExp.exec(str)) !== null) {
209
- arr.push(matches);
210
- }
211
- return arr;
212
- };
213
- const isHTMLForm = kindOfTest("HTMLFormElement");
214
- const toCamelCase = (str) => {
215
- return str.toLowerCase().replace(
216
- /[-_\s]([a-z\d])(\w*)/g,
217
- function replacer(m, p1, p2) {
218
- return p1.toUpperCase() + p2;
219
- }
220
- );
221
- };
222
- const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
223
- const isRegExp = kindOfTest("RegExp");
224
- const reduceDescriptors = (obj, reducer) => {
225
- const descriptors2 = Object.getOwnPropertyDescriptors(obj);
226
- const reducedDescriptors = {};
227
- forEach(descriptors2, (descriptor, name) => {
228
- let ret;
229
- if ((ret = reducer(descriptor, name, obj)) !== false) {
230
- reducedDescriptors[name] = ret || descriptor;
231
- }
232
- });
233
- Object.defineProperties(obj, reducedDescriptors);
234
- };
235
- const freezeMethods = (obj) => {
236
- reduceDescriptors(obj, (descriptor, name) => {
237
- if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
238
- return false;
239
- }
240
- const value = obj[name];
241
- if (!isFunction(value))
242
- return;
243
- descriptor.enumerable = false;
244
- if ("writable" in descriptor) {
245
- descriptor.writable = false;
246
- return;
247
- }
248
- if (!descriptor.set) {
249
- descriptor.set = () => {
250
- throw Error("Can not rewrite read-only method '" + name + "'");
251
- };
252
- }
253
- });
254
- };
255
- const toObjectSet = (arrayOrString, delimiter) => {
256
- const obj = {};
257
- const define2 = (arr) => {
258
- arr.forEach((value) => {
259
- obj[value] = true;
260
- });
261
- };
262
- isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
263
- return obj;
264
- };
265
- const noop = () => {
266
- };
267
- const toFiniteNumber = (value, defaultValue) => {
268
- value = +value;
269
- return Number.isFinite(value) ? value : defaultValue;
270
- };
271
- const ALPHA = "abcdefghijklmnopqrstuvwxyz";
272
- const DIGIT = "0123456789";
273
- const ALPHABET = {
274
- DIGIT,
275
- ALPHA,
276
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
277
- };
278
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
279
- let str = "";
280
- const { length } = alphabet;
281
- while (size--) {
282
- str += alphabet[Math.random() * length | 0];
283
- }
284
- return str;
285
- };
286
- function isSpecCompliantForm(thing) {
287
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
288
- }
289
- const toJSONObject = (obj) => {
290
- const stack = new Array(10);
291
- const visit = (source, i) => {
292
- if (isObject(source)) {
293
- if (stack.indexOf(source) >= 0) {
294
- return;
295
- }
296
- if (!("toJSON" in source)) {
297
- stack[i] = source;
298
- const target = isArray(source) ? [] : {};
299
- forEach(source, (value, key) => {
300
- const reducedValue = visit(value, i + 1);
301
- !isUndefined(reducedValue) && (target[key] = reducedValue);
302
- });
303
- stack[i] = void 0;
304
- return target;
305
- }
306
- }
307
- return source;
308
- };
309
- return visit(obj, 0);
310
- };
311
- const isAsyncFn = kindOfTest("AsyncFunction");
312
- const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
313
- const utils$1 = {
314
- isArray,
315
- isArrayBuffer,
316
- isBuffer,
317
- isFormData,
318
- isArrayBufferView,
319
- isString,
320
- isNumber,
321
- isBoolean,
322
- isObject,
323
- isPlainObject,
324
- isUndefined,
325
- isDate,
326
- isFile,
327
- isBlob,
328
- isRegExp,
329
- isFunction,
330
- isStream,
331
- isURLSearchParams,
332
- isTypedArray,
333
- isFileList,
334
- forEach,
335
- merge,
336
- extend,
337
- trim,
338
- stripBOM,
339
- inherits,
340
- toFlatObject,
341
- kindOf,
342
- kindOfTest,
343
- endsWith,
344
- toArray,
345
- forEachEntry,
346
- matchAll,
347
- isHTMLForm,
348
- hasOwnProperty,
349
- hasOwnProp: hasOwnProperty,
350
- // an alias to avoid ESLint no-prototype-builtins detection
351
- reduceDescriptors,
352
- freezeMethods,
353
- toObjectSet,
354
- toCamelCase,
355
- noop,
356
- toFiniteNumber,
357
- findKey,
358
- global: _global,
359
- isContextDefined,
360
- ALPHABET,
361
- generateString,
362
- isSpecCompliantForm,
363
- toJSONObject,
364
- isAsyncFn,
365
- isThenable
366
- };
367
- function AxiosError(message, code, config, request, response) {
368
- Error.call(this);
369
- if (Error.captureStackTrace) {
370
- Error.captureStackTrace(this, this.constructor);
371
- } else {
372
- this.stack = new Error().stack;
373
- }
374
- this.message = message;
375
- this.name = "AxiosError";
376
- code && (this.code = code);
377
- config && (this.config = config);
378
- request && (this.request = request);
379
- response && (this.response = response);
380
- }
381
- utils$1.inherits(AxiosError, Error, {
382
- toJSON: function toJSON() {
383
- return {
384
- // Standard
385
- message: this.message,
386
- name: this.name,
387
- // Microsoft
388
- description: this.description,
389
- number: this.number,
390
- // Mozilla
391
- fileName: this.fileName,
392
- lineNumber: this.lineNumber,
393
- columnNumber: this.columnNumber,
394
- stack: this.stack,
395
- // Axios
396
- config: utils$1.toJSONObject(this.config),
397
- code: this.code,
398
- status: this.response && this.response.status ? this.response.status : null
399
- };
400
- }
401
- });
402
- const prototype$1 = AxiosError.prototype;
403
- const descriptors = {};
404
- [
405
- "ERR_BAD_OPTION_VALUE",
406
- "ERR_BAD_OPTION",
407
- "ECONNABORTED",
408
- "ETIMEDOUT",
409
- "ERR_NETWORK",
410
- "ERR_FR_TOO_MANY_REDIRECTS",
411
- "ERR_DEPRECATED",
412
- "ERR_BAD_RESPONSE",
413
- "ERR_BAD_REQUEST",
414
- "ERR_CANCELED",
415
- "ERR_NOT_SUPPORT",
416
- "ERR_INVALID_URL"
417
- // eslint-disable-next-line func-names
418
- ].forEach((code) => {
419
- descriptors[code] = { value: code };
420
- });
421
- Object.defineProperties(AxiosError, descriptors);
422
- Object.defineProperty(prototype$1, "isAxiosError", { value: true });
423
- AxiosError.from = (error, code, config, request, response, customProps) => {
424
- const axiosError = Object.create(prototype$1);
425
- utils$1.toFlatObject(error, axiosError, function filter(obj) {
426
- return obj !== Error.prototype;
427
- }, (prop) => {
428
- return prop !== "isAxiosError";
429
- });
430
- AxiosError.call(axiosError, error.message, code, config, request, response);
431
- axiosError.cause = error;
432
- axiosError.name = error.name;
433
- customProps && Object.assign(axiosError, customProps);
434
- return axiosError;
435
- };
436
- const httpAdapter = null;
437
- function isVisitable(thing) {
438
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
439
- }
440
- function removeBrackets(key) {
441
- return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
442
- }
443
- function renderKey(path, key, dots) {
444
- if (!path)
445
- return key;
446
- return path.concat(key).map(function each(token, i) {
447
- token = removeBrackets(token);
448
- return !dots && i ? "[" + token + "]" : token;
449
- }).join(dots ? "." : "");
450
- }
451
- function isFlatArray(arr) {
452
- return utils$1.isArray(arr) && !arr.some(isVisitable);
453
- }
454
- const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
455
- return /^is[A-Z]/.test(prop);
456
- });
457
- function toFormData(obj, formData, options) {
458
- if (!utils$1.isObject(obj)) {
459
- throw new TypeError("target must be an object");
460
- }
461
- formData = formData || new FormData();
462
- options = utils$1.toFlatObject(options, {
463
- metaTokens: true,
464
- dots: false,
465
- indexes: false
466
- }, false, function defined(option, source) {
467
- return !utils$1.isUndefined(source[option]);
468
- });
469
- const metaTokens = options.metaTokens;
470
- const visitor = options.visitor || defaultVisitor;
471
- const dots = options.dots;
472
- const indexes = options.indexes;
473
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
474
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
475
- if (!utils$1.isFunction(visitor)) {
476
- throw new TypeError("visitor must be a function");
477
- }
478
- function convertValue(value) {
479
- if (value === null)
480
- return "";
481
- if (utils$1.isDate(value)) {
482
- return value.toISOString();
483
- }
484
- if (!useBlob && utils$1.isBlob(value)) {
485
- throw new AxiosError("Blob is not supported. Use a Buffer instead.");
486
- }
487
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
488
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
489
- }
490
- return value;
491
- }
492
- function defaultVisitor(value, key, path) {
493
- let arr = value;
494
- if (value && !path && typeof value === "object") {
495
- if (utils$1.endsWith(key, "{}")) {
496
- key = metaTokens ? key : key.slice(0, -2);
497
- value = JSON.stringify(value);
498
- } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
499
- key = removeBrackets(key);
500
- arr.forEach(function each(el, index) {
501
- !(utils$1.isUndefined(el) || el === null) && formData.append(
502
- // eslint-disable-next-line no-nested-ternary
503
- indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
504
- convertValue(el)
505
- );
506
- });
507
- return false;
508
- }
509
- }
510
- if (isVisitable(value)) {
511
- return true;
512
- }
513
- formData.append(renderKey(path, key, dots), convertValue(value));
514
- return false;
515
- }
516
- const stack = [];
517
- const exposedHelpers = Object.assign(predicates, {
518
- defaultVisitor,
519
- convertValue,
520
- isVisitable
521
- });
522
- function build(value, path) {
523
- if (utils$1.isUndefined(value))
524
- return;
525
- if (stack.indexOf(value) !== -1) {
526
- throw Error("Circular reference detected in " + path.join("."));
527
- }
528
- stack.push(value);
529
- utils$1.forEach(value, function each(el, key) {
530
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
531
- formData,
532
- el,
533
- utils$1.isString(key) ? key.trim() : key,
534
- path,
535
- exposedHelpers
536
- );
537
- if (result === true) {
538
- build(el, path ? path.concat(key) : [key]);
539
- }
540
- });
541
- stack.pop();
542
- }
543
- if (!utils$1.isObject(obj)) {
544
- throw new TypeError("data must be an object");
545
- }
546
- build(obj);
547
- return formData;
548
- }
549
- function encode$1(str) {
550
- const charMap = {
551
- "!": "%21",
552
- "'": "%27",
553
- "(": "%28",
554
- ")": "%29",
555
- "~": "%7E",
556
- "%20": "+",
557
- "%00": "\0"
558
- };
559
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
560
- return charMap[match];
561
- });
562
- }
563
- function AxiosURLSearchParams(params, options) {
564
- this._pairs = [];
565
- params && toFormData(params, this, options);
566
- }
567
- const prototype = AxiosURLSearchParams.prototype;
568
- prototype.append = function append(name, value) {
569
- this._pairs.push([name, value]);
570
- };
571
- prototype.toString = function toString2(encoder) {
572
- const _encode = encoder ? function(value) {
573
- return encoder.call(this, value, encode$1);
574
- } : encode$1;
575
- return this._pairs.map(function each(pair) {
576
- return _encode(pair[0]) + "=" + _encode(pair[1]);
577
- }, "").join("&");
578
- };
579
- function encode(val) {
580
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
581
- }
582
- function buildURL(url, params, options) {
583
- if (!params) {
584
- return url;
585
- }
586
- const _encode = options && options.encode || encode;
587
- const serializeFn = options && options.serialize;
588
- let serializedParams;
589
- if (serializeFn) {
590
- serializedParams = serializeFn(params, options);
591
- } else {
592
- serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
593
- }
594
- if (serializedParams) {
595
- const hashmarkIndex = url.indexOf("#");
596
- if (hashmarkIndex !== -1) {
597
- url = url.slice(0, hashmarkIndex);
598
- }
599
- url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
600
- }
601
- return url;
602
- }
603
- class InterceptorManager {
604
- constructor() {
605
- this.handlers = [];
606
- }
607
- /**
608
- * Add a new interceptor to the stack
609
- *
610
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
611
- * @param {Function} rejected The function to handle `reject` for a `Promise`
612
- *
613
- * @return {Number} An ID used to remove interceptor later
614
- */
615
- use(fulfilled, rejected, options) {
616
- this.handlers.push({
617
- fulfilled,
618
- rejected,
619
- synchronous: options ? options.synchronous : false,
620
- runWhen: options ? options.runWhen : null
621
- });
622
- return this.handlers.length - 1;
623
- }
624
- /**
625
- * Remove an interceptor from the stack
626
- *
627
- * @param {Number} id The ID that was returned by `use`
628
- *
629
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
630
- */
631
- eject(id) {
632
- if (this.handlers[id]) {
633
- this.handlers[id] = null;
634
- }
635
- }
636
- /**
637
- * Clear all interceptors from the stack
638
- *
639
- * @returns {void}
640
- */
641
- clear() {
642
- if (this.handlers) {
643
- this.handlers = [];
644
- }
645
- }
646
- /**
647
- * Iterate over all the registered interceptors
648
- *
649
- * This method is particularly useful for skipping over any
650
- * interceptors that may have become `null` calling `eject`.
651
- *
652
- * @param {Function} fn The function to call for each interceptor
653
- *
654
- * @returns {void}
655
- */
656
- forEach(fn) {
657
- utils$1.forEach(this.handlers, function forEachHandler(h) {
658
- if (h !== null) {
659
- fn(h);
660
- }
661
- });
662
- }
663
- }
664
- const transitionalDefaults = {
665
- silentJSONParsing: true,
666
- forcedJSONParsing: true,
667
- clarifyTimeoutError: false
668
- };
669
- const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
670
- const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
671
- const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
672
- const platform$1 = {
673
- isBrowser: true,
674
- classes: {
675
- URLSearchParams: URLSearchParams$1,
676
- FormData: FormData$1,
677
- Blob: Blob$1
678
- },
679
- protocols: ["http", "https", "file", "blob", "url", "data"]
680
- };
681
- const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
682
- const hasStandardBrowserEnv = ((product) => {
683
- return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
684
- })(typeof navigator !== "undefined" && navigator.product);
685
- const hasStandardBrowserWebWorkerEnv = (() => {
686
- return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
687
- self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
688
- })();
689
- const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
690
- __proto__: null,
691
- hasBrowserEnv,
692
- hasStandardBrowserEnv,
693
- hasStandardBrowserWebWorkerEnv
694
- }, Symbol.toStringTag, { value: "Module" }));
695
- const platform = {
696
- ...utils,
697
- ...platform$1
698
- };
699
- function toURLEncodedForm(data, options) {
700
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
701
- visitor: function(value, key, path, helpers) {
702
- if (platform.isNode && utils$1.isBuffer(value)) {
703
- this.append(key, value.toString("base64"));
704
- return false;
705
- }
706
- return helpers.defaultVisitor.apply(this, arguments);
707
- }
708
- }, options));
709
- }
710
- function parsePropPath(name) {
711
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
712
- return match[0] === "[]" ? "" : match[1] || match[0];
713
- });
714
- }
715
- function arrayToObject(arr) {
716
- const obj = {};
717
- const keys = Object.keys(arr);
718
- let i;
719
- const len = keys.length;
720
- let key;
721
- for (i = 0; i < len; i++) {
722
- key = keys[i];
723
- obj[key] = arr[key];
724
- }
725
- return obj;
726
- }
727
- function formDataToJSON(formData) {
728
- function buildPath(path, value, target, index) {
729
- let name = path[index++];
730
- if (name === "__proto__")
731
- return true;
732
- const isNumericKey = Number.isFinite(+name);
733
- const isLast = index >= path.length;
734
- name = !name && utils$1.isArray(target) ? target.length : name;
735
- if (isLast) {
736
- if (utils$1.hasOwnProp(target, name)) {
737
- target[name] = [target[name], value];
738
- } else {
739
- target[name] = value;
740
- }
741
- return !isNumericKey;
742
- }
743
- if (!target[name] || !utils$1.isObject(target[name])) {
744
- target[name] = [];
745
- }
746
- const result = buildPath(path, value, target[name], index);
747
- if (result && utils$1.isArray(target[name])) {
748
- target[name] = arrayToObject(target[name]);
749
- }
750
- return !isNumericKey;
751
- }
752
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
753
- const obj = {};
754
- utils$1.forEachEntry(formData, (name, value) => {
755
- buildPath(parsePropPath(name), value, obj, 0);
756
- });
757
- return obj;
758
- }
759
- return null;
760
- }
761
- function stringifySafely(rawValue, parser, encoder) {
762
- if (utils$1.isString(rawValue)) {
763
- try {
764
- (parser || JSON.parse)(rawValue);
765
- return utils$1.trim(rawValue);
766
- } catch (e) {
767
- if (e.name !== "SyntaxError") {
768
- throw e;
769
- }
770
- }
771
- }
772
- return (encoder || JSON.stringify)(rawValue);
773
- }
774
- const defaults = {
775
- transitional: transitionalDefaults,
776
- adapter: ["xhr", "http"],
777
- transformRequest: [function transformRequest(data, headers) {
778
- const contentType = headers.getContentType() || "";
779
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
780
- const isObjectPayload = utils$1.isObject(data);
781
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
782
- data = new FormData(data);
783
- }
784
- const isFormData2 = utils$1.isFormData(data);
785
- if (isFormData2) {
786
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
787
- }
788
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
789
- return data;
790
- }
791
- if (utils$1.isArrayBufferView(data)) {
792
- return data.buffer;
793
- }
794
- if (utils$1.isURLSearchParams(data)) {
795
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
796
- return data.toString();
797
- }
798
- let isFileList2;
799
- if (isObjectPayload) {
800
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
801
- return toURLEncodedForm(data, this.formSerializer).toString();
802
- }
803
- if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
804
- const _FormData = this.env && this.env.FormData;
805
- return toFormData(
806
- isFileList2 ? { "files[]": data } : data,
807
- _FormData && new _FormData(),
808
- this.formSerializer
809
- );
810
- }
811
- }
812
- if (isObjectPayload || hasJSONContentType) {
813
- headers.setContentType("application/json", false);
814
- return stringifySafely(data);
815
- }
816
- return data;
817
- }],
818
- transformResponse: [function transformResponse(data) {
819
- const transitional = this.transitional || defaults.transitional;
820
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
821
- const JSONRequested = this.responseType === "json";
822
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
823
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
824
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
825
- try {
826
- return JSON.parse(data);
827
- } catch (e) {
828
- if (strictJSONParsing) {
829
- if (e.name === "SyntaxError") {
830
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
831
- }
832
- throw e;
833
- }
834
- }
835
- }
836
- return data;
837
- }],
838
- /**
839
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
840
- * timeout is not created.
841
- */
842
- timeout: 0,
843
- xsrfCookieName: "XSRF-TOKEN",
844
- xsrfHeaderName: "X-XSRF-TOKEN",
845
- maxContentLength: -1,
846
- maxBodyLength: -1,
847
- env: {
848
- FormData: platform.classes.FormData,
849
- Blob: platform.classes.Blob
850
- },
851
- validateStatus: function validateStatus(status) {
852
- return status >= 200 && status < 300;
853
- },
854
- headers: {
855
- common: {
856
- "Accept": "application/json, text/plain, */*",
857
- "Content-Type": void 0
858
- }
859
- }
860
- };
861
- utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
862
- defaults.headers[method] = {};
863
- });
864
- const defaults$1 = defaults;
865
- const ignoreDuplicateOf = utils$1.toObjectSet([
866
- "age",
867
- "authorization",
868
- "content-length",
869
- "content-type",
870
- "etag",
871
- "expires",
872
- "from",
873
- "host",
874
- "if-modified-since",
875
- "if-unmodified-since",
876
- "last-modified",
877
- "location",
878
- "max-forwards",
879
- "proxy-authorization",
880
- "referer",
881
- "retry-after",
882
- "user-agent"
883
- ]);
884
- const parseHeaders = (rawHeaders) => {
885
- const parsed = {};
886
- let key;
887
- let val;
888
- let i;
889
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
890
- i = line.indexOf(":");
891
- key = line.substring(0, i).trim().toLowerCase();
892
- val = line.substring(i + 1).trim();
893
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
894
- return;
895
- }
896
- if (key === "set-cookie") {
897
- if (parsed[key]) {
898
- parsed[key].push(val);
899
- } else {
900
- parsed[key] = [val];
901
- }
902
- } else {
903
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
904
- }
905
- });
906
- return parsed;
907
- };
908
- const $internals = Symbol("internals");
909
- function normalizeHeader(header) {
910
- return header && String(header).trim().toLowerCase();
911
- }
912
- function normalizeValue(value) {
913
- if (value === false || value == null) {
914
- return value;
915
- }
916
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
917
- }
918
- function parseTokens(str) {
919
- const tokens = /* @__PURE__ */ Object.create(null);
920
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
921
- let match;
922
- while (match = tokensRE.exec(str)) {
923
- tokens[match[1]] = match[2];
924
- }
925
- return tokens;
926
- }
927
- const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
928
- function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
929
- if (utils$1.isFunction(filter)) {
930
- return filter.call(this, value, header);
931
- }
932
- if (isHeaderNameFilter) {
933
- value = header;
934
- }
935
- if (!utils$1.isString(value))
936
- return;
937
- if (utils$1.isString(filter)) {
938
- return value.indexOf(filter) !== -1;
939
- }
940
- if (utils$1.isRegExp(filter)) {
941
- return filter.test(value);
942
- }
943
- }
944
- function formatHeader(header) {
945
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
946
- return char.toUpperCase() + str;
947
- });
948
- }
949
- function buildAccessors(obj, header) {
950
- const accessorName = utils$1.toCamelCase(" " + header);
951
- ["get", "set", "has"].forEach((methodName) => {
952
- Object.defineProperty(obj, methodName + accessorName, {
953
- value: function(arg1, arg2, arg3) {
954
- return this[methodName].call(this, header, arg1, arg2, arg3);
955
- },
956
- configurable: true
957
- });
958
- });
959
- }
960
- class AxiosHeaders {
961
- constructor(headers) {
962
- headers && this.set(headers);
963
- }
964
- set(header, valueOrRewrite, rewrite) {
965
- const self2 = this;
966
- function setHeader(_value, _header, _rewrite) {
967
- const lHeader = normalizeHeader(_header);
968
- if (!lHeader) {
969
- throw new Error("header name must be a non-empty string");
970
- }
971
- const key = utils$1.findKey(self2, lHeader);
972
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
973
- self2[key || _header] = normalizeValue(_value);
974
- }
975
- }
976
- const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
977
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
978
- setHeaders(header, valueOrRewrite);
979
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
980
- setHeaders(parseHeaders(header), valueOrRewrite);
981
- } else {
982
- header != null && setHeader(valueOrRewrite, header, rewrite);
983
- }
984
- return this;
985
- }
986
- get(header, parser) {
987
- header = normalizeHeader(header);
988
- if (header) {
989
- const key = utils$1.findKey(this, header);
990
- if (key) {
991
- const value = this[key];
992
- if (!parser) {
993
- return value;
994
- }
995
- if (parser === true) {
996
- return parseTokens(value);
997
- }
998
- if (utils$1.isFunction(parser)) {
999
- return parser.call(this, value, key);
1000
- }
1001
- if (utils$1.isRegExp(parser)) {
1002
- return parser.exec(value);
1003
- }
1004
- throw new TypeError("parser must be boolean|regexp|function");
1005
- }
1006
- }
1007
- }
1008
- has(header, matcher) {
1009
- header = normalizeHeader(header);
1010
- if (header) {
1011
- const key = utils$1.findKey(this, header);
1012
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1013
- }
1014
- return false;
1015
- }
1016
- delete(header, matcher) {
1017
- const self2 = this;
1018
- let deleted = false;
1019
- function deleteHeader(_header) {
1020
- _header = normalizeHeader(_header);
1021
- if (_header) {
1022
- const key = utils$1.findKey(self2, _header);
1023
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
1024
- delete self2[key];
1025
- deleted = true;
1026
- }
1027
- }
1028
- }
1029
- if (utils$1.isArray(header)) {
1030
- header.forEach(deleteHeader);
1031
- } else {
1032
- deleteHeader(header);
1033
- }
1034
- return deleted;
1035
- }
1036
- clear(matcher) {
1037
- const keys = Object.keys(this);
1038
- let i = keys.length;
1039
- let deleted = false;
1040
- while (i--) {
1041
- const key = keys[i];
1042
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1043
- delete this[key];
1044
- deleted = true;
1045
- }
1046
- }
1047
- return deleted;
1048
- }
1049
- normalize(format) {
1050
- const self2 = this;
1051
- const headers = {};
1052
- utils$1.forEach(this, (value, header) => {
1053
- const key = utils$1.findKey(headers, header);
1054
- if (key) {
1055
- self2[key] = normalizeValue(value);
1056
- delete self2[header];
1057
- return;
1058
- }
1059
- const normalized = format ? formatHeader(header) : String(header).trim();
1060
- if (normalized !== header) {
1061
- delete self2[header];
1062
- }
1063
- self2[normalized] = normalizeValue(value);
1064
- headers[normalized] = true;
1065
- });
1066
- return this;
1067
- }
1068
- concat(...targets) {
1069
- return this.constructor.concat(this, ...targets);
1070
- }
1071
- toJSON(asStrings) {
1072
- const obj = /* @__PURE__ */ Object.create(null);
1073
- utils$1.forEach(this, (value, header) => {
1074
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
1075
- });
1076
- return obj;
1077
- }
1078
- [Symbol.iterator]() {
1079
- return Object.entries(this.toJSON())[Symbol.iterator]();
1080
- }
1081
- toString() {
1082
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
1083
- }
1084
- get [Symbol.toStringTag]() {
1085
- return "AxiosHeaders";
1086
- }
1087
- static from(thing) {
1088
- return thing instanceof this ? thing : new this(thing);
1089
- }
1090
- static concat(first, ...targets) {
1091
- const computed = new this(first);
1092
- targets.forEach((target) => computed.set(target));
1093
- return computed;
1094
- }
1095
- static accessor(header) {
1096
- const internals = this[$internals] = this[$internals] = {
1097
- accessors: {}
1098
- };
1099
- const accessors = internals.accessors;
1100
- const prototype2 = this.prototype;
1101
- function defineAccessor(_header) {
1102
- const lHeader = normalizeHeader(_header);
1103
- if (!accessors[lHeader]) {
1104
- buildAccessors(prototype2, _header);
1105
- accessors[lHeader] = true;
1106
- }
1107
- }
1108
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1109
- return this;
1110
- }
1111
- }
1112
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1113
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
1114
- let mapped = key[0].toUpperCase() + key.slice(1);
1115
- return {
1116
- get: () => value,
1117
- set(headerValue) {
1118
- this[mapped] = headerValue;
1119
- }
1120
- };
1121
- });
1122
- utils$1.freezeMethods(AxiosHeaders);
1123
- const AxiosHeaders$1 = AxiosHeaders;
1124
- function transformData(fns, response) {
1125
- const config = this || defaults$1;
1126
- const context = response || config;
1127
- const headers = AxiosHeaders$1.from(context.headers);
1128
- let data = context.data;
1129
- utils$1.forEach(fns, function transform(fn) {
1130
- data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
1131
- });
1132
- headers.normalize();
1133
- return data;
1134
- }
1135
- function isCancel(value) {
1136
- return !!(value && value.__CANCEL__);
1137
- }
1138
- function CanceledError(message, config, request) {
1139
- AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
1140
- this.name = "CanceledError";
1141
- }
1142
- utils$1.inherits(CanceledError, AxiosError, {
1143
- __CANCEL__: true
1144
- });
1145
- function settle(resolve, reject, response) {
1146
- const validateStatus = response.config.validateStatus;
1147
- if (!response.status || !validateStatus || validateStatus(response.status)) {
1148
- resolve(response);
1149
- } else {
1150
- reject(new AxiosError(
1151
- "Request failed with status code " + response.status,
1152
- [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1153
- response.config,
1154
- response.request,
1155
- response
1156
- ));
1157
- }
1158
- }
1159
- const cookies = platform.hasStandardBrowserEnv ? (
1160
- // Standard browser envs support document.cookie
1161
- {
1162
- write(name, value, expires, path, domain, secure) {
1163
- const cookie = [name + "=" + encodeURIComponent(value)];
1164
- utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
1165
- utils$1.isString(path) && cookie.push("path=" + path);
1166
- utils$1.isString(domain) && cookie.push("domain=" + domain);
1167
- secure === true && cookie.push("secure");
1168
- document.cookie = cookie.join("; ");
1169
- },
1170
- read(name) {
1171
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
1172
- return match ? decodeURIComponent(match[3]) : null;
1173
- },
1174
- remove(name) {
1175
- this.write(name, "", Date.now() - 864e5);
1176
- }
1177
- }
1178
- ) : (
1179
- // Non-standard browser env (web workers, react-native) lack needed support.
1180
- {
1181
- write() {
1182
- },
1183
- read() {
1184
- return null;
1185
- },
1186
- remove() {
1187
- }
1188
- }
1189
- );
1190
- function isAbsoluteURL(url) {
1191
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1192
- }
1193
- function combineURLs(baseURL, relativeURL) {
1194
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
1195
- }
1196
- function buildFullPath(baseURL, requestedURL) {
1197
- if (baseURL && !isAbsoluteURL(requestedURL)) {
1198
- return combineURLs(baseURL, requestedURL);
1199
- }
1200
- return requestedURL;
1201
- }
1202
- const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
1203
- // Standard browser envs have full support of the APIs needed to test
1204
- // whether the request URL is of the same origin as current location.
1205
- function standardBrowserEnv() {
1206
- const msie = /(msie|trident)/i.test(navigator.userAgent);
1207
- const urlParsingNode = document.createElement("a");
1208
- let originURL;
1209
- function resolveURL(url) {
1210
- let href = url;
1211
- if (msie) {
1212
- urlParsingNode.setAttribute("href", href);
1213
- href = urlParsingNode.href;
1214
- }
1215
- urlParsingNode.setAttribute("href", href);
1216
- return {
1217
- href: urlParsingNode.href,
1218
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
1219
- host: urlParsingNode.host,
1220
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
1221
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
1222
- hostname: urlParsingNode.hostname,
1223
- port: urlParsingNode.port,
1224
- pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
1225
- };
1226
- }
1227
- originURL = resolveURL(window.location.href);
1228
- return function isURLSameOrigin2(requestURL) {
1229
- const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
1230
- return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
1231
- };
1232
- }()
1233
- ) : (
1234
- // Non standard browser envs (web workers, react-native) lack needed support.
1235
- /* @__PURE__ */ function nonStandardBrowserEnv() {
1236
- return function isURLSameOrigin2() {
1237
- return true;
1238
- };
1239
- }()
1240
- );
1241
- function parseProtocol(url) {
1242
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1243
- return match && match[1] || "";
1244
- }
1245
- function speedometer(samplesCount, min) {
1246
- samplesCount = samplesCount || 10;
1247
- const bytes = new Array(samplesCount);
1248
- const timestamps = new Array(samplesCount);
1249
- let head = 0;
1250
- let tail = 0;
1251
- let firstSampleTS;
1252
- min = min !== void 0 ? min : 1e3;
1253
- return function push(chunkLength) {
1254
- const now = Date.now();
1255
- const startedAt = timestamps[tail];
1256
- if (!firstSampleTS) {
1257
- firstSampleTS = now;
1258
- }
1259
- bytes[head] = chunkLength;
1260
- timestamps[head] = now;
1261
- let i = tail;
1262
- let bytesCount = 0;
1263
- while (i !== head) {
1264
- bytesCount += bytes[i++];
1265
- i = i % samplesCount;
1266
- }
1267
- head = (head + 1) % samplesCount;
1268
- if (head === tail) {
1269
- tail = (tail + 1) % samplesCount;
1270
- }
1271
- if (now - firstSampleTS < min) {
1272
- return;
1273
- }
1274
- const passed = startedAt && now - startedAt;
1275
- return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
1276
- };
1277
- }
1278
- function progressEventReducer(listener, isDownloadStream) {
1279
- let bytesNotified = 0;
1280
- const _speedometer = speedometer(50, 250);
1281
- return (e) => {
1282
- const loaded = e.loaded;
1283
- const total = e.lengthComputable ? e.total : void 0;
1284
- const progressBytes = loaded - bytesNotified;
1285
- const rate = _speedometer(progressBytes);
1286
- const inRange = loaded <= total;
1287
- bytesNotified = loaded;
1288
- const data = {
1289
- loaded,
1290
- total,
1291
- progress: total ? loaded / total : void 0,
1292
- bytes: progressBytes,
1293
- rate: rate ? rate : void 0,
1294
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
1295
- event: e
1296
- };
1297
- data[isDownloadStream ? "download" : "upload"] = true;
1298
- listener(data);
1299
- };
1300
- }
1301
- const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1302
- const xhrAdapter = isXHRAdapterSupported && function(config) {
1303
- return new Promise(function dispatchXhrRequest(resolve, reject) {
1304
- let requestData = config.data;
1305
- const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
1306
- let { responseType, withXSRFToken } = config;
1307
- let onCanceled;
1308
- function done() {
1309
- if (config.cancelToken) {
1310
- config.cancelToken.unsubscribe(onCanceled);
1311
- }
1312
- if (config.signal) {
1313
- config.signal.removeEventListener("abort", onCanceled);
1314
- }
1315
- }
1316
- let contentType;
1317
- if (utils$1.isFormData(requestData)) {
1318
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
1319
- requestHeaders.setContentType(false);
1320
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
1321
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
1322
- requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
1323
- }
1324
- }
1325
- let request = new XMLHttpRequest();
1326
- if (config.auth) {
1327
- const username = config.auth.username || "";
1328
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
1329
- requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
1330
- }
1331
- const fullPath = buildFullPath(config.baseURL, config.url);
1332
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1333
- request.timeout = config.timeout;
1334
- function onloadend() {
1335
- if (!request) {
1336
- return;
1337
- }
1338
- const responseHeaders = AxiosHeaders$1.from(
1339
- "getAllResponseHeaders" in request && request.getAllResponseHeaders()
1340
- );
1341
- const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
1342
- const response = {
1343
- data: responseData,
1344
- status: request.status,
1345
- statusText: request.statusText,
1346
- headers: responseHeaders,
1347
- config,
1348
- request
1349
- };
1350
- settle(function _resolve(value) {
1351
- resolve(value);
1352
- done();
1353
- }, function _reject(err) {
1354
- reject(err);
1355
- done();
1356
- }, response);
1357
- request = null;
1358
- }
1359
- if ("onloadend" in request) {
1360
- request.onloadend = onloadend;
1361
- } else {
1362
- request.onreadystatechange = function handleLoad() {
1363
- if (!request || request.readyState !== 4) {
1364
- return;
1365
- }
1366
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
1367
- return;
1368
- }
1369
- setTimeout(onloadend);
1370
- };
1371
- }
1372
- request.onabort = function handleAbort() {
1373
- if (!request) {
1374
- return;
1375
- }
1376
- reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
1377
- request = null;
1378
- };
1379
- request.onerror = function handleError() {
1380
- reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
1381
- request = null;
1382
- };
1383
- request.ontimeout = function handleTimeout() {
1384
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
1385
- const transitional = config.transitional || transitionalDefaults;
1386
- if (config.timeoutErrorMessage) {
1387
- timeoutErrorMessage = config.timeoutErrorMessage;
1388
- }
1389
- reject(new AxiosError(
1390
- timeoutErrorMessage,
1391
- transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
1392
- config,
1393
- request
1394
- ));
1395
- request = null;
1396
- };
1397
- if (platform.hasStandardBrowserEnv) {
1398
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
1399
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
1400
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
1401
- if (xsrfValue) {
1402
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
1403
- }
1404
- }
1405
- }
1406
- requestData === void 0 && requestHeaders.setContentType(null);
1407
- if ("setRequestHeader" in request) {
1408
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
1409
- request.setRequestHeader(key, val);
1410
- });
1411
- }
1412
- if (!utils$1.isUndefined(config.withCredentials)) {
1413
- request.withCredentials = !!config.withCredentials;
1414
- }
1415
- if (responseType && responseType !== "json") {
1416
- request.responseType = config.responseType;
1417
- }
1418
- if (typeof config.onDownloadProgress === "function") {
1419
- request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
1420
- }
1421
- if (typeof config.onUploadProgress === "function" && request.upload) {
1422
- request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
1423
- }
1424
- if (config.cancelToken || config.signal) {
1425
- onCanceled = (cancel) => {
1426
- if (!request) {
1427
- return;
1428
- }
1429
- reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
1430
- request.abort();
1431
- request = null;
1432
- };
1433
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
1434
- if (config.signal) {
1435
- config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
1436
- }
1437
- }
1438
- const protocol = parseProtocol(fullPath);
1439
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
1440
- reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
1441
- return;
1442
- }
1443
- request.send(requestData || null);
1444
- });
1445
- };
1446
- const knownAdapters = {
1447
- http: httpAdapter,
1448
- xhr: xhrAdapter
1449
- };
1450
- utils$1.forEach(knownAdapters, (fn, value) => {
1451
- if (fn) {
1452
- try {
1453
- Object.defineProperty(fn, "name", { value });
1454
- } catch (e) {
1455
- }
1456
- Object.defineProperty(fn, "adapterName", { value });
1457
- }
1458
- });
1459
- const renderReason = (reason) => `- ${reason}`;
1460
- const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
1461
- const adapters = {
1462
- getAdapter: (adapters2) => {
1463
- adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
1464
- const { length } = adapters2;
1465
- let nameOrAdapter;
1466
- let adapter;
1467
- const rejectedReasons = {};
1468
- for (let i = 0; i < length; i++) {
1469
- nameOrAdapter = adapters2[i];
1470
- let id;
1471
- adapter = nameOrAdapter;
1472
- if (!isResolvedHandle(nameOrAdapter)) {
1473
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
1474
- if (adapter === void 0) {
1475
- throw new AxiosError(`Unknown adapter '${id}'`);
1476
- }
1477
- }
1478
- if (adapter) {
1479
- break;
1480
- }
1481
- rejectedReasons[id || "#" + i] = adapter;
1482
- }
1483
- if (!adapter) {
1484
- const reasons = Object.entries(rejectedReasons).map(
1485
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
1486
- );
1487
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
1488
- throw new AxiosError(
1489
- `There is no suitable adapter to dispatch the request ` + s,
1490
- "ERR_NOT_SUPPORT"
1491
- );
1492
- }
1493
- return adapter;
1494
- },
1495
- adapters: knownAdapters
1496
- };
1497
- function throwIfCancellationRequested(config) {
1498
- if (config.cancelToken) {
1499
- config.cancelToken.throwIfRequested();
1500
- }
1501
- if (config.signal && config.signal.aborted) {
1502
- throw new CanceledError(null, config);
1503
- }
1504
- }
1505
- function dispatchRequest(config) {
1506
- throwIfCancellationRequested(config);
1507
- config.headers = AxiosHeaders$1.from(config.headers);
1508
- config.data = transformData.call(
1509
- config,
1510
- config.transformRequest
1511
- );
1512
- if (["post", "put", "patch"].indexOf(config.method) !== -1) {
1513
- config.headers.setContentType("application/x-www-form-urlencoded", false);
1514
- }
1515
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
1516
- return adapter(config).then(function onAdapterResolution(response) {
1517
- throwIfCancellationRequested(config);
1518
- response.data = transformData.call(
1519
- config,
1520
- config.transformResponse,
1521
- response
1522
- );
1523
- response.headers = AxiosHeaders$1.from(response.headers);
1524
- return response;
1525
- }, function onAdapterRejection(reason) {
1526
- if (!isCancel(reason)) {
1527
- throwIfCancellationRequested(config);
1528
- if (reason && reason.response) {
1529
- reason.response.data = transformData.call(
1530
- config,
1531
- config.transformResponse,
1532
- reason.response
1533
- );
1534
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
1535
- }
1536
- }
1537
- return Promise.reject(reason);
1538
- });
1539
- }
1540
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
1541
- function mergeConfig(config1, config2) {
1542
- config2 = config2 || {};
1543
- const config = {};
1544
- function getMergedValue(target, source, caseless) {
1545
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
1546
- return utils$1.merge.call({ caseless }, target, source);
1547
- } else if (utils$1.isPlainObject(source)) {
1548
- return utils$1.merge({}, source);
1549
- } else if (utils$1.isArray(source)) {
1550
- return source.slice();
1551
- }
1552
- return source;
1553
- }
1554
- function mergeDeepProperties(a, b, caseless) {
1555
- if (!utils$1.isUndefined(b)) {
1556
- return getMergedValue(a, b, caseless);
1557
- } else if (!utils$1.isUndefined(a)) {
1558
- return getMergedValue(void 0, a, caseless);
1559
- }
1560
- }
1561
- function valueFromConfig2(a, b) {
1562
- if (!utils$1.isUndefined(b)) {
1563
- return getMergedValue(void 0, b);
1564
- }
1565
- }
1566
- function defaultToConfig2(a, b) {
1567
- if (!utils$1.isUndefined(b)) {
1568
- return getMergedValue(void 0, b);
1569
- } else if (!utils$1.isUndefined(a)) {
1570
- return getMergedValue(void 0, a);
1571
- }
1572
- }
1573
- function mergeDirectKeys(a, b, prop) {
1574
- if (prop in config2) {
1575
- return getMergedValue(a, b);
1576
- } else if (prop in config1) {
1577
- return getMergedValue(void 0, a);
1578
- }
1579
- }
1580
- const mergeMap = {
1581
- url: valueFromConfig2,
1582
- method: valueFromConfig2,
1583
- data: valueFromConfig2,
1584
- baseURL: defaultToConfig2,
1585
- transformRequest: defaultToConfig2,
1586
- transformResponse: defaultToConfig2,
1587
- paramsSerializer: defaultToConfig2,
1588
- timeout: defaultToConfig2,
1589
- timeoutMessage: defaultToConfig2,
1590
- withCredentials: defaultToConfig2,
1591
- withXSRFToken: defaultToConfig2,
1592
- adapter: defaultToConfig2,
1593
- responseType: defaultToConfig2,
1594
- xsrfCookieName: defaultToConfig2,
1595
- xsrfHeaderName: defaultToConfig2,
1596
- onUploadProgress: defaultToConfig2,
1597
- onDownloadProgress: defaultToConfig2,
1598
- decompress: defaultToConfig2,
1599
- maxContentLength: defaultToConfig2,
1600
- maxBodyLength: defaultToConfig2,
1601
- beforeRedirect: defaultToConfig2,
1602
- transport: defaultToConfig2,
1603
- httpAgent: defaultToConfig2,
1604
- httpsAgent: defaultToConfig2,
1605
- cancelToken: defaultToConfig2,
1606
- socketPath: defaultToConfig2,
1607
- responseEncoding: defaultToConfig2,
1608
- validateStatus: mergeDirectKeys,
1609
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
1610
- };
1611
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
1612
- const merge2 = mergeMap[prop] || mergeDeepProperties;
1613
- const configValue = merge2(config1[prop], config2[prop], prop);
1614
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
1615
- });
1616
- return config;
1617
- }
1618
- const VERSION = "1.6.7";
1619
- const validators$1 = {};
1620
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
1621
- validators$1[type] = function validator2(thing) {
1622
- return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
1623
- };
1624
- });
1625
- const deprecatedWarnings = {};
1626
- validators$1.transitional = function transitional(validator2, version, message) {
1627
- function formatMessage(opt, desc) {
1628
- return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
1629
- }
1630
- return (value, opt, opts) => {
1631
- if (validator2 === false) {
1632
- throw new AxiosError(
1633
- formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
1634
- AxiosError.ERR_DEPRECATED
1635
- );
1636
- }
1637
- if (version && !deprecatedWarnings[opt]) {
1638
- deprecatedWarnings[opt] = true;
1639
- console.warn(
1640
- formatMessage(
1641
- opt,
1642
- " has been deprecated since v" + version + " and will be removed in the near future"
1643
- )
1644
- );
1645
- }
1646
- return validator2 ? validator2(value, opt, opts) : true;
1647
- };
1648
- };
1649
- function assertOptions(options, schema, allowUnknown) {
1650
- if (typeof options !== "object") {
1651
- throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
1652
- }
1653
- const keys = Object.keys(options);
1654
- let i = keys.length;
1655
- while (i-- > 0) {
1656
- const opt = keys[i];
1657
- const validator2 = schema[opt];
1658
- if (validator2) {
1659
- const value = options[opt];
1660
- const result = value === void 0 || validator2(value, opt, options);
1661
- if (result !== true) {
1662
- throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
1663
- }
1664
- continue;
1665
- }
1666
- if (allowUnknown !== true) {
1667
- throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
1668
- }
1669
- }
1670
- }
1671
- const validator = {
1672
- assertOptions,
1673
- validators: validators$1
1674
- };
1675
- const validators = validator.validators;
1676
- class Axios {
1677
- constructor(instanceConfig) {
1678
- this.defaults = instanceConfig;
1679
- this.interceptors = {
1680
- request: new InterceptorManager(),
1681
- response: new InterceptorManager()
1682
- };
1683
- }
1684
- /**
1685
- * Dispatch a request
1686
- *
1687
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1688
- * @param {?Object} config
1689
- *
1690
- * @returns {Promise} The Promise to be fulfilled
1691
- */
1692
- async request(configOrUrl, config) {
1693
- try {
1694
- return await this._request(configOrUrl, config);
1695
- } catch (err) {
1696
- if (err instanceof Error) {
1697
- let dummy;
1698
- Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
1699
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
1700
- if (!err.stack) {
1701
- err.stack = stack;
1702
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
1703
- err.stack += "\n" + stack;
1704
- }
1705
- }
1706
- throw err;
1707
- }
1708
- }
1709
- _request(configOrUrl, config) {
1710
- if (typeof configOrUrl === "string") {
1711
- config = config || {};
1712
- config.url = configOrUrl;
1713
- } else {
1714
- config = configOrUrl || {};
1715
- }
1716
- config = mergeConfig(this.defaults, config);
1717
- const { transitional, paramsSerializer, headers } = config;
1718
- if (transitional !== void 0) {
1719
- validator.assertOptions(transitional, {
1720
- silentJSONParsing: validators.transitional(validators.boolean),
1721
- forcedJSONParsing: validators.transitional(validators.boolean),
1722
- clarifyTimeoutError: validators.transitional(validators.boolean)
1723
- }, false);
1724
- }
1725
- if (paramsSerializer != null) {
1726
- if (utils$1.isFunction(paramsSerializer)) {
1727
- config.paramsSerializer = {
1728
- serialize: paramsSerializer
1729
- };
1730
- } else {
1731
- validator.assertOptions(paramsSerializer, {
1732
- encode: validators.function,
1733
- serialize: validators.function
1734
- }, true);
1735
- }
1736
- }
1737
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
1738
- let contextHeaders = headers && utils$1.merge(
1739
- headers.common,
1740
- headers[config.method]
1741
- );
1742
- headers && utils$1.forEach(
1743
- ["delete", "get", "head", "post", "put", "patch", "common"],
1744
- (method) => {
1745
- delete headers[method];
1746
- }
1747
- );
1748
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
1749
- const requestInterceptorChain = [];
1750
- let synchronousRequestInterceptors = true;
1751
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
1752
- if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
1753
- return;
1754
- }
1755
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
1756
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
1757
- });
1758
- const responseInterceptorChain = [];
1759
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
1760
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
1761
- });
1762
- let promise;
1763
- let i = 0;
1764
- let len;
1765
- if (!synchronousRequestInterceptors) {
1766
- const chain = [dispatchRequest.bind(this), void 0];
1767
- chain.unshift.apply(chain, requestInterceptorChain);
1768
- chain.push.apply(chain, responseInterceptorChain);
1769
- len = chain.length;
1770
- promise = Promise.resolve(config);
1771
- while (i < len) {
1772
- promise = promise.then(chain[i++], chain[i++]);
1773
- }
1774
- return promise;
1775
- }
1776
- len = requestInterceptorChain.length;
1777
- let newConfig = config;
1778
- i = 0;
1779
- while (i < len) {
1780
- const onFulfilled = requestInterceptorChain[i++];
1781
- const onRejected = requestInterceptorChain[i++];
1782
- try {
1783
- newConfig = onFulfilled(newConfig);
1784
- } catch (error) {
1785
- onRejected.call(this, error);
1786
- break;
1787
- }
1788
- }
1789
- try {
1790
- promise = dispatchRequest.call(this, newConfig);
1791
- } catch (error) {
1792
- return Promise.reject(error);
1793
- }
1794
- i = 0;
1795
- len = responseInterceptorChain.length;
1796
- while (i < len) {
1797
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
1798
- }
1799
- return promise;
1800
- }
1801
- getUri(config) {
1802
- config = mergeConfig(this.defaults, config);
1803
- const fullPath = buildFullPath(config.baseURL, config.url);
1804
- return buildURL(fullPath, config.params, config.paramsSerializer);
1805
- }
1806
- }
1807
- utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
1808
- Axios.prototype[method] = function(url, config) {
1809
- return this.request(mergeConfig(config || {}, {
1810
- method,
1811
- url,
1812
- data: (config || {}).data
1813
- }));
1814
- };
1815
- });
1816
- utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
1817
- function generateHTTPMethod(isForm) {
1818
- return function httpMethod(url, data, config) {
1819
- return this.request(mergeConfig(config || {}, {
1820
- method,
1821
- headers: isForm ? {
1822
- "Content-Type": "multipart/form-data"
1823
- } : {},
1824
- url,
1825
- data
1826
- }));
1827
- };
1828
- }
1829
- Axios.prototype[method] = generateHTTPMethod();
1830
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
1831
- });
1832
- const Axios$1 = Axios;
1833
- class CancelToken {
1834
- constructor(executor) {
1835
- if (typeof executor !== "function") {
1836
- throw new TypeError("executor must be a function.");
1837
- }
1838
- let resolvePromise;
1839
- this.promise = new Promise(function promiseExecutor(resolve) {
1840
- resolvePromise = resolve;
1841
- });
1842
- const token = this;
1843
- this.promise.then((cancel) => {
1844
- if (!token._listeners)
1845
- return;
1846
- let i = token._listeners.length;
1847
- while (i-- > 0) {
1848
- token._listeners[i](cancel);
1849
- }
1850
- token._listeners = null;
1851
- });
1852
- this.promise.then = (onfulfilled) => {
1853
- let _resolve;
1854
- const promise = new Promise((resolve) => {
1855
- token.subscribe(resolve);
1856
- _resolve = resolve;
1857
- }).then(onfulfilled);
1858
- promise.cancel = function reject() {
1859
- token.unsubscribe(_resolve);
1860
- };
1861
- return promise;
1862
- };
1863
- executor(function cancel(message, config, request) {
1864
- if (token.reason) {
1865
- return;
1866
- }
1867
- token.reason = new CanceledError(message, config, request);
1868
- resolvePromise(token.reason);
1869
- });
1870
- }
1871
- /**
1872
- * Throws a `CanceledError` if cancellation has been requested.
1873
- */
1874
- throwIfRequested() {
1875
- if (this.reason) {
1876
- throw this.reason;
1877
- }
1878
- }
1879
- /**
1880
- * Subscribe to the cancel signal
1881
- */
1882
- subscribe(listener) {
1883
- if (this.reason) {
1884
- listener(this.reason);
1885
- return;
1886
- }
1887
- if (this._listeners) {
1888
- this._listeners.push(listener);
1889
- } else {
1890
- this._listeners = [listener];
1891
- }
1892
- }
1893
- /**
1894
- * Unsubscribe from the cancel signal
1895
- */
1896
- unsubscribe(listener) {
1897
- if (!this._listeners) {
1898
- return;
1899
- }
1900
- const index = this._listeners.indexOf(listener);
1901
- if (index !== -1) {
1902
- this._listeners.splice(index, 1);
1903
- }
1904
- }
1905
- /**
1906
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1907
- * cancels the `CancelToken`.
1908
- */
1909
- static source() {
1910
- let cancel;
1911
- const token = new CancelToken(function executor(c) {
1912
- cancel = c;
1913
- });
1914
- return {
1915
- token,
1916
- cancel
1917
- };
1918
- }
1919
- }
1920
- const CancelToken$1 = CancelToken;
1921
- function spread(callback) {
1922
- return function wrap(arr) {
1923
- return callback.apply(null, arr);
1924
- };
1925
- }
1926
- function isAxiosError(payload) {
1927
- return utils$1.isObject(payload) && payload.isAxiosError === true;
1928
- }
1929
- const HttpStatusCode = {
1930
- Continue: 100,
1931
- SwitchingProtocols: 101,
1932
- Processing: 102,
1933
- EarlyHints: 103,
1934
- Ok: 200,
1935
- Created: 201,
1936
- Accepted: 202,
1937
- NonAuthoritativeInformation: 203,
1938
- NoContent: 204,
1939
- ResetContent: 205,
1940
- PartialContent: 206,
1941
- MultiStatus: 207,
1942
- AlreadyReported: 208,
1943
- ImUsed: 226,
1944
- MultipleChoices: 300,
1945
- MovedPermanently: 301,
1946
- Found: 302,
1947
- SeeOther: 303,
1948
- NotModified: 304,
1949
- UseProxy: 305,
1950
- Unused: 306,
1951
- TemporaryRedirect: 307,
1952
- PermanentRedirect: 308,
1953
- BadRequest: 400,
1954
- Unauthorized: 401,
1955
- PaymentRequired: 402,
1956
- Forbidden: 403,
1957
- NotFound: 404,
1958
- MethodNotAllowed: 405,
1959
- NotAcceptable: 406,
1960
- ProxyAuthenticationRequired: 407,
1961
- RequestTimeout: 408,
1962
- Conflict: 409,
1963
- Gone: 410,
1964
- LengthRequired: 411,
1965
- PreconditionFailed: 412,
1966
- PayloadTooLarge: 413,
1967
- UriTooLong: 414,
1968
- UnsupportedMediaType: 415,
1969
- RangeNotSatisfiable: 416,
1970
- ExpectationFailed: 417,
1971
- ImATeapot: 418,
1972
- MisdirectedRequest: 421,
1973
- UnprocessableEntity: 422,
1974
- Locked: 423,
1975
- FailedDependency: 424,
1976
- TooEarly: 425,
1977
- UpgradeRequired: 426,
1978
- PreconditionRequired: 428,
1979
- TooManyRequests: 429,
1980
- RequestHeaderFieldsTooLarge: 431,
1981
- UnavailableForLegalReasons: 451,
1982
- InternalServerError: 500,
1983
- NotImplemented: 501,
1984
- BadGateway: 502,
1985
- ServiceUnavailable: 503,
1986
- GatewayTimeout: 504,
1987
- HttpVersionNotSupported: 505,
1988
- VariantAlsoNegotiates: 506,
1989
- InsufficientStorage: 507,
1990
- LoopDetected: 508,
1991
- NotExtended: 510,
1992
- NetworkAuthenticationRequired: 511
1993
- };
1994
- Object.entries(HttpStatusCode).forEach(([key, value]) => {
1995
- HttpStatusCode[value] = key;
1996
- });
1997
- const HttpStatusCode$1 = HttpStatusCode;
1998
- function createInstance(defaultConfig) {
1999
- const context = new Axios$1(defaultConfig);
2000
- const instance = bind(Axios$1.prototype.request, context);
2001
- utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
2002
- utils$1.extend(instance, context, null, { allOwnKeys: true });
2003
- instance.create = function create(instanceConfig) {
2004
- return createInstance(mergeConfig(defaultConfig, instanceConfig));
2005
- };
2006
- return instance;
2007
- }
2008
- const axios = createInstance(defaults$1);
2009
- axios.Axios = Axios$1;
2010
- axios.CanceledError = CanceledError;
2011
- axios.CancelToken = CancelToken$1;
2012
- axios.isCancel = isCancel;
2013
- axios.VERSION = VERSION;
2014
- axios.toFormData = toFormData;
2015
- axios.AxiosError = AxiosError;
2016
- axios.Cancel = axios.CanceledError;
2017
- axios.all = function all(promises) {
2018
- return Promise.all(promises);
2019
- };
2020
- axios.spread = spread;
2021
- axios.isAxiosError = isAxiosError;
2022
- axios.mergeConfig = mergeConfig;
2023
- axios.AxiosHeaders = AxiosHeaders$1;
2024
- axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
2025
- axios.getAdapter = adapters.getAdapter;
2026
- axios.HttpStatusCode = HttpStatusCode$1;
2027
- axios.default = axios;
2028
- const ChatBotIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEA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r1GChLd3u9o3l7ar3fRFK6MsPXu13n32XIHQ8HdO2iL5aR1MS0AX7zxW/VQsxb+3tXCXdwjgUuJ1cAuUiDHVdzI1JTZmNVOFmbfOjh1U1vcR0w89lc3V9OCFbekm7gJWWbom23h4vWajkU4NWaVWZnGo3bYVeNkvnKzMPeuYamVbX1fMfnePb+x2owCmGDRwWVYJAxINUJ2holLTDWAtj2QXesED7r0+uomOFzvYnbY3LDMrIMltw1JtcbavbYrx4vCyMLNcIMG+mEc0AuLkByjlkvDzwn42YIxghm/M2DsoMcYQmNQyIugi6YynMWy3OXwgBPLdbvTA7YmFhqcLFNtd0Mpfr8Hj/tdq4FN9xWkHmkvz7RDl7yP/1CdqGW83dgwWE/FPzZO2E9Bazl5kR3dMj9yBr21Fctofh9/X/vIiNS6jvqMGI7jQMWpC436CFQBqFAFoEIVgIpTEv8PTBPiNKVw25gAAAAASUVORK5CYII=";
2029
- function ye(t) {
2030
- return t == null ? true : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : false;
2031
- }
2032
- function Be(t) {
2033
- return t !== null && typeof t == "object" && !Array.isArray(t);
2034
- }
2035
- function ke(t = {}, o = {}) {
2036
- const e = {};
2037
- for (const n in t)
2038
- e[n] = t[n];
2039
- for (const n in o) {
2040
- const l = t[n], s = o[n];
2041
- if (Be(l) && Be(s)) {
2042
- e[n] = ke(
2043
- l,
2044
- s
2045
- );
2046
- continue;
2047
- }
2048
- e[n] = s;
2049
- }
2050
- return e;
2051
- }
2052
- const we = "q-defaults";
2053
- function Ye() {
2054
- var s, r;
2055
- const t = vue.getCurrentInstance();
2056
- if (!t)
2057
- throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
2058
- const o = t.type.name ?? t.type.__name;
2059
- if (!o)
2060
- throw new Error("[Quidgest UI] Could not determine component name");
2061
- const e = Oe(), n = (s = e.value) == null ? void 0 : s.Global, l = (r = e.value) == null ? void 0 : r[o];
2062
- return vue.computed(() => ke(n, l));
2063
- }
2064
- function Me(t) {
2065
- if (ye(t))
2066
- return;
2067
- const o = Oe(), e = vue.ref(t), n = vue.computed(() => ye(e.value) ? o.value : ke(o.value, e.value));
2068
- vue.provide(we, n);
2069
- }
2070
- function Oe() {
2071
- const t = vue.inject(we, void 0);
2072
- if (!t)
2073
- throw new Error("[Quidgest UI] Could not find defaults instance");
2074
- return t;
2075
- }
2076
- function Fe(t) {
2077
- return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([A-Za-z])/g, "$1-$2").replace(/([A-Za-z])([0-9])/g, "$1-$2").toLowerCase();
2078
- }
2079
- const at = /* @__PURE__ */ vue.createElementVNode("svg", { viewBox: "25 25 50 50" }, [
2080
- /* @__PURE__ */ vue.createElementVNode("circle", {
2081
- class: "path",
2082
- cx: "50",
2083
- cy: "50",
2084
- r: "20",
2085
- fill: "none",
2086
- stroke: "currentColor",
2087
- "stroke-width": "5",
2088
- "stroke-miterlimit": "10"
2089
- })
2090
- ], -1), st = [
2091
- at
2092
- ], it = /* @__PURE__ */ vue.defineComponent({
2093
- __name: "QSpinnerLoader",
2094
- props: {
2095
- size: { default: 48 },
2096
- class: { default: void 0 }
2097
- },
2098
- setup(t) {
2099
- const o = t, e = vue.computed(() => ({
2100
- "font-size": o.size !== 48 ? `${o.size}px` : void 0
2101
- }));
2102
- return (n, l) => (vue.openBlock(), vue.createElementBlock("div", {
2103
- class: vue.normalizeClass(["q-spinner-loader", o.class]),
2104
- style: vue.normalizeStyle(e.value)
2105
- }, st, 6));
2106
- }
2107
- });
2108
- function rt(t, o) {
2109
- var n;
2110
- const e = Fe(o);
2111
- return e ? typeof ((n = t.props) == null ? void 0 : n[e]) < "u" : false;
2112
- }
2113
- function S(t) {
2114
- const o = t.setup;
2115
- return o && (t.setup = (e, n) => {
2116
- const l = Ye();
2117
- if (ye(l.value))
2118
- return o(e, n);
2119
- const s = vue.getCurrentInstance();
2120
- if (s === null)
2121
- return o(e, n);
2122
- const r = new Proxy(e, {
2123
- get(i, f) {
2124
- var y;
2125
- const L = Reflect.get(i, f), _ = (y = l.value) == null ? void 0 : y[f];
2126
- return typeof f == "string" && !rt(s.vnode, f) ? _ ?? L : L;
2127
- }
2128
- });
2129
- return o(r, n);
2130
- }), t;
2131
- }
2132
- const $e = S(it), dt = ["disabled"], ut = {
2133
- key: 0,
2134
- class: "q-btn__spinner"
2135
- }, ct = { class: "q-btn__content" }, ft = /* @__PURE__ */ vue.defineComponent({
2136
- __name: "QButton",
2137
- props: {
2138
- active: { type: Boolean },
2139
- bStyle: { default: "secondary" },
2140
- label: { default: "" },
2141
- disabled: { type: Boolean },
2142
- iconOnRight: { type: Boolean },
2143
- borderless: { type: Boolean },
2144
- elevated: { type: Boolean },
2145
- block: { type: Boolean },
2146
- loading: { type: Boolean },
2147
- size: { default: "regular" },
2148
- class: { default: void 0 }
2149
- },
2150
- emits: ["click"],
2151
- setup(t, { emit: o }) {
2152
- const e = t, n = o, l = vue.computed(() => e.disabled || e.loading);
2153
- function s(i) {
2154
- l.value || n("click", i);
2155
- }
2156
- const r = vue.computed(() => {
2157
- const i = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
2158
- return [
2159
- "q-btn",
2160
- `q-btn--${e.bStyle}`,
2161
- i,
2162
- {
2163
- "q-btn--active": e.active,
2164
- "q-btn--borderless": e.borderless,
2165
- "q-btn--elevated": e.elevated,
2166
- "q-btn--block": e.block,
2167
- "q-btn--loading": e.loading
2168
- },
2169
- e.class
2170
- ];
2171
- });
2172
- return (i, f) => (vue.openBlock(), vue.createElementBlock("button", {
2173
- type: "button",
2174
- class: vue.normalizeClass(r.value),
2175
- disabled: l.value,
2176
- onClick: vue.withModifiers(s, ["stop", "prevent"])
2177
- }, [
2178
- i.loading ? (vue.openBlock(), vue.createElementBlock("div", ut, [
2179
- vue.createVNode(vue.unref($e), { size: 20 })
2180
- ])) : vue.createCommentVNode("", true),
2181
- vue.createElementVNode("span", ct, [
2182
- i.iconOnRight ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
2183
- vue.createTextVNode(vue.toDisplayString(e.label), 1)
2184
- ], 64)) : vue.createCommentVNode("", true),
2185
- vue.renderSlot(i.$slots, "default"),
2186
- i.iconOnRight ? vue.createCommentVNode("", true) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
2187
- vue.createTextVNode(vue.toDisplayString(e.label), 1)
2188
- ], 64))
2189
- ])
2190
- ], 10, dt));
2191
- }
2192
- }), fe = S(ft), pt = /* @__PURE__ */ vue.defineComponent({
2193
- __name: "QButtonGroup",
2194
- props: {
2195
- disabled: { type: Boolean },
2196
- borderless: { type: Boolean },
2197
- elevated: { type: Boolean },
2198
- class: { default: void 0 }
2199
- },
2200
- setup(t) {
2201
- const o = t;
2202
- return Me({
2203
- QButton: {
2204
- bStyle: "secondary",
2205
- disabled: vue.toRef(o, "disabled"),
2206
- borderless: vue.toRef(o, "borderless"),
2207
- elevated: false
2208
- }
2209
- }), (e, n) => (vue.openBlock(), vue.createElementBlock("div", {
2210
- class: vue.normalizeClass([
2211
- "q-btn-group",
2212
- {
2213
- "q-btn-group--elevated": o.elevated
2214
- },
2215
- o.class
2216
- ])
2217
- }, [
2218
- vue.renderSlot(e.$slots, "default")
2219
- ], 2));
2220
- }
2221
- }), mt = S(pt), vt = /* @__PURE__ */ vue.defineComponent({
2222
- __name: "QButtonToggle",
2223
- props: /* @__PURE__ */ vue.mergeModels({
2224
- options: {},
2225
- disabled: { type: Boolean },
2226
- borderless: { type: Boolean },
2227
- elevated: { type: Boolean },
2228
- required: { type: Boolean },
2229
- class: {}
2230
- }, {
2231
- modelValue: {},
2232
- modelModifiers: {}
2233
- }),
2234
- emits: ["update:modelValue"],
2235
- setup(t) {
2236
- const o = t, e = vue.useModel(t, "modelValue");
2237
- function n(l) {
2238
- e.value === l.key && !o.required ? e.value = void 0 : e.value = l.key;
2239
- }
2240
- return (l, s) => (vue.openBlock(), vue.createBlock(vue.unref(mt), {
2241
- "b-style": "secondary",
2242
- class: vue.normalizeClass(o.class),
2243
- disabled: o.disabled,
2244
- borderless: o.borderless,
2245
- elevated: o.elevated
2246
- }, {
2247
- default: vue.withCtx(() => [
2248
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(o.options, (r) => (vue.openBlock(), vue.createBlock(vue.unref(fe), {
2249
- key: r.key,
2250
- title: r.title,
2251
- label: r.label,
2252
- active: e.value === r.key,
2253
- onClick: () => n(r)
2254
- }, {
2255
- default: vue.withCtx(() => [
2256
- vue.renderSlot(l.$slots, r.key)
2257
- ]),
2258
- _: 2
2259
- }, 1032, ["title", "label", "active", "onClick"]))), 128))
2260
- ]),
2261
- _: 3
2262
- }, 8, ["class", "disabled", "borderless", "elevated"]));
2263
- }
2264
- });
2265
- S(vt);
2266
- const ht = /* @__PURE__ */ vue.defineComponent({
2267
- __name: "QIcon",
2268
- props: {
2269
- icon: {},
2270
- type: { default: "svg" },
2271
- size: { default: void 0 },
2272
- class: { default: void 0 }
2273
- },
2274
- setup(t) {
2275
- const o = t, e = vue.computed(() => {
2276
- switch (o.type) {
2277
- case "svg":
2278
- return It;
2279
- case "font":
2280
- return qt;
2281
- case "img":
2282
- return Lt;
2283
- default:
2284
- return;
2285
- }
2286
- });
2287
- return (n, l) => (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(e.value), {
2288
- class: vue.normalizeClass(o.class),
2289
- icon: o.icon,
2290
- size: o.size
2291
- }, null, 8, ["class", "icon", "size"]));
2292
- }
2293
- }), bt = /* @__PURE__ */ vue.defineComponent({
2294
- __name: "QIconFont",
2295
- props: {
2296
- icon: {},
2297
- library: { default: "" },
2298
- variant: { default: "" },
2299
- size: { default: void 0 },
2300
- class: { default: void 0 }
2301
- },
2302
- setup(t) {
2303
- const o = t, e = vue.computed(() => o.variant ? `${o.library}-${o.variant}` : o.library), n = vue.computed(() => o.library && o.icon ? `${o.library}-${o.icon}` : o.icon), l = vue.computed(() => ({
2304
- "font-size": o.size !== void 0 ? `${o.size}px` : void 0
2305
- }));
2306
- return (s, r) => (vue.openBlock(), vue.createElementBlock("i", {
2307
- class: vue.normalizeClass(["q-icon", "q-icon__font", e.value, n.value, o.class]),
2308
- style: vue.normalizeStyle(l.value)
2309
- }, null, 6));
2310
- }
2311
- }), yt = ["src"], gt = /* @__PURE__ */ vue.defineComponent({
2312
- __name: "QIconImg",
2313
- props: {
2314
- icon: {},
2315
- size: {},
2316
- class: {}
2317
- },
2318
- setup(t) {
2319
- const o = t, e = vue.computed(() => ({
2320
- "font-size": o.size !== void 0 ? `${o.size}px` : void 0
2321
- }));
2322
- return (n, l) => (vue.openBlock(), vue.createElementBlock("img", {
2323
- src: o.icon,
2324
- class: vue.normalizeClass(["q-icon", "q-icon__img", o.class]),
2325
- style: vue.normalizeStyle(e.value)
2326
- }, null, 14, yt));
2327
- }
2328
- }), re = {}, _t = vue.defineComponent({
2329
- name: "InlineSvg",
2330
- emits: {
2331
- loaded: (t) => typeof t == "object",
2332
- unloaded: () => true,
2333
- error: (t) => typeof t == "object"
2334
- },
2335
- inheritAttrs: false,
2336
- render() {
2337
- if (!this.svgElSource)
2338
- return null;
2339
- const t = this.getSvgContent(this.svgElSource);
2340
- if (!t)
2341
- return vue.h("div", this.$attrs);
2342
- const o = {};
2343
- return this.copySvgAttrs(o, this.svgElSource), this.copySvgAttrs(o, t), this.copyComponentAttrs(o, this.$attrs), o.innerHTML = t.innerHTML, vue.h("svg", o);
2344
- },
2345
- props: {
2346
- /**
2347
- * The source URL of the SVG bundle.
2348
- */
2349
- src: {
2350
- type: String,
2351
- required: true
2352
- },
2353
- /**
2354
- * The ID of the SVG symbol to be rendered.
2355
- */
2356
- symbol: {
2357
- type: String,
2358
- default: ""
2359
- },
2360
- /**
2361
- * The title to be associated with the SVG.
2362
- */
2363
- title: {
2364
- type: String,
2365
- default: ""
2366
- },
2367
- /**
2368
- * A function to transform the source SVG element before rendering.
2369
- * If not provided, no transformation will be applied.
2370
- */
2371
- transformSource: {
2372
- type: Function,
2373
- default: void 0
2374
- },
2375
- /**
2376
- * Determines whether to keep the existing SVG content visible during the loading of a new SVG.
2377
- * Set to `false` to hide content during loading.
2378
- */
2379
- keepDuringLoading: {
2380
- type: Boolean,
2381
- default: true
2382
- }
2383
- },
2384
- data() {
2385
- return {
2386
- /** @type SVGElement */
2387
- svgElSource: null
2388
- };
2389
- },
2390
- async mounted() {
2391
- await this.getSource(this.src);
2392
- },
2393
- methods: {
2394
- copySvgAttrs(t, o) {
2395
- const e = o.attributes;
2396
- if (e)
2397
- for (const n of e)
2398
- t[n.name] = n.value;
2399
- },
2400
- copyComponentAttrs(t, o) {
2401
- for (const [e, n] of Object.entries(o))
2402
- n !== false && n !== null && n !== void 0 && (t[e] = n);
2403
- },
2404
- getSvgContent(t) {
2405
- return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(true), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(true)), kt(t, this.title)), t);
2406
- },
2407
- /**
2408
- * Get svgElSource
2409
- * @param {string} src
2410
- */
2411
- async getSource(t) {
2412
- try {
2413
- re[t] || (re[t] = wt(this.download(t))), this.svgElSource && re[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
2414
- const o = await re[t];
2415
- this.svgElSource = o, await this.$nextTick(), this.$emit("loaded", this.$el);
2416
- } catch (o) {
2417
- this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete re[t], this.$emit("error", o);
2418
- }
2419
- },
2420
- /**
2421
- * Get the contents of the SVG
2422
- * @param {string} url
2423
- * @returns {PromiseWithState<Element>}
2424
- */
2425
- async download(t) {
2426
- const o = await fetch(t);
2427
- if (!o.ok)
2428
- throw new Error("Error loading SVG");
2429
- const e = await o.text(), s = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
2430
- if (!s)
2431
- throw new Error("Loaded file is not a valid SVG");
2432
- return s;
2433
- }
2434
- },
2435
- watch: {
2436
- src(t) {
2437
- this.getSource(t);
2438
- }
2439
- },
2440
- expose: []
2441
- });
2442
- function kt(t, o) {
2443
- const e = t.getElementsByTagName("title");
2444
- if (e.length)
2445
- e[0].textContent = o;
2446
- else {
2447
- const n = document.createElementNS("http://www.w3.org/2000/svg", "title");
2448
- n.textContent = o, t.insertBefore(n, t.firstChild);
2449
- }
2450
- }
2451
- function wt(t) {
2452
- if (t.getIsPending)
2453
- return t;
2454
- let o = true;
2455
- const e = t.then(
2456
- (n) => (o = false, n),
2457
- (n) => {
2458
- throw o = false, n;
2459
- }
2460
- );
2461
- return e.getIsPending = () => o, e;
2462
- }
2463
- const $t = /* @__PURE__ */ vue.defineComponent({
2464
- __name: "QIconSvg",
2465
- props: {
2466
- icon: {},
2467
- bundle: { default: "" },
2468
- size: { default: void 0 },
2469
- class: { default: void 0 }
2470
- },
2471
- emits: ["loaded", "unloaded"],
2472
- setup(t, { emit: o }) {
2473
- const e = t, n = o, l = vue.computed(() => ({
2474
- "font-size": e.size !== void 0 ? `${e.size}px` : void 0
2475
- }));
2476
- function s(i) {
2477
- n("loaded", i);
2478
- }
2479
- function r() {
2480
- n("unloaded");
2481
- }
2482
- return (i, f) => (vue.openBlock(), vue.createBlock(vue.unref(_t), {
2483
- class: vue.normalizeClass(["q-icon", "q-icon__svg", e.class]),
2484
- src: e.bundle,
2485
- symbol: e.icon,
2486
- style: vue.normalizeStyle(l.value),
2487
- onLoaded: s,
2488
- onUnloaded: r
2489
- }, null, 8, ["class", "src", "symbol", "style"]));
2490
- }
2491
- }), ee = S(ht), qt = S(bt), Lt = S(gt), It = S($t), xt = /* @__PURE__ */ vue.defineComponent({
2492
- __name: "QList",
2493
- props: /* @__PURE__ */ vue.mergeModels({
2494
- highlighted: { type: [String, Number, Boolean, Symbol], default: void 0 },
2495
- items: {},
2496
- groups: { default: () => [] },
2497
- itemValue: { default: "key" },
2498
- itemLabel: { default: "label" },
2499
- disabled: { type: Boolean },
2500
- class: { default: void 0 }
2501
- }, {
2502
- modelValue: {
2503
- type: [String, Number, Boolean, Symbol]
2504
- },
2505
- modelModifiers: {}
2506
- }),
2507
- emits: ["update:modelValue"],
2508
- setup(t, { expose: o }) {
2509
- const e = t, n = vue.useModel(t, "modelValue"), l = vue.ref(false), s = vue.computed(() => r.value.length > 1 ? "div" : "ul"), r = vue.computed(() => e.groups.length ? e.groups.filter(
2510
- (c) => e.items.some((b) => b.group === c.id)
2511
- ) : [{ id: "", title: "" }]), i = vue.ref(null);
2512
- function f(c) {
2513
- n.value = c;
2514
- }
2515
- function L() {
2516
- l.value = true;
2517
- }
2518
- function _() {
2519
- l.value = false;
2520
- }
2521
- function y(c) {
2522
- var d;
2523
- if ((d = i.value) != null && d.contains(c.relatedTarget))
2524
- return;
2525
- let b;
2526
- n.value ? b = e.items.findIndex(($) => $[e.itemValue] === n.value) : b = j();
2527
- const q = l.value;
2528
- C(b, q);
2529
- }
2530
- function U(c) {
2531
- switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(c.key) && c.preventDefault(), c.key) {
2532
- case "ArrowDown":
2533
- z("next");
2534
- break;
2535
- case "ArrowUp":
2536
- z("prev");
2537
- break;
2538
- case "Home":
2539
- z("first");
2540
- break;
2541
- case "End":
2542
- z("last");
2543
- break;
2544
- }
2545
- }
2546
- function z(c) {
2547
- switch (c) {
2548
- case "next":
2549
- case "prev":
2550
- C(X(c));
2551
- break;
2552
- case "first":
2553
- C(j());
2554
- break;
2555
- case "last":
2556
- C(A());
2557
- break;
2558
- }
2559
- }
2560
- function C(c, b = false) {
2561
- var d;
2562
- (d = V()[c]) == null || d.focus({ preventScroll: b });
2563
- }
2564
- function V() {
2565
- var b;
2566
- const c = (b = i.value) == null ? void 0 : b.querySelectorAll("li");
2567
- return c ? Array.from(c) : [];
2568
- }
2569
- function W(c) {
2570
- return V()[c];
2571
- }
2572
- function le() {
2573
- return V().indexOf(document.activeElement);
2574
- }
2575
- function j() {
2576
- const c = V(), b = c.find((q) => P(q));
2577
- return b ? c.indexOf(b) : -1;
2578
- }
2579
- function A() {
2580
- const c = V(), b = [...c].reverse().find((q) => P(q));
2581
- return b ? c.indexOf(b) : -1;
2582
- }
2583
- function Q(c, b, q) {
2584
- return b === "prev" && c === 0 || b === "next" && c === q.length - 1;
2585
- }
2586
- function X(c) {
2587
- const b = le();
2588
- return N(b, c);
2589
- }
2590
- function N(c, b) {
2591
- const q = V();
2592
- if (Q(c, b, q))
2593
- return c;
2594
- let d = c + (b === "next" ? 1 : -1);
2595
- for (; !P(q[d]); ) {
2596
- if (Q(d, b, q))
2597
- return c;
2598
- d += b === "next" ? 1 : -1;
2599
- }
2600
- return d;
2601
- }
2602
- function P(c) {
2603
- return c.tabIndex === -2;
2604
- }
2605
- function ae(c) {
2606
- return c ? e.items.filter((b) => b.group === c) : e.items;
2607
- }
2608
- return o({
2609
- focusItem: C,
2610
- getItem: W,
2611
- getAdjacentItemIndex: N,
2612
- getFirstFocusableItemIndex: j,
2613
- getLastFocusableItemIndex: A
2614
- }), (c, b) => (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(s.value), {
2615
- ref_key: "listRef",
2616
- ref: i,
2617
- class: vue.normalizeClass(["q-list", { "q-list--disabled": e.disabled }, e.class]),
2618
- role: "listbox",
2619
- tabindex: e.disabled ? -1 : 0,
2620
- onFocus: y,
2621
- onMousedown: L,
2622
- onMouseup: _,
2623
- onKeydown: U
2624
- }, {
2625
- default: vue.withCtx(() => [
2626
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(r.value, (q) => (vue.openBlock(), vue.createBlock(vue.unref(Qt), {
2627
- key: q.id,
2628
- title: r.value.length === 1 ? void 0 : q.title,
2629
- disabled: q.disabled
2630
- }, {
2631
- default: vue.withCtx(() => [
2632
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(ae(q.id), (d) => (vue.openBlock(), vue.createBlock(vue.unref(At), {
2633
- key: d[e.itemValue],
2634
- value: d[e.itemValue],
2635
- label: d[e.itemLabel],
2636
- icon: d.icon,
2637
- disabled: e.disabled || d.disabled,
2638
- highlighted: e.highlighted === d[e.itemValue],
2639
- selected: n.value === d[e.itemValue],
2640
- onSelect: f
2641
- }, {
2642
- default: vue.withCtx(() => [
2643
- vue.renderSlot(c.$slots, "item", { item: d })
2644
- ]),
2645
- _: 2
2646
- }, 1032, ["value", "label", "icon", "disabled", "highlighted", "selected"]))), 128))
2647
- ]),
2648
- _: 2
2649
- }, 1032, ["title", "disabled"]))), 128))
2650
- ]),
2651
- _: 3
2652
- }, 40, ["class", "tabindex"]));
2653
- }
2654
- });
2655
- let Bt = 0;
2656
- function me(t) {
2657
- return t || `uid-${++Bt}`;
2658
- }
2659
- const St = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Vt = { class: "q-list-item__check-container" }, Et = {
2660
- check: {
2661
- icon: "check"
2662
- }
2663
- }, Tt = /* @__PURE__ */ vue.defineComponent({
2664
- __name: "QListItem",
2665
- props: {
2666
- value: { type: [String, Number, Boolean, Symbol] },
2667
- label: {},
2668
- icon: { default: void 0 },
2669
- selected: { type: Boolean },
2670
- highlighted: { type: Boolean },
2671
- icons: { default: () => Et },
2672
- disabled: { type: Boolean }
2673
- },
2674
- emits: ["select"],
2675
- setup(t, { emit: o }) {
2676
- const e = t, n = o, l = me();
2677
- function s() {
2678
- e.disabled || n("select", e.value);
2679
- }
2680
- function r(i) {
2681
- i.key === "Tab" && s(), (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.stopPropagation(), s());
2682
- }
2683
- return (i, f) => (vue.openBlock(), vue.createElementBlock("li", {
2684
- id: vue.unref(l),
2685
- "data-key": e.value,
2686
- role: "option",
2687
- tabindex: e.disabled ? void 0 : -2,
2688
- class: vue.normalizeClass([
2689
- "q-list-item",
2690
- {
2691
- "q-list-item--disabled": e.disabled,
2692
- "q-list-item--selected": e.selected,
2693
- "q-list-item--highlighted": e.highlighted
2694
- }
2695
- ]),
2696
- "aria-label": e.label,
2697
- "aria-selected": e.disabled ? void 0 : e.selected,
2698
- onKeydown: r,
2699
- onClick: vue.withModifiers(s, ["stop", "prevent"])
2700
- }, [
2701
- vue.renderSlot(i.$slots, "default", {}, () => [
2702
- e.icon ? (vue.openBlock(), vue.createBlock(vue.unref(ee), vue.normalizeProps(vue.mergeProps({ key: 0 }, e.icon)), null, 16)) : vue.createCommentVNode("", true),
2703
- vue.createTextVNode(" " + vue.toDisplayString(e.label), 1)
2704
- ]),
2705
- vue.createElementVNode("div", Vt, [
2706
- e.selected ? (vue.openBlock(), vue.createBlock(vue.unref(ee), vue.mergeProps({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : vue.createCommentVNode("", true)
2707
- ])
2708
- ], 42, St));
2709
- }
2710
- }), Dt = ["aria-labelledby"], zt = ["id"], Ct = /* @__PURE__ */ vue.defineComponent({
2711
- __name: "QListItemGroup",
2712
- props: {
2713
- title: { default: "" },
2714
- disabled: { type: Boolean }
2715
- },
2716
- setup(t) {
2717
- const o = t, e = me();
2718
- return (n, l) => (vue.openBlock(), vue.createElementBlock("ul", {
2719
- class: "q-list-item-group",
2720
- role: "group",
2721
- "aria-labelledby": o.title ? vue.unref(e) : void 0
2722
- }, [
2723
- o.title ? (vue.openBlock(), vue.createElementBlock("li", {
2724
- key: 0,
2725
- id: vue.unref(e),
2726
- class: "q-list-item-group__title",
2727
- role: "presentation"
2728
- }, vue.toDisplayString(o.title), 9, zt)) : vue.createCommentVNode("", true),
2729
- vue.renderSlot(n.$slots, "default")
2730
- ], 8, Dt));
2731
- }
2732
- }), Re = S(xt), At = S(Tt), Qt = S(Ct);
2733
- function Mt(t, o, e = "right", n) {
2734
- const l = t.getBoundingClientRect(), s = l.x + window.scrollX, r = l.y + window.scrollY, i = o == null ? void 0 : o.getBoundingClientRect(), f = (i == null ? void 0 : i.width) ?? 0, L = (i == null ? void 0 : i.height) ?? 0;
2735
- let _ = e;
2736
- i && ge(l, i, _) !== 0 && (_ = Ot(l, i, _));
2737
- const y = { x: 0, y: 0, placement: _ };
2738
- switch (_) {
2739
- case "top":
2740
- n === "anchor" ? y.x = s : y.x = s + (l.width - f) / 2, y.y = r - L;
2741
- break;
2742
- case "bottom":
2743
- n === "anchor" ? y.x = s : y.x = s + (l.width - f) / 2, y.y = r + l.height;
2744
- break;
2745
- case "left":
2746
- y.x = s - f, y.y = r + l.height / 2 - L / 2;
2747
- break;
2748
- case "right":
2749
- y.x = s + l.width, y.y = r + l.height / 2 - L / 2;
2750
- break;
2751
- }
2752
- return y.x = Math.max(0, y.x), y.y = Math.max(0, y.y), n === "anchor" && l.width >= f && (y.width = l.width), y;
2753
- }
2754
- function ge(t, o, e) {
2755
- let n = 0, l = 0;
2756
- switch (e) {
2757
- case "top":
2758
- n = Te(t, o), l = t.top - o.height;
2759
- break;
2760
- case "bottom":
2761
- n = Te(t, o), l = window.innerHeight - t.top - t.height - o.height;
2762
- break;
2763
- case "left":
2764
- n = t.left - o.width, l = Ee(t, o);
2765
- break;
2766
- case "right":
2767
- n = window.innerWidth - t.left - t.width - o.width, l = Ee(t, o);
2768
- break;
2769
- }
2770
- return Math.min(0, Math.min(n, l));
2771
- }
2772
- function Ee(t, o) {
2773
- return Math.min(
2774
- window.innerHeight - t.top - t.height / 2 - o.height / 2,
2775
- t.top + t.height / 2 - o.height / 2
2776
- );
2777
- }
2778
- function Te(t, o) {
2779
- return Math.min(
2780
- window.innerWidth - t.left - t.width / 2 - o.width / 2,
2781
- t.left + t.width / 2 - o.width / 2
2782
- );
2783
- }
2784
- function Ot(t, o, e) {
2785
- const n = {
2786
- top: ["bottom", "left", "right"],
2787
- bottom: ["top", "left", "right"],
2788
- left: ["right", "top", "bottom"],
2789
- right: ["left", "top", "bottom"]
2790
- };
2791
- let l = e, s = ge(t, o, e);
2792
- for (const r of n[e]) {
2793
- const i = ge(t, o, r);
2794
- i > s && (s = i, l = r);
2795
- }
2796
- return l;
2797
- }
2798
- function Ft(t) {
2799
- return typeof t == "string" ? document.querySelector(t) : t;
2800
- }
2801
- const Rt = ["role"], Ut = {
2802
- key: 0,
2803
- role: "presentation",
2804
- class: "q-overlay__arrow"
2805
- }, Nt = /* @__PURE__ */ vue.defineComponent({
2806
- inheritAttrs: false,
2807
- __name: "QOverlay",
2808
- props: /* @__PURE__ */ vue.mergeModels({
2809
- anchor: { default: void 0 },
2810
- appearance: { default: "regular" },
2811
- arrow: { type: Boolean },
2812
- attach: { default: "body" },
2813
- backdropBlur: { type: Boolean },
2814
- delay: { default: 500 },
2815
- scrollLock: { type: Boolean },
2816
- offset: { default: 8 },
2817
- persistent: { type: Boolean },
2818
- placement: { default: "right" },
2819
- spy: { type: Boolean },
2820
- transition: { default: "fade" },
2821
- trigger: { default: "click" },
2822
- width: { default: "auto" },
2823
- class: { default: void 0 }
2824
- }, {
2825
- modelValue: { type: Boolean },
2826
- modelModifiers: {}
2827
- }),
2828
- emits: /* @__PURE__ */ vue.mergeModels(["enter", "leave"], ["update:modelValue"]),
2829
- setup(t, { emit: o }) {
2830
- const e = t, n = o, l = vue.useModel(t, "modelValue"), s = vue.computed(() => [
2831
- "q-overlay",
2832
- `q-overlay--${i.placement}`,
2833
- {
2834
- "q-overlay--independent": e.anchor === void 0,
2835
- "q-overlay--inverted": e.appearance === "inverted"
2836
- },
2837
- e.class
2838
- ]), r = vue.computed(
2839
- () => (l.value || i.animating) && (e.anchor === void 0 || e.trigger === "click")
2840
- ), i = vue.reactive({
2841
- animating: false,
2842
- top: 0,
2843
- left: 0,
2844
- width: 0,
2845
- placement: e.placement
2846
- });
2847
- vue.watch(l, () => i.animating = true);
2848
- const f = vue.computed(() => {
2849
- if (e.anchor === void 0)
2850
- return;
2851
- const p = ["top", "bottom"].includes(i.placement) ? i.width : void 0;
2852
- return {
2853
- top: `${i.top}px`,
2854
- left: `${i.left}px`,
2855
- width: p !== void 0 ? `${p}px` : void 0
2856
- };
2857
- }), L = vue.ref(null);
2858
- function _() {
2859
- const p = A();
2860
- if (!p)
2861
- return;
2862
- const M = Mt(p, L.value, e.placement, e.width);
2863
- let R = 0, oe = 0;
2864
- switch (M.placement) {
2865
- case "top":
2866
- oe = -(e.offset || 0);
2867
- break;
2868
- case "bottom":
2869
- oe = e.offset || 0;
2870
- break;
2871
- case "left":
2872
- R = -(e.offset || 0);
2873
- break;
2874
- case "right":
2875
- R = e.offset || 0;
2876
- break;
2877
- }
2878
- i.left = M.x + R, i.top = M.y + oe, i.width = M.width, i.placement = M.placement;
2879
- }
2880
- vue.watch([l, () => e.placement], _);
2881
- let y;
2882
- function U() {
2883
- C(0);
2884
- }
2885
- function z() {
2886
- C(e.delay);
2887
- }
2888
- function C(p) {
2889
- y || (y = window.setTimeout(() => {
2890
- l.value = true;
2891
- }, p));
2892
- }
2893
- function V() {
2894
- clearTimeout(y), y = void 0, l.value = false, vue.nextTick(() => {
2895
- if (e.anchor && e.trigger === "click") {
2896
- const p = A();
2897
- p == null || p.focus();
2898
- }
2899
- });
2900
- }
2901
- let W;
2902
- function le() {
2903
- n("enter");
2904
- }
2905
- function j() {
2906
- window.clearTimeout(W), W = window.setTimeout(() => i.animating = false, 200), n("leave");
2907
- }
2908
- function A() {
2909
- return e.anchor ? Ft(e.anchor) : null;
2910
- }
2911
- let Q;
2912
- function X() {
2913
- vue.nextTick(() => {
2914
- const p = A();
2915
- if (p)
2916
- switch (Q = new MutationObserver(_), Q.observe(p, {
2917
- attributes: false,
2918
- childList: true,
2919
- characterData: true,
2920
- subtree: true
2921
- }), e.trigger) {
2922
- case "click":
2923
- p.addEventListener("click", U);
2924
- break;
2925
- case "hover":
2926
- p.addEventListener("mouseenter", z), p.addEventListener("mouseleave", V), p.addEventListener("focusin", U), p.addEventListener("focusout", V);
2927
- break;
2928
- }
2929
- });
2930
- }
2931
- function N() {
2932
- const p = A();
2933
- if (p)
2934
- switch (Q == null || Q.disconnect(), e.trigger) {
2935
- case "click":
2936
- p.removeEventListener("click", U);
2937
- break;
2938
- case "hover":
2939
- p.removeEventListener("mouseenter", z), p.removeEventListener("mouseleave", V), p.removeEventListener("focusin", U), p.removeEventListener("focusout", V);
2940
- break;
2941
- }
2942
- }
2943
- function P() {
2944
- vue.nextTick(() => {
2945
- window.addEventListener("resize", _), e.scrollLock || window.addEventListener("scroll", _), _();
2946
- });
2947
- }
2948
- function ae() {
2949
- window.removeEventListener("resize", _), e.scrollLock || window.removeEventListener("scroll", _);
2950
- }
2951
- let c;
2952
- function b() {
2953
- A() ? (_(), c = window.setTimeout(b, 100)) : V();
2954
- }
2955
- function q() {
2956
- P(), e.spy && b(), e.scrollLock && document.body.classList.add("no-scroll"), vue.nextTick(() => {
2957
- var p;
2958
- (e.anchor === void 0 || e.trigger === "click") && ((p = L.value) == null || p.focus());
2959
- });
2960
- }
2961
- function d() {
2962
- ae(), e.spy && (clearTimeout(c), c = void 0), e.scrollLock && document.body.classList.remove("no-scroll");
2963
- }
2964
- function $() {
2965
- e.persistent || V();
2966
- }
2967
- return vue.onBeforeUnmount(() => {
2968
- N(), d();
2969
- }), vue.onMounted(() => {
2970
- vue.nextTick(() => {
2971
- X(), _();
2972
- });
2973
- }), vue.watch(
2974
- l,
2975
- (p) => {
2976
- p ? q() : d();
2977
- },
2978
- { immediate: true }
2979
- ), (p, M) => (vue.openBlock(), vue.createBlock(vue.Teleport, {
2980
- disabled: !l.value && !i.animating || !e.attach,
2981
- to: e.attach
2982
- }, [
2983
- r.value ? (vue.openBlock(), vue.createElementBlock("div", {
2984
- key: 0,
2985
- class: vue.normalizeClass([
2986
- "q-overlay__underlay",
2987
- { "q-overlay__underlay--blur": e.backdropBlur }
2988
- ])
2989
- }, null, 2)) : vue.createCommentVNode("", true),
2990
- vue.createVNode(vue.Transition, {
2991
- name: e.transition,
2992
- appear: "",
2993
- onEnter: le,
2994
- onLeave: j
2995
- }, {
2996
- default: vue.withCtx(() => [
2997
- l.value ? (vue.openBlock(), vue.createElementBlock("div", {
2998
- key: 0,
2999
- class: vue.normalizeClass(s.value),
3000
- style: vue.normalizeStyle(f.value)
3001
- }, [
3002
- vue.createElementVNode("div", vue.mergeProps({
3003
- class: "q-overlay__content",
3004
- ref_key: "overlayRef",
3005
- ref: L,
3006
- tabindex: "-1",
3007
- role: r.value ? "dialog" : void 0
3008
- }, p.$attrs, {
3009
- onKeydown: vue.withKeys($, ["escape"]),
3010
- onBlur: $
3011
- }), [
3012
- e.arrow ? (vue.openBlock(), vue.createElementBlock("div", Ut)) : vue.createCommentVNode("", true),
3013
- vue.renderSlot(p.$slots, "default")
3014
- ], 16, Rt)
3015
- ], 6)) : vue.createCommentVNode("", true)
3016
- ]),
3017
- _: 3
3018
- }, 8, ["name"])
3019
- ], 8, ["disabled", "to"]));
3020
- }
3021
- }), ve = S(Nt), Ht = ["id"], Kt = {
3022
- key: 0,
3023
- class: "q-field__label"
3024
- }, Gt = ["for"], Wt = {
3025
- key: 0,
3026
- class: "q-field__prepend"
3027
- }, jt = {
3028
- key: 1,
3029
- class: "q-field__append"
3030
- }, Xt = {
3031
- key: 1,
3032
- class: "q-field__extras"
3033
- }, Yt = /* @__PURE__ */ vue.defineComponent({
3034
- inheritAttrs: false,
3035
- __name: "QField",
3036
- props: {
3037
- id: { default: void 0 },
3038
- label: { default: "" },
3039
- for: { default: void 0 },
3040
- size: { default: "medium" },
3041
- readonly: { type: Boolean },
3042
- disabled: { type: Boolean },
3043
- required: { type: Boolean },
3044
- class: { default: void 0 }
3045
- },
3046
- setup(t, { expose: o }) {
3047
- const e = t, n = me(e.id), l = vue.ref(null), s = vue.computed(() => e.required && !e.readonly && !e.disabled);
3048
- return o({
3049
- fieldRef: l
3050
- }), (r, i) => (vue.openBlock(), vue.createElementBlock("div", {
3051
- id: vue.unref(n),
3052
- class: vue.normalizeClass([
3053
- "q-field",
3054
- `q-field--${e.size}`,
3055
- {
3056
- "q-field--readonly": e.readonly,
3057
- "q-field--disabled": e.disabled,
3058
- "q-field--required": s.value
3059
- },
3060
- e.class
3061
- ])
3062
- }, [
3063
- e.label ? (vue.openBlock(), vue.createElementBlock("div", Kt, [
3064
- vue.renderSlot(r.$slots, "label.prepend"),
3065
- vue.createElementVNode("label", {
3066
- for: e.for
3067
- }, vue.toDisplayString(e.label), 9, Gt),
3068
- vue.renderSlot(r.$slots, "label.append")
3069
- ])) : vue.createCommentVNode("", true),
3070
- vue.renderSlot(r.$slots, "control", {}, () => [
3071
- vue.createElementVNode("div", vue.mergeProps({
3072
- class: "q-field__control",
3073
- ref_key: "fieldRef",
3074
- ref: l
3075
- }, r.$attrs), [
3076
- r.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", Wt, [
3077
- vue.renderSlot(r.$slots, "prepend")
3078
- ])) : vue.createCommentVNode("", true),
3079
- vue.renderSlot(r.$slots, "default"),
3080
- r.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", jt, [
3081
- vue.renderSlot(r.$slots, "append")
3082
- ])) : vue.createCommentVNode("", true)
3083
- ], 16)
3084
- ]),
3085
- r.$slots.extras ? (vue.openBlock(), vue.createElementBlock("div", Xt, [
3086
- vue.renderSlot(r.$slots, "extras")
3087
- ])) : vue.createCommentVNode("", true)
3088
- ], 10, Ht));
3089
- }
3090
- }), qe = S(Yt), Zt = ["id", "type", "role", "required", "placeholder", "readonly", "disabled", "maxlength"], Jt = /* @__PURE__ */ vue.defineComponent({
3091
- inheritAttrs: false,
3092
- __name: "QTextField",
3093
- props: /* @__PURE__ */ vue.mergeModels({
3094
- id: { default: void 0 },
3095
- placeholder: { default: "" },
3096
- label: { default: "" },
3097
- size: { default: void 0 },
3098
- maxLength: { default: void 0 },
3099
- readonly: { type: Boolean },
3100
- disabled: { type: Boolean },
3101
- required: { type: Boolean },
3102
- role: { default: void 0 },
3103
- type: { default: "text" },
3104
- class: { default: void 0 }
3105
- }, {
3106
- modelValue: {},
3107
- modelModifiers: {}
3108
- }),
3109
- emits: ["update:modelValue"],
3110
- setup(t, { expose: o }) {
3111
- const e = t, n = vue.useModel(t, "modelValue"), l = me(e.id), s = vue.ref(null), r = vue.ref(null), i = vue.computed(
3112
- () => e.readonly || e.disabled ? "" : e.placeholder
3113
- );
3114
- return o({
3115
- fieldRef: vue.computed(() => {
3116
- var f;
3117
- return (f = s.value) == null ? void 0 : f.fieldRef;
3118
- }),
3119
- inputRef: r
3120
- }), (f, L) => (vue.openBlock(), vue.createBlock(vue.unref(qe), {
3121
- ref_key: "fieldRef",
3122
- ref: s,
3123
- class: vue.normalizeClass(["q-text-field", e.class]),
3124
- for: vue.unref(l),
3125
- label: e.label,
3126
- size: e.size,
3127
- readonly: e.readonly,
3128
- disabled: e.disabled,
3129
- required: e.required
3130
- }, vue.createSlots({
3131
- "label.prepend": vue.withCtx(() => [
3132
- vue.renderSlot(f.$slots, "label.prepend")
3133
- ]),
3134
- "label.append": vue.withCtx(() => [
3135
- vue.renderSlot(f.$slots, "label.append")
3136
- ]),
3137
- default: vue.withCtx(() => [
3138
- vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
3139
- "onUpdate:modelValue": L[0] || (L[0] = (_) => n.value = _),
3140
- ref_key: "inputRef",
3141
- ref: r,
3142
- id: vue.unref(l),
3143
- class: "q-text-field__input",
3144
- type: e.type,
3145
- role: e.role,
3146
- required: e.required,
3147
- placeholder: i.value,
3148
- readonly: e.readonly,
3149
- disabled: e.disabled,
3150
- maxlength: e.maxLength
3151
- }, f.$attrs), null, 16, Zt), [
3152
- [vue.vModelDynamic, n.value]
3153
- ])
3154
- ]),
3155
- _: 2
3156
- }, [
3157
- f.$slots.prepend ? {
3158
- name: "prepend",
3159
- fn: vue.withCtx(() => [
3160
- vue.renderSlot(f.$slots, "prepend")
3161
- ]),
3162
- key: "0"
3163
- } : void 0,
3164
- f.$slots.append ? {
3165
- name: "append",
3166
- fn: vue.withCtx(() => [
3167
- vue.renderSlot(f.$slots, "append")
3168
- ]),
3169
- key: "1"
3170
- } : void 0,
3171
- f.$slots.extras ? {
3172
- name: "extras",
3173
- fn: vue.withCtx(() => [
3174
- vue.renderSlot(f.$slots, "extras")
3175
- ]),
3176
- key: "2"
3177
- } : void 0
3178
- ]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
3179
- }
3180
- }), Pt = S(Jt), eo = ["data-key"], to = {
3181
- key: 0,
3182
- class: "q-select__loader"
3183
- }, oo = {
3184
- key: 2,
3185
- class: "q-select__loader"
3186
- }, no = {
3187
- noData: "No data available"
3188
- }, lo = {
3189
- chevron: {
3190
- icon: "chevron-down"
3191
- },
3192
- clear: {
3193
- icon: "close"
3194
- }
3195
- }, ao = /* @__PURE__ */ vue.defineComponent({
3196
- __name: "QCombobox",
3197
- props: /* @__PURE__ */ vue.mergeModels({
3198
- id: { default: void 0 },
3199
- placeholder: { default: "" },
3200
- selectionMode: { default: "automatic" },
3201
- filterMode: { default: "builtin" },
3202
- label: { default: "" },
3203
- clearable: { type: Boolean },
3204
- readonly: { type: Boolean },
3205
- disabled: { type: Boolean },
3206
- required: { type: Boolean },
3207
- loading: { type: Boolean },
3208
- items: {},
3209
- groups: { default: () => [] },
3210
- itemValue: { default: "key" },
3211
- itemLabel: { default: "label" },
3212
- emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
3213
- size: { default: void 0 },
3214
- texts: { default: () => no },
3215
- icons: { default: () => lo },
3216
- class: { default: void 0 }
3217
- }, {
3218
- modelValue: {
3219
- type: [String, Number, Boolean, Symbol]
3220
- },
3221
- modelModifiers: {},
3222
- open: { type: Boolean },
3223
- openModifiers: {},
3224
- search: { default: "" },
3225
- searchModifiers: {}
3226
- }),
3227
- emits: /* @__PURE__ */ vue.mergeModels(["before-show", "before-hide", "show", "hide"], ["update:modelValue", "update:open", "update:search"]),
3228
- setup(t, { expose: o, emit: e }) {
3229
- const n = t, l = e, s = vue.useModel(t, "modelValue"), r = vue.useModel(t, "open"), i = vue.useModel(t, "search"), f = vue.ref(void 0), L = vue.ref(null), _ = vue.ref(null), y = vue.ref(null);
3230
- vue.onMounted(Q);
3231
- const U = vue.computed(() => n.clearable && !n.readonly && !n.disabled), z = vue.computed(() => {
3232
- var a;
3233
- return n.filterMode === "manual" || !j.value ? n.items : (a = n.items) == null ? void 0 : a.filter(
3234
- (g) => g[n.itemLabel].toLowerCase().startsWith(i.value.toLowerCase())
3235
- );
3236
- }), C = vue.computed(() => {
3237
- var a;
3238
- return (a = n.items) == null ? void 0 : a.find((g) => g[n.itemValue] === s.value);
3239
- }), V = vue.computed(() => C.value === void 0), W = vue.computed(() => {
3240
- const a = f.value;
3241
- if (a !== void 0 && z.value[a])
3242
- return z.value[a];
3243
- }), le = vue.computed(() => {
3244
- var g;
3245
- if (f.value === void 0)
3246
- return;
3247
- const a = (g = _.value) == null ? void 0 : g.getItem(f.value);
3248
- return a == null ? void 0 : a.id;
3249
- }), j = vue.computed(() => {
3250
- var a;
3251
- return i.value.length > 0 && i.value !== ((a = C.value) == null ? void 0 : a[n.itemLabel]);
3252
- });
3253
- function A(a) {
3254
- s.value = a, N();
3255
- }
3256
- function Q() {
3257
- var g;
3258
- const a = ((g = C.value) == null ? void 0 : g[n.itemLabel]) || "";
3259
- i.value !== a && (i.value = a);
3260
- }
3261
- function X() {
3262
- r.value || n.readonly || n.disabled || (l("before-show"), r.value = true, M());
3263
- }
3264
- function N() {
3265
- r.value && (l("before-hide"), r.value = false, f.value = void 0);
3266
- }
3267
- function P() {
3268
- r.value ? N() : c();
3269
- }
3270
- function ae() {
3271
- U.value && (s.value = n.emptyValue, f.value = void 0, M());
3272
- }
3273
- function c() {
3274
- if (X(), C.value !== void 0) {
3275
- const a = z.value.indexOf(C.value);
3276
- a !== -1 && vue.nextTick(() => Le(a));
3277
- }
3278
- }
3279
- function b(a) {
3280
- var g, B;
3281
- if (!(!a.key || n.readonly || n.disabled))
3282
- if (["ArrowDown", "ArrowUp", "Home", "End"].includes(a.key) && (a.preventDefault(), a.stopPropagation()), a.key === "Escape")
3283
- Q(), r.value && N();
3284
- else if (["ArrowDown", "ArrowUp"].includes(a.key))
3285
- r.value ? vue.nextTick(() => {
3286
- if (f.value === void 0)
3287
- q();
3288
- else {
3289
- const O = a.key === "ArrowDown" ? "next" : "prev";
3290
- $(f.value, O);
3291
- }
3292
- }) : (X(), vue.nextTick(() => {
3293
- a.key === "ArrowDown" ? q() : d();
3294
- }));
3295
- else if (a.key === "Enter") {
3296
- if (W.value === void 0)
3297
- return;
3298
- A(W.value[n.itemValue]);
3299
- } else
3300
- a.key === "Home" ? f.value = (g = _.value) == null ? void 0 : g.getFirstFocusableItemIndex() : a.key === "End" ? f.value = (B = _.value) == null ? void 0 : B.getLastFocusableItemIndex() : (/^[a-z]$/i.test(a.key) || a.key === "Backspace") && X();
3301
- }
3302
- function q() {
3303
- var a, g;
3304
- if (V.value)
3305
- f.value = (g = _.value) == null ? void 0 : g.getFirstFocusableItemIndex();
3306
- else {
3307
- const B = z.value.findIndex(
3308
- (O) => O[n.itemValue] === s.value
3309
- );
3310
- B === -1 ? f.value = (a = _.value) == null ? void 0 : a.getFirstFocusableItemIndex() : f.value = B;
3311
- }
3312
- }
3313
- function d() {
3314
- var a;
3315
- f.value = (a = _.value) == null ? void 0 : a.getLastFocusableItemIndex();
3316
- }
3317
- function $(a, g) {
3318
- var B;
3319
- f.value = (B = _.value) == null ? void 0 : B.getAdjacentItemIndex(a, g);
3320
- }
3321
- function p(a) {
3322
- var g, B, O;
3323
- !((g = y.value) != null && g.contains(a.relatedTarget)) && !((O = (B = L.value) == null ? void 0 : B.fieldRef) != null && O.contains(a.relatedTarget)) ? (N(), U.value && !i.value && (s.value = n.emptyValue), Q()) : (a.preventDefault(), a.stopPropagation());
3324
- }
3325
- function M() {
3326
- var a, g;
3327
- (g = (a = L.value) == null ? void 0 : a.inputRef) == null || g.focus();
3328
- }
3329
- function R() {
3330
- M();
3331
- }
3332
- function oe() {
3333
- l("show");
3334
- }
3335
- function Ue() {
3336
- l("hide");
3337
- }
3338
- function Le(a) {
3339
- var B;
3340
- const g = (B = _.value) == null ? void 0 : B.getItem(a);
3341
- _.value && (_.value.$el.scrollTop = g == null ? void 0 : g.offsetTop);
3342
- }
3343
- return vue.watch(s, Q), vue.watch(
3344
- () => n.items,
3345
- (a, g) => {
3346
- if (!V.value) {
3347
- const B = g.find((O) => O[n.itemValue] === s.value);
3348
- i.value === (B == null ? void 0 : B[n.itemLabel]) && Q();
3349
- }
3350
- },
3351
- { deep: true }
3352
- ), vue.watch(f, (a) => {
3353
- a !== void 0 && Le(a);
3354
- }), vue.watch(i, (a) => {
3355
- a && r.value && n.selectionMode === "automatic" && vue.nextTick(q);
3356
- }), vue.watch(
3357
- () => n.loading,
3358
- (a) => {
3359
- !a && r.value && vue.nextTick(q);
3360
- }
3361
- ), o({
3362
- triggerEl: L
3363
- }), (a, g) => {
3364
- var B;
3365
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3366
- vue.createVNode(vue.unref(Pt), {
3367
- modelValue: i.value,
3368
- "onUpdate:modelValue": g[0] || (g[0] = (O) => i.value = O),
3369
- id: n.id,
3370
- label: n.label,
3371
- required: n.required,
3372
- ref_key: "triggerEl",
3373
- ref: L,
3374
- role: "combobox",
3375
- placeholder: n.placeholder,
3376
- class: vue.normalizeClass([
3377
- "q-combobox",
3378
- {
3379
- "q-combobox--readonly": n.readonly,
3380
- "q-combobox--disabled": n.disabled,
3381
- "q-combobox--expanded": r.value
3382
- },
3383
- n.class
3384
- ]),
3385
- readonly: n.readonly,
3386
- disabled: n.disabled,
3387
- "data-loading": n.loading,
3388
- autocomplete: "off",
3389
- "aria-expanded": r.value,
3390
- "aria-haspopup": "listbox",
3391
- "aria-autocomplete": "list",
3392
- "aria-activedescendant": le.value,
3393
- size: n.size,
3394
- onClick: c,
3395
- onFocusout: p,
3396
- onKeydown: vue.withModifiers(b, ["stop"])
3397
- }, vue.createSlots({
3398
- "label.prepend": vue.withCtx(() => [
3399
- vue.renderSlot(a.$slots, "label.prepend")
3400
- ]),
3401
- "label.append": vue.withCtx(() => [
3402
- vue.renderSlot(a.$slots, "label.append")
3403
- ]),
3404
- append: vue.withCtx(() => [
3405
- vue.renderSlot(a.$slots, "append"),
3406
- U.value && i.value ? (vue.openBlock(), vue.createBlock(vue.unref(fe), {
3407
- key: 0,
3408
- class: "q-combobox__clear",
3409
- "b-style": "plain",
3410
- borderless: "",
3411
- tabindex: "-1",
3412
- onClick: ae
3413
- }, {
3414
- default: vue.withCtx(() => [
3415
- vue.createVNode(vue.unref(ee), vue.normalizeProps(vue.guardReactiveProps(n.icons.clear)), null, 16)
3416
- ]),
3417
- _: 1
3418
- })) : vue.createCommentVNode("", true),
3419
- n.readonly ? vue.createCommentVNode("", true) : (vue.openBlock(), vue.createBlock(vue.unref(fe), {
3420
- key: 1,
3421
- class: "q-combobox__chevron",
3422
- "b-style": "plain",
3423
- borderless: "",
3424
- tabindex: "-1",
3425
- disabled: n.disabled,
3426
- onClick: P
3427
- }, {
3428
- default: vue.withCtx(() => [
3429
- vue.createVNode(vue.unref(ee), vue.normalizeProps(vue.guardReactiveProps(n.icons.chevron)), null, 16)
3430
- ]),
3431
- _: 1
3432
- }, 8, ["disabled"]))
3433
- ]),
3434
- _: 2
3435
- }, [
3436
- a.$slots.prepend ? {
3437
- name: "prepend",
3438
- fn: vue.withCtx(() => [
3439
- vue.renderSlot(a.$slots, "prepend")
3440
- ]),
3441
- key: "0"
3442
- } : void 0,
3443
- a.$slots.extras ? {
3444
- name: "extras",
3445
- fn: vue.withCtx(() => [
3446
- vue.renderSlot(a.$slots, "extras")
3447
- ]),
3448
- key: "1"
3449
- } : void 0
3450
- ]), 1032, ["modelValue", "id", "label", "required", "placeholder", "class", "readonly", "disabled", "data-loading", "aria-expanded", "aria-activedescendant", "size"]),
3451
- vue.createVNode(vue.unref(ve), {
3452
- modelValue: r.value,
3453
- "onUpdate:modelValue": g[2] || (g[2] = (O) => r.value = O),
3454
- spy: "",
3455
- trigger: "manual",
3456
- placement: "bottom",
3457
- width: "anchor",
3458
- offset: 4,
3459
- anchor: (B = L.value) == null ? void 0 : B.$el,
3460
- onEnter: oe,
3461
- onLeave: Ue
3462
- }, {
3463
- default: vue.withCtx(() => {
3464
- var O;
3465
- return [
3466
- vue.createElementVNode("div", {
3467
- ref_key: "contentRef",
3468
- ref: y,
3469
- "data-testid": "combobox-dropdown",
3470
- "data-key": n.id,
3471
- class: "q-select__body",
3472
- onFocusout: p
3473
- }, [
3474
- vue.renderSlot(a.$slots, "body.prepend"),
3475
- n.loading ? (vue.openBlock(), vue.createElementBlock("div", to, [
3476
- vue.createVNode(vue.unref($e), { size: 24 })
3477
- ])) : z.value.length ? (vue.openBlock(), vue.createBlock(vue.unref(Re), {
3478
- key: 1,
3479
- ref_key: "listRef",
3480
- ref: _,
3481
- class: "q-select__items",
3482
- modelValue: s.value,
3483
- "onUpdate:modelValue": [
3484
- g[1] || (g[1] = (he) => s.value = he),
3485
- A
3486
- ],
3487
- highlighted: (O = W.value) == null ? void 0 : O[n.itemValue],
3488
- items: z.value,
3489
- groups: a.groups,
3490
- "item-label": n.itemLabel,
3491
- "item-value": n.itemValue,
3492
- onMouseup: R
3493
- }, {
3494
- item: vue.withCtx(({ item: he }) => [
3495
- vue.renderSlot(a.$slots, "item", { item: he })
3496
- ]),
3497
- _: 3
3498
- }, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (vue.openBlock(), vue.createElementBlock("div", oo, vue.toDisplayString(a.texts.noData), 1)),
3499
- vue.renderSlot(a.$slots, "body.append")
3500
- ], 40, eo)
3501
- ];
3502
- }),
3503
- _: 3
3504
- }, 8, ["modelValue", "anchor"])
3505
- ], 64);
3506
- };
3507
- }
3508
- });
3509
- S(ao);
3510
- const so = {
3511
- key: 0,
3512
- class: "q-input-group__prepend"
3513
- }, io = { key: 0 }, ro = {
3514
- key: 1,
3515
- class: "q-input-group__append"
3516
- }, uo = { key: 0 }, co = /* @__PURE__ */ vue.defineComponent({
3517
- __name: "QInputGroup",
3518
- props: {
3519
- id: { default: void 0 },
3520
- label: { default: "" },
3521
- required: { type: Boolean },
3522
- prependIcon: { default: void 0 },
3523
- appendIcon: { default: void 0 },
3524
- size: { default: "large" },
3525
- class: { default: void 0 }
3526
- },
3527
- setup(t) {
3528
- const o = t;
3529
- return Me({
3530
- QField: {
3531
- size: "block"
3532
- }
3533
- }), (e, n) => (vue.openBlock(), vue.createBlock(vue.unref(qe), {
3534
- id: o.id,
3535
- class: vue.normalizeClass(["q-input-group", o.class]),
3536
- label: o.label,
3537
- required: o.required,
3538
- size: o.size
3539
- }, {
3540
- default: vue.withCtx(() => [
3541
- e.$slots.prepend || o.prependIcon ? (vue.openBlock(), vue.createElementBlock("div", so, [
3542
- o.prependIcon ? (vue.openBlock(), vue.createElementBlock("span", io, [
3543
- vue.createVNode(vue.unref(ee), vue.normalizeProps(vue.guardReactiveProps(o.prependIcon)), null, 16)
3544
- ])) : vue.createCommentVNode("", true),
3545
- vue.renderSlot(e.$slots, "prepend")
3546
- ])) : vue.createCommentVNode("", true),
3547
- vue.renderSlot(e.$slots, "default"),
3548
- e.$slots.append || o.appendIcon ? (vue.openBlock(), vue.createElementBlock("div", ro, [
3549
- o.appendIcon ? (vue.openBlock(), vue.createElementBlock("span", uo, [
3550
- vue.createVNode(vue.unref(ee), vue.normalizeProps(vue.guardReactiveProps(o.appendIcon)), null, 16)
3551
- ])) : vue.createCommentVNode("", true),
3552
- vue.renderSlot(e.$slots, "append")
3553
- ])) : vue.createCommentVNode("", true)
3554
- ]),
3555
- _: 3
3556
- }, 8, ["id", "class", "label", "required", "size"]));
3557
- }
3558
- }), zo = S(co), fo = /* @__PURE__ */ vue.defineComponent({
3559
- __name: "QLineLoader",
3560
- props: {
3561
- class: { default: void 0 }
3562
- },
3563
- setup(t) {
3564
- const o = t;
3565
- return (e, n) => (vue.openBlock(), vue.createElementBlock("div", {
3566
- class: vue.normalizeClass(["q-line-loader", o.class])
3567
- }, null, 2));
3568
- }
3569
- }), Co = S(fo), po = {
3570
- key: 0,
3571
- class: "q-popover__header"
3572
- }, mo = {
3573
- key: 1,
3574
- class: "q-popover__body"
3575
- }, vo = ["innerHTML"], ho = { key: 1 }, bo = /* @__PURE__ */ vue.defineComponent({
3576
- inheritAttrs: false,
3577
- __name: "QPopover",
3578
- props: /* @__PURE__ */ vue.mergeModels({
3579
- anchor: {},
3580
- arrow: { type: Boolean, default: true },
3581
- attach: { default: "body" },
3582
- disabled: { type: Boolean },
3583
- html: { type: Boolean, default: true },
3584
- placement: { default: "right" },
3585
- text: {},
3586
- title: {}
3587
- }, {
3588
- modelValue: { type: Boolean },
3589
- modelModifiers: {}
3590
- }),
3591
- emits: ["update:modelValue"],
3592
- setup(t) {
3593
- const o = t, e = vue.useModel(t, "modelValue");
3594
- return (n, l) => (vue.openBlock(), vue.createBlock(vue.unref(ve), {
3595
- "model-value": e.value,
3596
- class: "q-popover",
3597
- trigger: "click",
3598
- anchor: o.anchor,
3599
- arrow: o.arrow,
3600
- attach: o.attach,
3601
- disabled: o.disabled,
3602
- placement: o.placement
3603
- }, {
3604
- default: vue.withCtx(() => [
3605
- o.title || n.$slots.header ? (vue.openBlock(), vue.createElementBlock("h3", po, [
3606
- vue.createTextVNode(vue.toDisplayString(o.title) + " ", 1),
3607
- vue.renderSlot(n.$slots, "header")
3608
- ])) : vue.createCommentVNode("", true),
3609
- o.text || n.$slots.body ? (vue.openBlock(), vue.createElementBlock("div", mo, [
3610
- o.html ? (vue.openBlock(), vue.createElementBlock("span", {
3611
- key: 0,
3612
- innerHTML: o.text
3613
- }, null, 8, vo)) : (vue.openBlock(), vue.createElementBlock("span", ho, vue.toDisplayString(o.text), 1)),
3614
- vue.renderSlot(n.$slots, "body")
3615
- ])) : vue.createCommentVNode("", true)
3616
- ]),
3617
- _: 3
3618
- }, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement"]));
3619
- }
3620
- });
3621
- S(bo);
3622
- const yo = {
3623
- key: 0,
3624
- class: "q-select__value"
3625
- }, go = {
3626
- key: 1,
3627
- class: "q-select__placeholder"
3628
- }, _o = ["data-key"], ko = {
3629
- key: 0,
3630
- class: "q-select__loader"
3631
- }, wo = {
3632
- placeholder: "Choose..."
3633
- }, $o = {
3634
- chevron: {
3635
- icon: "chevron-down"
3636
- },
3637
- clear: {
3638
- icon: "close"
3639
- }
3640
- }, qo = /* @__PURE__ */ vue.defineComponent({
3641
- __name: "QSelect",
3642
- props: /* @__PURE__ */ vue.mergeModels({
3643
- id: { default: void 0 },
3644
- label: { default: "" },
3645
- clearable: { type: Boolean },
3646
- readonly: { type: Boolean },
3647
- disabled: { type: Boolean },
3648
- required: { type: Boolean },
3649
- loading: { type: Boolean },
3650
- icons: { default: () => $o },
3651
- items: {},
3652
- groups: { default: () => [] },
3653
- itemValue: { default: "key" },
3654
- itemLabel: { default: "label" },
3655
- emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
3656
- size: { default: void 0 },
3657
- texts: { default: () => wo },
3658
- class: { default: "" }
3659
- }, {
3660
- modelValue: {
3661
- type: [String, Number, Boolean, Symbol]
3662
- },
3663
- modelModifiers: {}
3664
- }),
3665
- emits: /* @__PURE__ */ vue.mergeModels(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
3666
- setup(t, { emit: o }) {
3667
- const e = t, n = o, l = vue.useModel(t, "modelValue"), s = vue.ref(false), r = vue.ref(""), i = vue.ref(null), f = vue.ref(null), L = vue.ref(null), _ = vue.computed(() => y.value === void 0), y = vue.computed(
3668
- () => {
3669
- var d;
3670
- return (d = e.items) == null ? void 0 : d.find(($) => $[e.itemValue] === l.value);
3671
- }
3672
- ), U = vue.computed(
3673
- () => y.value ? y.value[e.itemLabel] : ""
3674
- ), z = vue.computed(
3675
- () => e.clearable && !e.readonly && !e.disabled && !e.loading
3676
- );
3677
- function C(d) {
3678
- l.value = d, A();
3679
- }
3680
- function V() {
3681
- z.value && C(e.emptyValue);
3682
- }
3683
- function W() {
3684
- e.readonly || e.disabled || (s.value ? A() : j());
3685
- }
3686
- function le(d) {
3687
- var $, p, M;
3688
- !(($ = L.value) != null && $.contains(d.relatedTarget)) && !((M = (p = i.value) == null ? void 0 : p.fieldRef) != null && M.contains(d.relatedTarget)) && A();
3689
- }
3690
- function j() {
3691
- s.value || (n("before-show"), s.value = true);
3692
- }
3693
- function A() {
3694
- s.value && (n("before-hide"), s.value = false);
3695
- }
3696
- function Q() {
3697
- s.value ? A() : j();
3698
- }
3699
- let X;
3700
- function N(d) {
3701
- if (!(!d.key || e.readonly || e.disabled)) {
3702
- if (window.clearTimeout(X), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && (d.preventDefault(), d.stopPropagation()), ["Enter", " "].includes(d.key) && (s.value = true), ["Escape", "Tab"].includes(d.key) && (s.value ? s.value = false : z.value && d.key === "Escape" && V()), d.key === "Delete" && e.clearable && V(), /^[a-z]$/i.test(d.key)) {
3703
- r.value += d.key.toLowerCase();
3704
- for (let $ = 0; $ < e.items.length; $++)
3705
- if (e.items[$][e.itemLabel].toLowerCase().startsWith(r.value)) {
3706
- q($);
3707
- break;
3708
- }
3709
- }
3710
- X = window.setTimeout(function() {
3711
- r.value = "";
3712
- }, 500);
3713
- }
3714
- }
3715
- function P() {
3716
- var d;
3717
- e.loading ? (d = L.value) == null || d.focus() : b(), n("show");
3718
- }
3719
- function ae() {
3720
- c(), n("hide");
3721
- }
3722
- function c() {
3723
- var d, $;
3724
- ($ = (d = i.value) == null ? void 0 : d.fieldRef) == null || $.focus();
3725
- }
3726
- function b() {
3727
- var d;
3728
- (d = f.value) == null || d.$el.focus();
3729
- }
3730
- function q(d) {
3731
- var $;
3732
- ($ = f.value) == null || $.focusItem(d);
3733
- }
3734
- return vue.watch(
3735
- () => e.loading,
3736
- (d) => {
3737
- !d && s.value && vue.nextTick(b);
3738
- }
3739
- ), (d, $) => {
3740
- var p, M;
3741
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3742
- vue.createVNode(vue.unref(qe), {
3743
- id: e.id,
3744
- label: e.label,
3745
- required: e.required,
3746
- ref_key: "triggerEl",
3747
- ref: i,
3748
- role: "combobox",
3749
- tabindex: e.disabled ? -1 : 0,
3750
- class: vue.normalizeClass([
3751
- "q-select",
3752
- {
3753
- "q-select--readonly": e.readonly,
3754
- "q-select--disabled": e.disabled,
3755
- "q-select--expanded": s.value
3756
- },
3757
- e.class
3758
- ]),
3759
- readonly: e.readonly,
3760
- disabled: e.disabled,
3761
- "data-loading": e.loading,
3762
- "aria-expanded": s.value,
3763
- "aria-haspopup": "listbox",
3764
- size: e.size,
3765
- onClick: W,
3766
- onKeydown: vue.withModifiers(N, ["stop"])
3767
- }, vue.createSlots({
3768
- append: vue.withCtx(() => [
3769
- vue.renderSlot(d.$slots, "append"),
3770
- z.value && l.value ? (vue.openBlock(), vue.createBlock(vue.unref(fe), {
3771
- key: 0,
3772
- class: "q-select__clear",
3773
- "b-style": "plain",
3774
- borderless: "",
3775
- tabindex: "-1",
3776
- onClick: V
3777
- }, {
3778
- default: vue.withCtx(() => [
3779
- vue.createVNode(vue.unref(ee), vue.normalizeProps(vue.guardReactiveProps(e.icons.clear)), null, 16)
3780
- ]),
3781
- _: 1
3782
- })) : vue.createCommentVNode("", true),
3783
- e.readonly ? vue.createCommentVNode("", true) : (vue.openBlock(), vue.createBlock(vue.unref(fe), {
3784
- key: 1,
3785
- class: "q-select__chevron",
3786
- "b-style": "plain",
3787
- borderless: "",
3788
- tabindex: "-1",
3789
- disabled: e.disabled,
3790
- onClick: Q
3791
- }, {
3792
- default: vue.withCtx(() => [
3793
- vue.createVNode(vue.unref(ee), vue.normalizeProps(vue.guardReactiveProps(e.icons.chevron)), null, 16)
3794
- ]),
3795
- _: 1
3796
- }, 8, ["disabled"]))
3797
- ]),
3798
- default: vue.withCtx(() => [
3799
- _.value ? (vue.openBlock(), vue.createElementBlock("span", go, [
3800
- !e.readonly && !e.disabled ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3801
- vue.createTextVNode(vue.toDisplayString(d.texts.placeholder), 1)
3802
- ], 64)) : vue.createCommentVNode("", true)
3803
- ])) : (vue.openBlock(), vue.createElementBlock("span", yo, vue.toDisplayString(U.value), 1))
3804
- ]),
3805
- _: 2
3806
- }, [
3807
- (p = y.value) != null && p.icon || d.$slots.prepend ? {
3808
- name: "prepend",
3809
- fn: vue.withCtx(() => {
3810
- var R, oe;
3811
- return [
3812
- vue.renderSlot(d.$slots, "prepend"),
3813
- (R = y.value) != null && R.icon ? (vue.openBlock(), vue.createBlock(vue.unref(ee), vue.normalizeProps(vue.mergeProps({ key: 0 }, (oe = y.value) == null ? void 0 : oe.icon)), null, 16)) : vue.createCommentVNode("", true)
3814
- ];
3815
- }),
3816
- key: "0"
3817
- } : void 0,
3818
- d.$slots.extras ? {
3819
- name: "extras",
3820
- fn: vue.withCtx(() => [
3821
- vue.renderSlot(d.$slots, "extras")
3822
- ]),
3823
- key: "1"
3824
- } : void 0
3825
- ]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "data-loading", "aria-expanded", "size"]),
3826
- vue.createVNode(vue.unref(ve), {
3827
- modelValue: s.value,
3828
- "onUpdate:modelValue": $[1] || ($[1] = (R) => s.value = R),
3829
- spy: "",
3830
- trigger: "manual",
3831
- placement: "bottom",
3832
- width: "anchor",
3833
- "scroll-lock": "",
3834
- anchor: (M = i.value) == null ? void 0 : M.$el,
3835
- offset: 2,
3836
- onEnter: P,
3837
- onLeave: ae
3838
- }, {
3839
- default: vue.withCtx(() => [
3840
- vue.createElementVNode("div", {
3841
- ref_key: "contentRef",
3842
- ref: L,
3843
- "data-testid": "combobox-dropdown",
3844
- "data-key": e.id,
3845
- class: "q-select__body",
3846
- tabindex: "-1",
3847
- onFocusout: le,
3848
- onKeydown: vue.withModifiers(N, ["stop"])
3849
- }, [
3850
- vue.renderSlot(d.$slots, "body.prepend"),
3851
- e.loading ? (vue.openBlock(), vue.createElementBlock("div", ko, [
3852
- vue.createVNode(vue.unref($e), { size: 24 })
3853
- ])) : (vue.openBlock(), vue.createBlock(vue.unref(Re), {
3854
- key: 1,
3855
- ref_key: "listRef",
3856
- ref: f,
3857
- class: "q-select__items",
3858
- modelValue: l.value,
3859
- "onUpdate:modelValue": [
3860
- $[0] || ($[0] = (R) => l.value = R),
3861
- C
3862
- ],
3863
- items: e.items,
3864
- groups: d.groups,
3865
- "item-label": e.itemLabel,
3866
- "item-value": e.itemValue
3867
- }, {
3868
- item: vue.withCtx(({ item: R }) => [
3869
- vue.renderSlot(d.$slots, "item", { item: R })
3870
- ]),
3871
- _: 3
3872
- }, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
3873
- vue.renderSlot(d.$slots, "body.append")
3874
- ], 40, _o)
3875
- ]),
3876
- _: 3
3877
- }, 8, ["modelValue", "anchor"])
3878
- ], 64);
3879
- };
3880
- }
3881
- });
3882
- S(qo);
3883
- const Lo = /* @__PURE__ */ vue.defineComponent({
3884
- __name: "QThemeProvider",
3885
- props: {
3886
- theme: {}
3887
- },
3888
- setup(t) {
3889
- const o = t;
3890
- return (e, n) => (vue.openBlock(), vue.createElementBlock("div", {
3891
- class: vue.normalizeClass(["q-theme-provider", `q-theme--${o.theme}`])
3892
- }, [
3893
- vue.renderSlot(e.$slots, "default")
3894
- ], 2));
3895
- }
3896
- });
3897
- S(Lo);
3898
- const Io = ["innerHTML"], xo = { key: 1 }, Bo = /* @__PURE__ */ vue.defineComponent({
3899
- __name: "QTooltip",
3900
- props: /* @__PURE__ */ vue.mergeModels({
3901
- id: { default: void 0 },
3902
- anchor: {},
3903
- appearance: { default: "inverted" },
3904
- arrow: { type: Boolean, default: true },
3905
- attach: { default: "body" },
3906
- delay: { default: 500 },
3907
- disabled: { type: Boolean },
3908
- html: { type: Boolean, default: true },
3909
- placement: { default: "right" },
3910
- text: {},
3911
- trigger: { default: "hover" },
3912
- class: { default: void 0 }
3913
- }, {
3914
- modelValue: { type: Boolean },
3915
- modelModifiers: {}
3916
- }),
3917
- emits: ["update:modelValue"],
3918
- setup(t) {
3919
- const o = t, e = vue.useModel(t, "modelValue"), n = me(o.id);
3920
- return (l, s) => (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
3921
- vue.renderSlot(l.$slots, "anchor", {
3922
- props: { "aria-describedby": vue.unref(n) }
3923
- }),
3924
- vue.createVNode(vue.unref(ve), {
3925
- "model-value": e.value,
3926
- anchor: o.anchor,
3927
- role: "tooltip",
3928
- id: vue.unref(n),
3929
- appearance: o.appearance,
3930
- arrow: o.arrow,
3931
- attach: o.attach,
3932
- class: vue.normalizeClass(["q-tooltip", o.class]),
3933
- delay: o.delay,
3934
- disabled: o.disabled,
3935
- placement: o.placement,
3936
- trigger: o.trigger
3937
- }, {
3938
- default: vue.withCtx(() => [
3939
- o.html ? (vue.openBlock(), vue.createElementBlock("span", {
3940
- key: 0,
3941
- innerHTML: o.text
3942
- }, null, 8, Io)) : (vue.openBlock(), vue.createElementBlock("span", xo, vue.toDisplayString(o.text), 1))
3943
- ]),
3944
- _: 1
3945
- }, 8, ["model-value", "anchor", "id", "appearance", "arrow", "attach", "class", "delay", "disabled", "placement", "trigger"])
3946
- ], 64));
3947
- }
3948
- });
3949
- S(Bo);
3950
- const _hoisted_1$1 = { class: "q-chatbot__message-container" };
3951
- const _hoisted_2$1 = ["src"];
3952
- const _hoisted_3$1 = { class: "q-chatbot__message-wrapper" };
3953
- const _hoisted_4 = {
3954
- key: 0,
3955
- class: "q-chatbot__sender"
3956
- };
3957
- const _hoisted_5 = { class: "q-chatbot__message" };
3958
- const _hoisted_6 = ["innerHTML"];
3959
- const _hoisted_7 = {
3960
- key: 1,
3961
- class: "q-chatbot__text"
3962
- };
3963
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3964
- __name: "CBMessage",
3965
- props: {
3966
- sender: { default: "user" },
3967
- message: {},
3968
- date: { default: () => /* @__PURE__ */ new Date() },
3969
- loading: { type: Boolean }
3970
- },
3971
- setup(__props) {
3972
- const props = __props;
3973
- const senderName = vue.computed(() => {
3974
- return props.sender === "bot" ? "GenioBot" : "You";
3975
- });
3976
- const getLocaleDate = vue.computed(() => {
3977
- return props.date.toLocaleString();
3978
- });
3979
- const messageHeader = vue.computed(() => {
3980
- return `${senderName.value} ${getLocaleDate.value}`;
3981
- });
3982
- return (_ctx, _cache) => {
3983
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
3984
- props.sender === "bot" ? (vue.openBlock(), vue.createElementBlock("img", {
3985
- key: 0,
3986
- src: vue.unref(ChatBotIcon),
3987
- alt: "Chatbot",
3988
- class: "q-chatbot__profile"
3989
- }, null, 8, _hoisted_2$1)) : vue.createCommentVNode("", true),
3990
- vue.createElementVNode("div", _hoisted_3$1, [
3991
- !_ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, vue.toDisplayString(messageHeader.value), 1)) : vue.createCommentVNode("", true),
3992
- vue.createElementVNode("div", _hoisted_5, [
3993
- _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(Co), { key: 0 })) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3994
- props.sender == "bot" ? (vue.openBlock(), vue.createElementBlock("div", {
3995
- key: 0,
3996
- class: "q-chatbot__text",
3997
- innerHTML: props.message
3998
- }, null, 8, _hoisted_6)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, vue.toDisplayString(props.message), 1))
3999
- ], 64))
4000
- ])
4001
- ])
4002
- ]);
4003
- };
4004
- }
4005
- });
4006
- const _hoisted_1 = { class: "q-chatbot" };
4007
- const _hoisted_2 = { class: "q-chatbot__tools" };
4008
- const _hoisted_3 = { class: "q-chatbot__messages-container" };
4009
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4010
- ...{ name: "ChatBot" },
4011
- __name: "ChatBot",
4012
- props: {
4013
- apiEndpoint: { default: "http://localhost:3000" },
4014
- texts: { default: () => ({
4015
- chatbotTitle: "ChatBot",
4016
- qButtonTitle: "Send message",
4017
- placeholderMessage: "Type your message here...",
4018
- initialMessage: "Howdy! I am GenioBot 👋, Quidgest's personal AI assistant! How can I help you?",
4019
- loginError: "Uh oh, I could not authenticate with the Quidgest API endpoint 😓",
4020
- botIsSick: "*cough cough* GenioBot is not feeling alright 🥴️🤒, looks like something failed!"
4021
- }) },
4022
- username: {},
4023
- projectPath: {}
4024
- },
4025
- setup(__props) {
4026
- let messages = vue.ref([]);
4027
- let msgHistoryStack = [];
4028
- let nextMessageId = 1;
4029
- let userPrompt = vue.ref("");
4030
- let isChatDisabled = false;
4031
- let isLoading = false;
4032
- const messagesContainer = vue.ref(null);
4033
- const promptInput = vue.ref(null);
4034
- const props = __props;
4035
- vue.onMounted(() => {
4036
- initChat();
4037
- vue.nextTick(scrollChatToBottom);
4038
- });
4039
- const userMessages = vue.computed(() => {
4040
- return messages.value.filter((m) => m.sender === "user");
4041
- });
4042
- function setDisabledState(state) {
4043
- isChatDisabled = state;
4044
- }
4045
- function initChat() {
4046
- axios.post(props.apiEndpoint + "/auth/login", {
4047
- username: props.username,
4048
- password: "test"
4049
- }).then((response) => {
4050
- if (response.status != 200 || !response.data.success) {
4051
- setDisabledState(true);
4052
- addChatMessage(props.texts.loginError);
4053
- return console.log(
4054
- `Unsuccessful login, endpoint gave status ${response.status}`
4055
- );
4056
- }
4057
- loadChatData();
4058
- }).catch((error) => {
4059
- setDisabledState(true);
4060
- addChatMessage(props.texts.loginError);
4061
- console.log(
4062
- "The following error ocurred while trying to login: \n" + error
4063
- );
4064
- });
4065
- }
4066
- function loadChatData() {
4067
- axios.post(props.apiEndpoint + "/prompt/load", {
4068
- username: props.username,
4069
- project: props.projectPath
4070
- }).then((response) => {
4071
- if (response.status != 200 || !response.data.success) {
4072
- setDisabledState(true);
4073
- addChatMessage(props.texts.loginError);
4074
- return console.log(
4075
- `Unsuccessful load, endpoint gave status ${response.status}`
4076
- );
4077
- }
4078
- sendInitialMessage();
4079
- response.data.history.forEach((message) => {
4080
- addChatMessage(message.content, message.type === "ai" ? "bot" : "user");
4081
- });
4082
- }).catch((error) => {
4083
- setDisabledState(true);
4084
- addChatMessage(props.texts.loginError);
4085
- console.log(
4086
- "The following error ocurred while trying to login: \n" + error
4087
- );
4088
- });
4089
- }
4090
- function addChatMessage(message, sender = "bot") {
4091
- messages.value.push({
4092
- id: nextMessageId++,
4093
- message,
4094
- date: /* @__PURE__ */ new Date(),
4095
- sender
4096
- });
4097
- }
4098
- function getLastMessage() {
4099
- return messages.value.find(
4100
- (m) => m.id === nextMessageId - 1
4101
- );
4102
- }
4103
- function sendInitialMessage() {
4104
- addChatMessage(props.texts.initialMessage);
4105
- }
4106
- function resetChat() {
4107
- messages.value = [];
4108
- msgHistoryStack = [];
4109
- userPrompt.value = "";
4110
- isLoading = false;
4111
- setDisabledState(false);
4112
- }
4113
- function scrollChatToBottom() {
4114
- if (messagesContainer.value == null)
4115
- return;
4116
- const element = messagesContainer.value;
4117
- setTimeout(
4118
- () => element.scrollIntoView(false),
4119
- 100
4120
- );
4121
- }
4122
- function handleKey(event) {
4123
- if (promptInput.value == null)
4124
- return;
4125
- if (event.key == "ArrowUp") {
4126
- if (userMessages.value.length == 0)
4127
- return;
4128
- let lastMsgObj = userMessages.value[userMessages.value.length - 1 - msgHistoryStack.length];
4129
- if (!lastMsgObj)
4130
- return;
4131
- msgHistoryStack.push(userPrompt.value);
4132
- userPrompt.value = lastMsgObj.message;
4133
- vue.nextTick(
4134
- () => setCursorPosition(
4135
- promptInput.value,
4136
- lastMsgObj.message.length
4137
- )
4138
- );
4139
- } else if (event.key == "ArrowDown") {
4140
- let previousHistoryText = msgHistoryStack.pop();
4141
- if (!previousHistoryText) {
4142
- userPrompt.value = "";
4143
- return;
4144
- }
4145
- userPrompt.value = previousHistoryText;
4146
- }
4147
- }
4148
- function sendMessage() {
4149
- if (userPrompt.value.trim().length == 0 || isLoading || isChatDisabled)
4150
- return;
4151
- addChatMessage(userPrompt.value, "user");
4152
- scrollChatToBottom();
4153
- setChatPrompt(userPrompt.value);
4154
- userPrompt.value = "";
4155
- }
4156
- function setChatPrompt(prompt) {
4157
- addChatMessage("");
4158
- let msg = getLastMessage();
4159
- let params = {
4160
- message: prompt,
4161
- project: props.projectPath,
4162
- user: props.username
4163
- };
4164
- isLoading = true;
4165
- axios({
4166
- url: props.apiEndpoint + "/prompt/message",
4167
- method: "POST",
4168
- data: params,
4169
- onDownloadProgress: (progressEvent) => {
4170
- var _a, _b;
4171
- const chunk = (_a = progressEvent.event) == null ? void 0 : _a.currentTarget.response;
4172
- const status = (_b = progressEvent.event) == null ? void 0 : _b.currentTarget.status;
4173
- if (status != 200)
4174
- return;
4175
- if (msg)
4176
- msg.message = chunk;
4177
- }
4178
- }).then(({ data }) => {
4179
- if (msg)
4180
- msg.message = data;
4181
- }).catch((error) => {
4182
- addChatMessage(props.texts.botIsSick);
4183
- setDisabledState(true);
4184
- console.log(error);
4185
- }).finally(() => {
4186
- isLoading = false;
4187
- });
4188
- }
4189
- function setCursorPosition(elem, pos) {
4190
- elem.focus();
4191
- elem.setSelectionRange(pos, pos);
4192
- }
4193
- function clearChat() {
4194
- axios.post(props.apiEndpoint + "/prompt/clear", {
4195
- username: props.username,
4196
- project: props.projectPath
4197
- }).then((response) => {
4198
- if (response.status != 200 || !response.data.success) {
4199
- setDisabledState(true);
4200
- addChatMessage(props.texts.loginError);
4201
- return console.log(
4202
- `Unsuccessful login, endpoint gave status ${response.status}`
4203
- );
4204
- }
4205
- resetChat();
4206
- sendInitialMessage();
4207
- }).catch((error) => {
4208
- setDisabledState(true);
4209
- addChatMessage(props.texts.loginError);
4210
- console.log(
4211
- "The following error ocurred while trying to communicate with the endpoint: \n" + error
4212
- );
4213
- });
4214
- }
4215
- function getMessageClasses(sender) {
4216
- const classes = ["q-chatbot__messages-wrapper"];
4217
- if (sender == "user")
4218
- classes.push("q-chatbot__messages-wrapper_right");
4219
- return classes;
4220
- }
4221
- vue.watch(() => props.apiEndpoint, () => {
4222
- resetChat();
4223
- initChat();
4224
- });
4225
- return (_ctx, _cache) => {
4226
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
4227
- vue.createElementVNode("div", {
4228
- ref_key: "messagesContainer",
4229
- ref: messagesContainer,
4230
- class: "q-chatbot__content"
4231
- }, [
4232
- vue.createElementVNode("div", _hoisted_2, [
4233
- vue.createVNode(vue.unref(fe), {
4234
- title: props.texts.qButtonTitle,
4235
- "b-style": "plain",
4236
- class: "clear-btn",
4237
- disabled: vue.unref(isChatDisabled),
4238
- borderless: "",
4239
- onClick: clearChat
4240
- }, {
4241
- default: vue.withCtx(() => [
4242
- vue.createVNode(vue.unref(ee), { icon: "bin" })
4243
- ]),
4244
- _: 1
4245
- }, 8, ["title", "disabled"])
4246
- ]),
4247
- vue.createElementVNode("div", _hoisted_3, [
4248
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(messages), (message) => {
4249
- return vue.openBlock(), vue.createElementBlock("div", {
4250
- key: message.id,
4251
- class: vue.normalizeClass(getMessageClasses(message.sender))
4252
- }, [
4253
- vue.createVNode(vue.unref(_sfc_main$1), vue.mergeProps(message, {
4254
- loading: vue.unref(isLoading) && !message.message
4255
- }), null, 16, ["loading"])
4256
- ], 2);
4257
- }), 128))
4258
- ])
4259
- ], 512),
4260
- vue.createVNode(vue.unref(zo), {
4261
- size: "block",
4262
- disabled: vue.unref(isChatDisabled)
4263
- }, {
4264
- append: vue.withCtx(() => [
4265
- vue.createVNode(vue.unref(fe), {
4266
- title: props.texts.qButtonTitle,
4267
- "b-style": "primary",
4268
- class: "q-chatbot__send",
4269
- disabled: vue.unref(isChatDisabled),
4270
- onClick: sendMessage
4271
- }, {
4272
- default: vue.withCtx(() => [
4273
- vue.createVNode(vue.unref(ee), { icon: "send" })
4274
- ]),
4275
- _: 1
4276
- }, 8, ["title", "disabled"])
4277
- ]),
4278
- default: vue.withCtx(() => [
4279
- vue.createVNode(vue.unref(Pt), {
4280
- ref_key: "promptInput",
4281
- ref: promptInput,
4282
- modelValue: vue.unref(userPrompt),
4283
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(userPrompt) ? userPrompt.value = $event : userPrompt = $event),
4284
- class: "q-chatbot__input",
4285
- placeholder: props.texts.placeholderMessage,
4286
- disabled: vue.unref(isChatDisabled),
4287
- onKeyup: vue.withKeys(sendMessage, ["enter"]),
4288
- onKeydown: handleKey
4289
- }, null, 8, ["modelValue", "placeholder", "disabled"])
4290
- ]),
4291
- _: 1
4292
- }, 8, ["disabled"])
4293
- ]);
4294
- };
4295
- }
4296
- });
4297
- return _sfc_main;
4298
- });
1
+ (function(s,M){typeof exports=="object"&&typeof module<"u"?module.exports=M(require("vue")):typeof define=="function"&&define.amd?define(["vue"],M):(s=typeof globalThis<"u"?globalThis:s||self,s.ChatBotFrontend=M(s.vue))})(this,function(s){"use strict";function M(e,t){return function(){return e.apply(t,arguments)}}const{toString:ht}=Object.prototype,{getPrototypeOf:ie}=Object,Z=(e=>t=>{const n=ht.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>Z(t)===e),K=e=>t=>typeof t===e,{isArray:V}=Array,W=K("undefined");function gt(e){return e!==null&&!W(e)&&e.constructor!==null&&!W(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Re=P("ArrayBuffer");function yt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Re(e.buffer),t}const bt=K("string"),O=K("function"),Ce=K("number"),v=e=>e!==null&&typeof e=="object",wt=e=>e===!0||e===!1,$=e=>{if(Z(e)!=="object")return!1;const t=ie(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},At=P("Date"),Et=P("File"),St=P("Blob"),Bt=P("FileList"),Rt=e=>v(e)&&O(e.pipe),Ct=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=Z(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},kt=P("URLSearchParams"),[Tt,Nt,Ot,xt]=["ReadableStream","Request","Response","Headers"].map(P),Pt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),V(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let c;for(r=0;r<i;r++)c=a[r],t.call(null,e[c],c,e)}}function ke(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const I=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Te=e=>!W(e)&&e!==I;function ae(){const{caseless:e}=Te(this)&&this||{},t={},n=(r,o)=>{const a=e&&ke(t,o)||o;$(t[a])&&$(r)?t[a]=ae(t[a],r):$(r)?t[a]=ae({},r):V(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&G(arguments[r],n);return t}const Dt=(e,t,n,{allOwnKeys:r}={})=>(G(t,(o,a)=>{n&&O(o)?e[a]=M(o,n):e[a]=o},{allOwnKeys:r}),e),Ft=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},qt=(e,t,n,r)=>{let o,a,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},It=e=>{if(!e)return null;if(V(e))return e;let t=e.length;if(!Ce(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ie(Uint8Array)),Ut=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Mt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Vt=P("HTMLFormElement"),_t=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ne=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ht=P("RegExp"),Oe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};G(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Qt=e=>{Oe(e,(t,n)=>{if(O(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(O(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wt=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return V(e)?r(e):r(String(e).split(t)),n},Gt=()=>{},Jt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,le="abcdefghijklmnopqrstuvwxyz",xe="0123456789",Pe={DIGIT:xe,ALPHA:le,ALPHA_DIGIT:le+le.toUpperCase()+xe},Xt=(e=16,t=Pe.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Yt(e){return!!(e&&O(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Zt=e=>{const t=new Array(10),n=(r,o)=>{if(v(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=V(r)?[]:{};return G(r,(i,c)=>{const f=n(i,o+1);!W(f)&&(a[c]=f)}),t[o]=void 0,a}}return r};return n(e,0)},Kt=P("AsyncFunction"),vt=e=>e&&(v(e)||O(e))&&O(e.then)&&O(e.catch),De=((e,t)=>e?setImmediate:t?((n,r)=>(I.addEventListener("message",({source:o,data:a})=>{o===I&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),I.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",O(I.postMessage)),$t=typeof queueMicrotask<"u"?queueMicrotask.bind(I):typeof process<"u"&&process.nextTick||De,l={isArray:V,isArrayBuffer:Re,isBuffer:gt,isFormData:Ct,isArrayBufferView:yt,isString:bt,isNumber:Ce,isBoolean:wt,isObject:v,isPlainObject:$,isReadableStream:Tt,isRequest:Nt,isResponse:Ot,isHeaders:xt,isUndefined:W,isDate:At,isFile:Et,isBlob:St,isRegExp:Ht,isFunction:O,isStream:Rt,isURLSearchParams:kt,isTypedArray:jt,isFileList:Bt,forEach:G,merge:ae,extend:Dt,trim:Pt,stripBOM:Ft,inherits:Lt,toFlatObject:qt,kindOf:Z,kindOfTest:P,endsWith:zt,toArray:It,forEachEntry:Ut,matchAll:Mt,isHTMLForm:Vt,hasOwnProperty:Ne,hasOwnProp:Ne,reduceDescriptors:Oe,freezeMethods:Qt,toObjectSet:Wt,toCamelCase:_t,noop:Gt,toFiniteNumber:Jt,findKey:ke,global:I,isContextDefined:Te,ALPHABET:Pe,generateString:Xt,isSpecCompliantForm:Yt,toJSONObject:Zt,isAsyncFn:Kt,isThenable:vt,setImmediate:De,asap:$t};function y(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}l.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Fe=y.prototype,Le={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Le[e]={value:e}}),Object.defineProperties(y,Le),Object.defineProperty(Fe,"isAxiosError",{value:!0}),y.from=(e,t,n,r,o,a)=>{const i=Object.create(Fe);return l.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),y.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const en=null;function ce(e){return l.isPlainObject(e)||l.isArray(e)}function qe(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,n){return e?e.concat(t).map(function(o,a){return o=qe(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function tn(e){return l.isArray(e)&&!e.some(ce)}const nn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ee(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,h){return!l.isUndefined(h[b])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!f&&l.isBlob(m))throw new y("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?f&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,b,h){let E=m;if(m&&!h&&typeof m=="object"){if(l.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&tn(m)||(l.isFileList(m)||l.endsWith(b,"[]"))&&(E=l.toArray(m)))return b=qe(b),E.forEach(function(C,x){!(l.isUndefined(C)||C===null)&&t.append(i===!0?ze([b],x,a):i===null?b:b+"[]",d(C))}),!1}return ce(m)?!0:(t.append(ze(h,b,a),d(m)),!1)}const p=[],w=Object.assign(nn,{defaultVisitor:u,convertValue:d,isVisitable:ce});function B(m,b){if(!l.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(m),l.forEach(m,function(E,R){(!(l.isUndefined(E)||E===null)&&o.call(t,E,l.isString(R)?R.trim():R,b,w))===!0&&B(E,b?b.concat(R):[R])}),p.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return B(e),t}function Ie(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function de(e,t){this._pairs=[],e&&ee(e,this,t)}const je=de.prototype;je.append=function(t,n){this._pairs.push([t,n])},je.toString=function(t){const n=t?function(r){return t.call(this,r,Ie)}:Ie;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ue(e,t,n){if(!t)return e;const r=n&&n.encode||rn,o=n&&n.serialize;let a;if(o?a=o(t,n):a=l.isURLSearchParams(t)?t.toString():new de(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Me{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ve={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},on={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:de,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ue=typeof window<"u"&&typeof document<"u",fe=typeof navigator=="object"&&navigator||void 0,sn=ue&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),an=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ln=ue&&window.location.href||"http://localhost",T={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ue,hasStandardBrowserEnv:sn,hasStandardBrowserWebWorkerEnv:an,navigator:fe,origin:ln},Symbol.toStringTag,{value:"Module"})),...on};function cn(e,t){return ee(e,new T.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return T.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function dn(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function un(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function _e(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=a>=n.length;return i=!i&&l.isArray(o)?o.length:i,f?(l.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!c):((!o[i]||!l.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&l.isArray(o[i])&&(o[i]=un(o[i])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,o)=>{t(dn(r),o,n,0)}),n}return null}function fn(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const J={transitional:Ve,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=l.isObject(t);if(a&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return o?JSON.stringify(_e(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cn(t,this.formSerializer).toString();if((c=l.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ee(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),fn(t)):t}],transformResponse:[function(t){const n=this.transitional||J.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{J.headers[e]={}});const pn=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mn=e=>{const t={};let n,r,o;return e&&e.split(`
2
+ `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&pn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},He=Symbol("internals");function X(e){return e&&String(e).trim().toLowerCase()}function te(e){return e===!1||e==null?e:l.isArray(e)?e.map(te):String(e)}function hn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const gn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pe(e,t,n,r,o){if(l.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!l.isString(t)){if(l.isString(r))return t.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(t)}}function yn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bn(e,t){const n=l.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}class N{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,f,d){const u=X(f);if(!u)throw new Error("header name must be a non-empty string");const p=l.findKey(o,u);(!p||o[p]===void 0||d===!0||d===void 0&&o[p]!==!1)&&(o[p||f]=te(c))}const i=(c,f)=>l.forEach(c,(d,u)=>a(d,u,f));if(l.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(l.isString(t)&&(t=t.trim())&&!gn(t))i(mn(t),n);else if(l.isHeaders(t))for(const[c,f]of t.entries())a(f,c,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=X(t),t){const r=l.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return hn(o);if(l.isFunction(n))return n.call(this,o,r);if(l.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=X(t),t){const r=l.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=X(i),i){const c=l.findKey(r,i);c&&(!n||pe(r,r[c],c,n))&&(delete r[c],o=!0)}}return l.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||pe(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return l.forEach(this,(o,a)=>{const i=l.findKey(r,a);if(i){n[i]=te(o),delete n[a];return}const c=t?yn(a):String(a).trim();c!==a&&delete n[a],n[c]=te(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return l.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&l.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[He]=this[He]={accessors:{}}).accessors,o=this.prototype;function a(i){const c=X(i);r[c]||(bn(o,i),r[c]=!0)}return l.isArray(t)?t.forEach(a):a(t),this}}N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(N.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),l.freezeMethods(N);function me(e,t){const n=this||J,r=t||n,o=N.from(r.headers);let a=r.data;return l.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Qe(e){return!!(e&&e.__CANCEL__)}function _(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(_,y,{__CANCEL__:!0});function We(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function An(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),u=r[a];i||(i=d),n[o]=f,r[o]=d;let p=a,w=0;for(;p!==o;)w+=n[p++],p=p%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),d-i<t)return;const B=u&&d-u;return B?Math.round(w*1e3/B):void 0}}function En(e,t){let n=0,r=1e3/t,o,a;const i=(d,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),p=u-n;p>=r?i(d,u):(o=d,a||(a=setTimeout(()=>{a=null,i(o)},r-p)))},()=>o&&i(o)]}const ne=(e,t,n=3)=>{let r=0;const o=An(50,250);return En(a=>{const i=a.loaded,c=a.lengthComputable?a.total:void 0,f=i-r,d=o(f),u=i<=c;r=i;const p={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:d||void 0,estimated:d&&c&&u?(c-i)/d:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},Ge=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Je=e=>(...t)=>l.asap(()=>e(...t)),Sn=T.hasStandardBrowserEnv?function(){const t=T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent),n=document.createElement("a");let r;function o(a){let i=a;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const c=l.isString(i)?o(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Bn=T.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),l.isString(r)&&i.push("path="+r),l.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Rn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xe(e,t){return e&&!Rn(t)?Cn(e,t):t}const Ye=e=>e instanceof N?{...e}:e;function j(e,t){t=t||{};const n={};function r(d,u,p){return l.isPlainObject(d)&&l.isPlainObject(u)?l.merge.call({caseless:p},d,u):l.isPlainObject(u)?l.merge({},u):l.isArray(u)?u.slice():u}function o(d,u,p){if(l.isUndefined(u)){if(!l.isUndefined(d))return r(void 0,d,p)}else return r(d,u,p)}function a(d,u){if(!l.isUndefined(u))return r(void 0,u)}function i(d,u){if(l.isUndefined(u)){if(!l.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function c(d,u,p){if(p in t)return r(d,u);if(p in e)return r(void 0,d)}const f={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(d,u)=>o(Ye(d),Ye(u),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(u){const p=f[u]||o,w=p(e[u],t[u],u);l.isUndefined(w)&&p!==c||(n[u]=w)}),n}const Ze=e=>{const t=j({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:c}=t;t.headers=i=N.from(i),t.url=Ue(Xe(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(l.isFormData(n)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[d,...u]=f?f.split(";").map(p=>p.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(T.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(t)),r||r!==!1&&Sn(t.url))){const d=o&&a&&Bn.read(a);d&&i.set(o,d)}return t},kn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Ze(e);let a=o.data;const i=N.from(o.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:d}=o,u,p,w,B,m;function b(){B&&B(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function E(){if(!h)return;const C=N.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),k={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:e,request:h};We(function(L){n(L),b()},function(L){r(L),b()},k),h=null}"onloadend"in h?h.onloadend=E:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(E)},h.onabort=function(){h&&(r(new y("Request aborted",y.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||Ve;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new y(x,k.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,h)),h=null},a===void 0&&i.setContentType(null),"setRequestHeader"in h&&l.forEach(i.toJSON(),function(x,k){h.setRequestHeader(k,x)}),l.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),c&&c!=="json"&&(h.responseType=o.responseType),d&&([w,m]=ne(d,!0),h.addEventListener("progress",w)),f&&h.upload&&([p,B]=ne(f),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",B)),(o.cancelToken||o.signal)&&(u=C=>{h&&(r(!C||C.type?new _(null,e,h):C),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const R=wn(o.url);if(R&&T.protocols.indexOf(R)===-1){r(new y("Unsupported protocol "+R+":",y.ERR_BAD_REQUEST,e));return}h.send(a||null)})},Tn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(d){if(!o){o=!0,c();const u=d instanceof Error?d:this.reason;r.abort(u instanceof y?u:new _(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>l.asap(c),f}},Nn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},On=async function*(e,t){for await(const n of xn(e))yield*Nn(n,t)},xn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Ke=(e,t,n,r)=>{const o=On(e,t);let a=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:u}=await o.next();if(d){c(),f.close();return}let p=u.byteLength;if(n){let w=a+=p;n(w)}f.enqueue(new Uint8Array(u))}catch(d){throw c(d),d}},cancel(f){return c(f),o.return()}},{highWaterMark:2})},re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ve=re&&typeof ReadableStream=="function",Pn=re&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),$e=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dn=ve&&$e(()=>{let e=!1;const t=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),et=64*1024,he=ve&&$e(()=>l.isReadableStream(new Response("").body)),oe={stream:he&&(e=>e.body)};re&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!oe[t]&&(oe[t]=l.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,r)})})})(new Response);const Fn=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(T.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await Pn(e)).byteLength},Ln=async(e,t)=>{const n=l.toFiniteNumber(e.getContentLength());return n??Fn(t)},ge={http:en,xhr:kn,fetch:re&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:d,headers:u,withCredentials:p="same-origin",fetchOptions:w}=Ze(e);d=d?(d+"").toLowerCase():"text";let B=Tn([o,a&&a.toAbortSignal()],i),m;const b=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let h;try{if(f&&Dn&&n!=="get"&&n!=="head"&&(h=await Ln(u,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(l.isFormData(r)&&(F=k.headers.get("content-type"))&&u.setContentType(F),k.body){const[L,H]=Ge(h,ne(Je(f)));r=Ke(k.body,et,L,H)}}l.isString(p)||(p=p?"include":"omit");const E="credentials"in Request.prototype;m=new Request(t,{...w,signal:B,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:E?p:void 0});let R=await fetch(m);const C=he&&(d==="stream"||d==="response");if(he&&(c||C&&b)){const k={};["status","statusText","headers"].forEach(g=>{k[g]=R[g]});const F=l.toFiniteNumber(R.headers.get("content-length")),[L,H]=c&&Ge(F,ne(Je(c),!0))||[];R=new Response(Ke(R.body,et,L,()=>{H&&H(),b&&b()}),k)}d=d||"text";let x=await oe[l.findKey(oe,d)||"text"](R,e);return!C&&b&&b(),await new Promise((k,F)=>{We(k,F,{data:x,headers:N.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:m})})}catch(E){throw b&&b(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,m),{cause:E.cause||E}):y.from(E,E&&E.code,e,m)}})};l.forEach(ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tt=e=>`- ${e}`,qn=e=>l.isFunction(e)||e===null||e===!1,nt={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!qn(n)&&(r=ge[(i=String(n)).toLowerCase()],r===void 0))throw new y(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
4
+ `+a.map(tt).join(`
5
+ `):" "+tt(a[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ge};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _(null,e)}function rt(e){return ye(e),e.headers=N.from(e.headers),e.data=me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),nt.getAdapter(e.adapter||J.adapter)(e).then(function(r){return ye(e),r.data=me.call(e,e.transformResponse,r),r.headers=N.from(r.headers),r},function(r){return Qe(r)||(ye(e),r&&r.response&&(r.response.data=me.call(e,e.transformResponse,r.response),r.response.headers=N.from(r.response.headers))),Promise.reject(r)})}const ot="1.7.7",be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{be[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const st={};be.transitional=function(t,n,r){function o(a,i){return"[Axios v"+ot+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,c)=>{if(t===!1)throw new y(o(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!st[i]&&(st[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function zn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const c=e[a],f=c===void 0||i(c,a,e);if(f!==!0)throw new y("option "+a+" must be "+f,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+a,y.ERR_BAD_OPTION)}}const we={assertOptions:zn,validators:be},z=we.validators;class U{constructor(t){this.defaults=t,this.interceptors={request:new Me,response:new Me}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=j(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&we.assertOptions(r,{silentJSONParsing:z.transitional(z.boolean),forcedJSONParsing:z.transitional(z.boolean),clarifyTimeoutError:z.transitional(z.boolean)},!1),o!=null&&(l.isFunction(o)?n.paramsSerializer={serialize:o}:we.assertOptions(o,{encode:z.function,serialize:z.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&l.merge(a.common,a[n.method]);a&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=N.concat(i,a);const c=[];let f=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(f=f&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let u,p=0,w;if(!f){const m=[rt.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,d),w=m.length,u=Promise.resolve(n);p<w;)u=u.then(m[p++],m[p++]);return u}w=c.length;let B=n;for(p=0;p<w;){const m=c[p++],b=c[p++];try{B=m(B)}catch(h){b.call(this,h);break}}try{u=rt.call(this,B)}catch(m){return Promise.reject(m)}for(p=0,w=d.length;p<w;)u=u.then(d[p++],d[p++]);return u}getUri(t){t=j(this.defaults,t);const n=Xe(t.baseURL,t.url);return Ue(n,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){U.prototype[t]=function(n,r){return this.request(j(r||{},{method:t,url:n,data:(r||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(j(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}U.prototype[t]=n(),U.prototype[t+"Form"]=n(!0)});class Ae{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new _(a,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ae(function(o){t=o}),cancel:t}}}function In(e){return function(n){return e.apply(null,n)}}function jn(e){return l.isObject(e)&&e.isAxiosError===!0}const Ee={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ee).forEach(([e,t])=>{Ee[t]=e});function it(e){const t=new U(e),n=M(U.prototype.request,t);return l.extend(n,U.prototype,t,{allOwnKeys:!0}),l.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return it(j(e,o))},n}const S=it(J);S.Axios=U,S.CanceledError=_,S.CancelToken=Ae,S.isCancel=Qe,S.VERSION=ot,S.toFormData=ee,S.AxiosError=y,S.Cancel=S.CanceledError,S.all=function(t){return Promise.all(t)},S.spread=In,S.isAxiosError=jn,S.mergeConfig=j,S.AxiosHeaders=N,S.formToJSON=e=>_e(l.isHTMLForm(e)?new FormData(e):e),S.getAdapter=nt.getAdapter,S.HttpStatusCode=Ee,S.default=S;const Un="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29t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+Rklbag+Cbes3J49vmb9bzEa+23WrDMDx54vEcizUN/7pVePO/gtYTWmY41M7PYfZAPAZAe3b3N6GnCilflTDNw3JV6S/mqLJs1BtfC3abFBgUeoTZD82zAQX5+j4NYrMSLqOic3XklJDB+arVU0cLDng4jvJKqgJmszrfrSPQlXvtpkAfIRARcETaLPQZC1vOTVfD8+PMEN7xE1rbLBGfm8eGnf3ulDBo/jqWxHpoUk3inYv7tLw4LkgYkbyQMi0aKC9Qua9u4Rn15OeZSTIj5gHCBAfzES7GS1Dym9pebpPx8ZBbouWwhOzY7JCwUsdS/h/3Il9/9PZ8v8XwIFqvI0C/r8H77z8J9oN+H36TiNsW/Qz3FXtgSkrbHxsIBE0hwxNkfKGUuV8mwvARwhUiziZhJBl5i5I1IMmAQuIRD0HtPXdj9dRcMfxQV6czvt/tG/ScJIWRYomaHaOJo93Sr1GChLd3u9o3l7ar3fRFK6MsPXu13n32XIHQ8HdO2iL5aR1MS0AX7zxW/VQsxb+3tXCXdwjgUuJ1cAuUiDHVdzI1JTZmNVOFmbfOjh1U1vcR0w89lc3V9OCFbekm7gJWWbom23h4vWajkU4NWaVWZnGo3bYVeNkvnKzMPeuYamVbX1fMfnePb+x2owCmGDRwWVYJAxINUJ2holLTDWAtj2QXesED7r0+uomOFzvYnbY3LDMrIMltw1JtcbavbYrx4vCyMLNcIMG+mEc0AuLkByjlkvDzwn42YIxghm/M2DsoMcYQmNQyIugi6YynMWy3OXwgBPLdbvTA7YmFhqcLFNtd0Mpfr8Hj/tdq4FN9xWkHmkvz7RDl7yP/1CdqGW83dgwWE/FPzZO2E9Bazl5kR3dMj9yBr21Fctofh9/X/vIiNS6jvqMGI7jQMWpC436CFQBqFAFoEIVgIpTEv8PTBPiNKVw25gAAAAASUVORK5CYII=",Mn=s.defineComponent({__name:"QSpinnerLoader",props:{size:{default:48},class:{default:void 0}},setup(e){const t=e,n=s.computed(()=>({"font-size":t.size!==48?`${t.size}px`:void 0}));return(r,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["q-spinner-loader",t.class]),style:s.normalizeStyle(n.value)},null,6))}});function Se(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function at(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Be(e={},t={}){const n={};for(const r in e)n[r]=e[r];for(const r in t){const o=e[r],a=t[r];if(at(o)&&at(a)){n[r]=Be(o,a);continue}n[r]=a}return n}const lt="q-defaults";function Vn(){var e,t;const n=s.getCurrentInstance();if(!n)throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");const r=n.type.name??n.type.__name;if(!r)throw new Error("[Quidgest UI] Could not determine component name");const o=ct(),a=(e=o.value)==null?void 0:e.Global,i=(t=o.value)==null?void 0:t[r];return s.computed(()=>Be(a,i))}function _n(e){if(Se(e))return;const t=ct(),n=s.ref(e),r=s.computed(()=>Se(n.value)?t.value:Be(t.value,n.value));s.provide(lt,r)}function ct(){const e=s.inject(lt,void 0);if(!e)throw new Error("[Quidgest UI] Could not find defaults instance");return e}function Hn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([A-Za-z])/g,"$1-$2").replace(/([A-Za-z])([0-9])/g,"$1-$2").toLowerCase()}function Qn(e,t){var n;const r=Hn(t);return r?typeof((n=e.props)==null?void 0:n[r])<"u":!1}function D(e){const t=e.setup;return t&&(e.setup=(n,r)=>{const o=Vn();if(Se(o.value))return t(n,r);const a=s.getCurrentInstance();if(a===null)return t(n,r);const i=new Proxy(n,{get(c,f){var d;const u=Reflect.get(c,f),p=(d=o.value)==null?void 0:d[f];return typeof f=="string"&&!Qn(a.vnode,f)?p??u:u}});return t(i,r)}),e}const Wn=D(Mn),Gn=["disabled"],Jn={key:0,class:"q-btn__spinner"},Xn={class:"q-btn__content"},dt=D(s.defineComponent({__name:"QButton",props:{active:{type:Boolean},bStyle:{default:"secondary"},label:{default:""},disabled:{type:Boolean},iconOnRight:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},loading:{type:Boolean},size:{default:"regular"},class:{default:void 0}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,o=s.computed(()=>n.disabled||n.loading);function a(c){o.value||r("click",c)}const i=s.computed(()=>{const c=n.size!=="regular"?`q-btn--${n.size}`:void 0;return["q-btn",`q-btn--${n.bStyle}`,c,{"q-btn--active":n.active,"q-btn--borderless":n.borderless,"q-btn--elevated":n.elevated,"q-btn--block":n.block,"q-btn--loading":n.loading},n.class]});return(c,f)=>(s.openBlock(),s.createElementBlock("button",{type:"button",class:s.normalizeClass(i.value),disabled:o.value,onClick:s.withModifiers(a,["stop","prevent"])},[c.loading?(s.openBlock(),s.createElementBlock("div",Jn,[s.createVNode(s.unref(Wn),{size:20})])):s.createCommentVNode("v-if",!0),s.createElementVNode("span",Xn,[c.iconOnRight?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(n.label),1)],64)):s.createCommentVNode("v-if",!0),s.renderSlot(c.$slots,"default"),c.iconOnRight?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(n.label),1)],64))])],10,Gn))}})),Yn=s.defineComponent({__name:"QIcon",props:{icon:{},size:{default:void 0},class:{default:void 0},type:{default:"svg"}},setup(e){const t=e,n=s.computed(()=>{switch(t.type){case"svg":return sr;case"font":return rr;case"img":return or;default:return}});return(r,o)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.value),{class:s.normalizeClass(t.class),icon:t.icon,size:t.size},null,8,["class","icon","size"]))}}),Zn=s.defineComponent({__name:"QIconFont",props:{icon:{},size:{default:void 0},class:{default:void 0},library:{default:""},variant:{default:""}},setup(e){const t=e,n=s.computed(()=>t.variant?`${t.library}-${t.variant}`:t.library),r=s.computed(()=>t.library&&t.icon?`${t.library}-${t.icon}`:t.icon),o=s.computed(()=>({"font-size":t.size!==void 0?`${t.size}px`:void 0}));return(a,i)=>(s.openBlock(),s.createElementBlock("i",{class:s.normalizeClass(["q-icon","q-icon__font",n.value,r.value,t.class]),style:s.normalizeStyle(o.value)},null,6))}}),Kn=["src"],vn=s.defineComponent({__name:"QIconImg",props:{icon:{},size:{},class:{}},setup(e){const t=e,n=s.computed(()=>({"font-size":t.size!==void 0?`${t.size}px`:void 0}));return(r,o)=>(s.openBlock(),s.createElementBlock("img",{src:t.icon,class:s.normalizeClass(["q-icon","q-icon__img",t.class]),style:s.normalizeStyle(n.value)},null,14,Kn))}}),Y={},$n=s.defineComponent({name:"InlineSvg",emits:{loaded:e=>typeof e=="object",unloaded:()=>!0,error:e=>typeof e=="object"},inheritAttrs:!1,render(){if(!this.svgElSource)return null;const e=this.getSvgContent(this.svgElSource);if(!e)return s.h("div",this.$attrs);const t={};return this.copySvgAttrs(t,this.svgElSource),this.copySvgAttrs(t,e),this.copyComponentAttrs(t,this.$attrs),t.innerHTML=e.innerHTML,s.h("svg",t)},props:{src:{type:String,required:!0},symbol:{type:String,default:""},title:{type:String,default:""},transformSource:{type:Function,default:void 0},keepDuringLoading:{type:Boolean,default:!0}},data(){return{svgElSource:null}},async mounted(){await this.getSource(this.src)},methods:{copySvgAttrs(e,t){const n=t.attributes;if(n)for(const r of n)e[r.name]=r.value},copyComponentAttrs(e,t){for(const[n,r]of Object.entries(t))r!==!1&&r!==null&&r!==void 0&&(e[n]=r)},getSvgContent(e){return this.symbol&&(e=e.getElementById(this.symbol),!e)?null:(this.transformSource&&(e=e.cloneNode(!0),e=this.transformSource(e)),this.title&&(this.transformSource||(e=e.cloneNode(!0)),er(e,this.title)),e)},async getSource(e){try{Y[e]||(Y[e]=tr(this.download(e))),this.svgElSource&&Y[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded"));const t=await Y[e];this.svgElSource=t,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(t){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete Y[e],this.$emit("error",t)}},async download(e){const t=await fetch(e);if(!t.ok)throw new Error("Error loading SVG");const n=await t.text(),r=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("svg")[0];if(!r)throw new Error("Loaded file is not a valid SVG");return r}},watch:{src(e){this.getSource(e)}},expose:[]});function er(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const r=document.createElementNS("http://www.w3.org/2000/svg","title");r.textContent=t,e.insertBefore(r,e.firstChild)}}function tr(e){if(e.getIsPending)return e;let t=!0;const n=e.then(r=>(t=!1,r),r=>{throw t=!1,r});return n.getIsPending=()=>t,n}const nr=s.defineComponent({__name:"QIconSvg",props:{icon:{},size:{default:void 0},class:{default:void 0},bundle:{default:""}},emits:["loaded","unloaded"],setup(e,{emit:t}){const n=e,r=t,o=s.computed(()=>({"font-size":n.size!==void 0?`${n.size}px`:void 0}));function a(c){r("loaded",c)}function i(){r("unloaded")}return(c,f)=>(s.openBlock(),s.createBlock(s.unref($n),{class:s.normalizeClass(["q-icon","q-icon__svg",n.class]),src:n.bundle,symbol:n.icon,style:s.normalizeStyle(o.value),onLoaded:a,onUnloaded:i},null,8,["class","src","symbol","style"]))}}),se=D(Yn),rr=D(Zn),or=D(vn),sr=D(nr);let ir=0;function ut(e){return e||`uid-${++ir}`}const ar=["id"],lr={key:0,class:"q-field__label"},cr=["for"],dr={key:0,class:"q-field__prepend"},ur={key:1,class:"q-field__append"},fr={key:1,class:"q-field__extras"},ft=D(s.defineComponent({inheritAttrs:!1,__name:"QField",props:{id:{default:void 0},label:{default:""},for:{default:void 0},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},class:{default:void 0}},setup(e,{expose:t}){const n=e,r=ut(n.id),o=s.ref(null),a=s.computed(()=>n.required&&!n.readonly&&!n.disabled);return t({fieldRef:o}),(i,c)=>(s.openBlock(),s.createElementBlock("div",{id:s.unref(r),class:s.normalizeClass(["q-field",`q-field--${n.size}`,{"q-field--readonly":n.readonly,"q-field--disabled":n.disabled,"q-field--required":a.value},n.class])},[n.label?(s.openBlock(),s.createElementBlock("div",lr,[s.renderSlot(i.$slots,"label.prepend"),s.createElementVNode("label",{for:n.for},s.toDisplayString(n.label),9,cr),s.renderSlot(i.$slots,"label.append")])):s.createCommentVNode("v-if",!0),s.renderSlot(i.$slots,"control",{},()=>[s.createElementVNode("div",s.mergeProps({class:"q-field__control",ref_key:"fieldRef",ref:o},i.$attrs),[i.$slots.prepend?(s.openBlock(),s.createElementBlock("div",dr,[s.renderSlot(i.$slots,"prepend")])):s.createCommentVNode("v-if",!0),s.renderSlot(i.$slots,"default"),i.$slots.append?(s.openBlock(),s.createElementBlock("div",ur,[s.renderSlot(i.$slots,"append")])):s.createCommentVNode("v-if",!0)],16)]),i.$slots.extras?(s.openBlock(),s.createElementBlock("div",fr,[s.renderSlot(i.$slots,"extras")])):s.createCommentVNode("v-if",!0)],10,ar))}})),pr=["id","type","role","required","placeholder","readonly","disabled","maxlength"],mr=D(s.defineComponent({inheritAttrs:!1,__name:"QTextField",props:s.mergeModels({id:{default:void 0},placeholder:{default:""},label:{default:""},size:{default:void 0},maxLength:{default:void 0},readonly:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},role:{default:void 0},type:{default:"text"},class:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=e,r=s.useModel(e,"modelValue"),o=ut(n.id),a=s.ref(null),i=s.ref(null),c=s.computed(()=>n.readonly||n.disabled?"":n.placeholder);return t({fieldRef:s.computed(()=>{var f;return(f=a.value)==null?void 0:f.fieldRef}),inputRef:i}),(f,d)=>(s.openBlock(),s.createBlock(s.unref(ft),{ref_key:"fieldRef",ref:a,class:s.normalizeClass(["q-text-field",n.class]),for:s.unref(o),label:n.label,size:n.size,readonly:n.readonly,disabled:n.disabled,required:n.required},s.createSlots({"label.prepend":s.withCtx(()=>[s.renderSlot(f.$slots,"label.prepend")]),"label.append":s.withCtx(()=>[s.renderSlot(f.$slots,"label.append")]),default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("input",s.mergeProps({"onUpdate:modelValue":d[0]||(d[0]=u=>r.value=u),ref_key:"inputRef",ref:i,id:s.unref(o),class:"q-text-field__input",type:n.type,role:n.role,required:n.required,placeholder:c.value,readonly:n.readonly,disabled:n.disabled,maxlength:n.maxLength},f.$attrs),null,16,pr),[[s.vModelDynamic,r.value]])]),_:2},[f.$slots.prepend?{name:"prepend",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"prepend")]),key:"0"}:void 0,f.$slots.append?{name:"append",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"append")]),key:"1"}:void 0,f.$slots.extras?{name:"extras",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","size","readonly","disabled","required"]))}})),hr={key:0,class:"q-input-group__prepend"},gr={key:0},yr={key:1,class:"q-input-group__append"},br={key:0},wr=D(s.defineComponent({__name:"QInputGroup",props:{id:{default:void 0},label:{default:""},required:{type:Boolean},prependIcon:{default:void 0},appendIcon:{default:void 0},size:{default:"large"},class:{default:void 0}},setup(e){const t=e;return _n({QField:{size:"block"}}),(n,r)=>(s.openBlock(),s.createBlock(s.unref(ft),{id:t.id,class:s.normalizeClass(["q-input-group",t.class]),label:t.label,required:t.required,size:t.size},s.createSlots({default:s.withCtx(()=>[n.$slots.prepend||t.prependIcon?(s.openBlock(),s.createElementBlock("div",hr,[t.prependIcon?(s.openBlock(),s.createElementBlock("span",gr,[s.createVNode(s.unref(se),s.normalizeProps(s.guardReactiveProps(t.prependIcon)),null,16)])):s.createCommentVNode("v-if",!0),s.renderSlot(n.$slots,"prepend")])):s.createCommentVNode("v-if",!0),s.renderSlot(n.$slots,"default"),n.$slots.append||t.appendIcon?(s.openBlock(),s.createElementBlock("div",yr,[t.appendIcon?(s.openBlock(),s.createElementBlock("span",br,[s.createVNode(s.unref(se),s.normalizeProps(s.guardReactiveProps(t.appendIcon)),null,16)])):s.createCommentVNode("v-if",!0),s.renderSlot(n.$slots,"append")])):s.createCommentVNode("v-if",!0)]),_:2},[n.$slots.extras?{name:"extras",fn:s.withCtx(()=>[s.renderSlot(n.$slots,"extras")]),key:"0"}:void 0]),1032,["id","class","label","required","size"]))}})),Ar=D(s.defineComponent({__name:"QLineLoader",props:{class:{default:void 0}},setup(e){const t=e;return(n,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["q-line-loader",t.class])},null,2))}})),Er={class:"q-chatbot__message-container"},Sr=["src"],Br={class:"q-chatbot__message-wrapper"},Rr={key:0,class:"q-chatbot__sender"},Cr={class:"q-chatbot__message"},kr=["innerHTML"],Tr={key:1,class:"q-chatbot__text"},Nr=s.defineComponent({__name:"CBMessage",props:{sender:{default:"user"},message:{},date:{default:()=>new Date},loading:{type:Boolean},dateFormat:{}},setup(e){const t=e,n=s.computed(()=>t.sender==="bot"?"GenioBot":"You"),r=s.computed(()=>t.dateFormat?a(t.date,t.dateFormat):t.date.toLocaleString()),o=s.computed(()=>`${n.value} ${r.value}`);function a(i,c){const f=i.getDate().toString().padStart(2,"0"),d=(i.getMonth()+1).toString().padStart(2,"0"),u=i.getFullYear().toString().padStart(2,"0"),p=i.getHours().toString().padStart(2,"0"),w=i.getMinutes().toString().padStart(2,"0"),B=i.getSeconds().toString().padStart(2,"0");return c.replace("dd",f).replace("MM",d).replace("yyyy",u).replace("HH",p).replace("mm",w).replace("ss",B)}return(i,c)=>(s.openBlock(),s.createElementBlock("div",Er,[t.sender==="bot"?(s.openBlock(),s.createElementBlock("img",{key:0,src:s.unref(Un),alt:"Chatbot",class:"q-chatbot__profile"},null,8,Sr)):s.createCommentVNode("",!0),s.createElementVNode("div",Br,[i.loading?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",Rr,s.toDisplayString(o.value),1)),s.createElementVNode("div",Cr,[i.loading?(s.openBlock(),s.createBlock(s.unref(Ar),{key:0})):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[t.sender=="bot"?(s.openBlock(),s.createElementBlock("div",{key:0,class:"q-chatbot__text",innerHTML:t.message},null,8,kr)):(s.openBlock(),s.createElementBlock("div",Tr,s.toDisplayString(t.message),1))],64))])])]))}}),Or={class:"q-chatbot"},xr={class:"q-chatbot__content"},Pr={class:"q-chatbot__tools"},Dr={class:"q-chatbot__messages-container"};return s.defineComponent({name:"ChatBot",__name:"ChatBot",props:{apiEndpoint:{default:"http://localhost:3000"},texts:{default:()=>({chatbotTitle:"ChatBot",qButtonTitle:"Send message",placeholderMessage:"Type your message here...",initialMessage:"Howdy! I am GenioBot 👋, Quidgest's personal AI assistant! How can I help you?",loginError:"Uh oh, I could not authenticate with the Quidgest API endpoint 😓",botIsSick:"*cough cough* GenioBot is not feeling alright 🥴️🤒, looks like something failed!"})},username:{},projectPath:{},dateFormat:{}},setup(e){let t=s.ref([]),n=[],r=1,o=s.ref(""),a=s.ref(!1),i=!1;const c=s.ref(null),f=s.ref(null),d=e;s.onMounted(()=>{w()});const u=s.computed(()=>t.value.filter(g=>g.sender==="user"));function p(g){i=g}function w(){S.post(d.apiEndpoint+"/auth/login",{username:d.username,password:"test"}).then(g=>{if(g.status!=200||!g.data.success)return p(!0),m(d.texts.loginError),console.log(`Unsuccessful login, endpoint gave status ${g.status}`);B()}).catch(g=>{p(!0),m(d.texts.loginError),console.log(`The following error ocurred while trying to login:
7
+ `+g)})}function B(){S.post(d.apiEndpoint+"/prompt/load",{username:d.username,project:d.projectPath}).then(g=>{if(g.status!=200||!g.data.success)return p(!0),m(d.texts.loginError),console.log(`Unsuccessful load, endpoint gave status ${g.status}`);h(),g.data.history.forEach(A=>{m(A.content,A.type==="ai"?"bot":"user")})}).catch(g=>{p(!0),m(d.texts.loginError),console.log(`The following error ocurred while trying to login:
8
+ `+g)})}function m(g,A="bot"){t.value.push({id:r++,message:g,date:new Date,sender:A}),s.nextTick(R)}function b(){return t.value.find(g=>g.id===r-1)}function h(){m(d.texts.initialMessage)}function E(){t.value=[],n=[],o.value="",a.value=!1,p(!1)}function R(){var g;(g=c.value)==null||g.scrollIntoView({behavior:"smooth"})}function C(g){if(f.value!=null){if(g.key=="ArrowUp"){if(u.value.length==0)return;let A=u.value[u.value.length-1-n.length];if(!A)return;n.push(o.value),o.value=A.message,s.nextTick(()=>F(f.value,A.message.length))}else if(g.key=="ArrowDown"){let A=n.pop();if(!A){o.value="";return}o.value=A}}}function x(){o.value.trim().length==0||a.value||i||(m(o.value,"user"),k(o.value),o.value="")}function k(g){m("");let A=b(),q={message:g,project:d.projectPath,user:d.username};a.value=!0,S({url:d.apiEndpoint+"/prompt/message",method:"POST",data:q,onDownloadProgress:Q=>{var pt,mt;const Fr=(pt=Q.event)==null?void 0:pt.currentTarget.response;((mt=Q.event)==null?void 0:mt.currentTarget.status)==200&&(A&&(A.message=Fr),R())}}).then(({data:Q})=>{A&&(A.message=Q)}).catch(Q=>{m(d.texts.botIsSick),p(!0),console.log(Q)}).finally(()=>{a.value=!1})}function F(g,A){g.focus(),g.setSelectionRange(A,A)}function L(){S.post(d.apiEndpoint+"/prompt/clear",{username:d.username,project:d.projectPath}).then(g=>{if(g.status!=200||!g.data.success)return p(!0),m(d.texts.loginError),console.log(`Unsuccessful login, endpoint gave status ${g.status}`);E(),h()}).catch(g=>{p(!0),m(d.texts.loginError),console.log(`The following error ocurred while trying to communicate with the endpoint:
9
+ `+g)})}function H(g){const A=["q-chatbot__messages-wrapper"];return g=="user"&&A.push("q-chatbot__messages-wrapper_right"),A}return s.watch(()=>d.apiEndpoint,()=>{E(),w()}),(g,A)=>(s.openBlock(),s.createElementBlock("div",Or,[s.createElementVNode("div",xr,[s.createElementVNode("div",Pr,[s.createVNode(s.unref(dt),{title:d.texts.qButtonTitle,"b-style":"secondary",disabled:s.unref(i),borderless:"",onClick:L},{default:s.withCtx(()=>[s.createVNode(s.unref(se),{icon:"bin"})]),_:1},8,["title","disabled"])]),s.createElementVNode("div",Dr,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(t),q=>(s.openBlock(),s.createElementBlock("div",{key:q.id,class:s.normalizeClass(H(q.sender))},[s.createVNode(s.unref(Nr),s.mergeProps({ref_for:!0},q,{"date-format":d.dateFormat,loading:s.unref(a)&&!q.message}),null,16,["date-format","loading"])],2))),128))]),s.createElementVNode("div",{ref_key:"scrollElement",ref:c},null,512)]),s.createVNode(s.unref(wr),{size:"block",disabled:s.unref(i)},{append:s.withCtx(()=>[s.createVNode(s.unref(dt),{title:d.texts.qButtonTitle,"b-style":"primary",class:"q-chatbot__send",disabled:s.unref(i)||s.unref(a),loading:s.unref(a),onClick:x},{default:s.withCtx(()=>[s.createVNode(s.unref(se),{icon:"send"})]),_:1},8,["title","disabled","loading"])]),default:s.withCtx(()=>[s.createVNode(s.unref(mr),{ref_key:"promptInput",ref:f,modelValue:s.unref(o),"onUpdate:modelValue":A[0]||(A[0]=q=>s.isRef(o)?o.value=q:o=q),class:"q-chatbot__input",placeholder:d.texts.placeholderMessage,disabled:s.unref(i),onKeyup:s.withKeys(x,["enter"]),onKeydown:C},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["disabled"])]))}})});