@textadventures/squiffy-packager 6.0.0-beta.0 → 6.0.0-beta.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"packager.js","sources":["../../node_modules/fflate/esm/browser.js","../../runtime/dist/squiffy.runtime.global.js?raw","../../runtime/dist/squiffy.runtime.css?raw","../src/index.template.html?raw","../src/style.template.css?raw","../src/packager.ts"],"sourcesContent":["// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new i32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return { b: b, r: r };\n};\nvar _a = freb(fleb, 2), fl = _a.b, revfl = _a.r;\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r;\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 1; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n return new u8(v.subarray(s, e));\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, st, buf, dict) {\n // source length dict length\n var sl = dat.length, dl = dict ? dict.length : 0;\n if (!sl || st.f && !st.l)\n return buf || new u8(0);\n var noBuf = !buf;\n // have to estimate size\n var resize = noBuf || st.i != 2;\n // no state\n var noSt = st.i;\n // Assumes roughly 33% compression ratio average\n if (noBuf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (resize)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17\n if (resize)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (resize)\n cbuf(bt + 131072);\n var end = bt + add;\n if (bt < dt) {\n var shift = dl - dt, dend = Math.min(dt, end);\n if (shift + bt < 0)\n err(3);\n for (; bt < dend; ++bt)\n buf[bt] = dict[shift + bt];\n }\n for (; bt < end; ++bt)\n buf[bt] = buf[bt - dt];\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n // don't reallocate for streams or user buffers\n return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >> 8;\n d[o + 2] |= v >> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return { t: et, l: 0 };\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return { t: v, l: 1 };\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return { t: new u8(tr), l: mbt };\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return { c: cl.subarray(0, cli), n: s };\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;\n var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;\n var _c = lc(dlt), lclt = _c.c, nlc = _c.n;\n var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n ++lcfreq[lclt[i] & 31];\n for (var i = 0; i < lcdt.length; ++i)\n ++lcfreq[lcdt[i] & 31];\n var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];\n if (bs >= 0 && flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n var sym = syms[i];\n if (sym > 255) {\n var len = (sym >> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (sym >> 23) & 31), p += fleb[len];\n var dst = sym & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[sym]), p += ll[sym];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, st) {\n var s = st.z || dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var lst = st.l;\n var pos = (st.r || 0) & 7;\n if (lvl) {\n if (pos)\n w[0] = st.r >> 3;\n var opt = deo[lvl - 1];\n var n = opt >> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new i32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx blkpos\n var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;\n for (; i + 2 < s; ++i) {\n // hash value\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = i - dif + j & 32767;\n var pti = prev[ti];\n var cd = ti - pti & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += imod - pimod & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one int32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n for (i = Math.max(i, wi); i < s; ++i) {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n if (!lst) {\n st.r = (pos & 7) | w[(pos / 8) | 0] << 3;\n // shft(pos) now 1 less if pos & 7 != 0\n pos -= 7;\n st.h = head, st.p = prev, st.i = i, st.w = wi;\n }\n }\n else {\n for (var i = st.w || 0; i < s + lst; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[(pos / 8) | 0] = lst;\n e = s;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n st.i = s;\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Adler32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n if (!st) {\n st = { l: 1 };\n if (opt.dictionary) {\n var dict = opt.dictionary.subarray(-32768);\n var newDat = new u8(dict.length + dat.length);\n newDat.set(dict);\n newDat.set(dat, dict.length);\n dat = newDat;\n st.w = dict.length;\n }\n }\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : (12 + opt.mem), pre, post, st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return fnStr;\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n fnStr = wcln(fns[i], fnStr, td_1);\n ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 };\n }\n var td = mrg({}, ch[id].e);\n return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; };\nvar bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zls]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get opts\nvar gopt = function (o) { return o && {\n out: o.size && new u8(o.size),\n dictionary: o.dictionary\n}; };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) {\n if (ev.data.length) {\n strm.push(ev.data[0], ev.data[1]);\n postMessage([ev.data[0].length]);\n }\n else\n strm.flush();\n };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id, flush, ext) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else if (!Array.isArray(dat))\n ext(dat);\n else if (dat.length == 1) {\n strm.queuedSize -= dat[0];\n if (strm.ondrain)\n strm.ondrain(dat[0]);\n }\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.queuedSize = 0;\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n strm.queuedSize += d.length;\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n if (flush) {\n strm.flush = function () { w.postMessage([]); };\n }\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += (d[10] | d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32);\n c[1] |= 31 - ((c[0] << 8) | c[1]) % 31;\n if (o.dictionary) {\n var h = adler();\n h.p(o.dictionary);\n wbytes(c, 2, h.d());\n }\n};\n// zlib start\nvar zls = function (d, dict) {\n if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if ((d[1] >> 5 & 1) == +!dict)\n err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');\n return (d[1] >> 3 & 4) + 2;\n};\nfunction StrmOpt(opts, cb) {\n if (typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n this.s = { l: 0, i: 32768, w: 32768, z: 32768 };\n // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev\n // 98304 = 32768 (lookback) + 65536 (common chunk size)\n this.b = new u8(98304);\n if (this.o.dictionary) {\n var dict = this.o.dictionary.subarray(-32768);\n this.b.set(dict, 32768 - dict.length);\n this.s.i = 32768 - dict.length;\n }\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, this.s), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.s.l)\n err(4);\n var endLen = chunk.length + this.s.z;\n if (endLen > this.b.length) {\n if (endLen > 2 * this.b.length - 32768) {\n var newBuf = new u8(endLen & -32768);\n newBuf.set(this.b.subarray(0, this.s.z));\n this.b = newBuf;\n }\n var split = this.b.length - this.s.z;\n this.b.set(chunk.subarray(0, split), this.s.z);\n this.s.z = this.b.length;\n this.p(this.b, false);\n this.b.set(this.b.subarray(-32768));\n this.b.set(chunk.subarray(split), 32768);\n this.s.z = chunk.length - split + 32768;\n this.s.i = 32766, this.s.w = 32768;\n }\n else {\n this.b.set(chunk, this.s.z);\n this.s.z += chunk.length;\n }\n this.s.l = final & 1;\n if (this.s.z > this.s.w + 8191 || final) {\n this.p(this.b, final || false);\n this.s.w = this.s.i, this.s.i -= 2;\n }\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * deflated output for small inputs.\n */\n Deflate.prototype.flush = function () {\n if (!this.ondata)\n err(5);\n if (this.s.l)\n err(4);\n this.p(this.b, false);\n this.s.w = this.s.i, this.s.i -= 2;\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6, 1);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n function Inflate(opts, cb) {\n // no StrmOpt here to avoid adding to workerizer\n if (typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768);\n this.s = { i: 0, b: dict ? dict.length : 0 };\n this.o = new u8(32768);\n this.p = new u8(0);\n if (dict)\n this.o.set(dict);\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n if (!this.p.length)\n this.p = c;\n else if (c.length) {\n var n = new u8(this.p.length + c.length);\n n.set(this.p), n.set(c, this.p.length), this.p = n;\n }\n };\n Inflate.prototype.c = function (final) {\n this.s.i = +(this.d = final || false);\n var bts = this.s.b;\n var dt = inflt(this.p, this.s, this.o);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n function AsyncInflate(opts, cb) {\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Inflate(ev.data);\n onmessage = astrm(strm);\n }, 7, 0);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, opts) {\n return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n this.c.p(chunk);\n this.l += chunk.length;\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * GZIPped output for small inputs.\n */\n Gzip.prototype.flush = function () {\n Deflate.prototype.flush.call(this);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8, 1);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming single or multi-member GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n function Gunzip(opts, cb) {\n this.v = 1;\n this.r = 0;\n Inflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n this.r += chunk.length;\n if (this.v) {\n var p = this.p.subarray(this.v - 1);\n var s = p.length > 3 ? gzs(p) : 4;\n if (s > p.length) {\n if (!final)\n return;\n }\n else if (this.v > 1 && this.onmember) {\n this.onmember(this.r - p.length);\n }\n this.p = p.subarray(s), this.v = 0;\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n // process concatenated GZIP\n if (this.s.f && !this.s.l && !final) {\n this.v = shft(this.s.p) + 9;\n this.s = { i: 0 };\n this.o = new u8(0);\n this.push(new u8(0), final);\n }\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming single or multi-member GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n function AsyncGunzip(opts, cb) {\n var _this = this;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Gunzip(ev.data);\n strm.onmember = function (offset) { return postMessage(offset); };\n onmessage = astrm(strm);\n }, 9, 0, function (offset) { return _this.onmember && _this.onmember(offset); });\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0], ev.data[1])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, opts) {\n var st = gzs(data);\n if (st + 8 > data.length)\n err(6, 'invalid gzip data');\n return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n this.c.p(chunk);\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * zlibbed output for small inputs.\n */\n Zlib.prototype.flush = function () {\n Deflate.prototype.flush.call(this);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10, 1);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n function Unzlib(opts, cb) {\n Inflate.call(this, opts, cb);\n this.v = opts && opts.dictionary ? 2 : 1;\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 6 && !final)\n return;\n this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n function AsyncUnzlib(opts, cb) {\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Unzlib(ev.data);\n onmessage = astrm(strm);\n }, 11, 0);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, opts) {\n return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n function Decompress(opts, cb) {\n this.o = StrmOpt.call(this, opts, cb) || {};\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n }\n // init substream\n // overriden by AsyncDecompress\n Decompress.prototype.i = function () {\n var _this = this;\n this.s.ondata = function (dat, final) {\n _this.ondata(dat, final);\n };\n };\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(this.o)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(this.o)\n : new this.Z(this.o);\n this.i();\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n function AsyncDecompress(opts, cb) {\n Decompress.call(this, opts, cb);\n this.queuedSize = 0;\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n }\n AsyncDecompress.prototype.i = function () {\n var _this = this;\n this.s.ondata = function (err, dat, final) {\n _this.ondata(err, dat, final);\n };\n this.s.ondrain = function (size) {\n _this.queuedSize -= size;\n if (_this.ondrain)\n _this.ondrain(size);\n };\n };\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n this.queuedSize += chunk.length;\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, opts) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, opts)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, opts)\n : unzlibSync(data, opts);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return { s: r, r: slc(d, i - 1) };\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), s = _a.s, r = _a.r;\n if (final) {\n if (r.length)\n err(8);\n this.p = null;\n }\n else\n this.p = r;\n this.ondata(s, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td) {\n return td.decode(dat);\n }\n else {\n var _a = dutf8(dat), s = _a.s, r = _a.r;\n if (r.length)\n err(8);\n return s;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4;\n if (c != -1) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u, -1);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this.ondata(err, dat, final);\n _this.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this.d & 1))\n return;\n _this.u.splice(-1, 1);\n _this.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this = this;\n this.i = new Inflate(function (dat, final) {\n _this.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this.k[0] == chks_3 && _this.c)\n _this.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = lft = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n // Synchronously decompress under 512KB, or barely-compressed data\n if (su < 524288 || sc > 0.8 * su) {\n try {\n cbl(null, inflateSync(infl, { out: new u8(su) }));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","export default \"var squiffyRuntime=(function(ut){\\\"use strict\\\";var Mc=Object.defineProperty;var Ic=(ut,tt,Qe)=>tt in ut?Mc(ut,tt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):ut[tt]=Qe;var le=(ut,tt,Qe)=>Ic(ut,typeof tt!=\\\"symbol\\\"?tt+\\\"\\\":tt,Qe);var vr;function tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qe=tt();function Pn(s){Qe=s}var Yt={exec:()=>null};function ne(s,e=\\\"\\\"){let t=typeof s==\\\"string\\\"?s:s.source,n={replace:(r,i)=>{let a=typeof i==\\\"string\\\"?i:i.source;return a=a.replace(Me.caret,\\\"$1\\\"),t=t.replace(r,a),n},getRegex:()=>new RegExp(t,e)};return n}var Me={codeRemoveIndent:/^(?: {1,4}| {0,3}\\\\t)/gm,outputLinkReplace:/\\\\\\\\([\\\\[\\\\]])/g,indentCodeCompensation:/^(\\\\s+)(?:```)/,beginningSpace:/^\\\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\\\n/g,tabCharGlobal:/\\\\t/g,multipleSpaceGlobal:/\\\\s+/g,blankLine:/^[ \\\\t]*$/,doubleBlankLine:/\\\\n[ \\\\t]*\\\\n[ \\\\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\\\n {0,3}((?:=+|-+) *)(?=\\\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\\\t]?/gm,listReplaceTabs:/^\\\\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\\\[[ xX]\\\\] /,listReplaceTask:/^\\\\[[ xX]\\\\] +/,anyLine:/\\\\n.*\\\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\\\||\\\\| *$/g,tableRowBlankLine:/\\\\n[ \\\\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\\\s|>)/i,endPreScriptTag:/^<\\\\/(pre|code|kbd|script)(\\\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'\\\"]*[^\\\\s])\\\\s+(['\\\"])(.*)\\\\2/,unicodeAlphaNumeric:/[\\\\p{L}\\\\p{N}]/u,escapeTest:/[&<>\\\"']/,escapeReplace:/[&<>\\\"']/g,escapeTestNoEncode:/[<>\\\"']|&(?!(#\\\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\\\w+);)/,escapeReplaceNoEncode:/[<>\\\"']|&(?!(#\\\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\\\w+);)/g,unescapeTest:/&(#(?:\\\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\\\w+));?/ig,caret:/(^|[^\\\\[])\\\\^/g,percentDecode:/%25/g,findPipe:/\\\\|/g,splitPipe:/ \\\\|/,slashPipe:/\\\\\\\\\\\\|/g,carriageReturn:/\\\\r\\\\n|\\\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\\\S*/,endingNewline:/\\\\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[\\t ][^\\\\\\\\n]*)?(?:\\\\\\\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\\\\\\\d{1,9}[.)])((?:[ \\t][^\\\\\\\\n]*)?(?:\\\\\\\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\\\\\* *){3,})(?:\\\\\\\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\\\\`\\\\`\\\\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,\\\"i\\\")},$o=/^(?:[ \\\\t]*(?:\\\\n|$))+/,Uo=/^((?: {4}| {0,3}\\\\t)[^\\\\n]+(?:\\\\n(?:[ \\\\t]*(?:\\\\n|$))*)?)+/,Wo=/^ {0,3}(`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~{3,})([^\\\\n]*)(?:\\\\n|$)(?:|([\\\\s\\\\S]*?)(?:\\\\n|$))(?: {0,3}\\\\1[~`]* *(?=\\\\n|$)|$)/,Jt=/^ {0,3}((?:-[\\\\t ]*){3,}|(?:_[ \\\\t]*){3,}|(?:\\\\*[ \\\\t]*){3,})(?:\\\\n+|$)/,Go=/^ {0,3}(#{1,6})(?=\\\\s|$)(.*)(?:\\\\n+|$)/,_r=/(?:[*+-]|\\\\d{1,9}[.)])/,En=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\\\n(?!\\\\s*?\\\\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\\\\n {0,3}(=+|-+) *(?:\\\\n+|$)/,Ln=ne(En).replace(/bull/g,_r).replace(/blockCode/g,/(?: {4}| {0,3}\\\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\\\n>]+>\\\\n/).replace(/\\\\|table/g,\\\"\\\").getRegex(),Xo=ne(En).replace(/bull/g,_r).replace(/blockCode/g,/(?: {4}| {0,3}\\\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\\\n>]+>\\\\n/).replace(/table/g,/ {0,3}\\\\|?(?:[:\\\\- ]*\\\\|)+[\\\\:\\\\- ]*\\\\n/).getRegex(),br=/^([^\\\\n]+(?:\\\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\\\n)[^\\\\n]+)*)/,Yo=/^[^\\\\n]+/,Sr=/(?!\\\\s*\\\\])(?:\\\\\\\\[\\\\s\\\\S]|[^\\\\[\\\\]\\\\\\\\])+/,Jo=ne(/^ {0,3}\\\\[(label)\\\\]: *(?:\\\\n[ \\\\t]*)?([^<\\\\s][^\\\\s]*|<.*?>)(?:(?: +(?:\\\\n[ \\\\t]*)?| *\\\\n[ \\\\t]*)(title))? *(?:\\\\n+|$)/).replace(\\\"label\\\",Sr).replace(\\\"title\\\",/(?:\\\"(?:\\\\\\\\\\\"?|[^\\\"\\\\\\\\])*\\\"|'[^'\\\\n]*(?:\\\\n[^'\\\\n]+)*\\\\n?'|\\\\([^()]*\\\\))/).getRegex(),Qo=ne(/^( {0,3}bull)([ \\\\t][^\\\\n]+?)?(?:\\\\n|$)/).replace(/bull/g,_r).getRegex(),_s=\\\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\\\",kr=/<!--(?:-?>|[\\\\s\\\\S]*?(?:-->|$))/,Ko=ne(\\\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\\\\\s>][\\\\\\\\s\\\\\\\\S]*?(?:</\\\\\\\\1>[^\\\\\\\\n]*\\\\\\\\n+|$)|comment[^\\\\\\\\n]*(\\\\\\\\n+|$)|<\\\\\\\\?[\\\\\\\\s\\\\\\\\S]*?(?:\\\\\\\\?>\\\\\\\\n*|$)|<![A-Z][\\\\\\\\s\\\\\\\\S]*?(?:>\\\\\\\\n*|$)|<!\\\\\\\\[CDATA\\\\\\\\[[\\\\\\\\s\\\\\\\\S]*?(?:\\\\\\\\]\\\\\\\\]>\\\\\\\\n*|$)|</?(tag)(?: +|\\\\\\\\n|/?>)[\\\\\\\\s\\\\\\\\S]*?(?:(?:\\\\\\\\n[ \\t]*)+\\\\\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\\\\\t]*(?:\\\\\\\\n|$))[\\\\\\\\s\\\\\\\\S]*?(?:(?:\\\\\\\\n[ \\t]*)+\\\\\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\\\\\w-]*\\\\\\\\s*>(?=[ \\\\\\\\t]*(?:\\\\\\\\n|$))[\\\\\\\\s\\\\\\\\S]*?(?:(?:\\\\\\\\n[ \\t]*)+\\\\\\\\n|$))\\\",\\\"i\\\").replace(\\\"comment\\\",kr).replace(\\\"tag\\\",_s).replace(\\\"attribute\\\",/ +[a-zA-Z:_][\\\\w.:-]*(?: *= *\\\"[^\\\"\\\\n]*\\\"| *= *'[^'\\\\n]*'| *= *[^\\\\s\\\"'=<>`]+)?/).getRegex(),An=ne(br).replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",\\\" {0,3}#{1,6}(?:\\\\\\\\s|$)\\\").replace(\\\"|lheading\\\",\\\"\\\").replace(\\\"|table\\\",\\\"\\\").replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"fences\\\",\\\" {0,3}(?:`{3,}(?=[^`\\\\\\\\n]*\\\\\\\\n)|~{3,})[^\\\\\\\\n]*\\\\\\\\n\\\").replace(\\\"list\\\",\\\" {0,3}(?:[*+-]|1[.)]) \\\").replace(\\\"html\\\",\\\"</?(?:tag)(?: +|\\\\\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\\\").replace(\\\"tag\\\",_s).getRegex(),Zo=ne(/^( {0,3}> ?(paragraph|[^\\\\n]*)(?:\\\\n|$))+/).replace(\\\"paragraph\\\",An).getRegex(),xr={blockquote:Zo,code:Uo,def:Jo,fences:Wo,heading:Go,hr:Jt,html:Ko,lheading:Ln,list:Qo,newline:$o,paragraph:An,table:Yt,text:Yo},Rn=ne(\\\"^ *([^\\\\\\\\n ].*)\\\\\\\\n {0,3}((?:\\\\\\\\| *)?:?-+:? *(?:\\\\\\\\| *:?-+:? *)*(?:\\\\\\\\| *)?)(?:\\\\\\\\n((?:(?! *\\\\\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\\\\\n|$))*)\\\\\\\\n*|$)\\\").replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",\\\" {0,3}#{1,6}(?:\\\\\\\\s|$)\\\").replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"code\\\",\\\"(?: {4}| {0,3}\\t)[^\\\\\\\\n]\\\").replace(\\\"fences\\\",\\\" {0,3}(?:`{3,}(?=[^`\\\\\\\\n]*\\\\\\\\n)|~{3,})[^\\\\\\\\n]*\\\\\\\\n\\\").replace(\\\"list\\\",\\\" {0,3}(?:[*+-]|1[.)]) \\\").replace(\\\"html\\\",\\\"</?(?:tag)(?: +|\\\\\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\\\").replace(\\\"tag\\\",_s).getRegex(),jo={...xr,lheading:Xo,table:Rn,paragraph:ne(br).replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",\\\" {0,3}#{1,6}(?:\\\\\\\\s|$)\\\").replace(\\\"|lheading\\\",\\\"\\\").replace(\\\"table\\\",Rn).replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"fences\\\",\\\" {0,3}(?:`{3,}(?=[^`\\\\\\\\n]*\\\\\\\\n)|~{3,})[^\\\\\\\\n]*\\\\\\\\n\\\").replace(\\\"list\\\",\\\" {0,3}(?:[*+-]|1[.)]) \\\").replace(\\\"html\\\",\\\"</?(?:tag)(?: +|\\\\\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\\\").replace(\\\"tag\\\",_s).getRegex()},ea={...xr,html:ne(`^ *(?:comment *(?:\\\\\\\\n|\\\\\\\\s*$)|<(tag)[\\\\\\\\s\\\\\\\\S]+?</\\\\\\\\1> *(?:\\\\\\\\n{2,}|\\\\\\\\s*$)|<tag(?:\\\"[^\\\"]*\\\"|'[^']*'|\\\\\\\\s[^'\\\"/>\\\\\\\\s]*)*?/?> *(?:\\\\\\\\n{2,}|\\\\\\\\s*$))`).replace(\\\"comment\\\",kr).replace(/tag/g,\\\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\\\\\b)\\\\\\\\w+(?!:|[^\\\\\\\\w\\\\\\\\s@]*@)\\\\\\\\b\\\").getRegex(),def:/^ *\\\\[([^\\\\]]+)\\\\]: *<?([^\\\\s>]+)>?(?: +([\\\"(][^\\\\n]+[\\\")]))? *(?:\\\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\\\n+|$)/,fences:Yt,lheading:/^(.+?)\\\\n {0,3}(=+|-+) *(?:\\\\n+|$)/,paragraph:ne(br).replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",` *#{1,6} *[^\\n]`).replace(\\\"lheading\\\",Ln).replace(\\\"|table\\\",\\\"\\\").replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"|fences\\\",\\\"\\\").replace(\\\"|list\\\",\\\"\\\").replace(\\\"|html\\\",\\\"\\\").replace(\\\"|tag\\\",\\\"\\\").getRegex()},ta=/^\\\\\\\\([!\\\"#$%&'()*+,\\\\-./:;<=>?@\\\\[\\\\]\\\\\\\\^_`{|}~])/,sa=/^(`+)([^`]|[^`][\\\\s\\\\S]*?[^`])\\\\1(?!`)/,On=/^( {2,}|\\\\\\\\)\\\\n(?!\\\\s*$)/,ra=/^(`+|[^`])(?:(?= {2,}\\\\n)|[\\\\s\\\\S]*?(?:(?=[\\\\\\\\<!\\\\[`*_]|\\\\b_|$)|[^ ](?= {2,}\\\\n)))/,bs=/[\\\\p{P}\\\\p{S}]/u,wr=/[\\\\s\\\\p{P}\\\\p{S}]/u,Mn=/[^\\\\s\\\\p{P}\\\\p{S}]/u,na=ne(/^((?![*_])punctSpace)/,\\\"u\\\").replace(/punctSpace/g,wr).getRegex(),In=/(?!~)[\\\\p{P}\\\\p{S}]/u,ia=/(?!~)[\\\\s\\\\p{P}\\\\p{S}]/u,oa=/(?:[^\\\\s\\\\p{P}\\\\p{S}]|~)/u,aa=/\\\\[[^\\\\[\\\\]]*?\\\\]\\\\((?:\\\\\\\\[\\\\s\\\\S]|[^\\\\\\\\\\\\(\\\\)]|\\\\((?:\\\\\\\\[\\\\s\\\\S]|[^\\\\\\\\\\\\(\\\\)])*\\\\))*\\\\)|`[^`]*?`|<(?! )[^<>]*?>/g,Nn=/^(?:\\\\*+(?:((?!\\\\*)punct)|[^\\\\s*]))|^_+(?:((?!_)punct)|([^\\\\s_]))/,la=ne(Nn,\\\"u\\\").replace(/punct/g,bs).getRegex(),ca=ne(Nn,\\\"u\\\").replace(/punct/g,In).getRegex(),Bn=\\\"^[^_*]*?__[^_*]*?\\\\\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\\\\\*)punct(\\\\\\\\*+)(?=[\\\\\\\\s]|$)|notPunctSpace(\\\\\\\\*+)(?!\\\\\\\\*)(?=punctSpace|$)|(?!\\\\\\\\*)punctSpace(\\\\\\\\*+)(?=notPunctSpace)|[\\\\\\\\s](\\\\\\\\*+)(?!\\\\\\\\*)(?=punct)|(?!\\\\\\\\*)punct(\\\\\\\\*+)(?!\\\\\\\\*)(?=punct)|notPunctSpace(\\\\\\\\*+)(?=notPunctSpace)\\\",ua=ne(Bn,\\\"gu\\\").replace(/notPunctSpace/g,Mn).replace(/punctSpace/g,wr).replace(/punct/g,bs).getRegex(),ha=ne(Bn,\\\"gu\\\").replace(/notPunctSpace/g,oa).replace(/punctSpace/g,ia).replace(/punct/g,In).getRegex(),pa=ne(\\\"^[^_*]*?\\\\\\\\*\\\\\\\\*[^_*]*?_[^_*]*?(?=\\\\\\\\*\\\\\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\\\",\\\"gu\\\").replace(/notPunctSpace/g,Mn).replace(/punctSpace/g,wr).replace(/punct/g,bs).getRegex(),fa=ne(/\\\\\\\\(punct)/,\\\"gu\\\").replace(/punct/g,bs).getRegex(),da=ne(/^<(scheme:[^\\\\s\\\\x00-\\\\x1f<>]*|email)>/).replace(\\\"scheme\\\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\\\"email\\\",/[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])?)+(?![-_])/).getRegex(),ga=ne(kr).replace(\\\"(?:-->|$)\\\",\\\"-->\\\").getRegex(),ma=ne(\\\"^comment|^</[a-zA-Z][\\\\\\\\w:-]*\\\\\\\\s*>|^<[a-zA-Z][\\\\\\\\w-]*(?:attribute)*?\\\\\\\\s*/?>|^<\\\\\\\\?[\\\\\\\\s\\\\\\\\S]*?\\\\\\\\?>|^<![a-zA-Z]+\\\\\\\\s[\\\\\\\\s\\\\\\\\S]*?>|^<!\\\\\\\\[CDATA\\\\\\\\[[\\\\\\\\s\\\\\\\\S]*?\\\\\\\\]\\\\\\\\]>\\\").replace(\\\"comment\\\",ga).replace(\\\"attribute\\\",/\\\\s+[a-zA-Z:_][\\\\w.:-]*(?:\\\\s*=\\\\s*\\\"[^\\\"]*\\\"|\\\\s*=\\\\s*'[^']*'|\\\\s*=\\\\s*[^\\\\s\\\"'=<>`]+)?/).getRegex(),Ss=/(?:\\\\[(?:\\\\\\\\[\\\\s\\\\S]|[^\\\\[\\\\]\\\\\\\\])*\\\\]|\\\\\\\\[\\\\s\\\\S]|`[^`]*`|[^\\\\[\\\\]\\\\\\\\`])*?/,va=ne(/^!?\\\\[(label)\\\\]\\\\(\\\\s*(href)(?:(?:[ \\\\t]*(?:\\\\n[ \\\\t]*)?)(title))?\\\\s*\\\\)/).replace(\\\"label\\\",Ss).replace(\\\"href\\\",/<(?:\\\\\\\\.|[^\\\\n<>\\\\\\\\])+>|[^ \\\\t\\\\n\\\\x00-\\\\x1f]*/).replace(\\\"title\\\",/\\\"(?:\\\\\\\\\\\"?|[^\\\"\\\\\\\\])*\\\"|'(?:\\\\\\\\'?|[^'\\\\\\\\])*'|\\\\((?:\\\\\\\\\\\\)?|[^)\\\\\\\\])*\\\\)/).getRegex(),Dn=ne(/^!?\\\\[(label)\\\\]\\\\[(ref)\\\\]/).replace(\\\"label\\\",Ss).replace(\\\"ref\\\",Sr).getRegex(),qn=ne(/^!?\\\\[(ref)\\\\](?:\\\\[\\\\])?/).replace(\\\"ref\\\",Sr).getRegex(),ya=ne(\\\"reflink|nolink(?!\\\\\\\\()\\\",\\\"g\\\").replace(\\\"reflink\\\",Dn).replace(\\\"nolink\\\",qn).getRegex(),Tr={_backpedal:Yt,anyPunctuation:fa,autolink:da,blockSkip:aa,br:On,code:sa,del:Yt,emStrongLDelim:la,emStrongRDelimAst:ua,emStrongRDelimUnd:pa,escape:ta,link:va,nolink:qn,punctuation:na,reflink:Dn,reflinkSearch:ya,tag:ma,text:ra,url:Yt},_a={...Tr,link:ne(/^!?\\\\[(label)\\\\]\\\\((.*?)\\\\)/).replace(\\\"label\\\",Ss).getRegex(),reflink:ne(/^!?\\\\[(label)\\\\]\\\\s*\\\\[([^\\\\]]*)\\\\]/).replace(\\\"label\\\",Ss).getRegex()},Cr={...Tr,emStrongRDelimAst:ha,emStrongLDelim:ca,url:ne(/^((?:ftp|https?):\\\\/\\\\/|www\\\\.)(?:[a-zA-Z0-9\\\\-]+\\\\.?)+[^\\\\s<]*|^email/,\\\"i\\\").replace(\\\"email\\\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\\\"~()&]+|\\\\([^)]*\\\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\\\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\\\s~])((?:\\\\\\\\[\\\\s\\\\S]|[^\\\\\\\\])*?(?:\\\\\\\\[\\\\s\\\\S]|[^\\\\s~\\\\\\\\]))\\\\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\\\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\\\/=?_`{\\\\|}~-]+@)|[\\\\s\\\\S]*?(?:(?=[\\\\\\\\<!\\\\[`*~_]|\\\\b_|https?:\\\\/\\\\/|ftp:\\\\/\\\\/|www\\\\.|$)|[^ ](?= {2,}\\\\n)|[^a-zA-Z0-9.!#$%&'*+\\\\/=?_`{\\\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\\\/=?_`{\\\\|}~-]+@)))/},ba={...Cr,br:ne(On).replace(\\\"{2,}\\\",\\\"*\\\").getRegex(),text:ne(Cr.text).replace(\\\"\\\\\\\\b_\\\",\\\"\\\\\\\\b_| {2,}\\\\\\\\n\\\").replace(/\\\\{2,\\\\}/g,\\\"*\\\").getRegex()},ks={normal:xr,gfm:jo,pedantic:ea},Qt={normal:Tr,gfm:Cr,breaks:ba,pedantic:_a},Sa={\\\"&\\\":\\\"&amp;\\\",\\\"<\\\":\\\"&lt;\\\",\\\">\\\":\\\"&gt;\\\",'\\\"':\\\"&quot;\\\",\\\"'\\\":\\\"&#39;\\\"},Hn=s=>Sa[s];function it(s,e){if(e){if(Me.escapeTest.test(s))return s.replace(Me.escapeReplace,Hn)}else if(Me.escapeTestNoEncode.test(s))return s.replace(Me.escapeReplaceNoEncode,Hn);return s}function Fn(s){try{s=encodeURI(s).replace(Me.percentDecode,\\\"%\\\")}catch{return null}return s}function Vn(s,e){let t=s.replace(Me.findPipe,(i,a,h)=>{let u=!1,p=a;for(;--p>=0&&h[p]===\\\"\\\\\\\\\\\";)u=!u;return u?\\\"|\\\":\\\" |\\\"}),n=t.split(Me.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push(\\\"\\\");for(;r<n.length;r++)n[r]=n[r].trim().replace(Me.slashPipe,\\\"|\\\");return n}function Kt(s,e,t){let n=s.length;if(n===0)return\\\"\\\";let r=0;for(;r<n&&s.charAt(n-r-1)===e;)r++;return s.slice(0,n-r)}function ka(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<s.length;n++)if(s[n]===\\\"\\\\\\\\\\\")n++;else if(s[n]===e[0])t++;else if(s[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function zn(s,e,t,n,r){let i=e.href,a=e.title||null,h=s[1].replace(r.other.outputLinkReplace,\\\"$1\\\");n.state.inLink=!0;let u={type:s[0].charAt(0)===\\\"!\\\"?\\\"image\\\":\\\"link\\\",raw:t,href:i,title:a,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function xa(s,e,t){let n=s.match(t.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`\\n`).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[h]=a;return h.length>=r.length?i.slice(r.length):i}).join(`\\n`)}var xs=class{constructor(s){le(this,\\\"options\\\");le(this,\\\"rules\\\");le(this,\\\"lexer\\\");this.options=s||Qe}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:\\\"space\\\",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,\\\"\\\");return{type:\\\"code\\\",raw:e[0],codeBlockStyle:\\\"indented\\\",text:this.options.pedantic?t:Kt(t,`\\n`)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let t=e[0],n=xa(t,e[3]||\\\"\\\",this.rules);return{type:\\\"code\\\",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,\\\"$1\\\"):e[2],text:n}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=Kt(t,\\\"#\\\");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:\\\"heading\\\",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:\\\"hr\\\",raw:Kt(e[0],`\\n`)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let t=Kt(e[0],`\\n`).split(`\\n`),n=\\\"\\\",r=\\\"\\\",i=[];for(;t.length>0;){let a=!1,h=[],u;for(u=0;u<t.length;u++)if(this.rules.other.blockquoteStart.test(t[u]))h.push(t[u]),a=!0;else if(!a)h.push(t[u]);else break;t=t.slice(u);let p=h.join(`\\n`),f=p.replace(this.rules.other.blockquoteSetextReplace,`\\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\\\"\\\");n=n?`${n}\\n${p}`:p,r=r?`${r}\\n${f}`:f;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,i,!0),this.lexer.state.top=g,t.length===0)break;let l=i.at(-1);if(l?.type===\\\"code\\\")break;if(l?.type===\\\"blockquote\\\"){let c=l,o=c.raw+`\\n`+t.join(`\\n`),d=this.blockquote(o);i[i.length-1]=d,n=n.substring(0,n.length-c.raw.length)+d.raw,r=r.substring(0,r.length-c.text.length)+d.text;break}else if(l?.type===\\\"list\\\"){let c=l,o=c.raw+`\\n`+t.join(`\\n`),d=this.list(o);i[i.length-1]=d,n=n.substring(0,n.length-l.raw.length)+d.raw,r=r.substring(0,r.length-c.raw.length)+d.raw,t=o.substring(i.at(-1).raw.length).split(`\\n`);continue}}return{type:\\\"blockquote\\\",raw:n,tokens:i,text:r}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim(),n=t.length>1,r={type:\\\"list\\\",raw:\\\"\\\",ordered:n,start:n?+t.slice(0,-1):\\\"\\\",loose:!1,items:[]};t=n?`\\\\\\\\d{1,9}\\\\\\\\${t.slice(-1)}`:`\\\\\\\\${t}`,this.options.pedantic&&(t=n?t:\\\"[*+-]\\\");let i=this.rules.other.listItemRegex(t),a=!1;for(;s;){let u=!1,p=\\\"\\\",f=\\\"\\\";if(!(e=i.exec(s))||this.rules.block.hr.test(s))break;p=e[0],s=s.substring(p.length);let g=e[2].split(`\\n`,1)[0].replace(this.rules.other.listReplaceTabs,v=>\\\" \\\".repeat(3*v.length)),l=s.split(`\\n`,1)[0],c=!g.trim(),o=0;if(this.options.pedantic?(o=2,f=g.trimStart()):c?o=e[1].length+1:(o=e[2].search(this.rules.other.nonSpaceChar),o=o>4?1:o,f=g.slice(o),o+=e[1].length),c&&this.rules.other.blankLine.test(l)&&(p+=l+`\\n`,s=s.substring(l.length+1),u=!0),!u){let v=this.rules.other.nextBulletRegex(o),_=this.rules.other.hrRegex(o),S=this.rules.other.fencesBeginRegex(o),y=this.rules.other.headingBeginRegex(o),b=this.rules.other.htmlBeginRegex(o);for(;s;){let k=s.split(`\\n`,1)[0],x;if(l=k,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,\\\" \\\"),x=l):x=l.replace(this.rules.other.tabCharGlobal,\\\" \\\"),S.test(l)||y.test(l)||b.test(l)||v.test(l)||_.test(l))break;if(x.search(this.rules.other.nonSpaceChar)>=o||!l.trim())f+=`\\n`+x.slice(o);else{if(c||g.replace(this.rules.other.tabCharGlobal,\\\" \\\").search(this.rules.other.nonSpaceChar)>=4||S.test(g)||y.test(g)||_.test(g))break;f+=`\\n`+l}!c&&!l.trim()&&(c=!0),p+=k+`\\n`,s=s.substring(k.length+1),g=x.slice(o)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0));let d=null,m;this.options.gfm&&(d=this.rules.other.listIsTask.exec(f),d&&(m=d[0]!==\\\"[ ] \\\",f=f.replace(this.rules.other.listReplaceTask,\\\"\\\"))),r.items.push({type:\\\"list_item\\\",raw:p,task:!!d,checked:m,loose:!1,text:f,tokens:[]}),r.raw+=p}let h=r.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let u=0;u<r.items.length;u++)if(this.lexer.state.top=!1,r.items[u].tokens=this.lexer.blockTokens(r.items[u].text,[]),!r.loose){let p=r.items[u].tokens.filter(g=>g.type===\\\"space\\\"),f=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=f}if(r.loose)for(let u=0;u<r.items.length;u++)r.items[u].loose=!0;return r}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:\\\"html\\\",block:!0,raw:e[0],pre:e[1]===\\\"pre\\\"||e[1]===\\\"script\\\"||e[1]===\\\"style\\\",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,\\\" \\\"),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,\\\"$1\\\").replace(this.rules.inline.anyPunctuation,\\\"$1\\\"):\\\"\\\",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,\\\"$1\\\"):e[3];return{type:\\\"def\\\",tag:t,raw:e[0],href:n,title:r}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Vn(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,\\\"\\\").split(\\\"|\\\"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,\\\"\\\").split(`\\n`):[],i={type:\\\"table\\\",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?i.align.push(\\\"right\\\"):this.rules.other.tableAlignCenter.test(a)?i.align.push(\\\"center\\\"):this.rules.other.tableAlignLeft.test(a)?i.align.push(\\\"left\\\"):i.align.push(null);for(let a=0;a<t.length;a++)i.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:i.align[a]});for(let a of r)i.rows.push(Vn(a,i.header.length).map((h,u)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:i.align[u]})));return i}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:\\\"heading\\\",raw:e[0],depth:e[2].charAt(0)===\\\"=\\\"?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let t=e[1].charAt(e[1].length-1)===`\\n`?e[1].slice(0,-1):e[1];return{type:\\\"paragraph\\\",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:\\\"text\\\",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:\\\"escape\\\",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:\\\"html\\\",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=Kt(t.slice(0,-1),\\\"\\\\\\\\\\\");if((t.length-i.length)%2===0)return}else{let i=ka(e[2],\\\"()\\\");if(i===-2)return;if(i>-1){let a=(e[0].indexOf(\\\"!\\\")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=\\\"\\\"}}let n=e[2],r=\\\"\\\";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],r=i[3])}else r=e[3]?e[3].slice(1,-1):\\\"\\\";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),zn(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,\\\"$1\\\"),title:r&&r.replace(this.rules.inline.anyPunctuation,\\\"$1\\\")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal,\\\" \\\"),r=e[n.toLowerCase()];if(!r){let i=t[0].charAt(0);return{type:\\\"text\\\",raw:i,text:i}}return zn(t,r,t[0],this.lexer,this.rules)}}emStrong(s,e,t=\\\"\\\"){let n=this.rules.inline.emStrongLDelim.exec(s);if(!(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!t||this.rules.inline.punctuation.exec(t))){let r=[...n[0]].length-1,i,a,h=r,u=0,p=n[0][0]===\\\"*\\\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*s.length+r);(n=p.exec(e))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){h+=a;continue}else if((n[5]||n[6])&&r%3&&!((r+a)%3)){u+=a;continue}if(h-=a,h>0)continue;a=Math.min(a,a+h+u);let f=[...n[0]][0].length,g=s.slice(0,r+n.index+f+a);if(Math.min(r,a)%2){let c=g.slice(1,-1);return{type:\\\"em\\\",raw:g,text:c,tokens:this.lexer.inlineTokens(c)}}let l=g.slice(2,-2);return{type:\\\"strong\\\",raw:g,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal,\\\" \\\"),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:\\\"codespan\\\",raw:e[0],text:t}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:\\\"br\\\",raw:e[0]}}del(s){let e=this.rules.inline.del.exec(s);if(e)return{type:\\\"del\\\",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let t,n;return e[2]===\\\"@\\\"?(t=e[1],n=\\\"mailto:\\\"+t):(t=e[1],n=t),{type:\\\"link\\\",raw:e[0],text:t,href:n,tokens:[{type:\\\"text\\\",raw:t,text:t}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let t,n;if(e[2]===\\\"@\\\")t=e[0],n=\\\"mailto:\\\"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??\\\"\\\";while(r!==e[0]);t=e[0],e[1]===\\\"www.\\\"?n=\\\"http://\\\"+e[0]:n=e[0]}return{type:\\\"link\\\",raw:e[0],text:t,href:n,tokens:[{type:\\\"text\\\",raw:t,text:t}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let t=this.lexer.state.inRawBlock;return{type:\\\"text\\\",raw:e[0],text:e[0],escaped:t}}}},ht=class Tn{constructor(e){le(this,\\\"tokens\\\");le(this,\\\"options\\\");le(this,\\\"state\\\");le(this,\\\"tokenizer\\\");le(this,\\\"inlineQueue\\\");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qe,this.options.tokenizer=this.options.tokenizer||new xs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Me,block:ks.normal,inline:Qt.normal};this.options.pedantic?(t.block=ks.pedantic,t.inline=Qt.pedantic):this.options.gfm&&(t.block=ks.gfm,this.options.breaks?t.inline=Qt.breaks:t.inline=Qt.gfm),this.tokenizer.rules=t}static get rules(){return{block:ks,inline:Qt}}static lex(e,t){return new Tn(t).lex(e)}static lexInline(e,t){return new Tn(t).inlineTokens(e)}lex(e){e=e.replace(Me.carriageReturn,`\\n`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Me.tabCharGlobal,\\\" \\\").replace(Me.spaceLine,\\\"\\\"));e;){let r;if(this.options.extensions?.block?.some(a=>(r=a.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let a=t.at(-1);r.raw.length===1&&a!==void 0?a.raw+=`\\n`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let a=t.at(-1);a?.type===\\\"paragraph\\\"||a?.type===\\\"text\\\"?(a.raw+=(a.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,a.text+=`\\n`+r.text,this.inlineQueue.at(-1).src=a.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let a=t.at(-1);a?.type===\\\"paragraph\\\"||a?.type===\\\"text\\\"?(a.raw+=(a.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,a.text+=`\\n`+r.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let a=1/0,h=e.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},h),typeof u==\\\"number\\\"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(i=e.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===\\\"paragraph\\\"?(a.raw+=(a.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,a.text+=`\\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let a=t.at(-1);a?.type===\\\"text\\\"?(a.raw+=(a.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,a.text+=`\\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r);continue}if(e){let a=\\\"Infinite loop on byte: \\\"+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)h.includes(r[0].slice(r[0].lastIndexOf(\\\"[\\\")+1,-1))&&(n=n.slice(0,r.index)+\\\"[\\\"+\\\"a\\\".repeat(r[0].length-2)+\\\"]\\\"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+\\\"++\\\"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+\\\"[\\\"+\\\"a\\\".repeat(r[0].length-2)+\\\"]\\\"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=!1,a=\\\"\\\";for(;e;){i||(a=\\\"\\\"),i=!1;let h;if(this.options.extensions?.inline?.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=t.at(-1);h.type===\\\"text\\\"&&p?.type===\\\"text\\\"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,n,a)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let u=e;if(this.options.extensions?.startInline){let p=1/0,f=e.slice(1),g;this.options.extensions.startInline.forEach(l=>{g=l.call({lexer:this},f),typeof g==\\\"number\\\"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(u=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(u)){e=e.substring(h.raw.length),h.raw.slice(-1)!==\\\"_\\\"&&(a=h.raw.slice(-1)),i=!0;let p=t.at(-1);p?.type===\\\"text\\\"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){let p=\\\"Infinite loop on byte: \\\"+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},ws=class{constructor(s){le(this,\\\"options\\\");le(this,\\\"parser\\\");this.options=s||Qe}space(s){return\\\"\\\"}code({text:s,lang:e,escaped:t}){let n=(e||\\\"\\\").match(Me.notSpaceStart)?.[0],r=s.replace(Me.endingNewline,\\\"\\\")+`\\n`;return n?'<pre><code class=\\\"language-'+it(n)+'\\\">'+(t?r:it(r,!0))+`</code></pre>\\n`:\\\"<pre><code>\\\"+(t?r:it(r,!0))+`</code></pre>\\n`}blockquote({tokens:s}){return`<blockquote>\\n${this.parser.parse(s)}</blockquote>\\n`}html({text:s}){return s}def(s){return\\\"\\\"}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>\\n`}hr(s){return`<hr>\\n`}list(s){let e=s.ordered,t=s.start,n=\\\"\\\";for(let a=0;a<s.items.length;a++){let h=s.items[a];n+=this.listitem(h)}let r=e?\\\"ol\\\":\\\"ul\\\",i=e&&t!==1?' start=\\\"'+t+'\\\"':\\\"\\\";return\\\"<\\\"+r+i+`>\\n`+n+\\\"</\\\"+r+`>\\n`}listitem(s){let e=\\\"\\\";if(s.task){let t=this.checkbox({checked:!!s.checked});s.loose?s.tokens[0]?.type===\\\"paragraph\\\"?(s.tokens[0].text=t+\\\" \\\"+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type===\\\"text\\\"&&(s.tokens[0].tokens[0].text=t+\\\" \\\"+it(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:\\\"text\\\",raw:t+\\\" \\\",text:t+\\\" \\\",escaped:!0}):e+=t+\\\" \\\"}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>\\n`}checkbox({checked:s}){return\\\"<input \\\"+(s?'checked=\\\"\\\" ':\\\"\\\")+'disabled=\\\"\\\" type=\\\"checkbox\\\">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>\\n`}table(s){let e=\\\"\\\",t=\\\"\\\";for(let r=0;r<s.header.length;r++)t+=this.tablecell(s.header[r]);e+=this.tablerow({text:t});let n=\\\"\\\";for(let r=0;r<s.rows.length;r++){let i=s.rows[r];t=\\\"\\\";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>\\n<thead>\\n`+e+`</thead>\\n`+n+`</table>\\n`}tablerow({text:s}){return`<tr>\\n${s}</tr>\\n`}tablecell(s){let e=this.parser.parseInline(s.tokens),t=s.header?\\\"th\\\":\\\"td\\\";return(s.align?`<${t} align=\\\"${s.align}\\\">`:`<${t}>`)+e+`</${t}>\\n`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${it(s,!0)}</code>`}br(s){return\\\"<br>\\\"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){let n=this.parser.parseInline(t),r=Fn(s);if(r===null)return n;s=r;let i='<a href=\\\"'+s+'\\\"';return e&&(i+=' title=\\\"'+it(e)+'\\\"'),i+=\\\">\\\"+n+\\\"</a>\\\",i}image({href:s,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let r=Fn(s);if(r===null)return it(t);s=r;let i=`<img src=\\\"${s}\\\" alt=\\\"${t}\\\"`;return e&&(i+=` title=\\\"${it(e)}\\\"`),i+=\\\">\\\",i}text(s){return\\\"tokens\\\"in s&&s.tokens?this.parser.parseInline(s.tokens):\\\"escaped\\\"in s&&s.escaped?s.text:it(s.text)}},Pr=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return\\\"\\\"+s}image({text:s}){return\\\"\\\"+s}br(){return\\\"\\\"}},pt=class Cn{constructor(e){le(this,\\\"options\\\");le(this,\\\"renderer\\\");le(this,\\\"textRenderer\\\");this.options=e||Qe,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pr}static parse(e,t){return new Cn(t).parse(e)}static parseInline(e,t){return new Cn(t).parseInline(e)}parse(e,t=!0){let n=\\\"\\\";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let h=i,u=this.options.extensions.renderers[h.type].call({parser:this},h);if(u!==!1||![\\\"space\\\",\\\"hr\\\",\\\"heading\\\",\\\"code\\\",\\\"table\\\",\\\"blockquote\\\",\\\"list\\\",\\\"html\\\",\\\"def\\\",\\\"paragraph\\\",\\\"text\\\"].includes(h.type)){n+=u||\\\"\\\";continue}}let a=i;switch(a.type){case\\\"space\\\":{n+=this.renderer.space(a);continue}case\\\"hr\\\":{n+=this.renderer.hr(a);continue}case\\\"heading\\\":{n+=this.renderer.heading(a);continue}case\\\"code\\\":{n+=this.renderer.code(a);continue}case\\\"table\\\":{n+=this.renderer.table(a);continue}case\\\"blockquote\\\":{n+=this.renderer.blockquote(a);continue}case\\\"list\\\":{n+=this.renderer.list(a);continue}case\\\"html\\\":{n+=this.renderer.html(a);continue}case\\\"def\\\":{n+=this.renderer.def(a);continue}case\\\"paragraph\\\":{n+=this.renderer.paragraph(a);continue}case\\\"text\\\":{let h=a,u=this.renderer.text(h);for(;r+1<e.length&&e[r+1].type===\\\"text\\\";)h=e[++r],u+=`\\n`+this.renderer.text(h);t?n+=this.renderer.paragraph({type:\\\"paragraph\\\",raw:u,text:u,tokens:[{type:\\\"text\\\",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{let h='Token with \\\"'+a.type+'\\\" type was not found.';if(this.options.silent)return console.error(h),\\\"\\\";throw new Error(h)}}}return n}parseInline(e,t=this.renderer){let n=\\\"\\\";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let h=this.options.extensions.renderers[i.type].call({parser:this},i);if(h!==!1||![\\\"escape\\\",\\\"html\\\",\\\"link\\\",\\\"image\\\",\\\"strong\\\",\\\"em\\\",\\\"codespan\\\",\\\"br\\\",\\\"del\\\",\\\"text\\\"].includes(i.type)){n+=h||\\\"\\\";continue}}let a=i;switch(a.type){case\\\"escape\\\":{n+=t.text(a);break}case\\\"html\\\":{n+=t.html(a);break}case\\\"link\\\":{n+=t.link(a);break}case\\\"image\\\":{n+=t.image(a);break}case\\\"strong\\\":{n+=t.strong(a);break}case\\\"em\\\":{n+=t.em(a);break}case\\\"codespan\\\":{n+=t.codespan(a);break}case\\\"br\\\":{n+=t.br(a);break}case\\\"del\\\":{n+=t.del(a);break}case\\\"text\\\":{n+=t.text(a);break}default:{let h='Token with \\\"'+a.type+'\\\" type was not found.';if(this.options.silent)return console.error(h),\\\"\\\";throw new Error(h)}}}return n}},Zt=(vr=class{constructor(s){le(this,\\\"options\\\");le(this,\\\"block\\\");this.options=s||Qe}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?ht.lex:ht.lexInline}provideParser(){return this.block?pt.parse:pt.parseInline}},le(vr,\\\"passThroughHooks\\\",new Set([\\\"preprocess\\\",\\\"postprocess\\\",\\\"processAllTokens\\\",\\\"emStrongMask\\\"])),le(vr,\\\"passThroughHooksRespectAsync\\\",new Set([\\\"preprocess\\\",\\\"postprocess\\\",\\\"processAllTokens\\\"])),vr),wa=class{constructor(...s){le(this,\\\"defaults\\\",tt());le(this,\\\"options\\\",this.setOptions);le(this,\\\"parse\\\",this.parseMarkdown(!0));le(this,\\\"parseInline\\\",this.parseMarkdown(!1));le(this,\\\"Parser\\\",pt);le(this,\\\"Renderer\\\",ws);le(this,\\\"TextRenderer\\\",Pr);le(this,\\\"Lexer\\\",ht);le(this,\\\"Tokenizer\\\",xs);le(this,\\\"Hooks\\\",Zt);this.use(...s)}walkTokens(s,e){let t=[];for(let n of s)switch(t=t.concat(e.call(this,n)),n.type){case\\\"table\\\":{let r=n;for(let i of r.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of r.rows)for(let a of i)t=t.concat(this.walkTokens(a.tokens,e));break}case\\\"list\\\":{let r=n;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let a=r[i].flat(1/0);t=t.concat(this.walkTokens(a,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error(\\\"extension name required\\\");if(\\\"renderer\\\"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...a){let h=r.renderer.apply(this,a);return h===!1&&(h=i.apply(this,a)),h}:e.renderers[r.name]=r.renderer}if(\\\"tokenizer\\\"in r){if(!r.level||r.level!==\\\"block\\\"&&r.level!==\\\"inline\\\")throw new Error(\\\"extension level must be 'block' or 'inline'\\\");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level===\\\"block\\\"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level===\\\"inline\\\"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}\\\"childTokens\\\"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){let r=this.defaults.renderer||new ws(this.defaults);for(let i in t.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if([\\\"options\\\",\\\"parser\\\"].includes(i))continue;let a=i,h=t.renderer[a],u=r[a];r[a]=(...p)=>{let f=h.apply(r,p);return f===!1&&(f=u.apply(r,p)),f||\\\"\\\"}}n.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new xs(this.defaults);for(let i in t.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if([\\\"options\\\",\\\"rules\\\",\\\"lexer\\\"].includes(i))continue;let a=i,h=t.tokenizer[a],u=r[a];r[a]=(...p)=>{let f=h.apply(r,p);return f===!1&&(f=u.apply(r,p)),f}}n.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new Zt;for(let i in t.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if([\\\"options\\\",\\\"block\\\"].includes(i))continue;let a=i,h=t.hooks[a],u=r[a];Zt.passThroughHooks.has(i)?r[a]=p=>{if(this.defaults.async&&Zt.passThroughHooksRespectAsync.has(i))return Promise.resolve(h.call(r,p)).then(g=>u.call(r,g));let f=h.call(r,p);return u.call(r,f)}:r[a]=(...p)=>{let f=h.apply(r,p);return f===!1&&(f=u.apply(r,p)),f}}n.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,i=t.walkTokens;n.walkTokens=function(a){let h=[];return h.push(i.call(this,a)),r&&(h=h.concat(r.call(this,a))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return ht.lex(s,e??this.defaults)}parser(s,e){return pt.parse(s,e??this.defaults)}parseMarkdown(s){return(e,t)=>{let n={...t},r={...this.defaults,...n},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return i(new Error(\\\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\\\"));if(typeof e>\\\"u\\\"||e===null)return i(new Error(\\\"marked(): input parameter is undefined or null\\\"));if(typeof e!=\\\"string\\\")return i(new Error(\\\"marked(): input parameter is of type \\\"+Object.prototype.toString.call(e)+\\\", string expected\\\"));r.hooks&&(r.hooks.options=r,r.hooks.block=s);let a=r.hooks?r.hooks.provideLexer():s?ht.lex:ht.lexInline,h=r.hooks?r.hooks.provideParser():s?pt.parse:pt.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(u=>a(u,r)).then(u=>r.hooks?r.hooks.processAllTokens(u):u).then(u=>r.walkTokens?Promise.all(this.walkTokens(u,r.walkTokens)).then(()=>u):u).then(u=>h(u,r)).then(u=>r.hooks?r.hooks.postprocess(u):u).catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let u=a(e,r);r.hooks&&(u=r.hooks.processAllTokens(u)),r.walkTokens&&this.walkTokens(u,r.walkTokens);let p=h(u,r);return r.hooks&&(p=r.hooks.postprocess(p)),p}catch(u){return i(u)}}}onError(s,e){return t=>{if(t.message+=`\\nPlease report this to https://github.com/markedjs/marked.`,s){let n=\\\"<p>An error occurred:</p><pre>\\\"+it(t.message+\\\"\\\",!0)+\\\"</pre>\\\";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},Et=new wa;function oe(s,e){return Et.parse(s,e)}oe.options=oe.setOptions=function(s){return Et.setOptions(s),oe.defaults=Et.defaults,Pn(oe.defaults),oe},oe.getDefaults=tt,oe.defaults=Qe,oe.use=function(...s){return Et.use(...s),oe.defaults=Et.defaults,Pn(oe.defaults),oe},oe.walkTokens=function(s,e){return Et.walkTokens(s,e)},oe.parseInline=Et.parseInline,oe.Parser=pt,oe.parser=pt.parse,oe.Renderer=ws,oe.TextRenderer=Pr,oe.Lexer=ht,oe.lexer=ht.lex,oe.Tokenizer=xs,oe.Hooks=Zt,oe.parse=oe,oe.options,oe.setOptions,oe.use,oe.walkTokens;var Er=oe.parseInline,Lr=oe;pt.parse,ht.lex;function Ta(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,\\\"default\\\")?s.default:s}var Ts={exports:{}},Cs={exports:{}},st={},He={},$n;function Fe(){if($n)return He;$n=1,He.__esModule=!0,He.extend=r,He.indexOf=u,He.escapeExpression=p,He.isEmpty=f,He.createFrame=g,He.blockParams=l,He.appendContextPath=c;var s={\\\"&\\\":\\\"&amp;\\\",\\\"<\\\":\\\"&lt;\\\",\\\">\\\":\\\"&gt;\\\",'\\\"':\\\"&quot;\\\",\\\"'\\\":\\\"&#x27;\\\",\\\"`\\\":\\\"&#x60;\\\",\\\"=\\\":\\\"&#x3D;\\\"},e=/[&<>\\\"'`=]/g,t=/[&<>\\\"'`=]/;function n(o){return s[o]}function r(o){for(var d=1;d<arguments.length;d++)for(var m in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],m)&&(o[m]=arguments[d][m]);return o}var i=Object.prototype.toString;He.toString=i;var a=function(d){return typeof d==\\\"function\\\"};a(/x/)&&(He.isFunction=a=function(o){return typeof o==\\\"function\\\"&&i.call(o)===\\\"[object Function]\\\"}),He.isFunction=a;var h=Array.isArray||function(o){return o&&typeof o==\\\"object\\\"?i.call(o)===\\\"[object Array]\\\":!1};He.isArray=h;function u(o,d){for(var m=0,v=o.length;m<v;m++)if(o[m]===d)return m;return-1}function p(o){if(typeof o!=\\\"string\\\"){if(o&&o.toHTML)return o.toHTML();if(o==null)return\\\"\\\";if(!o)return o+\\\"\\\";o=\\\"\\\"+o}return t.test(o)?o.replace(e,n):o}function f(o){return!o&&o!==0?!0:!!(h(o)&&o.length===0)}function g(o){var d=r({},o);return d._parent=o,d}function l(o,d){return o.path=d,o}function c(o,d){return(o?o+\\\".\\\":\\\"\\\")+d}return He}var Ps={exports:{}},Un;function rt(){return Un||(Un=1,(function(s,e){e.__esModule=!0;var t=[\\\"description\\\",\\\"fileName\\\",\\\"lineNumber\\\",\\\"endLineNumber\\\",\\\"message\\\",\\\"name\\\",\\\"number\\\",\\\"stack\\\"];function n(r,i){var a=i&&i.loc,h=void 0,u=void 0,p=void 0,f=void 0;a&&(h=a.start.line,u=a.end.line,p=a.start.column,f=a.end.column,r+=\\\" - \\\"+h+\\\":\\\"+p);for(var g=Error.prototype.constructor.call(this,r),l=0;l<t.length;l++)this[t[l]]=g[t[l]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{a&&(this.lineNumber=h,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,\\\"column\\\",{value:p,enumerable:!0}),Object.defineProperty(this,\\\"endColumn\\\",{value:f,enumerable:!0})):(this.column=p,this.endColumn=f))}catch{}}n.prototype=new Error,e.default=n,s.exports=e.default})(Ps,Ps.exports)),Ps.exports}var jt={},Es={exports:{}},Wn;function Ca(){return Wn||(Wn=1,(function(s,e){e.__esModule=!0;var t=Fe();e.default=function(n){n.registerHelper(\\\"blockHelperMissing\\\",function(r,i){var a=i.inverse,h=i.fn;if(r===!0)return h(this);if(r===!1||r==null)return a(this);if(t.isArray(r))return r.length>0?(i.ids&&(i.ids=[i.name]),n.helpers.each(r,i)):a(this);if(i.data&&i.ids){var u=t.createFrame(i.data);u.contextPath=t.appendContextPath(i.data.contextPath,i.name),i={data:u}}return h(r,i)})},s.exports=e.default})(Es,Es.exports)),Es.exports}var Ls={exports:{}},Gn;function Pa(){return Gn||(Gn=1,(function(s,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var n=Fe(),r=rt(),i=t(r);e.default=function(a){a.registerHelper(\\\"each\\\",function(h,u){if(!u)throw new i.default(\\\"Must pass iterator to #each\\\");var p=u.fn,f=u.inverse,g=0,l=\\\"\\\",c=void 0,o=void 0;u.data&&u.ids&&(o=n.appendContextPath(u.data.contextPath,u.ids[0])+\\\".\\\"),n.isFunction(h)&&(h=h.call(this)),u.data&&(c=n.createFrame(u.data));function d(y,b,k){c&&(c.key=y,c.index=b,c.first=b===0,c.last=!!k,o&&(c.contextPath=o+y)),l=l+p(h[y],{data:c,blockParams:n.blockParams([h[y],y],[o+y,null])})}if(h&&typeof h==\\\"object\\\")if(n.isArray(h))for(var m=h.length;g<m;g++)g in h&&d(g,g,g===h.length-1);else if(typeof Symbol==\\\"function\\\"&&h[Symbol.iterator]){for(var v=[],_=h[Symbol.iterator](),S=_.next();!S.done;S=_.next())v.push(S.value);h=v;for(var m=h.length;g<m;g++)d(g,g,g===h.length-1)}else(function(){var y=void 0;Object.keys(h).forEach(function(b){y!==void 0&&d(y,g-1),y=b,g++}),y!==void 0&&d(y,g-1,!0)})();return g===0&&(l=f(this)),l})},s.exports=e.default})(Ls,Ls.exports)),Ls.exports}var As={exports:{}},Xn;function Ea(){return Xn||(Xn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=rt(),r=t(n);e.default=function(i){i.registerHelper(\\\"helperMissing\\\",function(){if(arguments.length!==1)throw new r.default('Missing helper: \\\"'+arguments[arguments.length-1].name+'\\\"')})},s.exports=e.default})(As,As.exports)),As.exports}var Rs={exports:{}},Yn;function La(){return Yn||(Yn=1,(function(s,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var n=Fe(),r=rt(),i=t(r);e.default=function(a){a.registerHelper(\\\"if\\\",function(h,u){if(arguments.length!=2)throw new i.default(\\\"#if requires exactly one argument\\\");return n.isFunction(h)&&(h=h.call(this)),!u.hash.includeZero&&!h||n.isEmpty(h)?u.inverse(this):u.fn(this)}),a.registerHelper(\\\"unless\\\",function(h,u){if(arguments.length!=2)throw new i.default(\\\"#unless requires exactly one argument\\\");return a.helpers.if.call(this,h,{fn:u.inverse,inverse:u.fn,hash:u.hash})})},s.exports=e.default})(Rs,Rs.exports)),Rs.exports}var Os={exports:{}},Jn;function Aa(){return Jn||(Jn=1,(function(s,e){e.__esModule=!0,e.default=function(t){t.registerHelper(\\\"log\\\",function(){for(var n=[void 0],r=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)n.push(arguments[i]);var a=1;r.hash.level!=null?a=r.hash.level:r.data&&r.data.level!=null&&(a=r.data.level),n[0]=a,t.log.apply(t,n)})},s.exports=e.default})(Os,Os.exports)),Os.exports}var Ms={exports:{}},Qn;function Ra(){return Qn||(Qn=1,(function(s,e){e.__esModule=!0,e.default=function(t){t.registerHelper(\\\"lookup\\\",function(n,r,i){return n&&i.lookupProperty(n,r)})},s.exports=e.default})(Ms,Ms.exports)),Ms.exports}var Is={exports:{}},Kn;function Oa(){return Kn||(Kn=1,(function(s,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var n=Fe(),r=rt(),i=t(r);e.default=function(a){a.registerHelper(\\\"with\\\",function(h,u){if(arguments.length!=2)throw new i.default(\\\"#with requires exactly one argument\\\");n.isFunction(h)&&(h=h.call(this));var p=u.fn;if(n.isEmpty(h))return u.inverse(this);var f=u.data;return u.data&&u.ids&&(f=n.createFrame(u.data),f.contextPath=n.appendContextPath(u.data.contextPath,u.ids[0])),p(h,{data:f,blockParams:n.blockParams([h],[f&&f.contextPath])})})},s.exports=e.default})(Is,Is.exports)),Is.exports}var Zn;function jn(){if(Zn)return jt;Zn=1,jt.__esModule=!0,jt.registerDefaultHelpers=d,jt.moveHelperToHooks=m;function s(v){return v&&v.__esModule?v:{default:v}}var e=Ca(),t=s(e),n=Pa(),r=s(n),i=Ea(),a=s(i),h=La(),u=s(h),p=Aa(),f=s(p),g=Ra(),l=s(g),c=Oa(),o=s(c);function d(v){t.default(v),r.default(v),a.default(v),u.default(v),f.default(v),l.default(v),o.default(v)}function m(v,_,S){v.helpers[_]&&(v.hooks[_]=v.helpers[_],S||delete v.helpers[_])}return jt}var Ns={},Bs={exports:{}},ei;function Ma(){return ei||(ei=1,(function(s,e){e.__esModule=!0;var t=Fe();e.default=function(n){n.registerDecorator(\\\"inline\\\",function(r,i,a,h){var u=r;return i.partials||(i.partials={},u=function(p,f){var g=a.partials;a.partials=t.extend({},g,i.partials);var l=r(p,f);return a.partials=g,l}),i.partials[h.args[0]]=h.fn,u})},s.exports=e.default})(Bs,Bs.exports)),Bs.exports}var ti;function Ia(){if(ti)return Ns;ti=1,Ns.__esModule=!0,Ns.registerDefaultDecorators=n;function s(r){return r&&r.__esModule?r:{default:r}}var e=Ma(),t=s(e);function n(r){t.default(r)}return Ns}var Ds={exports:{}},si;function ri(){return si||(si=1,(function(s,e){e.__esModule=!0;var t=Fe(),n={methodMap:[\\\"debug\\\",\\\"info\\\",\\\"warn\\\",\\\"error\\\"],level:\\\"info\\\",lookupLevel:function(i){if(typeof i==\\\"string\\\"){var a=t.indexOf(n.methodMap,i.toLowerCase());a>=0?i=a:i=parseInt(i,10)}return i},log:function(i){if(i=n.lookupLevel(i),typeof console<\\\"u\\\"&&n.lookupLevel(n.level)<=i){var a=n.methodMap[i];console[a]||(a=\\\"log\\\");for(var h=arguments.length,u=Array(h>1?h-1:0),p=1;p<h;p++)u[p-1]=arguments[p];console[a].apply(console,u)}}};e.default=n,s.exports=e.default})(Ds,Ds.exports)),Ds.exports}var Bt={},qs={},ni;function Na(){if(ni)return qs;ni=1,qs.__esModule=!0,qs.createNewLookupObject=e;var s=Fe();function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return s.extend.apply(void 0,[Object.create(null)].concat(n))}return qs}var ii;function oi(){if(ii)return Bt;ii=1,Bt.__esModule=!0,Bt.createProtoAccessControl=i,Bt.resultIsAllowed=a,Bt.resetLoggedProperties=p;function s(f){return f&&f.__esModule?f:{default:f}}var e=Na(),t=ri(),n=s(t),r=Object.create(null);function i(f){var g=Object.create(null);g.constructor=!1,g.__defineGetter__=!1,g.__defineSetter__=!1,g.__lookupGetter__=!1;var l=Object.create(null);return l.__proto__=!1,{properties:{whitelist:e.createNewLookupObject(l,f.allowedProtoProperties),defaultValue:f.allowProtoPropertiesByDefault},methods:{whitelist:e.createNewLookupObject(g,f.allowedProtoMethods),defaultValue:f.allowProtoMethodsByDefault}}}function a(f,g,l){return h(typeof f==\\\"function\\\"?g.methods:g.properties,l)}function h(f,g){return f.whitelist[g]!==void 0?f.whitelist[g]===!0:f.defaultValue!==void 0?f.defaultValue:(u(g),!1)}function u(f){r[f]!==!0&&(r[f]=!0,n.default.log(\\\"error\\\",'Handlebars: Access has been denied to resolve the property \\\"'+f+`\\\" because it is not an \\\"own property\\\" of its parent.\\nYou can add a runtime option to disable the check or this warning:\\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function p(){Object.keys(r).forEach(function(f){delete r[f]})}return Bt}var ai;function Ar(){if(ai)return st;ai=1,st.__esModule=!0,st.HandlebarsEnvironment=o;function s(m){return m&&m.__esModule?m:{default:m}}var e=Fe(),t=rt(),n=s(t),r=jn(),i=Ia(),a=ri(),h=s(a),u=oi(),p=\\\"4.7.8\\\";st.VERSION=p;var f=8;st.COMPILER_REVISION=f;var g=7;st.LAST_COMPATIBLE_COMPILER_REVISION=g;var l={1:\\\"<= 1.0.rc.2\\\",2:\\\"== 1.0.0-rc.3\\\",3:\\\"== 1.0.0-rc.4\\\",4:\\\"== 1.x.x\\\",5:\\\"== 2.0.0-alpha.x\\\",6:\\\">= 2.0.0-beta.1\\\",7:\\\">= 4.0.0 <4.3.0\\\",8:\\\">= 4.3.0\\\"};st.REVISION_CHANGES=l;var c=\\\"[object Object]\\\";function o(m,v,_){this.helpers=m||{},this.partials=v||{},this.decorators=_||{},r.registerDefaultHelpers(this),i.registerDefaultDecorators(this)}o.prototype={constructor:o,logger:h.default,log:h.default.log,registerHelper:function(v,_){if(e.toString.call(v)===c){if(_)throw new n.default(\\\"Arg not supported with multiple helpers\\\");e.extend(this.helpers,v)}else this.helpers[v]=_},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,_){if(e.toString.call(v)===c)e.extend(this.partials,v);else{if(typeof _>\\\"u\\\")throw new n.default('Attempting to register a partial called \\\"'+v+'\\\" as undefined');this.partials[v]=_}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,_){if(e.toString.call(v)===c){if(_)throw new n.default(\\\"Arg not supported with multiple decorators\\\");e.extend(this.decorators,v)}else this.decorators[v]=_},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){u.resetLoggedProperties()}};var d=h.default.log;return st.log=d,st.createFrame=e.createFrame,st.logger=h.default,st}var Hs={exports:{}},li;function Ba(){return li||(li=1,(function(s,e){e.__esModule=!0;function t(n){this.string=n}t.prototype.toString=t.prototype.toHTML=function(){return\\\"\\\"+this.string},e.default=t,s.exports=e.default})(Hs,Hs.exports)),Hs.exports}var ft={},Fs={},ci;function Da(){if(ci)return Fs;ci=1,Fs.__esModule=!0,Fs.wrapHelper=s;function s(e,t){if(typeof e!=\\\"function\\\")return e;var n=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)};return n}return Fs}var ui;function qa(){if(ui)return ft;ui=1,ft.__esModule=!0,ft.checkRevision=f,ft.template=g,ft.wrapProgram=l,ft.resolvePartial=c,ft.invokePartial=o,ft.noop=d;function s(y){return y&&y.__esModule?y:{default:y}}function e(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&(b[k]=y[k]);return b.default=y,b}var t=Fe(),n=e(t),r=rt(),i=s(r),a=Ar(),h=jn(),u=Da(),p=oi();function f(y){var b=y&&y[0]||1,k=a.COMPILER_REVISION;if(!(b>=a.LAST_COMPATIBLE_COMPILER_REVISION&&b<=a.COMPILER_REVISION))if(b<a.LAST_COMPATIBLE_COMPILER_REVISION){var x=a.REVISION_CHANGES[k],C=a.REVISION_CHANGES[b];throw new i.default(\\\"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (\\\"+x+\\\") or downgrade your runtime to an older version (\\\"+C+\\\").\\\")}else throw new i.default(\\\"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (\\\"+y[1]+\\\").\\\")}function g(y,b){if(!b)throw new i.default(\\\"No environment passed to template\\\");if(!y||!y.main)throw new i.default(\\\"Unknown template object: \\\"+typeof y);y.main.decorator=y.main_d,b.VM.checkRevision(y.compiler);var k=y.compiler&&y.compiler[0]===7;function x(P,w,E){E.hash&&(w=n.extend({},w,E.hash),E.ids&&(E.ids[0]=!0)),P=b.VM.resolvePartial.call(this,P,w,E);var L=n.extend({},E,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),M=b.VM.invokePartial.call(this,P,w,L);if(M==null&&b.compile&&(E.partials[E.name]=b.compile(P,y.compilerOptions,b),M=E.partials[E.name](w,L)),M!=null){if(E.indent){for(var q=M.split(`\\n`),V=0,U=q.length;V<U&&!(!q[V]&&V+1===U);V++)q[V]=E.indent+q[V];M=q.join(`\\n`)}return M}else throw new i.default(\\\"The partial \\\"+E.name+\\\" could not be compiled when running in runtime-only mode\\\")}var C={strict:function(w,E,L){if(!w||!(E in w))throw new i.default('\\\"'+E+'\\\" not defined in '+w,{loc:L});return C.lookupProperty(w,E)},lookupProperty:function(w,E){var L=w[E];if(L==null||Object.prototype.hasOwnProperty.call(w,E)||p.resultIsAllowed(L,C.protoAccessControl,E))return L},lookup:function(w,E){for(var L=w.length,M=0;M<L;M++){var q=w[M]&&C.lookupProperty(w[M],E);if(q!=null)return w[M][E]}},lambda:function(w,E){return typeof w==\\\"function\\\"?w.call(E):w},escapeExpression:n.escapeExpression,invokePartial:x,fn:function(w){var E=y[w];return E.decorator=y[w+\\\"_d\\\"],E},programs:[],program:function(w,E,L,M,q){var V=this.programs[w],U=this.fn(w);return E||q||M||L?V=l(this,w,U,E,L,M,q):V||(V=this.programs[w]=l(this,w,U)),V},data:function(w,E){for(;w&&E--;)w=w._parent;return w},mergeIfNeeded:function(w,E){var L=w||E;return w&&E&&w!==E&&(L=n.extend({},E,w)),L},nullContext:Object.seal({}),noop:b.VM.noop,compilerInfo:y.compiler};function O(P){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],E=w.data;O._setup(w),!w.partial&&y.useData&&(E=m(P,E));var L=void 0,M=y.useBlockParams?[]:void 0;y.useDepths&&(w.depths?L=P!=w.depths[0]?[P].concat(w.depths):w.depths:L=[P]);function q(V){return\\\"\\\"+y.main(C,V,C.helpers,C.partials,E,M,L)}return q=v(y.main,q,C,w.depths||[],E,M),q(P,w)}return O.isTop=!0,O._setup=function(P){if(P.partial)C.protoAccessControl=P.protoAccessControl,C.helpers=P.helpers,C.partials=P.partials,C.decorators=P.decorators,C.hooks=P.hooks;else{var w=n.extend({},b.helpers,P.helpers);_(w,C),C.helpers=w,y.usePartial&&(C.partials=C.mergeIfNeeded(P.partials,b.partials)),(y.usePartial||y.useDecorators)&&(C.decorators=n.extend({},b.decorators,P.decorators)),C.hooks={},C.protoAccessControl=p.createProtoAccessControl(P);var E=P.allowCallsToHelperMissing||k;h.moveHelperToHooks(C,\\\"helperMissing\\\",E),h.moveHelperToHooks(C,\\\"blockHelperMissing\\\",E)}},O._child=function(P,w,E,L){if(y.useBlockParams&&!E)throw new i.default(\\\"must pass block params\\\");if(y.useDepths&&!L)throw new i.default(\\\"must pass parent depths\\\");return l(C,P,y[P],w,0,E,L)},O}function l(y,b,k,x,C,O,P){function w(E){var L=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],M=P;return P&&E!=P[0]&&!(E===y.nullContext&&P[0]===null)&&(M=[E].concat(P)),k(y,E,y.helpers,y.partials,L.data||x,O&&[L.blockParams].concat(O),M)}return w=v(k,w,y,P,x,O),w.program=b,w.depth=P?P.length:0,w.blockParams=C||0,w}function c(y,b,k){return y?!y.call&&!k.name&&(k.name=y,y=k.partials[y]):k.name===\\\"@partial-block\\\"?y=k.data[\\\"partial-block\\\"]:y=k.partials[k.name],y}function o(y,b,k){var x=k.data&&k.data[\\\"partial-block\\\"];k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var C=void 0;if(k.fn&&k.fn!==d&&(function(){k.data=a.createFrame(k.data);var O=k.fn;C=k.data[\\\"partial-block\\\"]=function(w){var E=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return E.data=a.createFrame(E.data),E.data[\\\"partial-block\\\"]=x,O(w,E)},O.partials&&(k.partials=n.extend({},k.partials,O.partials))})(),y===void 0&&C&&(y=C),y===void 0)throw new i.default(\\\"The partial \\\"+k.name+\\\" could not be found\\\");if(y instanceof Function)return y(b,k)}function d(){return\\\"\\\"}function m(y,b){return(!b||!(\\\"root\\\"in b))&&(b=b?a.createFrame(b):{},b.root=y),b}function v(y,b,k,x,C,O){if(y.decorator){var P={};b=y.decorator(b,P,k,x&&x[0],C,O,x),n.extend(b,P)}return b}function _(y,b){Object.keys(y).forEach(function(k){var x=y[k];y[k]=S(x,b)})}function S(y,b){var k=b.lookupProperty;return u.wrapHelper(y,function(x){return n.extend({lookupProperty:k},x)})}return ft}var Vs={exports:{}},hi;function pi(){return hi||(hi=1,(function(s,e){e.__esModule=!0,e.default=function(t){(function(){typeof globalThis!=\\\"object\\\"&&(Object.prototype.__defineGetter__(\\\"__magic__\\\",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var n=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=n),t}},s.exports=e.default})(Vs,Vs.exports)),Vs.exports}var fi;function Ha(){return fi||(fi=1,(function(s,e){e.__esModule=!0;function t(_){return _&&_.__esModule?_:{default:_}}function n(_){if(_&&_.__esModule)return _;var S={};if(_!=null)for(var y in _)Object.prototype.hasOwnProperty.call(_,y)&&(S[y]=_[y]);return S.default=_,S}var r=Ar(),i=n(r),a=Ba(),h=t(a),u=rt(),p=t(u),f=Fe(),g=n(f),l=qa(),c=n(l),o=pi(),d=t(o);function m(){var _=new i.HandlebarsEnvironment;return g.extend(_,i),_.SafeString=h.default,_.Exception=p.default,_.Utils=g,_.escapeExpression=g.escapeExpression,_.VM=c,_.template=function(S){return c.template(S,_)},_}var v=m();v.create=m,d.default(v),v.default=v,e.default=v,s.exports=e.default})(Cs,Cs.exports)),Cs.exports}var zs={exports:{}},di;function gi(){return di||(di=1,(function(s,e){e.__esModule=!0;var t={helpers:{helperExpression:function(r){return r.type===\\\"SubExpression\\\"||(r.type===\\\"MustacheStatement\\\"||r.type===\\\"BlockStatement\\\")&&!!(r.params&&r.params.length||r.hash)},scopedId:function(r){return/^\\\\.|this\\\\b/.test(r.original)},simpleId:function(r){return r.parts.length===1&&!t.helpers.scopedId(r)&&!r.depth}}};e.default=t,s.exports=e.default})(zs,zs.exports)),zs.exports}var Dt={},$s={exports:{}},mi;function Fa(){return mi||(mi=1,(function(s,e){e.__esModule=!0;var t=(function(){var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:\\\"error\\\",5:\\\"EOF\\\",14:\\\"COMMENT\\\",15:\\\"CONTENT\\\",18:\\\"END_RAW_BLOCK\\\",19:\\\"OPEN_RAW_BLOCK\\\",23:\\\"CLOSE_RAW_BLOCK\\\",29:\\\"OPEN_BLOCK\\\",33:\\\"CLOSE\\\",34:\\\"OPEN_INVERSE\\\",39:\\\"OPEN_INVERSE_CHAIN\\\",44:\\\"INVERSE\\\",47:\\\"OPEN_ENDBLOCK\\\",48:\\\"OPEN\\\",51:\\\"OPEN_UNESCAPED\\\",54:\\\"CLOSE_UNESCAPED\\\",55:\\\"OPEN_PARTIAL\\\",60:\\\"OPEN_PARTIAL_BLOCK\\\",65:\\\"OPEN_SEXPR\\\",68:\\\"CLOSE_SEXPR\\\",72:\\\"ID\\\",73:\\\"EQUALS\\\",75:\\\"OPEN_BLOCK_PARAMS\\\",77:\\\"CLOSE_BLOCK_PARAMS\\\",80:\\\"STRING\\\",81:\\\"NUMBER\\\",82:\\\"BOOLEAN\\\",83:\\\"UNDEFINED\\\",84:\\\"NULL\\\",85:\\\"DATA\\\",87:\\\"SEP\\\"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(h,u,p,f,g,l,c){var o=l.length-1;switch(g){case 1:return l[o-1];case 2:this.$=f.prepareProgram(l[o]);break;case 3:this.$=l[o];break;case 4:this.$=l[o];break;case 5:this.$=l[o];break;case 6:this.$=l[o];break;case 7:this.$=l[o];break;case 8:this.$=l[o];break;case 9:this.$={type:\\\"CommentStatement\\\",value:f.stripComment(l[o]),strip:f.stripFlags(l[o],l[o]),loc:f.locInfo(this._$)};break;case 10:this.$={type:\\\"ContentStatement\\\",original:l[o],value:l[o],loc:f.locInfo(this._$)};break;case 11:this.$=f.prepareRawBlock(l[o-2],l[o-1],l[o],this._$);break;case 12:this.$={path:l[o-3],params:l[o-2],hash:l[o-1]};break;case 13:this.$=f.prepareBlock(l[o-3],l[o-2],l[o-1],l[o],!1,this._$);break;case 14:this.$=f.prepareBlock(l[o-3],l[o-2],l[o-1],l[o],!0,this._$);break;case 15:this.$={open:l[o-5],path:l[o-4],params:l[o-3],hash:l[o-2],blockParams:l[o-1],strip:f.stripFlags(l[o-5],l[o])};break;case 16:this.$={path:l[o-4],params:l[o-3],hash:l[o-2],blockParams:l[o-1],strip:f.stripFlags(l[o-5],l[o])};break;case 17:this.$={path:l[o-4],params:l[o-3],hash:l[o-2],blockParams:l[o-1],strip:f.stripFlags(l[o-5],l[o])};break;case 18:this.$={strip:f.stripFlags(l[o-1],l[o-1]),program:l[o]};break;case 19:var d=f.prepareBlock(l[o-2],l[o-1],l[o],l[o],!1,this._$),m=f.prepareProgram([d],l[o-1].loc);m.chained=!0,this.$={strip:l[o-2].strip,program:m,chain:!0};break;case 20:this.$=l[o];break;case 21:this.$={path:l[o-1],strip:f.stripFlags(l[o-2],l[o])};break;case 22:this.$=f.prepareMustache(l[o-3],l[o-2],l[o-1],l[o-4],f.stripFlags(l[o-4],l[o]),this._$);break;case 23:this.$=f.prepareMustache(l[o-3],l[o-2],l[o-1],l[o-4],f.stripFlags(l[o-4],l[o]),this._$);break;case 24:this.$={type:\\\"PartialStatement\\\",name:l[o-3],params:l[o-2],hash:l[o-1],indent:\\\"\\\",strip:f.stripFlags(l[o-4],l[o]),loc:f.locInfo(this._$)};break;case 25:this.$=f.preparePartialBlock(l[o-2],l[o-1],l[o],this._$);break;case 26:this.$={path:l[o-3],params:l[o-2],hash:l[o-1],strip:f.stripFlags(l[o-4],l[o])};break;case 27:this.$=l[o];break;case 28:this.$=l[o];break;case 29:this.$={type:\\\"SubExpression\\\",path:l[o-3],params:l[o-2],hash:l[o-1],loc:f.locInfo(this._$)};break;case 30:this.$={type:\\\"Hash\\\",pairs:l[o],loc:f.locInfo(this._$)};break;case 31:this.$={type:\\\"HashPair\\\",key:f.id(l[o-2]),value:l[o],loc:f.locInfo(this._$)};break;case 32:this.$=f.id(l[o-1]);break;case 33:this.$=l[o];break;case 34:this.$=l[o];break;case 35:this.$={type:\\\"StringLiteral\\\",value:l[o],original:l[o],loc:f.locInfo(this._$)};break;case 36:this.$={type:\\\"NumberLiteral\\\",value:Number(l[o]),original:Number(l[o]),loc:f.locInfo(this._$)};break;case 37:this.$={type:\\\"BooleanLiteral\\\",value:l[o]===\\\"true\\\",original:l[o]===\\\"true\\\",loc:f.locInfo(this._$)};break;case 38:this.$={type:\\\"UndefinedLiteral\\\",original:void 0,value:void 0,loc:f.locInfo(this._$)};break;case 39:this.$={type:\\\"NullLiteral\\\",original:null,value:null,loc:f.locInfo(this._$)};break;case 40:this.$=l[o];break;case 41:this.$=l[o];break;case 42:this.$=f.preparePath(!0,l[o],this._$);break;case 43:this.$=f.preparePath(!1,l[o],this._$);break;case 44:l[o-2].push({part:f.id(l[o]),original:l[o],separator:l[o-1]}),this.$=l[o-2];break;case 45:this.$=[{part:f.id(l[o]),original:l[o]}];break;case 46:this.$=[];break;case 47:l[o-1].push(l[o]);break;case 48:this.$=[];break;case 49:l[o-1].push(l[o]);break;case 50:this.$=[];break;case 51:l[o-1].push(l[o]);break;case 58:this.$=[];break;case 59:l[o-1].push(l[o]);break;case 64:this.$=[];break;case 65:l[o-1].push(l[o]);break;case 70:this.$=[];break;case 71:l[o-1].push(l[o]);break;case 78:this.$=[];break;case 79:l[o-1].push(l[o]);break;case 82:this.$=[];break;case 83:l[o-1].push(l[o]);break;case 86:this.$=[];break;case 87:l[o-1].push(l[o]);break;case 90:this.$=[];break;case 91:l[o-1].push(l[o]);break;case 94:this.$=[];break;case 95:l[o-1].push(l[o]);break;case 98:this.$=[l[o]];break;case 99:l[o-1].push(l[o]);break;case 100:this.$=[l[o]];break;case 101:l[o-1].push(l[o]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(h,u){throw new Error(h)},parse:function(h){var u=this,p=[0],f=[null],g=[],l=this.table,c=\\\"\\\",o=0,d=0;this.lexer.setInput(h),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>\\\"u\\\"&&(this.lexer.yylloc={});var m=this.lexer.yylloc;g.push(m);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==\\\"function\\\"&&(this.parseError=this.yy.parseError);function _(){var L;return L=u.lexer.lex()||1,typeof L!=\\\"number\\\"&&(L=u.symbols_[L]||L),L}for(var S,y,b,k,x={},C,O,P,w;;){if(y=p[p.length-1],this.defaultActions[y]?b=this.defaultActions[y]:((S===null||typeof S>\\\"u\\\")&&(S=_()),b=l[y]&&l[y][S]),typeof b>\\\"u\\\"||!b.length||!b[0]){var E=\\\"\\\";{w=[];for(C in l[y])this.terminals_[C]&&C>2&&w.push(\\\"'\\\"+this.terminals_[C]+\\\"'\\\");this.lexer.showPosition?E=\\\"Parse error on line \\\"+(o+1)+`:\\n`+this.lexer.showPosition()+`\\nExpecting `+w.join(\\\", \\\")+\\\", got '\\\"+(this.terminals_[S]||S)+\\\"'\\\":E=\\\"Parse error on line \\\"+(o+1)+\\\": Unexpected \\\"+(S==1?\\\"end of input\\\":\\\"'\\\"+(this.terminals_[S]||S)+\\\"'\\\"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[S]||S,line:this.lexer.yylineno,loc:m,expected:w})}}if(b[0]instanceof Array&&b.length>1)throw new Error(\\\"Parse Error: multiple actions possible at state: \\\"+y+\\\", token: \\\"+S);switch(b[0]){case 1:p.push(S),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),p.push(b[1]),S=null,d=this.lexer.yyleng,c=this.lexer.yytext,o=this.lexer.yylineno,m=this.lexer.yylloc;break;case 2:if(O=this.productions_[b[1]][1],x.$=f[f.length-O],x._$={first_line:g[g.length-(O||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(O||1)].first_column,last_column:g[g.length-1].last_column},v&&(x._$.range=[g[g.length-(O||1)].range[0],g[g.length-1].range[1]]),k=this.performAction.call(x,c,d,o,this.yy,b[1],f,g),typeof k<\\\"u\\\")return k;O&&(p=p.slice(0,-1*O*2),f=f.slice(0,-1*O),g=g.slice(0,-1*O)),p.push(this.productions_[b[1]][0]),f.push(x.$),g.push(x._$),P=l[p[p.length-2]][p[p.length-1]],p.push(P);break;case 3:return!0}}return!0}},r=(function(){var a={EOF:1,parseError:function(u,p){if(this.yy.parser)this.yy.parser.parseError(u,p);else throw new Error(u)},setInput:function(u){return this._input=u,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=\\\"\\\",this.conditionStack=[\\\"INITIAL\\\"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var p=u.match(/(?:\\\\r\\\\n?|\\\\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var p=u.length,f=u.split(/(?:\\\\r\\\\n?|\\\\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p-1),this.offset-=p;var g=this.match.split(/(?:\\\\r\\\\n?|\\\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var l=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===g.length?this.yylloc.first_column:0)+g[g.length-f.length].length-f[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-p]),this},more:function(){return this._more=!0,this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?\\\"...\\\":\\\"\\\")+u.substr(-20).replace(/\\\\n/g,\\\"\\\")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?\\\"...\\\":\\\"\\\")).replace(/\\\\n/g,\\\"\\\")},showPosition:function(){var u=this.pastInput(),p=new Array(u.length+1).join(\\\"-\\\");return u+this.upcomingInput()+`\\n`+p+\\\"^\\\"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,p,f,g,l;this._more||(this.yytext=\\\"\\\",this.match=\\\"\\\");for(var c=this._currentRules(),o=0;o<c.length&&(f=this._input.match(this.rules[c[o]]),!(f&&(!p||f[0].length>p[0].length)&&(p=f,g=o,!this.options.flex)));o++);return p?(l=p[0].match(/(?:\\\\r\\\\n?|\\\\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\\\\r?\\\\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],u=this.performAction.call(this,this.yy,this,c[g],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u||void 0):this._input===\\\"\\\"?this.EOF:this.parseError(\\\"Lexical error on line \\\"+(this.yylineno+1)+`. Unrecognized text.\\n`+this.showPosition(),{text:\\\"\\\",token:null,line:this.yylineno})},lex:function(){var u=this.next();return typeof u<\\\"u\\\"?u:this.lex()},begin:function(u){this.conditionStack.push(u)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(u){this.begin(u)}};return a.options={},a.performAction=function(u,p,f,g){function l(c,o){return p.yytext=p.yytext.substring(c,p.yyleng-o+c)}switch(f){case 0:if(p.yytext.slice(-2)===\\\"\\\\\\\\\\\\\\\\\\\"?(l(0,1),this.begin(\\\"mu\\\")):p.yytext.slice(-1)===\\\"\\\\\\\\\\\"?(l(0,1),this.begin(\\\"emu\\\")):this.begin(\\\"mu\\\"),p.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(\\\"raw\\\"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===\\\"raw\\\"?15:(l(5,9),\\\"END_RAW_BLOCK\\\");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(\\\"raw\\\"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(p.yytext),this.popState(),this.begin(\\\"com\\\");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return p.yytext=l(1,2).replace(/\\\\\\\\\\\"/g,'\\\"'),80;case 32:return p.yytext=l(1,2).replace(/\\\\\\\\'/g,\\\"'\\\"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return p.yytext=p.yytext.replace(/\\\\\\\\([\\\\\\\\\\\\]])/g,\\\"$1\\\"),72;case 43:return\\\"INVALID\\\";case 44:return 5}},a.rules=[/^(?:[^\\\\x00]*?(?=(\\\\{\\\\{)))/,/^(?:[^\\\\x00]+)/,/^(?:[^\\\\x00]{2,}?(?=(\\\\{\\\\{|\\\\\\\\\\\\{\\\\{|\\\\\\\\\\\\\\\\\\\\{\\\\{|$)))/,/^(?:\\\\{\\\\{\\\\{\\\\{(?=[^/]))/,/^(?:\\\\{\\\\{\\\\{\\\\{\\\\/[^\\\\s!\\\"#%-,\\\\.\\\\/;->@\\\\[-\\\\^`\\\\{-~]+(?=[=}\\\\s\\\\/.])\\\\}\\\\}\\\\}\\\\})/,/^(?:[^\\\\x00]+?(?=(\\\\{\\\\{\\\\{\\\\{)))/,/^(?:[\\\\s\\\\S]*?--(~)?\\\\}\\\\})/,/^(?:\\\\()/,/^(?:\\\\))/,/^(?:\\\\{\\\\{\\\\{\\\\{)/,/^(?:\\\\}\\\\}\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?>)/,/^(?:\\\\{\\\\{(~)?#>)/,/^(?:\\\\{\\\\{(~)?#\\\\*?)/,/^(?:\\\\{\\\\{(~)?\\\\/)/,/^(?:\\\\{\\\\{(~)?\\\\^\\\\s*(~)?\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?\\\\s*else\\\\s*(~)?\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?\\\\^)/,/^(?:\\\\{\\\\{(~)?\\\\s*else\\\\b)/,/^(?:\\\\{\\\\{(~)?\\\\{)/,/^(?:\\\\{\\\\{(~)?&)/,/^(?:\\\\{\\\\{(~)?!--)/,/^(?:\\\\{\\\\{(~)?![\\\\s\\\\S]*?\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?\\\\*?)/,/^(?:=)/,/^(?:\\\\.\\\\.)/,/^(?:\\\\.(?=([=~}\\\\s\\\\/.)|])))/,/^(?:[\\\\/.])/,/^(?:\\\\s+)/,/^(?:\\\\}(~)?\\\\}\\\\})/,/^(?:(~)?\\\\}\\\\})/,/^(?:\\\"(\\\\\\\\[\\\"]|[^\\\"])*\\\")/,/^(?:'(\\\\\\\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\\\\s)])))/,/^(?:false(?=([~}\\\\s)])))/,/^(?:undefined(?=([~}\\\\s)])))/,/^(?:null(?=([~}\\\\s)])))/,/^(?:-?[0-9]+(?:\\\\.[0-9]+)?(?=([~}\\\\s)])))/,/^(?:as\\\\s+\\\\|)/,/^(?:\\\\|)/,/^(?:([^\\\\s!\\\"#%-,\\\\.\\\\/;->@\\\\[-\\\\^`\\\\{-~]+(?=([=~}\\\\s\\\\/.)|]))))/,/^(?:\\\\[(\\\\\\\\\\\\]|[^\\\\]])*\\\\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a})();n.lexer=r;function i(){this.yy={}}return i.prototype=n,n.Parser=i,new i})();e.default=t,s.exports=e.default})($s,$s.exports)),$s.exports}var Us={exports:{}},Ws={exports:{}},vi;function yi(){return vi||(vi=1,(function(s,e){e.__esModule=!0;function t(p){return p&&p.__esModule?p:{default:p}}var n=rt(),r=t(n);function i(){this.parents=[]}i.prototype={constructor:i,mutating:!1,acceptKey:function(f,g){var l=this.accept(f[g]);if(this.mutating){if(l&&!i.prototype[l.type])throw new r.default('Unexpected node type \\\"'+l.type+'\\\" found when accepting '+g+\\\" on \\\"+f.type);f[g]=l}},acceptRequired:function(f,g){if(this.acceptKey(f,g),!f[g])throw new r.default(f.type+\\\" requires \\\"+g)},acceptArray:function(f){for(var g=0,l=f.length;g<l;g++)this.acceptKey(f,g),f[g]||(f.splice(g,1),g--,l--)},accept:function(f){if(f){if(!this[f.type])throw new r.default(\\\"Unknown type: \\\"+f.type,f);this.current&&this.parents.unshift(this.current),this.current=f;var g=this[f.type](f);if(this.current=this.parents.shift(),!this.mutating||g)return g;if(g!==!1)return f}},Program:function(f){this.acceptArray(f.body)},MustacheStatement:a,Decorator:a,BlockStatement:h,DecoratorBlock:h,PartialStatement:u,PartialBlockStatement:function(f){u.call(this,f),this.acceptKey(f,\\\"program\\\")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(f){this.acceptArray(f.pairs)},HashPair:function(f){this.acceptRequired(f,\\\"value\\\")}};function a(p){this.acceptRequired(p,\\\"path\\\"),this.acceptArray(p.params),this.acceptKey(p,\\\"hash\\\")}function h(p){a.call(this,p),this.acceptKey(p,\\\"program\\\"),this.acceptKey(p,\\\"inverse\\\")}function u(p){this.acceptRequired(p,\\\"name\\\"),this.acceptArray(p.params),this.acceptKey(p,\\\"hash\\\")}e.default=i,s.exports=e.default})(Ws,Ws.exports)),Ws.exports}var _i;function Va(){return _i||(_i=1,(function(s,e){e.__esModule=!0;function t(f){return f&&f.__esModule?f:{default:f}}var n=yi(),r=t(n);function i(){var f=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=f}i.prototype=new r.default,i.prototype.Program=function(f){var g=!this.options.ignoreStandalone,l=!this.isRootSeen;this.isRootSeen=!0;for(var c=f.body,o=0,d=c.length;o<d;o++){var m=c[o],v=this.accept(m);if(v){var _=a(c,o,l),S=h(c,o,l),y=v.openStandalone&&_,b=v.closeStandalone&&S,k=v.inlineStandalone&&_&&S;v.close&&u(c,o,!0),v.open&&p(c,o,!0),g&&k&&(u(c,o),p(c,o)&&m.type===\\\"PartialStatement\\\"&&(m.indent=/([ \\\\t]+$)/.exec(c[o-1].original)[1])),g&&y&&(u((m.program||m.inverse).body),p(c,o)),g&&b&&(u(c,o),p((m.inverse||m.program).body))}}return f},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(f){this.accept(f.program),this.accept(f.inverse);var g=f.program||f.inverse,l=f.program&&f.inverse,c=l,o=l;if(l&&l.chained)for(c=l.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var d={open:f.openStrip.open,close:f.closeStrip.close,openStandalone:h(g.body),closeStandalone:a((c||g).body)};if(f.openStrip.close&&u(g.body,null,!0),l){var m=f.inverseStrip;m.open&&p(g.body,null,!0),m.close&&u(c.body,null,!0),f.closeStrip.open&&p(o.body,null,!0),!this.options.ignoreStandalone&&a(g.body)&&h(c.body)&&(p(g.body),u(c.body))}else f.closeStrip.open&&p(g.body,null,!0);return d},i.prototype.Decorator=i.prototype.MustacheStatement=function(f){return f.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(f){var g=f.strip||{};return{inlineStandalone:!0,open:g.open,close:g.close}};function a(f,g,l){g===void 0&&(g=f.length);var c=f[g-1],o=f[g-2];if(!c)return l;if(c.type===\\\"ContentStatement\\\")return(o||!l?/\\\\r?\\\\n\\\\s*?$/:/(^|\\\\r?\\\\n)\\\\s*?$/).test(c.original)}function h(f,g,l){g===void 0&&(g=-1);var c=f[g+1],o=f[g+2];if(!c)return l;if(c.type===\\\"ContentStatement\\\")return(o||!l?/^\\\\s*?\\\\r?\\\\n/:/^\\\\s*?(\\\\r?\\\\n|$)/).test(c.original)}function u(f,g,l){var c=f[g==null?0:g+1];if(!(!c||c.type!==\\\"ContentStatement\\\"||!l&&c.rightStripped)){var o=c.value;c.value=c.value.replace(l?/^\\\\s+/:/^[ \\\\t]*\\\\r?\\\\n?/,\\\"\\\"),c.rightStripped=c.value!==o}}function p(f,g,l){var c=f[g==null?f.length-1:g-1];if(!(!c||c.type!==\\\"ContentStatement\\\"||!l&&c.leftStripped)){var o=c.value;return c.value=c.value.replace(l?/\\\\s+$/:/[ \\\\t]+$/,\\\"\\\"),c.leftStripped=c.value!==o,c.leftStripped}}e.default=i,s.exports=e.default})(Us,Us.exports)),Us.exports}var We={},bi;function za(){if(bi)return We;bi=1,We.__esModule=!0,We.SourceLocation=r,We.id=i,We.stripFlags=a,We.stripComment=h,We.preparePath=u,We.prepareMustache=p,We.prepareRawBlock=f,We.prepareBlock=g,We.prepareProgram=l,We.preparePartialBlock=c;function s(o){return o&&o.__esModule?o:{default:o}}var e=rt(),t=s(e);function n(o,d){if(d=d.path?d.path.original:d,o.path.original!==d){var m={loc:o.path.loc};throw new t.default(o.path.original+\\\" doesn't match \\\"+d,m)}}function r(o,d){this.source=o,this.start={line:d.first_line,column:d.first_column},this.end={line:d.last_line,column:d.last_column}}function i(o){return/^\\\\[.*\\\\]$/.test(o)?o.substring(1,o.length-1):o}function a(o,d){return{open:o.charAt(2)===\\\"~\\\",close:d.charAt(d.length-3)===\\\"~\\\"}}function h(o){return o.replace(/^\\\\{\\\\{~?!-?-?/,\\\"\\\").replace(/-?-?~?\\\\}\\\\}$/,\\\"\\\")}function u(o,d,m){m=this.locInfo(m);for(var v=o?\\\"@\\\":\\\"\\\",_=[],S=0,y=0,b=d.length;y<b;y++){var k=d[y].part,x=d[y].original!==k;if(v+=(d[y].separator||\\\"\\\")+k,!x&&(k===\\\"..\\\"||k===\\\".\\\"||k===\\\"this\\\")){if(_.length>0)throw new t.default(\\\"Invalid path: \\\"+v,{loc:m});k===\\\"..\\\"&&S++}else _.push(k)}return{type:\\\"PathExpression\\\",data:o,depth:S,parts:_,original:v,loc:m}}function p(o,d,m,v,_,S){var y=v.charAt(3)||v.charAt(2),b=y!==\\\"{\\\"&&y!==\\\"&\\\",k=/\\\\*/.test(v);return{type:k?\\\"Decorator\\\":\\\"MustacheStatement\\\",path:o,params:d,hash:m,escaped:b,strip:_,loc:this.locInfo(S)}}function f(o,d,m,v){n(o,m),v=this.locInfo(v);var _={type:\\\"Program\\\",body:d,strip:{},loc:v};return{type:\\\"BlockStatement\\\",path:o.path,params:o.params,hash:o.hash,program:_,openStrip:{},inverseStrip:{},closeStrip:{},loc:v}}function g(o,d,m,v,_,S){v&&v.path&&n(o,v);var y=/\\\\*/.test(o.open);d.blockParams=o.blockParams;var b=void 0,k=void 0;if(m){if(y)throw new t.default(\\\"Unexpected inverse block on decorator\\\",m);m.chain&&(m.program.body[0].closeStrip=v.strip),k=m.strip,b=m.program}return _&&(_=b,b=d,d=_),{type:y?\\\"DecoratorBlock\\\":\\\"BlockStatement\\\",path:o.path,params:o.params,hash:o.hash,program:d,inverse:b,openStrip:o.strip,inverseStrip:k,closeStrip:v&&v.strip,loc:this.locInfo(S)}}function l(o,d){if(!d&&o.length){var m=o[0].loc,v=o[o.length-1].loc;m&&v&&(d={source:m.source,start:{line:m.start.line,column:m.start.column},end:{line:v.end.line,column:v.end.column}})}return{type:\\\"Program\\\",body:o,strip:{},loc:d}}function c(o,d,m,v){return n(o,m),{type:\\\"PartialBlockStatement\\\",name:o.path,params:o.params,hash:o.hash,program:d,openStrip:o.strip,closeStrip:m&&m.strip,loc:this.locInfo(v)}}return We}var Si;function $a(){if(Si)return Dt;Si=1,Dt.__esModule=!0,Dt.parseWithoutProcessing=f,Dt.parse=g;function s(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(c[o]=l[o]);return c.default=l,c}function e(l){return l&&l.__esModule?l:{default:l}}var t=Fa(),n=e(t),r=Va(),i=e(r),a=za(),h=s(a),u=Fe();Dt.parser=n.default;var p={};u.extend(p,h);function f(l,c){if(l.type===\\\"Program\\\")return l;n.default.yy=p,p.locInfo=function(d){return new p.SourceLocation(c&&c.srcName,d)};var o=n.default.parse(l);return o}function g(l,c){var o=f(l,c),d=new i.default(c);return d.accept(o)}return Dt}var qt={},ki;function Ua(){if(ki)return qt;ki=1,qt.__esModule=!0,qt.Compiler=h,qt.precompile=u,qt.compile=p;function s(l){return l&&l.__esModule?l:{default:l}}var e=rt(),t=s(e),n=Fe(),r=gi(),i=s(r),a=[].slice;function h(){}h.prototype={compiler:h,equals:function(c){var o=this.opcodes.length;if(c.opcodes.length!==o)return!1;for(var d=0;d<o;d++){var m=this.opcodes[d],v=c.opcodes[d];if(m.opcode!==v.opcode||!f(m.args,v.args))return!1}o=this.children.length;for(var d=0;d<o;d++)if(!this.children[d].equals(c.children[d]))return!1;return!0},guid:0,compile:function(c,o){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=o,this.stringParams=o.stringParams,this.trackIds=o.trackIds,o.blockParams=o.blockParams||[],o.knownHelpers=n.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},o.knownHelpers),this.accept(c)},compileProgram:function(c){var o=new this.compiler,d=o.compile(c,this.options),m=this.guid++;return this.usePartial=this.usePartial||d.usePartial,this.children[m]=d,this.useDepths=this.useDepths||d.useDepths,m},accept:function(c){if(!this[c.type])throw new t.default(\\\"Unknown type: \\\"+c.type,c);this.sourceNode.unshift(c);var o=this[c.type](c);return this.sourceNode.shift(),o},Program:function(c){this.options.blockParams.unshift(c.blockParams);for(var o=c.body,d=o.length,m=0;m<d;m++)this.accept(o[m]);return this.options.blockParams.shift(),this.isSimple=d===1,this.blockParams=c.blockParams?c.blockParams.length:0,this},BlockStatement:function(c){g(c);var o=c.program,d=c.inverse;o=o&&this.compileProgram(o),d=d&&this.compileProgram(d);var m=this.classifySexpr(c);m===\\\"helper\\\"?this.helperSexpr(c,o,d):m===\\\"simple\\\"?(this.simpleSexpr(c),this.opcode(\\\"pushProgram\\\",o),this.opcode(\\\"pushProgram\\\",d),this.opcode(\\\"emptyHash\\\"),this.opcode(\\\"blockValue\\\",c.path.original)):(this.ambiguousSexpr(c,o,d),this.opcode(\\\"pushProgram\\\",o),this.opcode(\\\"pushProgram\\\",d),this.opcode(\\\"emptyHash\\\"),this.opcode(\\\"ambiguousBlockValue\\\")),this.opcode(\\\"append\\\")},DecoratorBlock:function(c){var o=c.program&&this.compileProgram(c.program),d=this.setupFullMustacheParams(c,o,void 0),m=c.path;this.useDecorators=!0,this.opcode(\\\"registerDecorator\\\",d.length,m.original)},PartialStatement:function(c){this.usePartial=!0;var o=c.program;o&&(o=this.compileProgram(c.program));var d=c.params;if(d.length>1)throw new t.default(\\\"Unsupported number of partial arguments: \\\"+d.length,c);d.length||(this.options.explicitPartialContext?this.opcode(\\\"pushLiteral\\\",\\\"undefined\\\"):d.push({type:\\\"PathExpression\\\",parts:[],depth:0}));var m=c.name.original,v=c.name.type===\\\"SubExpression\\\";v&&this.accept(c.name),this.setupFullMustacheParams(c,o,void 0,!0);var _=c.indent||\\\"\\\";this.options.preventIndent&&_&&(this.opcode(\\\"appendContent\\\",_),_=\\\"\\\"),this.opcode(\\\"invokePartial\\\",v,m,_),this.opcode(\\\"append\\\")},PartialBlockStatement:function(c){this.PartialStatement(c)},MustacheStatement:function(c){this.SubExpression(c),c.escaped&&!this.options.noEscape?this.opcode(\\\"appendEscaped\\\"):this.opcode(\\\"append\\\")},Decorator:function(c){this.DecoratorBlock(c)},ContentStatement:function(c){c.value&&this.opcode(\\\"appendContent\\\",c.value)},CommentStatement:function(){},SubExpression:function(c){g(c);var o=this.classifySexpr(c);o===\\\"simple\\\"?this.simpleSexpr(c):o===\\\"helper\\\"?this.helperSexpr(c):this.ambiguousSexpr(c)},ambiguousSexpr:function(c,o,d){var m=c.path,v=m.parts[0],_=o!=null||d!=null;this.opcode(\\\"getContext\\\",m.depth),this.opcode(\\\"pushProgram\\\",o),this.opcode(\\\"pushProgram\\\",d),m.strict=!0,this.accept(m),this.opcode(\\\"invokeAmbiguous\\\",v,_)},simpleSexpr:function(c){var o=c.path;o.strict=!0,this.accept(o),this.opcode(\\\"resolvePossibleLambda\\\")},helperSexpr:function(c,o,d){var m=this.setupFullMustacheParams(c,o,d),v=c.path,_=v.parts[0];if(this.options.knownHelpers[_])this.opcode(\\\"invokeKnownHelper\\\",m.length,_);else{if(this.options.knownHelpersOnly)throw new t.default(\\\"You specified knownHelpersOnly, but used the unknown helper \\\"+_,c);v.strict=!0,v.falsy=!0,this.accept(v),this.opcode(\\\"invokeHelper\\\",m.length,v.original,i.default.helpers.simpleId(v))}},PathExpression:function(c){this.addDepth(c.depth),this.opcode(\\\"getContext\\\",c.depth);var o=c.parts[0],d=i.default.helpers.scopedId(c),m=!c.depth&&!d&&this.blockParamIndex(o);m?this.opcode(\\\"lookupBlockParam\\\",m,c.parts):o?c.data?(this.options.data=!0,this.opcode(\\\"lookupData\\\",c.depth,c.parts,c.strict)):this.opcode(\\\"lookupOnContext\\\",c.parts,c.falsy,c.strict,d):this.opcode(\\\"pushContext\\\")},StringLiteral:function(c){this.opcode(\\\"pushString\\\",c.value)},NumberLiteral:function(c){this.opcode(\\\"pushLiteral\\\",c.value)},BooleanLiteral:function(c){this.opcode(\\\"pushLiteral\\\",c.value)},UndefinedLiteral:function(){this.opcode(\\\"pushLiteral\\\",\\\"undefined\\\")},NullLiteral:function(){this.opcode(\\\"pushLiteral\\\",\\\"null\\\")},Hash:function(c){var o=c.pairs,d=0,m=o.length;for(this.opcode(\\\"pushHash\\\");d<m;d++)this.pushParam(o[d].value);for(;d--;)this.opcode(\\\"assignToHash\\\",o[d].key);this.opcode(\\\"popHash\\\")},opcode:function(c){this.opcodes.push({opcode:c,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(c){c&&(this.useDepths=!0)},classifySexpr:function(c){var o=i.default.helpers.simpleId(c.path),d=o&&!!this.blockParamIndex(c.path.parts[0]),m=!d&&i.default.helpers.helperExpression(c),v=!d&&(m||o);if(v&&!m){var _=c.path.parts[0],S=this.options;S.knownHelpers[_]?m=!0:S.knownHelpersOnly&&(v=!1)}return m?\\\"helper\\\":v?\\\"ambiguous\\\":\\\"simple\\\"},pushParams:function(c){for(var o=0,d=c.length;o<d;o++)this.pushParam(c[o])},pushParam:function(c){var o=c.value!=null?c.value:c.original||\\\"\\\";if(this.stringParams)o.replace&&(o=o.replace(/^(\\\\.?\\\\.\\\\/)*/g,\\\"\\\").replace(/\\\\//g,\\\".\\\")),c.depth&&this.addDepth(c.depth),this.opcode(\\\"getContext\\\",c.depth||0),this.opcode(\\\"pushStringParam\\\",o,c.type),c.type===\\\"SubExpression\\\"&&this.accept(c);else{if(this.trackIds){var d=void 0;if(c.parts&&!i.default.helpers.scopedId(c)&&!c.depth&&(d=this.blockParamIndex(c.parts[0])),d){var m=c.parts.slice(1).join(\\\".\\\");this.opcode(\\\"pushId\\\",\\\"BlockParam\\\",d,m)}else o=c.original||o,o.replace&&(o=o.replace(/^this(?:\\\\.|$)/,\\\"\\\").replace(/^\\\\.\\\\//,\\\"\\\").replace(/^\\\\.$/,\\\"\\\")),this.opcode(\\\"pushId\\\",c.type,o)}this.accept(c)}},setupFullMustacheParams:function(c,o,d,m){var v=c.params;return this.pushParams(v),this.opcode(\\\"pushProgram\\\",o),this.opcode(\\\"pushProgram\\\",d),c.hash?this.accept(c.hash):this.opcode(\\\"emptyHash\\\",m),v},blockParamIndex:function(c){for(var o=0,d=this.options.blockParams.length;o<d;o++){var m=this.options.blockParams[o],v=m&&n.indexOf(m,c);if(m&&v>=0)return[o,v]}}};function u(l,c,o){if(l==null||typeof l!=\\\"string\\\"&&l.type!==\\\"Program\\\")throw new t.default(\\\"You must pass a string or Handlebars AST to Handlebars.precompile. You passed \\\"+l);c=c||{},\\\"data\\\"in c||(c.data=!0),c.compat&&(c.useDepths=!0);var d=o.parse(l,c),m=new o.Compiler().compile(d,c);return new o.JavaScriptCompiler().compile(m,c)}function p(l,c,o){if(c===void 0&&(c={}),l==null||typeof l!=\\\"string\\\"&&l.type!==\\\"Program\\\")throw new t.default(\\\"You must pass a string or Handlebars AST to Handlebars.compile. You passed \\\"+l);c=n.extend({},c),\\\"data\\\"in c||(c.data=!0),c.compat&&(c.useDepths=!0);var d=void 0;function m(){var _=o.parse(l,c),S=new o.Compiler().compile(_,c),y=new o.JavaScriptCompiler().compile(S,c,void 0,!0);return o.template(y)}function v(_,S){return d||(d=m()),d.call(this,_,S)}return v._setup=function(_){return d||(d=m()),d._setup(_)},v._child=function(_,S,y,b){return d||(d=m()),d._child(_,S,y,b)},v}function f(l,c){if(l===c)return!0;if(n.isArray(l)&&n.isArray(c)&&l.length===c.length){for(var o=0;o<l.length;o++)if(!f(l[o],c[o]))return!1;return!0}}function g(l){if(!l.path.parts){var c=l.path;l.path={type:\\\"PathExpression\\\",data:!1,depth:0,parts:[c.original+\\\"\\\"],original:c.original+\\\"\\\",loc:c.loc}}}return qt}var Gs={exports:{}},Xs={exports:{}},es={},Rr={},Ys={},Js={},xi;function Wa(){if(xi)return Js;xi=1;var s=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\".split(\\\"\\\");return Js.encode=function(e){if(0<=e&&e<s.length)return s[e];throw new TypeError(\\\"Must be between 0 and 63: \\\"+e)},Js.decode=function(e){var t=65,n=90,r=97,i=122,a=48,h=57,u=43,p=47,f=26,g=52;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+f:a<=e&&e<=h?e-a+g:e==u?62:e==p?63:-1},Js}var wi;function Ti(){if(wi)return Ys;wi=1;var s=Wa(),e=5,t=1<<e,n=t-1,r=t;function i(h){return h<0?(-h<<1)+1:(h<<1)+0}function a(h){var u=(h&1)===1,p=h>>1;return u?-p:p}return Ys.encode=function(u){var p=\\\"\\\",f,g=i(u);do f=g&n,g>>>=e,g>0&&(f|=r),p+=s.encode(f);while(g>0);return p},Ys.decode=function(u,p,f){var g=u.length,l=0,c=0,o,d;do{if(p>=g)throw new Error(\\\"Expected more digits in base 64 VLQ value.\\\");if(d=s.decode(u.charCodeAt(p++)),d===-1)throw new Error(\\\"Invalid base64 digit: \\\"+u.charAt(p-1));o=!!(d&r),d&=n,l=l+(d<<c),c+=e}while(o);f.value=a(l),f.rest=p},Ys}var Or={},Ci;function ts(){return Ci||(Ci=1,(function(s){function e(y,b,k){if(b in y)return y[b];if(arguments.length===3)return k;throw new Error('\\\"'+b+'\\\" is a required argument.')}s.getArg=e;var t=/^(?:([\\\\w+\\\\-.]+):)?\\\\/\\\\/(?:(\\\\w+:\\\\w+)@)?([\\\\w.-]*)(?::(\\\\d+))?(.*)$/,n=/^data:.+\\\\,.+$/;function r(y){var b=y.match(t);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}s.urlParse=r;function i(y){var b=\\\"\\\";return y.scheme&&(b+=y.scheme+\\\":\\\"),b+=\\\"//\\\",y.auth&&(b+=y.auth+\\\"@\\\"),y.host&&(b+=y.host),y.port&&(b+=\\\":\\\"+y.port),y.path&&(b+=y.path),b}s.urlGenerate=i;function a(y){var b=y,k=r(y);if(k){if(!k.path)return y;b=k.path}for(var x=s.isAbsolute(b),C=b.split(/\\\\/+/),O,P=0,w=C.length-1;w>=0;w--)O=C[w],O===\\\".\\\"?C.splice(w,1):O===\\\"..\\\"?P++:P>0&&(O===\\\"\\\"?(C.splice(w+1,P),P=0):(C.splice(w,2),P--));return b=C.join(\\\"/\\\"),b===\\\"\\\"&&(b=x?\\\"/\\\":\\\".\\\"),k?(k.path=b,i(k)):b}s.normalize=a;function h(y,b){y===\\\"\\\"&&(y=\\\".\\\"),b===\\\"\\\"&&(b=\\\".\\\");var k=r(b),x=r(y);if(x&&(y=x.path||\\\"/\\\"),k&&!k.scheme)return x&&(k.scheme=x.scheme),i(k);if(k||b.match(n))return b;if(x&&!x.host&&!x.path)return x.host=b,i(x);var C=b.charAt(0)===\\\"/\\\"?b:a(y.replace(/\\\\/+$/,\\\"\\\")+\\\"/\\\"+b);return x?(x.path=C,i(x)):C}s.join=h,s.isAbsolute=function(y){return y.charAt(0)===\\\"/\\\"||t.test(y)};function u(y,b){y===\\\"\\\"&&(y=\\\".\\\"),y=y.replace(/\\\\/$/,\\\"\\\");for(var k=0;b.indexOf(y+\\\"/\\\")!==0;){var x=y.lastIndexOf(\\\"/\\\");if(x<0||(y=y.slice(0,x),y.match(/^([^\\\\/]+:\\\\/)?\\\\/*$/)))return b;++k}return Array(k+1).join(\\\"../\\\")+b.substr(y.length+1)}s.relative=u;var p=(function(){var y=Object.create(null);return!(\\\"__proto__\\\"in y)})();function f(y){return y}function g(y){return c(y)?\\\"$\\\"+y:y}s.toSetString=p?f:g;function l(y){return c(y)?y.slice(1):y}s.fromSetString=p?f:l;function c(y){if(!y)return!1;var b=y.length;if(b<9||y.charCodeAt(b-1)!==95||y.charCodeAt(b-2)!==95||y.charCodeAt(b-3)!==111||y.charCodeAt(b-4)!==116||y.charCodeAt(b-5)!==111||y.charCodeAt(b-6)!==114||y.charCodeAt(b-7)!==112||y.charCodeAt(b-8)!==95||y.charCodeAt(b-9)!==95)return!1;for(var k=b-10;k>=0;k--)if(y.charCodeAt(k)!==36)return!1;return!0}function o(y,b,k){var x=m(y.source,b.source);return x!==0||(x=y.originalLine-b.originalLine,x!==0)||(x=y.originalColumn-b.originalColumn,x!==0||k)||(x=y.generatedColumn-b.generatedColumn,x!==0)||(x=y.generatedLine-b.generatedLine,x!==0)?x:m(y.name,b.name)}s.compareByOriginalPositions=o;function d(y,b,k){var x=y.generatedLine-b.generatedLine;return x!==0||(x=y.generatedColumn-b.generatedColumn,x!==0||k)||(x=m(y.source,b.source),x!==0)||(x=y.originalLine-b.originalLine,x!==0)||(x=y.originalColumn-b.originalColumn,x!==0)?x:m(y.name,b.name)}s.compareByGeneratedPositionsDeflated=d;function m(y,b){return y===b?0:y===null?1:b===null?-1:y>b?1:-1}function v(y,b){var k=y.generatedLine-b.generatedLine;return k!==0||(k=y.generatedColumn-b.generatedColumn,k!==0)||(k=m(y.source,b.source),k!==0)||(k=y.originalLine-b.originalLine,k!==0)||(k=y.originalColumn-b.originalColumn,k!==0)?k:m(y.name,b.name)}s.compareByGeneratedPositionsInflated=v;function _(y){return JSON.parse(y.replace(/^\\\\)]}'[^\\\\n]*\\\\n/,\\\"\\\"))}s.parseSourceMapInput=_;function S(y,b,k){if(b=b||\\\"\\\",y&&(y[y.length-1]!==\\\"/\\\"&&b[0]!==\\\"/\\\"&&(y+=\\\"/\\\"),b=y+b),k){var x=r(k);if(!x)throw new Error(\\\"sourceMapURL could not be parsed\\\");if(x.path){var C=x.path.lastIndexOf(\\\"/\\\");C>=0&&(x.path=x.path.substring(0,C+1))}b=h(i(x),b)}return a(b)}s.computeSourceURL=S})(Or)),Or}var Mr={},Pi;function Ei(){if(Pi)return Mr;Pi=1;var s=ts(),e=Object.prototype.hasOwnProperty,t=typeof Map<\\\"u\\\";function n(){this._array=[],this._set=t?new Map:Object.create(null)}return n.fromArray=function(i,a){for(var h=new n,u=0,p=i.length;u<p;u++)h.add(i[u],a);return h},n.prototype.size=function(){return t?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(i,a){var h=t?i:s.toSetString(i),u=t?this.has(i):e.call(this._set,h),p=this._array.length;(!u||a)&&this._array.push(i),u||(t?this._set.set(i,p):this._set[h]=p)},n.prototype.has=function(i){if(t)return this._set.has(i);var a=s.toSetString(i);return e.call(this._set,a)},n.prototype.indexOf=function(i){if(t){var a=this._set.get(i);if(a>=0)return a}else{var h=s.toSetString(i);if(e.call(this._set,h))return this._set[h]}throw new Error('\\\"'+i+'\\\" is not in the set.')},n.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error(\\\"No element indexed by \\\"+i)},n.prototype.toArray=function(){return this._array.slice()},Mr.ArraySet=n,Mr}var Ir={},Li;function Ga(){if(Li)return Ir;Li=1;var s=ts();function e(n,r){var i=n.generatedLine,a=r.generatedLine,h=n.generatedColumn,u=r.generatedColumn;return a>i||a==i&&u>=h||s.compareByGeneratedPositionsInflated(n,r)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(r,i){this._array.forEach(r,i)},t.prototype.add=function(r){e(this._last,r)?(this._last=r,this._array.push(r)):(this._sorted=!1,this._array.push(r))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Ir.MappingList=t,Ir}var Ai;function Ri(){if(Ai)return Rr;Ai=1;var s=Ti(),e=ts(),t=Ei().ArraySet,n=Ga().MappingList;function r(i){i||(i={}),this._file=e.getArg(i,\\\"file\\\",null),this._sourceRoot=e.getArg(i,\\\"sourceRoot\\\",null),this._skipValidation=e.getArg(i,\\\"skipValidation\\\",!1),this._sources=new t,this._names=new t,this._mappings=new n,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(a){var h=a.sourceRoot,u=new r({file:a.file,sourceRoot:h});return a.eachMapping(function(p){var f={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(f.source=p.source,h!=null&&(f.source=e.relative(h,f.source)),f.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(f.name=p.name)),u.addMapping(f)}),a.sources.forEach(function(p){var f=p;h!==null&&(f=e.relative(h,p)),u._sources.has(f)||u._sources.add(f);var g=a.sourceContentFor(p);g!=null&&u.setSourceContent(p,g)}),u},r.prototype.addMapping=function(a){var h=e.getArg(a,\\\"generated\\\"),u=e.getArg(a,\\\"original\\\",null),p=e.getArg(a,\\\"source\\\",null),f=e.getArg(a,\\\"name\\\",null);this._skipValidation||this._validateMapping(h,u,p,f),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),f!=null&&(f=String(f),this._names.has(f)||this._names.add(f)),this._mappings.add({generatedLine:h.line,generatedColumn:h.column,originalLine:u!=null&&u.line,originalColumn:u!=null&&u.column,source:p,name:f})},r.prototype.setSourceContent=function(a,h){var u=a;this._sourceRoot!=null&&(u=e.relative(this._sourceRoot,u)),h!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(u)]=h):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(u)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(a,h,u){var p=h;if(h==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's \\\"file\\\" property. Both were omitted.`);p=a.file}var f=this._sourceRoot;f!=null&&(p=e.relative(f,p));var g=new t,l=new t;this._mappings.unsortedForEach(function(c){if(c.source===p&&c.originalLine!=null){var o=a.originalPositionFor({line:c.originalLine,column:c.originalColumn});o.source!=null&&(c.source=o.source,u!=null&&(c.source=e.join(u,c.source)),f!=null&&(c.source=e.relative(f,c.source)),c.originalLine=o.line,c.originalColumn=o.column,o.name!=null&&(c.name=o.name))}var d=c.source;d!=null&&!g.has(d)&&g.add(d);var m=c.name;m!=null&&!l.has(m)&&l.add(m)},this),this._sources=g,this._names=l,a.sources.forEach(function(c){var o=a.sourceContentFor(c);o!=null&&(u!=null&&(c=e.join(u,c)),f!=null&&(c=e.relative(f,c)),this.setSourceContent(c,o))},this)},r.prototype._validateMapping=function(a,h,u,p){if(h&&typeof h.line!=\\\"number\\\"&&typeof h.column!=\\\"number\\\")throw new Error(\\\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\\\");if(!(a&&\\\"line\\\"in a&&\\\"column\\\"in a&&a.line>0&&a.column>=0&&!h&&!u&&!p)){if(a&&\\\"line\\\"in a&&\\\"column\\\"in a&&h&&\\\"line\\\"in h&&\\\"column\\\"in h&&a.line>0&&a.column>=0&&h.line>0&&h.column>=0&&u)return;throw new Error(\\\"Invalid mapping: \\\"+JSON.stringify({generated:a,source:u,original:h,name:p}))}},r.prototype._serializeMappings=function(){for(var a=0,h=1,u=0,p=0,f=0,g=0,l=\\\"\\\",c,o,d,m,v=this._mappings.toArray(),_=0,S=v.length;_<S;_++){if(o=v[_],c=\\\"\\\",o.generatedLine!==h)for(a=0;o.generatedLine!==h;)c+=\\\";\\\",h++;else if(_>0){if(!e.compareByGeneratedPositionsInflated(o,v[_-1]))continue;c+=\\\",\\\"}c+=s.encode(o.generatedColumn-a),a=o.generatedColumn,o.source!=null&&(m=this._sources.indexOf(o.source),c+=s.encode(m-g),g=m,c+=s.encode(o.originalLine-1-p),p=o.originalLine-1,c+=s.encode(o.originalColumn-u),u=o.originalColumn,o.name!=null&&(d=this._names.indexOf(o.name),c+=s.encode(d-f),f=d)),l+=c}return l},r.prototype._generateSourcesContent=function(a,h){return a.map(function(u){if(!this._sourcesContents)return null;h!=null&&(u=e.relative(h,u));var p=e.toSetString(u);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},r.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},Rr.SourceMapGenerator=r,Rr}var ss={},Nr={},Oi;function Xa(){return Oi||(Oi=1,(function(s){s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2;function e(t,n,r,i,a,h){var u=Math.floor((n-t)/2)+t,p=a(r,i[u],!0);return p===0?u:p>0?n-u>1?e(u,n,r,i,a,h):h==s.LEAST_UPPER_BOUND?n<i.length?n:-1:u:u-t>1?e(t,u,r,i,a,h):h==s.LEAST_UPPER_BOUND?u:t<0?-1:t}s.search=function(n,r,i,a){if(r.length===0)return-1;var h=e(-1,r.length,n,r,i,a||s.GREATEST_LOWER_BOUND);if(h<0)return-1;for(;h-1>=0&&i(r[h],r[h-1],!0)===0;)--h;return h}})(Nr)),Nr}var Br={},Mi;function Ya(){if(Mi)return Br;Mi=1;function s(n,r,i){var a=n[r];n[r]=n[i],n[i]=a}function e(n,r){return Math.round(n+Math.random()*(r-n))}function t(n,r,i,a){if(i<a){var h=e(i,a),u=i-1;s(n,h,a);for(var p=n[a],f=i;f<a;f++)r(n[f],p)<=0&&(u+=1,s(n,u,f));s(n,u+1,f);var g=u+1;t(n,r,i,g-1),t(n,r,g+1,a)}}return Br.quickSort=function(n,r){t(n,r,0,n.length-1)},Br}var Ii;function Ja(){if(Ii)return ss;Ii=1;var s=ts(),e=Xa(),t=Ei().ArraySet,n=Ti(),r=Ya().quickSort;function i(p,f){var g=p;return typeof p==\\\"string\\\"&&(g=s.parseSourceMapInput(p)),g.sections!=null?new u(g,f):new a(g,f)}i.fromSourceMap=function(p,f){return a.fromSourceMap(p,f)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,\\\"_generatedMappings\\\",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,\\\"_originalMappings\\\",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(f,g){var l=f.charAt(g);return l===\\\";\\\"||l===\\\",\\\"},i.prototype._parseMappings=function(f,g){throw new Error(\\\"Subclasses must implement _parseMappings\\\")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(f,g,l){var c=g||null,o=l||i.GENERATED_ORDER,d;switch(o){case i.GENERATED_ORDER:d=this._generatedMappings;break;case i.ORIGINAL_ORDER:d=this._originalMappings;break;default:throw new Error(\\\"Unknown order of iteration.\\\")}var m=this.sourceRoot;d.map(function(v){var _=v.source===null?null:this._sources.at(v.source);return _=s.computeSourceURL(m,_,this._sourceMapURL),{source:_,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:this._names.at(v.name)}},this).forEach(f,c)},i.prototype.allGeneratedPositionsFor=function(f){var g=s.getArg(f,\\\"line\\\"),l={source:s.getArg(f,\\\"source\\\"),originalLine:g,originalColumn:s.getArg(f,\\\"column\\\",0)};if(l.source=this._findSourceIndex(l.source),l.source<0)return[];var c=[],o=this._findMapping(l,this._originalMappings,\\\"originalLine\\\",\\\"originalColumn\\\",s.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(o>=0){var d=this._originalMappings[o];if(f.column===void 0)for(var m=d.originalLine;d&&d.originalLine===m;)c.push({line:s.getArg(d,\\\"generatedLine\\\",null),column:s.getArg(d,\\\"generatedColumn\\\",null),lastColumn:s.getArg(d,\\\"lastGeneratedColumn\\\",null)}),d=this._originalMappings[++o];else for(var v=d.originalColumn;d&&d.originalLine===g&&d.originalColumn==v;)c.push({line:s.getArg(d,\\\"generatedLine\\\",null),column:s.getArg(d,\\\"generatedColumn\\\",null),lastColumn:s.getArg(d,\\\"lastGeneratedColumn\\\",null)}),d=this._originalMappings[++o]}return c},ss.SourceMapConsumer=i;function a(p,f){var g=p;typeof p==\\\"string\\\"&&(g=s.parseSourceMapInput(p));var l=s.getArg(g,\\\"version\\\"),c=s.getArg(g,\\\"sources\\\"),o=s.getArg(g,\\\"names\\\",[]),d=s.getArg(g,\\\"sourceRoot\\\",null),m=s.getArg(g,\\\"sourcesContent\\\",null),v=s.getArg(g,\\\"mappings\\\"),_=s.getArg(g,\\\"file\\\",null);if(l!=this._version)throw new Error(\\\"Unsupported version: \\\"+l);d&&(d=s.normalize(d)),c=c.map(String).map(s.normalize).map(function(S){return d&&s.isAbsolute(d)&&s.isAbsolute(S)?s.relative(d,S):S}),this._names=t.fromArray(o.map(String),!0),this._sources=t.fromArray(c,!0),this._absoluteSources=this._sources.toArray().map(function(S){return s.computeSourceURL(d,S,f)}),this.sourceRoot=d,this.sourcesContent=m,this._mappings=v,this._sourceMapURL=f,this.file=_}a.prototype=Object.create(i.prototype),a.prototype.consumer=i,a.prototype._findSourceIndex=function(p){var f=p;if(this.sourceRoot!=null&&(f=s.relative(this.sourceRoot,f)),this._sources.has(f))return this._sources.indexOf(f);var g;for(g=0;g<this._absoluteSources.length;++g)if(this._absoluteSources[g]==p)return g;return-1},a.fromSourceMap=function(f,g){var l=Object.create(a.prototype),c=l._names=t.fromArray(f._names.toArray(),!0),o=l._sources=t.fromArray(f._sources.toArray(),!0);l.sourceRoot=f._sourceRoot,l.sourcesContent=f._generateSourcesContent(l._sources.toArray(),l.sourceRoot),l.file=f._file,l._sourceMapURL=g,l._absoluteSources=l._sources.toArray().map(function(k){return s.computeSourceURL(l.sourceRoot,k,g)});for(var d=f._mappings.toArray().slice(),m=l.__generatedMappings=[],v=l.__originalMappings=[],_=0,S=d.length;_<S;_++){var y=d[_],b=new h;b.generatedLine=y.generatedLine,b.generatedColumn=y.generatedColumn,y.source&&(b.source=o.indexOf(y.source),b.originalLine=y.originalLine,b.originalColumn=y.originalColumn,y.name&&(b.name=c.indexOf(y.name)),v.push(b)),m.push(b)}return r(l.__originalMappings,s.compareByOriginalPositions),l},a.prototype._version=3,Object.defineProperty(a.prototype,\\\"sources\\\",{get:function(){return this._absoluteSources.slice()}});function h(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}a.prototype._parseMappings=function(f,g){for(var l=1,c=0,o=0,d=0,m=0,v=0,_=f.length,S=0,y={},b={},k=[],x=[],C,O,P,w,E;S<_;)if(f.charAt(S)===\\\";\\\")l++,S++,c=0;else if(f.charAt(S)===\\\",\\\")S++;else{for(C=new h,C.generatedLine=l,w=S;w<_&&!this._charIsMappingSeparator(f,w);w++);if(O=f.slice(S,w),P=y[O],P)S+=O.length;else{for(P=[];S<w;)n.decode(f,S,b),E=b.value,S=b.rest,P.push(E);if(P.length===2)throw new Error(\\\"Found a source, but no line and column\\\");if(P.length===3)throw new Error(\\\"Found a source and line, but no column\\\");y[O]=P}C.generatedColumn=c+P[0],c=C.generatedColumn,P.length>1&&(C.source=m+P[1],m+=P[1],C.originalLine=o+P[2],o=C.originalLine,C.originalLine+=1,C.originalColumn=d+P[3],d=C.originalColumn,P.length>4&&(C.name=v+P[4],v+=P[4])),x.push(C),typeof C.originalLine==\\\"number\\\"&&k.push(C)}r(x,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,r(k,s.compareByOriginalPositions),this.__originalMappings=k},a.prototype._findMapping=function(f,g,l,c,o,d){if(f[l]<=0)throw new TypeError(\\\"Line must be greater than or equal to 1, got \\\"+f[l]);if(f[c]<0)throw new TypeError(\\\"Column must be greater than or equal to 0, got \\\"+f[c]);return e.search(f,g,o,d)},a.prototype.computeColumnSpans=function(){for(var f=0;f<this._generatedMappings.length;++f){var g=this._generatedMappings[f];if(f+1<this._generatedMappings.length){var l=this._generatedMappings[f+1];if(g.generatedLine===l.generatedLine){g.lastGeneratedColumn=l.generatedColumn-1;continue}}g.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(f){var g={generatedLine:s.getArg(f,\\\"line\\\"),generatedColumn:s.getArg(f,\\\"column\\\")},l=this._findMapping(g,this._generatedMappings,\\\"generatedLine\\\",\\\"generatedColumn\\\",s.compareByGeneratedPositionsDeflated,s.getArg(f,\\\"bias\\\",i.GREATEST_LOWER_BOUND));if(l>=0){var c=this._generatedMappings[l];if(c.generatedLine===g.generatedLine){var o=s.getArg(c,\\\"source\\\",null);o!==null&&(o=this._sources.at(o),o=s.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var d=s.getArg(c,\\\"name\\\",null);return d!==null&&(d=this._names.at(d)),{source:o,line:s.getArg(c,\\\"originalLine\\\",null),column:s.getArg(c,\\\"originalColumn\\\",null),name:d}}}return{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(f){return f==null}):!1},a.prototype.sourceContentFor=function(f,g){if(!this.sourcesContent)return null;var l=this._findSourceIndex(f);if(l>=0)return this.sourcesContent[l];var c=f;this.sourceRoot!=null&&(c=s.relative(this.sourceRoot,c));var o;if(this.sourceRoot!=null&&(o=s.urlParse(this.sourceRoot))){var d=c.replace(/^file:\\\\/\\\\//,\\\"\\\");if(o.scheme==\\\"file\\\"&&this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];if((!o.path||o.path==\\\"/\\\")&&this._sources.has(\\\"/\\\"+c))return this.sourcesContent[this._sources.indexOf(\\\"/\\\"+c)]}if(g)return null;throw new Error('\\\"'+c+'\\\" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(f){var g=s.getArg(f,\\\"source\\\");if(g=this._findSourceIndex(g),g<0)return{line:null,column:null,lastColumn:null};var l={source:g,originalLine:s.getArg(f,\\\"line\\\"),originalColumn:s.getArg(f,\\\"column\\\")},c=this._findMapping(l,this._originalMappings,\\\"originalLine\\\",\\\"originalColumn\\\",s.compareByOriginalPositions,s.getArg(f,\\\"bias\\\",i.GREATEST_LOWER_BOUND));if(c>=0){var o=this._originalMappings[c];if(o.source===l.source)return{line:s.getArg(o,\\\"generatedLine\\\",null),column:s.getArg(o,\\\"generatedColumn\\\",null),lastColumn:s.getArg(o,\\\"lastGeneratedColumn\\\",null)}}return{line:null,column:null,lastColumn:null}},ss.BasicSourceMapConsumer=a;function u(p,f){var g=p;typeof p==\\\"string\\\"&&(g=s.parseSourceMapInput(p));var l=s.getArg(g,\\\"version\\\"),c=s.getArg(g,\\\"sections\\\");if(l!=this._version)throw new Error(\\\"Unsupported version: \\\"+l);this._sources=new t,this._names=new t;var o={line:-1,column:0};this._sections=c.map(function(d){if(d.url)throw new Error(\\\"Support for url field in sections not implemented.\\\");var m=s.getArg(d,\\\"offset\\\"),v=s.getArg(m,\\\"line\\\"),_=s.getArg(m,\\\"column\\\");if(v<o.line||v===o.line&&_<o.column)throw new Error(\\\"Section offsets must be ordered and non-overlapping.\\\");return o=m,{generatedOffset:{generatedLine:v+1,generatedColumn:_+1},consumer:new i(s.getArg(d,\\\"map\\\"),f)}})}return u.prototype=Object.create(i.prototype),u.prototype.constructor=i,u.prototype._version=3,Object.defineProperty(u.prototype,\\\"sources\\\",{get:function(){for(var p=[],f=0;f<this._sections.length;f++)for(var g=0;g<this._sections[f].consumer.sources.length;g++)p.push(this._sections[f].consumer.sources[g]);return p}}),u.prototype.originalPositionFor=function(f){var g={generatedLine:s.getArg(f,\\\"line\\\"),generatedColumn:s.getArg(f,\\\"column\\\")},l=e.search(g,this._sections,function(o,d){var m=o.generatedLine-d.generatedOffset.generatedLine;return m||o.generatedColumn-d.generatedOffset.generatedColumn}),c=this._sections[l];return c?c.consumer.originalPositionFor({line:g.generatedLine-(c.generatedOffset.generatedLine-1),column:g.generatedColumn-(c.generatedOffset.generatedLine===g.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:f.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(f){return f.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(f,g){for(var l=0;l<this._sections.length;l++){var c=this._sections[l],o=c.consumer.sourceContentFor(f,!0);if(o)return o}if(g)return null;throw new Error('\\\"'+f+'\\\" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(f){for(var g=0;g<this._sections.length;g++){var l=this._sections[g];if(l.consumer._findSourceIndex(s.getArg(f,\\\"source\\\"))!==-1){var c=l.consumer.generatedPositionFor(f);if(c){var o={line:c.line+(l.generatedOffset.generatedLine-1),column:c.column+(l.generatedOffset.generatedLine===c.line?l.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},u.prototype._parseMappings=function(f,g){this.__generatedMappings=[],this.__originalMappings=[];for(var l=0;l<this._sections.length;l++)for(var c=this._sections[l],o=c.consumer._generatedMappings,d=0;d<o.length;d++){var m=o[d],v=c.consumer._sources.at(m.source);v=s.computeSourceURL(c.consumer.sourceRoot,v,this._sourceMapURL),this._sources.add(v),v=this._sources.indexOf(v);var _=null;m.name&&(_=c.consumer._names.at(m.name),this._names.add(_),_=this._names.indexOf(_));var S={source:v,generatedLine:m.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(c.generatedOffset.generatedLine===m.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:_};this.__generatedMappings.push(S),typeof S.originalLine==\\\"number\\\"&&this.__originalMappings.push(S)}r(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),r(this.__originalMappings,s.compareByOriginalPositions)},ss.IndexedSourceMapConsumer=u,ss}var Dr={},Ni;function Qa(){if(Ni)return Dr;Ni=1;var s=Ri().SourceMapGenerator,e=ts(),t=/(\\\\r?\\\\n)/,n=10,r=\\\"$$$isSourceNode$$$\\\";function i(a,h,u,p,f){this.children=[],this.sourceContents={},this.line=a??null,this.column=h??null,this.source=u??null,this.name=f??null,this[r]=!0,p!=null&&this.add(p)}return i.fromStringWithSourceMap=function(h,u,p){var f=new i,g=h.split(t),l=0,c=function(){var _=y(),S=y()||\\\"\\\";return _+S;function y(){return l<g.length?g[l++]:void 0}},o=1,d=0,m=null;return u.eachMapping(function(_){if(m!==null)if(o<_.generatedLine)v(m,c()),o++,d=0;else{var S=g[l]||\\\"\\\",y=S.substr(0,_.generatedColumn-d);g[l]=S.substr(_.generatedColumn-d),d=_.generatedColumn,v(m,y),m=_;return}for(;o<_.generatedLine;)f.add(c()),o++;if(d<_.generatedColumn){var S=g[l]||\\\"\\\";f.add(S.substr(0,_.generatedColumn)),g[l]=S.substr(_.generatedColumn),d=_.generatedColumn}m=_},this),l<g.length&&(m&&v(m,c()),f.add(g.splice(l).join(\\\"\\\"))),u.sources.forEach(function(_){var S=u.sourceContentFor(_);S!=null&&(p!=null&&(_=e.join(p,_)),f.setSourceContent(_,S))}),f;function v(_,S){if(_===null||_.source===void 0)f.add(S);else{var y=p?e.join(p,_.source):_.source;f.add(new i(_.originalLine,_.originalColumn,y,S,_.name))}}},i.prototype.add=function(h){if(Array.isArray(h))h.forEach(function(u){this.add(u)},this);else if(h[r]||typeof h==\\\"string\\\")h&&this.children.push(h);else throw new TypeError(\\\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \\\"+h);return this},i.prototype.prepend=function(h){if(Array.isArray(h))for(var u=h.length-1;u>=0;u--)this.prepend(h[u]);else if(h[r]||typeof h==\\\"string\\\")this.children.unshift(h);else throw new TypeError(\\\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \\\"+h);return this},i.prototype.walk=function(h){for(var u,p=0,f=this.children.length;p<f;p++)u=this.children[p],u[r]?u.walk(h):u!==\\\"\\\"&&h(u,{source:this.source,line:this.line,column:this.column,name:this.name})},i.prototype.join=function(h){var u,p,f=this.children.length;if(f>0){for(u=[],p=0;p<f-1;p++)u.push(this.children[p]),u.push(h);u.push(this.children[p]),this.children=u}return this},i.prototype.replaceRight=function(h,u){var p=this.children[this.children.length-1];return p[r]?p.replaceRight(h,u):typeof p==\\\"string\\\"?this.children[this.children.length-1]=p.replace(h,u):this.children.push(\\\"\\\".replace(h,u)),this},i.prototype.setSourceContent=function(h,u){this.sourceContents[e.toSetString(h)]=u},i.prototype.walkSourceContents=function(h){for(var u=0,p=this.children.length;u<p;u++)this.children[u][r]&&this.children[u].walkSourceContents(h);for(var f=Object.keys(this.sourceContents),u=0,p=f.length;u<p;u++)h(e.fromSetString(f[u]),this.sourceContents[f[u]])},i.prototype.toString=function(){var h=\\\"\\\";return this.walk(function(u){h+=u}),h},i.prototype.toStringWithSourceMap=function(h){var u={code:\\\"\\\",line:1,column:0},p=new s(h),f=!1,g=null,l=null,c=null,o=null;return this.walk(function(d,m){u.code+=d,m.source!==null&&m.line!==null&&m.column!==null?((g!==m.source||l!==m.line||c!==m.column||o!==m.name)&&p.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:u.line,column:u.column},name:m.name}),g=m.source,l=m.line,c=m.column,o=m.name,f=!0):f&&(p.addMapping({generated:{line:u.line,column:u.column}}),g=null,f=!1);for(var v=0,_=d.length;v<_;v++)d.charCodeAt(v)===n?(u.line++,u.column=0,v+1===_?(g=null,f=!1):f&&p.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:u.line,column:u.column},name:m.name})):u.column++}),this.walkSourceContents(function(d,m){p.setSourceContent(d,m)}),{code:u.code,map:p}},Dr.SourceNode=i,Dr}var Bi;function Ka(){return Bi||(Bi=1,es.SourceMapGenerator=Ri().SourceMapGenerator,es.SourceMapConsumer=Ja().SourceMapConsumer,es.SourceNode=Qa().SourceNode),es}var Di;function Za(){return Di||(Di=1,(function(s,e){e.__esModule=!0;var t=Fe(),n=void 0;try{var r=Ka();n=r.SourceNode}catch{}n||(n=function(h,u,p,f){this.src=\\\"\\\",f&&this.add(f)},n.prototype={add:function(u){t.isArray(u)&&(u=u.join(\\\"\\\")),this.src+=u},prepend:function(u){t.isArray(u)&&(u=u.join(\\\"\\\")),this.src=u+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function i(h,u,p){if(t.isArray(h)){for(var f=[],g=0,l=h.length;g<l;g++)f.push(u.wrap(h[g],p));return f}else if(typeof h==\\\"boolean\\\"||typeof h==\\\"number\\\")return h+\\\"\\\";return h}function a(h){this.srcFile=h,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(u,p){this.source.unshift(this.wrap(u,p))},push:function(u,p){this.source.push(this.wrap(u,p))},merge:function(){var u=this.empty();return this.each(function(p){u.add([\\\" \\\",p,`\\n`])}),u},each:function(u){for(var p=0,f=this.source.length;p<f;p++)u(this.source[p])},empty:function(){var u=this.currentLocation||{start:{}};return new n(u.start.line,u.start.column,this.srcFile)},wrap:function(u){var p=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return u instanceof n?u:(u=i(u,this,p),new n(p.start.line,p.start.column,this.srcFile,u))},functionCall:function(u,p,f){return f=this.generateList(f),this.wrap([u,p?\\\".\\\"+p+\\\"(\\\":\\\"(\\\",f,\\\")\\\"])},quotedString:function(u){return'\\\"'+(u+\\\"\\\").replace(/\\\\\\\\/g,\\\"\\\\\\\\\\\\\\\\\\\").replace(/\\\"/g,'\\\\\\\\\\\"').replace(/\\\\n/g,\\\"\\\\\\\\n\\\").replace(/\\\\r/g,\\\"\\\\\\\\r\\\").replace(/\\\\u2028/g,\\\"\\\\\\\\u2028\\\").replace(/\\\\u2029/g,\\\"\\\\\\\\u2029\\\")+'\\\"'},objectLiteral:function(u){var p=this,f=[];Object.keys(u).forEach(function(l){var c=i(u[l],p);c!==\\\"undefined\\\"&&f.push([p.quotedString(l),\\\":\\\",c])});var g=this.generateList(f);return g.prepend(\\\"{\\\"),g.add(\\\"}\\\"),g},generateList:function(u){for(var p=this.empty(),f=0,g=u.length;f<g;f++)f&&p.add(\\\",\\\"),p.add(i(u[f],this));return p},generateArray:function(u){var p=this.generateList(u);return p.prepend(\\\"[\\\"),p.add(\\\"]\\\"),p}},e.default=a,s.exports=e.default})(Xs,Xs.exports)),Xs.exports}var qi;function ja(){return qi||(qi=1,(function(s,e){e.__esModule=!0;function t(l){return l&&l.__esModule?l:{default:l}}var n=Ar(),r=rt(),i=t(r),a=Fe(),h=Za(),u=t(h);function p(l){this.value=l}function f(){}f.prototype={nameLookup:function(c,o){return this.internalNameLookup(c,o)},depthedLookup:function(c){return[this.aliasable(\\\"container.lookup\\\"),\\\"(depths, \\\",JSON.stringify(c),\\\")\\\"]},compilerInfo:function(){var c=n.COMPILER_REVISION,o=n.REVISION_CHANGES[c];return[c,o]},appendToBuffer:function(c,o,d){return a.isArray(c)||(c=[c]),c=this.source.wrap(c,o),this.environment.isSimple?[\\\"return \\\",c,\\\";\\\"]:d?[\\\"buffer += \\\",c,\\\";\\\"]:(c.appendToBuffer=!0,c)},initializeBuffer:function(){return this.quotedString(\\\"\\\")},internalNameLookup:function(c,o){return this.lookupPropertyFunctionIsUsed=!0,[\\\"lookupProperty(\\\",c,\\\",\\\",JSON.stringify(o),\\\")\\\"]},lookupPropertyFunctionIsUsed:!1,compile:function(c,o,d,m){this.environment=c,this.options=o,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!m,this.name=this.environment.name,this.isChild=!!d,this.context=d||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(c,o),this.useDepths=this.useDepths||c.useDepths||c.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||c.useBlockParams;var v=c.opcodes,_=void 0,S=void 0,y=void 0,b=void 0;for(y=0,b=v.length;y<b;y++)_=v[y],this.source.currentLocation=_.loc,S=S||_.loc,this[_.opcode].apply(this,_.args);if(this.source.currentLocation=S,this.pushSource(\\\"\\\"),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new i.default(\\\"Compile completed with content left on stack\\\");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([\\\"var decorators = container.decorators, \\\",this.lookupPropertyFunctionVarDeclaration(),`;\\n`]),this.decorators.push(\\\"return fn;\\\"),m?this.decorators=Function.apply(this,[\\\"fn\\\",\\\"props\\\",\\\"container\\\",\\\"depth0\\\",\\\"data\\\",\\\"blockParams\\\",\\\"depths\\\",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {\\n`),this.decorators.push(`}\\n`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(m);if(this.isChild)return k;var x={compiler:this.compilerInfo(),main:k};this.decorators&&(x.main_d=this.decorators,x.useDecorators=!0);var C=this.context,O=C.programs,P=C.decorators;for(y=0,b=O.length;y<b;y++)O[y]&&(x[y]=O[y],P[y]&&(x[y+\\\"_d\\\"]=P[y],x.useDecorators=!0));return this.environment.usePartial&&(x.usePartial=!0),this.options.data&&(x.useData=!0),this.useDepths&&(x.useDepths=!0),this.useBlockParams&&(x.useBlockParams=!0),this.options.compat&&(x.compat=!0),m?x.compilerOptions=this.options:(x.compiler=JSON.stringify(x.compiler),this.source.currentLocation={start:{line:1,column:0}},x=this.objectLiteral(x),o.srcName?(x=x.toStringWithSourceMap({file:o.destName}),x.map=x.map&&x.map.toString()):x=x.toString()),x},preamble:function(){this.lastContext=0,this.source=new u.default(this.options.srcName),this.decorators=new u.default(this.options.srcName)},createFunctionContext:function(c){var o=this,d=\\\"\\\",m=this.stackVars.concat(this.registers.list);m.length>0&&(d+=\\\", \\\"+m.join(\\\", \\\"));var v=0;Object.keys(this.aliases).forEach(function(y){var b=o.aliases[y];b.children&&b.referenceCount>1&&(d+=\\\", alias\\\"+ ++v+\\\"=\\\"+y,b.children[0]=\\\"alias\\\"+v)}),this.lookupPropertyFunctionIsUsed&&(d+=\\\", \\\"+this.lookupPropertyFunctionVarDeclaration());var _=[\\\"container\\\",\\\"depth0\\\",\\\"helpers\\\",\\\"partials\\\",\\\"data\\\"];(this.useBlockParams||this.useDepths)&&_.push(\\\"blockParams\\\"),this.useDepths&&_.push(\\\"depths\\\");var S=this.mergeSource(d);return c?(_.push(S),Function.apply(this,_)):this.source.wrap([\\\"function(\\\",_.join(\\\",\\\"),`) {\\n `,S,\\\"}\\\"])},mergeSource:function(c){var o=this.environment.isSimple,d=!this.forceBuffer,m=void 0,v=void 0,_=void 0,S=void 0;return this.source.each(function(y){y.appendToBuffer?(_?y.prepend(\\\" + \\\"):_=y,S=y):(_&&(v?_.prepend(\\\"buffer += \\\"):m=!0,S.add(\\\";\\\"),_=S=void 0),v=!0,o||(d=!1))}),d?_?(_.prepend(\\\"return \\\"),S.add(\\\";\\\")):v||this.source.push('return \\\"\\\";'):(c+=\\\", buffer = \\\"+(m?\\\"\\\":this.initializeBuffer()),_?(_.prepend(\\\"return buffer + \\\"),S.add(\\\";\\\")):this.source.push(\\\"return buffer;\\\")),c&&this.source.prepend(\\\"var \\\"+c.substring(2)+(m?\\\"\\\":`;\\n`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`\\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\\n return parent[propertyName];\\n }\\n return undefined\\n }\\n `.trim()},blockValue:function(c){var o=this.aliasable(\\\"container.hooks.blockHelperMissing\\\"),d=[this.contextName(0)];this.setupHelperArgs(c,0,d);var m=this.popStack();d.splice(1,0,m),this.push(this.source.functionCall(o,\\\"call\\\",d))},ambiguousBlockValue:function(){var c=this.aliasable(\\\"container.hooks.blockHelperMissing\\\"),o=[this.contextName(0)];this.setupHelperArgs(\\\"\\\",0,o,!0),this.flushInline();var d=this.topStack();o.splice(1,0,d),this.pushSource([\\\"if (!\\\",this.lastHelper,\\\") { \\\",d,\\\" = \\\",this.source.functionCall(c,\\\"call\\\",o),\\\"}\\\"])},appendContent:function(c){this.pendingContent?c=this.pendingContent+c:this.pendingLocation=this.source.currentLocation,this.pendingContent=c},append:function(){if(this.isInline())this.replaceStack(function(o){return[\\\" != null ? \\\",o,' : \\\"\\\"']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var c=this.popStack();this.pushSource([\\\"if (\\\",c,\\\" != null) { \\\",this.appendToBuffer(c,void 0,!0),\\\" }\\\"]),this.environment.isSimple&&this.pushSource([\\\"else { \\\",this.appendToBuffer(\\\"''\\\",void 0,!0),\\\" }\\\"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(\\\"container.escapeExpression\\\"),\\\"(\\\",this.popStack(),\\\")\\\"]))},getContext:function(c){this.lastContext=c},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(c,o,d,m){var v=0;!m&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(c[v++])):this.pushContext(),this.resolvePath(\\\"context\\\",c,v,o,d)},lookupBlockParam:function(c,o){this.useBlockParams=!0,this.push([\\\"blockParams[\\\",c[0],\\\"][\\\",c[1],\\\"]\\\"]),this.resolvePath(\\\"context\\\",o,1)},lookupData:function(c,o,d){c?this.pushStackLiteral(\\\"container.data(data, \\\"+c+\\\")\\\"):this.pushStackLiteral(\\\"data\\\"),this.resolvePath(\\\"data\\\",o,0,!0,d)},resolvePath:function(c,o,d,m,v){var _=this;if(this.options.strict||this.options.assumeObjects){this.push(g(this.options.strict&&v,this,o,d,c));return}for(var S=o.length;d<S;d++)this.replaceStack(function(y){var b=_.nameLookup(y,o[d],c);return m?[\\\" && \\\",b]:[\\\" != null ? \\\",b,\\\" : \\\",y]})},resolvePossibleLambda:function(){this.push([this.aliasable(\\\"container.lambda\\\"),\\\"(\\\",this.popStack(),\\\", \\\",this.contextName(0),\\\")\\\"])},pushStringParam:function(c,o){this.pushContext(),this.pushString(o),o!==\\\"SubExpression\\\"&&(typeof c==\\\"string\\\"?this.pushString(c):this.pushStackLiteral(c))},emptyHash:function(c){this.trackIds&&this.push(\\\"{}\\\"),this.stringParams&&(this.push(\\\"{}\\\"),this.push(\\\"{}\\\")),this.pushStackLiteral(c?\\\"undefined\\\":\\\"{}\\\")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var c=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(c.ids)),this.stringParams&&(this.push(this.objectLiteral(c.contexts)),this.push(this.objectLiteral(c.types))),this.push(this.objectLiteral(c.values))},pushString:function(c){this.pushStackLiteral(this.quotedString(c))},pushLiteral:function(c){this.pushStackLiteral(c)},pushProgram:function(c){c!=null?this.pushStackLiteral(this.programExpression(c)):this.pushStackLiteral(null)},registerDecorator:function(c,o){var d=this.nameLookup(\\\"decorators\\\",o,\\\"decorator\\\"),m=this.setupHelperArgs(o,c);this.decorators.push([\\\"fn = \\\",this.decorators.functionCall(d,\\\"\\\",[\\\"fn\\\",\\\"props\\\",\\\"container\\\",m]),\\\" || fn;\\\"])},invokeHelper:function(c,o,d){var m=this.popStack(),v=this.setupHelper(c,o),_=[];d&&_.push(v.name),_.push(m),this.options.strict||_.push(this.aliasable(\\\"container.hooks.helperMissing\\\"));var S=[\\\"(\\\",this.itemsSeparatedBy(_,\\\"||\\\"),\\\")\\\"],y=this.source.functionCall(S,\\\"call\\\",v.callParams);this.push(y)},itemsSeparatedBy:function(c,o){var d=[];d.push(c[0]);for(var m=1;m<c.length;m++)d.push(o,c[m]);return d},invokeKnownHelper:function(c,o){var d=this.setupHelper(c,o);this.push(this.source.functionCall(d.name,\\\"call\\\",d.callParams))},invokeAmbiguous:function(c,o){this.useRegister(\\\"helper\\\");var d=this.popStack();this.emptyHash();var m=this.setupHelper(0,c,o),v=this.lastHelper=this.nameLookup(\\\"helpers\\\",c,\\\"helper\\\"),_=[\\\"(\\\",\\\"(helper = \\\",v,\\\" || \\\",d,\\\")\\\"];this.options.strict||(_[0]=\\\"(helper = \\\",_.push(\\\" != null ? helper : \\\",this.aliasable(\\\"container.hooks.helperMissing\\\"))),this.push([\\\"(\\\",_,m.paramsInit?[\\\"),(\\\",m.paramsInit]:[],\\\"),\\\",\\\"(typeof helper === \\\",this.aliasable('\\\"function\\\"'),\\\" ? \\\",this.source.functionCall(\\\"helper\\\",\\\"call\\\",m.callParams),\\\" : helper))\\\"])},invokePartial:function(c,o,d){var m=[],v=this.setupParams(o,1,m);c&&(o=this.popStack(),delete v.name),d&&(v.indent=JSON.stringify(d)),v.helpers=\\\"helpers\\\",v.partials=\\\"partials\\\",v.decorators=\\\"container.decorators\\\",c?m.unshift(o):m.unshift(this.nameLookup(\\\"partials\\\",o,\\\"partial\\\")),this.options.compat&&(v.depths=\\\"depths\\\"),v=this.objectLiteral(v),m.push(v),this.push(this.source.functionCall(\\\"container.invokePartial\\\",\\\"\\\",m))},assignToHash:function(c){var o=this.popStack(),d=void 0,m=void 0,v=void 0;this.trackIds&&(v=this.popStack()),this.stringParams&&(m=this.popStack(),d=this.popStack());var _=this.hash;d&&(_.contexts[c]=d),m&&(_.types[c]=m),v&&(_.ids[c]=v),_.values[c]=o},pushId:function(c,o,d){c===\\\"BlockParam\\\"?this.pushStackLiteral(\\\"blockParams[\\\"+o[0]+\\\"].path[\\\"+o[1]+\\\"]\\\"+(d?\\\" + \\\"+JSON.stringify(\\\".\\\"+d):\\\"\\\")):c===\\\"PathExpression\\\"?this.pushString(o):c===\\\"SubExpression\\\"?this.pushStackLiteral(\\\"true\\\"):this.pushStackLiteral(\\\"null\\\")},compiler:f,compileChildren:function(c,o){for(var d=c.children,m=void 0,v=void 0,_=0,S=d.length;_<S;_++){m=d[_],v=new this.compiler;var y=this.matchExistingProgram(m);if(y==null){this.context.programs.push(\\\"\\\");var b=this.context.programs.length;m.index=b,m.name=\\\"program\\\"+b,this.context.programs[b]=v.compile(m,o,this.context,!this.precompile),this.context.decorators[b]=v.decorators,this.context.environments[b]=m,this.useDepths=this.useDepths||v.useDepths,this.useBlockParams=this.useBlockParams||v.useBlockParams,m.useDepths=this.useDepths,m.useBlockParams=this.useBlockParams}else m.index=y.index,m.name=\\\"program\\\"+y.index,this.useDepths=this.useDepths||y.useDepths,this.useBlockParams=this.useBlockParams||y.useBlockParams}},matchExistingProgram:function(c){for(var o=0,d=this.context.environments.length;o<d;o++){var m=this.context.environments[o];if(m&&m.equals(c))return m}},programExpression:function(c){var o=this.environment.children[c],d=[o.index,\\\"data\\\",o.blockParams];return(this.useBlockParams||this.useDepths)&&d.push(\\\"blockParams\\\"),this.useDepths&&d.push(\\\"depths\\\"),\\\"container.program(\\\"+d.join(\\\", \\\")+\\\")\\\"},useRegister:function(c){this.registers[c]||(this.registers[c]=!0,this.registers.list.push(c))},push:function(c){return c instanceof p||(c=this.source.wrap(c)),this.inlineStack.push(c),c},pushStackLiteral:function(c){this.push(new p(c))},pushSource:function(c){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),c&&this.source.push(c)},replaceStack:function(c){var o=[\\\"(\\\"],d=void 0,m=void 0,v=void 0;if(!this.isInline())throw new i.default(\\\"replaceStack on non-inline\\\");var _=this.popStack(!0);if(_ instanceof p)d=[_.value],o=[\\\"(\\\",d],v=!0;else{m=!0;var S=this.incrStack();o=[\\\"((\\\",this.push(S),\\\" = \\\",_,\\\")\\\"],d=this.topStack()}var y=c.call(this,d);v||this.popStack(),m&&this.stackSlot--,this.push(o.concat(y,\\\")\\\"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(\\\"stack\\\"+this.stackSlot),this.topStackName()},topStackName:function(){return\\\"stack\\\"+this.stackSlot},flushInline:function(){var c=this.inlineStack;this.inlineStack=[];for(var o=0,d=c.length;o<d;o++){var m=c[o];if(m instanceof p)this.compileStack.push(m);else{var v=this.incrStack();this.pushSource([v,\\\" = \\\",m,\\\";\\\"]),this.compileStack.push(v)}}},isInline:function(){return this.inlineStack.length},popStack:function(c){var o=this.isInline(),d=(o?this.inlineStack:this.compileStack).pop();if(!c&&d instanceof p)return d.value;if(!o){if(!this.stackSlot)throw new i.default(\\\"Invalid stack pop\\\");this.stackSlot--}return d},topStack:function(){var c=this.isInline()?this.inlineStack:this.compileStack,o=c[c.length-1];return o instanceof p?o.value:o},contextName:function(c){return this.useDepths&&c?\\\"depths[\\\"+c+\\\"]\\\":\\\"depth\\\"+c},quotedString:function(c){return this.source.quotedString(c)},objectLiteral:function(c){return this.source.objectLiteral(c)},aliasable:function(c){var o=this.aliases[c];return o?(o.referenceCount++,o):(o=this.aliases[c]=this.source.wrap(c),o.aliasable=!0,o.referenceCount=1,o)},setupHelper:function(c,o,d){var m=[],v=this.setupHelperArgs(o,c,m,d),_=this.nameLookup(\\\"helpers\\\",o,\\\"helper\\\"),S=this.aliasable(this.contextName(0)+\\\" != null ? \\\"+this.contextName(0)+\\\" : (container.nullContext || {})\\\");return{params:m,paramsInit:v,name:_,callParams:[S].concat(m)}},setupParams:function(c,o,d){var m={},v=[],_=[],S=[],y=!d,b=void 0;y&&(d=[]),m.name=this.quotedString(c),m.hash=this.popStack(),this.trackIds&&(m.hashIds=this.popStack()),this.stringParams&&(m.hashTypes=this.popStack(),m.hashContexts=this.popStack());var k=this.popStack(),x=this.popStack();(x||k)&&(m.fn=x||\\\"container.noop\\\",m.inverse=k||\\\"container.noop\\\");for(var C=o;C--;)b=this.popStack(),d[C]=b,this.trackIds&&(S[C]=this.popStack()),this.stringParams&&(_[C]=this.popStack(),v[C]=this.popStack());return y&&(m.args=this.source.generateArray(d)),this.trackIds&&(m.ids=this.source.generateArray(S)),this.stringParams&&(m.types=this.source.generateArray(_),m.contexts=this.source.generateArray(v)),this.options.data&&(m.data=\\\"data\\\"),this.useBlockParams&&(m.blockParams=\\\"blockParams\\\"),m},setupHelperArgs:function(c,o,d,m){var v=this.setupParams(c,o,d);return v.loc=JSON.stringify(this.source.currentLocation),v=this.objectLiteral(v),m?(this.useRegister(\\\"options\\\"),d.push(\\\"options\\\"),[\\\"options=\\\",v]):d?(d.push(v),\\\"\\\"):v}},(function(){for(var l=\\\"break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false\\\".split(\\\" \\\"),c=f.RESERVED_WORDS={},o=0,d=l.length;o<d;o++)c[l[o]]=!0})(),f.isValidJavaScriptVariableName=function(l){return!f.RESERVED_WORDS[l]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(l)};function g(l,c,o,d,m){var v=c.popStack(),_=o.length;for(l&&_--;d<_;d++)v=c.nameLookup(v,o[d],m);return l?[c.aliasable(\\\"container.strict\\\"),\\\"(\\\",v,\\\", \\\",c.quotedString(o[d]),\\\", \\\",JSON.stringify(c.source.currentLocation),\\\" )\\\"]:v}e.default=f,s.exports=e.default})(Gs,Gs.exports)),Gs.exports}var Hi;function el(){return Hi||(Hi=1,(function(s,e){e.__esModule=!0;function t(_){return _&&_.__esModule?_:{default:_}}var n=Ha(),r=t(n),i=gi(),a=t(i),h=$a(),u=Ua(),p=ja(),f=t(p),g=yi(),l=t(g),c=pi(),o=t(c),d=r.default.create;function m(){var _=d();return _.compile=function(S,y){return u.compile(S,y,_)},_.precompile=function(S,y){return u.precompile(S,y,_)},_.AST=a.default,_.Compiler=u.Compiler,_.JavaScriptCompiler=f.default,_.Parser=h.parser,_.parse=h.parse,_.parseWithoutProcessing=h.parseWithoutProcessing,_}var v=m();v.create=m,o.default(v),v.Visitor=l.default,v.default=v,e.default=v,s.exports=e.default})(Ts,Ts.exports)),Ts.exports}var tl=el();const Ve=Ta(tl);class sl{constructor(e,t,n){this.story=e,this.state=t,this.getCurrentSection=n,this.handlebars=Ve.create(),this.handlebars.registerHelper(\\\"embed\\\",i=>{const a=this.getCurrentSection();if(a.passages&&i in a.passages)return new Ve.SafeString(this.process(a.passages[i].text||\\\"\\\",!0));if(i in this.story.sections)return new Ve.SafeString(this.process(this.story.sections[i].text||\\\"\\\",!0))}),this.handlebars.registerHelper(\\\"seen\\\",i=>this.state.getSeen(i)),this.handlebars.registerHelper(\\\"get\\\",i=>this.state.get(i)),this.handlebars.registerHelper(\\\"at\\\",i=>{const a=this.state.get(\\\"_section\\\");return Array.isArray(i)?i.includes(a):a===i}),this.handlebars.registerHelper(\\\"set\\\",(i,a)=>(this.state.set(i,a),\\\"\\\")),this.handlebars.registerHelper(\\\"unset\\\",i=>(this.state.set(i,!1),\\\"\\\")),this.handlebars.registerHelper(\\\"inc\\\",(i,a)=>{const h=typeof a==\\\"number\\\"?a:1,u=this.state.get(i)||0;return this.state.set(i,u+h),\\\"\\\"}),this.handlebars.registerHelper(\\\"dec\\\",(i,a)=>{const h=typeof a==\\\"number\\\"?a:1,u=this.state.get(i)||0;return this.state.set(i,u-h),\\\"\\\"}),this.handlebars.registerHelper(\\\"and\\\",(...i)=>i.slice(0,-1).every(Boolean)),this.handlebars.registerHelper(\\\"or\\\",(...i)=>i.slice(0,-1).some(Boolean)),this.handlebars.registerHelper(\\\"not\\\",i=>!i),this.handlebars.registerHelper(\\\"eq\\\",(i,a)=>i==a),this.handlebars.registerHelper(\\\"ne\\\",(i,a)=>i!=a),this.handlebars.registerHelper(\\\"gt\\\",(i,a)=>i>a),this.handlebars.registerHelper(\\\"lt\\\",(i,a)=>i<a),this.handlebars.registerHelper(\\\"gte\\\",(i,a)=>i>=a),this.handlebars.registerHelper(\\\"lte\\\",(i,a)=>i<=a),this.handlebars.registerHelper(\\\"array\\\",function(...i){return i.pop(),i});const r=i=>{let a=\\\"\\\";const h=i.hash.set||\\\"\\\";return h&&(a+=` data-set='${JSON.stringify(h.split(\\\",\\\").map(u=>u.trim()))}'`),a};this.handlebars.registerHelper(\\\"section\\\",(i,a)=>{const h=a.hash.text||i;return new Ve.SafeString(`<a class=\\\"squiffy-link link-section\\\" data-section=\\\"${i}\\\"${r(a)} role=\\\"link\\\" tabindex=\\\"0\\\">${h}</a>`)}),this.handlebars.registerHelper(\\\"passage\\\",(i,a)=>{const h=a.hash.text||i;return new Ve.SafeString(`<a class=\\\"squiffy-link link-passage\\\" data-passage=\\\"${i}\\\"${r(a)} role=\\\"link\\\" tabindex=\\\"0\\\">${h}</a>`)})}process(e,t){return e=this.handlebars.compile(e)(this.state.getStore()),t?Er(e,{async:!1}).trim():Lr(e,{async:!1}).trim()}}class rl{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){this.listeners.get(e)?.delete(t)}once(e,t){const n=this.on(e,r=>{n(),t(r)});return n}emit(e,t){this.listeners.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error(`[Squiffy] handler for \\\"${String(e)}\\\" failed`,r)}})}}class nl{constructor(e,t,n,r,i){this.store={},this.persist=e,this.storyId=t,this.onSet=n,this.emitter=r,this.onSetInternal=i}usePersistentStorage(){return this.persist&&window.localStorage&&this.storyId}set(e,t){this.setInternal(e,t,!0)}setInternal(e,t,n){typeof t>\\\"u\\\"&&(t=!0),n&&this.onSetInternal&&this.onSetInternal(e,this.get(e),structuredClone(t)),this.store[e]=structuredClone(t),this.usePersistentStorage()&&(localStorage[this.storyId+\\\"-\\\"+e]=JSON.stringify(t)),n&&this.emitter.emit(\\\"set\\\",{attribute:e,value:t}),this.onSet(e,t)}get(e){return e in this.store?structuredClone(this.store[e]):null}getStore(){return new Proxy({},{get:(e,t)=>this.get(String(t)),has:(e,t)=>String(t)in this.store,ownKeys:()=>Object.keys(this.store),getOwnPropertyDescriptor:(e,t)=>{const n=String(t);if(n in this.store)return{enumerable:!0,configurable:!0,value:this.get(n)}}})}load(){if(!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)if(t.startsWith(this.storyId+\\\"-\\\")){const n=t.substring(this.storyId.length+1);this.store[n]=JSON.parse(localStorage[t])}}reset(){if(this.store={},!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)t.startsWith(this.storyId)&&localStorage.removeItem(t)}setSeen(e){let t=this.get(\\\"_seen_sections\\\");t||(t=[]),t.indexOf(e)==-1&&(t.push(e),this.set(\\\"_seen_sections\\\",t))}getSeen(e){const t=this.get(\\\"_seen_sections\\\");return t?t.indexOf(e)>-1:!1}}function Fi(s,e){return!s&&!e?!0:!s||!e||s.length!==e.length?!1:s.every((t,n)=>t===e[n])}function il(s,e,t,n,r,i){function a(f){return f.replace(/'/g,\\\"\\\\\\\\'\\\")}function h(f){return t.querySelectorAll(`[data-source='[[${a(f)}]]']`)}function u(f,g){return t.querySelectorAll(`[data-source='[[${a(f)}]][${a(g)}]']`)}function p(f,g){const l=Array.from(f.querySelectorAll(\\\"a.link-passage.disabled\\\")).map(c=>c.getAttribute(\\\"data-passage\\\"));f.innerHTML=g;for(const c of l){const o=f.querySelector(`a.link-passage[data-passage=\\\"${c}\\\"]`);o&&r(o)}}for(const f of Object.keys(s.sections)){const g=h(f);if(g.length){const l=e.sections[f];if(l){const c=s.sections[f],o=!Fi(c.attributes,l.attributes),d=l.text!=c.text;if(o&&i(l.attributes||[]),d||o)for(const m of g)p(m,n.processText(l.text,!1))}else for(const c of g)c.closest(\\\".squiffy-output-section\\\").remove()}if(s.sections[f].passages)for(const l of Object.keys(s.sections[f].passages)){const c=u(f,l);if(!c.length)continue;const o=e.sections[f]?.passages&&e.sections[f]?.passages[l];if(o){const d=s.sections[f].passages[l],m=!Fi(d.attributes,o.attributes),v=o.text!=d.text;if(m&&i(o.attributes||[]),v||m)for(const _ of c)p(_,n.processText(o.text,!1))}else for(const d of c)d.closest(\\\".squiffy-output-passage\\\").remove()}}}class ol{constructor(e,t,n,r,i,a,h,u,p,f){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=n,this.linkHandler=r,this.getSectionText=i,this.getPassageText=a,this.processText=h,this.addTransition=u,this.animation=p,this.emitter=f}add(e){const t=e.init({outputElement:this.outputElement,registerHelper:(n,r)=>{this.textProcessor.handlebars.registerHelper(n,r)},registerLinkHandler:(n,r)=>{this.linkHandler.registerLinkHandler(n,r)},get:n=>this.state.get(n),set:(n,r)=>this.state.set(n,r),getSectionText:this.getSectionText,getPassageText:this.getPassageText,processText:this.processText,addTransition:this.addTransition,animation:this.animation,on:(n,r)=>this.emitter.on(n,r),off:(n,r)=>this.emitter.off(n,r),once:(n,r)=>this.emitter.once(n,r)});return this.plugins.push(e),t}onWrite(e){this.plugins.forEach(t=>t.onWrite?.(e))}onLoad(){this.plugins.forEach(e=>e.onLoad?.())}}function Vi(s,e){return new Promise(t=>{s.addEventListener(\\\"transitionend\\\",function(){s.innerHTML=e,s.addEventListener(\\\"transitionend\\\",function(){s.classList.remove(\\\"fade-in\\\"),t()},{once:!0}),s.classList.remove(\\\"fade-out\\\"),s.classList.add(\\\"fade-in\\\")},{once:!0}),s.classList.add(\\\"fade-out\\\")})}function al(){return{name:\\\"replaceLabel\\\",init(s){s.registerHelper(\\\"label\\\",function(e,t){return new Ve.SafeString(`<span class=\\\"squiffy-label-${e}\\\">${t.fn(this)}</span>`)}),s.registerHelper(\\\"replace\\\",function(e,t){const n=t.fn(this),r=s.outputElement.querySelector(`.squiffy-label-${e}`);if(r){const a=n.includes(`\\n\\n`)?Lr(n,{async:!1}).trim():Er(n,{async:!1}).trim();s.addTransition(()=>Vi(r,a))}return\\\"\\\"})}}}function ll(){const s=r=>r.replace(/&/g,\\\"&amp;\\\").replace(/'/g,\\\"&#39;\\\").replace(/\\\"/g,\\\"&quot;\\\").replace(/</g,\\\"&lt;\\\").replace(/>/g,\\\"&gt;\\\"),e=(r,i,a,h)=>{const u=a.map(c=>c.toString()),p=n(u,null),f=h.hash.set||\\\"\\\";f&&r.set(f,p[0]);const g=s(JSON.stringify(p.slice(1))||\\\"\\\"),l=h.hash.show==\\\"next\\\"?p[1]:p[0];return new Ve.SafeString(`<a class=\\\"squiffy-link\\\" data-handler=\\\"${i}\\\" data-value=\\\"${s(p[0])}\\\" data-show=\\\"${h.hash.show||\\\"\\\"}\\\" data-options='${g}' data-attribute=\\\"${f}\\\" role=\\\"link\\\">${l}</a>`)},t=(r,i,a)=>{const h={},u=JSON.parse(i.getAttribute(\\\"data-options\\\"))||[],p=n(u,a?i.getAttribute(\\\"data-value\\\"):\\\"\\\");i.innerHTML=i.getAttribute(\\\"data-show\\\")==\\\"next\\\"?p[1]:p[0],i.setAttribute(\\\"data-value\\\",p[0]),i.setAttribute(\\\"data-options\\\",JSON.stringify(p.slice(1))||\\\"\\\"),p[1]||(h.disableLink=!0);const f=i.getAttribute(\\\"data-attribute\\\");return f&&r.set(f,i.getAttribute(\\\"data-value\\\")),window.getSelection()?.removeAllRanges(),h},n=(r,i)=>{const a=r[0],h=r.slice(1);return i&&h.push(i),[a,...h]};return{name:\\\"rotateSequence\\\",init(r){r.registerHelper(\\\"rotate\\\",(i,a)=>e(r,\\\"rotate\\\",i,a)),r.registerHelper(\\\"sequence\\\",(i,a)=>e(r,\\\"sequence\\\",i,a)),r.registerLinkHandler(\\\"rotate\\\",i=>t(r,i,!0)),r.registerLinkHandler(\\\"sequence\\\",i=>t(r,i,!1))}}}function cl(){return{name:\\\"random\\\",init(s){s.registerHelper(\\\"random\\\",(e,t)=>{const n=e.map(h=>h.toString()),r=Math.floor(Math.random()*n.length),i=n[r],a=t.hash.set||\\\"\\\";return a&&s.set(a,i),new Ve.SafeString(i)})}}}function ul(){let s;return{name:\\\"live\\\",init(e){s=e,s.registerHelper(\\\"live\\\",(n,r)=>{const i=r.hash.section||\\\"\\\";if(i)return new Ve.SafeString(`<span class=\\\"squiffy-live\\\" data-attribute=\\\"${n}\\\" data-section=\\\"${i}\\\"></span>`);const a=r.hash.passage||\\\"\\\";return a?new Ve.SafeString(`<span class=\\\"squiffy-live\\\" data-attribute=\\\"${n}\\\" data-passage=\\\"${a}\\\"></span>`):new Ve.SafeString(`<span class=\\\"squiffy-live\\\" data-attribute=\\\"${n}\\\"></span>`)});const t=async n=>{const r=[],i=`.squiffy-live[data-attribute=\\\"${CSS.escape(n.attribute)}\\\"]`;for(const a of s.outputElement.querySelectorAll(i)){const h=a.innerHTML;let u=\\\"\\\";if(a.dataset.section){const p=s.getSectionText(a.dataset.section);p&&(u=s.processText(p,!0))}else if(a.dataset.passage){const p=s.getPassageText(a.dataset.passage);p&&(u=s.processText(p,!0))}else u=n.value;h!==u&&r.push(Vi(a,u))}await Promise.all(r)};s.on(\\\"set\\\",async n=>{await t(n)})},onWrite(e){if(!s)return;e.querySelectorAll(\\\".squiffy-live\\\").forEach(n=>{if(n.dataset.section){const r=s.getSectionText(n.dataset.section);r&&(n.innerHTML=s.processText(r,!0))}else if(n.dataset.passage){const r=s.getPassageText(n.dataset.passage);r&&(n.innerHTML=s.processText(r,!0))}else{const r=n.dataset.attribute;n.textContent=r?s.get(r):\\\"\\\"}})}}}function hl(){let s;const e=n=>{const r={};for(const[i,a]of Object.entries(n)){if(a==null){r[i]=a;continue}try{r[i]=JSON.parse(a)}catch{r[i]=a}}return r},t=n=>{const r=\\\".squiffy-animate\\\";for(const i of n.querySelectorAll(r)){const a=e(i.dataset);if(!a.content||(a.content.includes(`\\n\\n`)?i.innerHTML=Lr(a.content,{async:!1}).trim():i.innerHTML=Er(a.content,{async:!1}).trim(),!a.name))continue;const u=i.innerHTML,p=()=>{a.loop?s.animation.runAnimation(a.name,i,a,()=>{},!0):(s.animation.isInitiallyHidden(a.name)&&(i.style.opacity=\\\"0\\\"),s.addTransition(()=>new Promise(f=>{i.style.opacity=\\\"\\\",s.animation.runAnimation(a.name,i,a,()=>{i.classList.remove(\\\"squiffy-animate\\\"),i.innerHTML=u,f()},!1)})))};if(a.trigger===\\\"link\\\"){const f=i.querySelectorAll(\\\"a\\\");for(const g of f)s.animation.addLinkAnimation(g,p)}else p()}};return{name:\\\"animate\\\",init(n){s=n,s.registerHelper(\\\"animate\\\",function(r,i){const a=i.fn(this),h={name:r,content:a,...i.hash},u=Object.entries(h).map(([g,l])=>` data-${Ve.escapeExpression(g)}=\\\"${Ve.escapeExpression(JSON.stringify(l))}\\\"`).join(\\\"\\\"),f=a.includes(`\\n\\n`)?\\\"div\\\":\\\"span\\\";return new Ve.SafeString(`<${f} class=\\\"squiffy-animate\\\"${u}></${f}>`)})},onWrite(n){t(n)},onLoad(){t(s.outputElement)}}}const rs={ReplaceLabel:al,RotateSequencePlugin:ll,RandomPlugin:cl,LivePlugin:ul,AnimatePlugin:hl};class pl{constructor(){this.linkHandlers={}}registerLinkHandler(e,t){this.linkHandlers[e]=t}handleLink(e){const t=e.getAttribute(\\\"data-handler\\\")||\\\"\\\",n=this.linkHandlers[t];return n?[!0,t,n(e)]:[!1,t,null]}}/**\\n * anime.js - ESM\\n * @version v4.1.3\\n * @author Julian Garnier\\n * @license MIT\\n * @copyright (c) 2025 Julian Garnier\\n * @see https://animejs.com\\n */const ot=typeof window<\\\"u\\\",Ie=ot?window:null,H=ot?document:null,pe={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},Z={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Ge={NONE:0,AUTO:1,FORCE:2},ke={replace:0,none:1,blend:2},zi=Symbol(),Qs=Symbol(),qr=Symbol(),ns=Symbol(),$i=Symbol(),Ui=Symbol(),ee=1e-11,Ht=1e12,Ne=1e3,Hr=120,dt=\\\"\\\",Fr=(()=>{const s=new Map;return s.set(\\\"x\\\",\\\"translateX\\\"),s.set(\\\"y\\\",\\\"translateY\\\"),s.set(\\\"z\\\",\\\"translateZ\\\"),s})(),is=[\\\"translateX\\\",\\\"translateY\\\",\\\"translateZ\\\",\\\"rotate\\\",\\\"rotateX\\\",\\\"rotateY\\\",\\\"rotateZ\\\",\\\"scale\\\",\\\"scaleX\\\",\\\"scaleY\\\",\\\"scaleZ\\\",\\\"skew\\\",\\\"skewX\\\",\\\"skewY\\\",\\\"perspective\\\",\\\"matrix\\\",\\\"matrix3d\\\"],Vr=is.reduce((s,e)=>({...s,[e]:e+\\\"(\\\"}),{}),W=()=>{},fl=/(^#([\\\\da-f]{3}){1,2}$)|(^#([\\\\da-f]{4}){1,2}$)/i,dl=/rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/i,gl=/rgba\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*\\\\)/i,ml=/hsl\\\\(\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*\\\\)/i,vl=/hsla\\\\(\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*\\\\)/i,Wi=/[-+]?\\\\d*\\\\.?\\\\d+(?:e[-+]?\\\\d)?/gi,Gi=/^([-+]?\\\\d*\\\\.?\\\\d+(?:e[-+]?\\\\d+)?)([a-z]+|%)$/i,yl=/([a-z])([A-Z])/g,_l=/(\\\\w+)(\\\\([^)]+\\\\)+)/g,Xi=/(\\\\*=|\\\\+=|-=)/,Yi={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:Hr,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:Ne,delay:0,loopDelay:0,ease:\\\"out(2)\\\",composition:ke.replace,modifier:s=>s,onBegin:W,onBeforeUpdate:W,onUpdate:W,onLoop:W,onPause:W,onComplete:W,onRender:W},me={current:null,root:H},G={defaults:Yi,precision:4,timeScale:1,tickThreshold:200},Ji={version:\\\"4.1.3\\\",engine:null};ot&&(Ie.AnimeJS||(Ie.AnimeJS=[]),Ie.AnimeJS.push(Ji));const Qi=s=>s.replace(yl,\\\"$1-$2\\\").toLowerCase(),_e=(s,e)=>s.indexOf(e)===0,kt=Date.now,Le=Array.isArray,be=s=>s&&s.constructor===Object,Xe=s=>typeof s==\\\"number\\\"&&!isNaN(s),ze=s=>typeof s==\\\"string\\\",fe=s=>typeof s==\\\"function\\\",I=s=>typeof s>\\\"u\\\",os=s=>I(s)||s===null,zr=s=>ot&&s instanceof SVGElement,Ki=s=>fl.test(s),Zi=s=>_e(s,\\\"rgb\\\"),ji=s=>_e(s,\\\"hsl\\\"),bl=s=>Ki(s)||Zi(s)||ji(s),Ft=s=>!G.defaults.hasOwnProperty(s),Lt=s=>ze(s)?parseFloat(s):s,Vt=Math.pow,xt=Math.sqrt,$r=Math.sin,Ur=Math.cos,at=Math.abs,eo=Math.exp,Sl=Math.ceil,as=Math.floor,kl=Math.asin,Wr=Math.max,Ks=Math.atan2,zt=Math.PI,Gr=Math.round,F=(s,e,t)=>s<e?e:s>t?t:s,to={},N=(s,e)=>{if(e<0)return s;if(!e)return Gr(s);let t=to[e];return t||(t=to[e]=10**e),Gr(s*t)/t},At=(s,e)=>Le(e)?e.reduce((t,n)=>at(n-s)<at(t-s)?n:t):e?Gr(s/e)*e:s,gt=(s,e,t)=>s+(e-s)*t,Xr=(s,e,t)=>{const n=10**(t||0);return as((Math.random()*(e-s+1/n)+s)*n)/n},so=s=>{let e=s.length,t,n;for(;e;)n=Xr(0,--e),t=s[e],s[e]=s[n],s[n]=t;return s},Zs=s=>s===1/0?Ht:s===-1/0?-1e12:s,$t=s=>s<=ee?ee:Zs(N(s,11)),Be=s=>Le(s)?[...s]:s,ls=(s,e)=>{const t={...s};for(let n in e){const r=s[n];t[n]=I(r)?e[n]:r}return t},ie=(s,e,t,n=\\\"_prev\\\",r=\\\"_next\\\")=>{let i=s._head,a=r;for(t&&(i=s._tail,a=n);i;){const h=i[a];e(i),i=h}},mt=(s,e,t=\\\"_prev\\\",n=\\\"_next\\\")=>{const r=e[t],i=e[n];r?r[n]=i:s._head=i,i?i[t]=r:s._tail=r,e[t]=null,e[n]=null},vt=(s,e,t,n=\\\"_prev\\\",r=\\\"_next\\\")=>{let i=s._tail;for(;i&&t&&t(i,e);)i=i[n];const a=i?i[r]:s._head;i?i[r]=e:s._head=e,a?a[n]=e:s._tail=e,e[n]=i,e[r]=a},Yr=s=>{let e;return(...t)=>{let n,r,i,a;e&&(n=e.currentIteration,r=e.iterationProgress,i=e.reversed,a=e._alternate,e.revert());const h=s(...t);return h&&!fe(h)&&h.revert&&(e=h),I(r)||(e.currentIteration=n,e.iterationProgress=(a&&n%2?!i:i)?1-r:r),h||W}};class ro{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=N(Ne/Hr,0),this._fps=Hr,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<ee?ee:n,i=N(Ne/r,0);this._fps=r,this._frameDuration=i,this._scheduledTime+=i-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<ee?ee:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return Ge.NONE;const r=this._frameDuration,i=n-t;return this._scheduledTime+=i<r?r:i,Ge.AUTO}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const js=(s,e,t,n,r)=>{const i=s.parent,a=s.duration,h=s.completed,u=s.iterationDuration,p=s.iterationCount,f=s._currentIteration,g=s._loopDelay,l=s._reversed,c=s._alternate,o=s._hasChildren,d=s._delay,m=s._currentTime,v=d+u,_=e-d,S=F(m,-d,a),y=F(_,-d,a),b=_-m,k=y>0,x=y>=a,C=a<=ee,O=r===Ge.FORCE;let P=0,w=_,E=0;if(p>1){const U=~~(y/(u+(x?0:g)));s._currentIteration=F(U,0,p),x&&s._currentIteration--,P=s._currentIteration%2,w=y%(u+g)||0}const L=l^(c&&P),M=s._ease;let q=x?L?0:a:L?u-w:w;M&&(q=u*M(q/u)||0);const V=(i?i.backwards:_<m)?!L:!!L;if(s._currentTime=_,s._iterationTime=q,s.backwards=V,k&&!s.began?(s.began=!0,!t&&!(i&&(V||!i.began))&&s.onBegin(s)):_<=0&&(s.began=!1),!t&&!o&&k&&s._currentIteration!==f&&s.onLoop(s),O||r===Ge.AUTO&&(e>=d&&e<=v||e<=d&&S>d||e>=v&&S!==a)||q>=v&&S!==a||q<=d&&S>0||e<=S&&S===a&&h||x&&!h&&C){if(k&&(s.computeDeltaTime(S),t||s.onBeforeUpdate(s)),!o){const U=O||(V?b*-1:b)>=G.tickThreshold,z=s._offset+(i?i._offset:0)+d+q;let R=s._head,ae,te,xe,ve,$=0;for(;R;){const j=R._composition,re=R._currentTime,ue=R._changeDuration,ct=R._absoluteStartTime+R._changeDuration,Ae=R._nextRep,we=R._prevRep,he=j!==ke.none;if((U||(re!==ue||z<=ct+(Ae?Ae._delay:0))&&(re!==0||z>=R._absoluteStartTime))&&(!he||!R._isOverridden&&(!R._isOverlapped||z<=ct)&&(!Ae||Ae._isOverridden||z<=Ae._absoluteStartTime)&&(!we||we._isOverridden||z>=we._absoluteStartTime+we._changeDuration+R._delay))){const se=R._currentTime=F(q-R._startTime,0,ue),Y=R._ease(se/R._updateDuration),Te=R._modifier,Ue=R._valueType,Ce=R._tweenType,Re=Ce===pe.OBJECT,St=Ue===Z.NUMBER,qe=St&&Re||Y===0||Y===1?-1:G.precision;let ge,T;if(St)ge=T=Te(N(gt(R._fromNumber,R._toNumber,Y),qe));else if(Ue===Z.UNIT)T=Te(N(gt(R._fromNumber,R._toNumber,Y),qe)),ge=`${T}${R._unit}`;else if(Ue===Z.COLOR){const A=R._fromNumbers,B=R._toNumbers,J=N(F(Te(gt(A[0],B[0],Y)),0,255),0),Q=N(F(Te(gt(A[1],B[1],Y)),0,255),0),ye=N(F(Te(gt(A[2],B[2],Y)),0,255),0),Pe=F(Te(N(gt(A[3],B[3],Y),qe)),0,1);if(ge=`rgba(${J},${Q},${ye},${Pe})`,he){const Ee=R._numbers;Ee[0]=J,Ee[1]=Q,Ee[2]=ye,Ee[3]=Pe}}else if(Ue===Z.COMPLEX){ge=R._strings[0];for(let A=0,B=R._toNumbers.length;A<B;A++){const J=Te(N(gt(R._fromNumbers[A],R._toNumbers[A],Y),qe)),Q=R._strings[A+1];ge+=`${Q?J+Q:J}`,he&&(R._numbers[A]=J)}}if(he&&(R._number=T),!n&&j!==ke.blend){const A=R.property;ae=R.target,Re?ae[A]=ge:Ce===pe.ATTRIBUTE?ae.setAttribute(A,ge):(te=ae.style,Ce===pe.TRANSFORM?(ae!==xe&&(xe=ae,ve=ae[ns]),ve[A]=ge,$=1):Ce===pe.CSS?te[A]=ge:Ce===pe.CSS_VAR&&te.setProperty(A,ge)),k&&(E=1)}else R._value=ge}if($&&R._renderTransforms){let se=dt;for(let Y in ve)se+=`${Vr[Y]}${ve[Y]}) `;te.transform=se,$=0}R=R._next}!t&&E&&s.onRender(s)}!t&&k&&s.onUpdate(s)}return i&&C?!t&&(i.began&&!V&&_>=a&&!h||V&&_<=ee&&h)&&(s.onComplete(s),s.completed=!V):k&&x?p===1/0?s._startTime+=s.duration:s._currentIteration>=p-1&&(s.paused=!0,!h&&!o&&(s.completed=!0,!t&&!(i&&(V||!i.began))&&(s.onComplete(s),s._resolve(s)))):s.completed=!1,E},Rt=(s,e,t,n,r)=>{const i=s._currentIteration;if(js(s,e,t,n,r),s._hasChildren){const a=s,h=a.backwards,u=n?e:a._iterationTime,p=kt();let f=0,g=!0;if(!n&&a._currentIteration!==i){const l=a.iterationDuration;ie(a,c=>{if(!h)!c.completed&&!c.backwards&&c._currentTime<c.iterationDuration&&js(c,l,t,1,Ge.FORCE),c.began=!1,c.completed=!1;else{const o=c.duration,d=c._offset+c._delay,m=d+o;!t&&o<=ee&&(!d||m===l)&&c.onComplete(c)}}),t||a.onLoop(a)}ie(a,l=>{const c=N((u-l._offset)*l._speed,12),o=l._fps<a._fps?l.requestTick(p):r;f+=js(l,c,t,n,o),!l.completed&&g&&(g=!1)},h),!t&&f&&a.onRender(a),(g||h)&&a._currentTime>=a.duration&&(a.paused=!0,a.completed||(a.completed=!0,t||(a.onComplete(a),a._resolve(a))))}},Ut={animation:null,update:W},xl=s=>{let e=Ut.animation;return e||(e={duration:ee,computeDeltaTime:W,_offset:0,_delay:0,_head:null,_tail:null},Ut.animation=e,Ut.update=()=>{s.forEach(t=>{for(let n in t){const r=t[n],i=r._head;if(i){const a=i._valueType,h=a===Z.COMPLEX||a===Z.COLOR?Be(i._fromNumbers):null;let u=i._fromNumber,p=r._tail;for(;p&&p!==i;){if(h)for(let f=0,g=p._numbers.length;f<g;f++)h[f]+=p._numbers[f];else u+=p._number;p=p._prevAdd}i._toNumber=u,i._toNumbers=h}}}),js(e,1,1,0,Ge.FORCE)}),e},no=ot?requestAnimationFrame:setImmediate,wl=ot?cancelAnimationFrame:clearImmediate;class Tl extends ro{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Yi,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=kt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const i=r._next;r.paused?(mt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Rt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Ge.AUTO),r=i}Ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(kt()),this.reqId=no(io)),this}pause(){if(this.reqId)return this.paused=!0,Cl()}resume(){if(this.paused)return this.paused=!1,ie(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(G.timeScale===1?1:Ne)}set speed(e){this._speed=e*G.timeScale,ie(this,t=>t.speed=t._speed)}get timeUnit(){return G.timeScale===1?\\\"ms\\\":\\\"s\\\"}set timeUnit(e){const n=e===\\\"s\\\",r=n?.001:1;if(G.timeScale!==r){G.timeScale=r,G.tickThreshold=200*r;const i=n?.001:Ne;this.defaults.duration*=i,this._speed*=i}}get precision(){return G.precision}set precision(e){G.precision=e}}const Se=(()=>{const s=new Tl(kt());return ot&&(Ji.engine=s,H.addEventListener(\\\"visibilitychange\\\",()=>{s.pauseOnDocumentHidden&&(H.hidden?s.pause():s.resume())})),s})(),io=()=>{Se._head?(Se.reqId=no(io),Se.update()):Se.reqId=0},Cl=()=>(wl(Se.reqId),Se.reqId=0,Se),Pl=(s,e,t)=>{const n=s.style.transform;let r;if(n){const i=s[ns];let a;for(;a=_l.exec(n);){const h=a[1],u=a[2].slice(1,-1);i[h]=u,h===e&&(r=u,t&&(t[e]=u))}}return n&&!I(r)?r:_e(e,\\\"scale\\\")?\\\"1\\\":_e(e,\\\"rotate\\\")||_e(e,\\\"skew\\\")?\\\"0deg\\\":\\\"0px\\\"};function Jr(s){const e=ze(s)?me.root.querySelectorAll(s):s;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Ke(s){if(os(s))return[];if(!ot)return Le(s)&&s.flat(1/0)||[s];if(Le(s)){const t=s.flat(1/0),n=[];for(let r=0,i=t.length;r<i;r++){const a=t[r];if(!os(a)){const h=Jr(a);if(h)for(let u=0,p=h.length;u<p;u++){const f=h[u];if(!os(f)){let g=!1;for(let l=0,c=n.length;l<c;l++)if(n[l]===f){g=!0;break}g||n.push(f)}}else{let u=!1;for(let p=0,f=n.length;p<f;p++)if(n[p]===a){u=!0;break}u||n.push(a)}}}return n}const e=Jr(s);return e?Array.from(e):[s]}function cs(s){const e=Ke(s),t=e.length;if(t)for(let n=0;n<t;n++){const r=e[n];if(!r[zi]){r[zi]=!0;const i=zr(r);(r.nodeType||i)&&(r[Qs]=!0,r[qr]=i,r[ns]={})}}return e}const oo=s=>{const t=Ke(s)[0];if(!(!t||!zr(t)))return t},El=(s,e=.33)=>t=>{const n=oo(s);if(!n)return;const r=t.tagName===\\\"path\\\",i=r?\\\" \\\":\\\",\\\",a=t[$i];a&&t.setAttribute(r?\\\"d\\\":\\\"points\\\",a);let h=\\\"\\\",u=\\\"\\\";if(!e)h=t.getAttribute(r?\\\"d\\\":\\\"points\\\"),u=n.getAttribute(r?\\\"d\\\":\\\"points\\\");else{const p=t.getTotalLength(),f=n.getTotalLength(),g=Math.max(Math.ceil(p*e),Math.ceil(f*e));for(let l=0;l<g;l++){const c=l/(g-1),o=t.getPointAtLength(p*c),d=n.getPointAtLength(f*c),m=r?l===0?\\\"M\\\":\\\"L\\\":\\\"\\\";h+=m+N(o.x,3)+i+o.y+\\\" \\\",u+=m+N(d.x,3)+i+d.y+\\\" \\\"}}return t[$i]=u,[h,u]},Ll=s=>{let e=1;if(s&&s.getCTM){const t=s.getCTM();if(t){const n=xt(t.a*t.a+t.b*t.b),r=xt(t.c*t.c+t.d*t.d);e=(n+r)/2}}return e},Al=(s,e,t)=>{const n=Ne,r=getComputedStyle(s),i=r.strokeLinecap,a=r.vectorEffect===\\\"non-scaling-stroke\\\"?s:null;let h=i;const u=new Proxy(s,{get(p,f){const g=p[f];return f===Ui?p:f===\\\"setAttribute\\\"?(...l)=>{if(l[0]===\\\"draw\\\"){const o=l[1].split(\\\" \\\"),d=+o[0],m=+o[1],v=Ll(a),_=d*-1e3*v,S=m*n*v+_,y=n*v+(d===0&&m===1||d===1&&m===0?0:10*v)-S;if(i!==\\\"butt\\\"){const b=d===m?\\\"butt\\\":i;h!==b&&(p.style.strokeLinecap=`${b}`,h=b)}p.setAttribute(\\\"stroke-dashoffset\\\",`${_}`),p.setAttribute(\\\"stroke-dasharray\\\",`${S} ${y}`)}return Reflect.apply(g,p,l)}:fe(g)?(...l)=>Reflect.apply(g,p,l):g}});return s.getAttribute(\\\"pathLength\\\")!==`${n}`&&(s.setAttribute(\\\"pathLength\\\",`${n}`),u.setAttribute(\\\"draw\\\",`${e} ${t}`)),u},Rl=(s,e=0,t=0)=>Ke(s).map(r=>Al(r,e,t)),Qr=(s,e,t=0)=>s.getPointAtLength(e+t>=1?e+t:0),Kr=(s,e)=>t=>{const n=+s.getTotalLength(),r=t[qr],i=s.getCTM();return{from:0,to:n,modifier:a=>{if(e===\\\"a\\\"){const h=Qr(s,a,-1),u=Qr(s,a,1);return Ks(u.y-h.y,u.x-h.x)*180/zt}else{const h=Qr(s,a,0);return e===\\\"x\\\"?r||!i?h.x:h.x*i.a+h.y*i.c+i.e:r||!i?h.y:h.x*i.b+h.y*i.d+i.f}}}},Ol=s=>{const e=oo(s);if(e)return{translateX:Kr(e,\\\"x\\\"),translateY:Kr(e,\\\"y\\\"),rotate:Kr(e,\\\"a\\\")}},Ml=[\\\"opacity\\\",\\\"rotate\\\",\\\"overflow\\\",\\\"color\\\"],Il=(s,e)=>{if(Ml.includes(e))return!1;if(s.getAttribute(e)||e in s){if(e===\\\"scale\\\"){const t=s.parentNode;return t&&t.tagName===\\\"filter\\\"}return!0}},Nl={morphTo:El,createMotionPath:Ol,createDrawable:Rl},Bl=s=>{const e=dl.exec(s)||gl.exec(s),t=I(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],t]},Dl=s=>{const e=s.length,t=e===4||e===5;return[+(\\\"0x\\\"+s[1]+s[t?1:2]),+(\\\"0x\\\"+s[t?2:3]+s[t?2:4]),+(\\\"0x\\\"+s[t?3:5]+s[t?3:6]),e===5||e===9?+(+(\\\"0x\\\"+s[t?4:7]+s[t?4:8])/255).toFixed(3):1]},Zr=(s,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*(2/3-t)*6:s),ql=s=>{const e=ml.exec(s)||vl.exec(s),t=+e[1]/360,n=+e[2]/100,r=+e[3]/100,i=I(e[4])?1:+e[4];let a,h,u;if(n===0)a=h=u=r;else{const p=r<.5?r*(1+n):r+n-r*n,f=2*r-p;a=N(Zr(f,p,t+1/3)*255,0),h=N(Zr(f,p,t)*255,0),u=N(Zr(f,p,t-1/3)*255,0)}return[a,h,u,i]},Hl=s=>Zi(s)?Bl(s):Ki(s)?Dl(s):ji(s)?ql(s):[0,0,0,1],D=(s,e)=>I(s)?e:s,Ye=(s,e,t,n,r)=>{if(fe(s)){const i=()=>{const a=s(e,t,n);return isNaN(+a)?a||0:+a};return r&&(r.func=i),i()}else return s},jr=(s,e)=>s[Qs]?s[qr]&&Il(s,e)?pe.ATTRIBUTE:is.includes(e)||Fr.get(e)?pe.TRANSFORM:_e(e,\\\"--\\\")?pe.CSS_VAR:e in s.style?pe.CSS:e in s?pe.OBJECT:pe.ATTRIBUTE:pe.OBJECT,ao=(s,e,t)=>{const n=s.style[e];n&&t&&(t[e]=n);const r=n||getComputedStyle(s[Ui]||s).getPropertyValue(e);return r===\\\"auto\\\"?\\\"0\\\":r},Ot=(s,e,t,n)=>{const r=I(t)?jr(s,e):t;return r===pe.OBJECT?s[e]||0:r===pe.ATTRIBUTE?s.getAttribute(e):r===pe.TRANSFORM?Pl(s,e,n):r===pe.CSS_VAR?ao(s,e,n).trimStart():ao(s,e,n)},Mt=(s,e,t)=>t===\\\"-\\\"?s-e:t===\\\"+\\\"?s+e:s*e,en=()=>({t:Z.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ze=(s,e)=>{if(e.t=Z.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!s)return e;const t=+s;if(isNaN(t)){let n=s;n[1]===\\\"=\\\"&&(e.o=n[0],n=n.slice(2));const r=n.includes(\\\" \\\")?!1:Gi.exec(n);if(r)return e.t=Z.UNIT,e.n=+r[1],e.u=r[2],e;if(e.o)return e.n=+n,e;if(bl(n))return e.t=Z.COLOR,e.d=Hl(n),e;{const i=n.match(Wi);return e.t=Z.COMPLEX,e.d=i?i.map(Number):[],e.s=n.split(Wi)||[],e}}else return e.n=t,e},lo=(s,e)=>(e.t=s._valueType,e.n=s._toNumber,e.u=s._unit,e.o=null,e.d=Be(s._toNumbers),e.s=Be(s._strings),e),De=en(),er={_rep:new WeakMap,_add:new Map},tn=(s,e,t=\\\"_rep\\\")=>{const n=er[t];let r=n.get(s);return r||(r={},n.set(s,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Fl=(s,e)=>s._isOverridden||s._absoluteStartTime>e._absoluteStartTime,tr=s=>{s._isOverlapped=1,s._isOverridden=1,s._changeDuration=ee,s._currentTime=ee},co=(s,e)=>{const t=s._composition;if(t===ke.replace){const n=s._absoluteStartTime;vt(e,s,Fl,\\\"_prevRep\\\",\\\"_nextRep\\\");const r=s._prevRep;if(r){const i=r.parent,a=r._absoluteStartTime+r._changeDuration;if(s.parent.id!==i.id&&i.iterationCount>1&&a+(i.duration-i.iterationDuration)>n){tr(r);let p=r._prevRep;for(;p&&p.parent.id===i.id;)tr(p),p=p._prevRep}const h=n-s._delay;if(a>h){const p=r._startTime,f=a-(p+r._updateDuration),g=N(h-f-p,12);r._changeDuration=g,r._currentTime=g,r._isOverlapped=1,g<ee&&tr(r)}let u=!0;if(ie(i,p=>{p._isOverlapped||(u=!1)}),u){const p=i.parent;if(p){let f=!0;ie(p,g=>{g!==i&&ie(g,l=>{l._isOverlapped||(f=!1)})}),f&&p.cancel()}else i.cancel()}}}else if(t===ke.blend){const n=tn(s.target,s.property,\\\"_add\\\"),r=xl(er._add);let i=n._head;i||(i={...s},i._composition=ke.replace,i._updateDuration=ee,i._startTime=0,i._numbers=Be(s._fromNumbers),i._number=0,i._next=null,i._prev=null,vt(n,i),vt(r,i));const a=s._toNumber;if(s._fromNumber=i._fromNumber-a,s._toNumber=0,s._numbers=Be(s._fromNumbers),s._number=0,i._fromNumber=a,s._toNumbers){const h=Be(s._toNumbers);h&&h.forEach((u,p)=>{s._fromNumbers[p]=i._fromNumbers[p]-u,s._toNumbers[p]=0}),i._fromNumbers=h}vt(n,s,null,\\\"_prevAdd\\\",\\\"_nextAdd\\\")}return s},uo=s=>{const e=s._composition;if(e!==ke.none){const t=s.target,n=s.property,a=er._rep.get(t)[n];if(mt(a,s,\\\"_prevRep\\\",\\\"_nextRep\\\"),e===ke.blend){const h=er._add,u=h.get(t);if(!u)return;const p=u[n],f=Ut.animation;mt(p,s,\\\"_prevAdd\\\",\\\"_nextAdd\\\");const g=p._head;if(g&&g===p._tail){mt(p,g,\\\"_prevAdd\\\",\\\"_nextAdd\\\"),mt(f,g);let l=!0;for(let c in u)if(u[c]._head){l=!1;break}l&&h.delete(t)}}}return s},ho=s=>(s.paused=!0,s.began=!1,s.completed=!1,s),sn=s=>(s._cancelled&&(s._hasChildren?ie(s,sn):ie(s,e=>{e._composition!==ke.none&&co(e,tn(e.target,e.property))}),s._cancelled=0),s);let Vl=0;class Je extends ro{constructor(e={},t=null,n=0){super(0);const{id:r,delay:i,duration:a,reversed:h,alternate:u,loop:p,loopDelay:f,autoplay:g,frameRate:l,playbackRate:c,onComplete:o,onLoop:d,onPause:m,onBegin:v,onBeforeUpdate:_,onUpdate:S}=e;me.current&&me.current.register(this);const y=t?0:Se._elapsedTime,b=t?t.defaults:G.defaults,k=fe(i)||I(i)?b.delay:+i,x=fe(a)||I(a)?1/0:+a,C=D(p,b.loop),O=D(f,b.loopDelay),P=C===!0||C===1/0||C<0?1/0:C+1;let w=0;t?w=n:(Se.reqId||Se.requestTick(kt()),w=(Se._elapsedTime-Se._startTime)*G.timeScale),this.id=I(r)?++Vl:r,this.parent=t,this.duration=Zs((x+O)*P-O)||ee,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=v||b.onBegin,this.onBeforeUpdate=_||b.onBeforeUpdate,this.onUpdate=S||b.onUpdate,this.onLoop=d||b.onLoop,this.onPause=m||b.onPause,this.onComplete=o||b.onComplete,this.iterationDuration=x,this.iterationCount=P,this._autoplay=t?!1:D(g,b.autoplay),this._offset=w,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=W,this._running=!1,this._reversed=+D(h,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=D(u,b.alternate),this._prev=null,this._next=null,this._elapsedTime=y,this._startTime=y,this._lastTime=y,this._fps=D(l,b.frameRate),this._speed=D(c,b.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return F(N(this._currentTime,G.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return N(this._iterationTime,G.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return F(N(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return F(N(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*F(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return sn(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Rt(this,0,1,e,Ge.FORCE),ho(this),this._hasChildren&&ie(this,ho),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Rt(this,this.duration,1,e,Ge.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!I(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Se._speed);return this._startTime=kt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=ee&&!this._hasChildren?Rt(this,ee,0,0,Ge.FORCE):(this._running||(vt(Se,this),Se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Se.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){sn(this),this.completed=!1;const r=this.paused;return this.paused=!0,Rt(this,e+this._delay,~~t,~~n,Ge.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?as(Ht/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?ie(this,e=>e.cancel(),!0):ie(this,uo),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=$t(e);if(t===n)return this;const r=e/t,i=e<=ee;return this.duration=i?ee:n,this.iterationDuration=i?ee:$t(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Rt(this,0,1,0,Ge.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const zl=s=>new Je(s,null,0).init(),yt=s=>s,po=(s,e,t)=>(((1-3*t+3*e)*s+(3*t-6*e))*s+3*e)*s,$l=(s,e,t)=>{let n=0,r=1,i,a,h=0;do a=n+(r-n)/2,i=po(a,e,t)-s,i>0?r=a:n=a;while(at(i)>1e-7&&++h<100);return a},Ul=(s=.5,e=0,t=.5,n=1)=>s===e&&t===n?yt:r=>r===0||r===1?r:po($l(r,s,t),e,n),Wl=(s=10,e)=>{const t=e?Sl:as;return n=>t(F(n,0,1)*s)*(1/s)},fo=(...s)=>{const e=s.length;if(!e)return yt;const t=e-1,n=s[0],r=s[t],i=[0],a=[Lt(n)];for(let h=1;h<t;h++){const u=s[h],p=ze(u)?u.trim().split(\\\" \\\"):[u],f=p[0],g=p[1];i.push(I(g)?h/t:Lt(g)/100),a.push(Lt(f))}return a.push(Lt(r)),i.push(1),function(u){for(let p=1,f=i.length;p<f;p++){const g=i[p];if(u<=g){const l=i[p-1],c=a[p-1];return c+(a[p]-c)*(u-l)/(g-l)}}return a[a.length-1]}},Gl=(s=10,e=1)=>{const t=[0],n=s-1;for(let r=1;r<n;r++){const i=t[r-1],a=r/n,h=(r+1)/n,u=a+(h-a)*Math.random(),p=a*(1-e)+u*e;t.push(F(p,i,1))}return t.push(1),fo(...t)},Xl=zt/2,go=zt*2,Wt=(s=1.68)=>e=>Vt(e,+s),mo={[dt]:Wt,Quad:Wt(2),Cubic:Wt(3),Quart:Wt(4),Quint:Wt(5),Sine:s=>1-Ur(s*Xl),Circ:s=>1-xt(1-s*s),Expo:s=>s?Vt(2,10*s-10):0,Bounce:s=>{let e,t=4;for(;s<((e=Vt(2,--t))-1)/11;);return 1/Vt(4,3-t)-7.5625*Vt((e*3-2)/22-s,2)},Back:(s=1.70158)=>e=>(+s+1)*e*e*e-+s*e*e,Elastic:(s=1,e=.3)=>{const t=F(+s,1,10),n=F(+e,ee,2),r=n/go*kl(1/t),i=go/n;return a=>a===0||a===1?a:-t*Vt(2,-10*(1-a))*$r((1-a-r)*i)}},us={in:s=>e=>s(e),out:s=>e=>1-s(1-e),inOut:s=>e=>e<.5?s(e*2)/2:1-s(e*-2+2)/2,outIn:s=>e=>e<.5?(1-s(1-e*2))/2:(s(e*2-1)+1)/2},vo=(s,e,t)=>{if(t[s])return t[s];if(s.indexOf(\\\"(\\\")<=-1){const r=us[s]||s.includes(\\\"Back\\\")||s.includes(\\\"Elastic\\\")?e[s]():e[s];return r?t[s]=r:yt}else{const n=s.slice(0,-1).split(\\\"(\\\"),r=e[n[0]];return r?t[s]=r(...n[1].split(\\\",\\\")):yt}},Gt=(()=>{const s={linear:fo,irregular:Gl,steps:Wl,cubicBezier:Ul};for(let e in us)for(let t in mo){const n=mo[t],r=us[e];s[e+t]=t===dt||t===\\\"Back\\\"||t===\\\"Elastic\\\"?(i,a)=>r(n(i,a)):r(n)}return s})(),Yl={linear:yt},It=s=>fe(s)?s:ze(s)?vo(s,Gt,Yl):yt,yo={},rn=(s,e,t)=>{if(t===pe.TRANSFORM){const n=Fr.get(s);return n||s}else if(t===pe.CSS||t===pe.ATTRIBUTE&&zr(e)&&s in e.style){const n=yo[s];if(n)return n;{const r=s&&Qi(s);return yo[s]=r,r}}else return s},nn={deg:1,rad:180/zt,turn:360},_o={},on=(s,e,t,n=!1)=>{const r=e.u,i=e.n;if(e.t===Z.UNIT&&r===t)return e;const a=i+r+t,h=_o[a];if(!I(h)&&!n)e.n=h;else{let u;if(r in nn)u=i*nn[r]/nn[t];else{const f=s.cloneNode(),g=s.parentNode,l=g&&g!==H?g:H.body;l.appendChild(f);const c=f.style;c.width=100+r;const o=f.offsetWidth||100;c.width=100+t;const d=f.offsetWidth||100,m=o/d;l.removeChild(f),u=m*i}e.n=u,_o[a]=u}return e.t,Z.UNIT,e.u=t,e},sr=s=>{if(s._hasChildren)ie(s,sr,!0);else{const e=s;e.pause(),ie(e,t=>{const n=t.property,r=t.target;if(r[Qs]){const i=r.style,a=e._inlineStyles[n];if(t._tweenType===pe.TRANSFORM){const h=r[ns];if(I(a)||a===dt?delete h[n]:h[n]=a,t._renderTransforms)if(!Object.keys(h).length)i.removeProperty(\\\"transform\\\");else{let u=dt;for(let p in h)u+=Vr[p]+h[p]+\\\") \\\";i.transform=u}}else I(a)||a===dt?i.removeProperty(n):i[n]=a;e._tail===t&&e.targets.forEach(h=>{h.getAttribute&&h.getAttribute(\\\"style\\\")===dt&&h.removeAttribute(\\\"style\\\")})}})}return s},X=en(),K=en(),rr={func:null},nr=[null],Xt=[null,null],ir={to:null};let Jl=0,wt,lt;const Ql=(s,e)=>{const t={};if(Le(s)){const n=[].concat(...s.map(r=>Object.keys(r))).filter(Ft);for(let r=0,i=n.length;r<i;r++){const a=n[r],h=s.map(u=>{const p={};for(let f in u){const g=u[f];Ft(f)?f===a&&(p.to=g):p[f]=g}return p});t[a]=h}}else{const n=D(e.duration,G.defaults.duration);Object.keys(s).map(i=>({o:parseFloat(i)/100,p:s[i]})).sort((i,a)=>i.o-a.o).forEach(i=>{const a=i.o,h=i.p;for(let u in h)if(Ft(u)){let p=t[u];p||(p=t[u]=[]);const f=a*n;let g=p.length,l=p[g-1];const c={to:h[u]};let o=0;for(let d=0;d<g;d++)o+=p[d].duration;g===1&&(c.from=l.to),h.ease&&(c.ease=h.ease),c.duration=f-(g?o:0),p.push(c)}return i});for(let i in t){const a=t[i];let h;for(let u=0,p=a.length;u<p;u++){const f=a[u],g=f.ease;f.ease=h||void 0,h=g}a[0].duration||a.shift()}}return t};class _t extends Je{constructor(e,t,n,r,i=!1,a=0,h=0){super(t,n,r);const u=cs(e),p=u.length,f=t.keyframes,g=f?ls(Ql(f,t),t):t,{delay:l,duration:c,ease:o,playbackEase:d,modifier:m,composition:v,onRender:_}=g,S=n?n.defaults:G.defaults,y=D(d,S.playbackEase),b=y?It(y):null,k=!I(o)&&!I(o.ease),x=k?o.ease:D(o,b?\\\"linear\\\":S.ease),C=k?o.duration:D(c,S.duration),O=D(l,S.delay),P=m||S.modifier,w=I(v)&&p>=Ne?ke.none:I(v)?S.composition:v,E={},L=this._offset+(n?n._offset:0);let M=NaN,q=NaN,V=0,U=0;for(let z=0;z<p;z++){const R=u[z],ae=a||z,te=h||p;let xe=NaN,ve=NaN;for(let $ in g)if(Ft($)){const j=jr(R,$),re=rn($,R,j);let ue=g[$];const ct=Le(ue);if(i&&!ct&&(Xt[0]=ue,Xt[1]=ue,ue=Xt),ct){const Te=ue.length,Ue=!be(ue[0]);Te===2&&Ue?(ir.to=ue,nr[0]=ir,wt=nr):Te>2&&Ue?(wt=[],ue.forEach((Ce,Re)=>{Re?Re===1?(Xt[1]=Ce,wt.push(Xt)):wt.push(Ce):Xt[0]=Ce})):wt=ue}else nr[0]=ue,wt=nr;let Ae=null,we=null,he=NaN,se=0,Y=0;for(let Te=wt.length;Y<Te;Y++){const Ue=wt[Y];be(Ue)?lt=Ue:(ir.to=Ue,lt=ir),rr.func=null;const Ce=Ye(lt.to,R,ae,te,rr);let Re;be(Ce)&&!I(Ce.to)?(lt=Ce,Re=Ce.to):Re=Ce;const St=Ye(lt.from,R,ae,te),qe=lt.ease,ge=!I(qe)&&!I(qe.ease),T=ge?qe.ease:qe||x,A=ge?qe.duration:Ye(D(lt.duration,Te>1?Ye(C,R,ae,te)/Te:C),R,ae,te),B=Ye(D(lt.delay,Y?0:O),R,ae,te),J=Ye(D(lt.composition,w),R,ae,te),Q=Xe(J)?J:ke[J],ye=lt.modifier||P,Pe=!I(St),Ee=!I(Re),je=Le(Re),de=je||Pe&&Ee,kn=we?se+B:B,xn=N(L+kn,12);!U&&(Pe||je)&&(U=1);let et=we;if(Q!==ke.none){Ae||(Ae=tn(R,re));let ce=Ae._head;for(;ce&&!ce._isOverridden&&ce._absoluteStartTime<=xn;)if(et=ce,ce=ce._nextRep,ce&&ce._absoluteStartTime>=xn)for(;ce;)tr(ce),ce=ce._nextRep}if(de?(Ze(je?Ye(Re[0],R,ae,te):St,X),Ze(je?Ye(Re[1],R,ae,te,rr):Re,K),X.t===Z.NUMBER&&(et?et._valueType===Z.UNIT&&(X.t=Z.UNIT,X.u=et._unit):(Ze(Ot(R,re,j,E),De),De.t===Z.UNIT&&(X.t=Z.UNIT,X.u=De.u)))):(Ee?Ze(Re,K):we?lo(we,K):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,j,E),K),Pe?Ze(St,X):we?lo(we,X):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,j,E),X)),X.o&&(X.n=Mt(et?et._toNumber:Ze(Ot(R,re,j,E),De).n,X.n,X.o)),K.o&&(K.n=Mt(X.n,K.n,K.o)),X.t!==K.t){if(X.t===Z.COMPLEX||K.t===Z.COMPLEX){const ce=X.t===Z.COMPLEX?X:K,Oe=X.t===Z.COMPLEX?K:X;Oe.t=Z.COMPLEX,Oe.s=Be(ce.s),Oe.d=ce.d.map(()=>Oe.n)}else if(X.t===Z.UNIT||K.t===Z.UNIT){const ce=X.t===Z.UNIT?X:K,Oe=X.t===Z.UNIT?K:X;Oe.t=Z.UNIT,Oe.u=ce.u}else if(X.t===Z.COLOR||K.t===Z.COLOR){const ce=X.t===Z.COLOR?X:K,Oe=X.t===Z.COLOR?K:X;Oe.t=Z.COLOR,Oe.s=ce.s,Oe.d=[0,0,0,1]}}if(X.u!==K.u){let ce=K.u?X:K;ce=on(R,ce,K.u?K.u:X.u,!1)}if(K.d&&X.d&&K.d.length!==X.d.length){const ce=X.d.length>K.d.length?X:K,Oe=ce===X?K:X;Oe.d=ce.d.map((Bc,zo)=>I(Oe.d[zo])?0:Oe.d[zo]),Oe.s=Be(ce.s)}const wn=N(+A||ee,12),yr={parent:this,id:Jl++,property:re,target:R,_value:null,_func:rr.func,_ease:It(T),_fromNumbers:Be(X.d),_toNumbers:Be(K.d),_strings:Be(K.s),_fromNumber:X.n,_toNumber:K.n,_numbers:Be(X.d),_number:X.n,_unit:K.u,_modifier:ye,_currentTime:0,_startTime:kn,_delay:+B,_updateDuration:wn,_changeDuration:wn,_absoluteStartTime:xn,_tweenType:j,_valueType:K.t,_composition:Q,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};Q!==ke.none&&co(yr,Ae),isNaN(he)&&(he=yr._startTime),se=N(kn+wn,12),we=yr,V++,vt(this,yr)}(isNaN(q)||he<q)&&(q=he),(isNaN(M)||se>M)&&(M=se),j===pe.TRANSFORM&&(xe=V-Y,ve=V)}if(!isNaN(xe)){let $=0;ie(this,j=>{$>=xe&&$<ve&&(j._renderTransforms=1,j._composition===ke.blend&&ie(Ut.animation,re=>{re.id===j.id&&(re._renderTransforms=1)})),$++})}}p||console.warn(\\\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\\\"),q?(ie(this,z=>{z._startTime-z._delay||(z._delay-=q),z._startTime-=q}),M-=q):q=0,M||(M=ee,this.iterationCount=0),this.targets=u,this.duration=M===ee?ee:Zs((M+this._loopDelay)*this.iterationCount-this._loopDelay)||ee,this.onRender=_||S.onRender,this._ease=b,this._delay=q,this.iterationDuration=M,this._inlineStyles=E,!this._autoplay&&U&&this.onRender(this)}stretch(e){const t=this.duration;if(t===$t(e))return this;const n=e/t;return ie(this,r=>{r._updateDuration=$t(r._updateDuration*n),r._changeDuration=$t(r._changeDuration*n),r._currentTime*=n,r._startTime*=n,r._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ie(this,e=>{const t=e._func;if(t){const n=Ot(e.target,e.property,e._tweenType);Ze(n,De),Ze(t(),K),e._fromNumbers=Be(De.d),e._fromNumber=De.n,e._toNumbers=Be(K.d),e._strings=Be(K.s),e._toNumber=K.o?Mt(De.n,K.n,K.o):K.n}}),this}revert(){return super.revert(),sr(this)}then(e){return super.then(e)}}const hs=(s,e)=>new _t(s,e,null,0,!1).init(),or=(s,e=100)=>{const t=[];for(let n=0;n<=e;n++)t.push(s(n/e));return`linear(${t.join(\\\", \\\")})`},an={in:\\\"ease-in\\\",out:\\\"ease-out\\\",inOut:\\\"ease-in-out\\\"},Kl=(()=>{const s={};for(let e in us)s[e]=t=>us[e](Wt(t));return s})(),ln=s=>{let e=an[s];if(e)return e;if(e=\\\"linear\\\",ze(s)){if(_e(s,\\\"linear\\\")||_e(s,\\\"cubic-\\\")||_e(s,\\\"steps\\\")||_e(s,\\\"ease\\\"))e=s;else if(_e(s,\\\"cubicB\\\"))e=Qi(s);else{const t=vo(s,Kl,an);fe(t)&&(e=t===yt?\\\"linear\\\":or(t))}an[s]=e}else if(fe(s)){const t=or(s);t&&(e=t)}else s.ease&&(e=or(s.ease));return e},bo=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],Zl=[\\\"perspective\\\",\\\"width\\\",\\\"height\\\",\\\"margin\\\",\\\"padding\\\",\\\"top\\\",\\\"right\\\",\\\"bottom\\\",\\\"left\\\",\\\"borderWidth\\\",\\\"fontSize\\\",\\\"borderRadius\\\",...bo],jl=[...bo,...is.filter(s=>[\\\"X\\\",\\\"Y\\\",\\\"Z\\\"].some(e=>s.endsWith(e)))];let cn=null;const un={_head:null,_tail:null},hn=(s,e,t)=>{let n=un._head;for(;n;){const r=n._next,i=n.$el===s,a=!e||n.property===e,h=!t||n.parent===t;if(i&&a&&h){const u=n.animation;try{u.commitStyles()}catch{}u.cancel(),mt(un,n);const p=n.parent;p&&(p._completed++,p.animations.length===p._completed&&(p.completed=!0,p.muteCallbacks||(p.paused=!0,p.onComplete(p),p._resolve(p))))}n=r}},So=(s,e,t,n,r)=>{const i=e.animate(n,r),a=r.delay+ +r.duration*r.iterations;i.playbackRate=s._speed,s.paused&&i.pause(),s.duration<a&&(s.duration=a,s.controlAnimation=i),s.animations.push(i),hn(e,t),vt(un,{parent:s,animation:i,$el:e,property:t,_next:null,_prev:null});const h=()=>{hn(e,t,s)};return i.onremove=h,i.onfinish=h,i},ps=(s,e,t,n,r)=>{let i=Ye(e,t,n,r);return Xe(i)?Zl.includes(s)||_e(s,\\\"translate\\\")?`${i}px`:_e(s,\\\"rotate\\\")||_e(s,\\\"skew\\\")?`${i}deg`:`${i}`:i},ko=(s,e,t,n,r,i)=>{let a=\\\"0\\\";const h=I(n)?getComputedStyle(s)[e]:ps(e,n,s,r,i);return I(t)?a=Le(n)?n.map(u=>ps(e,u,s,r,i)):h:a=[ps(e,t,s,r,i),h],a};class xo{constructor(e,t){me.current&&me.current.register(this),os(cn)&&(ot&&(I(CSS)||!Object.hasOwnProperty.call(CSS,\\\"registerProperty\\\"))?cn=!1:(is.forEach(v=>{const _=_e(v,\\\"skew\\\"),S=_e(v,\\\"scale\\\"),y=_e(v,\\\"rotate\\\"),b=_e(v,\\\"translate\\\"),k=y||_,x=k?\\\"<angle>\\\":S?\\\"<number>\\\":b?\\\"<length-percentage>\\\":\\\"*\\\";try{CSS.registerProperty({name:\\\"--\\\"+v,syntax:x,inherits:!1,initialValue:b?\\\"0px\\\":k?\\\"0deg\\\":S?\\\"1\\\":\\\"0\\\"})}catch{}}),cn=!0));const n=cs(e),r=n.length;r||console.warn(\\\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\\\");const i=D(t.ease,ln(G.defaults.ease)),a=i.ease&&i,h=D(t.autoplay,G.defaults.autoplay),u=h&&h.link?h:!1,p=t.alternate&&t.alternate===!0,f=t.reversed&&t.reversed===!0,g=D(t.loop,G.defaults.loop),l=g===!0||g===1/0?1/0:Xe(g)?g+1:1,c=p?f?\\\"alternate-reverse\\\":\\\"alternate\\\":f?\\\"reverse\\\":\\\"normal\\\",o=\\\"forwards\\\",d=ln(i),m=G.timeScale===1?1:Ne;this.targets=n,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||W,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!h||u!==!1,this.reversed=f,this.autoplay=h,this._speed=D(t.playbackRate,G.defaults.playbackRate),this._resolve=W,this._completed=0,this._inlineStyles=n.map(v=>v.getAttribute(\\\"style\\\")),n.forEach((v,_)=>{const S=v[ns],y=jl.some(C=>t.hasOwnProperty(C)),b=(a?a.duration:Ye(D(t.duration,G.defaults.duration),v,_,r))*m,k=Ye(D(t.delay,G.defaults.delay),v,_,r)*m,x=D(t.composition,\\\"replace\\\");for(let C in t){if(!Ft(C))continue;const O={},P={iterations:l,direction:c,fill:o,easing:d,duration:b,delay:k,composite:x},w=t[C],E=y?is.includes(C)?C:Fr.get(C):!1;let L;if(be(w)){const M=w,q=D(M.ease,i),V=q.ease&&q,U=M.to,z=M.from;if(P.duration=(V?V.duration:Ye(D(M.duration,b),v,_,r))*m,P.delay=Ye(D(M.delay,k),v,_,r)*m,P.composite=D(M.composition,x),P.easing=ln(q),L=ko(v,C,z,U,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=ko(v,C,z,U,_,r),So(this,v,C,O,P),!I(z))if(!E)v.style[C]=O[C][0];else{const R=`--${E}`;v.style.setProperty(R,O[R][0])}}else L=Le(w)?w.map(M=>ps(C,M,v,_,r)):ps(C,w,v,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=L,So(this,v,C,O,P)}if(y){let C=dt;for(let O in S)C+=`${Vr[O]}var(--${O})) `;v.style.transform=C}}),u&&this.autoplay.link(this)}forEach(e){const t=ze(e)?n=>n[e]():e;return this.animations.forEach(t),this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=G.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(G.timeScale===1?1:Ne);this.forEach(n=>{t>=this.duration&&n.play(),n.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach(\\\"play\\\")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach(\\\"pause\\\"))}alternate(){return this.reversed=!this.reversed,this.forEach(\\\"reverse\\\"),this.paused&&this.forEach(\\\"pause\\\"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach(\\\"commitStyles\\\")}complete(){return this.seek(this.duration)}cancel(){return this.forEach(\\\"cancel\\\"),this.pause()}revert(){return this.cancel(),this.targets.forEach((e,t)=>e.setAttribute(\\\"style\\\",this._inlineStyles[t])),this}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const ec={animate:(s,e)=>new xo(s,e),convertEase:or},wo=(s=W)=>new Je({duration:1*G.timeScale,onComplete:s},null,0).resume();function Nt(s,e,t){const n=cs(s);if(!n.length)return;const[r]=n,i=jr(r,e),a=rn(e,r,i);let h=Ot(r,a);if(I(t))return h;if(Ze(h,De),De.t===Z.NUMBER||De.t===Z.UNIT){if(t===!1)return De.n;{const u=on(r,De,t,!1);return`${N(u.n,G.precision)}${u.u}`}}}const Tt=(s,e)=>{if(!I(e))return e.duration=ee,e.composition=D(e.composition,ke.none),new _t(s,e,null,0,!0).resume()},To=(s,e,t)=>{let n=!1;return ie(e,r=>{const i=r.target;if(s.includes(i)){const a=r.property,h=r._tweenType,u=rn(t,i,h);(!u||u&&u===a)&&(r.parent._tail===r&&r._tweenType===pe.TRANSFORM&&r._prev&&r._prev._tweenType===pe.TRANSFORM&&(r._prev._renderTransforms=1),mt(e,r),uo(r),n=!0)}},!0),n},bt=(s,e,t)=>{const n=Ke(s),r=e||Se,i=e&&e.controlAnimation&&e;for(let h=0,u=n.length;h<u;h++){const p=n[h];hn(p,t,i)}let a;if(r._hasChildren){let h=0;ie(r,u=>{if(!u._hasChildren)if(a=To(n,u,t),a&&!u._head)u.cancel(),mt(r,u);else{const f=u._offset+u._delay+u.duration;f>h&&(h=f)}u._head?bt(s,u,t):u._hasChildren=!1},!0),I(r.iterationDuration)||(r.iterationDuration=h)}else a=To(n,r,t);return a&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),n},tc=Yr,sc=s=>s[Xr(0,s.length-1)],rc=(s,e)=>(+s).toFixed(e),nc=(s,e,t)=>`${s}`.padStart(e,t),ic=(s,e,t)=>`${s}`.padEnd(e,t),oc=(s,e,t)=>((s-e)%(t-e)+(t-e))%(t-e)+e,fs=(s,e,t,n,r)=>n+(s-e)/(t-e)*(r-n),ac=s=>s*zt/180,lc=s=>s*180/zt,Co=(s,e,t,n)=>{let r=Ne/G.defaults.frameRate;if(n!==!1){const a=n||Se._hasChildren&&Se;a&&a.deltaTime&&(r=a.deltaTime)}const i=1-Math.exp(-t*r*.1);return t?t===1?e:(1-i)*s+i*e:s},cc=(s,e=0)=>(...t)=>e?n=>s(...t,n):n=>s(n,...t),Po=s=>(...e)=>{const t=s(...e);return new Proxy(W,{apply:(n,r,[i])=>t(i),get:(n,r)=>Po((...i)=>{const a=Eo[r](...i);return h=>a(t(h))})})},nt=(s,e=0)=>(...t)=>(t.length<s.length?Po(cc(s,e)):s)(...t),Eo={$:cs,get:Nt,set:Tt,remove:bt,cleanInlineStyles:sr,random:Xr,randomPick:sc,shuffle:so,lerp:Co,sync:wo,keepTime:tc,clamp:nt(F),round:nt(N),snap:nt(At),wrap:nt(oc),interpolate:nt(gt,1),mapRange:nt(fs),roundPad:nt(rc),padStart:nt(nc),padEnd:nt(ic),degToRad:nt(ac),radToDeg:nt(lc)},uc=(s,e)=>{if(_e(e,\\\"<\\\")){const t=e[1]===\\\"<\\\",n=s._tail,r=n?n._offset+n._delay:0;return t?r:r+n.duration}},ds=(s,e)=>{let t=s.iterationDuration;if(t===ee&&(t=0),I(e))return t;if(Xe(+e))return+e;const n=e,r=s?s.labels:null,i=!os(r),a=uc(s,n),h=!I(a),u=Xi.exec(n);if(u){const p=u[0],f=n.split(p),g=i&&f[0]?r[f[0]]:t,l=h?a:i?g:t,c=+f[1];return Mt(l,c,p[0])}else return h?a:i?I(r[n])?t:r[n]:t};function hc(s){return Zs((s.iterationDuration+s._loopDelay)*s.iterationCount-s._loopDelay)||ee}function pn(s,e,t,n,r,i){const h=Xe(s.duration)&&s.duration<=ee?t-ee:t;Rt(e,h,1,1,Ge.AUTO);const u=n?new _t(n,s,e,h,!1,r,i):new Je(s,e,h);return u.init(1),vt(e,u),ie(e,p=>{const g=p._offset+p._delay+p.duration;g>e.iterationDuration&&(e.iterationDuration=g)}),e.duration=hc(e),e}class Lo extends Je{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=G.defaults;this.defaults=t?ls(t,n):n,this.onRender=e.onRender||n.onRender;const r=D(e.playbackEase,n.playbackEase);this._ease=r?It(r):null,this.iterationDuration=0}add(e,t,n){const r=be(t),i=be(e);if(r||i){if(this._hasChildren=!0,r){const a=t;if(fe(n)){const h=n,u=Ke(e),p=this.duration,f=this.iterationDuration,g=a.id;let l=0;const c=u.length;u.forEach(o=>{const d={...a};this.duration=p,this.iterationDuration=f,I(g)||(d.id=g+\\\"-\\\"+l),pn(d,this,ds(this,h(o,l,c,this)),o,l,c),l++})}else pn(a,this,ds(this,n),e)}else pn(e,this,ds(this,t));return this.init(1)}}sync(e,t){if(I(e)||e&&I(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:\\\"linear\\\"},t)}set(e,t,n){return I(t)?this:(t.duration=ee,t.composition=ke.replace,this.add(e,t,n))}call(e,t){return I(e)||e&&!fe(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return I(e)||e&&!ze(e)?this:(this.labels[e]=ds(this,t),this)}remove(e,t){return bt(e,this,t),this}stretch(e){const t=this.duration;if(t===$t(e))return this;const n=e/t,r=this.labels;ie(this,i=>i.stretch(i.duration*n));for(let i in r)r[i]*=n;return super.stretch(e)}refresh(){return ie(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ie(this,e=>e.revert,!0),sr(this)}then(e){return super.then(e)}}const pc=s=>new Lo(s).init();class fn{constructor(e,t){me.current&&me.current.register(this);const n=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let u=!0;for(let p in this.animations)if(!this.animations[p].paused&&u){u=!1;break}u&&this.callbacks.complete()},i={onBegin:n,onComplete:r,onPause:r},a={v:1,autoplay:!1},h={};if(this.targets=[],this.animations={},this.callbacks=null,!(I(e)||I(t))){for(let u in t){const p=t[u];Ft(u)?h[u]=p:_e(u,\\\"on\\\")?a[u]=p:i[u]=p}this.callbacks=new _t({v:0},a);for(let u in h){const p=h[u],f=be(p);let g={},l=\\\"+=0\\\";if(f){const d=p.unit;ze(d)&&(l+=d)}else g.duration=p;g[u]=f?ls({to:l},p):l;const c=ls(i,g);c.composition=ke.replace,c.autoplay=!1;const o=this.animations[u]=new _t(e,c,null,0,!1).init();this.targets.length||this.targets.push(...o.targets),this[u]=(d,m,v)=>{const _=o._head;if(I(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return ie(o,S=>{if(Le(d))for(let y=0,b=d.length;y<b;y++)I(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=d[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=d;I(v)||(S._ease=It(v)),S._currentTime=0}),I(m)||o.stretch(m),o.reset(1).resume(),this}}}}revert(){for(let e in this.animations)this[e]=W,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const fc=(s,e)=>new fn(s,e),Ct=Ne*10;class Ao{constructor(e={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Ne,this.maxIterations=this.maxDuration/this.timeStep/Ne,this.m=F(D(e.mass,1),0,Ct),this.s=F(D(e.stiffness,100),1,Ct),this.d=F(D(e.damping,10),.1,Ct),this.v=F(D(e.velocity,0),-1e4,Ct),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>t===0||t===1?t:this.solve(t*this.solverDuration)}solve(e){const{zeta:t,w0:n,wd:r,b:i}=this;let a=e;return t<1?a=eo(-a*t*n)*(1*Ur(r*a)+i*$r(r*a)):a=(1+i*a)*eo(-a*n),1-a}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:h,v:u}=this,p=this.w0=F(xt(h/i),ee,Ne),f=this.zeta=a/(2*xt(h*i)),g=this.wd=f<1?p*xt(1-f*f):0;this.b=f<1?(f*p+-u)/g:-u+p;let l=0,c=0,o=0;for(;c<e&&o<t;)at(1-this.solve(l))<n?c++:c=0,this.solverDuration=l,l+=r,o++;this.duration=N(this.solverDuration*Ne,0)*G.timeScale}get mass(){return this.m}set mass(e){this.m=F(D(e,1),0,Ct),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=F(D(e,100),1,Ct),this.compute()}get damping(){return this.d}set damping(e){this.d=F(D(e,10),.1,Ct),this.compute()}get velocity(){return this.v}set velocity(e){this.v=F(D(e,0),-1e4,Ct),this.compute()}}const dn=s=>new Ao(s),Pt=s=>{s.cancelable&&s.preventDefault()};class dc{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:W,remove:W}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class gc{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,n=0;for(;t&&t!==H;)e(t,n),t=t.parentElement,n++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const n=getComputedStyle(t).transform;if(n){const r=new DOMMatrix(n);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform=\\\"none\\\"})}revert(){this.traverseUp((e,t)=>{const n=this.inlineTransforms[t];n===\\\"\\\"?e.style.removeProperty(\\\"transform\\\"):e.style.transform=n})}}const $e=(s,e)=>s&&fe(s)?s(e):s;let ar=0;class Ro{constructor(e,t={}){if(!e)return;me.current&&me.current.register(this);const n=t.x,r=t.y,i=t.trigger,a=t.modifier,h=t.releaseEase,u=h&&It(h),p=!I(h)&&!I(h.ease),f=be(n)&&!I(n.mapTo)?n.mapTo:\\\"translateX\\\",g=be(r)&&!I(r.mapTo)?r.mapTo:\\\"translateY\\\",l=$e(t.container,this);this.containerArray=Le(l)?l:null,this.$container=l&&!this.containerArray?Ke(l)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.$target=be(e)?new dc(e):Ke(e)[0],this.$trigger=Ke(i||e)[0],this.fixed=Nt(this.$target,\\\"position\\\")===\\\"fixed\\\",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=p?h:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseYSpring=p?h:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseEase=u||Gt.outQuint,this.hasReleaseSpring=p,this.onGrab=t.onGrab||W,this.onDrag=t.onDrag||W,this.onRelease=t.onRelease||W,this.onUpdate=t.onUpdate||W,this.onSettle=t.onSettle||W,this.onSnap=t.onSnap||W,this.onResize=t.onResize||W,this.onAfterResize=t.onAfterResize||W,this.disabled=[0,0];const c={};if(a&&(c.modifier=a),I(n)||n===!0)c[f]=0;else if(be(n)){const o=n,d={};o.modifier&&(d.modifier=o.modifier),o.composition&&(d.composition=o.composition),c[f]=d}else n===!1&&(c[f]=0,this.disabled[0]=1);if(I(r)||r===!0)c[g]=0;else if(be(r)){const o=r,d={};o.modifier&&(d.modifier=o.modifier),o.composition&&(d.composition=o.composition),c[g]=d}else r===!1&&(c[g]=0,this.disabled[1]=1);this.animate=new fn(this.$target,c),this.xProp=f,this.yProp=g,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,Ht,Ht,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=kt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new gc(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new Je({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new Je({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!I(l),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?f:g,this.animate.callbacks.onRender=()=>{const o=this.updated,m=!(this.grabbed&&o)&&this.released,v=this.x,_=this.y,S=v-this.coords[2],y=_-this.coords[3];this.deltaX=S,this.deltaY=y,this.coords[2]=v,this.coords[3]=_,o&&(S||y)&&this.onUpdate(this),m?(this.computeVelocity(S,y),this.angle=Ks(y,S)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new Je({autoplay:!1,duration:150*G.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),be(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const n=this.velocityTime,r=kt(),i=r-n;if(i<17)return this.velocity;this.velocityTime=r;const a=this.velocityStack,h=this.velocityMultiplier,u=this.minVelocity,p=this.maxVelocity,f=this.velocityStackIndex;a[f]=N(F(xt(e*e+t*t)/i*h,u,p),5);const g=Wr(a[0],a[1],a[2]);return this.velocity=g,this.velocityStackIndex=(f+1)%3,g}setX(e,t=!1){if(this.disabled[0])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=n,this.snapped[0]=At(n,this.snapX),this.animate[this.xProp](n,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=n,this.snapped[1]=At(n,this.snapY),this.animate[this.yProp](n,0),this.manual=!1,this}get x(){return N(this.animate[this.xProp](),G.precision)}set x(e){this.setX(e,!1)}get y(){return N(this.animate[this.yProp](),G.precision)}set y(e){this.setY(e,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(fs(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(fs(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=N(this.useWin?Ie.scrollX:this.$container.scrollLeft,0),t=N(this.useWin?Ie.scrollY:this.$container.scrollTop,0),[n,r,i,a]=this.containerPadding,h=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+n-h,this.scrollBounds[1]=e-this.targetBounds[1]-r+h,this.scrollBounds[2]=t-this.targetBounds[2]-i+h,this.scrollBounds[3]=e-this.targetBounds[3]+a-h}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,n=this.y,r=this.coords[2],i=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const a=this.window[0]=Ie.innerWidth,h=this.window[1]=Ie.innerHeight,u=this.useWin,p=e.scrollWidth,f=e.scrollHeight,g=this.fixed,l=e.getBoundingClientRect(),[c,o,d,m]=this.containerPadding;this.dragArea[0]=u?0:l.left,this.dragArea[1]=u?0:l.top,this.scrollView[0]=u?F(p,a,p):p,this.scrollView[1]=u?F(f,h,f):f,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:b,bottom:k}=e.getBoundingClientRect();this.dragArea[2]=N(u?F(v,a,a):v,0),this.dragArea[3]=N(u?F(_,h,h):_,0);const x=Nt(e,\\\"overflow\\\"),C=x===\\\"visible\\\",O=x===\\\"hidden\\\";if(this.canScroll=g?!1:this.contained&&(e===H.body&&C||!O&&!C)&&(p>this.dragArea[2]+m-o||f>this.dragArea[3]+c-d)&&(!this.containerArray||this.containerArray&&!Le(this.containerArray)),this.contained){const P=this.scroll.x,w=this.scroll.y,E=this.canScroll,L=this.$target.getBoundingClientRect(),M=E?u?0:e.scrollLeft:0,q=E?u?0:e.scrollTop:0,V=E?this.scrollView[0]-M-v:0,U=E?this.scrollView[1]-q-_:0;this.targetBounds[0]=N(L.top+w-(u?0:y),0),this.targetBounds[1]=N(L.right+P-(u?a:b),0),this.targetBounds[2]=N(L.bottom+w-(u?h:k),0),this.targetBounds[3]=N(L.left+P-(u?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+c,this.containerBounds[1]=this.containerArray[1]-o,this.containerBounds[2]=this.containerArray[2]-d,this.containerBounds[3]=this.containerArray[3]+m):(this.containerBounds[0]=-N(L.top-(g?F(y,0,h):y)+q-c,0),this.containerBounds[1]=-N(L.right-(g?F(b,0,a):b)-V+o,0),this.containerBounds[2]=-N(L.bottom-(g?F(k,0,h):k)-U+d,0),this.containerBounds[3]=-N(L.left-(g?F(S,0,a):S)+M-m,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=i,this.setX(t,!0),this.setY(n,!0)}isOutOfBounds(e,t,n){if(!this.contained)return 0;const[r,i,a,h]=e,[u,p]=this.disabled,f=!u&&t<h||!u&&t>i,g=!p&&n<r||!p&&n>a;return f&&!g?1:!f&&g?2:f&&g?3:0}refresh(){const e=this.parameters,t=e.x,n=e.y,r=$e(e.container,this),i=$e(e.containerPadding,this)||0,a=Le(i)?i:[i,i,i,i],h=this.x,u=this.y,p=$e(e.cursor,this),f={onHover:\\\"grab\\\",onGrab:\\\"grabbing\\\"};if(p){const{onHover:d,onGrab:m}=p;d&&(f.onHover=d),m&&(f.onGrab=m)}this.containerArray=Le(r)?r:null,this.$container=r&&!this.containerArray?Ke(r)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.isFinePointer=matchMedia(\\\"(pointer:fine)\\\").matches,this.containerPadding=D(a,[0,0,0,0]),this.containerFriction=F(D($e(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=F(D($e(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=$e(be(t)&&!I(t.snap)?t.snap:e.snap,this),this.snapY=$e(be(n)&&!I(n.snap)?n.snap:e.snap,this),this.scrollSpeed=D($e(e.scrollSpeed,this),1.5),this.scrollThreshold=D($e(e.scrollThreshold,this),20),this.dragSpeed=D($e(e.dragSpeed,this),1),this.minVelocity=D($e(e.minVelocity,this),0),this.maxVelocity=D($e(e.maxVelocity,this),50),this.velocityMultiplier=D($e(e.velocityMultiplier,this),1),this.cursor=p===!1?!1:f,this.updateBoundingValues();const[g,l,c,o]=this.containerBounds;this.setX(F(h,o,l),!0),this.setY(F(u,g,c),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,b]=this.containerPadding,[k,x]=this.scrollView,C=this.dragArea[2],O=this.dragArea[3],P=this.scroll.x,w=this.scroll.y,E=this.$container.scrollWidth,L=this.$container.scrollHeight,M=this.useWin?F(E,this.window[0],E):E,q=this.useWin?F(L,this.window[1],L):L,V=k-M,U=x-q;this.dragged&&V>0&&(this.coords[0]-=V,this.scrollView[0]=M),this.dragged&&U>0&&(this.coords[1]-=U,this.scrollView[1]=q);const z=this.scrollSpeed*10,R=this.scrollThreshold,[ae,te]=this.coords,[xe,ve,$,j]=this.scrollBounds,re=N(F((te-xe+_)/R,-1,0)*z,0),ue=N(F((ae-ve-S)/R,0,1)*z,0),ct=N(F((te-$-y)/R,0,1)*z,0),Ae=N(F((ae-j+b)/R,-1,0)*z,0);if(re||ct||Ae||ue){const[we,he]=this.disabled;let se=P,Y=w;we||(se=N(F(P+(Ae||ue),0,k-C),0),this.coords[0]-=P-se),he||(Y=N(F(w+(re||ct),0,x-O),0),this.coords[1]-=w-Y),this.useWin?this.$scrollContainer.scrollBy(-(P-se),-(w-Y)):this.$scrollContainer.scrollTo(se,Y)}}const[e,t,n,r]=this.containerBounds,[i,a,h,u,p,f]=this.pointer;this.coords[0]+=(i-p)*this.dragSpeed,this.coords[1]+=(a-f)*this.dragSpeed,this.pointer[4]=i,this.pointer[5]=a;const[g,l]=this.coords,[c,o]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(g>t?t+(g-t)*d:g<r?r+(g-r)*d:g,!1),this.setY(l>n?n+(l-n)*d:l<e?e+(l-e)*d:l,!1),this.computeVelocity(i-p,a-f),this.angle=Ks(a-u,i-h);const[m,v]=this.snapped;(m!==c&&this.snapX||v!==o&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return bt(this,null,\\\"x\\\"),bt(this,null,\\\"y\\\"),bt(this,null,\\\"progressX\\\"),bt(this,null,\\\"progressY\\\"),bt(this.scroll),bt(this.overshootCoords),this}scrollInView(e,t=0,n=Gt.inOutQuad){this.updateScrollCoords();const r=this.destX,i=this.destY,a=this.scroll,h=this.scrollBounds,u=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(h,r,i)){const[p,f,g,l]=h,c=N(F(i-p,-1e12,0),0),o=N(F(r-f,0,Ht),0),d=N(F(i-g,0,Ht),0),m=N(F(r-l,-1e12,0),0);new _t(a,{x:N(a.x+(m?m-t:o?o+t:0),0),y:N(a.y+(c?c-t:d?d+t:0),0),duration:I(e)?350*G.timeScale:e,ease:n,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(a.x,a.y)}}).init().then(()=>{this.canScroll=u})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Tt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,n=Gt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,i=this.y,[a,h,u,p]=this.containerPadding,f=this.scroll.y-this.targetBounds[0]+a+t,g=this.scroll.x-this.targetBounds[1]-h-t,l=this.scroll.y-this.targetBounds[2]-u-t,c=this.scroll.x-this.targetBounds[3]+p+t,o=this.isOutOfBounds([f,g,l,c],r,i);if(o){const[d,m]=this.disabled,v=F(At(r,this.snapX),c,g),_=F(At(i,this.snapY),f,l),S=I(e)?350*G.timeScale:e;!d&&(o===1||o===3)&&this.animate[this.xProp](v,S,n),!m&&(o===2||o===3)&&this.animate[this.yProp](_,S,n)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type===\\\"range\\\")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const n=e.changedTouches,r=n?n[0].clientX:e.clientX,i=n?n[0].clientY:e.clientY,{x:a,y:h}=this.transforms.normalizePoint(r,i),[u,p,f,g]=this.containerBounds,l=(1-this.containerFriction)*this.dragSpeed,c=this.x,o=this.y;this.coords[0]=this.coords[2]=l?c>p?p+(c-p)/l:c<g?g+(c-g)/l:c:c,this.coords[1]=this.coords[3]=l?o>f?f+(o-f)/l:o<u?u+(o-u)/l:o:o,this.pointer[0]=a,this.pointer[1]=h,this.pointer[2]=a,this.pointer[3]=h,this.pointer[4]=a,this.pointer[5]=h,this.pointer[6]=a,this.pointer[7]=h,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const d=Nt(this.$target,\\\"zIndex\\\",!1);ar=(d>ar?d:ar)+1,this.targetStyles=Tt(this.$target,{zIndex:ar}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Tt(H.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Gt.out(3)),this.onGrab(this),H.addEventListener(\\\"touchmove\\\",this),H.addEventListener(\\\"touchend\\\",this),H.addEventListener(\\\"touchcancel\\\",this),H.addEventListener(\\\"mousemove\\\",this),H.addEventListener(\\\"mouseup\\\",this),H.addEventListener(\\\"selectstart\\\",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,n=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:i,y:a}=this.transforms.normalizePoint(n,r),h=i-this.pointer[6],u=a-this.pointer[7];let p=e.target,f=!1,g=!1,l=!1;for(;t&&p&&p!==this.$trigger;){const c=Nt(p,\\\"overflow-y\\\");if(c!==\\\"hidden\\\"&&c!==\\\"visible\\\"){const{scrollTop:o,scrollHeight:d,clientHeight:m}=p;if(d>m){l=!0,f=o<=3,g=o>=d-m-3;break}}p=p.parentNode}l&&(!f&&!g||f&&u<0||g&&u>0)?(this.pointer[0]=i,this.pointer[1]=a,this.pointer[2]=i,this.pointer[3]=a,this.pointer[4]=i,this.pointer[5]=a,this.pointer[6]=i,this.pointer[7]=a):(Pt(e),this.triggerStyles||(this.triggerStyles=Tt(this.$trigger,{pointerEvents:\\\"none\\\"})),this.$trigger.addEventListener(\\\"touchstart\\\",Pt,{passive:!1}),this.$trigger.addEventListener(\\\"touchmove\\\",Pt,{passive:!1}),this.$trigger.addEventListener(\\\"touchend\\\",Pt),(!this.disabled[0]&&at(h)>3||!this.disabled[1]&&at(u)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=i,this.pointer[1]=a,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[e,t]=this.disabled,[n,r,i,a,h,u]=this.pointer,[p,f,g,l]=this.containerBounds,[c,o]=this.snapped,d=this.releaseXSpring,m=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,b=this.y,k=this.computeVelocity(n-h,r-u),x=this.angle=Ks(r-a,n-i),C=k*150,O=(1-this.releaseContainerFriction)*this.dragSpeed,P=y+Ur(x)*C,w=b+$r(x)*C,E=P>f?f+(P-f)*O:P<l?l+(P-l)*O:P,L=w>g?g+(w-g)*O:w<p?p+(w-p)*O:w,M=this.destX=F(N(At(E,this.snapX),5),l,f),q=this.destY=F(N(At(L,this.snapY),5),p,g),V=this.isOutOfBounds(this.containerBounds,P,w);let U=0,z=0,R=v,ae=v,te=0;if(S.x=y,S.y=b,!e){const ve=M===f?y>f?-1:1:y<l?-1:1,$=N(y-M,0);d.velocity=t&&_?$?C*ve/at($):0:k;const{ease:j,duration:re,restDuration:ue}=d;U=y===M?0:_?re:re-ue*G.timeScale,_&&(R=j),U>te&&(te=U)}if(!t){const ve=q===g?b>g?-1:1:b<p?-1:1,$=N(b-q,0);m.velocity=e&&_?$?C*ve/at($):0:k;const{ease:j,duration:re,restDuration:ue}=m;z=b===q?0:_?re:re-ue*G.timeScale,_&&(ae=j),z>te&&(te=z)}if(!_&&V&&O&&(U||z)){const ve=ke.blend;new _t(S,{x:{to:E,duration:U*.65},y:{to:L,duration:z*.65},ease:v,composition:ve}).init(),new _t(S,{x:{to:M,duration:U},y:{to:q,duration:z},ease:v,composition:ve}).init(),this.overshootTicker.stretch(Wr(U,z)).restart()}else e||this.animate[this.xProp](M,U,R),t||this.animate[this.yProp](q,z,ae);this.scrollInView(te,this.scrollThreshold,v);let xe=!1;M!==c&&(this.snapped[0]=M,this.snapX&&(xe=!0)),q!==o&&this.snapY&&(this.snapped[1]=q,this.snapY&&(xe=!0)),xe&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener(\\\"touchstart\\\",Pt),this.$trigger.removeEventListener(\\\"touchmove\\\",Pt),this.$trigger.removeEventListener(\\\"touchend\\\",Pt),H.removeEventListener(\\\"touchmove\\\",this),H.removeEventListener(\\\"touchend\\\",this),H.removeEventListener(\\\"touchcancel\\\",this),H.removeEventListener(\\\"mousemove\\\",this),H.removeEventListener(\\\"mouseup\\\",this),H.removeEventListener(\\\"selectstart\\\",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove(\\\"is-disabled\\\"),this.touchActionStyles=Tt(this.$trigger,{touchAction:this.disabled[0]?\\\"pan-x\\\":this.disabled[1]?\\\"pan-y\\\":\\\"none\\\"}),this.$trigger.addEventListener(\\\"touchstart\\\",this,{passive:!0}),this.$trigger.addEventListener(\\\"mousedown\\\",this,{passive:!0}),this.$trigger.addEventListener(\\\"mouseenter\\\",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add(\\\"is-disabled\\\"),this.$trigger.removeEventListener(\\\"touchstart\\\",this),this.$trigger.removeEventListener(\\\"mousedown\\\",this),this.$trigger.removeEventListener(\\\"mouseenter\\\",this),H.removeEventListener(\\\"touchmove\\\",this),H.removeEventListener(\\\"touchend\\\",this),H.removeEventListener(\\\"touchcancel\\\",this),H.removeEventListener(\\\"mousemove\\\",this),H.removeEventListener(\\\"mouseup\\\",this),H.removeEventListener(\\\"selectstart\\\",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove(\\\"is-disabled\\\"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(e){switch(e.type){case\\\"mousedown\\\":this.handleDown(e);break;case\\\"touchstart\\\":this.handleDown(e);break;case\\\"mousemove\\\":this.handleMove(e);break;case\\\"touchmove\\\":this.handleMove(e);break;case\\\"mouseup\\\":this.handleUp();break;case\\\"touchend\\\":this.handleUp();break;case\\\"touchcancel\\\":this.handleUp();break;case\\\"mouseenter\\\":this.handleHover();break;case\\\"selectstart\\\":Pt(e);break}}}const mc=(s,e)=>new Ro(s,e);class Oo{constructor(e={}){me.current&&me.current.register(this);const t=e.root;let n=H;t&&(n=t.current||t.nativeElement||Ke(t)[0]||H);const r=e.defaults,i=G.defaults,a=e.mediaQueries;if(this.defaults=r?ls(r,i):i,this.root=n,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},a)for(let h in a){const u=Ie.matchMedia(a[h]);this.mediaQueryLists[h]=u,u.addEventListener(\\\"change\\\",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=me.current,n=me.root,r=G.defaults;me.current=this,me.root=this.root,G.defaults=this.defaults;const i=this.mediaQueryLists;for(let h in i)this.matches[h]=i[h].matches;const a=e(this);return me.current=t,me.root=n,G.defaults=r,a}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(n=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,fe(e)){const n=e;this.constructors.push(n),this.execute(()=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...n)=>this.execute(()=>t(...n));return this}addOnce(e){if(this.once=!0,fe(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const r=e;this.constructorsOnce[t]=r,this.execute(()=>{const i=r(this);fe(i)&&this.revertConstructorsOnce.push(i)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,n=this.constructorsOnce[t];if(fe(n))return n(this);const r=Yr(e);this.constructorsOnce[t]=r;let i;return this.execute(()=>{i=r(this)}),i}handleEvent(e){switch(e.type){case\\\"change\\\":this.refresh();break}}revert(){const e=this.revertibles,t=this.revertConstructors,n=this.revertiblesOnce,r=this.revertConstructorsOnce,i=this.mediaQueryLists;let a=e.length,h=t.length,u=n.length,p=r.length;for(;a--;)e[a].revert();for(;h--;)t[h](this);for(;u--;)n[u].revert();for(;p--;)r[p](this);for(let f in i)i[f].removeEventListener(\\\"change\\\",this);e.length=0,t.length=0,this.constructors.length=0,n.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const vc=s=>new Oo(s),yc=()=>{const s=H.createElement(\\\"div\\\");H.body.appendChild(s),s.style.height=\\\"100lvh\\\";const e=s.offsetHeight;return H.body.removeChild(s),e},lr=(s,e)=>s&&fe(s)?s(e):s,cr=new Map;class _c{constructor(e){this.element=e,this.useWin=this.element===H.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Je({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ie(this,n=>n.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Je({autoplay:!1,frameRate:30,onUpdate:t=>{const n=t.deltaTime,r=this.prevScrollX,i=this.prevScrollY,a=this.scrollX,h=this.scrollY,u=r-a,p=i-h;this.prevScrollX=a,this.prevScrollY=h,u&&(this.backwardX=r>a),p&&(this.backwardY=i>h),this.velocity=N(n>0?Math.sqrt(u*u+p*p)/n:0,5)}}).init(),this.resizeTicker=new Je({autoplay:!1,duration:250*G.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Je({autoplay:!1,duration:500*G.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?Ie:this.element).addEventListener(\\\"scroll\\\",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=N(e?Ie.scrollX:t.scrollLeft,0),this.scrollY=N(e?Ie.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Ie.innerWidth,this.winHeight=yc()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let n,r;if(this.useWin)n=this.winWidth,r=this.winHeight;else{const i=t.getBoundingClientRect();n=t.clientWidth,r=t.clientHeight,this.top=i.top,this.left=i.left}this.width=n,this.height=r}refreshScrollObservers(){ie(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ie(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){switch(e.type){case\\\"scroll\\\":this.handleScroll();break}}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?Ie:this.element).removeEventListener(\\\"scroll\\\",this),cr.delete(this.element)}}const bc=s=>{const e=s&&Ke(s)[0]||H.body;let t=cr.get(e);return t||(t=new _c(e),cr.set(e,t)),t},gs=(s,e,t,n,r)=>{const i=e===\\\"min\\\",a=e===\\\"max\\\",h=e===\\\"top\\\"||e===\\\"left\\\"||e===\\\"start\\\"||i?0:e===\\\"bottom\\\"||e===\\\"right\\\"||e===\\\"end\\\"||a?\\\"100%\\\":e===\\\"center\\\"?\\\"50%\\\":e,{n:u,u:p}=Ze(h,De);let f=u;return p===\\\"%\\\"?f=u/100*t:p&&(f=on(s,De,\\\"px\\\",!0).n),a&&n<0&&(f+=n),i&&r>0&&(f+=r),f},ur=(s,e,t,n,r)=>{let i;if(ze(e)){const a=Xi.exec(e);if(a){const h=a[0],u=h[0],p=e.split(h),f=p[0]===\\\"min\\\",g=p[0]===\\\"max\\\",l=gs(s,p[0],t,n,r),c=gs(s,p[1],t,n,r);if(f){const o=Mt(gs(s,\\\"min\\\",t),c,u);i=o<l?l:o}else if(g){const o=Mt(gs(s,\\\"max\\\",t),c,u);i=o>l?l:o}else i=Mt(l,c,u)}else i=gs(s,e,t,n,r)}else i=e;return N(i,0)},Mo=s=>{let e;const t=s.targets;for(let n=0,r=t.length;n<r;n++){const i=t[n];if(i[Qs]){e=i;break}}return e};let Sc=0;const Io=[\\\"#FF4B4B\\\",\\\"#FF971B\\\",\\\"#FFC730\\\",\\\"#F9F640\\\",\\\"#7AFF5A\\\",\\\"#18FF74\\\",\\\"#17E09B\\\",\\\"#3CFFEC\\\",\\\"#05DBE9\\\",\\\"#33B3F1\\\",\\\"#638CF9\\\",\\\"#C563FE\\\",\\\"#FF4FCF\\\",\\\"#F93F8A\\\"];class No{constructor(e={}){me.current&&me.current.register(this);const t=D(e.sync,\\\"play pause\\\"),n=t?It(t):null,r=t&&(t===\\\"linear\\\"||t===yt),i=t&&!(n===yt&&!r),a=t&&(Xe(t)||t===!0||r),h=t&&ze(t)&&!i&&!a,u=h?t.split(\\\" \\\").map(f=>()=>{const g=this.linked;return g&&g[f]?g[f]():null}):null,p=h&&u.length>2;this.index=Sc++,this.id=I(e.id)?this.index:e.id,this.container=bc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=i||a||!!u,this.syncEase=i?n:null,this.syncSmooth=a?t===!0||r?1:t:null,this.onSyncEnter=u&&!p&&u[0]?u[0]:W,this.onSyncLeave=u&&!p&&u[1]?u[1]:W,this.onSyncEnterForward=u&&p&&u[0]?u[0]:W,this.onSyncLeaveForward=u&&p&&u[1]?u[1]:W,this.onSyncEnterBackward=u&&p&&u[2]?u[2]:W,this.onSyncLeaveBackward=u&&p&&u[3]?u[3]:W,this.onEnter=e.onEnter||W,this.onLeave=e.onLeave||W,this.onEnterForward=e.onEnterForward||W,this.onLeaveForward=e.onLeaveForward||W,this.onEnterBackward=e.onEnterBackward||W,this.onLeaveBackward=e.onLeaveBackward||W,this.onUpdate=e.onUpdate||W,this.onSyncComplete=e.onSyncComplete||W,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=[\\\"start\\\",\\\"end\\\",\\\"end\\\",\\\"start\\\"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=D(e.debug,!1),this._next=null,this._prev=null,vt(this.container,this),wo(()=>{if(!this.reverted){if(!this.target){const f=Ke(e.target)[0];this.target=f||H.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;I(e.targets)?ie(e,n=>{n.targets&&!t&&(t=Mo(n))}):t=Mo(e),this.target=t||H.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:N(F(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=D(lr(e.repeat,this),!0),this.horizontal=D(lr(e.axis,this),\\\"y\\\")===\\\"x\\\",this.enter=D(lr(e.enter,this),\\\"end start\\\"),this.leave=D(lr(e.leave,this),\\\"start end\\\"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,n=e.element.querySelector(\\\":scope > .animejs-onscroll-debug\\\"),r=H.createElement(\\\"div\\\"),i=H.createElement(\\\"div\\\"),a=H.createElement(\\\"div\\\"),h=Io[this.index%Io.length],u=e.useWin,p=u?e.winWidth:e.width,f=u?e.winHeight:e.height,g=e.scrollWidth,l=e.scrollHeight,c=this.container.width>360?320:260,o=t?0:10,d=t?10:0,m=t?24:c/2,v=t?m:15,_=t?60:m,S=t?_:v,y=t?\\\"repeat-x\\\":\\\"repeat-y\\\",b=P=>t?\\\"0px \\\"+P+\\\"px\\\":P+\\\"px 2px\\\",k=P=>`linear-gradient(${t?90:0}deg, ${P} 2px, transparent 1px)`,x=(P,w,E,L,M)=>`position:${P};left:${w}px;top:${E}px;width:${L}px;height:${M}px;`;r.style.cssText=`${x(\\\"absolute\\\",o,d,t?g:c,t?c:l)}\\n pointer-events: none;\\n z-index: ${this.container.zIndex++};\\n display: flex;\\n flex-direction: ${t?\\\"column\\\":\\\"row\\\"};\\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\\n `,i.style.cssText=`${x(\\\"sticky\\\",0,0,t?p:m,t?m:f)}`,n||(i.style.cssText+=`background:\\n ${k(\\\"#FFFF\\\")}${b(m-10)} / 100px 100px ${y},\\n ${k(\\\"#FFF8\\\")}${b(m-10)} / 10px 10px ${y};\\n `),a.style.cssText=`${x(\\\"relative\\\",0,0,t?g:m,t?m:l)}`,n||(a.style.cssText+=`background:\\n ${k(\\\"#FFFF\\\")}${b(0)} / ${t?\\\"100px 10px\\\":\\\"10px 100px\\\"} ${y},\\n ${k(\\\"#FFF8\\\")}${b(0)} / ${t?\\\"10px 0px\\\":\\\"0px 10px\\\"} ${y};\\n `);const C=[\\\" enter: \\\",\\\" leave: \\\"];this.coords.forEach((P,w)=>{const E=w>1,L=(E?0:this.offset)+P,M=w%2,q=L<S,V=L>(E?t?p:f:t?g:l)-S,U=(E?M&&!q:!M&&!q)||V,z=H.createElement(\\\"div\\\"),R=H.createElement(\\\"div\\\"),ae=t?U?\\\"right\\\":\\\"left\\\":U?\\\"bottom\\\":\\\"top\\\",te=U?(t?_:v)+(E?t?-1:V?0:-2:t?-1:-2):t?1:0;R.innerHTML=`${this.id}${C[M]}${this.thresholds[w]}`,z.style.cssText=`${x(\\\"absolute\\\",0,0,_,v)}\\n display: flex;\\n flex-direction: ${t?\\\"column\\\":\\\"row\\\"};\\n justify-content: flex-${E?\\\"start\\\":\\\"end\\\"};\\n align-items: flex-${U?\\\"end\\\":\\\"start\\\"};\\n border-${ae}: 2px solid ${h};\\n `,R.style.cssText=`\\n overflow: hidden;\\n max-width: ${c/2-10}px;\\n height: ${v};\\n margin-${t?U?\\\"right\\\":\\\"left\\\":U?\\\"bottom\\\":\\\"top\\\"}: -2px;\\n padding: 1px;\\n font-family: ui-monospace, monospace;\\n font-size: 10px;\\n letter-spacing: -.025em;\\n line-height: 9px;\\n font-weight: 600;\\n text-align: ${t&&U||!t&&!E?\\\"right\\\":\\\"left\\\"};\\n white-space: pre;\\n text-overflow: ellipsis;\\n color: ${M?h:\\\"rgba(0,0,0,.75)\\\"};\\n background-color: ${M?\\\"rgba(0,0,0,.65)\\\":h};\\n border: 2px solid ${M?h:\\\"transparent\\\"};\\n border-${t?U?\\\"top-left\\\":\\\"top-right\\\":U?\\\"top-left\\\":\\\"bottom-left\\\"}-radius: 5px;\\n border-${t?U?\\\"bottom-left\\\":\\\"bottom-right\\\":U?\\\"top-right\\\":\\\"bottom-right\\\"}-radius: 5px;\\n `,z.appendChild(R);let xe=L-te+(t?1:0);z.style[t?\\\"left\\\":\\\"top\\\"]=`${xe}px`,(E?i:a).appendChild(z)}),r.appendChild(i),r.appendChild(a),e.element.appendChild(r),n||r.classList.add(\\\"animejs-onscroll-debug\\\"),this.$debug=r,Nt(e.element,\\\"position\\\")===\\\"static\\\"&&(this.debugStyles=Tt(e.element,{position:\\\"relative \\\"}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,n=this.container,r=this.horizontal,i=this.linked;let a,h=t;for(i&&(a=i.currentTime,i.seek(0,!0)),h.parentElement;h&&h!==n.element&&h!==H.body;){const L=Nt(h,\\\"position\\\")===\\\"sticky\\\"?Tt(h,{position:\\\"static\\\"}):!1;h=h.parentElement,L&&(e||(e=[]),e.push(L))}const u=t.getBoundingClientRect(),p=r?u.left+n.scrollX-n.left:u.top+n.scrollY-n.top,f=r?u.width:u.height,g=r?n.width:n.height,c=(r?n.scrollWidth:n.scrollHeight)-g,o=this.enter,d=this.leave;let m=\\\"start\\\",v=\\\"end\\\",_=\\\"end\\\",S=\\\"start\\\";if(ze(o)){const L=o.split(\\\" \\\");_=L[0],m=L.length>1?L[1]:m}else if(be(o)){const L=o;I(L.container)||(_=L.container),I(L.target)||(m=L.target)}else Xe(o)&&(_=o);if(ze(d)){const L=d.split(\\\" \\\");S=L[0],v=L.length>1?L[1]:v}else if(be(d)){const L=d;I(L.container)||(S=L.container),I(L.target)||(v=L.target)}else Xe(d)&&(S=d);const y=ur(t,m,f),b=ur(t,v,f),k=y+p-g,x=b+p-c,C=ur(t,_,g,k,x),O=ur(t,S,g,k,x),P=y+p-C,w=b+p-O,E=w-P;this.offset=p,this.offsetStart=P,this.offsetEnd=w,this.distance=E<=0?0:E,this.thresholds=[m,v,_,S],this.coords=[y,b,C,O],e&&e.forEach(L=>L.revert()),i&&i.seek(a,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,i=e&&(n||r),a=this.horizontal,h=this.container,u=this.scroll,p=u<=this.offsetStart,f=u>=this.offsetEnd,g=!p&&!f,l=u===this.offsetStart||u===this.offsetEnd,c=!this.hasEntered&&l,o=this._debug&&this.$debug;let d=!1,m=!1,v=this.progress;if(p&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),i){const _=e.progress;if(r&&Xe(r)){if(r<1){const y=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=N(Co(_,v,gt(.01,.2,r),!1)+y,6)}}else n&&(v=n(v));d=v!==this.prevProgress,m=_===1,d&&!m&&r&&_&&h.wakeTicker.restart()}if(o){const _=a?h.scrollY:h.scrollX;o.style[a?\\\"top\\\":\\\"left\\\"]=_+10+\\\"px\\\"}(g&&!this.isInView||c&&!this.forceEnter&&!this.hasEntered)&&(g&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(o&&g&&(o.style.zIndex=`${this.container.zIndex++}`),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,c&&(this.forceEnter=!0)):g&&(this.forceEnter=!1)),(g||!g&&this.isInView)&&(d=!0),d&&(i&&e.seek(e.duration*v),this.onUpdate(this)),!g&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(m=!0)),v>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return mt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const kc=(s={})=>new No(s),hr=typeof Intl<\\\"u\\\"&&Intl.Segmenter,xc=/\\\\{value\\\\}/g,wc=/\\\\{i\\\\}/g,Tc=/(\\\\s+)/,Cc=/^\\\\s+$/,gn=\\\"line\\\",ms=\\\"word\\\",vs=\\\"char\\\",ys=\\\"data-line\\\";let mn=null,vn=null,pr=null;const Bo=s=>s.isWordLike||s.segment===\\\" \\\"||Xe(+s.segment),yn=s=>s.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),fr=(s,e)=>[...s.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Pc={line:\\\"#00D672\\\",word:\\\"#FF4B4B\\\",char:\\\"#5A87FF\\\"},Do=s=>{if(!s.childElementCount&&!s.textContent.trim()){const e=s.parentElement;s.remove(),e&&Do(e)}},qo=(s,e,t)=>{const n=s.getAttribute(ys);(n!==null&&+n!==e||s.tagName===\\\"BR\\\")&&t.add(s);let r=s.childElementCount;for(;r--;)qo(s.children[r],e,t);return t},_n=(s,e={})=>{let t=\\\"\\\";const n=ze(e.class)?` class=\\\"${e.class}\\\"`:\\\"\\\",r=D(e.clone,!1),i=D(e.wrap,!1),a=i?i===!0?\\\"clip\\\":i:r?\\\"clip\\\":!1;if(i&&(t+=`<span${a?` style=\\\"overflow:${a};\\\"`:\\\"\\\"}>`),t+=`<span${n}${r?' style=\\\"position:relative;\\\"':\\\"\\\"} data-${s}=\\\"{i}\\\">`,r){const h=r===\\\"left\\\"?\\\"-100%\\\":r===\\\"right\\\"?\\\"100%\\\":\\\"0\\\",u=r===\\\"top\\\"?\\\"-100%\\\":r===\\\"bottom\\\"?\\\"100%\\\":\\\"0\\\";t+=\\\"<span>{value}</span>\\\",t+=`<span inert style=\\\"position:absolute;top:${u};left:${h};white-space:nowrap;\\\">{value}</span>`}else t+=\\\"{value}\\\";return t+=\\\"</span>\\\",i&&(t+=\\\"</span>\\\"),t},bn=(s,e,t,n,r,i,a,h,u)=>{const p=r===gn,f=r===vs,g=`_${r}_`,l=fe(s)?s(t):s,c=p?\\\"block\\\":\\\"inline-block\\\";pr.innerHTML=l.replace(xc,`<i class=\\\"${g}\\\"></i>`).replace(wc,`${f?u:p?a:h}`);const o=pr.content,d=o.firstElementChild,m=o.querySelector(`[data-${r}]`)||d,v=o.querySelectorAll(`i.${g}`),_=v.length;if(_){d.style.display=c,m.style.display=c,m.setAttribute(ys,`${a}`),p||(m.setAttribute(\\\"data-word\\\",`${h}`),f&&m.setAttribute(\\\"data-char\\\",`${u}`));let S=_;for(;S--;){const y=v[S],b=y.parentElement;b.style.display=c,p?b.innerHTML=t.innerHTML:b.replaceChild(t.cloneNode(!0),y)}e.push(m),n.appendChild(o)}else console.warn('The expression \\\"{value}\\\" is missing from the provided template.');return i&&(d.style.outline=`1px dotted ${Pc[r]}`),d};class Ho{constructor(e,t={}){mn||(mn=hr?new hr([],{granularity:ms}):{segment:o=>{const d=[],m=o.split(Tc);for(let v=0,_=m.length;v<_;v++){const S=m[v];d.push({segment:S,isWordLike:!Cc.test(S)})}return d}}),vn||(vn=hr?new hr([],{granularity:\\\"grapheme\\\"}):{segment:o=>[...o].map(d=>({segment:d}))}),!pr&&ot&&(pr=H.createElement(\\\"template\\\")),me.current&&me.current.register(this);const{words:n,chars:r,lines:i,accessible:a,includeSpaces:h,debug:u}=t,p=(e=Le(e)?e[0]:e)&&e.nodeType?e:(Jr(e)||[])[0],f=i===!0?{}:i,g=n===!0||I(n)?{}:n,l=r===!0?{}:r;this.debug=D(u,!1),this.includeSpaces=D(h,!1),this.accessible=D(a,!0),this.linesOnly=f&&!g&&!l,this.lineTemplate=be(f)?_n(gn,f):f,this.wordTemplate=be(g)||this.linesOnly?_n(ms,g):g,this.charTemplate=be(l)?_n(vs,l):l,this.$target=p,this.html=p&&p.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const c=()=>this.html&&(f||g||l)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const o=p.offsetWidth;o!==this.width&&(this.width=o,c())},150)}),this.lineTemplate&&!this.ready?H.fonts.ready.then(c):c(),p?this.resizeObserver.observe(p):console.warn(\\\"No Text Splitter target found.\\\")}addEffect(e){if(!fe(e))return console.warn(\\\"Effect must return a function.\\\");const t=Yr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>fe(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,n=this.charTemplate,r=this.includeSpaces,i=this.debug,a=e.nodeType;if(a===3){const h=e.nodeValue;if(h.trim()){const u=[],p=this.words,f=this.chars,g=mn.segment(h),l=H.createDocumentFragment();let c=null;for(const o of g){const d=o.segment,m=Bo(o);if(!c||m&&c&&Bo(c))u.push(d);else{const v=u.length-1;!u[v].includes(\\\" \\\")&&!d.includes(\\\" \\\")?u[v]+=d:u.push(d)}c=o}for(let o=0,d=u.length;o<d;o++){const m=u[o];if(m.trim()){const v=u[o+1],_=r&&v&&!v.trim(),S=m,y=n?vn.segment(S):null,b=n?H.createDocumentFragment():H.createTextNode(_?m+\\\" \\\":m);if(n){const k=[...y];for(let x=0,C=k.length;x<C;x++){const O=k[x],w=x===C-1&&_?O.segment+\\\" \\\":O.segment,E=H.createTextNode(w);bn(n,f,E,b,vs,i,-1,p.length,f.length)}}t?bn(t,p,b,l,ms,i,-1,p.length,f.length):n?l.appendChild(b):l.appendChild(H.createTextNode(m)),_&&o++}else{if(o&&r)continue;l.appendChild(H.createTextNode(m))}}e.parentNode.replaceChild(l,e)}}else if(a===1){const h=[...e.childNodes];for(let u=0,p=h.length;u<p;u++)this.splitNode(h[u])}}split(e=!1){const t=this.$target,n=!!this.cache&&!e,r=this.lineTemplate,i=this.wordTemplate,a=this.charTemplate,h=H.fonts.status!==\\\"loading\\\",u=r&&h;this.ready=!r||h,(u||e)&&this.effectsCleanups.forEach(l=>fe(l)&&l(this)),n||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),u&&(n&&(t.innerHTML=this.cache),this.lines.length=0,i&&(this.words=fr(t,ms))),a&&(u||i)&&(this.chars=fr(t,vs));const p=this.words.length?this.words:this.chars;let f,g=0;for(let l=0,c=p.length;l<c;l++){const o=p[l],{top:d,height:m}=o.getBoundingClientRect();f&&d-f>m*.5&&g++,o.setAttribute(ys,`${g}`);const v=o.querySelectorAll(`[${ys}]`);let _=v.length;for(;_--;)v[_].setAttribute(ys,`${g}`);f=d}if(u){const l=H.createDocumentFragment(),c=new Set,o=[];for(let d=0;d<g+1;d++){const m=t.cloneNode(!0);qo(m,d,new Set).forEach(v=>{const _=v.parentElement;_&&c.add(_),v.remove()}),o.push(m)}c.forEach(Do);for(let d=0,m=o.length;d<m;d++)bn(r,this.lines,o[d],l,gn,this.debug,d);t.innerHTML=\\\"\\\",t.appendChild(l),i&&(this.words=fr(t,ms)),a&&(this.chars=fr(t,vs))}if(this.linesOnly){const l=this.words;let c=l.length;for(;c--;){const o=l[c];o.replaceWith(o.textContent)}l.length=0}if(this.accessible&&(u||!n)){const l=H.createElement(\\\"span\\\");l.style.cssText=\\\"position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;\\\",l.innerHTML=this.html,t.insertBefore(l,t.firstChild),this.lines.forEach(yn),this.words.forEach(yn),this.chars.forEach(yn)}return this.width=t.offsetWidth,(u||e)&&this.effects.forEach((l,c)=>this.effectsCleanups[c]=l(this)),this}refresh(){this.split(!0)}}const dr={split:(s,e)=>new Ho(s,e)},gr=(s,e={})=>{let t=[],n=0;const r=e.from,i=e.reversed,a=e.ease,h=!I(a),p=h&&!I(a.ease)?a.ease:h?It(a):null,f=e.grid,g=e.axis,l=e.total,c=I(r)||r===0||r===\\\"first\\\",o=r===\\\"center\\\",d=r===\\\"last\\\",m=r===\\\"random\\\",v=Le(s),_=e.use,S=Lt(v?s[0]:s),y=v?Lt(s[1]):0,b=Gi.exec((v?s[1]:s)+dt),k=e.start||0+(v?S:0);let x=c?0:Xe(r)?r:0;return(C,O,P,w)=>{const[E]=cs(C),L=I(l)?P:l,M=I(_)?!1:fe(_)?_(E,O,L):Ot(E,_),q=Xe(M)||ze(M)&&Xe(+M)?+M:O;if(o&&(x=(L-1)/2),d&&(x=L-1),!t.length){for(let R=0;R<L;R++){if(!f)t.push(at(x-R));else{const ae=o?(f[0]-1)/2:x%f[0],te=o?(f[1]-1)/2:as(x/f[0]),xe=R%f[0],ve=as(R/f[0]),$=ae-xe,j=te-ve;let re=xt($*$+j*j);g===\\\"x\\\"&&(re=-$),g===\\\"y\\\"&&(re=-j),t.push(re)}n=Wr(...t)}p&&(t=t.map(R=>p(R/n)*n)),i&&(t=t.map(R=>g?R<0?R*-1:-R:at(n-R))),m&&(t=so(t))}const V=v?(y-S)/n:S;let z=(w?ds(w,I(e.start)?w.iterationDuration:k):k)+(V*N(t[q],2)||0);return e.modifier&&(z=e.modifier(z)),b&&(z=`${z}${b[2]}`),z}},Ec=Object.freeze(Object.defineProperty({__proto__:null,Animatable:fn,Draggable:Ro,JSAnimation:_t,Scope:Oo,ScrollObserver:No,Spring:Ao,TextSplitter:Ho,Timeline:Lo,Timer:Je,WAAPIAnimation:xo,animate:hs,createAnimatable:fc,createDraggable:mc,createScope:vc,createSpring:dn,createTimeline:pc,createTimer:zl,eases:Gt,engine:Se,onScroll:kc,scrollContainers:cr,stagger:gr,svg:Nl,text:dr,utils:Eo,waapi:ec},Symbol.toStringTag,{value:\\\"Module\\\"}));class Lc{constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation(\\\"typewriter\\\",function(e,t,n,r){const{chars:i}=dr.split(e,{words:!1,chars:!0}),a=t.fadeDuration||100,h=t.interval||100;hs(i,{opacity:[0,1],easing:\\\"linear\\\",duration:a,delay:gr(h,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation(\\\"toast\\\",function(e,t,n,r){const{words:i}=dr.split(e,{words:!0,chars:!1}),a=t.fadeDuration||100,h=t.interval||200;hs(i,{opacity:[0,1],y:[{to:[\\\"100%\\\",\\\"0%\\\"]}],easing:\\\"linear\\\",duration:a,delay:gr(h,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation(\\\"fadeIn\\\",function(e,t,n,r){const i=t.duration||500;hs(e,{opacity:[0,1],easing:t.easing||\\\"easeOutQuad\\\",duration:i,delay:t.start||0,loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation(\\\"continue\\\",function(e,t,n){e.classList.add(\\\"squiffy-continue\\\");const r=t.style||\\\"pulse\\\";let i=null,a=null;r===\\\"wave\\\"?(e.classList.add(\\\"squiffy-continue-wave\\\"),a=dr.split(e,{words:!1,chars:!0}).chars,i=hs(a,{opacity:[1,.3,1],easing:\\\"easeInOutSine\\\",duration:1200,delay:gr(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const h=()=>{if(e.classList.remove(\\\"squiffy-continue\\\",\\\"squiffy-continue-wave\\\",`squiffy-continue-${r}`),e.removeEventListener(\\\"click\\\",h),i&&(i.pause(),a))for(const u of a)u.style.opacity=\\\"1\\\";n()};e.addEventListener(\\\"click\\\",h)})}registerAnimation(e,t,n={}){this.animations[e]={handler:t,options:n}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,n,r,i){const a=this.animations[e];a?a.handler(t,n,r,i):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}}const Ac={animejs:Ec},Fo=\\\"input:not([disabled]), textarea:not([disabled]), select:not([disabled])\\\",Rc=\\\"a.squiffy-link[data-section], a.squiffy-link[data-passage]\\\";function Vo(s){if(!s)return!0;const e=s.querySelectorAll(Fo);for(const t of e)if(!t.checkValidity())return!1;return!0}function Sn(s){if(!s)return;const e=Vo(s),t=s.querySelectorAll(Rc);for(const n of t)e?(n.classList.remove(\\\"validation-disabled\\\"),n.removeAttribute(\\\"aria-disabled\\\")):(n.classList.add(\\\"validation-disabled\\\"),n.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"))}function mr(s){if(!s)return;const e=s.querySelectorAll(Fo);for(const t of e)t.addEventListener(\\\"input\\\",()=>Sn(s)),t.addEventListener(\\\"change\\\",()=>Sn(s)),t.addEventListener(\\\"invalid\\\",n=>{n.preventDefault(),t.classList.add(\\\"squiffy-invalid\\\")}),t.addEventListener(\\\"input\\\",()=>{t.checkValidity()&&t.classList.remove(\\\"squiffy-invalid\\\")});Sn(s)}const Oc=async s=>{let e,t,n,r,i,a=0;const h=new rl,u=[];let p=!1;async function f(T){if(p||T.closest(\\\".squiffy-output-section\\\")!==n||T.classList.contains(\\\"disabled\\\")||!Vo(n))return!1;const B=T.getAttribute(\\\"data-passage\\\"),J=T.getAttribute(\\\"data-section\\\");if(B!==null)return l(T),Y(\\\"_turncount\\\",se(\\\"_turncount\\\")+1),await d(T),B&&(i=null,await b(B)),h.emit(\\\"linkClick\\\",{linkType:\\\"passage\\\"}),!0;if(J!==null)return await d(T),J&&await v(J),h.emit(\\\"linkClick\\\",{linkType:\\\"section\\\"}),!0;const[Q,ye,Pe]=Ue.handleLink(T);return Q?(Pe?.disableLink&&l(T),C(),h.emit(\\\"linkClick\\\",{linkType:ye}),!0):!1}async function g(T){const A=T.target;A.classList.contains(\\\"squiffy-link\\\")&&await f(A)}function l(T){T.classList.add(\\\"disabled\\\"),T.setAttribute(\\\"tabindex\\\",\\\"-1\\\")}function c(T){T.classList.remove(\\\"disabled\\\"),T.removeAttribute(\\\"tabindex\\\")}async function o(){O()||await v(e.start)}async function d(T){qe.runLinkAnimation(T),await y();const A=T.getAttribute(\\\"data-set\\\");if(A){const B=JSON.parse(A);for(const J of B)m(J)}}function m(T){T=T.replace(/^(\\\\w*\\\\s*):=(.*)$/,(J,Q,ye)=>Q+\\\"=\\\"+V.processText(ye,!0));const B=/^([\\\\w]*)\\\\s*=\\\\s*(.*)$/.exec(T);if(B){const J=B[1];let Q=B[2];Q===\\\"true\\\"?Y(J,!0):Q===\\\"false\\\"?Y(J,!1):isNaN(Q)?(Q.startsWith(\\\"@\\\")&&(Q=se(Q.substring(1))),Y(J,Q)):Y(J,parseFloat(Q))}else{const Q=/^([\\\\w]*)\\\\s*([+\\\\-*/])=\\\\s*(.*)$/.exec(T);if(Q){const ye=Q[1],Pe=Q[2];let Ee=Q[3];Ee.startsWith(\\\"@\\\")&&(Ee=se(Ee.substring(1)));const je=parseFloat(Ee);let de=se(ye);de===null&&(de=0),Pe==\\\"+\\\"&&(de+=je),Pe==\\\"-\\\"&&(de-=je),Pe==\\\"*\\\"&&(de*=je),Pe==\\\"/\\\"&&(de/=je),Y(ye,de)}else{let ye=!0;T.startsWith(\\\"not \\\")&&(T=T.substring(4),ye=!1),Y(T,ye)}}}async function v(T){const A=te();if(t=e.sections[T],!t)return;Y(\\\"_section\\\",T),he.setSeen(T);const B=e.sections[\\\"\\\"];(B?.clear||t.clear)&&M(),w(T),B&&await S(B,\\\"[[]]\\\"),await S(t,`[[${T}]]`),mr(n),se(\\\"_section\\\")==T&&(Y(\\\"_turncount\\\",0),Ae(),C());const J=te();J!=A&&h.emit(\\\"canGoBackChanged\\\",{canGoBack:J})}function _(T,A=null){const B={get:se,set:Y,ui:{transition:St,write:V.write,scrollToEnd:V.scrollToEnd},story:{go:v},element:ve,import:Ac,...A};e.js[T](B,se,Y)}async function S(T,A){T.attributes&&await k(T.attributes),T.jsIndex!==void 0&&_(T.jsIndex),V.write(T.text||\\\"\\\",A),await y()}async function y(){p=!0,n.classList.add(\\\"links-disabled\\\");for(const T of u)await T();u.length=0,p=!1,n.classList.remove(\\\"links-disabled\\\")}async function b(T){const A=te();let B=t.passages&&t.passages[T];const J=e.sections[\\\"\\\"];if(!B&&J&&J.passages&&(B=J.passages[T]),!B)throw`No passage named ${T} in the current section or master section`;he.setSeen(T);const Q=[],ye=[];if(J&&J.passages){const de=J.passages[\\\"\\\"];de&&(Q.push(de),ye.push(()=>S(de,\\\"[[]][]\\\")))}const Pe=t.passages&&t.passages[\\\"\\\"];Pe&&(Q.push(Pe),ye.push(()=>S(Pe,`[[${se(\\\"_section\\\")}]][]`))),Q.push(B),ye.push(()=>S(B,`[[${se(\\\"_section\\\")}]][${T}]`));const Ee=\\\"@\\\"+se(\\\"_turncount\\\");if(t.passages){if(Ee in t.passages){const de=t.passages[Ee];Q.push(de),ye.push(()=>S(de,`[[${se(\\\"_section\\\")}]][${Ee}]`))}if(\\\"@last\\\"in t.passages&&se(\\\"_turncount\\\")>=(t.passageCount||0)){const de=t.passages[\\\"@last\\\"];Q.push(de),ye.push(()=>S(de,`[[${se(\\\"_section\\\")}]][${Ee}]`))}}Q.some(de=>de.clear)&&(M(),E()),r=document.createElement(\\\"div\\\"),r.classList.add(\\\"squiffy-output-passage\\\"),r.setAttribute(\\\"data-passage\\\",`${T}`),n.appendChild(r);for(const de of ye)await de();mr(n),Ae(),C();const je=te();je!=A&&h.emit(\\\"canGoBackChanged\\\",{canGoBack:je})}async function k(T){for(const A of T)m(A)}function x(){he.reset(),j.scroll===\\\"element\\\"||j.scroll===\\\"none\\\"?($.innerHTML=\\\"\\\",o()):location.reload()}function C(){Y(\\\"_output\\\",$.innerHTML)}function O(){const T=()=>{e.uiJsIndex!==void 0&&_(e.uiJsIndex,{registerAnimation:qe.registerAnimation.bind(qe)})};he.load();const A=se(\\\"_output\\\");return A?($.innerHTML=A,z(),R(),i=$.querySelector(\\\".squiffy-output-block:last-child\\\"),t=e.sections[se(\\\"_section\\\")],T(),ge.onLoad(),mr(n),!0):(T(),!1)}function P(){i=document.createElement(\\\"div\\\"),i.classList.add(\\\"squiffy-output-block\\\"),(r||n)?.appendChild(i)}function w(T){n&&(n.querySelectorAll(\\\"input\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&Y(B,A.value),A.disabled=!0}),n.querySelectorAll(\\\"[contenteditable]\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&Y(B,A.innerHTML),A.contentEditable=\\\"false\\\"}),n.querySelectorAll(\\\"textarea\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&Y(B,A.value),A.disabled=!0}),n.querySelectorAll(\\\"select\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&Y(B,A.value),A.disabled=!0})),r=null,E(T),P()}function E(T){n=document.createElement(\\\"div\\\"),n.classList.add(\\\"squiffy-output-section\\\"),n.setAttribute(\\\"data-section\\\",T??se(\\\"_section\\\")),T||n.setAttribute(\\\"data-clear\\\",\\\"true\\\"),$.appendChild(n)}function L(){return $.querySelector(\\\".squiffy-clear-stack\\\")}function M(){let T=L();T||(T=document.createElement(\\\"div\\\"),T.classList.add(\\\"squiffy-clear-stack\\\"),T.style.display=\\\"none\\\",$.prepend(T));const A=document.createElement(\\\"div\\\");T.appendChild(A);for(const B of[...$.children])B!==T&&A.appendChild(B)}function q(){const T=L();for(const B of[...$.children])B!==T&&B.remove();const A=T.children[T.children.length-1];for(const B of[...A.children])$.appendChild(B);A.remove()}const V={write:(T,A)=>{a=$.scrollHeight;const B=V.processText(T,!1).trim();i||P();const J=document.createElement(\\\"div\\\");A&&J.setAttribute(\\\"data-source\\\",A),J.innerHTML=B,ge.onWrite(J),i.appendChild(J),mr(n),V.scrollToEnd()},clearScreen:()=>{M(),E()},scrollToEnd:()=>{if(j.scroll!==\\\"none\\\")if(j.scroll===\\\"element\\\")$.lastElementChild.scrollIntoView({block:\\\"end\\\",inline:\\\"nearest\\\",behavior:\\\"smooth\\\"});else{let T=a;const A=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>A){const B=document.documentElement.scrollHeight-window.innerHeight;T>B&&(T=B),window.scrollTo({top:T,behavior:\\\"smooth\\\"})}}},processText:(T,A)=>Te.process(T,A)};function U(T){if(T.start!=e.start){e=T,he.reset(),$.innerHTML=\\\"\\\",v(e.start);return}il(e,T,$,V,l,A=>k(A)),e=T,z(),R()}function z(){const T=$.querySelectorAll(\\\".squiffy-output-section:last-child\\\");n=T[T.length-1];const A=n.getAttribute(\\\"data-section\\\");t=e.sections[A]}function R(){r=n.querySelector(\\\".squiffy-output-passage:last-child\\\")}function ae(){const T=L(),A=$.querySelectorAll(\\\".squiffy-output-section\\\").length+$.querySelectorAll(\\\".squiffy-output-passage\\\").length;return T?A+T.children.length:A}function te(){return ae()>1}function xe(){if(!te())return;const T=L();if(r){const A=r.getAttribute(\\\"data-passage\\\");we(r.getAttribute(\\\"data-undo\\\")),r.remove();let B=!1,J=!1;for(const Q of $.children)if(Q!==T){if(Q.getAttribute(\\\"data-clear\\\")==\\\"true\\\"&&Q.children.length==0){B=!0;continue}J=!0;break}B&&!J&&(q(),z());for(const Q of n.querySelectorAll(\\\"a.squiffy-link[data-passage]\\\"))Q.getAttribute(\\\"data-passage\\\")==A&&c(Q);R()}else{we(n.getAttribute(\\\"data-undo\\\")),n.remove();let A=!1;for(const B of[...$.children])if(B!==T){A=!0;break}A||q(),z(),R()}te()||h.emit(\\\"canGoBackChanged\\\",{canGoBack:!1})}const ve=s.element,$=document.createElement(\\\"div\\\");ve.appendChild($),e=s.story;const j={scroll:s.scroll||\\\"body\\\",persist:s.persist===void 0?!0:s.persist,onSet:s.onSet||(()=>{})};let re=\\\"\\\";j.persist&&(s.storyId!==void 0?re=s.storyId:window.location.protocol===\\\"file:\\\"?re=e.id||\\\"\\\":re=window.location.pathname,re||(console.warn(\\\"Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled.\\\"),j.persist=!1)),j.scroll===\\\"element\\\"&&($.style.overflowY=\\\"auto\\\"),$.addEventListener(\\\"click\\\",g),$.addEventListener(\\\"keypress\\\",async function(T){T.key===\\\"Enter\\\"&&await g(T)});let ue={};const ct=function(T,A){T!=\\\"_output\\\"&&(T in ue||(ue[T]=A))},Ae=function(){(r??n).setAttribute(\\\"data-undo\\\",JSON.stringify(ue)),ue={}},we=function(T){if(!T)return;const A=JSON.parse(T);if(A)for(const B of Object.keys(A))he.setInternal(B,A[B],!1)},he=new nl(j.persist,re,j.onSet,h,ct),se=he.get.bind(he),Y=he.set.bind(he),Te=new sl(e,he,()=>t),Ue=new pl,Ce=T=>T in e.sections&&e.sections[T].text||null,Re=T=>t.passages&&T in t.passages?t.passages[T].text||null:\\\"passages\\\"in e.sections[\\\"\\\"]&&e.sections[\\\"\\\"].passages&&T in e.sections[\\\"\\\"].passages&&e.sections[\\\"\\\"].passages[T].text||null,St=T=>{u.push(T)},qe=new Lc,ge=new ol($,Te,he,Ue,Ce,Re,V.processText,St,qe,h);return ge.add(rs.ReplaceLabel()),ge.add(rs.RotateSequencePlugin()),ge.add(rs.RandomPlugin()),ge.add(rs.LivePlugin()),ge.add(rs.AnimatePlugin()),{begin:o,restart:x,get:se,set:Y,clickLink:f,update:U,goBack:xe,on:(T,A)=>h.on(T,A),off:(T,A)=>h.off(T,A),once:(T,A)=>h.once(T,A)}};return ut.init=Oc,Object.defineProperty(ut,Symbol.toStringTag,{value:\\\"Module\\\"}),ut})({});\\n//# sourceMappingURL=squiffy.runtime.global.js.map\\n\"","export default \"/* Core Squiffy Runtime Styles */\\n\\n/* Link styles */\\na.squiffy-link\\n{\\n text-decoration: underline;\\n text-decoration-color: Blue;\\n color: Blue;\\n cursor: pointer;\\n transition: color 0.4s ease-in-out, text-decoration-color 0.4s ease-in-out;\\n}\\n\\n/* Rotate/sequence links - visually distinct as they update in-place rather than advancing the story */\\na.squiffy-link[data-handler=\\\"rotate\\\"],\\na.squiffy-link[data-handler=\\\"sequence\\\"] {\\n text-decoration-style: dotted;\\n}\\n\\n/* Disabled link states */\\na.squiffy-link.disabled,\\ndiv.squiffy-output-section:not(:last-child) a.squiffy-link,\\ndiv.squiffy-output-section.links-disabled a.squiffy-link\\n{\\n text-decoration: inherit;\\n text-decoration-color: transparent;\\n color: inherit !important;\\n cursor: inherit;\\n pointer-events: none;\\n}\\n\\n/* Links disabled due to input validation */\\na.squiffy-link.validation-disabled\\n{\\n text-decoration: inherit;\\n text-decoration-color: transparent;\\n color: #999 !important;\\n cursor: not-allowed;\\n pointer-events: none;\\n opacity: 0.6;\\n}\\n\\n/* Invalid input field states */\\ninput.squiffy-invalid,\\ntextarea.squiffy-invalid,\\nselect.squiffy-invalid\\n{\\n border-color: #dc3545 !important;\\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);\\n}\\n\\n/* Valid input field states (optional, provides positive feedback) */\\ninput:not([disabled]):valid,\\ntextarea:not([disabled]):valid,\\nselect:not([disabled]):valid\\n{\\n border-color: #28a745;\\n}\\n\\n/* Focus state for invalid inputs */\\ninput.squiffy-invalid:focus,\\ntextarea.squiffy-invalid:focus,\\nselect.squiffy-invalid:focus\\n{\\n outline: none;\\n border-color: #dc3545 !important;\\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);\\n}\\n\\n/* Header button styles */\\nbutton.squiffy-header-button\\n{\\n text-decoration: underline;\\n color: Blue;\\n cursor: pointer;\\n background: none;\\n border: none;\\n font-family: inherit;\\n}\\n\\n/* Output block spacing */\\ndiv.squiffy-output-block:not(:last-child),\\ndiv.squiffy-output-passage:not(:last-child),\\ndiv.squiffy-output-section:not(:last-child)\\n{\\n margin-bottom: 1em;\\n border-bottom: 1px solid #ccc;\\n}\\n\\n/* Fade animations */\\n.fade-out {\\n opacity: 0;\\n transition: opacity 200ms;\\n}\\n\\n.fade-in {\\n opacity: 1;\\n transition: opacity 200ms;\\n}\\n\\n/* Continue animation - click to proceed */\\n.squiffy-continue {\\n text-decoration: underline;\\n text-decoration-color: Blue;\\n color: Blue;\\n cursor: pointer;\\n}\\n\\n/* Style: pulse - fades in and out */\\n.squiffy-continue-pulse {\\n animation: squiffy-pulse 1.5s ease-in-out infinite;\\n}\\n\\n@keyframes squiffy-pulse {\\n 0%, 100% { opacity: 1; }\\n 50% { opacity: 0.4; }\\n}\\n\\n/* Style: glow - pulsing glow effect */\\n.squiffy-continue-glow {\\n animation: squiffy-glow 1.5s ease-in-out infinite;\\n}\\n\\n@keyframes squiffy-glow {\\n 0%, 100% { text-shadow: 0 0 4px rgba(0, 0, 255, 0.5); }\\n 50% { text-shadow: 0 0 12px rgba(0, 0, 255, 0.8), 0 0 20px rgba(0, 0, 255, 0.4); }\\n}\\n\\n/* Style: bounce - subtle vertical bounce */\\n.squiffy-continue-bounce {\\n display: inline-block;\\n animation: squiffy-bounce 0.6s ease-in-out infinite;\\n}\\n\\n@keyframes squiffy-bounce {\\n 0%, 100% { transform: translateY(0); }\\n 50% { transform: translateY(-4px); }\\n}\\n\\n/* Style: wave - character spans need special handling for underline */\\n.squiffy-continue-wave {\\n text-decoration: none;\\n border-bottom: 1px solid Blue;\\n}\\n\"","export default \"<!DOCTYPE html>\\n<html>\\n<!-- INFO -->\\n<head>\\n <title><!-- TITLE --></title>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\\n <!-- SCRIPTS -->\\n <!-- STYLE_CONTENT -->\\n <!-- RUNTIME_CONTENT -->\\n <!-- STORY_CONTENT -->\\n <script>\\n document.addEventListener('DOMContentLoaded', async function () {\\n const squiffyApi = await squiffyRuntime.init({\\n element: document.getElementById('squiffy'),\\n story: story,\\n persist: true,\\n storyId: window.location.pathname,\\n });\\n\\n const restartButton = document.getElementById('restart');\\n restartButton.addEventListener('click', function () {\\n if (confirm('Are you sure you want to restart?')) {\\n squiffyApi.restart();\\n }\\n });\\n\\n await squiffyApi.begin();\\n });\\n </script>\\n <!-- STYLESHEETS -->\\n</head>\\n<body>\\n<div id=\\\"squiffy-container\\\">\\n <div id=\\\"squiffy-header\\\">\\n <button class=\\\"squiffy-header-button\\\" id=\\\"restart\\\" tabindex=\\\"0\\\">Restart</button>\\n </div>\\n <div id=\\\"squiffy\\\">\\n </div>\\n</div>\\n</body>\\n</html>\\n\"","export default \"/* Application-specific layout and container styles */\\ndiv#squiffy-container\\n{\\n max-width: 700px;\\n margin-left: auto;\\n margin-right: auto;\\n font-family: Georgia, serif;\\n}\\ndiv#squiffy-header\\n{\\n font-size: 14px;\\n text-align: right;\\n}\\ndiv#squiffy\\n{\\n font-size: 18px;\\n}\"","import { strToU8, zipSync } from \"fflate\";\nimport { CompileSuccess } from \"squiffy-compiler\";\n\nimport squiffyRuntime from \"squiffy-runtime/dist/squiffy.runtime.global.js?raw\";\nimport runtimeCss from \"squiffy-runtime/dist/squiffy.runtime.css?raw\";\nimport htmlTemplateFile from \"./index.template.html?raw\";\nimport cssTemplateFile from \"./style.template.css?raw\";\n\nimport pkg from \"../package.json\" with {type: \"json\"};\n\nconst version = pkg.version;\n\nexport interface Package {\n files: Record<string, string>;\n zip?: Uint8Array;\n}\n\nexport interface PackageOptions {\n createZip?: boolean;\n inlineHtml?: boolean;\n}\n\nexport const createPackage = async (input: CompileSuccess, createZipOrOptions: boolean | PackageOptions = false): Promise<Package> => {\n // Handle both old boolean signature and new options object\n const options: PackageOptions = typeof createZipOrOptions === \"boolean\"\n ? { createZip: createZipOrOptions }\n : createZipOrOptions;\n\n const output: Record<string, string> = {};\n const uiInfo = input.getUiInfo();\n\n const infoComment = `<!--\\n\\nCreated with Squiffy ${version}\\n\\nhttps://squiffystory.com\\nhttps://github.com/textadventures/squiffy\\n\\n-->`;\n const scriptData = uiInfo.externalScripts.map(script => `<script src=\"${script}\"></script>`).join(\"\\n\");\n const stylesheetData = uiInfo.externalStylesheets.map(sheet => `<link rel=\"stylesheet\" href=\"${sheet}\"/>`).join(\"\\n\");\n const combinedCss = runtimeCss.toString() + \"\\n\\n\" + cssTemplateFile.toString();\n\n const storyJs = await input.getJs();\n\n // Generate content for placeholders based on inline vs external mode\n // Note: We use arrow functions as replacements to prevent $-pattern interpretation\n // (e.g., $& or ${...} in the replacement string would otherwise be treated specially)\n let styleContent: string;\n let runtimeContent: string;\n let storyContent: string;\n\n if (options.inlineHtml) {\n // Inline everything into the HTML\n styleContent = \"<style>\\n\" + combinedCss + \"\\n </style>\";\n runtimeContent = \"<script>\\n\" + squiffyRuntime + \"\\n </script>\";\n storyContent = \"<script>\\n\" + storyJs + \"\\n </script>\";\n } else {\n // Reference external files\n styleContent = \"<link rel=\\\"stylesheet\\\" href=\\\"style.css\\\"/>\";\n runtimeContent = \"<script src=\\\"squiffy.runtime.global.js\\\"></script>\";\n storyContent = \"<script src=\\\"story.js\\\"></script>\";\n\n output[\"story.js\"] = storyJs;\n output[\"squiffy.runtime.global.js\"] = squiffyRuntime;\n output[\"style.css\"] = combinedCss;\n }\n\n let htmlData = htmlTemplateFile.toString();\n htmlData = htmlData.replace(\"<!-- INFO -->\", () => infoComment);\n htmlData = htmlData.replace(\"<!-- TITLE -->\", () => uiInfo.title);\n htmlData = htmlData.replace(\"<!-- SCRIPTS -->\", () => scriptData);\n htmlData = htmlData.replace(\"<!-- STYLESHEETS -->\", () => stylesheetData);\n htmlData = htmlData.replace(\"<!-- STYLE_CONTENT -->\", () => styleContent);\n htmlData = htmlData.replace(\"<!-- RUNTIME_CONTENT -->\", () => runtimeContent);\n htmlData = htmlData.replace(\"<!-- STORY_CONTENT -->\", () => storyContent);\n\n output[\"index.html\"] = htmlData;\n\n return {\n files: output,\n zip: !options.createZip ? undefined : zipSync(\n Object.fromEntries(\n Object.entries(output).map(([name, text]) => [name, strToU8(text)])\n )\n )\n };\n};"],"names":["u8","u16","i32","fleb","fdeb","clim","freb","eb","start","b","i","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","r","s","l","le","co","rvb","sv","r_1","v","m","flt","fdt","flm","fdm","shft","p","slc","e","ec","err","ind","msg","nt","wbits","d","o","wbits16","hTree","t","t2","et","a","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","n","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","flen","ftlen","dtlen","lm","ll","dm","dl","llm","lcts","it","clct","len","sym","dst","deo","dflt","lvl","plvl","pre","post","st","lst","opt","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","maxd","ml","nl","mmd","md","ti","pti","lin","din","crct","k","crc","cr","dopt","dict","newDat","mrg","wbytes","deflateSync","data","opts","fltn","val","op","te","td","tds","strToU8","str","latin1","ar","ai","exfl","ex","wzh","f","fn","u","ce","col","exl","y","exf","wzf","zipSync","files","tot","file","compression","com","ms","oe","cdl","badd","squiffyRuntime","runtimeCss","htmlTemplateFile","cssTemplateFile","version","pkg","createPackage","input","createZipOrOptions","options","output","uiInfo","infoComment","scriptData","script","stylesheetData","sheet","combinedCss","storyJs","styleContent","runtimeContent","storyContent","htmlData","name","text"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"packager.js","sources":["../../node_modules/fflate/esm/browser.js","../../runtime/dist/squiffy.runtime.global.js?raw","../../runtime/dist/squiffy.runtime.css?raw","../src/index.template.html?raw","../src/style.template.css?raw","../src/packager.ts"],"sourcesContent":["// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new i32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return { b: b, r: r };\n};\nvar _a = freb(fleb, 2), fl = _a.b, revfl = _a.r;\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r;\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 1; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n return new u8(v.subarray(s, e));\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, st, buf, dict) {\n // source length dict length\n var sl = dat.length, dl = dict ? dict.length : 0;\n if (!sl || st.f && !st.l)\n return buf || new u8(0);\n var noBuf = !buf;\n // have to estimate size\n var resize = noBuf || st.i != 2;\n // no state\n var noSt = st.i;\n // Assumes roughly 33% compression ratio average\n if (noBuf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (resize)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17\n if (resize)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (resize)\n cbuf(bt + 131072);\n var end = bt + add;\n if (bt < dt) {\n var shift = dl - dt, dend = Math.min(dt, end);\n if (shift + bt < 0)\n err(3);\n for (; bt < dend; ++bt)\n buf[bt] = dict[shift + bt];\n }\n for (; bt < end; ++bt)\n buf[bt] = buf[bt - dt];\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n // don't reallocate for streams or user buffers\n return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >> 8;\n d[o + 2] |= v >> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return { t: et, l: 0 };\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return { t: v, l: 1 };\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return { t: new u8(tr), l: mbt };\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return { c: cl.subarray(0, cli), n: s };\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;\n var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;\n var _c = lc(dlt), lclt = _c.c, nlc = _c.n;\n var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n ++lcfreq[lclt[i] & 31];\n for (var i = 0; i < lcdt.length; ++i)\n ++lcfreq[lcdt[i] & 31];\n var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];\n if (bs >= 0 && flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n var sym = syms[i];\n if (sym > 255) {\n var len = (sym >> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (sym >> 23) & 31), p += fleb[len];\n var dst = sym & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[sym]), p += ll[sym];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, st) {\n var s = st.z || dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var lst = st.l;\n var pos = (st.r || 0) & 7;\n if (lvl) {\n if (pos)\n w[0] = st.r >> 3;\n var opt = deo[lvl - 1];\n var n = opt >> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new i32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx blkpos\n var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;\n for (; i + 2 < s; ++i) {\n // hash value\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = i - dif + j & 32767;\n var pti = prev[ti];\n var cd = ti - pti & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += imod - pimod & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one int32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n for (i = Math.max(i, wi); i < s; ++i) {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n if (!lst) {\n st.r = (pos & 7) | w[(pos / 8) | 0] << 3;\n // shft(pos) now 1 less if pos & 7 != 0\n pos -= 7;\n st.h = head, st.p = prev, st.i = i, st.w = wi;\n }\n }\n else {\n for (var i = st.w || 0; i < s + lst; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[(pos / 8) | 0] = lst;\n e = s;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n st.i = s;\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Adler32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n if (!st) {\n st = { l: 1 };\n if (opt.dictionary) {\n var dict = opt.dictionary.subarray(-32768);\n var newDat = new u8(dict.length + dat.length);\n newDat.set(dict);\n newDat.set(dat, dict.length);\n dat = newDat;\n st.w = dict.length;\n }\n }\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : (12 + opt.mem), pre, post, st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return fnStr;\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n fnStr = wcln(fns[i], fnStr, td_1);\n ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 };\n }\n var td = mrg({}, ch[id].e);\n return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; };\nvar bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zls]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get opts\nvar gopt = function (o) { return o && {\n out: o.size && new u8(o.size),\n dictionary: o.dictionary\n}; };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) {\n if (ev.data.length) {\n strm.push(ev.data[0], ev.data[1]);\n postMessage([ev.data[0].length]);\n }\n else\n strm.flush();\n };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id, flush, ext) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else if (!Array.isArray(dat))\n ext(dat);\n else if (dat.length == 1) {\n strm.queuedSize -= dat[0];\n if (strm.ondrain)\n strm.ondrain(dat[0]);\n }\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.queuedSize = 0;\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n strm.queuedSize += d.length;\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n if (flush) {\n strm.flush = function () { w.postMessage([]); };\n }\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += (d[10] | d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32);\n c[1] |= 31 - ((c[0] << 8) | c[1]) % 31;\n if (o.dictionary) {\n var h = adler();\n h.p(o.dictionary);\n wbytes(c, 2, h.d());\n }\n};\n// zlib start\nvar zls = function (d, dict) {\n if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if ((d[1] >> 5 & 1) == +!dict)\n err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');\n return (d[1] >> 3 & 4) + 2;\n};\nfunction StrmOpt(opts, cb) {\n if (typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n this.s = { l: 0, i: 32768, w: 32768, z: 32768 };\n // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev\n // 98304 = 32768 (lookback) + 65536 (common chunk size)\n this.b = new u8(98304);\n if (this.o.dictionary) {\n var dict = this.o.dictionary.subarray(-32768);\n this.b.set(dict, 32768 - dict.length);\n this.s.i = 32768 - dict.length;\n }\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, this.s), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.s.l)\n err(4);\n var endLen = chunk.length + this.s.z;\n if (endLen > this.b.length) {\n if (endLen > 2 * this.b.length - 32768) {\n var newBuf = new u8(endLen & -32768);\n newBuf.set(this.b.subarray(0, this.s.z));\n this.b = newBuf;\n }\n var split = this.b.length - this.s.z;\n this.b.set(chunk.subarray(0, split), this.s.z);\n this.s.z = this.b.length;\n this.p(this.b, false);\n this.b.set(this.b.subarray(-32768));\n this.b.set(chunk.subarray(split), 32768);\n this.s.z = chunk.length - split + 32768;\n this.s.i = 32766, this.s.w = 32768;\n }\n else {\n this.b.set(chunk, this.s.z);\n this.s.z += chunk.length;\n }\n this.s.l = final & 1;\n if (this.s.z > this.s.w + 8191 || final) {\n this.p(this.b, final || false);\n this.s.w = this.s.i, this.s.i -= 2;\n }\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * deflated output for small inputs.\n */\n Deflate.prototype.flush = function () {\n if (!this.ondata)\n err(5);\n if (this.s.l)\n err(4);\n this.p(this.b, false);\n this.s.w = this.s.i, this.s.i -= 2;\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6, 1);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n function Inflate(opts, cb) {\n // no StrmOpt here to avoid adding to workerizer\n if (typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768);\n this.s = { i: 0, b: dict ? dict.length : 0 };\n this.o = new u8(32768);\n this.p = new u8(0);\n if (dict)\n this.o.set(dict);\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n if (!this.p.length)\n this.p = c;\n else if (c.length) {\n var n = new u8(this.p.length + c.length);\n n.set(this.p), n.set(c, this.p.length), this.p = n;\n }\n };\n Inflate.prototype.c = function (final) {\n this.s.i = +(this.d = final || false);\n var bts = this.s.b;\n var dt = inflt(this.p, this.s, this.o);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n function AsyncInflate(opts, cb) {\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Inflate(ev.data);\n onmessage = astrm(strm);\n }, 7, 0);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, opts) {\n return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n this.c.p(chunk);\n this.l += chunk.length;\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * GZIPped output for small inputs.\n */\n Gzip.prototype.flush = function () {\n Deflate.prototype.flush.call(this);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8, 1);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming single or multi-member GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n function Gunzip(opts, cb) {\n this.v = 1;\n this.r = 0;\n Inflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n this.r += chunk.length;\n if (this.v) {\n var p = this.p.subarray(this.v - 1);\n var s = p.length > 3 ? gzs(p) : 4;\n if (s > p.length) {\n if (!final)\n return;\n }\n else if (this.v > 1 && this.onmember) {\n this.onmember(this.r - p.length);\n }\n this.p = p.subarray(s), this.v = 0;\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n // process concatenated GZIP\n if (this.s.f && !this.s.l && !final) {\n this.v = shft(this.s.p) + 9;\n this.s = { i: 0 };\n this.o = new u8(0);\n this.push(new u8(0), final);\n }\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming single or multi-member GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n function AsyncGunzip(opts, cb) {\n var _this = this;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Gunzip(ev.data);\n strm.onmember = function (offset) { return postMessage(offset); };\n onmessage = astrm(strm);\n }, 9, 0, function (offset) { return _this.onmember && _this.onmember(offset); });\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0], ev.data[1])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, opts) {\n var st = gzs(data);\n if (st + 8 > data.length)\n err(6, 'invalid gzip data');\n return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n this.c.p(chunk);\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n /**\n * Flushes buffered uncompressed data. Useful to immediately retrieve the\n * zlibbed output for small inputs.\n */\n Zlib.prototype.flush = function () {\n Deflate.prototype.flush.call(this);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10, 1);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n function Unzlib(opts, cb) {\n Inflate.call(this, opts, cb);\n this.v = opts && opts.dictionary ? 2 : 1;\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 6 && !final)\n return;\n this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n function AsyncUnzlib(opts, cb) {\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, StrmOpt.call(this, opts, cb), function (ev) {\n var strm = new Unzlib(ev.data);\n onmessage = astrm(strm);\n }, 11, 0);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, opts) {\n return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n function Decompress(opts, cb) {\n this.o = StrmOpt.call(this, opts, cb) || {};\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n }\n // init substream\n // overriden by AsyncDecompress\n Decompress.prototype.i = function () {\n var _this = this;\n this.s.ondata = function (dat, final) {\n _this.ondata(dat, final);\n };\n };\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(this.o)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(this.o)\n : new this.Z(this.o);\n this.i();\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n function AsyncDecompress(opts, cb) {\n Decompress.call(this, opts, cb);\n this.queuedSize = 0;\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n }\n AsyncDecompress.prototype.i = function () {\n var _this = this;\n this.s.ondata = function (err, dat, final) {\n _this.ondata(err, dat, final);\n };\n this.s.ondrain = function (size) {\n _this.queuedSize -= size;\n if (_this.ondrain)\n _this.ondrain(size);\n };\n };\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n this.queuedSize += chunk.length;\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, opts) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, opts)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, opts)\n : unzlibSync(data, opts);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return { s: r, r: slc(d, i - 1) };\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), s = _a.s, r = _a.r;\n if (final) {\n if (r.length)\n err(8);\n this.p = null;\n }\n else\n this.p = r;\n this.ondata(s, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td) {\n return td.decode(dat);\n }\n else {\n var _a = dutf8(dat), s = _a.s, r = _a.r;\n if (r.length)\n err(8);\n return s;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4;\n if (c != -1) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u, -1);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this.ondata(err, dat, final);\n _this.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this.d & 1))\n return;\n _this.u.splice(-1, 1);\n _this.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this = this;\n this.i = new Inflate(function (dat, final) {\n _this.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this.k[0] == chks_3 && _this.c)\n _this.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = lft = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n // Synchronously decompress under 512KB, or barely-compressed data\n if (su < 524288 || sc > 0.8 * su) {\n try {\n cbl(null, inflateSync(infl, { out: new u8(su) }));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","export default \"var squiffyRuntime=(function(ut){\\\"use strict\\\";var Mc=Object.defineProperty;var Ic=(ut,tt,Qe)=>tt in ut?Mc(ut,tt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):ut[tt]=Qe;var le=(ut,tt,Qe)=>Ic(ut,typeof tt!=\\\"symbol\\\"?tt+\\\"\\\":tt,Qe);var vr;function tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qe=tt();function Pn(s){Qe=s}var Yt={exec:()=>null};function ne(s,e=\\\"\\\"){let t=typeof s==\\\"string\\\"?s:s.source,n={replace:(r,o)=>{let i=typeof o==\\\"string\\\"?o:o.source;return i=i.replace(Me.caret,\\\"$1\\\"),t=t.replace(r,i),n},getRegex:()=>new RegExp(t,e)};return n}var Me={codeRemoveIndent:/^(?: {1,4}| {0,3}\\\\t)/gm,outputLinkReplace:/\\\\\\\\([\\\\[\\\\]])/g,indentCodeCompensation:/^(\\\\s+)(?:```)/,beginningSpace:/^\\\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\\\n/g,tabCharGlobal:/\\\\t/g,multipleSpaceGlobal:/\\\\s+/g,blankLine:/^[ \\\\t]*$/,doubleBlankLine:/\\\\n[ \\\\t]*\\\\n[ \\\\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\\\n {0,3}((?:=+|-+) *)(?=\\\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\\\t]?/gm,listReplaceTabs:/^\\\\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\\\[[ xX]\\\\] /,listReplaceTask:/^\\\\[[ xX]\\\\] +/,anyLine:/\\\\n.*\\\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\\\||\\\\| *$/g,tableRowBlankLine:/\\\\n[ \\\\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\\\s|>)/i,endPreScriptTag:/^<\\\\/(pre|code|kbd|script)(\\\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'\\\"]*[^\\\\s])\\\\s+(['\\\"])(.*)\\\\2/,unicodeAlphaNumeric:/[\\\\p{L}\\\\p{N}]/u,escapeTest:/[&<>\\\"']/,escapeReplace:/[&<>\\\"']/g,escapeTestNoEncode:/[<>\\\"']|&(?!(#\\\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\\\w+);)/,escapeReplaceNoEncode:/[<>\\\"']|&(?!(#\\\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\\\w+);)/g,unescapeTest:/&(#(?:\\\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\\\w+));?/ig,caret:/(^|[^\\\\[])\\\\^/g,percentDecode:/%25/g,findPipe:/\\\\|/g,splitPipe:/ \\\\|/,slashPipe:/\\\\\\\\\\\\|/g,carriageReturn:/\\\\r\\\\n|\\\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\\\S*/,endingNewline:/\\\\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[\\t ][^\\\\\\\\n]*)?(?:\\\\\\\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\\\\\\\d{1,9}[.)])((?:[ \\t][^\\\\\\\\n]*)?(?:\\\\\\\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\\\\\* *){3,})(?:\\\\\\\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\\\\`\\\\`\\\\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,\\\"i\\\")},Vo=/^(?:[ \\\\t]*(?:\\\\n|$))+/,Uo=/^((?: {4}| {0,3}\\\\t)[^\\\\n]+(?:\\\\n(?:[ \\\\t]*(?:\\\\n|$))*)?)+/,Wo=/^ {0,3}(`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~{3,})([^\\\\n]*)(?:\\\\n|$)(?:|([\\\\s\\\\S]*?)(?:\\\\n|$))(?: {0,3}\\\\1[~`]* *(?=\\\\n|$)|$)/,Jt=/^ {0,3}((?:-[\\\\t ]*){3,}|(?:_[ \\\\t]*){3,}|(?:\\\\*[ \\\\t]*){3,})(?:\\\\n+|$)/,Go=/^ {0,3}(#{1,6})(?=\\\\s|$)(.*)(?:\\\\n+|$)/,_r=/(?:[*+-]|\\\\d{1,9}[.)])/,En=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\\\n(?!\\\\s*?\\\\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\\\\n {0,3}(=+|-+) *(?:\\\\n+|$)/,Ln=ne(En).replace(/bull/g,_r).replace(/blockCode/g,/(?: {4}| {0,3}\\\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\\\n>]+>\\\\n/).replace(/\\\\|table/g,\\\"\\\").getRegex(),Xo=ne(En).replace(/bull/g,_r).replace(/blockCode/g,/(?: {4}| {0,3}\\\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\\\n>]+>\\\\n/).replace(/table/g,/ {0,3}\\\\|?(?:[:\\\\- ]*\\\\|)+[\\\\:\\\\- ]*\\\\n/).getRegex(),br=/^([^\\\\n]+(?:\\\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\\\n)[^\\\\n]+)*)/,Yo=/^[^\\\\n]+/,Sr=/(?!\\\\s*\\\\])(?:\\\\\\\\[\\\\s\\\\S]|[^\\\\[\\\\]\\\\\\\\])+/,Jo=ne(/^ {0,3}\\\\[(label)\\\\]: *(?:\\\\n[ \\\\t]*)?([^<\\\\s][^\\\\s]*|<.*?>)(?:(?: +(?:\\\\n[ \\\\t]*)?| *\\\\n[ \\\\t]*)(title))? *(?:\\\\n+|$)/).replace(\\\"label\\\",Sr).replace(\\\"title\\\",/(?:\\\"(?:\\\\\\\\\\\"?|[^\\\"\\\\\\\\])*\\\"|'[^'\\\\n]*(?:\\\\n[^'\\\\n]+)*\\\\n?'|\\\\([^()]*\\\\))/).getRegex(),Qo=ne(/^( {0,3}bull)([ \\\\t][^\\\\n]+?)?(?:\\\\n|$)/).replace(/bull/g,_r).getRegex(),_s=\\\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\\\",kr=/<!--(?:-?>|[\\\\s\\\\S]*?(?:-->|$))/,Ko=ne(\\\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\\\\\s>][\\\\\\\\s\\\\\\\\S]*?(?:</\\\\\\\\1>[^\\\\\\\\n]*\\\\\\\\n+|$)|comment[^\\\\\\\\n]*(\\\\\\\\n+|$)|<\\\\\\\\?[\\\\\\\\s\\\\\\\\S]*?(?:\\\\\\\\?>\\\\\\\\n*|$)|<![A-Z][\\\\\\\\s\\\\\\\\S]*?(?:>\\\\\\\\n*|$)|<!\\\\\\\\[CDATA\\\\\\\\[[\\\\\\\\s\\\\\\\\S]*?(?:\\\\\\\\]\\\\\\\\]>\\\\\\\\n*|$)|</?(tag)(?: +|\\\\\\\\n|/?>)[\\\\\\\\s\\\\\\\\S]*?(?:(?:\\\\\\\\n[ \\t]*)+\\\\\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\\\\\t]*(?:\\\\\\\\n|$))[\\\\\\\\s\\\\\\\\S]*?(?:(?:\\\\\\\\n[ \\t]*)+\\\\\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\\\\\w-]*\\\\\\\\s*>(?=[ \\\\\\\\t]*(?:\\\\\\\\n|$))[\\\\\\\\s\\\\\\\\S]*?(?:(?:\\\\\\\\n[ \\t]*)+\\\\\\\\n|$))\\\",\\\"i\\\").replace(\\\"comment\\\",kr).replace(\\\"tag\\\",_s).replace(\\\"attribute\\\",/ +[a-zA-Z:_][\\\\w.:-]*(?: *= *\\\"[^\\\"\\\\n]*\\\"| *= *'[^'\\\\n]*'| *= *[^\\\\s\\\"'=<>`]+)?/).getRegex(),An=ne(br).replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",\\\" {0,3}#{1,6}(?:\\\\\\\\s|$)\\\").replace(\\\"|lheading\\\",\\\"\\\").replace(\\\"|table\\\",\\\"\\\").replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"fences\\\",\\\" {0,3}(?:`{3,}(?=[^`\\\\\\\\n]*\\\\\\\\n)|~{3,})[^\\\\\\\\n]*\\\\\\\\n\\\").replace(\\\"list\\\",\\\" {0,3}(?:[*+-]|1[.)]) \\\").replace(\\\"html\\\",\\\"</?(?:tag)(?: +|\\\\\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\\\").replace(\\\"tag\\\",_s).getRegex(),Zo=ne(/^( {0,3}> ?(paragraph|[^\\\\n]*)(?:\\\\n|$))+/).replace(\\\"paragraph\\\",An).getRegex(),xr={blockquote:Zo,code:Uo,def:Jo,fences:Wo,heading:Go,hr:Jt,html:Ko,lheading:Ln,list:Qo,newline:Vo,paragraph:An,table:Yt,text:Yo},Rn=ne(\\\"^ *([^\\\\\\\\n ].*)\\\\\\\\n {0,3}((?:\\\\\\\\| *)?:?-+:? *(?:\\\\\\\\| *:?-+:? *)*(?:\\\\\\\\| *)?)(?:\\\\\\\\n((?:(?! *\\\\\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\\\\\n|$))*)\\\\\\\\n*|$)\\\").replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",\\\" {0,3}#{1,6}(?:\\\\\\\\s|$)\\\").replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"code\\\",\\\"(?: {4}| {0,3}\\t)[^\\\\\\\\n]\\\").replace(\\\"fences\\\",\\\" {0,3}(?:`{3,}(?=[^`\\\\\\\\n]*\\\\\\\\n)|~{3,})[^\\\\\\\\n]*\\\\\\\\n\\\").replace(\\\"list\\\",\\\" {0,3}(?:[*+-]|1[.)]) \\\").replace(\\\"html\\\",\\\"</?(?:tag)(?: +|\\\\\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\\\").replace(\\\"tag\\\",_s).getRegex(),jo={...xr,lheading:Xo,table:Rn,paragraph:ne(br).replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",\\\" {0,3}#{1,6}(?:\\\\\\\\s|$)\\\").replace(\\\"|lheading\\\",\\\"\\\").replace(\\\"table\\\",Rn).replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"fences\\\",\\\" {0,3}(?:`{3,}(?=[^`\\\\\\\\n]*\\\\\\\\n)|~{3,})[^\\\\\\\\n]*\\\\\\\\n\\\").replace(\\\"list\\\",\\\" {0,3}(?:[*+-]|1[.)]) \\\").replace(\\\"html\\\",\\\"</?(?:tag)(?: +|\\\\\\\\n|/?>)|<(?:script|pre|style|textarea|!--)\\\").replace(\\\"tag\\\",_s).getRegex()},ea={...xr,html:ne(`^ *(?:comment *(?:\\\\\\\\n|\\\\\\\\s*$)|<(tag)[\\\\\\\\s\\\\\\\\S]+?</\\\\\\\\1> *(?:\\\\\\\\n{2,}|\\\\\\\\s*$)|<tag(?:\\\"[^\\\"]*\\\"|'[^']*'|\\\\\\\\s[^'\\\"/>\\\\\\\\s]*)*?/?> *(?:\\\\\\\\n{2,}|\\\\\\\\s*$))`).replace(\\\"comment\\\",kr).replace(/tag/g,\\\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\\\\\b)\\\\\\\\w+(?!:|[^\\\\\\\\w\\\\\\\\s@]*@)\\\\\\\\b\\\").getRegex(),def:/^ *\\\\[([^\\\\]]+)\\\\]: *<?([^\\\\s>]+)>?(?: +([\\\"(][^\\\\n]+[\\\")]))? *(?:\\\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\\\n+|$)/,fences:Yt,lheading:/^(.+?)\\\\n {0,3}(=+|-+) *(?:\\\\n+|$)/,paragraph:ne(br).replace(\\\"hr\\\",Jt).replace(\\\"heading\\\",` *#{1,6} *[^\\n]`).replace(\\\"lheading\\\",Ln).replace(\\\"|table\\\",\\\"\\\").replace(\\\"blockquote\\\",\\\" {0,3}>\\\").replace(\\\"|fences\\\",\\\"\\\").replace(\\\"|list\\\",\\\"\\\").replace(\\\"|html\\\",\\\"\\\").replace(\\\"|tag\\\",\\\"\\\").getRegex()},ta=/^\\\\\\\\([!\\\"#$%&'()*+,\\\\-./:;<=>?@\\\\[\\\\]\\\\\\\\^_`{|}~])/,sa=/^(`+)([^`]|[^`][\\\\s\\\\S]*?[^`])\\\\1(?!`)/,On=/^( {2,}|\\\\\\\\)\\\\n(?!\\\\s*$)/,ra=/^(`+|[^`])(?:(?= {2,}\\\\n)|[\\\\s\\\\S]*?(?:(?=[\\\\\\\\<!\\\\[`*_]|\\\\b_|$)|[^ ](?= {2,}\\\\n)))/,bs=/[\\\\p{P}\\\\p{S}]/u,wr=/[\\\\s\\\\p{P}\\\\p{S}]/u,Mn=/[^\\\\s\\\\p{P}\\\\p{S}]/u,na=ne(/^((?![*_])punctSpace)/,\\\"u\\\").replace(/punctSpace/g,wr).getRegex(),In=/(?!~)[\\\\p{P}\\\\p{S}]/u,ia=/(?!~)[\\\\s\\\\p{P}\\\\p{S}]/u,oa=/(?:[^\\\\s\\\\p{P}\\\\p{S}]|~)/u,aa=/\\\\[[^\\\\[\\\\]]*?\\\\]\\\\((?:\\\\\\\\[\\\\s\\\\S]|[^\\\\\\\\\\\\(\\\\)]|\\\\((?:\\\\\\\\[\\\\s\\\\S]|[^\\\\\\\\\\\\(\\\\)])*\\\\))*\\\\)|`[^`]*?`|<(?! )[^<>]*?>/g,Nn=/^(?:\\\\*+(?:((?!\\\\*)punct)|[^\\\\s*]))|^_+(?:((?!_)punct)|([^\\\\s_]))/,la=ne(Nn,\\\"u\\\").replace(/punct/g,bs).getRegex(),ca=ne(Nn,\\\"u\\\").replace(/punct/g,In).getRegex(),Bn=\\\"^[^_*]*?__[^_*]*?\\\\\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\\\\\*)punct(\\\\\\\\*+)(?=[\\\\\\\\s]|$)|notPunctSpace(\\\\\\\\*+)(?!\\\\\\\\*)(?=punctSpace|$)|(?!\\\\\\\\*)punctSpace(\\\\\\\\*+)(?=notPunctSpace)|[\\\\\\\\s](\\\\\\\\*+)(?!\\\\\\\\*)(?=punct)|(?!\\\\\\\\*)punct(\\\\\\\\*+)(?!\\\\\\\\*)(?=punct)|notPunctSpace(\\\\\\\\*+)(?=notPunctSpace)\\\",ua=ne(Bn,\\\"gu\\\").replace(/notPunctSpace/g,Mn).replace(/punctSpace/g,wr).replace(/punct/g,bs).getRegex(),ha=ne(Bn,\\\"gu\\\").replace(/notPunctSpace/g,oa).replace(/punctSpace/g,ia).replace(/punct/g,In).getRegex(),pa=ne(\\\"^[^_*]*?\\\\\\\\*\\\\\\\\*[^_*]*?_[^_*]*?(?=\\\\\\\\*\\\\\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\\\",\\\"gu\\\").replace(/notPunctSpace/g,Mn).replace(/punctSpace/g,wr).replace(/punct/g,bs).getRegex(),fa=ne(/\\\\\\\\(punct)/,\\\"gu\\\").replace(/punct/g,bs).getRegex(),da=ne(/^<(scheme:[^\\\\s\\\\x00-\\\\x1f<>]*|email)>/).replace(\\\"scheme\\\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\\\"email\\\",/[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])?)+(?![-_])/).getRegex(),ga=ne(kr).replace(\\\"(?:-->|$)\\\",\\\"-->\\\").getRegex(),ma=ne(\\\"^comment|^</[a-zA-Z][\\\\\\\\w:-]*\\\\\\\\s*>|^<[a-zA-Z][\\\\\\\\w-]*(?:attribute)*?\\\\\\\\s*/?>|^<\\\\\\\\?[\\\\\\\\s\\\\\\\\S]*?\\\\\\\\?>|^<![a-zA-Z]+\\\\\\\\s[\\\\\\\\s\\\\\\\\S]*?>|^<!\\\\\\\\[CDATA\\\\\\\\[[\\\\\\\\s\\\\\\\\S]*?\\\\\\\\]\\\\\\\\]>\\\").replace(\\\"comment\\\",ga).replace(\\\"attribute\\\",/\\\\s+[a-zA-Z:_][\\\\w.:-]*(?:\\\\s*=\\\\s*\\\"[^\\\"]*\\\"|\\\\s*=\\\\s*'[^']*'|\\\\s*=\\\\s*[^\\\\s\\\"'=<>`]+)?/).getRegex(),Ss=/(?:\\\\[(?:\\\\\\\\[\\\\s\\\\S]|[^\\\\[\\\\]\\\\\\\\])*\\\\]|\\\\\\\\[\\\\s\\\\S]|`[^`]*`|[^\\\\[\\\\]\\\\\\\\`])*?/,va=ne(/^!?\\\\[(label)\\\\]\\\\(\\\\s*(href)(?:(?:[ \\\\t]*(?:\\\\n[ \\\\t]*)?)(title))?\\\\s*\\\\)/).replace(\\\"label\\\",Ss).replace(\\\"href\\\",/<(?:\\\\\\\\.|[^\\\\n<>\\\\\\\\])+>|[^ \\\\t\\\\n\\\\x00-\\\\x1f]*/).replace(\\\"title\\\",/\\\"(?:\\\\\\\\\\\"?|[^\\\"\\\\\\\\])*\\\"|'(?:\\\\\\\\'?|[^'\\\\\\\\])*'|\\\\((?:\\\\\\\\\\\\)?|[^)\\\\\\\\])*\\\\)/).getRegex(),Dn=ne(/^!?\\\\[(label)\\\\]\\\\[(ref)\\\\]/).replace(\\\"label\\\",Ss).replace(\\\"ref\\\",Sr).getRegex(),qn=ne(/^!?\\\\[(ref)\\\\](?:\\\\[\\\\])?/).replace(\\\"ref\\\",Sr).getRegex(),ya=ne(\\\"reflink|nolink(?!\\\\\\\\()\\\",\\\"g\\\").replace(\\\"reflink\\\",Dn).replace(\\\"nolink\\\",qn).getRegex(),Tr={_backpedal:Yt,anyPunctuation:fa,autolink:da,blockSkip:aa,br:On,code:sa,del:Yt,emStrongLDelim:la,emStrongRDelimAst:ua,emStrongRDelimUnd:pa,escape:ta,link:va,nolink:qn,punctuation:na,reflink:Dn,reflinkSearch:ya,tag:ma,text:ra,url:Yt},_a={...Tr,link:ne(/^!?\\\\[(label)\\\\]\\\\((.*?)\\\\)/).replace(\\\"label\\\",Ss).getRegex(),reflink:ne(/^!?\\\\[(label)\\\\]\\\\s*\\\\[([^\\\\]]*)\\\\]/).replace(\\\"label\\\",Ss).getRegex()},Cr={...Tr,emStrongRDelimAst:ha,emStrongLDelim:ca,url:ne(/^((?:ftp|https?):\\\\/\\\\/|www\\\\.)(?:[a-zA-Z0-9\\\\-]+\\\\.?)+[^\\\\s<]*|^email/,\\\"i\\\").replace(\\\"email\\\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\\\"~()&]+|\\\\([^)]*\\\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\\\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\\\s~])((?:\\\\\\\\[\\\\s\\\\S]|[^\\\\\\\\])*?(?:\\\\\\\\[\\\\s\\\\S]|[^\\\\s~\\\\\\\\]))\\\\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\\\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\\\/=?_`{\\\\|}~-]+@)|[\\\\s\\\\S]*?(?:(?=[\\\\\\\\<!\\\\[`*~_]|\\\\b_|https?:\\\\/\\\\/|ftp:\\\\/\\\\/|www\\\\.|$)|[^ ](?= {2,}\\\\n)|[^a-zA-Z0-9.!#$%&'*+\\\\/=?_`{\\\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\\\/=?_`{\\\\|}~-]+@)))/},ba={...Cr,br:ne(On).replace(\\\"{2,}\\\",\\\"*\\\").getRegex(),text:ne(Cr.text).replace(\\\"\\\\\\\\b_\\\",\\\"\\\\\\\\b_| {2,}\\\\\\\\n\\\").replace(/\\\\{2,\\\\}/g,\\\"*\\\").getRegex()},ks={normal:xr,gfm:jo,pedantic:ea},Qt={normal:Tr,gfm:Cr,breaks:ba,pedantic:_a},Sa={\\\"&\\\":\\\"&amp;\\\",\\\"<\\\":\\\"&lt;\\\",\\\">\\\":\\\"&gt;\\\",'\\\"':\\\"&quot;\\\",\\\"'\\\":\\\"&#39;\\\"},Hn=s=>Sa[s];function it(s,e){if(e){if(Me.escapeTest.test(s))return s.replace(Me.escapeReplace,Hn)}else if(Me.escapeTestNoEncode.test(s))return s.replace(Me.escapeReplaceNoEncode,Hn);return s}function Fn(s){try{s=encodeURI(s).replace(Me.percentDecode,\\\"%\\\")}catch{return null}return s}function $n(s,e){let t=s.replace(Me.findPipe,(o,i,l)=>{let c=!1,p=i;for(;--p>=0&&l[p]===\\\"\\\\\\\\\\\";)c=!c;return c?\\\"|\\\":\\\" |\\\"}),n=t.split(Me.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push(\\\"\\\");for(;r<n.length;r++)n[r]=n[r].trim().replace(Me.slashPipe,\\\"|\\\");return n}function Kt(s,e,t){let n=s.length;if(n===0)return\\\"\\\";let r=0;for(;r<n&&s.charAt(n-r-1)===e;)r++;return s.slice(0,n-r)}function ka(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<s.length;n++)if(s[n]===\\\"\\\\\\\\\\\")n++;else if(s[n]===e[0])t++;else if(s[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function zn(s,e,t,n,r){let o=e.href,i=e.title||null,l=s[1].replace(r.other.outputLinkReplace,\\\"$1\\\");n.state.inLink=!0;let c={type:s[0].charAt(0)===\\\"!\\\"?\\\"image\\\":\\\"link\\\",raw:t,href:o,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,c}function xa(s,e,t){let n=s.match(t.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`\\n`).map(o=>{let i=o.match(t.other.beginningSpace);if(i===null)return o;let[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`\\n`)}var xs=class{constructor(s){le(this,\\\"options\\\");le(this,\\\"rules\\\");le(this,\\\"lexer\\\");this.options=s||Qe}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:\\\"space\\\",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,\\\"\\\");return{type:\\\"code\\\",raw:e[0],codeBlockStyle:\\\"indented\\\",text:this.options.pedantic?t:Kt(t,`\\n`)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let t=e[0],n=xa(t,e[3]||\\\"\\\",this.rules);return{type:\\\"code\\\",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,\\\"$1\\\"):e[2],text:n}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=Kt(t,\\\"#\\\");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:\\\"heading\\\",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:\\\"hr\\\",raw:Kt(e[0],`\\n`)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let t=Kt(e[0],`\\n`).split(`\\n`),n=\\\"\\\",r=\\\"\\\",o=[];for(;t.length>0;){let i=!1,l=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))l.push(t[c]),i=!0;else if(!i)l.push(t[c]);else break;t=t.slice(c);let p=l.join(`\\n`),f=p.replace(this.rules.other.blockquoteSetextReplace,`\\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\\\"\\\");n=n?`${n}\\n${p}`:p,r=r?`${r}\\n${f}`:f;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=g,t.length===0)break;let u=o.at(-1);if(u?.type===\\\"code\\\")break;if(u?.type===\\\"blockquote\\\"){let h=u,a=h.raw+`\\n`+t.join(`\\n`),d=this.blockquote(a);o[o.length-1]=d,n=n.substring(0,n.length-h.raw.length)+d.raw,r=r.substring(0,r.length-h.text.length)+d.text;break}else if(u?.type===\\\"list\\\"){let h=u,a=h.raw+`\\n`+t.join(`\\n`),d=this.list(a);o[o.length-1]=d,n=n.substring(0,n.length-u.raw.length)+d.raw,r=r.substring(0,r.length-h.raw.length)+d.raw,t=a.substring(o.at(-1).raw.length).split(`\\n`);continue}}return{type:\\\"blockquote\\\",raw:n,tokens:o,text:r}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim(),n=t.length>1,r={type:\\\"list\\\",raw:\\\"\\\",ordered:n,start:n?+t.slice(0,-1):\\\"\\\",loose:!1,items:[]};t=n?`\\\\\\\\d{1,9}\\\\\\\\${t.slice(-1)}`:`\\\\\\\\${t}`,this.options.pedantic&&(t=n?t:\\\"[*+-]\\\");let o=this.rules.other.listItemRegex(t),i=!1;for(;s;){let c=!1,p=\\\"\\\",f=\\\"\\\";if(!(e=o.exec(s))||this.rules.block.hr.test(s))break;p=e[0],s=s.substring(p.length);let g=e[2].split(`\\n`,1)[0].replace(this.rules.other.listReplaceTabs,v=>\\\" \\\".repeat(3*v.length)),u=s.split(`\\n`,1)[0],h=!g.trim(),a=0;if(this.options.pedantic?(a=2,f=g.trimStart()):h?a=e[1].length+1:(a=e[2].search(this.rules.other.nonSpaceChar),a=a>4?1:a,f=g.slice(a),a+=e[1].length),h&&this.rules.other.blankLine.test(u)&&(p+=u+`\\n`,s=s.substring(u.length+1),c=!0),!c){let v=this.rules.other.nextBulletRegex(a),_=this.rules.other.hrRegex(a),S=this.rules.other.fencesBeginRegex(a),y=this.rules.other.headingBeginRegex(a),b=this.rules.other.htmlBeginRegex(a);for(;s;){let k=s.split(`\\n`,1)[0],x;if(u=k,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting,\\\" \\\"),x=u):x=u.replace(this.rules.other.tabCharGlobal,\\\" \\\"),S.test(u)||y.test(u)||b.test(u)||v.test(u)||_.test(u))break;if(x.search(this.rules.other.nonSpaceChar)>=a||!u.trim())f+=`\\n`+x.slice(a);else{if(h||g.replace(this.rules.other.tabCharGlobal,\\\" \\\").search(this.rules.other.nonSpaceChar)>=4||S.test(g)||y.test(g)||_.test(g))break;f+=`\\n`+u}!h&&!u.trim()&&(h=!0),p+=k+`\\n`,s=s.substring(k.length+1),g=x.slice(a)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(i=!0));let d=null,m;this.options.gfm&&(d=this.rules.other.listIsTask.exec(f),d&&(m=d[0]!==\\\"[ ] \\\",f=f.replace(this.rules.other.listReplaceTask,\\\"\\\"))),r.items.push({type:\\\"list_item\\\",raw:p,task:!!d,checked:m,loose:!1,text:f,tokens:[]}),r.raw+=p}let l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let p=r.items[c].tokens.filter(g=>g.type===\\\"space\\\"),f=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=f}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:\\\"html\\\",block:!0,raw:e[0],pre:e[1]===\\\"pre\\\"||e[1]===\\\"script\\\"||e[1]===\\\"style\\\",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,\\\" \\\"),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,\\\"$1\\\").replace(this.rules.inline.anyPunctuation,\\\"$1\\\"):\\\"\\\",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,\\\"$1\\\"):e[3];return{type:\\\"def\\\",tag:t,raw:e[0],href:n,title:r}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=$n(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,\\\"\\\").split(\\\"|\\\"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,\\\"\\\").split(`\\n`):[],o={type:\\\"table\\\",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(let i of n)this.rules.other.tableAlignRight.test(i)?o.align.push(\\\"right\\\"):this.rules.other.tableAlignCenter.test(i)?o.align.push(\\\"center\\\"):this.rules.other.tableAlignLeft.test(i)?o.align.push(\\\"left\\\"):o.align.push(null);for(let i=0;i<t.length;i++)o.header.push({text:t[i],tokens:this.lexer.inline(t[i]),header:!0,align:o.align[i]});for(let i of r)o.rows.push($n(i,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:\\\"heading\\\",raw:e[0],depth:e[2].charAt(0)===\\\"=\\\"?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let t=e[1].charAt(e[1].length-1)===`\\n`?e[1].slice(0,-1):e[1];return{type:\\\"paragraph\\\",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:\\\"text\\\",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:\\\"escape\\\",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:\\\"html\\\",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let o=Kt(t.slice(0,-1),\\\"\\\\\\\\\\\");if((t.length-o.length)%2===0)return}else{let o=ka(e[2],\\\"()\\\");if(o===-2)return;if(o>-1){let i=(e[0].indexOf(\\\"!\\\")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,i).trim(),e[3]=\\\"\\\"}}let n=e[2],r=\\\"\\\";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):\\\"\\\";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),zn(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,\\\"$1\\\"),title:r&&r.replace(this.rules.inline.anyPunctuation,\\\"$1\\\")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal,\\\" \\\"),r=e[n.toLowerCase()];if(!r){let o=t[0].charAt(0);return{type:\\\"text\\\",raw:o,text:o}}return zn(t,r,t[0],this.lexer,this.rules)}}emStrong(s,e,t=\\\"\\\"){let n=this.rules.inline.emStrongLDelim.exec(s);if(!(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!t||this.rules.inline.punctuation.exec(t))){let r=[...n[0]].length-1,o,i,l=r,c=0,p=n[0][0]===\\\"*\\\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*s.length+r);(n=p.exec(e))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(i=[...o].length,n[3]||n[4]){l+=i;continue}else if((n[5]||n[6])&&r%3&&!((r+i)%3)){c+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+c);let f=[...n[0]][0].length,g=s.slice(0,r+n.index+f+i);if(Math.min(r,i)%2){let h=g.slice(1,-1);return{type:\\\"em\\\",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}let u=g.slice(2,-2);return{type:\\\"strong\\\",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal,\\\" \\\"),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:\\\"codespan\\\",raw:e[0],text:t}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:\\\"br\\\",raw:e[0]}}del(s){let e=this.rules.inline.del.exec(s);if(e)return{type:\\\"del\\\",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let t,n;return e[2]===\\\"@\\\"?(t=e[1],n=\\\"mailto:\\\"+t):(t=e[1],n=t),{type:\\\"link\\\",raw:e[0],text:t,href:n,tokens:[{type:\\\"text\\\",raw:t,text:t}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let t,n;if(e[2]===\\\"@\\\")t=e[0],n=\\\"mailto:\\\"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??\\\"\\\";while(r!==e[0]);t=e[0],e[1]===\\\"www.\\\"?n=\\\"http://\\\"+e[0]:n=e[0]}return{type:\\\"link\\\",raw:e[0],text:t,href:n,tokens:[{type:\\\"text\\\",raw:t,text:t}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let t=this.lexer.state.inRawBlock;return{type:\\\"text\\\",raw:e[0],text:e[0],escaped:t}}}},ht=class Tn{constructor(e){le(this,\\\"tokens\\\");le(this,\\\"options\\\");le(this,\\\"state\\\");le(this,\\\"tokenizer\\\");le(this,\\\"inlineQueue\\\");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qe,this.options.tokenizer=this.options.tokenizer||new xs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Me,block:ks.normal,inline:Qt.normal};this.options.pedantic?(t.block=ks.pedantic,t.inline=Qt.pedantic):this.options.gfm&&(t.block=ks.gfm,this.options.breaks?t.inline=Qt.breaks:t.inline=Qt.gfm),this.tokenizer.rules=t}static get rules(){return{block:ks,inline:Qt}}static lex(e,t){return new Tn(t).lex(e)}static lexInline(e,t){return new Tn(t).inlineTokens(e)}lex(e){e=e.replace(Me.carriageReturn,`\\n`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Me.tabCharGlobal,\\\" \\\").replace(Me.spaceLine,\\\"\\\"));e;){let r;if(this.options.extensions?.block?.some(i=>(r=i.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let i=t.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`\\n`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\\\"paragraph\\\"||i?.type===\\\"text\\\"?(i.raw+=(i.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,i.text+=`\\n`+r.text,this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\\\"paragraph\\\"||i?.type===\\\"text\\\"?(i.raw+=(i.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,i.text+=`\\n`+r.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let i=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(p=>{c=p.call({lexer:this},l),typeof c==\\\"number\\\"&&c>=0&&(i=Math.min(i,c))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=t.at(-1);n&&i?.type===\\\"paragraph\\\"?(i.raw+=(i.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,i.text+=`\\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\\\"text\\\"?(i.raw+=(i.raw.endsWith(`\\n`)?\\\"\\\":`\\n`)+r.raw,i.text+=`\\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(e){let i=\\\"Infinite loop on byte: \\\"+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(r[0].slice(r[0].lastIndexOf(\\\"[\\\")+1,-1))&&(n=n.slice(0,r.index)+\\\"[\\\"+\\\"a\\\".repeat(r[0].length-2)+\\\"]\\\"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+\\\"++\\\"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+\\\"[\\\"+\\\"a\\\".repeat(r[0].length-2)+\\\"]\\\"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let o=!1,i=\\\"\\\";for(;e;){o||(i=\\\"\\\"),o=!1;let l;if(this.options.extensions?.inline?.some(p=>(l=p.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let p=t.at(-1);l.type===\\\"text\\\"&&p?.type===\\\"text\\\"?(p.raw+=l.raw,p.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,n,i)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let c=e;if(this.options.extensions?.startInline){let p=1/0,f=e.slice(1),g;this.options.extensions.startInline.forEach(u=>{g=u.call({lexer:this},f),typeof g==\\\"number\\\"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(c=e.substring(0,p+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),l.raw.slice(-1)!==\\\"_\\\"&&(i=l.raw.slice(-1)),o=!0;let p=t.at(-1);p?.type===\\\"text\\\"?(p.raw+=l.raw,p.text+=l.text):t.push(l);continue}if(e){let p=\\\"Infinite loop on byte: \\\"+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},ws=class{constructor(s){le(this,\\\"options\\\");le(this,\\\"parser\\\");this.options=s||Qe}space(s){return\\\"\\\"}code({text:s,lang:e,escaped:t}){let n=(e||\\\"\\\").match(Me.notSpaceStart)?.[0],r=s.replace(Me.endingNewline,\\\"\\\")+`\\n`;return n?'<pre><code class=\\\"language-'+it(n)+'\\\">'+(t?r:it(r,!0))+`</code></pre>\\n`:\\\"<pre><code>\\\"+(t?r:it(r,!0))+`</code></pre>\\n`}blockquote({tokens:s}){return`<blockquote>\\n${this.parser.parse(s)}</blockquote>\\n`}html({text:s}){return s}def(s){return\\\"\\\"}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>\\n`}hr(s){return`<hr>\\n`}list(s){let e=s.ordered,t=s.start,n=\\\"\\\";for(let i=0;i<s.items.length;i++){let l=s.items[i];n+=this.listitem(l)}let r=e?\\\"ol\\\":\\\"ul\\\",o=e&&t!==1?' start=\\\"'+t+'\\\"':\\\"\\\";return\\\"<\\\"+r+o+`>\\n`+n+\\\"</\\\"+r+`>\\n`}listitem(s){let e=\\\"\\\";if(s.task){let t=this.checkbox({checked:!!s.checked});s.loose?s.tokens[0]?.type===\\\"paragraph\\\"?(s.tokens[0].text=t+\\\" \\\"+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type===\\\"text\\\"&&(s.tokens[0].tokens[0].text=t+\\\" \\\"+it(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:\\\"text\\\",raw:t+\\\" \\\",text:t+\\\" \\\",escaped:!0}):e+=t+\\\" \\\"}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>\\n`}checkbox({checked:s}){return\\\"<input \\\"+(s?'checked=\\\"\\\" ':\\\"\\\")+'disabled=\\\"\\\" type=\\\"checkbox\\\">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>\\n`}table(s){let e=\\\"\\\",t=\\\"\\\";for(let r=0;r<s.header.length;r++)t+=this.tablecell(s.header[r]);e+=this.tablerow({text:t});let n=\\\"\\\";for(let r=0;r<s.rows.length;r++){let o=s.rows[r];t=\\\"\\\";for(let i=0;i<o.length;i++)t+=this.tablecell(o[i]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>\\n<thead>\\n`+e+`</thead>\\n`+n+`</table>\\n`}tablerow({text:s}){return`<tr>\\n${s}</tr>\\n`}tablecell(s){let e=this.parser.parseInline(s.tokens),t=s.header?\\\"th\\\":\\\"td\\\";return(s.align?`<${t} align=\\\"${s.align}\\\">`:`<${t}>`)+e+`</${t}>\\n`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${it(s,!0)}</code>`}br(s){return\\\"<br>\\\"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){let n=this.parser.parseInline(t),r=Fn(s);if(r===null)return n;s=r;let o='<a href=\\\"'+s+'\\\"';return e&&(o+=' title=\\\"'+it(e)+'\\\"'),o+=\\\">\\\"+n+\\\"</a>\\\",o}image({href:s,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let r=Fn(s);if(r===null)return it(t);s=r;let o=`<img src=\\\"${s}\\\" alt=\\\"${t}\\\"`;return e&&(o+=` title=\\\"${it(e)}\\\"`),o+=\\\">\\\",o}text(s){return\\\"tokens\\\"in s&&s.tokens?this.parser.parseInline(s.tokens):\\\"escaped\\\"in s&&s.escaped?s.text:it(s.text)}},Pr=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return\\\"\\\"+s}image({text:s}){return\\\"\\\"+s}br(){return\\\"\\\"}},pt=class Cn{constructor(e){le(this,\\\"options\\\");le(this,\\\"renderer\\\");le(this,\\\"textRenderer\\\");this.options=e||Qe,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pr}static parse(e,t){return new Cn(t).parse(e)}static parseInline(e,t){return new Cn(t).parseInline(e)}parse(e,t=!0){let n=\\\"\\\";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let l=o,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||![\\\"space\\\",\\\"hr\\\",\\\"heading\\\",\\\"code\\\",\\\"table\\\",\\\"blockquote\\\",\\\"list\\\",\\\"html\\\",\\\"def\\\",\\\"paragraph\\\",\\\"text\\\"].includes(l.type)){n+=c||\\\"\\\";continue}}let i=o;switch(i.type){case\\\"space\\\":{n+=this.renderer.space(i);continue}case\\\"hr\\\":{n+=this.renderer.hr(i);continue}case\\\"heading\\\":{n+=this.renderer.heading(i);continue}case\\\"code\\\":{n+=this.renderer.code(i);continue}case\\\"table\\\":{n+=this.renderer.table(i);continue}case\\\"blockquote\\\":{n+=this.renderer.blockquote(i);continue}case\\\"list\\\":{n+=this.renderer.list(i);continue}case\\\"html\\\":{n+=this.renderer.html(i);continue}case\\\"def\\\":{n+=this.renderer.def(i);continue}case\\\"paragraph\\\":{n+=this.renderer.paragraph(i);continue}case\\\"text\\\":{let l=i,c=this.renderer.text(l);for(;r+1<e.length&&e[r+1].type===\\\"text\\\";)l=e[++r],c+=`\\n`+this.renderer.text(l);t?n+=this.renderer.paragraph({type:\\\"paragraph\\\",raw:c,text:c,tokens:[{type:\\\"text\\\",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{let l='Token with \\\"'+i.type+'\\\" type was not found.';if(this.options.silent)return console.error(l),\\\"\\\";throw new Error(l)}}}return n}parseInline(e,t=this.renderer){let n=\\\"\\\";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||![\\\"escape\\\",\\\"html\\\",\\\"link\\\",\\\"image\\\",\\\"strong\\\",\\\"em\\\",\\\"codespan\\\",\\\"br\\\",\\\"del\\\",\\\"text\\\"].includes(o.type)){n+=l||\\\"\\\";continue}}let i=o;switch(i.type){case\\\"escape\\\":{n+=t.text(i);break}case\\\"html\\\":{n+=t.html(i);break}case\\\"link\\\":{n+=t.link(i);break}case\\\"image\\\":{n+=t.image(i);break}case\\\"strong\\\":{n+=t.strong(i);break}case\\\"em\\\":{n+=t.em(i);break}case\\\"codespan\\\":{n+=t.codespan(i);break}case\\\"br\\\":{n+=t.br(i);break}case\\\"del\\\":{n+=t.del(i);break}case\\\"text\\\":{n+=t.text(i);break}default:{let l='Token with \\\"'+i.type+'\\\" type was not found.';if(this.options.silent)return console.error(l),\\\"\\\";throw new Error(l)}}}return n}},Zt=(vr=class{constructor(s){le(this,\\\"options\\\");le(this,\\\"block\\\");this.options=s||Qe}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?ht.lex:ht.lexInline}provideParser(){return this.block?pt.parse:pt.parseInline}},le(vr,\\\"passThroughHooks\\\",new Set([\\\"preprocess\\\",\\\"postprocess\\\",\\\"processAllTokens\\\",\\\"emStrongMask\\\"])),le(vr,\\\"passThroughHooksRespectAsync\\\",new Set([\\\"preprocess\\\",\\\"postprocess\\\",\\\"processAllTokens\\\"])),vr),wa=class{constructor(...s){le(this,\\\"defaults\\\",tt());le(this,\\\"options\\\",this.setOptions);le(this,\\\"parse\\\",this.parseMarkdown(!0));le(this,\\\"parseInline\\\",this.parseMarkdown(!1));le(this,\\\"Parser\\\",pt);le(this,\\\"Renderer\\\",ws);le(this,\\\"TextRenderer\\\",Pr);le(this,\\\"Lexer\\\",ht);le(this,\\\"Tokenizer\\\",xs);le(this,\\\"Hooks\\\",Zt);this.use(...s)}walkTokens(s,e){let t=[];for(let n of s)switch(t=t.concat(e.call(this,n)),n.type){case\\\"table\\\":{let r=n;for(let o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let i of o)t=t.concat(this.walkTokens(i.tokens,e));break}case\\\"list\\\":{let r=n;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let i=r[o].flat(1/0);t=t.concat(this.walkTokens(i,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error(\\\"extension name required\\\");if(\\\"renderer\\\"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:e.renderers[r.name]=r.renderer}if(\\\"tokenizer\\\"in r){if(!r.level||r.level!==\\\"block\\\"&&r.level!==\\\"inline\\\")throw new Error(\\\"extension level must be 'block' or 'inline'\\\");let o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level===\\\"block\\\"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level===\\\"inline\\\"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}\\\"childTokens\\\"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){let r=this.defaults.renderer||new ws(this.defaults);for(let o in t.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if([\\\"options\\\",\\\"parser\\\"].includes(o))continue;let i=o,l=t.renderer[i],c=r[i];r[i]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=c.apply(r,p)),f||\\\"\\\"}}n.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new xs(this.defaults);for(let o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if([\\\"options\\\",\\\"rules\\\",\\\"lexer\\\"].includes(o))continue;let i=o,l=t.tokenizer[i],c=r[i];r[i]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=c.apply(r,p)),f}}n.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new Zt;for(let o in t.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if([\\\"options\\\",\\\"block\\\"].includes(o))continue;let i=o,l=t.hooks[i],c=r[i];Zt.passThroughHooks.has(o)?r[i]=p=>{if(this.defaults.async&&Zt.passThroughHooksRespectAsync.has(o))return Promise.resolve(l.call(r,p)).then(g=>c.call(r,g));let f=l.call(r,p);return c.call(r,f)}:r[i]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=c.apply(r,p)),f}}n.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,o=t.walkTokens;n.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&(l=l.concat(r.call(this,i))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return ht.lex(s,e??this.defaults)}parser(s,e){return pt.parse(s,e??this.defaults)}parseMarkdown(s){return(e,t)=>{let n={...t},r={...this.defaults,...n},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error(\\\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\\\"));if(typeof e>\\\"u\\\"||e===null)return o(new Error(\\\"marked(): input parameter is undefined or null\\\"));if(typeof e!=\\\"string\\\")return o(new Error(\\\"marked(): input parameter is of type \\\"+Object.prototype.toString.call(e)+\\\", string expected\\\"));r.hooks&&(r.hooks.options=r,r.hooks.block=s);let i=r.hooks?r.hooks.provideLexer():s?ht.lex:ht.lexInline,l=r.hooks?r.hooks.provideParser():s?pt.parse:pt.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(c=>i(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>l(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let c=i(e,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let p=l(c,r);return r.hooks&&(p=r.hooks.postprocess(p)),p}catch(c){return o(c)}}}onError(s,e){return t=>{if(t.message+=`\\nPlease report this to https://github.com/markedjs/marked.`,s){let n=\\\"<p>An error occurred:</p><pre>\\\"+it(t.message+\\\"\\\",!0)+\\\"</pre>\\\";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},Et=new wa;function oe(s,e){return Et.parse(s,e)}oe.options=oe.setOptions=function(s){return Et.setOptions(s),oe.defaults=Et.defaults,Pn(oe.defaults),oe},oe.getDefaults=tt,oe.defaults=Qe,oe.use=function(...s){return Et.use(...s),oe.defaults=Et.defaults,Pn(oe.defaults),oe},oe.walkTokens=function(s,e){return Et.walkTokens(s,e)},oe.parseInline=Et.parseInline,oe.Parser=pt,oe.parser=pt.parse,oe.Renderer=ws,oe.TextRenderer=Pr,oe.Lexer=ht,oe.lexer=ht.lex,oe.Tokenizer=xs,oe.Hooks=Zt,oe.parse=oe,oe.options,oe.setOptions,oe.use,oe.walkTokens;var Er=oe.parseInline,Lr=oe;pt.parse,ht.lex;function Ta(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,\\\"default\\\")?s.default:s}var Ts={exports:{}},Cs={exports:{}},st={},He={},Vn;function Fe(){if(Vn)return He;Vn=1,He.__esModule=!0,He.extend=r,He.indexOf=c,He.escapeExpression=p,He.isEmpty=f,He.createFrame=g,He.blockParams=u,He.appendContextPath=h;var s={\\\"&\\\":\\\"&amp;\\\",\\\"<\\\":\\\"&lt;\\\",\\\">\\\":\\\"&gt;\\\",'\\\"':\\\"&quot;\\\",\\\"'\\\":\\\"&#x27;\\\",\\\"`\\\":\\\"&#x60;\\\",\\\"=\\\":\\\"&#x3D;\\\"},e=/[&<>\\\"'`=]/g,t=/[&<>\\\"'`=]/;function n(a){return s[a]}function r(a){for(var d=1;d<arguments.length;d++)for(var m in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],m)&&(a[m]=arguments[d][m]);return a}var o=Object.prototype.toString;He.toString=o;var i=function(d){return typeof d==\\\"function\\\"};i(/x/)&&(He.isFunction=i=function(a){return typeof a==\\\"function\\\"&&o.call(a)===\\\"[object Function]\\\"}),He.isFunction=i;var l=Array.isArray||function(a){return a&&typeof a==\\\"object\\\"?o.call(a)===\\\"[object Array]\\\":!1};He.isArray=l;function c(a,d){for(var m=0,v=a.length;m<v;m++)if(a[m]===d)return m;return-1}function p(a){if(typeof a!=\\\"string\\\"){if(a&&a.toHTML)return a.toHTML();if(a==null)return\\\"\\\";if(!a)return a+\\\"\\\";a=\\\"\\\"+a}return t.test(a)?a.replace(e,n):a}function f(a){return!a&&a!==0?!0:!!(l(a)&&a.length===0)}function g(a){var d=r({},a);return d._parent=a,d}function u(a,d){return a.path=d,a}function h(a,d){return(a?a+\\\".\\\":\\\"\\\")+d}return He}var Ps={exports:{}},Un;function rt(){return Un||(Un=1,(function(s,e){e.__esModule=!0;var t=[\\\"description\\\",\\\"fileName\\\",\\\"lineNumber\\\",\\\"endLineNumber\\\",\\\"message\\\",\\\"name\\\",\\\"number\\\",\\\"stack\\\"];function n(r,o){var i=o&&o.loc,l=void 0,c=void 0,p=void 0,f=void 0;i&&(l=i.start.line,c=i.end.line,p=i.start.column,f=i.end.column,r+=\\\" - \\\"+l+\\\":\\\"+p);for(var g=Error.prototype.constructor.call(this,r),u=0;u<t.length;u++)this[t[u]]=g[t[u]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{i&&(this.lineNumber=l,this.endLineNumber=c,Object.defineProperty?(Object.defineProperty(this,\\\"column\\\",{value:p,enumerable:!0}),Object.defineProperty(this,\\\"endColumn\\\",{value:f,enumerable:!0})):(this.column=p,this.endColumn=f))}catch{}}n.prototype=new Error,e.default=n,s.exports=e.default})(Ps,Ps.exports)),Ps.exports}var jt={},Es={exports:{}},Wn;function Ca(){return Wn||(Wn=1,(function(s,e){e.__esModule=!0;var t=Fe();e.default=function(n){n.registerHelper(\\\"blockHelperMissing\\\",function(r,o){var i=o.inverse,l=o.fn;if(r===!0)return l(this);if(r===!1||r==null)return i(this);if(t.isArray(r))return r.length>0?(o.ids&&(o.ids=[o.name]),n.helpers.each(r,o)):i(this);if(o.data&&o.ids){var c=t.createFrame(o.data);c.contextPath=t.appendContextPath(o.data.contextPath,o.name),o={data:c}}return l(r,o)})},s.exports=e.default})(Es,Es.exports)),Es.exports}var Ls={exports:{}},Gn;function Pa(){return Gn||(Gn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=Fe(),r=rt(),o=t(r);e.default=function(i){i.registerHelper(\\\"each\\\",function(l,c){if(!c)throw new o.default(\\\"Must pass iterator to #each\\\");var p=c.fn,f=c.inverse,g=0,u=\\\"\\\",h=void 0,a=void 0;c.data&&c.ids&&(a=n.appendContextPath(c.data.contextPath,c.ids[0])+\\\".\\\"),n.isFunction(l)&&(l=l.call(this)),c.data&&(h=n.createFrame(c.data));function d(y,b,k){h&&(h.key=y,h.index=b,h.first=b===0,h.last=!!k,a&&(h.contextPath=a+y)),u=u+p(l[y],{data:h,blockParams:n.blockParams([l[y],y],[a+y,null])})}if(l&&typeof l==\\\"object\\\")if(n.isArray(l))for(var m=l.length;g<m;g++)g in l&&d(g,g,g===l.length-1);else if(typeof Symbol==\\\"function\\\"&&l[Symbol.iterator]){for(var v=[],_=l[Symbol.iterator](),S=_.next();!S.done;S=_.next())v.push(S.value);l=v;for(var m=l.length;g<m;g++)d(g,g,g===l.length-1)}else(function(){var y=void 0;Object.keys(l).forEach(function(b){y!==void 0&&d(y,g-1),y=b,g++}),y!==void 0&&d(y,g-1,!0)})();return g===0&&(u=f(this)),u})},s.exports=e.default})(Ls,Ls.exports)),Ls.exports}var As={exports:{}},Xn;function Ea(){return Xn||(Xn=1,(function(s,e){e.__esModule=!0;function t(o){return o&&o.__esModule?o:{default:o}}var n=rt(),r=t(n);e.default=function(o){o.registerHelper(\\\"helperMissing\\\",function(){if(arguments.length!==1)throw new r.default('Missing helper: \\\"'+arguments[arguments.length-1].name+'\\\"')})},s.exports=e.default})(As,As.exports)),As.exports}var Rs={exports:{}},Yn;function La(){return Yn||(Yn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=Fe(),r=rt(),o=t(r);e.default=function(i){i.registerHelper(\\\"if\\\",function(l,c){if(arguments.length!=2)throw new o.default(\\\"#if requires exactly one argument\\\");return n.isFunction(l)&&(l=l.call(this)),!c.hash.includeZero&&!l||n.isEmpty(l)?c.inverse(this):c.fn(this)}),i.registerHelper(\\\"unless\\\",function(l,c){if(arguments.length!=2)throw new o.default(\\\"#unless requires exactly one argument\\\");return i.helpers.if.call(this,l,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},s.exports=e.default})(Rs,Rs.exports)),Rs.exports}var Os={exports:{}},Jn;function Aa(){return Jn||(Jn=1,(function(s,e){e.__esModule=!0,e.default=function(t){t.registerHelper(\\\"log\\\",function(){for(var n=[void 0],r=arguments[arguments.length-1],o=0;o<arguments.length-1;o++)n.push(arguments[o]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),n[0]=i,t.log.apply(t,n)})},s.exports=e.default})(Os,Os.exports)),Os.exports}var Ms={exports:{}},Qn;function Ra(){return Qn||(Qn=1,(function(s,e){e.__esModule=!0,e.default=function(t){t.registerHelper(\\\"lookup\\\",function(n,r,o){return n&&o.lookupProperty(n,r)})},s.exports=e.default})(Ms,Ms.exports)),Ms.exports}var Is={exports:{}},Kn;function Oa(){return Kn||(Kn=1,(function(s,e){e.__esModule=!0;function t(i){return i&&i.__esModule?i:{default:i}}var n=Fe(),r=rt(),o=t(r);e.default=function(i){i.registerHelper(\\\"with\\\",function(l,c){if(arguments.length!=2)throw new o.default(\\\"#with requires exactly one argument\\\");n.isFunction(l)&&(l=l.call(this));var p=c.fn;if(n.isEmpty(l))return c.inverse(this);var f=c.data;return c.data&&c.ids&&(f=n.createFrame(c.data),f.contextPath=n.appendContextPath(c.data.contextPath,c.ids[0])),p(l,{data:f,blockParams:n.blockParams([l],[f&&f.contextPath])})})},s.exports=e.default})(Is,Is.exports)),Is.exports}var Zn;function jn(){if(Zn)return jt;Zn=1,jt.__esModule=!0,jt.registerDefaultHelpers=d,jt.moveHelperToHooks=m;function s(v){return v&&v.__esModule?v:{default:v}}var e=Ca(),t=s(e),n=Pa(),r=s(n),o=Ea(),i=s(o),l=La(),c=s(l),p=Aa(),f=s(p),g=Ra(),u=s(g),h=Oa(),a=s(h);function d(v){t.default(v),r.default(v),i.default(v),c.default(v),f.default(v),u.default(v),a.default(v)}function m(v,_,S){v.helpers[_]&&(v.hooks[_]=v.helpers[_],S||delete v.helpers[_])}return jt}var Ns={},Bs={exports:{}},ei;function Ma(){return ei||(ei=1,(function(s,e){e.__esModule=!0;var t=Fe();e.default=function(n){n.registerDecorator(\\\"inline\\\",function(r,o,i,l){var c=r;return o.partials||(o.partials={},c=function(p,f){var g=i.partials;i.partials=t.extend({},g,o.partials);var u=r(p,f);return i.partials=g,u}),o.partials[l.args[0]]=l.fn,c})},s.exports=e.default})(Bs,Bs.exports)),Bs.exports}var ti;function Ia(){if(ti)return Ns;ti=1,Ns.__esModule=!0,Ns.registerDefaultDecorators=n;function s(r){return r&&r.__esModule?r:{default:r}}var e=Ma(),t=s(e);function n(r){t.default(r)}return Ns}var Ds={exports:{}},si;function ri(){return si||(si=1,(function(s,e){e.__esModule=!0;var t=Fe(),n={methodMap:[\\\"debug\\\",\\\"info\\\",\\\"warn\\\",\\\"error\\\"],level:\\\"info\\\",lookupLevel:function(o){if(typeof o==\\\"string\\\"){var i=t.indexOf(n.methodMap,o.toLowerCase());i>=0?o=i:o=parseInt(o,10)}return o},log:function(o){if(o=n.lookupLevel(o),typeof console<\\\"u\\\"&&n.lookupLevel(n.level)<=o){var i=n.methodMap[o];console[i]||(i=\\\"log\\\");for(var l=arguments.length,c=Array(l>1?l-1:0),p=1;p<l;p++)c[p-1]=arguments[p];console[i].apply(console,c)}}};e.default=n,s.exports=e.default})(Ds,Ds.exports)),Ds.exports}var Bt={},qs={},ni;function Na(){if(ni)return qs;ni=1,qs.__esModule=!0,qs.createNewLookupObject=e;var s=Fe();function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return s.extend.apply(void 0,[Object.create(null)].concat(n))}return qs}var ii;function oi(){if(ii)return Bt;ii=1,Bt.__esModule=!0,Bt.createProtoAccessControl=o,Bt.resultIsAllowed=i,Bt.resetLoggedProperties=p;function s(f){return f&&f.__esModule?f:{default:f}}var e=Na(),t=ri(),n=s(t),r=Object.create(null);function o(f){var g=Object.create(null);g.constructor=!1,g.__defineGetter__=!1,g.__defineSetter__=!1,g.__lookupGetter__=!1;var u=Object.create(null);return u.__proto__=!1,{properties:{whitelist:e.createNewLookupObject(u,f.allowedProtoProperties),defaultValue:f.allowProtoPropertiesByDefault},methods:{whitelist:e.createNewLookupObject(g,f.allowedProtoMethods),defaultValue:f.allowProtoMethodsByDefault}}}function i(f,g,u){return l(typeof f==\\\"function\\\"?g.methods:g.properties,u)}function l(f,g){return f.whitelist[g]!==void 0?f.whitelist[g]===!0:f.defaultValue!==void 0?f.defaultValue:(c(g),!1)}function c(f){r[f]!==!0&&(r[f]=!0,n.default.log(\\\"error\\\",'Handlebars: Access has been denied to resolve the property \\\"'+f+`\\\" because it is not an \\\"own property\\\" of its parent.\\nYou can add a runtime option to disable the check or this warning:\\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function p(){Object.keys(r).forEach(function(f){delete r[f]})}return Bt}var ai;function Ar(){if(ai)return st;ai=1,st.__esModule=!0,st.HandlebarsEnvironment=a;function s(m){return m&&m.__esModule?m:{default:m}}var e=Fe(),t=rt(),n=s(t),r=jn(),o=Ia(),i=ri(),l=s(i),c=oi(),p=\\\"4.7.8\\\";st.VERSION=p;var f=8;st.COMPILER_REVISION=f;var g=7;st.LAST_COMPATIBLE_COMPILER_REVISION=g;var u={1:\\\"<= 1.0.rc.2\\\",2:\\\"== 1.0.0-rc.3\\\",3:\\\"== 1.0.0-rc.4\\\",4:\\\"== 1.x.x\\\",5:\\\"== 2.0.0-alpha.x\\\",6:\\\">= 2.0.0-beta.1\\\",7:\\\">= 4.0.0 <4.3.0\\\",8:\\\">= 4.3.0\\\"};st.REVISION_CHANGES=u;var h=\\\"[object Object]\\\";function a(m,v,_){this.helpers=m||{},this.partials=v||{},this.decorators=_||{},r.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}a.prototype={constructor:a,logger:l.default,log:l.default.log,registerHelper:function(v,_){if(e.toString.call(v)===h){if(_)throw new n.default(\\\"Arg not supported with multiple helpers\\\");e.extend(this.helpers,v)}else this.helpers[v]=_},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,_){if(e.toString.call(v)===h)e.extend(this.partials,v);else{if(typeof _>\\\"u\\\")throw new n.default('Attempting to register a partial called \\\"'+v+'\\\" as undefined');this.partials[v]=_}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,_){if(e.toString.call(v)===h){if(_)throw new n.default(\\\"Arg not supported with multiple decorators\\\");e.extend(this.decorators,v)}else this.decorators[v]=_},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var d=l.default.log;return st.log=d,st.createFrame=e.createFrame,st.logger=l.default,st}var Hs={exports:{}},li;function Ba(){return li||(li=1,(function(s,e){e.__esModule=!0;function t(n){this.string=n}t.prototype.toString=t.prototype.toHTML=function(){return\\\"\\\"+this.string},e.default=t,s.exports=e.default})(Hs,Hs.exports)),Hs.exports}var ft={},Fs={},ci;function Da(){if(ci)return Fs;ci=1,Fs.__esModule=!0,Fs.wrapHelper=s;function s(e,t){if(typeof e!=\\\"function\\\")return e;var n=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return n}return Fs}var ui;function qa(){if(ui)return ft;ui=1,ft.__esModule=!0,ft.checkRevision=f,ft.template=g,ft.wrapProgram=u,ft.resolvePartial=h,ft.invokePartial=a,ft.noop=d;function s(y){return y&&y.__esModule?y:{default:y}}function e(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var k in y)Object.prototype.hasOwnProperty.call(y,k)&&(b[k]=y[k]);return b.default=y,b}var t=Fe(),n=e(t),r=rt(),o=s(r),i=Ar(),l=jn(),c=Da(),p=oi();function f(y){var b=y&&y[0]||1,k=i.COMPILER_REVISION;if(!(b>=i.LAST_COMPATIBLE_COMPILER_REVISION&&b<=i.COMPILER_REVISION))if(b<i.LAST_COMPATIBLE_COMPILER_REVISION){var x=i.REVISION_CHANGES[k],C=i.REVISION_CHANGES[b];throw new o.default(\\\"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (\\\"+x+\\\") or downgrade your runtime to an older version (\\\"+C+\\\").\\\")}else throw new o.default(\\\"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (\\\"+y[1]+\\\").\\\")}function g(y,b){if(!b)throw new o.default(\\\"No environment passed to template\\\");if(!y||!y.main)throw new o.default(\\\"Unknown template object: \\\"+typeof y);y.main.decorator=y.main_d,b.VM.checkRevision(y.compiler);var k=y.compiler&&y.compiler[0]===7;function x(P,w,E){E.hash&&(w=n.extend({},w,E.hash),E.ids&&(E.ids[0]=!0)),P=b.VM.resolvePartial.call(this,P,w,E);var L=n.extend({},E,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),M=b.VM.invokePartial.call(this,P,w,L);if(M==null&&b.compile&&(E.partials[E.name]=b.compile(P,y.compilerOptions,b),M=E.partials[E.name](w,L)),M!=null){if(E.indent){for(var q=M.split(`\\n`),$=0,U=q.length;$<U&&!(!q[$]&&$+1===U);$++)q[$]=E.indent+q[$];M=q.join(`\\n`)}return M}else throw new o.default(\\\"The partial \\\"+E.name+\\\" could not be compiled when running in runtime-only mode\\\")}var C={strict:function(w,E,L){if(!w||!(E in w))throw new o.default('\\\"'+E+'\\\" not defined in '+w,{loc:L});return C.lookupProperty(w,E)},lookupProperty:function(w,E){var L=w[E];if(L==null||Object.prototype.hasOwnProperty.call(w,E)||p.resultIsAllowed(L,C.protoAccessControl,E))return L},lookup:function(w,E){for(var L=w.length,M=0;M<L;M++){var q=w[M]&&C.lookupProperty(w[M],E);if(q!=null)return w[M][E]}},lambda:function(w,E){return typeof w==\\\"function\\\"?w.call(E):w},escapeExpression:n.escapeExpression,invokePartial:x,fn:function(w){var E=y[w];return E.decorator=y[w+\\\"_d\\\"],E},programs:[],program:function(w,E,L,M,q){var $=this.programs[w],U=this.fn(w);return E||q||M||L?$=u(this,w,U,E,L,M,q):$||($=this.programs[w]=u(this,w,U)),$},data:function(w,E){for(;w&&E--;)w=w._parent;return w},mergeIfNeeded:function(w,E){var L=w||E;return w&&E&&w!==E&&(L=n.extend({},E,w)),L},nullContext:Object.seal({}),noop:b.VM.noop,compilerInfo:y.compiler};function O(P){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],E=w.data;O._setup(w),!w.partial&&y.useData&&(E=m(P,E));var L=void 0,M=y.useBlockParams?[]:void 0;y.useDepths&&(w.depths?L=P!=w.depths[0]?[P].concat(w.depths):w.depths:L=[P]);function q($){return\\\"\\\"+y.main(C,$,C.helpers,C.partials,E,M,L)}return q=v(y.main,q,C,w.depths||[],E,M),q(P,w)}return O.isTop=!0,O._setup=function(P){if(P.partial)C.protoAccessControl=P.protoAccessControl,C.helpers=P.helpers,C.partials=P.partials,C.decorators=P.decorators,C.hooks=P.hooks;else{var w=n.extend({},b.helpers,P.helpers);_(w,C),C.helpers=w,y.usePartial&&(C.partials=C.mergeIfNeeded(P.partials,b.partials)),(y.usePartial||y.useDecorators)&&(C.decorators=n.extend({},b.decorators,P.decorators)),C.hooks={},C.protoAccessControl=p.createProtoAccessControl(P);var E=P.allowCallsToHelperMissing||k;l.moveHelperToHooks(C,\\\"helperMissing\\\",E),l.moveHelperToHooks(C,\\\"blockHelperMissing\\\",E)}},O._child=function(P,w,E,L){if(y.useBlockParams&&!E)throw new o.default(\\\"must pass block params\\\");if(y.useDepths&&!L)throw new o.default(\\\"must pass parent depths\\\");return u(C,P,y[P],w,0,E,L)},O}function u(y,b,k,x,C,O,P){function w(E){var L=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],M=P;return P&&E!=P[0]&&!(E===y.nullContext&&P[0]===null)&&(M=[E].concat(P)),k(y,E,y.helpers,y.partials,L.data||x,O&&[L.blockParams].concat(O),M)}return w=v(k,w,y,P,x,O),w.program=b,w.depth=P?P.length:0,w.blockParams=C||0,w}function h(y,b,k){return y?!y.call&&!k.name&&(k.name=y,y=k.partials[y]):k.name===\\\"@partial-block\\\"?y=k.data[\\\"partial-block\\\"]:y=k.partials[k.name],y}function a(y,b,k){var x=k.data&&k.data[\\\"partial-block\\\"];k.partial=!0,k.ids&&(k.data.contextPath=k.ids[0]||k.data.contextPath);var C=void 0;if(k.fn&&k.fn!==d&&(function(){k.data=i.createFrame(k.data);var O=k.fn;C=k.data[\\\"partial-block\\\"]=function(w){var E=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return E.data=i.createFrame(E.data),E.data[\\\"partial-block\\\"]=x,O(w,E)},O.partials&&(k.partials=n.extend({},k.partials,O.partials))})(),y===void 0&&C&&(y=C),y===void 0)throw new o.default(\\\"The partial \\\"+k.name+\\\" could not be found\\\");if(y instanceof Function)return y(b,k)}function d(){return\\\"\\\"}function m(y,b){return(!b||!(\\\"root\\\"in b))&&(b=b?i.createFrame(b):{},b.root=y),b}function v(y,b,k,x,C,O){if(y.decorator){var P={};b=y.decorator(b,P,k,x&&x[0],C,O,x),n.extend(b,P)}return b}function _(y,b){Object.keys(y).forEach(function(k){var x=y[k];y[k]=S(x,b)})}function S(y,b){var k=b.lookupProperty;return c.wrapHelper(y,function(x){return n.extend({lookupProperty:k},x)})}return ft}var $s={exports:{}},hi;function pi(){return hi||(hi=1,(function(s,e){e.__esModule=!0,e.default=function(t){(function(){typeof globalThis!=\\\"object\\\"&&(Object.prototype.__defineGetter__(\\\"__magic__\\\",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var n=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=n),t}},s.exports=e.default})($s,$s.exports)),$s.exports}var fi;function Ha(){return fi||(fi=1,(function(s,e){e.__esModule=!0;function t(_){return _&&_.__esModule?_:{default:_}}function n(_){if(_&&_.__esModule)return _;var S={};if(_!=null)for(var y in _)Object.prototype.hasOwnProperty.call(_,y)&&(S[y]=_[y]);return S.default=_,S}var r=Ar(),o=n(r),i=Ba(),l=t(i),c=rt(),p=t(c),f=Fe(),g=n(f),u=qa(),h=n(u),a=pi(),d=t(a);function m(){var _=new o.HandlebarsEnvironment;return g.extend(_,o),_.SafeString=l.default,_.Exception=p.default,_.Utils=g,_.escapeExpression=g.escapeExpression,_.VM=h,_.template=function(S){return h.template(S,_)},_}var v=m();v.create=m,d.default(v),v.default=v,e.default=v,s.exports=e.default})(Cs,Cs.exports)),Cs.exports}var zs={exports:{}},di;function gi(){return di||(di=1,(function(s,e){e.__esModule=!0;var t={helpers:{helperExpression:function(r){return r.type===\\\"SubExpression\\\"||(r.type===\\\"MustacheStatement\\\"||r.type===\\\"BlockStatement\\\")&&!!(r.params&&r.params.length||r.hash)},scopedId:function(r){return/^\\\\.|this\\\\b/.test(r.original)},simpleId:function(r){return r.parts.length===1&&!t.helpers.scopedId(r)&&!r.depth}}};e.default=t,s.exports=e.default})(zs,zs.exports)),zs.exports}var Dt={},Vs={exports:{}},mi;function Fa(){return mi||(mi=1,(function(s,e){e.__esModule=!0;var t=(function(){var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:\\\"error\\\",5:\\\"EOF\\\",14:\\\"COMMENT\\\",15:\\\"CONTENT\\\",18:\\\"END_RAW_BLOCK\\\",19:\\\"OPEN_RAW_BLOCK\\\",23:\\\"CLOSE_RAW_BLOCK\\\",29:\\\"OPEN_BLOCK\\\",33:\\\"CLOSE\\\",34:\\\"OPEN_INVERSE\\\",39:\\\"OPEN_INVERSE_CHAIN\\\",44:\\\"INVERSE\\\",47:\\\"OPEN_ENDBLOCK\\\",48:\\\"OPEN\\\",51:\\\"OPEN_UNESCAPED\\\",54:\\\"CLOSE_UNESCAPED\\\",55:\\\"OPEN_PARTIAL\\\",60:\\\"OPEN_PARTIAL_BLOCK\\\",65:\\\"OPEN_SEXPR\\\",68:\\\"CLOSE_SEXPR\\\",72:\\\"ID\\\",73:\\\"EQUALS\\\",75:\\\"OPEN_BLOCK_PARAMS\\\",77:\\\"CLOSE_BLOCK_PARAMS\\\",80:\\\"STRING\\\",81:\\\"NUMBER\\\",82:\\\"BOOLEAN\\\",83:\\\"UNDEFINED\\\",84:\\\"NULL\\\",85:\\\"DATA\\\",87:\\\"SEP\\\"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(l,c,p,f,g,u,h){var a=u.length-1;switch(g){case 1:return u[a-1];case 2:this.$=f.prepareProgram(u[a]);break;case 3:this.$=u[a];break;case 4:this.$=u[a];break;case 5:this.$=u[a];break;case 6:this.$=u[a];break;case 7:this.$=u[a];break;case 8:this.$=u[a];break;case 9:this.$={type:\\\"CommentStatement\\\",value:f.stripComment(u[a]),strip:f.stripFlags(u[a],u[a]),loc:f.locInfo(this._$)};break;case 10:this.$={type:\\\"ContentStatement\\\",original:u[a],value:u[a],loc:f.locInfo(this._$)};break;case 11:this.$=f.prepareRawBlock(u[a-2],u[a-1],u[a],this._$);break;case 12:this.$={path:u[a-3],params:u[a-2],hash:u[a-1]};break;case 13:this.$=f.prepareBlock(u[a-3],u[a-2],u[a-1],u[a],!1,this._$);break;case 14:this.$=f.prepareBlock(u[a-3],u[a-2],u[a-1],u[a],!0,this._$);break;case 15:this.$={open:u[a-5],path:u[a-4],params:u[a-3],hash:u[a-2],blockParams:u[a-1],strip:f.stripFlags(u[a-5],u[a])};break;case 16:this.$={path:u[a-4],params:u[a-3],hash:u[a-2],blockParams:u[a-1],strip:f.stripFlags(u[a-5],u[a])};break;case 17:this.$={path:u[a-4],params:u[a-3],hash:u[a-2],blockParams:u[a-1],strip:f.stripFlags(u[a-5],u[a])};break;case 18:this.$={strip:f.stripFlags(u[a-1],u[a-1]),program:u[a]};break;case 19:var d=f.prepareBlock(u[a-2],u[a-1],u[a],u[a],!1,this._$),m=f.prepareProgram([d],u[a-1].loc);m.chained=!0,this.$={strip:u[a-2].strip,program:m,chain:!0};break;case 20:this.$=u[a];break;case 21:this.$={path:u[a-1],strip:f.stripFlags(u[a-2],u[a])};break;case 22:this.$=f.prepareMustache(u[a-3],u[a-2],u[a-1],u[a-4],f.stripFlags(u[a-4],u[a]),this._$);break;case 23:this.$=f.prepareMustache(u[a-3],u[a-2],u[a-1],u[a-4],f.stripFlags(u[a-4],u[a]),this._$);break;case 24:this.$={type:\\\"PartialStatement\\\",name:u[a-3],params:u[a-2],hash:u[a-1],indent:\\\"\\\",strip:f.stripFlags(u[a-4],u[a]),loc:f.locInfo(this._$)};break;case 25:this.$=f.preparePartialBlock(u[a-2],u[a-1],u[a],this._$);break;case 26:this.$={path:u[a-3],params:u[a-2],hash:u[a-1],strip:f.stripFlags(u[a-4],u[a])};break;case 27:this.$=u[a];break;case 28:this.$=u[a];break;case 29:this.$={type:\\\"SubExpression\\\",path:u[a-3],params:u[a-2],hash:u[a-1],loc:f.locInfo(this._$)};break;case 30:this.$={type:\\\"Hash\\\",pairs:u[a],loc:f.locInfo(this._$)};break;case 31:this.$={type:\\\"HashPair\\\",key:f.id(u[a-2]),value:u[a],loc:f.locInfo(this._$)};break;case 32:this.$=f.id(u[a-1]);break;case 33:this.$=u[a];break;case 34:this.$=u[a];break;case 35:this.$={type:\\\"StringLiteral\\\",value:u[a],original:u[a],loc:f.locInfo(this._$)};break;case 36:this.$={type:\\\"NumberLiteral\\\",value:Number(u[a]),original:Number(u[a]),loc:f.locInfo(this._$)};break;case 37:this.$={type:\\\"BooleanLiteral\\\",value:u[a]===\\\"true\\\",original:u[a]===\\\"true\\\",loc:f.locInfo(this._$)};break;case 38:this.$={type:\\\"UndefinedLiteral\\\",original:void 0,value:void 0,loc:f.locInfo(this._$)};break;case 39:this.$={type:\\\"NullLiteral\\\",original:null,value:null,loc:f.locInfo(this._$)};break;case 40:this.$=u[a];break;case 41:this.$=u[a];break;case 42:this.$=f.preparePath(!0,u[a],this._$);break;case 43:this.$=f.preparePath(!1,u[a],this._$);break;case 44:u[a-2].push({part:f.id(u[a]),original:u[a],separator:u[a-1]}),this.$=u[a-2];break;case 45:this.$=[{part:f.id(u[a]),original:u[a]}];break;case 46:this.$=[];break;case 47:u[a-1].push(u[a]);break;case 48:this.$=[];break;case 49:u[a-1].push(u[a]);break;case 50:this.$=[];break;case 51:u[a-1].push(u[a]);break;case 58:this.$=[];break;case 59:u[a-1].push(u[a]);break;case 64:this.$=[];break;case 65:u[a-1].push(u[a]);break;case 70:this.$=[];break;case 71:u[a-1].push(u[a]);break;case 78:this.$=[];break;case 79:u[a-1].push(u[a]);break;case 82:this.$=[];break;case 83:u[a-1].push(u[a]);break;case 86:this.$=[];break;case 87:u[a-1].push(u[a]);break;case 90:this.$=[];break;case 91:u[a-1].push(u[a]);break;case 94:this.$=[];break;case 95:u[a-1].push(u[a]);break;case 98:this.$=[u[a]];break;case 99:u[a-1].push(u[a]);break;case 100:this.$=[u[a]];break;case 101:u[a-1].push(u[a]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(l,c){throw new Error(l)},parse:function(l){var c=this,p=[0],f=[null],g=[],u=this.table,h=\\\"\\\",a=0,d=0;this.lexer.setInput(l),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>\\\"u\\\"&&(this.lexer.yylloc={});var m=this.lexer.yylloc;g.push(m);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==\\\"function\\\"&&(this.parseError=this.yy.parseError);function _(){var L;return L=c.lexer.lex()||1,typeof L!=\\\"number\\\"&&(L=c.symbols_[L]||L),L}for(var S,y,b,k,x={},C,O,P,w;;){if(y=p[p.length-1],this.defaultActions[y]?b=this.defaultActions[y]:((S===null||typeof S>\\\"u\\\")&&(S=_()),b=u[y]&&u[y][S]),typeof b>\\\"u\\\"||!b.length||!b[0]){var E=\\\"\\\";{w=[];for(C in u[y])this.terminals_[C]&&C>2&&w.push(\\\"'\\\"+this.terminals_[C]+\\\"'\\\");this.lexer.showPosition?E=\\\"Parse error on line \\\"+(a+1)+`:\\n`+this.lexer.showPosition()+`\\nExpecting `+w.join(\\\", \\\")+\\\", got '\\\"+(this.terminals_[S]||S)+\\\"'\\\":E=\\\"Parse error on line \\\"+(a+1)+\\\": Unexpected \\\"+(S==1?\\\"end of input\\\":\\\"'\\\"+(this.terminals_[S]||S)+\\\"'\\\"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[S]||S,line:this.lexer.yylineno,loc:m,expected:w})}}if(b[0]instanceof Array&&b.length>1)throw new Error(\\\"Parse Error: multiple actions possible at state: \\\"+y+\\\", token: \\\"+S);switch(b[0]){case 1:p.push(S),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),p.push(b[1]),S=null,d=this.lexer.yyleng,h=this.lexer.yytext,a=this.lexer.yylineno,m=this.lexer.yylloc;break;case 2:if(O=this.productions_[b[1]][1],x.$=f[f.length-O],x._$={first_line:g[g.length-(O||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(O||1)].first_column,last_column:g[g.length-1].last_column},v&&(x._$.range=[g[g.length-(O||1)].range[0],g[g.length-1].range[1]]),k=this.performAction.call(x,h,d,a,this.yy,b[1],f,g),typeof k<\\\"u\\\")return k;O&&(p=p.slice(0,-1*O*2),f=f.slice(0,-1*O),g=g.slice(0,-1*O)),p.push(this.productions_[b[1]][0]),f.push(x.$),g.push(x._$),P=u[p[p.length-2]][p[p.length-1]],p.push(P);break;case 3:return!0}}return!0}},r=(function(){var i={EOF:1,parseError:function(c,p){if(this.yy.parser)this.yy.parser.parseError(c,p);else throw new Error(c)},setInput:function(c){return this._input=c,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=\\\"\\\",this.conditionStack=[\\\"INITIAL\\\"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var p=c.match(/(?:\\\\r\\\\n?|\\\\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},unput:function(c){var p=c.length,f=c.split(/(?:\\\\r\\\\n?|\\\\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p-1),this.offset-=p;var g=this.match.split(/(?:\\\\r\\\\n?|\\\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===g.length?this.yylloc.first_column:0)+g[g.length-f.length].length-f[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-p]),this},more:function(){return this._more=!0,this},less:function(c){this.unput(this.match.slice(c))},pastInput:function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?\\\"...\\\":\\\"\\\")+c.substr(-20).replace(/\\\\n/g,\\\"\\\")},upcomingInput:function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?\\\"...\\\":\\\"\\\")).replace(/\\\\n/g,\\\"\\\")},showPosition:function(){var c=this.pastInput(),p=new Array(c.length+1).join(\\\"-\\\");return c+this.upcomingInput()+`\\n`+p+\\\"^\\\"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,p,f,g,u;this._more||(this.yytext=\\\"\\\",this.match=\\\"\\\");for(var h=this._currentRules(),a=0;a<h.length&&(f=this._input.match(this.rules[h[a]]),!(f&&(!p||f[0].length>p[0].length)&&(p=f,g=a,!this.options.flex)));a++);return p?(u=p[0].match(/(?:\\\\r\\\\n?|\\\\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\\\\r?\\\\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],c=this.performAction.call(this,this.yy,this,h[g],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c||void 0):this._input===\\\"\\\"?this.EOF:this.parseError(\\\"Lexical error on line \\\"+(this.yylineno+1)+`. Unrecognized text.\\n`+this.showPosition(),{text:\\\"\\\",token:null,line:this.yylineno})},lex:function(){var c=this.next();return typeof c<\\\"u\\\"?c:this.lex()},begin:function(c){this.conditionStack.push(c)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(c){this.begin(c)}};return i.options={},i.performAction=function(c,p,f,g){function u(h,a){return p.yytext=p.yytext.substring(h,p.yyleng-a+h)}switch(f){case 0:if(p.yytext.slice(-2)===\\\"\\\\\\\\\\\\\\\\\\\"?(u(0,1),this.begin(\\\"mu\\\")):p.yytext.slice(-1)===\\\"\\\\\\\\\\\"?(u(0,1),this.begin(\\\"emu\\\")):this.begin(\\\"mu\\\"),p.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(\\\"raw\\\"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===\\\"raw\\\"?15:(u(5,9),\\\"END_RAW_BLOCK\\\");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(\\\"raw\\\"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(p.yytext),this.popState(),this.begin(\\\"com\\\");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return p.yytext=u(1,2).replace(/\\\\\\\\\\\"/g,'\\\"'),80;case 32:return p.yytext=u(1,2).replace(/\\\\\\\\'/g,\\\"'\\\"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return p.yytext=p.yytext.replace(/\\\\\\\\([\\\\\\\\\\\\]])/g,\\\"$1\\\"),72;case 43:return\\\"INVALID\\\";case 44:return 5}},i.rules=[/^(?:[^\\\\x00]*?(?=(\\\\{\\\\{)))/,/^(?:[^\\\\x00]+)/,/^(?:[^\\\\x00]{2,}?(?=(\\\\{\\\\{|\\\\\\\\\\\\{\\\\{|\\\\\\\\\\\\\\\\\\\\{\\\\{|$)))/,/^(?:\\\\{\\\\{\\\\{\\\\{(?=[^/]))/,/^(?:\\\\{\\\\{\\\\{\\\\{\\\\/[^\\\\s!\\\"#%-,\\\\.\\\\/;->@\\\\[-\\\\^`\\\\{-~]+(?=[=}\\\\s\\\\/.])\\\\}\\\\}\\\\}\\\\})/,/^(?:[^\\\\x00]+?(?=(\\\\{\\\\{\\\\{\\\\{)))/,/^(?:[\\\\s\\\\S]*?--(~)?\\\\}\\\\})/,/^(?:\\\\()/,/^(?:\\\\))/,/^(?:\\\\{\\\\{\\\\{\\\\{)/,/^(?:\\\\}\\\\}\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?>)/,/^(?:\\\\{\\\\{(~)?#>)/,/^(?:\\\\{\\\\{(~)?#\\\\*?)/,/^(?:\\\\{\\\\{(~)?\\\\/)/,/^(?:\\\\{\\\\{(~)?\\\\^\\\\s*(~)?\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?\\\\s*else\\\\s*(~)?\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?\\\\^)/,/^(?:\\\\{\\\\{(~)?\\\\s*else\\\\b)/,/^(?:\\\\{\\\\{(~)?\\\\{)/,/^(?:\\\\{\\\\{(~)?&)/,/^(?:\\\\{\\\\{(~)?!--)/,/^(?:\\\\{\\\\{(~)?![\\\\s\\\\S]*?\\\\}\\\\})/,/^(?:\\\\{\\\\{(~)?\\\\*?)/,/^(?:=)/,/^(?:\\\\.\\\\.)/,/^(?:\\\\.(?=([=~}\\\\s\\\\/.)|])))/,/^(?:[\\\\/.])/,/^(?:\\\\s+)/,/^(?:\\\\}(~)?\\\\}\\\\})/,/^(?:(~)?\\\\}\\\\})/,/^(?:\\\"(\\\\\\\\[\\\"]|[^\\\"])*\\\")/,/^(?:'(\\\\\\\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\\\\s)])))/,/^(?:false(?=([~}\\\\s)])))/,/^(?:undefined(?=([~}\\\\s)])))/,/^(?:null(?=([~}\\\\s)])))/,/^(?:-?[0-9]+(?:\\\\.[0-9]+)?(?=([~}\\\\s)])))/,/^(?:as\\\\s+\\\\|)/,/^(?:\\\\|)/,/^(?:([^\\\\s!\\\"#%-,\\\\.\\\\/;->@\\\\[-\\\\^`\\\\{-~]+(?=([=~}\\\\s\\\\/.)|]))))/,/^(?:\\\\[(\\\\\\\\\\\\]|[^\\\\]])*\\\\])/,/^(?:.)/,/^(?:$)/],i.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},i})();n.lexer=r;function o(){this.yy={}}return o.prototype=n,n.Parser=o,new o})();e.default=t,s.exports=e.default})(Vs,Vs.exports)),Vs.exports}var Us={exports:{}},Ws={exports:{}},vi;function yi(){return vi||(vi=1,(function(s,e){e.__esModule=!0;function t(p){return p&&p.__esModule?p:{default:p}}var n=rt(),r=t(n);function o(){this.parents=[]}o.prototype={constructor:o,mutating:!1,acceptKey:function(f,g){var u=this.accept(f[g]);if(this.mutating){if(u&&!o.prototype[u.type])throw new r.default('Unexpected node type \\\"'+u.type+'\\\" found when accepting '+g+\\\" on \\\"+f.type);f[g]=u}},acceptRequired:function(f,g){if(this.acceptKey(f,g),!f[g])throw new r.default(f.type+\\\" requires \\\"+g)},acceptArray:function(f){for(var g=0,u=f.length;g<u;g++)this.acceptKey(f,g),f[g]||(f.splice(g,1),g--,u--)},accept:function(f){if(f){if(!this[f.type])throw new r.default(\\\"Unknown type: \\\"+f.type,f);this.current&&this.parents.unshift(this.current),this.current=f;var g=this[f.type](f);if(this.current=this.parents.shift(),!this.mutating||g)return g;if(g!==!1)return f}},Program:function(f){this.acceptArray(f.body)},MustacheStatement:i,Decorator:i,BlockStatement:l,DecoratorBlock:l,PartialStatement:c,PartialBlockStatement:function(f){c.call(this,f),this.acceptKey(f,\\\"program\\\")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:i,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(f){this.acceptArray(f.pairs)},HashPair:function(f){this.acceptRequired(f,\\\"value\\\")}};function i(p){this.acceptRequired(p,\\\"path\\\"),this.acceptArray(p.params),this.acceptKey(p,\\\"hash\\\")}function l(p){i.call(this,p),this.acceptKey(p,\\\"program\\\"),this.acceptKey(p,\\\"inverse\\\")}function c(p){this.acceptRequired(p,\\\"name\\\"),this.acceptArray(p.params),this.acceptKey(p,\\\"hash\\\")}e.default=o,s.exports=e.default})(Ws,Ws.exports)),Ws.exports}var _i;function $a(){return _i||(_i=1,(function(s,e){e.__esModule=!0;function t(f){return f&&f.__esModule?f:{default:f}}var n=yi(),r=t(n);function o(){var f=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=f}o.prototype=new r.default,o.prototype.Program=function(f){var g=!this.options.ignoreStandalone,u=!this.isRootSeen;this.isRootSeen=!0;for(var h=f.body,a=0,d=h.length;a<d;a++){var m=h[a],v=this.accept(m);if(v){var _=i(h,a,u),S=l(h,a,u),y=v.openStandalone&&_,b=v.closeStandalone&&S,k=v.inlineStandalone&&_&&S;v.close&&c(h,a,!0),v.open&&p(h,a,!0),g&&k&&(c(h,a),p(h,a)&&m.type===\\\"PartialStatement\\\"&&(m.indent=/([ \\\\t]+$)/.exec(h[a-1].original)[1])),g&&y&&(c((m.program||m.inverse).body),p(h,a)),g&&b&&(c(h,a),p((m.inverse||m.program).body))}}return f},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(f){this.accept(f.program),this.accept(f.inverse);var g=f.program||f.inverse,u=f.program&&f.inverse,h=u,a=u;if(u&&u.chained)for(h=u.body[0].program;a.chained;)a=a.body[a.body.length-1].program;var d={open:f.openStrip.open,close:f.closeStrip.close,openStandalone:l(g.body),closeStandalone:i((h||g).body)};if(f.openStrip.close&&c(g.body,null,!0),u){var m=f.inverseStrip;m.open&&p(g.body,null,!0),m.close&&c(h.body,null,!0),f.closeStrip.open&&p(a.body,null,!0),!this.options.ignoreStandalone&&i(g.body)&&l(h.body)&&(p(g.body),c(h.body))}else f.closeStrip.open&&p(g.body,null,!0);return d},o.prototype.Decorator=o.prototype.MustacheStatement=function(f){return f.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(f){var g=f.strip||{};return{inlineStandalone:!0,open:g.open,close:g.close}};function i(f,g,u){g===void 0&&(g=f.length);var h=f[g-1],a=f[g-2];if(!h)return u;if(h.type===\\\"ContentStatement\\\")return(a||!u?/\\\\r?\\\\n\\\\s*?$/:/(^|\\\\r?\\\\n)\\\\s*?$/).test(h.original)}function l(f,g,u){g===void 0&&(g=-1);var h=f[g+1],a=f[g+2];if(!h)return u;if(h.type===\\\"ContentStatement\\\")return(a||!u?/^\\\\s*?\\\\r?\\\\n/:/^\\\\s*?(\\\\r?\\\\n|$)/).test(h.original)}function c(f,g,u){var h=f[g==null?0:g+1];if(!(!h||h.type!==\\\"ContentStatement\\\"||!u&&h.rightStripped)){var a=h.value;h.value=h.value.replace(u?/^\\\\s+/:/^[ \\\\t]*\\\\r?\\\\n?/,\\\"\\\"),h.rightStripped=h.value!==a}}function p(f,g,u){var h=f[g==null?f.length-1:g-1];if(!(!h||h.type!==\\\"ContentStatement\\\"||!u&&h.leftStripped)){var a=h.value;return h.value=h.value.replace(u?/\\\\s+$/:/[ \\\\t]+$/,\\\"\\\"),h.leftStripped=h.value!==a,h.leftStripped}}e.default=o,s.exports=e.default})(Us,Us.exports)),Us.exports}var We={},bi;function za(){if(bi)return We;bi=1,We.__esModule=!0,We.SourceLocation=r,We.id=o,We.stripFlags=i,We.stripComment=l,We.preparePath=c,We.prepareMustache=p,We.prepareRawBlock=f,We.prepareBlock=g,We.prepareProgram=u,We.preparePartialBlock=h;function s(a){return a&&a.__esModule?a:{default:a}}var e=rt(),t=s(e);function n(a,d){if(d=d.path?d.path.original:d,a.path.original!==d){var m={loc:a.path.loc};throw new t.default(a.path.original+\\\" doesn't match \\\"+d,m)}}function r(a,d){this.source=a,this.start={line:d.first_line,column:d.first_column},this.end={line:d.last_line,column:d.last_column}}function o(a){return/^\\\\[.*\\\\]$/.test(a)?a.substring(1,a.length-1):a}function i(a,d){return{open:a.charAt(2)===\\\"~\\\",close:d.charAt(d.length-3)===\\\"~\\\"}}function l(a){return a.replace(/^\\\\{\\\\{~?!-?-?/,\\\"\\\").replace(/-?-?~?\\\\}\\\\}$/,\\\"\\\")}function c(a,d,m){m=this.locInfo(m);for(var v=a?\\\"@\\\":\\\"\\\",_=[],S=0,y=0,b=d.length;y<b;y++){var k=d[y].part,x=d[y].original!==k;if(v+=(d[y].separator||\\\"\\\")+k,!x&&(k===\\\"..\\\"||k===\\\".\\\"||k===\\\"this\\\")){if(_.length>0)throw new t.default(\\\"Invalid path: \\\"+v,{loc:m});k===\\\"..\\\"&&S++}else _.push(k)}return{type:\\\"PathExpression\\\",data:a,depth:S,parts:_,original:v,loc:m}}function p(a,d,m,v,_,S){var y=v.charAt(3)||v.charAt(2),b=y!==\\\"{\\\"&&y!==\\\"&\\\",k=/\\\\*/.test(v);return{type:k?\\\"Decorator\\\":\\\"MustacheStatement\\\",path:a,params:d,hash:m,escaped:b,strip:_,loc:this.locInfo(S)}}function f(a,d,m,v){n(a,m),v=this.locInfo(v);var _={type:\\\"Program\\\",body:d,strip:{},loc:v};return{type:\\\"BlockStatement\\\",path:a.path,params:a.params,hash:a.hash,program:_,openStrip:{},inverseStrip:{},closeStrip:{},loc:v}}function g(a,d,m,v,_,S){v&&v.path&&n(a,v);var y=/\\\\*/.test(a.open);d.blockParams=a.blockParams;var b=void 0,k=void 0;if(m){if(y)throw new t.default(\\\"Unexpected inverse block on decorator\\\",m);m.chain&&(m.program.body[0].closeStrip=v.strip),k=m.strip,b=m.program}return _&&(_=b,b=d,d=_),{type:y?\\\"DecoratorBlock\\\":\\\"BlockStatement\\\",path:a.path,params:a.params,hash:a.hash,program:d,inverse:b,openStrip:a.strip,inverseStrip:k,closeStrip:v&&v.strip,loc:this.locInfo(S)}}function u(a,d){if(!d&&a.length){var m=a[0].loc,v=a[a.length-1].loc;m&&v&&(d={source:m.source,start:{line:m.start.line,column:m.start.column},end:{line:v.end.line,column:v.end.column}})}return{type:\\\"Program\\\",body:a,strip:{},loc:d}}function h(a,d,m,v){return n(a,m),{type:\\\"PartialBlockStatement\\\",name:a.path,params:a.params,hash:a.hash,program:d,openStrip:a.strip,closeStrip:m&&m.strip,loc:this.locInfo(v)}}return We}var Si;function Va(){if(Si)return Dt;Si=1,Dt.__esModule=!0,Dt.parseWithoutProcessing=f,Dt.parse=g;function s(u){if(u&&u.__esModule)return u;var h={};if(u!=null)for(var a in u)Object.prototype.hasOwnProperty.call(u,a)&&(h[a]=u[a]);return h.default=u,h}function e(u){return u&&u.__esModule?u:{default:u}}var t=Fa(),n=e(t),r=$a(),o=e(r),i=za(),l=s(i),c=Fe();Dt.parser=n.default;var p={};c.extend(p,l);function f(u,h){if(u.type===\\\"Program\\\")return u;n.default.yy=p,p.locInfo=function(d){return new p.SourceLocation(h&&h.srcName,d)};var a=n.default.parse(u);return a}function g(u,h){var a=f(u,h),d=new o.default(h);return d.accept(a)}return Dt}var qt={},ki;function Ua(){if(ki)return qt;ki=1,qt.__esModule=!0,qt.Compiler=l,qt.precompile=c,qt.compile=p;function s(u){return u&&u.__esModule?u:{default:u}}var e=rt(),t=s(e),n=Fe(),r=gi(),o=s(r),i=[].slice;function l(){}l.prototype={compiler:l,equals:function(h){var a=this.opcodes.length;if(h.opcodes.length!==a)return!1;for(var d=0;d<a;d++){var m=this.opcodes[d],v=h.opcodes[d];if(m.opcode!==v.opcode||!f(m.args,v.args))return!1}a=this.children.length;for(var d=0;d<a;d++)if(!this.children[d].equals(h.children[d]))return!1;return!0},guid:0,compile:function(h,a){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=a,this.stringParams=a.stringParams,this.trackIds=a.trackIds,a.blockParams=a.blockParams||[],a.knownHelpers=n.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},a.knownHelpers),this.accept(h)},compileProgram:function(h){var a=new this.compiler,d=a.compile(h,this.options),m=this.guid++;return this.usePartial=this.usePartial||d.usePartial,this.children[m]=d,this.useDepths=this.useDepths||d.useDepths,m},accept:function(h){if(!this[h.type])throw new t.default(\\\"Unknown type: \\\"+h.type,h);this.sourceNode.unshift(h);var a=this[h.type](h);return this.sourceNode.shift(),a},Program:function(h){this.options.blockParams.unshift(h.blockParams);for(var a=h.body,d=a.length,m=0;m<d;m++)this.accept(a[m]);return this.options.blockParams.shift(),this.isSimple=d===1,this.blockParams=h.blockParams?h.blockParams.length:0,this},BlockStatement:function(h){g(h);var a=h.program,d=h.inverse;a=a&&this.compileProgram(a),d=d&&this.compileProgram(d);var m=this.classifySexpr(h);m===\\\"helper\\\"?this.helperSexpr(h,a,d):m===\\\"simple\\\"?(this.simpleSexpr(h),this.opcode(\\\"pushProgram\\\",a),this.opcode(\\\"pushProgram\\\",d),this.opcode(\\\"emptyHash\\\"),this.opcode(\\\"blockValue\\\",h.path.original)):(this.ambiguousSexpr(h,a,d),this.opcode(\\\"pushProgram\\\",a),this.opcode(\\\"pushProgram\\\",d),this.opcode(\\\"emptyHash\\\"),this.opcode(\\\"ambiguousBlockValue\\\")),this.opcode(\\\"append\\\")},DecoratorBlock:function(h){var a=h.program&&this.compileProgram(h.program),d=this.setupFullMustacheParams(h,a,void 0),m=h.path;this.useDecorators=!0,this.opcode(\\\"registerDecorator\\\",d.length,m.original)},PartialStatement:function(h){this.usePartial=!0;var a=h.program;a&&(a=this.compileProgram(h.program));var d=h.params;if(d.length>1)throw new t.default(\\\"Unsupported number of partial arguments: \\\"+d.length,h);d.length||(this.options.explicitPartialContext?this.opcode(\\\"pushLiteral\\\",\\\"undefined\\\"):d.push({type:\\\"PathExpression\\\",parts:[],depth:0}));var m=h.name.original,v=h.name.type===\\\"SubExpression\\\";v&&this.accept(h.name),this.setupFullMustacheParams(h,a,void 0,!0);var _=h.indent||\\\"\\\";this.options.preventIndent&&_&&(this.opcode(\\\"appendContent\\\",_),_=\\\"\\\"),this.opcode(\\\"invokePartial\\\",v,m,_),this.opcode(\\\"append\\\")},PartialBlockStatement:function(h){this.PartialStatement(h)},MustacheStatement:function(h){this.SubExpression(h),h.escaped&&!this.options.noEscape?this.opcode(\\\"appendEscaped\\\"):this.opcode(\\\"append\\\")},Decorator:function(h){this.DecoratorBlock(h)},ContentStatement:function(h){h.value&&this.opcode(\\\"appendContent\\\",h.value)},CommentStatement:function(){},SubExpression:function(h){g(h);var a=this.classifySexpr(h);a===\\\"simple\\\"?this.simpleSexpr(h):a===\\\"helper\\\"?this.helperSexpr(h):this.ambiguousSexpr(h)},ambiguousSexpr:function(h,a,d){var m=h.path,v=m.parts[0],_=a!=null||d!=null;this.opcode(\\\"getContext\\\",m.depth),this.opcode(\\\"pushProgram\\\",a),this.opcode(\\\"pushProgram\\\",d),m.strict=!0,this.accept(m),this.opcode(\\\"invokeAmbiguous\\\",v,_)},simpleSexpr:function(h){var a=h.path;a.strict=!0,this.accept(a),this.opcode(\\\"resolvePossibleLambda\\\")},helperSexpr:function(h,a,d){var m=this.setupFullMustacheParams(h,a,d),v=h.path,_=v.parts[0];if(this.options.knownHelpers[_])this.opcode(\\\"invokeKnownHelper\\\",m.length,_);else{if(this.options.knownHelpersOnly)throw new t.default(\\\"You specified knownHelpersOnly, but used the unknown helper \\\"+_,h);v.strict=!0,v.falsy=!0,this.accept(v),this.opcode(\\\"invokeHelper\\\",m.length,v.original,o.default.helpers.simpleId(v))}},PathExpression:function(h){this.addDepth(h.depth),this.opcode(\\\"getContext\\\",h.depth);var a=h.parts[0],d=o.default.helpers.scopedId(h),m=!h.depth&&!d&&this.blockParamIndex(a);m?this.opcode(\\\"lookupBlockParam\\\",m,h.parts):a?h.data?(this.options.data=!0,this.opcode(\\\"lookupData\\\",h.depth,h.parts,h.strict)):this.opcode(\\\"lookupOnContext\\\",h.parts,h.falsy,h.strict,d):this.opcode(\\\"pushContext\\\")},StringLiteral:function(h){this.opcode(\\\"pushString\\\",h.value)},NumberLiteral:function(h){this.opcode(\\\"pushLiteral\\\",h.value)},BooleanLiteral:function(h){this.opcode(\\\"pushLiteral\\\",h.value)},UndefinedLiteral:function(){this.opcode(\\\"pushLiteral\\\",\\\"undefined\\\")},NullLiteral:function(){this.opcode(\\\"pushLiteral\\\",\\\"null\\\")},Hash:function(h){var a=h.pairs,d=0,m=a.length;for(this.opcode(\\\"pushHash\\\");d<m;d++)this.pushParam(a[d].value);for(;d--;)this.opcode(\\\"assignToHash\\\",a[d].key);this.opcode(\\\"popHash\\\")},opcode:function(h){this.opcodes.push({opcode:h,args:i.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(h){h&&(this.useDepths=!0)},classifySexpr:function(h){var a=o.default.helpers.simpleId(h.path),d=a&&!!this.blockParamIndex(h.path.parts[0]),m=!d&&o.default.helpers.helperExpression(h),v=!d&&(m||a);if(v&&!m){var _=h.path.parts[0],S=this.options;S.knownHelpers[_]?m=!0:S.knownHelpersOnly&&(v=!1)}return m?\\\"helper\\\":v?\\\"ambiguous\\\":\\\"simple\\\"},pushParams:function(h){for(var a=0,d=h.length;a<d;a++)this.pushParam(h[a])},pushParam:function(h){var a=h.value!=null?h.value:h.original||\\\"\\\";if(this.stringParams)a.replace&&(a=a.replace(/^(\\\\.?\\\\.\\\\/)*/g,\\\"\\\").replace(/\\\\//g,\\\".\\\")),h.depth&&this.addDepth(h.depth),this.opcode(\\\"getContext\\\",h.depth||0),this.opcode(\\\"pushStringParam\\\",a,h.type),h.type===\\\"SubExpression\\\"&&this.accept(h);else{if(this.trackIds){var d=void 0;if(h.parts&&!o.default.helpers.scopedId(h)&&!h.depth&&(d=this.blockParamIndex(h.parts[0])),d){var m=h.parts.slice(1).join(\\\".\\\");this.opcode(\\\"pushId\\\",\\\"BlockParam\\\",d,m)}else a=h.original||a,a.replace&&(a=a.replace(/^this(?:\\\\.|$)/,\\\"\\\").replace(/^\\\\.\\\\//,\\\"\\\").replace(/^\\\\.$/,\\\"\\\")),this.opcode(\\\"pushId\\\",h.type,a)}this.accept(h)}},setupFullMustacheParams:function(h,a,d,m){var v=h.params;return this.pushParams(v),this.opcode(\\\"pushProgram\\\",a),this.opcode(\\\"pushProgram\\\",d),h.hash?this.accept(h.hash):this.opcode(\\\"emptyHash\\\",m),v},blockParamIndex:function(h){for(var a=0,d=this.options.blockParams.length;a<d;a++){var m=this.options.blockParams[a],v=m&&n.indexOf(m,h);if(m&&v>=0)return[a,v]}}};function c(u,h,a){if(u==null||typeof u!=\\\"string\\\"&&u.type!==\\\"Program\\\")throw new t.default(\\\"You must pass a string or Handlebars AST to Handlebars.precompile. You passed \\\"+u);h=h||{},\\\"data\\\"in h||(h.data=!0),h.compat&&(h.useDepths=!0);var d=a.parse(u,h),m=new a.Compiler().compile(d,h);return new a.JavaScriptCompiler().compile(m,h)}function p(u,h,a){if(h===void 0&&(h={}),u==null||typeof u!=\\\"string\\\"&&u.type!==\\\"Program\\\")throw new t.default(\\\"You must pass a string or Handlebars AST to Handlebars.compile. You passed \\\"+u);h=n.extend({},h),\\\"data\\\"in h||(h.data=!0),h.compat&&(h.useDepths=!0);var d=void 0;function m(){var _=a.parse(u,h),S=new a.Compiler().compile(_,h),y=new a.JavaScriptCompiler().compile(S,h,void 0,!0);return a.template(y)}function v(_,S){return d||(d=m()),d.call(this,_,S)}return v._setup=function(_){return d||(d=m()),d._setup(_)},v._child=function(_,S,y,b){return d||(d=m()),d._child(_,S,y,b)},v}function f(u,h){if(u===h)return!0;if(n.isArray(u)&&n.isArray(h)&&u.length===h.length){for(var a=0;a<u.length;a++)if(!f(u[a],h[a]))return!1;return!0}}function g(u){if(!u.path.parts){var h=u.path;u.path={type:\\\"PathExpression\\\",data:!1,depth:0,parts:[h.original+\\\"\\\"],original:h.original+\\\"\\\",loc:h.loc}}}return qt}var Gs={exports:{}},Xs={exports:{}},es={},Rr={},Ys={},Js={},xi;function Wa(){if(xi)return Js;xi=1;var s=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\".split(\\\"\\\");return Js.encode=function(e){if(0<=e&&e<s.length)return s[e];throw new TypeError(\\\"Must be between 0 and 63: \\\"+e)},Js.decode=function(e){var t=65,n=90,r=97,o=122,i=48,l=57,c=43,p=47,f=26,g=52;return t<=e&&e<=n?e-t:r<=e&&e<=o?e-r+f:i<=e&&e<=l?e-i+g:e==c?62:e==p?63:-1},Js}var wi;function Ti(){if(wi)return Ys;wi=1;var s=Wa(),e=5,t=1<<e,n=t-1,r=t;function o(l){return l<0?(-l<<1)+1:(l<<1)+0}function i(l){var c=(l&1)===1,p=l>>1;return c?-p:p}return Ys.encode=function(c){var p=\\\"\\\",f,g=o(c);do f=g&n,g>>>=e,g>0&&(f|=r),p+=s.encode(f);while(g>0);return p},Ys.decode=function(c,p,f){var g=c.length,u=0,h=0,a,d;do{if(p>=g)throw new Error(\\\"Expected more digits in base 64 VLQ value.\\\");if(d=s.decode(c.charCodeAt(p++)),d===-1)throw new Error(\\\"Invalid base64 digit: \\\"+c.charAt(p-1));a=!!(d&r),d&=n,u=u+(d<<h),h+=e}while(a);f.value=i(u),f.rest=p},Ys}var Or={},Ci;function ts(){return Ci||(Ci=1,(function(s){function e(y,b,k){if(b in y)return y[b];if(arguments.length===3)return k;throw new Error('\\\"'+b+'\\\" is a required argument.')}s.getArg=e;var t=/^(?:([\\\\w+\\\\-.]+):)?\\\\/\\\\/(?:(\\\\w+:\\\\w+)@)?([\\\\w.-]*)(?::(\\\\d+))?(.*)$/,n=/^data:.+\\\\,.+$/;function r(y){var b=y.match(t);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}s.urlParse=r;function o(y){var b=\\\"\\\";return y.scheme&&(b+=y.scheme+\\\":\\\"),b+=\\\"//\\\",y.auth&&(b+=y.auth+\\\"@\\\"),y.host&&(b+=y.host),y.port&&(b+=\\\":\\\"+y.port),y.path&&(b+=y.path),b}s.urlGenerate=o;function i(y){var b=y,k=r(y);if(k){if(!k.path)return y;b=k.path}for(var x=s.isAbsolute(b),C=b.split(/\\\\/+/),O,P=0,w=C.length-1;w>=0;w--)O=C[w],O===\\\".\\\"?C.splice(w,1):O===\\\"..\\\"?P++:P>0&&(O===\\\"\\\"?(C.splice(w+1,P),P=0):(C.splice(w,2),P--));return b=C.join(\\\"/\\\"),b===\\\"\\\"&&(b=x?\\\"/\\\":\\\".\\\"),k?(k.path=b,o(k)):b}s.normalize=i;function l(y,b){y===\\\"\\\"&&(y=\\\".\\\"),b===\\\"\\\"&&(b=\\\".\\\");var k=r(b),x=r(y);if(x&&(y=x.path||\\\"/\\\"),k&&!k.scheme)return x&&(k.scheme=x.scheme),o(k);if(k||b.match(n))return b;if(x&&!x.host&&!x.path)return x.host=b,o(x);var C=b.charAt(0)===\\\"/\\\"?b:i(y.replace(/\\\\/+$/,\\\"\\\")+\\\"/\\\"+b);return x?(x.path=C,o(x)):C}s.join=l,s.isAbsolute=function(y){return y.charAt(0)===\\\"/\\\"||t.test(y)};function c(y,b){y===\\\"\\\"&&(y=\\\".\\\"),y=y.replace(/\\\\/$/,\\\"\\\");for(var k=0;b.indexOf(y+\\\"/\\\")!==0;){var x=y.lastIndexOf(\\\"/\\\");if(x<0||(y=y.slice(0,x),y.match(/^([^\\\\/]+:\\\\/)?\\\\/*$/)))return b;++k}return Array(k+1).join(\\\"../\\\")+b.substr(y.length+1)}s.relative=c;var p=(function(){var y=Object.create(null);return!(\\\"__proto__\\\"in y)})();function f(y){return y}function g(y){return h(y)?\\\"$\\\"+y:y}s.toSetString=p?f:g;function u(y){return h(y)?y.slice(1):y}s.fromSetString=p?f:u;function h(y){if(!y)return!1;var b=y.length;if(b<9||y.charCodeAt(b-1)!==95||y.charCodeAt(b-2)!==95||y.charCodeAt(b-3)!==111||y.charCodeAt(b-4)!==116||y.charCodeAt(b-5)!==111||y.charCodeAt(b-6)!==114||y.charCodeAt(b-7)!==112||y.charCodeAt(b-8)!==95||y.charCodeAt(b-9)!==95)return!1;for(var k=b-10;k>=0;k--)if(y.charCodeAt(k)!==36)return!1;return!0}function a(y,b,k){var x=m(y.source,b.source);return x!==0||(x=y.originalLine-b.originalLine,x!==0)||(x=y.originalColumn-b.originalColumn,x!==0||k)||(x=y.generatedColumn-b.generatedColumn,x!==0)||(x=y.generatedLine-b.generatedLine,x!==0)?x:m(y.name,b.name)}s.compareByOriginalPositions=a;function d(y,b,k){var x=y.generatedLine-b.generatedLine;return x!==0||(x=y.generatedColumn-b.generatedColumn,x!==0||k)||(x=m(y.source,b.source),x!==0)||(x=y.originalLine-b.originalLine,x!==0)||(x=y.originalColumn-b.originalColumn,x!==0)?x:m(y.name,b.name)}s.compareByGeneratedPositionsDeflated=d;function m(y,b){return y===b?0:y===null?1:b===null?-1:y>b?1:-1}function v(y,b){var k=y.generatedLine-b.generatedLine;return k!==0||(k=y.generatedColumn-b.generatedColumn,k!==0)||(k=m(y.source,b.source),k!==0)||(k=y.originalLine-b.originalLine,k!==0)||(k=y.originalColumn-b.originalColumn,k!==0)?k:m(y.name,b.name)}s.compareByGeneratedPositionsInflated=v;function _(y){return JSON.parse(y.replace(/^\\\\)]}'[^\\\\n]*\\\\n/,\\\"\\\"))}s.parseSourceMapInput=_;function S(y,b,k){if(b=b||\\\"\\\",y&&(y[y.length-1]!==\\\"/\\\"&&b[0]!==\\\"/\\\"&&(y+=\\\"/\\\"),b=y+b),k){var x=r(k);if(!x)throw new Error(\\\"sourceMapURL could not be parsed\\\");if(x.path){var C=x.path.lastIndexOf(\\\"/\\\");C>=0&&(x.path=x.path.substring(0,C+1))}b=l(o(x),b)}return i(b)}s.computeSourceURL=S})(Or)),Or}var Mr={},Pi;function Ei(){if(Pi)return Mr;Pi=1;var s=ts(),e=Object.prototype.hasOwnProperty,t=typeof Map<\\\"u\\\";function n(){this._array=[],this._set=t?new Map:Object.create(null)}return n.fromArray=function(o,i){for(var l=new n,c=0,p=o.length;c<p;c++)l.add(o[c],i);return l},n.prototype.size=function(){return t?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(o,i){var l=t?o:s.toSetString(o),c=t?this.has(o):e.call(this._set,l),p=this._array.length;(!c||i)&&this._array.push(o),c||(t?this._set.set(o,p):this._set[l]=p)},n.prototype.has=function(o){if(t)return this._set.has(o);var i=s.toSetString(o);return e.call(this._set,i)},n.prototype.indexOf=function(o){if(t){var i=this._set.get(o);if(i>=0)return i}else{var l=s.toSetString(o);if(e.call(this._set,l))return this._set[l]}throw new Error('\\\"'+o+'\\\" is not in the set.')},n.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error(\\\"No element indexed by \\\"+o)},n.prototype.toArray=function(){return this._array.slice()},Mr.ArraySet=n,Mr}var Ir={},Li;function Ga(){if(Li)return Ir;Li=1;var s=ts();function e(n,r){var o=n.generatedLine,i=r.generatedLine,l=n.generatedColumn,c=r.generatedColumn;return i>o||i==o&&c>=l||s.compareByGeneratedPositionsInflated(n,r)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(r,o){this._array.forEach(r,o)},t.prototype.add=function(r){e(this._last,r)?(this._last=r,this._array.push(r)):(this._sorted=!1,this._array.push(r))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Ir.MappingList=t,Ir}var Ai;function Ri(){if(Ai)return Rr;Ai=1;var s=Ti(),e=ts(),t=Ei().ArraySet,n=Ga().MappingList;function r(o){o||(o={}),this._file=e.getArg(o,\\\"file\\\",null),this._sourceRoot=e.getArg(o,\\\"sourceRoot\\\",null),this._skipValidation=e.getArg(o,\\\"skipValidation\\\",!1),this._sources=new t,this._names=new t,this._mappings=new n,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(i){var l=i.sourceRoot,c=new r({file:i.file,sourceRoot:l});return i.eachMapping(function(p){var f={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(f.source=p.source,l!=null&&(f.source=e.relative(l,f.source)),f.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(f.name=p.name)),c.addMapping(f)}),i.sources.forEach(function(p){var f=p;l!==null&&(f=e.relative(l,p)),c._sources.has(f)||c._sources.add(f);var g=i.sourceContentFor(p);g!=null&&c.setSourceContent(p,g)}),c},r.prototype.addMapping=function(i){var l=e.getArg(i,\\\"generated\\\"),c=e.getArg(i,\\\"original\\\",null),p=e.getArg(i,\\\"source\\\",null),f=e.getArg(i,\\\"name\\\",null);this._skipValidation||this._validateMapping(l,c,p,f),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),f!=null&&(f=String(f),this._names.has(f)||this._names.add(f)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:p,name:f})},r.prototype.setSourceContent=function(i,l){var c=i;this._sourceRoot!=null&&(c=e.relative(this._sourceRoot,c)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(c)]=l):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(i,l,c){var p=l;if(l==null){if(i.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's \\\"file\\\" property. Both were omitted.`);p=i.file}var f=this._sourceRoot;f!=null&&(p=e.relative(f,p));var g=new t,u=new t;this._mappings.unsortedForEach(function(h){if(h.source===p&&h.originalLine!=null){var a=i.originalPositionFor({line:h.originalLine,column:h.originalColumn});a.source!=null&&(h.source=a.source,c!=null&&(h.source=e.join(c,h.source)),f!=null&&(h.source=e.relative(f,h.source)),h.originalLine=a.line,h.originalColumn=a.column,a.name!=null&&(h.name=a.name))}var d=h.source;d!=null&&!g.has(d)&&g.add(d);var m=h.name;m!=null&&!u.has(m)&&u.add(m)},this),this._sources=g,this._names=u,i.sources.forEach(function(h){var a=i.sourceContentFor(h);a!=null&&(c!=null&&(h=e.join(c,h)),f!=null&&(h=e.relative(f,h)),this.setSourceContent(h,a))},this)},r.prototype._validateMapping=function(i,l,c,p){if(l&&typeof l.line!=\\\"number\\\"&&typeof l.column!=\\\"number\\\")throw new Error(\\\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\\\");if(!(i&&\\\"line\\\"in i&&\\\"column\\\"in i&&i.line>0&&i.column>=0&&!l&&!c&&!p)){if(i&&\\\"line\\\"in i&&\\\"column\\\"in i&&l&&\\\"line\\\"in l&&\\\"column\\\"in l&&i.line>0&&i.column>=0&&l.line>0&&l.column>=0&&c)return;throw new Error(\\\"Invalid mapping: \\\"+JSON.stringify({generated:i,source:c,original:l,name:p}))}},r.prototype._serializeMappings=function(){for(var i=0,l=1,c=0,p=0,f=0,g=0,u=\\\"\\\",h,a,d,m,v=this._mappings.toArray(),_=0,S=v.length;_<S;_++){if(a=v[_],h=\\\"\\\",a.generatedLine!==l)for(i=0;a.generatedLine!==l;)h+=\\\";\\\",l++;else if(_>0){if(!e.compareByGeneratedPositionsInflated(a,v[_-1]))continue;h+=\\\",\\\"}h+=s.encode(a.generatedColumn-i),i=a.generatedColumn,a.source!=null&&(m=this._sources.indexOf(a.source),h+=s.encode(m-g),g=m,h+=s.encode(a.originalLine-1-p),p=a.originalLine-1,h+=s.encode(a.originalColumn-c),c=a.originalColumn,a.name!=null&&(d=this._names.indexOf(a.name),h+=s.encode(d-f),f=d)),u+=h}return u},r.prototype._generateSourcesContent=function(i,l){return i.map(function(c){if(!this._sourcesContents)return null;l!=null&&(c=e.relative(l,c));var p=e.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},r.prototype.toJSON=function(){var i={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(i.file=this._file),this._sourceRoot!=null&&(i.sourceRoot=this._sourceRoot),this._sourcesContents&&(i.sourcesContent=this._generateSourcesContent(i.sources,i.sourceRoot)),i},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},Rr.SourceMapGenerator=r,Rr}var ss={},Nr={},Oi;function Xa(){return Oi||(Oi=1,(function(s){s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2;function e(t,n,r,o,i,l){var c=Math.floor((n-t)/2)+t,p=i(r,o[c],!0);return p===0?c:p>0?n-c>1?e(c,n,r,o,i,l):l==s.LEAST_UPPER_BOUND?n<o.length?n:-1:c:c-t>1?e(t,c,r,o,i,l):l==s.LEAST_UPPER_BOUND?c:t<0?-1:t}s.search=function(n,r,o,i){if(r.length===0)return-1;var l=e(-1,r.length,n,r,o,i||s.GREATEST_LOWER_BOUND);if(l<0)return-1;for(;l-1>=0&&o(r[l],r[l-1],!0)===0;)--l;return l}})(Nr)),Nr}var Br={},Mi;function Ya(){if(Mi)return Br;Mi=1;function s(n,r,o){var i=n[r];n[r]=n[o],n[o]=i}function e(n,r){return Math.round(n+Math.random()*(r-n))}function t(n,r,o,i){if(o<i){var l=e(o,i),c=o-1;s(n,l,i);for(var p=n[i],f=o;f<i;f++)r(n[f],p)<=0&&(c+=1,s(n,c,f));s(n,c+1,f);var g=c+1;t(n,r,o,g-1),t(n,r,g+1,i)}}return Br.quickSort=function(n,r){t(n,r,0,n.length-1)},Br}var Ii;function Ja(){if(Ii)return ss;Ii=1;var s=ts(),e=Xa(),t=Ei().ArraySet,n=Ti(),r=Ya().quickSort;function o(p,f){var g=p;return typeof p==\\\"string\\\"&&(g=s.parseSourceMapInput(p)),g.sections!=null?new c(g,f):new i(g,f)}o.fromSourceMap=function(p,f){return i.fromSourceMap(p,f)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,\\\"_generatedMappings\\\",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,\\\"_originalMappings\\\",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(f,g){var u=f.charAt(g);return u===\\\";\\\"||u===\\\",\\\"},o.prototype._parseMappings=function(f,g){throw new Error(\\\"Subclasses must implement _parseMappings\\\")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(f,g,u){var h=g||null,a=u||o.GENERATED_ORDER,d;switch(a){case o.GENERATED_ORDER:d=this._generatedMappings;break;case o.ORIGINAL_ORDER:d=this._originalMappings;break;default:throw new Error(\\\"Unknown order of iteration.\\\")}var m=this.sourceRoot;d.map(function(v){var _=v.source===null?null:this._sources.at(v.source);return _=s.computeSourceURL(m,_,this._sourceMapURL),{source:_,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:this._names.at(v.name)}},this).forEach(f,h)},o.prototype.allGeneratedPositionsFor=function(f){var g=s.getArg(f,\\\"line\\\"),u={source:s.getArg(f,\\\"source\\\"),originalLine:g,originalColumn:s.getArg(f,\\\"column\\\",0)};if(u.source=this._findSourceIndex(u.source),u.source<0)return[];var h=[],a=this._findMapping(u,this._originalMappings,\\\"originalLine\\\",\\\"originalColumn\\\",s.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(a>=0){var d=this._originalMappings[a];if(f.column===void 0)for(var m=d.originalLine;d&&d.originalLine===m;)h.push({line:s.getArg(d,\\\"generatedLine\\\",null),column:s.getArg(d,\\\"generatedColumn\\\",null),lastColumn:s.getArg(d,\\\"lastGeneratedColumn\\\",null)}),d=this._originalMappings[++a];else for(var v=d.originalColumn;d&&d.originalLine===g&&d.originalColumn==v;)h.push({line:s.getArg(d,\\\"generatedLine\\\",null),column:s.getArg(d,\\\"generatedColumn\\\",null),lastColumn:s.getArg(d,\\\"lastGeneratedColumn\\\",null)}),d=this._originalMappings[++a]}return h},ss.SourceMapConsumer=o;function i(p,f){var g=p;typeof p==\\\"string\\\"&&(g=s.parseSourceMapInput(p));var u=s.getArg(g,\\\"version\\\"),h=s.getArg(g,\\\"sources\\\"),a=s.getArg(g,\\\"names\\\",[]),d=s.getArg(g,\\\"sourceRoot\\\",null),m=s.getArg(g,\\\"sourcesContent\\\",null),v=s.getArg(g,\\\"mappings\\\"),_=s.getArg(g,\\\"file\\\",null);if(u!=this._version)throw new Error(\\\"Unsupported version: \\\"+u);d&&(d=s.normalize(d)),h=h.map(String).map(s.normalize).map(function(S){return d&&s.isAbsolute(d)&&s.isAbsolute(S)?s.relative(d,S):S}),this._names=t.fromArray(a.map(String),!0),this._sources=t.fromArray(h,!0),this._absoluteSources=this._sources.toArray().map(function(S){return s.computeSourceURL(d,S,f)}),this.sourceRoot=d,this.sourcesContent=m,this._mappings=v,this._sourceMapURL=f,this.file=_}i.prototype=Object.create(o.prototype),i.prototype.consumer=o,i.prototype._findSourceIndex=function(p){var f=p;if(this.sourceRoot!=null&&(f=s.relative(this.sourceRoot,f)),this._sources.has(f))return this._sources.indexOf(f);var g;for(g=0;g<this._absoluteSources.length;++g)if(this._absoluteSources[g]==p)return g;return-1},i.fromSourceMap=function(f,g){var u=Object.create(i.prototype),h=u._names=t.fromArray(f._names.toArray(),!0),a=u._sources=t.fromArray(f._sources.toArray(),!0);u.sourceRoot=f._sourceRoot,u.sourcesContent=f._generateSourcesContent(u._sources.toArray(),u.sourceRoot),u.file=f._file,u._sourceMapURL=g,u._absoluteSources=u._sources.toArray().map(function(k){return s.computeSourceURL(u.sourceRoot,k,g)});for(var d=f._mappings.toArray().slice(),m=u.__generatedMappings=[],v=u.__originalMappings=[],_=0,S=d.length;_<S;_++){var y=d[_],b=new l;b.generatedLine=y.generatedLine,b.generatedColumn=y.generatedColumn,y.source&&(b.source=a.indexOf(y.source),b.originalLine=y.originalLine,b.originalColumn=y.originalColumn,y.name&&(b.name=h.indexOf(y.name)),v.push(b)),m.push(b)}return r(u.__originalMappings,s.compareByOriginalPositions),u},i.prototype._version=3,Object.defineProperty(i.prototype,\\\"sources\\\",{get:function(){return this._absoluteSources.slice()}});function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}i.prototype._parseMappings=function(f,g){for(var u=1,h=0,a=0,d=0,m=0,v=0,_=f.length,S=0,y={},b={},k=[],x=[],C,O,P,w,E;S<_;)if(f.charAt(S)===\\\";\\\")u++,S++,h=0;else if(f.charAt(S)===\\\",\\\")S++;else{for(C=new l,C.generatedLine=u,w=S;w<_&&!this._charIsMappingSeparator(f,w);w++);if(O=f.slice(S,w),P=y[O],P)S+=O.length;else{for(P=[];S<w;)n.decode(f,S,b),E=b.value,S=b.rest,P.push(E);if(P.length===2)throw new Error(\\\"Found a source, but no line and column\\\");if(P.length===3)throw new Error(\\\"Found a source and line, but no column\\\");y[O]=P}C.generatedColumn=h+P[0],h=C.generatedColumn,P.length>1&&(C.source=m+P[1],m+=P[1],C.originalLine=a+P[2],a=C.originalLine,C.originalLine+=1,C.originalColumn=d+P[3],d=C.originalColumn,P.length>4&&(C.name=v+P[4],v+=P[4])),x.push(C),typeof C.originalLine==\\\"number\\\"&&k.push(C)}r(x,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,r(k,s.compareByOriginalPositions),this.__originalMappings=k},i.prototype._findMapping=function(f,g,u,h,a,d){if(f[u]<=0)throw new TypeError(\\\"Line must be greater than or equal to 1, got \\\"+f[u]);if(f[h]<0)throw new TypeError(\\\"Column must be greater than or equal to 0, got \\\"+f[h]);return e.search(f,g,a,d)},i.prototype.computeColumnSpans=function(){for(var f=0;f<this._generatedMappings.length;++f){var g=this._generatedMappings[f];if(f+1<this._generatedMappings.length){var u=this._generatedMappings[f+1];if(g.generatedLine===u.generatedLine){g.lastGeneratedColumn=u.generatedColumn-1;continue}}g.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(f){var g={generatedLine:s.getArg(f,\\\"line\\\"),generatedColumn:s.getArg(f,\\\"column\\\")},u=this._findMapping(g,this._generatedMappings,\\\"generatedLine\\\",\\\"generatedColumn\\\",s.compareByGeneratedPositionsDeflated,s.getArg(f,\\\"bias\\\",o.GREATEST_LOWER_BOUND));if(u>=0){var h=this._generatedMappings[u];if(h.generatedLine===g.generatedLine){var a=s.getArg(h,\\\"source\\\",null);a!==null&&(a=this._sources.at(a),a=s.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var d=s.getArg(h,\\\"name\\\",null);return d!==null&&(d=this._names.at(d)),{source:a,line:s.getArg(h,\\\"originalLine\\\",null),column:s.getArg(h,\\\"originalColumn\\\",null),name:d}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(f){return f==null}):!1},i.prototype.sourceContentFor=function(f,g){if(!this.sourcesContent)return null;var u=this._findSourceIndex(f);if(u>=0)return this.sourcesContent[u];var h=f;this.sourceRoot!=null&&(h=s.relative(this.sourceRoot,h));var a;if(this.sourceRoot!=null&&(a=s.urlParse(this.sourceRoot))){var d=h.replace(/^file:\\\\/\\\\//,\\\"\\\");if(a.scheme==\\\"file\\\"&&this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];if((!a.path||a.path==\\\"/\\\")&&this._sources.has(\\\"/\\\"+h))return this.sourcesContent[this._sources.indexOf(\\\"/\\\"+h)]}if(g)return null;throw new Error('\\\"'+h+'\\\" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(f){var g=s.getArg(f,\\\"source\\\");if(g=this._findSourceIndex(g),g<0)return{line:null,column:null,lastColumn:null};var u={source:g,originalLine:s.getArg(f,\\\"line\\\"),originalColumn:s.getArg(f,\\\"column\\\")},h=this._findMapping(u,this._originalMappings,\\\"originalLine\\\",\\\"originalColumn\\\",s.compareByOriginalPositions,s.getArg(f,\\\"bias\\\",o.GREATEST_LOWER_BOUND));if(h>=0){var a=this._originalMappings[h];if(a.source===u.source)return{line:s.getArg(a,\\\"generatedLine\\\",null),column:s.getArg(a,\\\"generatedColumn\\\",null),lastColumn:s.getArg(a,\\\"lastGeneratedColumn\\\",null)}}return{line:null,column:null,lastColumn:null}},ss.BasicSourceMapConsumer=i;function c(p,f){var g=p;typeof p==\\\"string\\\"&&(g=s.parseSourceMapInput(p));var u=s.getArg(g,\\\"version\\\"),h=s.getArg(g,\\\"sections\\\");if(u!=this._version)throw new Error(\\\"Unsupported version: \\\"+u);this._sources=new t,this._names=new t;var a={line:-1,column:0};this._sections=h.map(function(d){if(d.url)throw new Error(\\\"Support for url field in sections not implemented.\\\");var m=s.getArg(d,\\\"offset\\\"),v=s.getArg(m,\\\"line\\\"),_=s.getArg(m,\\\"column\\\");if(v<a.line||v===a.line&&_<a.column)throw new Error(\\\"Section offsets must be ordered and non-overlapping.\\\");return a=m,{generatedOffset:{generatedLine:v+1,generatedColumn:_+1},consumer:new o(s.getArg(d,\\\"map\\\"),f)}})}return c.prototype=Object.create(o.prototype),c.prototype.constructor=o,c.prototype._version=3,Object.defineProperty(c.prototype,\\\"sources\\\",{get:function(){for(var p=[],f=0;f<this._sections.length;f++)for(var g=0;g<this._sections[f].consumer.sources.length;g++)p.push(this._sections[f].consumer.sources[g]);return p}}),c.prototype.originalPositionFor=function(f){var g={generatedLine:s.getArg(f,\\\"line\\\"),generatedColumn:s.getArg(f,\\\"column\\\")},u=e.search(g,this._sections,function(a,d){var m=a.generatedLine-d.generatedOffset.generatedLine;return m||a.generatedColumn-d.generatedOffset.generatedColumn}),h=this._sections[u];return h?h.consumer.originalPositionFor({line:g.generatedLine-(h.generatedOffset.generatedLine-1),column:g.generatedColumn-(h.generatedOffset.generatedLine===g.generatedLine?h.generatedOffset.generatedColumn-1:0),bias:f.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(f){return f.consumer.hasContentsOfAllSources()})},c.prototype.sourceContentFor=function(f,g){for(var u=0;u<this._sections.length;u++){var h=this._sections[u],a=h.consumer.sourceContentFor(f,!0);if(a)return a}if(g)return null;throw new Error('\\\"'+f+'\\\" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(f){for(var g=0;g<this._sections.length;g++){var u=this._sections[g];if(u.consumer._findSourceIndex(s.getArg(f,\\\"source\\\"))!==-1){var h=u.consumer.generatedPositionFor(f);if(h){var a={line:h.line+(u.generatedOffset.generatedLine-1),column:h.column+(u.generatedOffset.generatedLine===h.line?u.generatedOffset.generatedColumn-1:0)};return a}}}return{line:null,column:null}},c.prototype._parseMappings=function(f,g){this.__generatedMappings=[],this.__originalMappings=[];for(var u=0;u<this._sections.length;u++)for(var h=this._sections[u],a=h.consumer._generatedMappings,d=0;d<a.length;d++){var m=a[d],v=h.consumer._sources.at(m.source);v=s.computeSourceURL(h.consumer.sourceRoot,v,this._sourceMapURL),this._sources.add(v),v=this._sources.indexOf(v);var _=null;m.name&&(_=h.consumer._names.at(m.name),this._names.add(_),_=this._names.indexOf(_));var S={source:v,generatedLine:m.generatedLine+(h.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(h.generatedOffset.generatedLine===m.generatedLine?h.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:_};this.__generatedMappings.push(S),typeof S.originalLine==\\\"number\\\"&&this.__originalMappings.push(S)}r(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),r(this.__originalMappings,s.compareByOriginalPositions)},ss.IndexedSourceMapConsumer=c,ss}var Dr={},Ni;function Qa(){if(Ni)return Dr;Ni=1;var s=Ri().SourceMapGenerator,e=ts(),t=/(\\\\r?\\\\n)/,n=10,r=\\\"$$$isSourceNode$$$\\\";function o(i,l,c,p,f){this.children=[],this.sourceContents={},this.line=i??null,this.column=l??null,this.source=c??null,this.name=f??null,this[r]=!0,p!=null&&this.add(p)}return o.fromStringWithSourceMap=function(l,c,p){var f=new o,g=l.split(t),u=0,h=function(){var _=y(),S=y()||\\\"\\\";return _+S;function y(){return u<g.length?g[u++]:void 0}},a=1,d=0,m=null;return c.eachMapping(function(_){if(m!==null)if(a<_.generatedLine)v(m,h()),a++,d=0;else{var S=g[u]||\\\"\\\",y=S.substr(0,_.generatedColumn-d);g[u]=S.substr(_.generatedColumn-d),d=_.generatedColumn,v(m,y),m=_;return}for(;a<_.generatedLine;)f.add(h()),a++;if(d<_.generatedColumn){var S=g[u]||\\\"\\\";f.add(S.substr(0,_.generatedColumn)),g[u]=S.substr(_.generatedColumn),d=_.generatedColumn}m=_},this),u<g.length&&(m&&v(m,h()),f.add(g.splice(u).join(\\\"\\\"))),c.sources.forEach(function(_){var S=c.sourceContentFor(_);S!=null&&(p!=null&&(_=e.join(p,_)),f.setSourceContent(_,S))}),f;function v(_,S){if(_===null||_.source===void 0)f.add(S);else{var y=p?e.join(p,_.source):_.source;f.add(new o(_.originalLine,_.originalColumn,y,S,_.name))}}},o.prototype.add=function(l){if(Array.isArray(l))l.forEach(function(c){this.add(c)},this);else if(l[r]||typeof l==\\\"string\\\")l&&this.children.push(l);else throw new TypeError(\\\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \\\"+l);return this},o.prototype.prepend=function(l){if(Array.isArray(l))for(var c=l.length-1;c>=0;c--)this.prepend(l[c]);else if(l[r]||typeof l==\\\"string\\\")this.children.unshift(l);else throw new TypeError(\\\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \\\"+l);return this},o.prototype.walk=function(l){for(var c,p=0,f=this.children.length;p<f;p++)c=this.children[p],c[r]?c.walk(l):c!==\\\"\\\"&&l(c,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(l){var c,p,f=this.children.length;if(f>0){for(c=[],p=0;p<f-1;p++)c.push(this.children[p]),c.push(l);c.push(this.children[p]),this.children=c}return this},o.prototype.replaceRight=function(l,c){var p=this.children[this.children.length-1];return p[r]?p.replaceRight(l,c):typeof p==\\\"string\\\"?this.children[this.children.length-1]=p.replace(l,c):this.children.push(\\\"\\\".replace(l,c)),this},o.prototype.setSourceContent=function(l,c){this.sourceContents[e.toSetString(l)]=c},o.prototype.walkSourceContents=function(l){for(var c=0,p=this.children.length;c<p;c++)this.children[c][r]&&this.children[c].walkSourceContents(l);for(var f=Object.keys(this.sourceContents),c=0,p=f.length;c<p;c++)l(e.fromSetString(f[c]),this.sourceContents[f[c]])},o.prototype.toString=function(){var l=\\\"\\\";return this.walk(function(c){l+=c}),l},o.prototype.toStringWithSourceMap=function(l){var c={code:\\\"\\\",line:1,column:0},p=new s(l),f=!1,g=null,u=null,h=null,a=null;return this.walk(function(d,m){c.code+=d,m.source!==null&&m.line!==null&&m.column!==null?((g!==m.source||u!==m.line||h!==m.column||a!==m.name)&&p.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:c.line,column:c.column},name:m.name}),g=m.source,u=m.line,h=m.column,a=m.name,f=!0):f&&(p.addMapping({generated:{line:c.line,column:c.column}}),g=null,f=!1);for(var v=0,_=d.length;v<_;v++)d.charCodeAt(v)===n?(c.line++,c.column=0,v+1===_?(g=null,f=!1):f&&p.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:c.line,column:c.column},name:m.name})):c.column++}),this.walkSourceContents(function(d,m){p.setSourceContent(d,m)}),{code:c.code,map:p}},Dr.SourceNode=o,Dr}var Bi;function Ka(){return Bi||(Bi=1,es.SourceMapGenerator=Ri().SourceMapGenerator,es.SourceMapConsumer=Ja().SourceMapConsumer,es.SourceNode=Qa().SourceNode),es}var Di;function Za(){return Di||(Di=1,(function(s,e){e.__esModule=!0;var t=Fe(),n=void 0;try{var r=Ka();n=r.SourceNode}catch{}n||(n=function(l,c,p,f){this.src=\\\"\\\",f&&this.add(f)},n.prototype={add:function(c){t.isArray(c)&&(c=c.join(\\\"\\\")),this.src+=c},prepend:function(c){t.isArray(c)&&(c=c.join(\\\"\\\")),this.src=c+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function o(l,c,p){if(t.isArray(l)){for(var f=[],g=0,u=l.length;g<u;g++)f.push(c.wrap(l[g],p));return f}else if(typeof l==\\\"boolean\\\"||typeof l==\\\"number\\\")return l+\\\"\\\";return l}function i(l){this.srcFile=l,this.source=[]}i.prototype={isEmpty:function(){return!this.source.length},prepend:function(c,p){this.source.unshift(this.wrap(c,p))},push:function(c,p){this.source.push(this.wrap(c,p))},merge:function(){var c=this.empty();return this.each(function(p){c.add([\\\" \\\",p,`\\n`])}),c},each:function(c){for(var p=0,f=this.source.length;p<f;p++)c(this.source[p])},empty:function(){var c=this.currentLocation||{start:{}};return new n(c.start.line,c.start.column,this.srcFile)},wrap:function(c){var p=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return c instanceof n?c:(c=o(c,this,p),new n(p.start.line,p.start.column,this.srcFile,c))},functionCall:function(c,p,f){return f=this.generateList(f),this.wrap([c,p?\\\".\\\"+p+\\\"(\\\":\\\"(\\\",f,\\\")\\\"])},quotedString:function(c){return'\\\"'+(c+\\\"\\\").replace(/\\\\\\\\/g,\\\"\\\\\\\\\\\\\\\\\\\").replace(/\\\"/g,'\\\\\\\\\\\"').replace(/\\\\n/g,\\\"\\\\\\\\n\\\").replace(/\\\\r/g,\\\"\\\\\\\\r\\\").replace(/\\\\u2028/g,\\\"\\\\\\\\u2028\\\").replace(/\\\\u2029/g,\\\"\\\\\\\\u2029\\\")+'\\\"'},objectLiteral:function(c){var p=this,f=[];Object.keys(c).forEach(function(u){var h=o(c[u],p);h!==\\\"undefined\\\"&&f.push([p.quotedString(u),\\\":\\\",h])});var g=this.generateList(f);return g.prepend(\\\"{\\\"),g.add(\\\"}\\\"),g},generateList:function(c){for(var p=this.empty(),f=0,g=c.length;f<g;f++)f&&p.add(\\\",\\\"),p.add(o(c[f],this));return p},generateArray:function(c){var p=this.generateList(c);return p.prepend(\\\"[\\\"),p.add(\\\"]\\\"),p}},e.default=i,s.exports=e.default})(Xs,Xs.exports)),Xs.exports}var qi;function ja(){return qi||(qi=1,(function(s,e){e.__esModule=!0;function t(u){return u&&u.__esModule?u:{default:u}}var n=Ar(),r=rt(),o=t(r),i=Fe(),l=Za(),c=t(l);function p(u){this.value=u}function f(){}f.prototype={nameLookup:function(h,a){return this.internalNameLookup(h,a)},depthedLookup:function(h){return[this.aliasable(\\\"container.lookup\\\"),\\\"(depths, \\\",JSON.stringify(h),\\\")\\\"]},compilerInfo:function(){var h=n.COMPILER_REVISION,a=n.REVISION_CHANGES[h];return[h,a]},appendToBuffer:function(h,a,d){return i.isArray(h)||(h=[h]),h=this.source.wrap(h,a),this.environment.isSimple?[\\\"return \\\",h,\\\";\\\"]:d?[\\\"buffer += \\\",h,\\\";\\\"]:(h.appendToBuffer=!0,h)},initializeBuffer:function(){return this.quotedString(\\\"\\\")},internalNameLookup:function(h,a){return this.lookupPropertyFunctionIsUsed=!0,[\\\"lookupProperty(\\\",h,\\\",\\\",JSON.stringify(a),\\\")\\\"]},lookupPropertyFunctionIsUsed:!1,compile:function(h,a,d,m){this.environment=h,this.options=a,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!m,this.name=this.environment.name,this.isChild=!!d,this.context=d||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(h,a),this.useDepths=this.useDepths||h.useDepths||h.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||h.useBlockParams;var v=h.opcodes,_=void 0,S=void 0,y=void 0,b=void 0;for(y=0,b=v.length;y<b;y++)_=v[y],this.source.currentLocation=_.loc,S=S||_.loc,this[_.opcode].apply(this,_.args);if(this.source.currentLocation=S,this.pushSource(\\\"\\\"),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default(\\\"Compile completed with content left on stack\\\");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([\\\"var decorators = container.decorators, \\\",this.lookupPropertyFunctionVarDeclaration(),`;\\n`]),this.decorators.push(\\\"return fn;\\\"),m?this.decorators=Function.apply(this,[\\\"fn\\\",\\\"props\\\",\\\"container\\\",\\\"depth0\\\",\\\"data\\\",\\\"blockParams\\\",\\\"depths\\\",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {\\n`),this.decorators.push(`}\\n`),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(m);if(this.isChild)return k;var x={compiler:this.compilerInfo(),main:k};this.decorators&&(x.main_d=this.decorators,x.useDecorators=!0);var C=this.context,O=C.programs,P=C.decorators;for(y=0,b=O.length;y<b;y++)O[y]&&(x[y]=O[y],P[y]&&(x[y+\\\"_d\\\"]=P[y],x.useDecorators=!0));return this.environment.usePartial&&(x.usePartial=!0),this.options.data&&(x.useData=!0),this.useDepths&&(x.useDepths=!0),this.useBlockParams&&(x.useBlockParams=!0),this.options.compat&&(x.compat=!0),m?x.compilerOptions=this.options:(x.compiler=JSON.stringify(x.compiler),this.source.currentLocation={start:{line:1,column:0}},x=this.objectLiteral(x),a.srcName?(x=x.toStringWithSourceMap({file:a.destName}),x.map=x.map&&x.map.toString()):x=x.toString()),x},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(h){var a=this,d=\\\"\\\",m=this.stackVars.concat(this.registers.list);m.length>0&&(d+=\\\", \\\"+m.join(\\\", \\\"));var v=0;Object.keys(this.aliases).forEach(function(y){var b=a.aliases[y];b.children&&b.referenceCount>1&&(d+=\\\", alias\\\"+ ++v+\\\"=\\\"+y,b.children[0]=\\\"alias\\\"+v)}),this.lookupPropertyFunctionIsUsed&&(d+=\\\", \\\"+this.lookupPropertyFunctionVarDeclaration());var _=[\\\"container\\\",\\\"depth0\\\",\\\"helpers\\\",\\\"partials\\\",\\\"data\\\"];(this.useBlockParams||this.useDepths)&&_.push(\\\"blockParams\\\"),this.useDepths&&_.push(\\\"depths\\\");var S=this.mergeSource(d);return h?(_.push(S),Function.apply(this,_)):this.source.wrap([\\\"function(\\\",_.join(\\\",\\\"),`) {\\n `,S,\\\"}\\\"])},mergeSource:function(h){var a=this.environment.isSimple,d=!this.forceBuffer,m=void 0,v=void 0,_=void 0,S=void 0;return this.source.each(function(y){y.appendToBuffer?(_?y.prepend(\\\" + \\\"):_=y,S=y):(_&&(v?_.prepend(\\\"buffer += \\\"):m=!0,S.add(\\\";\\\"),_=S=void 0),v=!0,a||(d=!1))}),d?_?(_.prepend(\\\"return \\\"),S.add(\\\";\\\")):v||this.source.push('return \\\"\\\";'):(h+=\\\", buffer = \\\"+(m?\\\"\\\":this.initializeBuffer()),_?(_.prepend(\\\"return buffer + \\\"),S.add(\\\";\\\")):this.source.push(\\\"return buffer;\\\")),h&&this.source.prepend(\\\"var \\\"+h.substring(2)+(m?\\\"\\\":`;\\n`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`\\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\\n return parent[propertyName];\\n }\\n return undefined\\n }\\n `.trim()},blockValue:function(h){var a=this.aliasable(\\\"container.hooks.blockHelperMissing\\\"),d=[this.contextName(0)];this.setupHelperArgs(h,0,d);var m=this.popStack();d.splice(1,0,m),this.push(this.source.functionCall(a,\\\"call\\\",d))},ambiguousBlockValue:function(){var h=this.aliasable(\\\"container.hooks.blockHelperMissing\\\"),a=[this.contextName(0)];this.setupHelperArgs(\\\"\\\",0,a,!0),this.flushInline();var d=this.topStack();a.splice(1,0,d),this.pushSource([\\\"if (!\\\",this.lastHelper,\\\") { \\\",d,\\\" = \\\",this.source.functionCall(h,\\\"call\\\",a),\\\"}\\\"])},appendContent:function(h){this.pendingContent?h=this.pendingContent+h:this.pendingLocation=this.source.currentLocation,this.pendingContent=h},append:function(){if(this.isInline())this.replaceStack(function(a){return[\\\" != null ? \\\",a,' : \\\"\\\"']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var h=this.popStack();this.pushSource([\\\"if (\\\",h,\\\" != null) { \\\",this.appendToBuffer(h,void 0,!0),\\\" }\\\"]),this.environment.isSimple&&this.pushSource([\\\"else { \\\",this.appendToBuffer(\\\"''\\\",void 0,!0),\\\" }\\\"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(\\\"container.escapeExpression\\\"),\\\"(\\\",this.popStack(),\\\")\\\"]))},getContext:function(h){this.lastContext=h},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(h,a,d,m){var v=0;!m&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(h[v++])):this.pushContext(),this.resolvePath(\\\"context\\\",h,v,a,d)},lookupBlockParam:function(h,a){this.useBlockParams=!0,this.push([\\\"blockParams[\\\",h[0],\\\"][\\\",h[1],\\\"]\\\"]),this.resolvePath(\\\"context\\\",a,1)},lookupData:function(h,a,d){h?this.pushStackLiteral(\\\"container.data(data, \\\"+h+\\\")\\\"):this.pushStackLiteral(\\\"data\\\"),this.resolvePath(\\\"data\\\",a,0,!0,d)},resolvePath:function(h,a,d,m,v){var _=this;if(this.options.strict||this.options.assumeObjects){this.push(g(this.options.strict&&v,this,a,d,h));return}for(var S=a.length;d<S;d++)this.replaceStack(function(y){var b=_.nameLookup(y,a[d],h);return m?[\\\" && \\\",b]:[\\\" != null ? \\\",b,\\\" : \\\",y]})},resolvePossibleLambda:function(){this.push([this.aliasable(\\\"container.lambda\\\"),\\\"(\\\",this.popStack(),\\\", \\\",this.contextName(0),\\\")\\\"])},pushStringParam:function(h,a){this.pushContext(),this.pushString(a),a!==\\\"SubExpression\\\"&&(typeof h==\\\"string\\\"?this.pushString(h):this.pushStackLiteral(h))},emptyHash:function(h){this.trackIds&&this.push(\\\"{}\\\"),this.stringParams&&(this.push(\\\"{}\\\"),this.push(\\\"{}\\\")),this.pushStackLiteral(h?\\\"undefined\\\":\\\"{}\\\")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var h=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(h.ids)),this.stringParams&&(this.push(this.objectLiteral(h.contexts)),this.push(this.objectLiteral(h.types))),this.push(this.objectLiteral(h.values))},pushString:function(h){this.pushStackLiteral(this.quotedString(h))},pushLiteral:function(h){this.pushStackLiteral(h)},pushProgram:function(h){h!=null?this.pushStackLiteral(this.programExpression(h)):this.pushStackLiteral(null)},registerDecorator:function(h,a){var d=this.nameLookup(\\\"decorators\\\",a,\\\"decorator\\\"),m=this.setupHelperArgs(a,h);this.decorators.push([\\\"fn = \\\",this.decorators.functionCall(d,\\\"\\\",[\\\"fn\\\",\\\"props\\\",\\\"container\\\",m]),\\\" || fn;\\\"])},invokeHelper:function(h,a,d){var m=this.popStack(),v=this.setupHelper(h,a),_=[];d&&_.push(v.name),_.push(m),this.options.strict||_.push(this.aliasable(\\\"container.hooks.helperMissing\\\"));var S=[\\\"(\\\",this.itemsSeparatedBy(_,\\\"||\\\"),\\\")\\\"],y=this.source.functionCall(S,\\\"call\\\",v.callParams);this.push(y)},itemsSeparatedBy:function(h,a){var d=[];d.push(h[0]);for(var m=1;m<h.length;m++)d.push(a,h[m]);return d},invokeKnownHelper:function(h,a){var d=this.setupHelper(h,a);this.push(this.source.functionCall(d.name,\\\"call\\\",d.callParams))},invokeAmbiguous:function(h,a){this.useRegister(\\\"helper\\\");var d=this.popStack();this.emptyHash();var m=this.setupHelper(0,h,a),v=this.lastHelper=this.nameLookup(\\\"helpers\\\",h,\\\"helper\\\"),_=[\\\"(\\\",\\\"(helper = \\\",v,\\\" || \\\",d,\\\")\\\"];this.options.strict||(_[0]=\\\"(helper = \\\",_.push(\\\" != null ? helper : \\\",this.aliasable(\\\"container.hooks.helperMissing\\\"))),this.push([\\\"(\\\",_,m.paramsInit?[\\\"),(\\\",m.paramsInit]:[],\\\"),\\\",\\\"(typeof helper === \\\",this.aliasable('\\\"function\\\"'),\\\" ? \\\",this.source.functionCall(\\\"helper\\\",\\\"call\\\",m.callParams),\\\" : helper))\\\"])},invokePartial:function(h,a,d){var m=[],v=this.setupParams(a,1,m);h&&(a=this.popStack(),delete v.name),d&&(v.indent=JSON.stringify(d)),v.helpers=\\\"helpers\\\",v.partials=\\\"partials\\\",v.decorators=\\\"container.decorators\\\",h?m.unshift(a):m.unshift(this.nameLookup(\\\"partials\\\",a,\\\"partial\\\")),this.options.compat&&(v.depths=\\\"depths\\\"),v=this.objectLiteral(v),m.push(v),this.push(this.source.functionCall(\\\"container.invokePartial\\\",\\\"\\\",m))},assignToHash:function(h){var a=this.popStack(),d=void 0,m=void 0,v=void 0;this.trackIds&&(v=this.popStack()),this.stringParams&&(m=this.popStack(),d=this.popStack());var _=this.hash;d&&(_.contexts[h]=d),m&&(_.types[h]=m),v&&(_.ids[h]=v),_.values[h]=a},pushId:function(h,a,d){h===\\\"BlockParam\\\"?this.pushStackLiteral(\\\"blockParams[\\\"+a[0]+\\\"].path[\\\"+a[1]+\\\"]\\\"+(d?\\\" + \\\"+JSON.stringify(\\\".\\\"+d):\\\"\\\")):h===\\\"PathExpression\\\"?this.pushString(a):h===\\\"SubExpression\\\"?this.pushStackLiteral(\\\"true\\\"):this.pushStackLiteral(\\\"null\\\")},compiler:f,compileChildren:function(h,a){for(var d=h.children,m=void 0,v=void 0,_=0,S=d.length;_<S;_++){m=d[_],v=new this.compiler;var y=this.matchExistingProgram(m);if(y==null){this.context.programs.push(\\\"\\\");var b=this.context.programs.length;m.index=b,m.name=\\\"program\\\"+b,this.context.programs[b]=v.compile(m,a,this.context,!this.precompile),this.context.decorators[b]=v.decorators,this.context.environments[b]=m,this.useDepths=this.useDepths||v.useDepths,this.useBlockParams=this.useBlockParams||v.useBlockParams,m.useDepths=this.useDepths,m.useBlockParams=this.useBlockParams}else m.index=y.index,m.name=\\\"program\\\"+y.index,this.useDepths=this.useDepths||y.useDepths,this.useBlockParams=this.useBlockParams||y.useBlockParams}},matchExistingProgram:function(h){for(var a=0,d=this.context.environments.length;a<d;a++){var m=this.context.environments[a];if(m&&m.equals(h))return m}},programExpression:function(h){var a=this.environment.children[h],d=[a.index,\\\"data\\\",a.blockParams];return(this.useBlockParams||this.useDepths)&&d.push(\\\"blockParams\\\"),this.useDepths&&d.push(\\\"depths\\\"),\\\"container.program(\\\"+d.join(\\\", \\\")+\\\")\\\"},useRegister:function(h){this.registers[h]||(this.registers[h]=!0,this.registers.list.push(h))},push:function(h){return h instanceof p||(h=this.source.wrap(h)),this.inlineStack.push(h),h},pushStackLiteral:function(h){this.push(new p(h))},pushSource:function(h){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),h&&this.source.push(h)},replaceStack:function(h){var a=[\\\"(\\\"],d=void 0,m=void 0,v=void 0;if(!this.isInline())throw new o.default(\\\"replaceStack on non-inline\\\");var _=this.popStack(!0);if(_ instanceof p)d=[_.value],a=[\\\"(\\\",d],v=!0;else{m=!0;var S=this.incrStack();a=[\\\"((\\\",this.push(S),\\\" = \\\",_,\\\")\\\"],d=this.topStack()}var y=h.call(this,d);v||this.popStack(),m&&this.stackSlot--,this.push(a.concat(y,\\\")\\\"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(\\\"stack\\\"+this.stackSlot),this.topStackName()},topStackName:function(){return\\\"stack\\\"+this.stackSlot},flushInline:function(){var h=this.inlineStack;this.inlineStack=[];for(var a=0,d=h.length;a<d;a++){var m=h[a];if(m instanceof p)this.compileStack.push(m);else{var v=this.incrStack();this.pushSource([v,\\\" = \\\",m,\\\";\\\"]),this.compileStack.push(v)}}},isInline:function(){return this.inlineStack.length},popStack:function(h){var a=this.isInline(),d=(a?this.inlineStack:this.compileStack).pop();if(!h&&d instanceof p)return d.value;if(!a){if(!this.stackSlot)throw new o.default(\\\"Invalid stack pop\\\");this.stackSlot--}return d},topStack:function(){var h=this.isInline()?this.inlineStack:this.compileStack,a=h[h.length-1];return a instanceof p?a.value:a},contextName:function(h){return this.useDepths&&h?\\\"depths[\\\"+h+\\\"]\\\":\\\"depth\\\"+h},quotedString:function(h){return this.source.quotedString(h)},objectLiteral:function(h){return this.source.objectLiteral(h)},aliasable:function(h){var a=this.aliases[h];return a?(a.referenceCount++,a):(a=this.aliases[h]=this.source.wrap(h),a.aliasable=!0,a.referenceCount=1,a)},setupHelper:function(h,a,d){var m=[],v=this.setupHelperArgs(a,h,m,d),_=this.nameLookup(\\\"helpers\\\",a,\\\"helper\\\"),S=this.aliasable(this.contextName(0)+\\\" != null ? \\\"+this.contextName(0)+\\\" : (container.nullContext || {})\\\");return{params:m,paramsInit:v,name:_,callParams:[S].concat(m)}},setupParams:function(h,a,d){var m={},v=[],_=[],S=[],y=!d,b=void 0;y&&(d=[]),m.name=this.quotedString(h),m.hash=this.popStack(),this.trackIds&&(m.hashIds=this.popStack()),this.stringParams&&(m.hashTypes=this.popStack(),m.hashContexts=this.popStack());var k=this.popStack(),x=this.popStack();(x||k)&&(m.fn=x||\\\"container.noop\\\",m.inverse=k||\\\"container.noop\\\");for(var C=a;C--;)b=this.popStack(),d[C]=b,this.trackIds&&(S[C]=this.popStack()),this.stringParams&&(_[C]=this.popStack(),v[C]=this.popStack());return y&&(m.args=this.source.generateArray(d)),this.trackIds&&(m.ids=this.source.generateArray(S)),this.stringParams&&(m.types=this.source.generateArray(_),m.contexts=this.source.generateArray(v)),this.options.data&&(m.data=\\\"data\\\"),this.useBlockParams&&(m.blockParams=\\\"blockParams\\\"),m},setupHelperArgs:function(h,a,d,m){var v=this.setupParams(h,a,d);return v.loc=JSON.stringify(this.source.currentLocation),v=this.objectLiteral(v),m?(this.useRegister(\\\"options\\\"),d.push(\\\"options\\\"),[\\\"options=\\\",v]):d?(d.push(v),\\\"\\\"):v}},(function(){for(var u=\\\"break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false\\\".split(\\\" \\\"),h=f.RESERVED_WORDS={},a=0,d=u.length;a<d;a++)h[u[a]]=!0})(),f.isValidJavaScriptVariableName=function(u){return!f.RESERVED_WORDS[u]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(u)};function g(u,h,a,d,m){var v=h.popStack(),_=a.length;for(u&&_--;d<_;d++)v=h.nameLookup(v,a[d],m);return u?[h.aliasable(\\\"container.strict\\\"),\\\"(\\\",v,\\\", \\\",h.quotedString(a[d]),\\\", \\\",JSON.stringify(h.source.currentLocation),\\\" )\\\"]:v}e.default=f,s.exports=e.default})(Gs,Gs.exports)),Gs.exports}var Hi;function el(){return Hi||(Hi=1,(function(s,e){e.__esModule=!0;function t(_){return _&&_.__esModule?_:{default:_}}var n=Ha(),r=t(n),o=gi(),i=t(o),l=Va(),c=Ua(),p=ja(),f=t(p),g=yi(),u=t(g),h=pi(),a=t(h),d=r.default.create;function m(){var _=d();return _.compile=function(S,y){return c.compile(S,y,_)},_.precompile=function(S,y){return c.precompile(S,y,_)},_.AST=i.default,_.Compiler=c.Compiler,_.JavaScriptCompiler=f.default,_.Parser=l.parser,_.parse=l.parse,_.parseWithoutProcessing=l.parseWithoutProcessing,_}var v=m();v.create=m,a.default(v),v.Visitor=u.default,v.default=v,e.default=v,s.exports=e.default})(Ts,Ts.exports)),Ts.exports}var tl=el();const $e=Ta(tl);class sl{constructor(e,t,n){this.story=e,this.state=t,this.getCurrentSection=n,this.handlebars=$e.create(),this.handlebars.registerHelper(\\\"embed\\\",i=>{const l=this.getCurrentSection();if(l.passages&&i in l.passages)return new $e.SafeString(this.process(l.passages[i].text||\\\"\\\",!0));if(i in this.story.sections)return new $e.SafeString(this.process(this.story.sections[i].text||\\\"\\\",!0))}),this.handlebars.registerHelper(\\\"seen\\\",i=>this.state.getSeen(i)),this.handlebars.registerHelper(\\\"get\\\",i=>this.state.get(i)),this.handlebars.registerHelper(\\\"at\\\",i=>{const l=this.state.get(\\\"_section\\\");return Array.isArray(i)?i.includes(l):l===i});const r=i=>i&&typeof i==\\\"object\\\"&&typeof i.toString==\\\"function\\\"&&!Array.isArray(i)?i.toString():i;this.handlebars.registerHelper(\\\"set\\\",(i,l)=>(this.state.set(i,r(l)),\\\"\\\")),this.handlebars.registerHelper(\\\"unset\\\",i=>(this.state.set(i,!1),\\\"\\\")),this.handlebars.registerHelper(\\\"inc\\\",(i,l)=>{const c=typeof l==\\\"number\\\"?l:1,p=this.state.get(i)||0;return this.state.set(i,p+c),\\\"\\\"}),this.handlebars.registerHelper(\\\"dec\\\",(i,l)=>{const c=typeof l==\\\"number\\\"?l:1,p=this.state.get(i)||0;return this.state.set(i,p-c),\\\"\\\"}),this.handlebars.registerHelper(\\\"and\\\",(...i)=>i.slice(0,-1).every(Boolean)),this.handlebars.registerHelper(\\\"or\\\",(...i)=>i.slice(0,-1).some(Boolean)),this.handlebars.registerHelper(\\\"not\\\",i=>!i),this.handlebars.registerHelper(\\\"eq\\\",(i,l)=>i==l),this.handlebars.registerHelper(\\\"ne\\\",(i,l)=>i!=l),this.handlebars.registerHelper(\\\"gt\\\",(i,l)=>i>l),this.handlebars.registerHelper(\\\"lt\\\",(i,l)=>i<l),this.handlebars.registerHelper(\\\"gte\\\",(i,l)=>i>=l),this.handlebars.registerHelper(\\\"lte\\\",(i,l)=>i<=l),this.handlebars.registerHelper(\\\"array\\\",function(...i){return i.pop(),i}),this.handlebars.registerHelper(\\\"append\\\",(i,l)=>{const c=this.state.get(i)||[],p=Array.isArray(c)?[...c]:[c],f=r(l);return Array.isArray(f)?p.push(...f.map(r)):p.push(f),this.state.set(i,p),\\\"\\\"}),this.handlebars.registerHelper(\\\"prepend\\\",(i,l)=>{const c=this.state.get(i)||[],p=Array.isArray(c)?[...c]:[c],f=r(l);return Array.isArray(f)?p.unshift(...f.map(r)):p.unshift(f),this.state.set(i,p),\\\"\\\"}),this.handlebars.registerHelper(\\\"pop\\\",i=>{const l=this.state.get(i)||[];if(!Array.isArray(l)||l.length===0)return\\\"\\\";const c=[...l],p=c.shift();return this.state.set(i,c),p}),this.handlebars.registerHelper(\\\"remove\\\",(i,l)=>{const c=this.state.get(i)||[];if(!Array.isArray(c))return\\\"\\\";const p=r(l),f=c.findIndex(g=>r(g)===p);if(f!==-1){const g=[...c];g.splice(f,1),this.state.set(i,g)}return\\\"\\\"}),this.handlebars.registerHelper(\\\"contains\\\",(i,l)=>{let c;if(typeof i==\\\"string\\\"){const f=this.state.get(i);c=Array.isArray(f)?f:[]}else if(Array.isArray(i))c=i;else return!1;const p=r(l);return c.some(f=>r(f)===p)}),this.handlebars.registerHelper(\\\"length\\\",i=>{let l;if(typeof i==\\\"string\\\"){const c=this.state.get(i);l=Array.isArray(c)?c:[]}else if(Array.isArray(i))l=i;else return 0;return l.length});const o=i=>{let l=\\\"\\\";const c=i.hash.set||\\\"\\\";return c&&(l+=` data-set='${JSON.stringify(c.split(\\\",\\\").map(p=>p.trim()))}'`),l};this.handlebars.registerHelper(\\\"section\\\",(i,l)=>{const c=l.hash.text||i;return new $e.SafeString(`<a class=\\\"squiffy-link link-section\\\" data-section=\\\"${i}\\\"${o(l)} role=\\\"link\\\" tabindex=\\\"0\\\">${c}</a>`)}),this.handlebars.registerHelper(\\\"passage\\\",(i,l)=>{const c=l.hash.text||i;return new $e.SafeString(`<a class=\\\"squiffy-link link-passage\\\" data-passage=\\\"${i}\\\"${o(l)} role=\\\"link\\\" tabindex=\\\"0\\\">${c}</a>`)})}process(e,t){try{return e=this.handlebars.compile(e)(this.state.getStore()),t?Er(e,{async:!1}).trim():Lr(e,{async:!1}).trim()}catch(n){const r=n instanceof Error?n.message:String(n);return console.error(\\\"Squiffy template error:\\\",r),`<div class=\\\"squiffy-error\\\" style=\\\"color: red; background: #ffe0e0; padding: 8px; border: 1px solid red; margin: 4px 0; font-family: monospace; white-space: pre-wrap;\\\"><strong>Template error:</strong> ${r}</div>`}}}class rl{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>this.off(e,t)}off(e,t){this.listeners.get(e)?.delete(t)}once(e,t){const n=this.on(e,r=>{n(),t(r)});return n}emit(e,t){this.listeners.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error(`[Squiffy] handler for \\\"${String(e)}\\\" failed`,r)}})}}class nl{constructor(e,t,n,r,o){this.store={},this.persist=e,this.storyId=t,this.onSet=n,this.emitter=r,this.onSetInternal=o}usePersistentStorage(){return this.persist&&window.localStorage&&this.storyId}set(e,t){this.setInternal(e,t,!0)}setInternal(e,t,n){typeof t>\\\"u\\\"&&(t=!0),n&&this.onSetInternal&&this.onSetInternal(e,this.get(e),structuredClone(t)),this.store[e]=structuredClone(t),this.usePersistentStorage()&&(localStorage[this.storyId+\\\"-\\\"+e]=JSON.stringify(t)),n&&this.emitter.emit(\\\"set\\\",{attribute:e,value:t}),this.onSet(e,t)}get(e){return e in this.store?structuredClone(this.store[e]):null}getStore(){return new Proxy({},{get:(e,t)=>this.get(String(t)),has:(e,t)=>String(t)in this.store,ownKeys:()=>Object.keys(this.store),getOwnPropertyDescriptor:(e,t)=>{const n=String(t);if(n in this.store)return{enumerable:!0,configurable:!0,value:this.get(n)}}})}load(){if(!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)if(t.startsWith(this.storyId+\\\"-\\\")){const n=t.substring(this.storyId.length+1);this.store[n]=JSON.parse(localStorage[t])}}reset(){if(this.store={},!this.usePersistentStorage())return;const e=Object.keys(localStorage);for(const t of e)t.startsWith(this.storyId)&&localStorage.removeItem(t)}setSeen(e){let t=this.get(\\\"_seen_sections\\\");t||(t=[]),t.indexOf(e)==-1&&(t.push(e),this.set(\\\"_seen_sections\\\",t))}getSeen(e){const t=this.get(\\\"_seen_sections\\\");return t?t.indexOf(e)>-1:!1}}function Fi(s,e){return!s&&!e?!0:!s||!e||s.length!==e.length?!1:s.every((t,n)=>t===e[n])}function il(s,e,t,n,r,o){function i(f){return f.replace(/'/g,\\\"\\\\\\\\'\\\")}function l(f){return t.querySelectorAll(`[data-source='[[${i(f)}]]']`)}function c(f,g){return t.querySelectorAll(`[data-source='[[${i(f)}]][${i(g)}]']`)}function p(f,g){const u=Array.from(f.querySelectorAll(\\\"a.link-passage.disabled\\\")).map(h=>h.getAttribute(\\\"data-passage\\\"));f.innerHTML=g;for(const h of u){const a=f.querySelector(`a.link-passage[data-passage=\\\"${h}\\\"]`);a&&r(a)}}for(const f of Object.keys(s.sections)){const g=l(f);if(g.length){const u=e.sections[f];if(u){const h=s.sections[f],a=!Fi(h.attributes,u.attributes),d=u.text!=h.text;if(a&&o(u.attributes||[]),d||a)for(const m of g)p(m,n.processText(u.text,!1))}else for(const h of g)h.closest(\\\".squiffy-output-section\\\").remove()}if(s.sections[f].passages)for(const u of Object.keys(s.sections[f].passages)){const h=c(f,u);if(!h.length)continue;const a=e.sections[f]?.passages&&e.sections[f]?.passages[u];if(a){const d=s.sections[f].passages[u],m=!Fi(d.attributes,a.attributes),v=a.text!=d.text;if(m&&o(a.attributes||[]),v||m)for(const _ of h)p(_,n.processText(a.text,!1))}else for(const d of h)d.closest(\\\".squiffy-output-passage\\\").remove()}}}class ol{constructor(e,t,n,r,o,i,l,c,p,f){this.plugins=[],this.outputElement=e,this.textProcessor=t,this.state=n,this.linkHandler=r,this.getSectionText=o,this.getPassageText=i,this.processText=l,this.addTransition=c,this.animation=p,this.emitter=f}add(e){const t=e.init({outputElement:this.outputElement,registerHelper:(n,r)=>{this.textProcessor.handlebars.registerHelper(n,r)},registerLinkHandler:(n,r)=>{this.linkHandler.registerLinkHandler(n,r)},get:n=>this.state.get(n),set:(n,r)=>this.state.set(n,r),getSectionText:this.getSectionText,getPassageText:this.getPassageText,processText:this.processText,addTransition:this.addTransition,animation:this.animation,on:(n,r)=>this.emitter.on(n,r),off:(n,r)=>this.emitter.off(n,r),once:(n,r)=>this.emitter.once(n,r)});return this.plugins.push(e),t}onWrite(e){this.plugins.forEach(t=>t.onWrite?.(e))}onLoad(){this.plugins.forEach(e=>e.onLoad?.())}}function $i(s,e){return new Promise(t=>{s.addEventListener(\\\"transitionend\\\",function(){s.innerHTML=e,s.addEventListener(\\\"transitionend\\\",function(){s.classList.remove(\\\"fade-in\\\"),t()},{once:!0}),s.classList.remove(\\\"fade-out\\\"),s.classList.add(\\\"fade-in\\\")},{once:!0}),s.classList.add(\\\"fade-out\\\")})}function al(){return{name:\\\"replaceLabel\\\",init(s){s.registerHelper(\\\"label\\\",function(e,t){return new $e.SafeString(`<span class=\\\"squiffy-label-${e}\\\">${t.fn(this)}</span>`)}),s.registerHelper(\\\"replace\\\",function(e,t){const n=t.fn(this),r=s.outputElement.querySelector(`.squiffy-label-${e}`);if(r){const i=n.includes(`\\n\\n`)?Lr(n,{async:!1}).trim():Er(n,{async:!1}).trim();s.addTransition(()=>$i(r,i))}return\\\"\\\"})}}}function ll(){const s=r=>r.replace(/&/g,\\\"&amp;\\\").replace(/'/g,\\\"&#39;\\\").replace(/\\\"/g,\\\"&quot;\\\").replace(/</g,\\\"&lt;\\\").replace(/>/g,\\\"&gt;\\\"),e=(r,o,i,l)=>{const c=i.map(h=>h.toString()),p=n(c,null),f=l.hash.set||\\\"\\\";f&&r.set(f,p[0]);const g=s(JSON.stringify(p.slice(1))||\\\"\\\"),u=l.hash.show==\\\"next\\\"?p[1]:p[0];return new $e.SafeString(`<a class=\\\"squiffy-link\\\" data-handler=\\\"${o}\\\" data-value=\\\"${s(p[0])}\\\" data-show=\\\"${l.hash.show||\\\"\\\"}\\\" data-options='${g}' data-attribute=\\\"${f}\\\" role=\\\"link\\\">${u}</a>`)},t=(r,o,i)=>{const l={},c=JSON.parse(o.getAttribute(\\\"data-options\\\"))||[],p=n(c,i?o.getAttribute(\\\"data-value\\\"):\\\"\\\");o.innerHTML=o.getAttribute(\\\"data-show\\\")==\\\"next\\\"?p[1]:p[0],o.setAttribute(\\\"data-value\\\",p[0]),o.setAttribute(\\\"data-options\\\",JSON.stringify(p.slice(1))||\\\"\\\"),p[1]||(l.disableLink=!0);const f=o.getAttribute(\\\"data-attribute\\\");return f&&r.set(f,o.getAttribute(\\\"data-value\\\")),window.getSelection()?.removeAllRanges(),l},n=(r,o)=>{const i=r[0],l=r.slice(1);return o&&l.push(o),[i,...l]};return{name:\\\"rotateSequence\\\",init(r){r.registerHelper(\\\"rotate\\\",(o,i)=>e(r,\\\"rotate\\\",o,i)),r.registerHelper(\\\"sequence\\\",(o,i)=>e(r,\\\"sequence\\\",o,i)),r.registerLinkHandler(\\\"rotate\\\",o=>t(r,o,!0)),r.registerLinkHandler(\\\"sequence\\\",o=>t(r,o,!1))}}}function cl(){return{name:\\\"random\\\",init(s){s.registerHelper(\\\"random\\\",(e,t)=>{const n=e.map(l=>l.toString()),r=Math.floor(Math.random()*n.length),o=n[r],i=t.hash.set||\\\"\\\";return i&&s.set(i,o),new $e.SafeString(o)})}}}function ul(){let s;return{name:\\\"live\\\",init(e){s=e,s.registerHelper(\\\"live\\\",(n,r)=>{const o=r.hash.section||\\\"\\\";if(o)return new $e.SafeString(`<span class=\\\"squiffy-live\\\" data-attribute=\\\"${n}\\\" data-section=\\\"${o}\\\"></span>`);const i=r.hash.passage||\\\"\\\";return i?new $e.SafeString(`<span class=\\\"squiffy-live\\\" data-attribute=\\\"${n}\\\" data-passage=\\\"${i}\\\"></span>`):new $e.SafeString(`<span class=\\\"squiffy-live\\\" data-attribute=\\\"${n}\\\"></span>`)});const t=async n=>{const r=[],o=`.squiffy-live[data-attribute=\\\"${CSS.escape(n.attribute)}\\\"]`;for(const i of s.outputElement.querySelectorAll(o)){const l=i.innerHTML;let c=\\\"\\\";if(i.dataset.section){const p=s.getSectionText(i.dataset.section);p&&(c=s.processText(p,!0))}else if(i.dataset.passage){const p=s.getPassageText(i.dataset.passage);p&&(c=s.processText(p,!0))}else c=n.value;l!==c&&r.push($i(i,c))}await Promise.all(r)};s.on(\\\"set\\\",async n=>{await t(n)})},onWrite(e){if(!s)return;e.querySelectorAll(\\\".squiffy-live\\\").forEach(n=>{if(n.dataset.section){const r=s.getSectionText(n.dataset.section);r&&(n.innerHTML=s.processText(r,!0))}else if(n.dataset.passage){const r=s.getPassageText(n.dataset.passage);r&&(n.innerHTML=s.processText(r,!0))}else{const r=n.dataset.attribute;n.textContent=r?s.get(r):\\\"\\\"}})}}}function hl(){let s;const e=n=>{const r={};for(const[o,i]of Object.entries(n)){if(i==null){r[o]=i;continue}try{r[o]=JSON.parse(i)}catch{r[o]=i}}return r},t=n=>{const r=\\\".squiffy-animate\\\";for(const o of n.querySelectorAll(r)){const i=e(o.dataset);if(!i.content||(i.content.includes(`\\n\\n`)?o.innerHTML=Lr(i.content,{async:!1}).trim():o.innerHTML=Er(i.content,{async:!1}).trim(),!i.name))continue;const c=o.innerHTML,p=()=>{i.loop?s.animation.runAnimation(i.name,o,i,()=>{},!0):(s.animation.isInitiallyHidden(i.name)&&(o.style.opacity=\\\"0\\\"),s.addTransition(()=>new Promise(f=>{o.style.opacity=\\\"\\\",s.animation.runAnimation(i.name,o,i,()=>{o.classList.remove(\\\"squiffy-animate\\\"),o.innerHTML=c,f()},!1)})))};if(i.trigger===\\\"link\\\"){const f=o.querySelectorAll(\\\"a\\\");for(const g of f)s.animation.addLinkAnimation(g,p)}else p()}};return{name:\\\"animate\\\",init(n){s=n,s.registerHelper(\\\"animate\\\",function(r,o){const i=o.fn(this),l={name:r,content:i,...o.hash},c=Object.entries(l).map(([g,u])=>` data-${$e.escapeExpression(g)}=\\\"${$e.escapeExpression(JSON.stringify(u))}\\\"`).join(\\\"\\\"),f=i.includes(`\\n\\n`)?\\\"div\\\":\\\"span\\\";return new $e.SafeString(`<${f} class=\\\"squiffy-animate\\\"${c}></${f}>`)})},onWrite(n){t(n)},onLoad(){t(s.outputElement)}}}const rs={ReplaceLabel:al,RotateSequencePlugin:ll,RandomPlugin:cl,LivePlugin:ul,AnimatePlugin:hl};class pl{constructor(){this.linkHandlers={}}registerLinkHandler(e,t){this.linkHandlers[e]=t}handleLink(e){const t=e.getAttribute(\\\"data-handler\\\")||\\\"\\\",n=this.linkHandlers[t];return n?[!0,t,n(e)]:[!1,t,null]}}/**\\n * anime.js - ESM\\n * @version v4.1.3\\n * @author Julian Garnier\\n * @license MIT\\n * @copyright (c) 2025 Julian Garnier\\n * @see https://animejs.com\\n */const ot=typeof window<\\\"u\\\",Ie=ot?window:null,H=ot?document:null,pe={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},Z={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Ge={NONE:0,AUTO:1,FORCE:2},ke={replace:0,none:1,blend:2},zi=Symbol(),Qs=Symbol(),qr=Symbol(),ns=Symbol(),Vi=Symbol(),Ui=Symbol(),te=1e-11,Ht=1e12,Ne=1e3,Hr=120,dt=\\\"\\\",Fr=(()=>{const s=new Map;return s.set(\\\"x\\\",\\\"translateX\\\"),s.set(\\\"y\\\",\\\"translateY\\\"),s.set(\\\"z\\\",\\\"translateZ\\\"),s})(),is=[\\\"translateX\\\",\\\"translateY\\\",\\\"translateZ\\\",\\\"rotate\\\",\\\"rotateX\\\",\\\"rotateY\\\",\\\"rotateZ\\\",\\\"scale\\\",\\\"scaleX\\\",\\\"scaleY\\\",\\\"scaleZ\\\",\\\"skew\\\",\\\"skewX\\\",\\\"skewY\\\",\\\"perspective\\\",\\\"matrix\\\",\\\"matrix3d\\\"],$r=is.reduce((s,e)=>({...s,[e]:e+\\\"(\\\"}),{}),W=()=>{},fl=/(^#([\\\\da-f]{3}){1,2}$)|(^#([\\\\da-f]{4}){1,2}$)/i,dl=/rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/i,gl=/rgba\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*\\\\)/i,ml=/hsl\\\\(\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*\\\\)/i,vl=/hsla\\\\(\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)%\\\\s*,\\\\s*(-?\\\\d+|-?\\\\d*.\\\\d+)\\\\s*\\\\)/i,Wi=/[-+]?\\\\d*\\\\.?\\\\d+(?:e[-+]?\\\\d)?/gi,Gi=/^([-+]?\\\\d*\\\\.?\\\\d+(?:e[-+]?\\\\d+)?)([a-z]+|%)$/i,yl=/([a-z])([A-Z])/g,_l=/(\\\\w+)(\\\\([^)]+\\\\)+)/g,Xi=/(\\\\*=|\\\\+=|-=)/,Yi={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:Hr,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:Ne,delay:0,loopDelay:0,ease:\\\"out(2)\\\",composition:ke.replace,modifier:s=>s,onBegin:W,onBeforeUpdate:W,onUpdate:W,onLoop:W,onPause:W,onComplete:W,onRender:W},me={current:null,root:H},G={defaults:Yi,precision:4,timeScale:1,tickThreshold:200},Ji={version:\\\"4.1.3\\\",engine:null};ot&&(Ie.AnimeJS||(Ie.AnimeJS=[]),Ie.AnimeJS.push(Ji));const Qi=s=>s.replace(yl,\\\"$1-$2\\\").toLowerCase(),_e=(s,e)=>s.indexOf(e)===0,kt=Date.now,Le=Array.isArray,be=s=>s&&s.constructor===Object,Xe=s=>typeof s==\\\"number\\\"&&!isNaN(s),ze=s=>typeof s==\\\"string\\\",fe=s=>typeof s==\\\"function\\\",I=s=>typeof s>\\\"u\\\",os=s=>I(s)||s===null,zr=s=>ot&&s instanceof SVGElement,Ki=s=>fl.test(s),Zi=s=>_e(s,\\\"rgb\\\"),ji=s=>_e(s,\\\"hsl\\\"),bl=s=>Ki(s)||Zi(s)||ji(s),Ft=s=>!G.defaults.hasOwnProperty(s),Lt=s=>ze(s)?parseFloat(s):s,$t=Math.pow,xt=Math.sqrt,Vr=Math.sin,Ur=Math.cos,at=Math.abs,eo=Math.exp,Sl=Math.ceil,as=Math.floor,kl=Math.asin,Wr=Math.max,Ks=Math.atan2,zt=Math.PI,Gr=Math.round,F=(s,e,t)=>s<e?e:s>t?t:s,to={},N=(s,e)=>{if(e<0)return s;if(!e)return Gr(s);let t=to[e];return t||(t=to[e]=10**e),Gr(s*t)/t},At=(s,e)=>Le(e)?e.reduce((t,n)=>at(n-s)<at(t-s)?n:t):e?Gr(s/e)*e:s,gt=(s,e,t)=>s+(e-s)*t,Xr=(s,e,t)=>{const n=10**(t||0);return as((Math.random()*(e-s+1/n)+s)*n)/n},so=s=>{let e=s.length,t,n;for(;e;)n=Xr(0,--e),t=s[e],s[e]=s[n],s[n]=t;return s},Zs=s=>s===1/0?Ht:s===-1/0?-1e12:s,Vt=s=>s<=te?te:Zs(N(s,11)),Be=s=>Le(s)?[...s]:s,ls=(s,e)=>{const t={...s};for(let n in e){const r=s[n];t[n]=I(r)?e[n]:r}return t},ie=(s,e,t,n=\\\"_prev\\\",r=\\\"_next\\\")=>{let o=s._head,i=r;for(t&&(o=s._tail,i=n);o;){const l=o[i];e(o),o=l}},mt=(s,e,t=\\\"_prev\\\",n=\\\"_next\\\")=>{const r=e[t],o=e[n];r?r[n]=o:s._head=o,o?o[t]=r:s._tail=r,e[t]=null,e[n]=null},vt=(s,e,t,n=\\\"_prev\\\",r=\\\"_next\\\")=>{let o=s._tail;for(;o&&t&&t(o,e);)o=o[n];const i=o?o[r]:s._head;o?o[r]=e:s._head=e,i?i[n]=e:s._tail=e,e[n]=o,e[r]=i},Yr=s=>{let e;return(...t)=>{let n,r,o,i;e&&(n=e.currentIteration,r=e.iterationProgress,o=e.reversed,i=e._alternate,e.revert());const l=s(...t);return l&&!fe(l)&&l.revert&&(e=l),I(r)||(e.currentIteration=n,e.iterationProgress=(i&&n%2?!o:o)?1-r:r),l||W}};class ro{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=N(Ne/Hr,0),this._fps=Hr,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<te?te:n,o=N(Ne/r,0);this._fps=r,this._frameDuration=o,this._scheduledTime+=o-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<te?te:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return Ge.NONE;const r=this._frameDuration,o=n-t;return this._scheduledTime+=o<r?r:o,Ge.AUTO}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const js=(s,e,t,n,r)=>{const o=s.parent,i=s.duration,l=s.completed,c=s.iterationDuration,p=s.iterationCount,f=s._currentIteration,g=s._loopDelay,u=s._reversed,h=s._alternate,a=s._hasChildren,d=s._delay,m=s._currentTime,v=d+c,_=e-d,S=F(m,-d,i),y=F(_,-d,i),b=_-m,k=y>0,x=y>=i,C=i<=te,O=r===Ge.FORCE;let P=0,w=_,E=0;if(p>1){const U=~~(y/(c+(x?0:g)));s._currentIteration=F(U,0,p),x&&s._currentIteration--,P=s._currentIteration%2,w=y%(c+g)||0}const L=u^(h&&P),M=s._ease;let q=x?L?0:i:L?c-w:w;M&&(q=c*M(q/c)||0);const $=(o?o.backwards:_<m)?!L:!!L;if(s._currentTime=_,s._iterationTime=q,s.backwards=$,k&&!s.began?(s.began=!0,!t&&!(o&&($||!o.began))&&s.onBegin(s)):_<=0&&(s.began=!1),!t&&!a&&k&&s._currentIteration!==f&&s.onLoop(s),O||r===Ge.AUTO&&(e>=d&&e<=v||e<=d&&S>d||e>=v&&S!==i)||q>=v&&S!==i||q<=d&&S>0||e<=S&&S===i&&l||x&&!l&&C){if(k&&(s.computeDeltaTime(S),t||s.onBeforeUpdate(s)),!a){const U=O||($?b*-1:b)>=G.tickThreshold,z=s._offset+(o?o._offset:0)+d+q;let R=s._head,ae,se,xe,ve,V=0;for(;R;){const ee=R._composition,re=R._currentTime,ue=R._changeDuration,ct=R._absoluteStartTime+R._changeDuration,Ae=R._nextRep,we=R._prevRep,he=ee!==ke.none;if((U||(re!==ue||z<=ct+(Ae?Ae._delay:0))&&(re!==0||z>=R._absoluteStartTime))&&(!he||!R._isOverridden&&(!R._isOverlapped||z<=ct)&&(!Ae||Ae._isOverridden||z<=Ae._absoluteStartTime)&&(!we||we._isOverridden||z>=we._absoluteStartTime+we._changeDuration+R._delay))){const j=R._currentTime=F(q-R._startTime,0,ue),J=R._ease(j/R._updateDuration),Te=R._modifier,Ue=R._valueType,Ce=R._tweenType,Re=Ce===pe.OBJECT,St=Ue===Z.NUMBER,qe=St&&Re||J===0||J===1?-1:G.precision;let ge,T;if(St)ge=T=Te(N(gt(R._fromNumber,R._toNumber,J),qe));else if(Ue===Z.UNIT)T=Te(N(gt(R._fromNumber,R._toNumber,J),qe)),ge=`${T}${R._unit}`;else if(Ue===Z.COLOR){const A=R._fromNumbers,B=R._toNumbers,Q=N(F(Te(gt(A[0],B[0],J)),0,255),0),X=N(F(Te(gt(A[1],B[1],J)),0,255),0),ye=N(F(Te(gt(A[2],B[2],J)),0,255),0),Pe=F(Te(N(gt(A[3],B[3],J),qe)),0,1);if(ge=`rgba(${Q},${X},${ye},${Pe})`,he){const Ee=R._numbers;Ee[0]=Q,Ee[1]=X,Ee[2]=ye,Ee[3]=Pe}}else if(Ue===Z.COMPLEX){ge=R._strings[0];for(let A=0,B=R._toNumbers.length;A<B;A++){const Q=Te(N(gt(R._fromNumbers[A],R._toNumbers[A],J),qe)),X=R._strings[A+1];ge+=`${X?Q+X:Q}`,he&&(R._numbers[A]=Q)}}if(he&&(R._number=T),!n&&ee!==ke.blend){const A=R.property;ae=R.target,Re?ae[A]=ge:Ce===pe.ATTRIBUTE?ae.setAttribute(A,ge):(se=ae.style,Ce===pe.TRANSFORM?(ae!==xe&&(xe=ae,ve=ae[ns]),ve[A]=ge,V=1):Ce===pe.CSS?se[A]=ge:Ce===pe.CSS_VAR&&se.setProperty(A,ge)),k&&(E=1)}else R._value=ge}if(V&&R._renderTransforms){let j=dt;for(let J in ve)j+=`${$r[J]}${ve[J]}) `;se.transform=j,V=0}R=R._next}!t&&E&&s.onRender(s)}!t&&k&&s.onUpdate(s)}return o&&C?!t&&(o.began&&!$&&_>=i&&!l||$&&_<=te&&l)&&(s.onComplete(s),s.completed=!$):k&&x?p===1/0?s._startTime+=s.duration:s._currentIteration>=p-1&&(s.paused=!0,!l&&!a&&(s.completed=!0,!t&&!(o&&($||!o.began))&&(s.onComplete(s),s._resolve(s)))):s.completed=!1,E},Rt=(s,e,t,n,r)=>{const o=s._currentIteration;if(js(s,e,t,n,r),s._hasChildren){const i=s,l=i.backwards,c=n?e:i._iterationTime,p=kt();let f=0,g=!0;if(!n&&i._currentIteration!==o){const u=i.iterationDuration;ie(i,h=>{if(!l)!h.completed&&!h.backwards&&h._currentTime<h.iterationDuration&&js(h,u,t,1,Ge.FORCE),h.began=!1,h.completed=!1;else{const a=h.duration,d=h._offset+h._delay,m=d+a;!t&&a<=te&&(!d||m===u)&&h.onComplete(h)}}),t||i.onLoop(i)}ie(i,u=>{const h=N((c-u._offset)*u._speed,12),a=u._fps<i._fps?u.requestTick(p):r;f+=js(u,h,t,n,a),!u.completed&&g&&(g=!1)},l),!t&&f&&i.onRender(i),(g||l)&&i._currentTime>=i.duration&&(i.paused=!0,i.completed||(i.completed=!0,t||(i.onComplete(i),i._resolve(i))))}},Ut={animation:null,update:W},xl=s=>{let e=Ut.animation;return e||(e={duration:te,computeDeltaTime:W,_offset:0,_delay:0,_head:null,_tail:null},Ut.animation=e,Ut.update=()=>{s.forEach(t=>{for(let n in t){const r=t[n],o=r._head;if(o){const i=o._valueType,l=i===Z.COMPLEX||i===Z.COLOR?Be(o._fromNumbers):null;let c=o._fromNumber,p=r._tail;for(;p&&p!==o;){if(l)for(let f=0,g=p._numbers.length;f<g;f++)l[f]+=p._numbers[f];else c+=p._number;p=p._prevAdd}o._toNumber=c,o._toNumbers=l}}}),js(e,1,1,0,Ge.FORCE)}),e},no=ot?requestAnimationFrame:setImmediate,wl=ot?cancelAnimationFrame:clearImmediate;class Tl extends ro{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Yi,this.paused=!0,this.reqId=0}update(){const e=this._currentTime=kt();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const o=r._next;r.paused?(mt(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Rt(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Ge.AUTO),r=o}Ut.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(kt()),this.reqId=no(io)),this}pause(){if(this.reqId)return this.paused=!0,Cl()}resume(){if(this.paused)return this.paused=!1,ie(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(G.timeScale===1?1:Ne)}set speed(e){this._speed=e*G.timeScale,ie(this,t=>t.speed=t._speed)}get timeUnit(){return G.timeScale===1?\\\"ms\\\":\\\"s\\\"}set timeUnit(e){const n=e===\\\"s\\\",r=n?.001:1;if(G.timeScale!==r){G.timeScale=r,G.tickThreshold=200*r;const o=n?.001:Ne;this.defaults.duration*=o,this._speed*=o}}get precision(){return G.precision}set precision(e){G.precision=e}}const Se=(()=>{const s=new Tl(kt());return ot&&(Ji.engine=s,H.addEventListener(\\\"visibilitychange\\\",()=>{s.pauseOnDocumentHidden&&(H.hidden?s.pause():s.resume())})),s})(),io=()=>{Se._head?(Se.reqId=no(io),Se.update()):Se.reqId=0},Cl=()=>(wl(Se.reqId),Se.reqId=0,Se),Pl=(s,e,t)=>{const n=s.style.transform;let r;if(n){const o=s[ns];let i;for(;i=_l.exec(n);){const l=i[1],c=i[2].slice(1,-1);o[l]=c,l===e&&(r=c,t&&(t[e]=c))}}return n&&!I(r)?r:_e(e,\\\"scale\\\")?\\\"1\\\":_e(e,\\\"rotate\\\")||_e(e,\\\"skew\\\")?\\\"0deg\\\":\\\"0px\\\"};function Jr(s){const e=ze(s)?me.root.querySelectorAll(s):s;if(e instanceof NodeList||e instanceof HTMLCollection)return e}function Ke(s){if(os(s))return[];if(!ot)return Le(s)&&s.flat(1/0)||[s];if(Le(s)){const t=s.flat(1/0),n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];if(!os(i)){const l=Jr(i);if(l)for(let c=0,p=l.length;c<p;c++){const f=l[c];if(!os(f)){let g=!1;for(let u=0,h=n.length;u<h;u++)if(n[u]===f){g=!0;break}g||n.push(f)}}else{let c=!1;for(let p=0,f=n.length;p<f;p++)if(n[p]===i){c=!0;break}c||n.push(i)}}}return n}const e=Jr(s);return e?Array.from(e):[s]}function cs(s){const e=Ke(s),t=e.length;if(t)for(let n=0;n<t;n++){const r=e[n];if(!r[zi]){r[zi]=!0;const o=zr(r);(r.nodeType||o)&&(r[Qs]=!0,r[qr]=o,r[ns]={})}}return e}const oo=s=>{const t=Ke(s)[0];if(!(!t||!zr(t)))return t},El=(s,e=.33)=>t=>{const n=oo(s);if(!n)return;const r=t.tagName===\\\"path\\\",o=r?\\\" \\\":\\\",\\\",i=t[Vi];i&&t.setAttribute(r?\\\"d\\\":\\\"points\\\",i);let l=\\\"\\\",c=\\\"\\\";if(!e)l=t.getAttribute(r?\\\"d\\\":\\\"points\\\"),c=n.getAttribute(r?\\\"d\\\":\\\"points\\\");else{const p=t.getTotalLength(),f=n.getTotalLength(),g=Math.max(Math.ceil(p*e),Math.ceil(f*e));for(let u=0;u<g;u++){const h=u/(g-1),a=t.getPointAtLength(p*h),d=n.getPointAtLength(f*h),m=r?u===0?\\\"M\\\":\\\"L\\\":\\\"\\\";l+=m+N(a.x,3)+o+a.y+\\\" \\\",c+=m+N(d.x,3)+o+d.y+\\\" \\\"}}return t[Vi]=c,[l,c]},Ll=s=>{let e=1;if(s&&s.getCTM){const t=s.getCTM();if(t){const n=xt(t.a*t.a+t.b*t.b),r=xt(t.c*t.c+t.d*t.d);e=(n+r)/2}}return e},Al=(s,e,t)=>{const n=Ne,r=getComputedStyle(s),o=r.strokeLinecap,i=r.vectorEffect===\\\"non-scaling-stroke\\\"?s:null;let l=o;const c=new Proxy(s,{get(p,f){const g=p[f];return f===Ui?p:f===\\\"setAttribute\\\"?(...u)=>{if(u[0]===\\\"draw\\\"){const a=u[1].split(\\\" \\\"),d=+a[0],m=+a[1],v=Ll(i),_=d*-1e3*v,S=m*n*v+_,y=n*v+(d===0&&m===1||d===1&&m===0?0:10*v)-S;if(o!==\\\"butt\\\"){const b=d===m?\\\"butt\\\":o;l!==b&&(p.style.strokeLinecap=`${b}`,l=b)}p.setAttribute(\\\"stroke-dashoffset\\\",`${_}`),p.setAttribute(\\\"stroke-dasharray\\\",`${S} ${y}`)}return Reflect.apply(g,p,u)}:fe(g)?(...u)=>Reflect.apply(g,p,u):g}});return s.getAttribute(\\\"pathLength\\\")!==`${n}`&&(s.setAttribute(\\\"pathLength\\\",`${n}`),c.setAttribute(\\\"draw\\\",`${e} ${t}`)),c},Rl=(s,e=0,t=0)=>Ke(s).map(r=>Al(r,e,t)),Qr=(s,e,t=0)=>s.getPointAtLength(e+t>=1?e+t:0),Kr=(s,e)=>t=>{const n=+s.getTotalLength(),r=t[qr],o=s.getCTM();return{from:0,to:n,modifier:i=>{if(e===\\\"a\\\"){const l=Qr(s,i,-1),c=Qr(s,i,1);return Ks(c.y-l.y,c.x-l.x)*180/zt}else{const l=Qr(s,i,0);return e===\\\"x\\\"?r||!o?l.x:l.x*o.a+l.y*o.c+o.e:r||!o?l.y:l.x*o.b+l.y*o.d+o.f}}}},Ol=s=>{const e=oo(s);if(e)return{translateX:Kr(e,\\\"x\\\"),translateY:Kr(e,\\\"y\\\"),rotate:Kr(e,\\\"a\\\")}},Ml=[\\\"opacity\\\",\\\"rotate\\\",\\\"overflow\\\",\\\"color\\\"],Il=(s,e)=>{if(Ml.includes(e))return!1;if(s.getAttribute(e)||e in s){if(e===\\\"scale\\\"){const t=s.parentNode;return t&&t.tagName===\\\"filter\\\"}return!0}},Nl={morphTo:El,createMotionPath:Ol,createDrawable:Rl},Bl=s=>{const e=dl.exec(s)||gl.exec(s),t=I(e[4])?1:+e[4];return[+e[1],+e[2],+e[3],t]},Dl=s=>{const e=s.length,t=e===4||e===5;return[+(\\\"0x\\\"+s[1]+s[t?1:2]),+(\\\"0x\\\"+s[t?2:3]+s[t?2:4]),+(\\\"0x\\\"+s[t?3:5]+s[t?3:6]),e===5||e===9?+(+(\\\"0x\\\"+s[t?4:7]+s[t?4:8])/255).toFixed(3):1]},Zr=(s,e,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*(2/3-t)*6:s),ql=s=>{const e=ml.exec(s)||vl.exec(s),t=+e[1]/360,n=+e[2]/100,r=+e[3]/100,o=I(e[4])?1:+e[4];let i,l,c;if(n===0)i=l=c=r;else{const p=r<.5?r*(1+n):r+n-r*n,f=2*r-p;i=N(Zr(f,p,t+1/3)*255,0),l=N(Zr(f,p,t)*255,0),c=N(Zr(f,p,t-1/3)*255,0)}return[i,l,c,o]},Hl=s=>Zi(s)?Bl(s):Ki(s)?Dl(s):ji(s)?ql(s):[0,0,0,1],D=(s,e)=>I(s)?e:s,Ye=(s,e,t,n,r)=>{if(fe(s)){const o=()=>{const i=s(e,t,n);return isNaN(+i)?i||0:+i};return r&&(r.func=o),o()}else return s},jr=(s,e)=>s[Qs]?s[qr]&&Il(s,e)?pe.ATTRIBUTE:is.includes(e)||Fr.get(e)?pe.TRANSFORM:_e(e,\\\"--\\\")?pe.CSS_VAR:e in s.style?pe.CSS:e in s?pe.OBJECT:pe.ATTRIBUTE:pe.OBJECT,ao=(s,e,t)=>{const n=s.style[e];n&&t&&(t[e]=n);const r=n||getComputedStyle(s[Ui]||s).getPropertyValue(e);return r===\\\"auto\\\"?\\\"0\\\":r},Ot=(s,e,t,n)=>{const r=I(t)?jr(s,e):t;return r===pe.OBJECT?s[e]||0:r===pe.ATTRIBUTE?s.getAttribute(e):r===pe.TRANSFORM?Pl(s,e,n):r===pe.CSS_VAR?ao(s,e,n).trimStart():ao(s,e,n)},Mt=(s,e,t)=>t===\\\"-\\\"?s-e:t===\\\"+\\\"?s+e:s*e,en=()=>({t:Z.NUMBER,n:0,u:null,o:null,d:null,s:null}),Ze=(s,e)=>{if(e.t=Z.NUMBER,e.n=0,e.u=null,e.o=null,e.d=null,e.s=null,!s)return e;const t=+s;if(isNaN(t)){let n=s;n[1]===\\\"=\\\"&&(e.o=n[0],n=n.slice(2));const r=n.includes(\\\" \\\")?!1:Gi.exec(n);if(r)return e.t=Z.UNIT,e.n=+r[1],e.u=r[2],e;if(e.o)return e.n=+n,e;if(bl(n))return e.t=Z.COLOR,e.d=Hl(n),e;{const o=n.match(Wi);return e.t=Z.COMPLEX,e.d=o?o.map(Number):[],e.s=n.split(Wi)||[],e}}else return e.n=t,e},lo=(s,e)=>(e.t=s._valueType,e.n=s._toNumber,e.u=s._unit,e.o=null,e.d=Be(s._toNumbers),e.s=Be(s._strings),e),De=en(),er={_rep:new WeakMap,_add:new Map},tn=(s,e,t=\\\"_rep\\\")=>{const n=er[t];let r=n.get(s);return r||(r={},n.set(s,r)),r[e]?r[e]:r[e]={_head:null,_tail:null}},Fl=(s,e)=>s._isOverridden||s._absoluteStartTime>e._absoluteStartTime,tr=s=>{s._isOverlapped=1,s._isOverridden=1,s._changeDuration=te,s._currentTime=te},co=(s,e)=>{const t=s._composition;if(t===ke.replace){const n=s._absoluteStartTime;vt(e,s,Fl,\\\"_prevRep\\\",\\\"_nextRep\\\");const r=s._prevRep;if(r){const o=r.parent,i=r._absoluteStartTime+r._changeDuration;if(s.parent.id!==o.id&&o.iterationCount>1&&i+(o.duration-o.iterationDuration)>n){tr(r);let p=r._prevRep;for(;p&&p.parent.id===o.id;)tr(p),p=p._prevRep}const l=n-s._delay;if(i>l){const p=r._startTime,f=i-(p+r._updateDuration),g=N(l-f-p,12);r._changeDuration=g,r._currentTime=g,r._isOverlapped=1,g<te&&tr(r)}let c=!0;if(ie(o,p=>{p._isOverlapped||(c=!1)}),c){const p=o.parent;if(p){let f=!0;ie(p,g=>{g!==o&&ie(g,u=>{u._isOverlapped||(f=!1)})}),f&&p.cancel()}else o.cancel()}}}else if(t===ke.blend){const n=tn(s.target,s.property,\\\"_add\\\"),r=xl(er._add);let o=n._head;o||(o={...s},o._composition=ke.replace,o._updateDuration=te,o._startTime=0,o._numbers=Be(s._fromNumbers),o._number=0,o._next=null,o._prev=null,vt(n,o),vt(r,o));const i=s._toNumber;if(s._fromNumber=o._fromNumber-i,s._toNumber=0,s._numbers=Be(s._fromNumbers),s._number=0,o._fromNumber=i,s._toNumbers){const l=Be(s._toNumbers);l&&l.forEach((c,p)=>{s._fromNumbers[p]=o._fromNumbers[p]-c,s._toNumbers[p]=0}),o._fromNumbers=l}vt(n,s,null,\\\"_prevAdd\\\",\\\"_nextAdd\\\")}return s},uo=s=>{const e=s._composition;if(e!==ke.none){const t=s.target,n=s.property,i=er._rep.get(t)[n];if(mt(i,s,\\\"_prevRep\\\",\\\"_nextRep\\\"),e===ke.blend){const l=er._add,c=l.get(t);if(!c)return;const p=c[n],f=Ut.animation;mt(p,s,\\\"_prevAdd\\\",\\\"_nextAdd\\\");const g=p._head;if(g&&g===p._tail){mt(p,g,\\\"_prevAdd\\\",\\\"_nextAdd\\\"),mt(f,g);let u=!0;for(let h in c)if(c[h]._head){u=!1;break}u&&l.delete(t)}}}return s},ho=s=>(s.paused=!0,s.began=!1,s.completed=!1,s),sn=s=>(s._cancelled&&(s._hasChildren?ie(s,sn):ie(s,e=>{e._composition!==ke.none&&co(e,tn(e.target,e.property))}),s._cancelled=0),s);let $l=0;class Je extends ro{constructor(e={},t=null,n=0){super(0);const{id:r,delay:o,duration:i,reversed:l,alternate:c,loop:p,loopDelay:f,autoplay:g,frameRate:u,playbackRate:h,onComplete:a,onLoop:d,onPause:m,onBegin:v,onBeforeUpdate:_,onUpdate:S}=e;me.current&&me.current.register(this);const y=t?0:Se._elapsedTime,b=t?t.defaults:G.defaults,k=fe(o)||I(o)?b.delay:+o,x=fe(i)||I(i)?1/0:+i,C=D(p,b.loop),O=D(f,b.loopDelay),P=C===!0||C===1/0||C<0?1/0:C+1;let w=0;t?w=n:(Se.reqId||Se.requestTick(kt()),w=(Se._elapsedTime-Se._startTime)*G.timeScale),this.id=I(r)?++$l:r,this.parent=t,this.duration=Zs((x+O)*P-O)||te,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=v||b.onBegin,this.onBeforeUpdate=_||b.onBeforeUpdate,this.onUpdate=S||b.onUpdate,this.onLoop=d||b.onLoop,this.onPause=m||b.onPause,this.onComplete=a||b.onComplete,this.iterationDuration=x,this.iterationCount=P,this._autoplay=t?!1:D(g,b.autoplay),this._offset=w,this._delay=k,this._loopDelay=O,this._iterationTime=0,this._currentIteration=0,this._resolve=W,this._running=!1,this._reversed=+D(l,b.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=D(c,b.alternate),this._prev=null,this._next=null,this._elapsedTime=y,this._startTime=y,this._lastTime=y,this._fps=D(u,b.frameRate),this._speed=D(h,b.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return F(N(this._currentTime,G.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return N(this._iterationTime,G.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return F(N(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return F(N(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*F(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return sn(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Rt(this,0,1,e,Ge.FORCE),ho(this),this._hasChildren&&ie(this,ho),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Rt(this,this.duration,1,e,Ge.FORCE),this.reset(e);const t=this._autoplay;return t===!0?this.resume():t&&!I(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*Se._speed);return this._startTime=kt()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=te&&!this._hasChildren?Rt(this,te,0,0,Ge.FORCE):(this._running||(vt(Se,this),Se._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,Se.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){sn(this),this.completed=!1;const r=this.paused;return this.paused=!0,Rt(this,e+this._delay,~~t,~~n,Ge.AUTO),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?as(Ht/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?ie(this,e=>e.cancel(),!0):ie(this,uo),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=Vt(e);if(t===n)return this;const r=e/t,o=e<=te;return this.duration=o?te:n,this.iterationDuration=o?te:Vt(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Rt(this,0,1,0,Ge.AUTO);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const zl=s=>new Je(s,null,0).init(),yt=s=>s,po=(s,e,t)=>(((1-3*t+3*e)*s+(3*t-6*e))*s+3*e)*s,Vl=(s,e,t)=>{let n=0,r=1,o,i,l=0;do i=n+(r-n)/2,o=po(i,e,t)-s,o>0?r=i:n=i;while(at(o)>1e-7&&++l<100);return i},Ul=(s=.5,e=0,t=.5,n=1)=>s===e&&t===n?yt:r=>r===0||r===1?r:po(Vl(r,s,t),e,n),Wl=(s=10,e)=>{const t=e?Sl:as;return n=>t(F(n,0,1)*s)*(1/s)},fo=(...s)=>{const e=s.length;if(!e)return yt;const t=e-1,n=s[0],r=s[t],o=[0],i=[Lt(n)];for(let l=1;l<t;l++){const c=s[l],p=ze(c)?c.trim().split(\\\" \\\"):[c],f=p[0],g=p[1];o.push(I(g)?l/t:Lt(g)/100),i.push(Lt(f))}return i.push(Lt(r)),o.push(1),function(c){for(let p=1,f=o.length;p<f;p++){const g=o[p];if(c<=g){const u=o[p-1],h=i[p-1];return h+(i[p]-h)*(c-u)/(g-u)}}return i[i.length-1]}},Gl=(s=10,e=1)=>{const t=[0],n=s-1;for(let r=1;r<n;r++){const o=t[r-1],i=r/n,l=(r+1)/n,c=i+(l-i)*Math.random(),p=i*(1-e)+c*e;t.push(F(p,o,1))}return t.push(1),fo(...t)},Xl=zt/2,go=zt*2,Wt=(s=1.68)=>e=>$t(e,+s),mo={[dt]:Wt,Quad:Wt(2),Cubic:Wt(3),Quart:Wt(4),Quint:Wt(5),Sine:s=>1-Ur(s*Xl),Circ:s=>1-xt(1-s*s),Expo:s=>s?$t(2,10*s-10):0,Bounce:s=>{let e,t=4;for(;s<((e=$t(2,--t))-1)/11;);return 1/$t(4,3-t)-7.5625*$t((e*3-2)/22-s,2)},Back:(s=1.70158)=>e=>(+s+1)*e*e*e-+s*e*e,Elastic:(s=1,e=.3)=>{const t=F(+s,1,10),n=F(+e,te,2),r=n/go*kl(1/t),o=go/n;return i=>i===0||i===1?i:-t*$t(2,-10*(1-i))*Vr((1-i-r)*o)}},us={in:s=>e=>s(e),out:s=>e=>1-s(1-e),inOut:s=>e=>e<.5?s(e*2)/2:1-s(e*-2+2)/2,outIn:s=>e=>e<.5?(1-s(1-e*2))/2:(s(e*2-1)+1)/2},vo=(s,e,t)=>{if(t[s])return t[s];if(s.indexOf(\\\"(\\\")<=-1){const r=us[s]||s.includes(\\\"Back\\\")||s.includes(\\\"Elastic\\\")?e[s]():e[s];return r?t[s]=r:yt}else{const n=s.slice(0,-1).split(\\\"(\\\"),r=e[n[0]];return r?t[s]=r(...n[1].split(\\\",\\\")):yt}},Gt=(()=>{const s={linear:fo,irregular:Gl,steps:Wl,cubicBezier:Ul};for(let e in us)for(let t in mo){const n=mo[t],r=us[e];s[e+t]=t===dt||t===\\\"Back\\\"||t===\\\"Elastic\\\"?(o,i)=>r(n(o,i)):r(n)}return s})(),Yl={linear:yt},It=s=>fe(s)?s:ze(s)?vo(s,Gt,Yl):yt,yo={},rn=(s,e,t)=>{if(t===pe.TRANSFORM){const n=Fr.get(s);return n||s}else if(t===pe.CSS||t===pe.ATTRIBUTE&&zr(e)&&s in e.style){const n=yo[s];if(n)return n;{const r=s&&Qi(s);return yo[s]=r,r}}else return s},nn={deg:1,rad:180/zt,turn:360},_o={},on=(s,e,t,n=!1)=>{const r=e.u,o=e.n;if(e.t===Z.UNIT&&r===t)return e;const i=o+r+t,l=_o[i];if(!I(l)&&!n)e.n=l;else{let c;if(r in nn)c=o*nn[r]/nn[t];else{const f=s.cloneNode(),g=s.parentNode,u=g&&g!==H?g:H.body;u.appendChild(f);const h=f.style;h.width=100+r;const a=f.offsetWidth||100;h.width=100+t;const d=f.offsetWidth||100,m=a/d;u.removeChild(f),c=m*o}e.n=c,_o[i]=c}return e.t,Z.UNIT,e.u=t,e},sr=s=>{if(s._hasChildren)ie(s,sr,!0);else{const e=s;e.pause(),ie(e,t=>{const n=t.property,r=t.target;if(r[Qs]){const o=r.style,i=e._inlineStyles[n];if(t._tweenType===pe.TRANSFORM){const l=r[ns];if(I(i)||i===dt?delete l[n]:l[n]=i,t._renderTransforms)if(!Object.keys(l).length)o.removeProperty(\\\"transform\\\");else{let c=dt;for(let p in l)c+=$r[p]+l[p]+\\\") \\\";o.transform=c}}else I(i)||i===dt?o.removeProperty(n):o[n]=i;e._tail===t&&e.targets.forEach(l=>{l.getAttribute&&l.getAttribute(\\\"style\\\")===dt&&l.removeAttribute(\\\"style\\\")})}})}return s},Y=en(),K=en(),rr={func:null},nr=[null],Xt=[null,null],ir={to:null};let Jl=0,wt,lt;const Ql=(s,e)=>{const t={};if(Le(s)){const n=[].concat(...s.map(r=>Object.keys(r))).filter(Ft);for(let r=0,o=n.length;r<o;r++){const i=n[r],l=s.map(c=>{const p={};for(let f in c){const g=c[f];Ft(f)?f===i&&(p.to=g):p[f]=g}return p});t[i]=l}}else{const n=D(e.duration,G.defaults.duration);Object.keys(s).map(o=>({o:parseFloat(o)/100,p:s[o]})).sort((o,i)=>o.o-i.o).forEach(o=>{const i=o.o,l=o.p;for(let c in l)if(Ft(c)){let p=t[c];p||(p=t[c]=[]);const f=i*n;let g=p.length,u=p[g-1];const h={to:l[c]};let a=0;for(let d=0;d<g;d++)a+=p[d].duration;g===1&&(h.from=u.to),l.ease&&(h.ease=l.ease),h.duration=f-(g?a:0),p.push(h)}return o});for(let o in t){const i=t[o];let l;for(let c=0,p=i.length;c<p;c++){const f=i[c],g=f.ease;f.ease=l||void 0,l=g}i[0].duration||i.shift()}}return t};class _t extends Je{constructor(e,t,n,r,o=!1,i=0,l=0){super(t,n,r);const c=cs(e),p=c.length,f=t.keyframes,g=f?ls(Ql(f,t),t):t,{delay:u,duration:h,ease:a,playbackEase:d,modifier:m,composition:v,onRender:_}=g,S=n?n.defaults:G.defaults,y=D(d,S.playbackEase),b=y?It(y):null,k=!I(a)&&!I(a.ease),x=k?a.ease:D(a,b?\\\"linear\\\":S.ease),C=k?a.duration:D(h,S.duration),O=D(u,S.delay),P=m||S.modifier,w=I(v)&&p>=Ne?ke.none:I(v)?S.composition:v,E={},L=this._offset+(n?n._offset:0);let M=NaN,q=NaN,$=0,U=0;for(let z=0;z<p;z++){const R=c[z],ae=i||z,se=l||p;let xe=NaN,ve=NaN;for(let V in g)if(Ft(V)){const ee=jr(R,V),re=rn(V,R,ee);let ue=g[V];const ct=Le(ue);if(o&&!ct&&(Xt[0]=ue,Xt[1]=ue,ue=Xt),ct){const Te=ue.length,Ue=!be(ue[0]);Te===2&&Ue?(ir.to=ue,nr[0]=ir,wt=nr):Te>2&&Ue?(wt=[],ue.forEach((Ce,Re)=>{Re?Re===1?(Xt[1]=Ce,wt.push(Xt)):wt.push(Ce):Xt[0]=Ce})):wt=ue}else nr[0]=ue,wt=nr;let Ae=null,we=null,he=NaN,j=0,J=0;for(let Te=wt.length;J<Te;J++){const Ue=wt[J];be(Ue)?lt=Ue:(ir.to=Ue,lt=ir),rr.func=null;const Ce=Ye(lt.to,R,ae,se,rr);let Re;be(Ce)&&!I(Ce.to)?(lt=Ce,Re=Ce.to):Re=Ce;const St=Ye(lt.from,R,ae,se),qe=lt.ease,ge=!I(qe)&&!I(qe.ease),T=ge?qe.ease:qe||x,A=ge?qe.duration:Ye(D(lt.duration,Te>1?Ye(C,R,ae,se)/Te:C),R,ae,se),B=Ye(D(lt.delay,J?0:O),R,ae,se),Q=Ye(D(lt.composition,w),R,ae,se),X=Xe(Q)?Q:ke[Q],ye=lt.modifier||P,Pe=!I(St),Ee=!I(Re),je=Le(Re),de=je||Pe&&Ee,kn=we?j+B:B,xn=N(L+kn,12);!U&&(Pe||je)&&(U=1);let et=we;if(X!==ke.none){Ae||(Ae=tn(R,re));let ce=Ae._head;for(;ce&&!ce._isOverridden&&ce._absoluteStartTime<=xn;)if(et=ce,ce=ce._nextRep,ce&&ce._absoluteStartTime>=xn)for(;ce;)tr(ce),ce=ce._nextRep}if(de?(Ze(je?Ye(Re[0],R,ae,se):St,Y),Ze(je?Ye(Re[1],R,ae,se,rr):Re,K),Y.t===Z.NUMBER&&(et?et._valueType===Z.UNIT&&(Y.t=Z.UNIT,Y.u=et._unit):(Ze(Ot(R,re,ee,E),De),De.t===Z.UNIT&&(Y.t=Z.UNIT,Y.u=De.u)))):(Ee?Ze(Re,K):we?lo(we,K):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,ee,E),K),Pe?Ze(St,Y):we?lo(we,Y):Ze(n&&et&&et.parent.parent===n?et._value:Ot(R,re,ee,E),Y)),Y.o&&(Y.n=Mt(et?et._toNumber:Ze(Ot(R,re,ee,E),De).n,Y.n,Y.o)),K.o&&(K.n=Mt(Y.n,K.n,K.o)),Y.t!==K.t){if(Y.t===Z.COMPLEX||K.t===Z.COMPLEX){const ce=Y.t===Z.COMPLEX?Y:K,Oe=Y.t===Z.COMPLEX?K:Y;Oe.t=Z.COMPLEX,Oe.s=Be(ce.s),Oe.d=ce.d.map(()=>Oe.n)}else if(Y.t===Z.UNIT||K.t===Z.UNIT){const ce=Y.t===Z.UNIT?Y:K,Oe=Y.t===Z.UNIT?K:Y;Oe.t=Z.UNIT,Oe.u=ce.u}else if(Y.t===Z.COLOR||K.t===Z.COLOR){const ce=Y.t===Z.COLOR?Y:K,Oe=Y.t===Z.COLOR?K:Y;Oe.t=Z.COLOR,Oe.s=ce.s,Oe.d=[0,0,0,1]}}if(Y.u!==K.u){let ce=K.u?Y:K;ce=on(R,ce,K.u?K.u:Y.u,!1)}if(K.d&&Y.d&&K.d.length!==Y.d.length){const ce=Y.d.length>K.d.length?Y:K,Oe=ce===Y?K:Y;Oe.d=ce.d.map((Bc,zo)=>I(Oe.d[zo])?0:Oe.d[zo]),Oe.s=Be(ce.s)}const wn=N(+A||te,12),yr={parent:this,id:Jl++,property:re,target:R,_value:null,_func:rr.func,_ease:It(T),_fromNumbers:Be(Y.d),_toNumbers:Be(K.d),_strings:Be(K.s),_fromNumber:Y.n,_toNumber:K.n,_numbers:Be(Y.d),_number:Y.n,_unit:K.u,_modifier:ye,_currentTime:0,_startTime:kn,_delay:+B,_updateDuration:wn,_changeDuration:wn,_absoluteStartTime:xn,_tweenType:ee,_valueType:K.t,_composition:X,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};X!==ke.none&&co(yr,Ae),isNaN(he)&&(he=yr._startTime),j=N(kn+wn,12),we=yr,$++,vt(this,yr)}(isNaN(q)||he<q)&&(q=he),(isNaN(M)||j>M)&&(M=j),ee===pe.TRANSFORM&&(xe=$-J,ve=$)}if(!isNaN(xe)){let V=0;ie(this,ee=>{V>=xe&&V<ve&&(ee._renderTransforms=1,ee._composition===ke.blend&&ie(Ut.animation,re=>{re.id===ee.id&&(re._renderTransforms=1)})),V++})}}p||console.warn(\\\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\\\"),q?(ie(this,z=>{z._startTime-z._delay||(z._delay-=q),z._startTime-=q}),M-=q):q=0,M||(M=te,this.iterationCount=0),this.targets=c,this.duration=M===te?te:Zs((M+this._loopDelay)*this.iterationCount-this._loopDelay)||te,this.onRender=_||S.onRender,this._ease=b,this._delay=q,this.iterationDuration=M,this._inlineStyles=E,!this._autoplay&&U&&this.onRender(this)}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t;return ie(this,r=>{r._updateDuration=Vt(r._updateDuration*n),r._changeDuration=Vt(r._changeDuration*n),r._currentTime*=n,r._startTime*=n,r._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ie(this,e=>{const t=e._func;if(t){const n=Ot(e.target,e.property,e._tweenType);Ze(n,De),Ze(t(),K),e._fromNumbers=Be(De.d),e._fromNumber=De.n,e._toNumbers=Be(K.d),e._strings=Be(K.s),e._toNumber=K.o?Mt(De.n,K.n,K.o):K.n}}),this}revert(){return super.revert(),sr(this)}then(e){return super.then(e)}}const hs=(s,e)=>new _t(s,e,null,0,!1).init(),or=(s,e=100)=>{const t=[];for(let n=0;n<=e;n++)t.push(s(n/e));return`linear(${t.join(\\\", \\\")})`},an={in:\\\"ease-in\\\",out:\\\"ease-out\\\",inOut:\\\"ease-in-out\\\"},Kl=(()=>{const s={};for(let e in us)s[e]=t=>us[e](Wt(t));return s})(),ln=s=>{let e=an[s];if(e)return e;if(e=\\\"linear\\\",ze(s)){if(_e(s,\\\"linear\\\")||_e(s,\\\"cubic-\\\")||_e(s,\\\"steps\\\")||_e(s,\\\"ease\\\"))e=s;else if(_e(s,\\\"cubicB\\\"))e=Qi(s);else{const t=vo(s,Kl,an);fe(t)&&(e=t===yt?\\\"linear\\\":or(t))}an[s]=e}else if(fe(s)){const t=or(s);t&&(e=t)}else s.ease&&(e=or(s.ease));return e},bo=[\\\"x\\\",\\\"y\\\",\\\"z\\\"],Zl=[\\\"perspective\\\",\\\"width\\\",\\\"height\\\",\\\"margin\\\",\\\"padding\\\",\\\"top\\\",\\\"right\\\",\\\"bottom\\\",\\\"left\\\",\\\"borderWidth\\\",\\\"fontSize\\\",\\\"borderRadius\\\",...bo],jl=[...bo,...is.filter(s=>[\\\"X\\\",\\\"Y\\\",\\\"Z\\\"].some(e=>s.endsWith(e)))];let cn=null;const un={_head:null,_tail:null},hn=(s,e,t)=>{let n=un._head;for(;n;){const r=n._next,o=n.$el===s,i=!e||n.property===e,l=!t||n.parent===t;if(o&&i&&l){const c=n.animation;try{c.commitStyles()}catch{}c.cancel(),mt(un,n);const p=n.parent;p&&(p._completed++,p.animations.length===p._completed&&(p.completed=!0,p.muteCallbacks||(p.paused=!0,p.onComplete(p),p._resolve(p))))}n=r}},So=(s,e,t,n,r)=>{const o=e.animate(n,r),i=r.delay+ +r.duration*r.iterations;o.playbackRate=s._speed,s.paused&&o.pause(),s.duration<i&&(s.duration=i,s.controlAnimation=o),s.animations.push(o),hn(e,t),vt(un,{parent:s,animation:o,$el:e,property:t,_next:null,_prev:null});const l=()=>{hn(e,t,s)};return o.onremove=l,o.onfinish=l,o},ps=(s,e,t,n,r)=>{let o=Ye(e,t,n,r);return Xe(o)?Zl.includes(s)||_e(s,\\\"translate\\\")?`${o}px`:_e(s,\\\"rotate\\\")||_e(s,\\\"skew\\\")?`${o}deg`:`${o}`:o},ko=(s,e,t,n,r,o)=>{let i=\\\"0\\\";const l=I(n)?getComputedStyle(s)[e]:ps(e,n,s,r,o);return I(t)?i=Le(n)?n.map(c=>ps(e,c,s,r,o)):l:i=[ps(e,t,s,r,o),l],i};class xo{constructor(e,t){me.current&&me.current.register(this),os(cn)&&(ot&&(I(CSS)||!Object.hasOwnProperty.call(CSS,\\\"registerProperty\\\"))?cn=!1:(is.forEach(v=>{const _=_e(v,\\\"skew\\\"),S=_e(v,\\\"scale\\\"),y=_e(v,\\\"rotate\\\"),b=_e(v,\\\"translate\\\"),k=y||_,x=k?\\\"<angle>\\\":S?\\\"<number>\\\":b?\\\"<length-percentage>\\\":\\\"*\\\";try{CSS.registerProperty({name:\\\"--\\\"+v,syntax:x,inherits:!1,initialValue:b?\\\"0px\\\":k?\\\"0deg\\\":S?\\\"1\\\":\\\"0\\\"})}catch{}}),cn=!0));const n=cs(e),r=n.length;r||console.warn(\\\"No target found. Make sure the element you're trying to animate is accessible before creating your animation.\\\");const o=D(t.ease,ln(G.defaults.ease)),i=o.ease&&o,l=D(t.autoplay,G.defaults.autoplay),c=l&&l.link?l:!1,p=t.alternate&&t.alternate===!0,f=t.reversed&&t.reversed===!0,g=D(t.loop,G.defaults.loop),u=g===!0||g===1/0?1/0:Xe(g)?g+1:1,h=p?f?\\\"alternate-reverse\\\":\\\"alternate\\\":f?\\\"reverse\\\":\\\"normal\\\",a=\\\"forwards\\\",d=ln(o),m=G.timeScale===1?1:Ne;this.targets=n,this.animations=[],this.controlAnimation=null,this.onComplete=t.onComplete||W,this.duration=0,this.muteCallbacks=!1,this.completed=!1,this.paused=!l||c!==!1,this.reversed=f,this.autoplay=l,this._speed=D(t.playbackRate,G.defaults.playbackRate),this._resolve=W,this._completed=0,this._inlineStyles=n.map(v=>v.getAttribute(\\\"style\\\")),n.forEach((v,_)=>{const S=v[ns],y=jl.some(C=>t.hasOwnProperty(C)),b=(i?i.duration:Ye(D(t.duration,G.defaults.duration),v,_,r))*m,k=Ye(D(t.delay,G.defaults.delay),v,_,r)*m,x=D(t.composition,\\\"replace\\\");for(let C in t){if(!Ft(C))continue;const O={},P={iterations:u,direction:h,fill:a,easing:d,duration:b,delay:k,composite:x},w=t[C],E=y?is.includes(C)?C:Fr.get(C):!1;let L;if(be(w)){const M=w,q=D(M.ease,o),$=q.ease&&q,U=M.to,z=M.from;if(P.duration=($?$.duration:Ye(D(M.duration,b),v,_,r))*m,P.delay=Ye(D(M.delay,k),v,_,r)*m,P.composite=D(M.composition,x),P.easing=ln(q),L=ko(v,C,z,U,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=ko(v,C,z,U,_,r),So(this,v,C,O,P),!I(z))if(!E)v.style[C]=O[C][0];else{const R=`--${E}`;v.style.setProperty(R,O[R][0])}}else L=Le(w)?w.map(M=>ps(C,M,v,_,r)):ps(C,w,v,_,r),E?(O[`--${E}`]=L,S[E]=L):O[C]=L,So(this,v,C,O,P)}if(y){let C=dt;for(let O in S)C+=`${$r[O]}var(--${O})) `;v.style.transform=C}}),c&&this.autoplay.link(this)}forEach(e){const t=ze(e)?n=>n[e]():e;return this.animations.forEach(t),this}get speed(){return this._speed}set speed(e){this._speed=+e,this.forEach(t=>t.playbackRate=e)}get currentTime(){const e=this.controlAnimation,t=G.timeScale;return this.completed?this.duration:e?+e.currentTime*(t===1?1:t):0}set currentTime(e){const t=e*(G.timeScale===1?1:Ne);this.forEach(n=>{t>=this.duration&&n.play(),n.currentTime=t})}get progress(){return this.currentTime/this.duration}set progress(e){this.forEach(t=>t.currentTime=e*this.duration||0)}resume(){return this.paused?(this.paused=!1,this.forEach(\\\"play\\\")):this}pause(){return this.paused?this:(this.paused=!0,this.forEach(\\\"pause\\\"))}alternate(){return this.reversed=!this.reversed,this.forEach(\\\"reverse\\\"),this.paused&&this.forEach(\\\"pause\\\"),this}play(){return this.reversed&&this.alternate(),this.resume()}reverse(){return this.reversed||this.alternate(),this.resume()}seek(e,t=!1){return t&&(this.muteCallbacks=!0),e<this.duration&&(this.completed=!1),this.currentTime=e,this.muteCallbacks=!1,this.paused&&this.pause(),this}restart(){return this.completed=!1,this.seek(0,!0).resume()}commitStyles(){return this.forEach(\\\"commitStyles\\\")}complete(){return this.seek(this.duration)}cancel(){return this.forEach(\\\"cancel\\\"),this.pause()}revert(){return this.cancel(),this.targets.forEach((e,t)=>e.setAttribute(\\\"style\\\",this._inlineStyles[t])),this}then(e=W){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=W};return new Promise(r=>(this._resolve=()=>r(n()),this.completed&&this._resolve(),this))}}const ec={animate:(s,e)=>new xo(s,e),convertEase:or},wo=(s=W)=>new Je({duration:1*G.timeScale,onComplete:s},null,0).resume();function Nt(s,e,t){const n=cs(s);if(!n.length)return;const[r]=n,o=jr(r,e),i=rn(e,r,o);let l=Ot(r,i);if(I(t))return l;if(Ze(l,De),De.t===Z.NUMBER||De.t===Z.UNIT){if(t===!1)return De.n;{const c=on(r,De,t,!1);return`${N(c.n,G.precision)}${c.u}`}}}const Tt=(s,e)=>{if(!I(e))return e.duration=te,e.composition=D(e.composition,ke.none),new _t(s,e,null,0,!0).resume()},To=(s,e,t)=>{let n=!1;return ie(e,r=>{const o=r.target;if(s.includes(o)){const i=r.property,l=r._tweenType,c=rn(t,o,l);(!c||c&&c===i)&&(r.parent._tail===r&&r._tweenType===pe.TRANSFORM&&r._prev&&r._prev._tweenType===pe.TRANSFORM&&(r._prev._renderTransforms=1),mt(e,r),uo(r),n=!0)}},!0),n},bt=(s,e,t)=>{const n=Ke(s),r=e||Se,o=e&&e.controlAnimation&&e;for(let l=0,c=n.length;l<c;l++){const p=n[l];hn(p,t,o)}let i;if(r._hasChildren){let l=0;ie(r,c=>{if(!c._hasChildren)if(i=To(n,c,t),i&&!c._head)c.cancel(),mt(r,c);else{const f=c._offset+c._delay+c.duration;f>l&&(l=f)}c._head?bt(s,c,t):c._hasChildren=!1},!0),I(r.iterationDuration)||(r.iterationDuration=l)}else i=To(n,r,t);return i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel()),n},tc=Yr,sc=s=>s[Xr(0,s.length-1)],rc=(s,e)=>(+s).toFixed(e),nc=(s,e,t)=>`${s}`.padStart(e,t),ic=(s,e,t)=>`${s}`.padEnd(e,t),oc=(s,e,t)=>((s-e)%(t-e)+(t-e))%(t-e)+e,fs=(s,e,t,n,r)=>n+(s-e)/(t-e)*(r-n),ac=s=>s*zt/180,lc=s=>s*180/zt,Co=(s,e,t,n)=>{let r=Ne/G.defaults.frameRate;if(n!==!1){const i=n||Se._hasChildren&&Se;i&&i.deltaTime&&(r=i.deltaTime)}const o=1-Math.exp(-t*r*.1);return t?t===1?e:(1-o)*s+o*e:s},cc=(s,e=0)=>(...t)=>e?n=>s(...t,n):n=>s(n,...t),Po=s=>(...e)=>{const t=s(...e);return new Proxy(W,{apply:(n,r,[o])=>t(o),get:(n,r)=>Po((...o)=>{const i=Eo[r](...o);return l=>i(t(l))})})},nt=(s,e=0)=>(...t)=>(t.length<s.length?Po(cc(s,e)):s)(...t),Eo={$:cs,get:Nt,set:Tt,remove:bt,cleanInlineStyles:sr,random:Xr,randomPick:sc,shuffle:so,lerp:Co,sync:wo,keepTime:tc,clamp:nt(F),round:nt(N),snap:nt(At),wrap:nt(oc),interpolate:nt(gt,1),mapRange:nt(fs),roundPad:nt(rc),padStart:nt(nc),padEnd:nt(ic),degToRad:nt(ac),radToDeg:nt(lc)},uc=(s,e)=>{if(_e(e,\\\"<\\\")){const t=e[1]===\\\"<\\\",n=s._tail,r=n?n._offset+n._delay:0;return t?r:r+n.duration}},ds=(s,e)=>{let t=s.iterationDuration;if(t===te&&(t=0),I(e))return t;if(Xe(+e))return+e;const n=e,r=s?s.labels:null,o=!os(r),i=uc(s,n),l=!I(i),c=Xi.exec(n);if(c){const p=c[0],f=n.split(p),g=o&&f[0]?r[f[0]]:t,u=l?i:o?g:t,h=+f[1];return Mt(u,h,p[0])}else return l?i:o?I(r[n])?t:r[n]:t};function hc(s){return Zs((s.iterationDuration+s._loopDelay)*s.iterationCount-s._loopDelay)||te}function pn(s,e,t,n,r,o){const l=Xe(s.duration)&&s.duration<=te?t-te:t;Rt(e,l,1,1,Ge.AUTO);const c=n?new _t(n,s,e,l,!1,r,o):new Je(s,e,l);return c.init(1),vt(e,c),ie(e,p=>{const g=p._offset+p._delay+p.duration;g>e.iterationDuration&&(e.iterationDuration=g)}),e.duration=hc(e),e}class Lo extends Je{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=G.defaults;this.defaults=t?ls(t,n):n,this.onRender=e.onRender||n.onRender;const r=D(e.playbackEase,n.playbackEase);this._ease=r?It(r):null,this.iterationDuration=0}add(e,t,n){const r=be(t),o=be(e);if(r||o){if(this._hasChildren=!0,r){const i=t;if(fe(n)){const l=n,c=Ke(e),p=this.duration,f=this.iterationDuration,g=i.id;let u=0;const h=c.length;c.forEach(a=>{const d={...i};this.duration=p,this.iterationDuration=f,I(g)||(d.id=g+\\\"-\\\"+u),pn(d,this,ds(this,l(a,u,h,this)),a,u,h),u++})}else pn(i,this,ds(this,n),e)}else pn(e,this,ds(this,t));return this.init(1)}}sync(e,t){if(I(e)||e&&I(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:\\\"linear\\\"},t)}set(e,t,n){return I(t)?this:(t.duration=te,t.composition=ke.replace,this.add(e,t,n))}call(e,t){return I(e)||e&&!fe(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return I(e)||e&&!ze(e)?this:(this.labels[e]=ds(this,t),this)}remove(e,t){return bt(e,this,t),this}stretch(e){const t=this.duration;if(t===Vt(e))return this;const n=e/t,r=this.labels;ie(this,o=>o.stretch(o.duration*n));for(let o in r)r[o]*=n;return super.stretch(e)}refresh(){return ie(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ie(this,e=>e.revert,!0),sr(this)}then(e){return super.then(e)}}const pc=s=>new Lo(s).init();class fn{constructor(e,t){me.current&&me.current.register(this);const n=()=>{this.callbacks.completed&&this.callbacks.reset(),this.callbacks.play()},r=()=>{if(this.callbacks.completed)return;let c=!0;for(let p in this.animations)if(!this.animations[p].paused&&c){c=!1;break}c&&this.callbacks.complete()},o={onBegin:n,onComplete:r,onPause:r},i={v:1,autoplay:!1},l={};if(this.targets=[],this.animations={},this.callbacks=null,!(I(e)||I(t))){for(let c in t){const p=t[c];Ft(c)?l[c]=p:_e(c,\\\"on\\\")?i[c]=p:o[c]=p}this.callbacks=new _t({v:0},i);for(let c in l){const p=l[c],f=be(p);let g={},u=\\\"+=0\\\";if(f){const d=p.unit;ze(d)&&(u+=d)}else g.duration=p;g[c]=f?ls({to:u},p):u;const h=ls(o,g);h.composition=ke.replace,h.autoplay=!1;const a=this.animations[c]=new _t(e,h,null,0,!1).init();this.targets.length||this.targets.push(...a.targets),this[c]=(d,m,v)=>{const _=a._head;if(I(d)&&_){const S=_._numbers;return S&&S.length?S:_._modifier(_._number)}else return ie(a,S=>{if(Le(d))for(let y=0,b=d.length;y<b;y++)I(S._numbers[y])||(S._fromNumbers[y]=S._modifier(S._numbers[y]),S._toNumbers[y]=d[y]);else S._fromNumber=S._modifier(S._number),S._toNumber=d;I(v)||(S._ease=It(v)),S._currentTime=0}),I(m)||a.stretch(m),a.reset(1).resume(),this}}}}revert(){for(let e in this.animations)this[e]=W,this.animations[e].revert();return this.animations={},this.targets.length=0,this.callbacks&&this.callbacks.revert(),this}}const fc=(s,e)=>new fn(s,e),Ct=Ne*10;class Ao{constructor(e={}){this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/Ne,this.maxIterations=this.maxDuration/this.timeStep/Ne,this.m=F(D(e.mass,1),0,Ct),this.s=F(D(e.stiffness,100),1,Ct),this.d=F(D(e.damping,10),.1,Ct),this.v=F(D(e.velocity,0),-1e4,Ct),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.solverDuration=0,this.duration=0,this.compute(),this.ease=t=>t===0||t===1?t:this.solve(t*this.solverDuration)}solve(e){const{zeta:t,w0:n,wd:r,b:o}=this;let i=e;return t<1?i=eo(-i*t*n)*(1*Ur(r*i)+o*Vr(r*i)):i=(1+o*i)*eo(-i*n),1-i}compute(){const{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:o,d:i,s:l,v:c}=this,p=this.w0=F(xt(l/o),te,Ne),f=this.zeta=i/(2*xt(l*o)),g=this.wd=f<1?p*xt(1-f*f):0;this.b=f<1?(f*p+-c)/g:-c+p;let u=0,h=0,a=0;for(;h<e&&a<t;)at(1-this.solve(u))<n?h++:h=0,this.solverDuration=u,u+=r,a++;this.duration=N(this.solverDuration*Ne,0)*G.timeScale}get mass(){return this.m}set mass(e){this.m=F(D(e,1),0,Ct),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=F(D(e,100),1,Ct),this.compute()}get damping(){return this.d}set damping(e){this.d=F(D(e,10),.1,Ct),this.compute()}get velocity(){return this.v}set velocity(e){this.v=F(D(e,0),-1e4,Ct),this.compute()}}const dn=s=>new Ao(s),Pt=s=>{s.cancelable&&s.preventDefault()};class dc{constructor(e){this.el=e,this.zIndex=0,this.parentElement=null,this.classList={add:W,remove:W}}get x(){return this.el.x||0}set x(e){this.el.x=e}get y(){return this.el.y||0}set y(e){this.el.y=e}get width(){return this.el.width||0}set width(e){this.el.width=e}get height(){return this.el.height||0}set height(e){this.el.height=e}getBoundingClientRect(){return{top:this.y,right:this.x,bottom:this.y+this.height,left:this.x+this.width}}}class gc{constructor(e){this.$el=e,this.inlineTransforms=[],this.point=new DOMPoint,this.inversedMatrix=this.getMatrix().inverse()}normalizePoint(e,t){return this.point.x=e,this.point.y=t,this.point.matrixTransform(this.inversedMatrix)}traverseUp(e){let t=this.$el.parentElement,n=0;for(;t&&t!==H;)e(t,n),t=t.parentElement,n++}getMatrix(){const e=new DOMMatrix;return this.traverseUp(t=>{const n=getComputedStyle(t).transform;if(n){const r=new DOMMatrix(n);e.preMultiplySelf(r)}}),e}remove(){this.traverseUp((e,t)=>{this.inlineTransforms[t]=e.style.transform,e.style.transform=\\\"none\\\"})}revert(){this.traverseUp((e,t)=>{const n=this.inlineTransforms[t];n===\\\"\\\"?e.style.removeProperty(\\\"transform\\\"):e.style.transform=n})}}const Ve=(s,e)=>s&&fe(s)?s(e):s;let ar=0;class Ro{constructor(e,t={}){if(!e)return;me.current&&me.current.register(this);const n=t.x,r=t.y,o=t.trigger,i=t.modifier,l=t.releaseEase,c=l&&It(l),p=!I(l)&&!I(l.ease),f=be(n)&&!I(n.mapTo)?n.mapTo:\\\"translateX\\\",g=be(r)&&!I(r.mapTo)?r.mapTo:\\\"translateY\\\",u=Ve(t.container,this);this.containerArray=Le(u)?u:null,this.$container=u&&!this.containerArray?Ke(u)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.$target=be(e)?new dc(e):Ke(e)[0],this.$trigger=Ke(o||e)[0],this.fixed=Nt(this.$target,\\\"position\\\")===\\\"fixed\\\",this.isFinePointer=!0,this.containerPadding=[0,0,0,0],this.containerFriction=0,this.releaseContainerFriction=0,this.snapX=0,this.snapY=0,this.scrollSpeed=0,this.scrollThreshold=0,this.dragSpeed=0,this.maxVelocity=0,this.minVelocity=0,this.velocityMultiplier=0,this.cursor=!1,this.releaseXSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseYSpring=p?l:dn({mass:D(t.releaseMass,1),stiffness:D(t.releaseStiffness,80),damping:D(t.releaseDamping,20)}),this.releaseEase=c||Gt.outQuint,this.hasReleaseSpring=p,this.onGrab=t.onGrab||W,this.onDrag=t.onDrag||W,this.onRelease=t.onRelease||W,this.onUpdate=t.onUpdate||W,this.onSettle=t.onSettle||W,this.onSnap=t.onSnap||W,this.onResize=t.onResize||W,this.onAfterResize=t.onAfterResize||W,this.disabled=[0,0];const h={};if(i&&(h.modifier=i),I(n)||n===!0)h[f]=0;else if(be(n)){const a=n,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[f]=d}else n===!1&&(h[f]=0,this.disabled[0]=1);if(I(r)||r===!0)h[g]=0;else if(be(r)){const a=r,d={};a.modifier&&(d.modifier=a.modifier),a.composition&&(d.composition=a.composition),h[g]=d}else r===!1&&(h[g]=0,this.disabled[1]=1);this.animate=new fn(this.$target,h),this.xProp=f,this.yProp=g,this.destX=0,this.destY=0,this.deltaX=0,this.deltaY=0,this.scroll={x:0,y:0},this.coords=[this.x,this.y,0,0],this.snapped=[0,0],this.pointer=[0,0,0,0,0,0,0,0],this.scrollView=[0,0],this.dragArea=[0,0,0,0],this.containerBounds=[-1e12,Ht,Ht,-1e12],this.scrollBounds=[0,0,0,0],this.targetBounds=[0,0,0,0],this.window=[0,0],this.velocityStack=[0,0,0],this.velocityStackIndex=0,this.velocityTime=kt(),this.velocity=0,this.angle=0,this.cursorStyles=null,this.triggerStyles=null,this.bodyStyles=null,this.targetStyles=null,this.touchActionStyles=null,this.transforms=new gc(this.$target),this.overshootCoords={x:0,y:0},this.overshootTicker=new Je({autoplay:!1,onUpdate:()=>{this.updated=!0,this.manual=!0,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,1),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,1)},onComplete:()=>{this.manual=!1,this.disabled[0]||this.animate[this.xProp](this.overshootCoords.x,0),this.disabled[1]||this.animate[this.yProp](this.overshootCoords.y,0)}},null,0).init(),this.updateTicker=new Je({autoplay:!1,onUpdate:()=>this.update()},null,0).init(),this.contained=!I(u),this.manual=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.enabled=!1,this.initialized=!1,this.activeProp=this.disabled[1]?f:g,this.animate.callbacks.onRender=()=>{const a=this.updated,m=!(this.grabbed&&a)&&this.released,v=this.x,_=this.y,S=v-this.coords[2],y=_-this.coords[3];this.deltaX=S,this.deltaY=y,this.coords[2]=v,this.coords[3]=_,a&&(S||y)&&this.onUpdate(this),m?(this.computeVelocity(S,y),this.angle=Ks(y,S)):this.updated=!1},this.animate.callbacks.onComplete=()=>{!this.grabbed&&this.released&&(this.released=!1),this.manual||(this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.onSettle(this))},this.resizeTicker=new Je({autoplay:!1,duration:150*G.timeScale,onComplete:()=>{this.onResize(this),this.refresh(),this.onAfterResize(this)}}).init(),this.parameters=t,this.resizeObserver=new ResizeObserver(()=>{this.initialized?this.resizeTicker.restart():this.initialized=!0}),this.enable(),this.refresh(),this.resizeObserver.observe(this.$container),be(e)||this.resizeObserver.observe(this.$target)}computeVelocity(e,t){const n=this.velocityTime,r=kt(),o=r-n;if(o<17)return this.velocity;this.velocityTime=r;const i=this.velocityStack,l=this.velocityMultiplier,c=this.minVelocity,p=this.maxVelocity,f=this.velocityStackIndex;i[f]=N(F(xt(e*e+t*t)/o*l,c,p),5);const g=Wr(i[0],i[1],i[2]);return this.velocity=g,this.velocityStackIndex=(f+1)%3,g}setX(e,t=!1){if(this.disabled[0])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destX=n,this.snapped[0]=At(n,this.snapX),this.animate[this.xProp](n,0),this.manual=!1,this}setY(e,t=!1){if(this.disabled[1])return;const n=N(e,5);return this.overshootTicker.pause(),this.manual=!0,this.updated=!t,this.destY=n,this.snapped[1]=At(n,this.snapY),this.animate[this.yProp](n,0),this.manual=!1,this}get x(){return N(this.animate[this.xProp](),G.precision)}set x(e){this.setX(e,!1)}get y(){return N(this.animate[this.yProp](),G.precision)}set y(e){this.setY(e,!1)}get progressX(){return fs(this.x,this.containerBounds[3],this.containerBounds[1],0,1)}set progressX(e){this.setX(fs(e,0,1,this.containerBounds[3],this.containerBounds[1]),!1)}get progressY(){return fs(this.y,this.containerBounds[0],this.containerBounds[2],0,1)}set progressY(e){this.setY(fs(e,0,1,this.containerBounds[0],this.containerBounds[2]),!1)}updateScrollCoords(){const e=N(this.useWin?Ie.scrollX:this.$container.scrollLeft,0),t=N(this.useWin?Ie.scrollY:this.$container.scrollTop,0),[n,r,o,i]=this.containerPadding,l=this.scrollThreshold;this.scroll.x=e,this.scroll.y=t,this.scrollBounds[0]=t-this.targetBounds[0]+n-l,this.scrollBounds[1]=e-this.targetBounds[1]-r+l,this.scrollBounds[2]=t-this.targetBounds[2]-o+l,this.scrollBounds[3]=e-this.targetBounds[3]+i-l}updateBoundingValues(){const e=this.$container;if(!e)return;const t=this.x,n=this.y,r=this.coords[2],o=this.coords[3];this.coords[2]=0,this.coords[3]=0,this.setX(0,!0),this.setY(0,!0),this.transforms.remove();const i=this.window[0]=Ie.innerWidth,l=this.window[1]=Ie.innerHeight,c=this.useWin,p=e.scrollWidth,f=e.scrollHeight,g=this.fixed,u=e.getBoundingClientRect(),[h,a,d,m]=this.containerPadding;this.dragArea[0]=c?0:u.left,this.dragArea[1]=c?0:u.top,this.scrollView[0]=c?F(p,i,p):p,this.scrollView[1]=c?F(f,l,f):f,this.updateScrollCoords();const{width:v,height:_,left:S,top:y,right:b,bottom:k}=e.getBoundingClientRect();this.dragArea[2]=N(c?F(v,i,i):v,0),this.dragArea[3]=N(c?F(_,l,l):_,0);const x=Nt(e,\\\"overflow\\\"),C=x===\\\"visible\\\",O=x===\\\"hidden\\\";if(this.canScroll=g?!1:this.contained&&(e===H.body&&C||!O&&!C)&&(p>this.dragArea[2]+m-a||f>this.dragArea[3]+h-d)&&(!this.containerArray||this.containerArray&&!Le(this.containerArray)),this.contained){const P=this.scroll.x,w=this.scroll.y,E=this.canScroll,L=this.$target.getBoundingClientRect(),M=E?c?0:e.scrollLeft:0,q=E?c?0:e.scrollTop:0,$=E?this.scrollView[0]-M-v:0,U=E?this.scrollView[1]-q-_:0;this.targetBounds[0]=N(L.top+w-(c?0:y),0),this.targetBounds[1]=N(L.right+P-(c?i:b),0),this.targetBounds[2]=N(L.bottom+w-(c?l:k),0),this.targetBounds[3]=N(L.left+P-(c?0:S),0),this.containerArray?(this.containerBounds[0]=this.containerArray[0]+h,this.containerBounds[1]=this.containerArray[1]-a,this.containerBounds[2]=this.containerArray[2]-d,this.containerBounds[3]=this.containerArray[3]+m):(this.containerBounds[0]=-N(L.top-(g?F(y,0,l):y)+q-h,0),this.containerBounds[1]=-N(L.right-(g?F(b,0,i):b)-$+a,0),this.containerBounds[2]=-N(L.bottom-(g?F(k,0,l):k)-U+d,0),this.containerBounds[3]=-N(L.left-(g?F(S,0,i):S)+M-m,0))}this.transforms.revert(),this.coords[2]=r,this.coords[3]=o,this.setX(t,!0),this.setY(n,!0)}isOutOfBounds(e,t,n){if(!this.contained)return 0;const[r,o,i,l]=e,[c,p]=this.disabled,f=!c&&t<l||!c&&t>o,g=!p&&n<r||!p&&n>i;return f&&!g?1:!f&&g?2:f&&g?3:0}refresh(){const e=this.parameters,t=e.x,n=e.y,r=Ve(e.container,this),o=Ve(e.containerPadding,this)||0,i=Le(o)?o:[o,o,o,o],l=this.x,c=this.y,p=Ve(e.cursor,this),f={onHover:\\\"grab\\\",onGrab:\\\"grabbing\\\"};if(p){const{onHover:d,onGrab:m}=p;d&&(f.onHover=d),m&&(f.onGrab=m)}this.containerArray=Le(r)?r:null,this.$container=r&&!this.containerArray?Ke(r)[0]:H.body,this.useWin=this.$container===H.body,this.$scrollContainer=this.useWin?Ie:this.$container,this.isFinePointer=matchMedia(\\\"(pointer:fine)\\\").matches,this.containerPadding=D(i,[0,0,0,0]),this.containerFriction=F(D(Ve(e.containerFriction,this),.8),0,1),this.releaseContainerFriction=F(D(Ve(e.releaseContainerFriction,this),this.containerFriction),0,1),this.snapX=Ve(be(t)&&!I(t.snap)?t.snap:e.snap,this),this.snapY=Ve(be(n)&&!I(n.snap)?n.snap:e.snap,this),this.scrollSpeed=D(Ve(e.scrollSpeed,this),1.5),this.scrollThreshold=D(Ve(e.scrollThreshold,this),20),this.dragSpeed=D(Ve(e.dragSpeed,this),1),this.minVelocity=D(Ve(e.minVelocity,this),0),this.maxVelocity=D(Ve(e.maxVelocity,this),50),this.velocityMultiplier=D(Ve(e.velocityMultiplier,this),1),this.cursor=p===!1?!1:f,this.updateBoundingValues();const[g,u,h,a]=this.containerBounds;this.setX(F(l,a,u),!0),this.setY(F(c,g,h),!0)}update(){if(this.updateScrollCoords(),this.canScroll){const[_,S,y,b]=this.containerPadding,[k,x]=this.scrollView,C=this.dragArea[2],O=this.dragArea[3],P=this.scroll.x,w=this.scroll.y,E=this.$container.scrollWidth,L=this.$container.scrollHeight,M=this.useWin?F(E,this.window[0],E):E,q=this.useWin?F(L,this.window[1],L):L,$=k-M,U=x-q;this.dragged&&$>0&&(this.coords[0]-=$,this.scrollView[0]=M),this.dragged&&U>0&&(this.coords[1]-=U,this.scrollView[1]=q);const z=this.scrollSpeed*10,R=this.scrollThreshold,[ae,se]=this.coords,[xe,ve,V,ee]=this.scrollBounds,re=N(F((se-xe+_)/R,-1,0)*z,0),ue=N(F((ae-ve-S)/R,0,1)*z,0),ct=N(F((se-V-y)/R,0,1)*z,0),Ae=N(F((ae-ee+b)/R,-1,0)*z,0);if(re||ct||Ae||ue){const[we,he]=this.disabled;let j=P,J=w;we||(j=N(F(P+(Ae||ue),0,k-C),0),this.coords[0]-=P-j),he||(J=N(F(w+(re||ct),0,x-O),0),this.coords[1]-=w-J),this.useWin?this.$scrollContainer.scrollBy(-(P-j),-(w-J)):this.$scrollContainer.scrollTo(j,J)}}const[e,t,n,r]=this.containerBounds,[o,i,l,c,p,f]=this.pointer;this.coords[0]+=(o-p)*this.dragSpeed,this.coords[1]+=(i-f)*this.dragSpeed,this.pointer[4]=o,this.pointer[5]=i;const[g,u]=this.coords,[h,a]=this.snapped,d=(1-this.containerFriction)*this.dragSpeed;this.setX(g>t?t+(g-t)*d:g<r?r+(g-r)*d:g,!1),this.setY(u>n?n+(u-n)*d:u<e?e+(u-e)*d:u,!1),this.computeVelocity(o-p,i-f),this.angle=Ks(i-c,o-l);const[m,v]=this.snapped;(m!==h&&this.snapX||v!==a&&this.snapY)&&this.onSnap(this)}stop(){this.updateTicker.pause(),this.overshootTicker.pause();for(let e in this.animate.animations)this.animate.animations[e].pause();return bt(this,null,\\\"x\\\"),bt(this,null,\\\"y\\\"),bt(this,null,\\\"progressX\\\"),bt(this,null,\\\"progressY\\\"),bt(this.scroll),bt(this.overshootCoords),this}scrollInView(e,t=0,n=Gt.inOutQuad){this.updateScrollCoords();const r=this.destX,o=this.destY,i=this.scroll,l=this.scrollBounds,c=this.canScroll;if(!this.containerArray&&this.isOutOfBounds(l,r,o)){const[p,f,g,u]=l,h=N(F(o-p,-1e12,0),0),a=N(F(r-f,0,Ht),0),d=N(F(o-g,0,Ht),0),m=N(F(r-u,-1e12,0),0);new _t(i,{x:N(i.x+(m?m-t:a?a+t:0),0),y:N(i.y+(h?h-t:d?d+t:0),0),duration:I(e)?350*G.timeScale:e,ease:n,onUpdate:()=>{this.canScroll=!1,this.$scrollContainer.scrollTo(i.x,i.y)}}).init().then(()=>{this.canScroll=c})}return this}handleHover(){this.isFinePointer&&this.cursor&&!this.cursorStyles&&(this.cursorStyles=Tt(this.$trigger,{cursor:this.cursor.onHover}))}animateInView(e,t=0,n=Gt.inOutQuad){this.stop(),this.updateBoundingValues();const r=this.x,o=this.y,[i,l,c,p]=this.containerPadding,f=this.scroll.y-this.targetBounds[0]+i+t,g=this.scroll.x-this.targetBounds[1]-l-t,u=this.scroll.y-this.targetBounds[2]-c-t,h=this.scroll.x-this.targetBounds[3]+p+t,a=this.isOutOfBounds([f,g,u,h],r,o);if(a){const[d,m]=this.disabled,v=F(At(r,this.snapX),h,g),_=F(At(o,this.snapY),f,u),S=I(e)?350*G.timeScale:e;!d&&(a===1||a===3)&&this.animate[this.xProp](v,S,n),!m&&(a===2||a===3)&&this.animate[this.yProp](_,S,n)}return this}handleDown(e){const t=e.target;if(this.grabbed||t.type===\\\"range\\\")return;e.stopPropagation(),this.grabbed=!0,this.released=!1,this.stop(),this.updateBoundingValues();const n=e.changedTouches,r=n?n[0].clientX:e.clientX,o=n?n[0].clientY:e.clientY,{x:i,y:l}=this.transforms.normalizePoint(r,o),[c,p,f,g]=this.containerBounds,u=(1-this.containerFriction)*this.dragSpeed,h=this.x,a=this.y;this.coords[0]=this.coords[2]=u?h>p?p+(h-p)/u:h<g?g+(h-g)/u:h:h,this.coords[1]=this.coords[3]=u?a>f?f+(a-f)/u:a<c?c+(a-c)/u:a:a,this.pointer[0]=i,this.pointer[1]=l,this.pointer[2]=i,this.pointer[3]=l,this.pointer[4]=i,this.pointer[5]=l,this.pointer[6]=i,this.pointer[7]=l,this.deltaX=0,this.deltaY=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null);const d=Nt(this.$target,\\\"zIndex\\\",!1);ar=(d>ar?d:ar)+1,this.targetStyles=Tt(this.$target,{zIndex:ar}),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.isFinePointer&&this.cursor&&(this.bodyStyles=Tt(H.body,{cursor:this.cursor.onGrab})),this.scrollInView(100,0,Gt.out(3)),this.onGrab(this),H.addEventListener(\\\"touchmove\\\",this),H.addEventListener(\\\"touchend\\\",this),H.addEventListener(\\\"touchcancel\\\",this),H.addEventListener(\\\"mousemove\\\",this),H.addEventListener(\\\"mouseup\\\",this),H.addEventListener(\\\"selectstart\\\",this)}handleMove(e){if(!this.grabbed)return;const t=e.changedTouches,n=t?t[0].clientX:e.clientX,r=t?t[0].clientY:e.clientY,{x:o,y:i}=this.transforms.normalizePoint(n,r),l=o-this.pointer[6],c=i-this.pointer[7];let p=e.target,f=!1,g=!1,u=!1;for(;t&&p&&p!==this.$trigger;){const h=Nt(p,\\\"overflow-y\\\");if(h!==\\\"hidden\\\"&&h!==\\\"visible\\\"){const{scrollTop:a,scrollHeight:d,clientHeight:m}=p;if(d>m){u=!0,f=a<=3,g=a>=d-m-3;break}}p=p.parentNode}u&&(!f&&!g||f&&c<0||g&&c>0)?(this.pointer[0]=o,this.pointer[1]=i,this.pointer[2]=o,this.pointer[3]=i,this.pointer[4]=o,this.pointer[5]=i,this.pointer[6]=o,this.pointer[7]=i):(Pt(e),this.triggerStyles||(this.triggerStyles=Tt(this.$trigger,{pointerEvents:\\\"none\\\"})),this.$trigger.addEventListener(\\\"touchstart\\\",Pt,{passive:!1}),this.$trigger.addEventListener(\\\"touchmove\\\",Pt,{passive:!1}),this.$trigger.addEventListener(\\\"touchend\\\",Pt),(!this.disabled[0]&&at(l)>3||!this.disabled[1]&&at(c)>3)&&(this.updateTicker.resume(),this.pointer[2]=this.pointer[0],this.pointer[3]=this.pointer[1],this.pointer[0]=o,this.pointer[1]=i,this.dragged=!0,this.released=!1,this.onDrag(this)))}handleUp(){if(!this.grabbed)return;this.updateTicker.pause(),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null);const[e,t]=this.disabled,[n,r,o,i,l,c]=this.pointer,[p,f,g,u]=this.containerBounds,[h,a]=this.snapped,d=this.releaseXSpring,m=this.releaseYSpring,v=this.releaseEase,_=this.hasReleaseSpring,S=this.overshootCoords,y=this.x,b=this.y,k=this.computeVelocity(n-l,r-c),x=this.angle=Ks(r-i,n-o),C=k*150,O=(1-this.releaseContainerFriction)*this.dragSpeed,P=y+Ur(x)*C,w=b+Vr(x)*C,E=P>f?f+(P-f)*O:P<u?u+(P-u)*O:P,L=w>g?g+(w-g)*O:w<p?p+(w-p)*O:w,M=this.destX=F(N(At(E,this.snapX),5),u,f),q=this.destY=F(N(At(L,this.snapY),5),p,g),$=this.isOutOfBounds(this.containerBounds,P,w);let U=0,z=0,R=v,ae=v,se=0;if(S.x=y,S.y=b,!e){const ve=M===f?y>f?-1:1:y<u?-1:1,V=N(y-M,0);d.velocity=t&&_?V?C*ve/at(V):0:k;const{ease:ee,duration:re,restDuration:ue}=d;U=y===M?0:_?re:re-ue*G.timeScale,_&&(R=ee),U>se&&(se=U)}if(!t){const ve=q===g?b>g?-1:1:b<p?-1:1,V=N(b-q,0);m.velocity=e&&_?V?C*ve/at(V):0:k;const{ease:ee,duration:re,restDuration:ue}=m;z=b===q?0:_?re:re-ue*G.timeScale,_&&(ae=ee),z>se&&(se=z)}if(!_&&$&&O&&(U||z)){const ve=ke.blend;new _t(S,{x:{to:E,duration:U*.65},y:{to:L,duration:z*.65},ease:v,composition:ve}).init(),new _t(S,{x:{to:M,duration:U},y:{to:q,duration:z},ease:v,composition:ve}).init(),this.overshootTicker.stretch(Wr(U,z)).restart()}else e||this.animate[this.xProp](M,U,R),t||this.animate[this.yProp](q,z,ae);this.scrollInView(se,this.scrollThreshold,v);let xe=!1;M!==h&&(this.snapped[0]=M,this.snapX&&(xe=!0)),q!==a&&this.snapY&&(this.snapped[1]=q,this.snapY&&(xe=!0)),xe&&this.onSnap(this),this.grabbed=!1,this.dragged=!1,this.updated=!0,this.released=!0,this.onRelease(this),this.$trigger.removeEventListener(\\\"touchstart\\\",Pt),this.$trigger.removeEventListener(\\\"touchmove\\\",Pt),this.$trigger.removeEventListener(\\\"touchend\\\",Pt),H.removeEventListener(\\\"touchmove\\\",this),H.removeEventListener(\\\"touchend\\\",this),H.removeEventListener(\\\"touchcancel\\\",this),H.removeEventListener(\\\"mousemove\\\",this),H.removeEventListener(\\\"mouseup\\\",this),H.removeEventListener(\\\"selectstart\\\",this)}reset(){return this.stop(),this.resizeTicker.pause(),this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.setX(0,!0),this.setY(0,!0),this.coords[0]=0,this.coords[1]=0,this.pointer[0]=0,this.pointer[1]=0,this.pointer[2]=0,this.pointer[3]=0,this.pointer[4]=0,this.pointer[5]=0,this.pointer[6]=0,this.pointer[7]=0,this.velocity=0,this.velocityStack[0]=0,this.velocityStack[1]=0,this.velocityStack[2]=0,this.velocityStackIndex=0,this.angle=0,this}enable(){return this.enabled||(this.enabled=!0,this.$target.classList.remove(\\\"is-disabled\\\"),this.touchActionStyles=Tt(this.$trigger,{touchAction:this.disabled[0]?\\\"pan-x\\\":this.disabled[1]?\\\"pan-y\\\":\\\"none\\\"}),this.$trigger.addEventListener(\\\"touchstart\\\",this,{passive:!0}),this.$trigger.addEventListener(\\\"mousedown\\\",this,{passive:!0}),this.$trigger.addEventListener(\\\"mouseenter\\\",this)),this}disable(){return this.enabled=!1,this.grabbed=!1,this.dragged=!1,this.updated=!1,this.released=!1,this.canScroll=!1,this.touchActionStyles.revert(),this.cursorStyles&&(this.cursorStyles.revert(),this.cursorStyles=null),this.triggerStyles&&(this.triggerStyles.revert(),this.triggerStyles=null),this.bodyStyles&&(this.bodyStyles.revert(),this.bodyStyles=null),this.targetStyles&&(this.targetStyles.revert(),this.targetStyles=null),this.$target.classList.add(\\\"is-disabled\\\"),this.$trigger.removeEventListener(\\\"touchstart\\\",this),this.$trigger.removeEventListener(\\\"mousedown\\\",this),this.$trigger.removeEventListener(\\\"mouseenter\\\",this),H.removeEventListener(\\\"touchmove\\\",this),H.removeEventListener(\\\"touchend\\\",this),H.removeEventListener(\\\"touchcancel\\\",this),H.removeEventListener(\\\"mousemove\\\",this),H.removeEventListener(\\\"mouseup\\\",this),H.removeEventListener(\\\"selectstart\\\",this),this}revert(){return this.reset(),this.disable(),this.$target.classList.remove(\\\"is-disabled\\\"),this.updateTicker.revert(),this.overshootTicker.revert(),this.resizeTicker.revert(),this.animate.revert(),this.resizeObserver.disconnect(),this}handleEvent(e){switch(e.type){case\\\"mousedown\\\":this.handleDown(e);break;case\\\"touchstart\\\":this.handleDown(e);break;case\\\"mousemove\\\":this.handleMove(e);break;case\\\"touchmove\\\":this.handleMove(e);break;case\\\"mouseup\\\":this.handleUp();break;case\\\"touchend\\\":this.handleUp();break;case\\\"touchcancel\\\":this.handleUp();break;case\\\"mouseenter\\\":this.handleHover();break;case\\\"selectstart\\\":Pt(e);break}}}const mc=(s,e)=>new Ro(s,e);class Oo{constructor(e={}){me.current&&me.current.register(this);const t=e.root;let n=H;t&&(n=t.current||t.nativeElement||Ke(t)[0]||H);const r=e.defaults,o=G.defaults,i=e.mediaQueries;if(this.defaults=r?ls(r,o):o,this.root=n,this.constructors=[],this.revertConstructors=[],this.revertibles=[],this.constructorsOnce=[],this.revertConstructorsOnce=[],this.revertiblesOnce=[],this.once=!1,this.onceIndex=0,this.methods={},this.matches={},this.mediaQueryLists={},this.data={},i)for(let l in i){const c=Ie.matchMedia(i[l]);this.mediaQueryLists[l]=c,c.addEventListener(\\\"change\\\",this)}}register(e){(this.once?this.revertiblesOnce:this.revertibles).push(e)}execute(e){let t=me.current,n=me.root,r=G.defaults;me.current=this,me.root=this.root,G.defaults=this.defaults;const o=this.mediaQueryLists;for(let l in o)this.matches[l]=o[l].matches;const i=e(this);return me.current=t,me.root=n,G.defaults=r,i}refresh(){return this.onceIndex=0,this.execute(()=>{let e=this.revertibles.length,t=this.revertConstructors.length;for(;e--;)this.revertibles[e].revert();for(;t--;)this.revertConstructors[t](this);this.revertibles.length=0,this.revertConstructors.length=0,this.constructors.forEach(n=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}),this}add(e,t){if(this.once=!1,fe(e)){const n=e;this.constructors.push(n),this.execute(()=>{const r=n(this);fe(r)&&this.revertConstructors.push(r)})}else this.methods[e]=(...n)=>this.execute(()=>t(...n));return this}addOnce(e){if(this.once=!0,fe(e)){const t=this.onceIndex++;if(this.constructorsOnce[t])return this;const r=e;this.constructorsOnce[t]=r,this.execute(()=>{const o=r(this);fe(o)&&this.revertConstructorsOnce.push(o)})}return this}keepTime(e){this.once=!0;const t=this.onceIndex++,n=this.constructorsOnce[t];if(fe(n))return n(this);const r=Yr(e);this.constructorsOnce[t]=r;let o;return this.execute(()=>{o=r(this)}),o}handleEvent(e){switch(e.type){case\\\"change\\\":this.refresh();break}}revert(){const e=this.revertibles,t=this.revertConstructors,n=this.revertiblesOnce,r=this.revertConstructorsOnce,o=this.mediaQueryLists;let i=e.length,l=t.length,c=n.length,p=r.length;for(;i--;)e[i].revert();for(;l--;)t[l](this);for(;c--;)n[c].revert();for(;p--;)r[p](this);for(let f in o)o[f].removeEventListener(\\\"change\\\",this);e.length=0,t.length=0,this.constructors.length=0,n.length=0,r.length=0,this.constructorsOnce.length=0,this.onceIndex=0,this.matches={},this.methods={},this.mediaQueryLists={},this.data={}}}const vc=s=>new Oo(s),yc=()=>{const s=H.createElement(\\\"div\\\");H.body.appendChild(s),s.style.height=\\\"100lvh\\\";const e=s.offsetHeight;return H.body.removeChild(s),e},lr=(s,e)=>s&&fe(s)?s(e):s,cr=new Map;class _c{constructor(e){this.element=e,this.useWin=this.element===H.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Je({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const t=this.backwardX||this.backwardY;ie(this,n=>n.handleScroll(),t)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Je({autoplay:!1,frameRate:30,onUpdate:t=>{const n=t.deltaTime,r=this.prevScrollX,o=this.prevScrollY,i=this.scrollX,l=this.scrollY,c=r-i,p=o-l;this.prevScrollX=i,this.prevScrollY=l,c&&(this.backwardX=r>i),p&&(this.backwardY=o>l),this.velocity=N(n>0?Math.sqrt(c*c+p*p)/n:0,5)}}).init(),this.resizeTicker=new Je({autoplay:!1,duration:250*G.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Je({autoplay:!1,duration:500*G.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?Ie:this.element).addEventListener(\\\"scroll\\\",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=N(e?Ie.scrollX:t.scrollLeft,0),this.scrollY=N(e?Ie.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Ie.innerWidth,this.winHeight=yc()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds();let n,r;if(this.useWin)n=this.winWidth,r=this.winHeight;else{const o=t.getBoundingClientRect();n=t.clientWidth,r=t.clientHeight,this.top=o.top,this.left=o.left}this.width=n,this.height=r}refreshScrollObservers(){ie(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ie(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){switch(e.type){case\\\"scroll\\\":this.handleScroll();break}}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.disconnect(),(this.useWin?Ie:this.element).removeEventListener(\\\"scroll\\\",this),cr.delete(this.element)}}const bc=s=>{const e=s&&Ke(s)[0]||H.body;let t=cr.get(e);return t||(t=new _c(e),cr.set(e,t)),t},gs=(s,e,t,n,r)=>{const o=e===\\\"min\\\",i=e===\\\"max\\\",l=e===\\\"top\\\"||e===\\\"left\\\"||e===\\\"start\\\"||o?0:e===\\\"bottom\\\"||e===\\\"right\\\"||e===\\\"end\\\"||i?\\\"100%\\\":e===\\\"center\\\"?\\\"50%\\\":e,{n:c,u:p}=Ze(l,De);let f=c;return p===\\\"%\\\"?f=c/100*t:p&&(f=on(s,De,\\\"px\\\",!0).n),i&&n<0&&(f+=n),o&&r>0&&(f+=r),f},ur=(s,e,t,n,r)=>{let o;if(ze(e)){const i=Xi.exec(e);if(i){const l=i[0],c=l[0],p=e.split(l),f=p[0]===\\\"min\\\",g=p[0]===\\\"max\\\",u=gs(s,p[0],t,n,r),h=gs(s,p[1],t,n,r);if(f){const a=Mt(gs(s,\\\"min\\\",t),h,c);o=a<u?u:a}else if(g){const a=Mt(gs(s,\\\"max\\\",t),h,c);o=a>u?u:a}else o=Mt(u,h,c)}else o=gs(s,e,t,n,r)}else o=e;return N(o,0)},Mo=s=>{let e;const t=s.targets;for(let n=0,r=t.length;n<r;n++){const o=t[n];if(o[Qs]){e=o;break}}return e};let Sc=0;const Io=[\\\"#FF4B4B\\\",\\\"#FF971B\\\",\\\"#FFC730\\\",\\\"#F9F640\\\",\\\"#7AFF5A\\\",\\\"#18FF74\\\",\\\"#17E09B\\\",\\\"#3CFFEC\\\",\\\"#05DBE9\\\",\\\"#33B3F1\\\",\\\"#638CF9\\\",\\\"#C563FE\\\",\\\"#FF4FCF\\\",\\\"#F93F8A\\\"];class No{constructor(e={}){me.current&&me.current.register(this);const t=D(e.sync,\\\"play pause\\\"),n=t?It(t):null,r=t&&(t===\\\"linear\\\"||t===yt),o=t&&!(n===yt&&!r),i=t&&(Xe(t)||t===!0||r),l=t&&ze(t)&&!o&&!i,c=l?t.split(\\\" \\\").map(f=>()=>{const g=this.linked;return g&&g[f]?g[f]():null}):null,p=l&&c.length>2;this.index=Sc++,this.id=I(e.id)?this.index:e.id,this.container=bc(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=o||i||!!c,this.syncEase=o?n:null,this.syncSmooth=i?t===!0||r?1:t:null,this.onSyncEnter=c&&!p&&c[0]?c[0]:W,this.onSyncLeave=c&&!p&&c[1]?c[1]:W,this.onSyncEnterForward=c&&p&&c[0]?c[0]:W,this.onSyncLeaveForward=c&&p&&c[1]?c[1]:W,this.onSyncEnterBackward=c&&p&&c[2]?c[2]:W,this.onSyncLeaveBackward=c&&p&&c[3]?c[3]:W,this.onEnter=e.onEnter||W,this.onLeave=e.onLeave||W,this.onEnterForward=e.onEnterForward||W,this.onLeaveForward=e.onLeaveForward||W,this.onEnterBackward=e.onEnterBackward||W,this.onLeaveBackward=e.onLeaveBackward||W,this.onUpdate=e.onUpdate||W,this.onSyncComplete=e.onSyncComplete||W,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=[\\\"start\\\",\\\"end\\\",\\\"end\\\",\\\"start\\\"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=D(e.debug,!1),this._next=null,this._prev=null,vt(this.container,this),wo(()=>{if(!this.reverted){if(!this.target){const f=Ke(e.target)[0];this.target=f||H.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;I(e.targets)?ie(e,n=>{n.targets&&!t&&(t=Mo(n))}):t=Mo(e),this.target=t||H.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:N(F(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=D(lr(e.repeat,this),!0),this.horizontal=D(lr(e.axis,this),\\\"y\\\")===\\\"x\\\",this.enter=D(lr(e.enter,this),\\\"end start\\\"),this.leave=D(lr(e.leave,this),\\\"start end\\\"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,n=e.element.querySelector(\\\":scope > .animejs-onscroll-debug\\\"),r=H.createElement(\\\"div\\\"),o=H.createElement(\\\"div\\\"),i=H.createElement(\\\"div\\\"),l=Io[this.index%Io.length],c=e.useWin,p=c?e.winWidth:e.width,f=c?e.winHeight:e.height,g=e.scrollWidth,u=e.scrollHeight,h=this.container.width>360?320:260,a=t?0:10,d=t?10:0,m=t?24:h/2,v=t?m:15,_=t?60:m,S=t?_:v,y=t?\\\"repeat-x\\\":\\\"repeat-y\\\",b=P=>t?\\\"0px \\\"+P+\\\"px\\\":P+\\\"px 2px\\\",k=P=>`linear-gradient(${t?90:0}deg, ${P} 2px, transparent 1px)`,x=(P,w,E,L,M)=>`position:${P};left:${w}px;top:${E}px;width:${L}px;height:${M}px;`;r.style.cssText=`${x(\\\"absolute\\\",a,d,t?g:h,t?h:u)}\\n pointer-events: none;\\n z-index: ${this.container.zIndex++};\\n display: flex;\\n flex-direction: ${t?\\\"column\\\":\\\"row\\\"};\\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\\n `,o.style.cssText=`${x(\\\"sticky\\\",0,0,t?p:m,t?m:f)}`,n||(o.style.cssText+=`background:\\n ${k(\\\"#FFFF\\\")}${b(m-10)} / 100px 100px ${y},\\n ${k(\\\"#FFF8\\\")}${b(m-10)} / 10px 10px ${y};\\n `),i.style.cssText=`${x(\\\"relative\\\",0,0,t?g:m,t?m:u)}`,n||(i.style.cssText+=`background:\\n ${k(\\\"#FFFF\\\")}${b(0)} / ${t?\\\"100px 10px\\\":\\\"10px 100px\\\"} ${y},\\n ${k(\\\"#FFF8\\\")}${b(0)} / ${t?\\\"10px 0px\\\":\\\"0px 10px\\\"} ${y};\\n `);const C=[\\\" enter: \\\",\\\" leave: \\\"];this.coords.forEach((P,w)=>{const E=w>1,L=(E?0:this.offset)+P,M=w%2,q=L<S,$=L>(E?t?p:f:t?g:u)-S,U=(E?M&&!q:!M&&!q)||$,z=H.createElement(\\\"div\\\"),R=H.createElement(\\\"div\\\"),ae=t?U?\\\"right\\\":\\\"left\\\":U?\\\"bottom\\\":\\\"top\\\",se=U?(t?_:v)+(E?t?-1:$?0:-2:t?-1:-2):t?1:0;R.innerHTML=`${this.id}${C[M]}${this.thresholds[w]}`,z.style.cssText=`${x(\\\"absolute\\\",0,0,_,v)}\\n display: flex;\\n flex-direction: ${t?\\\"column\\\":\\\"row\\\"};\\n justify-content: flex-${E?\\\"start\\\":\\\"end\\\"};\\n align-items: flex-${U?\\\"end\\\":\\\"start\\\"};\\n border-${ae}: 2px solid ${l};\\n `,R.style.cssText=`\\n overflow: hidden;\\n max-width: ${h/2-10}px;\\n height: ${v};\\n margin-${t?U?\\\"right\\\":\\\"left\\\":U?\\\"bottom\\\":\\\"top\\\"}: -2px;\\n padding: 1px;\\n font-family: ui-monospace, monospace;\\n font-size: 10px;\\n letter-spacing: -.025em;\\n line-height: 9px;\\n font-weight: 600;\\n text-align: ${t&&U||!t&&!E?\\\"right\\\":\\\"left\\\"};\\n white-space: pre;\\n text-overflow: ellipsis;\\n color: ${M?l:\\\"rgba(0,0,0,.75)\\\"};\\n background-color: ${M?\\\"rgba(0,0,0,.65)\\\":l};\\n border: 2px solid ${M?l:\\\"transparent\\\"};\\n border-${t?U?\\\"top-left\\\":\\\"top-right\\\":U?\\\"top-left\\\":\\\"bottom-left\\\"}-radius: 5px;\\n border-${t?U?\\\"bottom-left\\\":\\\"bottom-right\\\":U?\\\"top-right\\\":\\\"bottom-right\\\"}-radius: 5px;\\n `,z.appendChild(R);let xe=L-se+(t?1:0);z.style[t?\\\"left\\\":\\\"top\\\"]=`${xe}px`,(E?o:i).appendChild(z)}),r.appendChild(o),r.appendChild(i),e.element.appendChild(r),n||r.classList.add(\\\"animejs-onscroll-debug\\\"),this.$debug=r,Nt(e.element,\\\"position\\\")===\\\"static\\\"&&(this.debugStyles=Tt(e.element,{position:\\\"relative \\\"}))}updateBounds(){this._debug&&this.removeDebug();let e;const t=this.target,n=this.container,r=this.horizontal,o=this.linked;let i,l=t;for(o&&(i=o.currentTime,o.seek(0,!0)),l.parentElement;l&&l!==n.element&&l!==H.body;){const L=Nt(l,\\\"position\\\")===\\\"sticky\\\"?Tt(l,{position:\\\"static\\\"}):!1;l=l.parentElement,L&&(e||(e=[]),e.push(L))}const c=t.getBoundingClientRect(),p=r?c.left+n.scrollX-n.left:c.top+n.scrollY-n.top,f=r?c.width:c.height,g=r?n.width:n.height,h=(r?n.scrollWidth:n.scrollHeight)-g,a=this.enter,d=this.leave;let m=\\\"start\\\",v=\\\"end\\\",_=\\\"end\\\",S=\\\"start\\\";if(ze(a)){const L=a.split(\\\" \\\");_=L[0],m=L.length>1?L[1]:m}else if(be(a)){const L=a;I(L.container)||(_=L.container),I(L.target)||(m=L.target)}else Xe(a)&&(_=a);if(ze(d)){const L=d.split(\\\" \\\");S=L[0],v=L.length>1?L[1]:v}else if(be(d)){const L=d;I(L.container)||(S=L.container),I(L.target)||(v=L.target)}else Xe(d)&&(S=d);const y=ur(t,m,f),b=ur(t,v,f),k=y+p-g,x=b+p-h,C=ur(t,_,g,k,x),O=ur(t,S,g,k,x),P=y+p-C,w=b+p-O,E=w-P;this.offset=p,this.offsetStart=P,this.offsetEnd=w,this.distance=E<=0?0:E,this.thresholds=[m,v,_,S],this.coords=[y,b,C,O],e&&e.forEach(L=>L.revert()),o&&o.seek(i,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,o=e&&(n||r),i=this.horizontal,l=this.container,c=this.scroll,p=c<=this.offsetStart,f=c>=this.offsetEnd,g=!p&&!f,u=c===this.offsetStart||c===this.offsetEnd,h=!this.hasEntered&&u,a=this._debug&&this.$debug;let d=!1,m=!1,v=this.progress;if(p&&this.began&&(this.began=!1),v>0&&!this.began&&(this.began=!0),o){const _=e.progress;if(r&&Xe(r)){if(r<1){const y=_<v&&v===1?1e-4:_>v&&!v?-1e-4:0;v=N(Co(_,v,gt(.01,.2,r),!1)+y,6)}}else n&&(v=n(v));d=v!==this.prevProgress,m=_===1,d&&!m&&r&&_&&l.wakeTicker.restart()}if(a){const _=i?l.scrollY:l.scrollX;a.style[i?\\\"top\\\":\\\"left\\\"]=_+10+\\\"px\\\"}(g&&!this.isInView||h&&!this.forceEnter&&!this.hasEntered)&&(g&&(this.isInView=!0),!this.forceEnter||!this.hasEntered?(a&&g&&(a.style.zIndex=`${this.container.zIndex++}`),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,h&&(this.forceEnter=!0)):g&&(this.forceEnter=!1)),(g||!g&&this.isInView)&&(d=!0),d&&(o&&e.seek(e.duration*v),this.onUpdate(this)),!g&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(m=!0)),v>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),v<1&&this.completed&&(this.completed=!1),this.prevProgress=v}revert(){if(this.reverted)return;const e=this.container;return mt(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const kc=(s={})=>new No(s),hr=typeof Intl<\\\"u\\\"&&Intl.Segmenter,xc=/\\\\{value\\\\}/g,wc=/\\\\{i\\\\}/g,Tc=/(\\\\s+)/,Cc=/^\\\\s+$/,gn=\\\"line\\\",ms=\\\"word\\\",vs=\\\"char\\\",ys=\\\"data-line\\\";let mn=null,vn=null,pr=null;const Bo=s=>s.isWordLike||s.segment===\\\" \\\"||Xe(+s.segment),yn=s=>s.setAttribute(\\\"aria-hidden\\\",\\\"true\\\"),fr=(s,e)=>[...s.querySelectorAll(`[data-${e}]:not([data-${e}] [data-${e}])`)],Pc={line:\\\"#00D672\\\",word:\\\"#FF4B4B\\\",char:\\\"#5A87FF\\\"},Do=s=>{if(!s.childElementCount&&!s.textContent.trim()){const e=s.parentElement;s.remove(),e&&Do(e)}},qo=(s,e,t)=>{const n=s.getAttribute(ys);(n!==null&&+n!==e||s.tagName===\\\"BR\\\")&&t.add(s);let r=s.childElementCount;for(;r--;)qo(s.children[r],e,t);return t},_n=(s,e={})=>{let t=\\\"\\\";const n=ze(e.class)?` class=\\\"${e.class}\\\"`:\\\"\\\",r=D(e.clone,!1),o=D(e.wrap,!1),i=o?o===!0?\\\"clip\\\":o:r?\\\"clip\\\":!1;if(o&&(t+=`<span${i?` style=\\\"overflow:${i};\\\"`:\\\"\\\"}>`),t+=`<span${n}${r?' style=\\\"position:relative;\\\"':\\\"\\\"} data-${s}=\\\"{i}\\\">`,r){const l=r===\\\"left\\\"?\\\"-100%\\\":r===\\\"right\\\"?\\\"100%\\\":\\\"0\\\",c=r===\\\"top\\\"?\\\"-100%\\\":r===\\\"bottom\\\"?\\\"100%\\\":\\\"0\\\";t+=\\\"<span>{value}</span>\\\",t+=`<span inert style=\\\"position:absolute;top:${c};left:${l};white-space:nowrap;\\\">{value}</span>`}else t+=\\\"{value}\\\";return t+=\\\"</span>\\\",o&&(t+=\\\"</span>\\\"),t},bn=(s,e,t,n,r,o,i,l,c)=>{const p=r===gn,f=r===vs,g=`_${r}_`,u=fe(s)?s(t):s,h=p?\\\"block\\\":\\\"inline-block\\\";pr.innerHTML=u.replace(xc,`<i class=\\\"${g}\\\"></i>`).replace(wc,`${f?c:p?i:l}`);const a=pr.content,d=a.firstElementChild,m=a.querySelector(`[data-${r}]`)||d,v=a.querySelectorAll(`i.${g}`),_=v.length;if(_){d.style.display=h,m.style.display=h,m.setAttribute(ys,`${i}`),p||(m.setAttribute(\\\"data-word\\\",`${l}`),f&&m.setAttribute(\\\"data-char\\\",`${c}`));let S=_;for(;S--;){const y=v[S],b=y.parentElement;b.style.display=h,p?b.innerHTML=t.innerHTML:b.replaceChild(t.cloneNode(!0),y)}e.push(m),n.appendChild(a)}else console.warn('The expression \\\"{value}\\\" is missing from the provided template.');return o&&(d.style.outline=`1px dotted ${Pc[r]}`),d};class Ho{constructor(e,t={}){mn||(mn=hr?new hr([],{granularity:ms}):{segment:a=>{const d=[],m=a.split(Tc);for(let v=0,_=m.length;v<_;v++){const S=m[v];d.push({segment:S,isWordLike:!Cc.test(S)})}return d}}),vn||(vn=hr?new hr([],{granularity:\\\"grapheme\\\"}):{segment:a=>[...a].map(d=>({segment:d}))}),!pr&&ot&&(pr=H.createElement(\\\"template\\\")),me.current&&me.current.register(this);const{words:n,chars:r,lines:o,accessible:i,includeSpaces:l,debug:c}=t,p=(e=Le(e)?e[0]:e)&&e.nodeType?e:(Jr(e)||[])[0],f=o===!0?{}:o,g=n===!0||I(n)?{}:n,u=r===!0?{}:r;this.debug=D(c,!1),this.includeSpaces=D(l,!1),this.accessible=D(i,!0),this.linesOnly=f&&!g&&!u,this.lineTemplate=be(f)?_n(gn,f):f,this.wordTemplate=be(g)||this.linesOnly?_n(ms,g):g,this.charTemplate=be(u)?_n(vs,u):u,this.$target=p,this.html=p&&p.innerHTML,this.lines=[],this.words=[],this.chars=[],this.effects=[],this.effectsCleanups=[],this.cache=null,this.ready=!1,this.width=0,this.resizeTimeout=null;const h=()=>this.html&&(f||g||u)&&this.split();this.resizeObserver=new ResizeObserver(()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{const a=p.offsetWidth;a!==this.width&&(this.width=a,h())},150)}),this.lineTemplate&&!this.ready?H.fonts.ready.then(h):h(),p?this.resizeObserver.observe(p):console.warn(\\\"No Text Splitter target found.\\\")}addEffect(e){if(!fe(e))return console.warn(\\\"Effect must return a function.\\\");const t=Yr(e);return this.effects.push(t),this.ready&&(this.effectsCleanups[this.effects.length-1]=t(this)),this}revert(){return clearTimeout(this.resizeTimeout),this.lines.length=this.words.length=this.chars.length=0,this.resizeObserver.disconnect(),this.effectsCleanups.forEach(e=>fe(e)?e(this):e.revert&&e.revert()),this.$target.innerHTML=this.html,this}splitNode(e){const t=this.wordTemplate,n=this.charTemplate,r=this.includeSpaces,o=this.debug,i=e.nodeType;if(i===3){const l=e.nodeValue;if(l.trim()){const c=[],p=this.words,f=this.chars,g=mn.segment(l),u=H.createDocumentFragment();let h=null;for(const a of g){const d=a.segment,m=Bo(a);if(!h||m&&h&&Bo(h))c.push(d);else{const v=c.length-1;!c[v].includes(\\\" \\\")&&!d.includes(\\\" \\\")?c[v]+=d:c.push(d)}h=a}for(let a=0,d=c.length;a<d;a++){const m=c[a];if(m.trim()){const v=c[a+1],_=r&&v&&!v.trim(),S=m,y=n?vn.segment(S):null,b=n?H.createDocumentFragment():H.createTextNode(_?m+\\\" \\\":m);if(n){const k=[...y];for(let x=0,C=k.length;x<C;x++){const O=k[x],w=x===C-1&&_?O.segment+\\\" \\\":O.segment,E=H.createTextNode(w);bn(n,f,E,b,vs,o,-1,p.length,f.length)}}t?bn(t,p,b,u,ms,o,-1,p.length,f.length):n?u.appendChild(b):u.appendChild(H.createTextNode(m)),_&&a++}else{if(a&&r)continue;u.appendChild(H.createTextNode(m))}}e.parentNode.replaceChild(u,e)}}else if(i===1){const l=[...e.childNodes];for(let c=0,p=l.length;c<p;c++)this.splitNode(l[c])}}split(e=!1){const t=this.$target,n=!!this.cache&&!e,r=this.lineTemplate,o=this.wordTemplate,i=this.charTemplate,l=H.fonts.status!==\\\"loading\\\",c=r&&l;this.ready=!r||l,(c||e)&&this.effectsCleanups.forEach(u=>fe(u)&&u(this)),n||(e&&(t.innerHTML=this.html,this.words.length=this.chars.length=0),this.splitNode(t),this.cache=t.innerHTML),c&&(n&&(t.innerHTML=this.cache),this.lines.length=0,o&&(this.words=fr(t,ms))),i&&(c||o)&&(this.chars=fr(t,vs));const p=this.words.length?this.words:this.chars;let f,g=0;for(let u=0,h=p.length;u<h;u++){const a=p[u],{top:d,height:m}=a.getBoundingClientRect();f&&d-f>m*.5&&g++,a.setAttribute(ys,`${g}`);const v=a.querySelectorAll(`[${ys}]`);let _=v.length;for(;_--;)v[_].setAttribute(ys,`${g}`);f=d}if(c){const u=H.createDocumentFragment(),h=new Set,a=[];for(let d=0;d<g+1;d++){const m=t.cloneNode(!0);qo(m,d,new Set).forEach(v=>{const _=v.parentElement;_&&h.add(_),v.remove()}),a.push(m)}h.forEach(Do);for(let d=0,m=a.length;d<m;d++)bn(r,this.lines,a[d],u,gn,this.debug,d);t.innerHTML=\\\"\\\",t.appendChild(u),o&&(this.words=fr(t,ms)),i&&(this.chars=fr(t,vs))}if(this.linesOnly){const u=this.words;let h=u.length;for(;h--;){const a=u[h];a.replaceWith(a.textContent)}u.length=0}if(this.accessible&&(c||!n)){const u=H.createElement(\\\"span\\\");u.style.cssText=\\\"position:absolute;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;\\\",u.innerHTML=this.html,t.insertBefore(u,t.firstChild),this.lines.forEach(yn),this.words.forEach(yn),this.chars.forEach(yn)}return this.width=t.offsetWidth,(c||e)&&this.effects.forEach((u,h)=>this.effectsCleanups[h]=u(this)),this}refresh(){this.split(!0)}}const dr={split:(s,e)=>new Ho(s,e)},gr=(s,e={})=>{let t=[],n=0;const r=e.from,o=e.reversed,i=e.ease,l=!I(i),p=l&&!I(i.ease)?i.ease:l?It(i):null,f=e.grid,g=e.axis,u=e.total,h=I(r)||r===0||r===\\\"first\\\",a=r===\\\"center\\\",d=r===\\\"last\\\",m=r===\\\"random\\\",v=Le(s),_=e.use,S=Lt(v?s[0]:s),y=v?Lt(s[1]):0,b=Gi.exec((v?s[1]:s)+dt),k=e.start||0+(v?S:0);let x=h?0:Xe(r)?r:0;return(C,O,P,w)=>{const[E]=cs(C),L=I(u)?P:u,M=I(_)?!1:fe(_)?_(E,O,L):Ot(E,_),q=Xe(M)||ze(M)&&Xe(+M)?+M:O;if(a&&(x=(L-1)/2),d&&(x=L-1),!t.length){for(let R=0;R<L;R++){if(!f)t.push(at(x-R));else{const ae=a?(f[0]-1)/2:x%f[0],se=a?(f[1]-1)/2:as(x/f[0]),xe=R%f[0],ve=as(R/f[0]),V=ae-xe,ee=se-ve;let re=xt(V*V+ee*ee);g===\\\"x\\\"&&(re=-V),g===\\\"y\\\"&&(re=-ee),t.push(re)}n=Wr(...t)}p&&(t=t.map(R=>p(R/n)*n)),o&&(t=t.map(R=>g?R<0?R*-1:-R:at(n-R))),m&&(t=so(t))}const $=v?(y-S)/n:S;let z=(w?ds(w,I(e.start)?w.iterationDuration:k):k)+($*N(t[q],2)||0);return e.modifier&&(z=e.modifier(z)),b&&(z=`${z}${b[2]}`),z}},Ec=Object.freeze(Object.defineProperty({__proto__:null,Animatable:fn,Draggable:Ro,JSAnimation:_t,Scope:Oo,ScrollObserver:No,Spring:Ao,TextSplitter:Ho,Timeline:Lo,Timer:Je,WAAPIAnimation:xo,animate:hs,createAnimatable:fc,createDraggable:mc,createScope:vc,createSpring:dn,createTimeline:pc,createTimer:zl,eases:Gt,engine:Se,onScroll:kc,scrollContainers:cr,stagger:gr,svg:Nl,text:dr,utils:Eo,waapi:ec},Symbol.toStringTag,{value:\\\"Module\\\"}));class Lc{constructor(){this.animations={},this.linkAnimations=new Map,this.registerAnimation(\\\"typewriter\\\",function(e,t,n,r){const{chars:o}=dr.split(e,{words:!1,chars:!0}),i=t.fadeDuration||100,l=t.interval||100;hs(o,{opacity:[0,1],easing:\\\"linear\\\",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation(\\\"toast\\\",function(e,t,n,r){const{words:o}=dr.split(e,{words:!0,chars:!1}),i=t.fadeDuration||100,l=t.interval||200;hs(o,{opacity:[0,1],y:[{to:[\\\"100%\\\",\\\"0%\\\"]}],easing:\\\"linear\\\",duration:i,delay:gr(l,{start:t.start||0}),loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation(\\\"fadeIn\\\",function(e,t,n,r){const o=t.duration||500;hs(e,{opacity:[0,1],easing:t.easing||\\\"easeOutQuad\\\",duration:o,delay:t.start||0,loop:r,onComplete:n})},{initiallyHidden:!0}),this.registerAnimation(\\\"continue\\\",function(e,t,n){e.classList.add(\\\"squiffy-continue\\\");const r=t.style||\\\"pulse\\\";let o=null,i=null;r===\\\"wave\\\"?(e.classList.add(\\\"squiffy-continue-wave\\\"),i=dr.split(e,{words:!1,chars:!0}).chars,o=hs(i,{opacity:[1,.3,1],easing:\\\"easeInOutSine\\\",duration:1200,delay:gr(80),loop:!0})):e.classList.add(`squiffy-continue-${r}`);const l=()=>{if(e.classList.remove(\\\"squiffy-continue\\\",\\\"squiffy-continue-wave\\\",`squiffy-continue-${r}`),e.removeEventListener(\\\"click\\\",l),o&&(o.pause(),i))for(const c of i)c.style.opacity=\\\"1\\\";n()};e.addEventListener(\\\"click\\\",l)})}registerAnimation(e,t,n={}){this.animations[e]={handler:t,options:n}}isInitiallyHidden(e){return this.animations[e]?.options.initiallyHidden??!1}runAnimation(e,t,n,r,o){const i=this.animations[e];i?i.handler(t,n,r,o):(console.warn(`No animation registered with name: ${e}`),r())}addLinkAnimation(e,t){this.linkAnimations.set(e,t)}runLinkAnimation(e){const t=this.linkAnimations.get(e);t&&t()}}const Ac={animejs:Ec},Fo=\\\"input:not([disabled]), textarea:not([disabled]), select:not([disabled])\\\",Rc=\\\"a.squiffy-link[data-section], a.squiffy-link[data-passage]\\\";function $o(s){if(!s)return!0;const e=s.querySelectorAll(Fo);for(const t of e)if(!t.checkValidity())return!1;return!0}function Sn(s){if(!s)return;const e=$o(s),t=s.querySelectorAll(Rc);for(const n of t)e?(n.classList.remove(\\\"validation-disabled\\\"),n.removeAttribute(\\\"aria-disabled\\\")):(n.classList.add(\\\"validation-disabled\\\"),n.setAttribute(\\\"aria-disabled\\\",\\\"true\\\"))}function mr(s){if(!s)return;const e=s.querySelectorAll(Fo);for(const t of e)t.addEventListener(\\\"input\\\",()=>Sn(s)),t.addEventListener(\\\"change\\\",()=>Sn(s)),t.addEventListener(\\\"invalid\\\",n=>{n.preventDefault(),t.classList.add(\\\"squiffy-invalid\\\")}),t.addEventListener(\\\"input\\\",()=>{t.checkValidity()&&t.classList.remove(\\\"squiffy-invalid\\\")});Sn(s)}const Oc=async s=>{let e,t,n,r,o,i=0;const l=new rl,c=[];let p=!1;async function f(T){if(p||T.closest(\\\".squiffy-output-section\\\")!==n||T.classList.contains(\\\"disabled\\\")||!$o(n))return!1;const B=T.getAttribute(\\\"data-passage\\\"),Q=T.getAttribute(\\\"data-section\\\");if(B!==null)return u(T),J(\\\"_turncount\\\",j(\\\"_turncount\\\")+1),await d(T),B&&(o=null,await b(B)),l.emit(\\\"linkClick\\\",{linkType:\\\"passage\\\"}),!0;if(Q!==null)return await d(T),Q&&await v(Q),l.emit(\\\"linkClick\\\",{linkType:\\\"section\\\"}),!0;const[X,ye,Pe]=Ue.handleLink(T);return X?(Pe?.disableLink&&u(T),C(),l.emit(\\\"linkClick\\\",{linkType:ye}),!0):!1}async function g(T){const A=T.target;A.classList.contains(\\\"squiffy-link\\\")&&await f(A)}function u(T){T.classList.add(\\\"disabled\\\"),T.setAttribute(\\\"tabindex\\\",\\\"-1\\\")}function h(T){T.classList.remove(\\\"disabled\\\"),T.removeAttribute(\\\"tabindex\\\")}async function a(){O()||await v(e.start)}async function d(T){qe.runLinkAnimation(T),await y();const A=T.getAttribute(\\\"data-set\\\");if(A){const B=JSON.parse(A);for(const Q of B)m(Q)}}function m(T){T=T.replace(/^(\\\\w*\\\\s*):=(.*)$/,(Q,X,ye)=>X+\\\"=\\\"+$.processText(ye,!0));const B=/^([\\\\w]*)\\\\s*=\\\\s*(.*)$/.exec(T);if(B){const Q=B[1];let X=B[2];X===\\\"true\\\"?J(Q,!0):X===\\\"false\\\"?J(Q,!1):isNaN(X)?(X.startsWith(\\\"@\\\")&&(X=j(X.substring(1))),J(Q,X)):J(Q,parseFloat(X))}else{const X=/^([\\\\w]*)\\\\s*([+\\\\-*/])=\\\\s*(.*)$/.exec(T);if(X){const ye=X[1],Pe=X[2];let Ee=X[3];Ee.startsWith(\\\"@\\\")&&(Ee=j(Ee.substring(1)));const je=parseFloat(Ee);let de=j(ye);de===null&&(de=0),Pe==\\\"+\\\"&&(de+=je),Pe==\\\"-\\\"&&(de-=je),Pe==\\\"*\\\"&&(de*=je),Pe==\\\"/\\\"&&(de/=je),J(ye,de)}else{let ye=!0;T.startsWith(\\\"not \\\")&&(T=T.substring(4),ye=!1),J(T,ye)}}}async function v(T){const A=se();if(t=e.sections[T],!t)return;J(\\\"_section\\\",T),he.setSeen(T);const B=e.sections[\\\"\\\"];(B?.clear||t.clear)&&M(),w(T);const Q=n;if(B&&(await S(B,\\\"[[]]\\\"),j(\\\"_section\\\")!==T)){Q.remove();return}if(await S(t,`[[${T}]]`),j(\\\"_section\\\")!==T){Q.remove();return}mr(n),J(\\\"_turncount\\\",0),Ae(),C();const X=se();X!=A&&l.emit(\\\"canGoBackChanged\\\",{canGoBack:X})}function _(T,A=null){const B={get:j,set:J,ui:{transition:St,write:$.write,scrollToEnd:$.scrollToEnd},story:{go:v},element:ve,import:Ac,...A};e.js[T](B,j,J)}async function S(T,A){if(T.attributes&&await k(T.attributes),T.jsIndex!==void 0){const B=j(\\\"_section\\\");if(_(T.jsIndex),j(\\\"_section\\\")!==B)return}$.write(T.text||\\\"\\\",A),await y()}async function y(){p=!0,n.classList.add(\\\"links-disabled\\\");for(const T of c)await T();c.length=0,p=!1,n.classList.remove(\\\"links-disabled\\\")}async function b(T){const A=se();let B=t.passages&&t.passages[T];const Q=e.sections[\\\"\\\"];if(!B&&Q&&Q.passages&&(B=Q.passages[T]),!B)throw`No passage named ${T} in the current section or master section`;he.setSeen(T);const X=[],ye=[];if(Q&&Q.passages){const de=Q.passages[\\\"\\\"];de&&(X.push(de),ye.push(()=>S(de,\\\"[[]][]\\\")))}const Pe=t.passages&&t.passages[\\\"\\\"];Pe&&(X.push(Pe),ye.push(()=>S(Pe,`[[${j(\\\"_section\\\")}]][]`))),X.push(B),ye.push(()=>S(B,`[[${j(\\\"_section\\\")}]][${T}]`));const Ee=\\\"@\\\"+j(\\\"_turncount\\\");if(t.passages){if(Ee in t.passages){const de=t.passages[Ee];X.push(de),ye.push(()=>S(de,`[[${j(\\\"_section\\\")}]][${Ee}]`))}if(\\\"@last\\\"in t.passages&&j(\\\"_turncount\\\")>=(t.passageCount||0)){const de=t.passages[\\\"@last\\\"];X.push(de),ye.push(()=>S(de,`[[${j(\\\"_section\\\")}]][${Ee}]`))}}X.some(de=>de.clear)&&(M(),E()),r=document.createElement(\\\"div\\\"),r.classList.add(\\\"squiffy-output-passage\\\"),r.setAttribute(\\\"data-passage\\\",`${T}`),n.appendChild(r);for(const de of ye)await de();mr(n),Ae(),C();const je=se();je!=A&&l.emit(\\\"canGoBackChanged\\\",{canGoBack:je})}async function k(T){for(const A of T)m(A)}function x(){he.reset(),ee.scroll===\\\"element\\\"||ee.scroll===\\\"none\\\"?(V.innerHTML=\\\"\\\",a()):location.reload()}function C(){J(\\\"_output\\\",V.innerHTML)}function O(){const T=()=>{e.uiJsIndex!==void 0&&_(e.uiJsIndex,{registerAnimation:qe.registerAnimation.bind(qe)})};he.load();const A=j(\\\"_output\\\");return A?(V.innerHTML=A,z(),R(),o=V.querySelector(\\\".squiffy-output-block:last-child\\\"),t=e.sections[j(\\\"_section\\\")],T(),ge.onLoad(),mr(n),!0):(T(),!1)}function P(){o=document.createElement(\\\"div\\\"),o.classList.add(\\\"squiffy-output-block\\\"),(r||n)?.appendChild(o)}function w(T){n&&(n.querySelectorAll(\\\"input\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&J(B,A.value),A.disabled=!0}),n.querySelectorAll(\\\"[contenteditable]\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&J(B,A.innerHTML),A.contentEditable=\\\"false\\\"}),n.querySelectorAll(\\\"textarea\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&J(B,A.value),A.disabled=!0}),n.querySelectorAll(\\\"select\\\").forEach(A=>{const B=A.getAttribute(\\\"data-attribute\\\")||A.id;B&&J(B,A.value),A.disabled=!0})),r=null,E(T),P()}function E(T){n=document.createElement(\\\"div\\\"),n.classList.add(\\\"squiffy-output-section\\\"),n.setAttribute(\\\"data-section\\\",T??j(\\\"_section\\\")),T||n.setAttribute(\\\"data-clear\\\",\\\"true\\\"),V.appendChild(n)}function L(){return V.querySelector(\\\".squiffy-clear-stack\\\")}function M(){let T=L();T||(T=document.createElement(\\\"div\\\"),T.classList.add(\\\"squiffy-clear-stack\\\"),T.style.display=\\\"none\\\",V.prepend(T));const A=document.createElement(\\\"div\\\");T.appendChild(A);for(const B of[...V.children])B!==T&&A.appendChild(B)}function q(){const T=L();for(const B of[...V.children])B!==T&&B.remove();const A=T.children[T.children.length-1];for(const B of[...A.children])V.appendChild(B);A.remove()}const $={write:(T,A)=>{i=V.scrollHeight;const B=$.processText(T,!1).trim();o||P();const Q=document.createElement(\\\"div\\\");A&&Q.setAttribute(\\\"data-source\\\",A),Q.innerHTML=B,ge.onWrite(Q),o.appendChild(Q),mr(n),$.scrollToEnd()},clearScreen:()=>{M(),E()},scrollToEnd:()=>{if(ee.scroll!==\\\"none\\\")if(ee.scroll===\\\"element\\\")V.lastElementChild.scrollIntoView({block:\\\"end\\\",inline:\\\"nearest\\\",behavior:\\\"smooth\\\"});else{let T=i;const A=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(T>A){const B=document.documentElement.scrollHeight-window.innerHeight;T>B&&(T=B),window.scrollTo({top:T,behavior:\\\"smooth\\\"})}}},processText:(T,A)=>Te.process(T,A)};function U(T){if(T.start!=e.start){e=T,he.reset(),V.innerHTML=\\\"\\\",v(e.start);return}il(e,T,V,$,u,A=>k(A)),e=T,z(),R()}function z(){const T=V.querySelectorAll(\\\".squiffy-output-section:last-child\\\");n=T[T.length-1];const A=n.getAttribute(\\\"data-section\\\");t=e.sections[A]}function R(){r=n.querySelector(\\\".squiffy-output-passage:last-child\\\")}function ae(){const T=L(),A=V.querySelectorAll(\\\".squiffy-output-section\\\").length+V.querySelectorAll(\\\".squiffy-output-passage\\\").length;return T?A+T.children.length:A}function se(){return ae()>1}function xe(){if(!se())return;const T=L();if(r){const A=r.getAttribute(\\\"data-passage\\\");we(r.getAttribute(\\\"data-undo\\\")),r.remove();let B=!1,Q=!1;for(const X of V.children)if(X!==T){if(X.getAttribute(\\\"data-clear\\\")==\\\"true\\\"&&X.children.length==0){B=!0;continue}Q=!0;break}B&&!Q&&(q(),z());for(const X of n.querySelectorAll(\\\"a.squiffy-link[data-passage]\\\"))X.getAttribute(\\\"data-passage\\\")==A&&h(X);R()}else{we(n.getAttribute(\\\"data-undo\\\")),n.remove();let A=!1;for(const B of[...V.children])if(B!==T){A=!0;break}A||q(),z(),R()}se()||l.emit(\\\"canGoBackChanged\\\",{canGoBack:!1})}const ve=s.element,V=document.createElement(\\\"div\\\");ve.appendChild(V),e=s.story;const ee={scroll:s.scroll||\\\"body\\\",persist:s.persist===void 0?!0:s.persist,onSet:s.onSet||(()=>{})};let re=\\\"\\\";ee.persist&&(s.storyId!==void 0?re=s.storyId:window.location.protocol===\\\"file:\\\"?re=e.id||\\\"\\\":re=window.location.pathname,re||(console.warn(\\\"Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled.\\\"),ee.persist=!1)),ee.scroll===\\\"element\\\"&&(V.style.overflowY=\\\"auto\\\"),V.addEventListener(\\\"click\\\",g),V.addEventListener(\\\"keypress\\\",async function(T){T.key===\\\"Enter\\\"&&await g(T)});let ue={};const ct=function(T,A){T!=\\\"_output\\\"&&(T in ue||(ue[T]=A))},Ae=function(){(r??n).setAttribute(\\\"data-undo\\\",JSON.stringify(ue)),ue={}},we=function(T){if(!T)return;const A=JSON.parse(T);if(A)for(const B of Object.keys(A))he.setInternal(B,A[B],!1)},he=new nl(ee.persist,re,ee.onSet,l,ct),j=he.get.bind(he),J=he.set.bind(he),Te=new sl(e,he,()=>t),Ue=new pl,Ce=T=>T in e.sections&&e.sections[T].text||null,Re=T=>t.passages&&T in t.passages?t.passages[T].text||null:\\\"passages\\\"in e.sections[\\\"\\\"]&&e.sections[\\\"\\\"].passages&&T in e.sections[\\\"\\\"].passages&&e.sections[\\\"\\\"].passages[T].text||null,St=T=>{c.push(T)},qe=new Lc,ge=new ol(V,Te,he,Ue,Ce,Re,$.processText,St,qe,l);return ge.add(rs.ReplaceLabel()),ge.add(rs.RotateSequencePlugin()),ge.add(rs.RandomPlugin()),ge.add(rs.LivePlugin()),ge.add(rs.AnimatePlugin()),{begin:a,restart:x,get:j,set:J,clickLink:f,update:U,goBack:xe,on:(T,A)=>l.on(T,A),off:(T,A)=>l.off(T,A),once:(T,A)=>l.once(T,A)}};return ut.init=Oc,Object.defineProperty(ut,Symbol.toStringTag,{value:\\\"Module\\\"}),ut})({});\\n//# sourceMappingURL=squiffy.runtime.global.js.map\\n\"","export default \"/* Core Squiffy Runtime Styles */\\n\\n/* Link styles */\\na.squiffy-link\\n{\\n text-decoration: underline;\\n text-decoration-color: Blue;\\n color: Blue;\\n cursor: pointer;\\n transition: color 0.4s ease-in-out, text-decoration-color 0.4s ease-in-out;\\n}\\n\\n/* Rotate/sequence links - visually distinct as they update in-place rather than advancing the story */\\na.squiffy-link[data-handler=\\\"rotate\\\"],\\na.squiffy-link[data-handler=\\\"sequence\\\"] {\\n text-decoration-style: dotted;\\n}\\n\\n/* Disabled link states */\\na.squiffy-link.disabled,\\ndiv.squiffy-output-section:not(:last-child) a.squiffy-link,\\ndiv.squiffy-output-section.links-disabled a.squiffy-link\\n{\\n text-decoration: inherit;\\n text-decoration-color: transparent;\\n color: inherit !important;\\n cursor: inherit;\\n pointer-events: none;\\n}\\n\\n/* Links disabled due to input validation */\\na.squiffy-link.validation-disabled\\n{\\n text-decoration: inherit;\\n text-decoration-color: transparent;\\n color: #999 !important;\\n cursor: not-allowed;\\n pointer-events: none;\\n opacity: 0.6;\\n}\\n\\n/* Invalid input field states */\\ninput.squiffy-invalid,\\ntextarea.squiffy-invalid,\\nselect.squiffy-invalid\\n{\\n border-color: #dc3545 !important;\\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);\\n}\\n\\n/* Valid input field states (optional, provides positive feedback) */\\ninput:not([disabled]):valid,\\ntextarea:not([disabled]):valid,\\nselect:not([disabled]):valid\\n{\\n border-color: #28a745;\\n}\\n\\n/* Focus state for invalid inputs */\\ninput.squiffy-invalid:focus,\\ntextarea.squiffy-invalid:focus,\\nselect.squiffy-invalid:focus\\n{\\n outline: none;\\n border-color: #dc3545 !important;\\n box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);\\n}\\n\\n/* Header button styles */\\nbutton.squiffy-header-button\\n{\\n text-decoration: underline;\\n color: Blue;\\n cursor: pointer;\\n background: none;\\n border: none;\\n font-family: inherit;\\n}\\n\\n/* Output block spacing */\\ndiv.squiffy-output-block:not(:last-child),\\ndiv.squiffy-output-passage:not(:last-child),\\ndiv.squiffy-output-section:not(:last-child)\\n{\\n margin-bottom: 1em;\\n border-bottom: 1px solid #ccc;\\n}\\n\\n/* Fade animations */\\n.fade-out {\\n opacity: 0;\\n transition: opacity 200ms;\\n}\\n\\n.fade-in {\\n opacity: 1;\\n transition: opacity 200ms;\\n}\\n\\n/* Continue animation - click to proceed */\\n.squiffy-continue {\\n text-decoration: underline;\\n text-decoration-color: Blue;\\n color: Blue;\\n cursor: pointer;\\n}\\n\\n/* Style: pulse - fades in and out */\\n.squiffy-continue-pulse {\\n animation: squiffy-pulse 1.5s ease-in-out infinite;\\n}\\n\\n@keyframes squiffy-pulse {\\n 0%, 100% { opacity: 1; }\\n 50% { opacity: 0.4; }\\n}\\n\\n/* Style: glow - pulsing glow effect */\\n.squiffy-continue-glow {\\n animation: squiffy-glow 1.5s ease-in-out infinite;\\n}\\n\\n@keyframes squiffy-glow {\\n 0%, 100% { text-shadow: 0 0 4px rgba(0, 0, 255, 0.5); }\\n 50% { text-shadow: 0 0 12px rgba(0, 0, 255, 0.8), 0 0 20px rgba(0, 0, 255, 0.4); }\\n}\\n\\n/* Style: bounce - subtle vertical bounce */\\n.squiffy-continue-bounce {\\n display: inline-block;\\n animation: squiffy-bounce 0.6s ease-in-out infinite;\\n}\\n\\n@keyframes squiffy-bounce {\\n 0%, 100% { transform: translateY(0); }\\n 50% { transform: translateY(-4px); }\\n}\\n\\n/* Style: wave - character spans need special handling for underline */\\n.squiffy-continue-wave {\\n text-decoration: none;\\n border-bottom: 1px solid Blue;\\n}\\n\"","export default \"<!DOCTYPE html>\\n<html>\\n<!-- INFO -->\\n<head>\\n <title><!-- TITLE --></title>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\\n <!-- SCRIPTS -->\\n <!-- STYLE_CONTENT -->\\n <!-- RUNTIME_CONTENT -->\\n <!-- STORY_CONTENT -->\\n <script>\\n document.addEventListener('DOMContentLoaded', async function () {\\n const squiffyApi = await squiffyRuntime.init({\\n element: document.getElementById('squiffy'),\\n story: story,\\n persist: true,\\n storyId: window.location.pathname,\\n });\\n\\n const restartButton = document.getElementById('restart');\\n restartButton.addEventListener('click', function () {\\n if (confirm('Are you sure you want to restart?')) {\\n squiffyApi.restart();\\n }\\n });\\n\\n await squiffyApi.begin();\\n });\\n </script>\\n <!-- STYLESHEETS -->\\n</head>\\n<body>\\n<div id=\\\"squiffy-container\\\">\\n <div id=\\\"squiffy-header\\\">\\n <button class=\\\"squiffy-header-button\\\" id=\\\"restart\\\" tabindex=\\\"0\\\">Restart</button>\\n </div>\\n <div id=\\\"squiffy\\\">\\n </div>\\n</div>\\n</body>\\n</html>\\n\"","export default \"/* Application-specific layout and container styles */\\ndiv#squiffy-container\\n{\\n max-width: 700px;\\n margin-left: auto;\\n margin-right: auto;\\n font-family: Georgia, serif;\\n}\\ndiv#squiffy-header\\n{\\n font-size: 14px;\\n text-align: right;\\n}\\ndiv#squiffy\\n{\\n font-size: 18px;\\n}\"","import { strToU8, zipSync } from \"fflate\";\nimport { CompileSuccess } from \"squiffy-compiler\";\n\nimport squiffyRuntime from \"squiffy-runtime/dist/squiffy.runtime.global.js?raw\";\nimport runtimeCss from \"squiffy-runtime/dist/squiffy.runtime.css?raw\";\nimport htmlTemplateFile from \"./index.template.html?raw\";\nimport cssTemplateFile from \"./style.template.css?raw\";\n\nimport pkg from \"../package.json\" with {type: \"json\"};\n\nconst version = pkg.version;\n\nexport interface Package {\n files: Record<string, string>;\n zip?: Uint8Array;\n}\n\nexport interface PackageOptions {\n createZip?: boolean;\n inlineHtml?: boolean;\n}\n\nexport const createPackage = async (input: CompileSuccess, createZipOrOptions: boolean | PackageOptions = false): Promise<Package> => {\n // Handle both old boolean signature and new options object\n const options: PackageOptions = typeof createZipOrOptions === \"boolean\"\n ? { createZip: createZipOrOptions }\n : createZipOrOptions;\n\n const output: Record<string, string> = {};\n const uiInfo = input.getUiInfo();\n\n const infoComment = `<!--\\n\\nCreated with Squiffy ${version}\\n\\nhttps://squiffystory.com\\nhttps://github.com/textadventures/squiffy\\n\\n-->`;\n const scriptData = uiInfo.externalScripts.map(script => `<script src=\"${script}\"></script>`).join(\"\\n\");\n const stylesheetData = uiInfo.externalStylesheets.map(sheet => `<link rel=\"stylesheet\" href=\"${sheet}\"/>`).join(\"\\n\");\n const combinedCss = runtimeCss.toString() + \"\\n\\n\" + cssTemplateFile.toString();\n\n const storyJs = await input.getJs();\n\n // Generate content for placeholders based on inline vs external mode\n // Note: We use arrow functions as replacements to prevent $-pattern interpretation\n // (e.g., $& or ${...} in the replacement string would otherwise be treated specially)\n let styleContent: string;\n let runtimeContent: string;\n let storyContent: string;\n\n if (options.inlineHtml) {\n // Inline everything into the HTML\n styleContent = \"<style>\\n\" + combinedCss + \"\\n </style>\";\n runtimeContent = \"<script>\\n\" + squiffyRuntime + \"\\n </script>\";\n storyContent = \"<script>\\n\" + storyJs + \"\\n </script>\";\n } else {\n // Reference external files\n styleContent = \"<link rel=\\\"stylesheet\\\" href=\\\"style.css\\\"/>\";\n runtimeContent = \"<script src=\\\"squiffy.runtime.global.js\\\"></script>\";\n storyContent = \"<script src=\\\"story.js\\\"></script>\";\n\n output[\"story.js\"] = storyJs;\n output[\"squiffy.runtime.global.js\"] = squiffyRuntime;\n output[\"style.css\"] = combinedCss;\n }\n\n let htmlData = htmlTemplateFile.toString();\n htmlData = htmlData.replace(\"<!-- INFO -->\", () => infoComment);\n htmlData = htmlData.replace(\"<!-- TITLE -->\", () => uiInfo.title);\n htmlData = htmlData.replace(\"<!-- SCRIPTS -->\", () => scriptData);\n htmlData = htmlData.replace(\"<!-- STYLESHEETS -->\", () => stylesheetData);\n htmlData = htmlData.replace(\"<!-- STYLE_CONTENT -->\", () => styleContent);\n htmlData = htmlData.replace(\"<!-- RUNTIME_CONTENT -->\", () => runtimeContent);\n htmlData = htmlData.replace(\"<!-- STORY_CONTENT -->\", () => storyContent);\n\n output[\"index.html\"] = htmlData;\n\n return {\n files: output,\n zip: !options.createZip ? undefined : zipSync(\n Object.fromEntries(\n Object.entries(output).map(([name, text]) => [name, strToU8(text)])\n )\n )\n };\n};"],"names":["u8","u16","i32","fleb","fdeb","clim","freb","eb","start","b","i","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","r","s","l","le","co","rvb","sv","r_1","v","m","flt","fdt","flm","fdm","shft","p","slc","e","ec","err","ind","msg","nt","wbits","d","o","wbits16","hTree","t","t2","et","a","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","n","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","flen","ftlen","dtlen","lm","ll","dm","dl","llm","lcts","it","clct","len","sym","dst","deo","dflt","lvl","plvl","pre","post","st","lst","opt","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","maxd","ml","nl","mmd","md","ti","pti","lin","din","crct","k","crc","cr","dopt","dict","newDat","mrg","wbytes","deflateSync","data","opts","fltn","val","op","te","td","tds","strToU8","str","latin1","ar","ai","exfl","ex","wzh","f","fn","u","ce","col","exl","y","exf","wzf","zipSync","files","tot","file","compression","com","ms","oe","cdl","badd","squiffyRuntime","runtimeCss","htmlTemplateFile","cssTemplateFile","version","pkg","createPackage","input","createZipOrOptions","options","output","uiInfo","infoComment","scriptData","script","stylesheetData","sheet","combinedCss","storyJs","styleContent","runtimeContent","storyContent","htmlData","name","text"],"mappings":"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","x_google_ignoreList":[0]}