MCPcopy Create free account
hub / github.com/alignoth/alignoth / rN

Function rN

resources/vega.min.js:30102–30183  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

30100 return e;
30101 }
30102 function rN(t) {
30103 return "[" === t[0]
30104 ? (function (t) {
30105 const e = t.length;
30106 let n,
30107 r = 1;
30108 if (((r = eN(t, r, Iz, jz, Iz)), r === e))
30109 throw "Empty between selector: " + t;
30110 if (((n = nN(t.substring(1, r))), 2 !== n.length))
30111 throw "Between selector must have two elements: " + t;
30112 if (((t = t.slice(r + 1).trim()), t[0] !== Xz))
30113 throw "Expected '>' after between selector: " + t;
30114 n = n.map(rN);
30115 const i = rN(t.slice(1).trim());
30116 if (i.between) return { between: n, stream: i };
30117 i.between = n;
30118 return i;
30119 })(t)
30120 : (function (t) {
30121 const e = { source: Qz },
30122 n = [];
30123 let r,
30124 i,
30125 o = [0, 0],
30126 a = 0,
30127 s = 0,
30128 u = t.length,
30129 l = 0;
30130 if (t[u - 1] === Hz) {
30131 if (((l = t.lastIndexOf(Wz)), !(l >= 0)))
30132 throw "Unmatched right brace: " + t;
30133 try {
30134 o = (function (t) {
30135 const e = t.split(Gz);
30136 if (!t.length || e.length > 2) throw t;
30137 return e.map((e) => {
30138 const n = +e;
30139 if (n != n) throw t;
30140 return n;
30141 });
30142 })(t.substring(l + 1, u - 1));
30143 } catch (e) {
30144 throw "Invalid throttle specification: " + t;
30145 }
30146 ((u = (t = t.slice(0, l).trim()).length), (l = 0));
30147 }
30148 if (!u) throw t;
30149 t[0] === Vz && (a = ++l);
30150 ((r = eN(t, l, Yz)),
30151 r < u && (n.push(t.substring(s, r).trim()), (s = l = ++r)));
30152 if (((l = eN(t, l, jz)), l === u)) n.push(t.substring(s, u).trim());
30153 else if (
30154 (n.push(t.substring(s, l).trim()), (i = []), (s = ++l), s === u)
30155 )
30156 throw "Unmatched left bracket: " + t;
30157 for (; l < u; ) {
30158 if (((l = eN(t, l, Iz)), l === u))
30159 throw "Unmatched left bracket: " + t;

Callers

nothing calls this directly

Calls 4

eNFunction · 0.85
nNFunction · 0.85
testMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected