@oneclick.dev/cms-core-modules 0.0.101 → 0.0.102
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/Acquisition-Br1Pfny3.js +1 -0
- package/dist/{Acquisition-BJXNY4ko.mjs → Acquisition-CPlZzUBo.mjs} +40 -40
- package/dist/Audience-BfkrmBuQ.js +1 -0
- package/dist/{Audience-CIzVtUvV.mjs → Audience-DTblSAiL.mjs} +89 -89
- package/dist/Content-BHr_rPVY.js +1 -0
- package/dist/{Content-CWhjurn_.mjs → Content-CYOZKvWK.mjs} +56 -56
- package/dist/Overview-BrCwozey.js +1 -0
- package/dist/{Overview-CGo4jaaA.mjs → Overview-kaMhsIUq.mjs} +21 -21
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CL5kbDII.mjs +2782 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DcyyNvf6.js +349 -0
- package/dist/SeoHealth-09sEOu3G.js +1 -0
- package/dist/{SeoHealth-DVFDz3em.mjs → SeoHealth-BzcWd_w7.mjs} +29 -29
- package/dist/{agenda-DMT75Qfo.mjs → agenda-CCOjPiwP.mjs} +1 -1
- package/dist/{agenda-DxD4RMsy.js → agenda-CNPQfaIQ.js} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{index-BbqRTXuU.js → index-BOnqrBfY.js} +1 -1
- package/dist/{index-D4GsbUId.mjs → index-Bj0qaL1N.mjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +8 -8
- package/dist/{orders-BRfXlWgV.mjs → orders-BJV5vRQr.mjs} +1 -1
- package/dist/{orders-CrCz1WTR.js → orders-C1C5IEIP.js} +1 -1
- package/package.json +2 -2
- package/dist/Acquisition-DPScJD4t.js +0 -1
- package/dist/Audience-Csw1QLmw.js +0 -1
- package/dist/Content-dYr7kYT0.js +0 -1
- package/dist/Overview-DBu86Ikb.js +0 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-COfCOMsz.js +0 -349
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CYXkhhdp.mjs +0 -2383
- package/dist/SeoHealth-DzftZW1m.js +0 -1
|
@@ -1,2383 +0,0 @@
|
|
|
1
|
-
import { defineComponent as te, ref as $, resolveComponent as _, openBlock as R, createBlock as J, withCtx as g, createVNode as c, createTextVNode as A, createElementVNode as m, unref as S, normalizeClass as le, toDisplayString as F, inject as Je, useTemplateRef as oe, computed as pe, createElementBlock as U, Fragment as fe, createCommentVNode as L } from "vue";
|
|
2
|
-
import { User as Xe, Mail as Ze, Phone as qe, Clock as et, Users as tt, Tag as st, CreditCard as nt, Receipt as ot, Ban as at, ClockCheck as it, MoreHorizontal as rt, Download as lt, MailCheck as ut, XCircle as ct, Gift as dt } from "lucide-vue-next";
|
|
3
|
-
import { useModule as se, useMailer as be, useModulePermissions as pt, useFirebaseIntegration as ft } from "@oneclick.dev/cms-kit";
|
|
4
|
-
import { t as Z } from "./index-RLz1QPrf.mjs";
|
|
5
|
-
function K(t) {
|
|
6
|
-
return Array.isArray ? Array.isArray(t) : Re(t) === "[object Array]";
|
|
7
|
-
}
|
|
8
|
-
function mt(t) {
|
|
9
|
-
if (typeof t == "string")
|
|
10
|
-
return t;
|
|
11
|
-
let e = t + "";
|
|
12
|
-
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
13
|
-
}
|
|
14
|
-
function we(t) {
|
|
15
|
-
return t == null ? "" : mt(t);
|
|
16
|
-
}
|
|
17
|
-
function z(t) {
|
|
18
|
-
return typeof t == "string";
|
|
19
|
-
}
|
|
20
|
-
function me(t) {
|
|
21
|
-
return typeof t == "number";
|
|
22
|
-
}
|
|
23
|
-
function gt(t) {
|
|
24
|
-
return t === !0 || t === !1 || vt(t) && Re(t) == "[object Boolean]";
|
|
25
|
-
}
|
|
26
|
-
function Se(t) {
|
|
27
|
-
return typeof t == "object";
|
|
28
|
-
}
|
|
29
|
-
function vt(t) {
|
|
30
|
-
return Se(t) && t !== null;
|
|
31
|
-
}
|
|
32
|
-
function P(t) {
|
|
33
|
-
return t != null;
|
|
34
|
-
}
|
|
35
|
-
function ae(t) {
|
|
36
|
-
return !t.trim().length;
|
|
37
|
-
}
|
|
38
|
-
function Re(t) {
|
|
39
|
-
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
|
|
40
|
-
}
|
|
41
|
-
const ht = "Incorrect 'index' type", _t = (t) => `Invalid value for key ${t}`, xt = (t) => `Pattern length exceeds max of ${t}.`, Dt = (t) => `Missing ${t} property in key`, bt = (t) => `Property 'weight' in key '${t}' must be a positive integer`, ke = Object.prototype.hasOwnProperty;
|
|
42
|
-
class yt {
|
|
43
|
-
constructor(e) {
|
|
44
|
-
this._keys = [], this._keyMap = {};
|
|
45
|
-
let s = 0;
|
|
46
|
-
e.forEach((n) => {
|
|
47
|
-
let a = Ie(n);
|
|
48
|
-
this._keys.push(a), this._keyMap[a.id] = a, s += a.weight;
|
|
49
|
-
}), this._keys.forEach((n) => {
|
|
50
|
-
n.weight /= s;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
get(e) {
|
|
54
|
-
return this._keyMap[e];
|
|
55
|
-
}
|
|
56
|
-
keys() {
|
|
57
|
-
return this._keys;
|
|
58
|
-
}
|
|
59
|
-
toJSON() {
|
|
60
|
-
return JSON.stringify(this._keys);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function Ie(t) {
|
|
64
|
-
let e = null, s = null, n = null, a = 1, r = null;
|
|
65
|
-
if (z(t) || K(t))
|
|
66
|
-
n = t, e = Ee(t), s = ge(t);
|
|
67
|
-
else {
|
|
68
|
-
if (!ke.call(t, "name"))
|
|
69
|
-
throw new Error(Dt("name"));
|
|
70
|
-
const i = t.name;
|
|
71
|
-
if (n = i, ke.call(t, "weight") && (a = t.weight, a <= 0))
|
|
72
|
-
throw new Error(bt(i));
|
|
73
|
-
e = Ee(i), s = ge(i), r = t.getFn;
|
|
74
|
-
}
|
|
75
|
-
return { path: e, id: s, weight: a, src: n, getFn: r };
|
|
76
|
-
}
|
|
77
|
-
function Ee(t) {
|
|
78
|
-
return K(t) ? t : t.split(".");
|
|
79
|
-
}
|
|
80
|
-
function ge(t) {
|
|
81
|
-
return K(t) ? t.join(".") : t;
|
|
82
|
-
}
|
|
83
|
-
function At(t, e) {
|
|
84
|
-
let s = [], n = !1;
|
|
85
|
-
const a = (r, i, l, p) => {
|
|
86
|
-
if (P(r))
|
|
87
|
-
if (!i[l])
|
|
88
|
-
s.push(p !== void 0 ? { v: r, i: p } : r);
|
|
89
|
-
else {
|
|
90
|
-
let o = i[l];
|
|
91
|
-
const u = r[o];
|
|
92
|
-
if (!P(u))
|
|
93
|
-
return;
|
|
94
|
-
if (l === i.length - 1 && (z(u) || me(u) || gt(u)))
|
|
95
|
-
s.push(
|
|
96
|
-
p !== void 0 ? { v: we(u), i: p } : we(u)
|
|
97
|
-
);
|
|
98
|
-
else if (K(u)) {
|
|
99
|
-
n = !0;
|
|
100
|
-
for (let v = 0, b = u.length; v < b; v += 1)
|
|
101
|
-
a(u[v], i, l + 1, v);
|
|
102
|
-
} else i.length && a(u, i, l + 1, p);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return a(t, z(e) ? e.split(".") : e, 0), n ? s : s[0];
|
|
106
|
-
}
|
|
107
|
-
const Ct = {
|
|
108
|
-
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
109
|
-
// set will include the indices of the matched characters.
|
|
110
|
-
// These can consequently be used for highlighting purposes.
|
|
111
|
-
includeMatches: !1,
|
|
112
|
-
// When `true`, the matching function will continue to the end of a search pattern even if
|
|
113
|
-
// a perfect match has already been located in the string.
|
|
114
|
-
findAllMatches: !1,
|
|
115
|
-
// Minimum number of characters that must be matched before a result is considered a match
|
|
116
|
-
minMatchCharLength: 1
|
|
117
|
-
}, wt = {
|
|
118
|
-
// When `true`, the algorithm continues searching to the end of the input even if a perfect
|
|
119
|
-
// match is found before the end of the same input.
|
|
120
|
-
isCaseSensitive: !1,
|
|
121
|
-
// When `true`, the algorithm will ignore diacritics (accents) in comparisons
|
|
122
|
-
ignoreDiacritics: !1,
|
|
123
|
-
// When true, the matching function will continue to the end of a search pattern even if
|
|
124
|
-
includeScore: !1,
|
|
125
|
-
// List of properties that will be searched. This also supports nested properties.
|
|
126
|
-
keys: [],
|
|
127
|
-
// Whether to sort the result list, by score
|
|
128
|
-
shouldSort: !0,
|
|
129
|
-
// Default sort function: sort by ascending score, ascending index
|
|
130
|
-
sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1
|
|
131
|
-
}, kt = {
|
|
132
|
-
// Approximately where in the text is the pattern expected to be found?
|
|
133
|
-
location: 0,
|
|
134
|
-
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
|
|
135
|
-
// (of both letters and location), a threshold of '1.0' would match anything.
|
|
136
|
-
threshold: 0.6,
|
|
137
|
-
// Determines how close the match must be to the fuzzy location (specified above).
|
|
138
|
-
// An exact letter match which is 'distance' characters away from the fuzzy location
|
|
139
|
-
// would score as a complete mismatch. A distance of '0' requires the match be at
|
|
140
|
-
// the exact location specified, a threshold of '1000' would require a perfect match
|
|
141
|
-
// to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
|
|
142
|
-
distance: 100
|
|
143
|
-
}, Et = {
|
|
144
|
-
// When `true`, it enables the use of unix-like search commands
|
|
145
|
-
useExtendedSearch: !1,
|
|
146
|
-
// The get function to use when fetching an object's properties.
|
|
147
|
-
// The default will search nested paths *ie foo.bar.baz*
|
|
148
|
-
getFn: At,
|
|
149
|
-
// When `true`, search will ignore `location` and `distance`, so it won't matter
|
|
150
|
-
// where in the string the pattern appears.
|
|
151
|
-
// More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
|
|
152
|
-
ignoreLocation: !1,
|
|
153
|
-
// When `true`, the calculation for the relevance score (used for sorting) will
|
|
154
|
-
// ignore the field-length norm.
|
|
155
|
-
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
|
|
156
|
-
ignoreFieldNorm: !1,
|
|
157
|
-
// The weight to determine how much field length norm effects scoring.
|
|
158
|
-
fieldNormWeight: 1
|
|
159
|
-
};
|
|
160
|
-
var D = {
|
|
161
|
-
...wt,
|
|
162
|
-
...Ct,
|
|
163
|
-
...kt,
|
|
164
|
-
...Et
|
|
165
|
-
};
|
|
166
|
-
const $t = /[^ ]+/g;
|
|
167
|
-
function Mt(t = 1, e = 3) {
|
|
168
|
-
const s = /* @__PURE__ */ new Map(), n = Math.pow(10, e);
|
|
169
|
-
return {
|
|
170
|
-
get(a) {
|
|
171
|
-
const r = a.match($t).length;
|
|
172
|
-
if (s.has(r))
|
|
173
|
-
return s.get(r);
|
|
174
|
-
const i = 1 / Math.pow(r, 0.5 * t), l = parseFloat(Math.round(i * n) / n);
|
|
175
|
-
return s.set(r, l), l;
|
|
176
|
-
},
|
|
177
|
-
clear() {
|
|
178
|
-
s.clear();
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
class ye {
|
|
183
|
-
constructor({
|
|
184
|
-
getFn: e = D.getFn,
|
|
185
|
-
fieldNormWeight: s = D.fieldNormWeight
|
|
186
|
-
} = {}) {
|
|
187
|
-
this.norm = Mt(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
188
|
-
}
|
|
189
|
-
setSources(e = []) {
|
|
190
|
-
this.docs = e;
|
|
191
|
-
}
|
|
192
|
-
setIndexRecords(e = []) {
|
|
193
|
-
this.records = e;
|
|
194
|
-
}
|
|
195
|
-
setKeys(e = []) {
|
|
196
|
-
this.keys = e, this._keysMap = {}, e.forEach((s, n) => {
|
|
197
|
-
this._keysMap[s.id] = n;
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
create() {
|
|
201
|
-
this.isCreated || !this.docs.length || (this.isCreated = !0, z(this.docs[0]) ? this.docs.forEach((e, s) => {
|
|
202
|
-
this._addString(e, s);
|
|
203
|
-
}) : this.docs.forEach((e, s) => {
|
|
204
|
-
this._addObject(e, s);
|
|
205
|
-
}), this.norm.clear());
|
|
206
|
-
}
|
|
207
|
-
// Adds a doc to the end of the index
|
|
208
|
-
add(e) {
|
|
209
|
-
const s = this.size();
|
|
210
|
-
z(e) ? this._addString(e, s) : this._addObject(e, s);
|
|
211
|
-
}
|
|
212
|
-
// Removes the doc at the specified index of the index
|
|
213
|
-
removeAt(e) {
|
|
214
|
-
this.records.splice(e, 1);
|
|
215
|
-
for (let s = e, n = this.size(); s < n; s += 1)
|
|
216
|
-
this.records[s].i -= 1;
|
|
217
|
-
}
|
|
218
|
-
// Removes docs at the specified indices (must be sorted ascending)
|
|
219
|
-
removeAll(e) {
|
|
220
|
-
for (let s = e.length - 1; s >= 0; s -= 1)
|
|
221
|
-
this.records.splice(e[s], 1);
|
|
222
|
-
for (let s = 0, n = this.records.length; s < n; s += 1)
|
|
223
|
-
this.records[s].i = s;
|
|
224
|
-
}
|
|
225
|
-
getValueForItemAtKeyId(e, s) {
|
|
226
|
-
return e[this._keysMap[s]];
|
|
227
|
-
}
|
|
228
|
-
size() {
|
|
229
|
-
return this.records.length;
|
|
230
|
-
}
|
|
231
|
-
_addString(e, s) {
|
|
232
|
-
if (!P(e) || ae(e))
|
|
233
|
-
return;
|
|
234
|
-
let n = {
|
|
235
|
-
v: e,
|
|
236
|
-
i: s,
|
|
237
|
-
n: this.norm.get(e)
|
|
238
|
-
};
|
|
239
|
-
this.records.push(n);
|
|
240
|
-
}
|
|
241
|
-
_addObject(e, s) {
|
|
242
|
-
let n = { i: s, $: {} };
|
|
243
|
-
this.keys.forEach((a, r) => {
|
|
244
|
-
let i = a.getFn ? a.getFn(e) : this.getFn(e, a.path);
|
|
245
|
-
if (P(i)) {
|
|
246
|
-
if (K(i)) {
|
|
247
|
-
let l = [];
|
|
248
|
-
for (let p = 0, o = i.length; p < o; p += 1) {
|
|
249
|
-
const u = i[p];
|
|
250
|
-
if (P(u)) {
|
|
251
|
-
if (z(u)) {
|
|
252
|
-
if (!ae(u)) {
|
|
253
|
-
let v = {
|
|
254
|
-
v: u,
|
|
255
|
-
i: p,
|
|
256
|
-
n: this.norm.get(u)
|
|
257
|
-
};
|
|
258
|
-
l.push(v);
|
|
259
|
-
}
|
|
260
|
-
} else if (z(u.v) && !ae(u.v)) {
|
|
261
|
-
let v = {
|
|
262
|
-
v: u.v,
|
|
263
|
-
i: u.i,
|
|
264
|
-
n: this.norm.get(u.v)
|
|
265
|
-
};
|
|
266
|
-
l.push(v);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
n.$[r] = l;
|
|
271
|
-
} else if (z(i) && !ae(i)) {
|
|
272
|
-
let l = {
|
|
273
|
-
v: i,
|
|
274
|
-
n: this.norm.get(i)
|
|
275
|
-
};
|
|
276
|
-
n.$[r] = l;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}), this.records.push(n);
|
|
280
|
-
}
|
|
281
|
-
toJSON() {
|
|
282
|
-
return {
|
|
283
|
-
keys: this.keys,
|
|
284
|
-
records: this.records
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
function je(t, e, { getFn: s = D.getFn, fieldNormWeight: n = D.fieldNormWeight } = {}) {
|
|
289
|
-
const a = new ye({ getFn: s, fieldNormWeight: n });
|
|
290
|
-
return a.setKeys(t.map(Ie)), a.setSources(e), a.create(), a;
|
|
291
|
-
}
|
|
292
|
-
function Bt(t, { getFn: e = D.getFn, fieldNormWeight: s = D.fieldNormWeight } = {}) {
|
|
293
|
-
const { keys: n, records: a } = t, r = new ye({ getFn: e, fieldNormWeight: s });
|
|
294
|
-
return r.setKeys(n), r.setIndexRecords(a), r;
|
|
295
|
-
}
|
|
296
|
-
function Ft(t = [], e = D.minMatchCharLength) {
|
|
297
|
-
let s = [], n = -1, a = -1, r = 0;
|
|
298
|
-
for (let i = t.length; r < i; r += 1) {
|
|
299
|
-
let l = t[r];
|
|
300
|
-
l && n === -1 ? n = r : !l && n !== -1 && (a = r - 1, a - n + 1 >= e && s.push([n, a]), n = -1);
|
|
301
|
-
}
|
|
302
|
-
return t[r - 1] && r - n >= e && s.push([n, r - 1]), s;
|
|
303
|
-
}
|
|
304
|
-
const Q = 32;
|
|
305
|
-
function St(t, e, s, {
|
|
306
|
-
location: n = D.location,
|
|
307
|
-
distance: a = D.distance,
|
|
308
|
-
threshold: r = D.threshold,
|
|
309
|
-
findAllMatches: i = D.findAllMatches,
|
|
310
|
-
minMatchCharLength: l = D.minMatchCharLength,
|
|
311
|
-
includeMatches: p = D.includeMatches,
|
|
312
|
-
ignoreLocation: o = D.ignoreLocation
|
|
313
|
-
} = {}) {
|
|
314
|
-
if (e.length > Q)
|
|
315
|
-
throw new Error(xt(Q));
|
|
316
|
-
const u = e.length, v = t.length, b = Math.max(0, Math.min(n, v));
|
|
317
|
-
let h = r, d = b;
|
|
318
|
-
const x = (E, j) => {
|
|
319
|
-
const y = E / u;
|
|
320
|
-
if (o) return y;
|
|
321
|
-
const T = Math.abs(b - j);
|
|
322
|
-
return a ? y + T / a : T ? 1 : y;
|
|
323
|
-
}, M = l > 1 || p, O = M ? Array(v) : [];
|
|
324
|
-
let I;
|
|
325
|
-
for (; (I = t.indexOf(e, d)) > -1; ) {
|
|
326
|
-
let E = x(0, I);
|
|
327
|
-
if (h = Math.min(E, h), d = I + u, M) {
|
|
328
|
-
let j = 0;
|
|
329
|
-
for (; j < u; )
|
|
330
|
-
O[I + j] = 1, j += 1;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
d = -1;
|
|
334
|
-
let w = [], B = 1, N = u + v;
|
|
335
|
-
const H = 1 << u - 1;
|
|
336
|
-
for (let E = 0; E < u; E += 1) {
|
|
337
|
-
let j = 0, y = N;
|
|
338
|
-
for (; j < y; )
|
|
339
|
-
x(E, b + y) <= h ? j = y : N = y, y = Math.floor((N - j) / 2 + j);
|
|
340
|
-
N = y;
|
|
341
|
-
let T = Math.max(1, b - y + 1), ee = i ? v : Math.min(b + y, v) + u, W = Array(ee + 2);
|
|
342
|
-
W[ee + 1] = (1 << E) - 1;
|
|
343
|
-
for (let f = ee; f >= T; f -= 1) {
|
|
344
|
-
let k = f - 1, X = s[t[k]];
|
|
345
|
-
if (M && (O[k] = +!!X), W[f] = (W[f + 1] << 1 | 1) & X, E && (W[f] |= (w[f + 1] | w[f]) << 1 | 1 | w[f + 1]), W[f] & H && (B = x(E, k), B <= h)) {
|
|
346
|
-
if (h = B, d = k, d <= b)
|
|
347
|
-
break;
|
|
348
|
-
T = Math.max(1, 2 * b - d);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
if (x(E + 1, b) > h)
|
|
352
|
-
break;
|
|
353
|
-
w = W;
|
|
354
|
-
}
|
|
355
|
-
const V = {
|
|
356
|
-
isMatch: d >= 0,
|
|
357
|
-
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
358
|
-
score: Math.max(1e-3, B)
|
|
359
|
-
};
|
|
360
|
-
if (M) {
|
|
361
|
-
const E = Ft(O, l);
|
|
362
|
-
E.length ? p && (V.indices = E) : V.isMatch = !1;
|
|
363
|
-
}
|
|
364
|
-
return V;
|
|
365
|
-
}
|
|
366
|
-
function Rt(t) {
|
|
367
|
-
let e = {};
|
|
368
|
-
for (let s = 0, n = t.length; s < n; s += 1) {
|
|
369
|
-
const a = t.charAt(s);
|
|
370
|
-
e[a] = (e[a] || 0) | 1 << n - s - 1;
|
|
371
|
-
}
|
|
372
|
-
return e;
|
|
373
|
-
}
|
|
374
|
-
const ie = String.prototype.normalize ? ((t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "")) : ((t) => t);
|
|
375
|
-
function It(t) {
|
|
376
|
-
if (t.length <= 1) return t;
|
|
377
|
-
t.sort((s, n) => s[0] - n[0] || s[1] - n[1]);
|
|
378
|
-
const e = [t[0]];
|
|
379
|
-
for (let s = 1, n = t.length; s < n; s += 1) {
|
|
380
|
-
const a = e[e.length - 1], r = t[s];
|
|
381
|
-
r[0] <= a[1] + 1 ? a[1] = Math.max(a[1], r[1]) : e.push(r);
|
|
382
|
-
}
|
|
383
|
-
return e;
|
|
384
|
-
}
|
|
385
|
-
class Te {
|
|
386
|
-
constructor(e, {
|
|
387
|
-
location: s = D.location,
|
|
388
|
-
threshold: n = D.threshold,
|
|
389
|
-
distance: a = D.distance,
|
|
390
|
-
includeMatches: r = D.includeMatches,
|
|
391
|
-
findAllMatches: i = D.findAllMatches,
|
|
392
|
-
minMatchCharLength: l = D.minMatchCharLength,
|
|
393
|
-
isCaseSensitive: p = D.isCaseSensitive,
|
|
394
|
-
ignoreDiacritics: o = D.ignoreDiacritics,
|
|
395
|
-
ignoreLocation: u = D.ignoreLocation
|
|
396
|
-
} = {}) {
|
|
397
|
-
if (this.options = {
|
|
398
|
-
location: s,
|
|
399
|
-
threshold: n,
|
|
400
|
-
distance: a,
|
|
401
|
-
includeMatches: r,
|
|
402
|
-
findAllMatches: i,
|
|
403
|
-
minMatchCharLength: l,
|
|
404
|
-
isCaseSensitive: p,
|
|
405
|
-
ignoreDiacritics: o,
|
|
406
|
-
ignoreLocation: u
|
|
407
|
-
}, e = p ? e : e.toLowerCase(), e = o ? ie(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
|
|
408
|
-
return;
|
|
409
|
-
const v = (h, d) => {
|
|
410
|
-
this.chunks.push({
|
|
411
|
-
pattern: h,
|
|
412
|
-
alphabet: Rt(h),
|
|
413
|
-
startIndex: d
|
|
414
|
-
});
|
|
415
|
-
}, b = this.pattern.length;
|
|
416
|
-
if (b > Q) {
|
|
417
|
-
let h = 0;
|
|
418
|
-
const d = b % Q, x = b - d;
|
|
419
|
-
for (; h < x; )
|
|
420
|
-
v(this.pattern.substr(h, Q), h), h += Q;
|
|
421
|
-
if (d) {
|
|
422
|
-
const M = b - Q;
|
|
423
|
-
v(this.pattern.substr(M), M);
|
|
424
|
-
}
|
|
425
|
-
} else
|
|
426
|
-
v(this.pattern, 0);
|
|
427
|
-
}
|
|
428
|
-
searchIn(e) {
|
|
429
|
-
const { isCaseSensitive: s, ignoreDiacritics: n, includeMatches: a } = this.options;
|
|
430
|
-
if (e = s ? e : e.toLowerCase(), e = n ? ie(e) : e, this.pattern === e) {
|
|
431
|
-
let x = {
|
|
432
|
-
isMatch: !0,
|
|
433
|
-
score: 0
|
|
434
|
-
};
|
|
435
|
-
return a && (x.indices = [[0, e.length - 1]]), x;
|
|
436
|
-
}
|
|
437
|
-
const {
|
|
438
|
-
location: r,
|
|
439
|
-
distance: i,
|
|
440
|
-
threshold: l,
|
|
441
|
-
findAllMatches: p,
|
|
442
|
-
minMatchCharLength: o,
|
|
443
|
-
ignoreLocation: u
|
|
444
|
-
} = this.options;
|
|
445
|
-
let v = [], b = 0, h = !1;
|
|
446
|
-
this.chunks.forEach(({ pattern: x, alphabet: M, startIndex: O }) => {
|
|
447
|
-
const { isMatch: I, score: w, indices: B } = St(e, x, M, {
|
|
448
|
-
location: r + O,
|
|
449
|
-
distance: i,
|
|
450
|
-
threshold: l,
|
|
451
|
-
findAllMatches: p,
|
|
452
|
-
minMatchCharLength: o,
|
|
453
|
-
includeMatches: a,
|
|
454
|
-
ignoreLocation: u
|
|
455
|
-
});
|
|
456
|
-
I && (h = !0), b += w, I && B && v.push(...B);
|
|
457
|
-
});
|
|
458
|
-
let d = {
|
|
459
|
-
isMatch: h,
|
|
460
|
-
score: h ? b / this.chunks.length : 1
|
|
461
|
-
};
|
|
462
|
-
return h && a && (d.indices = It(v)), d;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
class G {
|
|
466
|
-
constructor(e) {
|
|
467
|
-
this.pattern = e;
|
|
468
|
-
}
|
|
469
|
-
static isMultiMatch(e) {
|
|
470
|
-
return $e(e, this.multiRegex);
|
|
471
|
-
}
|
|
472
|
-
static isSingleMatch(e) {
|
|
473
|
-
return $e(e, this.singleRegex);
|
|
474
|
-
}
|
|
475
|
-
search() {
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
function $e(t, e) {
|
|
479
|
-
const s = t.match(e);
|
|
480
|
-
return s ? s[1] : null;
|
|
481
|
-
}
|
|
482
|
-
class jt extends G {
|
|
483
|
-
constructor(e) {
|
|
484
|
-
super(e);
|
|
485
|
-
}
|
|
486
|
-
static get type() {
|
|
487
|
-
return "exact";
|
|
488
|
-
}
|
|
489
|
-
static get multiRegex() {
|
|
490
|
-
return /^="(.*)"$/;
|
|
491
|
-
}
|
|
492
|
-
static get singleRegex() {
|
|
493
|
-
return /^=(.*)$/;
|
|
494
|
-
}
|
|
495
|
-
search(e) {
|
|
496
|
-
const s = e === this.pattern;
|
|
497
|
-
return {
|
|
498
|
-
isMatch: s,
|
|
499
|
-
score: s ? 0 : 1,
|
|
500
|
-
indices: [0, this.pattern.length - 1]
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
class Tt extends G {
|
|
505
|
-
constructor(e) {
|
|
506
|
-
super(e);
|
|
507
|
-
}
|
|
508
|
-
static get type() {
|
|
509
|
-
return "inverse-exact";
|
|
510
|
-
}
|
|
511
|
-
static get multiRegex() {
|
|
512
|
-
return /^!"(.*)"$/;
|
|
513
|
-
}
|
|
514
|
-
static get singleRegex() {
|
|
515
|
-
return /^!(.*)$/;
|
|
516
|
-
}
|
|
517
|
-
search(e) {
|
|
518
|
-
const n = e.indexOf(this.pattern) === -1;
|
|
519
|
-
return {
|
|
520
|
-
isMatch: n,
|
|
521
|
-
score: n ? 0 : 1,
|
|
522
|
-
indices: [0, e.length - 1]
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
class Ot extends G {
|
|
527
|
-
constructor(e) {
|
|
528
|
-
super(e);
|
|
529
|
-
}
|
|
530
|
-
static get type() {
|
|
531
|
-
return "prefix-exact";
|
|
532
|
-
}
|
|
533
|
-
static get multiRegex() {
|
|
534
|
-
return /^\^"(.*)"$/;
|
|
535
|
-
}
|
|
536
|
-
static get singleRegex() {
|
|
537
|
-
return /^\^(.*)$/;
|
|
538
|
-
}
|
|
539
|
-
search(e) {
|
|
540
|
-
const s = e.startsWith(this.pattern);
|
|
541
|
-
return {
|
|
542
|
-
isMatch: s,
|
|
543
|
-
score: s ? 0 : 1,
|
|
544
|
-
indices: [0, this.pattern.length - 1]
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
class Nt extends G {
|
|
549
|
-
constructor(e) {
|
|
550
|
-
super(e);
|
|
551
|
-
}
|
|
552
|
-
static get type() {
|
|
553
|
-
return "inverse-prefix-exact";
|
|
554
|
-
}
|
|
555
|
-
static get multiRegex() {
|
|
556
|
-
return /^!\^"(.*)"$/;
|
|
557
|
-
}
|
|
558
|
-
static get singleRegex() {
|
|
559
|
-
return /^!\^(.*)$/;
|
|
560
|
-
}
|
|
561
|
-
search(e) {
|
|
562
|
-
const s = !e.startsWith(this.pattern);
|
|
563
|
-
return {
|
|
564
|
-
isMatch: s,
|
|
565
|
-
score: s ? 0 : 1,
|
|
566
|
-
indices: [0, e.length - 1]
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
class Lt extends G {
|
|
571
|
-
constructor(e) {
|
|
572
|
-
super(e);
|
|
573
|
-
}
|
|
574
|
-
static get type() {
|
|
575
|
-
return "suffix-exact";
|
|
576
|
-
}
|
|
577
|
-
static get multiRegex() {
|
|
578
|
-
return /^"(.*)"\$$/;
|
|
579
|
-
}
|
|
580
|
-
static get singleRegex() {
|
|
581
|
-
return /^(.*)\$$/;
|
|
582
|
-
}
|
|
583
|
-
search(e) {
|
|
584
|
-
const s = e.endsWith(this.pattern);
|
|
585
|
-
return {
|
|
586
|
-
isMatch: s,
|
|
587
|
-
score: s ? 0 : 1,
|
|
588
|
-
indices: [e.length - this.pattern.length, e.length - 1]
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
class Pt extends G {
|
|
593
|
-
constructor(e) {
|
|
594
|
-
super(e);
|
|
595
|
-
}
|
|
596
|
-
static get type() {
|
|
597
|
-
return "inverse-suffix-exact";
|
|
598
|
-
}
|
|
599
|
-
static get multiRegex() {
|
|
600
|
-
return /^!"(.*)"\$$/;
|
|
601
|
-
}
|
|
602
|
-
static get singleRegex() {
|
|
603
|
-
return /^!(.*)\$$/;
|
|
604
|
-
}
|
|
605
|
-
search(e) {
|
|
606
|
-
const s = !e.endsWith(this.pattern);
|
|
607
|
-
return {
|
|
608
|
-
isMatch: s,
|
|
609
|
-
score: s ? 0 : 1,
|
|
610
|
-
indices: [0, e.length - 1]
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
class Oe extends G {
|
|
615
|
-
constructor(e, {
|
|
616
|
-
location: s = D.location,
|
|
617
|
-
threshold: n = D.threshold,
|
|
618
|
-
distance: a = D.distance,
|
|
619
|
-
includeMatches: r = D.includeMatches,
|
|
620
|
-
findAllMatches: i = D.findAllMatches,
|
|
621
|
-
minMatchCharLength: l = D.minMatchCharLength,
|
|
622
|
-
isCaseSensitive: p = D.isCaseSensitive,
|
|
623
|
-
ignoreDiacritics: o = D.ignoreDiacritics,
|
|
624
|
-
ignoreLocation: u = D.ignoreLocation
|
|
625
|
-
} = {}) {
|
|
626
|
-
super(e), this._bitapSearch = new Te(e, {
|
|
627
|
-
location: s,
|
|
628
|
-
threshold: n,
|
|
629
|
-
distance: a,
|
|
630
|
-
includeMatches: r,
|
|
631
|
-
findAllMatches: i,
|
|
632
|
-
minMatchCharLength: l,
|
|
633
|
-
isCaseSensitive: p,
|
|
634
|
-
ignoreDiacritics: o,
|
|
635
|
-
ignoreLocation: u
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
static get type() {
|
|
639
|
-
return "fuzzy";
|
|
640
|
-
}
|
|
641
|
-
static get multiRegex() {
|
|
642
|
-
return /^"(.*)"$/;
|
|
643
|
-
}
|
|
644
|
-
static get singleRegex() {
|
|
645
|
-
return /^(.*)$/;
|
|
646
|
-
}
|
|
647
|
-
search(e) {
|
|
648
|
-
return this._bitapSearch.searchIn(e);
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
class Ne extends G {
|
|
652
|
-
constructor(e) {
|
|
653
|
-
super(e);
|
|
654
|
-
}
|
|
655
|
-
static get type() {
|
|
656
|
-
return "include";
|
|
657
|
-
}
|
|
658
|
-
static get multiRegex() {
|
|
659
|
-
return /^'"(.*)"$/;
|
|
660
|
-
}
|
|
661
|
-
static get singleRegex() {
|
|
662
|
-
return /^'(.*)$/;
|
|
663
|
-
}
|
|
664
|
-
search(e) {
|
|
665
|
-
let s = 0, n;
|
|
666
|
-
const a = [], r = this.pattern.length;
|
|
667
|
-
for (; (n = e.indexOf(this.pattern, s)) > -1; )
|
|
668
|
-
s = n + r, a.push([n, s - 1]);
|
|
669
|
-
const i = !!a.length;
|
|
670
|
-
return {
|
|
671
|
-
isMatch: i,
|
|
672
|
-
score: i ? 0 : 1,
|
|
673
|
-
indices: a
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
const ve = [
|
|
678
|
-
jt,
|
|
679
|
-
Ne,
|
|
680
|
-
Ot,
|
|
681
|
-
Nt,
|
|
682
|
-
Pt,
|
|
683
|
-
Lt,
|
|
684
|
-
Tt,
|
|
685
|
-
Oe
|
|
686
|
-
], Me = ve.length, zt = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Vt = "|";
|
|
687
|
-
function Ut(t, e = {}) {
|
|
688
|
-
return t.split(Vt).map((s) => {
|
|
689
|
-
let n = s.trim().split(zt).filter((r) => r && !!r.trim()), a = [];
|
|
690
|
-
for (let r = 0, i = n.length; r < i; r += 1) {
|
|
691
|
-
const l = n[r];
|
|
692
|
-
let p = !1, o = -1;
|
|
693
|
-
for (; !p && ++o < Me; ) {
|
|
694
|
-
const u = ve[o];
|
|
695
|
-
let v = u.isMultiMatch(l);
|
|
696
|
-
v && (a.push(new u(v, e)), p = !0);
|
|
697
|
-
}
|
|
698
|
-
if (!p)
|
|
699
|
-
for (o = -1; ++o < Me; ) {
|
|
700
|
-
const u = ve[o];
|
|
701
|
-
let v = u.isSingleMatch(l);
|
|
702
|
-
if (v) {
|
|
703
|
-
a.push(new u(v, e));
|
|
704
|
-
break;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
return a;
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
const Ht = /* @__PURE__ */ new Set([Oe.type, Ne.type]);
|
|
712
|
-
class Wt {
|
|
713
|
-
constructor(e, {
|
|
714
|
-
isCaseSensitive: s = D.isCaseSensitive,
|
|
715
|
-
ignoreDiacritics: n = D.ignoreDiacritics,
|
|
716
|
-
includeMatches: a = D.includeMatches,
|
|
717
|
-
minMatchCharLength: r = D.minMatchCharLength,
|
|
718
|
-
ignoreLocation: i = D.ignoreLocation,
|
|
719
|
-
findAllMatches: l = D.findAllMatches,
|
|
720
|
-
location: p = D.location,
|
|
721
|
-
threshold: o = D.threshold,
|
|
722
|
-
distance: u = D.distance
|
|
723
|
-
} = {}) {
|
|
724
|
-
this.query = null, this.options = {
|
|
725
|
-
isCaseSensitive: s,
|
|
726
|
-
ignoreDiacritics: n,
|
|
727
|
-
includeMatches: a,
|
|
728
|
-
minMatchCharLength: r,
|
|
729
|
-
findAllMatches: l,
|
|
730
|
-
ignoreLocation: i,
|
|
731
|
-
location: p,
|
|
732
|
-
threshold: o,
|
|
733
|
-
distance: u
|
|
734
|
-
}, e = s ? e : e.toLowerCase(), e = n ? ie(e) : e, this.pattern = e, this.query = Ut(this.pattern, this.options);
|
|
735
|
-
}
|
|
736
|
-
static condition(e, s) {
|
|
737
|
-
return s.useExtendedSearch;
|
|
738
|
-
}
|
|
739
|
-
searchIn(e) {
|
|
740
|
-
const s = this.query;
|
|
741
|
-
if (!s)
|
|
742
|
-
return {
|
|
743
|
-
isMatch: !1,
|
|
744
|
-
score: 1
|
|
745
|
-
};
|
|
746
|
-
const { includeMatches: n, isCaseSensitive: a, ignoreDiacritics: r } = this.options;
|
|
747
|
-
e = a ? e : e.toLowerCase(), e = r ? ie(e) : e;
|
|
748
|
-
let i = 0, l = [], p = 0;
|
|
749
|
-
for (let o = 0, u = s.length; o < u; o += 1) {
|
|
750
|
-
const v = s[o];
|
|
751
|
-
l.length = 0, i = 0;
|
|
752
|
-
for (let b = 0, h = v.length; b < h; b += 1) {
|
|
753
|
-
const d = v[b], { isMatch: x, indices: M, score: O } = d.search(e);
|
|
754
|
-
if (x) {
|
|
755
|
-
if (i += 1, p += O, n) {
|
|
756
|
-
const I = d.constructor.type;
|
|
757
|
-
Ht.has(I) ? l.push(...M) : l.push(M);
|
|
758
|
-
}
|
|
759
|
-
} else {
|
|
760
|
-
p = 0, i = 0, l.length = 0;
|
|
761
|
-
break;
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
if (i) {
|
|
765
|
-
let b = {
|
|
766
|
-
isMatch: !0,
|
|
767
|
-
score: p / i
|
|
768
|
-
};
|
|
769
|
-
return n && (b.indices = l), b;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
return {
|
|
773
|
-
isMatch: !1,
|
|
774
|
-
score: 1
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
const he = [];
|
|
779
|
-
function Le(...t) {
|
|
780
|
-
he.push(...t);
|
|
781
|
-
}
|
|
782
|
-
function Pe(t, e) {
|
|
783
|
-
for (let s = 0, n = he.length; s < n; s += 1) {
|
|
784
|
-
let a = he[s];
|
|
785
|
-
if (a.condition(t, e))
|
|
786
|
-
return new a(t, e);
|
|
787
|
-
}
|
|
788
|
-
return new Te(t, e);
|
|
789
|
-
}
|
|
790
|
-
const re = {
|
|
791
|
-
AND: "$and",
|
|
792
|
-
OR: "$or"
|
|
793
|
-
}, _e = {
|
|
794
|
-
PATH: "$path",
|
|
795
|
-
PATTERN: "$val"
|
|
796
|
-
}, xe = (t) => !!(t[re.AND] || t[re.OR]), Kt = (t) => !!t[_e.PATH], Gt = (t) => !K(t) && Se(t) && !xe(t), Be = (t) => ({
|
|
797
|
-
[re.AND]: Object.keys(t).map((e) => ({
|
|
798
|
-
[e]: t[e]
|
|
799
|
-
}))
|
|
800
|
-
});
|
|
801
|
-
function ze(t, e, { auto: s = !0 } = {}) {
|
|
802
|
-
const n = (a) => {
|
|
803
|
-
let r = Object.keys(a);
|
|
804
|
-
const i = Kt(a);
|
|
805
|
-
if (!i && r.length > 1 && !xe(a))
|
|
806
|
-
return n(Be(a));
|
|
807
|
-
if (Gt(a)) {
|
|
808
|
-
const p = i ? a[_e.PATH] : r[0], o = i ? a[_e.PATTERN] : a[p];
|
|
809
|
-
if (!z(o))
|
|
810
|
-
throw new Error(_t(p));
|
|
811
|
-
const u = {
|
|
812
|
-
keyId: ge(p),
|
|
813
|
-
pattern: o
|
|
814
|
-
};
|
|
815
|
-
return s && (u.searcher = Pe(o, e)), u;
|
|
816
|
-
}
|
|
817
|
-
let l = {
|
|
818
|
-
children: [],
|
|
819
|
-
operator: r[0]
|
|
820
|
-
};
|
|
821
|
-
return r.forEach((p) => {
|
|
822
|
-
const o = a[p];
|
|
823
|
-
K(o) && o.forEach((u) => {
|
|
824
|
-
l.children.push(n(u));
|
|
825
|
-
});
|
|
826
|
-
}), l;
|
|
827
|
-
};
|
|
828
|
-
return xe(t) || (t = Be(t)), n(t);
|
|
829
|
-
}
|
|
830
|
-
function De(t, { ignoreFieldNorm: e = D.ignoreFieldNorm }) {
|
|
831
|
-
let s = 1;
|
|
832
|
-
t.matches.forEach(({ key: n, norm: a, score: r }) => {
|
|
833
|
-
const i = n ? n.weight : null;
|
|
834
|
-
s *= Math.pow(
|
|
835
|
-
r === 0 && i ? Number.EPSILON : r,
|
|
836
|
-
(i || 1) * (e ? 1 : a)
|
|
837
|
-
);
|
|
838
|
-
}), t.score = s;
|
|
839
|
-
}
|
|
840
|
-
function Yt(t, { ignoreFieldNorm: e = D.ignoreFieldNorm }) {
|
|
841
|
-
t.forEach((s) => {
|
|
842
|
-
De(s, { ignoreFieldNorm: e });
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
class Qt {
|
|
846
|
-
constructor(e) {
|
|
847
|
-
this.limit = e, this.heap = [];
|
|
848
|
-
}
|
|
849
|
-
get size() {
|
|
850
|
-
return this.heap.length;
|
|
851
|
-
}
|
|
852
|
-
shouldInsert(e) {
|
|
853
|
-
return this.size < this.limit || e < this.heap[0].score;
|
|
854
|
-
}
|
|
855
|
-
insert(e) {
|
|
856
|
-
this.size < this.limit ? (this.heap.push(e), this._bubbleUp(this.size - 1)) : e.score < this.heap[0].score && (this.heap[0] = e, this._sinkDown(0));
|
|
857
|
-
}
|
|
858
|
-
extractSorted(e) {
|
|
859
|
-
return this.heap.sort(e);
|
|
860
|
-
}
|
|
861
|
-
_bubbleUp(e) {
|
|
862
|
-
const s = this.heap;
|
|
863
|
-
for (; e > 0; ) {
|
|
864
|
-
const n = e - 1 >> 1;
|
|
865
|
-
if (s[e].score <= s[n].score) break;
|
|
866
|
-
const a = s[e];
|
|
867
|
-
s[e] = s[n], s[n] = a, e = n;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
_sinkDown(e) {
|
|
871
|
-
const s = this.heap, n = s.length;
|
|
872
|
-
let a = e;
|
|
873
|
-
do {
|
|
874
|
-
e = a;
|
|
875
|
-
const r = 2 * e + 1, i = 2 * e + 2;
|
|
876
|
-
if (r < n && s[r].score > s[a].score && (a = r), i < n && s[i].score > s[a].score && (a = i), a !== e) {
|
|
877
|
-
const l = s[e];
|
|
878
|
-
s[e] = s[a], s[a] = l;
|
|
879
|
-
}
|
|
880
|
-
} while (a !== e);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
function Jt(t, e) {
|
|
884
|
-
const s = t.matches;
|
|
885
|
-
e.matches = [], P(s) && s.forEach((n) => {
|
|
886
|
-
if (!P(n.indices) || !n.indices.length)
|
|
887
|
-
return;
|
|
888
|
-
const { indices: a, value: r } = n;
|
|
889
|
-
let i = {
|
|
890
|
-
indices: a,
|
|
891
|
-
value: r
|
|
892
|
-
};
|
|
893
|
-
n.key && (i.key = n.key.src), n.idx > -1 && (i.refIndex = n.idx), e.matches.push(i);
|
|
894
|
-
});
|
|
895
|
-
}
|
|
896
|
-
function Xt(t, e) {
|
|
897
|
-
e.score = t.score;
|
|
898
|
-
}
|
|
899
|
-
function Zt(t, e, {
|
|
900
|
-
includeMatches: s = D.includeMatches,
|
|
901
|
-
includeScore: n = D.includeScore
|
|
902
|
-
} = {}) {
|
|
903
|
-
const a = [];
|
|
904
|
-
return s && a.push(Jt), n && a.push(Xt), t.map((r) => {
|
|
905
|
-
const { idx: i } = r, l = {
|
|
906
|
-
item: e[i],
|
|
907
|
-
refIndex: i
|
|
908
|
-
};
|
|
909
|
-
return a.length && a.forEach((p) => {
|
|
910
|
-
p(r, l);
|
|
911
|
-
}), l;
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
class q {
|
|
915
|
-
constructor(e, s = {}, n) {
|
|
916
|
-
this.options = { ...D, ...s }, this.options.useExtendedSearch, this._keyStore = new yt(this.options.keys), this.setCollection(e, n), this._lastQuery = null, this._lastSearcher = null;
|
|
917
|
-
}
|
|
918
|
-
_getSearcher(e) {
|
|
919
|
-
if (this._lastQuery === e)
|
|
920
|
-
return this._lastSearcher;
|
|
921
|
-
const s = Pe(e, this.options);
|
|
922
|
-
return this._lastQuery = e, this._lastSearcher = s, s;
|
|
923
|
-
}
|
|
924
|
-
setCollection(e, s) {
|
|
925
|
-
if (this._docs = e, s && !(s instanceof ye))
|
|
926
|
-
throw new Error(ht);
|
|
927
|
-
this._myIndex = s || je(this.options.keys, this._docs, {
|
|
928
|
-
getFn: this.options.getFn,
|
|
929
|
-
fieldNormWeight: this.options.fieldNormWeight
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
add(e) {
|
|
933
|
-
P(e) && (this._docs.push(e), this._myIndex.add(e));
|
|
934
|
-
}
|
|
935
|
-
remove(e = () => !1) {
|
|
936
|
-
const s = [], n = [];
|
|
937
|
-
for (let a = 0, r = this._docs.length; a < r; a += 1)
|
|
938
|
-
e(this._docs[a], a) && (s.push(this._docs[a]), n.push(a));
|
|
939
|
-
if (n.length) {
|
|
940
|
-
for (let a = n.length - 1; a >= 0; a -= 1)
|
|
941
|
-
this._docs.splice(n[a], 1);
|
|
942
|
-
this._myIndex.removeAll(n);
|
|
943
|
-
}
|
|
944
|
-
return s;
|
|
945
|
-
}
|
|
946
|
-
removeAt(e) {
|
|
947
|
-
this._docs.splice(e, 1), this._myIndex.removeAt(e);
|
|
948
|
-
}
|
|
949
|
-
getIndex() {
|
|
950
|
-
return this._myIndex;
|
|
951
|
-
}
|
|
952
|
-
search(e, { limit: s = -1 } = {}) {
|
|
953
|
-
const {
|
|
954
|
-
includeMatches: n,
|
|
955
|
-
includeScore: a,
|
|
956
|
-
shouldSort: r,
|
|
957
|
-
sortFn: i,
|
|
958
|
-
ignoreFieldNorm: l
|
|
959
|
-
} = this.options, p = me(s) && s > 0 && z(e);
|
|
960
|
-
let o;
|
|
961
|
-
if (p) {
|
|
962
|
-
const u = new Qt(s);
|
|
963
|
-
z(this._docs[0]) ? this._searchStringList(e, { heap: u, ignoreFieldNorm: l }) : this._searchObjectList(e, { heap: u, ignoreFieldNorm: l }), o = u.extractSorted(i);
|
|
964
|
-
} else
|
|
965
|
-
o = z(e) ? z(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e), Yt(o, { ignoreFieldNorm: l }), r && o.sort(i), me(s) && s > -1 && (o = o.slice(0, s));
|
|
966
|
-
return Zt(o, this._docs, {
|
|
967
|
-
includeMatches: n,
|
|
968
|
-
includeScore: a
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
_searchStringList(e, { heap: s, ignoreFieldNorm: n } = {}) {
|
|
972
|
-
const a = this._getSearcher(e), { records: r } = this._myIndex, i = s ? null : [];
|
|
973
|
-
return r.forEach(({ v: l, i: p, n: o }) => {
|
|
974
|
-
if (!P(l))
|
|
975
|
-
return;
|
|
976
|
-
const { isMatch: u, score: v, indices: b } = a.searchIn(l);
|
|
977
|
-
if (u) {
|
|
978
|
-
const h = {
|
|
979
|
-
item: l,
|
|
980
|
-
idx: p,
|
|
981
|
-
matches: [{ score: v, value: l, norm: o, indices: b }]
|
|
982
|
-
};
|
|
983
|
-
s ? (De(h, { ignoreFieldNorm: n }), s.shouldInsert(h.score) && s.insert(h)) : i.push(h);
|
|
984
|
-
}
|
|
985
|
-
}), i;
|
|
986
|
-
}
|
|
987
|
-
_searchLogical(e) {
|
|
988
|
-
const s = ze(e, this.options), n = (l, p, o) => {
|
|
989
|
-
if (!l.children) {
|
|
990
|
-
const { keyId: v, searcher: b } = l, h = this._findMatches({
|
|
991
|
-
key: this._keyStore.get(v),
|
|
992
|
-
value: this._myIndex.getValueForItemAtKeyId(p, v),
|
|
993
|
-
searcher: b
|
|
994
|
-
});
|
|
995
|
-
return h && h.length ? [
|
|
996
|
-
{
|
|
997
|
-
idx: o,
|
|
998
|
-
item: p,
|
|
999
|
-
matches: h
|
|
1000
|
-
}
|
|
1001
|
-
] : [];
|
|
1002
|
-
}
|
|
1003
|
-
const u = [];
|
|
1004
|
-
for (let v = 0, b = l.children.length; v < b; v += 1) {
|
|
1005
|
-
const h = l.children[v], d = n(h, p, o);
|
|
1006
|
-
if (d.length)
|
|
1007
|
-
u.push(...d);
|
|
1008
|
-
else if (l.operator === re.AND)
|
|
1009
|
-
return [];
|
|
1010
|
-
}
|
|
1011
|
-
return u;
|
|
1012
|
-
}, a = this._myIndex.records, r = /* @__PURE__ */ new Map(), i = [];
|
|
1013
|
-
return a.forEach(({ $: l, i: p }) => {
|
|
1014
|
-
if (P(l)) {
|
|
1015
|
-
let o = n(s, l, p);
|
|
1016
|
-
o.length && (r.has(p) || (r.set(p, { idx: p, item: l, matches: [] }), i.push(r.get(p))), o.forEach(({ matches: u }) => {
|
|
1017
|
-
r.get(p).matches.push(...u);
|
|
1018
|
-
}));
|
|
1019
|
-
}
|
|
1020
|
-
}), i;
|
|
1021
|
-
}
|
|
1022
|
-
_searchObjectList(e, { heap: s, ignoreFieldNorm: n } = {}) {
|
|
1023
|
-
const a = this._getSearcher(e), { keys: r, records: i } = this._myIndex, l = s ? null : [];
|
|
1024
|
-
return i.forEach(({ $: p, i: o }) => {
|
|
1025
|
-
if (!P(p))
|
|
1026
|
-
return;
|
|
1027
|
-
let u = [];
|
|
1028
|
-
if (r.forEach((v, b) => {
|
|
1029
|
-
u.push(
|
|
1030
|
-
...this._findMatches({
|
|
1031
|
-
key: v,
|
|
1032
|
-
value: p[b],
|
|
1033
|
-
searcher: a
|
|
1034
|
-
})
|
|
1035
|
-
);
|
|
1036
|
-
}), u.length) {
|
|
1037
|
-
const v = { idx: o, item: p, matches: u };
|
|
1038
|
-
s ? (De(v, { ignoreFieldNorm: n }), s.shouldInsert(v.score) && s.insert(v)) : l.push(v);
|
|
1039
|
-
}
|
|
1040
|
-
}), l;
|
|
1041
|
-
}
|
|
1042
|
-
_findMatches({ key: e, value: s, searcher: n }) {
|
|
1043
|
-
if (!P(s))
|
|
1044
|
-
return [];
|
|
1045
|
-
let a = [];
|
|
1046
|
-
if (K(s))
|
|
1047
|
-
s.forEach(({ v: r, i, n: l }) => {
|
|
1048
|
-
if (!P(r))
|
|
1049
|
-
return;
|
|
1050
|
-
const { isMatch: p, score: o, indices: u } = n.searchIn(r);
|
|
1051
|
-
p && a.push({
|
|
1052
|
-
score: o,
|
|
1053
|
-
key: e,
|
|
1054
|
-
value: r,
|
|
1055
|
-
idx: i,
|
|
1056
|
-
norm: l,
|
|
1057
|
-
indices: u
|
|
1058
|
-
});
|
|
1059
|
-
});
|
|
1060
|
-
else {
|
|
1061
|
-
const { v: r, n: i } = s, { isMatch: l, score: p, indices: o } = n.searchIn(r);
|
|
1062
|
-
l && a.push({ score: p, key: e, value: r, norm: i, indices: o });
|
|
1063
|
-
}
|
|
1064
|
-
return a;
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
q.version = "7.2.0";
|
|
1068
|
-
q.createIndex = je;
|
|
1069
|
-
q.parseIndex = Bt;
|
|
1070
|
-
q.config = D;
|
|
1071
|
-
q.parseQuery = ze;
|
|
1072
|
-
Le(Wt);
|
|
1073
|
-
q.use = function(...t) {
|
|
1074
|
-
t.forEach((e) => Le(e));
|
|
1075
|
-
};
|
|
1076
|
-
const Y = (t) => t == null ? "—" : `€${t.toFixed(2)}`, qt = (t) => {
|
|
1077
|
-
if (!t) return "—";
|
|
1078
|
-
if (t < 60) return `${t} min`;
|
|
1079
|
-
const e = Math.floor(t / 60), s = t % 60;
|
|
1080
|
-
return s > 0 ? `${e}h ${s}min` : `${e}h`;
|
|
1081
|
-
}, es = (t) => {
|
|
1082
|
-
switch (t) {
|
|
1083
|
-
case "confirmed":
|
|
1084
|
-
return "Confirmed";
|
|
1085
|
-
case "completed":
|
|
1086
|
-
return "Completed";
|
|
1087
|
-
case "pending":
|
|
1088
|
-
return "Pending";
|
|
1089
|
-
case "cancelled":
|
|
1090
|
-
return "Cancelled";
|
|
1091
|
-
default:
|
|
1092
|
-
return t || "Unknown";
|
|
1093
|
-
}
|
|
1094
|
-
}, Fe = (t) => {
|
|
1095
|
-
switch (t) {
|
|
1096
|
-
case "confirmed":
|
|
1097
|
-
case "completed":
|
|
1098
|
-
return "#16a34a";
|
|
1099
|
-
// green-600
|
|
1100
|
-
case "pending":
|
|
1101
|
-
return "#ca8a04";
|
|
1102
|
-
// yellow-600
|
|
1103
|
-
case "cancelled":
|
|
1104
|
-
return "#dc2626";
|
|
1105
|
-
// red-600
|
|
1106
|
-
default:
|
|
1107
|
-
return "#6b7280";
|
|
1108
|
-
}
|
|
1109
|
-
}, ts = (t, e = {}) => {
|
|
1110
|
-
const s = `${t.customerInfo?.firstName || ""} ${t.customerInfo?.lastName || ""}`.trim() || "Unknown Customer", n = t.id?.slice(0, 8) || "—", a = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
|
|
1111
|
-
year: "numeric",
|
|
1112
|
-
month: "long",
|
|
1113
|
-
day: "numeric"
|
|
1114
|
-
}), r = `
|
|
1115
|
-
<!DOCTYPE html>
|
|
1116
|
-
<html lang="en">
|
|
1117
|
-
<head>
|
|
1118
|
-
<meta charset="UTF-8">
|
|
1119
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1120
|
-
<title>Reservation ${n}</title>
|
|
1121
|
-
<style>
|
|
1122
|
-
* {
|
|
1123
|
-
margin: 0;
|
|
1124
|
-
padding: 0;
|
|
1125
|
-
box-sizing: border-box;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
body {
|
|
1129
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
1130
|
-
line-height: 1.6;
|
|
1131
|
-
color: #1f2937;
|
|
1132
|
-
background: #fff;
|
|
1133
|
-
padding: 40px;
|
|
1134
|
-
max-width: 800px;
|
|
1135
|
-
margin: 0 auto;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.header {
|
|
1139
|
-
display: flex;
|
|
1140
|
-
justify-content: space-between;
|
|
1141
|
-
align-items: flex-start;
|
|
1142
|
-
margin-bottom: 40px;
|
|
1143
|
-
padding-bottom: 20px;
|
|
1144
|
-
border-bottom: 2px solid #e5e7eb;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
.company-info {
|
|
1148
|
-
display: flex;
|
|
1149
|
-
align-items: center;
|
|
1150
|
-
gap: 16px;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
.company-logo {
|
|
1154
|
-
max-height: 50px;
|
|
1155
|
-
max-width: 150px;
|
|
1156
|
-
object-fit: contain;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
.company-name {
|
|
1160
|
-
font-size: 24px;
|
|
1161
|
-
font-weight: 700;
|
|
1162
|
-
color: #111827;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
.document-info {
|
|
1166
|
-
text-align: right;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
.document-title {
|
|
1170
|
-
font-size: 28px;
|
|
1171
|
-
font-weight: 700;
|
|
1172
|
-
color: #111827;
|
|
1173
|
-
margin-bottom: 8px;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
.booking-id {
|
|
1177
|
-
font-size: 14px;
|
|
1178
|
-
color: #6b7280;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
.status-badge {
|
|
1182
|
-
display: inline-block;
|
|
1183
|
-
padding: 4px 12px;
|
|
1184
|
-
border-radius: 9999px;
|
|
1185
|
-
font-size: 12px;
|
|
1186
|
-
font-weight: 600;
|
|
1187
|
-
text-transform: uppercase;
|
|
1188
|
-
margin-top: 8px;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
.section {
|
|
1192
|
-
margin-bottom: 32px;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
.section-title {
|
|
1196
|
-
font-size: 12px;
|
|
1197
|
-
font-weight: 600;
|
|
1198
|
-
text-transform: uppercase;
|
|
1199
|
-
letter-spacing: 0.05em;
|
|
1200
|
-
color: #6b7280;
|
|
1201
|
-
margin-bottom: 12px;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
.section-content {
|
|
1205
|
-
background: #f9fafb;
|
|
1206
|
-
border-radius: 8px;
|
|
1207
|
-
padding: 20px;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
.customer-name {
|
|
1211
|
-
font-size: 18px;
|
|
1212
|
-
font-weight: 600;
|
|
1213
|
-
margin-bottom: 8px;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
.contact-info {
|
|
1217
|
-
font-size: 14px;
|
|
1218
|
-
color: #4b5563;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
.contact-info a {
|
|
1222
|
-
color: #4b5563;
|
|
1223
|
-
text-decoration: none;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
.grid {
|
|
1227
|
-
display: grid;
|
|
1228
|
-
grid-template-columns: 1fr 1fr;
|
|
1229
|
-
gap: 16px;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
.info-card {
|
|
1233
|
-
background: #f9fafb;
|
|
1234
|
-
border-radius: 8px;
|
|
1235
|
-
padding: 16px;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
.info-label {
|
|
1239
|
-
font-size: 12px;
|
|
1240
|
-
color: #6b7280;
|
|
1241
|
-
margin-bottom: 4px;
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
.info-value {
|
|
1245
|
-
font-size: 16px;
|
|
1246
|
-
font-weight: 600;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
.package-row {
|
|
1250
|
-
display: flex;
|
|
1251
|
-
justify-content: space-between;
|
|
1252
|
-
align-items: flex-start;
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
.package-name {
|
|
1256
|
-
font-size: 16px;
|
|
1257
|
-
font-weight: 600;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
.package-duration {
|
|
1261
|
-
font-size: 14px;
|
|
1262
|
-
color: #6b7280;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
.package-price {
|
|
1266
|
-
font-size: 16px;
|
|
1267
|
-
font-weight: 600;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
.payment-row {
|
|
1271
|
-
display: flex;
|
|
1272
|
-
justify-content: space-between;
|
|
1273
|
-
padding: 8px 0;
|
|
1274
|
-
font-size: 14px;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
.payment-label {
|
|
1278
|
-
color: #6b7280;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
.payment-value {
|
|
1282
|
-
font-weight: 500;
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
.payment-value.green {
|
|
1286
|
-
color: #16a34a;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
.payment-value.orange {
|
|
1290
|
-
color: #ea580c;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
.payment-divider {
|
|
1294
|
-
border-top: 1px solid #e5e7eb;
|
|
1295
|
-
margin: 12px 0;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
.payment-total {
|
|
1299
|
-
font-size: 16px;
|
|
1300
|
-
font-weight: 600;
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
.footer {
|
|
1304
|
-
margin-top: 60px;
|
|
1305
|
-
padding-top: 20px;
|
|
1306
|
-
border-top: 1px solid #e5e7eb;
|
|
1307
|
-
text-align: center;
|
|
1308
|
-
font-size: 12px;
|
|
1309
|
-
color: #9ca3af;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
@media print {
|
|
1313
|
-
body {
|
|
1314
|
-
padding: 20px;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
.no-print {
|
|
1318
|
-
display: none;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
</style>
|
|
1322
|
-
</head>
|
|
1323
|
-
<body>
|
|
1324
|
-
<div class="header">
|
|
1325
|
-
<div class="company-info">
|
|
1326
|
-
${e.companyLogo ? `<img src="${e.companyLogo}" alt="Logo" class="company-logo" />` : ""}
|
|
1327
|
-
${e.companyName ? `<span class="company-name">${e.companyName}</span>` : ""}
|
|
1328
|
-
</div>
|
|
1329
|
-
<div class="document-info">
|
|
1330
|
-
<div class="document-title">Reservation</div>
|
|
1331
|
-
<div class="booking-id">Booking #${n}</div>
|
|
1332
|
-
<div
|
|
1333
|
-
class="status-badge"
|
|
1334
|
-
style="background-color: ${Fe(t.status)}20; color: ${Fe(t.status)};"
|
|
1335
|
-
>
|
|
1336
|
-
${es(t.status)}
|
|
1337
|
-
</div>
|
|
1338
|
-
</div>
|
|
1339
|
-
</div>
|
|
1340
|
-
|
|
1341
|
-
<div class="section">
|
|
1342
|
-
<div class="section-title">Customer</div>
|
|
1343
|
-
<div class="section-content">
|
|
1344
|
-
<div class="customer-name">${s}</div>
|
|
1345
|
-
<div class="contact-info">
|
|
1346
|
-
${t.customerInfo?.email ? `<div>Email: <a href="mailto:${t.customerInfo.email}">${t.customerInfo.email}</a></div>` : ""}
|
|
1347
|
-
${t.customerInfo?.phone ? `<div>Phone: <a href="tel:${t.customerInfo.phone}">${t.customerInfo.phone}</a></div>` : ""}
|
|
1348
|
-
</div>
|
|
1349
|
-
</div>
|
|
1350
|
-
</div>
|
|
1351
|
-
|
|
1352
|
-
<div class="section">
|
|
1353
|
-
<div class="section-title">Reservation Details</div>
|
|
1354
|
-
<div class="grid">
|
|
1355
|
-
<div class="info-card">
|
|
1356
|
-
<div class="info-label">Date</div>
|
|
1357
|
-
<div class="info-value">${e.date || "—"}</div>
|
|
1358
|
-
</div>
|
|
1359
|
-
<div class="info-card">
|
|
1360
|
-
<div class="info-label">Time</div>
|
|
1361
|
-
<div class="info-value">${t.startTime} - ${t.endTime}</div>
|
|
1362
|
-
</div>
|
|
1363
|
-
<div class="info-card">
|
|
1364
|
-
<div class="info-label">Spots</div>
|
|
1365
|
-
<div class="info-value">${t.spots || 1} ${(t.spots || 1) === 1 ? "person" : "people"}</div>
|
|
1366
|
-
</div>
|
|
1367
|
-
${e.resourceName ? `
|
|
1368
|
-
<div class="info-card">
|
|
1369
|
-
<div class="info-label">Resource</div>
|
|
1370
|
-
<div class="info-value">${e.resourceName}</div>
|
|
1371
|
-
</div>
|
|
1372
|
-
` : ""}
|
|
1373
|
-
${e.agendaName ? `
|
|
1374
|
-
<div class="info-card">
|
|
1375
|
-
<div class="info-label">Service</div>
|
|
1376
|
-
<div class="info-value">${e.agendaName}</div>
|
|
1377
|
-
</div>
|
|
1378
|
-
` : ""}
|
|
1379
|
-
</div>
|
|
1380
|
-
</div>
|
|
1381
|
-
|
|
1382
|
-
${t.pricingOption ? `
|
|
1383
|
-
<div class="section">
|
|
1384
|
-
<div class="section-title">Package</div>
|
|
1385
|
-
<div class="section-content">
|
|
1386
|
-
<div class="package-row">
|
|
1387
|
-
<div>
|
|
1388
|
-
<div class="package-name">${t.pricingOption.name}</div>
|
|
1389
|
-
<div class="package-duration">${qt(t.pricingOption.duration)}</div>
|
|
1390
|
-
</div>
|
|
1391
|
-
<div class="package-price">${Y(t.pricingOption.price)}</div>
|
|
1392
|
-
</div>
|
|
1393
|
-
</div>
|
|
1394
|
-
</div>
|
|
1395
|
-
` : ""}
|
|
1396
|
-
|
|
1397
|
-
<div class="section">
|
|
1398
|
-
<div class="section-title">Payment Summary</div>
|
|
1399
|
-
<div class="section-content">
|
|
1400
|
-
<div class="payment-row">
|
|
1401
|
-
<span class="payment-label">Base price</span>
|
|
1402
|
-
<span class="payment-value">${Y(t.reservationBasePrice)}</span>
|
|
1403
|
-
</div>
|
|
1404
|
-
${t.reservationAddOnsPrice ? `
|
|
1405
|
-
<div class="payment-row">
|
|
1406
|
-
<span class="payment-label">Add-ons</span>
|
|
1407
|
-
<span class="payment-value">${Y(t.reservationAddOnsPrice)}</span>
|
|
1408
|
-
</div>
|
|
1409
|
-
` : ""}
|
|
1410
|
-
${t.discount ? `
|
|
1411
|
-
<div class="payment-row">
|
|
1412
|
-
<span class="payment-label">Discount</span>
|
|
1413
|
-
<span class="payment-value green">-${Y(t.discount)}</span>
|
|
1414
|
-
</div>
|
|
1415
|
-
` : ""}
|
|
1416
|
-
|
|
1417
|
-
<div class="payment-divider"></div>
|
|
1418
|
-
|
|
1419
|
-
<div class="payment-row payment-total">
|
|
1420
|
-
<span>Reservation Total</span>
|
|
1421
|
-
<span>${Y(t.reservationPrice)}</span>
|
|
1422
|
-
</div>
|
|
1423
|
-
|
|
1424
|
-
${t.amountPaid !== void 0 || t.amountDue !== void 0 ? `
|
|
1425
|
-
<div class="payment-divider"></div>
|
|
1426
|
-
|
|
1427
|
-
${t.amountPaid !== void 0 ? `
|
|
1428
|
-
<div class="payment-row">
|
|
1429
|
-
<span class="payment-label">Amount paid</span>
|
|
1430
|
-
<span class="payment-value green">${Y(t.amountPaid)}</span>
|
|
1431
|
-
</div>
|
|
1432
|
-
` : ""}
|
|
1433
|
-
|
|
1434
|
-
${t.amountDue !== void 0 && t.amountDue > 0 ? `
|
|
1435
|
-
<div class="payment-row">
|
|
1436
|
-
<span class="payment-label">Amount due</span>
|
|
1437
|
-
<span class="payment-value orange">${Y(t.amountDue)}</span>
|
|
1438
|
-
</div>
|
|
1439
|
-
` : ""}
|
|
1440
|
-
` : ""}
|
|
1441
|
-
</div>
|
|
1442
|
-
</div>
|
|
1443
|
-
|
|
1444
|
-
<div class="footer">
|
|
1445
|
-
<p>Generated on ${a}</p>
|
|
1446
|
-
${e.companyName ? `<p>${e.companyName}</p>` : ""}
|
|
1447
|
-
</div>
|
|
1448
|
-
</body>
|
|
1449
|
-
</html>
|
|
1450
|
-
`, i = window.open("", "_blank");
|
|
1451
|
-
i && (i.document.write(r), i.document.close(), i.onload = () => {
|
|
1452
|
-
i.print();
|
|
1453
|
-
});
|
|
1454
|
-
}, ss = { class: "flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md" }, ns = { class: "grid gap-2" }, os = { class: "grid gap-2" }, as = { class: "grid gap-2" }, is = /* @__PURE__ */ te({
|
|
1455
|
-
__name: "CancelReservationDialog",
|
|
1456
|
-
emits: ["confirm"],
|
|
1457
|
-
setup(t, { expose: e, emit: s }) {
|
|
1458
|
-
const { config: n } = se(), { sendMail: a } = be(n.mailAccount), r = s, i = $(!1), l = $(!1), p = $(""), o = $(""), u = $(""), v = (h) => {
|
|
1459
|
-
l.value = !n.mailAccount, i.value = !0, h && (p.value = h.customerInfo?.email, o.value = "Cancellation of your reservation - " + new Date(h.date)?.toDateString(), u.value = `Dear ${h.customerInfo?.firstName ?? ""} ${h.customerInfo?.lastName ?? ""},
|
|
1460
|
-
|
|
1461
|
-
We are writing to inform you that your reservation scheduled for ${new Date(h.date)?.toDateString()} at ${h.startTime} has been cancelled.
|
|
1462
|
-
|
|
1463
|
-
Please accept our sincere apologies for any inconvenience this may cause. We would be happy to help you find an alternative time that works for you.`);
|
|
1464
|
-
}, b = () => {
|
|
1465
|
-
if (!l.value) {
|
|
1466
|
-
if (!p.value || !o.value || !u.value) return alert("Please fill in all the fields.");
|
|
1467
|
-
a({
|
|
1468
|
-
to: p.value,
|
|
1469
|
-
subject: o.value,
|
|
1470
|
-
body: u.value
|
|
1471
|
-
});
|
|
1472
|
-
}
|
|
1473
|
-
i.value = !1;
|
|
1474
|
-
const { $confetti: h } = useNuxtApp();
|
|
1475
|
-
h(), r("confirm");
|
|
1476
|
-
};
|
|
1477
|
-
return e({
|
|
1478
|
-
openDialog: v
|
|
1479
|
-
}), (h, d) => {
|
|
1480
|
-
const x = _("DialogTitle"), M = _("DialogDescription"), O = _("DialogHeader"), I = _("Checkbox"), w = _("Label"), B = _("Input"), N = _("Textarea"), H = _("Button"), V = _("DialogFooter"), E = _("DialogScrollContent"), j = _("Dialog");
|
|
1481
|
-
return R(), J(j, {
|
|
1482
|
-
open: i.value,
|
|
1483
|
-
"onUpdate:open": d[5] || (d[5] = (y) => i.value = y)
|
|
1484
|
-
}, {
|
|
1485
|
-
default: g(() => [
|
|
1486
|
-
c(E, { class: "sm:max-w-3xl" }, {
|
|
1487
|
-
default: g(() => [
|
|
1488
|
-
c(O, null, {
|
|
1489
|
-
default: g(() => [
|
|
1490
|
-
c(x, null, {
|
|
1491
|
-
default: g(() => [...d[6] || (d[6] = [
|
|
1492
|
-
A(" Cancel Reservation ", -1)
|
|
1493
|
-
])]),
|
|
1494
|
-
_: 1
|
|
1495
|
-
}),
|
|
1496
|
-
c(M)
|
|
1497
|
-
]),
|
|
1498
|
-
_: 1
|
|
1499
|
-
}),
|
|
1500
|
-
m("div", ss, [
|
|
1501
|
-
c(I, {
|
|
1502
|
-
modelValue: l.value,
|
|
1503
|
-
"onUpdate:modelValue": d[0] || (d[0] = (y) => l.value = y),
|
|
1504
|
-
id: "cancel-dialog-skip-mail",
|
|
1505
|
-
class: "border-black/80 dark:border-gray-200",
|
|
1506
|
-
disabled: !S(n).mailAccount
|
|
1507
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
1508
|
-
c(w, {
|
|
1509
|
-
for: "cancel-dialog-skip-mail",
|
|
1510
|
-
class: "py-4 pl-2 pr-4"
|
|
1511
|
-
}, {
|
|
1512
|
-
default: g(() => [...d[7] || (d[7] = [
|
|
1513
|
-
A("Do not send email to customer", -1)
|
|
1514
|
-
])]),
|
|
1515
|
-
_: 1
|
|
1516
|
-
})
|
|
1517
|
-
]),
|
|
1518
|
-
m("div", {
|
|
1519
|
-
class: le(["grid gap-4 py-4", { "opacity-50": l.value }])
|
|
1520
|
-
}, [
|
|
1521
|
-
m("div", ns, [
|
|
1522
|
-
c(w, { for: "cancel-dialog-email" }, {
|
|
1523
|
-
default: g(() => [...d[8] || (d[8] = [
|
|
1524
|
-
A("To:", -1)
|
|
1525
|
-
])]),
|
|
1526
|
-
_: 1
|
|
1527
|
-
}),
|
|
1528
|
-
c(B, {
|
|
1529
|
-
modelValue: p.value,
|
|
1530
|
-
"onUpdate:modelValue": d[1] || (d[1] = (y) => p.value = y),
|
|
1531
|
-
disabled: l.value,
|
|
1532
|
-
id: "cancel-dialog-email"
|
|
1533
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1534
|
-
]),
|
|
1535
|
-
m("div", os, [
|
|
1536
|
-
c(w, { for: "cancel-dialog-subject" }, {
|
|
1537
|
-
default: g(() => [...d[9] || (d[9] = [
|
|
1538
|
-
A("Subject:", -1)
|
|
1539
|
-
])]),
|
|
1540
|
-
_: 1
|
|
1541
|
-
}),
|
|
1542
|
-
c(B, {
|
|
1543
|
-
modelValue: o.value,
|
|
1544
|
-
"onUpdate:modelValue": d[2] || (d[2] = (y) => o.value = y),
|
|
1545
|
-
disabled: l.value,
|
|
1546
|
-
id: "cancel-dialog-subject"
|
|
1547
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1548
|
-
]),
|
|
1549
|
-
m("div", as, [
|
|
1550
|
-
c(w, { for: "cancel-dialog-body" }, {
|
|
1551
|
-
default: g(() => [...d[10] || (d[10] = [
|
|
1552
|
-
A("Body:", -1)
|
|
1553
|
-
])]),
|
|
1554
|
-
_: 1
|
|
1555
|
-
}),
|
|
1556
|
-
c(N, {
|
|
1557
|
-
modelValue: u.value,
|
|
1558
|
-
"onUpdate:modelValue": d[3] || (d[3] = (y) => u.value = y),
|
|
1559
|
-
disabled: l.value,
|
|
1560
|
-
id: "cancel-dialog-body"
|
|
1561
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1562
|
-
])
|
|
1563
|
-
], 2),
|
|
1564
|
-
c(V, null, {
|
|
1565
|
-
default: g(() => [
|
|
1566
|
-
c(H, {
|
|
1567
|
-
variant: "outline",
|
|
1568
|
-
onClick: d[4] || (d[4] = (y) => i.value = !1)
|
|
1569
|
-
}, {
|
|
1570
|
-
default: g(() => [...d[11] || (d[11] = [
|
|
1571
|
-
A("Close", -1)
|
|
1572
|
-
])]),
|
|
1573
|
-
_: 1
|
|
1574
|
-
}),
|
|
1575
|
-
c(H, {
|
|
1576
|
-
variant: "destructive",
|
|
1577
|
-
onClick: b
|
|
1578
|
-
}, {
|
|
1579
|
-
default: g(() => [...d[12] || (d[12] = [
|
|
1580
|
-
A("Cancel reservation", -1)
|
|
1581
|
-
])]),
|
|
1582
|
-
_: 1
|
|
1583
|
-
})
|
|
1584
|
-
]),
|
|
1585
|
-
_: 1
|
|
1586
|
-
})
|
|
1587
|
-
]),
|
|
1588
|
-
_: 1
|
|
1589
|
-
})
|
|
1590
|
-
]),
|
|
1591
|
-
_: 1
|
|
1592
|
-
}, 8, ["open"]);
|
|
1593
|
-
};
|
|
1594
|
-
}
|
|
1595
|
-
}), rs = /* @__PURE__ */ te({
|
|
1596
|
-
__name: "TransferReservationDialog",
|
|
1597
|
-
setup(t, { expose: e }) {
|
|
1598
|
-
const { config: s } = se(), n = $(!1);
|
|
1599
|
-
return e({
|
|
1600
|
-
openDialog: () => {
|
|
1601
|
-
n.value = !0;
|
|
1602
|
-
}
|
|
1603
|
-
}), (r, i) => {
|
|
1604
|
-
const l = _("DialogTitle"), p = _("DialogDescription"), o = _("DialogHeader"), u = _("Button"), v = _("DialogFooter"), b = _("DialogScrollContent"), h = _("Dialog");
|
|
1605
|
-
return R(), J(h, {
|
|
1606
|
-
open: n.value,
|
|
1607
|
-
"onUpdate:open": i[2] || (i[2] = (d) => n.value = d)
|
|
1608
|
-
}, {
|
|
1609
|
-
default: g(() => [
|
|
1610
|
-
c(b, { class: "sm:max-w-3xl" }, {
|
|
1611
|
-
default: g(() => [
|
|
1612
|
-
c(o, null, {
|
|
1613
|
-
default: g(() => [
|
|
1614
|
-
c(l, null, {
|
|
1615
|
-
default: g(() => [...i[3] || (i[3] = [
|
|
1616
|
-
A(" Transfer Reservation ", -1)
|
|
1617
|
-
])]),
|
|
1618
|
-
_: 1
|
|
1619
|
-
}),
|
|
1620
|
-
c(p)
|
|
1621
|
-
]),
|
|
1622
|
-
_: 1
|
|
1623
|
-
}),
|
|
1624
|
-
i[6] || (i[6] = m("div", { class: "py-4" }, null, -1)),
|
|
1625
|
-
c(v, null, {
|
|
1626
|
-
default: g(() => [
|
|
1627
|
-
c(u, {
|
|
1628
|
-
variant: "outline",
|
|
1629
|
-
onClick: i[0] || (i[0] = (d) => n.value = !1)
|
|
1630
|
-
}, {
|
|
1631
|
-
default: g(() => [...i[4] || (i[4] = [
|
|
1632
|
-
A("Close", -1)
|
|
1633
|
-
])]),
|
|
1634
|
-
_: 1
|
|
1635
|
-
}),
|
|
1636
|
-
c(u, {
|
|
1637
|
-
onClick: i[1] || (i[1] = (d) => n.value = !1)
|
|
1638
|
-
}, {
|
|
1639
|
-
default: g(() => [...i[5] || (i[5] = [
|
|
1640
|
-
A("Transfer reservation", -1)
|
|
1641
|
-
])]),
|
|
1642
|
-
_: 1
|
|
1643
|
-
})
|
|
1644
|
-
]),
|
|
1645
|
-
_: 1
|
|
1646
|
-
})
|
|
1647
|
-
]),
|
|
1648
|
-
_: 1
|
|
1649
|
-
})
|
|
1650
|
-
]),
|
|
1651
|
-
_: 1
|
|
1652
|
-
}, 8, ["open"]);
|
|
1653
|
-
};
|
|
1654
|
-
}
|
|
1655
|
-
}), ls = { class: "flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md" }, us = { class: "grid gap-2" }, cs = { class: "grid gap-2" }, ds = { class: "grid gap-2" }, ps = /* @__PURE__ */ te({
|
|
1656
|
-
__name: "ApproveReservationDialog",
|
|
1657
|
-
emits: ["confirm"],
|
|
1658
|
-
setup(t, { expose: e, emit: s }) {
|
|
1659
|
-
const { config: n } = se(), { sendMail: a } = be(n.mailAccount), r = s, i = $(!1), l = $("approve"), p = $(!1), o = $(""), u = $(""), v = $(""), b = (d, x) => {
|
|
1660
|
-
p.value = !n.mailAccount, i.value = !0, d && (x || (x = "approve"), l.value = x, o.value = d.customerInfo?.email, u.value = "Confirmation: Your reservation for " + new Date(d.date)?.toDateString(), v.value = `Dear ${d.customerInfo?.firstName ?? ""} ${d.customerInfo?.lastName ?? ""},
|
|
1661
|
-
|
|
1662
|
-
This email confirms your reservation for ${new Date(d.date)?.toDateString()} at ${d.startTime}.
|
|
1663
|
-
|
|
1664
|
-
We've got everything ready for you and look forward to your visit! If you need to make any changes or have special requests, please let us know.`);
|
|
1665
|
-
}, h = () => {
|
|
1666
|
-
if (!p.value) {
|
|
1667
|
-
if (!o.value || !u.value || !v.value) return alert("Please fill in all the fields.");
|
|
1668
|
-
a({
|
|
1669
|
-
to: o.value,
|
|
1670
|
-
subject: u.value,
|
|
1671
|
-
body: v.value
|
|
1672
|
-
});
|
|
1673
|
-
}
|
|
1674
|
-
i.value = !1;
|
|
1675
|
-
const { $confetti: d } = useNuxtApp();
|
|
1676
|
-
d(), r("confirm");
|
|
1677
|
-
};
|
|
1678
|
-
return e({
|
|
1679
|
-
openDialog: b
|
|
1680
|
-
}), (d, x) => {
|
|
1681
|
-
const M = _("DialogTitle"), O = _("DialogDescription"), I = _("DialogHeader"), w = _("Checkbox"), B = _("Label"), N = _("Input"), H = _("Textarea"), V = _("Button"), E = _("DialogFooter"), j = _("DialogScrollContent"), y = _("Dialog");
|
|
1682
|
-
return R(), J(y, {
|
|
1683
|
-
open: i.value,
|
|
1684
|
-
"onUpdate:open": x[5] || (x[5] = (T) => i.value = T)
|
|
1685
|
-
}, {
|
|
1686
|
-
default: g(() => [
|
|
1687
|
-
c(j, { class: "sm:max-w-3xl" }, {
|
|
1688
|
-
default: g(() => [
|
|
1689
|
-
c(I, null, {
|
|
1690
|
-
default: g(() => [
|
|
1691
|
-
c(M, null, {
|
|
1692
|
-
default: g(() => [
|
|
1693
|
-
A(F(l.value === "approve" ? "Approve Reservation" : "Resend Confirmation Email"), 1)
|
|
1694
|
-
]),
|
|
1695
|
-
_: 1
|
|
1696
|
-
}),
|
|
1697
|
-
c(O)
|
|
1698
|
-
]),
|
|
1699
|
-
_: 1
|
|
1700
|
-
}),
|
|
1701
|
-
m("div", ls, [
|
|
1702
|
-
c(w, {
|
|
1703
|
-
modelValue: p.value,
|
|
1704
|
-
"onUpdate:modelValue": x[0] || (x[0] = (T) => p.value = T),
|
|
1705
|
-
id: "reject-dialog-skip-mail",
|
|
1706
|
-
class: "border-black/80 dark:border-gray-200",
|
|
1707
|
-
disabled: !S(n).mailAccount
|
|
1708
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
1709
|
-
c(B, {
|
|
1710
|
-
for: "reject-dialog-skip-mail",
|
|
1711
|
-
class: "py-4 pl-2 pr-4"
|
|
1712
|
-
}, {
|
|
1713
|
-
default: g(() => [...x[6] || (x[6] = [
|
|
1714
|
-
A("Do not send email to customer", -1)
|
|
1715
|
-
])]),
|
|
1716
|
-
_: 1
|
|
1717
|
-
})
|
|
1718
|
-
]),
|
|
1719
|
-
m("div", {
|
|
1720
|
-
class: le(["grid gap-4 py-4", { "opacity-50": p.value }])
|
|
1721
|
-
}, [
|
|
1722
|
-
m("div", us, [
|
|
1723
|
-
c(B, { for: "approve-dialog-email" }, {
|
|
1724
|
-
default: g(() => [...x[7] || (x[7] = [
|
|
1725
|
-
A("To:", -1)
|
|
1726
|
-
])]),
|
|
1727
|
-
_: 1
|
|
1728
|
-
}),
|
|
1729
|
-
c(N, {
|
|
1730
|
-
modelValue: o.value,
|
|
1731
|
-
"onUpdate:modelValue": x[1] || (x[1] = (T) => o.value = T),
|
|
1732
|
-
disabled: p.value,
|
|
1733
|
-
id: "approve-dialog-email"
|
|
1734
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1735
|
-
]),
|
|
1736
|
-
m("div", cs, [
|
|
1737
|
-
c(B, { for: "approve-dialog-subject" }, {
|
|
1738
|
-
default: g(() => [...x[8] || (x[8] = [
|
|
1739
|
-
A("Subject:", -1)
|
|
1740
|
-
])]),
|
|
1741
|
-
_: 1
|
|
1742
|
-
}),
|
|
1743
|
-
c(N, {
|
|
1744
|
-
modelValue: u.value,
|
|
1745
|
-
"onUpdate:modelValue": x[2] || (x[2] = (T) => u.value = T),
|
|
1746
|
-
disabled: p.value,
|
|
1747
|
-
id: "approve-dialog-subject"
|
|
1748
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1749
|
-
]),
|
|
1750
|
-
m("div", ds, [
|
|
1751
|
-
c(B, { for: "approve-dialog-body" }, {
|
|
1752
|
-
default: g(() => [...x[9] || (x[9] = [
|
|
1753
|
-
A("Body:", -1)
|
|
1754
|
-
])]),
|
|
1755
|
-
_: 1
|
|
1756
|
-
}),
|
|
1757
|
-
c(H, {
|
|
1758
|
-
modelValue: v.value,
|
|
1759
|
-
"onUpdate:modelValue": x[3] || (x[3] = (T) => v.value = T),
|
|
1760
|
-
disabled: p.value,
|
|
1761
|
-
id: "approve-dialog-body"
|
|
1762
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1763
|
-
])
|
|
1764
|
-
], 2),
|
|
1765
|
-
c(E, null, {
|
|
1766
|
-
default: g(() => [
|
|
1767
|
-
c(V, {
|
|
1768
|
-
variant: "outline",
|
|
1769
|
-
onClick: x[4] || (x[4] = (T) => i.value = !1)
|
|
1770
|
-
}, {
|
|
1771
|
-
default: g(() => [...x[10] || (x[10] = [
|
|
1772
|
-
A("Close", -1)
|
|
1773
|
-
])]),
|
|
1774
|
-
_: 1
|
|
1775
|
-
}),
|
|
1776
|
-
c(V, { onClick: h }, {
|
|
1777
|
-
default: g(() => [...x[11] || (x[11] = [
|
|
1778
|
-
A("Approve reservation", -1)
|
|
1779
|
-
])]),
|
|
1780
|
-
_: 1
|
|
1781
|
-
})
|
|
1782
|
-
]),
|
|
1783
|
-
_: 1
|
|
1784
|
-
})
|
|
1785
|
-
]),
|
|
1786
|
-
_: 1
|
|
1787
|
-
})
|
|
1788
|
-
]),
|
|
1789
|
-
_: 1
|
|
1790
|
-
}, 8, ["open"]);
|
|
1791
|
-
};
|
|
1792
|
-
}
|
|
1793
|
-
}), fs = { class: "flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md" }, ms = { class: "grid gap-2" }, gs = { class: "grid gap-2" }, vs = { class: "grid gap-2" }, hs = /* @__PURE__ */ te({
|
|
1794
|
-
__name: "RejectReservationDialog",
|
|
1795
|
-
emits: ["confirm"],
|
|
1796
|
-
setup(t, { expose: e, emit: s }) {
|
|
1797
|
-
const { config: n } = se(), { sendMail: a } = be(n.mailAccount), r = s, i = $(!1), l = $(!1), p = $(""), o = $(""), u = $(""), v = (h) => {
|
|
1798
|
-
l.value = !n.mailAccount, i.value = !0, h && (p.value = h.customerInfo?.email, o.value = "Regarding your reservation request for " + new Date(h.date)?.toDateString(), u.value = `Dear ${h.customerInfo?.firstName ?? ""} ${h.customerInfo?.lastName ?? ""},
|
|
1799
|
-
|
|
1800
|
-
Thank you for your interest in booking with us. Unfortunately, we are unable to confirm your request for ${new Date(h.date)?.toDateString()} at ${h.startTime}.
|
|
1801
|
-
|
|
1802
|
-
We would love to see you another time!`);
|
|
1803
|
-
}, b = () => {
|
|
1804
|
-
if (!l.value) {
|
|
1805
|
-
if (!p.value || !o.value || !u.value) return alert("Please fill in all the fields.");
|
|
1806
|
-
a({
|
|
1807
|
-
to: p.value,
|
|
1808
|
-
subject: o.value,
|
|
1809
|
-
body: u.value
|
|
1810
|
-
});
|
|
1811
|
-
}
|
|
1812
|
-
i.value = !1;
|
|
1813
|
-
const { $confetti: h } = useNuxtApp();
|
|
1814
|
-
h(), r("confirm");
|
|
1815
|
-
};
|
|
1816
|
-
return e({
|
|
1817
|
-
openDialog: v
|
|
1818
|
-
}), (h, d) => {
|
|
1819
|
-
const x = _("DialogTitle"), M = _("DialogDescription"), O = _("DialogHeader"), I = _("Checkbox"), w = _("Label"), B = _("Input"), N = _("Textarea"), H = _("Button"), V = _("DialogFooter"), E = _("DialogScrollContent"), j = _("Dialog");
|
|
1820
|
-
return R(), J(j, {
|
|
1821
|
-
open: i.value,
|
|
1822
|
-
"onUpdate:open": d[5] || (d[5] = (y) => i.value = y)
|
|
1823
|
-
}, {
|
|
1824
|
-
default: g(() => [
|
|
1825
|
-
c(E, { class: "sm:max-w-3xl" }, {
|
|
1826
|
-
default: g(() => [
|
|
1827
|
-
c(O, null, {
|
|
1828
|
-
default: g(() => [
|
|
1829
|
-
c(x, null, {
|
|
1830
|
-
default: g(() => [...d[6] || (d[6] = [
|
|
1831
|
-
A(" Reject Reservation Request ", -1)
|
|
1832
|
-
])]),
|
|
1833
|
-
_: 1
|
|
1834
|
-
}),
|
|
1835
|
-
c(M)
|
|
1836
|
-
]),
|
|
1837
|
-
_: 1
|
|
1838
|
-
}),
|
|
1839
|
-
m("div", fs, [
|
|
1840
|
-
c(I, {
|
|
1841
|
-
modelValue: l.value,
|
|
1842
|
-
"onUpdate:modelValue": d[0] || (d[0] = (y) => l.value = y),
|
|
1843
|
-
id: "reject-dialog-skip-mail",
|
|
1844
|
-
class: "border-black/80 dark:border-gray-200",
|
|
1845
|
-
disabled: !S(n).mailAccount
|
|
1846
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
1847
|
-
c(w, {
|
|
1848
|
-
for: "reject-dialog-skip-mail",
|
|
1849
|
-
class: "py-4 pl-2 pr-4"
|
|
1850
|
-
}, {
|
|
1851
|
-
default: g(() => [...d[7] || (d[7] = [
|
|
1852
|
-
A("Do not send email to customer", -1)
|
|
1853
|
-
])]),
|
|
1854
|
-
_: 1
|
|
1855
|
-
})
|
|
1856
|
-
]),
|
|
1857
|
-
m("div", {
|
|
1858
|
-
class: le(["grid gap-4 py-4", { "opacity-50": l.value }])
|
|
1859
|
-
}, [
|
|
1860
|
-
m("div", ms, [
|
|
1861
|
-
c(w, { for: "reject-dialog-email" }, {
|
|
1862
|
-
default: g(() => [...d[8] || (d[8] = [
|
|
1863
|
-
A("To:", -1)
|
|
1864
|
-
])]),
|
|
1865
|
-
_: 1
|
|
1866
|
-
}),
|
|
1867
|
-
c(B, {
|
|
1868
|
-
modelValue: p.value,
|
|
1869
|
-
"onUpdate:modelValue": d[1] || (d[1] = (y) => p.value = y),
|
|
1870
|
-
disabled: l.value,
|
|
1871
|
-
id: "reject-dialog-email"
|
|
1872
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1873
|
-
]),
|
|
1874
|
-
m("div", gs, [
|
|
1875
|
-
c(w, { for: "reject-dialog-subject" }, {
|
|
1876
|
-
default: g(() => [...d[9] || (d[9] = [
|
|
1877
|
-
A("Subject:", -1)
|
|
1878
|
-
])]),
|
|
1879
|
-
_: 1
|
|
1880
|
-
}),
|
|
1881
|
-
c(B, {
|
|
1882
|
-
modelValue: o.value,
|
|
1883
|
-
"onUpdate:modelValue": d[2] || (d[2] = (y) => o.value = y),
|
|
1884
|
-
disabled: l.value,
|
|
1885
|
-
id: "reject-dialog-subject"
|
|
1886
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1887
|
-
]),
|
|
1888
|
-
m("div", vs, [
|
|
1889
|
-
c(w, { for: "reject-dialog-body" }, {
|
|
1890
|
-
default: g(() => [...d[10] || (d[10] = [
|
|
1891
|
-
A("Body:", -1)
|
|
1892
|
-
])]),
|
|
1893
|
-
_: 1
|
|
1894
|
-
}),
|
|
1895
|
-
c(N, {
|
|
1896
|
-
modelValue: u.value,
|
|
1897
|
-
"onUpdate:modelValue": d[3] || (d[3] = (y) => u.value = y),
|
|
1898
|
-
disabled: l.value,
|
|
1899
|
-
id: "reject-dialog-body"
|
|
1900
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
1901
|
-
])
|
|
1902
|
-
], 2),
|
|
1903
|
-
c(V, null, {
|
|
1904
|
-
default: g(() => [
|
|
1905
|
-
c(H, {
|
|
1906
|
-
variant: "outline",
|
|
1907
|
-
onClick: d[4] || (d[4] = (y) => i.value = !1)
|
|
1908
|
-
}, {
|
|
1909
|
-
default: g(() => [...d[11] || (d[11] = [
|
|
1910
|
-
A("Close", -1)
|
|
1911
|
-
])]),
|
|
1912
|
-
_: 1
|
|
1913
|
-
}),
|
|
1914
|
-
c(H, {
|
|
1915
|
-
variant: "destructive",
|
|
1916
|
-
onClick: b
|
|
1917
|
-
}, {
|
|
1918
|
-
default: g(() => [...d[12] || (d[12] = [
|
|
1919
|
-
A("Reject reservation", -1)
|
|
1920
|
-
])]),
|
|
1921
|
-
_: 1
|
|
1922
|
-
})
|
|
1923
|
-
]),
|
|
1924
|
-
_: 1
|
|
1925
|
-
})
|
|
1926
|
-
]),
|
|
1927
|
-
_: 1
|
|
1928
|
-
})
|
|
1929
|
-
]),
|
|
1930
|
-
_: 1
|
|
1931
|
-
}, 8, ["open"]);
|
|
1932
|
-
};
|
|
1933
|
-
}
|
|
1934
|
-
}), _s = {
|
|
1935
|
-
key: 0,
|
|
1936
|
-
class: "space-y-6 py-4"
|
|
1937
|
-
}, xs = { class: "space-y-3" }, Ds = { class: "bg-muted/30 rounded-lg p-4 space-y-3" }, bs = { class: "flex items-center gap-3" }, ys = { class: "h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center" }, As = { class: "font-medium" }, Cs = { class: "grid gap-2 text-sm" }, ws = {
|
|
1938
|
-
key: 0,
|
|
1939
|
-
class: "flex items-center gap-2 text-muted-foreground"
|
|
1940
|
-
}, ks = ["href"], Es = {
|
|
1941
|
-
key: 1,
|
|
1942
|
-
class: "flex items-center gap-2 text-muted-foreground"
|
|
1943
|
-
}, $s = ["href"], Ms = { class: "space-y-3" }, Bs = { class: "grid grid-cols-2 gap-3" }, Fs = { class: "bg-muted/30 rounded-lg p-3" }, Ss = { class: "flex items-center gap-2 text-muted-foreground mb-1" }, Rs = { class: "font-medium" }, Is = { class: "bg-muted/30 rounded-lg p-3" }, js = { class: "flex items-center gap-2 text-muted-foreground mb-1" }, Ts = { class: "font-medium" }, Os = {
|
|
1944
|
-
key: 0,
|
|
1945
|
-
class: "space-y-3"
|
|
1946
|
-
}, Ns = { class: "bg-muted/30 rounded-lg p-4" }, Ls = { class: "flex items-start justify-between" }, Ps = { class: "flex items-start gap-3" }, zs = { class: "h-9 w-9 rounded-lg bg-primary/10 flex items-center justify-center mt-0.5" }, Vs = { class: "font-medium" }, Us = { class: "text-sm text-muted-foreground" }, Hs = { class: "font-semibold" }, Ws = { class: "space-y-3" }, Ks = { class: "bg-muted/30 rounded-lg p-4 space-y-3" }, Gs = { class: "space-y-2 text-sm" }, Ys = { class: "flex justify-between" }, Qs = {
|
|
1947
|
-
key: 0,
|
|
1948
|
-
class: "flex justify-between"
|
|
1949
|
-
}, Js = {
|
|
1950
|
-
key: 1,
|
|
1951
|
-
class: "flex justify-between text-green-600 dark:text-green-400"
|
|
1952
|
-
}, Xs = { class: "flex justify-between font-semibold" }, Zs = {
|
|
1953
|
-
key: 1,
|
|
1954
|
-
class: "space-y-2 text-sm"
|
|
1955
|
-
}, qs = {
|
|
1956
|
-
key: 0,
|
|
1957
|
-
class: "flex justify-between"
|
|
1958
|
-
}, en = { class: "text-muted-foreground flex items-center gap-1.5" }, tn = { class: "text-green-600 dark:text-green-400" }, sn = {
|
|
1959
|
-
key: 1,
|
|
1960
|
-
class: "flex justify-between"
|
|
1961
|
-
}, nn = { class: "text-muted-foreground flex items-center gap-1.5" }, on = { class: "text-orange-600 dark:text-orange-400 font-medium" }, cn = /* @__PURE__ */ te({
|
|
1962
|
-
__name: "ReservationDetailDialog",
|
|
1963
|
-
emits: ["cancelled", "confirmed", "rejected"],
|
|
1964
|
-
setup(t, { expose: e, emit: s }) {
|
|
1965
|
-
const { hasPermission: n } = pt(), { config: a } = se(), r = ft(a.project), i = Je("event", $(null)), l = s, p = $(!1), o = $(null), u = $(!1), v = oe("cancelReservationDialog"), b = oe("approveReservationDialog"), h = oe("rejectReservationDialog"), d = oe("transferReservationDialog"), x = (C) => {
|
|
1966
|
-
o.value = C, p.value = !0;
|
|
1967
|
-
}, M = pe(() => o.value?.customerInfo && `${o.value.customerInfo.firstName} ${o.value.customerInfo.lastName}`.trim() || "Unknown Customer"), O = pe(() => {
|
|
1968
|
-
let C = o.value?.status;
|
|
1969
|
-
const f = o.value?.reservationStatus;
|
|
1970
|
-
switch (["needs_approval", "rejected", "approved", "cancelled"].includes(f) && (C = f), C) {
|
|
1971
|
-
case "needs_approval":
|
|
1972
|
-
return { label: "Needs Approval", class: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400" };
|
|
1973
|
-
case "rejected":
|
|
1974
|
-
return { label: "Rejected", class: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400" };
|
|
1975
|
-
case "approved":
|
|
1976
|
-
return { label: "Approved", class: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" };
|
|
1977
|
-
case "pending":
|
|
1978
|
-
return { label: "Pending", class: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400" };
|
|
1979
|
-
case "cancelled":
|
|
1980
|
-
return { label: "Cancelled", class: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400" };
|
|
1981
|
-
default:
|
|
1982
|
-
return { label: C || "Unknown", class: "bg-muted text-muted-foreground" };
|
|
1983
|
-
}
|
|
1984
|
-
}), I = pe(() => o.value?.status === "cancelled"), w = (C) => C == null || typeof C != "number" ? "—" : `€${C?.toFixed(2)}`, B = (C) => {
|
|
1985
|
-
if (!C) return "—";
|
|
1986
|
-
if (C < 60) return `${C} min`;
|
|
1987
|
-
const f = Math.floor(C / 60), k = C % 60;
|
|
1988
|
-
return k > 0 ? `${f}h ${k}min` : `${f}h`;
|
|
1989
|
-
}, N = () => {
|
|
1990
|
-
if (!o.value) return;
|
|
1991
|
-
let C = "";
|
|
1992
|
-
const f = i?.value?.date;
|
|
1993
|
-
if (f)
|
|
1994
|
-
try {
|
|
1995
|
-
C = new Date(f).toLocaleDateString("en-US", {
|
|
1996
|
-
weekday: "long",
|
|
1997
|
-
year: "numeric",
|
|
1998
|
-
month: "long",
|
|
1999
|
-
day: "numeric"
|
|
2000
|
-
});
|
|
2001
|
-
} catch {
|
|
2002
|
-
C = f;
|
|
2003
|
-
}
|
|
2004
|
-
const k = {
|
|
2005
|
-
date: C,
|
|
2006
|
-
resourceName: i?.value?.resource?.name
|
|
2007
|
-
};
|
|
2008
|
-
ts(o.value, k);
|
|
2009
|
-
}, H = () => {
|
|
2010
|
-
b.value?.openDialog(o.value);
|
|
2011
|
-
}, V = () => {
|
|
2012
|
-
h.value?.openDialog(o.value);
|
|
2013
|
-
}, E = () => {
|
|
2014
|
-
b.value?.openDialog(o.value);
|
|
2015
|
-
}, j = () => {
|
|
2016
|
-
v.value?.openDialog(o.value);
|
|
2017
|
-
}, y = async () => {
|
|
2018
|
-
try {
|
|
2019
|
-
if (u.value || !o.value?.id) throw new Error("Invalid state");
|
|
2020
|
-
u.value = !0;
|
|
2021
|
-
let f = (await r.get(a.reservationsCollection, o.value.id))?.reservations || [];
|
|
2022
|
-
if (!f.find((k) => k.id === o.value.res_id))
|
|
2023
|
-
throw new Error("Reservation not found");
|
|
2024
|
-
f.find((k) => k.id === o.value.res_id).status = "cancelled", await r.update(a.reservationsCollection, o.value.id, {
|
|
2025
|
-
reservations: f
|
|
2026
|
-
}), o.value.status = "cancelled", Z.success("Reservation cancelled successfully"), l("cancelled"), p.value = !1;
|
|
2027
|
-
} catch (C) {
|
|
2028
|
-
console.error("Error cancelling reservation:", C), Z.error("Failed to cancel reservation");
|
|
2029
|
-
} finally {
|
|
2030
|
-
u.value = !1;
|
|
2031
|
-
}
|
|
2032
|
-
}, T = async () => {
|
|
2033
|
-
try {
|
|
2034
|
-
if (u.value || !o.value?.id) throw new Error("Invalid state");
|
|
2035
|
-
u.value = !0;
|
|
2036
|
-
let f = (await r.get(a.reservationsCollection, o.value.id))?.reservations || [];
|
|
2037
|
-
if (!f.find((k) => k.id === o.value.res_id))
|
|
2038
|
-
throw new Error("Reservation not found");
|
|
2039
|
-
f.find((k) => k.id === o.value.res_id).status = "approved", await r.update(a.reservationsCollection, o.value.id, {
|
|
2040
|
-
reservations: f
|
|
2041
|
-
}), o.value.status = "approved", Z.success("Reservation approved successfully"), l("confirmed"), p.value = !1;
|
|
2042
|
-
} catch (C) {
|
|
2043
|
-
console.error("Error approving reservation:", C), Z.error("Failed to approve reservation");
|
|
2044
|
-
} finally {
|
|
2045
|
-
u.value = !1;
|
|
2046
|
-
}
|
|
2047
|
-
}, ee = async () => {
|
|
2048
|
-
try {
|
|
2049
|
-
if (u.value || !o.value?.id) throw new Error("Invalid state");
|
|
2050
|
-
u.value = !0;
|
|
2051
|
-
let f = (await r.get(a.reservationsCollection, o.value.id))?.reservations || [];
|
|
2052
|
-
if (!f.find((k) => k.id === o.value.res_id))
|
|
2053
|
-
throw new Error("Reservation not found");
|
|
2054
|
-
f.find((k) => k.id === o.value.res_id).status = "rejected", await r.update(a.reservationsCollection, o.value.id, {
|
|
2055
|
-
reservations: f
|
|
2056
|
-
}), o.value.status = "rejected", Z.success("Reservation rejected successfully"), l("rejected"), p.value = !1;
|
|
2057
|
-
} catch (C) {
|
|
2058
|
-
console.error("Error rejecting reservation:", C), Z.error("Failed to reject reservation");
|
|
2059
|
-
} finally {
|
|
2060
|
-
u.value = !1;
|
|
2061
|
-
}
|
|
2062
|
-
}, W = () => {
|
|
2063
|
-
};
|
|
2064
|
-
return e({
|
|
2065
|
-
openDialog: x
|
|
2066
|
-
}), (C, f) => {
|
|
2067
|
-
const k = _("DialogTitle"), X = _("DialogDescription"), Ve = _("DialogHeader"), Ae = _("Separator"), ue = _("Button"), Ue = _("DropdownMenuTrigger"), ce = _("DropdownMenuLabel"), ne = _("DropdownMenuItem"), de = _("DropdownMenuGroup"), Ce = _("DropdownMenuSeparator"), He = _("DropdownMenuContent"), We = _("DropdownMenu"), Ke = _("DialogFooter"), Ge = _("DialogScrollContent"), Ye = _("Dialog");
|
|
2068
|
-
return R(), U(fe, null, [
|
|
2069
|
-
c(Ye, {
|
|
2070
|
-
open: p.value,
|
|
2071
|
-
"onUpdate:open": f[0] || (f[0] = (Qe) => p.value = Qe)
|
|
2072
|
-
}, {
|
|
2073
|
-
default: g(() => [
|
|
2074
|
-
c(Ge, { class: "sm:max-w-xl" }, {
|
|
2075
|
-
default: g(() => [
|
|
2076
|
-
c(Ve, null, {
|
|
2077
|
-
default: g(() => [
|
|
2078
|
-
c(k, { class: "flex items-center gap-3" }, {
|
|
2079
|
-
default: g(() => [
|
|
2080
|
-
f[1] || (f[1] = m("span", null, "Reservation Details", -1)),
|
|
2081
|
-
m("span", {
|
|
2082
|
-
class: le(["px-2.5 py-1 text-xs font-medium rounded-full", O.value.class])
|
|
2083
|
-
}, F(O.value.label), 3)
|
|
2084
|
-
]),
|
|
2085
|
-
_: 1
|
|
2086
|
-
}),
|
|
2087
|
-
c(X, null, {
|
|
2088
|
-
default: g(() => [
|
|
2089
|
-
A(" Booking #" + F(o.value?.id?.slice(0, 8) || "—"), 1)
|
|
2090
|
-
]),
|
|
2091
|
-
_: 1
|
|
2092
|
-
})
|
|
2093
|
-
]),
|
|
2094
|
-
_: 1
|
|
2095
|
-
}),
|
|
2096
|
-
o.value ? (R(), U("div", _s, [
|
|
2097
|
-
m("div", xs, [
|
|
2098
|
-
f[2] || (f[2] = m("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Customer", -1)),
|
|
2099
|
-
m("div", Ds, [
|
|
2100
|
-
m("div", bs, [
|
|
2101
|
-
m("div", ys, [
|
|
2102
|
-
c(S(Xe), {
|
|
2103
|
-
size: 20,
|
|
2104
|
-
class: "text-primary"
|
|
2105
|
-
})
|
|
2106
|
-
]),
|
|
2107
|
-
m("div", null, [
|
|
2108
|
-
m("p", As, F(M.value), 1)
|
|
2109
|
-
])
|
|
2110
|
-
]),
|
|
2111
|
-
m("div", Cs, [
|
|
2112
|
-
o.value.customerInfo?.email ? (R(), U("div", ws, [
|
|
2113
|
-
c(S(Ze), { size: 14 }),
|
|
2114
|
-
m("a", {
|
|
2115
|
-
href: `mailto:${o.value.customerInfo.email}`,
|
|
2116
|
-
class: "hover:text-foreground transition-colors"
|
|
2117
|
-
}, F(o.value.customerInfo.email), 9, ks)
|
|
2118
|
-
])) : L("", !0),
|
|
2119
|
-
o.value.customerInfo?.phone ? (R(), U("div", Es, [
|
|
2120
|
-
c(S(qe), { size: 14 }),
|
|
2121
|
-
m("a", {
|
|
2122
|
-
href: `tel:${o.value.customerInfo.phone}`,
|
|
2123
|
-
class: "hover:text-foreground transition-colors"
|
|
2124
|
-
}, F(o.value.customerInfo.phone), 9, $s)
|
|
2125
|
-
])) : L("", !0)
|
|
2126
|
-
])
|
|
2127
|
-
])
|
|
2128
|
-
]),
|
|
2129
|
-
m("div", Ms, [
|
|
2130
|
-
f[5] || (f[5] = m("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Reservation", -1)),
|
|
2131
|
-
m("div", Bs, [
|
|
2132
|
-
m("div", Fs, [
|
|
2133
|
-
m("div", Ss, [
|
|
2134
|
-
c(S(et), { size: 14 }),
|
|
2135
|
-
f[3] || (f[3] = m("span", { class: "text-xs" }, "Time", -1))
|
|
2136
|
-
]),
|
|
2137
|
-
m("p", Rs, F(o.value.startTime) + " - " + F(o.value.endTime), 1)
|
|
2138
|
-
]),
|
|
2139
|
-
m("div", Is, [
|
|
2140
|
-
m("div", js, [
|
|
2141
|
-
c(S(tt), { size: 14 }),
|
|
2142
|
-
f[4] || (f[4] = m("span", { class: "text-xs" }, "Spots", -1))
|
|
2143
|
-
]),
|
|
2144
|
-
m("p", Ts, F(o.value.spots || 1) + " " + F(o.value.spots === 1 ? "person" : "people"), 1)
|
|
2145
|
-
])
|
|
2146
|
-
])
|
|
2147
|
-
]),
|
|
2148
|
-
o.value.pricingOption ? (R(), U("div", Os, [
|
|
2149
|
-
f[6] || (f[6] = m("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Package", -1)),
|
|
2150
|
-
m("div", Ns, [
|
|
2151
|
-
m("div", Ls, [
|
|
2152
|
-
m("div", Ps, [
|
|
2153
|
-
m("div", zs, [
|
|
2154
|
-
c(S(st), {
|
|
2155
|
-
size: 18,
|
|
2156
|
-
class: "text-primary"
|
|
2157
|
-
})
|
|
2158
|
-
]),
|
|
2159
|
-
m("div", null, [
|
|
2160
|
-
m("p", Vs, F(o.value.pricingOption.name), 1),
|
|
2161
|
-
m("p", Us, F(B(o.value.pricingOption.duration)), 1)
|
|
2162
|
-
])
|
|
2163
|
-
]),
|
|
2164
|
-
m("p", Hs, F(w(o.value.pricingOption.price)), 1)
|
|
2165
|
-
])
|
|
2166
|
-
])
|
|
2167
|
-
])) : L("", !0),
|
|
2168
|
-
m("div", Ws, [
|
|
2169
|
-
f[13] || (f[13] = m("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Payment", -1)),
|
|
2170
|
-
m("div", Ks, [
|
|
2171
|
-
m("div", Gs, [
|
|
2172
|
-
m("div", Ys, [
|
|
2173
|
-
f[7] || (f[7] = m("span", { class: "text-muted-foreground" }, "Base price", -1)),
|
|
2174
|
-
m("span", null, F(w(o.value.reservationBasePrice)), 1)
|
|
2175
|
-
]),
|
|
2176
|
-
o.value.reservationAddOnsPrice ? (R(), U("div", Qs, [
|
|
2177
|
-
f[8] || (f[8] = m("span", { class: "text-muted-foreground" }, "Add-ons", -1)),
|
|
2178
|
-
m("span", null, F(w(o.value.reservationAddOnsPrice)), 1)
|
|
2179
|
-
])) : L("", !0),
|
|
2180
|
-
o.value.discount ? (R(), U("div", Js, [
|
|
2181
|
-
f[9] || (f[9] = m("span", null, "Discount", -1)),
|
|
2182
|
-
m("span", null, "-" + F(w(o.value.discount)), 1)
|
|
2183
|
-
])) : L("", !0)
|
|
2184
|
-
]),
|
|
2185
|
-
c(Ae),
|
|
2186
|
-
m("div", Xs, [
|
|
2187
|
-
f[10] || (f[10] = m("span", null, "Reservation Total", -1)),
|
|
2188
|
-
m("span", null, F(w(o.value.reservationPrice)), 1)
|
|
2189
|
-
]),
|
|
2190
|
-
o.value.amountPaid !== void 0 || o.value.amountDue !== void 0 ? (R(), J(Ae, { key: 0 })) : L("", !0),
|
|
2191
|
-
o.value.amountPaid !== void 0 || o.value.amountDue !== void 0 ? (R(), U("div", Zs, [
|
|
2192
|
-
o.value.amountPaid !== void 0 ? (R(), U("div", qs, [
|
|
2193
|
-
m("span", en, [
|
|
2194
|
-
c(S(nt), { size: 14 }),
|
|
2195
|
-
f[11] || (f[11] = A(" Amount paid ", -1))
|
|
2196
|
-
]),
|
|
2197
|
-
m("span", tn, F(w(o.value.amountPaid)), 1)
|
|
2198
|
-
])) : L("", !0),
|
|
2199
|
-
o.value.amountDue !== void 0 && o.value.amountDue > 0 ? (R(), U("div", sn, [
|
|
2200
|
-
m("span", nn, [
|
|
2201
|
-
c(S(ot), { size: 14 }),
|
|
2202
|
-
f[12] || (f[12] = A(" Amount due ", -1))
|
|
2203
|
-
]),
|
|
2204
|
-
m("span", on, F(w(o.value.amountDue)), 1)
|
|
2205
|
-
])) : L("", !0)
|
|
2206
|
-
])) : L("", !0)
|
|
2207
|
-
])
|
|
2208
|
-
])
|
|
2209
|
-
])) : L("", !0),
|
|
2210
|
-
c(Ke, { class: "gap-2 sm:justify-between" }, {
|
|
2211
|
-
default: g(() => [
|
|
2212
|
-
o.value.reservationStatus === "needs_approval" ? (R(), U(fe, { key: 0 }, [
|
|
2213
|
-
c(ue, {
|
|
2214
|
-
variant: "destructive",
|
|
2215
|
-
onClick: V
|
|
2216
|
-
}, {
|
|
2217
|
-
default: g(() => [
|
|
2218
|
-
c(S(at), { size: 16 }),
|
|
2219
|
-
f[14] || (f[14] = A(" Reject Reservation ", -1))
|
|
2220
|
-
]),
|
|
2221
|
-
_: 1
|
|
2222
|
-
}),
|
|
2223
|
-
c(ue, { onClick: H }, {
|
|
2224
|
-
default: g(() => [
|
|
2225
|
-
c(S(it), { size: 16 }),
|
|
2226
|
-
f[15] || (f[15] = A(" Approve Reservation ", -1))
|
|
2227
|
-
]),
|
|
2228
|
-
_: 1
|
|
2229
|
-
})
|
|
2230
|
-
], 64)) : o.value.reservationStatus === "approved" ? (R(), J(We, { key: 1 }, {
|
|
2231
|
-
default: g(() => [
|
|
2232
|
-
c(Ue, { "as-child": "" }, {
|
|
2233
|
-
default: g(() => [
|
|
2234
|
-
c(ue, {
|
|
2235
|
-
variant: "outline",
|
|
2236
|
-
class: "gap-2"
|
|
2237
|
-
}, {
|
|
2238
|
-
default: g(() => [
|
|
2239
|
-
c(S(rt), { size: 16 }),
|
|
2240
|
-
f[16] || (f[16] = A(" Actions ", -1))
|
|
2241
|
-
]),
|
|
2242
|
-
_: 1
|
|
2243
|
-
})
|
|
2244
|
-
]),
|
|
2245
|
-
_: 1
|
|
2246
|
-
}),
|
|
2247
|
-
c(He, {
|
|
2248
|
-
class: "w-60",
|
|
2249
|
-
align: "start"
|
|
2250
|
-
}, {
|
|
2251
|
-
default: g(() => [
|
|
2252
|
-
c(ce, { class: "text-xs text-muted-foreground font-normal" }, {
|
|
2253
|
-
default: g(() => [...f[17] || (f[17] = [
|
|
2254
|
-
A(" Reservation Actions ", -1)
|
|
2255
|
-
])]),
|
|
2256
|
-
_: 1
|
|
2257
|
-
}),
|
|
2258
|
-
c(de, null, {
|
|
2259
|
-
default: g(() => [
|
|
2260
|
-
c(ne, {
|
|
2261
|
-
onClick: N,
|
|
2262
|
-
class: "gap-2 cursor-pointer"
|
|
2263
|
-
}, {
|
|
2264
|
-
default: g(() => [
|
|
2265
|
-
c(S(lt), {
|
|
2266
|
-
size: 16,
|
|
2267
|
-
class: "text-muted-foreground"
|
|
2268
|
-
}),
|
|
2269
|
-
f[18] || (f[18] = m("span", null, "Download PDF", -1))
|
|
2270
|
-
]),
|
|
2271
|
-
_: 1
|
|
2272
|
-
})
|
|
2273
|
-
]),
|
|
2274
|
-
_: 1
|
|
2275
|
-
}),
|
|
2276
|
-
c(Ce),
|
|
2277
|
-
c(de, null, {
|
|
2278
|
-
default: g(() => [
|
|
2279
|
-
c(ce, { class: "text-xs text-muted-foreground font-normal" }, {
|
|
2280
|
-
default: g(() => [...f[19] || (f[19] = [
|
|
2281
|
-
A(" Communication ", -1)
|
|
2282
|
-
])]),
|
|
2283
|
-
_: 1
|
|
2284
|
-
}),
|
|
2285
|
-
c(ne, {
|
|
2286
|
-
onClick: E,
|
|
2287
|
-
class: "gap-2 cursor-pointer"
|
|
2288
|
-
}, {
|
|
2289
|
-
default: g(() => [
|
|
2290
|
-
c(S(ut), {
|
|
2291
|
-
size: 16,
|
|
2292
|
-
class: "text-muted-foreground"
|
|
2293
|
-
}),
|
|
2294
|
-
f[20] || (f[20] = m("span", null, "(Re)send Confirmation Mail", -1))
|
|
2295
|
-
]),
|
|
2296
|
-
_: 1
|
|
2297
|
-
})
|
|
2298
|
-
]),
|
|
2299
|
-
_: 1
|
|
2300
|
-
}),
|
|
2301
|
-
S(n)("manage-reservations") ? (R(), U(fe, { key: 0 }, [
|
|
2302
|
-
c(Ce),
|
|
2303
|
-
c(de, null, {
|
|
2304
|
-
default: g(() => [
|
|
2305
|
-
c(ce, { class: "text-xs text-muted-foreground font-normal" }, {
|
|
2306
|
-
default: g(() => [...f[21] || (f[21] = [
|
|
2307
|
-
A(" Cancellation ", -1)
|
|
2308
|
-
])]),
|
|
2309
|
-
_: 1
|
|
2310
|
-
}),
|
|
2311
|
-
c(ne, {
|
|
2312
|
-
onClick: j,
|
|
2313
|
-
class: "gap-2 cursor-pointer",
|
|
2314
|
-
variant: "destructive",
|
|
2315
|
-
disabled: I.value
|
|
2316
|
-
}, {
|
|
2317
|
-
default: g(() => [
|
|
2318
|
-
c(S(ct), { size: 16 }),
|
|
2319
|
-
f[22] || (f[22] = m("span", null, "Cancel Reservation", -1))
|
|
2320
|
-
]),
|
|
2321
|
-
_: 1
|
|
2322
|
-
}, 8, ["disabled"]),
|
|
2323
|
-
o.value?.reservationPrice && o.value.reservationPrice > 0 ? (R(), J(ne, {
|
|
2324
|
-
key: 0,
|
|
2325
|
-
onClick: W,
|
|
2326
|
-
class: "gap-2 cursor-pointer text-orange-600 dark:text-orange-400 focus:text-orange-600 dark:focus:text-orange-400",
|
|
2327
|
-
disabled: I.value
|
|
2328
|
-
}, {
|
|
2329
|
-
default: g(() => [
|
|
2330
|
-
c(S(dt), {
|
|
2331
|
-
class: "text-inherit",
|
|
2332
|
-
size: 16
|
|
2333
|
-
}),
|
|
2334
|
-
f[23] || (f[23] = m("span", null, "Cancel & Send Coupon", -1))
|
|
2335
|
-
]),
|
|
2336
|
-
_: 1
|
|
2337
|
-
}, 8, ["disabled"])) : L("", !0)
|
|
2338
|
-
]),
|
|
2339
|
-
_: 1
|
|
2340
|
-
})
|
|
2341
|
-
], 64)) : L("", !0)
|
|
2342
|
-
]),
|
|
2343
|
-
_: 1
|
|
2344
|
-
})
|
|
2345
|
-
]),
|
|
2346
|
-
_: 1
|
|
2347
|
-
})) : L("", !0)
|
|
2348
|
-
]),
|
|
2349
|
-
_: 1
|
|
2350
|
-
})
|
|
2351
|
-
]),
|
|
2352
|
-
_: 1
|
|
2353
|
-
})
|
|
2354
|
-
]),
|
|
2355
|
-
_: 1
|
|
2356
|
-
}, 8, ["open"]),
|
|
2357
|
-
c(is, {
|
|
2358
|
-
ref_key: "cancelReservationDialog",
|
|
2359
|
-
ref: v,
|
|
2360
|
-
onConfirm: y
|
|
2361
|
-
}, null, 512),
|
|
2362
|
-
c(ps, {
|
|
2363
|
-
ref_key: "approveReservationDialog",
|
|
2364
|
-
ref: b,
|
|
2365
|
-
onConfirm: T
|
|
2366
|
-
}, null, 512),
|
|
2367
|
-
c(hs, {
|
|
2368
|
-
ref_key: "rejectReservationDialog",
|
|
2369
|
-
ref: h,
|
|
2370
|
-
onConfirm: ee
|
|
2371
|
-
}, null, 512),
|
|
2372
|
-
c(rs, {
|
|
2373
|
-
ref_key: "transferReservationDialog",
|
|
2374
|
-
ref: d
|
|
2375
|
-
}, null, 512)
|
|
2376
|
-
], 64);
|
|
2377
|
-
};
|
|
2378
|
-
}
|
|
2379
|
-
});
|
|
2380
|
-
export {
|
|
2381
|
-
q as F,
|
|
2382
|
-
cn as _
|
|
2383
|
-
};
|