botc-character-sheet 0.15.2-beta.0 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"FancyDoc.d.ts","sourceRoot":"","sources":["../src/FancyDoc.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGnE,OAAO,gBAAgB,CAAC;AAExB,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,aAAa,gCA0DvE"}
1
+ {"version":3,"file":"FancyDoc.d.ts","sourceRoot":"","sources":["../src/FancyDoc.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGnE,OAAO,gBAAgB,CAAC;AAExB,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,aAAa,gCA2DvE"}
@@ -4,7 +4,8 @@ interface JinxesSectionProps {
4
4
  jinxes: Jinx[];
5
5
  allCharacters: ResolvedCharacter[];
6
6
  fabledAndLoric: FabledOrLoric[];
7
+ bootleggerRules: string[];
7
8
  }
8
- export declare function JinxesAndSpecial({ jinxes, allCharacters, fabledAndLoric, }: JinxesSectionProps): import("preact").JSX.Element | null;
9
+ export declare function JinxesAndSpecial({ jinxes, allCharacters, fabledAndLoric, bootleggerRules, }: JinxesSectionProps): import("preact").JSX.Element | null;
9
10
  export {};
10
11
  //# sourceMappingURL=JinxesAndSpecial.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JinxesAndSpecial.d.ts","sourceRoot":"","sources":["../../src/components/JinxesAndSpecial.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,UAAU,kBAAkB;IAC1B,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,cAAc,EAAE,aAAa,EAAE,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,uCA4EpB"}
1
+ {"version":3,"file":"JinxesAndSpecial.d.ts","sourceRoot":"","sources":["../../src/components/JinxesAndSpecial.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,UAAU,kBAAkB;IAC1B,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,aAAa,EACb,cAAc,EACd,eAAe,GAChB,EAAE,kBAAkB,uCAgGpB"}
package/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
- import { options as S, Fragment as u } from "preact";
2
- var E = 0;
3
- function e(i, t, a, r, n, h) {
1
+ import { options as N, Fragment as f } from "preact";
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 d = { type: i, props: s, key: a, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --E, __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 S.vnode && S.vnode(d), d;
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 C(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 z(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] = C(i), h = Math.round(a * t), l = Math.round(r * t), o = Math.round(n * t);
26
- return z(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
- const p = {
28
+ const b = {
29
29
  townsfolk: "#00469e",
30
30
  outsider: "#00469e",
31
31
  minion: "#580709",
@@ -34,106 +34,140 @@ const p = {
34
34
  traveller: "#390758ff",
35
35
  loric: "#1f5807"
36
36
  };
37
- function k(i) {
38
- return Array.isArray(i) ? i : [i];
37
+ function j(e) {
38
+ return Array.isArray(e) ? e : [e];
39
39
  }
40
- function A(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 j(i, t = 90) {
54
- const a = k(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 H({
64
- jinxes: i,
63
+ function R({
64
+ jinxes: e,
65
65
  allCharacters: t,
66
- fabledAndLoric: a
66
+ fabledAndLoric: a,
67
+ bootleggerRules: r
67
68
  }) {
68
- const r = new Map(
69
+ const n = new Map(
69
70
  t.map((m) => [m.id.toLowerCase(), m])
70
- ), n = i.length > 0 && a.length > 0, h = i.length > 0 && a.length === 0, l = i.length === 0 && a.length > 0, o = [...i, ...a], s = n || i.length > 4 || a.length > 4, d = s ? Math.ceil(o.length / 2) : o.length;
71
- let c, y;
72
- if (n)
73
- c = i.map((m, g) => /* @__PURE__ */ e(b, { jinx: m, charMap: r }, `lc-${g}`)), y = a.map((m, g) => /* @__PURE__ */ e(x, { item: m }, `rc-${g}`));
74
- else if (h && s)
75
- c = i.slice(0, d).map((m, g) => /* @__PURE__ */ e(b, { jinx: m, charMap: r }, `lc-${g}`)), y = i.slice(d).map((m, g) => /* @__PURE__ */ e(b, { jinx: m, charMap: r }, `rc-${g}`));
76
- else if (l && s)
77
- c = a.slice(0, d).map((m, g) => /* @__PURE__ */ e(x, { item: m }, `lc-${g}`)), y = a.slice(d).map((m, g) => /* @__PURE__ */ e(x, { item: m }, `rc-${g}`));
78
- else if (h)
79
- c = i.map((m, g) => /* @__PURE__ */ e(b, { jinx: m, charMap: r }, `lc-${g}`));
80
- else if (l)
81
- c = a.map((m, g) => /* @__PURE__ */ e(x, { item: m }, `lc-${g}`));
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
+ let y, u;
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
+ v,
76
+ {
77
+ item: m,
78
+ bootleggerRules: r
79
+ },
80
+ `rc-${g}`
81
+ ));
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
+ v,
87
+ {
88
+ item: m,
89
+ bootleggerRules: r
90
+ },
91
+ `lc-${g}`
92
+ )), u = a.slice(d).map((m, g) => /* @__PURE__ */ i(
93
+ v,
94
+ {
95
+ item: m,
96
+ bootleggerRules: r
97
+ },
98
+ `rc-${g}`
99
+ ));
100
+ else if (c)
101
+ y = e.map((m, g) => /* @__PURE__ */ i(x, { jinx: m, charMap: n }, `lc-${g}`));
102
+ else if (o)
103
+ y = a.map((m, g) => /* @__PURE__ */ i(
104
+ v,
105
+ {
106
+ item: m,
107
+ bootleggerRules: r
108
+ },
109
+ `lc-${g}`
110
+ ));
82
111
  else
83
112
  return null;
84
- return /* @__PURE__ */ e("div", { className: "jinxes-section", children: [
85
- /* @__PURE__ */ e("h2", { className: "section-title" }),
86
- y ? /* @__PURE__ */ e("div", { className: "jinxes-list jinxes-two-columns", children: [
87
- /* @__PURE__ */ e("div", { className: "jinx-column", children: [
88
- ...c
89
- ] }),
90
- /* @__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: [
91
117
  ...y
118
+ ] }),
119
+ /* @__PURE__ */ i("div", { className: "jinx-column", children: [
120
+ ...u
92
121
  ] })
93
- ] }) : /* @__PURE__ */ e("div", { className: "jinxes-list", children: [
94
- ...c
122
+ ] }) : /* @__PURE__ */ i("div", { className: "jinxes-list", children: [
123
+ ...y
95
124
  ] })
96
125
  ] });
97
126
  }
98
- const b = ({ charMap: i, jinx: t }) => {
99
- const a = i.get(t.characters[0]), r = i.get(t.characters[1]);
100
- return /* @__PURE__ */ e("div", { className: "jinx-item", children: [
101
- /* @__PURE__ */ e("div", { className: "jinx-icons", children: [
102
- a && /* @__PURE__ */ e("div", { className: "jinx-icon-wrapper", children: v(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(
103
132
  "img",
104
133
  {
105
- src: v(a),
134
+ src: w(a),
106
135
  alt: a.name,
107
136
  className: "jinx-icon"
108
137
  }
109
- ) : /* @__PURE__ */ e("div", { className: "jinx-icon-placeholder", children: a.name.charAt(0) }) }),
110
- /* @__PURE__ */ e("span", { className: "jinx-divider" }),
111
- r && /* @__PURE__ */ e("div", { className: "jinx-icon-wrapper", children: v(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(
112
141
  "img",
113
142
  {
114
- src: v(r),
143
+ src: w(r),
115
144
  alt: r.name,
116
145
  className: "jinx-icon"
117
146
  }
118
- ) : /* @__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) }) })
119
148
  ] }),
120
- /* @__PURE__ */ e("p", { className: "jinx-text", children: t.jinx })
149
+ /* @__PURE__ */ i("p", { className: "jinx-text", children: t.jinx })
121
150
  ] });
122
151
  };
123
- function x({ item: i }) {
124
- return /* @__PURE__ */ e("div", { className: "jinx-item loric", children: [
125
- /* @__PURE__ */ e("div", { className: "loric-spacer" }),
126
- 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) }),
127
- /* @__PURE__ */ e("div", { className: "loric-text-container", children: [
128
- /* @__PURE__ */ e("p", { className: "jinx-text loric-name", children: i.name }),
129
- /* @__PURE__ */ e("p", { className: "jinx-text loric-text", children: i.note })
152
+ function v({
153
+ item: e,
154
+ bootleggerRules: t
155
+ }) {
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}`))
130
164
  ] })
131
165
  ] });
132
166
  }
133
- function v(i) {
134
- 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;
135
169
  }
136
- const _ = [
170
+ const G = [
137
171
  {
138
172
  characters: [
139
173
  "alchemist",
@@ -1112,7 +1146,7 @@ const _ = [
1112
1146
  oldJinx: "If the Exorcist chooses the Yaggababble, the Yaggababble ability does not kill tonight."
1113
1147
  }
1114
1148
  ];
1115
- function B(i) {
1149
+ function $(e) {
1116
1150
  const t = {
1117
1151
  townsfolk: [],
1118
1152
  outsider: [],
@@ -1122,7 +1156,7 @@ function B(i) {
1122
1156
  fabled: [],
1123
1157
  loric: []
1124
1158
  };
1125
- for (const a of i)
1159
+ for (const a of e)
1126
1160
  try {
1127
1161
  t[a.team].push(a);
1128
1162
  } catch {
@@ -1130,11 +1164,11 @@ function B(i) {
1130
1164
  }
1131
1165
  return t;
1132
1166
  }
1133
- function G(i, t = !1) {
1134
- const a = new Set(i.map((n) => n.id.toLowerCase())), r = [];
1135
- for (const n of _) {
1136
- const [h, l] = n.characters;
1137
- 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({
1138
1172
  characters: n.characters,
1139
1173
  jinx: n.oldJinx
1140
1174
  }) : r.push({
@@ -1142,113 +1176,114 @@ function G(i, t = !1) {
1142
1176
  jinx: n.jinx
1143
1177
  }));
1144
1178
  }
1145
- for (const n of i) {
1146
- const h = typeof n == "object" && n !== null, l = "jinxes" in n;
1147
- 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;
1148
1182
  console.log("char.jinxes:", n.jinxes);
1149
- const o = n, s = o.id.toLowerCase();
1150
- if (a.has(s) && o.jinxes)
1151
- for (const d of o.jinxes) {
1152
- const c = d.id.toLowerCase();
1153
- if (console.log(`${n.id} is jinxed with ${c}`), a.has(c) || (console.log("characterIds doesnt contain charId", c), console.log("characterIds:", a)), a.has(c)) {
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
+ 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)) {
1154
1188
  const y = r.some(
1155
- (m) => m.characters[0] === s && m.characters[1] === c || m.characters[0] === c && m.characters[1] === s
1189
+ (u) => u.characters[0] === h && u.characters[1] === d || u.characters[0] === d && u.characters[1] === h
1156
1190
  );
1157
1191
  console.log("Jinx already exists:", y), y || r.push({
1158
- characters: [s, c],
1159
- jinx: d.reason
1192
+ characters: [h, d],
1193
+ jinx: s.reason
1160
1194
  });
1161
1195
  }
1162
1196
  }
1163
1197
  }
1164
1198
  return r;
1165
1199
  }
1166
- const N = (i) => i.wiki_image ? i.wiki_image : i.image ? typeof i.image == "string" ? i.image : i.image[0] : null;
1167
- function M(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) {
1168
1202
  const r = [];
1169
1203
  return t.forEach((n) => {
1170
- 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]);
1171
1205
  }), a.filter(
1172
1206
  (n) => r.includes(n.id)
1173
1207
  );
1174
1208
  }
1175
- function $({
1176
- title: i,
1209
+ function F({
1210
+ title: e,
1177
1211
  author: t,
1178
1212
  characters: a,
1179
1213
  color: r = "#4a5568",
1180
1214
  jinxes: n = [],
1181
- showSwirls: h = !0,
1182
- includeMargins: l = !1,
1215
+ showSwirls: l = !0,
1216
+ includeMargins: c = !1,
1183
1217
  solidTitle: o = !1,
1184
- iconScale: s = 1.6,
1185
- appearance: d = "normal",
1186
- fabledOrLoric: c = [],
1187
- inlineJinxIcons: y = !1
1218
+ iconScale: h = 1.6,
1219
+ appearance: s = "normal",
1220
+ fabledOrLoric: d = [],
1221
+ inlineJinxIcons: y = !1,
1222
+ bootleggerRules: u = []
1188
1223
  }) {
1189
1224
  const m = [
1190
1225
  {
1191
1226
  key: "townsfolk",
1192
1227
  title: "Townsfolk",
1193
1228
  chars: a.townsfolk,
1194
- color: p.townsfolk
1229
+ color: b.townsfolk
1195
1230
  },
1196
1231
  {
1197
1232
  key: "outsider",
1198
1233
  title: "Outsiders",
1199
1234
  chars: a.outsider,
1200
- color: p.outsider
1235
+ color: b.outsider
1201
1236
  },
1202
1237
  {
1203
1238
  key: "minion",
1204
1239
  title: "Minions",
1205
1240
  chars: a.minion,
1206
- color: p.minion
1241
+ color: b.minion
1207
1242
  },
1208
1243
  {
1209
1244
  key: "demon",
1210
1245
  title: "Demons",
1211
1246
  chars: a.demon,
1212
- color: p.demon
1247
+ color: b.demon
1213
1248
  }
1214
- ].filter((f) => f.chars.length > 0), g = k(r), O = A(g, 20), P = ["character-sheet", d !== "normal" ? `appearance-${d}` : ""].filter(Boolean).join(" ");
1215
- 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(
1216
1251
  "div",
1217
1252
  {
1218
- className: P,
1253
+ className: E,
1219
1254
  id: "character-sheet",
1220
1255
  style: {
1221
- "--header-gradient": O,
1222
- transform: l ? "scale(0.952)" : void 0
1256
+ "--header-gradient": W,
1257
+ transform: c ? "scale(0.952)" : void 0
1223
1258
  },
1224
1259
  children: [
1225
- /* @__PURE__ */ e(
1260
+ /* @__PURE__ */ i(
1226
1261
  "img",
1227
1262
  {
1228
1263
  className: "character-sheet-background",
1229
1264
  src: "/images/parchment_texture_a4_lightened.jpg"
1230
1265
  }
1231
1266
  ),
1232
- /* @__PURE__ */ e(F, { color: r }),
1233
- /* @__PURE__ */ e("div", { className: "sheet-content", children: [
1234
- /* @__PURE__ */ e(
1235
- V,
1267
+ /* @__PURE__ */ i(Y, { color: r }),
1268
+ /* @__PURE__ */ i("div", { className: "sheet-content", children: [
1269
+ /* @__PURE__ */ i(
1270
+ U,
1236
1271
  {
1237
- showSwirls: h,
1238
- title: i,
1272
+ showSwirls: l,
1273
+ title: e,
1239
1274
  author: t,
1240
1275
  solidHeader: o
1241
1276
  }
1242
1277
  ),
1243
- /* @__PURE__ */ e("div", { className: "characters-grid", children: [
1244
- m.map((f, W) => /* @__PURE__ */ e(u, { children: [
1245
- /* @__PURE__ */ e(
1246
- U,
1278
+ /* @__PURE__ */ i("div", { className: "characters-grid", children: [
1279
+ m.map((p, C) => /* @__PURE__ */ i(f, { children: [
1280
+ /* @__PURE__ */ i(
1281
+ Z,
1247
1282
  {
1248
- title: f.title.toUpperCase(),
1249
- characters: f.chars,
1250
- charNameColor: f.color,
1251
- iconScale: s,
1283
+ title: p.title.toUpperCase(),
1284
+ characters: p.chars,
1285
+ charNameColor: p.color,
1286
+ iconScale: h,
1252
1287
  jinxes: n,
1253
1288
  allCharacters: [
1254
1289
  ...a.townsfolk,
@@ -1258,56 +1293,57 @@ function $({
1258
1293
  ],
1259
1294
  inlineJinxIcons: y
1260
1295
  },
1261
- f.key
1296
+ p.key
1262
1297
  ),
1263
- W < 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" })
1264
1299
  ] })),
1265
- (n.length > 0 || c.length > 0) && /* @__PURE__ */ e(u, { children: [
1266
- /* @__PURE__ */ e("img", { src: "/images/divider.png", className: "section-divider" }),
1267
- /* @__PURE__ */ e(
1268
- H,
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,
1269
1304
  {
1270
- fabledAndLoric: c,
1305
+ fabledAndLoric: d,
1271
1306
  jinxes: n,
1272
1307
  allCharacters: [
1273
1308
  ...a.townsfolk,
1274
1309
  ...a.outsider,
1275
1310
  ...a.minion,
1276
1311
  ...a.demon
1277
- ]
1312
+ ],
1313
+ bootleggerRules: u
1278
1314
  }
1279
1315
  )
1280
1316
  ] })
1281
1317
  ] }),
1282
- /* @__PURE__ */ e("div", { className: "sheet-footer", children: [
1283
- /* @__PURE__ */ e("span", { className: "asterisk", children: "*" }),
1318
+ /* @__PURE__ */ i("div", { className: "sheet-footer", children: [
1319
+ /* @__PURE__ */ i("span", { className: "asterisk", children: "*" }),
1284
1320
  "Not the first night"
1285
1321
  ] })
1286
1322
  ] }),
1287
- /* @__PURE__ */ e("div", { className: "author-credit", children: [
1288
- /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1289
- /* @__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" })
1290
1326
  ] })
1291
1327
  ]
1292
1328
  }
1293
1329
  );
1294
1330
  }
1295
- function V({
1296
- showSwirls: i,
1331
+ function U({
1332
+ showSwirls: e,
1297
1333
  title: t,
1298
1334
  author: a,
1299
1335
  solidHeader: r = !1
1300
1336
  }) {
1301
- return /* @__PURE__ */ e(u, { children: [
1302
- /* @__PURE__ */ e("h1", { className: "sheet-header", children: [
1303
- i && /* @__PURE__ */ e(
1337
+ return /* @__PURE__ */ i(f, { children: [
1338
+ /* @__PURE__ */ i("h1", { className: "sheet-header", children: [
1339
+ e && /* @__PURE__ */ i(
1304
1340
  "img",
1305
1341
  {
1306
1342
  src: "/images/black-swirl-divider.png",
1307
1343
  className: "swirl-divider"
1308
1344
  }
1309
1345
  ),
1310
- /* @__PURE__ */ e(
1346
+ /* @__PURE__ */ i(
1311
1347
  "span",
1312
1348
  {
1313
1349
  style: {
@@ -1316,7 +1352,7 @@ function V({
1316
1352
  children: t
1317
1353
  }
1318
1354
  ),
1319
- i && /* @__PURE__ */ e(
1355
+ e && /* @__PURE__ */ i(
1320
1356
  "img",
1321
1357
  {
1322
1358
  src: "/images/black-swirl-divider.png",
@@ -1324,17 +1360,17 @@ function V({
1324
1360
  }
1325
1361
  )
1326
1362
  ] }),
1327
- a && /* @__PURE__ */ e("h2", { className: "sheet-author", children: [
1363
+ a && /* @__PURE__ */ i("h2", { className: "sheet-author", children: [
1328
1364
  "by ",
1329
1365
  a
1330
1366
  ] })
1331
1367
  ] });
1332
1368
  }
1333
- function F({ color: i }) {
1334
- const t = j(i, 180);
1335
- return /* @__PURE__ */ e("div", { className: "sidebar-container", children: [
1336
- /* @__PURE__ */ e("div", { className: "sidebar-background" }),
1337
- /* @__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(
1338
1374
  "div",
1339
1375
  {
1340
1376
  className: "sidebar-overlay",
@@ -1343,94 +1379,95 @@ function F({ color: i }) {
1343
1379
  )
1344
1380
  ] });
1345
1381
  }
1346
- function U({
1347
- title: i,
1382
+ const P = 8;
1383
+ function Z({
1384
+ title: e,
1348
1385
  characters: t,
1349
1386
  charNameColor: a,
1350
1387
  iconScale: r,
1351
1388
  jinxes: n,
1352
- allCharacters: h,
1353
- inlineJinxIcons: l
1389
+ allCharacters: l,
1390
+ inlineJinxIcons: c
1354
1391
  }) {
1355
- const o = t.length > 8 ? "space-between" : t.length % 2 === 0 ? "space-around" : "flex-start";
1356
- return /* @__PURE__ */ e("div", { className: "character-section", children: [
1357
- /* @__PURE__ */ e("h2", { className: "section-title", children: i }),
1358
- /* @__PURE__ */ e("div", { className: "character-list", children: [
1359
- /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(0, Math.ceil(t.length / 2)).map((s) => /* @__PURE__ */ e(
1360
- J,
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,
1361
1398
  {
1362
1399
  character: s,
1363
1400
  color: a,
1364
1401
  iconScale: r,
1365
- jinxedCharacters: M(s, n, h),
1366
- inlineJinxIcons: l
1402
+ jinxedCharacters: J(s, n, l),
1403
+ inlineJinxIcons: c
1367
1404
  },
1368
1405
  s.id
1369
1406
  )) }),
1370
- /* @__PURE__ */ e("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(Math.ceil(t.length / 2), t.length).map((s) => /* @__PURE__ */ e(
1371
- J,
1407
+ /* @__PURE__ */ i("div", { className: "character-column", style: { justifyContent: o }, children: t.slice(h, t.length).map((s) => /* @__PURE__ */ i(
1408
+ L,
1372
1409
  {
1373
1410
  character: s,
1374
1411
  color: a,
1375
1412
  iconScale: r,
1376
- jinxedCharacters: M(s, n, h),
1377
- inlineJinxIcons: l
1413
+ jinxedCharacters: J(s, n, l),
1414
+ inlineJinxIcons: c
1378
1415
  },
1379
1416
  s.id
1380
1417
  )) })
1381
1418
  ] })
1382
1419
  ] });
1383
1420
  }
1384
- function J({
1385
- character: i,
1421
+ function L({
1422
+ character: e,
1386
1423
  color: t,
1387
1424
  iconScale: a,
1388
1425
  jinxedCharacters: r,
1389
1426
  inlineJinxIcons: n
1390
1427
  }) {
1391
- const h = (o) => {
1392
- const s = o.match(/^(.*?)(\[.*?\])$/);
1393
- if (s) {
1394
- const [, d, c] = s;
1395
- return /* @__PURE__ */ e(u, { children: [
1396
- d,
1397
- /* @__PURE__ */ e("strong", { className: "setup-ability", children: c })
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 })
1398
1435
  ] });
1399
1436
  }
1400
1437
  return o;
1401
- }, l = N(i);
1402
- return /* @__PURE__ */ e("div", { className: "character-card", children: [
1403
- /* @__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(
1404
1441
  "img",
1405
1442
  {
1406
- src: l,
1407
- alt: i.name,
1443
+ src: c,
1444
+ alt: e.name,
1408
1445
  className: "character-icon",
1409
1446
  style: { scale: a.toString() }
1410
1447
  }
1411
- ) : /* @__PURE__ */ e(
1448
+ ) : /* @__PURE__ */ i(
1412
1449
  "div",
1413
1450
  {
1414
1451
  className: "character-icon-placeholder",
1415
1452
  style: { color: t, scale: a.toString() },
1416
- children: i.name.charAt(0)
1453
+ children: e.name.charAt(0)
1417
1454
  }
1418
1455
  ) }),
1419
- /* @__PURE__ */ e("div", { className: "character-info", children: [
1420
- /* @__PURE__ */ e("h3", { className: "character-name", style: { color: t }, children: [
1421
- i.name,
1422
- n && r.length > 0 && /* @__PURE__ */ e("span", { className: "inline-jinx-icons", children: r.map((o) => {
1423
- const s = N(o);
1424
- 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(
1425
1462
  "img",
1426
1463
  {
1427
- src: s,
1464
+ src: h,
1428
1465
  alt: o.name,
1429
1466
  className: "inline-jinx-icon",
1430
1467
  title: `Jinxed with ${o.name}`
1431
1468
  },
1432
1469
  o.id
1433
- ) : /* @__PURE__ */ e(
1470
+ ) : /* @__PURE__ */ i(
1434
1471
  "span",
1435
1472
  {
1436
1473
  className: "inline-jinx-icon-placeholder",
@@ -1441,10 +1478,23 @@ function J({
1441
1478
  );
1442
1479
  }) })
1443
1480
  ] }),
1444
- /* @__PURE__ */ e("p", { className: "character-ability", children: h(i.ability) })
1481
+ /* @__PURE__ */ i("p", { className: "character-ability", children: l(e.ability) })
1445
1482
  ] })
1446
1483
  ] });
1447
1484
  }
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
+ }
1448
1498
  const D = /* @__PURE__ */ new Set([
1449
1499
  "the",
1450
1500
  "of",
@@ -1465,21 +1515,21 @@ const D = /* @__PURE__ */ new Set([
1465
1515
  "upon",
1466
1516
  "after",
1467
1517
  "before"
1468
- ]), w = (i, t) => D.has(i) || t === 0 && D.has(i.toLowerCase()), Y = (i) => i.split(/\s+/).reduce((t, a, r, n) => {
1469
- const h = w(a, r), l = r > 0 && w(n[r - 1], r - 1);
1470
- if (r === 0 || h !== l) {
1471
- const s = [];
1472
- for (let c = r; c < n.length && w(n[c], c) === h; c++)
1473
- s.push(n[c]);
1474
- const d = 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;
1475
1525
  t.push(
1476
- /* @__PURE__ */ e(
1526
+ /* @__PURE__ */ i(
1477
1527
  "span",
1478
1528
  {
1479
- className: h ? "minor-word" : void 0,
1529
+ className: l ? "minor-word" : void 0,
1480
1530
  children: [
1481
- d && " ",
1482
- s.join(" ")
1531
+ s && " ",
1532
+ h.join(" ")
1483
1533
  ]
1484
1534
  },
1485
1535
  r
@@ -1488,22 +1538,22 @@ const D = /* @__PURE__ */ new Set([
1488
1538
  }
1489
1539
  return t;
1490
1540
  }, []);
1491
- function I(i) {
1492
- 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;
1493
1543
  }
1494
- const Z = (i) => {
1495
- const t = i.nightOrders.first, a = i.nightOrders.other;
1496
- return /* @__PURE__ */ e("div", { class: "night-orders-container", children: [
1497
- /* @__PURE__ */ e("div", { class: "night-order", children: [
1498
- /* @__PURE__ */ e("p", { children: "First Night:" }),
1499
- /* @__PURE__ */ e("div", { class: "icon-row", children: t.map((r) => /* @__PURE__ */ e("img", { src: I(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" })) })
1500
1550
  ] }),
1501
- /* @__PURE__ */ e("div", { class: "night-order", children: [
1502
- /* @__PURE__ */ e("p", { children: "Other Nights:" }),
1503
- /* @__PURE__ */ e("div", { class: "icon-row", children: a.map((r) => /* @__PURE__ */ e("img", { src: I(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" })) })
1504
1554
  ] })
1505
1555
  ] });
1506
- }, K = {
1556
+ }, Q = {
1507
1557
  5: [3, 0, 1, 1],
1508
1558
  6: [3, 1, 1, 1],
1509
1559
  7: [5, 0, 1, 1],
@@ -1515,38 +1565,38 @@ const Z = (i) => {
1515
1565
  13: [9, 0, 3, 1],
1516
1566
  14: [9, 1, 3, 1],
1517
1567
  "15+": [9, 2, 3, 1]
1518
- }, q = () => /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e("div", { className: "player-count-container", children: [
1519
- /* @__PURE__ */ e("div", { className: "count-column titles", children: [
1520
- /* @__PURE__ */ e("div", { className: "row-title", children: "Players" }),
1521
- /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Townsfolk" }),
1522
- /* @__PURE__ */ e("div", { className: "row-title good-count", children: "Outsiders" }),
1523
- /* @__PURE__ */ e("div", { className: "row-title evil-count", children: "Minions" }),
1524
- /* @__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" })
1525
1575
  ] }),
1526
- Object.entries(K).map(([i, t]) => /* @__PURE__ */ e("div", { className: "count-column", children: [
1527
- /* @__PURE__ */ e("div", { className: "player-count", children: i }),
1528
- /* @__PURE__ */ e("div", { className: "good-count", children: t[0] }),
1529
- /* @__PURE__ */ e("div", { className: "good-count", children: t[1] }),
1530
- /* @__PURE__ */ e("div", { className: "evil-count", children: t[2] }),
1531
- /* @__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] })
1532
1582
  ] }))
1533
- ] }) }), X = ({
1534
- title: i,
1583
+ ] }) }), ie = ({
1584
+ title: e,
1535
1585
  color: t,
1536
1586
  includeMargins: a,
1537
1587
  formatMinorWords: r = !1,
1538
1588
  displayNightOrder: n = !1,
1539
- nightOrders: h = { first: [], other: [] },
1540
- displayPlayerCounts: l = !0
1589
+ nightOrders: l = { first: [], other: [] },
1590
+ displayPlayerCounts: c = !0
1541
1591
  }) => {
1542
1592
  const o = () => {
1543
- const d = i.split("&");
1544
- return d.map((c, y) => /* @__PURE__ */ e(u, { children: [
1545
- r ? Y(c) : c,
1546
- y < d.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: "&" })
1547
1597
  ] }));
1548
- }, s = j(t, 180);
1549
- return /* @__PURE__ */ e(
1598
+ }, h = S(t, 180);
1599
+ return /* @__PURE__ */ i(
1550
1600
  "div",
1551
1601
  {
1552
1602
  className: "sheet-backing",
@@ -1554,63 +1604,63 @@ const Z = (i) => {
1554
1604
  transform: a ? "scale(0.952)" : void 0
1555
1605
  },
1556
1606
  children: [
1557
- /* @__PURE__ */ e("div", { className: "sheet-background", children: /* @__PURE__ */ e("div", { className: "title-container", children: /* @__PURE__ */ e("h1", { children: o() }) }) }),
1558
- /* @__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(
1559
1609
  "div",
1560
1610
  {
1561
1611
  className: "sheet-back-overlay",
1562
- style: { background: s }
1612
+ style: { background: h }
1563
1613
  }
1564
1614
  ),
1565
- /* @__PURE__ */ e("div", { className: "back-info-container", children: [
1566
- l && /* @__PURE__ */ e(q, {}),
1567
- n && /* @__PURE__ */ e(Z, { nightOrders: h })
1615
+ /* @__PURE__ */ i("div", { className: "back-info-container", children: [
1616
+ c && /* @__PURE__ */ i(ee, {}),
1617
+ n && /* @__PURE__ */ i(X, { nightOrders: l })
1568
1618
  ] })
1569
1619
  ]
1570
1620
  }
1571
1621
  );
1572
- }, Q = (i) => /* @__PURE__ */ e(u, { children: [
1573
- /* @__PURE__ */ e(L, { ...i, children: [
1574
- /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
1575
- /* @__PURE__ */ e("h3", { className: "night-title", children: "First Night" }),
1576
- /* @__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 })
1577
1627
  ] }),
1578
- /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.firstNightOrder.map((t) => /* @__PURE__ */ e(T, { entry: t, night: "first" })) })
1628
+ /* @__PURE__ */ i("div", { className: "night-sheet-order", children: e.firstNightOrder.map((t) => /* @__PURE__ */ i(A, { entry: t, night: "first" })) })
1579
1629
  ] }),
1580
- /* @__PURE__ */ e(L, { ...i, children: [
1581
- /* @__PURE__ */ e("div", { className: "night-sheet-heading", children: [
1582
- /* @__PURE__ */ e("h3", { className: "night-title", children: "Other Nights" }),
1583
- /* @__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 })
1584
1634
  ] }),
1585
- /* @__PURE__ */ e("div", { className: "night-sheet-order", children: i.otherNightOrder.map((t) => /* @__PURE__ */ e(T, { entry: t, night: "other" })) })
1635
+ /* @__PURE__ */ i("div", { className: "night-sheet-order", children: e.otherNightOrder.map((t) => /* @__PURE__ */ i(A, { entry: t, night: "other" })) })
1586
1636
  ] })
1587
- ] }), L = (i) => {
1588
- const t = k(i.color), a = A(t, 20), r = j(i.color, 180);
1589
- return /* @__PURE__ */ e(u, { 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(
1590
1640
  "div",
1591
1641
  {
1592
1642
  className: "night-sheet",
1593
1643
  style: {
1594
- transform: i.includeMargins ? "scale(0.952)" : void 0,
1644
+ transform: e.includeMargins ? "scale(0.952)" : void 0,
1595
1645
  "--header-gradient": a
1596
1646
  },
1597
1647
  children: [
1598
- /* @__PURE__ */ e(
1648
+ /* @__PURE__ */ i(
1599
1649
  "img",
1600
1650
  {
1601
1651
  className: "character-sheet-background",
1602
1652
  src: "/images/parchment_texture_a4_lightened.jpg"
1603
1653
  }
1604
1654
  ),
1605
- /* @__PURE__ */ e("div", { className: "sheet-content", children: i.children }),
1606
- /* @__PURE__ */ e("div", { className: "spacer" }),
1607
- /* @__PURE__ */ e("div", { className: "info-footer-container", children: [
1608
- /* @__PURE__ */ e("div", { className: "info-author-credit", children: [
1609
- /* @__PURE__ */ e("p", { children: "© Steven Medway bloodontheclocktower.com" }),
1610
- /* @__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" })
1611
1661
  ] }),
1612
- /* @__PURE__ */ e("div", { className: "info-footer-background" }),
1613
- /* @__PURE__ */ e(
1662
+ /* @__PURE__ */ i("div", { className: "info-footer-background" }),
1663
+ /* @__PURE__ */ i(
1614
1664
  "div",
1615
1665
  {
1616
1666
  className: "info-footer-overlay",
@@ -1621,30 +1671,30 @@ const Z = (i) => {
1621
1671
  ]
1622
1672
  }
1623
1673
  ) });
1624
- }, ee = () => /* @__PURE__ */ e("img", { className: "reminder-icon", src: "/images/reminder.png" }), T = (i) => {
1625
- const t = I(i.entry), { reminderText: a, name: r } = ie(i.entry, i.night), n = typeof i.entry == "string" ? "#222" : p[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];
1626
1676
  if (!a)
1627
- return console.warn("No reminder text found for:", i.entry), /* @__PURE__ */ e(u, {});
1628
- const h = (o) => o.split(":reminder:").map((s, d) => d % 2 === 0 ? s : /* @__PURE__ */ e(ee, {}));
1629
- return /* @__PURE__ */ e("div", { className: "night-sheet-entry", children: [
1630
- /* @__PURE__ */ e("img", { src: t }),
1631
- /* @__PURE__ */ e("div", { className: "night-sheet-entry-text", children: [
1632
- /* @__PURE__ */ e("p", { className: "reminder-name", style: { color: n }, children: r }),
1633
- /* @__PURE__ */ e("p", { className: "reminder-text", children: ((o) => {
1634
- const s = o.split("*").map((d, c) => c % 2 === 0 ? d : /* @__PURE__ */ e("strong", { children: d })).map((d) => typeof d == "string" ? h(d) : d);
1635
- return /* @__PURE__ */ e(u, { 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 });
1636
1686
  })(a) })
1637
1687
  ] })
1638
1688
  ] });
1639
- }, ie = (i, t) => {
1640
- if (typeof i == "object") {
1641
- 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;
1642
1692
  return { reminderText: a, name: r };
1643
1693
  } else {
1644
- const a = te[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;
1645
1695
  return { reminderText: r, name: n };
1646
1696
  }
1647
- }, te = {
1697
+ }, re = {
1648
1698
  dusk: {
1649
1699
  first: "Start the Night Phase.",
1650
1700
  name: "Dusk",
@@ -1664,10 +1714,10 @@ const Z = (i) => {
1664
1714
  name: "Minion Info"
1665
1715
  }
1666
1716
  };
1667
- function ae(i) {
1668
- const t = i.filter((n) => n.team === "fabled");
1717
+ function oe(e) {
1718
+ const t = e.filter((n) => n.team === "fabled");
1669
1719
  return [
1670
- ...i.filter((n) => n.team === "loric").map((n) => ({
1720
+ ...e.filter((n) => n.team === "loric").map((n) => ({
1671
1721
  name: n.name,
1672
1722
  note: n.ability,
1673
1723
  image: n.wiki_image ?? (Array.isArray(n.image) ? n.image[0] : n.image)
@@ -1679,35 +1729,36 @@ function ae(i) {
1679
1729
  }))
1680
1730
  ];
1681
1731
  }
1682
- function oe({ script: i, options: t, nightOrders: a }) {
1732
+ function le({ script: e, options: t, nightOrders: a }) {
1683
1733
  var r;
1684
- return /* @__PURE__ */ e("div", { className: "sheet-wrapper", children: [
1685
- Array(t.numberOfCharacterSheets).fill(!0).map((n, h) => {
1686
- var l, o, s;
1687
- return /* @__PURE__ */ e("div", { className: h === 0 ? "" : "print-only", children: [
1688
- /* @__PURE__ */ e(
1689
- $,
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,
1690
1740
  {
1691
- title: ((l = i.metadata) == null ? void 0 : l.name) || "Custom Script",
1692
- author: t.showAuthor ? (o = i.metadata) == null ? void 0 : o.author : void 0,
1693
- characters: B(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),
1694
1744
  color: t.color,
1695
- jinxes: t.showJinxes ? G(i.characters, t.useOldJinxes) : [],
1696
- fabledOrLoric: ae(i.characters),
1745
+ jinxes: t.showJinxes ? V(e.characters, t.useOldJinxes) : [],
1746
+ fabledOrLoric: oe(e.characters),
1697
1747
  showSwirls: t.showSwirls,
1698
1748
  includeMargins: t.includeMargins,
1699
1749
  solidTitle: t.solidTitle,
1700
1750
  iconScale: t.iconScale,
1701
1751
  appearance: t.appearance,
1702
- inlineJinxIcons: t.inlineJinxIcons
1752
+ inlineJinxIcons: t.inlineJinxIcons,
1753
+ bootleggerRules: (h = e.metadata) == null ? void 0 : h.bootlegger
1703
1754
  }
1704
1755
  ),
1705
- /* @__PURE__ */ e("div", { style: "break-after:page;" }),
1706
- t.showBackingSheet && /* @__PURE__ */ e(u, { children: [
1707
- /* @__PURE__ */ e(
1708
- X,
1756
+ /* @__PURE__ */ i("div", { style: "break-after:page;" }),
1757
+ t.showBackingSheet && /* @__PURE__ */ i(f, { children: [
1758
+ /* @__PURE__ */ i(
1759
+ ie,
1709
1760
  {
1710
- title: ((s = i.metadata) == null ? void 0 : s.name) || "Custom Script",
1761
+ title: ((s = e.metadata) == null ? void 0 : s.name) || "Custom Script",
1711
1762
  color: t.color,
1712
1763
  includeMargins: t.includeMargins,
1713
1764
  nightOrders: a,
@@ -1716,31 +1767,31 @@ function oe({ script: i, options: t, nightOrders: a }) {
1716
1767
  displayPlayerCounts: t.displayPlayerCounts
1717
1768
  }
1718
1769
  ),
1719
- /* @__PURE__ */ e("div", { style: "break-after:page;" })
1770
+ /* @__PURE__ */ i("div", { style: "break-after:page;" })
1720
1771
  ] })
1721
1772
  ] });
1722
1773
  }),
1723
- t.showNightSheet && /* @__PURE__ */ e(u, { children: [
1724
- /* @__PURE__ */ e(
1725
- Q,
1774
+ t.showNightSheet && /* @__PURE__ */ i(f, { children: [
1775
+ /* @__PURE__ */ i(
1776
+ te,
1726
1777
  {
1727
1778
  firstNightOrder: a.first,
1728
1779
  otherNightOrder: a.other,
1729
1780
  includeMargins: t.includeMargins,
1730
- title: ((r = i.metadata) == null ? void 0 : r.name) || "Custom Script",
1781
+ title: ((r = e.metadata) == null ? void 0 : r.name) || "Custom Script",
1731
1782
  color: t.color
1732
1783
  }
1733
1784
  ),
1734
- /* @__PURE__ */ e("div", { style: "break-after:page;" })
1785
+ /* @__PURE__ */ i("div", { style: "break-after:page;" })
1735
1786
  ] })
1736
1787
  ] });
1737
1788
  }
1738
1789
  export {
1739
- $ as CharacterSheet,
1740
- oe as FancyDoc,
1741
- Q as NightSheet,
1742
- X as SheetBack,
1743
- R as darken,
1744
- C as parseRgb,
1745
- z as rgbString
1790
+ F as CharacterSheet,
1791
+ le as FancyDoc,
1792
+ te as NightSheet,
1793
+ ie as SheetBack,
1794
+ B as darken,
1795
+ z as parseRgb,
1796
+ _ as rgbString
1746
1797
  };
@@ -13,7 +13,8 @@ interface CharacterSheetProps {
13
13
  appearance?: "normal" | "compact" | "super-compact" | "mega-compact";
14
14
  fabledOrLoric?: FabledOrLoric[];
15
15
  inlineJinxIcons?: boolean;
16
+ bootleggerRules?: string[];
16
17
  }
17
- export declare function CharacterSheet({ title, author, characters, color, jinxes, showSwirls, includeMargins, solidTitle, iconScale, appearance, fabledOrLoric, inlineJinxIcons, }: CharacterSheetProps): import("preact").JSX.Element;
18
+ export declare function CharacterSheet({ title, author, characters, color, jinxes, showSwirls, includeMargins, solidTitle, iconScale, appearance, fabledOrLoric, inlineJinxIcons, bootleggerRules, }: CharacterSheetProps): import("preact").JSX.Element;
18
19
  export {};
19
20
  //# sourceMappingURL=CharacterSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CharacterSheet.d.ts","sourceRoot":"","sources":["../../src/pages/CharacterSheet.tsx"],"names":[],"mappings":"AAOA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAqB,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IACrE,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,UAAU,EACV,KAAiB,EACjB,MAAW,EACX,UAAiB,EACjB,cAAsB,EACtB,UAAkB,EAClB,SAAe,EACf,UAAqB,EACrB,aAAkB,EAClB,eAAuB,GACxB,EAAE,mBAAmB,gCA+GrB"}
1
+ {"version":3,"file":"CharacterSheet.d.ts","sourceRoot":"","sources":["../../src/pages/CharacterSheet.tsx"],"names":[],"mappings":"AAOA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAqB,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IACrE,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,UAAU,EACV,KAAiB,EACjB,MAAW,EACX,UAAiB,EACjB,cAAsB,EACtB,UAAkB,EAClB,SAAe,EACf,UAAqB,EACrB,aAAkB,EAClB,eAAuB,EACvB,eAAoB,GACrB,EAAE,mBAAmB,gCAgHrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botc-character-sheet",
3
- "version": "0.15.2-beta.0",
3
+ "version": "0.17.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",