UNPKG

@smals-belgium-shared/vidis-medication-scheme-detail

Version:

Medication scheme detail web component

1,206 lines 1.36 MB
var Qre = Object.defineProperty; var Cm = (e) => { throw TypeError(e); }; var eoe = (e, t, i) => t in e ? Qre(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; var s = (e, t, i) => eoe(e, typeof t != "symbol" ? t + "" : t, i), Tm = (e, t, i) => t.has(e) || Cm("Cannot " + i); var Pt = (e, t, i) => (Tm(e, t, "read from private field"), i ? i.call(e) : t.get(e)), _r = (e, t, i) => t.has(e) ? Cm("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), Nm = (e, t, i, n) => (Tm(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); var toe = Object.create, gc = Object.defineProperty, noe = Object.defineProperties, ioe = Object.getOwnPropertyDescriptor, aoe = Object.getOwnPropertyDescriptors, roe = Object.getOwnPropertyNames, Nl = Object.getOwnPropertySymbols, ooe = Object.getPrototypeOf, gh = Object.prototype.hasOwnProperty, v0 = Object.prototype.propertyIsEnumerable, Om = (e, t, i) => t in e ? gc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, de = (e, t) => { for (var i in t || (t = {})) gh.call(t, i) && Om(e, i, t[i]); if (Nl) for (var i of Nl(t)) v0.call(t, i) && Om(e, i, t[i]); return e; }, mt = (e, t) => noe(e, aoe(t)), y0 = (e, t) => { var i = {}; for (var n in e) gh.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]); if (e != null && Nl) for (var n of Nl(e)) t.indexOf(n) < 0 && v0.call(e, n) && (i[n] = e[n]); return i; }, fe = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Z = (e, t) => { for (var i in t) gc(e, i, { get: t[i], enumerable: !0 }); }, soe = (e, t, i, n) => { if (t && typeof t == "object" || typeof t == "function") for (let a of roe(t)) !gh.call(e, a) && a !== i && gc(e, a, { get: () => t[a], enumerable: !(n = ioe(t, a)) || n.enumerable }); return e; }, b0 = (e, t, i) => (i = e != null ? toe(ooe(e)) : {}, soe(t || !e || !e.__esModule ? gc(i, "default", { value: e, enumerable: !0 }) : i, e)), Ht = (e, t, i) => new Promise((n, a) => { var r = (d) => { try { l(i.next(d)); } catch (c) { a(c); } }, o = (d) => { try { l(i.throw(d)); } catch (c) { a(c); } }, l = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(r, o); l((i = i.apply(e, t)).next()); }), loe = fe((e, t) => { (function(i, n) { typeof e == "object" && typeof t < "u" ? t.exports = n() : typeof define == "function" && define.amd ? define(n) : (i = typeof globalThis < "u" ? globalThis : i || self, i.MessageFormat = n()); })(e, function() { var i = function() { return i = Object.assign || function(p) { for (var f, y = 1, b = arguments.length; y < b; y++) { f = arguments[y]; for (var _ in f) Object.prototype.hasOwnProperty.call(f, _) && (p[_] = f[_]); } return p; }, i.apply(this, arguments); }; function n(p) { var f = typeof Symbol == "function" && Symbol.iterator, y = f && p[f], b = 0; if (y) return y.call(p); if (p && typeof p.length == "number") return { next: function() { return p && b >= p.length && (p = void 0), { value: p && p[b++], done: !p }; } }; throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined."); } function a(p, f) { var y = typeof Symbol == "function" && p[Symbol.iterator]; if (!y) return p; var b = y.call(p), _, E = [], k; try { for (; (f === void 0 || f-- > 0) && !(_ = b.next()).done; ) E.push(_.value); } catch (C) { k = { error: C }; } finally { try { _ && !_.done && (y = b.return) && y.call(b); } finally { if (k) throw k.error; } } return E; } function r(p, f, y) { if (arguments.length === 2) for (var b = 0, _ = f.length, E; b < _; b++) (E || !(b in f)) && (E || (E = Array.prototype.slice.call(f, 0, b)), E[b] = f[b]); return p.concat(E || Array.prototype.slice.call(f)); } typeof SuppressedError == "function" && SuppressedError; class o extends Error { constructor(f, y, b) { super(f), this.token = y, this.type = b || "error"; } } let l = (p) => p < 4 ? "short" : p === 4 ? "long" : "narrow", d = (p) => p % 2 === 0 ? "2-digit" : "numeric"; function c(p, f) { switch (p.char) { case "y": return { year: d(p.width) }; case "r": return { calendar: "gregory", year: "numeric" }; default: return f(`${p.desc} is not supported; falling back to year:numeric`, o.WARNING), { year: "numeric" }; } } function h(p, f) { switch (p.width) { case 1: return "numeric"; case 2: return "2-digit"; case 3: return "short"; case 4: return "long"; case 5: return "narrow"; default: f(`${p.desc} is not supported with width ${p.width}`); return; } } function m(p, f) { let { char: y, desc: b, width: _ } = p; if (y === "d") return d(_); f(`${b} is not supported`); } function v(p, f) { let { char: y, desc: b, width: _ } = p; if ((y === "c" || y === "e") && _ < 3) { let E = `Numeric value is not supported for ${b}; falling back to weekday:short`; f(E, o.WARNING); } return l(_); } function g(p) { let f = d(p.width), y; switch (p.char) { case "h": y = "h12"; break; case "H": y = "h23"; break; case "k": y = "h24"; break; case "K": y = "h11"; break; } return y ? { hour: f, hourCycle: y } : { hour: f }; } function x(p, f) { let { char: y, desc: b, width: _ } = p; switch (y) { case "v": case "z": return _ === 4 ? "long" : "short"; case "V": if (_ === 4) return "long"; f(`${b} is not supported with width ${_}`); return; case "X": f(`${b} is not supported`); return; } return "short"; } function w(p, f) { switch (p.field) { case "era": return { era: l(p.width) }; case "year": return c(p, f); case "month": return { month: h(p, f) }; case "day": return { day: m(p, f) }; case "weekday": return { weekday: v(p, f) }; case "period": return; case "hour": return g(p); case "min": return { minute: d(p.width) }; case "sec": return { second: d(p.width) }; case "tz": return { timeZoneName: x(p, f) }; case "quarter": case "week": case "sec-frac": case "ms": f(`${p.desc} is not supported`); } } function S(p, f) { let y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (E) => { throw E; }, b = { timeZone: f }, _ = []; for (let E of p) { let { error: k, field: C, str: N } = E; if (k) { let he = new o(k.message, E); he.stack = k.stack, y(he); } if (N) { let he = `Ignoring string part: ${N}`; y(new o(he, E, o.WARNING)); } C && (_.indexOf(C) === -1 ? _.push(C) : y(new o(`Duplicate ${C} token`, E))); let V = w(E, (he, xe) => y(new o(he, E, xe))); V && Object.assign(b, V); } return b; } let T = { G: { field: "era", desc: "Era" }, y: { field: "year", desc: "Year" }, Y: { field: "year", desc: 'Year of "Week of Year"' }, u: { field: "year", desc: "Extended year" }, U: { field: "year", desc: "Cyclic year name" }, r: { field: "year", desc: "Related Gregorian year" }, Q: { field: "quarter", desc: "Quarter" }, q: { field: "quarter", desc: "Stand-alone quarter" }, M: { field: "month", desc: "Month in year" }, L: { field: "month", desc: "Stand-alone month in year" }, w: { field: "week", desc: "Week of year" }, W: { field: "week", desc: "Week of month" }, d: { field: "day", desc: "Day in month" }, D: { field: "day", desc: "Day of year" }, F: { field: "day", desc: "Day of week in month" }, g: { field: "day", desc: "Modified julian day" }, E: { field: "weekday", desc: "Day of week" }, e: { field: "weekday", desc: "Local day of week" }, c: { field: "weekday", desc: "Stand-alone local day of week" }, a: { field: "period", desc: "AM/PM marker" }, b: { field: "period", desc: "AM/PM/noon/midnight marker" }, B: { field: "period", desc: "Flexible day period" }, h: { field: "hour", desc: "Hour in AM/PM (1~12)" }, H: { field: "hour", desc: "Hour in day (0~23)" }, k: { field: "hour", desc: "Hour in day (1~24)" }, K: { field: "hour", desc: "Hour in AM/PM (0~11)" }, j: { field: "hour", desc: "Hour in preferred cycle" }, J: { field: "hour", desc: "Hour in preferred cycle without marker" }, C: { field: "hour", desc: "Hour in preferred cycle with flexible marker" }, m: { field: "min", desc: "Minute in hour" }, s: { field: "sec", desc: "Second in minute" }, S: { field: "sec-frac", desc: "Fractional second" }, A: { field: "ms", desc: "Milliseconds in day" }, z: { field: "tz", desc: "Time Zone: specific non-location" }, Z: { field: "tz", desc: "Time Zone" }, O: { field: "tz", desc: "Time Zone: localized" }, v: { field: "tz", desc: "Time Zone: generic non-location" }, V: { field: "tz", desc: "Time Zone: ID" }, X: { field: "tz", desc: "Time Zone: ISO8601 with Z" }, x: { field: "tz", desc: "Time Zone: ISO8601" } }, L = (p) => p >= "A" && p <= "Z" || p >= "a" && p <= "z"; function P(p, f) { let y = p[f], b = 1; for (; p[++f] === y; ) ++b; let _ = T[y]; if (!_) { let E = `The letter ${y} is not a valid field identifier`; return { char: y, error: new Error(E), width: b }; } return { char: y, field: _.field, desc: _.desc, width: b }; } function re(p, f) { let y = p[++f], b = 2; if (y === "'") return { char: "'", str: y, width: b }; for (; ; ) { let _ = p[++f]; if (++b, _ === void 0) { let E = `Unterminated quoted literal in pattern: ${y || p}`; return { char: "'", error: new Error(E), str: y, width: b }; } else if (_ === "'") { if (p[++f] !== "'") return { char: "'", str: y, width: b }; ++b; } y += _; } } function ge(p, f) { let y = p[f]; if (!y) return null; if (L(y)) return P(p, f); if (y === "'") return re(p, f); let b = y, _ = 1; for (; ; ) { let E = p[++f]; if (!E || L(E) || E === "'") return { char: y, str: b, width: _ }; b += E, _ += 1; } } function ke(p) { let f = [], y = 0; for (; ; ) { let b = ge(p, y); if (!b) return f; f.push(b), y += b.width; } } function jt(p, f, y, b) { typeof f == "string" && (f = ke(f)), typeof y == "function" && (b = y, y = void 0); let _ = S(f, y, b), E = new Intl.DateTimeFormat(p, _); return (k) => E.format(k); } function Et(p, f, y, b) { typeof f == "string" && (f = ke(f)), typeof y == "function" && (b = y, y = void 0); let _ = S(f, y, b); return ["(function() {", `var opt = ${JSON.stringify(_)};`, `var dtf = new Intl.DateTimeFormat(${JSON.stringify(p)}, opt);`, "return function(value) { return dtf.format(value); }"].join(` `) + ` })()`; } class et extends Error { constructor(f, y) { super(y), this.code = f; } } class Nt extends et { constructor(f, y) { super("BAD_OPTION", `Unknown ${f} option: ${y}`), this.stem = f, this.option = y; } } class ie extends et { constructor(f) { super("BAD_STEM", `Unknown stem: ${f}`), this.stem = f; } } class K extends et { constructor(f, y) { super("MASKED_VALUE", `Value for ${f} is set multiple times`), this.type = f, this.prev = y; } } class De extends et { constructor(f) { super("MISSING_OPTION", `Required option missing for ${f}`), this.stem = f; } } class j extends et { constructor(f, y) { super("BAD_PATTERN", y), this.char = f; } } class z extends et { constructor(f, y, b) { let _ = b > 1 ? `${b} options` : "one option"; super("TOO_MANY_OPTIONS", `Token ${f} only supports ${_} (got ${y.length})`), this.stem = f, this.options = y; } } function ee(p, f) { let { numberingSystem: y } = f; return Array.isArray(p) || (p = [p]), y ? p.map((b) => { let _ = b.indexOf("-u-") === -1 ? "u-nu" : "nu"; return `${b}-${_}-${y}`; }).concat(p) : p; } function Pe(p, f) { let y = +p + f / 2; return y - y % +f; } function Xe(p) { let { scale: f, unit: y } = p, b = typeof f == "number" && f >= 0 ? f : 1; return y && y.style === "percent" && (b *= 0.01), b; } function Kt(p) { let f = Xe(p), { precision: y } = p; return y && y.style === "precision-increment" ? (b) => Pe(b, y.increment) * f : (b) => b * f; } function Fe(p) { let f = Xe(p), { precision: y } = p; if (y && y.style === "precision-increment") { let b = `+n + ${y.increment / 2}`, _ = `x - (x % +${y.increment})`; return f !== 1 && (_ = `(${_}) * ${f}`), `function(n) { var x = ${b}; return ${_}; }`; } return f !== 1 ? `function(n) { return n * ${f}; }` : null; } function ze(p, f) { let { decimal: y, group: b, integerWidth: _, notation: E, precision: k, roundingMode: C, sign: N, unit: V, unitPer: he, unitWidth: xe } = p, Ae = (nt, St) => { }, ne = {}; if (V) switch (V.style) { case "base-unit": ne.style = "decimal"; break; case "currency": ne.style = "currency", ne.currency = V.currency; break; case "measure-unit": ne.style = "unit", ne.unit = V.unit.replace(/.*-/, ""), he && (ne.unit += "-per-" + he.replace(/.*-/, "")); break; case "percent": ne.style = "percent"; break; } switch (xe) { case "unit-width-full-name": ne.currencyDisplay = "name", ne.unitDisplay = "long"; break; case "unit-width-hidden": break; case "unit-width-iso-code": ne.currencyDisplay = "code"; break; case "unit-width-narrow": ne.currencyDisplay = "narrowSymbol", ne.unitDisplay = "narrow"; break; case "unit-width-short": ne.currencyDisplay = "symbol", ne.unitDisplay = "short"; break; } switch (b) { case "group-off": ne.useGrouping = !1; break; case "group-auto": ne.useGrouping = !0; break; case "group-min2": case "group-on-aligned": case "group-thousands": ne.useGrouping = !0; break; } if (k) switch (k.style) { case "precision-fraction": { let { minFraction: nt, maxFraction: St, minSignificant: zt, maxSignificant: ln, source: Yn } = k; typeof nt == "number" && (ne.minimumFractionDigits = nt, typeof zt == "number" && Ae()), typeof St == "number" && (ne.maximumFractionDigits = St), typeof zt == "number" && (ne.minimumSignificantDigits = zt), typeof ln == "number" && (ne.maximumSignificantDigits = ln); break; } case "precision-integer": ne.maximumFractionDigits = 0; break; case "precision-unlimited": ne.maximumFractionDigits = 20; break; case "precision-increment": break; case "precision-currency-standard": ne.trailingZeroDisplay = k.trailingZero; break; case "precision-currency-cash": Ae(k.style); break; } if (E) switch (E.style) { case "compact-short": ne.notation = "compact", ne.compactDisplay = "short"; break; case "compact-long": ne.notation = "compact", ne.compactDisplay = "long"; break; case "notation-simple": ne.notation = "standard"; break; case "scientific": case "engineering": { let { expDigits: nt, expSign: St, source: zt, style: ln } = E; ne.notation = ln; break; } } if (_) { let { min: nt, max: St, source: zt } = _; if (nt > 0 && (ne.minimumIntegerDigits = nt), Number(St) > 0) { let ln = ne.notation === "engineering" || ne.notation === "scientific"; St === 3 && ln ? ne.notation = "engineering" : Ae(); } } switch (N) { case "sign-auto": ne.signDisplay = "auto"; break; case "sign-always": ne.signDisplay = "always"; break; case "sign-except-zero": ne.signDisplay = "exceptZero"; break; case "sign-never": ne.signDisplay = "never"; break; case "sign-accounting": ne.currencySign = "accounting"; break; case "sign-accounting-always": ne.currencySign = "accounting", ne.signDisplay = "always"; break; case "sign-accounting-except-zero": ne.currencySign = "accounting", ne.signDisplay = "exceptZero"; break; } return ne; } function dt(p, f, y) { let b = p[f]; switch (b) { case "%": return { char: "%", style: "percent", width: 1 }; case "‰": return { char: "%", style: "permille", width: 1 }; case "¤": { let _ = 1; for (; p[++f] === "¤"; ) ++_; switch (_) { case 1: return { char: b, currency: "default", width: _ }; case 2: return { char: b, currency: "iso-code", width: _ }; case 3: return { char: b, currency: "full-name", width: _ }; case 5: return { char: b, currency: "narrow", width: _ }; default: { let E = `Invalid number (${_}) of ¤ chars in pattern`; return y(new j("¤", E)), null; } } } case "*": { let _ = p[f + 1]; if (_) return { char: b, pad: _, width: 2 }; break; } case "+": case "-": return { char: b, width: 1 }; case "'": { let _ = p[++f], E = 2; if (_ === "'") return { char: b, str: _, width: E }; for (; ; ) { let k = p[++f]; if (++E, k === void 0) { let C = `Unterminated quoted literal in pattern: ${_}`; return y(new j("'", C)), { char: b, str: _, width: E }; } else if (k === "'") { if (p[++f] !== "'") return { char: b, str: _, width: E }; ++E; } _ += k; } } } return null; } let $n = (p) => p >= "0" && p <= "9"; function tt(p, f) { let y = p[f]; if ($n(y)) { let b = y; for (; ; ) { let _ = p[++f]; if ($n(_)) b += _; else return { char: "0", digits: b, width: b.length }; } } switch (y) { case "#": { let b = 1; for (; p[++f] === "#"; ) ++b; return { char: y, width: b }; } case "@": { let b = 1; for (; p[++f] === "@"; ) ++b; let _ = b; for (f -= 1; p[++f] === "#"; ) ++_; return { char: y, min: b, width: _ }; } case "E": { let b = p[f + 1] === "+"; b && ++f; let _ = 0; for (; p[++f] === "0"; ) ++_; let E = (b ? 2 : 1) + _; if (_) return { char: y, expDigits: _, plus: b, width: E }; break; } case ".": case ",": return { char: y, width: 1 }; } return null; } function Jt(p, f, y) { let b; (function(V) { V[V.Prefix = 0] = "Prefix", V[V.Number = 1] = "Number", V[V.Suffix = 2] = "Suffix"; })(b || (b = {})); let _ = [], E = [], k = [], C = b.Prefix, N = ""; for (; f < p.length; ) { let V = p[f]; if (V === ";") { f += 1; break; } switch (C) { case b.Prefix: { let he = dt(p, f, y); if (he) N && (_.push({ char: "'", str: N, width: N.length }), N = ""), _.push(he), f += he.width; else { let xe = tt(p, f); xe ? (N && (_.push({ char: "'", str: N, width: N.length }), N = ""), C = b.Number, E.push(xe), f += xe.width) : (N += V, f += 1); } break; } case b.Number: { let he = tt(p, f); he ? (E.push(he), f += he.width) : C = b.Suffix; break; } case b.Suffix: { let he = dt(p, f, y); he ? (N && (k.push({ char: "'", str: N, width: N.length }), N = ""), k.push(he), f += he.width) : (N += V, f += 1); break; } } } return N && k.push({ char: "'", str: N, width: N.length }), { pattern: { prefix: _, number: E, suffix: k }, pos: f }; } function Vt(p, f) { let { pattern: y, pos: b } = Jt(p, 0, f); if (b < p.length) { let { pattern: _ } = Jt(p, b, f); return { tokens: y, negative: _ }; } return { tokens: y }; } function di(p, f) { let y = {}, b = !1, _ = !1, E = 0, k = "", C = -1, N = "", V = 0; for (let xe = 0; xe < p.length; ++xe) { let Ae = p[xe]; switch (Ae.char) { case "#": { if (C === -1) { if (k) { let ne = "Pattern has # after integer digits"; f(new j("#", ne)); } E += Ae.width; } else V += Ae.width; break; } case "0": { if (C === -1) k += Ae.digits; else { if (V) { let ne = "Pattern has digits after # in fraction"; f(new j("0", ne)); } N += Ae.digits; } break; } case "@": { y.precision && f(new K("precision", y.precision)), y.precision = { style: "precision-fraction", minSignificant: Ae.min, maxSignificant: Ae.width }; break; } case ",": b = !0; break; case ".": if (C === 1) { let ne = "Pattern has more than one decimal separator"; f(new j(".", ne)); } C = xe; break; case "E": { if (_ && f(new K("exponent", y.notation)), b) { let ne = "Exponential patterns may not contain grouping separators"; f(new j("E", ne)); } y.notation = { style: "scientific" }, Ae.expDigits > 1 && (y.notation.expDigits = Ae.expDigits), Ae.plus && (y.notation.expSign = "sign-always"), _ = !0; } } } b ? y.group = "group-auto" : E + k.length > 3 && (y.group = "group-off"); let he = +`${k || "0"}.${N}`; if (he && (y.precision = { style: "precision-increment", increment: he }), !_) k.length > 1 && (y.integerWidth = { min: k.length }), !y.precision && (N.length || V) && (y.precision = { style: "precision-fraction", minFraction: N.length, maxFraction: N.length + V }); else if ((!y.precision || he) && (y.integerWidth = E ? { min: 1, max: E + k.length } : { min: Math.max(1, k.length) }), y.precision) he || (y.integerWidth = { min: 1, max: 1 }); else { let xe = k.length + N.length; C === -1 ? xe > 0 && (y.precision = { style: "precision-fraction", maxSignificant: xe }) : (y.precision = { style: "precision-fraction", maxSignificant: Math.max(1, xe) + V }, xe > 1 && (y.precision.minSignificant = xe)); } return y; } function ia(p, f, y, b, _) { let E = !1, k = ""; for (let C of p) switch (C.char) { case "%": f.unit = { style: C.style }, _ ? E = !0 : k = ""; break; case "¤": if (!y) { let N = "The ¤ pattern requires a currency"; b(new j("¤", N)); break; } switch (f.unit = { style: "currency", currency: y }, C.currency) { case "iso-code": f.unitWidth = "unit-width-iso-code"; break; case "full-name": f.unitWidth = "unit-width-full-name"; break; case "narrow": f.unitWidth = "unit-width-narrow"; break; } _ ? E = !0 : k = ""; break; case "*": break; case "+": E || (k += "+"); break; case "'": E || (k += C.str); break; } return k; } function Rs(p, f) { let y = !1, b = ""; for (let _ of p) switch (_.char) { case "%": case "¤": f ? y = !0 : b = ""; break; case "-": y || (b += "-"); break; case "'": y || (b += _.str); break; } return b; } function Ls(p, f) { let y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (N) => { throw N; }, { tokens: b, negative: _ } = Vt(p, y), E = di(b.number, y), k = ia(b.prefix, E, f, y, !0), C = ia(b.suffix, E, f, y, !1); if (_) { let N = Rs(_.prefix, !0), V = Rs(_.suffix, !1); E.affix = { pos: [k, C], neg: [N, V] }, E.sign = "sign-never"; } else (k || C) && (E.affix = { pos: [k, C] }); return E; } function dre(p) { return ["arab", "arabext", "bali", "beng", "deva", "fullwide", "gujr", "guru", "hanidec", "khmr", "knda", "laoo", "latn", "limb", "mlym", "mong", "mymr", "orya", "tamldec", "telu", "thai", "tibt"].indexOf(p) !== -1; } function gm(p) { let f = ["acceleration", "angle", "area", "concentr", "consumption", "digital", "duration", "electric", "energy", "force", "frequency", "graphics", "length", "light", "mass", "power", "pressure", "speed", "temperature", "torque", "volume"], [y] = p.split("-", 1); return f.indexOf(y) !== -1; } let vm = { "compact-short": 0, "compact-long": 0, "notation-simple": 0, scientific: 2, engineering: 2, percent: 0, permille: 0, "base-unit": 0, currency: 1, "measure-unit": 1, "per-measure-unit": 1, "unit-width-narrow": 0, "unit-width-short": 0, "unit-width-full-name": 0, "unit-width-iso-code": 0, "unit-width-hidden": 0, "precision-integer": 0, "precision-unlimited": 0, "precision-currency-standard": 1, "precision-currency-cash": 0, "precision-increment": 1, "rounding-mode-ceiling": 0, "rounding-mode-floor": 0, "rounding-mode-down": 0, "rounding-mode-up": 0, "rounding-mode-half-even": 0, "rounding-mode-half-down": 0, "rounding-mode-half-up": 0, "rounding-mode-unnecessary": 0, "integer-width": 1, scale: 1, "group-off": 0, "group-min2": 0, "group-auto": 0, "group-on-aligned": 0, "group-thousands": 0, latin: 0, "numbering-system": 1, "sign-auto": 0, "sign-always": 0, "sign-never": 0, "sign-accounting": 0, "sign-accounting-always": 0, "sign-except-zero": 0, "sign-accounting-except-zero": 0, "decimal-auto": 0, "decimal-always": 0 }, ym = { currency: 1, "integer-width": 1, "measure-unit": 1, "numbering-system": 1, "per-measure-unit": 1, "precision-increment": 1, scale: 1 }; function hre(p) { return p in vm; } function pre(p) { return p in ym; } function mre(p, f, y) { if (hre(p)) { let b = vm[p]; if (f.length > b) { if (b === 0) for (let _ of f) y(new Nt(p, _)); else y(new z(p, f, b)); return !1; } else if (pre(p) && f.length < ym[p]) return y(new De(p)), !1; } return !0; } function iu(p, f) { let y = f === "fraction" ? /^\.(0*)(\+|#*)$/ : /^(@+)(\+|#*)$/, b = p && p.match(y); if (b) { let _ = b[1].length; switch (b[2].charAt(0)) { case "": return { min: _, max: _ }; case "+": return { min: _, max: null }; case "#": return { min: _, max: _ + b[2].length }; } } return null; } function fre(p, f, y) { let b = iu(p, "fraction"); if (b) { f.length > 1 && y(new z(p, f, 1)); let E = { style: "precision-fraction", source: p, minFraction: b.min }; b.max != null && (E.maxFraction = b.max); let k = f[0], C = iu(k, "significant"); return C ? (E.source = `${p}/${k}`, E.minSignificant = C.min, C.max != null && (E.maxSignificant = C.max)) : k && y(new Nt(p, k)), E; } let _ = iu(p, "significant"); if (_) { for (let k of f) y(new Nt(p, k)); let E = { style: "precision-fraction", source: p, minSignificant: _.min }; return _.max != null && (E.maxSignificant = _.max), E; } return null; } class gre { constructor(f) { this.skeleton = {}, this.onError = f; } badOption(f, y) { this.onError(new Nt(f, y)); } assertEmpty(f) { let y = this.skeleton[f]; y && this.onError(new K(f, y)); } parseToken(f, y) { if (!mre(f, y, this.onError)) return; let b = y[0], _ = this.skeleton; switch (f) { case "compact-short": case "compact-long": case "notation-simple": this.assertEmpty("notation"), _.notation = { style: f }; break; case "scientific": case "engineering": { let E = null, k; for (let N of y) switch (N) { case "sign-auto": case "sign-always": case "sign-never": case "sign-accounting": case "sign-accounting-always": case "sign-except-zero": case "sign-accounting-except-zero": k = N; break; default: /^\+e+$/.test(N) ? E = N.length - 1 : this.badOption(f, N); } this.assertEmpty("notation"); let C = y.join("/"); _.notation = E && k ? { style: f, source: C, expDigits: E, expSign: k } : E ? { style: f, source: C, expDigits: E } : k ? { style: f, source: C, expSign: k } : { style: f, source: C }; break; } case "percent": case "permille": case "base-unit": this.assertEmpty("unit"), _.unit = { style: f }; break; case "currency": /^[A-Z]{3}$/.test(b) ? (this.assertEmpty("unit"), _.unit = { style: f, currency: b }) : this.badOption(f, b); break; case "measure-unit": { gm(b) ? (this.assertEmpty("unit"), _.unit = { style: f, unit: b }) : this.badOption(f, b); break; } case "per-measure-unit": { gm(b) ? (this.assertEmpty("unitPer"), _.unitPer = b) : this.badOption(f, b); break; } case "unit-width-narrow": case "unit-width-short": case "unit-width-full-name": case "unit-width-iso-code": case "unit-width-hidden": this.assertEmpty("unitWidth"), _.unitWidth = f; break; case "precision-integer": case "precision-unlimited": case "precision-currency-cash": this.assertEmpty("precision"), _.precision = { style: f }; break; case "precision-currency-standard": this.assertEmpty("precision"), b === "w" ? _.precision = { style: f, trailingZero: "stripIfInteger" } : _.precision = { style: f }; break; case "precision-increment": { let E = Number(b); E > 0 ? (this.assertEmpty("precision"), _.precision = { style: f, increment: E }) : this.badOption(f, b); break; } case "rounding-mode-ceiling": case "rounding-mode-floor": case "rounding-mode-down": case "rounding-mode-up": case "rounding-mode-half-even": case "rounding-mode-half-odd": case "rounding-mode-half-ceiling": case "rounding-mode-half-floor": case "rounding-mode-half-down": case "rounding-mode-half-up": case "rounding-mode-unnecessary": this.assertEmpty("roundingMode"), _.roundingMode = f; break; case "integer-width": { if (/^\+0*$/.test(b)) this.assertEmpty("integerWidth"), _.integerWidth = { source: b, min: b.length - 1 }; else { let E = b.match(/^#*(0*)$/); E ? (this.assertEmpty("integerWidth"), _.integerWidth = { source: b, min: E[1].length, max: E[0].length }) : this.badOption(f, b); } break; } case "scale": { let E = Number(b); E > 0 ? (this.assertEmpty("scale"), _.scale = E) : this.badOption(f, b); break; } case "group-off": case "group-min2": case "group-auto": case "group-on-aligned": case "group-thousands": this.assertEmpty("group"), _.group = f; break; case "latin": this.assertEmpty("numberingSystem"), _.numberingSystem = "latn"; break; case "numbering-system": { dre(b) ? (this.assertEmpty("numberingSystem"), _.numberingSystem = b) : this.badOption(f, b); break; } case "sign-auto": case "sign-always": case "sign-never": case "sign-accounting": case "sign-accounting-always": case "sign-except-zero": case "sign-accounting-except-zero": this.assertEmpty("sign"), _.sign = f; break; case "decimal-auto": case "decimal-always": this.assertEmpty("decimal"), _.decimal = f; break; default: { let E = fre(f, y, this.onError); E ? (this.assertEmpty("precision"), _.precision = E) : this.onError(new ie(f)); } } } } function bm(p) { let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (_) => { throw _; }, y = []; for (let _ of p.split(" ")) if (_) { let E = _.split("/"), k = E.shift() || ""; y.push({ stem: k, options: E }); } let b = new gre(f); for (let { stem: _, options: E } of y) b.parseToken(_, E); return b.skeleton; } function vre(p, f, y, b) { typeof f == "string" && (f = f.indexOf("::") === 0 ? bm(f.slice(2), b) : Ls(f, y, b)); let _ = ee(p, f), E = ze(f), k = Kt(f), C = new Intl.NumberFormat(_, E); if (f.affix) { let [N, V] = f.affix.pos, [he, xe] = f.affix.neg || ["", ""]; return (Ae) => { let ne = C.format(k(Ae)); return Ae < 0 ? `${he}${ne}${xe}` : `${N}${ne}${V}`; }; } return (N) => C.format(k(N)); } function yre(p, f, y, b) { typeof f == "string" && (f = f.indexOf("::") === 0 ? bm(f.slice(2), b) : Ls(f, y, b)); let _ = ee(p, f), E = ze(f), k = Fe(f), C = ["(function() {", `var opt = ${JSON.stringify(E)};`, `var nf = new Intl.NumberFormat(${JSON.stringify(_)}, opt);`], N = "nf.format(value)"; if (k && (C.push(`var mod = ${k};`), N = "nf.format(mod(value))"), f.affix) { let [V, he] = f.affix.pos.map((xe) => JSON.stringify(xe)); if (f.affix.neg) { let [xe, Ae] = f.affix.neg.map((ne) => JSON.stringify(ne)); N = `value < 0 ? ${xe} + ${N} + ${Ae} : ${V} + ${N} + ${he}`; } else N = `${V} + ${N} + ${he}`; } return C.push(`return function(value) { return ${N}; }`), C.join(` `) + ` })()`; } var au = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function bre(p) { return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p; } var yo = {}, _m = {}, xm = { exports: {} }; (function(p) { (function(f, y) { p.exports ? p.exports = y() : f.moo = y(); })(au, function() { var f = Object.prototype.hasOwnProperty, y = Object.prototype.toString, b = typeof new RegExp().sticky == "boolean"; function _(M) { return M && y.call(M) === "[object RegExp]"; } function E(M) { return M && typeof M == "object" && !_(M) && !Array.isArray(M); } function k(M) { return M.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); } function C(M) { var $ = new RegExp("|" + M); return $.exec("").length - 1; } function N(M) { return "(" + M + ")"; } function V(M) { if (!M.length) return "(?!)"; var $ = M.map(function(ue) { return "(?:" + ue + ")"; }).join("|"); return "(?:" + $ + ")"; } function he(M) { if (typeof M == "string") return "(?:" + k(M) + ")"; if (_(M)) { if (M.ignoreCase) throw new Error("RegExp /i flag not allowed"); if (M.global) throw new Error("RegExp /g flag is implied"); if (M.sticky) throw new Error("RegExp /y flag is implied"); if (M.multiline) throw new Error("RegExp /m flag is implied"); return M.source; } else throw new Error("Not a pattern: " + M); } function xe(M, $) { return M.length > $ ? M : Array($ - M.length + 1).join(" ") + M; } function Ae(M, $) { for (var ue = M.length, pe = 0; ; ) { var Ie = M.lastIndexOf(` `, ue - 1); if (Ie === -1 || (pe++, ue = Ie, pe === $) || ue === 0) break; } var ye = pe < $ ? 0 : ue + 1; return M.substring(ye).split(` `); } function ne(M) { for (var $ = Object.getOwnPropertyNames(M), ue = [], pe = 0; pe < $.length; pe++) { var Ie = $[pe], ye = M[Ie], je = [].concat(ye); if (Ie === "include") { for (var ot = 0; ot < je.length; ot++) ue.push({ include: je[ot] }); continue; } var Ye = []; je.forEach(function(Se) { E(Se) ? (Ye.length && ue.push(St(Ie, Ye)), ue.push(St(Ie, Se)), Ye = []) : Ye.push(Se); }), Ye.length && ue.push(St(Ie, Ye)); } return ue; } function nt(M) { for (var $ = [], ue = 0; ue < M.length; ue++) { var pe = M[ue]; if (pe.include) { for (var Ie = [].concat(pe.include), ye = 0; ye < Ie.length; ye++) $.push({ include: Ie[ye] }); continue; } if (!pe.type) throw new Error("Rule has no type: " + JSON.stringify(pe)); $.push(St(pe.type, pe)); } return $; } function St(M, $) { if (E($) || ($ = { match: $ }), $.include) throw new Error("Matching rules cannot also include states"); var ue = { defaultType: M, lineBreaks: !!$.error || !!$.fallback, pop: !1, next: null, push: null, error: !1, fallback: !1, value: null, type: null, shouldThrow: !1 }; for (var pe in $) f.call($, pe) && (ue[pe] = $[pe]); if (typeof ue.type == "string" && M !== ue.type) throw new Error("Type transform cannot be a string (type '" + ue.type + "' for token '" + M + "')"); var Ie = ue.match; return ue.match = Array.isArray(Ie) ? Ie : Ie ? [Ie] : [], ue.match.sort(function(ye, je) { return _(ye) && _(je) ? 0 : _(je) ? -1 : _(ye) ? 1 : je.length - ye.length; }), ue; } function zt(M) { return Array.isArray(M) ? nt(M) : ne(M); } var ln = St("error", { lineBreaks: !0, shouldThrow: !0 }); function Yn(M, $) { for (var ue = null, pe = /* @__PURE__ */ Object.create(null), Ie = !0, ye = null, je = [], ot = [], Ye = 0; Ye < M.length; Ye++) M[Ye].fallback && (Ie = !1); for (var Ye = 0; Ye < M.length; Ye++) { var Se = M[Ye]; if (Se.include) throw new Error("Inheritance is not allowed in stateless lexers"); if (Se.error || Se.fallback) { if (ue) throw !Se.fallback == !ue.fallback ? new Error("Multiple " + (Se.fallback ? "fallback" : "error") + " rules not allowed (for token '" + Se.defaultType + "')") : new Error("fallback and error are mutually exclusive (for token '" + Se.defaultType + "')"); ue = Se; } var Ot = Se.match.slice(); if (Ie) for (; Ot.length && typeof Ot[0] == "string" && Ot[0].length === 1; ) { var vr = Ot.shift(); pe[vr.charCodeAt(0)] = Se; } if (Se.pop || Se.push || Se.next) { if (!$) throw new Error("State-switching options are not allowed in stateless lexers (for token '" + Se.defaultType + "')"); if (Se.fallback) throw new Error("State-switching options are not allowed on fallback tokens (for token '" + Se.defaultType + "')"); } if (Ot.length !== 0) { Ie = !1, je.push(Se); for (var mi = 0; mi < Ot.length; mi++) { var Na = Ot[mi]; if (_(Na)) { if (ye === null) ye = Na.unicode; else if (ye !== Na.unicode && Se.fallback === !1) throw new Error("If one rule is /u then all must be"); } } var yr = V(Ot.map(he)), Zn = new RegExp(yr); if (Zn.test("")) throw new Error("RegExp matches empty string: " + Zn); var _o = C(yr); if (_o > 0) throw new Error("RegExp has capture groups: " + Zn + ` Use (?: … ) instead`); if (!Se.lineBreaks && Zn.test(` `)) throw new Error("Rule should declare lineBreaks: " + Zn); ot.push(N(yr)); } } var br = ue && ue.fallback, xo = b && !br ? "ym" : "gm", Us = b || br ? "" : "|"; ye === !0 && (xo += "u"); var Xre = new RegExp(V(ot) + Us, xo); return { regexp: Xre, groups: je, fast: pe, error: ue || ln }; } function ra(M) { var $ = Yn(zt(M)); return new yt({ start: $ }, "start"); } function ji(M, $, ue) { var pe = M && (M.push || M.next); if (pe && !ue[pe]) throw new Error("Missing state '" + pe + "' (in token '" + M.defaultType + "' of state '" + $ + "')"); if (M && M.pop && +M.pop != 1) throw new Error("pop must be 1 (in token '" + M.defaultType + "' of state '" + $ + "')"); } function Vi(M, $) { var ue = M.$all ? zt(M.$all) : []; delete M.$all; var pe = Object.getOwnPropertyNames(M); $ || ($ = pe[0]); for (var Ie = /* @__PURE__ */ Object.create(null), ye = 0; ye < pe.length; ye++) { var je = pe[ye]; Ie[je] = zt(M[je]).concat(ue); } for (var ye = 0; ye < pe.length; ye++) for (var je = pe[ye], ot = Ie[je], Ye = /* @__PURE__ */ Object.create(null), Se = 0; Se < ot.length; Se++) { var Ot = ot[Se]; if (Ot.include) { var vr = [Se, 1]; if (Ot.include !== je && !Ye[Ot.include]) { Ye[Ot.include] = !0; var mi = Ie[Ot.include]; if (!mi) throw new Error("Cannot include nonexistent state '" + Ot.include + "' (in state '" + je + "')"); for (var Na = 0; Na < mi.length; Na++) { var yr = mi[Na]; ot.indexOf(yr) === -1 && vr.push(yr); } } ot.splice.apply(ot, vr), Se--; } } for (var Zn = /* @__PURE__ */ Object.create(null), ye = 0; ye < pe.length; ye++) { var je = pe[ye]; Zn[je] = Yn(Ie[je], !0); } for (var ye = 0; ye < pe.length; ye++) { for (var _o = pe[ye], br = Zn[_o], xo = br.groups, Se = 0; Se < xo.length; Se++) ji(xo[Se], _o, Zn); for (var Us = Object.getOwnPropertyNames(br.fast), Se = 0; Se < Us.length; Se++) ji(br.fast[Us[Se]], _o, Zn); } return new yt(Zn, $); } function zi(M) { for (var $ = typeof Map < "u", ue = $ ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null), pe = Object.getOwnPropertyNames(M), Ie = 0; Ie < pe.length; Ie++) { var ye = pe[Ie], je = M[ye], ot = Array.isArray(je) ? je : [je]; ot.forEach(function(Ye) { if (typeof Ye != "string") throw new Error("keyword must be string (in keyword '" + ye + "')"); $ ? ue.set(Ye, ye) : ue[Ye] = ye; }); } return function(Ye) { return $ ? ue.get(Ye) : ue[Ye]; }; } var yt = function(M, $) { this.startState = $, this.states = M, this.buffer = "", this.stack = [], this.reset(); }; yt.prototype.reset = function(M, $) { return this.buffer = M || "", this.index = 0, this.line = $ ? $.line : 1, this.col = $ ? $.col : 1, this.queuedToken = $ ? $.queuedToken : null, this.queuedText = $ ? $.queuedText : "", this.queuedThrow = $ ? $.queuedThrow : null, this.setState($ ? $.state : this.startState), this.stack = $ && $.stack ? $.stack.slice() : [], this; }, yt.prototype.save = function() { return { line: this.line, col: this.col, state: this.state, stack: this.stack.slice(), queuedToken: this.queuedToken, queuedText: this.queuedText, queuedThrow: this.queuedThrow }; }, yt.prototype.setState = function(M) { if (!(!M || this.state === M)) { this.state = M; var $ = this.states[M]; this.groups = $.groups, this.error = $.error, this.re = $.regexp, this.fast = $.fast; } }, yt.prototype.popState = function() { this.setState(this.stack.pop()); }, yt.prototype.pushState = function(M) { this.stack.push(this.state), this.setState(M); }; var Bs = b ? function(M, $) { return M.exec($); } : function(M, $) { var ue = M.exec($); return ue[0].length === 0 ? null : ue; }; yt.prototype._getGroup = function(M) { for (var $ = this.groups.length, ue = 0; ue < $; ue++) if (M[ue + 1] !== void 0) return this.groups[ue]; throw new Error("Cannot find token type for matched text"); }; function Hs() { return this.value; } if (yt.prototype.next = function() { var M = this.index; if (this.queuedGroup) { var $ = this._token(this.queuedGroup, this.queuedText, M); return this.queuedGroup = null, this.queuedText = "", $; } var ue = this.buffer; if (M !== ue.length) { var je = this.fast[ue.charCodeAt(M)]; if (je) return this._token(je, ue.charAt(M), M); var pe = this.re; pe.lastIndex = M; var Ie = Bs(pe, ue), ye = this.error; if (Ie == null) return this._token(ye, ue.slice(M, ue.length), M); var je = this._getGroup(Ie), ot = Ie[0]; return ye.fallback && Ie.index !== M ? (this.queuedGroup = je, this.queuedText = ot, this._token(ye, ue.slice(M, Ie.index), M)) : this._token(je, ot, M); } }, yt.prototype._token = function(M, $, ue) { var pe = 0; if (M.lineBreaks) { var Ie = /\n/g, ye = 1; if ($ === ` `) pe = 1; else for (; Ie.exec($); ) pe++, ye = Ie.lastIndex; } var je = { type: typeof M.type == "function" && M.type($) || M.defaultType, value: typeof M.value == "function" ? M.value($) : $, text: $, toString: Hs, offset: ue, lineBreaks: pe, line: this.line, col: this.col }, ot = $.length; if (this.index += ot, this.line += pe, pe !== 0 ? this.col = ot - ye + 1 : this.col += ot, M.shouldThrow) { var Ye = new Error(this.formatError(je, "invalid syntax")); throw Ye; } return M.pop ? this.popState() : M.push ? this.pushState(M.push) : M.next && this.setState(M.next), je; }, typeof Symbol < "u" && Symbol.iterator) { var Bi = function(M) { this.lexer = M; }; Bi.prototype.next = function() { var M = this.lexer.next(); return { value: M, done: !M }; }, Bi.prototype[Symbol.iterator] = function() { return this; }, yt.prototype[Symbol.iterator] = function() { return new Bi(this); }; } return yt.prototype.formatError = function(pe, $) { if (pe == null) var ue = this.buffer.slice(this.index), pe = { text: ue, offset: this.index, lineBreaks: ue.indexOf(` `) === -1 ? 0 : 1, line: this.line, col: this.col }; var Ie = 2, ye = Math.max(pe.line - Ie, 1), je = pe.line + Ie, ot = String(je).length, Ye = Ae(this.buffer, this.line - pe.line + Ie + 1).slice(0, 5), Se = []; Se.push($ + " a