botc-character-sheet 0.16.1 → 0.17.1

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.
Files changed (2) hide show
  1. package/dist/index.js +320 -306
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
1
  import { options as N, Fragment as f } from "preact";
2
- var C = 0;
3
- function e(i, t, a, r, n, h) {
2
+ var H = 0;
3
+ function i(e, t, a, r, n, l) {
4
4
  t || (t = {});
5
- var l, o, s = t;
6
- if ("ref" in s) for (o in s = {}, t) o == "ref" ? l = t[o] : s[o] = t[o];
7
- var c = { type: i, props: s, key: a, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --C, __i: -1, __u: 0, __source: n, __self: h };
8
- if (typeof i == "function" && (l = i.defaultProps)) for (o in l) s[o] === void 0 && (s[o] = l[o]);
9
- return N.vnode && N.vnode(c), c;
5
+ var c, o, h = t;
6
+ if ("ref" in h) for (o in h = {}, t) o == "ref" ? c = t[o] : h[o] = t[o];
7
+ var s = { type: e, props: h, key: a, ref: c, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --H, __i: -1, __u: 0, __source: n, __self: l };
8
+ if (typeof e == "function" && (c = e.defaultProps)) for (o in c) h[o] === void 0 && (h[o] = c[o]);
9
+ return N.vnode && N.vnode(s), s;
10
10
  }
11
- function z(i) {
12
- if (i.startsWith("#") && (i = i.slice(1)), i.length === 3 && (i = i.split("").map((n) => n + n).join("")), i.length !== 6)
11
+ function z(e) {
12
+ if (e.startsWith("#") && (e = e.slice(1)), e.length === 3 && (e = e.split("").map((n) => n + n).join("")), e.length !== 6)
13
13
  throw new Error("Invalid HEX color.");
14
- const t = parseInt(i.slice(0, 2), 16), a = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
14
+ const t = parseInt(e.slice(0, 2), 16), a = parseInt(e.slice(2, 4), 16), r = parseInt(e.slice(4, 6), 16);
15
15
  return [t, a, r];
16
16
  }
17
- function H(i, t, a) {
17
+ function _(e, t, a) {
18
18
  const r = (n) => {
19
- const h = n.toString(16);
20
- return h.length === 1 ? "0" + h : h;
19
+ const l = n.toString(16);
20
+ return l.length === 1 ? "0" + l : l;
21
21
  };
22
- return `#${r(i)}${r(t)}${r(a)}`;
22
+ return `#${r(e)}${r(t)}${r(a)}`;
23
23
  }
24
- function R(i, t) {
25
- const [a, r, n] = z(i), h = Math.round(a * t), l = Math.round(r * t), o = Math.round(n * t);
26
- return H(h, l, o);
24
+ function B(e, t) {
25
+ const [a, r, n] = z(e), l = Math.round(a * t), c = Math.round(r * t), o = Math.round(n * t);
26
+ return _(l, c, o);
27
27
  }
28
28
  const b = {
29
29
  townsfolk: "#00469e",
@@ -34,44 +34,44 @@ const b = {
34
34
  traveller: "#390758ff",
35
35
  loric: "#1f5807"
36
36
  };
37
- function j(i) {
38
- return Array.isArray(i) ? i : [i];
37
+ function j(e) {
38
+ return Array.isArray(e) ? e : [e];
39
39
  }
40
- function O(i, t = 20) {
41
- if (i.length === 0)
40
+ function O(e, t = 20) {
41
+ if (e.length === 0)
42
42
  return "transparent";
43
- if (i.length === 1) {
44
- const r = R(i[0], 0.4);
45
- return `linear-gradient(${t}deg, ${i[0]} 50%, ${r})`;
43
+ if (e.length === 1) {
44
+ const r = B(e[0], 0.4);
45
+ return `linear-gradient(${t}deg, ${e[0]} 50%, ${r})`;
46
46
  }
47
- const a = i.map((r, n) => {
48
- const h = n / (i.length - 1) * 100;
49
- return `${r} ${h}%`;
47
+ const a = e.map((r, n) => {
48
+ const l = n / (e.length - 1) * 100;
49
+ return `${r} ${l}%`;
50
50
  }).join(", ");
51
51
  return `linear-gradient(${t}deg, ${a})`;
52
52
  }
53
- function S(i, t = 90) {
54
- const a = j(i);
53
+ function S(e, t = 90) {
54
+ const a = j(e);
55
55
  if (a.length === 1)
56
56
  return a[0];
57
- const r = a.map((n, h) => {
58
- const l = h / (a.length - 1) * 100;
59
- return `${n} ${l}%`;
57
+ const r = a.map((n, l) => {
58
+ const c = l / (a.length - 1) * 100;
59
+ return `${n} ${c}%`;
60
60
  }).join(", ");
61
61
  return `linear-gradient(${t}deg, ${r})`;
62
62
  }
63
- function _({
64
- jinxes: i,
63
+ function R({
64
+ jinxes: e,
65
65
  allCharacters: t,
66
66
  fabledAndLoric: a,
67
67
  bootleggerRules: r
68
68
  }) {
69
69
  const n = new Map(
70
70
  t.map((m) => [m.id.toLowerCase(), m])
71
- ), h = i.length > 0 && a.length > 0, l = i.length > 0 && a.length === 0, o = i.length === 0 && a.length > 0, s = [...i, ...a], c = h || i.length > 4 || a.length > 4, d = c ? Math.ceil(s.length / 2) : s.length;
71
+ ), l = e.length > 0 && a.length > 0, c = e.length > 0 && a.length === 0, o = e.length === 0 && a.length > 0, h = [...e, ...a], s = l || e.length > 4 || a.length > 4, d = s ? Math.ceil(h.length / 2) : h.length;
72
72
  let y, u;
73
- if (h)
74
- y = i.map((m, g) => /* @__PURE__ */ e(x, { jinx: m, charMap: n }, `lc-${g}`)), u = a.map((m, g) => /* @__PURE__ */ e(
73
+ if (l)
74
+ y = e.map((m, g) => /* @__PURE__ */ i(x, { jinx: m, charMap: n }, `lc-${g}`)), u = a.map((m, g) => /* @__PURE__ */ i(
75
75
  v,
76
76
  {
77
77
  item: m,
@@ -79,17 +79,17 @@ function _({
79
79
  },
80
80
  `rc-${g}`
81
81
  ));
82
- else if (l && c)
83
- y = i.slice(0, d).map((m, g) => /* @__PURE__ */ e(x, { jinx: m, charMap: n }, `lc-${g}`)), u = i.slice(d).map((m, g) => /* @__PURE__ */ e(x, { jinx: m, charMap: n }, `rc-${g}`));
84
- else if (o && c)
85
- y = a.slice(0, d).map((m, g) => /* @__PURE__ */ e(
82
+ else if (c && s)
83
+ y = e.slice(0, d).map((m, g) => /* @__PURE__ */ i(x, { jinx: m, charMap: n }, `lc-${g}`)), u = e.slice(d).map((m, g) => /* @__PURE__ */ i(x, { jinx: m, charMap: n }, `rc-${g}`));
84
+ else if (o && s)
85
+ y = a.slice(0, d).map((m, g) => /* @__PURE__ */ i(
86
86
  v,
87
87
  {
88
88
  item: m,
89
89
  bootleggerRules: r
90
90
  },
91
91
  `lc-${g}`
92
- )), u = a.slice(d).map((m, g) => /* @__PURE__ */ e(
92
+ )), u = a.slice(d).map((m, g) => /* @__PURE__ */ i(
93
93
  v,
94
94
  {
95
95
  item: m,
@@ -97,10 +97,10 @@ function _({
97
97
  },
98
98
  `rc-${g}`
99
99
  ));
100
- else if (l)
101
- y = i.map((m, g) => /* @__PURE__ */ e(x, { jinx: m, charMap: n }, `lc-${g}`));
100
+ else if (c)
101
+ y = e.map((m, g) => /* @__PURE__ */ i(x, { jinx: m, charMap: n }, `lc-${g}`));
102
102
  else if (o)
103
- y = a.map((m, g) => /* @__PURE__ */ e(
103
+ y = a.map((m, g) => /* @__PURE__ */ i(
104
104
  v,
105
105
  {
106
106
  item: m,
@@ -110,64 +110,64 @@ function _({
110
110
  ));
111
111
  else
112
112
  return null;
113
- return /* @__PURE__ */ e("div", { className: "jinxes-section", children: [
114
- /* @__PURE__ */ e("h2", { className: "section-title" }),
115
- u ? /* @__PURE__ */ e("div", { className: "jinxes-list jinxes-two-columns", children: [
116
- /* @__PURE__ */ e("div", { className: "jinx-column", children: [
113
+ return /* @__PURE__ */ i("div", { className: "jinxes-section", children: [
114
+ /* @__PURE__ */ i("h2", { className: "section-title" }),
115
+ u ? /* @__PURE__ */ i("div", { className: "jinxes-list jinxes-two-columns", children: [
116
+ /* @__PURE__ */ i("div", { className: "jinx-column", children: [
117
117
  ...y
118
118
  ] }),
119
- /* @__PURE__ */ e("div", { className: "jinx-column", children: [
119
+ /* @__PURE__ */ i("div", { className: "jinx-column", children: [
120
120
  ...u
121
121
  ] })
122
- ] }) : /* @__PURE__ */ e("div", { className: "jinxes-list", children: [
122
+ ] }) : /* @__PURE__ */ i("div", { className: "jinxes-list", children: [
123
123
  ...y
124
124
  ] })
125
125
  ] });
126
126
  }
127
- const x = ({ charMap: i, jinx: t }) => {
128
- const a = i.get(t.characters[0]), r = i.get(t.characters[1]);
129
- return /* @__PURE__ */ e("div", { className: "jinx-item", children: [
130
- /* @__PURE__ */ e("div", { className: "jinx-icons", children: [
131
- a && /* @__PURE__ */ e("div", { className: "jinx-icon-wrapper", children: w(a) ? /* @__PURE__ */ e(
127
+ const x = ({ charMap: e, jinx: t }) => {
128
+ const a = e.get(t.characters[0]), r = e.get(t.characters[1]);
129
+ return /* @__PURE__ */ i("div", { className: "jinx-item", children: [
130
+ /* @__PURE__ */ i("div", { className: "jinx-icons", children: [
131
+ a && /* @__PURE__ */ i("div", { className: "jinx-icon-wrapper", children: w(a) ? /* @__PURE__ */ i(
132
132
  "img",
133
133
  {
134
134
  src: w(a),
135
135
  alt: a.name,
136
136
  className: "jinx-icon"
137
137
  }
138
- ) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: a.name.charAt(0) }) }),
139
- /* @__PURE__ */ e("span", { className: "jinx-divider" }),
140
- r && /* @__PURE__ */ e("div", { className: "jinx-icon-wrapper", children: w(r) ? /* @__PURE__ */ e(
138
+ ) : /* @__PURE__ */ i("div", { className: "jinx-icon-placeholder", children: a.name.charAt(0) }) }),
139
+ /* @__PURE__ */ i("span", { className: "jinx-divider" }),
140
+ r && /* @__PURE__ */ i("div", { className: "jinx-icon-wrapper", children: w(r) ? /* @__PURE__ */ i(
141
141
  "img",
142
142
  {
143
143
  src: w(r),
144
144
  alt: r.name,
145
145
  className: "jinx-icon"
146
146
  }
147
- ) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: r.name.charAt(0) }) })
147
+ ) : /* @__PURE__ */ i("div", { className: "jinx-icon-placeholder", children: r.name.charAt(0) }) })
148
148
  ] }),
149
- /* @__PURE__ */ e("p", { className: "jinx-text", children: t.jinx })
149
+ /* @__PURE__ */ i("p", { className: "jinx-text", children: t.jinx })
150
150
  ] });
151
151
  };
152
152
  function v({
153
- item: i,
153
+ item: e,
154
154
  bootleggerRules: t
155
155
  }) {
156
- const a = i.name.toLowerCase() === "bootlegger";
157
- return /* @__PURE__ */ e("div", { className: "jinx-item loric", children: [
158
- /* @__PURE__ */ e("div", { className: "loric-spacer" }),
159
- i.image ? /* @__PURE__ */ e("img", { src: i.image, alt: i.name, className: "jinx-icon loric" }) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: i.name.charAt(0) }),
160
- /* @__PURE__ */ e("div", { className: "loric-text-container", children: [
161
- /* @__PURE__ */ e("p", { className: "jinx-text loric-name", children: i.name }),
162
- /* @__PURE__ */ e("p", { className: "jinx-text loric-text", children: i.note }),
163
- a && t.map((r, n) => /* @__PURE__ */ e("p", { className: "jinx-text loric-text", children: r }, `bootlegger-rule-${n}`))
156
+ const a = e.name.toLowerCase() === "bootlegger";
157
+ return /* @__PURE__ */ i("div", { className: "jinx-item loric", children: [
158
+ /* @__PURE__ */ i("div", { className: "loric-spacer" }),
159
+ e.image ? /* @__PURE__ */ i("img", { src: e.image, alt: e.name, className: "jinx-icon loric" }) : /* @__PURE__ */ i("div", { className: "jinx-icon-placeholder", children: e.name.charAt(0) }),
160
+ /* @__PURE__ */ i("div", { className: "loric-text-container", children: [
161
+ /* @__PURE__ */ i("p", { className: "jinx-text loric-name", children: e.name }),
162
+ /* @__PURE__ */ i("p", { className: "jinx-text loric-text", children: e.note }),
163
+ a && t.map((r, n) => /* @__PURE__ */ i("p", { className: "jinx-text loric-text", children: r }, `bootlegger-rule-${n}`))
164
164
  ] })
165
165
  ] });
166
166
  }
167
- function w(i) {
168
- return i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null;
167
+ function w(e) {
168
+ return e.wiki_image ? e.wiki_image : e.image ? typeof e.image == "string" ? e.image : e.image[0] : null;
169
169
  }
170
- const B = [
170
+ const G = [
171
171
  {
172
172
  characters: [
173
173
  "alchemist",
@@ -1146,7 +1146,7 @@ const B = [
1146
1146
  oldJinx: "If the Exorcist chooses the Yaggababble, the Yaggababble ability does not kill tonight."
1147
1147
  }
1148
1148
  ];
1149
- function G(i) {
1149
+ function $(e) {
1150
1150
  const t = {
1151
1151
  townsfolk: [],
1152
1152
  outsider: [],
@@ -1156,7 +1156,7 @@ function G(i) {
1156
1156
  fabled: [],
1157
1157
  loric: []
1158
1158
  };
1159
- for (const a of i)
1159
+ for (const a of e)
1160
1160
  try {
1161
1161
  t[a.team].push(a);
1162
1162
  } catch {
@@ -1164,11 +1164,11 @@ function G(i) {
1164
1164
  }
1165
1165
  return t;
1166
1166
  }
1167
- function $(i, t = !1) {
1168
- const a = new Set(i.map((n) => n.id.toLowerCase())), r = [];
1169
- for (const n of B) {
1170
- const [h, l] = n.characters;
1171
- a.has(h) && a.has(l) && (t && n.oldJinx ? r.push({
1167
+ function V(e, t = !1) {
1168
+ const a = new Set(e.map((n) => n.id.toLowerCase())), r = [];
1169
+ for (const n of G) {
1170
+ const [l, c] = n.characters;
1171
+ a.has(l) && a.has(c) && (t && n.oldJinx ? r.push({
1172
1172
  characters: n.characters,
1173
1173
  jinx: n.oldJinx
1174
1174
  }) : r.push({
@@ -1176,47 +1176,47 @@ function $(i, t = !1) {
1176
1176
  jinx: n.jinx
1177
1177
  }));
1178
1178
  }
1179
- for (const n of i) {
1180
- const h = typeof n == "object" && n !== null, l = "jinxes" in n;
1181
- if (!h || !l) continue;
1179
+ for (const n of e) {
1180
+ const l = typeof n == "object" && n !== null, c = "jinxes" in n;
1181
+ if (!l || !c) continue;
1182
1182
  console.log("char.jinxes:", n.jinxes);
1183
- const o = n, s = o.id.toLowerCase();
1184
- if (a.has(s) && o.jinxes)
1185
- for (const c of o.jinxes) {
1186
- const d = c.id.toLowerCase();
1183
+ const o = n, h = o.id.toLowerCase();
1184
+ if (a.has(h) && o.jinxes)
1185
+ for (const s of o.jinxes) {
1186
+ const d = s.id.toLowerCase();
1187
1187
  if (console.log(`${n.id} is jinxed with ${d}`), a.has(d) || (console.log("characterIds doesnt contain charId", d), console.log("characterIds:", a)), a.has(d)) {
1188
1188
  const y = r.some(
1189
- (u) => u.characters[0] === s && u.characters[1] === d || u.characters[0] === d && u.characters[1] === s
1189
+ (u) => u.characters[0] === h && u.characters[1] === d || u.characters[0] === d && u.characters[1] === h
1190
1190
  );
1191
1191
  console.log("Jinx already exists:", y), y || r.push({
1192
- characters: [s, d],
1193
- jinx: c.reason
1192
+ characters: [h, d],
1193
+ jinx: s.reason
1194
1194
  });
1195
1195
  }
1196
1196
  }
1197
1197
  }
1198
1198
  return r;
1199
1199
  }
1200
- const M = (i) => i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null;
1201
- function J(i, t, a) {
1200
+ const M = (e) => e.wiki_image ? e.wiki_image : e.image ? typeof e.image == "string" ? e.image : e.image[0] : null;
1201
+ function J(e, t, a) {
1202
1202
  const r = [];
1203
1203
  return t.forEach((n) => {
1204
- n.characters[0] === i.id ? r.push(n.characters[1]) : n.characters[1] === i.id && r.push(n.characters[0]);
1204
+ n.characters[0] === e.id ? r.push(n.characters[1]) : n.characters[1] === e.id && r.push(n.characters[0]);
1205
1205
  }), a.filter(
1206
1206
  (n) => r.includes(n.id)
1207
1207
  );
1208
1208
  }
1209
- function V({
1210
- title: i,
1209
+ function F({
1210
+ title: e,
1211
1211
  author: t,
1212
1212
  characters: a,
1213
1213
  color: r = "#4a5568",
1214
1214
  jinxes: n = [],
1215
- showSwirls: h = !0,
1216
- includeMargins: l = !1,
1215
+ showSwirls: l = !0,
1216
+ includeMargins: c = !1,
1217
1217
  solidTitle: o = !1,
1218
- iconScale: s = 1.6,
1219
- appearance: c = "normal",
1218
+ iconScale: h = 1.6,
1219
+ appearance: s = "normal",
1220
1220
  fabledOrLoric: d = [],
1221
1221
  inlineJinxIcons: y = !1,
1222
1222
  bootleggerRules: u = []
@@ -1246,44 +1246,44 @@ function V({
1246
1246
  chars: a.demon,
1247
1247
  color: b.demon
1248
1248
  }
1249
- ].filter((p) => p.chars.length > 0), g = j(r), P = O(g, 20), W = ["character-sheet", c !== "normal" ? `appearance-${c}` : ""].filter(Boolean).join(" ");
1250
- return /* @__PURE__ */ e(
1249
+ ].filter((p) => p.chars.length > 0), g = j(r), W = O(g, 20), E = ["character-sheet", s !== "normal" ? `appearance-${s}` : ""].filter(Boolean).join(" ");
1250
+ return /* @__PURE__ */ i(
1251
1251
  "div",
1252
1252
  {
1253
- className: W,
1253
+ className: E,
1254
1254
  id: "character-sheet",
1255
1255
  style: {
1256
- "--header-gradient": P,
1257
- transform: l ? "scale(0.952)" : void 0
1256
+ "--header-gradient": W,
1257
+ transform: c ? "scale(0.952)" : void 0
1258
1258
  },
1259
1259
  children: [
1260
- /* @__PURE__ */ e(
1260
+ /* @__PURE__ */ i(
1261
1261
  "img",
1262
1262
  {
1263
1263
  className: "character-sheet-background",
1264
1264
  src: "/images/parchment_texture_a4_lightened.jpg"
1265
1265
  }
1266
1266
  ),
1267
- /* @__PURE__ */ e(U, { color: r }),
1268
- /* @__PURE__ */ e("div", { className: "sheet-content", children: [
1269
- /* @__PURE__ */ e(
1270
- F,
1267
+ /* @__PURE__ */ i(Y, { color: r }),
1268
+ /* @__PURE__ */ i("div", { className: "sheet-content", children: [
1269
+ /* @__PURE__ */ i(
1270
+ U,
1271
1271
  {
1272
- showSwirls: h,
1273
- title: i,
1272
+ showSwirls: l,
1273
+ title: e,
1274
1274
  author: t,
1275
1275
  solidHeader: o
1276
1276
  }
1277
1277
  ),
1278
- /* @__PURE__ */ e("div", { className: "characters-grid", children: [
1279
- m.map((p, E) => /* @__PURE__ */ e(f, { children: [
1280
- /* @__PURE__ */ e(
1281
- Y,
1278
+ /* @__PURE__ */ i("div", { className: "characters-grid", children: [
1279
+ m.map((p, C) => /* @__PURE__ */ i(f, { children: [
1280
+ /* @__PURE__ */ i(
1281
+ Z,
1282
1282
  {
1283
1283
  title: p.title.toUpperCase(),
1284
1284
  characters: p.chars,
1285
1285
  charNameColor: p.color,
1286
- iconScale: s,
1286
+ iconScale: h,
1287
1287
  jinxes: n,
1288
1288
  allCharacters: [
1289
1289
  ...a.townsfolk,
@@ -1295,12 +1295,12 @@ function V({
1295
1295
  },
1296
1296
  p.key
1297
1297
  ),
1298
- E < m.length - 1 && /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" })
1298
+ C < m.length - 1 && /* @__PURE__ */ i("img", { src: "/images/divider.png", className: "section-divider" })
1299
1299
  ] })),
1300
- (n.length > 0 || d.length > 0) && /* @__PURE__ */ e(f, { children: [
1301
- /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" }),
1302
- /* @__PURE__ */ e(
1303
- _,
1300
+ (n.length > 0 || d.length > 0) && /* @__PURE__ */ i(f, { children: [
1301
+ /* @__PURE__ */ i("img", { src: "/images/divider.png", className: "section-divider" }),
1302
+ /* @__PURE__ */ i(
1303
+ R,
1304
1304
  {
1305
1305
  fabledAndLoric: d,
1306
1306
  jinxes: n,
@@ -1315,35 +1315,35 @@ function V({
1315
1315
  )
1316
1316
  ] })
1317
1317
  ] }),
1318
- /* @__PURE__ */ e("div", { className: "sheet-footer", children: [
1319
- /* @__PURE__ */ e("span", { className: "asterisk", children: "*" }),
1318
+ /* @__PURE__ */ i("div", { className: "sheet-footer", children: [
1319
+ /* @__PURE__ */ i("span", { className: "asterisk", children: "*" }),
1320
1320
  "Not the first night"
1321
1321
  ] })
1322
1322
  ] }),
1323
- /* @__PURE__ */ e("div", { className: "author-credit", children: [
1324
- /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1325
- /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
1323
+ /* @__PURE__ */ i("div", { className: "author-credit", children: [
1324
+ /* @__PURE__ */ i("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1325
+ /* @__PURE__ */ i("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
1326
1326
  ] })
1327
1327
  ]
1328
1328
  }
1329
1329
  );
1330
1330
  }
1331
- function F({
1332
- showSwirls: i,
1331
+ function U({
1332
+ showSwirls: e,
1333
1333
  title: t,
1334
1334
  author: a,
1335
1335
  solidHeader: r = !1
1336
1336
  }) {
1337
- return /* @__PURE__ */ e(f, { children: [
1338
- /* @__PURE__ */ e("h1", { className: "sheet-header", children: [
1339
- i && /* @__PURE__ */ e(
1337
+ return /* @__PURE__ */ i(f, { children: [
1338
+ /* @__PURE__ */ i("h1", { className: "sheet-header", children: [
1339
+ e && /* @__PURE__ */ i(
1340
1340
  "img",
1341
1341
  {
1342
1342
  src: "/images/black-swirl-divider.png",
1343
1343
  className: "swirl-divider"
1344
1344
  }
1345
1345
  ),
1346
- /* @__PURE__ */ e(
1346
+ /* @__PURE__ */ i(
1347
1347
  "span",
1348
1348
  {
1349
1349
  style: {
@@ -1352,7 +1352,7 @@ function F({
1352
1352
  children: t
1353
1353
  }
1354
1354
  ),
1355
- i && /* @__PURE__ */ e(
1355
+ e && /* @__PURE__ */ i(
1356
1356
  "img",
1357
1357
  {
1358
1358
  src: "/images/black-swirl-divider.png",
@@ -1360,17 +1360,17 @@ function F({
1360
1360
  }
1361
1361
  )
1362
1362
  ] }),
1363
- a && /* @__PURE__ */ e("h2", { className: "sheet-author", children: [
1363
+ a && /* @__PURE__ */ i("h2", { className: "sheet-author", children: [
1364
1364
  "by ",
1365
1365
  a
1366
1366
  ] })
1367
1367
  ] });
1368
1368
  }
1369
- function U({ color: i }) {
1370
- const t = S(i, 180);
1371
- return /* @__PURE__ */ e("div", { className: "sidebar-container", children: [
1372
- /* @__PURE__ */ e("div", { className: "sidebar-background" }),
1373
- /* @__PURE__ */ e(
1369
+ function Y({ color: e }) {
1370
+ const t = S(e, 180);
1371
+ return /* @__PURE__ */ i("div", { className: "sidebar-container", children: [
1372
+ /* @__PURE__ */ i("div", { className: "sidebar-background" }),
1373
+ /* @__PURE__ */ i(
1374
1374
  "div",
1375
1375
  {
1376
1376
  className: "sidebar-overlay",
@@ -1379,94 +1379,95 @@ function U({ color: i }) {
1379
1379
  )
1380
1380
  ] });
1381
1381
  }
1382
- function Y({
1383
- title: i,
1382
+ const P = 8;
1383
+ function Z({
1384
+ title: e,
1384
1385
  characters: t,
1385
1386
  charNameColor: a,
1386
1387
  iconScale: r,
1387
1388
  jinxes: n,
1388
- allCharacters: h,
1389
- inlineJinxIcons: l
1389
+ allCharacters: l,
1390
+ inlineJinxIcons: c
1390
1391
  }) {
1391
- const o = t.length > 8 ? "space-between" : t.length % 2 === 0 ? "space-around" : "flex-start";
1392
- return /* @__PURE__ */ e("div", { className: "character-section", children: [
1393
- /* @__PURE__ */ e("h2", { className: "section-title", children: i }),
1394
- /* @__PURE__ */ e("div", { className: "character-list", children: [
1395
- /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(0, Math.ceil(t.length / 2)).map((s) => /* @__PURE__ */ e(
1396
- D,
1392
+ const o = t.length > P ? "space-between" : t.length % 2 === 0 ? "space-around" : "flex-start", h = K(t);
1393
+ return /* @__PURE__ */ i("div", { className: "character-section", children: [
1394
+ /* @__PURE__ */ i("h2", { className: "section-title", children: e }),
1395
+ /* @__PURE__ */ i("div", { className: "character-list", children: [
1396
+ /* @__PURE__ */ i("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(0, h).map((s) => /* @__PURE__ */ i(
1397
+ L,
1397
1398
  {
1398
1399
  character: s,
1399
1400
  color: a,
1400
1401
  iconScale: r,
1401
- jinxedCharacters: J(s, n, h),
1402
- inlineJinxIcons: l
1402
+ jinxedCharacters: J(s, n, l),
1403
+ inlineJinxIcons: c
1403
1404
  },
1404
1405
  s.id
1405
1406
  )) }),
1406
- /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(Math.ceil(t.length / 2), t.length).map((s) => /* @__PURE__ */ e(
1407
- D,
1407
+ /* @__PURE__ */ i("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(h, t.length).map((s) => /* @__PURE__ */ i(
1408
+ L,
1408
1409
  {
1409
1410
  character: s,
1410
1411
  color: a,
1411
1412
  iconScale: r,
1412
- jinxedCharacters: J(s, n, h),
1413
- inlineJinxIcons: l
1413
+ jinxedCharacters: J(s, n, l),
1414
+ inlineJinxIcons: c
1414
1415
  },
1415
1416
  s.id
1416
1417
  )) })
1417
1418
  ] })
1418
1419
  ] });
1419
1420
  }
1420
- function D({
1421
- character: i,
1421
+ function L({
1422
+ character: e,
1422
1423
  color: t,
1423
1424
  iconScale: a,
1424
1425
  jinxedCharacters: r,
1425
1426
  inlineJinxIcons: n
1426
1427
  }) {
1427
- const h = (o) => {
1428
- const s = o.match(/^(.*?)(\[.*?\])$/);
1429
- if (s) {
1430
- const [, c, d] = s;
1431
- return /* @__PURE__ */ e(f, { children: [
1432
- c,
1433
- /* @__PURE__ */ e("strong", { className: "setup-ability", children: d })
1428
+ const l = (o) => {
1429
+ const h = o.match(/^(.*?)(\[.*?\])$/);
1430
+ if (h) {
1431
+ const [, s, d] = h;
1432
+ return /* @__PURE__ */ i(f, { children: [
1433
+ s,
1434
+ /* @__PURE__ */ i("strong", { className: "setup-ability", children: d })
1434
1435
  ] });
1435
1436
  }
1436
1437
  return o;
1437
- }, l = M(i);
1438
- return /* @__PURE__ */ e("div", { className: "character-card", children: [
1439
- /* @__PURE__ */ e("div", { className: "character-icon-wrapper", children: l ? /* @__PURE__ */ e(
1438
+ }, c = M(e);
1439
+ return /* @__PURE__ */ i("div", { className: "character-card", children: [
1440
+ /* @__PURE__ */ i("div", { className: "character-icon-wrapper", children: c ? /* @__PURE__ */ i(
1440
1441
  "img",
1441
1442
  {
1442
- src: l,
1443
- alt: i.name,
1443
+ src: c,
1444
+ alt: e.name,
1444
1445
  className: "character-icon",
1445
1446
  style: { scale: a.toString() }
1446
1447
  }
1447
- ) : /* @__PURE__ */ e(
1448
+ ) : /* @__PURE__ */ i(
1448
1449
  "div",
1449
1450
  {
1450
1451
  className: "character-icon-placeholder",
1451
1452
  style: { color: t, scale: a.toString() },
1452
- children: i.name.charAt(0)
1453
+ children: e.name.charAt(0)
1453
1454
  }
1454
1455
  ) }),
1455
- /* @__PURE__ */ e("div", { className: "character-info", children: [
1456
- /* @__PURE__ */ e("h3", { className: "character-name", style: { color: t }, children: [
1457
- i.name,
1458
- n && r.length > 0 && /* @__PURE__ */ e("span", { className: "inline-jinx-icons", children: r.map((o) => {
1459
- const s = M(o);
1460
- return s ? /* @__PURE__ */ e(
1456
+ /* @__PURE__ */ i("div", { className: "character-info", children: [
1457
+ /* @__PURE__ */ i("h3", { className: "character-name", style: { color: t }, children: [
1458
+ e.name,
1459
+ n && r.length > 0 && /* @__PURE__ */ i("span", { className: "inline-jinx-icons", children: r.map((o) => {
1460
+ const h = M(o);
1461
+ return h ? /* @__PURE__ */ i(
1461
1462
  "img",
1462
1463
  {
1463
- src: s,
1464
+ src: h,
1464
1465
  alt: o.name,
1465
1466
  className: "inline-jinx-icon",
1466
1467
  title: `Jinxed with ${o.name}`
1467
1468
  },
1468
1469
  o.id
1469
- ) : /* @__PURE__ */ e(
1470
+ ) : /* @__PURE__ */ i(
1470
1471
  "span",
1471
1472
  {
1472
1473
  className: "inline-jinx-icon-placeholder",
@@ -1477,11 +1478,24 @@ function D({
1477
1478
  );
1478
1479
  }) })
1479
1480
  ] }),
1480
- /* @__PURE__ */ e("p", { className: "character-ability", children: h(i.ability) })
1481
+ /* @__PURE__ */ i("p", { className: "character-ability", children: l(e.ability) })
1481
1482
  ] })
1482
1483
  ] });
1483
1484
  }
1484
- const L = /* @__PURE__ */ new Set([
1485
+ function K(e) {
1486
+ const t = Math.ceil(e.length / 2);
1487
+ if (e.length % 2 === 0 || e.length <= P)
1488
+ return t;
1489
+ const a = t, r = t - 1, n = e.slice(0, a), l = e.slice(r - 1), c = n.reduce(
1490
+ (h, s) => h + s.ability.length,
1491
+ 0
1492
+ ), o = l.reduce(
1493
+ (h, s) => h + s.ability.length,
1494
+ 0
1495
+ );
1496
+ return c < o ? a : r;
1497
+ }
1498
+ const D = /* @__PURE__ */ new Set([
1485
1499
  "the",
1486
1500
  "of",
1487
1501
  "in",
@@ -1501,21 +1515,21 @@ const L = /* @__PURE__ */ new Set([
1501
1515
  "upon",
1502
1516
  "after",
1503
1517
  "before"
1504
- ]), I = (i, t) => L.has(i) || t === 0 && L.has(i.toLowerCase()), Z = (i) => i.split(/\s+/).reduce((t, a, r, n) => {
1505
- const h = I(a, r), l = r > 0 && I(n[r - 1], r - 1);
1506
- if (r === 0 || h !== l) {
1507
- const s = [];
1508
- for (let d = r; d < n.length && I(n[d], d) === h; d++)
1509
- s.push(n[d]);
1510
- const c = t.length > 0;
1518
+ ]), I = (e, t) => D.has(e) || t === 0 && D.has(e.toLowerCase()), q = (e) => e.split(/\s+/).reduce((t, a, r, n) => {
1519
+ const l = I(a, r), c = r > 0 && I(n[r - 1], r - 1);
1520
+ if (r === 0 || l !== c) {
1521
+ const h = [];
1522
+ for (let d = r; d < n.length && I(n[d], d) === l; d++)
1523
+ h.push(n[d]);
1524
+ const s = t.length > 0;
1511
1525
  t.push(
1512
- /* @__PURE__ */ e(
1526
+ /* @__PURE__ */ i(
1513
1527
  "span",
1514
1528
  {
1515
- className: h ? "minor-word" : void 0,
1529
+ className: l ? "minor-word" : void 0,
1516
1530
  children: [
1517
- c && " ",
1518
- s.join(" ")
1531
+ s && " ",
1532
+ h.join(" ")
1519
1533
  ]
1520
1534
  },
1521
1535
  r
@@ -1524,22 +1538,22 @@ const L = /* @__PURE__ */ new Set([
1524
1538
  }
1525
1539
  return t;
1526
1540
  }, []);
1527
- function k(i) {
1528
- return typeof i == "string" ? i === "dawn" ? "/images/dawn-icon.png" : i === "dusk" ? "/images/dusk-icon.png" : i === "minioninfo" ? "/images/minioninfo.png" : "/images/demoninfo.png" : typeof i.image == "string" ? i.image : Array.isArray(i.image) && i.image.length ? i.image[0] : i.wiki_image;
1541
+ function k(e) {
1542
+ return typeof e == "string" ? e === "dawn" ? "/images/dawn-icon.png" : e === "dusk" ? "/images/dusk-icon.png" : e === "minioninfo" ? "/images/minioninfo.png" : "/images/demoninfo.png" : typeof e.image == "string" ? e.image : Array.isArray(e.image) && e.image.length ? e.image[0] : e.wiki_image;
1529
1543
  }
1530
- const K = (i) => {
1531
- const t = i.nightOrders.first, a = i.nightOrders.other;
1532
- return /* @__PURE__ */ e("div", { class: "night-orders-container", children: [
1533
- /* @__PURE__ */ e("div", { class: "night-order", children: [
1534
- /* @__PURE__ */ e("p", { children: "First Night:" }),
1535
- /* @__PURE__ */ e("div", { class: "icon-row", children: t.map((r) => /* @__PURE__ */ e("img", { src: k(r), class: "icon" })) })
1544
+ const X = (e) => {
1545
+ const t = e.nightOrders.first, a = e.nightOrders.other;
1546
+ return /* @__PURE__ */ i("div", { class: "night-orders-container", children: [
1547
+ /* @__PURE__ */ i("div", { class: "night-order", children: [
1548
+ /* @__PURE__ */ i("p", { children: "First Night:" }),
1549
+ /* @__PURE__ */ i("div", { class: "icon-row", children: t.map((r) => /* @__PURE__ */ i("img", { src: k(r), class: "icon" })) })
1536
1550
  ] }),
1537
- /* @__PURE__ */ e("div", { class: "night-order", children: [
1538
- /* @__PURE__ */ e("p", { children: "Other Nights:" }),
1539
- /* @__PURE__ */ e("div", { class: "icon-row", children: a.map((r) => /* @__PURE__ */ e("img", { src: k(r), class: "icon" })) })
1551
+ /* @__PURE__ */ i("div", { class: "night-order", children: [
1552
+ /* @__PURE__ */ i("p", { children: "Other Nights:" }),
1553
+ /* @__PURE__ */ i("div", { class: "icon-row", children: a.map((r) => /* @__PURE__ */ i("img", { src: k(r), class: "icon" })) })
1540
1554
  ] })
1541
1555
  ] });
1542
- }, q = {
1556
+ }, Q = {
1543
1557
  5: [3, 0, 1, 1],
1544
1558
  6: [3, 1, 1, 1],
1545
1559
  7: [5, 0, 1, 1],
@@ -1551,38 +1565,38 @@ const K = (i) => {
1551
1565
  13: [9, 0, 3, 1],
1552
1566
  14: [9, 1, 3, 1],
1553
1567
  "15+": [9, 2, 3, 1]
1554
- }, X = () => /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e("div", { className: "player-count-container", children: [
1555
- /* @__PURE__ */ e("div", { className: "count-column titles", children: [
1556
- /* @__PURE__ */ e("div", { className: "row-title", children: "Players" }),
1557
- /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Townsfolk" }),
1558
- /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Outsiders" }),
1559
- /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Minions" }),
1560
- /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Demons" })
1568
+ }, ee = () => /* @__PURE__ */ i(f, { children: /* @__PURE__ */ i("div", { className: "player-count-container", children: [
1569
+ /* @__PURE__ */ i("div", { className: "count-column titles", children: [
1570
+ /* @__PURE__ */ i("div", { className: "row-title", children: "Players" }),
1571
+ /* @__PURE__ */ i("div", { className: "row-title good-count", children: "Townsfolk" }),
1572
+ /* @__PURE__ */ i("div", { className: "row-title good-count", children: "Outsiders" }),
1573
+ /* @__PURE__ */ i("div", { className: "row-title evil-count", children: "Minions" }),
1574
+ /* @__PURE__ */ i("div", { className: "row-title evil-count", children: "Demons" })
1561
1575
  ] }),
1562
- Object.entries(q).map(([i, t]) => /* @__PURE__ */ e("div", { className: "count-column", children: [
1563
- /* @__PURE__ */ e("div", { className: "player-count", children: i }),
1564
- /* @__PURE__ */ e("div", { className: "good-count", children: t[0] }),
1565
- /* @__PURE__ */ e("div", { className: "good-count", children: t[1] }),
1566
- /* @__PURE__ */ e("div", { className: "evil-count", children: t[2] }),
1567
- /* @__PURE__ */ e("div", { className: "evil-count", children: t[3] })
1576
+ Object.entries(Q).map(([e, t]) => /* @__PURE__ */ i("div", { className: "count-column", children: [
1577
+ /* @__PURE__ */ i("div", { className: "player-count", children: e }),
1578
+ /* @__PURE__ */ i("div", { className: "good-count", children: t[0] }),
1579
+ /* @__PURE__ */ i("div", { className: "good-count", children: t[1] }),
1580
+ /* @__PURE__ */ i("div", { className: "evil-count", children: t[2] }),
1581
+ /* @__PURE__ */ i("div", { className: "evil-count", children: t[3] })
1568
1582
  ] }))
1569
- ] }) }), Q = ({
1570
- title: i,
1583
+ ] }) }), ie = ({
1584
+ title: e,
1571
1585
  color: t,
1572
1586
  includeMargins: a,
1573
1587
  formatMinorWords: r = !1,
1574
1588
  displayNightOrder: n = !1,
1575
- nightOrders: h = { first: [], other: [] },
1576
- displayPlayerCounts: l = !0
1589
+ nightOrders: l = { first: [], other: [] },
1590
+ displayPlayerCounts: c = !0
1577
1591
  }) => {
1578
1592
  const o = () => {
1579
- const c = i.split("&");
1580
- return c.map((d, y) => /* @__PURE__ */ e(f, { children: [
1581
- r ? Z(d) : d,
1582
- y < c.length - 1 && /* @__PURE__ */ e("span", { className: "ampersand", children: "&" })
1593
+ const s = e.split("&");
1594
+ return s.map((d, y) => /* @__PURE__ */ i(f, { children: [
1595
+ r ? q(d) : d,
1596
+ y < s.length - 1 && /* @__PURE__ */ i("span", { className: "ampersand", children: "&" })
1583
1597
  ] }));
1584
- }, s = S(t, 180);
1585
- return /* @__PURE__ */ e(
1598
+ }, h = S(t, 180);
1599
+ return /* @__PURE__ */ i(
1586
1600
  "div",
1587
1601
  {
1588
1602
  className: "sheet-backing",
@@ -1590,63 +1604,63 @@ const K = (i) => {
1590
1604
  transform: a ? "scale(0.952)" : void 0
1591
1605
  },
1592
1606
  children: [
1593
- /* @__PURE__ */ e("div", { className: "sheet-background", children: /* @__PURE__ */ e("div", { className: "title-container", children: /* @__PURE__ */ e("h1", { children: o() }) }) }),
1594
- /* @__PURE__ */ e(
1607
+ /* @__PURE__ */ i("div", { className: "sheet-background", children: /* @__PURE__ */ i("div", { className: "title-container", children: /* @__PURE__ */ i("h1", { children: o() }) }) }),
1608
+ /* @__PURE__ */ i(
1595
1609
  "div",
1596
1610
  {
1597
1611
  className: "sheet-back-overlay",
1598
- style: { background: s }
1612
+ style: { background: h }
1599
1613
  }
1600
1614
  ),
1601
- /* @__PURE__ */ e("div", { className: "back-info-container", children: [
1602
- l && /* @__PURE__ */ e(X, {}),
1603
- n && /* @__PURE__ */ e(K, { nightOrders: h })
1615
+ /* @__PURE__ */ i("div", { className: "back-info-container", children: [
1616
+ c && /* @__PURE__ */ i(ee, {}),
1617
+ n && /* @__PURE__ */ i(X, { nightOrders: l })
1604
1618
  ] })
1605
1619
  ]
1606
1620
  }
1607
1621
  );
1608
- }, ee = (i) => /* @__PURE__ */ e(f, { children: [
1609
- /* @__PURE__ */ e(T, { ...i, children: [
1610
- /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
1611
- /* @__PURE__ */ e("h3", { className: "night-title", children: "First Night" }),
1612
- /* @__PURE__ */ e("h3", { className: "script-title", children: i.title })
1622
+ }, te = (e) => /* @__PURE__ */ i(f, { children: [
1623
+ /* @__PURE__ */ i(T, { ...e, children: [
1624
+ /* @__PURE__ */ i("div", { className: "night-sheet-heading", children: [
1625
+ /* @__PURE__ */ i("h3", { className: "night-title", children: "First Night" }),
1626
+ /* @__PURE__ */ i("h3", { className: "script-title", children: e.title })
1613
1627
  ] }),
1614
- /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.firstNightOrder.map((t) => /* @__PURE__ */ e(A, { entry: t, night: "first" })) })
1628
+ /* @__PURE__ */ i("div", { className: "night-sheet-order", children: e.firstNightOrder.map((t) => /* @__PURE__ */ i(A, { entry: t, night: "first" })) })
1615
1629
  ] }),
1616
- /* @__PURE__ */ e(T, { ...i, children: [
1617
- /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
1618
- /* @__PURE__ */ e("h3", { className: "night-title", children: "Other Nights" }),
1619
- /* @__PURE__ */ e("h3", { className: "script-title", children: i.title })
1630
+ /* @__PURE__ */ i(T, { ...e, children: [
1631
+ /* @__PURE__ */ i("div", { className: "night-sheet-heading", children: [
1632
+ /* @__PURE__ */ i("h3", { className: "night-title", children: "Other Nights" }),
1633
+ /* @__PURE__ */ i("h3", { className: "script-title", children: e.title })
1620
1634
  ] }),
1621
- /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.otherNightOrder.map((t) => /* @__PURE__ */ e(A, { entry: t, night: "other" })) })
1635
+ /* @__PURE__ */ i("div", { className: "night-sheet-order", children: e.otherNightOrder.map((t) => /* @__PURE__ */ i(A, { entry: t, night: "other" })) })
1622
1636
  ] })
1623
- ] }), T = (i) => {
1624
- const t = j(i.color), a = O(t, 20), r = S(i.color, 180);
1625
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
1637
+ ] }), T = (e) => {
1638
+ const t = j(e.color), a = O(t, 20), r = S(e.color, 180);
1639
+ return /* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(
1626
1640
  "div",
1627
1641
  {
1628
1642
  className: "night-sheet",
1629
1643
  style: {
1630
- transform: i.includeMargins ? "scale(0.952)" : void 0,
1644
+ transform: e.includeMargins ? "scale(0.952)" : void 0,
1631
1645
  "--header-gradient": a
1632
1646
  },
1633
1647
  children: [
1634
- /* @__PURE__ */ e(
1648
+ /* @__PURE__ */ i(
1635
1649
  "img",
1636
1650
  {
1637
1651
  className: "character-sheet-background",
1638
1652
  src: "/images/parchment_texture_a4_lightened.jpg"
1639
1653
  }
1640
1654
  ),
1641
- /* @__PURE__ */ e("div", { className: "sheet-content", children: i.children }),
1642
- /* @__PURE__ */ e("div", { className: "spacer" }),
1643
- /* @__PURE__ */ e("div", { className: "info-footer-container", children: [
1644
- /* @__PURE__ */ e("div", { className: "info-author-credit", children: [
1645
- /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1646
- /* @__PURE__ */ e("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
1655
+ /* @__PURE__ */ i("div", { className: "sheet-content", children: e.children }),
1656
+ /* @__PURE__ */ i("div", { className: "spacer" }),
1657
+ /* @__PURE__ */ i("div", { className: "info-footer-container", children: [
1658
+ /* @__PURE__ */ i("div", { className: "info-author-credit", children: [
1659
+ /* @__PURE__ */ i("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1660
+ /* @__PURE__ */ i("p", { children: "Script template by John Forster ravenswoodstudio.xyz" })
1647
1661
  ] }),
1648
- /* @__PURE__ */ e("div", { className: "info-footer-background" }),
1649
- /* @__PURE__ */ e(
1662
+ /* @__PURE__ */ i("div", { className: "info-footer-background" }),
1663
+ /* @__PURE__ */ i(
1650
1664
  "div",
1651
1665
  {
1652
1666
  className: "info-footer-overlay",
@@ -1657,30 +1671,30 @@ const K = (i) => {
1657
1671
  ]
1658
1672
  }
1659
1673
  ) });
1660
- }, ie = () => /* @__PURE__ */ e("img", { className: "reminder-icon", src: "/images/reminder.png" }), A = (i) => {
1661
- const t = k(i.entry), { reminderText: a, name: r } = te(i.entry, i.night), n = typeof i.entry == "string" ? "#222" : b[i.entry.team];
1674
+ }, ae = () => /* @__PURE__ */ i("img", { className: "reminder-icon", src: "/images/reminder.png" }), A = (e) => {
1675
+ const t = k(e.entry), { reminderText: a, name: r } = ne(e.entry, e.night), n = typeof e.entry == "string" ? "#222" : b[e.entry.team];
1662
1676
  if (!a)
1663
- return console.warn("No reminder text found for:", i.entry), /* @__PURE__ */ e(f, {});
1664
- const h = (o) => o.split(":reminder:").map((s, c) => c % 2 === 0 ? s : /* @__PURE__ */ e(ie, {}));
1665
- return /* @__PURE__ */ e("div", { className: "night-sheet-entry", children: [
1666
- /* @__PURE__ */ e("img", { src: t }),
1667
- /* @__PURE__ */ e("div", { className: "night-sheet-entry-text", children: [
1668
- /* @__PURE__ */ e("p", { className: "reminder-name", style: { color: n }, children: r }),
1669
- /* @__PURE__ */ e("p", { className: "reminder-text", children: ((o) => {
1670
- const s = o.split("*").map((c, d) => d % 2 === 0 ? c : /* @__PURE__ */ e("strong", { children: c })).map((c) => typeof c == "string" ? h(c) : c);
1671
- return /* @__PURE__ */ e(f, { children: s });
1677
+ return console.warn("No reminder text found for:", e.entry), /* @__PURE__ */ i(f, {});
1678
+ const l = (o) => o.split(":reminder:").map((h, s) => s % 2 === 0 ? h : /* @__PURE__ */ i(ae, {}));
1679
+ return /* @__PURE__ */ i("div", { className: "night-sheet-entry", children: [
1680
+ /* @__PURE__ */ i("img", { src: t }),
1681
+ /* @__PURE__ */ i("div", { className: "night-sheet-entry-text", children: [
1682
+ /* @__PURE__ */ i("p", { className: "reminder-name", style: { color: n }, children: r }),
1683
+ /* @__PURE__ */ i("p", { className: "reminder-text", children: ((o) => {
1684
+ const h = o.split("*").map((s, d) => d % 2 === 0 ? s : /* @__PURE__ */ i("strong", { children: s })).map((s) => typeof s == "string" ? l(s) : s);
1685
+ return /* @__PURE__ */ i(f, { children: h });
1672
1686
  })(a) })
1673
1687
  ] })
1674
1688
  ] });
1675
- }, te = (i, t) => {
1676
- if (typeof i == "object") {
1677
- const a = t === "first" ? i.firstNightReminder : i.otherNightReminder, r = i.name;
1689
+ }, ne = (e, t) => {
1690
+ if (typeof e == "object") {
1691
+ const a = t === "first" ? e.firstNightReminder : e.otherNightReminder, r = e.name;
1678
1692
  return { reminderText: a, name: r };
1679
1693
  } else {
1680
- const a = ae[i], r = t === "first" ? a.first : a.other ?? "", n = a.name;
1694
+ const a = re[e], r = t === "first" ? a.first : a.other ?? "", n = a.name;
1681
1695
  return { reminderText: r, name: n };
1682
1696
  }
1683
- }, ae = {
1697
+ }, re = {
1684
1698
  dusk: {
1685
1699
  first: "Start the Night Phase.",
1686
1700
  name: "Dusk",
@@ -1700,10 +1714,10 @@ const K = (i) => {
1700
1714
  name: "Minion Info"
1701
1715
  }
1702
1716
  };
1703
- function ne(i) {
1704
- const t = i.filter((n) => n.team === "fabled");
1717
+ function oe(e) {
1718
+ const t = e.filter((n) => n.team === "fabled");
1705
1719
  return [
1706
- ...i.filter((n) => n.team === "loric").map((n) => ({
1720
+ ...e.filter((n) => n.team === "loric").map((n) => ({
1707
1721
  name: n.name,
1708
1722
  note: n.ability,
1709
1723
  image: n.wiki_image ?? (Array.isArray(n.image) ? n.image[0] : n.image)
@@ -1715,36 +1729,36 @@ function ne(i) {
1715
1729
  }))
1716
1730
  ];
1717
1731
  }
1718
- function se({ script: i, options: t, nightOrders: a }) {
1732
+ function le({ script: e, options: t, nightOrders: a }) {
1719
1733
  var r;
1720
- return /* @__PURE__ */ e("div", { className: "sheet-wrapper", children: [
1721
- Array(t.numberOfCharacterSheets).fill(!0).map((n, h) => {
1722
- var l, o, s, c;
1723
- return /* @__PURE__ */ e("div", { className: h === 0 ? "" : "print-only", children: [
1724
- /* @__PURE__ */ e(
1725
- V,
1734
+ return /* @__PURE__ */ i("div", { className: "sheet-wrapper", children: [
1735
+ Array(t.numberOfCharacterSheets).fill(!0).map((n, l) => {
1736
+ var c, o, h, s;
1737
+ return /* @__PURE__ */ i("div", { className: l === 0 ? "" : "print-only", children: [
1738
+ /* @__PURE__ */ i(
1739
+ F,
1726
1740
  {
1727
- title: ((l = i.metadata) == null ? void 0 : l.name) || "Custom Script",
1728
- author: t.showAuthor ? (o = i.metadata) == null ? void 0 : o.author : void 0,
1729
- characters: G(i.characters),
1741
+ title: ((c = e.metadata) == null ? void 0 : c.name) || "Custom Script",
1742
+ author: t.showAuthor ? (o = e.metadata) == null ? void 0 : o.author : void 0,
1743
+ characters: $(e.characters),
1730
1744
  color: t.color,
1731
- jinxes: t.showJinxes ? $(i.characters, t.useOldJinxes) : [],
1732
- fabledOrLoric: ne(i.characters),
1745
+ jinxes: t.showJinxes ? V(e.characters, t.useOldJinxes) : [],
1746
+ fabledOrLoric: oe(e.characters),
1733
1747
  showSwirls: t.showSwirls,
1734
1748
  includeMargins: t.includeMargins,
1735
1749
  solidTitle: t.solidTitle,
1736
1750
  iconScale: t.iconScale,
1737
1751
  appearance: t.appearance,
1738
1752
  inlineJinxIcons: t.inlineJinxIcons,
1739
- bootleggerRules: (s = i.metadata) == null ? void 0 : s.bootlegger
1753
+ bootleggerRules: (h = e.metadata) == null ? void 0 : h.bootlegger
1740
1754
  }
1741
1755
  ),
1742
- /* @__PURE__ */ e("div", { style: "break-after:page;" }),
1743
- t.showBackingSheet && /* @__PURE__ */ e(f, { children: [
1744
- /* @__PURE__ */ e(
1745
- Q,
1756
+ /* @__PURE__ */ i("div", { style: "break-after:page;" }),
1757
+ t.showBackingSheet && /* @__PURE__ */ i(f, { children: [
1758
+ /* @__PURE__ */ i(
1759
+ ie,
1746
1760
  {
1747
- title: ((c = i.metadata) == null ? void 0 : c.name) || "Custom Script",
1761
+ title: ((s = e.metadata) == null ? void 0 : s.name) || "Custom Script",
1748
1762
  color: t.color,
1749
1763
  includeMargins: t.includeMargins,
1750
1764
  nightOrders: a,
@@ -1753,31 +1767,31 @@ function se({ script: i, options: t, nightOrders: a }) {
1753
1767
  displayPlayerCounts: t.displayPlayerCounts
1754
1768
  }
1755
1769
  ),
1756
- /* @__PURE__ */ e("div", { style: "break-after:page;" })
1770
+ /* @__PURE__ */ i("div", { style: "break-after:page;" })
1757
1771
  ] })
1758
1772
  ] });
1759
1773
  }),
1760
- t.showNightSheet && /* @__PURE__ */ e(f, { children: [
1761
- /* @__PURE__ */ e(
1762
- ee,
1774
+ t.showNightSheet && /* @__PURE__ */ i(f, { children: [
1775
+ /* @__PURE__ */ i(
1776
+ te,
1763
1777
  {
1764
1778
  firstNightOrder: a.first,
1765
1779
  otherNightOrder: a.other,
1766
1780
  includeMargins: t.includeMargins,
1767
- title: ((r = i.metadata) == null ? void 0 : r.name) || "Custom Script",
1781
+ title: ((r = e.metadata) == null ? void 0 : r.name) || "Custom Script",
1768
1782
  color: t.color
1769
1783
  }
1770
1784
  ),
1771
- /* @__PURE__ */ e("div", { style: "break-after:page;" })
1785
+ /* @__PURE__ */ i("div", { style: "break-after:page;" })
1772
1786
  ] })
1773
1787
  ] });
1774
1788
  }
1775
1789
  export {
1776
- V as CharacterSheet,
1777
- se as FancyDoc,
1778
- ee as NightSheet,
1779
- Q as SheetBack,
1780
- R as darken,
1790
+ F as CharacterSheet,
1791
+ le as FancyDoc,
1792
+ te as NightSheet,
1793
+ ie as SheetBack,
1794
+ B as darken,
1781
1795
  z as parseRgb,
1782
- H as rgbString
1796
+ _ as rgbString
1783
1797
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botc-character-sheet",
3
- "version": "0.16.1",
3
+ "version": "0.17.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",