@wwtdev/bsds-components-vue3 1.16.5 → 2.0.0

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.
@@ -0,0 +1,3162 @@
1
+ import { computed as b, ref as w, onMounted as O, onUnmounted as ne, defineAsyncComponent as Oe, watch as E, openBlock as s, createElementBlock as v, unref as f, createElementVNode as m, renderSlot as k, createBlock as L, resolveDynamicComponent as U, createCommentVNode as $, toDisplayString as I, createVNode as P, normalizeClass as X, useAttrs as N, mergeProps as V, withCtx as A, Fragment as R, renderList as Y, createTextVNode as W, withDirectives as Ne, Transition as me, vShow as We, inject as te, provide as ae, onDeactivated as Ge, normalizeStyle as je, isRef as Fe, nextTick as Ue, useSlots as He } from "vue";
2
+ import { v4 as Ke } from "uuid";
3
+ import { BsIconCaretDown as Ye, BsIconWarning as ve, BsIconClose as oe, BsIconSearch as Xe, BsIconCaretLeftDouble as Ze, BsIconCaretLeft as Je, BsIconCaretRight as Qe, BsIconCaretRightDouble as _e, BsIconActionEllipsis as et, BsIconCircleExclamation as tt, BsIconThumbsUpStroke as at } from "@wwtdev/bsds-icons-vue3";
4
+ import { Chart as fe, BarController as nt, BarElement as lt, CategoryScale as ot, LinearScale as it, Legend as rt, Tooltip as st } from "chart.js";
5
+ const ye = {
6
+ href: "a",
7
+ onclick: "button",
8
+ onClick: "button",
9
+ type: "button"
10
+ };
11
+ function ge(e, a, t = "button") {
12
+ const l = dt(e, a, t), n = b(() => {
13
+ const o = l.value === "button", r = {};
14
+ return o ? (r.type = a.type || "button", r.autocomplete = "off", e.disabled && (r.disabled = !0)) : e.disabled && (r["aria-disabled"] = "true", r.tabindex = "-1"), r;
15
+ });
16
+ return { rootTag: l, attrsToBind: n };
17
+ }
18
+ function dt(e, a, t) {
19
+ const l = Object.keys(ye).find((n) => ut(e, a, n));
20
+ return w(ye[l] || t);
21
+ }
22
+ function ut(e, a, t) {
23
+ return e[t] || a[t];
24
+ }
25
+ const ct = (e, a) => {
26
+ const t = (l) => {
27
+ e.some((n) => {
28
+ var o;
29
+ return (o = n.value) == null ? void 0 : o.contains(l.target);
30
+ }) || a(l);
31
+ };
32
+ O(() => {
33
+ document.addEventListener("click", t);
34
+ }), ne(() => {
35
+ document.removeEventListener("click", t);
36
+ });
37
+ };
38
+ function ie(e) {
39
+ const a = b(() => {
40
+ var n, o;
41
+ return ((o = (n = e.href) == null ? void 0 : n.startsWith) == null ? void 0 : o.call(n, "/")) || !1;
42
+ }), t = b(() => {
43
+ var n, o;
44
+ return a.value && ((n = e.router) == null ? void 0 : n.navigateTo) || ((o = e.router) == null ? void 0 : o.push) || null;
45
+ });
46
+ function l(n) {
47
+ var o, r, i, d, u;
48
+ if (e.disabled) {
49
+ n.preventDefault(), n.stopImmediatePropagation();
50
+ return;
51
+ }
52
+ !e.href || !t.value || ((r = (o = n.target.href) == null ? void 0 : o.endsWith) != null && r.call(o, e.href) || (u = (d = (i = n.target.closest("a")) == null ? void 0 : i.href) == null ? void 0 : d.endsWith) != null && u.call(d, e.href)) && (n.preventDefault(), t.value(e.href));
53
+ }
54
+ return { onLinkClick: l };
55
+ }
56
+ function Be(e) {
57
+ return e.split("-").map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("");
58
+ }
59
+ const le = (e) => ({ icon: b(
60
+ () => Oe(() => import("@wwtdev/bsds-icons-vue3").then((t) => e.startsWith("bs-") ? t[Be(e)] : t[`BsIcon${Be(e)}`]))
61
+ ) });
62
+ function H(e = 1) {
63
+ const a = [];
64
+ for (let t = 0; t < e; t++)
65
+ a.push(w(""));
66
+ return O(() => {
67
+ a.forEach((t) => t.value = Ke());
68
+ }), a;
69
+ }
70
+ const re = (e, a, t = void 0) => {
71
+ const l = (n) => {
72
+ e.includes(n.key) && a(n);
73
+ };
74
+ O(() => {
75
+ ((t == null ? void 0 : t.value) ?? document).addEventListener("keydown", l);
76
+ }), ne(() => {
77
+ ((t == null ? void 0 : t.value) ?? document).removeEventListener("keydown", l);
78
+ });
79
+ }, ft = (e, a, t) => {
80
+ let l = null;
81
+ O(() => {
82
+ l = new MutationObserver(a), l.observe(e.value, t);
83
+ }), ne(() => {
84
+ l.disconnect();
85
+ });
86
+ };
87
+ function Z(e, a) {
88
+ var o;
89
+ const t = new Set(((o = e.passAttrs) == null ? void 0 : o.split(",")) || "");
90
+ t.delete("");
91
+ const l = w({}), n = w({});
92
+ for (let r in a)
93
+ t.has(r) ? n.value[r] = a[r] : l.value[r] = a[r];
94
+ return {
95
+ toRoot: l,
96
+ toChild: n
97
+ };
98
+ }
99
+ const se = (e) => {
100
+ const a = w(!1);
101
+ return O(() => {
102
+ a.value = e.enterControlled || e.preloaded ? e.enterTrigger : e.shown;
103
+ }), E(() => e.shown, (t) => {
104
+ a.value = t;
105
+ }), E(() => e.enterTrigger, (t) => {
106
+ a.value = t;
107
+ }), E(() => e.leaveTrigger, (t) => {
108
+ t && (a.value = !1);
109
+ }), { transition: a };
110
+ }, vt = ["id", "data-stacked"], gt = ["data-open"], ht = ["aria-controls", "aria-expanded"], pt = {
111
+ key: 0,
112
+ "data-position": "start",
113
+ style: { display: "inline-flex" }
114
+ }, bt = ["id", "aria-level"], mt = ["aria-labelledby", "data-open", "id"], Cn = {
115
+ __name: "BsAccordion",
116
+ props: {
117
+ controlled: { type: Boolean, default: !1 },
118
+ icon: { type: String },
119
+ headerText: { type: String, required: !0 },
120
+ headingLevel: {
121
+ type: Number,
122
+ validator: (e) => [2, 3, 4, 5].includes(e)
123
+ },
124
+ openItem: { type: Boolean, default: !1 },
125
+ openItemId: { type: String },
126
+ stacked: { type: Boolean, default: !1 }
127
+ },
128
+ emits: ["toggled"],
129
+ setup(e, { emit: a }) {
130
+ const t = e, l = a, n = w(null), o = w(!1), { icon: r } = le(t.icon), [i] = H(), d = b(() => i.value + "-content"), u = b(() => i.value + "-title"), c = b(() => t.openItemId === i.value || t.openItem === !0), g = b(() => t.controlled ? c.value : o.value);
131
+ function p() {
132
+ l("toggled", i.value), t.controlled || (o.value = !o.value);
133
+ }
134
+ return (y, D) => (s(), v("div", {
135
+ id: f(i),
136
+ ref_key: "containerRef",
137
+ ref: n,
138
+ class: "bs-accordion",
139
+ "data-component": "bs-accordion",
140
+ "data-stacked": e.stacked
141
+ }, [
142
+ m("header", {
143
+ part: "header",
144
+ "data-open": g.value
145
+ }, [
146
+ m("button", {
147
+ "aria-controls": d.value,
148
+ "aria-expanded": g.value,
149
+ type: "button",
150
+ onClick: p
151
+ }, [
152
+ e.icon || y.$slots.icon ? (s(), v("span", pt, [
153
+ k(y.$slots, "icon", {}, () => [
154
+ e.icon ? (s(), L(U(f(r) ? f(r) : "span"), { key: 0 })) : $("", !0)
155
+ ])
156
+ ])) : $("", !0),
157
+ m("span", {
158
+ id: u.value,
159
+ "aria-level": e.headingLevel,
160
+ role: "heading"
161
+ }, I(e.headerText), 9, bt),
162
+ P(f(Ye), {
163
+ size: "md",
164
+ "data-position": "end"
165
+ })
166
+ ], 8, ht)
167
+ ], 8, gt),
168
+ m("div", {
169
+ "aria-labelledby": u.value,
170
+ class: "bs-accordion-content",
171
+ "data-open": g.value,
172
+ id: d.value,
173
+ part: "content",
174
+ role: "region"
175
+ }, [
176
+ m("div", null, [
177
+ k(y.$slots, "default")
178
+ ])
179
+ ], 8, mt)
180
+ ], 8, vt));
181
+ }
182
+ }, yt = ["data-badge-color", "data-count", "data-position", "data-show-zero", "aria-label"], An = {
183
+ __name: "BsBadge",
184
+ props: {
185
+ /** Pass value to set `data-badge-color`. */
186
+ color: {
187
+ type: String,
188
+ validator: (e) => ["red", "blue", "white"].includes(e)
189
+ },
190
+ /** Pass value to show "count" indicator. Do not use if you are passing "dot." */
191
+ count: {
192
+ type: Number
193
+ },
194
+ /** Sets the count limit after which the displayed count will stop incrementing and a "+" will be appended. Defaults to 99. */
195
+ countMax: {
196
+ type: Number,
197
+ default: 99
198
+ },
199
+ /** Pass "true" to show a simple dot indicator. Do not use if you are passing a "count." */
200
+ dot: {
201
+ type: Boolean,
202
+ default: !1
203
+ },
204
+ /** Pass the singular name of the items that are being counted. e.g.
205
+ * if we are counting unread notifications, pass "unread notification";
206
+ * or if we are counting new messages, pass "new message".
207
+ * This is required to ensure accessibility! */
208
+ label: {
209
+ type: String,
210
+ default: "item"
211
+ },
212
+ /** Sets the position of the badge in relation to the slotted content. By default, badge is positioned to the right. */
213
+ position: {
214
+ type: String,
215
+ validator: (e) => ["left", "right"].includes(e),
216
+ default: "right"
217
+ },
218
+ /** Pass "true" to show the badge even when the "count" value is zero. */
219
+ showZero: {
220
+ type: Boolean,
221
+ default: !1
222
+ }
223
+ },
224
+ setup(e) {
225
+ const a = e, t = w(null), l = b(() => a.count === 0 ? "0" : !a.count || a.dot ? null : a.count > a.countMax ? a.countMax + "+" : a.count.toString()), n = b(() => {
226
+ var d, u;
227
+ const o = ((u = (d = t.value) == null ? void 0 : d.textContent) == null ? void 0 : u.trim()) || "", r = l.value ? l.value + " " : "";
228
+ if (!r && !a.dot)
229
+ return o;
230
+ const i = a.count !== 1 ? "s" : "";
231
+ return `${o}, ${r}${a.label}${i}`;
232
+ });
233
+ return (o, r) => (s(), v("span", {
234
+ ref_key: "hostRef",
235
+ ref: t,
236
+ class: X({ "bs-badge": e.dot || l.value }),
237
+ "data-badge-color": e.color,
238
+ "data-component": "bs-badge",
239
+ "data-count": l.value,
240
+ "data-position": e.position,
241
+ "data-show-zero": e.showZero,
242
+ "aria-label": n.value
243
+ }, [
244
+ k(o.$slots, "default")
245
+ ], 10, yt));
246
+ }
247
+ }, Bt = {
248
+ key: 0,
249
+ role: "alert",
250
+ class: "bs-banner"
251
+ }, $t = { class: "bs-banner-content" }, St = { class: "bs-banner-warning-icon" }, Ln = {
252
+ __name: "BsBanner",
253
+ emits: ["dismiss"],
254
+ setup(e, { emit: a }) {
255
+ const t = a, l = w(!1);
256
+ function n() {
257
+ l.value = !0, t("dismiss");
258
+ }
259
+ return (o, r) => l.value ? $("", !0) : (s(), v("div", Bt, [
260
+ m("div", $t, [
261
+ m("div", St, [
262
+ P(f(ve), { size: "lg" })
263
+ ]),
264
+ m("p", null, [
265
+ k(o.$slots, "default")
266
+ ]),
267
+ m("button", {
268
+ type: "button",
269
+ title: "Close Banner",
270
+ onClick: n
271
+ }, [
272
+ P(f(oe))
273
+ ])
274
+ ])
275
+ ]));
276
+ }
277
+ }, wt = {
278
+ __name: "BsButton",
279
+ props: {
280
+ variant: { type: String },
281
+ disabled: { type: Boolean, default: !1 },
282
+ ghostBtn: { type: Boolean, default: !1 },
283
+ href: { type: String },
284
+ router: {},
285
+ textBtn: { type: Boolean, default: !1 },
286
+ size: { type: String, validator: (e) => !e || e === "sm" }
287
+ },
288
+ setup(e) {
289
+ const a = e, t = N(), { rootTag: l, attrsToBind: n } = ge(a, t), { onLinkClick: o } = ie(a);
290
+ return (r, i) => (s(), L(U(f(l)), V({
291
+ class: "bs-button",
292
+ "data-component": "bs-button",
293
+ "data-ghost": e.ghostBtn,
294
+ "data-size": e.size,
295
+ "data-text": e.textBtn,
296
+ "data-variant": e.variant,
297
+ href: e.href
298
+ }, f(n), { onClick: f(o) }), {
299
+ default: A(() => [
300
+ k(r.$slots, "default")
301
+ ]),
302
+ _: 3
303
+ }, 16, ["data-ghost", "data-size", "data-text", "data-variant", "href", "onClick"]));
304
+ }
305
+ }, kt = { "data-component": "bs-chart-table" }, It = ["summary"], Tt = ["colspan"], xt = /* @__PURE__ */ m("th", { scope: "col" }, " Dataset ", -1), Ct = { scope: "row" }, At = {
306
+ __name: "BsChartTable",
307
+ props: {
308
+ data: {
309
+ type: Array,
310
+ required: !0
311
+ },
312
+ dataIdxLabels: {
313
+ type: Array,
314
+ required: !0
315
+ },
316
+ tableTitle: {
317
+ type: String,
318
+ default: ""
319
+ }
320
+ },
321
+ setup(e) {
322
+ return (a, t) => {
323
+ var l;
324
+ return s(), v("div", kt, [
325
+ m("table", { summary: e.tableTitle }, [
326
+ m("thead", null, [
327
+ m("tr", null, [
328
+ m("th", {
329
+ colspan: ((l = e.dataIdxLabels) == null ? void 0 : l.length) + 1
330
+ }, I(e.tableTitle), 9, Tt)
331
+ ]),
332
+ m("tr", null, [
333
+ xt,
334
+ (s(!0), v(R, null, Y(e.dataIdxLabels, (n) => (s(), v("th", {
335
+ key: n,
336
+ scope: "col"
337
+ }, I(n), 1))), 128))
338
+ ])
339
+ ]),
340
+ m("tbody", null, [
341
+ (s(!0), v(R, null, Y(e.data, (n) => (s(), v("tr", {
342
+ key: n.label
343
+ }, [
344
+ m("th", Ct, I(n.label), 1),
345
+ (s(!0), v(R, null, Y(n.data, (o, r) => (s(), v("td", {
346
+ key: `${o}${r}`
347
+ }, I(o), 1))), 128))
348
+ ]))), 128))
349
+ ])
350
+ ], 8, It)
351
+ ]);
352
+ };
353
+ }
354
+ }, Lt = (e) => ({
355
+ id: "htmlLegend",
356
+ afterUpdate(a) {
357
+ e.innerHTML = "", e.style.setProperty("--legend-padding", `${a.scales.x.left}px`), a.options.plugins.legend.labels.generateLabels(a).forEach((l) => {
358
+ const n = document.createElement("li");
359
+ n.onclick = () => {
360
+ const { type: d } = a.config._config;
361
+ d === "pie" || d === "doughnut" ? a.toggleDataVisibility(l.index) : a.setDatasetVisibility(l.datasetIndex, !a.isDatasetVisible(l.datasetIndex)), a.update();
362
+ };
363
+ const o = document.createElement("span");
364
+ o.style.setProperty("--item-box-fill", l.fillStyle), o.style.setProperty("--item-box-stroke", l.strokeStyle);
365
+ const r = document.createTextNode(l.text), i = document.createElement("p");
366
+ i.style.setProperty("--item-text-color", l.fontColor), i.style.setProperty("--item-text-decoration", l.hidden ? "line-through" : "none"), i.appendChild(r), n.appendChild(o), n.appendChild(i), e.appendChild(n);
367
+ });
368
+ }
369
+ }), Pt = ({ type: e, datasets: a, labels: t, tooltips: l }) => ({
370
+ type: e,
371
+ data: {
372
+ datasets: a,
373
+ labels: t
374
+ },
375
+ options: {
376
+ maintainAspectRatio: !1,
377
+ plugins: {
378
+ legend: {
379
+ display: !1
380
+ },
381
+ tooltip: {
382
+ enabled: l
383
+ }
384
+ },
385
+ responsive: !0
386
+ }
387
+ });
388
+ function Dt(e) {
389
+ const a = [
390
+ "rgba(209, 26, 111, 1)",
391
+ "rgba(130, 18, 196, 1)",
392
+ "rgba(153, 207, 247, 1)",
393
+ "rgba(0, 134, 234, 1)",
394
+ "rgba(238, 40, 42, 1)",
395
+ "rgba(22, 47, 180, 1)",
396
+ "rgba(78, 79, 95, 1)",
397
+ "rgba(253, 165, 141, 1)"
398
+ ], t = a[e % a.length];
399
+ return e >= a.length ? t.replace("1)", "0.5)") : t;
400
+ }
401
+ function $e(e, a, t) {
402
+ let l;
403
+ return function() {
404
+ let n = this, o = arguments;
405
+ clearTimeout(l), t && !l && e.apply(n, o), l = setTimeout(function() {
406
+ l = null, t || e.apply(n, o);
407
+ }, a);
408
+ };
409
+ }
410
+ const Et = {
411
+ class: "bs-chart-bar",
412
+ "data-component": "bs-chart-bar"
413
+ }, Vt = ["aria-label"], qt = ["data-hidden"], Pn = {
414
+ __name: "BsChartBar",
415
+ props: {
416
+ chartTitle: {
417
+ type: String,
418
+ default: ""
419
+ },
420
+ /** Array of datasets. */
421
+ data: {
422
+ type: Array,
423
+ required: !0
424
+ },
425
+ /** Array of labels for each point along the X-Axis. */
426
+ dataIdxLabels: {
427
+ type: Array,
428
+ required: !0
429
+ },
430
+ /** Pass `true` to show legend. */
431
+ showLegend: {
432
+ type: Boolean,
433
+ default: !0
434
+ },
435
+ /** Pass `true` to show tooltips on hover. */
436
+ showTooltips: {
437
+ type: Boolean,
438
+ default: !0
439
+ },
440
+ /** Pass `true` to show vertical gridlines. */
441
+ showXGrid: {
442
+ type: Boolean,
443
+ default: !1
444
+ },
445
+ /** Pass `true` to show horizontal gridlines. */
446
+ showYGrid: {
447
+ type: Boolean,
448
+ default: !1
449
+ },
450
+ /** Pass `true` to stack each dataset's data at a given index into a single column. */
451
+ stacked: {
452
+ type: Boolean,
453
+ default: !1
454
+ },
455
+ /** Label for the X-Axis. */
456
+ xLabel: {
457
+ type: String,
458
+ default: ""
459
+ },
460
+ /** Label for the Y-Axis. */
461
+ yLabel: {
462
+ type: String,
463
+ default: ""
464
+ }
465
+ },
466
+ setup(e) {
467
+ const a = e, t = w(null), l = w(null);
468
+ let n;
469
+ const o = b(() => {
470
+ const c = {
471
+ datasets: r.value,
472
+ labels: a.dataIdxLabels,
473
+ type: "bar",
474
+ tooltips: a.showTooltips
475
+ }, g = Pt(c);
476
+ return g.plugins = [Lt(l.value)], g.options.scales = {
477
+ x: {
478
+ grid: {
479
+ display: a.showXGrid
480
+ },
481
+ stacked: a.stacked,
482
+ title: {
483
+ display: !!a.xLabel,
484
+ text: a.xLabel
485
+ }
486
+ },
487
+ y: {
488
+ grid: {
489
+ display: a.showYGrid
490
+ },
491
+ stacked: a.stacked,
492
+ title: {
493
+ display: !!a.yLabel,
494
+ text: a.yLabel
495
+ }
496
+ }
497
+ }, g;
498
+ }), r = b(() => a.data.map((c, g) => ({
499
+ ...c,
500
+ backgroundColor: Dt(g),
501
+ categoryPercentage: a.data.length > 1 ? 0.5 : 0.33
502
+ }))), i = b(() => a.chartTitle || `${a.yLabel} / ${a.xLabel}`), d = $e(function(c, g) {
503
+ !n || c === g || (n.options = o.value.options, n.update());
504
+ }, 100), u = $e(function() {
505
+ n && (n.data = o.value.data, n.update());
506
+ }, 100);
507
+ return O(() => {
508
+ fe.register(nt, lt, ot, it, rt, st), fe.defaults.font.family = "'Roobert', sans-serif", n = new fe(t.value, o.value);
509
+ }), E(() => a.showLegend, d), E(() => a.showTooltips, d), E(() => a.showXGrid, d), E(() => a.showYGrid, d), E(() => a.stacked, d), E(() => a.xLabel, d), E(() => a.yLabel, d), E(() => a.data, u), E(() => a.dataIdxLabels, u), (c, g) => (s(), v("div", Et, [
510
+ m("figure", null, [
511
+ m("div", null, [
512
+ m("canvas", {
513
+ "aria-label": i.value,
514
+ ref_key: "canvas",
515
+ ref: t,
516
+ role: "img"
517
+ }, null, 8, Vt)
518
+ ]),
519
+ m("div", null, [
520
+ P(At, {
521
+ data: e.data,
522
+ "data-idx-labels": e.dataIdxLabels,
523
+ "table-title": i.value
524
+ }, null, 8, ["data", "data-idx-labels", "table-title"]),
525
+ m("figcaption", {
526
+ "data-hidden": !e.showLegend
527
+ }, [
528
+ m("ul", {
529
+ ref_key: "legendList",
530
+ ref: l
531
+ }, null, 512)
532
+ ], 8, qt)
533
+ ])
534
+ ])
535
+ ]));
536
+ }
537
+ }, zt = ["data-size"], Mt = ["checked", "disabled", "id", "required", "data-error"], Dn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
538
+ __name: "BsCheckbox",
539
+ props: {
540
+ /** Sets the label. */
541
+ /** @ex Task Completed */
542
+ label: {
543
+ type: String
544
+ },
545
+ /** Sets the checked state. */
546
+ checked: {
547
+ type: Boolean,
548
+ default: !1
549
+ },
550
+ /** Sets the indeterminate state; i.e. partially checked. */
551
+ checkedPartially: {
552
+ type: Boolean,
553
+ default: !1
554
+ },
555
+ /** Sets the disabled state on the input. */
556
+ disabled: {
557
+ type: Boolean,
558
+ default: !1
559
+ },
560
+ /** Applies error styles to the input. */
561
+ error: {
562
+ type: Boolean,
563
+ default: !1
564
+ },
565
+ /** Pass id for the input element. Will also be applied to label attribute. */
566
+ inputId: {
567
+ type: String,
568
+ default: ""
569
+ },
570
+ /** List additional attributes by name (comma-separated) to pass through to `<input>`. */
571
+ passAttrs: {
572
+ type: String,
573
+ default: ""
574
+ },
575
+ /** Sets the required state on the input. */
576
+ required: {
577
+ type: Boolean,
578
+ default: !1
579
+ },
580
+ /** Sets the size of the input. */
581
+ size: {
582
+ type: String,
583
+ validator: (e) => e === "sm"
584
+ },
585
+ /** Sets the `checked` state - `v-model` directive will use this; do not set explicitly. */
586
+ modelValue: {
587
+ type: Boolean
588
+ }
589
+ },
590
+ emits: ["update:modelValue"],
591
+ setup(e, { emit: a }) {
592
+ const t = e, l = N(), [n] = H(), { toChild: o, toRoot: r } = Z(t, l), i = w(null), d = b(() => t.inputId || n.value), u = b(() => t.checked || t.modelValue);
593
+ function c() {
594
+ i.value && (i.value.indeterminate = t.checkedPartially && !u.value);
595
+ }
596
+ return E(u, c), E(() => t.checkedPartially, c), (g, p) => (s(), v("div", V({
597
+ class: "bs-boolean",
598
+ "data-component": "bs-checkbox",
599
+ "data-size": e.size
600
+ }, f(r)), [
601
+ m("input", V({
602
+ ref_key: "inputEl",
603
+ ref: i,
604
+ checked: u.value,
605
+ disabled: e.disabled,
606
+ id: d.value,
607
+ required: e.required,
608
+ type: "checkbox",
609
+ "data-error": e.error,
610
+ onChange: p[0] || (p[0] = (y) => g.$emit("update:modelValue", y.target.checked))
611
+ }, f(o)), null, 16, Mt),
612
+ e.label || g.$slots.label ? (s(), L(f(_), {
613
+ key: 0,
614
+ for: d.value,
615
+ disabled: e.disabled,
616
+ required: e.required
617
+ }, {
618
+ default: A(() => [
619
+ k(g.$slots, "label", {}, () => [
620
+ W(I(e.label), 1)
621
+ ])
622
+ ]),
623
+ _: 3
624
+ }, 8, ["for", "disabled", "required"])) : $("", !0)
625
+ ], 16, zt));
626
+ }
627
+ }), Rt = { key: 0 }, Ot = { class: "bs-circle-button-icon" }, Nt = { key: 1 }, En = {
628
+ __name: "BsCircleButton",
629
+ props: {
630
+ disabled: {
631
+ type: Boolean,
632
+ default: !1
633
+ },
634
+ ghostBtn: {
635
+ type: Boolean,
636
+ default: !1
637
+ },
638
+ hoverEffect: {
639
+ type: Boolean,
640
+ default: !1
641
+ },
642
+ href: {
643
+ type: String
644
+ },
645
+ icon: {
646
+ type: String,
647
+ default: "caret-right"
648
+ },
649
+ iconPosition: {
650
+ type: String,
651
+ validator: (e) => ["left", "right"].includes(e),
652
+ default: "right"
653
+ },
654
+ label: {
655
+ type: String,
656
+ required: !0
657
+ },
658
+ router: {},
659
+ textBtn: {
660
+ type: Boolean,
661
+ default: !1
662
+ },
663
+ size: {
664
+ type: String,
665
+ validator: (e) => ["sm", "lg"].includes(e),
666
+ default: "lg"
667
+ }
668
+ },
669
+ setup(e) {
670
+ const a = e, t = N(), { rootTag: l, attrsToBind: n } = ge(a, t), { icon: o } = le(a.icon), { onLinkClick: r } = ie(a), i = b(() => a.textBtn ? {} : a.href ? { title: a.label } : { "aria-label": a.label }), d = b(() => {
671
+ if (a.hoverEffect)
672
+ return a.iconPosition;
673
+ }), u = b(() => a.textBtn && a.iconPosition !== "left"), c = b(() => a.textBtn && a.iconPosition === "left");
674
+ return (g, p) => (s(), L(U(f(l)), V({
675
+ class: "bs-circle-button",
676
+ "data-disabled": e.disabled,
677
+ "data-direction": d.value,
678
+ "data-ghost": e.ghostBtn,
679
+ "data-size": e.size,
680
+ "data-text": e.textBtn,
681
+ href: e.href
682
+ }, { ...f(n), ...i.value }, { onClick: f(r) }), {
683
+ default: A(() => [
684
+ u.value ? (s(), v("span", Rt, I(e.label), 1)) : $("", !0),
685
+ m("span", Ot, [
686
+ k(g.$slots, "icon", {}, () => [
687
+ (s(), L(U(f(o)), { size: e.size }, null, 8, ["size"]))
688
+ ])
689
+ ]),
690
+ c.value ? (s(), v("span", Nt, I(e.label), 1)) : $("", !0)
691
+ ]),
692
+ _: 3
693
+ }, 16, ["data-disabled", "data-direction", "data-ghost", "data-size", "data-text", "href", "onClick"]));
694
+ }
695
+ }, de = {
696
+ __name: "BsTransition",
697
+ props: {
698
+ shown: {
699
+ type: Boolean,
700
+ default: !0
701
+ },
702
+ preloaded: {
703
+ type: Boolean,
704
+ default: !1
705
+ },
706
+ duration: {
707
+ type: Number,
708
+ required: !0
709
+ },
710
+ enterClass: {
711
+ type: String,
712
+ default: void 0
713
+ },
714
+ enterAttribute: {
715
+ type: String,
716
+ default: void 0
717
+ },
718
+ leaveClass: {
719
+ type: String,
720
+ default: void 0
721
+ },
722
+ leaveAttribute: {
723
+ type: String,
724
+ default: void 0
725
+ }
726
+ },
727
+ emits: [
728
+ "before-enter",
729
+ "enter",
730
+ "after-enter",
731
+ "enter-cancelled",
732
+ "before-leave",
733
+ "leave",
734
+ "after-leave",
735
+ "leave-cancelled"
736
+ ],
737
+ setup(e, { emit: a }) {
738
+ const t = e, l = a, n = [];
739
+ function o(d, u) {
740
+ const { duration: c, enterClass: g, enterAttribute: p } = t;
741
+ n.push(setTimeout(() => {
742
+ g && d.classList.add(g), p && d.setAttribute(p, ""), n.push(setTimeout(() => {
743
+ u();
744
+ }, c)), l("enter", d);
745
+ }));
746
+ }
747
+ function r(d, u) {
748
+ const {
749
+ duration: c,
750
+ enterClass: g,
751
+ enterAttribute: p,
752
+ leaveClass: y,
753
+ leaveAttribute: D
754
+ } = t;
755
+ d.classList.remove(g), d.removeAttribute(p), y && d.classList.add(y), D && d.setAttribute(D, ""), n.push(setTimeout(() => {
756
+ u();
757
+ }, c)), l("leave", d);
758
+ }
759
+ function i(d) {
760
+ const { leaveClass: u, leaveAttribute: c } = t;
761
+ d.classList.remove(u), d.removeAttribute(c), l("after-leave", d);
762
+ }
763
+ return ne(() => {
764
+ n.forEach((d) => {
765
+ clearTimeout(d);
766
+ });
767
+ }), (d, u) => e.preloaded ? Ne((s(), L(me, {
768
+ key: 0,
769
+ css: !1,
770
+ onBeforeEnter: u[0] || (u[0] = (c) => l("before-enter", c)),
771
+ onEnter: o,
772
+ onAfterEnter: u[1] || (u[1] = (c) => l("after-enter", c)),
773
+ onEnterCancelled: u[2] || (u[2] = (c) => l("enter-cancelled", c)),
774
+ onBeforeLeave: u[3] || (u[3] = (c) => l("before-leave", c)),
775
+ onLeave: r,
776
+ onAfterLeave: i,
777
+ onLeaveCancelled: u[4] || (u[4] = (c) => l("leave-cancelled", c))
778
+ }, {
779
+ default: A(() => [
780
+ k(d.$slots, "default")
781
+ ]),
782
+ _: 3
783
+ }, 512)), [
784
+ [We, e.shown]
785
+ ]) : (s(), L(me, {
786
+ key: 1,
787
+ css: !1,
788
+ onBeforeEnter: u[5] || (u[5] = (c) => l("before-enter", c)),
789
+ onEnter: o,
790
+ onAfterEnter: u[6] || (u[6] = (c) => l("after-enter", c)),
791
+ onEnterCancelled: u[7] || (u[7] = (c) => l("enter-cancelled", c)),
792
+ onBeforeLeave: u[8] || (u[8] = (c) => l("before-leave", c)),
793
+ onLeave: r,
794
+ onAfterLeave: i,
795
+ onLeaveCancelled: u[9] || (u[9] = (c) => l("leave-cancelled", c))
796
+ }, {
797
+ default: A(() => [
798
+ e.shown ? k(d.$slots, "default", { key: 0 }) : $("", !0)
799
+ ]),
800
+ _: 3
801
+ }));
802
+ }
803
+ }, Wt = ["data-width"], Gt = { key: 0 }, jt = { key: 0 }, Se = {
804
+ __name: "BsDropdownInternal",
805
+ props: {
806
+ shown: {
807
+ type: Boolean,
808
+ default: !0
809
+ },
810
+ preloaded: {
811
+ type: Boolean,
812
+ default: !1
813
+ },
814
+ width: {
815
+ type: String,
816
+ default: void 0,
817
+ validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
818
+ },
819
+ position: {
820
+ type: String,
821
+ default: void 0,
822
+ validator: (e) => ["top", "bottom", "right"].includes(e)
823
+ },
824
+ anchorRef: {
825
+ required: !0
826
+ },
827
+ containerRef: {
828
+ required: !0
829
+ },
830
+ helperText: {
831
+ type: String,
832
+ default: void 0
833
+ },
834
+ helperDescription: {
835
+ type: String,
836
+ default: void 0
837
+ }
838
+ },
839
+ emits: [
840
+ "close",
841
+ "enter",
842
+ "after-enter",
843
+ "after-leave"
844
+ ],
845
+ setup(e, { emit: a }) {
846
+ const t = e, l = a, n = w(null);
847
+ let o = !1;
848
+ ct([n], () => {
849
+ o && l("close");
850
+ }), re(["Escape"], () => {
851
+ o && l("close");
852
+ });
853
+ function r() {
854
+ const p = t.containerRef.getBoundingClientRect(), y = t.anchorRef.getBoundingClientRect(), D = n.value.getBoundingClientRect();
855
+ if (t.position === "top") {
856
+ const T = p.bottom - y.bottom;
857
+ n.value.style.setProperty("--dropdown-wscreen-top", "auto"), n.value.style.setProperty("--dropdown-wscreen-bottom", `${T + y.height + 8}px`);
858
+ } else {
859
+ const T = y.top - p.top;
860
+ n.value.style.setProperty("--dropdown-wscreen-top", `${T + y.height + 8}px`), n.value.style.setProperty("--dropdown-wscreen-bottom", "auto");
861
+ }
862
+ const z = y.left - p.left;
863
+ if (t.position === "center") {
864
+ const T = (y.width - D.width) / 2;
865
+ n.value.style.setProperty("--dropdown-wscreen-left", `${z + T}px`);
866
+ } else if (t.position === "right") {
867
+ const T = p.right - y.right;
868
+ n.value.style.setProperty("--dropdown-wscreen-left", "auto"), n.value.style.setProperty("--dropdown-wscreen-right", `${T}px`);
869
+ } else
870
+ n.value.style.setProperty("--dropdown-wscreen-left", `${z}px`);
871
+ }
872
+ function i() {
873
+ if (t.width === "toggle") {
874
+ const p = t.anchorRef.getBoundingClientRect();
875
+ n.value.style.setProperty("--dropdown-wscreen-width", `${p.width}px`);
876
+ } else
877
+ n.value.style.setProperty("--dropdown-wscreen-width", "");
878
+ }
879
+ function d() {
880
+ r(), i(), l("enter");
881
+ }
882
+ function u() {
883
+ o = !0, l("after-enter");
884
+ }
885
+ function c() {
886
+ o = !1, l("after-leave");
887
+ }
888
+ function g() {
889
+ return t.width === "toggle" ? void 0 : t.width;
890
+ }
891
+ return (p, y) => (s(), L(f(de), {
892
+ shown: e.shown,
893
+ preloaded: e.preloaded,
894
+ duration: 75,
895
+ "enter-attribute": "data-shown",
896
+ onAfterEnter: y[1] || (y[1] = (D) => u()),
897
+ onEnter: y[2] || (y[2] = (D) => d()),
898
+ onAfterLeave: y[3] || (y[3] = (D) => c())
899
+ }, {
900
+ default: A(() => [
901
+ m("div", {
902
+ ref_key: "dropdownRef",
903
+ ref: n,
904
+ class: "bs-dropdown",
905
+ "data-width": g()
906
+ }, [
907
+ e.helperText ? (s(), v("header", Gt, [
908
+ m("div", null, [
909
+ m("h3", null, I(e.helperText), 1),
910
+ e.helperDescription ? (s(), v("p", jt, I(e.helperDescription), 1)) : $("", !0)
911
+ ]),
912
+ m("button", {
913
+ type: "button",
914
+ title: "close",
915
+ onClick: y[0] || (y[0] = () => l("close"))
916
+ }, [
917
+ P(f(oe))
918
+ ])
919
+ ])) : $("", !0),
920
+ k(p.$slots, "default")
921
+ ], 8, Wt)
922
+ ]),
923
+ _: 3
924
+ }, 8, ["shown", "preloaded"]));
925
+ }
926
+ }, Ft = {
927
+ key: 0,
928
+ class: "bs-dropdown-backdrop"
929
+ }, Ut = {
930
+ __name: "BsDropdown",
931
+ props: {
932
+ shown: {
933
+ type: Boolean,
934
+ default: !0
935
+ },
936
+ preloaded: {
937
+ type: Boolean,
938
+ default: !1
939
+ },
940
+ width: {
941
+ type: String,
942
+ default: void 0,
943
+ validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
944
+ },
945
+ /** @Deprecated - Use position instead */
946
+ top: {
947
+ type: Boolean,
948
+ default: !1
949
+ },
950
+ /** @Deprecated - Use position instead */
951
+ center: {
952
+ type: Boolean,
953
+ default: !1
954
+ },
955
+ /** @Deprecated - Use position instead */
956
+ right: {
957
+ type: Boolean,
958
+ default: !1
959
+ },
960
+ position: {
961
+ type: String,
962
+ default: void 0,
963
+ validator: (e) => ["top", "center", "right"].includes(e)
964
+ },
965
+ /** @Deprecated - Use anchorId instead */
966
+ toggleId: {
967
+ type: String,
968
+ default: void 0
969
+ },
970
+ anchorId: {
971
+ type: String,
972
+ default: void 0
973
+ },
974
+ containerId: {
975
+ type: String,
976
+ default: void 0
977
+ },
978
+ helperText: {
979
+ type: String,
980
+ default: void 0
981
+ },
982
+ helperDescription: {
983
+ type: String,
984
+ default: void 0
985
+ },
986
+ /** @Deprecated - Use 'preloaded' instead. */
987
+ enterControlled: {
988
+ type: Boolean,
989
+ default: !1
990
+ },
991
+ /** @Deprecated - Use 'shown' instead. */
992
+ enterTrigger: {
993
+ type: Boolean,
994
+ default: !1
995
+ },
996
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
997
+ leaveTrigger: {
998
+ type: Boolean,
999
+ default: !1
1000
+ }
1001
+ },
1002
+ emits: [
1003
+ "close",
1004
+ "enter",
1005
+ "after-enter",
1006
+ "after-leave"
1007
+ ],
1008
+ setup(e, { emit: a }) {
1009
+ const t = e, l = a, n = w(null), o = w(null), { transition: r } = se(t);
1010
+ O(() => {
1011
+ t.containerId && (n.value = document.getElementById(t.containerId)), o.value = document.getElementById(i.value);
1012
+ });
1013
+ const i = b(() => t.toggleId ? t.toggleId : t.anchorId), d = b(() => t.top ? "top" : t.center ? "center" : t.right ? "right" : t.position);
1014
+ return (u, c) => (s(), v(R, null, [
1015
+ f(r) ? (s(), v("div", Ft)) : $("", !0),
1016
+ e.containerId ? (s(), L(f(Se), {
1017
+ key: 1,
1018
+ shown: f(r),
1019
+ preloaded: e.preloaded,
1020
+ "anchor-ref": o.value,
1021
+ "container-ref": n.value,
1022
+ "enter-controlled": e.enterControlled,
1023
+ "enter-trigger": e.enterTrigger,
1024
+ "helper-description": e.helperDescription,
1025
+ "helper-text": e.helperText,
1026
+ "leave-trigger": e.leaveTrigger,
1027
+ position: d.value,
1028
+ width: e.width,
1029
+ onClose: c[0] || (c[0] = (g) => l("close")),
1030
+ onAfterEnter: c[1] || (c[1] = (g) => l("after-enter")),
1031
+ onEnter: c[2] || (c[2] = (g) => l("enter")),
1032
+ onAfterLeave: c[3] || (c[3] = (g) => l("after-leave"))
1033
+ }, {
1034
+ default: A(() => [
1035
+ k(u.$slots, "default")
1036
+ ]),
1037
+ _: 3
1038
+ }, 8, ["shown", "preloaded", "anchor-ref", "container-ref", "enter-controlled", "enter-trigger", "helper-description", "helper-text", "leave-trigger", "position", "width"])) : (s(), v("div", {
1039
+ key: 2,
1040
+ ref_key: "containerRef",
1041
+ ref: n,
1042
+ style: { position: "relative" }
1043
+ }, [
1044
+ P(f(Se), {
1045
+ shown: f(r),
1046
+ preloaded: e.preloaded,
1047
+ "anchor-ref": o.value,
1048
+ "container-ref": n.value,
1049
+ "enter-controlled": e.enterControlled,
1050
+ "enter-trigger": e.enterTrigger,
1051
+ "helper-description": e.helperDescription,
1052
+ "helper-text": e.helperText,
1053
+ "leave-trigger": e.leaveTrigger,
1054
+ position: d.value,
1055
+ width: e.width,
1056
+ onClose: c[4] || (c[4] = (g) => l("close")),
1057
+ onAfterEnter: c[5] || (c[5] = (g) => l("after-enter")),
1058
+ onEnter: c[6] || (c[6] = (g) => l("enter")),
1059
+ onAfterLeave: c[7] || (c[7] = (g) => l("after-leave"))
1060
+ }, {
1061
+ default: A(() => [
1062
+ k(u.$slots, "default")
1063
+ ]),
1064
+ _: 3
1065
+ }, 8, ["shown", "preloaded", "anchor-ref", "container-ref", "enter-controlled", "enter-trigger", "helper-description", "helper-text", "leave-trigger", "position", "width"])
1066
+ ], 512))
1067
+ ], 64));
1068
+ }
1069
+ }, Ht = ["data-value", "data-variant", "id"], Kt = {
1070
+ __name: "BsDropdownOption",
1071
+ props: {
1072
+ value: {
1073
+ type: String,
1074
+ required: !0
1075
+ },
1076
+ variant: {
1077
+ type: String,
1078
+ default: void 0
1079
+ }
1080
+ },
1081
+ setup(e) {
1082
+ const a = e, t = w(null), l = te("optionsId"), n = te("handleSelect"), o = b(() => `${l}-option-${a.value}`);
1083
+ re([" ", "Enter", "NumpadEnter"], (i) => {
1084
+ var d;
1085
+ r(), (d = t.value.querySelector("a")) == null || d.click(), i.preventDefault();
1086
+ }, t);
1087
+ function r() {
1088
+ var i;
1089
+ n(o.value, a.value), (i = t.value.querySelector("a")) == null || i.click();
1090
+ }
1091
+ return (i, d) => (s(), v("li", {
1092
+ "data-component": "bs-dropdown-option",
1093
+ "data-value": a.value,
1094
+ ref_key: "optionRef",
1095
+ ref: t,
1096
+ role: "option",
1097
+ "data-variant": e.variant || void 0,
1098
+ id: o.value,
1099
+ tabIndex: -1,
1100
+ onClick: r
1101
+ }, [
1102
+ k(i.$slots, "default")
1103
+ ], 8, Ht));
1104
+ }
1105
+ }, Yt = ["aria-activedescendant", "aria-label", "id"], Xt = {
1106
+ __name: "BsDropdownOptionList",
1107
+ props: {
1108
+ optionsId: {
1109
+ type: String,
1110
+ required: !0
1111
+ },
1112
+ /** @Deprecated - Use 'shown' instead. The new prop defaults to `true`, so
1113
+ * it is not even needed when using v-if (only for v-show).
1114
+ */
1115
+ visible: {
1116
+ type: Boolean,
1117
+ default: void 0
1118
+ },
1119
+ shown: {
1120
+ type: Boolean,
1121
+ default: !0
1122
+ },
1123
+ focusDelay: {
1124
+ type: Number,
1125
+ default: 75
1126
+ },
1127
+ label: {
1128
+ type: String,
1129
+ default: void 0
1130
+ },
1131
+ /** @Deprecated - Use modelValue (or v-model) instead */
1132
+ selectedValue: {
1133
+ type: String,
1134
+ default: void 0
1135
+ },
1136
+ modelValue: {
1137
+ type: String,
1138
+ default: void 0
1139
+ }
1140
+ },
1141
+ emits: ["optselected", "update:modelValue", "close"],
1142
+ setup(e, { emit: a }) {
1143
+ const t = e, l = a, n = w(null), o = w(null);
1144
+ let r = null, i = -1, d = -1;
1145
+ ae("optionsId", t.optionsId), ae("handleSelect", T);
1146
+ function u() {
1147
+ return r || (r = Array.from(n.value.querySelectorAll('[data-component="bs-dropdown-option"]'))), r;
1148
+ }
1149
+ O(() => {
1150
+ p(), document.addEventListener("keydown", D);
1151
+ }), Ge(() => {
1152
+ document.removeEventListener("keydown", D);
1153
+ }), E(() => t.visible, () => {
1154
+ p();
1155
+ }), E(() => t.shown, () => {
1156
+ p();
1157
+ });
1158
+ const c = b(() => t.visible || t.shown), g = b(() => t.modelValue || t.selectedValue);
1159
+ function p() {
1160
+ var x, S, q, G, ee;
1161
+ c.value ? (d = u().findIndex(
1162
+ (J) => J.getAttribute("data-value") === g.value
1163
+ ), d > -1 && ((x = u()[d]) == null || x.setAttribute("data-selected", ""), (S = u()[d]) == null || S.setAttribute("aria-selected", "true"), i = d, t.focusDelay > 0 ? setTimeout(() => {
1164
+ var J;
1165
+ (J = u()[d]) == null || J.focus();
1166
+ }, t.focusDelay) : (q = u()[d]) == null || q.focus())) : ((G = u()[d]) == null || G.removeAttribute("data-selected"), (ee = u()[d]) == null || ee.removeAttribute("aria-selected"));
1167
+ }
1168
+ ft(
1169
+ n,
1170
+ () => {
1171
+ r = null;
1172
+ },
1173
+ { childList: !0 }
1174
+ );
1175
+ function y() {
1176
+ var x;
1177
+ i > -1 && ((x = u()[i]) == null || x.blur());
1178
+ }
1179
+ function D(x) {
1180
+ if (c.value)
1181
+ switch (x.key) {
1182
+ case "ArrowDown":
1183
+ z("down"), x.preventDefault();
1184
+ break;
1185
+ case "ArrowUp":
1186
+ z("up"), x.preventDefault();
1187
+ break;
1188
+ case "Home":
1189
+ z("home"), x.preventDefault();
1190
+ break;
1191
+ case "End":
1192
+ z("end"), x.preventDefault();
1193
+ break;
1194
+ case "Tab":
1195
+ x.preventDefault();
1196
+ break;
1197
+ }
1198
+ }
1199
+ function z(x) {
1200
+ let S;
1201
+ switch (x) {
1202
+ case "up":
1203
+ S = i - 1 < 0 ? u().length - 1 : i - 1;
1204
+ break;
1205
+ case "down":
1206
+ S = (i + 1) % u().length;
1207
+ break;
1208
+ case "home":
1209
+ S = 0;
1210
+ break;
1211
+ case "end":
1212
+ S = u().length - 1;
1213
+ break;
1214
+ }
1215
+ y(), u()[S].focus(), i = S;
1216
+ }
1217
+ function T(x, S) {
1218
+ o.value = x, y(), l("optselected", S), l("update:modelValue", S), l("close");
1219
+ }
1220
+ return (x, S) => (s(), v("ul", {
1221
+ ref_key: "optionsRef",
1222
+ ref: n,
1223
+ "aria-activedescendant": o.value || void 0,
1224
+ "aria-label": t.label || void 0,
1225
+ class: "bs-dropdown-options",
1226
+ id: t.optionsId,
1227
+ role: "listbox"
1228
+ }, [
1229
+ k(x.$slots, "default")
1230
+ ], 8, Yt));
1231
+ }
1232
+ }, Zt = {
1233
+ __name: "BsDropdownWithOptions",
1234
+ props: {
1235
+ // OPTION LIST PROPS
1236
+ optionsId: {
1237
+ type: String,
1238
+ required: !0
1239
+ },
1240
+ label: {
1241
+ type: String,
1242
+ default: void 0
1243
+ },
1244
+ /** @Deprecated - Use modelValue (or v-model) instead */
1245
+ selectedValue: {
1246
+ type: String,
1247
+ default: void 0
1248
+ },
1249
+ modelValue: {
1250
+ type: String,
1251
+ default: void 0
1252
+ },
1253
+ // DROPDOWN PROPS
1254
+ shown: {
1255
+ type: Boolean,
1256
+ default: !0
1257
+ },
1258
+ preloaded: {
1259
+ type: Boolean,
1260
+ default: !1
1261
+ },
1262
+ width: {
1263
+ type: String,
1264
+ default: void 0,
1265
+ validator: (e) => ["sm", "md", "lg", "content", "toggle"].includes(e)
1266
+ },
1267
+ /** @Deprecated - Use position instead */
1268
+ top: {
1269
+ type: Boolean,
1270
+ default: !1
1271
+ },
1272
+ /** @Deprecated - Use position instead */
1273
+ center: {
1274
+ type: Boolean,
1275
+ default: !1
1276
+ },
1277
+ /** @Deprecated - Use position instead */
1278
+ right: {
1279
+ type: Boolean,
1280
+ default: !1
1281
+ },
1282
+ position: {
1283
+ type: String,
1284
+ default: void 0,
1285
+ validator: (e) => ["top", "center", "right"].includes(e)
1286
+ },
1287
+ /** @Deprecated - Use anchorId instead */
1288
+ toggleId: {
1289
+ type: String,
1290
+ default: void 0
1291
+ },
1292
+ anchorId: {
1293
+ type: String,
1294
+ default: void 0
1295
+ },
1296
+ containerId: {
1297
+ type: String,
1298
+ default: void 0
1299
+ },
1300
+ helperText: {
1301
+ type: String,
1302
+ default: void 0
1303
+ },
1304
+ helperDescription: {
1305
+ type: String,
1306
+ default: void 0
1307
+ },
1308
+ /** @Deprecated - Use 'preloaded' instead. */
1309
+ enterControlled: {
1310
+ type: Boolean,
1311
+ default: !1
1312
+ },
1313
+ /** @Deprecated - Use 'shown' instead. */
1314
+ enterTrigger: {
1315
+ type: Boolean,
1316
+ default: !1
1317
+ },
1318
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1319
+ leaveTrigger: {
1320
+ type: Boolean,
1321
+ default: !1
1322
+ }
1323
+ },
1324
+ emits: [
1325
+ "optselected",
1326
+ "update:modelValue",
1327
+ "close",
1328
+ "after-enter",
1329
+ "after-leave"
1330
+ ],
1331
+ setup(e, { emit: a }) {
1332
+ const t = a, l = w(!1);
1333
+ function n() {
1334
+ l.value = !0;
1335
+ }
1336
+ function o(i) {
1337
+ l.value = !1, t("optselected", i), t("update:modelValue", i), t("close");
1338
+ }
1339
+ function r() {
1340
+ l.value && (l.value = !1, t("close"));
1341
+ }
1342
+ return (i, d) => (s(), L(f(Ut), {
1343
+ shown: e.shown,
1344
+ preloaded: e.preloaded,
1345
+ "anchor-id": e.anchorId,
1346
+ center: e.center,
1347
+ "container-id": e.containerId,
1348
+ "enter-controlled": e.enterControlled,
1349
+ "enter-trigger": e.enterTrigger,
1350
+ "helper-description": e.helperDescription,
1351
+ "helper-text": e.helperText,
1352
+ "leave-trigger": e.leaveTrigger,
1353
+ position: e.position,
1354
+ right: e.right,
1355
+ "toggle-id": e.toggleId,
1356
+ top: e.top,
1357
+ width: e.width,
1358
+ onClose: r,
1359
+ onAfterEnter: d[0] || (d[0] = (u) => t("after-enter")),
1360
+ onEnter: n,
1361
+ onAfterLeave: d[1] || (d[1] = (u) => t("after-leave"))
1362
+ }, {
1363
+ default: A(() => [
1364
+ P(f(Xt), {
1365
+ label: e.label,
1366
+ "model-value": e.modelValue,
1367
+ "options-id": e.optionsId,
1368
+ "selected-value": e.selectedValue,
1369
+ shown: l.value,
1370
+ onOptselected: o,
1371
+ "onUpdate:modelValue": o,
1372
+ onClose: r
1373
+ }, {
1374
+ default: A(() => [
1375
+ k(i.$slots, "default")
1376
+ ]),
1377
+ _: 3
1378
+ }, 8, ["label", "model-value", "options-id", "selected-value", "shown"])
1379
+ ]),
1380
+ _: 3
1381
+ }, 8, ["shown", "preloaded", "anchor-id", "center", "container-id", "enter-controlled", "enter-trigger", "helper-description", "helper-text", "leave-trigger", "position", "right", "toggle-id", "top", "width"]));
1382
+ }
1383
+ }, Jt = ["view-box"], Qt = ["id"], _t = ["offset", "stop-color"], Vn = {
1384
+ __name: "BsIconGradientWrapper",
1385
+ setup(e) {
1386
+ const a = w(null), t = w(null), l = [
1387
+ { offset: 0.1326, color: "#EE282A" },
1388
+ { offset: 0.5466, color: "#1C0087" },
1389
+ { offset: 0.9715, color: "#0086EA" }
1390
+ ], [n] = H();
1391
+ return O(() => {
1392
+ t.value = a.value.querySelector("svg").getAttribute("viewBox") || "0 0 0 0";
1393
+ }), (o, r) => (s(), v(R, null, [
1394
+ m("span", {
1395
+ ref_key: "svgWrapperRef",
1396
+ ref: a,
1397
+ class: "bs-icon-gradient-wrapper",
1398
+ style: je(`fill: url(#${f(n)});`)
1399
+ }, [
1400
+ k(o.$slots, "default")
1401
+ ], 4),
1402
+ (s(), v("svg", {
1403
+ xmlns: "http://www.w3.org/2000/svg",
1404
+ "view-box": t.value,
1405
+ width: "0",
1406
+ height: "0"
1407
+ }, [
1408
+ m("linearGradient", {
1409
+ id: f(n),
1410
+ x1: "0",
1411
+ y1: "0",
1412
+ x2: "100%",
1413
+ y2: "100%",
1414
+ "gradient-units": "userSpaceOnUse"
1415
+ }, [
1416
+ (s(), v(R, null, Y(l, (i) => m("stop", {
1417
+ key: i.offset,
1418
+ offset: i.offset,
1419
+ "stop-color": i.color
1420
+ }, null, 8, _t)), 64))
1421
+ ], 8, Qt)
1422
+ ], 8, Jt))
1423
+ ], 64));
1424
+ }
1425
+ }, ea = ["data-error", "id", "value"], we = {
1426
+ __name: "BsInput",
1427
+ props: {
1428
+ error: {
1429
+ type: Boolean,
1430
+ default: !1
1431
+ },
1432
+ hintId: String,
1433
+ /** @Deprecated - Just set `id` since it will fall-through to the inner input element. */
1434
+ inputId: String,
1435
+ modelValue: [String, Number],
1436
+ value: [String, Number]
1437
+ },
1438
+ emits: ["update:modelValue"],
1439
+ setup(e, { emit: a }) {
1440
+ const t = e, l = a, n = N(), o = b(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
1441
+ function r(i) {
1442
+ const d = n.type === "number" ? parseInt(i.target.value) : i.target.value;
1443
+ l("update:modelValue", d);
1444
+ }
1445
+ return (i, d) => (s(), v("input", V({
1446
+ "data-component": "bs-input",
1447
+ "data-error": e.error,
1448
+ id: i.$attrs.id || e.inputId,
1449
+ value: e.value || e.modelValue,
1450
+ onInput: r
1451
+ }, o.value), null, 16, ea));
1452
+ }
1453
+ }, ta = ["data-disabled", "data-error", "data-variant", "data-multifocus"], aa = {
1454
+ __name: "BsInputAddon",
1455
+ props: {
1456
+ disabled: { type: Boolean, default: !1 },
1457
+ error: { type: Boolean, default: !1 },
1458
+ multifocus: { type: Boolean, default: !1 },
1459
+ variant: { type: String, validator: (e) => e === "inner-bordered" }
1460
+ },
1461
+ setup(e) {
1462
+ return (a, t) => (s(), v("div", {
1463
+ class: "bs-input-addon",
1464
+ "data-component": "bs-input-addon",
1465
+ "data-disabled": e.disabled,
1466
+ "data-error": e.error,
1467
+ "data-variant": e.variant,
1468
+ "data-multifocus": e.multifocus
1469
+ }, [
1470
+ k(a.$slots, "default")
1471
+ ], 8, ta));
1472
+ }
1473
+ }, na = {
1474
+ class: "bs-field-details",
1475
+ "data-component": "bs-field-details"
1476
+ }, la = ["id", "data-error"], oa = ["data-error"], he = {
1477
+ __name: "BsFieldDetails",
1478
+ props: {
1479
+ /** The number of characters that have been entered by the user. */
1480
+ charCount: Number,
1481
+ /** Pass value to show character count and set the maximum number of characters that are allowed to be submitted by the user. */
1482
+ charMax: Number,
1483
+ /** Applies error styles to the helper text. */
1484
+ error: {
1485
+ type: Boolean,
1486
+ default: !1
1487
+ },
1488
+ /** Pass error text. Will be shown if `error` is `true`. */
1489
+ errorMsg: String,
1490
+ /** Pass single helper text. */
1491
+ hint: String,
1492
+ /** Adds an id to associate a hint to an input. */
1493
+ hintId: String
1494
+ },
1495
+ setup(e) {
1496
+ const a = e, t = b(() => a.error && a.errorMsg || a.hint);
1497
+ return (l, n) => (s(), v("div", na, [
1498
+ t.value ? (s(), v("span", {
1499
+ key: 0,
1500
+ id: e.hintId,
1501
+ class: "bs-hint",
1502
+ "data-error": e.error
1503
+ }, I(t.value), 9, la)) : $("", !0),
1504
+ e.charMax ? (s(), v("span", {
1505
+ key: 1,
1506
+ "aria-description": "character count over character limit for the preceding text field",
1507
+ class: "bs-character-count",
1508
+ "data-error": a.charCount > a.charMax
1509
+ }, I(a.charCount || "0") + " / " + I(a.charMax), 9, oa)) : $("", !0)
1510
+ ]));
1511
+ }
1512
+ }, qn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1513
+ __name: "BsInputField",
1514
+ props: {
1515
+ /** Sets the disabled state on input, disabled styles on label. */
1516
+ disabled: {
1517
+ type: Boolean,
1518
+ default: !1
1519
+ },
1520
+ /** Applies error styles to the input. */
1521
+ error: {
1522
+ type: Boolean,
1523
+ default: !1
1524
+ },
1525
+ /** Pass error text. */
1526
+ errorMsg: String,
1527
+ /** Pass helper text. */
1528
+ hint: String,
1529
+ /** @Deprecated Use `hint` and/or `errorMsg`. */
1530
+ hints: [String, Array],
1531
+ /** Pass id for the input element. Will also be applied to label attribute. */
1532
+ inputId: String,
1533
+ /** Pass label text. */
1534
+ label: {
1535
+ type: String,
1536
+ required: !0
1537
+ },
1538
+ /** List additional attributes by name (comma-separated) to pass through to `<input>`. */
1539
+ passAttrs: {
1540
+ type: String,
1541
+ default: ""
1542
+ },
1543
+ /** Placeholder attribute for `<input>`. */
1544
+ placeholder: String,
1545
+ /** Sets the required state on the input, append required* indicator to label. */
1546
+ required: {
1547
+ type: Boolean,
1548
+ default: !1
1549
+ },
1550
+ /** Sets the native input type attribute. */
1551
+ type: {
1552
+ type: String,
1553
+ default: "text"
1554
+ },
1555
+ /** Sets the input value - do not use if using `v-model`. */
1556
+ value: [String, Number],
1557
+ /** Sets the input value - `v-model` directive will use this; do not set explicitly. */
1558
+ modelValue: [String, Number]
1559
+ },
1560
+ emits: ["update:modelValue"],
1561
+ setup(e, { emit: a }) {
1562
+ const t = e, l = N(), [n, o] = H(2), { toChild: r, toRoot: i } = Z(t, l), d = b(() => {
1563
+ var g, p;
1564
+ return ((p = (g = t.hints) == null ? void 0 : g.join) == null ? void 0 : p.call(g, `
1565
+ `)) || t.hints;
1566
+ }), u = b(() => t.error && t.errorMsg || t.hint || d.value || void 0), c = b(() => t.inputId || n.value);
1567
+ return (g, p) => (s(), v("div", V({ "data-component": "bs-input-field" }, f(i)), [
1568
+ e.label || g.$slots.label ? (s(), L(f(_), {
1569
+ key: 0,
1570
+ for: c.value,
1571
+ disabled: e.disabled,
1572
+ required: e.required
1573
+ }, {
1574
+ default: A(() => [
1575
+ k(g.$slots, "label", {}, () => [
1576
+ W(I(e.label), 1)
1577
+ ])
1578
+ ]),
1579
+ _: 3
1580
+ }, 8, ["for", "disabled", "required"])) : $("", !0),
1581
+ P(f(we), V({
1582
+ disabled: e.disabled,
1583
+ error: e.error,
1584
+ "hint-id": f(o),
1585
+ id: c.value,
1586
+ placeholder: e.placeholder,
1587
+ required: e.required,
1588
+ type: e.type,
1589
+ value: e.value || e.modelValue,
1590
+ "onUpdate:modelValue": p[0] || (p[0] = (y) => g.$emit("update:modelValue", y))
1591
+ }, f(r)), null, 16, ["disabled", "error", "hint-id", "id", "placeholder", "required", "type", "value"]),
1592
+ u.value ? (s(), L(he, {
1593
+ key: 1,
1594
+ error: e.error,
1595
+ "error-msg": e.errorMsg,
1596
+ hint: e.hint || d.value,
1597
+ "hint-id": f(o)
1598
+ }, null, 8, ["error", "error-msg", "hint", "hint-id"])) : $("", !0)
1599
+ ], 16));
1600
+ }
1601
+ }), zn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1602
+ __name: "BsInputSearch",
1603
+ props: {
1604
+ /** Sets the disabled state on input, disabled styles on label. */
1605
+ disabled: {
1606
+ type: Boolean,
1607
+ default: !1
1608
+ },
1609
+ hideClear: {
1610
+ type: Boolean,
1611
+ default: !1
1612
+ },
1613
+ inputId: String,
1614
+ modelValue: {
1615
+ type: String,
1616
+ default: ""
1617
+ },
1618
+ passAttrs: {
1619
+ type: String,
1620
+ default: ""
1621
+ },
1622
+ placeholder: {
1623
+ type: String,
1624
+ default: "Search Items"
1625
+ },
1626
+ /** Sets the input value - do not use if using `v-model`. */
1627
+ value: {
1628
+ type: String,
1629
+ default: ""
1630
+ }
1631
+ },
1632
+ emits: ["clear", "update:modelValue"],
1633
+ setup(e, { emit: a }) {
1634
+ const t = e, l = N(), { toChild: n, toRoot: o } = Z(t, l);
1635
+ return (r, i) => (s(), L(f(aa), V({
1636
+ class: "bs-input-search",
1637
+ "data-component": "bs-input-search",
1638
+ disabled: e.disabled
1639
+ }, f(o)), {
1640
+ default: A(() => [
1641
+ P(f(Xe)),
1642
+ P(f(we), V({
1643
+ "data-autowidth": "",
1644
+ disabled: e.disabled,
1645
+ "input-id": e.inputId,
1646
+ placeholder: e.placeholder,
1647
+ value: e.value || e.modelValue,
1648
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => r.$emit("update:modelValue", d))
1649
+ }, f(n)), null, 16, ["disabled", "input-id", "placeholder", "value"]),
1650
+ e.disabled || e.hideClear ? $("", !0) : (s(), v("button", {
1651
+ key: 0,
1652
+ title: "Clear",
1653
+ type: "button",
1654
+ onClick: i[1] || (i[1] = (d) => r.$emit("clear"))
1655
+ }, [
1656
+ P(f(oe), { size: "sm" })
1657
+ ]))
1658
+ ]),
1659
+ _: 1
1660
+ }, 16, ["disabled"]));
1661
+ }
1662
+ }), ia = ["data-disabled", "for"], ra = /* @__PURE__ */ m("span", {
1663
+ "data-required": "true",
1664
+ "aria-hidden": "true"
1665
+ }, " *", -1), sa = /* @__PURE__ */ m("span", { class: "visually-hidden" }, "required", -1), _ = {
1666
+ __name: "BsLabel",
1667
+ props: {
1668
+ disabled: { type: Boolean, default: !1 },
1669
+ for: { type: String, required: !0 },
1670
+ hide: { type: Boolean, default: !1 },
1671
+ required: { type: Boolean, default: !1 }
1672
+ },
1673
+ setup(e) {
1674
+ return (a, t) => (s(), v("label", {
1675
+ class: X(["bs-label", e.hide ? "visually-hidden" : ""]),
1676
+ "data-component": "bs-label",
1677
+ "data-disabled": e.disabled,
1678
+ for: e.for
1679
+ }, [
1680
+ m("span", null, [
1681
+ k(a.$slots, "default")
1682
+ ]),
1683
+ e.required ? (s(), v(R, { key: 0 }, [
1684
+ ra,
1685
+ sa
1686
+ ], 64)) : $("", !0)
1687
+ ], 10, ia));
1688
+ }
1689
+ }, da = ["data-size", "data-variant"], ua = /* @__PURE__ */ m("span", null, null, -1), ca = /* @__PURE__ */ m("span", null, null, -1), fa = /* @__PURE__ */ m("span", null, null, -1), va = /* @__PURE__ */ m("span", null, null, -1), ga = /* @__PURE__ */ m("span", { class: "visually-hidden" }, "Loading", -1), ha = [
1690
+ ua,
1691
+ ca,
1692
+ fa,
1693
+ va,
1694
+ ga
1695
+ ], Mn = {
1696
+ __name: "BsLoader",
1697
+ props: {
1698
+ size: {
1699
+ type: String,
1700
+ default: "md",
1701
+ validator: (e) => ["xs", "sm", "md", "lg"].includes(e)
1702
+ },
1703
+ variant: {
1704
+ type: String,
1705
+ validator: (e) => ["black", "white", "gray"].includes(e)
1706
+ }
1707
+ },
1708
+ setup(e) {
1709
+ return (a, t) => (s(), v("span", {
1710
+ class: "bs-loader",
1711
+ "data-size": e.size,
1712
+ "data-variant": e.variant,
1713
+ role: "status"
1714
+ }, ha, 8, da));
1715
+ }
1716
+ }, pa = /* @__PURE__ */ m("div", { class: "bs-overlay" }, null, -1), ba = {
1717
+ __name: "BsOverlay",
1718
+ props: {
1719
+ shown: {
1720
+ type: Boolean,
1721
+ default: !0
1722
+ },
1723
+ preloaded: {
1724
+ type: Boolean,
1725
+ default: !1
1726
+ },
1727
+ /** @Deprecated - Use 'preloaded' instead. */
1728
+ enterControlled: {
1729
+ type: Boolean,
1730
+ default: !1
1731
+ },
1732
+ /** @Deprecated - Use 'shown' instead. */
1733
+ enterTrigger: {
1734
+ type: Boolean,
1735
+ default: !1
1736
+ },
1737
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1738
+ leaveTrigger: {
1739
+ type: Boolean,
1740
+ default: !1
1741
+ }
1742
+ },
1743
+ emits: ["after-enter", "after-leave"],
1744
+ setup(e, { emit: a }) {
1745
+ const t = e, l = a, { transition: n } = se(t);
1746
+ return (o, r) => (s(), L(f(de), {
1747
+ shown: f(n),
1748
+ preloaded: e.preloaded,
1749
+ duration: 75,
1750
+ "enter-attribute": "data-shown",
1751
+ onAfterEnter: r[0] || (r[0] = (i) => l("after-enter")),
1752
+ onAfterLeave: r[1] || (r[1] = (i) => l("after-leave"))
1753
+ }, {
1754
+ default: A(() => [
1755
+ pa
1756
+ ]),
1757
+ _: 1
1758
+ }, 8, ["shown", "preloaded"]));
1759
+ }
1760
+ }, ma = ["id", "role"], ya = {
1761
+ key: 0,
1762
+ class: "close-button-container"
1763
+ }, Rn = {
1764
+ __name: "BsModal",
1765
+ props: {
1766
+ modalId: {
1767
+ type: String,
1768
+ default: void 0
1769
+ },
1770
+ shown: {
1771
+ type: Boolean,
1772
+ default: !0
1773
+ },
1774
+ preloaded: {
1775
+ type: Boolean,
1776
+ default: !1
1777
+ },
1778
+ alert: {
1779
+ type: Boolean,
1780
+ default: !1
1781
+ },
1782
+ closeButton: {
1783
+ type: Boolean,
1784
+ default: !0
1785
+ },
1786
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1787
+ enterControlled: {
1788
+ type: Boolean,
1789
+ default: !1
1790
+ },
1791
+ /** @Deprecated - Use 'shown' instead. */
1792
+ enterTrigger: {
1793
+ type: Boolean,
1794
+ default: !1
1795
+ },
1796
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
1797
+ leaveTrigger: {
1798
+ type: Boolean,
1799
+ default: !1
1800
+ }
1801
+ },
1802
+ emits: [
1803
+ "close",
1804
+ "after-enter",
1805
+ "after-leave"
1806
+ ],
1807
+ setup(e, { emit: a }) {
1808
+ const t = e, l = a, { transition: n } = se(t);
1809
+ let o = !1;
1810
+ return re(["Escape"], () => {
1811
+ o && l("close", t.modalId);
1812
+ }), (r, i) => (s(), v(R, null, [
1813
+ P(ba, {
1814
+ shown: f(n),
1815
+ preloaded: e.preloaded,
1816
+ "enter-controlled": e.enterControlled,
1817
+ "enter-trigger": e.enterTrigger,
1818
+ "leave-trigger": e.leaveTrigger
1819
+ }, null, 8, ["shown", "preloaded", "enter-controlled", "enter-trigger", "leave-trigger"]),
1820
+ P(de, {
1821
+ shown: f(n),
1822
+ preloaded: e.preloaded,
1823
+ duration: 75,
1824
+ "enter-attribute": "data-shown",
1825
+ onEnter: i[1] || (i[1] = (d) => Fe(o) ? o.value = !0 : o = !0),
1826
+ onAfterEnter: i[2] || (i[2] = (d) => l("after-enter")),
1827
+ onAfterLeave: i[3] || (i[3] = (d) => l("after-leave"))
1828
+ }, {
1829
+ default: A(() => [
1830
+ m("div", {
1831
+ id: t.modalId,
1832
+ class: "bs-modal",
1833
+ role: e.alert ? "alertdialog" : "dialog",
1834
+ "aria-modal": "true"
1835
+ }, [
1836
+ e.closeButton ? (s(), v("div", ya, [
1837
+ m("button", {
1838
+ type: "button",
1839
+ title: "Close Modal",
1840
+ "aria-label": "Close Modal",
1841
+ onClick: i[0] || (i[0] = (d) => l("close", e.modalId))
1842
+ }, [
1843
+ P(f(oe), { class: "close-button" })
1844
+ ])
1845
+ ])) : $("", !0),
1846
+ k(r.$slots, "default")
1847
+ ], 8, ma)
1848
+ ]),
1849
+ _: 3
1850
+ }, 8, ["shown", "preloaded"])
1851
+ ], 64));
1852
+ }
1853
+ }, Ba = ["data-variant", "data-fixed"], $a = {
1854
+ key: 0,
1855
+ class: "bs-pagination-carets"
1856
+ }, Sa = ["title", "disabled"], wa = { key: 0 }, ka = ["title", "disabled"], Ia = { key: 0 }, Ta = {
1857
+ key: 1,
1858
+ class: "bs-pagination-page-numbers"
1859
+ }, xa = ["title", "data-selected", "onClick"], Ca = { key: 2 }, Aa = { key: 3 }, La = /* @__PURE__ */ m("span", null, "Results Per Page:", -1), Pa = { class: "bs-pagination-results-numbers" }, Da = ["data-selected", "disabled", "onClick"], Ea = {
1860
+ key: 5,
1861
+ class: "bs-pagination-carets"
1862
+ }, Va = ["title", "disabled"], qa = { key: 0 }, za = ["title", "disabled"], Ma = { key: 0 }, On = {
1863
+ __name: "BsPagination",
1864
+ props: {
1865
+ // Used for all
1866
+ showFirstLastButtons: {
1867
+ type: Boolean,
1868
+ default: !1
1869
+ },
1870
+ prevPageText: {
1871
+ type: String,
1872
+ default: void 0
1873
+ },
1874
+ firstPageText: {
1875
+ type: String,
1876
+ default: void 0
1877
+ },
1878
+ nextPageText: {
1879
+ type: String,
1880
+ default: void 0
1881
+ },
1882
+ lastPageText: {
1883
+ type: String,
1884
+ default: void 0
1885
+ },
1886
+ fixed: {
1887
+ type: Boolean,
1888
+ default: !1
1889
+ },
1890
+ variant: {
1891
+ type: String,
1892
+ default: "base",
1893
+ validator: (e) => ["base", "group", "results"].includes(e)
1894
+ },
1895
+ /** @Deprecated - Use modelValue (or v-model) instead */
1896
+ selection: {
1897
+ type: Number,
1898
+ default: void 0
1899
+ },
1900
+ modelValue: {
1901
+ type: Number,
1902
+ default: void 0
1903
+ },
1904
+ // Used for variant="base"
1905
+ centerDisplay: {
1906
+ type: String,
1907
+ default: "numbers",
1908
+ validator: (e) => ["numbers", "text"].includes(e)
1909
+ },
1910
+ // Used for variant="base", centerDisplay="numbers"
1911
+ breakText: {
1912
+ type: String,
1913
+ default: "…"
1914
+ },
1915
+ // Used for variant="base", centerDisplay="numbers"
1916
+ pageRange: {
1917
+ type: Number,
1918
+ default: 3
1919
+ },
1920
+ // Used for variant="base"
1921
+ pageCount: {
1922
+ type: Number,
1923
+ default: void 0
1924
+ },
1925
+ // Used for variant="base", centerDisplay="text" and variant="group"
1926
+ centerLabel: {
1927
+ type: String,
1928
+ default: void 0
1929
+ },
1930
+ // Used for variant="group"
1931
+ itemsPerGroup: {
1932
+ type: Number,
1933
+ default: 25
1934
+ },
1935
+ // Used for variant="group"
1936
+ itemsCount: {
1937
+ type: Number,
1938
+ default: void 0
1939
+ },
1940
+ // Used for variant="results"
1941
+ resultsIncrements: {
1942
+ type: String,
1943
+ default: void 0
1944
+ }
1945
+ },
1946
+ emits: ["selchange", "update:modelValue"],
1947
+ setup(e, { emit: a }) {
1948
+ const t = e, l = a, n = w(null);
1949
+ O(() => {
1950
+ o.value ? n.value = o.value : t.variant === "results" ? n.value = z.value[0] : n.value = 1;
1951
+ });
1952
+ const o = b(() => t.modelValue || t.selection);
1953
+ E(() => t.selection, (T) => {
1954
+ n.value = T;
1955
+ }), E(() => t.modelValue, (T) => {
1956
+ n.value = T;
1957
+ }), E(n, (T, x) => {
1958
+ x !== null && (l("selchange", T), l("update:modelValue", T));
1959
+ });
1960
+ const r = b(() => {
1961
+ if (t.variant === "group")
1962
+ return Math.ceil(t.itemsCount / t.itemsPerGroup);
1963
+ if (t.variant === "base")
1964
+ return t.pageCount;
1965
+ }), i = b(() => t.variant === "base" ? t.centerDisplay === "text" ? "group" : void 0 : t.variant);
1966
+ function d() {
1967
+ n.value = 1;
1968
+ }
1969
+ function u() {
1970
+ n.value = Math.max(n.value - 1, 1);
1971
+ }
1972
+ function c() {
1973
+ n.value = Math.min(
1974
+ n.value + 1,
1975
+ r.value
1976
+ );
1977
+ }
1978
+ function g() {
1979
+ n.value = r.value;
1980
+ }
1981
+ const p = b(() => {
1982
+ if (t.pageCount <= t.pageRange)
1983
+ return [...Array(t.pageCount + 1).keys()].slice(1);
1984
+ const T = [1], x = (t.pageRange - 1) / 2;
1985
+ let S = n.value - x, q = n.value + x;
1986
+ S < 1 && (q += 1 - S, S = 1), q > t.pageCount && (S -= q - t.pageCount, q = t.pageCount), S = Math.max(S, 2), q = Math.min(q, t.pageCount - 1), S > 2 && T.push(t.breakText);
1987
+ for (let G = S; G <= q; G++)
1988
+ T.push(G);
1989
+ return q < t.pageCount - 1 && T.push(t.breakText), T.push(t.pageCount), T;
1990
+ }), y = b(() => `${t.centerLabel ?? "Page"} ${n.value} of ${r.value}`), D = b(() => {
1991
+ const T = (n.value - 1) * t.itemsPerGroup + 1, x = Math.min(T - 1 + t.itemsPerGroup, t.itemsCount);
1992
+ return `${t.centerLabel ?? "Results"} ${T} - ${x} of ${t.itemsCount}`;
1993
+ }), z = b(() => t.resultsIncrements.split(",").map((T) => parseInt(T)));
1994
+ return (T, x) => (s(), v("div", {
1995
+ class: "bs-pagination",
1996
+ "data-variant": i.value,
1997
+ "data-fixed": t.fixed
1998
+ }, [
1999
+ e.variant === "base" || e.variant === "group" ? (s(), v("div", $a, [
2000
+ e.showFirstLastButtons ? (s(), v("button", {
2001
+ key: 0,
2002
+ type: "button",
2003
+ class: X(e.firstPageText ? "bs-pagination-word-caret" : void 0),
2004
+ title: e.firstPageText,
2005
+ disabled: n.value === 1,
2006
+ onClick: d
2007
+ }, [
2008
+ P(f(Ze)),
2009
+ e.firstPageText ? (s(), v("span", wa, I(e.firstPageText), 1)) : $("", !0)
2010
+ ], 10, Sa)) : $("", !0),
2011
+ m("button", {
2012
+ type: "button",
2013
+ class: X(e.prevPageText ? "bs-pagination-word-caret" : void 0),
2014
+ title: e.prevPageText,
2015
+ disabled: n.value === 1,
2016
+ onClick: u
2017
+ }, [
2018
+ P(f(Je)),
2019
+ e.prevPageText ? (s(), v("span", Ia, I(e.prevPageText), 1)) : $("", !0)
2020
+ ], 10, ka)
2021
+ ])) : $("", !0),
2022
+ e.variant === "base" && e.centerDisplay === "numbers" ? (s(), v("div", Ta, [
2023
+ (s(!0), v(R, null, Y(p.value, (S) => (s(), v("button", {
2024
+ key: `page-${S}-button`,
2025
+ type: "button",
2026
+ title: `Page ${S}`,
2027
+ "data-selected": S === n.value,
2028
+ onClick: (q) => n.value = S
2029
+ }, I(S), 9, xa))), 128))
2030
+ ])) : $("", !0),
2031
+ t.variant === "base" && t.centerDisplay === "text" ? (s(), v("span", Ca, I(y.value), 1)) : $("", !0),
2032
+ t.variant === "group" ? (s(), v("span", Aa, I(D.value), 1)) : $("", !0),
2033
+ t.variant === "results" ? (s(), v(R, { key: 4 }, [
2034
+ La,
2035
+ m("div", Pa, [
2036
+ (s(!0), v(R, null, Y(z.value, (S) => (s(), v("button", {
2037
+ type: "button",
2038
+ key: `results-${S}`,
2039
+ "data-selected": S === n.value,
2040
+ disabled: n.value === S,
2041
+ onClick: (q) => n.value = S
2042
+ }, I(S), 9, Da))), 128))
2043
+ ])
2044
+ ], 64)) : $("", !0),
2045
+ e.variant === "base" || e.variant === "group" ? (s(), v("div", Ea, [
2046
+ m("button", {
2047
+ type: "button",
2048
+ class: X(e.nextPageText ? "bs-pagination-word-caret" : void 0),
2049
+ title: e.nextPageText,
2050
+ disabled: n.value === r.value,
2051
+ onClick: c
2052
+ }, [
2053
+ e.nextPageText ? (s(), v("span", qa, I(e.nextPageText), 1)) : $("", !0),
2054
+ P(f(Qe))
2055
+ ], 10, Va),
2056
+ e.showFirstLastButtons ? (s(), v("button", {
2057
+ key: 0,
2058
+ type: "button",
2059
+ class: X(e.lastPageText ? "bs-pagination-word-caret" : void 0),
2060
+ title: e.lastPageText,
2061
+ disabled: n.value === r.value,
2062
+ onClick: g
2063
+ }, [
2064
+ e.lastPageText ? (s(), v("span", Ma, I(e.lastPageText), 1)) : $("", !0),
2065
+ P(f(_e))
2066
+ ], 10, za)) : $("", !0)
2067
+ ])) : $("", !0)
2068
+ ], 8, Ba));
2069
+ }
2070
+ }, Nn = {
2071
+ __name: "BsPill",
2072
+ props: {
2073
+ active: { type: Boolean, default: !1 },
2074
+ disabled: { type: Boolean, default: !1 },
2075
+ href: { type: String },
2076
+ router: {},
2077
+ status: {
2078
+ type: String,
2079
+ validator: (e) => ["active", "complete", "inactive", "error", "warning", "positive"].includes(e)
2080
+ },
2081
+ variant: {
2082
+ type: String,
2083
+ validator: (e) => ["filter", "filter-add", "filter-remove", "live"].includes(e)
2084
+ }
2085
+ },
2086
+ setup(e) {
2087
+ const a = e, { onLinkClick: t } = ie(a), l = N(), { rootTag: n, attrsToBind: o } = ge(a, l, "span");
2088
+ return (r, i) => (s(), L(U(f(n)), V({
2089
+ class: "bs-pill",
2090
+ "data-active": e.active,
2091
+ "data-component": "bs-pill",
2092
+ "data-status": e.status || void 0,
2093
+ "data-variant": e.variant || void 0,
2094
+ disabled: e.disabled,
2095
+ href: e.href
2096
+ }, f(o), { onClick: f(t) }), {
2097
+ default: A(() => [
2098
+ k(r.$slots, "default")
2099
+ ]),
2100
+ _: 3
2101
+ }, 16, ["data-active", "data-status", "data-variant", "disabled", "href", "onClick"]));
2102
+ }
2103
+ }, Wn = {
2104
+ __name: "BsProfile",
2105
+ props: {
2106
+ layout: {
2107
+ type: String,
2108
+ default: "vertical",
2109
+ validator: (e) => ["horizontal", "vertical"].includes(e)
2110
+ },
2111
+ href: String,
2112
+ imageSrc: String,
2113
+ imageSize: {
2114
+ type: String,
2115
+ default: "lg",
2116
+ validator: (e) => ["sm", "md", "lg"].includes(e)
2117
+ },
2118
+ initials: String,
2119
+ profileName: String,
2120
+ company: String,
2121
+ jobTitle: String,
2122
+ email: String,
2123
+ action: String,
2124
+ actionIcon: String,
2125
+ miscMeta: String,
2126
+ miscMetaIcon: String,
2127
+ router: Object
2128
+ },
2129
+ emits: ["action-toggled"],
2130
+ setup(e, { emit: a }) {
2131
+ const t = e, l = a, { onLinkClick: n } = ie(t), o = b(() => t.href ? "a" : "div");
2132
+ return (r, i) => (s(), L(U(o.value), {
2133
+ class: "bs-profile",
2134
+ href: e.href,
2135
+ "data-layout": e.layout,
2136
+ onClick: f(n)
2137
+ }, {
2138
+ default: A(() => [
2139
+ P(f(Ka), {
2140
+ src: e.imageSrc,
2141
+ size: e.imageSize,
2142
+ initials: e.initials,
2143
+ "profile-name": e.profileName
2144
+ }, null, 8, ["src", "size", "initials", "profile-name"]),
2145
+ P(f(Fa), {
2146
+ "profile-name": e.profileName,
2147
+ company: e.company,
2148
+ "job-title": e.jobTitle,
2149
+ email: e.email,
2150
+ action: e.action,
2151
+ "action-icon": e.actionIcon,
2152
+ "misc-meta": e.miscMeta,
2153
+ "misc-meta-icon": e.miscMetaIcon,
2154
+ onActionToggled: i[0] || (i[0] = (d) => l("action-toggled"))
2155
+ }, {
2156
+ action: A(() => [
2157
+ k(r.$slots, "action")
2158
+ ]),
2159
+ misc: A(() => [
2160
+ k(r.$slots, "misc")
2161
+ ]),
2162
+ _: 3
2163
+ }, 8, ["profile-name", "company", "job-title", "email", "action", "action-icon", "misc-meta", "misc-meta-icon"])
2164
+ ]),
2165
+ _: 3
2166
+ }, 8, ["href", "data-layout", "onClick"]));
2167
+ }
2168
+ }, Ra = { class: "bs-profile-details" }, Oa = {
2169
+ class: "bs-profile-name",
2170
+ "data-size": "sm",
2171
+ "data-weight": "bold"
2172
+ }, Na = {
2173
+ key: 1,
2174
+ "data-weight": "bold"
2175
+ }, Wa = { key: 2 }, Ga = { key: 3 }, ja = {
2176
+ key: 4,
2177
+ "data-icon": "true"
2178
+ }, Fa = {
2179
+ __name: "BsProfileDetails",
2180
+ props: {
2181
+ profileName: {
2182
+ type: String,
2183
+ required: !0
2184
+ },
2185
+ company: String,
2186
+ jobTitle: String,
2187
+ email: String,
2188
+ action: String,
2189
+ actionIcon: String,
2190
+ miscMeta: String,
2191
+ miscMetaIcon: String
2192
+ },
2193
+ emits: ["action-toggled"],
2194
+ setup(e, { emit: a }) {
2195
+ const t = e, l = a, { icon: n } = le(t.actionIcon), { icon: o } = le(t.miscMetaIcon);
2196
+ function r(i) {
2197
+ i.target.tagName === "BUTTON" && (i.preventDefault(), i.stopImmediatePropagation(), l("action-toggled"));
2198
+ }
2199
+ return (i, d) => (s(), v("div", Ra, [
2200
+ e.action || i.$slots.action ? (s(), v("button", {
2201
+ key: 0,
2202
+ "data-icon": "true",
2203
+ onClick: r
2204
+ }, [
2205
+ k(i.$slots, "action", {}, () => [
2206
+ e.actionIcon ? (s(), L(U(f(n) ? f(n) : "span"), { key: 0 })) : $("", !0),
2207
+ W(" " + I(e.action), 1)
2208
+ ])
2209
+ ])) : $("", !0),
2210
+ m("span", Oa, I(e.profileName), 1),
2211
+ e.company ? (s(), v("span", Na, I(e.company), 1)) : $("", !0),
2212
+ e.jobTitle ? (s(), v("span", Wa, I(e.jobTitle), 1)) : $("", !0),
2213
+ e.email ? (s(), v("span", Ga, I(e.email), 1)) : $("", !0),
2214
+ e.miscMeta || i.$slots.misc ? (s(), v("span", ja, [
2215
+ k(i.$slots, "misc", {}, () => [
2216
+ e.miscMetaIcon ? (s(), L(U(f(o) ? f(o) : "span"), { key: 0 })) : $("", !0),
2217
+ W(" " + I(e.miscMeta), 1)
2218
+ ])
2219
+ ])) : $("", !0)
2220
+ ]));
2221
+ }
2222
+ }, Ua = ["data-img-size", "data-initials", "data-no-img"], Ha = ["src", "alt"], Ka = {
2223
+ __name: "BsProfileImg",
2224
+ props: {
2225
+ src: String,
2226
+ size: String,
2227
+ initials: {
2228
+ type: String,
2229
+ required: !0
2230
+ },
2231
+ profileName: {
2232
+ type: String,
2233
+ required: !0
2234
+ }
2235
+ },
2236
+ setup(e) {
2237
+ const a = e, t = w(!1), l = w(!!a.src);
2238
+ return O(() => t.value = !0), (n, o) => (s(), v("div", {
2239
+ class: "bs-profile-img",
2240
+ "data-img-size": e.size,
2241
+ "data-initials": e.initials,
2242
+ "data-no-img": !l.value
2243
+ }, [
2244
+ l.value && t.value ? (s(), v("img", {
2245
+ key: 0,
2246
+ src: e.src,
2247
+ alt: e.profileName,
2248
+ onError: o[0] || (o[0] = (r) => l.value = !1)
2249
+ }, null, 40, Ha)) : $("", !0)
2250
+ ], 8, Ua));
2251
+ }
2252
+ }, Ya = ["data-size"], Xa = ["checked", "disabled", "id", "required", "value", "data-error"], Gn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2253
+ __name: "BsRadio",
2254
+ props: {
2255
+ label: {
2256
+ type: String
2257
+ },
2258
+ checked: {
2259
+ type: Boolean,
2260
+ default: !1
2261
+ },
2262
+ disabled: {
2263
+ type: Boolean,
2264
+ default: !1
2265
+ },
2266
+ error: {
2267
+ type: Boolean,
2268
+ default: !1
2269
+ },
2270
+ inputId: {
2271
+ type: String,
2272
+ default: ""
2273
+ },
2274
+ passAttrs: {
2275
+ type: String,
2276
+ default: ""
2277
+ },
2278
+ required: {
2279
+ type: Boolean,
2280
+ default: !1
2281
+ },
2282
+ size: {
2283
+ type: String,
2284
+ validator: (e) => e === "sm"
2285
+ },
2286
+ value: {
2287
+ type: String,
2288
+ required: !0
2289
+ },
2290
+ modelValue: {
2291
+ type: String
2292
+ }
2293
+ },
2294
+ emits: ["update:modelValue"],
2295
+ setup(e, { emit: a }) {
2296
+ const t = e, l = N(), [n] = H(), { toChild: o, toRoot: r } = Z(t, l), i = b(() => t.inputId || n.value), d = b(() => t.checked || t.modelValue === t.value);
2297
+ return (u, c) => (s(), v("div", V({
2298
+ class: "bs-boolean",
2299
+ "data-component": "bs-radio",
2300
+ "data-size": e.size
2301
+ }, f(r)), [
2302
+ m("input", V({
2303
+ checked: d.value,
2304
+ disabled: e.disabled,
2305
+ id: i.value,
2306
+ required: e.required,
2307
+ type: "radio",
2308
+ value: e.value,
2309
+ "data-error": e.error
2310
+ }, f(o), {
2311
+ onChange: c[0] || (c[0] = (g) => u.$emit("update:modelValue", g.target.value))
2312
+ }), null, 16, Xa),
2313
+ e.label || u.$slots.label ? (s(), L(f(_), {
2314
+ key: 0,
2315
+ for: i.value,
2316
+ disabled: e.disabled,
2317
+ required: e.required
2318
+ }, {
2319
+ default: A(() => [
2320
+ k(u.$slots, "label", {}, () => [
2321
+ W(I(e.label), 1)
2322
+ ])
2323
+ ]),
2324
+ _: 3
2325
+ }, 8, ["for", "disabled", "required"])) : $("", !0)
2326
+ ], 16, Ya));
2327
+ }
2328
+ }), Za = ["id", "disabled", "required", "data-error", "value"], Ja = {
2329
+ __name: "BsSelect",
2330
+ props: {
2331
+ disabled: { type: Boolean, default: !1 },
2332
+ error: { type: Boolean, default: !1 },
2333
+ hintId: { type: String },
2334
+ inputId: { type: String },
2335
+ modelValue: [String, Number],
2336
+ required: { type: Boolean, default: !1 },
2337
+ value: [String, Number]
2338
+ },
2339
+ emits: ["update:modelValue"],
2340
+ setup(e, { emit: a }) {
2341
+ const t = e, l = b(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
2342
+ return (n, o) => (s(), v("select", V({
2343
+ id: n.$attrs.id || e.inputId,
2344
+ class: "bs-select",
2345
+ "data-component": "bs-select",
2346
+ disabled: e.disabled,
2347
+ required: e.required,
2348
+ "data-error": e.error,
2349
+ value: e.value || e.modelValue
2350
+ }, l.value, {
2351
+ onChange: o[0] || (o[0] = (r) => n.$emit("update:modelValue", r.target.value))
2352
+ }), [
2353
+ k(n.$slots, "default")
2354
+ ], 16, Za));
2355
+ }
2356
+ }, Qa = ["selected", "disabled"], _a = ["disabled", "selected", "value"], jn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2357
+ __name: "BsSelectField",
2358
+ props: {
2359
+ data: {
2360
+ type: Array,
2361
+ default: () => []
2362
+ },
2363
+ /** Sets the disabled state on input, disabled styles on label. */
2364
+ disabled: {
2365
+ type: Boolean,
2366
+ default: !1
2367
+ },
2368
+ /** Applies error styles to the input. */
2369
+ error: {
2370
+ type: Boolean,
2371
+ default: !1
2372
+ },
2373
+ /** Pass error text. */
2374
+ errorMsg: String,
2375
+ /** Pass helper text. */
2376
+ hint: String,
2377
+ /** @Deprecated Use `hint` and/or `errorMsg`. */
2378
+ hints: [String, Array],
2379
+ /** Pass id for the input element. Will also be applied to label attribute. */
2380
+ inputId: String,
2381
+ /** Pass label text. */
2382
+ label: {
2383
+ type: String,
2384
+ required: !0
2385
+ },
2386
+ /** Placeholder attribute for `<input>`. */
2387
+ placeholder: String,
2388
+ /** Sets the required state on the input, append required* indicator to label. */
2389
+ required: {
2390
+ type: Boolean,
2391
+ default: !1
2392
+ },
2393
+ /** Sets the select value - do not use if using `v-model`. */
2394
+ value: [String, Number],
2395
+ /** Sets the select value - `v-model` directive will use this; do not set explicitly. */
2396
+ modelValue: [String, Number]
2397
+ },
2398
+ setup(e) {
2399
+ const a = e, t = N(), [l, n] = H(2), { toChild: o, toRoot: r } = Z(a, t), i = b(() => {
2400
+ var g, p;
2401
+ return ((p = (g = a.hints) == null ? void 0 : g.join) == null ? void 0 : p.call(g, `
2402
+ `)) || a.hints;
2403
+ }), d = b(() => a.error && a.errorMsg || a.hint || i.value || void 0), u = b(() => a.inputId || l.value), c = b(() => a.value || a.modelValue);
2404
+ return (g, p) => (s(), v("div", V({ "data-component": "bs-select-field" }, f(r)), [
2405
+ e.label || g.$slots.label ? (s(), L(f(_), {
2406
+ key: 0,
2407
+ for: u.value,
2408
+ disabled: e.disabled,
2409
+ required: e.required
2410
+ }, {
2411
+ default: A(() => [
2412
+ k(g.$slots, "label", {}, () => [
2413
+ W(I(e.label), 1)
2414
+ ])
2415
+ ]),
2416
+ _: 3
2417
+ }, 8, ["for", "disabled", "required"])) : $("", !0),
2418
+ P(f(Ja), V({
2419
+ disabled: e.disabled,
2420
+ error: e.error,
2421
+ "hint-id": f(n),
2422
+ "input-id": u.value,
2423
+ required: e.required,
2424
+ value: c.value,
2425
+ "onUpdate:modelValue": p[0] || (p[0] = (y) => g.$emit("update:modelValue", y))
2426
+ }, f(o)), {
2427
+ default: A(() => [
2428
+ m("option", {
2429
+ selected: !c.value,
2430
+ value: "",
2431
+ disabled: !!c.value
2432
+ }, I(e.placeholder), 9, Qa),
2433
+ (s(!0), v(R, null, Y(e.data, (y) => (s(), v("option", {
2434
+ key: y.value,
2435
+ disabled: y.disabled,
2436
+ selected: g.validValue === y.value,
2437
+ value: y.value
2438
+ }, I(y.label), 9, _a))), 128))
2439
+ ]),
2440
+ _: 1
2441
+ }, 16, ["disabled", "error", "hint-id", "input-id", "required", "value"]),
2442
+ d.value ? (s(), L(he, {
2443
+ key: 1,
2444
+ "data-disabled": e.disabled,
2445
+ error: e.error,
2446
+ "error-msg": e.errorMsg,
2447
+ hint: e.hint || i.value,
2448
+ "hint-id": f(n)
2449
+ }, null, 8, ["data-disabled", "error", "error-msg", "hint", "hint-id"])) : $("", !0)
2450
+ ], 16));
2451
+ }
2452
+ }), en = ["data-size"], tn = ["data-disabled", "data-pending", "data-size"], an = ["checked", "disabled", "id"], nn = ["data-inner-on-label", "data-inner-off-label"], Fn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2453
+ __name: "BsSwitch",
2454
+ props: {
2455
+ checked: {
2456
+ type: Boolean,
2457
+ default: !1
2458
+ },
2459
+ disabled: {
2460
+ type: Boolean,
2461
+ default: !1
2462
+ },
2463
+ hideLabel: {
2464
+ type: Boolean,
2465
+ default: !1
2466
+ },
2467
+ inputId: {
2468
+ type: String,
2469
+ default: ""
2470
+ },
2471
+ innerOnLabel: {
2472
+ type: String
2473
+ },
2474
+ innerOffLabel: {
2475
+ type: String
2476
+ },
2477
+ label: {
2478
+ type: String
2479
+ },
2480
+ passAttrs: {
2481
+ type: String,
2482
+ default: ""
2483
+ },
2484
+ pending: {
2485
+ type: Boolean,
2486
+ default: !1
2487
+ },
2488
+ size: {
2489
+ type: String,
2490
+ validator: (e) => e === "sm"
2491
+ },
2492
+ modelValue: {
2493
+ type: Boolean
2494
+ }
2495
+ },
2496
+ emits: ["update:modelValue"],
2497
+ setup(e, { emit: a }) {
2498
+ const t = e, l = a, n = N(), [o] = H(), { toChild: r, toRoot: i } = Z(t, n), d = b(() => t.inputId || o.value), u = b(() => t.checked || t.modelValue);
2499
+ return (c, g) => (s(), v("div", V({
2500
+ class: "bs-boolean",
2501
+ "data-component": "bs-switch",
2502
+ "data-size": e.size
2503
+ }, f(i)), [
2504
+ e.label || c.$slots.label ? (s(), L(f(_), {
2505
+ key: 0,
2506
+ for: d.value,
2507
+ disabled: e.disabled,
2508
+ hide: e.hideLabel
2509
+ }, {
2510
+ default: A(() => [
2511
+ k(c.$slots, "label", {}, () => [
2512
+ W(I(e.label), 1)
2513
+ ])
2514
+ ]),
2515
+ _: 3
2516
+ }, 8, ["for", "disabled", "hide"])) : $("", !0),
2517
+ m("div", {
2518
+ class: "bs-switch",
2519
+ "data-disabled": e.disabled,
2520
+ "data-pending": e.pending,
2521
+ "data-size": e.size
2522
+ }, [
2523
+ m("input", V({
2524
+ checked: u.value,
2525
+ disabled: e.disabled,
2526
+ id: d.value,
2527
+ type: "checkbox"
2528
+ }, f(r), {
2529
+ onChange: g[0] || (g[0] = (p) => l("update:modelValue", p.target.checked))
2530
+ }), null, 16, an),
2531
+ m("span", {
2532
+ "aria-hidden": "true",
2533
+ "data-inner-on-label": e.innerOnLabel,
2534
+ "data-inner-off-label": e.innerOffLabel
2535
+ }, null, 8, nn)
2536
+ ], 8, tn)
2537
+ ], 16, en));
2538
+ }
2539
+ }), ln = ["aria-controls", "aria-selected", "data-hidden"], Un = {
2540
+ __name: "BsTab",
2541
+ props: {
2542
+ activeTabId: {
2543
+ type: String,
2544
+ required: !0
2545
+ },
2546
+ hidden: {
2547
+ type: Boolean,
2548
+ default: !1
2549
+ },
2550
+ panelId: {
2551
+ type: String
2552
+ }
2553
+ },
2554
+ emits: ["tabClick"],
2555
+ setup(e, { emit: a }) {
2556
+ const t = e, l = N(), n = w(), o = b(() => t.activeTabId === l.id), r = b(() => t.panelId || `${l.id}-panel`);
2557
+ function i(u) {
2558
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), u.stopPropagation(), d());
2559
+ }
2560
+ function d() {
2561
+ if (t.activeTabId !== l.id) {
2562
+ const u = new CustomEvent("tabClick", { detail: l.id, bubbles: !0 });
2563
+ n.value.dispatchEvent(u);
2564
+ }
2565
+ }
2566
+ return (u, c) => (s(), v("div", {
2567
+ "aria-controls": r.value,
2568
+ "aria-selected": o.value ? "true" : "false",
2569
+ "data-hidden": e.hidden || void 0,
2570
+ "data-component": "bs-tab",
2571
+ role: "tab",
2572
+ tabindex: "0",
2573
+ ref_key: "hostEl",
2574
+ ref: n,
2575
+ onClick: d,
2576
+ onKeydown: i
2577
+ }, [
2578
+ k(u.$slots, "default")
2579
+ ], 40, ln));
2580
+ }
2581
+ }, on = ["id", "data-resizing"], rn = ["aria-controls", "aria-expanded", "data-active", "data-hidden", "id"], sn = 73, dn = 20, un = 16, Hn = {
2582
+ __name: "BsTabList",
2583
+ props: {
2584
+ activeTabId: { type: String, required: !0 },
2585
+ helperText: { type: String, default: "Select a tab" },
2586
+ helperDescription: { type: String },
2587
+ modelValue: { type: String },
2588
+ withBsTabs: { type: Boolean, default: !0 }
2589
+ },
2590
+ emits: ["tabChange", "update:modelValue"],
2591
+ setup(e, { emit: a }) {
2592
+ const t = e, l = a, n = w(!1), o = w(!1), r = w([]), i = w(!1), d = w(!1), u = w(), c = w([]), g = w(!1), p = w([]), y = w(), D = w(), z = w(), [T, x] = H(2), S = b(() => t.activeTabId ? p.value.findIndex((h) => h.id === t.activeTabId) : 0), q = b(() => r.value.some((h) => h.id === t.activeTabId)), G = b(() => `${x.value}-options`), ee = b(() => `${x.value}-toggle`), J = b(() => {
2593
+ var h;
2594
+ return q.value ? (h = p.value[S.value]) == null ? void 0 : h.textContent : "More";
2595
+ }), ke = b(() => q.value ? c.value[S.value] - c.value[S.value - 1] + dn : sn), Q = b(() => {
2596
+ var B, C;
2597
+ let h = [];
2598
+ if (typeof window > "u")
2599
+ return h;
2600
+ for (let M of p.value) {
2601
+ if (((B = M.dataset) == null ? void 0 : B.hidden) === "true" || ((C = M.dataset) == null ? void 0 : C.hidden) === "" || M.getAttribute("tabindex") === "-1")
2602
+ break;
2603
+ h.push(M);
2604
+ }
2605
+ return d.value && h.push(u.value.querySelector(".bs-tab-list-toggle")), h;
2606
+ });
2607
+ function ue() {
2608
+ var K;
2609
+ let h = !1, B, C = 0, M = !1, j = [];
2610
+ if ((K = p.value) != null && K.length) {
2611
+ for (let F = 0; F < p.value.length; F++) {
2612
+ if (B = p.value[F], B.setAttribute("tabindex", "-1"), M && F !== S.value) {
2613
+ B.dataset.hidden = "true", j.push(B);
2614
+ continue;
2615
+ }
2616
+ if (C = F < p.value.length - 1 ? z.value - ke.value : z.value, c.value[F] > C) {
2617
+ B.dataset.hidden = "true", j.push(B), h = !0, M = !0;
2618
+ continue;
2619
+ }
2620
+ B.dataset.hidden = "false", B.setAttribute("tabindex", "0");
2621
+ }
2622
+ d.value = h, r.value = j, n.value || Ue(() => n.value = !0), setTimeout(() => {
2623
+ Ve(), g.value = !0;
2624
+ }, g.value ? 0 : 1e3);
2625
+ }
2626
+ }
2627
+ function ce(h) {
2628
+ l("tabChange", h), l("update:modelValue", h);
2629
+ }
2630
+ function Ie(h) {
2631
+ var M, j, K;
2632
+ const B = (K = (j = (M = p.value[h]) == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : j.call(M)) == null ? void 0 : K.width;
2633
+ return B || (h === 0 ? c.value[0] : c.value[h] - c.value[h - 1]) || 0;
2634
+ }
2635
+ function Te() {
2636
+ var h;
2637
+ (h = p.value[S.value]) == null || h.setAttribute("aria-selected", "true"), ue();
2638
+ }
2639
+ function xe() {
2640
+ var h;
2641
+ (h = y.value) == null || h.focus(), i.value = !1;
2642
+ }
2643
+ function Ce() {
2644
+ i.value = !i.value, o.value || (o.value = !0);
2645
+ }
2646
+ function Ae(h) {
2647
+ var B;
2648
+ i.value = !1, (B = y.value) == null || B.focus(), ce(h);
2649
+ }
2650
+ function Le(h) {
2651
+ if (t.withBsTabs)
2652
+ return;
2653
+ const B = h.target.closest('[role="tab"]');
2654
+ if (!B || B.getAttribute("aria-selected") === "true")
2655
+ return;
2656
+ const C = B.getAttribute("id");
2657
+ ce(C);
2658
+ }
2659
+ function Pe(h) {
2660
+ if (h.key === "ArrowLeft" || h.key === "ArrowRight") {
2661
+ const B = Q.value.findIndex((C) => C.id === h.target.id);
2662
+ if (B === -1)
2663
+ return;
2664
+ h.preventDefault(), h.stopPropagation(), h.key === "ArrowLeft" ? Ee(B) : De(B);
2665
+ }
2666
+ }
2667
+ function De(h) {
2668
+ var C;
2669
+ const B = (h + 1) % Q.value.length;
2670
+ (C = Q.value[B]) == null || C.focus();
2671
+ }
2672
+ function Ee(h) {
2673
+ var C;
2674
+ const B = h === 0 ? Q.value.length - 1 : h - 1;
2675
+ (C = Q.value[B]) == null || C.focus();
2676
+ }
2677
+ function Ve() {
2678
+ var K, F, pe, be;
2679
+ const h = parseInt(u.value.style.getPropertyValue("--active-line-offset")) || 0, B = z.value;
2680
+ let C = 300, M = ((F = (K = Q.value) == null ? void 0 : K[S.value]) == null ? void 0 : F.offsetLeft) || 0, j = Ie(S.value);
2681
+ d.value && q.value && (M = (pe = y.value) == null ? void 0 : pe.offsetLeft, j = (be = y.value) == null ? void 0 : be.offsetWidth), C = Math.max(Math.abs((M - h) / B * 300), 100), u.value.style.setProperty("--active-line-max-width", `${B}px`), u.value.style.setProperty("--active-line-scale", `${j / B}`), u.value.style.setProperty("--active-line-offset", `${M}px`), u.value.style.setProperty("--active-line-transition-duration", `${C}ms`);
2682
+ }
2683
+ function qe() {
2684
+ var h, B;
2685
+ (B = (h = D.value) == null ? void 0 : h.disconnect) == null || B.call(h), D.value = null;
2686
+ }
2687
+ function ze() {
2688
+ D.value = new ResizeObserver((h) => {
2689
+ for (let B of h)
2690
+ z.value = B.contentBoxSize[0].inlineSize;
2691
+ ue();
2692
+ }), D.value.observe(u.value);
2693
+ }
2694
+ function Me() {
2695
+ p.value = Array.from(u.value.children).filter((h) => h.role === "tab");
2696
+ }
2697
+ function Re() {
2698
+ let h;
2699
+ p.value.forEach((B, C) => {
2700
+ h = B.getBoundingClientRect().width + un, c.value.push(C ? h + c.value[C - 1] : h);
2701
+ });
2702
+ }
2703
+ return E(() => t.activeTabId, Te), O(() => {
2704
+ var h;
2705
+ try {
2706
+ Me(), Re(), ze(), z.value = u.value.getBoundingClientRect().width, ue(), t.withBsTabs || (h = p.value[S.value]) == null || h.setAttribute("aria-selected", "true");
2707
+ } catch (B) {
2708
+ console.log("tab error", B);
2709
+ }
2710
+ }), ne(qe), (h, B) => (s(), v("div", {
2711
+ class: "bs-tab-list",
2712
+ "data-component": "bs-tab-list",
2713
+ id: h.$attrs.id || f(T),
2714
+ ref_key: "hostEl",
2715
+ ref: u,
2716
+ role: "tablist",
2717
+ "data-resizing": !n.value || void 0,
2718
+ onClick: Le,
2719
+ "on:tabClick": B[0] || (B[0] = (C) => ce(C.detail)),
2720
+ onKeydown: Pe
2721
+ }, [
2722
+ k(h.$slots, "default"),
2723
+ m("button", {
2724
+ "aria-controls": f(x),
2725
+ "aria-expanded": i.value,
2726
+ class: "bs-tab-list-toggle",
2727
+ "data-active": q.value || void 0,
2728
+ "data-hidden": !d.value,
2729
+ id: ee.value,
2730
+ ref_key: "dropdownToggle",
2731
+ ref: y,
2732
+ onClick: Ce
2733
+ }, [
2734
+ P(f(et), { size: "sm" }),
2735
+ W(" " + I(J.value), 1)
2736
+ ], 8, rn),
2737
+ P(f(Zt), {
2738
+ shown: i.value,
2739
+ id: f(x),
2740
+ class: "bs-tab-list-dropdown",
2741
+ containerId: h.$attrs.id || f(T),
2742
+ helperText: e.helperText,
2743
+ helperDescription: e.helperDescription || void 0,
2744
+ optionsId: G.value,
2745
+ toggleId: ee.value,
2746
+ onClose: xe,
2747
+ onOptselected: Ae
2748
+ }, {
2749
+ default: A(() => [
2750
+ (s(!0), v(R, null, Y(r.value, (C) => (s(), L(f(Kt), {
2751
+ key: C.id,
2752
+ value: C.id,
2753
+ "options-id": G.value
2754
+ }, {
2755
+ default: A(() => [
2756
+ W(I(C.textContent), 1)
2757
+ ]),
2758
+ _: 2
2759
+ }, 1032, ["value", "options-id"]))), 128))
2760
+ ]),
2761
+ _: 1
2762
+ }, 8, ["shown", "id", "containerId", "helperText", "helperDescription", "optionsId", "toggleId"])
2763
+ ], 40, on));
2764
+ }
2765
+ }, cn = ["aria-labelledby", "data-active", "id"], Kn = {
2766
+ __name: "BsTabPanel",
2767
+ props: {
2768
+ activeTabId: {
2769
+ type: String,
2770
+ required: !0
2771
+ },
2772
+ tabId: {
2773
+ type: String,
2774
+ required: !0
2775
+ }
2776
+ },
2777
+ setup(e) {
2778
+ const a = e, t = N(), l = b(() => a.activeTabId && a.activeTabId === a.tabId), n = b(() => t.id || `${a.tabId}-panel`);
2779
+ return (o, r) => (s(), v("section", {
2780
+ "aria-labelledby": e.tabId,
2781
+ "data-active": l.value,
2782
+ "data-component": "bs-tab-panel",
2783
+ id: n.value,
2784
+ role: "tabpanel"
2785
+ }, [
2786
+ k(o.$slots, "default")
2787
+ ], 8, cn));
2788
+ }
2789
+ }, fn = ["data-error", "id", "rows", "value"], vn = {
2790
+ __name: "BsTextarea",
2791
+ props: {
2792
+ error: {
2793
+ type: Boolean,
2794
+ default: !1
2795
+ },
2796
+ hintId: String,
2797
+ /** @Deprecated - Just set `id` since it will fall-through to the inner textarea element. */
2798
+ inputId: String,
2799
+ value: String,
2800
+ modelValue: String
2801
+ },
2802
+ emits: ["update:modelValue"],
2803
+ setup(e, { emit: a }) {
2804
+ const t = e, l = b(() => ({ [t.error ? "aria-errormessage" : "aria-describedby"]: t.hintId }));
2805
+ return (n, o) => (s(), v("textarea", V({
2806
+ "data-component": "bs-textarea",
2807
+ "data-error": e.error,
2808
+ id: n.$attrs.id || e.inputId,
2809
+ rows: n.$attrs.rows || 6,
2810
+ value: e.value || e.modelValue,
2811
+ onInput: o[0] || (o[0] = (r) => n.$emit("update:modelValue", r.target.value))
2812
+ }, l.value), null, 16, fn));
2813
+ }
2814
+ }, Yn = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
2815
+ __name: "BsTextareaField",
2816
+ props: {
2817
+ /** Sets the maximum value this textarea will allow. Will also display character count if present. This does not set maxlength, so users are able to enter text that is longer and edit it down. Enforcement of length must be by the developer. */
2818
+ charMax: Number,
2819
+ /** Sets the disabled state on input, disabled styles on label. */
2820
+ disabled: {
2821
+ type: Boolean,
2822
+ default: !1
2823
+ },
2824
+ /** Applies error styles to the input. */
2825
+ error: {
2826
+ type: Boolean,
2827
+ default: !1
2828
+ },
2829
+ /** Pass error text. */
2830
+ errorMsg: String,
2831
+ /** Pass helper text. */
2832
+ hint: String,
2833
+ /** @Deprecated Use `hint` and/or `errorMsg`. */
2834
+ hints: [String, Array],
2835
+ /** Pass id for the input element. Will also be applied to label attribute. */
2836
+ inputId: String,
2837
+ /** Pass label text. */
2838
+ label: {
2839
+ type: String,
2840
+ required: !0
2841
+ },
2842
+ /** List additional attributes by name (comma-separated) to pass through to `<textarea>`. */
2843
+ passAttrs: {
2844
+ type: String,
2845
+ default: ""
2846
+ },
2847
+ /** Placeholder attribute for `<textarea>`. */
2848
+ placeholder: String,
2849
+ /** Sets the required state on the textarea, append required* indicator to label. */
2850
+ required: {
2851
+ type: Boolean,
2852
+ default: !1
2853
+ },
2854
+ /** Sets the number of rows for the textarea. Defaults to `6`. */
2855
+ rows: {
2856
+ type: Number,
2857
+ default: 6
2858
+ },
2859
+ /** Sets the textarea value - do not use if using `v-model`. */
2860
+ value: String,
2861
+ /** Sets the textarea value - `v-model` directive will use this; do not set explicitly. */
2862
+ modelValue: String
2863
+ },
2864
+ emits: ["update:modelValue"],
2865
+ setup(e, { emit: a }) {
2866
+ const t = e, l = N(), [n, o] = H(2), { toChild: r, toRoot: i } = Z(t, l), d = b(() => {
2867
+ var p;
2868
+ return ((p = t.value || t.modelValue) == null ? void 0 : p.length) || 0;
2869
+ }), u = b(() => {
2870
+ var p, y;
2871
+ return ((y = (p = t.hints) == null ? void 0 : p.join) == null ? void 0 : y.call(p, `
2872
+ `)) || t.hints;
2873
+ }), c = b(() => t.error && t.errorMsg || t.hint || u.value || void 0), g = b(() => t.inputId || n.value);
2874
+ return (p, y) => (s(), v("div", V({ "data-component": "bs-textarea-field" }, f(i)), [
2875
+ e.label || p.$slots.label ? (s(), L(f(_), {
2876
+ key: 0,
2877
+ for: g.value,
2878
+ disabled: e.disabled,
2879
+ required: e.required
2880
+ }, {
2881
+ default: A(() => [
2882
+ k(p.$slots, "label", {}, () => [
2883
+ W(I(e.label), 1)
2884
+ ])
2885
+ ]),
2886
+ _: 3
2887
+ }, 8, ["for", "disabled", "required"])) : $("", !0),
2888
+ P(f(vn), V({
2889
+ disabled: e.disabled,
2890
+ error: e.error,
2891
+ "hint-id": f(o),
2892
+ id: g.value,
2893
+ placeholder: e.placeholder,
2894
+ required: e.required,
2895
+ rows: e.rows,
2896
+ value: e.value || e.modelValue,
2897
+ "onUpdate:modelValue": y[0] || (y[0] = (D) => p.$emit("update:modelValue", D))
2898
+ }, f(r)), null, 16, ["disabled", "error", "hint-id", "id", "placeholder", "required", "rows", "value"]),
2899
+ c.value || e.charMax ? (s(), L(he, {
2900
+ key: 1,
2901
+ "char-count": d.value,
2902
+ "char-max": e.charMax,
2903
+ "data-disabled": e.disabled,
2904
+ error: e.error,
2905
+ "error-msg": e.errorMsg,
2906
+ hint: e.hint || u.value,
2907
+ "hint-id": f(o)
2908
+ }, null, 8, ["char-count", "char-max", "data-disabled", "error", "error-msg", "hint", "hint-id"])) : $("", !0)
2909
+ ], 16));
2910
+ }
2911
+ }), gn = ["data-variant", "data-stacked"], Xn = {
2912
+ __name: "BsToast",
2913
+ props: {
2914
+ shown: {
2915
+ type: Boolean,
2916
+ default: !0
2917
+ },
2918
+ preloaded: {
2919
+ type: Boolean,
2920
+ default: !1
2921
+ },
2922
+ toastId: {
2923
+ type: String,
2924
+ required: !0
2925
+ },
2926
+ variant: {
2927
+ type: String,
2928
+ default: void 0,
2929
+ validator: (e) => ["warning", "positive", "negative"].includes(e)
2930
+ },
2931
+ stacked: {
2932
+ type: Boolean,
2933
+ default: !1
2934
+ },
2935
+ duration: {
2936
+ type: Number,
2937
+ default: 1e4
2938
+ },
2939
+ /** @Deprecated - Use 'preloaded' instead. */
2940
+ enterControlled: {
2941
+ type: Boolean,
2942
+ default: !1
2943
+ },
2944
+ /** @Deprecated - Use 'shown' instead. */
2945
+ enterTrigger: {
2946
+ type: Boolean,
2947
+ default: !1
2948
+ },
2949
+ /** @Deprecated - Not used anymore. Handled via 'shown'. */
2950
+ leaveTrigger: {
2951
+ type: Boolean,
2952
+ default: !1
2953
+ }
2954
+ },
2955
+ emits: ["dismiss", "after-enter", "after-leave"],
2956
+ setup(e, { emit: a }) {
2957
+ const t = e, l = a, { transition: n } = se(t);
2958
+ let o = null;
2959
+ ae("variant", t.variant), ae("handleDismiss", i);
2960
+ const r = te("stacked", t.stacked);
2961
+ function i() {
2962
+ o && (clearTimeout(o), o = null), l("dismiss", t.toastId);
2963
+ }
2964
+ function d() {
2965
+ t.duration > 0 && (o = setTimeout(() => {
2966
+ i();
2967
+ }, t.duration)), l("after-enter");
2968
+ }
2969
+ return (u, c) => (s(), L(f(de), {
2970
+ shown: f(n),
2971
+ preloaded: e.preloaded,
2972
+ duration: 200,
2973
+ "enter-attribute": "data-shown",
2974
+ onAfterEnter: d,
2975
+ onAfterLeave: c[0] || (c[0] = (g) => l("after-leave"))
2976
+ }, {
2977
+ default: A(() => [
2978
+ m("div", {
2979
+ class: "bs-toast",
2980
+ "data-variant": e.variant,
2981
+ "data-stacked": f(r) || void 0,
2982
+ "aria-role": "alert"
2983
+ }, [
2984
+ k(u.$slots, "default")
2985
+ ], 8, gn)
2986
+ ]),
2987
+ _: 3
2988
+ }, 8, ["shown", "preloaded"]));
2989
+ }
2990
+ }, hn = ["data-stacked"], Zn = {
2991
+ __name: "BsToastActions",
2992
+ setup(e) {
2993
+ const a = w(!1);
2994
+ O(() => {
2995
+ var n;
2996
+ const l = He();
2997
+ ((n = l.default) == null ? void 0 : n.call(l).length) > 2 && (a.value = !0);
2998
+ });
2999
+ const t = te("handleDismiss");
3000
+ return (l, n) => (s(), v("div", {
3001
+ class: "bs-toast-actions",
3002
+ "data-stacked": a.value || void 0
3003
+ }, [
3004
+ k(l.$slots, "default", {}, () => [
3005
+ P(wt, {
3006
+ size: "sm",
3007
+ "text-btn": "",
3008
+ onClick: f(t)
3009
+ }, {
3010
+ default: A(() => [
3011
+ W(" Dismiss ")
3012
+ ]),
3013
+ _: 1
3014
+ }, 8, ["onClick"])
3015
+ ])
3016
+ ], 8, hn));
3017
+ }
3018
+ }, pn = (e, a) => {
3019
+ const t = e.__vccOpts || e;
3020
+ for (const [l, n] of a)
3021
+ t[l] = n;
3022
+ return t;
3023
+ }, bn = {}, mn = { class: "bs-toast-body" };
3024
+ function yn(e, a) {
3025
+ return s(), v("div", mn, [
3026
+ k(e.$slots, "default")
3027
+ ]);
3028
+ }
3029
+ const Jn = /* @__PURE__ */ pn(bn, [["render", yn]]), Bn = ["data-variant"], Qn = {
3030
+ __name: "BsToastHeader",
3031
+ setup(e) {
3032
+ const a = te("variant"), t = b(() => {
3033
+ switch (a) {
3034
+ case "warning":
3035
+ return ve;
3036
+ case "positive":
3037
+ return at;
3038
+ case "negative":
3039
+ return ve;
3040
+ default:
3041
+ return tt;
3042
+ }
3043
+ });
3044
+ return (l, n) => (s(), v("div", {
3045
+ class: "bs-toast-header",
3046
+ "data-variant": f(a)
3047
+ }, [
3048
+ (s(), L(U(t.value), { class: "bs-toast-header-icon" })),
3049
+ m("h5", null, [
3050
+ k(l.$slots, "default")
3051
+ ])
3052
+ ], 8, Bn));
3053
+ }
3054
+ }, $n = { class: "bs-toaster" }, _n = {
3055
+ __name: "BsToaster",
3056
+ setup(e) {
3057
+ return ae("stacked", !0), (a, t) => (s(), v("div", $n, [
3058
+ k(a.$slots, "default")
3059
+ ]));
3060
+ }
3061
+ }, Sn = ["data-position"], wn = ["id"], el = {
3062
+ __name: "BsTooltip",
3063
+ props: {
3064
+ tooltipId: {
3065
+ type: String,
3066
+ required: !0
3067
+ },
3068
+ content: {
3069
+ type: String,
3070
+ required: !0
3071
+ },
3072
+ position: {
3073
+ type: String,
3074
+ default: "top",
3075
+ validator: (e) => [
3076
+ "top",
3077
+ "top-left",
3078
+ "top-right",
3079
+ "right",
3080
+ "bottom",
3081
+ "bottom-left",
3082
+ "bottom-right",
3083
+ "left"
3084
+ ].includes(e)
3085
+ }
3086
+ },
3087
+ setup(e) {
3088
+ const a = e, t = w(!1), l = w(!1), n = b(() => {
3089
+ let i = "bs-tooltip-text";
3090
+ return l.value && (a.position === void 0 || a.position === "top" || a.position === "bottom" ? i += " escaped-x" : a.position === "left" || a.position === "right" ? i += " escaped-y" : i += " escaped"), i;
3091
+ });
3092
+ re(["Escape"], () => {
3093
+ t.value && (t.value = !1, l.value = !0);
3094
+ });
3095
+ function o() {
3096
+ t.value = !0;
3097
+ }
3098
+ function r() {
3099
+ t.value = !1, l.value = !1;
3100
+ }
3101
+ return (i, d) => (s(), v("div", {
3102
+ class: "bs-tooltip",
3103
+ "data-position": e.position || void 0,
3104
+ "data-component": "bs-tooltip",
3105
+ onMouseenter: o,
3106
+ onFocusin: o,
3107
+ onMouseleave: r,
3108
+ onFocusout: r
3109
+ }, [
3110
+ k(i.$slots, "default"),
3111
+ e.content ? (s(), v("div", {
3112
+ key: 0,
3113
+ class: X(n.value),
3114
+ id: e.tooltipId,
3115
+ role: "tooltip"
3116
+ }, I(e.content), 11, wn)) : $("", !0)
3117
+ ], 40, Sn));
3118
+ }
3119
+ };
3120
+ export {
3121
+ Cn as BsAccordion,
3122
+ An as BsBadge,
3123
+ Ln as BsBanner,
3124
+ wt as BsButton,
3125
+ Pn as BsChartBar,
3126
+ Dn as BsCheckbox,
3127
+ En as BsCircleButton,
3128
+ Ut as BsDropdown,
3129
+ Kt as BsDropdownOption,
3130
+ Xt as BsDropdownOptionList,
3131
+ Zt as BsDropdownWithOptions,
3132
+ Vn as BsIconGradientWrapper,
3133
+ we as BsInput,
3134
+ aa as BsInputAddon,
3135
+ qn as BsInputField,
3136
+ zn as BsInputSearch,
3137
+ _ as BsLabel,
3138
+ Mn as BsLoader,
3139
+ Rn as BsModal,
3140
+ ba as BsOverlay,
3141
+ On as BsPagination,
3142
+ Nn as BsPill,
3143
+ Wn as BsProfile,
3144
+ Fa as BsProfileDetails,
3145
+ Ka as BsProfileImg,
3146
+ Gn as BsRadio,
3147
+ Ja as BsSelect,
3148
+ jn as BsSelectField,
3149
+ Fn as BsSwitch,
3150
+ Un as BsTab,
3151
+ Hn as BsTabList,
3152
+ Kn as BsTabPanel,
3153
+ vn as BsTextarea,
3154
+ Yn as BsTextareaField,
3155
+ Xn as BsToast,
3156
+ Zn as BsToastActions,
3157
+ Jn as BsToastBody,
3158
+ Qn as BsToastHeader,
3159
+ _n as BsToaster,
3160
+ el as BsTooltip,
3161
+ de as BsTransition
3162
+ };