@n8n/chat 0.27.0 → 0.28.0
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/README.md +10 -0
- package/dist/chat.bundle.es.js +43 -78
- package/dist/chat.es.js +27 -54
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -184,6 +184,16 @@ createChat({
|
|
|
184
184
|
- **Type**: `string[]`
|
|
185
185
|
- **Description**: The initial messages to be displayed in the Chat window.
|
|
186
186
|
|
|
187
|
+
### `allowFileUploads`
|
|
188
|
+
- **Type**: `Ref<boolean> | boolean`
|
|
189
|
+
- **Default**: `false`
|
|
190
|
+
- **Description**: Whether to allow file uploads in the chat. If set to `true`, users will be able to upload files through the chat interface.
|
|
191
|
+
|
|
192
|
+
### `allowedFilesMimeTypes`
|
|
193
|
+
- **Type**: `Ref<string> | string`
|
|
194
|
+
- **Default**: `''`
|
|
195
|
+
- **Description**: A comma-separated list of allowed MIME types for file uploads. Only applicable if `allowFileUploads` is set to `true`. If left empty, all file types are allowed. For example: `'image/*,application/pdf'`.
|
|
196
|
+
|
|
187
197
|
## Customization
|
|
188
198
|
The Chat window is entirely customizable using CSS variables.
|
|
189
199
|
|
package/dist/chat.bundle.es.js
CHANGED
|
@@ -1754,8 +1754,7 @@ function gu(t) {
|
|
|
1754
1754
|
set: (j) => n[C] = j
|
|
1755
1755
|
});
|
|
1756
1756
|
});
|
|
1757
|
-
} else
|
|
1758
|
-
t.exposed || (t.exposed = {});
|
|
1757
|
+
} else t.exposed || (t.exposed = {});
|
|
1759
1758
|
P && t.render === $e && (t.render = P), oe != null && (t.inheritAttrs = oe), L && (t.components = L), ee && (t.directives = ee);
|
|
1760
1759
|
}
|
|
1761
1760
|
function mu(t, e, n = $e) {
|
|
@@ -2204,8 +2203,7 @@ const Fi = (t) => t[0] === "_" || t === "$stable", js = (t) => J(t) ? t.map(We)
|
|
|
2204
2203
|
if (r.shapeFlag & 32) {
|
|
2205
2204
|
const i = e._;
|
|
2206
2205
|
i ? n && i === 1 ? o = !1 : (ye(s, e), !n && i === 1 && delete s._) : (o = !e.$stable, Bi(e, s)), c = e;
|
|
2207
|
-
} else
|
|
2208
|
-
e && (Pi(t, e), c = { default: 1 });
|
|
2206
|
+
} else e && (Pi(t, e), c = { default: 1 });
|
|
2209
2207
|
if (o)
|
|
2210
2208
|
for (const i in s)
|
|
2211
2209
|
!Fi(i) && c[i] == null && delete s[i];
|
|
@@ -2235,8 +2233,7 @@ function ks(t, e, n, r, s = !1) {
|
|
|
2235
2233
|
if (t.f) {
|
|
2236
2234
|
const _ = h ? ie(f, a) ? f[a] : u[a] : a.value;
|
|
2237
2235
|
s ? J(_) && Rs(_, o) : J(_) ? _.includes(o) || _.push(o) : h ? (u[a] = [o], ie(f, a) && (f[a] = u[a])) : (a.value = [o], t.k && (u[t.k] = a.value));
|
|
2238
|
-
} else
|
|
2239
|
-
h ? (u[a] = c, ie(f, a) && (f[a] = c)) : d && (a.value = c, t.k && (u[t.k] = c));
|
|
2236
|
+
} else h ? (u[a] = c, ie(f, a) && (f[a] = c)) : d && (a.value = c, t.k && (u[t.k] = c));
|
|
2240
2237
|
};
|
|
2241
2238
|
c ? (m.id = -1, Ne(m, n)) : m();
|
|
2242
2239
|
}
|
|
@@ -2502,16 +2499,15 @@ function Du(t, e) {
|
|
|
2502
2499
|
}
|
|
2503
2500
|
}
|
|
2504
2501
|
N & 1 && p.children !== g.children && u(M, g.children);
|
|
2505
|
-
} else
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
);
|
|
2502
|
+
} else !E && x == null && oe(
|
|
2503
|
+
M,
|
|
2504
|
+
g,
|
|
2505
|
+
V,
|
|
2506
|
+
G,
|
|
2507
|
+
b,
|
|
2508
|
+
k,
|
|
2509
|
+
S
|
|
2510
|
+
);
|
|
2515
2511
|
((Y = G.onVnodeUpdated) || U) && Ne(() => {
|
|
2516
2512
|
Y && Ze(Y, b, g, p), U && kt(g, p, b, "updated");
|
|
2517
2513
|
}, k);
|
|
@@ -3341,8 +3337,7 @@ function Ws(t, e) {
|
|
|
3341
3337
|
const s = e._;
|
|
3342
3338
|
!s && !(kr in e) ? e._ctx = ve : s === 3 && ve && (ve.slots._ === 1 ? e._ = 1 : (e._ = 2, t.patchFlag |= 1024));
|
|
3343
3339
|
}
|
|
3344
|
-
else
|
|
3345
|
-
ne(e) ? (e = { default: e, _ctx: ve }, n = 32) : (e = String(e), r & 64 ? (n = 16, e = [Zs(e)]) : n = 8);
|
|
3340
|
+
else ne(e) ? (e = { default: e, _ctx: ve }, n = 32) : (e = String(e), r & 64 ? (n = 16, e = [Zs(e)]) : n = 8);
|
|
3346
3341
|
t.children = e, t.shapeFlag |= n;
|
|
3347
3342
|
}
|
|
3348
3343
|
function Vi(...t) {
|
|
@@ -3357,8 +3352,7 @@ function Vi(...t) {
|
|
|
3357
3352
|
else if (pr(s)) {
|
|
3358
3353
|
const o = e[s], c = r[s];
|
|
3359
3354
|
c && o !== c && !(J(o) && o.includes(c)) && (e[s] = o ? [].concat(o, c) : c);
|
|
3360
|
-
} else
|
|
3361
|
-
s !== "" && (e[s] = r[s]);
|
|
3355
|
+
} else s !== "" && (e[s] = r[s]);
|
|
3362
3356
|
}
|
|
3363
3357
|
return e;
|
|
3364
3358
|
}
|
|
@@ -3866,8 +3860,7 @@ function sf(t, e, n) {
|
|
|
3866
3860
|
const c = r[nf];
|
|
3867
3861
|
c && (n += ";" + c), r.cssText = n, o = rf.test(n);
|
|
3868
3862
|
}
|
|
3869
|
-
} else
|
|
3870
|
-
e && t.removeAttribute("style");
|
|
3863
|
+
} else e && t.removeAttribute("style");
|
|
3871
3864
|
ar in t && (t[ar] = o ? r.display : "", t[Wi] && (r.display = "none"));
|
|
3872
3865
|
}
|
|
3873
3866
|
const jo = /\s*!important$/;
|
|
@@ -3949,8 +3942,7 @@ function uf(t, e, n, r, s = null) {
|
|
|
3949
3942
|
if (r) {
|
|
3950
3943
|
const l = o[e] = df(r, s);
|
|
3951
3944
|
Gt(t, i, l, a);
|
|
3952
|
-
} else
|
|
3953
|
-
c && (lf(t, i, c, a), o[e] = void 0);
|
|
3945
|
+
} else c && (lf(t, i, c, a), o[e] = void 0);
|
|
3954
3946
|
}
|
|
3955
3947
|
}
|
|
3956
3948
|
const Jo = /(?:Once|Passive|Capture)$/;
|
|
@@ -4347,16 +4339,14 @@ function Ys(t) {
|
|
|
4347
4339
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
4348
4340
|
}
|
|
4349
4341
|
function Hf(t) {
|
|
4350
|
-
if (t.__esModule)
|
|
4351
|
-
return t;
|
|
4342
|
+
if (t.__esModule) return t;
|
|
4352
4343
|
var e = t.default;
|
|
4353
4344
|
if (typeof e == "function") {
|
|
4354
4345
|
var n = function r() {
|
|
4355
4346
|
return this instanceof r ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
|
|
4356
4347
|
};
|
|
4357
4348
|
n.prototype = e.prototype;
|
|
4358
|
-
} else
|
|
4359
|
-
n = {};
|
|
4349
|
+
} else n = {};
|
|
4360
4350
|
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(t).forEach(function(r) {
|
|
4361
4351
|
var s = Object.getOwnPropertyDescriptor(t, r);
|
|
4362
4352
|
Object.defineProperty(n, r, s.get ? s : {
|
|
@@ -4435,8 +4425,7 @@ class jf {
|
|
|
4435
4425
|
*
|
|
4436
4426
|
* @param {Node} node */
|
|
4437
4427
|
openNode(e) {
|
|
4438
|
-
if (!sc(e))
|
|
4439
|
-
return;
|
|
4428
|
+
if (!sc(e)) return;
|
|
4440
4429
|
const n = Gf(
|
|
4441
4430
|
e.scope,
|
|
4442
4431
|
{ prefix: this.classPrefix }
|
|
@@ -4493,8 +4482,7 @@ class Xs {
|
|
|
4493
4482
|
return this.stack.pop();
|
|
4494
4483
|
}
|
|
4495
4484
|
closeAllNodes() {
|
|
4496
|
-
for (; this.closeNode(); )
|
|
4497
|
-
;
|
|
4485
|
+
for (; this.closeNode(); ) ;
|
|
4498
4486
|
}
|
|
4499
4487
|
toJSON() {
|
|
4500
4488
|
return JSON.stringify(this.rootNode, null, 4);
|
|
@@ -4797,8 +4785,7 @@ function vh(t, e) {
|
|
|
4797
4785
|
}
|
|
4798
4786
|
function yh(t, e) {
|
|
4799
4787
|
if (t.match) {
|
|
4800
|
-
if (t.begin || t.end)
|
|
4801
|
-
throw new Error("begin & end are not supported with match");
|
|
4788
|
+
if (t.begin || t.end) throw new Error("begin & end are not supported with match");
|
|
4802
4789
|
t.begin = t.match, delete t.match;
|
|
4803
4790
|
}
|
|
4804
4791
|
}
|
|
@@ -4806,10 +4793,8 @@ function xh(t, e) {
|
|
|
4806
4793
|
t.relevance === void 0 && (t.relevance = 1);
|
|
4807
4794
|
}
|
|
4808
4795
|
const Eh = (t, e) => {
|
|
4809
|
-
if (!t.beforeMatch)
|
|
4810
|
-
|
|
4811
|
-
if (t.starts)
|
|
4812
|
-
throw new Error("beforeMatch cannot be used with starts");
|
|
4796
|
+
if (!t.beforeMatch) return;
|
|
4797
|
+
if (t.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
4813
4798
|
const n = Object.assign({}, t);
|
|
4814
4799
|
Object.keys(t).forEach((r) => {
|
|
4815
4800
|
delete t[r];
|
|
@@ -4930,8 +4915,7 @@ function Lh(t) {
|
|
|
4930
4915
|
}
|
|
4931
4916
|
// @ts-ignore
|
|
4932
4917
|
getMatcher(i) {
|
|
4933
|
-
if (this.multiRegexes[i])
|
|
4934
|
-
return this.multiRegexes[i];
|
|
4918
|
+
if (this.multiRegexes[i]) return this.multiRegexes[i];
|
|
4935
4919
|
const a = new n();
|
|
4936
4920
|
return this.rules.slice(i).forEach(([l, u]) => a.addRule(l, u)), a.compile(), this.multiRegexes[i] = a, a;
|
|
4937
4921
|
}
|
|
@@ -4966,8 +4950,7 @@ function Lh(t) {
|
|
|
4966
4950
|
/** @type CompiledMode */
|
|
4967
4951
|
c
|
|
4968
4952
|
);
|
|
4969
|
-
if (c.isCompiled)
|
|
4970
|
-
return a;
|
|
4953
|
+
if (c.isCompiled) return a;
|
|
4971
4954
|
[
|
|
4972
4955
|
_h,
|
|
4973
4956
|
// do this early so compiler extensions generally don't have to worry about
|
|
@@ -5090,8 +5073,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), re = v, te = C), j ==
|
|
|
5090
5073
|
H += x.substring(w), N.addText(H);
|
|
5091
5074
|
}
|
|
5092
5075
|
function Ut() {
|
|
5093
|
-
if (x === "")
|
|
5094
|
-
return;
|
|
5076
|
+
if (x === "") return;
|
|
5095
5077
|
let w = null;
|
|
5096
5078
|
if (typeof E.subLanguage == "string") {
|
|
5097
5079
|
if (!e[E.subLanguage]) {
|
|
@@ -5211,8 +5193,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), re = v, te = C), j ==
|
|
|
5211
5193
|
for (E.matcher.considerAll(); ; ) {
|
|
5212
5194
|
G++, Y ? Y = !1 : E.matcher.considerAll(), E.matcher.lastIndex = V;
|
|
5213
5195
|
const w = E.matcher.exec(C);
|
|
5214
|
-
if (!w)
|
|
5215
|
-
break;
|
|
5196
|
+
if (!w) break;
|
|
5216
5197
|
const q = C.substring(V, w.index), H = b(q, w);
|
|
5217
5198
|
V = w.index + H;
|
|
5218
5199
|
}
|
|
@@ -5272,8 +5253,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), re = v, te = C), j ==
|
|
|
5272
5253
|
);
|
|
5273
5254
|
te.unshift(j);
|
|
5274
5255
|
const re = te.sort((Te, _e) => {
|
|
5275
|
-
if (Te.relevance !== _e.relevance)
|
|
5276
|
-
return _e.relevance - Te.relevance;
|
|
5256
|
+
if (Te.relevance !== _e.relevance) return _e.relevance - Te.relevance;
|
|
5277
5257
|
if (Te.language && _e.language) {
|
|
5278
5258
|
if (Q(Te.language).supersetOf === _e.language)
|
|
5279
5259
|
return 1;
|
|
@@ -5291,8 +5271,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), re = v, te = C), j ==
|
|
|
5291
5271
|
function _(v) {
|
|
5292
5272
|
let C = null;
|
|
5293
5273
|
const j = l(v);
|
|
5294
|
-
if (a(j))
|
|
5295
|
-
return;
|
|
5274
|
+
if (a(j)) return;
|
|
5296
5275
|
if (K(
|
|
5297
5276
|
"before:highlightElement",
|
|
5298
5277
|
{ el: v, language: j }
|
|
@@ -6607,8 +6586,7 @@ const Yp = { name: "mdi-openInNew", render: Jp }, Xp = { class: "chat-file-name"
|
|
|
6607
6586
|
reset: !1
|
|
6608
6587
|
});
|
|
6609
6588
|
I((L) => {
|
|
6610
|
-
if (!L)
|
|
6611
|
-
return;
|
|
6589
|
+
if (!L) return;
|
|
6612
6590
|
const ee = new DataTransfer();
|
|
6613
6591
|
if (i.value)
|
|
6614
6592
|
for (let A = 0; A < i.value.length; A++)
|
|
@@ -6640,8 +6618,7 @@ const Yp = { name: "mdi-openInNew", render: Jp }, Xp = { class: "chat-file-name"
|
|
|
6640
6618
|
L.shiftKey || await W(L);
|
|
6641
6619
|
}
|
|
6642
6620
|
function Q(L) {
|
|
6643
|
-
if (!i.value)
|
|
6644
|
-
return;
|
|
6621
|
+
if (!i.value) return;
|
|
6645
6622
|
const ee = new DataTransfer();
|
|
6646
6623
|
for (let A = 0; A < i.value.length; A++) {
|
|
6647
6624
|
const K = i.value[A];
|
|
@@ -11276,8 +11253,7 @@ var $G = function(e, n, r, s) {
|
|
|
11276
11253
|
if (e.sCount[F] - e.blkIndent >= 4 || e.listIndent >= 0 && e.sCount[F] - e.listIndent >= 4 && e.sCount[F] < e.blkIndent)
|
|
11277
11254
|
return !1;
|
|
11278
11255
|
if (s && e.parentType === "paragraph" && e.sCount[F] >= e.blkIndent && (v = !0), (z = Nc(e, F)) >= 0) {
|
|
11279
|
-
if (f = !0, L = e.bMarks[F] + e.tShift[F], T = Number(e.src.slice(L, z - 1)), v && T !== 1)
|
|
11280
|
-
return !1;
|
|
11256
|
+
if (f = !0, L = e.bMarks[F] + e.tShift[F], T = Number(e.src.slice(L, z - 1)), v && T !== 1) return !1;
|
|
11281
11257
|
} else if ((z = Lc(e, F)) >= 0)
|
|
11282
11258
|
f = !1;
|
|
11283
11259
|
else
|
|
@@ -11341,23 +11317,20 @@ var $G = function(e, n, r, s) {
|
|
|
11341
11317
|
if (o === 93) {
|
|
11342
11318
|
d = y;
|
|
11343
11319
|
break;
|
|
11344
|
-
} else
|
|
11345
|
-
o === 10 ? P++ : o === 92 && (y++, y < W && T.charCodeAt(y) === 10 && P++);
|
|
11320
|
+
} else o === 10 ? P++ : o === 92 && (y++, y < W && T.charCodeAt(y) === 10 && P++);
|
|
11346
11321
|
}
|
|
11347
11322
|
if (d < 0 || T.charCodeAt(d + 1) !== 58)
|
|
11348
11323
|
return !1;
|
|
11349
11324
|
for (y = d + 2; y < W; y++)
|
|
11350
11325
|
if (o = T.charCodeAt(y), o === 10)
|
|
11351
11326
|
P++;
|
|
11352
|
-
else if (!jn(o))
|
|
11353
|
-
break;
|
|
11327
|
+
else if (!jn(o)) break;
|
|
11354
11328
|
if (_ = e.md.helpers.parseLinkDestination(T, y, W), !_.ok || (l = e.md.normalizeLink(_.str), !e.md.validateLink(l)))
|
|
11355
11329
|
return !1;
|
|
11356
11330
|
for (y = _.pos, P += _.lines, c = y, i = P, R = y; y < W; y++)
|
|
11357
11331
|
if (o = T.charCodeAt(y), o === 10)
|
|
11358
11332
|
P++;
|
|
11359
|
-
else if (!jn(o))
|
|
11360
|
-
break;
|
|
11333
|
+
else if (!jn(o)) break;
|
|
11361
11334
|
for (_ = e.md.helpers.parseLinkTitle(T, y, W), y < W && R !== y && _.ok ? (B = _.str, y = _.pos, P += _.lines) : (B = "", y = c, P = i); y < W && (o = T.charCodeAt(y), !!jn(o)); )
|
|
11362
11335
|
y++;
|
|
11363
11336
|
if (y < W && T.charCodeAt(y) !== 10 && B)
|
|
@@ -11600,8 +11573,7 @@ Mr.prototype.tokenize = function(t, e, n) {
|
|
|
11600
11573
|
throw new Error("block rule didn't increment state.line");
|
|
11601
11574
|
break;
|
|
11602
11575
|
}
|
|
11603
|
-
if (!r)
|
|
11604
|
-
throw new Error("none of the block rules matched");
|
|
11576
|
+
if (!r) throw new Error("none of the block rules matched");
|
|
11605
11577
|
t.tight = !l, t.isEmpty(t.line - 1) && (l = !0), a = t.line, a < n && t.isEmpty(a) && (l = !0, a++, t.line = a);
|
|
11606
11578
|
}
|
|
11607
11579
|
};
|
|
@@ -11655,8 +11627,7 @@ var hj = function(e, n) {
|
|
|
11655
11627
|
if (r = e.pending.length - 1, s = e.posMax, !n)
|
|
11656
11628
|
if (r >= 0 && e.pending.charCodeAt(r) === 32)
|
|
11657
11629
|
if (r >= 1 && e.pending.charCodeAt(r - 1) === 32) {
|
|
11658
|
-
for (o = r - 1; o >= 1 && e.pending.charCodeAt(o - 1) === 32; )
|
|
11659
|
-
o--;
|
|
11630
|
+
for (o = r - 1; o >= 1 && e.pending.charCodeAt(o - 1) === 32; ) o--;
|
|
11660
11631
|
e.pending = e.pending.slice(0, o), e.push("hardbreak", "br", 0);
|
|
11661
11632
|
} else
|
|
11662
11633
|
e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0);
|
|
@@ -11673,8 +11644,7 @@ for (var Mc = 0; Mc < 256; Mc++)
|
|
|
11673
11644
|
});
|
|
11674
11645
|
var bj = function(e, n) {
|
|
11675
11646
|
var r, s, o, c, i, a = e.pos, l = e.posMax;
|
|
11676
|
-
if (e.src.charCodeAt(a) !== 92 || (a++, a >= l))
|
|
11677
|
-
return !1;
|
|
11647
|
+
if (e.src.charCodeAt(a) !== 92 || (a++, a >= l)) return !1;
|
|
11678
11648
|
if (r = e.src.charCodeAt(a), r === 10) {
|
|
11679
11649
|
for (n || e.push("hardbreak", "br", 0), a++; a < l && (r = e.src.charCodeAt(a), !!_j(r)); )
|
|
11680
11650
|
a++;
|
|
@@ -11832,10 +11802,8 @@ var yj = le.normalizeReference, ss = le.isSpace, xj = function(e, n) {
|
|
|
11832
11802
|
if (e.src.charCodeAt(l) !== 60)
|
|
11833
11803
|
return !1;
|
|
11834
11804
|
for (i = e.pos, a = e.posMax; ; ) {
|
|
11835
|
-
if (++l >= a || (c = e.src.charCodeAt(l), c === 60))
|
|
11836
|
-
|
|
11837
|
-
if (c === 62)
|
|
11838
|
-
break;
|
|
11805
|
+
if (++l >= a || (c = e.src.charCodeAt(l), c === 60)) return !1;
|
|
11806
|
+
if (c === 62) break;
|
|
11839
11807
|
}
|
|
11840
11808
|
return r = e.src.slice(i + 1, l), Aj.test(r) ? (s = e.md.normalizeLink(r), e.md.validateLink(s) ? (n || (o = e.push("link_open", "a", 1), o.attrs = [["href", s]], o.markup = "autolink", o.info = "auto", o = e.push("text", "", 0), o.content = e.md.normalizeLinkText(r), o = e.push("link_close", "a", -1), o.markup = "autolink", o.info = "auto"), e.pos += r.length + 2, !0) : !1) : wj.test(r) ? (s = e.md.normalizeLink("mailto:" + r), e.md.validateLink(s) ? (n || (o = e.push("link_open", "a", 1), o.attrs = [["href", s]], o.markup = "autolink", o.info = "auto", o = e.push("text", "", 0), o.content = e.md.normalizeLinkText(r), o = e.push("link_close", "a", -1), o.markup = "autolink", o.info = "auto"), e.pos += r.length + 2, !0) : !1) : !1;
|
|
11841
11809
|
}, Sj = Nr.HTML_TAG_RE;
|
|
@@ -11854,8 +11822,7 @@ var Lj = function(e, n) {
|
|
|
11854
11822
|
return !e.md.options.html || (o = e.posMax, e.src.charCodeAt(i) !== 60 || i + 2 >= o) || (r = e.src.charCodeAt(i + 1), r !== 33 && r !== 63 && r !== 47 && !Rj(r)) || (s = e.src.slice(i).match(Sj), !s) ? !1 : (n || (c = e.push("html_inline", "", 0), c.content = s[0], Tj(c.content) && e.linkLevel++, Dj(c.content) && e.linkLevel--), e.pos += s[0].length, !0);
|
|
11855
11823
|
}, Fc = Ca, Nj = le.has, Ij = le.isValidEntityCode, Bc = le.fromCodePoint, Mj = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Oj = /^&([a-z][a-z0-9]{1,31});/i, qj = function(e, n) {
|
|
11856
11824
|
var r, s, o, c, i = e.pos, a = e.posMax;
|
|
11857
|
-
if (e.src.charCodeAt(i) !== 38 || i + 1 >= a)
|
|
11858
|
-
return !1;
|
|
11825
|
+
if (e.src.charCodeAt(i) !== 38 || i + 1 >= a) return !1;
|
|
11859
11826
|
if (r = e.src.charCodeAt(i + 1), r === 35) {
|
|
11860
11827
|
if (o = e.src.slice(i).match(Mj), o)
|
|
11861
11828
|
return n || (s = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), c = e.push("text_special", "", 0), c.content = Ij(s) ? Bc(s) : Bc(65533), c.markup = o[0], c.info = "entity"), e.pos += o[0].length, !0;
|
|
@@ -12161,11 +12128,9 @@ Be.prototype.match = function(e) {
|
|
|
12161
12128
|
return r.length ? r : null;
|
|
12162
12129
|
};
|
|
12163
12130
|
Be.prototype.matchAtStart = function(e) {
|
|
12164
|
-
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
12165
|
-
return null;
|
|
12131
|
+
if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return null;
|
|
12166
12132
|
var n = this.re.schema_at_start.exec(e);
|
|
12167
|
-
if (!n)
|
|
12168
|
-
return null;
|
|
12133
|
+
if (!n) return null;
|
|
12169
12134
|
var r = this.testSchemaAt(e, n[2], n[0].length);
|
|
12170
12135
|
return r ? (this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + r, Cs(this, 0)) : null;
|
|
12171
12136
|
};
|
package/dist/chat.es.js
CHANGED
|
@@ -232,16 +232,14 @@ function Gn(n) {
|
|
|
232
232
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
233
233
|
}
|
|
234
234
|
function Zo(n) {
|
|
235
|
-
if (n.__esModule)
|
|
236
|
-
return n;
|
|
235
|
+
if (n.__esModule) return n;
|
|
237
236
|
var e = n.default;
|
|
238
237
|
if (typeof e == "function") {
|
|
239
238
|
var t = function r() {
|
|
240
239
|
return this instanceof r ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
|
|
241
240
|
};
|
|
242
241
|
t.prototype = e.prototype;
|
|
243
|
-
} else
|
|
244
|
-
t = {};
|
|
242
|
+
} else t = {};
|
|
245
243
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(n).forEach(function(r) {
|
|
246
244
|
var o = Object.getOwnPropertyDescriptor(n, r);
|
|
247
245
|
Object.defineProperty(t, r, o.get ? o : {
|
|
@@ -320,8 +318,7 @@ class Yo {
|
|
|
320
318
|
*
|
|
321
319
|
* @param {Node} node */
|
|
322
320
|
openNode(e) {
|
|
323
|
-
if (!mt(e))
|
|
324
|
-
return;
|
|
321
|
+
if (!mt(e)) return;
|
|
325
322
|
const t = Wo(
|
|
326
323
|
e.scope,
|
|
327
324
|
{ prefix: this.classPrefix }
|
|
@@ -378,8 +375,7 @@ class jn {
|
|
|
378
375
|
return this.stack.pop();
|
|
379
376
|
}
|
|
380
377
|
closeAllNodes() {
|
|
381
|
-
for (; this.closeNode(); )
|
|
382
|
-
;
|
|
378
|
+
for (; this.closeNode(); ) ;
|
|
383
379
|
}
|
|
384
380
|
toJSON() {
|
|
385
381
|
return JSON.stringify(this.rootNode, null, 4);
|
|
@@ -682,8 +678,7 @@ function Es(n, e) {
|
|
|
682
678
|
}
|
|
683
679
|
function ws(n, e) {
|
|
684
680
|
if (n.match) {
|
|
685
|
-
if (n.begin || n.end)
|
|
686
|
-
throw new Error("begin & end are not supported with match");
|
|
681
|
+
if (n.begin || n.end) throw new Error("begin & end are not supported with match");
|
|
687
682
|
n.begin = n.match, delete n.match;
|
|
688
683
|
}
|
|
689
684
|
}
|
|
@@ -691,10 +686,8 @@ function As(n, e) {
|
|
|
691
686
|
n.relevance === void 0 && (n.relevance = 1);
|
|
692
687
|
}
|
|
693
688
|
const Cs = (n, e) => {
|
|
694
|
-
if (!n.beforeMatch)
|
|
695
|
-
|
|
696
|
-
if (n.starts)
|
|
697
|
-
throw new Error("beforeMatch cannot be used with starts");
|
|
689
|
+
if (!n.beforeMatch) return;
|
|
690
|
+
if (n.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
698
691
|
const t = Object.assign({}, n);
|
|
699
692
|
Object.keys(n).forEach((r) => {
|
|
700
693
|
delete n[r];
|
|
@@ -815,8 +808,7 @@ function Is(n) {
|
|
|
815
808
|
}
|
|
816
809
|
// @ts-ignore
|
|
817
810
|
getMatcher(c) {
|
|
818
|
-
if (this.multiRegexes[c])
|
|
819
|
-
return this.multiRegexes[c];
|
|
811
|
+
if (this.multiRegexes[c]) return this.multiRegexes[c];
|
|
820
812
|
const a = new t();
|
|
821
813
|
return this.rules.slice(c).forEach(([l, u]) => a.addRule(l, u)), a.compile(), this.multiRegexes[c] = a, a;
|
|
822
814
|
}
|
|
@@ -851,8 +843,7 @@ function Is(n) {
|
|
|
851
843
|
/** @type CompiledMode */
|
|
852
844
|
i
|
|
853
845
|
);
|
|
854
|
-
if (i.isCompiled)
|
|
855
|
-
return a;
|
|
846
|
+
if (i.isCompiled) return a;
|
|
856
847
|
[
|
|
857
848
|
xs,
|
|
858
849
|
// do this early so compiler extensions generally don't have to worry about
|
|
@@ -975,8 +966,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), U = m, F = k), R ===
|
|
|
975
966
|
I += V.substring(y), J.addText(I);
|
|
976
967
|
}
|
|
977
968
|
function Ke() {
|
|
978
|
-
if (V === "")
|
|
979
|
-
return;
|
|
969
|
+
if (V === "") return;
|
|
980
970
|
let y = null;
|
|
981
971
|
if (typeof N.subLanguage == "string") {
|
|
982
972
|
if (!e[N.subLanguage]) {
|
|
@@ -1096,8 +1086,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), U = m, F = k), R ===
|
|
|
1096
1086
|
for (N.matcher.considerAll(); ; ) {
|
|
1097
1087
|
yn++, En ? En = !1 : N.matcher.considerAll(), N.matcher.lastIndex = ye;
|
|
1098
1088
|
const y = N.matcher.exec(k);
|
|
1099
|
-
if (!y)
|
|
1100
|
-
break;
|
|
1089
|
+
if (!y) break;
|
|
1101
1090
|
const C = k.substring(ye, y.index), I = ut(C, y);
|
|
1102
1091
|
ye = y.index + I;
|
|
1103
1092
|
}
|
|
@@ -1157,8 +1146,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), U = m, F = k), R ===
|
|
|
1157
1146
|
);
|
|
1158
1147
|
F.unshift(R);
|
|
1159
1148
|
const U = F.sort((oe, ue) => {
|
|
1160
|
-
if (oe.relevance !== ue.relevance)
|
|
1161
|
-
return ue.relevance - oe.relevance;
|
|
1149
|
+
if (oe.relevance !== ue.relevance) return ue.relevance - oe.relevance;
|
|
1162
1150
|
if (oe.language && ue.language) {
|
|
1163
1151
|
if (j(oe.language).supersetOf === ue.language)
|
|
1164
1152
|
return 1;
|
|
@@ -1176,8 +1164,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), U = m, F = k), R ===
|
|
|
1176
1164
|
function g(m) {
|
|
1177
1165
|
let k = null;
|
|
1178
1166
|
const R = l(m);
|
|
1179
|
-
if (a(R))
|
|
1180
|
-
return;
|
|
1167
|
+
if (a(R)) return;
|
|
1181
1168
|
if (T(
|
|
1182
1169
|
"before:highlightElement",
|
|
1183
1170
|
{ el: m, language: R }
|
|
@@ -2492,8 +2479,7 @@ const ni = { name: "mdi-openInNew", render: ei }, ti = { class: "chat-file-name"
|
|
|
2492
2479
|
reset: !1
|
|
2493
2480
|
});
|
|
2494
2481
|
A((q) => {
|
|
2495
|
-
if (!q)
|
|
2496
|
-
return;
|
|
2482
|
+
if (!q) return;
|
|
2497
2483
|
const Z = new DataTransfer();
|
|
2498
2484
|
if (c.value)
|
|
2499
2485
|
for (let _ = 0; _ < c.value.length; _++)
|
|
@@ -2525,8 +2511,7 @@ const ni = { name: "mdi-openInNew", render: ei }, ti = { class: "chat-file-name"
|
|
|
2525
2511
|
q.shiftKey || await O(q);
|
|
2526
2512
|
}
|
|
2527
2513
|
function j(q) {
|
|
2528
|
-
if (!c.value)
|
|
2529
|
-
return;
|
|
2514
|
+
if (!c.value) return;
|
|
2530
2515
|
const Z = new DataTransfer();
|
|
2531
2516
|
for (let _ = 0; _ < c.value.length; _++) {
|
|
2532
2517
|
const T = c.value[_];
|
|
@@ -7161,8 +7146,7 @@ var G9 = function(e, t, r, o) {
|
|
|
7161
7146
|
if (e.sCount[w] - e.blkIndent >= 4 || e.listIndent >= 0 && e.sCount[w] - e.listIndent >= 4 && e.sCount[w] < e.blkIndent)
|
|
7162
7147
|
return !1;
|
|
7163
7148
|
if (o && e.parentType === "paragraph" && e.sCount[w] >= e.blkIndent && (m = !0), (M = Vt(e, w)) >= 0) {
|
|
7164
|
-
if (p = !0, q = e.bMarks[w] + e.tShift[w], x = Number(e.src.slice(q, M - 1)), m && x !== 1)
|
|
7165
|
-
return !1;
|
|
7149
|
+
if (p = !0, q = e.bMarks[w] + e.tShift[w], x = Number(e.src.slice(q, M - 1)), m && x !== 1) return !1;
|
|
7166
7150
|
} else if ((M = Ht(e, w)) >= 0)
|
|
7167
7151
|
p = !1;
|
|
7168
7152
|
else
|
|
@@ -7226,23 +7210,20 @@ var G9 = function(e, t, r, o) {
|
|
|
7226
7210
|
if (s === 93) {
|
|
7227
7211
|
h = v;
|
|
7228
7212
|
break;
|
|
7229
|
-
} else
|
|
7230
|
-
s === 10 ? L++ : s === 92 && (v++, v < O && x.charCodeAt(v) === 10 && L++);
|
|
7213
|
+
} else s === 10 ? L++ : s === 92 && (v++, v < O && x.charCodeAt(v) === 10 && L++);
|
|
7231
7214
|
}
|
|
7232
7215
|
if (h < 0 || x.charCodeAt(h + 1) !== 58)
|
|
7233
7216
|
return !1;
|
|
7234
7217
|
for (v = h + 2; v < O; v++)
|
|
7235
7218
|
if (s = x.charCodeAt(v), s === 10)
|
|
7236
7219
|
L++;
|
|
7237
|
-
else if (!en(s))
|
|
7238
|
-
break;
|
|
7220
|
+
else if (!en(s)) break;
|
|
7239
7221
|
if (g = e.md.helpers.parseLinkDestination(x, v, O), !g.ok || (l = e.md.normalizeLink(g.str), !e.md.validateLink(l)))
|
|
7240
7222
|
return !1;
|
|
7241
7223
|
for (v = g.pos, L += g.lines, i = v, c = L, E = v; v < O; v++)
|
|
7242
7224
|
if (s = x.charCodeAt(v), s === 10)
|
|
7243
7225
|
L++;
|
|
7244
|
-
else if (!en(s))
|
|
7245
|
-
break;
|
|
7226
|
+
else if (!en(s)) break;
|
|
7246
7227
|
for (g = e.md.helpers.parseLinkTitle(x, v, O), v < O && E !== v && g.ok ? (D = g.str, v = g.pos, L += g.lines) : (D = "", v = i, L = c); v < O && (s = x.charCodeAt(v), !!en(s)); )
|
|
7247
7228
|
v++;
|
|
7248
7229
|
if (v < O && x.charCodeAt(v) !== 10 && D)
|
|
@@ -7485,8 +7466,7 @@ _n.prototype.tokenize = function(n, e, t) {
|
|
|
7485
7466
|
throw new Error("block rule didn't increment state.line");
|
|
7486
7467
|
break;
|
|
7487
7468
|
}
|
|
7488
|
-
if (!r)
|
|
7489
|
-
throw new Error("none of the block rules matched");
|
|
7469
|
+
if (!r) throw new Error("none of the block rules matched");
|
|
7490
7470
|
n.tight = !l, n.isEmpty(n.line - 1) && (l = !0), a = n.line, a < t && n.isEmpty(a) && (l = !0, a++, n.line = a);
|
|
7491
7471
|
}
|
|
7492
7472
|
};
|
|
@@ -7540,8 +7520,7 @@ var _4 = function(e, t) {
|
|
|
7540
7520
|
if (r = e.pending.length - 1, o = e.posMax, !t)
|
|
7541
7521
|
if (r >= 0 && e.pending.charCodeAt(r) === 32)
|
|
7542
7522
|
if (r >= 1 && e.pending.charCodeAt(r - 1) === 32) {
|
|
7543
|
-
for (s = r - 1; s >= 1 && e.pending.charCodeAt(s - 1) === 32; )
|
|
7544
|
-
s--;
|
|
7523
|
+
for (s = r - 1; s >= 1 && e.pending.charCodeAt(s - 1) === 32; ) s--;
|
|
7545
7524
|
e.pending = e.pending.slice(0, s), e.push("hardbreak", "br", 0);
|
|
7546
7525
|
} else
|
|
7547
7526
|
e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0);
|
|
@@ -7558,8 +7537,7 @@ for (var jt = 0; jt < 256; jt++)
|
|
|
7558
7537
|
});
|
|
7559
7538
|
var E4 = function(e, t) {
|
|
7560
7539
|
var r, o, s, i, c, a = e.pos, l = e.posMax;
|
|
7561
|
-
if (e.src.charCodeAt(a) !== 92 || (a++, a >= l))
|
|
7562
|
-
return !1;
|
|
7540
|
+
if (e.src.charCodeAt(a) !== 92 || (a++, a >= l)) return !1;
|
|
7563
7541
|
if (r = e.src.charCodeAt(a), r === 10) {
|
|
7564
7542
|
for (t || e.push("hardbreak", "br", 0), a++; a < l && (r = e.src.charCodeAt(a), !!y4(r)); )
|
|
7565
7543
|
a++;
|
|
@@ -7717,10 +7695,8 @@ var A4 = $.normalizeReference, qn = $.isSpace, C4 = function(e, t) {
|
|
|
7717
7695
|
if (e.src.charCodeAt(l) !== 60)
|
|
7718
7696
|
return !1;
|
|
7719
7697
|
for (c = e.pos, a = e.posMax; ; ) {
|
|
7720
|
-
if (++l >= a || (i = e.src.charCodeAt(l), i === 60))
|
|
7721
|
-
|
|
7722
|
-
if (i === 62)
|
|
7723
|
-
break;
|
|
7698
|
+
if (++l >= a || (i = e.src.charCodeAt(l), i === 60)) return !1;
|
|
7699
|
+
if (i === 62) break;
|
|
7724
7700
|
}
|
|
7725
7701
|
return r = e.src.slice(c + 1, l), R4.test(r) ? (o = e.md.normalizeLink(r), e.md.validateLink(o) ? (t || (s = e.push("link_open", "a", 1), s.attrs = [["href", o]], s.markup = "autolink", s.info = "auto", s = e.push("text", "", 0), s.content = e.md.normalizeLinkText(r), s = e.push("link_close", "a", -1), s.markup = "autolink", s.info = "auto"), e.pos += r.length + 2, !0) : !1) : T4.test(r) ? (o = e.md.normalizeLink("mailto:" + r), e.md.validateLink(o) ? (t || (s = e.push("link_open", "a", 1), s.attrs = [["href", o]], s.markup = "autolink", s.info = "auto", s = e.push("text", "", 0), s.content = e.md.normalizeLinkText(r), s = e.push("link_close", "a", -1), s.markup = "autolink", s.info = "auto"), e.pos += r.length + 2, !0) : !1) : !1;
|
|
7726
7702
|
}, N4 = gn.HTML_TAG_RE;
|
|
@@ -7739,8 +7715,7 @@ var O4 = function(e, t) {
|
|
|
7739
7715
|
return !e.md.options.html || (s = e.posMax, e.src.charCodeAt(c) !== 60 || c + 2 >= s) || (r = e.src.charCodeAt(c + 1), r !== 33 && r !== 63 && r !== 47 && !I4(r)) || (o = e.src.slice(c).match(N4), !o) ? !1 : (t || (i = e.push("html_inline", "", 0), i.content = o[0], q4(i.content) && e.linkLevel++, M4(i.content) && e.linkLevel--), e.pos += o[0].length, !0);
|
|
7740
7716
|
}, Wt = zr, F4 = $.has, B4 = $.isValidEntityCode, Yt = $.fromCodePoint, P4 = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, $4 = /^&([a-z][a-z0-9]{1,31});/i, z4 = function(e, t) {
|
|
7741
7717
|
var r, o, s, i, c = e.pos, a = e.posMax;
|
|
7742
|
-
if (e.src.charCodeAt(c) !== 38 || c + 1 >= a)
|
|
7743
|
-
return !1;
|
|
7718
|
+
if (e.src.charCodeAt(c) !== 38 || c + 1 >= a) return !1;
|
|
7744
7719
|
if (r = e.src.charCodeAt(c + 1), r === 35) {
|
|
7745
7720
|
if (s = e.src.slice(c).match(P4), s)
|
|
7746
7721
|
return t || (o = s[1][0].toLowerCase() === "x" ? parseInt(s[1].slice(1), 16) : parseInt(s[1], 10), i = e.push("text_special", "", 0), i.content = B4(o) ? Yt(o) : Yt(65533), i.markup = s[0], i.info = "entity"), e.pos += s[0].length, !0;
|
|
@@ -8046,11 +8021,9 @@ ce.prototype.match = function(e) {
|
|
|
8046
8021
|
return r.length ? r : null;
|
|
8047
8022
|
};
|
|
8048
8023
|
ce.prototype.matchAtStart = function(e) {
|
|
8049
|
-
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
8050
|
-
return null;
|
|
8024
|
+
if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return null;
|
|
8051
8025
|
var t = this.re.schema_at_start.exec(e);
|
|
8052
|
-
if (!t)
|
|
8053
|
-
return null;
|
|
8026
|
+
if (!t) return null;
|
|
8054
8027
|
var r = this.testSchemaAt(e, t[2], t[0].length);
|
|
8055
8028
|
return r ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + r, Un(this, 0)) : null;
|
|
8056
8029
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"main": "./dist/chat.umd.js",
|
|
5
5
|
"module": "./dist/chat.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"README.md",
|
|
24
24
|
"dist",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"LICENSE.md",
|
|
26
|
+
"LICENSE_EE.md"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@vueuse/core": "^10.11.0",
|