${s.map(
- (t, e) => Z`
j`
`
)}
- ${this.block ? Z`
` : null}
+ ${this.block ? j`
` : null}
@@ -6731,47 +6747,47 @@
);
}
}
- t([pe({ type: Number })], sr.prototype, 'top', void 0),
- t([pe({ type: Number })], sr.prototype, 'left', void 0),
- t([pe({ type: Number })], sr.prototype, 'width', void 0),
- t([pe({ type: Number, attribute: 'static-width' })], sr.prototype, 'staticWidth', void 0),
- t([pe({ type: Boolean, attribute: 'anchor-right' })], sr.prototype, 'anchorRight', void 0),
- t([pe({ type: Number })], sr.prototype, 'marginHorizontal', void 0),
- t([pe({ type: Number })], sr.prototype, 'marginVertical', void 0),
- t([pe({ type: Object })], sr.prototype, 'anchorTo', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'visible', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'block', void 0),
- t([pe({ type: Number })], sr.prototype, 'scrollPct', void 0),
- t([pe({ type: Number })], sr.prototype, 'cursorIndex', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'internalFocusDisabled', void 0),
- t([pe({ type: Array })], sr.prototype, 'options', void 0),
- t([pe({ type: Array })], sr.prototype, 'tempOptions', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'poppedTop', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'spaceSelect', void 0),
- t([pe({ type: String })], sr.prototype, 'nameKey', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'loading', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'collapsed', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'hideShadow', void 0),
- t([pe({ attribute: !1 })], sr.prototype, 'getName', void 0),
- t([pe({ attribute: !1 })], sr.prototype, 'renderInputOption', void 0),
- t([pe({ attribute: !1 })], sr.prototype, 'renderOption', void 0),
- t([pe({ attribute: !1 })], sr.prototype, 'renderOptionName', void 0),
- t([pe({ attribute: !1 })], sr.prototype, 'renderOptionDetail', void 0),
- t([pe({ type: Number })], sr.prototype, 'scrollHeight', void 0),
- t([pe({ type: Boolean })], sr.prototype, 'triggerScroll', void 0);
+ t([ge({ type: Number })], ar.prototype, 'top', void 0),
+ t([ge({ type: Number })], ar.prototype, 'left', void 0),
+ t([ge({ type: Number })], ar.prototype, 'width', void 0),
+ t([ge({ type: Number, attribute: 'static-width' })], ar.prototype, 'staticWidth', void 0),
+ t([ge({ type: Boolean, attribute: 'anchor-right' })], ar.prototype, 'anchorRight', void 0),
+ t([ge({ type: Number })], ar.prototype, 'marginHorizontal', void 0),
+ t([ge({ type: Number })], ar.prototype, 'marginVertical', void 0),
+ t([ge({ type: Object })], ar.prototype, 'anchorTo', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'visible', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'block', void 0),
+ t([ge({ type: Number })], ar.prototype, 'scrollPct', void 0),
+ t([ge({ type: Number })], ar.prototype, 'cursorIndex', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'internalFocusDisabled', void 0),
+ t([ge({ type: Array })], ar.prototype, 'options', void 0),
+ t([ge({ type: Array })], ar.prototype, 'tempOptions', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'poppedTop', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'spaceSelect', void 0),
+ t([ge({ type: String })], ar.prototype, 'nameKey', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'loading', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'collapsed', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'hideShadow', void 0),
+ t([ge({ attribute: !1 })], ar.prototype, 'getName', void 0),
+ t([ge({ attribute: !1 })], ar.prototype, 'renderInputOption', void 0),
+ t([ge({ attribute: !1 })], ar.prototype, 'renderOption', void 0),
+ t([ge({ attribute: !1 })], ar.prototype, 'renderOptionName', void 0),
+ t([ge({ attribute: !1 })], ar.prototype, 'renderOptionDetail', void 0),
+ t([ge({ type: Number })], ar.prototype, 'scrollHeight', void 0),
+ t([ge({ type: Boolean })], ar.prototype, 'triggerScroll', void 0);
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
- class rr extends xe {
+ class lr extends ke {
constructor(t) {
- if ((super(t), (this.it = j), t.type !== ye))
+ if ((super(t), (this.it = V), t.type !== xe))
throw Error(this.constructor.directiveName + '() can only be used in child bindings');
}
render(t) {
- if (t === j || null == t) return (this._t = void 0), (this.it = t);
- if (t === V) return t;
+ if (t === V || null == t) return (this._t = void 0), (this.it = t);
+ if (t === H) return t;
if ('string' != typeof t)
throw Error(this.constructor.directiveName + '() called with a non-string value');
if (t === this.it) return this._t;
@@ -6782,9 +6798,9 @@
);
}
}
- (rr.directiveName = 'unsafeHTML'), (rr.resultType = 1);
- const ar = _e(rr),
- lr = (t, e, i) => {
+ (lr.directiveName = 'unsafeHTML'), (lr.resultType = 1);
+ const hr = we(lr),
+ cr = (t, e, i) => {
const o = t.substring(1);
if ('(' === o[0]) return !0;
{
@@ -6795,14 +6811,14 @@
}
var n;
},
- hr = t =>
+ dr = t =>
(t >= 'a' && t <= 'z') || (t >= 'A' && t <= 'Z') || (t >= '0' && t <= '9') || '_' === t,
- cr = t => {
+ ur = t => {
let e = 0;
for (const i of t) '"' === i && e++;
return e % 2 != 0;
};
- class dr {
+ class pr {
constructor(t, e) {
(this.expressionPrefix = t), (this.allowedTopLevels = e);
}
@@ -6813,7 +6829,7 @@
return i.end < t.length || i.closed ? null : i.text.substring(1);
}
autoCompleteContext(t) {
- if (cr(t)) return null;
+ if (ur(t)) return null;
const e = [];
let i = '',
o = !1,
@@ -6830,21 +6846,21 @@
'(' === a && '' === i && (s = '#'),
!(o || n || ('(' === a && '' === i)))
) {
- if (!hr(a) && '.' !== a) break;
+ if (!dr(a) && '.' !== a) break;
i = a + i;
}
}
return i.match(/[A-Za-z][\w]*(\.[\w]+)*/) ? s + i : null;
}
functionContext(t) {
- let e = cr(t) ? 4 : 6,
+ let e = ur(t) ? 4 : 6,
i = '',
o = '(' === t[-1] ? 0 : 1;
for (let n = t.length - 1; n >= 0; n--) {
const s = t[n];
if ('@' === s) return '';
if (6 === e)
- 0 !== o || (!hr(s) && '.' !== s)
+ 0 !== o || (!dr(s) && '.' !== s)
? '"' === s
? (e = 4)
: '(' === s
@@ -6852,7 +6868,7 @@
: ')' === s && o++
: ((e = 2), (i = s + i));
else if (2 === e) {
- if (!hr(s) && '.' !== s) return i;
+ if (!dr(s) && '.' !== s) return i;
i = s + i;
} else 4 === e && '"' === s && (e = 6);
}
@@ -6879,11 +6895,11 @@
l = s < t.length - 2 ? t[s + 2] : 0;
if (
(0 === i
- ? r !== this.expressionPrefix || (!hr(a) && '(' !== a)
+ ? r !== this.expressionPrefix || (!dr(a) && '(' !== a)
? r === this.expressionPrefix && a === this.expressionPrefix && (i = 5)
: ((i = 1), (o = { start: s, end: null, text: r, closed: !1 }))
: 1 === i
- ? (hr(r) ? (i = 2) : '(' === r && ((i = 3), (n += 1)), (o.text += r))
+ ? (dr(r) ? (i = 2) : '(' === r && ((i = 3), (n += 1)), (o.text += r))
: 2 === i
? (o.text += r)
: 3 === i
@@ -6893,11 +6909,11 @@
: 4 === i
? ('"' === r && (i = 3), (o.text += r))
: 5 === i && (i = 0),
- 2 === i && ((!hr(a) && '.' !== a) || ('.' === a && !hr(l))) && (o.end = s + 1),
+ 2 === i && ((!dr(a) && '.' !== a) || ('.' === a && !dr(l))) && (o.end = s + 1),
null != o && (null != o.end || 0 === a))
) {
const t = 0 === a;
- lr(o.text, this.allowedTopLevels, t) &&
+ cr(o.text, this.allowedTopLevels, t) &&
((o.closed = '(' === o.text[1] && 0 === n), (o.end = s + 1), e.push(o)),
(o = null),
(i = 0);
@@ -6906,7 +6922,7 @@
return e;
}
}
- var ur = {
+ var mr = {
Aacute: 'Á',
aacute: 'á',
Abreve: 'Ă',
@@ -9033,13 +9049,13 @@
zwj: '',
zwnj: ''
},
- pr = Object.prototype.hasOwnProperty;
- function mr(t) {
- return (i = t), (e = ur) && pr.call(e, i) ? ur[t] : t;
+ gr = Object.prototype.hasOwnProperty;
+ function fr(t) {
+ return (i = t), (e = mr) && gr.call(e, i) ? mr[t] : t;
var e, i;
}
- var gr = Object.prototype.hasOwnProperty;
- function fr(t) {
+ var vr = Object.prototype.hasOwnProperty;
+ function br(t) {
return (
[].slice.call(arguments, 1).forEach(function(e) {
if (e) {
@@ -9052,11 +9068,11 @@
t
);
}
- var vr = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
- function br(t) {
- return t.indexOf('\\') < 0 ? t : t.replace(vr, '$1');
+ var yr = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
+ function _r(t) {
+ return t.indexOf('\\') < 0 ? t : t.replace(yr, '$1');
}
- function yr(t) {
+ function xr(t) {
return (
!(t >= 55296 && t <= 57343) &&
(!(t >= 64976 && t <= 65007) &&
@@ -9065,7 +9081,7 @@
(11 !== t && (!(t >= 14 && t <= 31) && (!(t >= 127 && t <= 159) && !(t > 1114111)))))))
);
}
- function _r(t) {
+ function wr(t) {
if (t > 65535) {
var e = 55296 + ((t -= 65536) >> 10),
i = 56320 + (1023 & t);
@@ -9073,33 +9089,33 @@
}
return String.fromCharCode(t);
}
- var xr = /&([a-z#][a-z0-9]{1,31});/gi,
- wr = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;
- function kr(t, e) {
+ var kr = /&([a-z#][a-z0-9]{1,31});/gi,
+ Ar = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;
+ function Cr(t, e) {
var i = 0,
- o = mr(e);
+ o = fr(e);
return e !== o
? o
: 35 === e.charCodeAt(0) &&
- wr.test(e) &&
- yr((i = 'x' === e[1].toLowerCase() ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10)))
- ? _r(i)
+ Ar.test(e) &&
+ xr((i = 'x' === e[1].toLowerCase() ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10)))
+ ? wr(i)
: t;
}
function Sr(t) {
- return t.indexOf('&') < 0 ? t : t.replace(xr, kr);
+ return t.indexOf('&') < 0 ? t : t.replace(kr, Cr);
}
- var $r = /[&<>"]/,
- Cr = /[&<>"]/g,
- Er = { '&': '&', '<': '<', '>': '>', '"': '"' };
- function Tr(t) {
- return Er[t];
+ var Er = /[&<>"]/,
+ Tr = /[&<>"]/g,
+ $r = { '&': '&', '<': '<', '>': '>', '"': '"' };
+ function Or(t) {
+ return $r[t];
}
- function Ar(t) {
- return $r.test(t) ? t.replace(Cr, Tr) : t;
+ function Mr(t) {
+ return Er.test(t) ? t.replace(Tr, Or) : t;
}
var Lr = {};
- function Or(t, e) {
+ function zr(t, e) {
return ++e >= t.length - 2
? e
: 'paragraph_open' === t[e].type &&
@@ -9108,19 +9124,19 @@
0 === t[e + 1].content.length &&
'paragraph_close' === t[e + 2].type &&
t[e + 2].tight
- ? Or(t, e + 2)
+ ? zr(t, e + 2)
: e;
}
(Lr.blockquote_open = function() {
return '
\n';
}),
(Lr.blockquote_close = function(t, e) {
- return '
' + Mr(t, e);
+ return '' + Pr(t, e);
}),
(Lr.code = function(t, e) {
return t[e].block
- ? '
' + Ar(t[e].content) + '
' + Mr(t, e)
- : '
' + Ar(t[e].content) + '
';
+ ? '
' + Mr(t[e].content) + '
' + Pr(t, e)
+ : '
' + Mr(t[e].content) + '
';
}),
(Lr.fence = function(t, e, i, o, n) {
var s,
@@ -9135,18 +9151,18 @@
((r = (s = h.params.split(/\s+/g)).join(' ')),
(a = n.rules.fence_custom),
(l = s[0]),
- a && gr.call(a, l))
+ a && vr.call(a, l))
)
return n.rules.fence_custom[s[0]](t, e, i, o, n);
- c = ' class="' + d + Ar(Sr(br(r))) + '"';
+ c = ' class="' + d + Mr(Sr(_r(r))) + '"';
}
return (
'
' +
- ((i.highlight && i.highlight.apply(i.highlight, [h.content].concat(s))) || Ar(h.content)) +
+ ((i.highlight && i.highlight.apply(i.highlight, [h.content].concat(s))) || Mr(h.content)) +
'
' +
- Mr(t, e)
+ Pr(t, e)
);
}),
(Lr.fence_custom = {}),
@@ -9157,13 +9173,13 @@
return '\n';
}),
(Lr.hr = function(t, e, i) {
- return (i.xhtmlOut ? '
' : '
') + Mr(t, e);
+ return (i.xhtmlOut ? '
' : '
') + Pr(t, e);
}),
(Lr.bullet_list_open = function() {
return '
\n';
}),
(Lr.bullet_list_close = function(t, e) {
- return '
' + Mr(t, e);
+ return '' + Pr(t, e);
}),
(Lr.list_item_open = function() {
return '
';
@@ -9176,30 +9192,30 @@
return ' 1 ? ' start="' + i.order + '"' : '') + '>\n';
}),
(Lr.ordered_list_close = function(t, e) {
- return '
' + Mr(t, e);
+ return '' + Pr(t, e);
}),
(Lr.paragraph_open = function(t, e) {
return t[e].tight ? '' : '';
}),
(Lr.paragraph_close = function(t, e) {
var i = !(t[e].tight && e && 'inline' === t[e - 1].type && !t[e - 1].content);
- return (t[e].tight ? '' : '
') + (i ? Mr(t, e) : '');
+ return (t[e].tight ? '' : '') + (i ? Pr(t, e) : '');
}),
(Lr.link_open = function(t, e, i) {
- var o = t[e].title ? ' title="' + Ar(Sr(t[e].title)) + '"' : '',
+ var o = t[e].title ? ' title="' + Mr(Sr(t[e].title)) + '"' : '',
n = i.linkTarget ? ' target="' + i.linkTarget + '"' : '';
- return '';
+ return '';
}),
(Lr.link_close = function() {
return '';
}),
(Lr.image = function(t, e, i) {
- var o = ' src="' + Ar(t[e].src) + '"',
- n = t[e].title ? ' title="' + Ar(Sr(t[e].title)) + '"' : '';
+ var o = ' src="' + Mr(t[e].src) + '"',
+ n = t[e].title ? ' title="' + Mr(Sr(t[e].title)) + '"' : '';
return (
''
@@ -9274,10 +9290,10 @@
return '';
}),
(Lr.sub = function(t, e) {
- return '' + Ar(t[e].content) + '';
+ return '' + Mr(t[e].content) + '';
}),
(Lr.sup = function(t, e) {
- return '' + Ar(t[e].content) + '';
+ return '' + Mr(t[e].content) + '';
}),
(Lr.hardbreak = function(t, e, i) {
return i.xhtmlOut ? '
\n' : '
\n';
@@ -9286,7 +9302,7 @@
return i.breaks ? (i.xhtmlOut ? '
\n' : '
\n') : '\n';
}),
(Lr.text = function(t, e) {
- return Ar(t[e].content);
+ return Mr(t[e].content);
}),
(Lr.htmlblock = function(t, e) {
return t[e].content;
@@ -9295,7 +9311,7 @@
return t[e].content;
}),
(Lr.abbr_open = function(t, e) {
- return '';
+ return '';
}),
(Lr.abbr_close = function() {
return '';
@@ -9348,16 +9364,16 @@
(Lr.dd_close = function() {
return '\n';
});
- var Mr = (Lr.getBreak = function(t, e) {
- return (e = Or(t, e)) < t.length && 'list_item_close' === t[e].type ? '' : '\n';
+ var Pr = (Lr.getBreak = function(t, e) {
+ return (e = zr(t, e)) < t.length && 'list_item_close' === t[e].type ? '' : '\n';
});
- function zr() {
- (this.rules = fr({}, Lr)), (this.getBreak = Lr.getBreak);
+ function Dr() {
+ (this.rules = br({}, Lr)), (this.getBreak = Lr.getBreak);
}
- function Pr() {
+ function Ir() {
(this.__rules__ = []), (this.__cache__ = null);
}
- function Ir(t, e, i, o, n) {
+ function Nr(t, e, i, o, n) {
(this.src = t),
(this.env = o),
(this.options = i),
@@ -9374,7 +9390,7 @@
(this.linkContent = ''),
(this.labelUnmatchedScopes = 0);
}
- function Dr(t, e) {
+ function Br(t, e) {
var i,
o,
n,
@@ -9399,12 +9415,12 @@
s
);
}
- function Nr(t, e, i, o) {
+ function Rr(t, e, i, o) {
var n, s, r, a, l, h;
if (42 !== t.charCodeAt(0)) return -1;
if (91 !== t.charCodeAt(1)) return -1;
if (-1 === t.indexOf(']:')) return -1;
- if ((s = Dr((n = new Ir(t, e, i, o, [])), 1)) < 0 || 58 !== t.charCodeAt(s + 1)) return -1;
+ if ((s = Br((n = new Nr(t, e, i, o, [])), 1)) < 0 || 58 !== t.charCodeAt(s + 1)) return -1;
for (a = n.posMax, r = s + 2; r < a && 10 !== n.src.charCodeAt(r); r++);
return (
(l = t.slice(2, s)),
@@ -9415,14 +9431,14 @@
r)
);
}
- function Rr(t) {
+ function qr(t) {
var e = Sr(t);
try {
e = decodeURI(e);
} catch (t) {}
return encodeURI(e);
}
- function Br(t, e) {
+ function Ur(t, e) {
var i,
o,
n,
@@ -9433,7 +9449,7 @@
if (10 === (i = t.src.charCodeAt(e))) return !1;
if (62 === i)
return (
- (n = Rr(br(t.src.slice(s + 1, e)))),
+ (n = qr(_r(t.src.slice(s + 1, e)))),
!!t.parser.validateLink(n) && ((t.pos = e + 1), (t.linkContent = n), !0)
);
92 === i && e + 1 < r ? (e += 2) : e++;
@@ -9449,11 +9465,11 @@
}
return (
s !== e &&
- ((n = br(t.src.slice(s, e))),
+ ((n = _r(t.src.slice(s, e))),
!!t.parser.validateLink(n) && ((t.linkContent = n), (t.pos = e), !0))
);
}
- function qr(t, e) {
+ function Fr(t, e) {
var i,
o = e,
n = t.posMax,
@@ -9461,59 +9477,59 @@
if (34 !== s && 39 !== s && 40 !== s) return !1;
for (e++, 40 === s && (s = 41); e < n; ) {
if ((i = t.src.charCodeAt(e)) === s)
- return (t.pos = e + 1), (t.linkContent = br(t.src.slice(o + 1, e))), !0;
+ return (t.pos = e + 1), (t.linkContent = _r(t.src.slice(o + 1, e))), !0;
92 === i && e + 1 < n ? (e += 2) : e++;
}
return !1;
}
- function Ur(t) {
+ function Zr(t) {
return t
.trim()
.replace(/\s+/g, ' ')
.toUpperCase();
}
- function Fr(t, e, i, o) {
+ function jr(t, e, i, o) {
var n, s, r, a, l, h, c, d, u;
if (91 !== t.charCodeAt(0)) return -1;
if (-1 === t.indexOf(']:')) return -1;
- if ((s = Dr((n = new Ir(t, e, i, o, [])), 0)) < 0 || 58 !== t.charCodeAt(s + 1)) return -1;
+ if ((s = Br((n = new Nr(t, e, i, o, [])), 0)) < 0 || 58 !== t.charCodeAt(s + 1)) return -1;
for (a = n.posMax, r = s + 2; r < a && (32 === (l = n.src.charCodeAt(r)) || 10 === l); r++);
- if (!Br(n, r)) return -1;
+ if (!Ur(n, r)) return -1;
for (
c = n.linkContent, h = r = n.pos, r += 1;
r < a && (32 === (l = n.src.charCodeAt(r)) || 10 === l);
r++
);
for (
- r < a && h !== r && qr(n, r) ? ((d = n.linkContent), (r = n.pos)) : ((d = ''), (r = h));
+ r < a && h !== r && Fr(n, r) ? ((d = n.linkContent), (r = n.pos)) : ((d = ''), (r = h));
r < a && 32 === n.src.charCodeAt(r);
)
r++;
return r < a && 10 !== n.src.charCodeAt(r)
? -1
- : ((u = Ur(t.slice(1, s))),
+ : ((u = Zr(t.slice(1, s))),
void 0 === o.references[u] && (o.references[u] = { title: d, href: c }),
r);
}
- (zr.prototype.renderInline = function(t, e, i) {
+ (Dr.prototype.renderInline = function(t, e, i) {
for (var o = this.rules, n = t.length, s = 0, r = ''; n--; )
r += o[t[s].type](t, s++, e, i, this);
return r;
}),
- (zr.prototype.render = function(t, e, i) {
+ (Dr.prototype.render = function(t, e, i) {
for (var o = this.rules, n = t.length, s = -1, r = ''; ++s < n; )
'inline' === t[s].type
? (r += this.renderInline(t[s].children, e, i))
: (r += o[t[s].type](t, s, e, i, this));
return r;
}),
- (Pr.prototype.__find__ = function(t) {
+ (Ir.prototype.__find__ = function(t) {
for (var e = this.__rules__.length, i = -1; e--; )
if (this.__rules__[++i].name === t) return i;
return -1;
}),
- (Pr.prototype.__compile__ = function() {
+ (Ir.prototype.__compile__ = function() {
var t = this,
e = [''];
t.__rules__.forEach(function(t) {
@@ -9530,32 +9546,32 @@
});
});
}),
- (Pr.prototype.at = function(t, e, i) {
+ (Ir.prototype.at = function(t, e, i) {
var o = this.__find__(t),
n = i || {};
if (-1 === o) throw new Error('Parser rule not found: ' + t);
(this.__rules__[o].fn = e), (this.__rules__[o].alt = n.alt || []), (this.__cache__ = null);
}),
- (Pr.prototype.before = function(t, e, i, o) {
+ (Ir.prototype.before = function(t, e, i, o) {
var n = this.__find__(t),
s = o || {};
if (-1 === n) throw new Error('Parser rule not found: ' + t);
this.__rules__.splice(n, 0, { name: e, enabled: !0, fn: i, alt: s.alt || [] }),
(this.__cache__ = null);
}),
- (Pr.prototype.after = function(t, e, i, o) {
+ (Ir.prototype.after = function(t, e, i, o) {
var n = this.__find__(t),
s = o || {};
if (-1 === n) throw new Error('Parser rule not found: ' + t);
this.__rules__.splice(n + 1, 0, { name: e, enabled: !0, fn: i, alt: s.alt || [] }),
(this.__cache__ = null);
}),
- (Pr.prototype.push = function(t, e, i) {
+ (Ir.prototype.push = function(t, e, i) {
var o = i || {};
this.__rules__.push({ name: t, enabled: !0, fn: e, alt: o.alt || [] }),
(this.__cache__ = null);
}),
- (Pr.prototype.enable = function(t, e) {
+ (Ir.prototype.enable = function(t, e) {
(t = Array.isArray(t) ? t : [t]),
e &&
this.__rules__.forEach(function(t) {
@@ -9568,7 +9584,7 @@
}, this),
(this.__cache__ = null);
}),
- (Pr.prototype.disable = function(t) {
+ (Ir.prototype.disable = function(t) {
(t = Array.isArray(t) ? t : [t]).forEach(function(t) {
var e = this.__find__(t);
if (e < 0) throw new Error('Rules manager: invalid rule name ' + t);
@@ -9576,40 +9592,40 @@
}, this),
(this.__cache__ = null);
}),
- (Pr.prototype.getRules = function(t) {
+ (Ir.prototype.getRules = function(t) {
return null === this.__cache__ && this.__compile__(), this.__cache__[t] || [];
}),
- (Ir.prototype.pushPending = function() {
+ (Nr.prototype.pushPending = function() {
this.tokens.push({ type: 'text', content: this.pending, level: this.pendingLevel }),
(this.pending = '');
}),
- (Ir.prototype.push = function(t) {
+ (Nr.prototype.push = function(t) {
this.pending && this.pushPending(), this.tokens.push(t), (this.pendingLevel = this.level);
}),
- (Ir.prototype.cacheSet = function(t, e) {
+ (Nr.prototype.cacheSet = function(t, e) {
for (var i = this.cache.length; i <= t; i++) this.cache.push(0);
this.cache[t] = e;
}),
- (Ir.prototype.cacheGet = function(t) {
+ (Nr.prototype.cacheGet = function(t) {
return t < this.cache.length ? this.cache[t] : 0;
});
- var Zr = ' \n()[]\'".,!?-';
+ var Hr = ' \n()[]\'".,!?-';
function Vr(t) {
return t.replace(/([-()\[\]{}+?*.$\^|,:#= t.length) && !Yr.test(t[e]);
+ var Wr = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/,
+ Gr = /\((c|tm|r|p)\)/gi,
+ Qr = { c: '©', r: '®', p: '§', tm: '™' };
+ var Kr = /['"]/,
+ Yr = /['"]/g,
+ Jr = /[-\s()\[\]]/;
+ function Xr(t, e) {
+ return !(e < 0 || e >= t.length) && !Jr.test(t[e]);
}
- function Xr(t, e, i) {
+ function ta(t, e, i) {
return t.substr(0, e) + i + t.substr(e + 1);
}
- var Qr = [
+ var ea = [
[
'block',
function(t) {
@@ -9639,7 +9655,7 @@
'inline' === s[e].type &&
'paragraph_close' === s[e + 1].type
) {
- for (o = s[e].content; o.length && !((n = Nr(o, t.inline, t.options, t.env)) < 0); )
+ for (o = s[e].content; o.length && !((n = Rr(o, t.inline, t.options, t.env)) < 0); )
o = o.slice(n).trim();
(s[e].content = o), o.length || ((s[e - 1].tight = !0), (s[e + 1].tight = !0));
}
@@ -9660,7 +9676,7 @@
'paragraph_open' === s[e - 1].type &&
'paragraph_close' === s[e + 1].type
) {
- for (o = s[e].content; o.length && !((n = Fr(o, t.inline, t.options, t.env)) < 0); )
+ for (o = s[e].content; o.length && !((n = jr(o, t.inline, t.options, t.env)) < 0); )
o = o.slice(n).trim();
(s[e].content = o), o.length || ((s[e - 1].tight = !0), (s[e + 1].tight = !0));
}
@@ -9754,7 +9770,7 @@
t.env.abbrRegExp ||
((u =
'(^|[' +
- Zr.split('')
+ Hr.split('')
.map(Vr)
.join('') +
'])(' +
@@ -9768,7 +9784,7 @@
.map(Vr)
.join('|') +
')($|[' +
- Zr.split('')
+ Hr.split('')
.map(Vr)
.join('') +
'])'),
@@ -9820,10 +9836,10 @@
(o =
(r = o).indexOf('(') < 0
? r
- : r.replace(Hr, function(t, e) {
- return Wr[e.toLowerCase()];
+ : r.replace(Gr, function(t, e) {
+ return Qr[e.toLowerCase()];
})),
- jr.test(o) &&
+ Wr.test(o) &&
(o = o
.replace(/\+-/g, '±')
.replace(/\.{2,}/g, '…')
@@ -9844,49 +9860,49 @@
for (v = [], g = t.tokens.length - 1; g >= 0; g--)
if ('inline' === t.tokens[g].type)
for (f = t.tokens[g].children, v.length = 0, e = 0; e < f.length; e++)
- if ('text' === (i = f[e]).type && !Gr.test(i.text)) {
+ if ('text' === (i = f[e]).type && !Kr.test(i.text)) {
for (a = f[e].level, p = v.length - 1; p >= 0 && !(v[p].level <= a); p--);
(v.length = p + 1), (s = 0), (r = (o = i.content).length);
- t: for (; s < r && ((Kr.lastIndex = s), (n = Kr.exec(o))); )
+ t: for (; s < r && ((Yr.lastIndex = s), (n = Yr.exec(o))); )
if (
- ((l = !Jr(o, n.index - 1)),
+ ((l = !Xr(o, n.index - 1)),
(s = n.index + 1),
(m = "'" === n[0]),
- (h = !Jr(o, s)) || l)
+ (h = !Xr(o, s)) || l)
) {
if (((d = !h), (u = !l)))
for (p = v.length - 1; p >= 0 && ((c = v[p]), !(v[p].level < a)); p--)
if (c.single === m && v[p].level === a) {
(c = v[p]),
m
- ? ((f[c.token].content = Xr(
+ ? ((f[c.token].content = ta(
f[c.token].content,
c.pos,
t.options.quotes[2]
)),
- (i.content = Xr(i.content, n.index, t.options.quotes[3])))
- : ((f[c.token].content = Xr(
+ (i.content = ta(i.content, n.index, t.options.quotes[3])))
+ : ((f[c.token].content = ta(
f[c.token].content,
c.pos,
t.options.quotes[0]
)),
- (i.content = Xr(i.content, n.index, t.options.quotes[1]))),
+ (i.content = ta(i.content, n.index, t.options.quotes[1]))),
(v.length = p);
continue t;
}
d
? v.push({ token: e, pos: n.index, single: m, level: a })
- : u && m && (i.content = Xr(i.content, n.index, '’'));
- } else m && (i.content = Xr(i.content, n.index, '’'));
+ : u && m && (i.content = ta(i.content, n.index, '’'));
+ } else m && (i.content = ta(i.content, n.index, '’'));
}
}
]
];
- function ta() {
- (this.options = {}), (this.ruler = new Pr());
- for (var t = 0; t < Qr.length; t++) this.ruler.push(Qr[t][0], Qr[t][1]);
+ function ia() {
+ (this.options = {}), (this.ruler = new Ir());
+ for (var t = 0; t < ea.length; t++) this.ruler.push(ea[t][0], ea[t][1]);
}
- function ea(t, e, i, o, n) {
+ function oa(t, e, i, o, n) {
var s, r, a, l, h, c, d;
for (
this.src = t,
@@ -9933,7 +9949,7 @@
this.tShift.push(0),
(this.lineMax = this.bMarks.length - 1);
}
- function ia(t, e) {
+ function na(t, e) {
var i, o, n;
return (o = t.bMarks[e] + t.tShift[e]) >= (n = t.eMarks[e]) ||
(42 !== (i = t.src.charCodeAt(o++)) && 45 !== i && 43 !== i) ||
@@ -9941,7 +9957,7 @@
? -1
: o;
}
- function oa(t, e) {
+ function sa(t, e) {
var i,
o = t.bMarks[e] + t.tShift[e],
n = t.eMarks[e];
@@ -9956,31 +9972,31 @@
}
return o < n && 32 !== t.src.charCodeAt(o) ? -1 : o;
}
- (ta.prototype.process = function(t) {
+ (ia.prototype.process = function(t) {
var e, i, o;
for (e = 0, i = (o = this.ruler.getRules('')).length; e < i; e++) o[e](t);
}),
- (ea.prototype.isEmpty = function(t) {
+ (oa.prototype.isEmpty = function(t) {
return this.bMarks[t] + this.tShift[t] >= this.eMarks[t];
}),
- (ea.prototype.skipEmptyLines = function(t) {
+ (oa.prototype.skipEmptyLines = function(t) {
for (var e = this.lineMax; t < e && !(this.bMarks[t] + this.tShift[t] < this.eMarks[t]); t++);
return t;
}),
- (ea.prototype.skipSpaces = function(t) {
+ (oa.prototype.skipSpaces = function(t) {
for (var e = this.src.length; t < e && 32 === this.src.charCodeAt(t); t++);
return t;
}),
- (ea.prototype.skipChars = function(t, e) {
+ (oa.prototype.skipChars = function(t, e) {
for (var i = this.src.length; t < i && this.src.charCodeAt(t) === e; t++);
return t;
}),
- (ea.prototype.skipCharsBack = function(t, e, i) {
+ (oa.prototype.skipCharsBack = function(t, e, i) {
if (t <= i) return t;
for (; t > i; ) if (e !== this.src.charCodeAt(--t)) return t + 1;
return t;
}),
- (ea.prototype.getLines = function(t, e, i, o) {
+ (oa.prototype.getLines = function(t, e, i, o) {
var n,
s,
r,
@@ -10002,7 +10018,7 @@
(a[n] = this.src.slice(s, r));
return a.join('');
});
- var na = {};
+ var ra = {};
[
'article',
'aside',
@@ -10055,16 +10071,16 @@
'ul',
'video'
].forEach(function(t) {
- na[t] = !0;
+ ra[t] = !0;
});
- var sa = /^<([a-zA-Z]{1,15})[\s\/>]/,
- ra = /^<\/([a-zA-Z]{1,15})[\s>]/;
- function aa(t, e) {
+ var aa = /^<([a-zA-Z]{1,15})[\s\/>]/,
+ la = /^<\/([a-zA-Z]{1,15})[\s>]/;
+ function ha(t, e) {
var i = t.bMarks[e] + t.blkIndent,
o = t.eMarks[e];
return t.src.substr(i, o - i);
}
- function la(t, e) {
+ function ca(t, e) {
var i,
o,
n = t.bMarks[e] + t.tShift[e],
@@ -10076,7 +10092,7 @@
? -1
: i;
}
- var ha = [
+ var da = [
[
'code',
function(t, e, i) {
@@ -10262,11 +10278,11 @@
x,
w,
k,
- S,
- $ = !0;
- if ((d = oa(t, e)) >= 0) g = !0;
+ A,
+ C = !0;
+ if ((d = sa(t, e)) >= 0) g = !0;
else {
- if (!((d = ia(t, e)) >= 0)) return !1;
+ if (!((d = na(t, e)) >= 0)) return !1;
g = !1;
}
if (t.level >= t.options.maxNesting) return !1;
@@ -10301,7 +10317,7 @@
(t.tight = !0),
(t.parentType = 'list'),
t.parser.tokenize(t, e, i, !0),
- (t.tight && !b) || ($ = !1),
+ (t.tight && !b) || (C = !1),
(b = t.line - e > 1 && t.isEmpty(t.line - 1)),
(t.blkIndent = a),
(t.tShift[e] = r),
@@ -10317,22 +10333,22 @@
);
) {
- for (S = !1, w = 0, k = x.length; w < k; w++)
+ for (A = !1, w = 0, k = x.length; w < k; w++)
if (x[w](t, n, i, !0)) {
- S = !0;
+ A = !0;
break;
}
- if (S) break;
+ if (A) break;
if (g) {
- if ((d = oa(t, n)) < 0) break;
- } else if ((d = ia(t, n)) < 0) break;
+ if ((d = sa(t, n)) < 0) break;
+ } else if ((d = na(t, n)) < 0) break;
if (m !== t.src.charCodeAt(d - 1)) break;
}
return (
t.tokens.push({ type: g ? 'ordered_list_close' : 'bullet_list_close', level: --t.level }),
(y[1] = n),
(t.line = n),
- $ &&
+ C &&
(function(t, e) {
var i,
o,
@@ -10491,9 +10507,9 @@
)
return !1;
if (47 === n) {
- if (!(s = t.src.slice(a, l).match(ra))) return !1;
- } else if (!(s = t.src.slice(a, l).match(sa))) return !1;
- if (!0 !== na[s[1].toLowerCase()]) return !1;
+ if (!(s = t.src.slice(a, l).match(la))) return !1;
+ } else if (!(s = t.src.slice(a, l).match(aa))) return !1;
+ if (!0 !== ra[s[1].toLowerCase()]) return !1;
if (o) return !0;
}
for (r = e + 1; r < t.lineMax && !t.isEmpty(r); ) r++;
@@ -10518,7 +10534,7 @@
if (((l = e + 1), t.tShift[l] < t.blkIndent)) return !1;
if ((r = t.bMarks[l] + t.tShift[l]) >= t.eMarks[l]) return !1;
if (124 !== (n = t.src.charCodeAt(r)) && 45 !== n && 58 !== n) return !1;
- if (((s = aa(t, e + 1)), !/^[-:| ]+$/.test(s))) return !1;
+ if (((s = ha(t, e + 1)), !/^[-:| ]+$/.test(s))) return !1;
if ((h = s.split('|')) <= 2) return !1;
for (d = [], a = 0; a < h.length; a++) {
if (!(u = h[a].trim())) {
@@ -10532,7 +10548,7 @@
? d.push('left')
: d.push('');
}
- if (-1 === (s = aa(t, e).trim()).indexOf('|')) return !1;
+ if (-1 === (s = ha(t, e).trim()).indexOf('|')) return !1;
if (((h = s.replace(/^\||\|$/g, '').split('|')), d.length !== h.length)) return !1;
if (o) return !0;
for (
@@ -10557,7 +10573,7 @@
t.tokens.push({ type: 'thead_close', level: --t.level }),
t.tokens.push({ type: 'tbody_open', lines: (m = [e + 2, 0]), level: t.level++ }),
l = e + 2;
- l < i && !(t.tShift[l] < t.blkIndent) && -1 !== (s = aa(t, l).trim()).indexOf('|');
+ l < i && !(t.tShift[l] < t.blkIndent) && -1 !== (s = ha(t, l).trim()).indexOf('|');
l++
) {
for (
@@ -10592,10 +10608,10 @@
'deflist',
function(t, e, i, o) {
var n, s, r, a, l, h, c, d, u, p, m, g, f, v;
- if (o) return !(t.ddIndent < 0) && la(t, e) >= 0;
+ if (o) return !(t.ddIndent < 0) && ca(t, e) >= 0;
if (((c = e + 1), t.isEmpty(c) && ++c > i)) return !1;
if (t.tShift[c] < t.blkIndent) return !1;
- if ((n = la(t, c)) < 0) return !1;
+ if ((n = ca(t, c)) < 0) return !1;
if (t.level >= t.options.maxNesting) return !1;
(h = t.tokens.length),
t.tokens.push({ type: 'dl_open', lines: (l = [e, 0]), level: t.level++ }),
@@ -10642,7 +10658,7 @@
)
break t;
if (t.tShift[c] < t.blkIndent) break t;
- if ((n = la(t, c)) < 0) break;
+ if ((n = ca(t, c)) < 0) break;
s = c;
}
if (c >= i) break;
@@ -10651,7 +10667,7 @@
if ((s = r + 1) >= i) break;
if ((t.isEmpty(s) && s++, s >= i)) break;
if (t.tShift[s] < t.blkIndent) break;
- if ((n = la(t, s)) < 0) break;
+ if ((n = ca(t, s)) < 0) break;
}
return (
t.tokens.push({ type: 'dl_close', level: --t.level }),
@@ -10715,12 +10731,12 @@
}
]
];
- function ca() {
- this.ruler = new Pr();
- for (var t = 0; t < ha.length; t++)
- this.ruler.push(ha[t][0], ha[t][1], { alt: (ha[t][2] || []).slice() });
+ function ua() {
+ this.ruler = new Ir();
+ for (var t = 0; t < da.length; t++)
+ this.ruler.push(da[t][0], da[t][1], { alt: (da[t][2] || []).slice() });
}
- ca.prototype.tokenize = function(t, e, i) {
+ ua.prototype.tokenize = function(t, e, i) {
for (
var o, n = this.ruler.getRules(''), s = n.length, r = e, a = !1;
r < i && ((t.line = r = t.skipEmptyLines(r)), !(r >= i)) && !(t.tShift[r] < t.blkIndent);
@@ -10733,10 +10749,10 @@
}
}
};
- var da = /[\n\t]/g,
- ua = /\r[\n\u0085]|[\u2424\u2028\u0085]/g,
- pa = /\u00a0/g;
- function ma(t) {
+ var pa = /[\n\t]/g,
+ ma = /\r[\n\u0085]|[\u2424\u2028\u0085]/g,
+ ga = /\u00a0/g;
+ function fa(t) {
switch (t) {
case 10:
case 92:
@@ -10764,26 +10780,26 @@
return !1;
}
}
- ca.prototype.parse = function(t, e, i, o) {
+ ua.prototype.parse = function(t, e, i, o) {
var n,
s = 0,
r = 0;
if (!t) return [];
- (t = (t = t.replace(pa, ' ')).replace(ua, '\n')).indexOf('\t') >= 0 &&
- (t = t.replace(da, function(e, i) {
+ (t = (t = t.replace(ga, ' ')).replace(ma, '\n')).indexOf('\t') >= 0 &&
+ (t = t.replace(pa, function(e, i) {
var o;
return 10 === t.charCodeAt(i)
? ((s = i + 1), (r = 0), e)
: ((o = ' '.slice((i - s - r) % 4)), (r = i - s + 1), o);
})),
- (n = new ea(t, this, e, i, o)),
+ (n = new oa(t, this, e, i, o)),
this.tokenize(n, n.line, n.lineMax);
};
- for (var ga = [], fa = 0; fa < 256; fa++) ga.push(0);
- function va(t) {
+ for (var va = [], ba = 0; ba < 256; ba++) va.push(0);
+ function ya(t) {
return (t >= 48 && t <= 57) || (t >= 65 && t <= 90) || (t >= 97 && t <= 122);
}
- function ba(t, e) {
+ function _a(t, e) {
var i,
o,
n,
@@ -10799,16 +10815,16 @@
? (r = a = !1)
: ((32 !== (o = s < l ? t.src.charCodeAt(s) : -1) && 10 !== o) || (r = !1),
(32 !== i && 10 !== i) || (a = !1),
- 95 === h && (va(i) && (r = !1), va(o) && (a = !1))),
+ 95 === h && (ya(i) && (r = !1), ya(o) && (a = !1))),
{ can_open: r, can_close: a, delims: n }
);
}
'\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function(t) {
- ga[t.charCodeAt(0)] = 1;
+ va[t.charCodeAt(0)] = 1;
});
- var ya = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
- var _a = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
- var xa = [
+ var xa = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
+ var wa = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
+ var ka = [
'coap',
'doi',
'javascript',
@@ -10974,8 +10990,8 @@
'xri',
'ymsgr'
],
- wa = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,
- ka = /^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;
+ Aa = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,
+ Ca = /^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;
function Sa(t, e) {
return (
(t = t.source),
@@ -10985,29 +11001,29 @@
}
);
}
- var $a = Sa(/(?:unquoted|single_quoted|double_quoted)/)('unquoted', /[^"'=<>`\x00-\x20]+/)(
+ var Ea = Sa(/(?:unquoted|single_quoted|double_quoted)/)('unquoted', /[^"'=<>`\x00-\x20]+/)(
'single_quoted',
/'[^']*'/
)('double_quoted', /"[^"]*"/)(),
- Ca = Sa(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)('attr_name', /[a-zA-Z_:][a-zA-Z0-9:._-]*/)(
+ Ta = Sa(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)('attr_name', /[a-zA-Z_:][a-zA-Z0-9:._-]*/)(
'attr_value',
- $a
+ Ea
)(),
- Ea = Sa(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)('attribute', Ca)(),
- Ta = Sa(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)('open_tag', Ea)(
+ $a = Sa(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)('attribute', Ta)(),
+ Oa = Sa(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)('open_tag', $a)(
'close_tag',
/<\/[A-Za-z][A-Za-z0-9]*\s*>/
)('comment', /|/)('processing', /<[?].*?[?]>/)(
'declaration',
/]*>/
)('cdata', //)();
- var Aa = /^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
+ var Ma = /^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
La = /^&([a-z][a-z0-9]{1,31});/i;
- var Oa = [
+ var za = [
[
'text',
function(t, e) {
- for (var i = t.pos; i < t.posMax && !ma(t.src.charCodeAt(i)); ) i++;
+ for (var i = t.pos; i < t.posMax && !fa(t.src.charCodeAt(i)); ) i++;
return i !== t.pos && (e || (t.pending += t.src.slice(t.pos, i)), (t.pos = i), !0);
}
],
@@ -11042,7 +11058,7 @@
n = t.posMax;
if (92 !== t.src.charCodeAt(o)) return !1;
if (++o < n) {
- if ((i = t.src.charCodeAt(o)) < 256 && 0 !== ga[i])
+ if ((i = t.src.charCodeAt(o)) < 256 && 0 !== va[i])
return e || (t.pending += t.src[o]), (t.pos += 2), !0;
if (10 === i) {
for (
@@ -11248,13 +11264,13 @@
d = t.src.charCodeAt(c);
if (95 !== d && 42 !== d) return !1;
if (e) return !1;
- if (((i = (l = ba(t, c)).delims), !l.can_open))
+ if (((i = (l = _a(t, c)).delims), !l.can_open))
return (t.pos += i), e || (t.pending += t.src.slice(c, t.pos)), !0;
if (t.level >= t.options.maxNesting) return !1;
for (t.pos = c + i, a = [i]; t.pos < h; )
if (t.src.charCodeAt(t.pos) !== d) t.parser.skipToken(t);
else {
- if (((o = (l = ba(t, t.pos)).delims), l.can_close)) {
+ if (((o = (l = _a(t, t.pos)).delims), l.can_close)) {
for (s = a.pop(), r = o; s !== r; ) {
if (r < s) {
a.push(s - r);
@@ -11310,7 +11326,7 @@
? ((t.pos = s), !1)
: ((t.posMax = t.pos),
(t.pos = s + 1),
- e || t.push({ type: 'sub', level: t.level, content: o.replace(ya, '$1') }),
+ e || t.push({ type: 'sub', level: t.level, content: o.replace(xa, '$1') }),
(t.pos = t.posMax + 1),
(t.posMax = n),
!0)
@@ -11340,7 +11356,7 @@
? ((t.pos = s), !1)
: ((t.posMax = t.pos),
(t.pos = s + 1),
- e || t.push({ type: 'sup', level: t.level, content: o.replace(_a, '$1') }),
+ e || t.push({ type: 'sup', level: t.level, content: o.replace(wa, '$1') }),
(t.pos = t.posMax + 1),
(t.posMax = n),
!0)
@@ -11365,16 +11381,16 @@
m = t.src.charCodeAt(p);
if ((33 === m && ((c = !0), (m = t.src.charCodeAt(++p))), 91 !== m)) return !1;
if (t.level >= t.options.maxNesting) return !1;
- if (((i = p + 1), (o = Dr(t, p)) < 0)) return !1;
+ if (((i = p + 1), (o = Br(t, p)) < 0)) return !1;
if ((a = o + 1) < u && 40 === t.src.charCodeAt(a)) {
for (a++; a < u && (32 === (h = t.src.charCodeAt(a)) || 10 === h); a++);
if (a >= u) return !1;
for (
- p = a, Br(t, a) ? ((s = t.linkContent), (a = t.pos)) : (s = ''), p = a;
+ p = a, Ur(t, a) ? ((s = t.linkContent), (a = t.pos)) : (s = ''), p = a;
a < u && (32 === (h = t.src.charCodeAt(a)) || 10 === h);
a++
);
- if (a < u && p !== a && qr(t, a))
+ if (a < u && p !== a && Fr(t, a))
for (
r = t.linkContent, a = t.pos;
a < u && (32 === (h = t.src.charCodeAt(a)) || 10 === h);
@@ -11389,9 +11405,9 @@
if (
(a < u &&
91 === t.src.charCodeAt(a) &&
- ((p = a + 1), (a = Dr(t, a)) >= 0 ? (n = t.src.slice(p, a++)) : (a = p - 1)),
+ ((p = a + 1), (a = Br(t, a)) >= 0 ? (n = t.src.slice(p, a++)) : (a = p - 1)),
n || (void 0 === n && (a = o + 1), (n = t.src.slice(i, o))),
- !(l = t.env.references[Ur(n)]))
+ !(l = t.env.references[Zr(n)]))
)
return (t.pos = d), !1;
(s = l.href), (r = l.title);
@@ -11434,7 +11450,7 @@
(91 === t.src.charCodeAt(a + 1) &&
(!(t.level >= t.options.maxNesting) &&
((i = a + 2),
- !((o = Dr(t, a + 1)) < 0) &&
+ !((o = Br(t, a + 1)) < 0) &&
(e ||
(t.env.footnotes || (t.env.footnotes = {}),
t.env.footnotes.list || (t.env.footnotes.list = []),
@@ -11506,9 +11522,9 @@
return (
60 === t.src.charCodeAt(a) &&
(!((i = t.src.slice(a)).indexOf('>') < 0) &&
- ((o = i.match(ka))
- ? !(xa.indexOf(o[1].toLowerCase()) < 0) &&
- ((r = Rr((s = o[0].slice(1, -1)))),
+ ((o = i.match(Ca))
+ ? !(ka.indexOf(o[1].toLowerCase()) < 0) &&
+ ((r = qr((s = o[0].slice(1, -1)))),
!!t.parser.validateLink(s) &&
(e ||
(t.push({ type: 'link_open', href: r, level: t.level }),
@@ -11516,8 +11532,8 @@
t.push({ type: 'link_close', level: t.level })),
(t.pos += o[0].length),
!0))
- : !!(n = i.match(wa)) &&
- ((r = Rr('mailto:' + (s = n[0].slice(1, -1)))),
+ : !!(n = i.match(Aa)) &&
+ ((r = qr('mailto:' + (s = n[0].slice(1, -1)))),
!!t.parser.validateLink(r) &&
(e ||
(t.push({ type: 'link_open', href: r, level: t.level }),
@@ -11548,7 +11564,7 @@
return e >= 97 && e <= 122;
})(i)
) &&
- (!!(o = t.src.slice(s).match(Ta)) &&
+ (!!(o = t.src.slice(s).match(Oa)) &&
(e ||
t.push({
type: 'htmltag',
@@ -11570,38 +11586,38 @@
if (38 !== t.src.charCodeAt(n)) return !1;
if (n + 1 < s)
if (35 === t.src.charCodeAt(n + 1)) {
- if ((o = t.src.slice(n).match(Aa)))
+ if ((o = t.src.slice(n).match(Ma)))
return (
e ||
((i =
'x' === o[1][0].toLowerCase()
? parseInt(o[1].slice(1), 16)
: parseInt(o[1], 10)),
- (t.pending += yr(i) ? _r(i) : _r(65533))),
+ (t.pending += xr(i) ? wr(i) : wr(65533))),
(t.pos += o[0].length),
!0
);
} else if ((o = t.src.slice(n).match(La))) {
- var r = mr(o[1]);
+ var r = fr(o[1]);
if (o[1] !== r) return e || (t.pending += r), (t.pos += o[0].length), !0;
}
return e || (t.pending += '&'), t.pos++, !0;
}
]
];
- function Ma() {
- this.ruler = new Pr();
- for (var t = 0; t < Oa.length; t++) this.ruler.push(Oa[t][0], Oa[t][1]);
- this.validateLink = za;
+ function Pa() {
+ this.ruler = new Ir();
+ for (var t = 0; t < za.length; t++) this.ruler.push(za[t][0], za[t][1]);
+ this.validateLink = Da;
}
- function za(t) {
+ function Da(t) {
var e = t.trim().toLowerCase();
return (
-1 === (e = Sr(e)).indexOf(':') ||
-1 === ['vbscript', 'javascript', 'file', 'data'].indexOf(e.split(':')[0])
);
}
- (Ma.prototype.skipToken = function(t) {
+ (Pa.prototype.skipToken = function(t) {
var e,
i,
o = this.ruler.getRules(''),
@@ -11613,7 +11629,7 @@
t.pos++, t.cacheSet(s, t.pos);
}
}),
- (Ma.prototype.tokenize = function(t) {
+ (Pa.prototype.tokenize = function(t) {
for (var e, i, o = this.ruler.getRules(''), n = o.length, s = t.posMax; t.pos < s; ) {
for (i = 0; i < n && !(e = o[i](t, !1)); i++);
if (e) {
@@ -11622,11 +11638,11 @@
}
t.pending && t.pushPending();
}),
- (Ma.prototype.parse = function(t, e, i, o) {
- var n = new Ir(t, this, e, i, o);
+ (Pa.prototype.parse = function(t, e, i, o) {
+ var n = new Nr(t, this, e, i, o);
this.tokenize(n);
});
- var Pa = {
+ var Ia = {
default: {
options: {
html: !1,
@@ -11741,7 +11757,7 @@
}
}
};
- function Ia(t, e, i) {
+ function Na(t, e, i) {
(this.src = e),
(this.env = i),
(this.options = t.options),
@@ -11752,26 +11768,26 @@
(this.renderer = t.renderer),
(this.typographer = t.typographer);
}
- function Da(t, e) {
+ function Ba(t, e) {
'string' != typeof t && ((e = t), (t = 'default')),
e &&
null != e.linkify &&
console.warn(
"linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"
),
- (this.inline = new Ma()),
- (this.block = new ca()),
- (this.core = new ta()),
- (this.renderer = new zr()),
- (this.ruler = new Pr()),
+ (this.inline = new Pa()),
+ (this.block = new ua()),
+ (this.core = new ia()),
+ (this.renderer = new Dr()),
+ (this.ruler = new Ir()),
(this.options = {}),
- this.configure(Pa[t]),
+ this.configure(Ia[t]),
this.set(e || {});
}
- (Da.prototype.set = function(t) {
- fr(this.options, t);
+ (Ba.prototype.set = function(t) {
+ br(this.options, t);
}),
- (Da.prototype.configure = function(t) {
+ (Ba.prototype.configure = function(t) {
var e = this;
if (!t) throw new Error('Wrong `remarkable` preset, check name/content');
t.options && e.set(t.options),
@@ -11780,26 +11796,26 @@
t.components[i].rules && e[i].ruler.enable(t.components[i].rules, !0);
});
}),
- (Da.prototype.use = function(t, e) {
+ (Ba.prototype.use = function(t, e) {
return t(this, e), this;
}),
- (Da.prototype.parse = function(t, e) {
- var i = new Ia(this, t, e);
+ (Ba.prototype.parse = function(t, e) {
+ var i = new Na(this, t, e);
return this.core.process(i), i.tokens;
}),
- (Da.prototype.render = function(t, e) {
+ (Ba.prototype.render = function(t, e) {
return (e = e || {}), this.renderer.render(this.parse(t, e), this.options, e);
}),
- (Da.prototype.parseInline = function(t, e) {
- var i = new Ia(this, t, e);
+ (Ba.prototype.parseInline = function(t, e) {
+ var i = new Na(this, t, e);
return (i.inlineMode = !0), this.core.process(i), i.tokens;
}),
- (Da.prototype.renderInline = function(t, e) {
+ (Ba.prototype.renderInline = function(t, e) {
return (e = e || {}), this.renderer.render(this.parseInline(t, e), this.options, e);
});
- const Na = new Da(),
- Ra = new dr('@', ['contact', 'fields', 'globals', 'urns']),
- Ba = new dr('@', [
+ const Ra = new Ba(),
+ qa = new pr('@', ['contact', 'fields', 'globals', 'urns']),
+ Ua = new pr('@', [
'contact',
'fields',
'globals',
@@ -11815,54 +11831,54 @@
'trigger',
'resume'
]);
- const qa = _e(
- class extends xe {
+ const Fa = we(
+ class extends ke {
constructor(t) {
- if ((super(t), t.type !== ye))
+ if ((super(t), t.type !== xe))
throw new Error('renderMarkdown only supports child expressions');
}
update(t, [e]) {
return this.render(e);
}
render(t) {
- return void 0 === this.value && (this.value = t), Z`${ar(Na.render(this.value))}`;
+ return void 0 === this.value && (this.value = t), j`${hr(Ra.render(this.value))}`;
}
}
),
- Ua = (t, e) => {
+ Za = (t, e) => {
if (t.signature) {
const i = t.signature.indexOf('('),
o = t.signature.substr(0, i),
n = t.signature.substr(i);
- return Z`
+ return j`
ƒ
${o}
${
e
- ? Z`
+ ? j`
${n}
-
${qa(t.summary)}
+
${Fa(t.summary)}
`
: null
}
`;
}
- return Z`
+ return j`
${t.name}
- ${e ? Z`
${t.summary}
` : null}
+ ${e ? j`
${t.summary}
` : null}
`;
},
- Fa = (t, e) =>
+ ja = (t, e) =>
e ? t.filter(t => !!t.signature && 0 === t.signature.indexOf((e || '').toLowerCase())) : t,
- Za = (t, e, i = {}, o) => {
+ Ha = (t, e, i = {}, o) => {
const n = (e || '').split('.');
let s = o ? t.root : t.root_no_session;
if (!s) return [];
@@ -11918,7 +11934,7 @@
const { offsetLeft: h, offsetTop: c } = l;
return document.body.removeChild(n), { left: i + h, top: o + c };
},
- ja = (t, e, i) => {
+ Wa = (t, e, i) => {
let o = '';
o = i.signature ? i.signature.substr(0, i.signature.indexOf('(') + 1) : i.name;
const n = t.length;
@@ -11933,13 +11949,13 @@
l.left > e.width && (e.scrollLeft = l.left), e.dispatchEvent(new Event('input'));
}
},
- Ha = (t, e, i) => {
+ Ga = (t, e, i) => {
const o = { currentFunction: null, options: [], anchorPosition: null, query: null };
if (!t) return;
if (!e) return o;
const n = t.selectionStart,
s = t.value.substring(0, n),
- r = i ? Ba : Ra,
+ r = i ? Ua : qa,
a = r
.findExpressions(s)
.find(t => t.start <= n && (t.end > n || (t.end === n && !t.closed)));
@@ -11948,7 +11964,7 @@
if (n) {
const t = r.functionContext(a.text);
if (t) {
- const i = Fa(e.getFunctions(), t);
+ const i = ja(e.getFunctions(), t);
i.length > 0 && (o.currentFunction = i[0]);
}
}
@@ -11961,8 +11977,8 @@
(o.anchorPosition = { left: l.left - 2 - t.scrollLeft, top: l.top - t.scrollTop }),
(o.query = a.text.substr(s, a.text.length - s)),
(o.options = [
- ...Za(e.getCompletionSchema(), o.query, e.getKeyedAssets(), i),
- ...(n ? Fa(e.getFunctions(), o.query) : [])
+ ...Ha(e.getCompletionSchema(), o.query, e.getKeyedAssets(), i),
+ ...(n ? ja(e.getFunctions(), o.query) : [])
]),
o
);
@@ -11971,7 +11987,7 @@
} else (o.options = []), (o.query = '');
return o;
};
- class Wa extends me {
+ class Qa extends fe {
constructor() {
super(...arguments),
(this.hiddenInputs = []),
@@ -12000,14 +12016,14 @@
(this.getName = t => t[this.nameKey || 'name']),
(this.isMatch = (t, e) => (this.getName(t) || '').toLowerCase().indexOf(e) > -1),
(this.getValue = t => t[this.valueKey || 'value'] || t.id),
- (this.renderOptionDetail = () => Z``),
+ (this.renderOptionDetail = () => j``),
(this.renderSelectedItem = this.renderSelectedItemDefault),
(this.createArbitraryOption = this.createArbitraryOptionDefault),
(this.getOptions = this.getOptionsDefault),
(this.isComplete = this.isCompleteDefault),
(this.staticOptions = []),
(this.next = null),
- (this.lruCache = Me(20, 6e4)),
+ (this.lruCache = Pe(20, 6e4)),
(this.getNameInternal = t => this.getName(t));
}
static get styles() {
@@ -12338,7 +12354,7 @@
if (0 === this.values.length && (!this.placeholder || this.value))
if (0 == this.staticOptions.length && this.endpoint) {
const t = this.value;
- jt(this.endpoint).then(e => {
+ Wt(this.endpoint).then(e => {
if (e && e.length > 0) {
if (t) {
const i = e.find(e => this.getValue(e) === t);
@@ -12381,7 +12397,7 @@
}, this.quietMillis))),
this.endpoint &&
t.has('fetching') &&
- (this.fetching || this.isPastFetchThreshold() || this.fireCustomEvent(Ae.FetchComplete)),
+ (this.fetching || this.isPastFetchThreshold() || this.fireCustomEvent(Me.FetchComplete)),
(t.has('cursorIndex') || t.has('visibleOptions')) &&
this.endpoint &&
!this.fetching &&
@@ -12438,9 +12454,9 @@
handleOptionSelection(t) {
const e = t.detail.selected;
e.post && this.endpoint
- ? Kt(this.endpoint, e).then(t => {
+ ? Yt(this.endpoint, e).then(t => {
t.status >= 200 && t.status < 300
- ? (this.setSelectedOption(t.json), (this.lruCache = Me(20, 6e4)))
+ ? (this.setSelectedOption(t.json), (this.lruCache = Pe(20, 6e4)))
: this.blur();
})
: this.setSelectedOption(e);
@@ -12449,7 +12465,7 @@
const e = t.detail.selected,
i = t.detail.tabbed,
o = this.shadowRoot.querySelector('.searchbox');
- ja(this.query, o, e),
+ Wa(this.query, o, e),
(this.query = ''),
(this.completionOptions = []),
i ? this.fetchExpressions() : -1 === this.input.indexOf('(') && this.addInputAsValue();
@@ -12505,19 +12521,19 @@
this.requestUpdate('cursorIndex'))),
this.sortFunction && t.sort(this.sortFunction),
(this.visibleOptions = t),
- this.fireCustomEvent(Ae.ContentChanged, { options: this.visibleOptions });
+ this.fireCustomEvent(Me.ContentChanged, { options: this.visibleOptions });
}
fetchExpressions() {
const t = document.querySelector('temba-store');
if (this.expressions && t) {
const e = this.shadowRoot.querySelector('.searchbox'),
- i = Ha(e, t, 'session' === this.expressions);
+ i = Ga(e, t, 'session' === this.expressions);
return (
(this.query = i.query),
(this.completionOptions = i.options),
(this.visibleOptions = []),
(this.anchorPosition = i.anchorPosition),
- void this.fireCustomEvent(Ae.FetchComplete)
+ void this.fireCustomEvent(Me.FetchComplete)
);
}
}
@@ -12551,7 +12567,7 @@
void (this.fetching = !1)
);
this.searchable && !this.queryParam
- ? jt(n).then(t => {
+ ? Wt(n).then(t => {
this.cache &&
!this.tags &&
(this.lruCache.set(n, { options: t, complete: !0, next: null }),
@@ -12560,7 +12576,7 @@
this.setVisibleOptions([...i, ...t]),
(this.fetching = !1));
})
- : Ft(n)
+ : jt(n)
.then(s => {
const r = this.getOptions(s).filter(t => this.isMatch(t, o)),
a = s.json;
@@ -12664,8 +12680,8 @@
}
getEventHandlers() {
return [
- { event: Ae.Canceled, method: this.handleCancel },
- { event: Ae.CursorChanged, method: this.handleCursorChanged },
+ { event: Me.Canceled, method: this.handleCancel },
+ { event: Me.CursorChanged, method: this.handleCursorChanged },
{ event: 'blur', method: this.handleBlur },
{ event: 'focus', method: this.handleFocus }
];
@@ -12676,11 +12692,11 @@
}
renderSelectedItemDefault(t) {
return t
- ? Z`
+ ? j`
${
t.icon
- ? Z`
`
@@ -12724,19 +12740,19 @@
}
render() {
const t = 0 === this.values.length ? this.placeholder : '',
- e = Z`
+ e = j`
${t}
`,
i =
this.clearable && this.values.length > 0 && !this.multi
- ? Z`
`
: null,
- o = Zt({
+ o = Ht({
multi: this.multi,
single: !this.multi,
searchable: this.searchable,
@@ -12750,7 +12766,7 @@
}),
n = this.anchorPosition ? { top: '0px', left: this.anchorPosition.left - 10 + 'px' } : {},
s = this.searchable
- ? Z`
+ ? j`