golden-logic-ui 1.0.99 → 1.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/golden-logic-ui.js +81 -80
- package/dist/golden-logic-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/golden-logic-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as d, createElementBlock as u, createElementVNode as s, createCommentVNode as f, createStaticVNode as Qe, inject as Ce, watch as Y, effectScope as et, computed as L, reactive as Se, resolveComponent as X, Fragment as v, createVNode as
|
|
1
|
+
import { openBlock as d, createElementBlock as u, createElementVNode as s, createCommentVNode as f, createStaticVNode as Qe, inject as Ce, watch as Y, effectScope as et, computed as L, reactive as Se, resolveComponent as X, Fragment as v, createVNode as z, normalizeClass as b, toDisplayString as h, withModifiers as N, withDirectives as O, vModelText as V, renderList as $, normalizeStyle as tt, renderSlot as T, createTextVNode as w, vShow as Z, createBlock as K, resolveDynamicComponent as oe, mergeProps as W, withCtx as J, ref as C, onMounted as F, vModelDynamic as rt, provide as st, pushScopeId as at, popScopeId as nt, vModelCheckbox as ot, nextTick as lt, isRef as it, unref as De, toHandlers as ae, TransitionGroup as dt, resolveDirective as Oe, markRaw as ut } from "vue";
|
|
2
2
|
const k = (e, t) => {
|
|
3
3
|
const r = e.__vccOpts || e;
|
|
4
4
|
for (const [n, o] of t)
|
|
@@ -58,10 +58,10 @@ function Pe() {
|
|
|
58
58
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
59
59
|
}
|
|
60
60
|
const xt = typeof Proxy == "function", wt = "devtools-plugin:setup", kt = "plugin:settings:set";
|
|
61
|
-
let
|
|
61
|
+
let q, le;
|
|
62
62
|
function $t() {
|
|
63
63
|
var e;
|
|
64
|
-
return
|
|
64
|
+
return q !== void 0 || (typeof window < "u" && window.performance ? (q = !0, le = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (q = !0, le = globalThis.perf_hooks.performance) : q = !1), q;
|
|
65
65
|
}
|
|
66
66
|
function Ct() {
|
|
67
67
|
return $t() ? le.now() : Date.now();
|
|
@@ -150,7 +150,7 @@ var Ee = "store";
|
|
|
150
150
|
function Ae(e) {
|
|
151
151
|
return e === void 0 && (e = null), Ce(e !== null ? e : Ee);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function R(e, t) {
|
|
154
154
|
Object.keys(e).forEach(function(r) {
|
|
155
155
|
return t(e[r], r);
|
|
156
156
|
});
|
|
@@ -186,7 +186,7 @@ function ce(e, t, r) {
|
|
|
186
186
|
e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
|
|
187
187
|
var a = e._wrappedGetters, i = {}, l = {}, c = et(!0);
|
|
188
188
|
c.run(function() {
|
|
189
|
-
|
|
189
|
+
R(a, function(g, m) {
|
|
190
190
|
i[m] = Pt(g, e), l[m] = L(function() {
|
|
191
191
|
return i[m]();
|
|
192
192
|
}), Object.defineProperty(e.getters, m, {
|
|
@@ -333,7 +333,7 @@ function fe(e, t) {
|
|
|
333
333
|
function Q(e, t, r) {
|
|
334
334
|
return je(e) && e.type && (r = t, t = e, e = e.type), process.env.NODE_ENV !== "production" && I(typeof e == "string", "expects string as the type, but found " + typeof e + "."), { type: e, payload: t, options: r };
|
|
335
335
|
}
|
|
336
|
-
var Mt = "vuex bindings", ve = "vuex:mutations", ne = "vuex:actions",
|
|
336
|
+
var Mt = "vuex bindings", ve = "vuex:mutations", ne = "vuex:actions", H = "vuex", Nt = 0;
|
|
337
337
|
function Vt(e, t) {
|
|
338
338
|
Dt(
|
|
339
339
|
{
|
|
@@ -355,12 +355,12 @@ function Vt(e, t) {
|
|
|
355
355
|
label: "Vuex Actions",
|
|
356
356
|
color: xe
|
|
357
357
|
}), r.addInspector({
|
|
358
|
-
id:
|
|
358
|
+
id: H,
|
|
359
359
|
label: "Vuex",
|
|
360
360
|
icon: "storage",
|
|
361
361
|
treeFilterPlaceholder: "Filter stores..."
|
|
362
362
|
}), r.on.getInspectorTree(function(n) {
|
|
363
|
-
if (n.app === e && n.inspectorId ===
|
|
363
|
+
if (n.app === e && n.inspectorId === H)
|
|
364
364
|
if (n.filter) {
|
|
365
365
|
var o = [];
|
|
366
366
|
Be(o, t._modules.root, n.filter, ""), n.rootNodes = o;
|
|
@@ -369,7 +369,7 @@ function Vt(e, t) {
|
|
|
369
369
|
Le(t._modules.root, "")
|
|
370
370
|
];
|
|
371
371
|
}), r.on.getInspectorState(function(n) {
|
|
372
|
-
if (n.app === e && n.inspectorId ===
|
|
372
|
+
if (n.app === e && n.inspectorId === H) {
|
|
373
373
|
var o = n.nodeId;
|
|
374
374
|
Me(t, o), n.state = Gt(
|
|
375
375
|
Rt(t._modules, o),
|
|
@@ -378,7 +378,7 @@ function Vt(e, t) {
|
|
|
378
378
|
);
|
|
379
379
|
}
|
|
380
380
|
}), r.on.editInspectorState(function(n) {
|
|
381
|
-
if (n.app === e && n.inspectorId ===
|
|
381
|
+
if (n.app === e && n.inspectorId === H) {
|
|
382
382
|
var o = n.nodeId, a = n.path;
|
|
383
383
|
o !== "root" && (a = o.split("/").filter(Boolean).concat(a)), t._withCommit(function() {
|
|
384
384
|
n.set(t._state.data, a, n.state.value);
|
|
@@ -386,7 +386,7 @@ function Vt(e, t) {
|
|
|
386
386
|
}
|
|
387
387
|
}), t.subscribe(function(n, o) {
|
|
388
388
|
var a = {};
|
|
389
|
-
n.payload && (a.payload = n.payload), a.state = o, r.notifyComponentUpdate(), r.sendInspectorTree(
|
|
389
|
+
n.payload && (a.payload = n.payload), a.state = o, r.notifyComponentUpdate(), r.sendInspectorTree(H), r.sendInspectorState(H), r.addTimelineEvent({
|
|
390
390
|
layerId: ve,
|
|
391
391
|
event: {
|
|
392
392
|
time: Date.now(),
|
|
@@ -561,36 +561,36 @@ M.prototype.update = function(t) {
|
|
|
561
561
|
this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
|
|
562
562
|
};
|
|
563
563
|
M.prototype.forEachChild = function(t) {
|
|
564
|
-
|
|
564
|
+
R(this._children, t);
|
|
565
565
|
};
|
|
566
566
|
M.prototype.forEachGetter = function(t) {
|
|
567
|
-
this._rawModule.getters &&
|
|
567
|
+
this._rawModule.getters && R(this._rawModule.getters, t);
|
|
568
568
|
};
|
|
569
569
|
M.prototype.forEachAction = function(t) {
|
|
570
|
-
this._rawModule.actions &&
|
|
570
|
+
this._rawModule.actions && R(this._rawModule.actions, t);
|
|
571
571
|
};
|
|
572
572
|
M.prototype.forEachMutation = function(t) {
|
|
573
|
-
this._rawModule.mutations &&
|
|
573
|
+
this._rawModule.mutations && R(this._rawModule.mutations, t);
|
|
574
574
|
};
|
|
575
575
|
Object.defineProperties(M.prototype, Ge);
|
|
576
|
-
var
|
|
576
|
+
var U = function(t) {
|
|
577
577
|
this.register([], t, !1);
|
|
578
578
|
};
|
|
579
|
-
|
|
579
|
+
U.prototype.get = function(t) {
|
|
580
580
|
return t.reduce(function(r, n) {
|
|
581
581
|
return r.getChild(n);
|
|
582
582
|
}, this.root);
|
|
583
583
|
};
|
|
584
|
-
|
|
584
|
+
U.prototype.getNamespace = function(t) {
|
|
585
585
|
var r = this.root;
|
|
586
586
|
return t.reduce(function(n, o) {
|
|
587
587
|
return r = r.getChild(o), n + (r.namespaced ? o + "/" : "");
|
|
588
588
|
}, "");
|
|
589
589
|
};
|
|
590
|
-
|
|
590
|
+
U.prototype.update = function(t) {
|
|
591
591
|
Fe([], this.root, t);
|
|
592
592
|
};
|
|
593
|
-
|
|
593
|
+
U.prototype.register = function(t, r, n) {
|
|
594
594
|
var o = this;
|
|
595
595
|
n === void 0 && (n = !0), process.env.NODE_ENV !== "production" && Re(t, r);
|
|
596
596
|
var a = new M(r, n);
|
|
@@ -600,11 +600,11 @@ q.prototype.register = function(t, r, n) {
|
|
|
600
600
|
var i = this.get(t.slice(0, -1));
|
|
601
601
|
i.addChild(t[t.length - 1], a);
|
|
602
602
|
}
|
|
603
|
-
r.modules &&
|
|
603
|
+
r.modules && R(r.modules, function(l, c) {
|
|
604
604
|
o.register(t.concat(c), l, n);
|
|
605
605
|
});
|
|
606
606
|
};
|
|
607
|
-
|
|
607
|
+
U.prototype.unregister = function(t) {
|
|
608
608
|
var r = this.get(t.slice(0, -1)), n = t[t.length - 1], o = r.getChild(n);
|
|
609
609
|
if (!o) {
|
|
610
610
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
@@ -614,7 +614,7 @@ q.prototype.unregister = function(t) {
|
|
|
614
614
|
}
|
|
615
615
|
o.runtime && r.removeChild(n);
|
|
616
616
|
};
|
|
617
|
-
|
|
617
|
+
U.prototype.isRegistered = function(t) {
|
|
618
618
|
var r = this.get(t.slice(0, -1)), n = t[t.length - 1];
|
|
619
619
|
return r ? r.hasChild(n) : !1;
|
|
620
620
|
};
|
|
@@ -653,7 +653,7 @@ function Re(e, t) {
|
|
|
653
653
|
Object.keys(ke).forEach(function(r) {
|
|
654
654
|
if (t[r]) {
|
|
655
655
|
var n = ke[r];
|
|
656
|
-
|
|
656
|
+
R(t[r], function(o, a) {
|
|
657
657
|
I(
|
|
658
658
|
n.assert(o),
|
|
659
659
|
qt(e, r, a, o, n.expected)
|
|
@@ -674,7 +674,7 @@ var A = function e(t) {
|
|
|
674
674
|
var o = t.strict;
|
|
675
675
|
o === void 0 && (o = !1);
|
|
676
676
|
var a = t.devtools;
|
|
677
|
-
this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new
|
|
677
|
+
this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new U(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null), this._scope = null, this._devtools = a;
|
|
678
678
|
var i = this, l = this, c = l.dispatch, g = l.commit;
|
|
679
679
|
this.dispatch = function(x, S) {
|
|
680
680
|
return c.call(i, x, S);
|
|
@@ -1028,7 +1028,7 @@ const Zt = {
|
|
|
1028
1028
|
function kr(e, t, r, n, o, a) {
|
|
1029
1029
|
const i = X("DeleteConfirmationModal");
|
|
1030
1030
|
return d(), u(v, null, [
|
|
1031
|
-
|
|
1031
|
+
z(i, {
|
|
1032
1032
|
isOpen: o.open_delete_modal,
|
|
1033
1033
|
onConfirmDelete: a.deleteAction,
|
|
1034
1034
|
onCancelDelete: a.closeDeleteModal
|
|
@@ -1060,7 +1060,7 @@ function kr(e, t, r, n, o, a) {
|
|
|
1060
1060
|
multiple: r.has_multiple_file,
|
|
1061
1061
|
onChange: t[0] || (t[0] = (...l) => a.uploadFiles && a.uploadFiles(...l))
|
|
1062
1062
|
}, null, 40, Wt),
|
|
1063
|
-
|
|
1063
|
+
O(s("input", {
|
|
1064
1064
|
type: "hidden",
|
|
1065
1065
|
name: r.field_name,
|
|
1066
1066
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => a.uploadedFileIds = l)
|
|
@@ -1547,12 +1547,12 @@ function os(e, t, r, n, o, a) {
|
|
|
1547
1547
|
style: { top: "11px" }
|
|
1548
1548
|
}, null, 2)
|
|
1549
1549
|
]),
|
|
1550
|
-
|
|
1550
|
+
O(s("div", Jr, [
|
|
1551
1551
|
s("div", Qr, [
|
|
1552
1552
|
es,
|
|
1553
1553
|
s("div", ts, [
|
|
1554
1554
|
rs,
|
|
1555
|
-
|
|
1555
|
+
O(s("input", {
|
|
1556
1556
|
type: "search",
|
|
1557
1557
|
"onUpdate:modelValue": t[3] || (t[3] = (i) => o.searchFilter = i),
|
|
1558
1558
|
id: r.field_name + "search",
|
|
@@ -1579,7 +1579,7 @@ function os(e, t, r, n, o, a) {
|
|
|
1579
1579
|
}, h(i.name || i.id || "-"), 43, ns))), 128))
|
|
1580
1580
|
])
|
|
1581
1581
|
], 512), [
|
|
1582
|
-
[
|
|
1582
|
+
[Z, o.optionsShown]
|
|
1583
1583
|
])
|
|
1584
1584
|
])
|
|
1585
1585
|
])) : f("", !0)
|
|
@@ -1747,7 +1747,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
1747
1747
|
emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
|
|
1748
1748
|
setup(e, { expose: t, emit: r }) {
|
|
1749
1749
|
const n = e, o = r, a = C(null), i = C(null);
|
|
1750
|
-
return
|
|
1750
|
+
return F(() => {
|
|
1751
1751
|
a.value !== null && a.value.hasAttribute("autofocus") && a.value.focus(), n.model_value && (o("update:modelValue", n.model_value), a.value.value = n.model_value), n.model_value_translate, n.translatable && axios.post("/admin/get_field_translations", {
|
|
1752
1752
|
model: n.translatable.model,
|
|
1753
1753
|
row_id: n.translatable.row_id,
|
|
@@ -1763,7 +1763,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
1763
1763
|
class: b(e.field_name)
|
|
1764
1764
|
}, [
|
|
1765
1765
|
s("h3", us, h(e.label_name), 1),
|
|
1766
|
-
|
|
1766
|
+
O(s("input", {
|
|
1767
1767
|
type: "hidden",
|
|
1768
1768
|
"data-i18n": "true",
|
|
1769
1769
|
name: e.field_name + "_i18n",
|
|
@@ -1883,7 +1883,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
1883
1883
|
emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
|
|
1884
1884
|
setup(e, { expose: t, emit: r }) {
|
|
1885
1885
|
const n = e, o = r, a = C(null), i = C(null);
|
|
1886
|
-
return
|
|
1886
|
+
return F(() => {
|
|
1887
1887
|
tinymce.init({
|
|
1888
1888
|
selector: "#" + n.field_name,
|
|
1889
1889
|
width: "100%",
|
|
@@ -1903,7 +1903,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
1903
1903
|
class: b(e.field_name)
|
|
1904
1904
|
}, [
|
|
1905
1905
|
s("h3", vs, h(e.label_name), 1),
|
|
1906
|
-
|
|
1906
|
+
O(s("input", {
|
|
1907
1907
|
type: "hidden",
|
|
1908
1908
|
"data-i18n": "true",
|
|
1909
1909
|
name: e.field_name + "_i18n",
|
|
@@ -2022,7 +2022,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
2022
2022
|
emits: ["update:modelValue", "update:modelValueTranslate", "keydown"],
|
|
2023
2023
|
setup(e, { expose: t, emit: r }) {
|
|
2024
2024
|
const n = e, o = r, a = C(null), i = C(null);
|
|
2025
|
-
return
|
|
2025
|
+
return F(() => {
|
|
2026
2026
|
a.value !== null && a.value.hasAttribute("autofocus") && a.value.focus(), n.model_value && (o("update:modelValue", n.model_value), a.value.value = n.model_value), n.model_value_translate, n.translatable && axios.post("/admin/get_field_translations", {
|
|
2027
2027
|
model: n.translatable.model,
|
|
2028
2028
|
row_id: n.translatable.row_id,
|
|
@@ -2038,7 +2038,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
2038
2038
|
class: b(e.field_name)
|
|
2039
2039
|
}, [
|
|
2040
2040
|
s("h3", Es, h(e.label_name), 1),
|
|
2041
|
-
|
|
2041
|
+
O(s("input", {
|
|
2042
2042
|
type: "hidden",
|
|
2043
2043
|
"data-i18n": "true",
|
|
2044
2044
|
name: e.field_name + "_i18n",
|
|
@@ -2143,7 +2143,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
2143
2143
|
emits: ["update:modelValue", "keydown"],
|
|
2144
2144
|
setup(e, { expose: t, emit: r }) {
|
|
2145
2145
|
const n = e, o = r, a = C(null);
|
|
2146
|
-
|
|
2146
|
+
F(() => {
|
|
2147
2147
|
a.value !== null && a.value.hasAttribute("autofocus") && a.value.focus();
|
|
2148
2148
|
});
|
|
2149
2149
|
const i = L({
|
|
@@ -2175,7 +2175,7 @@ const cu = /* @__PURE__ */ k(ls, [["render", ds]]), us = { class: "font-bold pte
|
|
|
2175
2175
|
}),
|
|
2176
2176
|
for: e.field_name
|
|
2177
2177
|
}, h(e.label_name), 11, Us),
|
|
2178
|
-
|
|
2178
|
+
O(s("input", {
|
|
2179
2179
|
required: e.is_required,
|
|
2180
2180
|
name: e.field_name,
|
|
2181
2181
|
id: e.field_name,
|
|
@@ -2244,13 +2244,14 @@ const bu = /* @__PURE__ */ k(Zs, [["render", ta]]), ra = {
|
|
|
2244
2244
|
selectedTitle: Ce("selectedTitle")
|
|
2245
2245
|
};
|
|
2246
2246
|
}
|
|
2247
|
-
}, sa = {
|
|
2247
|
+
}, sa = {
|
|
2248
|
+
key: 0,
|
|
2249
|
+
class: "block"
|
|
2250
|
+
};
|
|
2248
2251
|
function aa(e, t, r, n, o, a) {
|
|
2249
|
-
return
|
|
2252
|
+
return r.title == n.selectedTitle ? (d(), u("div", sa, [
|
|
2250
2253
|
T(e.$slots, "default")
|
|
2251
|
-
]
|
|
2252
|
-
[F, r.title == n.selectedTitle]
|
|
2253
|
-
]);
|
|
2254
|
+
])) : f("", !0);
|
|
2254
2255
|
}
|
|
2255
2256
|
const pu = /* @__PURE__ */ k(ra, [["render", aa]]), na = {
|
|
2256
2257
|
props: {
|
|
@@ -2708,7 +2709,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2708
2709
|
l ? o() : a();
|
|
2709
2710
|
},
|
|
2710
2711
|
{ immediate: !0, deep: !0 }
|
|
2711
|
-
), (l, c) =>
|
|
2712
|
+
), (l, c) => O((d(), u("div", cn, [
|
|
2712
2713
|
s("div", {
|
|
2713
2714
|
class: b(["pointer-events-none relative h-[calc(100%-1rem)] w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:h-[calc(100%-3.5rem)]", e.max_width])
|
|
2714
2715
|
}, [
|
|
@@ -2738,7 +2739,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2738
2739
|
])
|
|
2739
2740
|
], 2)
|
|
2740
2741
|
], 512)), [
|
|
2741
|
-
[
|
|
2742
|
+
[Z, e.is_open]
|
|
2742
2743
|
]);
|
|
2743
2744
|
}
|
|
2744
2745
|
}, yn = { class: "mb-4" }, _n = { class: "flex justify-between px-6 py-3 -mb-px border border-gray-300 no-underlin" }, vn = { class: "relative inline-flex items-center cursor-pointer" }, xn = ["name", "id", "checked"], wn = /* @__PURE__ */ s("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1), kn = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), $n = { class: "flex justify-between px-6 py-3 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-frontenddark" }, Cn = { class: "relative inline-flex items-center cursor-pointer" }, Sn = ["name", "id"], Dn = /* @__PURE__ */ s("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" }, null, -1), On = { class: "gl-span-form-error" }, Pn = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, vu = {
|
|
@@ -2825,7 +2826,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2825
2826
|
s("li", $n, [
|
|
2826
2827
|
w(h(e.label_name) + " ", 1),
|
|
2827
2828
|
s("label", Cn, [
|
|
2828
|
-
|
|
2829
|
+
O(s("input", {
|
|
2829
2830
|
type: "checkbox",
|
|
2830
2831
|
class: "sr-only peer",
|
|
2831
2832
|
name: e.field_name,
|
|
@@ -2849,7 +2850,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2849
2850
|
}, En = { class: "font-bold ptext-lg dark:text-white" }, An = { class: "mt-3 mb-4" }, jn = { class: "bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300" }, Tn = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), In = ["name", "id", "value"], Mn = {
|
|
2850
2851
|
key: 0,
|
|
2851
2852
|
class: "dropdown"
|
|
2852
|
-
}, Nn = { class: "
|
|
2853
|
+
}, Nn = { class: "focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, Vn = { class: "relative showOptions" }, Ln = ["value", "placeholder"], Bn = { class: "text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999]" }, Gn = { class: "p-1" }, Fn = /* @__PURE__ */ s("label", {
|
|
2853
2854
|
for: "default-search",
|
|
2854
2855
|
class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
|
|
2855
2856
|
}, "Search", -1), Rn = { class: "relative" }, Un = /* @__PURE__ */ s("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, [
|
|
@@ -2944,7 +2945,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2944
2945
|
emits: ["update:modelValue", "selected", "selectionChanged"],
|
|
2945
2946
|
setup(e, { emit: t }) {
|
|
2946
2947
|
const r = e, n = t, o = C(null), a = C({}), i = C(0), l = C(!1), c = C(""), g = C("");
|
|
2947
|
-
|
|
2948
|
+
F(() => {
|
|
2948
2949
|
g.value = B(), r.show || (document.body.addEventListener("click", (p) => {
|
|
2949
2950
|
ze(p);
|
|
2950
2951
|
}), document.addEventListener("keypress", (p) => {
|
|
@@ -2952,10 +2953,10 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2952
2953
|
}));
|
|
2953
2954
|
});
|
|
2954
2955
|
const m = L(() => We()), y = L(() => Ye()), x = L(() => {
|
|
2955
|
-
const p = [],
|
|
2956
|
+
const p = [], D = new RegExp(c.value, "ig");
|
|
2956
2957
|
for (const E of m.value) {
|
|
2957
2958
|
const G = String(E.name);
|
|
2958
|
-
(c.value.length < 1 || G.match(
|
|
2959
|
+
(c.value.length < 1 || G.match(D)) && p.length < r.maxItem && p.push(E);
|
|
2959
2960
|
}
|
|
2960
2961
|
return p;
|
|
2961
2962
|
});
|
|
@@ -2989,18 +2990,18 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
2989
2990
|
p.target.id != r.field_name + "search" + g.value && p.target.id != r.field_name && !p.target.classList.contains("showOptions") && (pe(), i.value = 0);
|
|
2990
2991
|
}
|
|
2991
2992
|
function me(p) {
|
|
2992
|
-
const
|
|
2993
|
+
const D = `${p}${g.value}`, E = document.getElementById(D);
|
|
2993
2994
|
E && E.scrollIntoView();
|
|
2994
2995
|
}
|
|
2995
2996
|
function Ze(p) {
|
|
2996
|
-
const
|
|
2997
|
+
const D = `${p}${g.value}`, E = document.getElementById(D);
|
|
2997
2998
|
E && E.click();
|
|
2998
2999
|
}
|
|
2999
3000
|
function Ke(p) {
|
|
3000
3001
|
p === "ArrowDown" && i.value < x.value.length && (i.value++, me(i.value)), p === "ArrowUp" && i.value > 1 && (i.value--, me(i.value)), p === "Enter" && Ze(i.value);
|
|
3001
3002
|
}
|
|
3002
3003
|
function We() {
|
|
3003
|
-
return r.options.map((p,
|
|
3004
|
+
return r.options.map((p, D) => typeof p == "object" ? p : { id: p, name: p });
|
|
3004
3005
|
}
|
|
3005
3006
|
function Ye() {
|
|
3006
3007
|
if (te(a.value))
|
|
@@ -3037,7 +3038,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
3037
3038
|
x.value.length === 0 && (a.value = {});
|
|
3038
3039
|
}), Y(a, (p) => {
|
|
3039
3040
|
te(p) && n("update:modelValue", p.id);
|
|
3040
|
-
}), (p,
|
|
3041
|
+
}), (p, D) => {
|
|
3041
3042
|
var E, G, ye;
|
|
3042
3043
|
return d(), u(v, null, [
|
|
3043
3044
|
e.show ? (d(), u("div", {
|
|
@@ -3077,37 +3078,37 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
3077
3078
|
"gl-input-form-invalid": e.error_message !== ""
|
|
3078
3079
|
}, "pl-8 pr-2 showOptions"]),
|
|
3079
3080
|
ref: e.field_name,
|
|
3080
|
-
onClick:
|
|
3081
|
+
onClick: D[0] || (D[0] = (j) => re()),
|
|
3081
3082
|
value: (ye = y.value) == null ? void 0 : ye.name,
|
|
3082
3083
|
placeholder: e.placeholder,
|
|
3083
3084
|
autocomplete: "off",
|
|
3084
3085
|
readonly: ""
|
|
3085
3086
|
}, null, 10, Ln),
|
|
3086
|
-
|
|
3087
|
-
onClick:
|
|
3087
|
+
O(s("i", {
|
|
3088
|
+
onClick: D[1] || (D[1] = N((j) => Xe(), ["stop"])),
|
|
3088
3089
|
class: "absolute text-gray-500 cursor-pointer fas fa-times right-7 hover:text-gray-700 dark:hover:text-gray-800",
|
|
3089
3090
|
style: { top: "13px" }
|
|
3090
3091
|
}, null, 512), [
|
|
3091
|
-
[
|
|
3092
|
+
[Z, te(y.value) && e.has_cancel]
|
|
3092
3093
|
]),
|
|
3093
3094
|
s("i", {
|
|
3094
|
-
onClick:
|
|
3095
|
+
onClick: D[2] || (D[2] = (j) => !l.value && re()),
|
|
3095
3096
|
class: b([l.value ? "fa-angle-up" : "fa-angle-down", "absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions"]),
|
|
3096
3097
|
style: { top: "11px" }
|
|
3097
3098
|
}, null, 2)
|
|
3098
3099
|
]),
|
|
3099
|
-
|
|
3100
|
+
O(s("div", Bn, [
|
|
3100
3101
|
s("div", Gn, [
|
|
3101
3102
|
Fn,
|
|
3102
3103
|
s("div", Rn, [
|
|
3103
3104
|
Un,
|
|
3104
|
-
|
|
3105
|
+
O(s("input", {
|
|
3105
3106
|
type: "search",
|
|
3106
|
-
"onUpdate:modelValue":
|
|
3107
|
+
"onUpdate:modelValue": D[3] || (D[3] = (j) => c.value = j),
|
|
3107
3108
|
ref: o.value,
|
|
3108
3109
|
id: `${e.field_name}search${g.value}`,
|
|
3109
3110
|
onKeydown: S,
|
|
3110
|
-
onBlur:
|
|
3111
|
+
onBlur: D[4] || (D[4] = (j) => pe()),
|
|
3111
3112
|
autocomplete: "off",
|
|
3112
3113
|
class: "block w-full p-2 text-sm text-gray-900 border rounded-lg outline-none border-frontend ps-10 bg-gray-50 focus:border-frontend dark:bg-gray-700 dark:border-frontenddark dark:placeholder-frontenddark dark:text-white dark:focus:border-frontenddark",
|
|
3113
3114
|
placeholder: "Search ..."
|
|
@@ -3134,7 +3135,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
3134
3135
|
}), 128))
|
|
3135
3136
|
])
|
|
3136
3137
|
], 512), [
|
|
3137
|
-
[
|
|
3138
|
+
[Z, l.value]
|
|
3138
3139
|
])
|
|
3139
3140
|
])
|
|
3140
3141
|
])) : f("", !0),
|
|
@@ -3191,7 +3192,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
3191
3192
|
emits: ["update:modelValue", "keydown"],
|
|
3192
3193
|
setup(e, { expose: t, emit: r }) {
|
|
3193
3194
|
const n = e, o = r, a = C(null);
|
|
3194
|
-
|
|
3195
|
+
F(() => {
|
|
3195
3196
|
a.value !== null && a.value.hasAttribute("autofocus") && a.value.focus();
|
|
3196
3197
|
});
|
|
3197
3198
|
const i = computed({
|
|
@@ -3226,7 +3227,7 @@ const yu = /* @__PURE__ */ k(na, [["render", un], ["__scopeId", "data-v-a94f16a9
|
|
|
3226
3227
|
}),
|
|
3227
3228
|
for: e.field_name
|
|
3228
3229
|
}, h(e.label_name), 11, ro),
|
|
3229
|
-
|
|
3230
|
+
O(s("textarea", {
|
|
3230
3231
|
required: e.is_required,
|
|
3231
3232
|
name: e.field_name,
|
|
3232
3233
|
id: e.field_name,
|
|
@@ -3659,7 +3660,7 @@ function Zo(e, t, r, n, o, a) {
|
|
|
3659
3660
|
s("div", So, [
|
|
3660
3661
|
Do,
|
|
3661
3662
|
s("div", Oo, [
|
|
3662
|
-
|
|
3663
|
+
z(i, {
|
|
3663
3664
|
has_cancel: !1,
|
|
3664
3665
|
options: o.pageOptions,
|
|
3665
3666
|
modelValue: o.perPage,
|
|
@@ -3677,7 +3678,7 @@ function Zo(e, t, r, n, o, a) {
|
|
|
3677
3678
|
Eo,
|
|
3678
3679
|
s("div", Ao, [
|
|
3679
3680
|
jo,
|
|
3680
|
-
|
|
3681
|
+
O(s("input", {
|
|
3681
3682
|
type: "text",
|
|
3682
3683
|
"onUpdate:modelValue": t[1] || (t[1] = (c) => o.search = c),
|
|
3683
3684
|
onInput: t[2] || (t[2] = (c) => a.handleSearch()),
|
|
@@ -3738,7 +3739,7 @@ function Zo(e, t, r, n, o, a) {
|
|
|
3738
3739
|
])
|
|
3739
3740
|
]),
|
|
3740
3741
|
s("div", zo, [
|
|
3741
|
-
|
|
3742
|
+
z(l, {
|
|
3742
3743
|
class: "mt-3 mb-0",
|
|
3743
3744
|
data: o.itemLists,
|
|
3744
3745
|
limit: o.limit,
|
|
@@ -3900,7 +3901,7 @@ function Il(e, t, r, n, o, a) {
|
|
|
3900
3901
|
s("div", Xo, [
|
|
3901
3902
|
Jo,
|
|
3902
3903
|
s("div", Qo, [
|
|
3903
|
-
|
|
3904
|
+
z(i, {
|
|
3904
3905
|
has_cancel: !1,
|
|
3905
3906
|
options: o.showNoOfEntries,
|
|
3906
3907
|
modelValue: o.itemsPerPage,
|
|
@@ -3918,7 +3919,7 @@ function Il(e, t, r, n, o, a) {
|
|
|
3918
3919
|
tl,
|
|
3919
3920
|
s("div", rl, [
|
|
3920
3921
|
sl,
|
|
3921
|
-
|
|
3922
|
+
O(s("input", {
|
|
3922
3923
|
type: "text",
|
|
3923
3924
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => o.search = l),
|
|
3924
3925
|
class: "block p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
|
|
@@ -4111,7 +4112,7 @@ const $u = /* @__PURE__ */ k(Ko, [["render", Il]]), Ml = {
|
|
|
4111
4112
|
emits: ["remove"],
|
|
4112
4113
|
setup(e, { emit: t }) {
|
|
4113
4114
|
const r = e;
|
|
4114
|
-
|
|
4115
|
+
F(() => {
|
|
4115
4116
|
setTimeout(() => n("remove"), r.duration);
|
|
4116
4117
|
});
|
|
4117
4118
|
const n = t;
|
|
@@ -4236,18 +4237,18 @@ const $u = /* @__PURE__ */ k(Ko, [["render", Il]]), Ml = {
|
|
|
4236
4237
|
return (x, S) => {
|
|
4237
4238
|
const B = Oe("click-outside");
|
|
4238
4239
|
return d(), u(v, null, [
|
|
4239
|
-
|
|
4240
|
+
z(ue, {
|
|
4240
4241
|
isOpen: a.value,
|
|
4241
4242
|
onConfirmDelete: y,
|
|
4242
4243
|
onCancelDelete: c
|
|
4243
4244
|
}, null, 8, ["isOpen"]),
|
|
4244
|
-
e.row && x.can(`edit_${e.xprops.permission} || delete_${e.xprops.permission}`) ?
|
|
4245
|
+
e.row && x.can(`edit_${e.xprops.permission} || delete_${e.xprops.permission}`) ? O((d(), u("div", ei, [
|
|
4245
4246
|
s("button", {
|
|
4246
4247
|
onClick: l,
|
|
4247
4248
|
class: "inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",
|
|
4248
4249
|
type: "button"
|
|
4249
4250
|
}, ri),
|
|
4250
|
-
|
|
4251
|
+
O(s("div", si, [
|
|
4251
4252
|
s("ul", ai, [
|
|
4252
4253
|
x.can(`edit_${e.xprops.permission}`) ? (d(), u("li", ni, [
|
|
4253
4254
|
s("a", {
|
|
@@ -4270,7 +4271,7 @@ const $u = /* @__PURE__ */ k(Ko, [["render", Il]]), Ml = {
|
|
|
4270
4271
|
])) : f("", !0)
|
|
4271
4272
|
])
|
|
4272
4273
|
], 512), [
|
|
4273
|
-
[
|
|
4274
|
+
[Z, o.value]
|
|
4274
4275
|
])
|
|
4275
4276
|
])), [
|
|
4276
4277
|
[B, i]
|
|
@@ -4342,18 +4343,18 @@ const $u = /* @__PURE__ */ k(Ko, [["render", Il]]), Ml = {
|
|
|
4342
4343
|
return (x, S) => {
|
|
4343
4344
|
const B = Oe("click-outside");
|
|
4344
4345
|
return d(), u(v, null, [
|
|
4345
|
-
|
|
4346
|
+
z(ue, {
|
|
4346
4347
|
isOpen: a.value,
|
|
4347
4348
|
onConfirmDelete: y,
|
|
4348
4349
|
onCancelDelete: c
|
|
4349
4350
|
}, null, 8, ["isOpen"]),
|
|
4350
|
-
e.row && x.can(`delete_${e.xprops.permission}`) ?
|
|
4351
|
+
e.row && x.can(`delete_${e.xprops.permission}`) ? O((d(), u("div", ui, [
|
|
4351
4352
|
s("button", {
|
|
4352
4353
|
onClick: l,
|
|
4353
4354
|
class: "inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",
|
|
4354
4355
|
type: "button"
|
|
4355
4356
|
}, fi),
|
|
4356
|
-
|
|
4357
|
+
O(s("div", gi, [
|
|
4357
4358
|
s("ul", hi, [
|
|
4358
4359
|
x.can(`delete_${e.xprops.permission}`) ? (d(), u("li", mi, [
|
|
4359
4360
|
s("a", {
|
|
@@ -4367,7 +4368,7 @@ const $u = /* @__PURE__ */ k(Ko, [["render", Il]]), Ml = {
|
|
|
4367
4368
|
])) : f("", !0)
|
|
4368
4369
|
])
|
|
4369
4370
|
], 512), [
|
|
4370
|
-
[
|
|
4371
|
+
[Z, o.value]
|
|
4371
4372
|
])
|
|
4372
4373
|
])), [
|
|
4373
4374
|
[B, i]
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/var W="store";function Y(t){return t===void 0&&(t=null),e.inject(t!==null?t:W)}function B(t,r){Object.keys(t).forEach(function(o){return r(t[o],o)})}function X(t){return t!==null&&typeof t=="object"}function Le(t){return t&&typeof t.then=="function"}function E(t,r){if(!t)throw new Error("[vuex] "+r)}function Ie(t,r){return function(){return t(r)}}function J(t,r,o){return r.indexOf(t)<0&&(o&&o.prepend?r.unshift(t):r.push(t)),function(){var a=r.indexOf(t);a>-1&&r.splice(a,1)}}function Q(t,r){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var o=t.state;P(t,o,[],t._modules.root,!0),A(t,o,r)}function A(t,r,o){var a=t._state,l=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var n=t._wrappedGetters,i={},s={},d=e.effectScope(!0);d.run(function(){B(n,function(c,m){i[m]=Ie(c,t),s[m]=e.computed(function(){return i[m]()}),Object.defineProperty(t.getters,m,{get:function(){return s[m].value},enumerable:!0})})}),t._state=e.reactive({data:r}),t._scope=d,t.strict&&Ue(t),a&&o&&t._withCommit(function(){a.data=null}),l&&l.stop()}function P(t,r,o,a,l){var n=!o.length,i=t._modules.getNamespace(o);if(a.namespaced&&(t._modulesNamespaceMap[i]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+i+" for the namespaced module "+o.join("/")),t._modulesNamespaceMap[i]=a),!n&&!l){var s=L(r,o.slice(0,-1)),d=o[o.length-1];t._withCommit(function(){process.env.NODE_ENV!=="production"&&d in s&&console.warn('[vuex] state field "'+d+'" was overridden by a module with the same name at "'+o.join(".")+'"'),s[d]=a.state})}var c=a.context=ze(t,i,o);a.forEachMutation(function(m,h){var u=i+h;Fe(t,u,m,c)}),a.forEachAction(function(m,h){var u=m.root?h:i+h,y=m.handler||m;Ge(t,u,y,c)}),a.forEachGetter(function(m,h){var u=i+h;Re(t,u,m,c)}),a.forEachChild(function(m,h){P(t,r,o.concat(h),m,l)})}function ze(t,r,o){var a=r==="",l={dispatch:a?t.dispatch:function(n,i,s){var d=M(n,i,s),c=d.payload,m=d.options,h=d.type;if((!m||!m.root)&&(h=r+h,process.env.NODE_ENV!=="production"&&!t._actions[h])){console.error("[vuex] unknown local action type: "+d.type+", global type: "+h);return}return t.dispatch(h,c)},commit:a?t.commit:function(n,i,s){var d=M(n,i,s),c=d.payload,m=d.options,h=d.type;if((!m||!m.root)&&(h=r+h,process.env.NODE_ENV!=="production"&&!t._mutations[h])){console.error("[vuex] unknown local mutation type: "+d.type+", global type: "+h);return}t.commit(h,c,m)}};return Object.defineProperties(l,{getters:{get:a?function(){return t.getters}:function(){return v(t,r)}},state:{get:function(){return L(t.state,o)}}}),l}function v(t,r){if(!t._makeLocalGettersCache[r]){var o={},a=r.length;Object.keys(t.getters).forEach(function(l){if(l.slice(0,a)===r){var n=l.slice(a);Object.defineProperty(o,n,{get:function(){return t.getters[l]},enumerable:!0})}}),t._makeLocalGettersCache[r]=o}return t._makeLocalGettersCache[r]}function Fe(t,r,o,a){var l=t._mutations[r]||(t._mutations[r]=[]);l.push(function(i){o.call(t,a.state,i)})}function Ge(t,r,o,a){var l=t._actions[r]||(t._actions[r]=[]);l.push(function(i){var s=o.call(t,{dispatch:a.dispatch,commit:a.commit,getters:a.getters,state:a.state,rootGetters:t.getters,rootState:t.state},i);return Le(s)||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(d){throw t._devtoolHook.emit("vuex:error",d),d}):s})}function Re(t,r,o,a){if(t._wrappedGetters[r]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+r);return}t._wrappedGetters[r]=function(n){return o(a.state,a.getters,n.state,n.getters)}}function Ue(t){e.watch(function(){return t._state.data},function(){process.env.NODE_ENV!=="production"&&E(t._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function L(t,r){return r.reduce(function(o,a){return o[a]},t)}function M(t,r,o){return X(t)&&t.type&&(o=r,r=t,t=t.type),process.env.NODE_ENV!=="production"&&E(typeof t=="string","expects string as the type, but found "+typeof t+"."),{type:t,payload:r,options:o}}var qe="vuex bindings",ee="vuex:mutations",I="vuex:actions",O="vuex",He=0;function Ze(t,r){Ae({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[qe]},function(o){o.addTimelineLayer({id:ee,label:"Vuex Mutations",color:te}),o.addTimelineLayer({id:I,label:"Vuex Actions",color:te}),o.addInspector({id:O,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(a){if(a.app===t&&a.inspectorId===O)if(a.filter){var l=[];ae(l,r._modules.root,a.filter,""),a.rootNodes=l}else a.rootNodes=[ne(r._modules.root,"")]}),o.on.getInspectorState(function(a){if(a.app===t&&a.inspectorId===O){var l=a.nodeId;v(r,l),a.state=Ye(Je(r._modules,l),l==="root"?r.getters:r._makeLocalGettersCache,l)}}),o.on.editInspectorState(function(a){if(a.app===t&&a.inspectorId===O){var l=a.nodeId,n=a.path;l!=="root"&&(n=l.split("/").filter(Boolean).concat(n)),r._withCommit(function(){a.set(r._state.data,n,a.state.value)})}}),r.subscribe(function(a,l){var n={};a.payload&&(n.payload=a.payload),n.state=l,o.notifyComponentUpdate(),o.sendInspectorTree(O),o.sendInspectorState(O),o.addTimelineEvent({layerId:ee,event:{time:Date.now(),title:a.type,data:n}})}),r.subscribeAction({before:function(a,l){var n={};a.payload&&(n.payload=a.payload),a._id=He++,a._time=Date.now(),n.state=l,o.addTimelineEvent({layerId:I,event:{time:a._time,title:a.type,groupId:a._id,subtitle:"start",data:n}})},after:function(a,l){var n={},i=Date.now()-a._time;n.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},a.payload&&(n.payload=a.payload),n.state=l,o.addTimelineEvent({layerId:I,event:{time:Date.now(),title:a.type,groupId:a._id,subtitle:"end",data:n}})}})})}var te=8702998,Ke=6710886,We=16777215,re={label:"namespaced",textColor:We,backgroundColor:Ke};function oe(t){return t&&t!=="root"?t.split("/").slice(-2,-1)[0]:"Root"}function ne(t,r){return{id:r||"root",label:oe(r),tags:t.namespaced?[re]:[],children:Object.keys(t._children).map(function(o){return ne(t._children[o],r+o+"/")})}}function ae(t,r,o,a){a.includes(o)&&t.push({id:a||"root",label:a.endsWith("/")?a.slice(0,a.length-1):a||"Root",tags:r.namespaced?[re]:[]}),Object.keys(r._children).forEach(function(l){ae(t,r._children[l],o,a+l+"/")})}function Ye(t,r,o){r=o==="root"?r:r[o];var a=Object.keys(r),l={state:Object.keys(t.state).map(function(i){return{key:i,editable:!0,value:t.state[i]}})};if(a.length){var n=Xe(r);l.getters=Object.keys(n).map(function(i){return{key:i.endsWith("/")?oe(i):i,editable:!1,value:z(function(){return n[i]})}})}return l}function Xe(t){var r={};return Object.keys(t).forEach(function(o){var a=o.split("/");if(a.length>1){var l=r,n=a.pop();a.forEach(function(i){l[i]||(l[i]={_custom:{value:{},display:i,tooltip:"Module",abstract:!0}}),l=l[i]._custom.value}),l[n]=z(function(){return t[o]})}else r[o]=z(function(){return t[o]})}),r}function Je(t,r){var o=r.split("/").filter(function(a){return a});return o.reduce(function(a,l,n){var i=a[l];if(!i)throw new Error('Missing module "'+l+'" for path "'+r+'".');return n===o.length-1?i:i._children},r==="root"?t:t.root._children)}function z(t){try{return t()}catch(r){return r}}var N=function(r,o){this.runtime=o,this._children=Object.create(null),this._rawModule=r;var a=r.state;this.state=(typeof a=="function"?a():a)||{}},le={namespaced:{configurable:!0}};le.namespaced.get=function(){return!!this._rawModule.namespaced},N.prototype.addChild=function(r,o){this._children[r]=o},N.prototype.removeChild=function(r){delete this._children[r]},N.prototype.getChild=function(r){return this._children[r]},N.prototype.hasChild=function(r){return r in this._children},N.prototype.update=function(r){this._rawModule.namespaced=r.namespaced,r.actions&&(this._rawModule.actions=r.actions),r.mutations&&(this._rawModule.mutations=r.mutations),r.getters&&(this._rawModule.getters=r.getters)},N.prototype.forEachChild=function(r){B(this._children,r)},N.prototype.forEachGetter=function(r){this._rawModule.getters&&B(this._rawModule.getters,r)},N.prototype.forEachAction=function(r){this._rawModule.actions&&B(this._rawModule.actions,r)},N.prototype.forEachMutation=function(r){this._rawModule.mutations&&B(this._rawModule.mutations,r)},Object.defineProperties(N.prototype,le);var C=function(r){this.register([],r,!1)};C.prototype.get=function(r){return r.reduce(function(o,a){return o.getChild(a)},this.root)},C.prototype.getNamespace=function(r){var o=this.root;return r.reduce(function(a,l){return o=o.getChild(l),a+(o.namespaced?l+"/":"")},"")},C.prototype.update=function(r){se([],this.root,r)},C.prototype.register=function(r,o,a){var l=this;a===void 0&&(a=!0),process.env.NODE_ENV!=="production"&&ce(r,o);var n=new N(o,a);if(r.length===0)this.root=n;else{var i=this.get(r.slice(0,-1));i.addChild(r[r.length-1],n)}o.modules&&B(o.modules,function(s,d){l.register(r.concat(d),s,a)})},C.prototype.unregister=function(r){var o=this.get(r.slice(0,-1)),a=r[r.length-1],l=o.getChild(a);if(!l){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+a+"', which is not registered");return}l.runtime&&o.removeChild(a)},C.prototype.isRegistered=function(r){var o=this.get(r.slice(0,-1)),a=r[r.length-1];return o?o.hasChild(a):!1};function se(t,r,o){if(process.env.NODE_ENV!=="production"&&ce(t,o),r.update(o),o.modules)for(var a in o.modules){if(!r.getChild(a)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+a+"' on hot reloading, manual reload is needed");return}se(t.concat(a),r.getChild(a),o.modules[a])}}var ie={assert:function(t){return typeof t=="function"},expected:"function"},Qe={assert:function(t){return typeof t=="function"||typeof t=="object"&&typeof t.handler=="function"},expected:'function or object with "handler" function'},de={getters:ie,mutations:ie,actions:Qe};function ce(t,r){Object.keys(de).forEach(function(o){if(r[o]){var a=de[o];B(r[o],function(l,n){E(a.assert(l),ve(t,o,n,l,a.expected))})}})}function ve(t,r,o,a,l){var n=r+" should be "+l+' but "'+r+"."+o+'"';return t.length>0&&(n+=' in module "'+t.join(".")+'"'),n+=" is "+JSON.stringify(a)+".",n}var x=function t(r){var o=this;r===void 0&&(r={}),process.env.NODE_ENV!=="production"&&(E(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),E(this instanceof t,"store must be called with the new operator."));var a=r.plugins;a===void 0&&(a=[]);var l=r.strict;l===void 0&&(l=!1);var n=r.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new C(r),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=n;var i=this,s=this,d=s.dispatch,c=s.commit;this.dispatch=function(u,y){return d.call(i,u,y)},this.commit=function(u,y,$){return c.call(i,u,y,$)},this.strict=l;var m=this._modules.root.state;P(this,m,[],this._modules.root),A(this,m),a.forEach(function(h){return h(o)})},F={state:{configurable:!0}};x.prototype.install=function(r,o){r.provide(o||W,this),r.config.globalProperties.$store=this;var a=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;a&&Ze(r,this)},F.state.get=function(){return this._state.data},F.state.set=function(t){process.env.NODE_ENV!=="production"&&E(!1,"use store.replaceState() to explicit replace store state.")},x.prototype.commit=function(r,o,a){var l=this,n=M(r,o,a),i=n.type,s=n.payload,d=n.options,c={type:i,payload:s},m=this._mutations[i];if(!m){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){m.forEach(function(u){u(s)})}),this._subscribers.slice().forEach(function(h){return h(c,l.state)}),process.env.NODE_ENV!=="production"&&d&&d.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},x.prototype.dispatch=function(r,o){var a=this,l=M(r,o),n=l.type,i=l.payload,s={type:n,payload:i},d=this._actions[n];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+n);return}try{this._actionSubscribers.slice().filter(function(m){return m.before}).forEach(function(m){return m.before(s,a.state)})}catch(m){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(m))}var c=d.length>1?Promise.all(d.map(function(m){return m(i)})):d[0](i);return new Promise(function(m,h){c.then(function(u){try{a._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(s,a.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}m(u)},function(u){try{a._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(s,a.state,u)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}h(u)})})},x.prototype.subscribe=function(r,o){return J(r,this._subscribers,o)},x.prototype.subscribeAction=function(r,o){var a=typeof r=="function"?{before:r}:r;return J(a,this._actionSubscribers,o)},x.prototype.watch=function(r,o,a){var l=this;return process.env.NODE_ENV!=="production"&&E(typeof r=="function","store.watch only accepts a function."),e.watch(function(){return r(l.state,l.getters)},o,Object.assign({},a))},x.prototype.replaceState=function(r){var o=this;this._withCommit(function(){o._state.data=r})},x.prototype.registerModule=function(r,o,a){a===void 0&&(a={}),typeof r=="string"&&(r=[r]),process.env.NODE_ENV!=="production"&&(E(Array.isArray(r),"module path must be a string or an Array."),E(r.length>0,"cannot register the root module by using registerModule.")),this._modules.register(r,o),P(this,this.state,r,this._modules.get(r),a.preserveState),A(this,this.state)},x.prototype.unregisterModule=function(r){var o=this;typeof r=="string"&&(r=[r]),process.env.NODE_ENV!=="production"&&E(Array.isArray(r),"module path must be a string or an Array."),this._modules.unregister(r),this._withCommit(function(){var a=L(o.state,r.slice(0,-1));delete a[r[r.length-1]]}),Q(this)},x.prototype.hasModule=function(r){return typeof r=="string"&&(r=[r]),process.env.NODE_ENV!=="production"&&E(Array.isArray(r),"module path must be a string or an Array."),this._modules.isRegistered(r)},x.prototype.hotUpdate=function(r){this._modules.update(r),Q(this,!0)},x.prototype._withCommit=function(r){var o=this._committing;this._committing=!0,r(),this._committing=o},Object.defineProperties(x.prototype,F);var et=ge(function(t,r){var o={};return process.env.NODE_ENV!=="production"&&!G(r)&&console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"),me(r).forEach(function(a){var l=a.key,n=a.val;o[l]=function(){var s=this.$store.state,d=this.$store.getters;if(t){var c=fe(this.$store,"mapState",t);if(!c)return;s=c.context.state,d=c.context.getters}return typeof n=="function"?n.call(this,s,d):s[n]},o[l].vuex=!0}),o}),tt=ge(function(t,r){var o={};return process.env.NODE_ENV!=="production"&&!G(r)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),me(r).forEach(function(a){var l=a.key,n=a.val;o[l]=function(){for(var s=[],d=arguments.length;d--;)s[d]=arguments[d];var c=this.$store.commit;if(t){var m=fe(this.$store,"mapMutations",t);if(!m)return;c=m.context.commit}return typeof n=="function"?n.apply(this,[c].concat(s)):c.apply(this.$store,[n].concat(s))}}),o});function me(t){return G(t)?Array.isArray(t)?t.map(function(r){return{key:r,val:r}}):Object.keys(t).map(function(r){return{key:r,val:t[r]}}):[]}function G(t){return Array.isArray(t)||X(t)}function ge(t){return function(r,o){return typeof r!="string"?(o=r,r=""):r.charAt(r.length-1)!=="/"&&(r+="/"),t(r,o)}}function fe(t,r,o){var a=t._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!a&&console.error("[vuex] module namespace not found in "+r+"(): "+o),a}const rt={components:{DeleteConfirmationModal:T},props:{is_required:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},show:{type:Boolean,default:!1},has_multiple_file:{show:Boolean,default:!1},field_name:{type:String,default:""},label_name:{type:String,default:""},route_url:{type:String,default:""},model_value:{type:Array,default:[]},file_config:{type:Object,default:{}},is_enable_delete:{type:Boolean,default:!0}},emits:["uploaded"],data(){return{media_id:"",error_message_data:"",open_delete_modal:!1,files:[],uploadFileList:[],isDragging:!1}},methods:{closeDeleteModal(){this.open_delete_modal=!1},deleteAction(){axios.delete(this.route_url+"/destroyMedia/"+this.media_id).then(t=>{let r=this.uploadFileList.findIndex(o=>o.id===this.media_id);r!==-1&&this.uploadFileList.splice(r,1),this.closeDeleteModal(),this.$store.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(t=>{console.error(t),this.is_loading=!1})},getFileName(t){return t.length>12?t.substring(0,13)+"... ."+t.split(".")[1]:t},formatFileSize(t){if(t===0)return"0 Bytes";const r=1024,o=["Bytes","KB","MB","GB","TB"],a=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,a)).toFixed(2))+" "+o[a]},onDragOver(t){t.preventDefault(),this.isDragging=!0,t.dataTransfer.dropEffect="copy"},onDragLeave(t){t.preventDefault(),this.isDragging=!1},onDrop(t){t.preventDefault(),this.isDragging=!1;const r=t.dataTransfer.files;Array.from(r).forEach(o=>{this.uploadFile(o)})},async uploadFiles(t){const r=t.target.files,o=Array.from(r).map(a=>this.uploadFile(a));await Promise.all(o),this.$emit("uploaded")},getFirstError(t,r){return t.hasOwnProperty(r)?t[r][0]:""},async uploadFile(t){return new Promise((r,o)=>{t||r();const a=new FormData;a.append("file",t),Object.entries(this.file_config).forEach(([l,n])=>{a.append(l,n)}),this.files.push({file_name:t.name,loading:0}),axios.post(this.route_url+"/media",a,{onUploadProgress:l=>{this.files[this.files.length-1].loading=Math.floor(l.loaded/l.total*100)}}).then(l=>{let n=this.files.findIndex(i=>i.file_name===t.name);n!==-1&&this.files.splice(n,1),this.uploadFileList.push({file_name:l.data.file_name,size:l.data.size,id:l.data.id,url:l.data.url}),this.error_message_data="",r()}).catch(l=>{l.response.status===422?this.error_message_data=this.getFirstError(l.response.data.errors,"file"):console.error("An error occurred:",l);let n=this.files.findIndex(i=>i.file_name===t.name);n!==-1&&this.files.splice(n,1),console.log(l),r()})})}},computed:{uploadedFileIds(){var t;return this.has_multiple_file?this.uploadFileList.map(r=>r.id):((t=this.uploadFileList[0])==null?void 0:t.id)||null}},mounted(){console.log(this.model_value),this.model_value?Array.isArray(this.model_value)?this.uploadFileList=this.model_value:this.uploadFileList=[this.model_value]:this.uploadFileList=[],this.error_message_data=this.error_message}},ot={class:"flex flex-col items-center justify-center pt-5 pb-6"},nt=["multiple"],at=["name"],lt=[e.createElementVNode("svg",{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})],-1),e.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Drag & drop files or browse ",-1)],st={key:1},it=[e.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"},"Drop files here",-1)],dt={class:"mt-2 gl-span-form-error"},ct={class:"block mt-2 mb-3 text-sm font-normal leading-5 text-gray-500"},mt={key:0,class:""},gt={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},ft=e.createElementVNode("i",{class:"text-3xl fas fa-file-alt"},null,-1),ht={class:"w-full ml-3"},ut={class:"flex items-center justify-between mb-1"},pt={class:"text-xs text-black dark:text-white"},yt={class:"text-xs text-black dark:text-white"},_t={class:"w-full h-1 mb-1 bg-white rounded-full dark:bg-gray-800"},bt={class:"overflow-x-scroll max-h-56"},kt={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},xt={class:"flex items-center"},wt=e.createElementVNode("i",{class:"text-3xl fas fa-file-alt","aria-hidden":"true"},null,-1),Et={class:"flex flex-col ml-3"},Nt={class:"text-xs"},Vt={class:"text-xs"},Bt={class:"flex gap-2"},Ct=["href"],$t=["onClick"];function St(t,r,o,a,l,n){const i=e.resolveComponent("DeleteConfirmationModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(i,{isOpen:l.open_delete_modal,onConfirmDelete:n.deleteAction,onCancelDelete:n.closeDeleteModal},null,8,["isOpen","onConfirmDelete","onCancelDelete"]),e.createElementVNode("div",{class:e.normalizeClass([{"border-red-500 dark:border-red-500":l.error_message_data!=="","border-gray-200 dark:border-gray-700":l.error_message_data==""},"w-full p-4 bg-white border rounded-lg shadow dark:bg-gray-800"])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":l.error_message_data=="","gl-label-form-invalid":l.error_message_data!=="",required:o.is_required})},e.toDisplayString(o.label_name),3),e.createElementVNode("div",{onDragover:r[3]||(r[3]=e.withModifiers((...s)=>n.onDragOver&&n.onDragOver(...s),["prevent"])),onDragleave:r[4]||(r[4]=e.withModifiers((...s)=>n.onDragLeave&&n.onDragLeave(...s),["prevent"])),onDrop:r[5]||(r[5]=e.withModifiers((...s)=>n.onDrop&&n.onDrop(...s),["prevent"])),class:"flex flex-col items-center justify-center w-full h-40 mt-3 mb-3 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},[e.createElementVNode("div",ot,[e.createElementVNode("input",{type:"file",ref:"file_input"+o.field_name,hidden:"",multiple:o.has_multiple_file,onChange:r[0]||(r[0]=(...s)=>n.uploadFiles&&n.uploadFiles(...s))},null,40,nt),e.withDirectives(e.createElementVNode("input",{type:"hidden",name:o.field_name,"onUpdate:modelValue":r[1]||(r[1]=s=>n.uploadedFileIds=s)},null,8,at),[[e.vModelText,n.uploadedFileIds]]),l.isDragging?(e.openBlock(),e.createElementBlock("div",st,it)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex flex-col items-center justify-center",onClick:r[2]||(r[2]=s=>t.$refs["file_input"+this.field_name].click())},lt))])],32),e.createElementVNode("span",dt,e.toDisplayString(l.error_message_data),1),e.createElementVNode("small",ct,e.toDisplayString(o.description),1),l.files.length>0?(e.openBlock(),e.createElementBlock("section",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,(s,d)=>(e.openBlock(),e.createElementBlock("li",gt,[ft,e.createElementVNode("div",ht,[e.createElementVNode("div",ut,[e.createElementVNode("span",pt,e.toDisplayString(n.getFileName(s.file_name)),1),e.createElementVNode("span",yt,e.toDisplayString(s.loading),1)]),e.createElementVNode("div",_t,[e.createElementVNode("div",{class:"h-full bg-gray-500 rounded-full dark:bg-gray-400",style:e.normalizeStyle({width:s.loading+"%"})},null,4)])])]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("section",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.uploadFileList,(s,d)=>(e.openBlock(),e.createElementBlock("li",kt,[e.createElementVNode("div",xt,[wt,e.createElementVNode("div",Et,[e.createElementVNode("span",Nt,e.toDisplayString(n.getFileName(s.file_name)),1),e.createElementVNode("span",Vt,e.toDisplayString(n.formatFileSize(s.size)),1)])]),e.createElementVNode("div",Bt,[e.createElementVNode("a",{href:s.url,target:"_blank",class:"text-lg text-blue-600 cursor-pointer dark:text-blue-400 fas fa-download"},null,8,Ct),o.is_enable_delete?(e.openBlock(),e.createElementBlock("i",{key:0,onClick:c=>{l.media_id=s.id,l.open_delete_modal=!0},class:"text-lg text-red-600 cursor-pointer dark:text-red-400 fas fa-x"},null,8,$t)):e.createCommentVNode("",!0)])]))),256))])],2)],64)}const Dt=p(rt,[["render",St]]),Ot={computed:{...et("notification",["notification"]),alertClasses(){switch(this.notification.type){case"info":return"text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400";case"error":return"text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400";case"success":return"text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400";case"warning":return"text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300";case"dark":return"text-gray-800 bg-gray-50 dark:bg-gray-800 dark:text-gray-300";default:return""}},buttonClasses(){switch(this.notification.type){case"info":return"bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-gray-700";case"error":return"bg-red-50 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-gray-700";case"success":return"bg-green-50 text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-gray-700";case"warning":return"bg-yellow-50 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-gray-700";case"dark":return"bg-gray-50 text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700";default:return""}}},methods:{...tt("notification",["HIDE_NOTIFICATION"]),dismiss(){this.HIDE_NOTIFICATION()}},watch:{"notification.show":function(t){t&&setTimeout(()=>{this.dismiss()},this.notification.duration)}}},Tt=e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})],-1),Pt=e.createElementVNode("span",{class:"sr-only"},"Info",-1),Mt={class:"mr-3 text-sm font-medium ms-3"},jt=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"w-3 h-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})],-1)];function At(t,r,o,a,l,n){return t.notification.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["fixed right-0 z-50 flex items-center p-4 m-5 mb-4 rounded-lg shadow-lg",n.alertClasses]),role:"alert"},[Tt,Pt,e.createElementVNode("div",Mt,e.toDisplayString(t.notification.message),1),e.createElementVNode("button",{type:"button",onClick:r[0]||(r[0]=(...i)=>n.dismiss&&n.dismiss(...i)),class:e.normalizeClass(["inline-flex items-center justify-center w-6 h-6 p-1 -mx-1 -my-1 rounded-lg ms-auto focus:ring-2 hover:bg-opacity-50",n.buttonClasses]),"aria-label":"Close"},jt,2)],2)):e.createCommentVNode("",!0)}const Lt=p(Ot,[["render",At]]),It={components:{},props:{field_name:{type:String,default:""},trans_selector_name:{type:String,default:"i18n_selector"}},data(){return{locals:[],default_language:""}},methods:{getLocals(){const t={id:this.menu_id};axios.get("/admin/get_locals",{params:t}).then(r=>{this.locals=r.data.locals,this.default_language=r.data.default_language,console.log("default_language",this.default_language)}).catch(r=>{console.error(r)})}},created(){this.getLocals()},mounted(){}},zt={class:"grid w-full gap-1 mt-5 mb-5 md:gap-0 md:grid-cols-10 language-selector"},Ft=["name","value","id","checked"],Gt=["for"];function Rt(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("ul",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.locals,(i,s)=>(e.openBlock(),e.createElementBlock("li",null,[e.createElementVNode("input",{type:"radio",name:o.trans_selector_name,value:i,class:"hidden peer",id:i+"_"+o.field_name,autocomplete:"off",checked:i===l.default_language},null,8,Ft),e.createElementVNode("label",{for:i+"_"+o.field_name,class:e.normalizeClass([{"border md:!rounded-s-lg":s===0,"border md:!rounded-e-lg":s===l.locals.length-1,"border-t border-b":s!==0&&s!==l.locals.length-1},"w-full p-1 font-bold text-center text-gray-500 uppercase bg-white border-gray-200 rounded-lg cursor-pointer md:rounded-none dark:hover:text-gray-300 dark:border-gray-700 dark:peer-checked:text-blue-500 peer-checked:border-blue-600 peer-checked:text-blue-600 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700"])},e.toDisplayString(i),11,Gt)]))),256))])}const Ut=p(It,[["render",Rt]]),qt={class:"bg-white border rounded-lg border-stroke shadow-default dark:border-strokedark dark:bg-boxdark"},Ht={class:"px-3 py-4 border-b border-stroke dark:border-strokedark"},Zt={class:"font-semibold text-black dark:text-white"},Kt={key:0,class:"p-6"},Wt={__name:"GlCard",props:{class:{type:String,default:""}},setup(t){const r=t,o=e.computed(()=>r.class);return(a,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-9",o.value])},[e.createElementVNode("div",qt,[e.createElementVNode("div",Ht,[e.createElementVNode("h3",Zt,[e.renderSlot(a.$slots,"header")])]),a.$slots.body?(e.openBlock(),e.createElementBlock("div",Kt,[e.renderSlot(a.$slots,"body")])):e.createCommentVNode("",!0)])],2))}},Yt={name:"MultiSelectDropdown",template:"MultiSelectDropdown",props:{modelValue:{type:[String,Number],default:""},default_value:{type:Array,default:[]},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},maxItem:{type:Number,required:!1,default:100,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""}},data(){return{selected:[],count:0,optionsShown:!1,searchFilter:"",selectedIds:[]}},created(){this.$emit("selected",this.selected)},mounted(){self=this;var t=this.convertedOptionsDefault();this.selected=this.options_values.filter(r=>t.includes(r.id+"")),this.show||(document.body.addEventListener("click",function(r){self.clearData(r)}),document.getElementById(this.field_name+"search").addEventListener("keydown",function(r){if(_.includes([37,38,39,40,13],r.keyCode)){if((r.keyCode===38||r.keyCode===40)&&r.preventDefault(),r.keyCode===40&&self.posts=="")return;self.selectItem(r.keyCode)}}),document.addEventListener("keypress",function(r){r.key==="Enter"&&r.target.form&&r.preventDefault()}))},computed:{options_values(){return this.convertedOptions()},filteredOptions(){const t=[],r=new RegExp(this.searchFilter,"ig");for(const o of this.options_values){const a=String(o.name);(this.searchFilter.length<1||a.match(r))&&t.length<this.maxItem&&t.push(o)}return t}},emits:["update:modelValue","selected","selectionChanged"],methods:{selectAll(){this.selected=this.convertedOptions()},deselectAll(){this.selected=[]},isOptionSelected(t){return this.selected.findIndex(r=>r.id===t)!==-1},clearData:function(t){t.target.id!=this.field_name+"search"&&t.target.id!=this.field_name&&!t.target.classList.contains("showOptions")&&(this.exit(),this.count=0)},selectItem:function(t){t==40&&this.count<this.filteredOptions.length&&(this.count++,document.getElementById(this.count).scrollIntoView()),t==38&&this.count>1&&(this.count--,document.getElementById(this.count).scrollIntoView()),t==13&&document.getElementById(this.count).click()},convertedOptions(){return this.options.map((t,r)=>typeof t=="object"?t:{id:t,name:t})},convertedOptionsDefault(){return this.default_value.map((t,r)=>typeof t=="object"?t.id+"":t+"")},clearOption(t){let r=this.selected.findIndex(o=>o.id===t.id);r!==-1&&this.selected.splice(r,1),this.selectedIds=this.selected.map(o=>o.id),this.$emit("update:modelValue",this.selectedIds),this.$emit("selected",this.selectedIds)},selectOption(t){let r=this.selected.findIndex(o=>o.id===t.id);r!==-1?this.selected.splice(r,1):this.selected.push(t),this.selectedIds=this.selected.map(o=>o.id),this.$emit("update:modelValue",this.selectedIds),this.$emit("selected",this.selectedIds)},showOptions(){this.show||(this.searchFilter="",this.optionsShown=!0,this.$nextTick(()=>{this.$refs[this.field_name+"search"].focus()}))},ClearInput(){this.show||(this.selected=[],this.searchFilter="",this.showOptions())},exit(){this.selected||(this.selected=[],this.searchFilter=""),this.optionsShown=!1},keyMonitor:function(t){if(_.includes([37,38,39,40,13],t.keyCode)){if((t.keyCode===38||t.keyCode===40)&&t.preventDefault(),t.keyCode===40&&self.posts=="")return;this.selectItem(t.keyCode)}}},watch:{searchFilter(){this.filteredOptions.length},selected(t){this.selectedIds=t.map(r=>r.id),this.$emit("update:modelValue",this.selectedIds),this.$emit("selected",this.selectedIds),this.$emit("selectionChanged",this.selectedIds)}}},Xt={class:"font-bold ptext-lg dark:text-white"},Jt={class:"mt-3 mb-4"},Qt={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},vt=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),er=["name","value"],tr={key:0,class:"dropdown"},rr={class:"inline-flex ml-2 rounded-md shadow-sm",role:"group"},or={class:"border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},nr={class:"relative"},ar=["onClick"],lr={class:"text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999] showOptions"},sr={class:"p-1"},ir=e.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1),dr={class:"relative"},cr=e.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1),mr=["id"],gr={class:"overflow-y-auto max-h-64"},fr=["onClick","onMousedown","id"];function hr(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.field_name)},[e.createElementVNode("h3",Xt,e.toDisplayString(o.label_name),1),e.createElementVNode("p",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.selected,(i,s)=>(e.openBlock(),e.createElementBlock("span",Qt,e.toDisplayString(i.name),1))),256))]),vt],2)):e.createCommentVNode("",!0),o.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",o.field_name])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.selectedIds,(i,s)=>(e.openBlock(),e.createElementBlock("input",{type:"hidden",name:o.field_name+"[]",key:s,value:i},null,8,er))),128)),o.options?(e.openBlock(),e.createElementBlock("div",tr,[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":o.error_message=="","gl-label-form-invalid":o.error_message!=="",required:o.is_required})},e.toDisplayString(o.label_name),3),e.createElementVNode("div",rr,[e.createElementVNode("button",{onClick:r[0]||(r[0]=(...i)=>n.selectAll&&n.selectAll(...i)),type:"button",class:"px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 rounded-s-md hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"}," Select all "),e.createElementVNode("button",{onClick:r[1]||(r[1]=(...i)=>n.deselectAll&&n.deselectAll(...i)),type:"button",class:"px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 rounded-e-md hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"}," Deselect all ")]),e.createElementVNode("div",or,[e.createElementVNode("div",nr,[e.createElementVNode("div",{class:"flex flex-wrap gap-2 pl-8 pr-2 gl-multi-dropdown showOptions",onClick:r[2]||(r[2]=i=>n.showOptions())},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.selected,(i,s)=>(e.openBlock(),e.createElementBlock("span",{key:s,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded pointer-events-none dark:bg-blue-900 dark:text-blue-300"},[e.createTextVNode(e.toDisplayString(i.name)+" ",1),e.createElementVNode("i",{onClick:e.withModifiers(d=>n.clearOption(i),["stop"]),class:"cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400 fas fa-times"},null,8,ar)]))),128))]),e.createElementVNode("i",{class:e.normalizeClass([l.optionsShown?"fa-angle-up":"fa-angle-down","absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700"]),style:{top:"11px"}},null,2)]),e.withDirectives(e.createElementVNode("div",lr,[e.createElementVNode("div",sr,[ir,e.createElementVNode("div",dr,[cr,e.withDirectives(e.createElementVNode("input",{type:"search","onUpdate:modelValue":r[3]||(r[3]=i=>l.searchFilter=i),id:o.field_name+"search",ref:o.field_name+"search",onBlur:r[4]||(r[4]=i=>n.exit()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,40,mr),[[e.vModelText,l.searchFilter]])])]),e.createElementVNode("div",gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.filteredOptions,(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["block px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",s+1==l.count||n.isOptionSelected(i.id)?"bg-gray-100 dark:bg-gray-600":""]),onClick:d=>n.selectOption(i),onMousedown:d=>n.selectOption(i),key:s,id:s+1},e.toDisplayString(i.name||i.id||"-"),43,fr))),128))])],512),[[e.vShow,l.optionsShown]])])])):e.createCommentVNode("",!0)],2))],64)}const ur=p(Yt,[["render",hr]]),pr={props:{button_type:{type:String,default:"default"},is_submit:{type:Boolean,default:!1},icon:{type:String,default:""},is_loading:{type:Boolean,default:!1},is_disabled:{type:Boolean,default:!1},tag:{type:String,default:"button"},href:{type:String,default:""}},computed:{buttonTypeClass(){switch(this.button_type){case"default":return"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";case"alternative":return" text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700";case"dark":return"text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700";case"light":return"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700";case"green":return" text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";case"red":return" text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900";case"yellow":return" text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900";case"purple":return" text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-900";default:return""}}},methods:{}},yr=e.createElementVNode("svg",{"aria-hidden":"true",role:"status",class:"inline w-4 h-4 me-3 animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),e.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"#1C64F2"})],-1);function _r(t,r,o,a,l,n){return o.is_loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("button"),{key:1,disabled:"",class:e.normalizeClass(`flex items-center gap-2 focus:outline-none text-sm px-2 py-2 me-2 font-medium rounded-lg ${n.buttonTypeClass}`)},{default:e.withCtx(()=>[yr,e.createTextVNode(" Loading... ")]),_:1},8,["class"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),e.mergeProps({key:0,type:o.is_submit,disabled:o.is_disabled},{type:o.is_submit?"submit":void 0},{href:o.tag==="a"?o.href:void 0,class:` ${o.is_disabled?"cursor-not-allowed opacity-50":""} flex items-center gap-2 focus:outline-none text-sm px-5 py-2 me-2 font-medium rounded-lg ${n.buttonTypeClass}`}),{default:e.withCtx(()=>[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([o.icon,"text-base"])},null,2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default")]),_:3},16,["type","disabled","href","class"]))}const br=p(pr,[["render",_r]]),kr={class:"font-bold ptext-lg dark:text-white"},xr=["name","id"],wr=["id"],Er=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Nr=["for"],Vr=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),Br=["name","id"],Cr=["required","name","id","type"],$r={class:"gl-span-form-error"},Sr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Dr={__name:"GlTextareaTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null),i=e.ref(null);return e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus(),a.model_value&&(l("update:modelValue",a.model_value),n.value.value=a.model_value),a.model_value_translate,a.translatable&&axios.post("/admin/get_field_translations",{model:a.translatable.model,row_id:a.translatable.row_id,field:a.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),l("update:modelValueTranslate",JSON.stringify(s.data)),console.log("input_translate",i.value.value)}).catch(s=>{console.log(s)})}),r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",kr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref_key:"input_translate",ref:i,"onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,xr),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,wr),Er],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Nr),Vr,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,Br),e.createElementVNode("textarea",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-textarea-form form-input-translation mt-4 ":t.error_message==""," gl-textarea-form-invalid form-input-translation mt-4 ":t.error_message!==""}),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n,rows:"4"},`
|
|
6
6
|
`,42,Cr),e.createElementVNode("span",$r,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Sr,e.toDisplayString(t.description),1)],2))],64))}},Or={class:"font-bold ptext-lg dark:text-white"},Tr=["name","id"],Pr=["id"],Mr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),jr=["for"],Ar=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),Lr=["name","id"],Ir=["name","id","type"],zr={class:"gl-span-form-error"},Fr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Gr={__name:"GlTinymceTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null),i=e.ref(null);return e.onMounted(()=>{tinymce.init({selector:"#"+a.field_name,width:"100%",height:300}),console.log("tinymce ",a.model_value),n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus(),a.model_value&&(l("update:modelValue",a.model_value),n.value.value=a.model_value),a.model_value_translate,a.translatable&&axios.post("/admin/get_field_translations",{model:a.translatable.model,row_id:a.translatable.row_id,field:a.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),l("update:modelValueTranslate",JSON.stringify(s.data))}).catch(s=>{console.log(s)})}),r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Or,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref_key:"input_translate",ref:i,"onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,Tr),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,Pr),Mr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,jr),Ar,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,Lr),e.createElementVNode("textarea",{name:t.field_name,id:t.field_name,class:e.normalizeClass(["tiny",{" gl-textarea-form form-input-translation mt-4 ":t.error_message==""," gl-textarea-form-invalid form-input-translation mt-4 ":t.error_message!==""}]),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n,rows:"4"},`
|
|
7
|
-
`,42,Ir),e.createElementVNode("span",zr,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Fr,e.toDisplayString(t.description),1)],2))],64))}},Rr={class:"font-bold ptext-lg dark:text-white"},Ur=["name","id"],qr=["id"],Hr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Zr=["for"],Kr=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),Wr=["name","id"],Yr=["required","name","id","type"],Xr={class:"gl-span-form-error"},Jr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Qr={__name:"GlTextTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null),i=e.ref(null);return e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus(),a.model_value&&(l("update:modelValue",a.model_value),n.value.value=a.model_value),a.model_value_translate,a.translatable&&axios.post("/admin/get_field_translations",{model:a.translatable.model,row_id:a.translatable.row_id,field:a.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),l("update:modelValueTranslate",JSON.stringify(s.data))}).catch(s=>{console.log(s)})}),r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Rr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref:"input_translate_s","onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,Ur),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,qr),Hr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Zr),Kr,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,Wr),e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-input-form form-input-translation mt-2 ":t.error_message==""," gl-input-form-invalid form-input-translation mt-2 ":t.error_message!==""}),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n},null,42,Yr),e.createElementVNode("span",Xr,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Jr,e.toDisplayString(t.description),1)],2))],64))}},vr={class:"font-bold ptext-lg dark:text-white"},eo={class:"mb-4 text-base text-gray-900 dark:text-white"},to=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),ro=["for"],oo=["required","name","id","type","placeholder"],no={class:"gl-span-form-error"},ao={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},lo={__name:"GlTextInput",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null);e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus()});const i=e.computed({get(){return a.modelValue},set(s){l("update:modelValue",s)}});return r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",vr,e.toDisplayString(t.label_name),1),e.createElementVNode("p",eo,e.toDisplayString(t.type=="password"?t.modelValue.replace(/./g,"*"):t.modelValue),1),to],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,ro),e.withDirectives(e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({"gl-input-form":t.error_message=="","gl-input-form-invalid":t.error_message!==""}),type:t.type,"onUpdate:modelValue":d[0]||(d[0]=c=>i.value=c),onKeydown:d[1]||(d[1]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n,placeholder:t.placeholder},null,42,oo),[[e.vModelDynamic,i.value]]),e.createElementVNode("span",no,e.toDisplayString(t.error_message),1),e.createElementVNode("small",ao,e.toDisplayString(t.description),1)],2))],64))}},so={setup(t,{slots:r}){const o=e.ref(r.default().map(l=>l.props)),a=e.ref(o.value[0].title);return e.provide("selectedTitle",a),{tabs:o,selectedTitle:a}}},io={class:"flex flex-wrap"},co={class:"w-full"},mo={class:"flex flex-row flex-wrap gap-1 pt-3 pb-4 mb-0 list-none"},go=["onClick"],fo={class:"relative flex flex-col w-full min-w-0 mb-6 break-words bg-white rounded shadow-lg dark:border-strokedark dark:bg-boxdark"},ho={class:"flex-auto px-4 py-5"},uo={class:"tab-content tab-space"};function po(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",io,[e.createElementVNode("div",co,[e.createElementVNode("ul",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,i=>(e.openBlock(),e.createElementBlock("li",{key:i.title,onClick:s=>a.selectedTitle=i.title,class:"flex-auto -mb-px text-center"},[e.createElementVNode("a",{class:e.normalizeClass([{"text-slate-600 bg-white dark:bg-meta-4":a.selectedTitle!=i.title,"text-white bg-slate-600 dark:bg-primary":a.selectedTitle===i.title},"block px-5 py-3 text-xs font-bold leading-normal rounded shadow-lg hover:text-white tex hover:bg-slate-600 dark:hover:bg-primary dark:text-white tabs_buttons"])},[e.createElementVNode("i",{class:e.normalizeClass([i.icon,"mr-1 text-base"])},null,2),e.createTextVNode(" "+e.toDisplayString(i.title),1)],2)],8,go))),128))])])]),e.createElementVNode("div",fo,[e.createElementVNode("div",ho,[e.createElementVNode("div",uo,[e.renderSlot(t.$slots,"default")])])])],64)}const yo=p(so,[["render",po]]),_o={props:["title"],setup(){return{selectedTitle:e.inject("selectedTitle")}}},bo={class:"block"};function ko(t,r,o,a,l,n){return e.withDirectives((e.openBlock(),e.createElementBlock("div",bo,[e.renderSlot(t.$slots,"default")],512)),[[e.vShow,o.title==a.selectedTitle]])}const xo=p(_o,[["render",ko]]),wo={props:{elements_to_show_prop:{type:Number,default:3},hide_arrow:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"}},data:function(){return{elementsToShow:3,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,Random_string:this.generateRandomString(6)}},mounted(){this.elementsToShow=this.elements_to_show_prop,this.initSlider(),this.disable_touch||this.movingActions()},methods:{sliderIndicatorsAction(){var t="";return this.direction_property=="rtl"?(t+=" space-x-reverse ",t+=" slider_indicators "):this.slider_arrows_indicators_position=="arrows_indicators_inside_slider"&&(t+=" slider_indicators "),t},sliderContainerAction(){var t="";return!this.hide_arrow&&this.slider_arrows_indicators_position=="arrows_outside_slider"?t+=" w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12":this.slider_arrows_indicators_position!="arrows_outside_slider"&&(t+=" w-12/12 "),t},generateRandomString(t){let r="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let l=0;l<t;l++)r+=o.charAt(Math.floor(Math.random()*a));return r},movingActions(){let t=this,r=document.getElementById("slider_"+this.Random_string);const o=l=>{r.style.cursor="grabbing";const n=s=>{const d=s.clientX||s.touches&&s.touches[0]&&s.touches[0].clientX,c=s.clientY||s.touches&&s.touches[0]&&s.touches[0].clientY,m=d-t.initialX,h=c-t.initialY;Math.abs(m)>Math.abs(h)?(s.preventDefault(),Math.abs(m)>=70&&(m<0?t.next():t.prev(),t.initialX=d)):r.style.cursor="grab",Math.abs(h)>Math.abs(m)&&(r.style.cursor="grab")},i=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),r.style.cursor="grab"};document.addEventListener("mousemove",n),document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("mouseup",i),document.addEventListener("touchend",i),t.initialX=l.clientX||l.touches&&l.touches[0]&&l.touches[0].clientX,t.initialY=l.clientY||l.touches&&l.touches[0]&&l.touches[0].clientY},a=l=>{l.key==="ArrowLeft"?t.prev():l.key==="ArrowRight"&&t.next()};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),document.addEventListener("keydown",a)},next(){this.currentDot<this.dotsNavigation.length&&(this.currentDot++,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},initSlider(){let t=document.getElementById("sliderContainer_"+this.Random_string),r=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),a=o.querySelectorAll("li"),l=Array.from(a).filter(s=>s.parentNode===o),n=t.clientWidth,i=n/this.elementsToShow;if(this.elementsToShow>1?document.body.clientWidth<1e3?(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:n):document.body.clientWidth<1500&&(this.elementsToShow=2):(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:n),l.length>1){this.dotsNum=this.elementsToShow==1?l.length:l.length-this.elementsToShow+1;let s=this.elementsToShow==1?i*l.length/this.dotsNum:i*(l.length-this.elementsToShow)/(this.dotsNum-1);this.dotsNavigation=[];for(let d=0;d<this.dotsNum;d++)this.dotsNavigation.push(s*d)}o.style.width=l.length*i+"px",o.style.transition="margin",o.style.transitionDuration="1s";for(let s=0;s<l.length;s++){const d=l[s];d.style.width=i+"px"}},setDot(t){let r=document.getElementById("slider_"+this.Random_string);this.direction_property=="rtl"?r.style.marginRight=-this.dotsNavigation[t-1]+"px":r.style.marginLeft=-this.dotsNavigation[t-1]+"px",this.currentDot=t}}},k=t=>(e.pushScopeId("data-v-a94f16a9"),t=t(),e.popScopeId(),t),Eo=["id"],No={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},Vo={class:"w-full"},Bo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Co=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],$o={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},So=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Do=["id"],Oo=["id"],To={class:"w-full"},Po={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Mo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],jo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ao=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Lo={class:"w-full"},Io={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},zo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Fo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Go=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Ro=["onClick"],Uo=[k(()=>e.createElementVNode("span",null,null,-1))],qo={key:1,class:"flex justify-between pl-5 pr-5"},Ho=["onClick"],Zo=[k(()=>e.createElementVNode("span",null,null,-1))],Ko={key:0,class:"flex"},Wo={class:"flex items-center"},Yo={class:"w-full"},Xo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Jo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Qo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},vo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],en={class:"flex items-center"},tn={class:"w-full"},rn={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},on=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],nn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},an=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],ln={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},sn={class:"w-full"},dn={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},cn=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],mn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},gn=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))];function fn(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slide"?"flex":"relative block"]),id:"mainSliderContainer_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",No,[e.createElementVNode("div",Vo,[e.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:r[0]||(r[0]=i=>n.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Bo,Co)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",$o,So)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",n.sliderContainerAction()]),id:"sliderContainer_"+t.Random_string},[e.createElementVNode("ul",{class:"flex",id:"slider_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[e.createElementVNode("div",To,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[1]||(r[1]=e.withModifiers(i=>n.prev(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Po,Mo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",jo,Ao)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[e.createElementVNode("div",Lo,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[2]||(r[2]=e.withModifiers(i=>n.next(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Io,zo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Fo,Go)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0)],8,Oo),o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex justify-center mb-1 space-x-1",n.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>n.setDot(i)},Uo,10,Ro))),128))],2)):e.createCommentVNode("",!0),o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",qo,[e.createElementVNode("div",{class:e.normalizeClass(["flex justify-center mb-1 space-x-1",n.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>n.setDot(i)},Zo,10,Ho))),128))],2),t.dotsNum>0?(e.openBlock(),e.createElementBlock("div",Ko,[e.createElementVNode("div",Wo,[e.createElementVNode("div",Yo,[e.createElementVNode("button",{class:e.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:r[3]||(r[3]=i=>n.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Xo,Jo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Qo,vo)):e.createCommentVNode("",!0)],2)])]),e.createElementVNode("div",en,[e.createElementVNode("div",tn,[e.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:r[4]||(r[4]=i=>n.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",rn,on)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",nn,an)):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Do),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",sn,[e.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:r[5]||(r[5]=i=>n.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",dn,cn)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",mn,gn)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],10,Eo)])}const hn=p(wo,[["render",fn],["__scopeId","data-v-a94f16a9"]]),un={class:"fixed left-0 top-13 z-[1055] h-full w-full overflow-y-auto overflow-x-hidden outline-none inset-0 bg-black bg-opacity-80",tabindex:"-1","aria-hidden":"true"},pn={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-none bg-white border rounded-lg border-stroke dark:border-strokedark dark:bg-boxdark"},yn={class:"flex items-center justify-between flex-shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600"},_n={class:"text-xl font-medium leading-normal text-surface dark:text-white"},bn=[e.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)],kn={class:"flex flex-wrap items-center justify-end flex-shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600"},xn={__name:"GlModal",props:{is_open:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(t,{emit:r}){const o=t,a=r,l=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},n=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},i=()=>{a("closeModal"),n()};return e.watch(()=>o.is_open,(s,d)=>{s?l():n()},{immediate:!0,deep:!0}),(s,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none relative h-[calc(100%-1rem)] w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:h-[calc(100%-3.5rem)]",t.max_width])},[e.createElementVNode("div",pn,[e.createElementVNode("div",yn,[e.createElementVNode("h5",_n,e.toDisplayString(t.title),1),e.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-none dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:i,"aria-label":"Close"},bn)]),e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-y-auto",t.bodyClass])},[e.renderSlot(s.$slots,"body")],2),e.createElementVNode("div",kn,[e.renderSlot(s.$slots,"buttons"),e.createElementVNode("button",{onClick:i,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Close ")])])],2)],512)),[[e.vShow,t.is_open]])}},wn={class:"mb-4"},En={class:"flex justify-between px-6 py-3 -mb-px border border-gray-300 no-underlin"},Nn={class:"relative inline-flex items-center cursor-pointer"},Vn=["name","id","checked"],Bn=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),Cn=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),$n={class:"flex justify-between px-6 py-3 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-frontenddark"},Sn={class:"relative inline-flex items-center cursor-pointer"},Dn=["name","id"],On=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),Tn={class:"gl-span-form-error"},Pn={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Mn={__name:"GlToggleBox",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:String,required:!0},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:r}){const o=t,a=r,l=e.ref(null),n=e.computed({get(){return o.modelValue},set(i){a("update:modelValue",i)}});return(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("div",wn,[e.createElementVNode("li",En,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",Nn,[e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,checked:t.modelValue,"true-value":1,"false-value":0,ref_key:"input",ref:l,disabled:""},null,8,Vn),Bn])])]),Cn],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("li",$n,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",Sn,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,"true-value":1,"false-value":0,ref_key:"input",ref:l,"onUpdate:modelValue":s[0]||(s[0]=d=>n.value=d)},null,8,Dn),[[e.vModelCheckbox,n.value]]),On])]),e.createElementVNode("span",Tn,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Pn,e.toDisplayString(t.description),1)],2))],64))}},jn={class:"font-bold ptext-lg dark:text-white"},An={class:"mt-3 mb-4"},Ln={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},In=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),zn=["name","id","value"],Fn={key:0,class:"dropdown"},Gn={class:"border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},Rn={class:"relative showOptions"},Un=["value","placeholder"],qn={class:"text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999]"},Hn={class:"p-1"},Zn=e.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1),Kn={class:"relative"},Wn=e.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1),Yn=["id"],Xn={class:"overflow-y-auto max-h-64"},Jn=["onClick","onMousedown","id"],Qn={class:"flex items-center py-2 pl-10 pr-4"},vn={key:0,class:"absolute flex items-center flex-shrink-0 w-4 h-4 text-green-500 left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},ea=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)],ta={class:"block mt-1 text-sm font-normal leading-5 text-red-500"},ra={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},oa={__name:"GlDropdown",props:{modelValue:{type:[String,Number],default:""},defaultValue:{type:[String,Number],default:""},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:()=>[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue","selected","selectionChanged"],setup(t,{emit:r}){const o=t,a=r,l=e.ref(null),n=e.ref({}),i=e.ref(0),s=e.ref(!1),d=e.ref(""),c=e.ref("");e.onMounted(()=>{c.value=$(),o.show||(document.body.addEventListener("click",g=>{ld(g)}),document.addEventListener("keypress",g=>{g.key==="Enter"&&g.target.form&&g.preventDefault()}))});const m=e.computed(()=>dd()),h=e.computed(()=>cd()),u=e.computed(()=>{const g=[],b=new RegExp(d.value,"ig");for(const w of m.value){const S=String(w.name);(d.value.length<1||S.match(b))&&g.length<o.maxItem&&g.push(w)}return g});function y(g){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(g.key)){if(["ArrowUp","ArrowDown"].includes(g.key)&&g.preventDefault(),g.key==="ArrowDown"&&o.posts==="")return;id(g.key)}}function $(){let g=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(w){const S=(g+Math.random()*16)%16|0;return g=Math.floor(g/16),(w==="x"?S:S&3|8).toString(16)})}function q(g){return g!==null&&typeof g=="object"&&Object.keys(g).length>0}function ld(g){g.target.id!=o.field_name+"search"+c.value&&g.target.id!=o.field_name&&!g.target.classList.contains("showOptions")&&(ye(),i.value=0)}function ue(g){const b=`${g}${c.value}`,w=document.getElementById(b);w&&w.scrollIntoView()}function sd(g){const b=`${g}${c.value}`,w=document.getElementById(b);w&&w.click()}function id(g){g==="ArrowDown"&&i.value<u.value.length&&(i.value++,ue(i.value)),g==="ArrowUp"&&i.value>1&&(i.value--,ue(i.value)),g==="Enter"&&sd(i.value)}function dd(){return o.options.map((g,b)=>typeof g=="object"?g:{id:g,name:g})}function cd(){if(q(n.value))return typeof n.value=="object"?m.value.find(g=>String(g.id)===String(n.value.id))||{}:m.value.find(g=>String(g.id)===String(n.value))||{};if(o.modelValue)return typeof o.modelValue=="object"?m.value.find(g=>String(g.id)===String(o.modelValue.id))||{}:m.value.find(g=>String(g.id)===String(o.modelValue))||{}}function pe(g){n.value=g,s.value=!1,a("update:modelValue",n.value.id),a("selected",n.value),a("selectionChanged",n.value)}function H(){o.show||(d.value="",s.value=!0,e.nextTick(()=>{var g=document.getElementById(`${o.field_name}search${c.value}`);g&&g.focus()}))}function md(){o.show||(n.value={},d.value="",a("update:modelValue",""),H())}function ye(){n.value.id||(n.value={},d.value=""),a("selected",n.value),s.value=!1}return e.watch(d,()=>{u.value.length===0&&(n.value={})}),e.watch(n,g=>{q(g)&&a("update:modelValue",g.id)}),(g,b)=>{var w,S,_e;return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",jn,e.toDisplayString(t.label_name),1),e.createElementVNode("p",An,[e.createElementVNode("span",Ln,e.toDisplayString((w=h.value)==null?void 0:w.name),1)]),In],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("input",{type:"hidden",name:t.field_name,id:t.field_name,value:(S=h.value)==null?void 0:S.id},null,8,zn),t.options?(e.openBlock(),e.createElementBlock("div",Fn,[t.label_name?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required})},e.toDisplayString(t.label_name),3)):e.createCommentVNode("",!0),e.createElementVNode("div",Gn,[e.createElementVNode("div",Rn,[e.createElementVNode("input",{class:e.normalizeClass([{"gl-input-form":t.error_message=="","gl-input-form-invalid":t.error_message!==""},"pl-8 pr-2 showOptions"]),ref:t.field_name,onClick:b[0]||(b[0]=V=>H()),value:(_e=h.value)==null?void 0:_e.name,placeholder:t.placeholder,autocomplete:"off",readonly:""},null,10,Un),e.withDirectives(e.createElementVNode("i",{onClick:b[1]||(b[1]=e.withModifiers(V=>md(),["stop"])),class:"absolute text-gray-500 cursor-pointer fas fa-times right-7 hover:text-gray-700 dark:hover:text-gray-800",style:{top:"13px"}},null,512),[[e.vShow,q(h.value)&&t.has_cancel]]),e.createElementVNode("i",{onClick:b[2]||(b[2]=V=>!s.value&&H()),class:e.normalizeClass([s.value?"fa-angle-up":"fa-angle-down","absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions"]),style:{top:"11px"}},null,2)]),e.withDirectives(e.createElementVNode("div",qn,[e.createElementVNode("div",Hn,[Zn,e.createElementVNode("div",Kn,[Wn,e.withDirectives(e.createElementVNode("input",{type:"search","onUpdate:modelValue":b[3]||(b[3]=V=>d.value=V),ref:l.value,id:`${t.field_name}search${c.value}`,onKeydown:y,onBlur:b[4]||(b[4]=V=>ye()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 border rounded-lg outline-none border-frontend ps-10 bg-gray-50 focus:border-frontend dark:bg-gray-700 dark:border-frontenddark dark:placeholder-frontenddark dark:text-white dark:focus:border-frontenddark",placeholder:"Search ..."},null,40,Yn),[[e.vModelText,d.value]])])]),e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(V,Z)=>{var be;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",Z+1==i.value?"bg-gray-100 dark:bg-gray-600":""]),onClick:gd=>pe(V),onMousedown:gd=>pe(V),key:Z,id:`${Z+1}${c.value}`},[e.createElementVNode("div",Qn,[((be=h.value)==null?void 0:be.id)===V.id?(e.openBlock(),e.createElementBlock("svg",vn,ea)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(V.name||V.id||"-"),1)])],42,Jn)}),128))])],512),[[e.vShow,s.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("span",ta,e.toDisplayString(t.error_message),1),e.createElementVNode("small",ra,e.toDisplayString(t.description),1)],2))],64)}}},na={class:"font-bold ptext-lg dark:text-white"},aa=["id"],la=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),sa=["for"],ia=["required","name","id","type","placeholder"],da={class:"gl-span-form-error"},ca={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},ma={__name:"GlTextarea",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null);e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus()});const i=computed({get(){return a.modelValue},set(s){l("update:modelValue",s)}});return r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",na,e.toDisplayString(t.label_name),1),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,aa),la],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,sa),e.withDirectives(e.createElementVNode("textarea",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-textarea-form mt-4 ":t.error_message==""," gl-textarea-form-invalid mt-4 ":t.error_message!==""}),type:t.type,"onUpdate:modelValue":d[0]||(d[0]=c=>e.isRef(i)?i.value=c:null),onKeydown:d[1]||(d[1]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n,rows:"4",placeholder:t.placeholder},null,42,ia),[[e.vModelText,e.unref(i)]]),e.createElementVNode("span",da,e.toDisplayString(t.error_message),1),e.createElementVNode("small",ca,e.toDisplayString(t.description),1)],2))],64))}},ga={compatConfig:{MODE:3},inheritAttrs:!1,emits:["pagination-change-page"],components:{RenderlessPagination:{emits:["pagination-change-page"],props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0}},computed:{isApiResource(){return!!this.data.meta},currentPage(){return this.isApiResource?this.data.meta.current_page:this.data.current_page},firstPageUrl(){return this.isApiResource?this.data.links.first:null},from(){return this.isApiResource?this.data.meta.from:this.data.from},lastPage(){return this.isApiResource?this.data.meta.last_page:this.data.last_page},lastPageUrl(){return this.isApiResource?this.data.links.last:null},nextPageUrl(){return this.isApiResource?this.data.links.next:this.data.next_page_url},perPage(){return this.isApiResource?this.data.meta.per_page:this.data.per_page},prevPageUrl(){return this.isApiResource?this.data.links.prev:this.data.prev_page_url},to(){return this.isApiResource?this.data.meta.to:this.data.to},total(){return this.isApiResource?this.data.meta.total:this.data.total},pageRange(){if(this.limit===-1)return 0;if(this.limit===0)return this.lastPage;for(var t=this.currentPage,r=this.lastPage,o=this.limit,a=t-o,l=t+o+1,n=[],i=[],s,d=1;d<=r;d++)(d===1||d===r||d>=a&&d<l)&&n.push(d);return n.forEach(function(c){s&&(c-s===2?i.push(s+1):c-s!==1&&i.push("...")),i.push(c),s=c}),i}},methods:{previousPage(){this.selectPage(this.currentPage-1)},nextPage(){this.selectPage(this.currentPage+1)},selectPage(t){t!=="..."&&this.$emit("pagination-change-page",t)}},render(){return this.$slots.default({data:this.data,limit:this.limit,computed:{isApiResource:this.isApiResource,currentPage:this.currentPage,firstPageUrl:this.firstPageUrl,from:this.from,lastPage:this.lastPage,lastPageUrl:this.lastPageUrl,nextPageUrl:this.nextPageUrl,perPage:this.perPage,prevPageUrl:this.prevPageUrl,to:this.to,total:this.total,pageRange:this.pageRange},prevButtonEvents:{click:t=>{t.preventDefault(),this.previousPage()}},nextButtonEvents:{click:t=>{t.preventDefault(),this.nextPage()}},pageButtonEvents:t=>({click:r=>{r.preventDefault(),this.selectPage(t)}})})}}},props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0},showDisabled:{type:Boolean,default:!1},size:{type:String,default:"default",validator:t=>["small","default","large"].indexOf(t)!==-1},align:{type:String,default:"left",validator:t=>["left","center","right"].indexOf(t)!==-1}},methods:{onPaginationChangePage(t){this.$emit("pagination-change-page",t)}},mounted(){}},fa={class:"flex flex-col items-center"},ha={key:0,class:"text-sm text-gray-700 dark:text-gray-400"},ua={class:"font-semibold text-gray-900 dark:text-white"},pa={class:"font-semibold text-gray-900 dark:text-white"},ya={class:"font-semibold text-gray-900 dark:text-white"},_a=["tabindex"],ba=e.createElementVNode("span",{class:"sr-only"},"Previous",-1),ka=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1),xa=["aria-current"],wa=["tabindex"],Ea=e.createElementVNode("span",{class:"sr-only"},"Next",-1),Na=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1);function Va(t,r,o,a,l,n){const i=e.resolveComponent("RenderlessPagination");return e.openBlock(),e.createBlock(i,{data:o.data,limit:o.limit,onPaginationChangePage:n.onPaginationChangePage},{default:e.withCtx(s=>[e.createElementVNode("div",fa,[s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("span",ha,[e.createTextVNode(" Showing "),e.createElementVNode("span",ua,e.toDisplayString(s.computed.from),1),e.createTextVNode(" to "),e.createElementVNode("span",pa,e.toDisplayString(s.computed.to),1),e.createTextVNode(" of "),e.createElementVNode("span",ya,e.toDisplayString(s.computed.total),1),e.createTextVNode(" Entries ")])):e.createCommentVNode("",!0),s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1},t.$attrs,{class:["flex items-center h-8 -space-x-px text-sm",{"pagination-sm":o.size=="small","pagination-lg":o.size=="large","justify-content-center":o.align=="center","justify-content-end":o.align=="right"}]}),[s.computed.prevPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.prevPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"page-link",href:"#","aria-label":"Previous",tabindex:!s.computed.prevPageUrl&&-1},e.toHandlers(s.prevButtonEvents,!0)),[e.renderSlot(t.$slots,"prev-nav",{},()=>[ba,ka])],16,_a)],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.computed.pageRange,(d,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["",{active:d==s.computed.currentPage}]),key:c},[e.createElementVNode("a",e.mergeProps({class:"",href:"#"},e.toHandlers(s.pageButtonEvents(d),!0),{"aria-current":d==s.computed.currentPage?"page":null,class:d==s.computed.currentPage?"z-10 flex items-center justify-center px-3 h-8 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white":"flex items-center justify-center px-3 h-8 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}),e.toDisplayString(d),17,xa)],2))),128)),s.computed.nextPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.nextPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"",href:"#","aria-label":"Next",tabindex:!s.computed.nextPageUrl&&-1},e.toHandlers(s.nextButtonEvents,!0)),[e.renderSlot(t.$slots,"next-nav",{},()=>[Ea,Na])],16,wa)],2)):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)])]),_:3},8,["data","limit","onPaginationChangePage"])}const he=p(ga,[["render",Va]]),Ba={components:{TailwindPagination:he},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,refreshData:Boolean},data(){return{isLoading:!1,isMounted:!1,limit:5,showDisabled:!1,size:"default",align:"left",search:"",isDropdownOpen:!1,itemLists:[],tableData:[],sortField:this.columns[0].field_name,sortOrder:"asc",pageOptions:[5,10,20,50],perPage:5,page:1}},emits:["editAction"],computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a.toString().toLowerCase().includes(t)))}},methods:{editAction(t){this.$emit("editAction",t)},forDynCompIs(t){return typeof t=="object"?t:null},GetItemLists(t=1){this.isLoading=!0,this.page=t;const r={sort:this.sortField,order:this.sortOrder,s:this.search,limit:this.perPage,page:this.page};axios.get(this.xprops.route_get_data,{params:r}).then(o=>{this.itemLists=o.data,this.isLoading=!1}).catch(o=>{console.error(o),this.isLoading=!1})},updateSortColumn(t,r){r&&(t===this.sortField?this.sortOrder=this.sortOrder==="asc"?"desc":"asc":(this.sortField=t,this.sortOrder="asc"),this.GetItemLists(this.page))},handleSearch(){this.sortField=this.columns[0].field_name,this.sortOrder="asc",this.page=1,this.GetItemLists(this.page)}},mounted(){this.GetItemLists(),this.isMounted=!0},watch:{searchFilter(){this.filteredOptions.length===0?this.selected={}:this.selected=this.filteredOptions[0]},perPage(t){this.page=1,this.perPage=t,this.GetItemLists(this.page)},refreshData(t,r){this.isMounted&&t!==r&&this.GetItemLists()}}},Ca={class:"p-2"},$a={class:"flex flex-col flex-wrap pb-4 space-y-4 xl:flex-row xl:items-center xl:justify-between flex-column sm:space-y-0"},Sa={class:"flex items-center gap-2"},Da=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),Oa={style:{"margin-top":"9px"}},Ta=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),Pa=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Ma={class:"relative"},ja=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),Aa={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},La={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},Ia={class:"hidden text-sm font-normal text-center text-gray-500 lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},za=["onClick"],Fa={key:0,class:"ml-2"},Ga={key:0,class:"fa fa-arrow-up"},Ra={key:1,class:"fa fa-arrow-down"},Ua={key:0},qa=["colspan"],Ha=[e.createElementVNode("div",{role:"status",class:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[e.createElementVNode("div",{class:"flex items-center justify-between"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)],Za=["data-label"],Ka={class:"overflow-auto max-h-40"},Wa={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"};function Ya(t,r,o,a,l,n){const i=e.resolveComponent("dropdown"),s=e.resolveComponent("TailwindPagination");return e.openBlock(),e.createElementBlock("div",Ca,[e.createElementVNode("div",$a,[e.createElementVNode("div",Sa,[Da,e.createElementVNode("div",Oa,[e.createVNode(i,{has_cancel:!1,options:l.pageOptions,modelValue:l.perPage,"onUpdate:modelValue":r[0]||(r[0]=d=>l.perPage=d),is_required:!1,field_name:"perPage",label_name:"",default_value:5,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),Ta]),Pa,e.createElementVNode("div",Ma,[ja,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=d=>l.search=d),onInput:r[2]||(r[2]=d=>n.handleSearch()),class:"block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,544),[[e.vModelText,l.search]])])]),e.createElementVNode("div",Aa,[e.createElementVNode("table",La,[e.createElementVNode("thead",Ia,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(d,c)=>(e.openBlock(),e.createElementBlock("th",{key:c,onClick:m=>n.updateSortColumn(d.field_name,d.sortable),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(d.field_label)+" ",1),l.sortField===d.field_name?(e.openBlock(),e.createElementBlock("span",Fa,[l.sortOrder==="asc"?(e.openBlock(),e.createElementBlock("i",Ga)):(e.openBlock(),e.createElementBlock("i",Ra))])):e.createCommentVNode("",!0)],8,za))),128))])]),e.createElementVNode("tbody",null,[l.isLoading?(e.openBlock(),e.createElementBlock("tr",Ua,[e.createElementVNode("td",{colspan:o.columns.length},Ha,8,qa)])):e.createCommentVNode("",!0),l.isLoading?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.itemLists.data,(d,c)=>(e.openBlock(),e.createElementBlock("tr",{key:c,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 hover:dark:text-gray-200 text-gray-500"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(m,h)=>(e.openBlock(),e.createElementBlock("td",{key:h,"data-label":m.field_label,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("div",Ka,[m.tdComp?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.forDynCompIs(m.tdComp)),{key:0,row:d,field:m.field_name,xprops:o.xprops,tdProps:m.tdProps,onDeleteAction:r[3]||(r[3]=u=>n.GetItemLists()),onEditAction:u=>n.editAction(d)},null,40,["row","field","xprops","tdProps","onEditAction"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d[m.field_name]),1)],64))])],8,Za))),128))]))),128))])])]),e.createElementVNode("div",Wa,[e.createVNode(s,{class:"mt-3 mb-0",data:l.itemLists,limit:l.limit,size:l.size,align:l.align,onPaginationChangePage:n.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])}const Xa=p(Ba,[["render",Ya]]),Ja={components:{},props:{data:Array,columns:Array},data(){return{showNoOfEntries:[1,2,3,10,20,30,40],search:"",sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a!=null&&a.toString().toLowerCase().includes(t)))},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const t=(this.currentPage-1)*this.itemsPerPage,r=t+this.itemsPerPage;return this.filteredData.slice(t,r)},displayedPageNumbers(){let t=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),r=t+this.maxDisplayedPages-1;return r>this.totalPages&&(r=this.totalPages,t=Math.max(r-this.maxDisplayedPages+1,1)),Array.from({length:r-t+1},(o,a)=>t+a)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const t=this.itemsPerPage*this.currentPage;return t>this.filteredData.length?this.filteredData.length:t}},methods:{handleItemsPerPageChange(t){this.itemsPerPage=t},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)},sort(t){t===this.sortKey?this.sortOrder*=-1:(this.sortKey=t,this.sortOrder=1)},sortData(t){return this.sortKey?t.slice().sort((r,o)=>(r[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):t},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)}}},Qa={class:"p-2"},va={class:"flex flex-wrap pb-4 space-y-4 md:items-center md:justify-between flex-column sm:flex-row sm:space-y-0"},el={class:"flex items-center gap-2"},tl=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),rl={style:{"margin-top":"9px"}},ol=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),nl=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),al={class:"relative"},ll=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),sl={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},il={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},dl={class:"hidden text-sm font-normal text-center text-gray-700 lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},cl=["onClick"],ml={key:0,class:"ml-2"},gl={key:0,class:"fa fa-arrow-up"},fl={key:1,class:"fa fa-arrow-down"},hl=["data-label"],ul=["innerHTML"],pl={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},yl={class:"flex justify-between flex-1 sm:hidden"},_l=["disabled"],bl=["disabled"],kl={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},xl={class:"text-sm text-gray-700 dark:text-gray-400"},wl={class:"font-medium"},El={class:"font-medium"},Nl={class:"font-medium"},Vl={"aria-label":"Page navigation"},Bl={class:"flex items-center h-8 -space-x-px text-sm"},Cl=["disabled"],$l=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)],Sl=["onClick"],Dl=["onClick"],Ol=["disabled"],Tl=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)];function Pl(t,r,o,a,l,n){const i=e.resolveComponent("dropdown");return e.openBlock(),e.createElementBlock("div",Qa,[e.createElementVNode("div",va,[e.createElementVNode("div",el,[tl,e.createElementVNode("div",rl,[e.createVNode(i,{has_cancel:!1,options:l.showNoOfEntries,modelValue:l.itemsPerPage,"onUpdate:modelValue":r[0]||(r[0]=s=>l.itemsPerPage=s),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:10,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),ol]),nl,e.createElementVNode("div",al,[ll,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=s=>l.search=s),class:"block p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,512),[[e.vModelText,l.search]])])]),e.createElementVNode("div",sl,[e.createElementVNode("table",il,[e.createElementVNode("thead",dl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(s,d)=>(e.openBlock(),e.createElementBlock("th",{key:d,onClick:c=>n.sort(s),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(s)+" ",1),l.sortKey===s?(e.openBlock(),e.createElementBlock("span",ml,[l.sortOrder==="asc"?(e.openBlock(),e.createElementBlock("i",gl)):(e.openBlock(),e.createElementBlock("i",fl))])):e.createCommentVNode("",!0)],8,cl))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.paginatedData,(s,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 hover:dark:text-gray-200 text-gray-500"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(c,m)=>(e.openBlock(),e.createElementBlock("td",{key:m,"data-label":c,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("p",{class:"text-pretty",innerHTML:s[m]},null,8,ul)],8,hl))),128))]))),128))])])]),n.paginatedData.length>0?(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",yl,[e.createElementVNode("a",{href:"#",onClick:r[2]||(r[2]=(...s)=>n.previousPage&&n.previousPage(...s)),disabled:l.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,_l),e.createElementVNode("a",{href:"#",onClick:r[3]||(r[3]=(...s)=>n.nextPage&&n.nextPage(...s)),disabled:l.currentPage===n.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,bl)]),e.createElementVNode("div",kl,[e.createElementVNode("div",null,[e.createElementVNode("p",xl,[e.createTextVNode(" Showing "),e.createElementVNode("span",wl,e.toDisplayString(n.firstItemIndex),1),e.createTextVNode(" to "),e.createElementVNode("span",El,e.toDisplayString(n.lastItemIndex),1),e.createTextVNode(" of "),e.createElementVNode("span",Nl,e.toDisplayString(n.filteredData.length),1),e.createTextVNode(" entries ")])]),e.createElementVNode("div",null,[e.createElementVNode("nav",Vl,[e.createElementVNode("ul",Bl,[e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[4]||(r[4]=(...s)=>n.previousPage&&n.previousPage(...s)),disabled:l.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},$l,8,Cl)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayedPageNumbers,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[e.createElementVNode("li",null,[l.currentPage!==s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>n.goToPage(s),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},e.toDisplayString(s),9,Sl)):e.createCommentVNode("",!0)]),e.createElementVNode("li",null,[l.currentPage===s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>n.goToPage(s),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},e.toDisplayString(s),9,Dl)):e.createCommentVNode("",!0)])],64))),128)),e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[5]||(r[5]=(...s)=>n.nextPage&&n.nextPage(...s)),disabled:l.currentPage===n.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},Tl,8,Ol)])])])])])])):e.createCommentVNode("",!0)])}const Ml=p(Ja,[["render",Pl]]),jl={class:"flex items-center p-4 text-gray-500 bg-white rounded-lg shadow dark:bg-gray-800 dark:text-gray-400",role:"alert"},Al={key:0,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},Ll=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Check icon",-1)],Il={key:1,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},zl=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Error icon",-1)],Fl={key:2,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"},Gl=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Warning icon",-1)],Rl={class:"ml-3 text-sm font-normal"},Ul=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)],ql={__name:"ToastListItem",props:{message:String,duration:{type:Number,default:2e3},type:{type:String,default:"success"}},emits:["remove"],setup(t,{emit:r}){const o=t;e.onMounted(()=>{setTimeout(()=>a("remove"),o.duration)});const a=r;return(l,n)=>(e.openBlock(),e.createElementBlock("div",jl,[o.type==="success"?(e.openBlock(),e.createElementBlock("div",Al,Ll)):e.createCommentVNode("",!0),o.type==="error"?(e.openBlock(),e.createElementBlock("div",Il,zl)):e.createCommentVNode("",!0),o.type==="warning"?(e.openBlock(),e.createElementBlock("div",Fl,Gl)):e.createCommentVNode("",!0),e.createElementVNode("div",Rl,e.toDisplayString(o.message),1),e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>a("remove")),type:"button",class:"-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white","data-dismiss-target":"#toast-default","aria-label":"Close"},Ul)]))}},R=e.reactive({items:[]}),U={state:R,methods:{add(t){R.items.unshift({key:Symbol(),message:t.message,type:t.type,duration:t.duration})},remove(t){R.items.splice(t,1)}}},Hl={__name:"GlToastList",setup(t){function r(o){U.methods.remove(o)}return(o,a)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div","enter-from-class":"translate-x-full opacity-0","enter-active-class":"duration-500","leave-active-class":"duration-500","leave-to-class":"translate-x-full opacity-0",class:"fixed z-50 w-full max-w-xs space-y-4 top-4 right-4"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U).state.items,(l,n)=>(e.openBlock(),e.createBlock(ql,{key:l.key,message:l.message,type:l.type,duration:l.duration,onRemove:i=>r(n)},null,8,["message","type","duration","onRemove"]))),128))]),_:1}))}},Zl={key:0,class:"flex justify-center"},Kl=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],Wl={class:"absolute right-0 z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},Yl={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},Xl={key:0},Jl=["href"],Ql=e.createElementVNode("i",{class:"mr-2 fa-solid fa-list-ul opacity-80"},null,-1),vl={key:1},es=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),ts={__name:"DatatableAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=Y(),a=t,l=e.ref(!1),n=e.ref(!1),i=()=>{l.value=!1},s=()=>{l.value=!0},d=()=>{n.value=!1},c=()=>{n.value=!0},m=r,h=()=>{axios.delete(`${a.xprops.route}/${a.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(u=>{console.log(u)})};return(u,y)=>{const $=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,{isOpen:n.value,onConfirmDelete:h,onCancelDelete:d},null,8,["isOpen"]),t.row&&u.can(`edit_${t.xprops.permission} || delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",Zl,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},Kl),e.withDirectives(e.createElementVNode("div",Wl,[e.createElementVNode("ul",Yl,[u.can(`edit_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",Xl,[e.createElementVNode("a",{href:t.xprops.route+"/"+t.row.id+"/edit",class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Ql,e.createTextVNode(" Edit")],8,Jl)])):e.createCommentVNode("",!0),u.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",vl,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[es,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,l.value]])])),[[$,i]]):e.createCommentVNode("",!0)],64)}}},rs={key:0,class:"flex justify-center"},os=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],ns={class:"absolute right-0 z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},as={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},ls={key:0},ss=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),is={__name:"DatatableDeleteAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=Y(),a=t,l=e.ref(!1),n=e.ref(!1),i=()=>{l.value=!1},s=()=>{l.value=!0},d=()=>{n.value=!1},c=()=>{n.value=!0},m=r,h=()=>{axios.delete(`${a.xprops.route}/${a.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(u=>{console.log(u)})};return(u,y)=>{const $=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,{isOpen:n.value,onConfirmDelete:h,onCancelDelete:d},null,8,["isOpen"]),t.row&&u.can(`delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",rs,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},os),e.withDirectives(e.createElementVNode("div",ns,[e.createElementVNode("ul",as,[u.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",ls,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[ss,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,l.value]])])),[[$,i]]):e.createCommentVNode("",!0)],64)}}},ds={props:["field","row"],computed:{isArray(){return Array.isArray(this.row)},isObject(){return typeof this.row=="object"},isString(){return typeof this.row=="string"}},mounted(){}},cs=["href","title"],ms=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),gs={key:1,class:"m-1 d-inline-block"},fs=["href","title"],hs=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function us(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",null,[n.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i,title:i,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ms,e.createTextVNode(" Download ")],8,cs)]))),128)):n.isString?(e.openBlock(),e.createElementBlock("div",gs,[e.createElementVNode("a",{href:o.row,title:o.row,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[hs,e.createTextVNode(" Download ")],8,fs)])):e.createCommentVNode("",!0)])}const ps=p(ds,[["render",us]]),ys={props:["field","row"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},_s=["href","title"],bs=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),ks={key:1,class:"m-1 d-inline-block"},xs=["href","title"],ws=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function Es(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",null,[n.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[o.field],i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i.url,title:i.name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[bs,e.createTextVNode(" Download ")],8,_s)]))),128)):n.isObject?(e.openBlock(),e.createElementBlock("div",ks,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ws,e.createTextVNode(" Download ")],8,xs)])):e.createCommentVNode("",!0)])}const Ns=p(ys,[["render",Es]]),Vs={props:["field","row","tdProps"]},Bs={key:0},Cs=["innerHTML"];function $s(t,r,o,a,l,n){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",Bs,[e.createElementVNode("div",{class:"w-full",innerHTML:o.row[o.field]},null,8,Cs)])):e.createCommentVNode("",!0)}const Ss=p(Vs,[["render",$s]]),Ds={props:["field","row","tdProps"],computed:{entry(){const[t,r]=this.field.split(".");return e.markRaw({key:t,field:r})},isArray(){return Array.isArray(this.row[this.entry.key])},isObject(){return typeof this.row[this.entry.key]=="object"}}},Os={class:"flex flex-wrap gap-2"},Ts={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"};function Ps(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",Os,[n.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[n.entry.key],(i,s)=>(e.openBlock(),e.createElementBlock("span",{key:s,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"},e.toDisplayString(i[n.entry.field]),1))),128)):n.isObject?(e.openBlock(),e.createElementBlock("span",Ts,e.toDisplayString(o.row[n.entry.key][n.entry.field]),1)):e.createCommentVNode("",!0)])}const Ms=p(Ds,[["render",Ps]]),js={props:["field","row","tdProps"]},As={key:0},Ls={class:"m-1 d-inline-block"},Is=["href","title"],zs=["src","alt","title"];function Fs(t,r,o,a,l,n){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",As,[e.createElementVNode("div",Ls,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank"},[e.createElementVNode("img",{src:o.row[o.field].thumbnail,alt:o.row[o.field].name,title:o.row[o.field].name},null,8,zs)],8,Is)])])):e.createCommentVNode("",!0)}const Gs=p(js,[["render",Fs],["__scopeId","data-v-3a28c02c"]]),Rs={props:["field","row","tdProps"],computed:{isActive(){return this.row[this.field]===1}}},Us={class:"flex flex-wrap gap-2 text-nowrap"},qs={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},Hs=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),Zs={key:1,class:"inline-flex items-center bg-red-100 text-red-800 text-xs font-medium px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300"},Ks=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1);function Ws(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",Us,[n.isActive?(e.openBlock(),e.createElementBlock("span",qs,[Hs,e.createTextVNode(" Active ")])):n.isActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Zs,[Ks,e.createTextVNode(" Inactive ")]))])}const Ys=p(Rs,[["render",Ws]]),Xs={props:["field","row","tdProps"],computed:{hasLabelColor(t){const r=this.tdProps.status_general_labels_color.find(o=>o.label===this.row[this.field]);return r?r.class:""}}},Js={class:"flex flex-wrap gap-2 text-nowrap"},Qs={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},vs=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),ei={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},ti=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),ri={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},oi=e.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),ni={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},ai=e.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1),li={key:4,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},si=e.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[e.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),e.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1);function ii(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",Js,[n.hasLabelColor=="green"?(e.openBlock(),e.createElementBlock("span",Qs,[vs,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="red"?(e.openBlock(),e.createElementBlock("span",ei,[ti,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="yellow"?(e.openBlock(),e.createElementBlock("span",ri,[oi,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="default"?(e.openBlock(),e.createElementBlock("span",ni,[ai,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="animate"?(e.openBlock(),e.createElementBlock("span",li,[si,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0)])}const di=p(Xs,[["render",ii]]),ci={props:["field","row","tdProps"],computed:{hasLabelColor(){return this.tdProps.specfic_color??""},badgeType(){switch(this.tdProps.badge_type){case"Default":return"rounded text-xs";case"Large":return"rounded text-sm ";case"Bordered":return"rounded text-xs border";case"Pills":return"rounded-full text-xs";default:return""}}}},mi={class:"flex flex-wrap gap-2 text-nowrap"};function gi(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",mi,[n.hasLabelColor=="Default"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["bg-blue-100 text-blue-800 font-medium me-2 px-2.5 py-0.5 dark:bg-blue-900 dark:text-blue-300 border-blue-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Dark"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["bg-gray-100 text-gray-800 font-medium me-2 px-2.5 py-0.5 dark:bg-gray-700 dark:text-gray-300 border-gray-500",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Red"?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(["bg-red-100 text-red-800 font-medium me-2 px-2.5 py-0.5 dark:bg-red-900 dark:text-red-300 border-red-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Green"?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(["bg-green-100 text-green-800 font-medium me-2 px-2.5 py-0.5 dark:bg-green-900 dark:text-green-300 border-green-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Yellow"?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass(["bg-yellow-100 text-yellow-800 font-medium me-2 px-2.5 py-0.5 dark:bg-yellow-900 dark:text-yellow-300 border-yellow-300",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Indigo"?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(["bg-indigo-100 text-indigo-800 font-medium me-2 px-2.5 py-0.5 dark:bg-indigo-900 dark:text-indigo-300 border-indigo-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Purple"?(e.openBlock(),e.createElementBlock("span",{key:6,class:e.normalizeClass(["bg-purple-100 text-purple-800 font-medium me-2 px-2.5 py-0.5 dark:bg-purple-900 dark:text-purple-300 border-purple-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Pink"?(e.openBlock(),e.createElementBlock("span",{key:7,class:e.normalizeClass(["bg-pink-100 text-pink-800 font-medium me-2 px-2.5 py-0.5 dark:bg-pink-900 dark:text-pink-300 border-pink-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0)])}const fi=p(ci,[["render",gi]]),hi={props:["field","row","tdProps"],computed:{formattedDate(){if(!this.row[this.field])return"";const t=new Date(this.row[this.field]),r=t.getFullYear(),o=t.toLocaleString("default",{month:"long"}),a=t.getDate();let l=t.getHours();const n=t.getMinutes(),i=t.getSeconds(),s=l>=12?"pm":"am";return l=l%12,l=l||12,`${o} ${a}, ${r}, ${l}:${n}:${i} ${s}`},isActive(){return this.row[this.field]===1}}},ui={class:"w-full"};function pi(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",ui,e.toDisplayString(n.formattedDate),1)}const yi=p(hi,[["render",pi]]),_i={props:["field","row","tdProps"]},bi={class:"flex flex-wrap gap-2 text-nowrap"},ki={key:0,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},xi=e.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[e.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),e.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1),wi={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},Ei=e.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),Ni={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},Vi=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1);function Bi(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",bi,[o.row[o.field]===0?(e.openBlock(),e.createElementBlock("span",ki,[xi,e.createTextVNode(" Provisioning")])):e.createCommentVNode("",!0),o.row[o.field]===2?(e.openBlock(),e.createElementBlock("span",wi,[Ei,e.createTextVNode(" Paused ")])):e.createCommentVNode("",!0),o.row[o.field]===1?(e.openBlock(),e.createElementBlock("span",Ni,[Vi,e.createTextVNode(" Active ")])):e.createCommentVNode("",!0)])}const Ci=p(_i,[["render",Bi]]),$i={props:["field","row","tdProps"]},Si={key:0,class:"text-nowrap"},Di={class:"w-full h-full p-3 mx-0 mt-0 overflow-auto font-mono text-left text-white break-words rounded cursor-default whitespace-nowrap bg-zinc-700"};function Oi(t,r,o,a,l,n){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",Si,[e.createElementVNode("pre",Di," "+e.toDisplayString(o.row[o.field])+`
|
|
7
|
+
`,42,Ir),e.createElementVNode("span",zr,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Fr,e.toDisplayString(t.description),1)],2))],64))}},Rr={class:"font-bold ptext-lg dark:text-white"},Ur=["name","id"],qr=["id"],Hr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Zr=["for"],Kr=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),Wr=["name","id"],Yr=["required","name","id","type"],Xr={class:"gl-span-form-error"},Jr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Qr={__name:"GlTextTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null),i=e.ref(null);return e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus(),a.model_value&&(l("update:modelValue",a.model_value),n.value.value=a.model_value),a.model_value_translate,a.translatable&&axios.post("/admin/get_field_translations",{model:a.translatable.model,row_id:a.translatable.row_id,field:a.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),l("update:modelValueTranslate",JSON.stringify(s.data))}).catch(s=>{console.log(s)})}),r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Rr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref:"input_translate_s","onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,Ur),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,qr),Hr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Zr),Kr,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,Wr),e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-input-form form-input-translation mt-2 ":t.error_message==""," gl-input-form-invalid form-input-translation mt-2 ":t.error_message!==""}),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n},null,42,Yr),e.createElementVNode("span",Xr,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Jr,e.toDisplayString(t.description),1)],2))],64))}},vr={class:"font-bold ptext-lg dark:text-white"},eo={class:"mb-4 text-base text-gray-900 dark:text-white"},to=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),ro=["for"],oo=["required","name","id","type","placeholder"],no={class:"gl-span-form-error"},ao={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},lo={__name:"GlTextInput",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null);e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus()});const i=e.computed({get(){return a.modelValue},set(s){l("update:modelValue",s)}});return r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",vr,e.toDisplayString(t.label_name),1),e.createElementVNode("p",eo,e.toDisplayString(t.type=="password"?t.modelValue.replace(/./g,"*"):t.modelValue),1),to],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,ro),e.withDirectives(e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({"gl-input-form":t.error_message=="","gl-input-form-invalid":t.error_message!==""}),type:t.type,"onUpdate:modelValue":d[0]||(d[0]=c=>i.value=c),onKeydown:d[1]||(d[1]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n,placeholder:t.placeholder},null,42,oo),[[e.vModelDynamic,i.value]]),e.createElementVNode("span",no,e.toDisplayString(t.error_message),1),e.createElementVNode("small",ao,e.toDisplayString(t.description),1)],2))],64))}},so={setup(t,{slots:r}){const o=e.ref(r.default().map(l=>l.props)),a=e.ref(o.value[0].title);return e.provide("selectedTitle",a),{tabs:o,selectedTitle:a}}},io={class:"flex flex-wrap"},co={class:"w-full"},mo={class:"flex flex-row flex-wrap gap-1 pt-3 pb-4 mb-0 list-none"},go=["onClick"],fo={class:"relative flex flex-col w-full min-w-0 mb-6 break-words bg-white rounded shadow-lg dark:border-strokedark dark:bg-boxdark"},ho={class:"flex-auto px-4 py-5"},uo={class:"tab-content tab-space"};function po(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",io,[e.createElementVNode("div",co,[e.createElementVNode("ul",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,i=>(e.openBlock(),e.createElementBlock("li",{key:i.title,onClick:s=>a.selectedTitle=i.title,class:"flex-auto -mb-px text-center"},[e.createElementVNode("a",{class:e.normalizeClass([{"text-slate-600 bg-white dark:bg-meta-4":a.selectedTitle!=i.title,"text-white bg-slate-600 dark:bg-primary":a.selectedTitle===i.title},"block px-5 py-3 text-xs font-bold leading-normal rounded shadow-lg hover:text-white tex hover:bg-slate-600 dark:hover:bg-primary dark:text-white tabs_buttons"])},[e.createElementVNode("i",{class:e.normalizeClass([i.icon,"mr-1 text-base"])},null,2),e.createTextVNode(" "+e.toDisplayString(i.title),1)],2)],8,go))),128))])])]),e.createElementVNode("div",fo,[e.createElementVNode("div",ho,[e.createElementVNode("div",uo,[e.renderSlot(t.$slots,"default")])])])],64)}const yo=p(so,[["render",po]]),_o={props:["title"],setup(){return{selectedTitle:e.inject("selectedTitle")}}},bo={key:0,class:"block"};function ko(t,r,o,a,l,n){return o.title==a.selectedTitle?(e.openBlock(),e.createElementBlock("div",bo,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("",!0)}const xo=p(_o,[["render",ko]]),wo={props:{elements_to_show_prop:{type:Number,default:3},hide_arrow:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"}},data:function(){return{elementsToShow:3,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,Random_string:this.generateRandomString(6)}},mounted(){this.elementsToShow=this.elements_to_show_prop,this.initSlider(),this.disable_touch||this.movingActions()},methods:{sliderIndicatorsAction(){var t="";return this.direction_property=="rtl"?(t+=" space-x-reverse ",t+=" slider_indicators "):this.slider_arrows_indicators_position=="arrows_indicators_inside_slider"&&(t+=" slider_indicators "),t},sliderContainerAction(){var t="";return!this.hide_arrow&&this.slider_arrows_indicators_position=="arrows_outside_slider"?t+=" w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12":this.slider_arrows_indicators_position!="arrows_outside_slider"&&(t+=" w-12/12 "),t},generateRandomString(t){let r="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let l=0;l<t;l++)r+=o.charAt(Math.floor(Math.random()*a));return r},movingActions(){let t=this,r=document.getElementById("slider_"+this.Random_string);const o=l=>{r.style.cursor="grabbing";const n=s=>{const d=s.clientX||s.touches&&s.touches[0]&&s.touches[0].clientX,c=s.clientY||s.touches&&s.touches[0]&&s.touches[0].clientY,m=d-t.initialX,h=c-t.initialY;Math.abs(m)>Math.abs(h)?(s.preventDefault(),Math.abs(m)>=70&&(m<0?t.next():t.prev(),t.initialX=d)):r.style.cursor="grab",Math.abs(h)>Math.abs(m)&&(r.style.cursor="grab")},i=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),r.style.cursor="grab"};document.addEventListener("mousemove",n),document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("mouseup",i),document.addEventListener("touchend",i),t.initialX=l.clientX||l.touches&&l.touches[0]&&l.touches[0].clientX,t.initialY=l.clientY||l.touches&&l.touches[0]&&l.touches[0].clientY},a=l=>{l.key==="ArrowLeft"?t.prev():l.key==="ArrowRight"&&t.next()};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),document.addEventListener("keydown",a)},next(){this.currentDot<this.dotsNavigation.length&&(this.currentDot++,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},initSlider(){let t=document.getElementById("sliderContainer_"+this.Random_string),r=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),a=o.querySelectorAll("li"),l=Array.from(a).filter(s=>s.parentNode===o),n=t.clientWidth,i=n/this.elementsToShow;if(this.elementsToShow>1?document.body.clientWidth<1e3?(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:n):document.body.clientWidth<1500&&(this.elementsToShow=2):(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:n),l.length>1){this.dotsNum=this.elementsToShow==1?l.length:l.length-this.elementsToShow+1;let s=this.elementsToShow==1?i*l.length/this.dotsNum:i*(l.length-this.elementsToShow)/(this.dotsNum-1);this.dotsNavigation=[];for(let d=0;d<this.dotsNum;d++)this.dotsNavigation.push(s*d)}o.style.width=l.length*i+"px",o.style.transition="margin",o.style.transitionDuration="1s";for(let s=0;s<l.length;s++){const d=l[s];d.style.width=i+"px"}},setDot(t){let r=document.getElementById("slider_"+this.Random_string);this.direction_property=="rtl"?r.style.marginRight=-this.dotsNavigation[t-1]+"px":r.style.marginLeft=-this.dotsNavigation[t-1]+"px",this.currentDot=t}}},k=t=>(e.pushScopeId("data-v-a94f16a9"),t=t(),e.popScopeId(),t),Eo=["id"],No={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},Vo={class:"w-full"},Bo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Co=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],$o={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},So=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Do=["id"],Oo=["id"],To={class:"w-full"},Po={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Mo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],jo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ao=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Lo={class:"w-full"},Io={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},zo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Fo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Go=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Ro=["onClick"],Uo=[k(()=>e.createElementVNode("span",null,null,-1))],qo={key:1,class:"flex justify-between pl-5 pr-5"},Ho=["onClick"],Zo=[k(()=>e.createElementVNode("span",null,null,-1))],Ko={key:0,class:"flex"},Wo={class:"flex items-center"},Yo={class:"w-full"},Xo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Jo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Qo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},vo=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],en={class:"flex items-center"},tn={class:"w-full"},rn={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},on=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],nn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},an=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],ln={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},sn={class:"w-full"},dn={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},cn=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],mn={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},gn=[k(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))];function fn(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slide"?"flex":"relative block"]),id:"mainSliderContainer_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",No,[e.createElementVNode("div",Vo,[e.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:r[0]||(r[0]=i=>n.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Bo,Co)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",$o,So)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",n.sliderContainerAction()]),id:"sliderContainer_"+t.Random_string},[e.createElementVNode("ul",{class:"flex",id:"slider_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[e.createElementVNode("div",To,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[1]||(r[1]=e.withModifiers(i=>n.prev(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Po,Mo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",jo,Ao)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[e.createElementVNode("div",Lo,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[2]||(r[2]=e.withModifiers(i=>n.next(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Io,zo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Fo,Go)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0)],8,Oo),o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex justify-center mb-1 space-x-1",n.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>n.setDot(i)},Uo,10,Ro))),128))],2)):e.createCommentVNode("",!0),o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",qo,[e.createElementVNode("div",{class:e.normalizeClass(["flex justify-center mb-1 space-x-1",n.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>n.setDot(i)},Zo,10,Ho))),128))],2),t.dotsNum>0?(e.openBlock(),e.createElementBlock("div",Ko,[e.createElementVNode("div",Wo,[e.createElementVNode("div",Yo,[e.createElementVNode("button",{class:e.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:r[3]||(r[3]=i=>n.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Xo,Jo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Qo,vo)):e.createCommentVNode("",!0)],2)])]),e.createElementVNode("div",en,[e.createElementVNode("div",tn,[e.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:r[4]||(r[4]=i=>n.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",rn,on)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",nn,an)):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Do),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",sn,[e.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:r[5]||(r[5]=i=>n.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",dn,cn)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",mn,gn)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],10,Eo)])}const hn=p(wo,[["render",fn],["__scopeId","data-v-a94f16a9"]]),un={class:"fixed left-0 top-13 z-[1055] h-full w-full overflow-y-auto overflow-x-hidden outline-none inset-0 bg-black bg-opacity-80",tabindex:"-1","aria-hidden":"true"},pn={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-none bg-white border rounded-lg border-stroke dark:border-strokedark dark:bg-boxdark"},yn={class:"flex items-center justify-between flex-shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600"},_n={class:"text-xl font-medium leading-normal text-surface dark:text-white"},bn=[e.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)],kn={class:"flex flex-wrap items-center justify-end flex-shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600"},xn={__name:"GlModal",props:{is_open:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(t,{emit:r}){const o=t,a=r,l=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},n=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},i=()=>{a("closeModal"),n()};return e.watch(()=>o.is_open,(s,d)=>{s?l():n()},{immediate:!0,deep:!0}),(s,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none relative h-[calc(100%-1rem)] w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:h-[calc(100%-3.5rem)]",t.max_width])},[e.createElementVNode("div",pn,[e.createElementVNode("div",yn,[e.createElementVNode("h5",_n,e.toDisplayString(t.title),1),e.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-none dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:i,"aria-label":"Close"},bn)]),e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-y-auto",t.bodyClass])},[e.renderSlot(s.$slots,"body")],2),e.createElementVNode("div",kn,[e.renderSlot(s.$slots,"buttons"),e.createElementVNode("button",{onClick:i,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Close ")])])],2)],512)),[[e.vShow,t.is_open]])}},wn={class:"mb-4"},En={class:"flex justify-between px-6 py-3 -mb-px border border-gray-300 no-underlin"},Nn={class:"relative inline-flex items-center cursor-pointer"},Vn=["name","id","checked"],Bn=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),Cn=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),$n={class:"flex justify-between px-6 py-3 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-frontenddark"},Sn={class:"relative inline-flex items-center cursor-pointer"},Dn=["name","id"],On=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),Tn={class:"gl-span-form-error"},Pn={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Mn={__name:"GlToggleBox",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:String,required:!0},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:r}){const o=t,a=r,l=e.ref(null),n=e.computed({get(){return o.modelValue},set(i){a("update:modelValue",i)}});return(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("div",wn,[e.createElementVNode("li",En,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",Nn,[e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,checked:t.modelValue,"true-value":1,"false-value":0,ref_key:"input",ref:l,disabled:""},null,8,Vn),Bn])])]),Cn],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("li",$n,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",Sn,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,"true-value":1,"false-value":0,ref_key:"input",ref:l,"onUpdate:modelValue":s[0]||(s[0]=d=>n.value=d)},null,8,Dn),[[e.vModelCheckbox,n.value]]),On])]),e.createElementVNode("span",Tn,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Pn,e.toDisplayString(t.description),1)],2))],64))}},jn={class:"font-bold ptext-lg dark:text-white"},An={class:"mt-3 mb-4"},Ln={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},In=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),zn=["name","id","value"],Fn={key:0,class:"dropdown"},Gn={class:"focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},Rn={class:"relative showOptions"},Un=["value","placeholder"],qn={class:"text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999]"},Hn={class:"p-1"},Zn=e.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1),Kn={class:"relative"},Wn=e.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1),Yn=["id"],Xn={class:"overflow-y-auto max-h-64"},Jn=["onClick","onMousedown","id"],Qn={class:"flex items-center py-2 pl-10 pr-4"},vn={key:0,class:"absolute flex items-center flex-shrink-0 w-4 h-4 text-green-500 left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},ea=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)],ta={class:"block mt-1 text-sm font-normal leading-5 text-red-500"},ra={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},oa={__name:"GlDropdown",props:{modelValue:{type:[String,Number],default:""},defaultValue:{type:[String,Number],default:""},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:()=>[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue","selected","selectionChanged"],setup(t,{emit:r}){const o=t,a=r,l=e.ref(null),n=e.ref({}),i=e.ref(0),s=e.ref(!1),d=e.ref(""),c=e.ref("");e.onMounted(()=>{c.value=$(),o.show||(document.body.addEventListener("click",g=>{ld(g)}),document.addEventListener("keypress",g=>{g.key==="Enter"&&g.target.form&&g.preventDefault()}))});const m=e.computed(()=>dd()),h=e.computed(()=>cd()),u=e.computed(()=>{const g=[],b=new RegExp(d.value,"ig");for(const w of m.value){const S=String(w.name);(d.value.length<1||S.match(b))&&g.length<o.maxItem&&g.push(w)}return g});function y(g){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(g.key)){if(["ArrowUp","ArrowDown"].includes(g.key)&&g.preventDefault(),g.key==="ArrowDown"&&o.posts==="")return;id(g.key)}}function $(){let g=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(w){const S=(g+Math.random()*16)%16|0;return g=Math.floor(g/16),(w==="x"?S:S&3|8).toString(16)})}function q(g){return g!==null&&typeof g=="object"&&Object.keys(g).length>0}function ld(g){g.target.id!=o.field_name+"search"+c.value&&g.target.id!=o.field_name&&!g.target.classList.contains("showOptions")&&(ye(),i.value=0)}function ue(g){const b=`${g}${c.value}`,w=document.getElementById(b);w&&w.scrollIntoView()}function sd(g){const b=`${g}${c.value}`,w=document.getElementById(b);w&&w.click()}function id(g){g==="ArrowDown"&&i.value<u.value.length&&(i.value++,ue(i.value)),g==="ArrowUp"&&i.value>1&&(i.value--,ue(i.value)),g==="Enter"&&sd(i.value)}function dd(){return o.options.map((g,b)=>typeof g=="object"?g:{id:g,name:g})}function cd(){if(q(n.value))return typeof n.value=="object"?m.value.find(g=>String(g.id)===String(n.value.id))||{}:m.value.find(g=>String(g.id)===String(n.value))||{};if(o.modelValue)return typeof o.modelValue=="object"?m.value.find(g=>String(g.id)===String(o.modelValue.id))||{}:m.value.find(g=>String(g.id)===String(o.modelValue))||{}}function pe(g){n.value=g,s.value=!1,a("update:modelValue",n.value.id),a("selected",n.value),a("selectionChanged",n.value)}function H(){o.show||(d.value="",s.value=!0,e.nextTick(()=>{var g=document.getElementById(`${o.field_name}search${c.value}`);g&&g.focus()}))}function md(){o.show||(n.value={},d.value="",a("update:modelValue",""),H())}function ye(){n.value.id||(n.value={},d.value=""),a("selected",n.value),s.value=!1}return e.watch(d,()=>{u.value.length===0&&(n.value={})}),e.watch(n,g=>{q(g)&&a("update:modelValue",g.id)}),(g,b)=>{var w,S,_e;return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",jn,e.toDisplayString(t.label_name),1),e.createElementVNode("p",An,[e.createElementVNode("span",Ln,e.toDisplayString((w=h.value)==null?void 0:w.name),1)]),In],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("input",{type:"hidden",name:t.field_name,id:t.field_name,value:(S=h.value)==null?void 0:S.id},null,8,zn),t.options?(e.openBlock(),e.createElementBlock("div",Fn,[t.label_name?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required})},e.toDisplayString(t.label_name),3)):e.createCommentVNode("",!0),e.createElementVNode("div",Gn,[e.createElementVNode("div",Rn,[e.createElementVNode("input",{class:e.normalizeClass([{"gl-input-form":t.error_message=="","gl-input-form-invalid":t.error_message!==""},"pl-8 pr-2 showOptions"]),ref:t.field_name,onClick:b[0]||(b[0]=V=>H()),value:(_e=h.value)==null?void 0:_e.name,placeholder:t.placeholder,autocomplete:"off",readonly:""},null,10,Un),e.withDirectives(e.createElementVNode("i",{onClick:b[1]||(b[1]=e.withModifiers(V=>md(),["stop"])),class:"absolute text-gray-500 cursor-pointer fas fa-times right-7 hover:text-gray-700 dark:hover:text-gray-800",style:{top:"13px"}},null,512),[[e.vShow,q(h.value)&&t.has_cancel]]),e.createElementVNode("i",{onClick:b[2]||(b[2]=V=>!s.value&&H()),class:e.normalizeClass([s.value?"fa-angle-up":"fa-angle-down","absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions"]),style:{top:"11px"}},null,2)]),e.withDirectives(e.createElementVNode("div",qn,[e.createElementVNode("div",Hn,[Zn,e.createElementVNode("div",Kn,[Wn,e.withDirectives(e.createElementVNode("input",{type:"search","onUpdate:modelValue":b[3]||(b[3]=V=>d.value=V),ref:l.value,id:`${t.field_name}search${c.value}`,onKeydown:y,onBlur:b[4]||(b[4]=V=>ye()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 border rounded-lg outline-none border-frontend ps-10 bg-gray-50 focus:border-frontend dark:bg-gray-700 dark:border-frontenddark dark:placeholder-frontenddark dark:text-white dark:focus:border-frontenddark",placeholder:"Search ..."},null,40,Yn),[[e.vModelText,d.value]])])]),e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(V,Z)=>{var be;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",Z+1==i.value?"bg-gray-100 dark:bg-gray-600":""]),onClick:gd=>pe(V),onMousedown:gd=>pe(V),key:Z,id:`${Z+1}${c.value}`},[e.createElementVNode("div",Qn,[((be=h.value)==null?void 0:be.id)===V.id?(e.openBlock(),e.createElementBlock("svg",vn,ea)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(V.name||V.id||"-"),1)])],42,Jn)}),128))])],512),[[e.vShow,s.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("span",ta,e.toDisplayString(t.error_message),1),e.createElementVNode("small",ra,e.toDisplayString(t.description),1)],2))],64)}}},na={class:"font-bold ptext-lg dark:text-white"},aa=["id"],la=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),sa=["for"],ia=["required","name","id","type","placeholder"],da={class:"gl-span-form-error"},ca={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},ma={__name:"GlTextarea",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(t,{expose:r,emit:o}){const a=t,l=o,n=e.ref(null);e.onMounted(()=>{n.value!==null&&n.value.hasAttribute("autofocus")&&n.value.focus()});const i=computed({get(){return a.modelValue},set(s){l("update:modelValue",s)}});return r({focus:()=>n.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",na,e.toDisplayString(t.label_name),1),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,aa),la],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,sa),e.withDirectives(e.createElementVNode("textarea",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-textarea-form mt-4 ":t.error_message==""," gl-textarea-form-invalid mt-4 ":t.error_message!==""}),type:t.type,"onUpdate:modelValue":d[0]||(d[0]=c=>e.isRef(i)?i.value=c:null),onKeydown:d[1]||(d[1]=c=>s.$emit("keydown",c)),ref_key:"input",ref:n,rows:"4",placeholder:t.placeholder},null,42,ia),[[e.vModelText,e.unref(i)]]),e.createElementVNode("span",da,e.toDisplayString(t.error_message),1),e.createElementVNode("small",ca,e.toDisplayString(t.description),1)],2))],64))}},ga={compatConfig:{MODE:3},inheritAttrs:!1,emits:["pagination-change-page"],components:{RenderlessPagination:{emits:["pagination-change-page"],props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0}},computed:{isApiResource(){return!!this.data.meta},currentPage(){return this.isApiResource?this.data.meta.current_page:this.data.current_page},firstPageUrl(){return this.isApiResource?this.data.links.first:null},from(){return this.isApiResource?this.data.meta.from:this.data.from},lastPage(){return this.isApiResource?this.data.meta.last_page:this.data.last_page},lastPageUrl(){return this.isApiResource?this.data.links.last:null},nextPageUrl(){return this.isApiResource?this.data.links.next:this.data.next_page_url},perPage(){return this.isApiResource?this.data.meta.per_page:this.data.per_page},prevPageUrl(){return this.isApiResource?this.data.links.prev:this.data.prev_page_url},to(){return this.isApiResource?this.data.meta.to:this.data.to},total(){return this.isApiResource?this.data.meta.total:this.data.total},pageRange(){if(this.limit===-1)return 0;if(this.limit===0)return this.lastPage;for(var t=this.currentPage,r=this.lastPage,o=this.limit,a=t-o,l=t+o+1,n=[],i=[],s,d=1;d<=r;d++)(d===1||d===r||d>=a&&d<l)&&n.push(d);return n.forEach(function(c){s&&(c-s===2?i.push(s+1):c-s!==1&&i.push("...")),i.push(c),s=c}),i}},methods:{previousPage(){this.selectPage(this.currentPage-1)},nextPage(){this.selectPage(this.currentPage+1)},selectPage(t){t!=="..."&&this.$emit("pagination-change-page",t)}},render(){return this.$slots.default({data:this.data,limit:this.limit,computed:{isApiResource:this.isApiResource,currentPage:this.currentPage,firstPageUrl:this.firstPageUrl,from:this.from,lastPage:this.lastPage,lastPageUrl:this.lastPageUrl,nextPageUrl:this.nextPageUrl,perPage:this.perPage,prevPageUrl:this.prevPageUrl,to:this.to,total:this.total,pageRange:this.pageRange},prevButtonEvents:{click:t=>{t.preventDefault(),this.previousPage()}},nextButtonEvents:{click:t=>{t.preventDefault(),this.nextPage()}},pageButtonEvents:t=>({click:r=>{r.preventDefault(),this.selectPage(t)}})})}}},props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0},showDisabled:{type:Boolean,default:!1},size:{type:String,default:"default",validator:t=>["small","default","large"].indexOf(t)!==-1},align:{type:String,default:"left",validator:t=>["left","center","right"].indexOf(t)!==-1}},methods:{onPaginationChangePage(t){this.$emit("pagination-change-page",t)}},mounted(){}},fa={class:"flex flex-col items-center"},ha={key:0,class:"text-sm text-gray-700 dark:text-gray-400"},ua={class:"font-semibold text-gray-900 dark:text-white"},pa={class:"font-semibold text-gray-900 dark:text-white"},ya={class:"font-semibold text-gray-900 dark:text-white"},_a=["tabindex"],ba=e.createElementVNode("span",{class:"sr-only"},"Previous",-1),ka=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1),xa=["aria-current"],wa=["tabindex"],Ea=e.createElementVNode("span",{class:"sr-only"},"Next",-1),Na=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1);function Va(t,r,o,a,l,n){const i=e.resolveComponent("RenderlessPagination");return e.openBlock(),e.createBlock(i,{data:o.data,limit:o.limit,onPaginationChangePage:n.onPaginationChangePage},{default:e.withCtx(s=>[e.createElementVNode("div",fa,[s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("span",ha,[e.createTextVNode(" Showing "),e.createElementVNode("span",ua,e.toDisplayString(s.computed.from),1),e.createTextVNode(" to "),e.createElementVNode("span",pa,e.toDisplayString(s.computed.to),1),e.createTextVNode(" of "),e.createElementVNode("span",ya,e.toDisplayString(s.computed.total),1),e.createTextVNode(" Entries ")])):e.createCommentVNode("",!0),s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1},t.$attrs,{class:["flex items-center h-8 -space-x-px text-sm",{"pagination-sm":o.size=="small","pagination-lg":o.size=="large","justify-content-center":o.align=="center","justify-content-end":o.align=="right"}]}),[s.computed.prevPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.prevPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"page-link",href:"#","aria-label":"Previous",tabindex:!s.computed.prevPageUrl&&-1},e.toHandlers(s.prevButtonEvents,!0)),[e.renderSlot(t.$slots,"prev-nav",{},()=>[ba,ka])],16,_a)],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.computed.pageRange,(d,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["",{active:d==s.computed.currentPage}]),key:c},[e.createElementVNode("a",e.mergeProps({class:"",href:"#"},e.toHandlers(s.pageButtonEvents(d),!0),{"aria-current":d==s.computed.currentPage?"page":null,class:d==s.computed.currentPage?"z-10 flex items-center justify-center px-3 h-8 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white":"flex items-center justify-center px-3 h-8 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}),e.toDisplayString(d),17,xa)],2))),128)),s.computed.nextPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.nextPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"",href:"#","aria-label":"Next",tabindex:!s.computed.nextPageUrl&&-1},e.toHandlers(s.nextButtonEvents,!0)),[e.renderSlot(t.$slots,"next-nav",{},()=>[Ea,Na])],16,wa)],2)):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)])]),_:3},8,["data","limit","onPaginationChangePage"])}const he=p(ga,[["render",Va]]),Ba={components:{TailwindPagination:he},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,refreshData:Boolean},data(){return{isLoading:!1,isMounted:!1,limit:5,showDisabled:!1,size:"default",align:"left",search:"",isDropdownOpen:!1,itemLists:[],tableData:[],sortField:this.columns[0].field_name,sortOrder:"asc",pageOptions:[5,10,20,50],perPage:5,page:1}},emits:["editAction"],computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a.toString().toLowerCase().includes(t)))}},methods:{editAction(t){this.$emit("editAction",t)},forDynCompIs(t){return typeof t=="object"?t:null},GetItemLists(t=1){this.isLoading=!0,this.page=t;const r={sort:this.sortField,order:this.sortOrder,s:this.search,limit:this.perPage,page:this.page};axios.get(this.xprops.route_get_data,{params:r}).then(o=>{this.itemLists=o.data,this.isLoading=!1}).catch(o=>{console.error(o),this.isLoading=!1})},updateSortColumn(t,r){r&&(t===this.sortField?this.sortOrder=this.sortOrder==="asc"?"desc":"asc":(this.sortField=t,this.sortOrder="asc"),this.GetItemLists(this.page))},handleSearch(){this.sortField=this.columns[0].field_name,this.sortOrder="asc",this.page=1,this.GetItemLists(this.page)}},mounted(){this.GetItemLists(),this.isMounted=!0},watch:{searchFilter(){this.filteredOptions.length===0?this.selected={}:this.selected=this.filteredOptions[0]},perPage(t){this.page=1,this.perPage=t,this.GetItemLists(this.page)},refreshData(t,r){this.isMounted&&t!==r&&this.GetItemLists()}}},Ca={class:"p-2"},$a={class:"flex flex-col flex-wrap pb-4 space-y-4 xl:flex-row xl:items-center xl:justify-between flex-column sm:space-y-0"},Sa={class:"flex items-center gap-2"},Da=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),Oa={style:{"margin-top":"9px"}},Ta=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),Pa=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Ma={class:"relative"},ja=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),Aa={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},La={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},Ia={class:"hidden text-sm font-normal text-center text-gray-500 lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},za=["onClick"],Fa={key:0,class:"ml-2"},Ga={key:0,class:"fa fa-arrow-up"},Ra={key:1,class:"fa fa-arrow-down"},Ua={key:0},qa=["colspan"],Ha=[e.createElementVNode("div",{role:"status",class:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded shadow animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[e.createElementVNode("div",{class:"flex items-center justify-between"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),e.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),e.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),e.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)],Za=["data-label"],Ka={class:"overflow-auto max-h-40"},Wa={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"};function Ya(t,r,o,a,l,n){const i=e.resolveComponent("dropdown"),s=e.resolveComponent("TailwindPagination");return e.openBlock(),e.createElementBlock("div",Ca,[e.createElementVNode("div",$a,[e.createElementVNode("div",Sa,[Da,e.createElementVNode("div",Oa,[e.createVNode(i,{has_cancel:!1,options:l.pageOptions,modelValue:l.perPage,"onUpdate:modelValue":r[0]||(r[0]=d=>l.perPage=d),is_required:!1,field_name:"perPage",label_name:"",default_value:5,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),Ta]),Pa,e.createElementVNode("div",Ma,[ja,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=d=>l.search=d),onInput:r[2]||(r[2]=d=>n.handleSearch()),class:"block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,544),[[e.vModelText,l.search]])])]),e.createElementVNode("div",Aa,[e.createElementVNode("table",La,[e.createElementVNode("thead",Ia,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(d,c)=>(e.openBlock(),e.createElementBlock("th",{key:c,onClick:m=>n.updateSortColumn(d.field_name,d.sortable),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(d.field_label)+" ",1),l.sortField===d.field_name?(e.openBlock(),e.createElementBlock("span",Fa,[l.sortOrder==="asc"?(e.openBlock(),e.createElementBlock("i",Ga)):(e.openBlock(),e.createElementBlock("i",Ra))])):e.createCommentVNode("",!0)],8,za))),128))])]),e.createElementVNode("tbody",null,[l.isLoading?(e.openBlock(),e.createElementBlock("tr",Ua,[e.createElementVNode("td",{colspan:o.columns.length},Ha,8,qa)])):e.createCommentVNode("",!0),l.isLoading?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.itemLists.data,(d,c)=>(e.openBlock(),e.createElementBlock("tr",{key:c,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 hover:dark:text-gray-200 text-gray-500"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(m,h)=>(e.openBlock(),e.createElementBlock("td",{key:h,"data-label":m.field_label,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("div",Ka,[m.tdComp?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.forDynCompIs(m.tdComp)),{key:0,row:d,field:m.field_name,xprops:o.xprops,tdProps:m.tdProps,onDeleteAction:r[3]||(r[3]=u=>n.GetItemLists()),onEditAction:u=>n.editAction(d)},null,40,["row","field","xprops","tdProps","onEditAction"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d[m.field_name]),1)],64))])],8,Za))),128))]))),128))])])]),e.createElementVNode("div",Wa,[e.createVNode(s,{class:"mt-3 mb-0",data:l.itemLists,limit:l.limit,size:l.size,align:l.align,onPaginationChangePage:n.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])}const Xa=p(Ba,[["render",Ya]]),Ja={components:{},props:{data:Array,columns:Array},data(){return{showNoOfEntries:[1,2,3,10,20,30,40],search:"",sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a!=null&&a.toString().toLowerCase().includes(t)))},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const t=(this.currentPage-1)*this.itemsPerPage,r=t+this.itemsPerPage;return this.filteredData.slice(t,r)},displayedPageNumbers(){let t=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),r=t+this.maxDisplayedPages-1;return r>this.totalPages&&(r=this.totalPages,t=Math.max(r-this.maxDisplayedPages+1,1)),Array.from({length:r-t+1},(o,a)=>t+a)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const t=this.itemsPerPage*this.currentPage;return t>this.filteredData.length?this.filteredData.length:t}},methods:{handleItemsPerPageChange(t){this.itemsPerPage=t},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)},sort(t){t===this.sortKey?this.sortOrder*=-1:(this.sortKey=t,this.sortOrder=1)},sortData(t){return this.sortKey?t.slice().sort((r,o)=>(r[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):t},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)}}},Qa={class:"p-2"},va={class:"flex flex-wrap pb-4 space-y-4 md:items-center md:justify-between flex-column sm:flex-row sm:space-y-0"},el={class:"flex items-center gap-2"},tl=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),rl={style:{"margin-top":"9px"}},ol=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),nl=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),al={class:"relative"},ll=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),sl={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},il={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},dl={class:"hidden text-sm font-normal text-center text-gray-700 lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},cl=["onClick"],ml={key:0,class:"ml-2"},gl={key:0,class:"fa fa-arrow-up"},fl={key:1,class:"fa fa-arrow-down"},hl=["data-label"],ul=["innerHTML"],pl={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},yl={class:"flex justify-between flex-1 sm:hidden"},_l=["disabled"],bl=["disabled"],kl={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},xl={class:"text-sm text-gray-700 dark:text-gray-400"},wl={class:"font-medium"},El={class:"font-medium"},Nl={class:"font-medium"},Vl={"aria-label":"Page navigation"},Bl={class:"flex items-center h-8 -space-x-px text-sm"},Cl=["disabled"],$l=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)],Sl=["onClick"],Dl=["onClick"],Ol=["disabled"],Tl=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)];function Pl(t,r,o,a,l,n){const i=e.resolveComponent("dropdown");return e.openBlock(),e.createElementBlock("div",Qa,[e.createElementVNode("div",va,[e.createElementVNode("div",el,[tl,e.createElementVNode("div",rl,[e.createVNode(i,{has_cancel:!1,options:l.showNoOfEntries,modelValue:l.itemsPerPage,"onUpdate:modelValue":r[0]||(r[0]=s=>l.itemsPerPage=s),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:10,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),ol]),nl,e.createElementVNode("div",al,[ll,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=s=>l.search=s),class:"block p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,512),[[e.vModelText,l.search]])])]),e.createElementVNode("div",sl,[e.createElementVNode("table",il,[e.createElementVNode("thead",dl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(s,d)=>(e.openBlock(),e.createElementBlock("th",{key:d,onClick:c=>n.sort(s),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(s)+" ",1),l.sortKey===s?(e.openBlock(),e.createElementBlock("span",ml,[l.sortOrder==="asc"?(e.openBlock(),e.createElementBlock("i",gl)):(e.openBlock(),e.createElementBlock("i",fl))])):e.createCommentVNode("",!0)],8,cl))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.paginatedData,(s,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 hover:dark:text-gray-200 text-gray-500"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(c,m)=>(e.openBlock(),e.createElementBlock("td",{key:m,"data-label":c,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("p",{class:"text-pretty",innerHTML:s[m]},null,8,ul)],8,hl))),128))]))),128))])])]),n.paginatedData.length>0?(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",yl,[e.createElementVNode("a",{href:"#",onClick:r[2]||(r[2]=(...s)=>n.previousPage&&n.previousPage(...s)),disabled:l.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,_l),e.createElementVNode("a",{href:"#",onClick:r[3]||(r[3]=(...s)=>n.nextPage&&n.nextPage(...s)),disabled:l.currentPage===n.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,bl)]),e.createElementVNode("div",kl,[e.createElementVNode("div",null,[e.createElementVNode("p",xl,[e.createTextVNode(" Showing "),e.createElementVNode("span",wl,e.toDisplayString(n.firstItemIndex),1),e.createTextVNode(" to "),e.createElementVNode("span",El,e.toDisplayString(n.lastItemIndex),1),e.createTextVNode(" of "),e.createElementVNode("span",Nl,e.toDisplayString(n.filteredData.length),1),e.createTextVNode(" entries ")])]),e.createElementVNode("div",null,[e.createElementVNode("nav",Vl,[e.createElementVNode("ul",Bl,[e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[4]||(r[4]=(...s)=>n.previousPage&&n.previousPage(...s)),disabled:l.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},$l,8,Cl)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.displayedPageNumbers,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[e.createElementVNode("li",null,[l.currentPage!==s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>n.goToPage(s),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},e.toDisplayString(s),9,Sl)):e.createCommentVNode("",!0)]),e.createElementVNode("li",null,[l.currentPage===s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>n.goToPage(s),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},e.toDisplayString(s),9,Dl)):e.createCommentVNode("",!0)])],64))),128)),e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[5]||(r[5]=(...s)=>n.nextPage&&n.nextPage(...s)),disabled:l.currentPage===n.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},Tl,8,Ol)])])])])])])):e.createCommentVNode("",!0)])}const Ml=p(Ja,[["render",Pl]]),jl={class:"flex items-center p-4 text-gray-500 bg-white rounded-lg shadow dark:bg-gray-800 dark:text-gray-400",role:"alert"},Al={key:0,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},Ll=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Check icon",-1)],Il={key:1,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},zl=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Error icon",-1)],Fl={key:2,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"},Gl=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Warning icon",-1)],Rl={class:"ml-3 text-sm font-normal"},Ul=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)],ql={__name:"ToastListItem",props:{message:String,duration:{type:Number,default:2e3},type:{type:String,default:"success"}},emits:["remove"],setup(t,{emit:r}){const o=t;e.onMounted(()=>{setTimeout(()=>a("remove"),o.duration)});const a=r;return(l,n)=>(e.openBlock(),e.createElementBlock("div",jl,[o.type==="success"?(e.openBlock(),e.createElementBlock("div",Al,Ll)):e.createCommentVNode("",!0),o.type==="error"?(e.openBlock(),e.createElementBlock("div",Il,zl)):e.createCommentVNode("",!0),o.type==="warning"?(e.openBlock(),e.createElementBlock("div",Fl,Gl)):e.createCommentVNode("",!0),e.createElementVNode("div",Rl,e.toDisplayString(o.message),1),e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>a("remove")),type:"button",class:"-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white","data-dismiss-target":"#toast-default","aria-label":"Close"},Ul)]))}},R=e.reactive({items:[]}),U={state:R,methods:{add(t){R.items.unshift({key:Symbol(),message:t.message,type:t.type,duration:t.duration})},remove(t){R.items.splice(t,1)}}},Hl={__name:"GlToastList",setup(t){function r(o){U.methods.remove(o)}return(o,a)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div","enter-from-class":"translate-x-full opacity-0","enter-active-class":"duration-500","leave-active-class":"duration-500","leave-to-class":"translate-x-full opacity-0",class:"fixed z-50 w-full max-w-xs space-y-4 top-4 right-4"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U).state.items,(l,n)=>(e.openBlock(),e.createBlock(ql,{key:l.key,message:l.message,type:l.type,duration:l.duration,onRemove:i=>r(n)},null,8,["message","type","duration","onRemove"]))),128))]),_:1}))}},Zl={key:0,class:"flex justify-center"},Kl=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],Wl={class:"absolute right-0 z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},Yl={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},Xl={key:0},Jl=["href"],Ql=e.createElementVNode("i",{class:"mr-2 fa-solid fa-list-ul opacity-80"},null,-1),vl={key:1},es=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),ts={__name:"DatatableAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=Y(),a=t,l=e.ref(!1),n=e.ref(!1),i=()=>{l.value=!1},s=()=>{l.value=!0},d=()=>{n.value=!1},c=()=>{n.value=!0},m=r,h=()=>{axios.delete(`${a.xprops.route}/${a.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(u=>{console.log(u)})};return(u,y)=>{const $=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,{isOpen:n.value,onConfirmDelete:h,onCancelDelete:d},null,8,["isOpen"]),t.row&&u.can(`edit_${t.xprops.permission} || delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",Zl,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},Kl),e.withDirectives(e.createElementVNode("div",Wl,[e.createElementVNode("ul",Yl,[u.can(`edit_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",Xl,[e.createElementVNode("a",{href:t.xprops.route+"/"+t.row.id+"/edit",class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Ql,e.createTextVNode(" Edit")],8,Jl)])):e.createCommentVNode("",!0),u.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",vl,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[es,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,l.value]])])),[[$,i]]):e.createCommentVNode("",!0)],64)}}},rs={key:0,class:"flex justify-center"},os=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],ns={class:"absolute right-0 z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},as={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},ls={key:0},ss=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),is={__name:"DatatableDeleteAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=Y(),a=t,l=e.ref(!1),n=e.ref(!1),i=()=>{l.value=!1},s=()=>{l.value=!0},d=()=>{n.value=!1},c=()=>{n.value=!0},m=r,h=()=>{axios.delete(`${a.xprops.route}/${a.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(u=>{console.log(u)})};return(u,y)=>{const $=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,{isOpen:n.value,onConfirmDelete:h,onCancelDelete:d},null,8,["isOpen"]),t.row&&u.can(`delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",rs,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},os),e.withDirectives(e.createElementVNode("div",ns,[e.createElementVNode("ul",as,[u.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",ls,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[ss,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,l.value]])])),[[$,i]]):e.createCommentVNode("",!0)],64)}}},ds={props:["field","row"],computed:{isArray(){return Array.isArray(this.row)},isObject(){return typeof this.row=="object"},isString(){return typeof this.row=="string"}},mounted(){}},cs=["href","title"],ms=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),gs={key:1,class:"m-1 d-inline-block"},fs=["href","title"],hs=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function us(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",null,[n.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i,title:i,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ms,e.createTextVNode(" Download ")],8,cs)]))),128)):n.isString?(e.openBlock(),e.createElementBlock("div",gs,[e.createElementVNode("a",{href:o.row,title:o.row,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[hs,e.createTextVNode(" Download ")],8,fs)])):e.createCommentVNode("",!0)])}const ps=p(ds,[["render",us]]),ys={props:["field","row"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},_s=["href","title"],bs=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),ks={key:1,class:"m-1 d-inline-block"},xs=["href","title"],ws=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function Es(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",null,[n.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[o.field],i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i.url,title:i.name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[bs,e.createTextVNode(" Download ")],8,_s)]))),128)):n.isObject?(e.openBlock(),e.createElementBlock("div",ks,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ws,e.createTextVNode(" Download ")],8,xs)])):e.createCommentVNode("",!0)])}const Ns=p(ys,[["render",Es]]),Vs={props:["field","row","tdProps"]},Bs={key:0},Cs=["innerHTML"];function $s(t,r,o,a,l,n){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",Bs,[e.createElementVNode("div",{class:"w-full",innerHTML:o.row[o.field]},null,8,Cs)])):e.createCommentVNode("",!0)}const Ss=p(Vs,[["render",$s]]),Ds={props:["field","row","tdProps"],computed:{entry(){const[t,r]=this.field.split(".");return e.markRaw({key:t,field:r})},isArray(){return Array.isArray(this.row[this.entry.key])},isObject(){return typeof this.row[this.entry.key]=="object"}}},Os={class:"flex flex-wrap gap-2"},Ts={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"};function Ps(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",Os,[n.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[n.entry.key],(i,s)=>(e.openBlock(),e.createElementBlock("span",{key:s,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"},e.toDisplayString(i[n.entry.field]),1))),128)):n.isObject?(e.openBlock(),e.createElementBlock("span",Ts,e.toDisplayString(o.row[n.entry.key][n.entry.field]),1)):e.createCommentVNode("",!0)])}const Ms=p(Ds,[["render",Ps]]),js={props:["field","row","tdProps"]},As={key:0},Ls={class:"m-1 d-inline-block"},Is=["href","title"],zs=["src","alt","title"];function Fs(t,r,o,a,l,n){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",As,[e.createElementVNode("div",Ls,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank"},[e.createElementVNode("img",{src:o.row[o.field].thumbnail,alt:o.row[o.field].name,title:o.row[o.field].name},null,8,zs)],8,Is)])])):e.createCommentVNode("",!0)}const Gs=p(js,[["render",Fs],["__scopeId","data-v-3a28c02c"]]),Rs={props:["field","row","tdProps"],computed:{isActive(){return this.row[this.field]===1}}},Us={class:"flex flex-wrap gap-2 text-nowrap"},qs={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},Hs=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),Zs={key:1,class:"inline-flex items-center bg-red-100 text-red-800 text-xs font-medium px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300"},Ks=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1);function Ws(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",Us,[n.isActive?(e.openBlock(),e.createElementBlock("span",qs,[Hs,e.createTextVNode(" Active ")])):n.isActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Zs,[Ks,e.createTextVNode(" Inactive ")]))])}const Ys=p(Rs,[["render",Ws]]),Xs={props:["field","row","tdProps"],computed:{hasLabelColor(t){const r=this.tdProps.status_general_labels_color.find(o=>o.label===this.row[this.field]);return r?r.class:""}}},Js={class:"flex flex-wrap gap-2 text-nowrap"},Qs={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},vs=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),ei={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},ti=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),ri={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},oi=e.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),ni={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},ai=e.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1),li={key:4,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},si=e.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[e.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),e.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1);function ii(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",Js,[n.hasLabelColor=="green"?(e.openBlock(),e.createElementBlock("span",Qs,[vs,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="red"?(e.openBlock(),e.createElementBlock("span",ei,[ti,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="yellow"?(e.openBlock(),e.createElementBlock("span",ri,[oi,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="default"?(e.openBlock(),e.createElementBlock("span",ni,[ai,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),n.hasLabelColor=="animate"?(e.openBlock(),e.createElementBlock("span",li,[si,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0)])}const di=p(Xs,[["render",ii]]),ci={props:["field","row","tdProps"],computed:{hasLabelColor(){return this.tdProps.specfic_color??""},badgeType(){switch(this.tdProps.badge_type){case"Default":return"rounded text-xs";case"Large":return"rounded text-sm ";case"Bordered":return"rounded text-xs border";case"Pills":return"rounded-full text-xs";default:return""}}}},mi={class:"flex flex-wrap gap-2 text-nowrap"};function gi(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",mi,[n.hasLabelColor=="Default"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["bg-blue-100 text-blue-800 font-medium me-2 px-2.5 py-0.5 dark:bg-blue-900 dark:text-blue-300 border-blue-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Dark"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["bg-gray-100 text-gray-800 font-medium me-2 px-2.5 py-0.5 dark:bg-gray-700 dark:text-gray-300 border-gray-500",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Red"?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(["bg-red-100 text-red-800 font-medium me-2 px-2.5 py-0.5 dark:bg-red-900 dark:text-red-300 border-red-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Green"?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(["bg-green-100 text-green-800 font-medium me-2 px-2.5 py-0.5 dark:bg-green-900 dark:text-green-300 border-green-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Yellow"?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass(["bg-yellow-100 text-yellow-800 font-medium me-2 px-2.5 py-0.5 dark:bg-yellow-900 dark:text-yellow-300 border-yellow-300",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Indigo"?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(["bg-indigo-100 text-indigo-800 font-medium me-2 px-2.5 py-0.5 dark:bg-indigo-900 dark:text-indigo-300 border-indigo-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Purple"?(e.openBlock(),e.createElementBlock("span",{key:6,class:e.normalizeClass(["bg-purple-100 text-purple-800 font-medium me-2 px-2.5 py-0.5 dark:bg-purple-900 dark:text-purple-300 border-purple-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0),n.hasLabelColor=="Pink"?(e.openBlock(),e.createElementBlock("span",{key:7,class:e.normalizeClass(["bg-pink-100 text-pink-800 font-medium me-2 px-2.5 py-0.5 dark:bg-pink-900 dark:text-pink-300 border-pink-400",n.badgeType])},e.toDisplayString(this.row[this.field]),3)):e.createCommentVNode("",!0)])}const fi=p(ci,[["render",gi]]),hi={props:["field","row","tdProps"],computed:{formattedDate(){if(!this.row[this.field])return"";const t=new Date(this.row[this.field]),r=t.getFullYear(),o=t.toLocaleString("default",{month:"long"}),a=t.getDate();let l=t.getHours();const n=t.getMinutes(),i=t.getSeconds(),s=l>=12?"pm":"am";return l=l%12,l=l||12,`${o} ${a}, ${r}, ${l}:${n}:${i} ${s}`},isActive(){return this.row[this.field]===1}}},ui={class:"w-full"};function pi(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",ui,e.toDisplayString(n.formattedDate),1)}const yi=p(hi,[["render",pi]]),_i={props:["field","row","tdProps"]},bi={class:"flex flex-wrap gap-2 text-nowrap"},ki={key:0,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},xi=e.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[e.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),e.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1),wi={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},Ei=e.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),Ni={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},Vi=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1);function Bi(t,r,o,a,l,n){return e.openBlock(),e.createElementBlock("div",bi,[o.row[o.field]===0?(e.openBlock(),e.createElementBlock("span",ki,[xi,e.createTextVNode(" Provisioning")])):e.createCommentVNode("",!0),o.row[o.field]===2?(e.openBlock(),e.createElementBlock("span",wi,[Ei,e.createTextVNode(" Paused ")])):e.createCommentVNode("",!0),o.row[o.field]===1?(e.openBlock(),e.createElementBlock("span",Ni,[Vi,e.createTextVNode(" Active ")])):e.createCommentVNode("",!0)])}const Ci=p(_i,[["render",Bi]]),$i={props:["field","row","tdProps"]},Si={key:0,class:"text-nowrap"},Di={class:"w-full h-full p-3 mx-0 mt-0 overflow-auto font-mono text-left text-white break-words rounded cursor-default whitespace-nowrap bg-zinc-700"};function Oi(t,r,o,a,l,n){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",Si,[e.createElementVNode("pre",Di," "+e.toDisplayString(o.row[o.field])+`
|
|
8
8
|
`,1)])):e.createCommentVNode("",!0)}const Ti=p($i,[["render",Oi]]),Pi={props:["isOpen","title","button_text"],methods:{confirmAction(){this.$emit("confirm-action")},cancelAction(){this.$emit("cancel-action")}}},Mi={key:0,class:"fixed inset-0 z-50 overflow-y-auto",role:"dialog","aria-modal":"true"},ji={class:"flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0"},Ai=e.createElementVNode("div",{class:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75","aria-hidden":"true"},null,-1),Li=e.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"",-1),Ii={class:"inline-block overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},zi={class:"px-4 pt-5 pb-4 bg-white sm:p-6 sm:pb-4"},Fi={class:"sm:flex sm:items-start"},Gi={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},Ri={class:"text-lg font-medium leading-6 text-gray-900"},Ui={class:"mt-2"},qi={class:"px-4 py-3 bg-gray-50 sm:px-6 sm:flex sm:flex-row-reverse"};function Hi(t,r,o,a,l,n){return o.isOpen?(e.openBlock(),e.createElementBlock("div",Mi,[e.createElementVNode("div",ji,[Ai,Li,e.createElementVNode("div",Ii,[e.createElementVNode("div",zi,[e.createElementVNode("div",Fi,[e.createElementVNode("div",Gi,[e.createElementVNode("h3",Ri,e.toDisplayString(o.title),1),e.createElementVNode("div",Ui,[e.renderSlot(t.$slots,"default")])])])]),e.createElementVNode("div",qi,[e.createElementVNode("button",{onClick:r[0]||(r[0]=(...i)=>n.confirmAction&&n.confirmAction(...i)),type:"button",class:"inline-flex justify-center w-full px-4 py-2 text-base font-medium text-white bg-red-600 border border-transparent rounded-md shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(o.button_text),1),e.createElementVNode("button",{onClick:r[1]||(r[1]=(...i)=>n.cancelAction&&n.cancelAction(...i)),type:"button",class:"inline-flex justify-center w-full px-4 py-2 mt-3 text-base font-medium text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"}," Cancel ")])])])])):e.createCommentVNode("",!0)}const Zi=p(Pi,[["render",Hi]]),Ki={class:"w-full"},Wi={class:"mb-2 flex justify-between items-center"},Yi={class:"text-sm font-medium text-gray-900 dark:text-white"},Xi={class:"relative bg-gray-50 rounded-lg dark:bg-gray-700 p-4 h-auto"},Ji={class:"overflow-auto max-h-32"},Qi={class:"text-sm text-gray-500 dark:text-gray-400"},vi={class:"absolute top-2 end-2 bg-gray-50 dark:bg-gray-700"},ed={key:0,class:"inline-flex items-center"},td=[e.createElementVNode("svg",{class:"w-3 h-3 me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 20"},[e.createElementVNode("path",{d:"M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z"})],-1),e.createElementVNode("span",{class:"text-xs font-semibold"},"Copy",-1)],rd={key:1,class:"inline-flex items-center"},od=[e.createElementVNode("svg",{class:"w-3 h-3 text-blue-700 dark:text-blue-500 me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"})],-1),e.createElementVNode("span",{class:"text-xs font-semibold text-blue-700 dark:text-blue-500"},"Copied",-1)],nd={class:"mt-2 text-sm text-gray-500 dark:text-gray-400"},ad={__name:"GlCodeCopy",props:{label_name:{type:String,default:""},code:{type:String,default:""},description:{type:String,default:""}},setup(t){const r=t,o=e.ref(!1),a=n=>{navigator.clipboard.writeText(n).then(function(){o.value=!0,setTimeout(()=>{o.value=!1},2e3)}).catch(function(i){console.error("Error copying to clipboard: ",i)})},l=e.computed(()=>r.code);return(n,i)=>(e.openBlock(),e.createElementBlock("div",Ki,[e.createElementVNode("div",Wi,[e.createElementVNode("p",Yi,e.toDisplayString(t.label_name),1)]),e.createElementVNode("div",Xi,[e.createElementVNode("div",Ji,[e.createElementVNode("code",Qi,e.toDisplayString(l.value),1)]),e.createElementVNode("div",vi,[e.createElementVNode("button",{onClick:i[0]||(i[0]=s=>a(l.value)),class:"text-gray-900 dark:text-gray-400 m-1 hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded-lg py-2 px-3 inline-flex items-center justify-center bg-white border-gray-200 border"},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ed,td)),o.value?(e.openBlock(),e.createElementBlock("span",rd,od)):e.createCommentVNode("",!0)])])]),e.createElementVNode("p",nd,e.toDisplayString(t.description),1)]))}};f.GLDatatableCommand=Ti,f.GLDatatableDateTime=yi,f.GLDatatableStatusServer=Ci,f.GlButton=br,f.GlCard=Wt,f.GlCodeCopy=ad,f.GlConfirmationModal=Zi,f.GlDataTable=Ml,f.GlDataTableServerSide=Xa,f.GlDatatableAction=ts,f.GlDatatableDeleteAction=is,f.GlDatatableFileDownload=ps,f.GlDatatableFiles=Ns,f.GlDatatableHtml=Ss,f.GlDatatableList=Ms,f.GlDatatablePicture=Gs,f.GlDatatableStatus=Ys,f.GlDatatableStatusGeneral=di,f.GlDatatableStatusSpecficColor=fi,f.GlDeleteConfirmationModal=T,f.GlDropdown=oa,f.GlFilesUpload=Dt,f.GlLanguageSelector=Ut,f.GlModal=xn,f.GlMultiItemSlide=hn,f.GlMultiSelectDropdown=ur,f.GlNotify=Lt,f.GlTab=xo,f.GlTabsWrapper=yo,f.GlTailwindPagination=he,f.GlTextInput=lo,f.GlTextTranslate=Qr,f.GlTextarea=ma,f.GlTextareaTranslate=Dr,f.GlTinymceTranslate=Gr,f.GlToast=U,f.GlToastList=Hl,f.GlToggleBox=Mn,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|