@bedard/hexboard 0.0.4 → 0.0.6

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.
package/dist/index.js CHANGED
@@ -1,44 +1,44 @@
1
- import { defineComponent as u2, createElementBlock as g, createCommentVNode as fe, openBlock as v, createStaticVNode as B, mergeModels as r2, useModel as X1, shallowRef as o1, useTemplateRef as y2, computed as j, onMounted as x2, onUnmounted as M2, watch as s2, unref as f, normalizeStyle as d1, createElementVNode as z2, Fragment as n1, renderList as i1, mergeProps as G2, toDisplayString as P2, createBlock as l2, resolveDynamicComponent as a2, withModifiers as U2, renderSlot as C2, h as S2 } from "vue";
2
- import { Hexchess as c2, position as H, San as f1, isPromotionPosition as T2 } from "@bedard/hexchess";
3
- function l(c, P, s) {
4
- return [c[0] + s * (P[0] - c[0]), c[1] + s * (P[1] - c[1])];
1
+ import { defineComponent as ao, createElementBlock as P, openBlock as b, createElementVNode as fo, toDisplayString as vo, mergeModels as so, useModel as Zt, shallowRef as et, useTemplateRef as Co, computed as z, onMounted as Eo, onUnmounted as $o, watch as ro, createCommentVNode as tt, unref as f, normalizeStyle as at, Fragment as ot, renderList as nt, mergeProps as Lo, createBlock as io, resolveDynamicComponent as uo, withModifiers as Bo, renderSlot as Mo, h as To } from "vue";
2
+ import { Hexchess as co, position as W, San as ft, isPromotionPosition as Fo } from "@bedard/hexchess";
3
+ function r(u, $, d) {
4
+ return [u[0] + d * ($[0] - u[0]), u[1] + d * ($[1] - u[1])];
5
5
  }
6
- function n(c) {
7
- return c.map(t);
6
+ function n(u) {
7
+ return u.map(t);
8
8
  }
9
- function e(c) {
9
+ function e(u) {
10
10
  return [
11
- x(c, -300, ae),
12
- x(c, 0, ae),
13
- x(c, -60, ae),
14
- x(c, -120, ae),
15
- x(c, -180, ae),
16
- x(c, -240, ae)
11
+ x(u, -300, ie),
12
+ x(u, 0, ie),
13
+ x(u, -60, ie),
14
+ x(u, -120, ie),
15
+ x(u, -180, ie),
16
+ x(u, -240, ie)
17
17
  ];
18
18
  }
19
- function x(c, P, s) {
20
- const K = E2(P);
19
+ function x(u, $, d) {
20
+ const Q = Ro($);
21
21
  return [
22
- s * Math.cos(K) + c[0],
23
- s * Math.sin(K) + c[1]
22
+ d * Math.cos(Q) + u[0],
23
+ d * Math.sin(Q) + u[1]
24
24
  ];
25
25
  }
26
- function E2(c) {
27
- return c * (Math.PI / 180);
26
+ function Ro(u) {
27
+ return u * (Math.PI / 180);
28
28
  }
29
- function t(c) {
30
- return [-c[0], -c[1]];
29
+ function t(u) {
30
+ return [-u[0], -u[1]];
31
31
  }
32
- function i(c, P) {
33
- return [c[0] + P[0], c[1] + P[1]];
32
+ function l(u, $) {
33
+ return [u[0] + $[0], u[1] + $[1]];
34
34
  }
35
- function pe(c) {
36
- return ve / 2 + c;
35
+ function fe(u) {
36
+ return ve / 2 + u;
37
37
  }
38
- function he(c) {
39
- return ve / 2 - c;
38
+ function de(u) {
39
+ return ve / 2 - u;
40
40
  }
41
- const ve = 23.6, B2 = {
41
+ const ve = 23.6, So = {
42
42
  colors: [
43
43
  "oklch(0.9015 0.0729 70.7)",
44
44
  "oklch(0.8366 0.1165 66.29)",
@@ -57,133 +57,133 @@ const ve = 23.6, B2 = {
57
57
  // red-500
58
58
  targetColor: "oklch(63.7% 0.237 25.331)"
59
59
  // red-500
60
- }, $2 = "b/qbk/n1b1n/r5r/ppppppppp/11/5P5/4P1P4/3P1B1P3/2P2B2P2/1PRNQBKNRP1 w - 0 1", a = 1.7, Q = 1.7, ae = 2 / Math.sqrt(3), w = ae * (Math.sqrt(3) / 2) * 2, k = w * 2, y = w * 3, M = w * 4, G = w * 5, m = [0, 0], F = x(m, 150, G), $ = x(m, 150, M), R = x(m, 150, y), L = x(m, 150, k), S = x(m, 150, w), T = x(m, 30, w), q = x(m, 30, k), N = x(m, 30, y), O = x(m, 30, M), W = x(m, 30, G), X = i(F, [0, -G]), Y = i($, [0, -G]), ge = i(R, [0, -G]), we = i(L, [0, -G]), me = i(S, [0, -G]), be = i(m, [0, -G]), ke = i(T, [0, -G]), ye = i(q, [0, -G]), xe = i(N, [0, -G]), Z = i(O, [0, -G]), J = i(W, [0, -G]), I = i(F, [0, -M]), _ = i($, [0, -M]), Me = i(R, [0, -M]), ze = i(L, [0, -M]), Ge = i(S, [0, -M]), Pe = i(m, [0, -M]), Ue = i(T, [0, -M]), Ce = i(q, [0, -M]), Se = i(N, [0, -M]), ee = i(O, [0, -M]), te = i(W, [0, -M]), Te = i(F, [0, -y]), Ee = i($, [0, -y]), p1 = i(R, [0, -y]), h1 = i(L, [0, -y]), v1 = i(S, [0, -y]), g1 = i(m, [0, -y]), w1 = i(T, [0, -y]), m1 = i(q, [0, -y]), b1 = i(N, [0, -y]), Be = i(O, [0, -y]), $e = i(W, [0, -y]), Le = i(F, [0, -k]), qe = i($, [0, -k]), k1 = i(R, [0, -k]), y1 = i(L, [0, -k]), x1 = i(S, [0, -k]), M1 = i(m, [0, -k]), z1 = i(T, [0, -k]), G1 = i(q, [0, -k]), P1 = i(N, [0, -k]), Oe = i(O, [0, -k]), je = i(W, [0, -k]), He = i(F, [0, -w]), Fe = i($, [0, -w]), U1 = i(R, [0, -w]), C1 = i(L, [0, -w]), S1 = i(S, [0, -w]), T1 = i(m, [0, -w]), E1 = i(T, [0, -w]), B1 = i(q, [0, -w]), $1 = i(N, [0, -w]), Re = i(O, [0, -w]), Ne = i(W, [0, -w]), We = i($, [0, w]), Ve = i(R, [0, w]), L1 = i(L, [0, w]), q1 = i(S, [0, w]), O1 = i(m, [0, w]), j1 = i(T, [0, w]), H1 = i(q, [0, w]), Ae = i(N, [0, w]), De = i(O, [0, w]), Ke = i(R, [0, k]), Qe = i(L, [0, k]), F1 = i(S, [0, k]), R1 = i(m, [0, k]), N1 = i(T, [0, k]), Xe = i(q, [0, k]), Ye = i(N, [0, k]), Ze = i(L, [0, y]), Je = i(S, [0, y]), W1 = i(m, [0, y]), Ie = i(T, [0, y]), _e = i(q, [0, y]), oe = i(S, [0, M]), ne = i(m, [0, M]), ie = i(T, [0, M]), re = i(m, [0, G]), o = [
61
- [2, re, t(re), e(re), n(e(re))],
62
- [1, oe, t(oe), e(oe), n(e(oe))],
63
- [0, ne, t(ne), e(ne), n(e(ne))],
64
- [1, ie, t(ie), e(ie), n(e(ie))],
60
+ }, qo = "b/qbk/n1b1n/r5r/ppppppppp/11/5P5/4P1P4/3P1B1P3/2P2B2P2/1PRNQBKNRP1 w - 0 1", i = 1.7, V = 1.7, ie = 2 / Math.sqrt(3), p = ie * (Math.sqrt(3) / 2) * 2, w = p * 2, y = p * 3, k = p * 4, E = p * 5, m = [0, 0], A = x(m, 150, E), R = x(m, 150, k), D = x(m, 150, y), S = x(m, 150, w), M = x(m, 150, p), T = x(m, 30, p), q = x(m, 30, w), H = x(m, 30, y), N = x(m, 30, k), O = x(m, 30, E), U = l(A, [0, -E]), Z = l(R, [0, -E]), he = l(D, [0, -E]), pe = l(S, [0, -E]), me = l(M, [0, -E]), ge = l(m, [0, -E]), we = l(T, [0, -E]), ye = l(q, [0, -E]), be = l(H, [0, -E]), j = l(N, [0, -E]), G = l(O, [0, -E]), J = l(A, [0, -k]), I = l(R, [0, -k]), xe = l(D, [0, -k]), ke = l(S, [0, -k]), Pe = l(M, [0, -k]), Ce = l(m, [0, -k]), Ee = l(T, [0, -k]), $e = l(q, [0, -k]), Le = l(H, [0, -k]), _ = l(N, [0, -k]), ee = l(O, [0, -k]), Be = l(A, [0, -y]), Me = l(R, [0, -y]), dt = l(D, [0, -y]), vt = l(S, [0, -y]), ht = l(M, [0, -y]), pt = l(m, [0, -y]), mt = l(T, [0, -y]), gt = l(q, [0, -y]), wt = l(H, [0, -y]), Te = l(N, [0, -y]), Fe = l(O, [0, -y]), Re = l(A, [0, -w]), Se = l(R, [0, -w]), yt = l(D, [0, -w]), bt = l(S, [0, -w]), xt = l(M, [0, -w]), kt = l(m, [0, -w]), Pt = l(T, [0, -w]), Ct = l(q, [0, -w]), Et = l(H, [0, -w]), qe = l(N, [0, -w]), Ne = l(O, [0, -w]), ze = l(A, [0, -p]), We = l(R, [0, -p]), $t = l(D, [0, -p]), Lt = l(S, [0, -p]), Bt = l(M, [0, -p]), Mt = l(m, [0, -p]), Tt = l(T, [0, -p]), Ft = l(q, [0, -p]), Rt = l(H, [0, -p]), Ae = l(N, [0, -p]), De = l(O, [0, -p]), He = l(R, [0, p]), Oe = l(D, [0, p]), St = l(S, [0, p]), qt = l(M, [0, p]), Nt = l(m, [0, p]), zt = l(T, [0, p]), Wt = l(q, [0, p]), Xe = l(H, [0, p]), Ye = l(N, [0, p]), Ke = l(D, [0, w]), Qe = l(S, [0, w]), At = l(M, [0, w]), Dt = l(m, [0, w]), Ht = l(T, [0, w]), Ve = l(q, [0, w]), Ue = l(H, [0, w]), Ze = l(S, [0, y]), je = l(M, [0, y]), Ot = l(m, [0, y]), Ge = l(T, [0, y]), Je = l(q, [0, y]), te = l(M, [0, k]), oe = l(m, [0, k]), ne = l(T, [0, k]), le = l(m, [0, E]), o = [
61
+ [2, le, t(le), e(le), n(e(le))],
62
+ [1, te, t(te), e(te), n(e(te))],
63
+ [0, oe, t(oe), e(oe), n(e(oe))],
64
+ [1, ne, t(ne), e(ne), n(e(ne))],
65
65
  [0, Ze, t(Ze), e(Ze), n(e(Ze))],
66
- [2, Je, t(Je), e(Je), n(e(Je))],
67
- [1, W1, t(W1), e(W1), n(e(W1))],
68
- [2, Ie, t(Ie), e(Ie), n(e(Ie))],
69
- [0, _e, t(_e), e(_e), n(e(_e))],
66
+ [2, je, t(je), e(je), n(e(je))],
67
+ [1, Ot, t(Ot), e(Ot), n(e(Ot))],
68
+ [2, Ge, t(Ge), e(Ge), n(e(Ge))],
69
+ [0, Je, t(Je), e(Je), n(e(Je))],
70
70
  [2, Ke, t(Ke), e(Ke), n(e(Ke))],
71
71
  [1, Qe, t(Qe), e(Qe), n(e(Qe))],
72
- [0, F1, t(F1), e(F1), n(e(F1))],
73
- [2, R1, t(R1), e(R1), n(e(R1))],
74
- [0, N1, t(N1), e(N1), n(e(N1))],
75
- [1, Xe, t(Xe), e(Xe), n(e(Xe))],
76
- [2, Ye, t(Ye), e(Ye), n(e(Ye))],
77
- [1, We, t(We), e(We), n(e(We))],
78
- [0, Ve, t(Ve), e(Ve), n(e(Ve))],
79
- [2, L1, t(L1), e(L1), n(e(L1))],
80
- [1, q1, t(q1), e(q1), n(e(q1))],
81
- [0, O1, t(O1), e(O1), n(e(O1))],
82
- [1, j1, t(j1), e(j1), n(e(j1))],
83
- [2, H1, t(H1), e(H1), n(e(H1))],
84
- [0, Ae, t(Ae), e(Ae), n(e(Ae))],
85
- [1, De, t(De), e(De), n(e(De))],
86
- [0, F, t(F), e(F), n(e(F))],
87
- [2, $, t($), e($), n(e($))],
88
- [1, R, t(R), e(R), n(e(R))],
89
- [0, L, t(L), e(L), n(e(L))],
90
- [2, S, t(S), e(S), n(e(S))],
72
+ [0, At, t(At), e(At), n(e(At))],
73
+ [2, Dt, t(Dt), e(Dt), n(e(Dt))],
74
+ [0, Ht, t(Ht), e(Ht), n(e(Ht))],
75
+ [1, Ve, t(Ve), e(Ve), n(e(Ve))],
76
+ [2, Ue, t(Ue), e(Ue), n(e(Ue))],
77
+ [1, He, t(He), e(He), n(e(He))],
78
+ [0, Oe, t(Oe), e(Oe), n(e(Oe))],
79
+ [2, St, t(St), e(St), n(e(St))],
80
+ [1, qt, t(qt), e(qt), n(e(qt))],
81
+ [0, Nt, t(Nt), e(Nt), n(e(Nt))],
82
+ [1, zt, t(zt), e(zt), n(e(zt))],
83
+ [2, Wt, t(Wt), e(Wt), n(e(Wt))],
84
+ [0, Xe, t(Xe), e(Xe), n(e(Xe))],
85
+ [1, Ye, t(Ye), e(Ye), n(e(Ye))],
86
+ [0, A, t(A), e(A), n(e(A))],
87
+ [2, R, t(R), e(R), n(e(R))],
88
+ [1, D, t(D), e(D), n(e(D))],
89
+ [0, S, t(S), e(S), n(e(S))],
90
+ [2, M, t(M), e(M), n(e(M))],
91
91
  [1, m, t(m), e(m), n(e(m))],
92
92
  [2, T, t(T), e(T), n(e(T))],
93
93
  [0, q, t(q), e(q), n(e(q))],
94
- [1, N, t(N), e(N), n(e(N))],
95
- [2, O, t(O), e(O), n(e(O))],
96
- [0, W, t(W), e(W), n(e(W))],
97
- [1, He, t(He), e(He), n(e(He))],
94
+ [1, H, t(H), e(H), n(e(H))],
95
+ [2, N, t(N), e(N), n(e(N))],
96
+ [0, O, t(O), e(O), n(e(O))],
97
+ [1, ze, t(ze), e(ze), n(e(ze))],
98
+ [0, We, t(We), e(We), n(e(We))],
99
+ [2, $t, t($t), e($t), n(e($t))],
100
+ [1, Lt, t(Lt), e(Lt), n(e(Lt))],
101
+ [0, Bt, t(Bt), e(Bt), n(e(Bt))],
102
+ [2, Mt, t(Mt), e(Mt), n(e(Mt))],
103
+ [0, Tt, t(Tt), e(Tt), n(e(Tt))],
104
+ [1, Ft, t(Ft), e(Ft), n(e(Ft))],
105
+ [2, Rt, t(Rt), e(Rt), n(e(Rt))],
106
+ [0, Ae, t(Ae), e(Ae), n(e(Ae))],
107
+ [1, De, t(De), e(De), n(e(De))],
108
+ [2, Re, t(Re), e(Re), n(e(Re))],
109
+ [1, Se, t(Se), e(Se), n(e(Se))],
110
+ [0, yt, t(yt), e(yt), n(e(yt))],
111
+ [2, bt, t(bt), e(bt), n(e(bt))],
112
+ [1, xt, t(xt), e(xt), n(e(xt))],
113
+ [0, kt, t(kt), e(kt), n(e(kt))],
114
+ [1, Pt, t(Pt), e(Pt), n(e(Pt))],
115
+ [2, Ct, t(Ct), e(Ct), n(e(Ct))],
116
+ [0, Et, t(Et), e(Et), n(e(Et))],
117
+ [1, qe, t(qe), e(qe), n(e(qe))],
118
+ [2, Ne, t(Ne), e(Ne), n(e(Ne))],
119
+ [0, Be, t(Be), e(Be), n(e(Be))],
120
+ [2, Me, t(Me), e(Me), n(e(Me))],
121
+ [1, dt, t(dt), e(dt), n(e(dt))],
122
+ [0, vt, t(vt), e(vt), n(e(vt))],
123
+ [2, ht, t(ht), e(ht), n(e(ht))],
124
+ [1, pt, t(pt), e(pt), n(e(pt))],
125
+ [2, mt, t(mt), e(mt), n(e(mt))],
126
+ [0, gt, t(gt), e(gt), n(e(gt))],
127
+ [1, wt, t(wt), e(wt), n(e(wt))],
128
+ [2, Te, t(Te), e(Te), n(e(Te))],
98
129
  [0, Fe, t(Fe), e(Fe), n(e(Fe))],
99
- [2, U1, t(U1), e(U1), n(e(U1))],
100
- [1, C1, t(C1), e(C1), n(e(C1))],
101
- [0, S1, t(S1), e(S1), n(e(S1))],
102
- [2, T1, t(T1), e(T1), n(e(T1))],
103
- [0, E1, t(E1), e(E1), n(e(E1))],
104
- [1, B1, t(B1), e(B1), n(e(B1))],
105
- [2, $1, t($1), e($1), n(e($1))],
106
- [0, Re, t(Re), e(Re), n(e(Re))],
107
- [1, Ne, t(Ne), e(Ne), n(e(Ne))],
130
+ [1, J, t(J), e(J), n(e(J))],
131
+ [0, I, t(I), e(I), n(e(I))],
132
+ [2, xe, t(xe), e(xe), n(e(xe))],
133
+ [1, ke, t(ke), e(ke), n(e(ke))],
134
+ [0, Pe, t(Pe), e(Pe), n(e(Pe))],
135
+ [2, Ce, t(Ce), e(Ce), n(e(Ce))],
136
+ [0, Ee, t(Ee), e(Ee), n(e(Ee))],
137
+ [1, $e, t($e), e($e), n(e($e))],
108
138
  [2, Le, t(Le), e(Le), n(e(Le))],
109
- [1, qe, t(qe), e(qe), n(e(qe))],
110
- [0, k1, t(k1), e(k1), n(e(k1))],
111
- [2, y1, t(y1), e(y1), n(e(y1))],
112
- [1, x1, t(x1), e(x1), n(e(x1))],
113
- [0, M1, t(M1), e(M1), n(e(M1))],
114
- [1, z1, t(z1), e(z1), n(e(z1))],
115
- [2, G1, t(G1), e(G1), n(e(G1))],
116
- [0, P1, t(P1), e(P1), n(e(P1))],
117
- [1, Oe, t(Oe), e(Oe), n(e(Oe))],
118
- [2, je, t(je), e(je), n(e(je))],
119
- [0, Te, t(Te), e(Te), n(e(Te))],
120
- [2, Ee, t(Ee), e(Ee), n(e(Ee))],
121
- [1, p1, t(p1), e(p1), n(e(p1))],
122
- [0, h1, t(h1), e(h1), n(e(h1))],
123
- [2, v1, t(v1), e(v1), n(e(v1))],
124
- [1, g1, t(g1), e(g1), n(e(g1))],
125
- [2, w1, t(w1), e(w1), n(e(w1))],
126
- [0, m1, t(m1), e(m1), n(e(m1))],
127
- [1, b1, t(b1), e(b1), n(e(b1))],
128
- [2, Be, t(Be), e(Be), n(e(Be))],
129
- [0, $e, t($e), e($e), n(e($e))],
130
- [1, I, t(I), e(I), n(e(I))],
131
139
  [0, _, t(_), e(_), n(e(_))],
132
- [2, Me, t(Me), e(Me), n(e(Me))],
133
- [1, ze, t(ze), e(ze), n(e(ze))],
134
- [0, Ge, t(Ge), e(Ge), n(e(Ge))],
135
- [2, Pe, t(Pe), e(Pe), n(e(Pe))],
136
- [0, Ue, t(Ue), e(Ue), n(e(Ue))],
137
- [1, Ce, t(Ce), e(Ce), n(e(Ce))],
138
- [2, Se, t(Se), e(Se), n(e(Se))],
139
- [0, ee, t(ee), e(ee), n(e(ee))],
140
- [1, te, t(te), e(te), n(e(te))],
141
- [2, X, t(X), e(X), n(e(X))],
142
- [1, Y, t(Y), e(Y), n(e(Y))],
143
- [0, ge, t(ge), e(ge), n(e(ge))],
144
- [2, we, t(we), e(we), n(e(we))],
140
+ [1, ee, t(ee), e(ee), n(e(ee))],
141
+ [2, U, t(U), e(U), n(e(U))],
142
+ [1, Z, t(Z), e(Z), n(e(Z))],
143
+ [0, he, t(he), e(he), n(e(he))],
144
+ [2, pe, t(pe), e(pe), n(e(pe))],
145
145
  [1, me, t(me), e(me), n(e(me))],
146
- [0, be, t(be), e(be), n(e(be))],
147
- [1, ke, t(ke), e(ke), n(e(ke))],
146
+ [0, ge, t(ge), e(ge), n(e(ge))],
147
+ [1, we, t(we), e(we), n(e(we))],
148
148
  [2, ye, t(ye), e(ye), n(e(ye))],
149
- [0, xe, t(xe), e(xe), n(e(xe))],
150
- [1, Z, t(Z), e(Z), n(e(Z))],
151
- [2, J, t(J), e(J), n(e(J))]
152
- ], L2 = [
153
- ["11", l(ie, re, a), t(l(ie, re, a))],
154
- ["10", l(ne, oe, a), t(l(ne, oe, a))],
155
- ["9", l(Je, Ze, a), t(l(Je, Ze, a))],
156
- ["8", l(Qe, Ke, a), t(l(Qe, Ke, a))],
157
- ["7", l(Ve, We, a), t(l(Ve, We, a))],
158
- ["6", l($, F, a), t(l($, F, a))],
159
- ["5", l(Fe, He, a), t(l(Fe, He, a))],
160
- ["4", l(qe, Le, a), t(l(qe, Le, a))],
161
- ["3", l(Ee, Te, a), t(l(Ee, Te, a))],
162
- ["2", l(_, I, a), t(l(_, I, a))],
163
- ["1", l(Y, X, a), t(l(Y, X, a))],
164
- ["a", l(I, X, a), t(l(I, X, a))],
165
- ["b", l(_, Y, a), t(l(_, Y, a))],
166
- ["c", l(Me, ge, a), t(l(Me, ge, a))],
167
- ["d", l(ze, we, a), t(l(ze, we, a))],
168
- ["e", l(Ge, me, a), t(l(Ge, me, a))],
169
- ["f", l(Pe, be, a), t(l(Pe, be, a))],
170
- ["g", l(Ue, ke, a), t(l(Ue, ke, a))],
171
- ["h", l(Ce, ye, a), t(l(Ce, ye, a))],
172
- ["i", l(Se, xe, a), t(l(Se, xe, a))],
173
- ["k", l(ee, Z, a), t(l(ee, Z, a))],
174
- ["l", l(te, J, a), t(l(te, J, a))],
175
- ["1", l(Z, J, a), t(l(Z, J, a))],
176
- ["2", l(ee, te, a), t(l(ee, te, a))],
177
- ["3", l(Be, $e, a), t(l(Be, $e, a))],
178
- ["4", l(Oe, je, a), t(l(Oe, je, a))],
179
- ["5", l(Re, Ne, a), t(l(Re, Ne, a))],
180
- ["6", l(O, W, a), t(l(O, W, a))],
181
- ["7", l(Ae, De, a), t(l(Ae, De, a))],
182
- ["8", l(Xe, Ye, a), t(l(Xe, Ye, a))],
183
- ["9", l(Ie, _e, a), t(l(Ie, _e, a))],
184
- ["10", l(ne, ie, a), t(l(ne, ie, a))],
185
- ["11", l(oe, re, a), t(l(oe, re, a))]
186
- ], q2 = [
149
+ [0, be, t(be), e(be), n(e(be))],
150
+ [1, j, t(j), e(j), n(e(j))],
151
+ [2, G, t(G), e(G), n(e(G))]
152
+ ], No = [
153
+ ["11", r(ne, le, i), t(r(ne, le, i))],
154
+ ["10", r(oe, te, i), t(r(oe, te, i))],
155
+ ["9", r(je, Ze, i), t(r(je, Ze, i))],
156
+ ["8", r(Qe, Ke, i), t(r(Qe, Ke, i))],
157
+ ["7", r(Oe, He, i), t(r(Oe, He, i))],
158
+ ["6", r(R, A, i), t(r(R, A, i))],
159
+ ["5", r(We, ze, i), t(r(We, ze, i))],
160
+ ["4", r(Se, Re, i), t(r(Se, Re, i))],
161
+ ["3", r(Me, Be, i), t(r(Me, Be, i))],
162
+ ["2", r(I, J, i), t(r(I, J, i))],
163
+ ["1", r(Z, U, i), t(r(Z, U, i))],
164
+ ["a", r(J, U, i), t(r(J, U, i))],
165
+ ["b", r(I, Z, i), t(r(I, Z, i))],
166
+ ["c", r(xe, he, i), t(r(xe, he, i))],
167
+ ["d", r(ke, pe, i), t(r(ke, pe, i))],
168
+ ["e", r(Pe, me, i), t(r(Pe, me, i))],
169
+ ["f", r(Ce, ge, i), t(r(Ce, ge, i))],
170
+ ["g", r(Ee, we, i), t(r(Ee, we, i))],
171
+ ["h", r($e, ye, i), t(r($e, ye, i))],
172
+ ["i", r(Le, be, i), t(r(Le, be, i))],
173
+ ["k", r(_, j, i), t(r(_, j, i))],
174
+ ["l", r(ee, G, i), t(r(ee, G, i))],
175
+ ["1", r(j, G, i), t(r(j, G, i))],
176
+ ["2", r(_, ee, i), t(r(_, ee, i))],
177
+ ["3", r(Te, Fe, i), t(r(Te, Fe, i))],
178
+ ["4", r(qe, Ne, i), t(r(qe, Ne, i))],
179
+ ["5", r(Ae, De, i), t(r(Ae, De, i))],
180
+ ["6", r(N, O, i), t(r(N, O, i))],
181
+ ["7", r(Xe, Ye, i), t(r(Xe, Ye, i))],
182
+ ["8", r(Ve, Ue, i), t(r(Ve, Ue, i))],
183
+ ["9", r(Ge, Je, i), t(r(Ge, Je, i))],
184
+ ["10", r(oe, ne, i), t(r(oe, ne, i))],
185
+ ["11", r(te, le, i), t(r(te, le, i))]
186
+ ], zo = [
187
187
  o[
188
188
  0
189
189
  /* f11 */
@@ -557,108 +557,56 @@ const ve = 23.6, B2 = {
557
557
  /* e10 */
558
558
  ][3][0]
559
559
  ];
560
- function V1(c) {
561
- if (c.length === 0)
560
+ function Xt(u) {
561
+ if (u.length === 0)
562
562
  return "";
563
- const [P, ...s] = c;
564
- let K = `M ${pe(P[0])} ${he(P[1])} L `;
565
- for (const E of s)
566
- K += `${pe(E[0])} ${he(E[1])} `;
567
- return `${K} Z`;
563
+ const [$, ...d] = u;
564
+ let Q = `M ${Yt(fe($[0]))} ${Yt(de($[1]))} L `;
565
+ for (const F of d)
566
+ Q += `${Yt(fe(F[0]))} ${Yt(de(F[1]))} `;
567
+ return `${Q} Z`;
568
+ }
569
+ function Yt(u) {
570
+ return u.toFixed(8);
568
571
  }
569
- const O2 = {
570
- key: 0,
571
- xmlns: "http://www.w3.org/2000/svg",
572
- viewBox: "0 0 50 50"
573
- }, j2 = {
574
- key: 1,
575
- xmlns: "http://www.w3.org/2000/svg",
576
- viewBox: "0 0 50 50"
577
- }, H2 = {
578
- key: 2,
579
- xmlns: "http://www.w3.org/2000/svg",
580
- viewBox: "0 0 50 50"
581
- }, F2 = {
582
- key: 3,
583
- xmlns: "http://www.w3.org/2000/svg",
584
- viewBox: "0 0 50 50"
585
- }, R2 = {
586
- key: 4,
587
- xmlns: "http://www.w3.org/2000/svg",
588
- viewBox: "0 0 50 50"
589
- }, N2 = {
590
- key: 5,
591
- xmlns: "http://www.w3.org/2000/svg",
592
- viewBox: "0 0 50 50"
593
- }, W2 = {
594
- key: 6,
595
- xmlns: "http://www.w3.org/2000/svg",
596
- viewBox: "0 0 50 50"
597
- }, V2 = {
598
- key: 7,
599
- xmlns: "http://www.w3.org/2000/svg",
600
- viewBox: "0 0 50 50"
601
- }, A2 = {
602
- key: 8,
603
- xmlns: "http://www.w3.org/2000/svg",
604
- viewBox: "0 0 50 50"
605
- }, D2 = {
606
- key: 9,
607
- xmlns: "http://www.w3.org/2000/svg",
608
- viewBox: "0 0 50 50"
609
- }, K2 = {
610
- key: 10,
611
- xmlns: "http://www.w3.org/2000/svg",
612
- viewBox: "0 0 50 50"
613
- }, Q2 = {
614
- key: 11,
615
- xmlns: "http://www.w3.org/2000/svg",
616
- viewBox: "0 0 50 50"
617
- }, X2 = /* @__PURE__ */ u2({
618
- __name: "Gioco",
572
+ const Wo = {
573
+ viewBox: "0 0 50 50",
574
+ xmlns: "http://www.w3.org/2000/svg"
575
+ }, Ao = ["textContent", "fill"], Do = /* @__PURE__ */ ao({
576
+ __name: "Letter",
619
577
  props: {
620
578
  type: {}
621
579
  },
622
- setup(c) {
623
- return (P, s) => c.type === "p" ? (v(), g("svg", O2, [...s[0] || (s[0] = [
624
- B('<defs><linearGradient id="gioco-a-bp" gradientTransform="matrix(.94331 0 0 1 615.66 493.37)" gradientUnits="userSpaceOnUse" x1="-639.4" x2="-612.91" y1="-465.15" y2="-465.15"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient></defs><path d="M25 12.264c-3.56 0-6.447 2.655-6.447 5.93 0 1.705.799 3.326 2.19 4.45h-1.666c-1.312 0-2.4.978-2.4 2.158v.438c0 1.18 1.088 2.157 2.4 2.157h2.376c0 7.293-9.342 6.457-8.689 16.78L25 44.167l12.236.008c.653-10.323-8.689-9.486-8.689-16.779h2.376c1.312 0 2.4-.978 2.4-2.157v-.438c0-1.18-1.087-2.157-2.4-2.157h-1.666c1.391-1.125 2.19-2.747 2.19-4.45 0-3.276-2.886-5.93-6.446-5.931z" fill="url(#gioco-a-bp)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.999 12.264c-.521 0-1.028.058-1.513.166 6.257.692 7.675 6.466 4.917 9.222-2.016 1.69-7.662.993-7.662.993 2.56.443 4.97 1.954 7.252 2.488-6.033 11.435 9.7 9.026 9.242 19.043.995-10.592-7.673-8.148-8.689-16.78h2.377c1.312 0 2.398-.977 2.398-2.156v-.438c0-1.18-1.086-2.158-2.398-2.158h-1.667c1.391-1.125 2.191-2.746 2.19-4.449 0-3.276-2.886-5.932-6.447-5.932z" opacity=".15"></path><path d="M22.959 13.401c-1.77 1.602-2.968 3.612-3.476 6.19 0 0-1.16-4.235 3.476-6.19zM13.342 43.419c.273-5.321 2.572-6.184 7.538-11.434-1.03 3.566-7.387 5.868-7.538 11.434z" fill="#fff" opacity=".25"></path>', 4)
625
- ])])) : c.type === "n" ? (v(), g("svg", j2, [...s[1] || (s[1] = [
626
- B('<defs><linearGradient gradientTransform="matrix(1.0621 0 0 1.0589 -3487.5 459.63)" gradientUnits="userSpaceOnUse" x1="3295.1" x2="3321.5" xlink:href="#gioco-a-bn" id="gioco-b-bn" y1="-411.88" y2="-411.88"></linearGradient><linearGradient id="gioco-a-bn"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.24 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-bn" id="gioco-c-bn" y1="156.68" y2="156.68"></linearGradient></defs><path class="st28" d="m25.987 23.546-11.592 1.097-1.454-5.216 14.468-6.815 1.763-3.9 10.2 11.892-4.116 17.678H14.74c.245-11.292 9.64-8.1 11.247-14.736z" fill="url(#gioco-b-bn)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="m29.173 8.72-.879 1.945.426-.943c2.692 3.722 5.608 7.279 8.45 10.888l-5.285 17.671h3.372l4.117-17.671z" opacity=".15"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.748l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-bn)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M15.62 37.633c.159-4.472 2.145-6.971 8.667-9.837-.987 1.107-6.405 2.237-8.667 9.837zM14.418 21.67l-.523-1.803L28.03 13.21l1.217-2.764-.671 3.558-14.35 5.921z" fill="#fff" opacity=".25"></path>', 5)
627
- ])])) : c.type === "b" ? (v(), g("svg", H2, [...s[2] || (s[2] = [
628
- B('<defs><linearGradient gradientTransform="matrix(1.019 0 0 1.0751 -3392.3 527.45)" gradientUnits="userSpaceOnUse" x1="3341.2" x2="3366.2" xlink:href="#gioco-a-bb" id="gioco-b-bb" y1="-469.28" y2="-469.28"></linearGradient><linearGradient id="gioco-a-bb"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.24 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-bb" id="gioco-c-bb" y1="156.68" y2="156.68"></linearGradient></defs><path d="M26.87 8.223c-5.797-2.298-6.952 2.527-4.668 5.86-9.898 10.6-11.253 16.425-6.195 24.204h17.99c6.084-6.912 2.558-14.515-4.823-22.3-2.883 4.119-3.274 7.35-3.946 11.131l-3.62-.071c-.66-6.006 7.622-15.14 5.261-18.823z" fill="url(#gioco-b-bb)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.933 7.654c-.625.02-.207.197-.771.567 0 .003.01.006.01.008 3.582-.311-2.369 11.772-3.394 18.894.536-3.014 1.325-5.68 3.082-8.725 2.003-4.351 4.237-8.681 3.008-10.169-.411-.38-1.144-.601-1.934-.575zm4.24 8.338c-.6.856-.517.67-.972 1.462 6.004 6.049 8.728 13.787 3.097 20.838h2.696c6.085-6.912 2.56-14.515-4.822-22.3z" opacity=".15"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-bb)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M14.895 34.327c-.716-1.396-3.266-6.812 4.513-15.739-2.1 4.86-5.958 8.69-4.513 15.739z" fill="#fff" opacity=".25"></path>', 5)
629
- ])])) : c.type === "r" ? (v(), g("svg", F2, [...s[3] || (s[3] = [
630
- B('<defs><linearGradient gradientTransform="matrix(.23554 0 0 .25454 -3002.1 473.49)" gradientUnits="userSpaceOnUse" x1="12797" x2="12909" xlink:href="#gioco-a-br" id="gioco-b-br" y1="-1764.6" y2="-1764.6"></linearGradient><linearGradient id="gioco-a-br"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="translate(40.423 -.922)" gradientUnits="userSpaceOnUse" x1="-30.611" x2="-.235" xlink:href="#gioco-a-br" id="gioco-c-br" y1="42.165" y2="42.165"></linearGradient></defs><path d="M12.855 10.383v7.663c0 3.268 6.53 3.774 6.53 3.774-.352 9.864-5.036 16.486-5.036 16.486l21.428-.039s-4.651-6.62-5-16.446c0 0 6.896-.507 6.896-3.774v-7.663h-4.72s.459 2.25-.47 3.26c-1.035 1.126-2.418 1.126-3.454 0-.928-1.01-.47-3.26-.47-3.26h-6.59s.459 2.25-.47 3.26c-1.122 1.22-2.699 1.22-3.82 0-.929-1.01-.47-3.26-.47-3.26z" fill="url(#gioco-b-br)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="m37.543 10.462.014 7.585c.263 3.48-24.58 2.135-24.523 1.03 2.098 2.532 4.445 2.613 6.352 2.744 7.292.498 9.8 8.89 13.306 16.446h2.97s-4.65-6.62-5-16.446c2.547-.395 2.954-.812 4.037-1.058h.018l-.002-.004c1.023-.236 2.81-1.376 2.842-2.713v-7.663z" opacity=".15"></path><path d="M13.239 38.286c-1.437 0-2.627 1.216-2.627 2.685v.544l.013 2.685h28.75l.012-2.685v-.544c0-1.469-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-br)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.656 11.168v5.54c.48-1.867.299-4.088 1.554-5.54zM22.877 11.163c.055.896-.154 1.748-.269 2.616.48-1.866 1.823-2.616 1.823-2.616zM16.947 35.312c.875-1.143 3.603-10.333 3.233-13.244.7.39.658 10.057-3.233 13.244zM33.863 11.209c.005.598-.055 1.226-.187 2.02.48-1.867 1.295-2.04 1.295-2.04z" opacity=".25"></path></g>', 5)
631
- ])])) : c.type === "q" ? (v(), g("svg", R2, [...s[4] || (s[4] = [
632
- B('<defs><linearGradient gradientTransform="translate(209.27 -109.27) scale(.31419)" gradientUnits="userSpaceOnUse" x1="-647.27" x2="-525.69" xlink:href="#gioco-a-bq" id="gioco-b-bq" y1="418.44" y2="418.44"></linearGradient><linearGradient id="gioco-a-bq"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.23 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-bq" id="gioco-c-bq" y1="156.68" y2="156.68"></linearGradient></defs><path d="M25 6.122c-2.635 0-4.771 2.098-4.771 4.685.002 1.855 1.118 3.534 2.846 4.283-.369 2.286-1.51 7.558-4.68 8.009-2.355.334-3.855-1.287-4.88-3.144a4.19 4.19 0 0 0 1.767-3.4c0-2.327-1.921-4.214-4.291-4.214S6.699 14.228 6.7 16.555c0 2.142 1.64 3.943 3.809 4.183l4.973 17.54h19.036l4.973-17.54c2.169-.24 3.807-2.041 3.809-4.183 0-2.327-1.922-4.214-4.292-4.214s-4.29 1.887-4.29 4.214a4.19 4.19 0 0 0 1.766 3.4c-1.025 1.857-2.525 3.478-4.88 3.144-3.17-.45-4.31-5.723-4.68-8.01 1.729-.748 2.845-2.427 2.847-4.282 0-2.587-2.136-4.685-4.77-4.685z" fill="url(#gioco-b-bq)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="M39.002 12.342a4.348 4.348 0 0 0-1.567.296c4.741 1.678 3.877 6.805.591 7.316L30.414 38.28h4.2l4.87-17.541c2.17-.241 3.808-2.042 3.81-4.184 0-2.327-1.922-4.214-4.292-4.213z" opacity=".15"></path><path d="M13.227 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684H39.36l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-bq)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M9.515 13.489c-.794 1.17-1.726 2.667-1.554 4.779 0 0-1.604-3.01 1.554-4.779zM23.659 7.23c-.853.874-2.37 2.934-2.133 5.374-.207-.084-1.73-3.893 2.133-5.374zM12.062 23.328l5.244 14.111-1.17.023z" opacity=".25"></path></g>', 5)
633
- ])])) : c.type === "k" ? (v(), g("svg", N2, [...s[5] || (s[5] = [
634
- B('<defs><linearGradient gradientTransform="matrix(.26458 0 0 .25357 227.43 -666.55)" gradientUnits="userSpaceOnUse" x1="-825.75" x2="-704.44" xlink:href="#gioco-a-bk" id="gioco-b-bk" y1="2712.8" y2="2712.8"></linearGradient><linearGradient id="gioco-a-bk"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="translate(225.05 -690.53)" gradientUnits="userSpaceOnUse" x1="-215.24" x2="-184.86" xlink:href="#gioco-a-bk" id="gioco-c-bk" y1="731.78" y2="731.78"></linearGradient></defs><path d="M25.006 3.868c-1.803.1-3.228 1.234-3.228 2.618 0 .565.244 1.644.693 2.097h-5.766v5.106h6.306l-2.61 2.833 2.673 2.167c-5.584.362-12.02 1.643-13.154 3.997-1.268 2.638 6.215 15.6 6.215 15.6h17.73s7.484-12.963 6.215-15.6c-1.133-2.357-7.594-3.64-13.179-3.999l2.71-2.165-2.61-2.833h6.306V8.583H27.54c.449-.453.693-1.531.693-2.097 0-1.384-1.425-2.518-3.228-2.618z" fill="url(#gioco-b-bk)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6" style="paint-order:fill markers;"></path><path d="m31.289 38.283 2.573-.005s7.482-12.428 6.214-15.065c-4.136-3.824-13.18-4.525-13.18-4.525 11.05 2.822 12.618 5.028 4.393 19.595z" opacity=".15"></path><path d="M13.242 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-bk)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.283 31.138s-3.074-6.555-2.666-8.092c.408-1.536 5.987-2.736 5.987-2.736-6.486 2.71-4.786 4.558-3.321 10.828zM17.521 12.884v-3.52l1.532-.011c-.891.007-1.532 2.147-1.532 3.531zM24.798 4.67s-2.614.92-1.53 3.522c-.178-.007-2.142-2.72 1.53-3.522z" opacity=".25"></path></g>', 5)
635
- ])])) : c.type === "P" ? (v(), g("svg", W2, [...s[6] || (s[6] = [
636
- B('<defs><linearGradient id="gioco-a-wp" gradientTransform="matrix(.94331 0 0 1 615.66 493.37)" gradientUnits="userSpaceOnUse" x1="-639.4" x2="-612.91" y1="-465.15" y2="-465.15"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient></defs><path d="M25 12.264c-3.56 0-6.447 2.655-6.447 5.93 0 1.705.799 3.326 2.19 4.45h-1.666c-1.312 0-2.4.978-2.4 2.158v.438c0 1.18 1.088 2.157 2.4 2.157h2.376c0 7.293-9.342 6.457-8.689 16.78L25 44.167l12.236.008c.653-10.323-8.689-9.486-8.689-16.779h2.376c1.312 0 2.4-.978 2.4-2.157v-.438c0-1.18-1.087-2.157-2.4-2.157h-1.666c1.391-1.125 2.19-2.747 2.19-4.45 0-3.276-2.886-5.93-6.446-5.931z" fill="url(#gioco-a-wp)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.999 12.264c-.521 0-1.028.058-1.513.166 6.257.692 7.675 6.466 4.917 9.222-2.016 1.69-7.662.993-7.662.993 2.56.443 4.97 1.954 7.252 2.488-6.033 11.435 9.7 9.026 9.242 19.043.995-10.592-7.673-8.148-8.689-16.78h2.377c1.312 0 2.398-.977 2.398-2.156v-.438c0-1.18-1.086-2.158-2.398-2.158h-1.667c1.391-1.125 2.191-2.746 2.19-4.449 0-3.276-2.886-5.932-6.447-5.932z" opacity=".15"></path><path d="M22.959 13.401c-1.77 1.602-2.968 3.612-3.476 6.19 0 0-1.16-4.235 3.476-6.19zM13.342 43.419c.273-5.321 2.572-6.184 7.538-11.434-1.03 3.566-7.387 5.868-7.538 11.434z" fill="#fff"></path>', 4)
637
- ])])) : c.type === "N" ? (v(), g("svg", V2, [...s[7] || (s[7] = [
638
- B('<defs><linearGradient gradientTransform="translate(474.35 493.34)" gradientUnits="userSpaceOnUse" x1="-462.21" x2="-434.18" xlink:href="#gioco-a-wn" id="gioco-b-wn" y1="-469.84" y2="-469.84"></linearGradient><linearGradient id="gioco-a-wn"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(474.35 493.34)" gradientUnits="userSpaceOnUse" x1="-464.54" x2="-434.16" xlink:href="#gioco-a-wn" id="gioco-c-wn" y1="-452.1" y2="-452.1"></linearGradient></defs><path class="st28" d="m25.987 23.546-11.592 1.097-1.454-5.216 14.468-6.815 1.763-3.9 10.2 11.892-4.116 17.678H14.74c.245-11.292 9.64-8.1 11.247-14.736z" fill="url(#gioco-b-wn)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="m29.173 8.72-.879 1.945.426-.943c2.692 3.722 5.608 7.279 8.45 10.888l-5.285 17.671h3.372l4.117-17.671z" opacity=".1"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.748l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-wn)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M15.62 37.633c.159-4.472 2.145-6.971 8.667-9.837-.987 1.107-6.405 2.237-8.667 9.837zM14.418 21.67l-.523-1.803L28.03 13.21l1.217-2.764-.671 3.558-14.35 5.921z" fill="#fff"></path>', 5)
639
- ])])) : c.type === "B" ? (v(), g("svg", A2, [...s[8] || (s[8] = [
640
- B('<defs><linearGradient gradientTransform="matrix(1.019 0 0 1.0751 -3392.3 527.45)" gradientUnits="userSpaceOnUse" x1="3341.2" x2="3366.2" xlink:href="#gioco-a-wb" id="gioco-b-wb" y1="-469.26" y2="-469.26"></linearGradient><linearGradient id="gioco-a-wb"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.24 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-wb" id="gioco-c-wb" y1="156.68" y2="156.68"></linearGradient></defs><path d="M26.87 8.223c-5.797-2.298-6.952 2.527-4.668 5.86-9.898 10.6-11.253 16.425-6.195 24.204h17.99c6.084-6.912 2.558-14.515-4.823-22.3-2.883 4.119-3.274 7.35-3.946 11.131l-3.62-.071c-.66-6.006 7.622-15.14 5.261-18.823z" fill="url(#gioco-b-wb)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.933 7.654c-.625.02-.207.197-.771.567 0 .003.01.006.01.008 3.582-.311-2.369 11.772-3.394 18.894.536-3.014 1.325-5.68 3.082-8.725 2.003-4.351 4.237-8.681 3.008-10.169-.411-.38-1.144-.601-1.934-.575zm4.24 8.338c-.6.856-.517.67-.972 1.462 6.004 6.049 8.728 13.787 3.097 20.838h2.696c6.085-6.912 2.56-14.515-4.822-22.3z" opacity=".1"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-wb)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M14.895 34.327c-.716-1.396-3.266-6.812 4.513-15.739-2.1 4.86-5.958 8.69-4.513 15.739z" fill="#fff"></path>', 5)
641
- ])])) : c.type === "R" ? (v(), g("svg", D2, [...s[9] || (s[9] = [
642
- B('<defs><linearGradient gradientTransform="translate(582.87 492.95)" gradientUnits="userSpaceOnUse" x1="-570.82" x2="-544.4" xlink:href="#gioco-a-wr" id="gioco-b-wr" y1="-468.61" y2="-468.61"></linearGradient><linearGradient id="gioco-a-wr"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(582.87 492.95)" gradientUnits="userSpaceOnUse" x1="-573.06" x2="-542.69" xlink:href="#gioco-a-wr" id="gioco-c-wr" y1="-451.71" y2="-451.71"></linearGradient></defs><path d="M12.855 10.383v7.663c0 3.268 6.53 3.774 6.53 3.774-.352 9.864-5.036 16.486-5.036 16.486l21.428-.039s-4.651-6.62-5-16.446c0 0 6.896-.507 6.896-3.774v-7.663h-4.72s.459 2.25-.47 3.26c-1.035 1.126-2.418 1.126-3.454 0-.928-1.01-.47-3.26-.47-3.26h-6.59s.459 2.25-.47 3.26c-1.122 1.22-2.699 1.22-3.82 0-.929-1.01-.47-3.26-.47-3.26z" fill="url(#gioco-b-wr)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="m37.543 10.462.014 7.585c.263 3.48-24.58 2.135-24.523 1.03 2.098 2.532 4.445 2.613 6.352 2.744 7.292.498 9.8 8.89 13.306 16.446h2.97s-4.65-6.62-5-16.446c2.547-.395 2.954-.812 4.037-1.058h.018l-.002-.004c1.023-.236 2.81-1.376 2.842-2.713v-7.663z" opacity=".1"></path><path d="M13.239 38.286c-1.437 0-2.627 1.216-2.627 2.685v.544l.013 2.685h28.75l.012-2.685v-.544c0-1.469-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-wr)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.656 11.168v5.54c.48-1.867.299-4.088 1.554-5.54zM22.877 11.163c.055.896-.154 1.748-.269 2.616.48-1.866 1.823-2.616 1.823-2.616zM16.947 35.312c.875-1.143 3.603-10.333 3.233-13.244.7.39.658 10.057-3.233 13.244zM33.863 11.209c.005.598-.055 1.226-.187 2.02.48-1.867 1.295-2.04 1.295-2.04z"></path></g>', 5)
643
- ])])) : c.type === "Q" ? (v(), g("svg", K2, [...s[10] || (s[10] = [
644
- B('<defs><linearGradient gradientTransform="translate(545.92 492.79)" gradientUnits="userSpaceOnUse" x1="-540.02" x2="-501.82" xlink:href="#gioco-a-wq" id="gioco-b-wq" y1="-470.59" y2="-470.59"></linearGradient><linearGradient id="gioco-a-wq"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(545.92 492.79)" gradientUnits="userSpaceOnUse" x1="-536.12" x2="-505.75" xlink:href="#gioco-a-wq" id="gioco-c-wq" y1="-451.55" y2="-451.55"></linearGradient></defs><path d="M25 6.122c-2.635 0-4.771 2.098-4.771 4.685.002 1.855 1.118 3.534 2.846 4.283-.369 2.286-1.51 7.558-4.68 8.009-2.355.334-3.855-1.287-4.88-3.144a4.19 4.19 0 0 0 1.767-3.4c0-2.327-1.921-4.214-4.291-4.214S6.699 14.228 6.7 16.555c0 2.142 1.64 3.943 3.809 4.183l4.973 17.54h19.036l4.973-17.54c2.169-.24 3.807-2.041 3.809-4.183 0-2.327-1.922-4.214-4.292-4.214s-4.29 1.887-4.29 4.214a4.19 4.19 0 0 0 1.766 3.4c-1.025 1.857-2.525 3.478-4.88 3.144-3.17-.45-4.31-5.723-4.68-8.01 1.729-.748 2.845-2.427 2.847-4.282 0-2.587-2.136-4.685-4.77-4.685z" fill="url(#gioco-b-wq)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="M39.002 12.342a4.348 4.348 0 0 0-1.567.296c4.741 1.678 3.877 6.805.591 7.316L30.414 38.28h4.2l4.87-17.541c2.17-.241 3.808-2.042 3.81-4.184 0-2.327-1.922-4.214-4.292-4.213z" opacity=".1"></path><path d="M13.227 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684H39.36l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-wq)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M9.515 13.489c-.794 1.17-1.726 2.667-1.554 4.779 0 0-1.604-3.01 1.554-4.779zM23.659 7.23c-.853.874-2.37 2.934-2.133 5.374-.207-.084-1.73-3.893 2.133-5.374zM12.062 23.328l5.244 14.111-1.17.023z"></path></g>', 5)
645
- ])])) : c.type === "K" ? (v(), g("svg", Q2, [...s[11] || (s[11] = [
646
- B('<defs><linearGradient gradientTransform="matrix(.26458 0 0 .25357 227.43 -666.55)" gradientUnits="userSpaceOnUse" x1="-825.75" x2="-704.44" xlink:href="#gioco-a-wk" id="gioco-b-wk" y1="2712.8" y2="2712.8"></linearGradient><linearGradient id="gioco-a-wk"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(225.05 -690.53)" gradientUnits="userSpaceOnUse" x1="-215.24" x2="-184.86" xlink:href="#gioco-a-wk" id="gioco-c-wk" y1="731.78" y2="731.78"></linearGradient></defs><path d="M25.006 3.868c-1.803.1-3.228 1.234-3.228 2.618 0 .565.244 1.644.693 2.097h-5.766v5.106h6.306l-2.61 2.833 2.673 2.167c-5.584.362-12.02 1.643-13.154 3.997-1.268 2.638 6.215 15.6 6.215 15.6h17.73s7.484-12.963 6.215-15.6c-1.133-2.357-7.594-3.64-13.179-3.999l2.71-2.165-2.61-2.833h6.306V8.583H27.54c.449-.453.693-1.531.693-2.097 0-1.384-1.425-2.518-3.228-2.618z" fill="url(#gioco-b-wk)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6" style="paint-order:fill markers;"></path><path d="m31.289 38.283 2.573-.005s7.482-12.428 6.214-15.065c-4.136-3.824-13.18-4.525-13.18-4.525 11.05 2.822 12.618 5.028 4.393 19.595z" opacity=".1"></path><path d="M13.242 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-wk)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.283 31.138s-3.074-6.555-2.666-8.092c.408-1.536 5.987-2.736 5.987-2.736-6.486 2.71-4.786 4.558-3.321 10.828zM17.521 12.884v-3.52l1.532-.011c-.891.007-1.532 2.147-1.532 3.531zM24.798 4.67s-2.614.92-1.53 3.522c-.178-.007-2.142-2.72 1.53-3.522z"></path></g>', 5)
647
- ])])) : fe("", !0);
580
+ setup(u) {
581
+ return ($, d) => (b(), P("svg", Wo, [
582
+ fo("text", {
583
+ textContent: vo(u.type),
584
+ "dominant-baseline": "middle",
585
+ "font-family": "sans-serif",
586
+ "font-size": "30",
587
+ "font-weight": "bold",
588
+ "text-anchor": "middle",
589
+ x: "25",
590
+ y: "27",
591
+ stroke: "oklch(37.3% 0.034 259.733)",
592
+ "stroke-width": "2",
593
+ fill: u.type === u.type.toLowerCase() ? "oklch(13% 0.028 261.692)" : "oklch(98.5% 0.002 247.839)"
594
+ }, null, 8, Ao)
595
+ ]));
648
596
  }
649
- }), Y2 = ["viewBox"], Z2 = ["d", "fill"], J2 = ["d", "data-hexboard-position", "data-testid", "fill"], I2 = ["d", "data-testid", "fill"], _2 = ["d", "data-testid", "fill"], et = ["textContent", "data-testid", "x", "y"], tt = ["cx", "cy", "data-testid", "fill"], ot = ["viewBox"], rt = /* @__PURE__ */ u2({
597
+ }), Ho = ["viewBox"], Oo = ["d", "fill"], Xo = ["d", "data-hexboard-position", "data-testid", "fill"], Yo = ["d", "data-testid", "fill"], Ko = ["d", "data-testid", "fill"], Qo = ["textContent", "data-testid", "x", "y"], Vo = ["cx", "cy", "data-testid", "fill"], Uo = ["viewBox"], Go = /* @__PURE__ */ ao({
650
598
  __name: "Hexboard",
651
- props: /* @__PURE__ */ r2({
599
+ props: /* @__PURE__ */ so({
652
600
  active: { type: Boolean, default: !1 },
653
601
  autoselect: { type: Boolean, default: !1 },
654
602
  flipped: { type: Boolean, default: !1 },
655
- hexchess: { default: () => c2.init() },
603
+ hexchess: { default: () => co.init() },
656
604
  highlight: { default: () => [] },
657
605
  ignoreTurn: { type: Boolean, default: !1 },
658
606
  options: { default: () => ({}) },
659
- pieces: { default: () => X2 },
607
+ pieces: { default: () => Do },
660
608
  playing: { type: [String, Boolean], default: !1 },
661
- position: { default: $2 }
609
+ position: { default: qo }
662
610
  }, {
663
611
  "mouseover-position": {
664
612
  default: null,
@@ -676,215 +624,215 @@ const O2 = {
676
624
  },
677
625
  targetsModifiers: {}
678
626
  }),
679
- emits: /* @__PURE__ */ r2(["clickPosition", "move"], ["update:mouseover-position", "update:selected", "update:targets"]),
680
- setup(c, { emit: P }) {
681
- const s = c, K = P, E = X1(c, "mouseover-position"), U = X1(c, "selected"), V = X1(c, "targets"), e1 = o1({ x: 0, y: 0 }), C = o1(null), ce = o1(se()), h = o1({
627
+ emits: /* @__PURE__ */ so(["clickPosition", "move"], ["update:mouseover-position", "update:selected", "update:targets"]),
628
+ setup(u, { emit: $ }) {
629
+ const d = u, Q = $, F = Zt(u, "mouseover-position"), L = Zt(u, "selected"), X = Zt(u, "targets"), Ie = et({ x: 0, y: 0 }), B = et(null), ue = et(se()), h = et({
682
630
  hexchess: null,
683
631
  promotionEl: null,
684
632
  promotionFrom: null,
685
633
  promotionTo: null,
686
634
  selected: null
687
- }), A1 = y2("svgEl"), A = o1(se());
688
- let D1 = !1;
689
- const d2 = j(() => h.value.hexchess ? [] : V.value), ue = j(() => h.value.hexchess ? h.value.hexchess : s.hexchess ? s.hexchess : c2.init()), f2 = j(() => ue.value.board.reduce(
690
- (r, d, u) => (d && u !== C.value && r.push({ piece: d, index: u }), r),
635
+ }), Kt = Co("svgEl"), Y = et(se());
636
+ let Qt = !1;
637
+ const ho = z(() => h.value.hexchess ? [] : X.value), ce = z(() => h.value.hexchess ? h.value.hexchess : d.hexchess ? d.hexchess : co.init()), po = z(() => ce.value.board.reduce(
638
+ (s, a, c) => (a && c !== B.value && s.push({ piece: a, index: c }), s),
691
639
  []
692
- )), r1 = j(() => typeof h.value.selected == "number" ? null : U.value), Y1 = j(() => {
693
- var r, d, u;
694
- if (K1.value)
640
+ )), lt = z(() => typeof h.value.selected == "number" ? null : L.value), jt = z(() => {
641
+ var s, a, c;
642
+ if (Vt.value)
695
643
  return "grabbing";
696
- if (!(!s.active || E.value === null || h.value.hexchess)) {
697
- if (U.value !== null && V.value.includes(E.value)) {
698
- const p = (r = ue.value) == null ? void 0 : r.board[U.value];
699
- if (p) {
700
- const b = p === p.toLowerCase() ? "b" : "w", z = ((d = ue.value) == null ? void 0 : d.turn) === b;
701
- if ((s.playing === !0 || z) && a1(U.value))
644
+ if (!(!d.active || F.value === null || h.value.hexchess)) {
645
+ if (L.value !== null && X.value.includes(F.value)) {
646
+ const v = (s = ce.value) == null ? void 0 : s.board[L.value];
647
+ if (v) {
648
+ const g = v === v.toLowerCase() ? "b" : "w", C = ((a = ce.value) == null ? void 0 : a.turn) === g;
649
+ if ((d.playing === !0 || C) && it(L.value))
702
650
  return "pointer";
703
651
  }
704
652
  }
705
- if (s1.value)
706
- return s.playing === !0 || s.playing && J1.value === ((u = ue.value) == null ? void 0 : u.turn) && s.playing === J1.value ? "grab" : "pointer";
653
+ if (st.value)
654
+ return d.playing === !0 || d.playing && Jt.value === ((c = ce.value) == null ? void 0 : c.turn) && d.playing === Jt.value ? "grab" : "pointer";
707
655
  }
708
- }), Z1 = j(() => ({
709
- x: e1.value.x - A.value.width / 2,
710
- y: e1.value.y - A.value.height / 2
711
- })), K1 = j(() => !s.hexchess || h.value.hexchess || C.value === null ? null : s.hexchess.board[C.value]), D = j(() => ({ ...B2, ...s.options })), J1 = j(() => s1.value ? s1.value === s1.value.toLowerCase() ? "b" : "w" : null), s1 = j(() => {
712
- var r;
713
- return E.value === null ? null : ((r = ue.value) == null ? void 0 : r.board[E.value]) ?? null;
714
- }), l1 = j(() => {
715
- var p;
716
- const r = (p = h.value.hexchess) == null ? void 0 : p.board[h.value.selected ?? -1], d = r === (r == null ? void 0 : r.toUpperCase()), u = (b) => (z) => S2(s.pieces, { ...z, type: b });
656
+ }), Gt = z(() => ({
657
+ x: Ie.value.x - Y.value.width / 2,
658
+ y: Ie.value.y - Y.value.height / 2
659
+ })), Vt = z(() => !d.hexchess || h.value.hexchess || B.value === null ? null : d.hexchess.board[B.value]), K = z(() => ({ ...So, ...d.options })), Jt = z(() => st.value ? st.value === st.value.toLowerCase() ? "b" : "w" : null), st = z(() => {
660
+ var s;
661
+ return F.value === null ? null : ((s = ce.value) == null ? void 0 : s.board[F.value]) ?? null;
662
+ }), rt = z(() => {
663
+ var v;
664
+ const s = (v = h.value.hexchess) == null ? void 0 : v.board[h.value.selected ?? -1], a = s === (s == null ? void 0 : s.toUpperCase()), c = (g) => (C) => To(d.pieces, { ...C, type: g });
717
665
  return {
718
- n: u(d ? "N" : "n"),
719
- b: u(d ? "B" : "b"),
720
- r: u(d ? "R" : "r"),
721
- q: u(d ? "Q" : "q")
666
+ n: c(a ? "N" : "n"),
667
+ b: c(a ? "B" : "b"),
668
+ r: c(a ? "R" : "r"),
669
+ q: c(a ? "Q" : "q")
722
670
  };
723
671
  });
724
- x2(() => {
725
- s.active && I1();
726
- }), M2(i2), s2(Y1, (r) => {
672
+ Eo(() => {
673
+ d.active && It();
674
+ }), $o(lo), ro(jt, (s) => {
727
675
  document.body.style.setProperty(
728
676
  "cursor",
729
- r === "grabbing" ? "grabbing" : null
677
+ s === "grabbing" ? "grabbing" : null
730
678
  );
731
- }), s2(
732
- () => s.active,
733
- (r) => r ? I1() : i2()
679
+ }), ro(
680
+ () => d.active,
681
+ (s) => s ? It() : lo()
734
682
  );
735
- function Q1(r, d) {
736
- var z, le;
737
- if (!V.value.includes(r.to))
683
+ function Ut(s, a) {
684
+ var C, re;
685
+ if (!X.value.includes(s.to))
738
686
  return;
739
- const u = (z = s.hexchess) == null ? void 0 : z.board[r.from];
740
- if (!u)
687
+ const c = (C = d.hexchess) == null ? void 0 : C.board[s.from];
688
+ if (!c)
741
689
  return;
742
- const p = u === u.toLowerCase() ? "b" : "w", b = ((le = s.hexchess) == null ? void 0 : le.turn) === p;
743
- if (s.hexchess && (u === "p" || u === "P") && T2(r.to, p)) {
744
- const de = s.hexchess.clone();
745
- de.board[r.from] = null, de.board[r.to] = u, h.value = {
746
- hexchess: de,
747
- promotionEl: (d == null ? void 0 : d.target) instanceof Element ? d.target : null,
748
- promotionFrom: r.from,
749
- promotionTo: r.to,
750
- selected: r.to
751
- }, (d == null ? void 0 : d.target) instanceof Element && (ce.value = d.target.getBoundingClientRect());
690
+ const v = c === c.toLowerCase() ? "b" : "w", g = ((re = d.hexchess) == null ? void 0 : re.turn) === v;
691
+ if (d.hexchess && (c === "p" || c === "P") && Fo(s.to, v)) {
692
+ const ae = d.hexchess.clone();
693
+ ae.board[s.from] = null, ae.board[s.to] = c, h.value = {
694
+ hexchess: ae,
695
+ promotionEl: (a == null ? void 0 : a.target) instanceof Element ? a.target : null,
696
+ promotionFrom: s.from,
697
+ promotionTo: s.to,
698
+ selected: s.to
699
+ }, (a == null ? void 0 : a.target) instanceof Element && (ue.value = a.target.getBoundingClientRect());
752
700
  return;
753
701
  }
754
- a1(r.from) && (s.ignoreTurn || b) && e2(r);
702
+ it(s.from) && (d.ignoreTurn || g) && eo(s);
755
703
  }
756
- function a1(r) {
757
- var p;
758
- const d = (p = s.hexchess) == null ? void 0 : p.board[r];
759
- if (!d)
704
+ function it(s) {
705
+ var v;
706
+ const a = (v = d.hexchess) == null ? void 0 : v.board[s];
707
+ if (!a)
760
708
  return !1;
761
- const u = d === d.toLowerCase() ? "b" : "w";
762
- return s.playing === !0 || s.playing === u;
709
+ const c = a === a.toLowerCase() ? "b" : "w";
710
+ return d.playing === !0 || d.playing === c;
763
711
  }
764
- function p2(r) {
765
- var d, u;
766
- return E.value === null ? D.value.labelColor : (d = H(E.value)) != null && d.startsWith(r) || (u = H(E.value)) != null && u.endsWith(r) ? D.value.labelActiveColor : D.value.labelInactiveColor;
712
+ function mo(s) {
713
+ var a, c;
714
+ return F.value === null ? K.value.labelColor : (a = W(F.value)) != null && a.startsWith(s) || (c = W(F.value)) != null && c.endsWith(s) ? K.value.labelActiveColor : K.value.labelInactiveColor;
767
715
  }
768
- function I1() {
769
- e1.value = { x: 0, y: 0 }, window.addEventListener("keyup", _1), window.addEventListener("pointermove", t2), window.addEventListener("pointerup", n2), window.addEventListener("resize", c1), window.addEventListener("scroll", c1), window.addEventListener("touchmove", o2, { passive: !1 });
716
+ function It() {
717
+ Ie.value = { x: 0, y: 0 }, window.addEventListener("keyup", _t), window.addEventListener("pointermove", to), window.addEventListener("pointerup", no), window.addEventListener("resize", ut), window.addEventListener("scroll", ut), window.addEventListener("touchmove", oo, { passive: !1 });
770
718
  }
771
- function c1() {
772
- var r;
773
- ce.value = ((r = h.value.promotionEl) == null ? void 0 : r.getBoundingClientRect()) ?? se();
719
+ function ut() {
720
+ var s;
721
+ ue.value = ((s = h.value.promotionEl) == null ? void 0 : s.getBoundingClientRect()) ?? se();
774
722
  }
775
- function h2(r, d) {
776
- if (s.active) {
777
- if (D1) {
778
- D1 = !1;
723
+ function go(s, a) {
724
+ if (d.active) {
725
+ if (Qt) {
726
+ Qt = !1;
779
727
  return;
780
728
  }
781
729
  if (h.value.hexchess) {
782
- h.value.selected !== r && t1();
730
+ h.value.selected !== s && _e();
783
731
  return;
784
732
  }
785
- if (U.value !== null && V.value.includes(r)) {
786
- const u = new f1({ from: U.value, to: r });
787
- Q1(u, d);
733
+ if (L.value !== null && X.value.includes(s)) {
734
+ const c = new ft({ from: L.value, to: s });
735
+ Ut(c, a);
788
736
  return;
789
737
  }
790
- s.autoselect && !s.hexchess.board[r] && (U.value = null, V.value = []), K("clickPosition", r);
738
+ d.autoselect && !d.hexchess.board[s] && (L.value = null, X.value = []), Q("clickPosition", s);
791
739
  }
792
740
  }
793
- function _1(r) {
794
- if (r.key === "Escape") {
741
+ function _t(s) {
742
+ if (s.key === "Escape") {
795
743
  if (h.value.hexchess) {
796
- t1();
744
+ _e();
797
745
  return;
798
746
  }
799
- s.autoselect && (U.value = null, V.value = []);
747
+ d.autoselect && (L.value = null, X.value = []);
800
748
  }
801
749
  }
802
- function e2(r) {
803
- K("move", r), u1();
750
+ function eo(s) {
751
+ Q("move", s), ct();
804
752
  }
805
- function v2(r, d) {
806
- var u;
807
- if (d.stopPropagation(), C.value !== null) {
808
- let p = r;
809
- const b = document.elementFromPoint(
810
- d.clientX,
811
- d.clientY
812
- ), z = b == null ? void 0 : b.getAttribute("data-hexboard-position");
813
- z !== null && (p = Number(z));
814
- const le = new f1({ from: C.value, to: p });
815
- if (Q1(le, d), h.value.hexchess)
753
+ function wo(s, a) {
754
+ var c;
755
+ if (a.stopPropagation(), B.value !== null) {
756
+ let v = s;
757
+ const g = document.elementFromPoint(
758
+ a.clientX,
759
+ a.clientY
760
+ ), C = g == null ? void 0 : g.getAttribute("data-hexboard-position");
761
+ C !== null && (v = Number(C));
762
+ const re = new ft({ from: B.value, to: v });
763
+ if (Ut(re, a), h.value.hexchess)
816
764
  return;
817
- C.value = null, A.value = se();
765
+ B.value = null, Y.value = se();
818
766
  return;
819
767
  }
820
- if (U.value !== null && V.value.includes(r)) {
821
- const p = new f1({ from: U.value, to: r });
822
- return Q1(p, d), h.value.hexchess, void 0;
768
+ if (L.value !== null && X.value.includes(s)) {
769
+ const v = new ft({ from: L.value, to: s });
770
+ return Ut(v, a), h.value.hexchess, void 0;
823
771
  }
824
772
  if (h.value.hexchess) {
825
- t1();
773
+ _e();
826
774
  return;
827
775
  }
828
- if ((u = s.hexchess) != null && u.board[r]) {
829
- C.value = null, A.value = se();
776
+ if ((c = d.hexchess) != null && c.board[s]) {
777
+ B.value = null, Y.value = se();
830
778
  return;
831
779
  }
832
- u1();
780
+ ct();
833
781
  }
834
- function t1() {
835
- const r = h.value.promotionFrom;
782
+ function _e() {
783
+ const s = h.value.promotionFrom;
836
784
  h.value = {
837
785
  hexchess: null,
838
786
  promotionEl: null,
839
787
  promotionFrom: null,
840
788
  promotionTo: null,
841
789
  selected: null
842
- }, typeof r == "number" && (U.value = r, V.value = s.hexchess.movesFrom(r).map((d) => d.to) ?? []), C.value = null, D1 = !0;
790
+ }, typeof s == "number" && (L.value = s, X.value = d.hexchess.movesFrom(s).map((a) => a.to) ?? []), B.value = null, Qt = !0;
843
791
  }
844
- function g2(r, d) {
845
- var z, le, de;
846
- if (d.preventDefault(), h.value.hexchess)
792
+ function yo(s, a) {
793
+ var C, re, ae;
794
+ if (a.preventDefault(), h.value.hexchess)
847
795
  return;
848
- const u = (z = s.hexchess) == null ? void 0 : z.board[r];
849
- if (!u || (s.autoselect && (U.value = r, V.value = ((le = s.hexchess) == null ? void 0 : le.movesFrom(r).map((k2) => k2.to)) ?? []), !a1(r)))
796
+ const c = (C = d.hexchess) == null ? void 0 : C.board[s];
797
+ if (!c || (d.autoselect && (L.value = s, X.value = ((re = d.hexchess) == null ? void 0 : re.movesFrom(s).map((Po) => Po.to)) ?? []), !it(s)))
850
798
  return;
851
- const p = u === u.toLowerCase() ? "b" : "w", b = ((de = s.hexchess) == null ? void 0 : de.turn) === p;
852
- !s.ignoreTurn && !b || (C.value = r, e1.value = { x: d.clientX, y: d.clientY }, A1.value instanceof Element && (A.value = A1.value.getBoundingClientRect()));
799
+ const v = c === c.toLowerCase() ? "b" : "w", g = ((ae = d.hexchess) == null ? void 0 : ae.turn) === v;
800
+ !d.ignoreTurn && !g || (B.value = s, Ie.value = { x: a.clientX, y: a.clientY }, Kt.value instanceof Element && (Y.value = Kt.value.getBoundingClientRect()));
853
801
  }
854
- function w2(r) {
855
- E.value = r;
802
+ function bo(s) {
803
+ F.value = s;
856
804
  }
857
- function m2() {
858
- E.value = null;
805
+ function xo() {
806
+ F.value = null;
859
807
  }
860
- function t2(r) {
861
- s.active && (e1.value = { x: r.clientX, y: r.clientY });
808
+ function to(s) {
809
+ d.active && (Ie.value = { x: s.clientX, y: s.clientY });
862
810
  }
863
- function o2(r) {
864
- C.value !== null && r.preventDefault();
811
+ function oo(s) {
812
+ B.value !== null && s.preventDefault();
865
813
  }
866
- function n2() {
814
+ function no() {
867
815
  if (h.value.hexchess) {
868
- t1();
816
+ _e();
869
817
  return;
870
818
  }
871
- if (C.value !== null) {
872
- C.value = null, A.value = se();
819
+ if (B.value !== null) {
820
+ B.value = null, Y.value = se();
873
821
  return;
874
822
  }
875
- u1();
823
+ ct();
876
824
  }
877
- function b2(r) {
878
- if (typeof h.value.promotionFrom == "number" && a1(h.value.promotionFrom)) {
879
- const d = new f1({
825
+ function ko(s) {
826
+ if (typeof h.value.promotionFrom == "number" && it(h.value.promotionFrom)) {
827
+ const a = new ft({
880
828
  from: h.value.promotionFrom ?? 0,
881
829
  to: h.value.promotionTo ?? 0,
882
- promotion: r
830
+ promotion: s
883
831
  });
884
- e2(d);
832
+ eo(a);
885
833
  }
886
834
  }
887
- function se(r = {}) {
835
+ function se() {
888
836
  return {
889
837
  bottom: 0,
890
838
  height: 0,
@@ -893,154 +841,153 @@ const O2 = {
893
841
  top: 0,
894
842
  width: 0,
895
843
  x: 0,
896
- y: 0,
897
- ...r
844
+ y: 0
898
845
  };
899
846
  }
900
- function u1() {
901
- document.body.style.setProperty("cursor", null), C.value = null, U.value = null, h.value = {
847
+ function ct() {
848
+ document.body.style.setProperty("cursor", null), B.value = null, L.value = null, h.value = {
902
849
  hexchess: null,
903
850
  promotionEl: null,
904
851
  promotionFrom: null,
905
852
  promotionTo: null,
906
853
  selected: null
907
- }, A.value = se(), V.value = [];
854
+ }, Y.value = se(), X.value = [];
908
855
  }
909
- function i2() {
910
- u1(), window.removeEventListener("keyup", _1), window.removeEventListener("pointermove", t2), window.removeEventListener("pointerup", n2), window.removeEventListener("resize", c1), window.removeEventListener("scroll", c1), window.removeEventListener("touchmove", o2);
856
+ function lo() {
857
+ ct(), window.removeEventListener("keyup", _t), window.removeEventListener("pointermove", to), window.removeEventListener("pointerup", no), window.removeEventListener("resize", ut), window.removeEventListener("scroll", ut), window.removeEventListener("touchmove", oo);
911
858
  }
912
- return (r, d) => (v(), g("div", null, [
913
- (v(), g("svg", {
859
+ return (s, a) => (b(), P("div", null, [
860
+ (b(), P("svg", {
914
861
  xmlns: "http://www.w3.org/2000/svg",
915
862
  ref_key: "svgEl",
916
- ref: A1,
917
- style: d1({ cursor: Y1.value }),
863
+ ref: Kt,
864
+ style: at({ cursor: jt.value }),
918
865
  viewBox: `0 0 ${f(ve)} ${f(ve)}`
919
866
  }, [
920
- z2("path", {
921
- d: f(V1)(f(q2)),
922
- fill: D.value.colors[1],
867
+ fo("path", {
868
+ d: f(Xt)(f(zo)),
869
+ fill: K.value.colors[1],
923
870
  style: { pointerEvents: "none" }
924
- }, null, 8, Z2),
925
- (v(!0), g(n1, null, i1(f(o), (u, p) => (v(), g("path", G2(
871
+ }, null, 8, Oo),
872
+ (b(!0), P(ot, null, nt(f(o), (c, v) => (b(), P("path", Lo(
926
873
  { ref_for: !0 },
927
- c.active ? {
928
- onClick: (b) => h2(p, b),
929
- onMouseenter: () => w2(p),
930
- onMouseleave: () => m2(),
931
- onPointerdown: (b) => g2(p, b),
932
- onPointerup: (b) => v2(p, b)
874
+ u.active ? {
875
+ onClick: (g) => go(v, g),
876
+ onMouseenter: () => bo(v),
877
+ onMouseleave: () => xo(),
878
+ onPointerdown: (g) => yo(v, g),
879
+ onPointerup: (g) => wo(v, g)
933
880
  } : {},
934
881
  {
935
- d: f(V1)(c.flipped ? u[4] : u[3]),
936
- "data-hexboard-position": p,
937
- "data-testid": `position-${f(H)(p)}`,
938
- fill: D.value.colors[f(o)[p][0]],
939
- key: p
882
+ d: f(Xt)(u.flipped ? c[4] : c[3]),
883
+ "data-hexboard-position": v,
884
+ "data-testid": `position-${f(W)(v)}`,
885
+ fill: K.value.colors[f(o)[v][0]],
886
+ key: v
940
887
  }
941
- ), null, 16, J2))), 128)),
942
- (v(!0), g(n1, null, i1(c.highlight, (u) => (v(), g("path", {
943
- d: f(V1)(c.flipped ? f(o)[u][4] : f(o)[u][3]),
944
- "data-testid": `highlight-${f(H)(u)}`,
945
- fill: D.value.highlightColor,
946
- key: `highlight-${u}`,
888
+ ), null, 16, Xo))), 128)),
889
+ (b(!0), P(ot, null, nt(u.highlight, (c) => (b(), P("path", {
890
+ d: f(Xt)(u.flipped ? f(o)[c][4] : f(o)[c][3]),
891
+ "data-testid": `highlight-${f(W)(c)}`,
892
+ fill: K.value.highlightColor,
893
+ key: `highlight-${c}`,
947
894
  style: { pointerEvents: "none" }
948
- }, null, 8, I2))), 128)),
949
- typeof r1.value == "number" ? (v(), g("path", {
895
+ }, null, 8, Yo))), 128)),
896
+ typeof lt.value == "number" ? (b(), P("path", {
950
897
  key: 0,
951
- d: f(V1)(c.flipped ? f(o)[r1.value][4] : f(o)[r1.value][3]),
952
- "data-testid": `selected-${f(H)(r1.value)}`,
953
- fill: D.value.selectedColor,
898
+ d: f(Xt)(u.flipped ? f(o)[lt.value][4] : f(o)[lt.value][3]),
899
+ "data-testid": `selected-${f(W)(lt.value)}`,
900
+ fill: K.value.selectedColor,
954
901
  ref: "selectedEl",
955
902
  style: { pointerEvents: "none" }
956
- }, null, 8, _2)) : fe("", !0),
957
- D.value.labels ? (v(!0), g(n1, { key: 1 }, i1(f(L2), ([u, p, b], z) => (v(), g("text", {
958
- textContent: P2(u),
903
+ }, null, 8, Ko)) : tt("", !0),
904
+ K.value.labels ? (b(!0), P(ot, { key: 1 }, nt(f(No), ([c, v, g], C) => (b(), P("text", {
905
+ textContent: vo(c),
959
906
  "dominant-baseline": "central",
960
907
  "text-anchor": "middle",
961
- "data-testid": `label-${u}`,
962
- key: `label-${z}`,
963
- style: d1({
964
- fill: p2(u),
908
+ "data-testid": `label-${c}`,
909
+ key: `label-${C}`,
910
+ style: at({
911
+ fill: mo(c),
965
912
  fontSize: ".5px",
966
913
  pointerEvents: "none",
967
914
  userSelect: "none"
968
915
  }),
969
- x: f(pe)(c.flipped ? b[0] : p[0]),
970
- y: f(he)(c.flipped ? b[1] : p[1])
971
- }, null, 12, et))), 128)) : fe("", !0),
972
- ue.value ? (v(!0), g(n1, { key: 2 }, i1(f2.value, ({ piece: u, index: p }) => (v(), l2(a2(c.pieces), {
973
- "data-piece-type": u,
974
- "data-testid": `piece-${f(H)(p)}`,
975
- height: f(Q),
976
- key: `piece-${f(H)(p)}`,
916
+ x: f(fe)(u.flipped ? g[0] : v[0]),
917
+ y: f(de)(u.flipped ? g[1] : v[1])
918
+ }, null, 12, Qo))), 128)) : tt("", !0),
919
+ ce.value ? (b(!0), P(ot, { key: 2 }, nt(po.value, ({ piece: c, index: v }) => (b(), io(uo(u.pieces), {
920
+ "data-piece-type": c,
921
+ "data-testid": `piece-${f(W)(v)}`,
922
+ height: f(V),
923
+ key: `piece-${f(W)(v)}`,
977
924
  style: { pointerEvents: "none" },
978
- type: u,
979
- width: f(Q),
980
- x: f(pe)(f(o)[p][c.flipped ? 2 : 1][0] - f(Q) / 2),
981
- y: f(he)(f(o)[p][c.flipped ? 2 : 1][1] + f(Q) / 2)
982
- }, null, 8, ["data-piece-type", "data-testid", "height", "type", "width", "x", "y"]))), 128)) : fe("", !0),
983
- (v(!0), g(n1, null, i1(d2.value, (u) => (v(), g("circle", {
984
- cx: f(pe)(f(o)[u][c.flipped ? 2 : 1][0]),
985
- cy: f(he)(f(o)[u][c.flipped ? 2 : 1][1]),
986
- "data-testid": `target-${f(H)(u)}`,
987
- fill: D.value.targetColor,
988
- key: `target-${f(H)(u)}`,
925
+ type: c,
926
+ width: f(V),
927
+ x: f(fe)(f(o)[v][u.flipped ? 2 : 1][0] - f(V) / 2),
928
+ y: f(de)(f(o)[v][u.flipped ? 2 : 1][1] + f(V) / 2)
929
+ }, null, 8, ["data-piece-type", "data-testid", "height", "type", "width", "x", "y"]))), 128)) : tt("", !0),
930
+ (b(!0), P(ot, null, nt(ho.value, (c) => (b(), P("circle", {
931
+ cx: f(fe)(f(o)[c][u.flipped ? 2 : 1][0]),
932
+ cy: f(de)(f(o)[c][u.flipped ? 2 : 1][1]),
933
+ "data-testid": `target-${f(W)(c)}`,
934
+ fill: K.value.targetColor,
935
+ key: `target-${f(W)(c)}`,
989
936
  r: 0.3,
990
937
  style: { pointerEvents: "none" }
991
- }, null, 8, tt))), 128))
992
- ], 12, Y2)),
993
- K1.value ? (v(), g("svg", {
938
+ }, null, 8, Vo))), 128))
939
+ ], 12, Ho)),
940
+ Vt.value ? (b(), P("svg", {
994
941
  key: 0,
995
942
  "data-testid": "drag-piece",
996
943
  xmlns: "http://www.w3.org/2000/svg",
997
- style: d1({
998
- height: A.value.height + "px",
944
+ style: at({
945
+ height: Y.value.height + "px",
999
946
  left: "0px",
1000
947
  pointerEvents: "none",
1001
948
  position: "fixed",
1002
949
  top: "0px",
1003
- transform: `translate(${Z1.value.x}px, ${Z1.value.y}px) scale(1.1)`,
1004
- width: A.value.width + "px",
950
+ transform: `translate(${Gt.value.x}px, ${Gt.value.y}px) scale(1.1)`,
951
+ width: Y.value.width + "px",
1005
952
  willChange: "transform"
1006
953
  }),
1007
954
  viewBox: `0 0 ${f(ve)} ${f(ve)}`
1008
955
  }, [
1009
- (v(), l2(a2(c.pieces), {
1010
- height: f(Q),
956
+ (b(), io(uo(u.pieces), {
957
+ height: f(V),
1011
958
  style: { pointerEvents: "none" },
1012
- type: K1.value,
1013
- width: f(Q),
1014
- x: f(pe)(f(Q) / -2),
1015
- y: f(he)(f(Q) / 2)
959
+ type: Vt.value,
960
+ width: f(V),
961
+ x: f(fe)(f(V) / -2),
962
+ y: f(de)(f(V) / 2)
1016
963
  }, null, 8, ["height", "type", "width", "x", "y"]))
1017
- ], 12, ot)) : fe("", !0),
1018
- typeof h.value.selected == "number" ? (v(), g("div", {
964
+ ], 12, Uo)) : tt("", !0),
965
+ typeof h.value.selected == "number" ? (b(), P("div", {
1019
966
  key: 1,
1020
- style: d1({
1021
- height: ce.value.height + "px",
1022
- left: ce.value.left + "px",
967
+ style: at({
968
+ height: ue.value.height + "px",
969
+ left: ue.value.left + "px",
1023
970
  position: "fixed",
1024
- top: ce.value.top + "px",
1025
- width: ce.value.width + "px"
971
+ top: ue.value.top + "px",
972
+ width: ue.value.width + "px"
1026
973
  }),
1027
- onPointerup: d[0] || (d[0] = U2(() => {
974
+ onPointerup: a[0] || (a[0] = Bo(() => {
1028
975
  }, ["stop"]))
1029
976
  }, [
1030
- C2(r.$slots, "promotion", {
1031
- b: l1.value.b,
1032
- cancel: t1,
1033
- file: f(H)(h.value.selected)[0],
1034
- n: l1.value.n,
1035
- promote: b2,
1036
- q: l1.value.q,
1037
- r: l1.value.r,
1038
- rank: Number(f(H)(h.value.selected).slice(1))
977
+ Mo(s.$slots, "promotion", {
978
+ b: rt.value.b,
979
+ cancel: _e,
980
+ file: f(W)(h.value.selected)[0],
981
+ n: rt.value.n,
982
+ promote: ko,
983
+ q: rt.value.q,
984
+ r: rt.value.r,
985
+ rank: Number(f(W)(h.value.selected).slice(1))
1039
986
  })
1040
- ], 36)) : fe("", !0)
987
+ ], 36)) : tt("", !0)
1041
988
  ]));
1042
989
  }
1043
990
  });
1044
991
  export {
1045
- rt as Hexboard
992
+ Go as Hexboard
1046
993
  };