@fewangsit/wangsvue-fats 1.0.0-alpha.13 → 1.0.0-alpha.14

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.
@@ -130787,86 +130787,18 @@ const H9e = { key: 0 }, W9e = { key: 0 }, Y9e = {
130787
130787
  }, 16, ["visible"])
130788
130788
  ], 64));
130789
130789
  }
130790
- }), uP = (t) => {
130791
- if (t instanceof J$)
130792
- return t.response ? "DEVICE_NOT_CONNECTED" : "DRIVER_NOT_FOUND";
130793
- if (t instanceof Error && ["NOT_SUPPORTED_SYSTEM", "HARDWARE_NOT_SYNCHRONIZED"].includes(
130794
- t.message
130795
- ))
130796
- return t.message;
130797
- };
130798
- let Uf;
130799
- const Z9e = new Uint8Array(16);
130800
- function J9e() {
130801
- if (!Uf && (Uf = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Uf))
130802
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
130803
- return Uf(Z9e);
130804
- }
130805
- const za = [];
130806
- for (let t = 0; t < 256; ++t)
130807
- za.push((t + 256).toString(16).slice(1));
130808
- function e6e(t, e = 0) {
130809
- return za[t[e + 0]] + za[t[e + 1]] + za[t[e + 2]] + za[t[e + 3]] + "-" + za[t[e + 4]] + za[t[e + 5]] + "-" + za[t[e + 6]] + za[t[e + 7]] + "-" + za[t[e + 8]] + za[t[e + 9]] + "-" + za[t[e + 10]] + za[t[e + 11]] + za[t[e + 12]] + za[t[e + 13]] + za[t[e + 14]] + za[t[e + 15]];
130810
- }
130811
- const t6e = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), PR = {
130812
- randomUUID: t6e
130813
- };
130814
- function qb(t, e, n) {
130815
- if (PR.randomUUID && !t)
130816
- return PR.randomUUID();
130817
- t = t || {};
130818
- const r = t.random || (t.rng || J9e)();
130819
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, e6e(r);
130820
- }
130821
- const dP = () => window.devices ?? [], n6e = () => window.device ?? { RFID: null, QR: null }, FR = rt(dP()), BR = rt(n6e()), fP = () => {
130822
- const t = (r) => {
130823
- window.devices = r, n();
130824
- }, e = (r) => {
130825
- window.device = r, BR.value = r;
130826
- }, n = () => {
130827
- FR.value = dP();
130828
- };
130829
- return {
130830
- devices: FR,
130831
- device: BR,
130832
- saveDevices: t,
130833
- setDevice: e,
130834
- loadDevices: n
130835
- };
130836
- }, pP = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBuPW51bGwsdD1udWxsLGE7c2VsZi5vbm1lc3NhZ2U9cz0+e2NvbnN0IGU9cy5kYXRhO3N3aXRjaChlLmNvbW1hbmQpe2Nhc2Uic3luYyI6dShlKTticmVhaztjYXNlImNvbm5lY3QiOmwoZSk7YnJlYWs7Y2FzZSJzY2FuIjptKGUpO2JyZWFrO2Nhc2Uic3RvcHNjYW4iOmQoZSk7YnJlYWt9fTtjb25zdCByPXM9PntsZXQgZT0iZXN0YWJsaXNoZWQiO24mJm4ucmVhZHlTdGF0ZT09PVdlYlNvY2tldC5PUEVOPyhlPSJyZXVzZWQiLHMub25vcGVuKG4sZSksaShzLnRpbWVvdXQpKTpuPW5ldyBXZWJTb2NrZXQoIndzczovL2Rldi1hcGkudGFnc2FtdXJhaS5jb20vcmZpZC1yZWFkZXItZ28vIiksbi5vbm9wZW49KCk9PntlPSJlc3RhYmxpc2hlZCIsbiYmcy5vbm9wZW4obixlKSxpKHMudGltZW91dCl9LG4ub25tZXNzYWdlPW89PntzLm9ubWVzc2FnZShvKSxpKHMudGltZW91dCl9LG4ub25lcnJvcj1vPT57Y29uc29sZS5lcnJvcigi8J+agCB+IFNjYW5uZXIgV29ya2VyOiBvcGVuQ29ubmVjdGlvbiB+IGVycm9yOiIsbykscy5vbmVycm9yKG8pLG49PW51bGx8fG4uY2xvc2UoKSxuPW51bGwsdCYmY2xlYXJUaW1lb3V0KHQpfX0scD0oKT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8samVuaXNEZXZpY2U6Z30pPT57YT1lLHIoe29ub3BlbjpjPT57Yy5zZW5kKEpTT04uc3RyaW5naWZ5KHtkYXRhOntjb21tYW5kOnMsdXNlcklkOmUsc291cmNlOiJhcHAiLHNlcmlhbE51bWJlcjpvLGplbmlzRGV2aWNlOmd9LGV2ZW50OiJyZWFkZXIifSkpLHBvc3RNZXNzYWdlKHtzdGF0dXM6InNjYW5fc3RhcnRlZCJ9KX0sb25tZXNzYWdlOmM9Pntwb3N0TWVzc2FnZSh7c3RhdHVzOiJzY2FubmVkIiwuLi5KU09OLnBhcnNlKGMuZGF0YSl9KX0sb25lcnJvcjpjPT57cG9zdE1lc3NhZ2Uoe3N0YXR1czoic2Nhbl9lcnJvciIsZXJyb3I6Y30pfX0pfSxkPSh7dXNlcklkOnN9KT0+e24mJm4ucmVhZHlTdGF0ZT09PVdlYlNvY2tldC5PUEVOJiYobi5zZW5kKEpTT04uc3RyaW5naWZ5KHtkYXRhOntjb21tYW5kOiJzdG9wc2NhbiIsdXNlcklkOnMsc291cmNlOiJhcHAifSxldmVudDoicmVhZGVyIn0pKSxwb3N0TWVzc2FnZSh7c3RhdHVzOiJzY2FuX3N0b3BwZWQifSksY29uc29sZS5pbmZvKCJTY2FuIFByb2Nlc3MgU3RvcHBlZCEiKSl9fSkoKTsK", r6e = (t) => Uint8Array.from(atob(t), (e) => e.charCodeAt(0)), UR = typeof self < "u" && self.Blob && new Blob([r6e(pP)], { type: "text/javascript;charset=utf-8" });
130837
- function mP(t) {
130838
- let e;
130839
- try {
130840
- if (e = UR && (self.URL || self.webkitURL).createObjectURL(UR), !e) throw "";
130841
- const n = new Worker(e, {
130842
- name: t == null ? void 0 : t.name
130843
- });
130844
- return n.addEventListener("error", () => {
130845
- (self.URL || self.webkitURL).revokeObjectURL(e);
130846
- }), n;
130847
- } catch {
130848
- return new Worker(
130849
- "data:text/javascript;base64," + pP,
130850
- {
130851
- name: t == null ? void 0 : t.name
130852
- }
130853
- );
130854
- } finally {
130855
- e && (self.URL || self.webkitURL).revokeObjectURL(e);
130856
- }
130857
- }
130858
- const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
130790
+ }), Z9e = { class: "flex items-center gap-3 w-full" }, J9e = {
130859
130791
  class: "flex items-center w-full justify-between",
130860
130792
  "data-wv-section": "content"
130861
- }, s6e = {
130793
+ }, e6e = {
130862
130794
  key: 0,
130863
130795
  class: "font-bold",
130864
130796
  "data-wv-section": "title"
130865
- }, o6e = { "data-wv-section": "message" }, l6e = {
130797
+ }, t6e = { "data-wv-section": "message" }, n6e = {
130866
130798
  key: 0,
130867
130799
  class: "flex flex-col gap-3 overflow-auto max-h-[71px]",
130868
130800
  "data-wv-section": "list"
130869
- }, c6e = /* @__PURE__ */ wt({
130801
+ }, r6e = /* @__PURE__ */ wt({
130870
130802
  __name: "InlineMessage",
130871
130803
  props: {
130872
130804
  severity: { default: "secondary" },
@@ -130896,12 +130828,12 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
130896
130828
  "aria-live": "assertive",
130897
130829
  role: "alert"
130898
130830
  }), [
130899
- re("div", a6e, [
130831
+ re("div", Z9e, [
130900
130832
  a.showIcon ? (O(), ne(Lt, N({ key: 0 }, a.$preset.inlinemessage.icon({ props: e }), {
130901
130833
  icon: r.value,
130902
130834
  severity: e.severity
130903
130835
  }), null, 16, ["icon", "severity"])) : fe("", !0),
130904
- re("div", i6e, [
130836
+ re("div", J9e, [
130905
130837
  re("section", {
130906
130838
  class: ht([
130907
130839
  "flex flex-col font-medium",
@@ -130909,8 +130841,8 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
130909
130841
  ]),
130910
130842
  "data-wv-section": "messagewrapper"
130911
130843
  }, [
130912
- a.title ? (O(), K("span", s6e, We(e.title), 1)) : fe("", !0),
130913
- re("span", o6e, We(e.loading ? `${e.message}...` : e.message), 1)
130844
+ a.title ? (O(), K("span", e6e, We(e.title), 1)) : fe("", !0),
130845
+ re("span", t6e, We(e.loading ? `${e.message}...` : e.message), 1)
130914
130846
  ], 2),
130915
130847
  a.removable ? (O(), ne(Qt, {
130916
130848
  key: 0,
@@ -130926,7 +130858,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
130926
130858
  }, null, 8, ["severity"])) : fe("", !0)
130927
130859
  ])
130928
130860
  ]),
130929
- e.lists ? (O(), K("div", l6e, [
130861
+ e.lists ? (O(), K("div", n6e, [
130930
130862
  (O(!0), K(lt, null, en(e.lists, (s, o) => (O(), K("div", {
130931
130863
  key: o,
130932
130864
  class: "flex items-center gap-2",
@@ -130942,669 +130874,79 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
130942
130874
  ])) : fe("", !0)
130943
130875
  ], 16));
130944
130876
  }
130945
- }), hP = /* @__PURE__ */ wt({
130946
- __name: "HardwareSync",
130877
+ }), a6e = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-posinset", "aria-selected", "aria-setsize", "tabindex"], i6e = ["data-p-highlight", "data-p-selectable"], s6e = ["data-node-has-children", "data-node-key", "data-node-selected"], o6e = {
130878
+ "aria-hidden": "true",
130879
+ class: "flex items-center justify-start gap-2 px-4 py-1.5 hover:bg-surface-50 text-xs no-underline overflow-hidden cursor-pointer select-none",
130880
+ "data-pc-section": "action",
130881
+ tabindex: "-1"
130882
+ }, l6e = /* @__PURE__ */ wt({
130883
+ __name: "TreeNode",
130947
130884
  props: {
130948
- visible: { type: Boolean },
130949
- errorCode: {},
130950
- searchBy: {},
130951
- bulk: { type: Boolean },
130952
- withoutScanBtn: { type: Boolean }
130885
+ node: {},
130886
+ index: {},
130887
+ disabled: { type: Boolean },
130888
+ listLabelsNoOption: {},
130889
+ pt: {},
130890
+ templates: {},
130891
+ disableKeys: {},
130892
+ disableNodeAll: { type: Boolean },
130893
+ exactDisableKeys: {},
130894
+ level: {},
130895
+ value: {},
130896
+ propagateSelection: { type: Boolean },
130897
+ expandedKeys: {},
130898
+ selectionKeys: {},
130899
+ treeNodeMenus: {},
130900
+ selectionMode: {},
130901
+ metaKeySelection: { type: Boolean },
130902
+ loading: { type: Boolean },
130903
+ loadingIcon: {},
130904
+ loadingMode: {},
130905
+ filterText: {},
130906
+ filterBy: {},
130907
+ filterMode: {},
130908
+ filterPlaceholder: {},
130909
+ filterLocale: {},
130910
+ highlightOnSelect: { type: Boolean },
130911
+ scrollHeight: {},
130912
+ ariaLabel: {},
130913
+ ariaLabelledby: {},
130914
+ ptOptions: {},
130915
+ unstyled: { type: Boolean },
130916
+ useOption: { type: Boolean },
130917
+ disableNodeWhen: { type: Function },
130918
+ exactDisableNodeWhen: { type: Function },
130919
+ nodeSelectedWhen: { type: Function }
130953
130920
  },
130954
- emits: ["update:visible", "scan"],
130921
+ emits: ["nodeToggle", "nodeClick", "checkboxChange", "toggleMenu"],
130955
130922
  setup(t, { emit: e }) {
130956
- const n = t, r = e, a = a3();
130957
- Pn(() => {
130958
- de();
130959
- });
130960
- const {
130961
- device: i,
130962
- devices: s,
130963
- saveDevices: o,
130964
- setDevice: l,
130965
- loadDevices: c
130966
- } = fP(), u = {
130967
- label: "None",
130968
- device: void 0
130969
- }, d = nt(!1), p = nt(u), m = nt(u), g = (te) => {
130970
- var ie, Ue;
130971
- if ((ie = s.value) != null && ie.length) {
130972
- const ue = (Ue = s.value) == null ? void 0 : Ue.filter((ze) => ze[te]).map((ze) => ({
130973
- label: `${ze.name ?? ze.jenisDevice + " - " + ze.serialNumber}`,
130974
- device: ze
130975
- }));
130976
- return ue.length ? ue : [];
130923
+ const n = e, r = t, a = mn("preset", {}).tree, i = rt(), s = rt(null);
130924
+ let o = !1, l = !1;
130925
+ const c = Ye(
130926
+ () => {
130927
+ var Z;
130928
+ return ((Z = r.node) == null ? void 0 : Z.children) && r.node.children.length > 0;
130977
130929
  }
130978
- return p.value = u, m.value = u, [];
130979
- }, _ = Ye(() => g("rfidScan")), v = Ye(() => g("qrScan")), b = Ye(
130980
- () => n.errorCode === "NOT_SUPPORTED_SYSTEM"
130981
- ), E = Ye(() => n.searchBy === "RFID" && p.value.device), T = Ye(() => n.searchBy === "QR" && m.value.device), y = Ye(() => !!n.searchBy && n.errorCode !== "HARDWARE_NOT_SYNCHRONIZED"), C = async (te) => {
130982
- try {
130983
- o(te);
130984
- const ie = _.value.some(
130985
- (ue) => {
130986
- var ze, ve, Ee;
130987
- return ((ze = ue == null ? void 0 : ue.device) == null ? void 0 : ze.serialNumber) === ((Ee = (ve = p.value) == null ? void 0 : ve.device) == null ? void 0 : Ee.serialNumber);
130988
- }
130989
- ), Ue = v.value.some(
130990
- (ue) => {
130991
- var ze, ve, Ee;
130992
- return ((ze = ue == null ? void 0 : ue.device) == null ? void 0 : ze.serialNumber) === ((Ee = (ve = m.value) == null ? void 0 : ve.device) == null ? void 0 : Ee.serialNumber);
130993
- }
130994
- );
130995
- p.value = ie ? p.value : _.value[0] ?? u, m.value = Ue ? m.value : v.value[0] ?? u, J();
130996
- } catch (ie) {
130997
- A.value = P(uP(ie));
130998
- } finally {
130999
- d.value = !1;
130930
+ ), u = Ye(
130931
+ () => {
130932
+ var Z;
130933
+ return +r.node.key != -1 && r.useOption && !((Z = r.listLabelsNoOption) != null && Z.includes(r.node.name));
131000
130934
  }
131001
- }, A = rt(), x = nt({
131002
- title: "The detected OS is not compatible",
131003
- detail: "Please check the OS compatibility list on our product information page."
131004
- }), k = nt({
131005
- title: "Scanner Disconnected",
131006
- detail: "Your scanner has been disconnected. Please reconnect it or select another device from the list."
131007
- }), M = nt({
131008
- title: "Scanner driver not found",
131009
- detail: "The scanner driver may not be running or installed correctly on your device. Please contact your administrator."
131010
- }), I = nt({
131011
- title: "Scanner not detected",
131012
- detail: "The scanner is either not detected or not identified by our system."
131013
- });
131014
- nt({
131015
- title: "Scanner is not registered",
131016
- detail: "The scanner is not registered in your company."
131017
- });
131018
- const P = (te) => {
131019
- switch (te ?? n.errorCode) {
131020
- case "DEVICE_NOT_CONNECTED":
131021
- return I.value;
131022
- case "DRIVER_NOT_FOUND":
131023
- return M.value;
131024
- case "NOT_SUPPORTED_SYSTEM":
131025
- return x.value;
131026
- case "DEVICE_DISCONNECTED":
131027
- return k.value;
131028
- default:
131029
- return;
130935
+ ), d = Ye(
130936
+ () => r.expandedKeys && r.expandedKeys[r.node.key] === !0
130937
+ ), p = Ye(
130938
+ () => r.node.leaf === !1 ? !1 : !(r.node.children && r.node.children.length)
130939
+ ), m = Ye(() => le(r.node) || Q(r.node) || r.node.selectable === !1 ? !1 : r.selectionMode != null), g = Ye(
130940
+ () => {
130941
+ var Z;
130942
+ return ((Z = r.nodeSelectedWhen) == null ? void 0 : Z.call(r, r.node)) || (r.selectionMode && r.selectionKeys ? r.selectionKeys[r.node.key] === !0 : !1);
131030
130943
  }
131031
- }, J = () => {
131032
- l({
131033
- RFID: p.value.device,
131034
- QR: m.value.device
131035
- });
131036
- }, de = () => {
131037
- c(), i.value.RFID ? p.value = {
131038
- label: i.value.RFID.name,
131039
- device: i.value.RFID
131040
- } : _.value.length && (p.value = _.value[0] ?? u), v.value.length && (m.value = v.value[0] ?? u), J();
131041
- }, Le = () => {
131042
- r("update:visible", !1), r("scan");
131043
- }, oe = () => {
131044
- var te;
131045
- d.value = !0, A.value = void 0, window.scannerWorker.onmessage = ({ data: ie }) => {
131046
- var Ue;
131047
- if (ie.status === "synced") {
131048
- const ue = ((Ue = ie == null ? void 0 : ie.data) == null ? void 0 : Ue.deviceList) ?? [];
131049
- C(ue);
131050
- const { error: ze } = (ie == null ? void 0 : ie.data) ?? {};
131051
- ze === "Driver not connected to server" ? (d.value = !1, A.value = P("DRIVER_NOT_FOUND")) : ue.length || (d.value = !1, A.value = P("DEVICE_NOT_CONNECTED"));
131052
- } else ie.status === "error_sync" && (d.value = !1, C([]), a.add({ message: "Failed to connecting scanner", severity: "error" }));
131053
- }, window.scannerWorker.postMessage({
131054
- command: "sync",
131055
- userId: (te = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : te._id
131056
- });
131057
- }, Te = () => {
131058
- window.scannerWorker ?? (window.scannerWorker = new mP());
131059
- };
131060
- return Mt(
131061
- () => n.visible,
131062
- (te) => {
131063
- te && (Te(), A.value = P(), de(), d.value = !1);
131064
- }
131065
- ), (te, ie) => (O(), ne(A0, {
131066
- closable: !y.value,
131067
- "header-class": [
131068
- {
131069
- "flex !gap-1 !items-center !justify-center !text-sm !font-bold !leading-[18px] tracking-[0.02em] [&>div]:hidden": y.value
131070
- }
131071
- ],
131072
- visible: te.visible,
131073
- "onUpdate:visible": ie[3] || (ie[3] = (Ue) => te.$emit("update:visible", Ue)),
131074
- class: "w-[400px]",
131075
- "content-class": "!overflow-y-visible",
131076
- "footer-class": "!gap-1",
131077
- header: "Hardware Synchronize",
131078
- modal: ""
131079
- }, Ma({
131080
- footer: Me(() => [
131081
- y.value ? (O(), ne(Qt, {
131082
- key: 0,
131083
- onClick: ie[2] || (ie[2] = (Ue) => te.$emit("update:visible", !1)),
131084
- label: "Close",
131085
- severity: "secondary",
131086
- text: ""
131087
- })) : fe("", !0),
131088
- b.value ? fe("", !0) : (O(), K(lt, { key: 1 }, [
131089
- E.value && !n.withoutScanBtn ? (O(), ne(Qt, {
131090
- key: 0,
131091
- onClick: Le,
131092
- icon: "rfid",
131093
- label: "Scan RFID"
131094
- })) : fe("", !0),
131095
- T.value && !n.withoutScanBtn ? (O(), ne(Qt, {
131096
- key: 1,
131097
- onClick: Le,
131098
- icon: "qr",
131099
- label: "Scan QR"
131100
- })) : fe("", !0)
131101
- ], 64))
131102
- ]),
131103
- default: Me(() => [
131104
- A.value ? (O(), ne(c6e, {
131105
- key: 0,
131106
- class: ht(["p-[9.52px] transition"]),
131107
- message: A.value.detail,
131108
- removable: !1,
131109
- "show-icon": !1,
131110
- title: A.value.title,
131111
- "message-wrapper-class": "text-[11px] leading-[14px] tracking-[0.02em]",
131112
- severity: "danger"
131113
- }, null, 8, ["message", "title"])) : fe("", !0),
131114
- ge(Qt, {
131115
- disabled: b.value,
131116
- loading: d.value,
131117
- onClick: oe,
131118
- icon: "refresh",
131119
- label: "Sync",
131120
- "loading-icon": "refresh",
131121
- outlined: ""
131122
- }, null, 8, ["disabled", "loading"]),
131123
- re("section", {
131124
- class: ht([
131125
- "grid grid-cols-2 gap-3 justify-start w-full",
131126
- { "opacity-60 pointer-events-none": b.value }
131127
- ]),
131128
- "data-ts-section": "scanner-list"
131129
- }, [
131130
- ge(O2, {
131131
- modelValue: p.value,
131132
- "onUpdate:modelValue": [
131133
- ie[0] || (ie[0] = (Ue) => p.value = Ue),
131134
- J
131135
- ],
131136
- options: _.value,
131137
- label: "RFID Scanner",
131138
- "option-label": "label"
131139
- }, null, 8, ["modelValue", "options"]),
131140
- ge(O2, {
131141
- modelValue: m.value,
131142
- "onUpdate:modelValue": [
131143
- ie[1] || (ie[1] = (Ue) => m.value = Ue),
131144
- J
131145
- ],
131146
- options: v.value,
131147
- label: "QR Scanner",
131148
- "option-label": "label"
131149
- }, null, 8, ["modelValue", "options"])
131150
- ], 2)
131151
- ]),
131152
- _: 2
131153
- }, [
131154
- y.value ? {
131155
- name: "header",
131156
- fn: Me(() => {
131157
- var Ue;
131158
- return [
131159
- ge(Lt, {
131160
- icon: (Ue = te.searchBy) == null ? void 0 : Ue.toLowerCase()
131161
- }, null, 8, ["icon"]),
131162
- re("h3", null, "Scan " + We(te.searchBy), 1)
131163
- ];
131164
- }),
131165
- key: "0"
131166
- } : void 0
131167
- ]), 1032, ["closable", "header-class", "visible"]));
131168
- }
131169
- }), u6e = { class: "flex gap-2 items-center" }, d6e = { class: "flex gap-0.5 items-center leading-4" }, f6e = { class: "flex gap-5 items-center" }, p6e = /* @__PURE__ */ re("span", null, "do not leave this page", -1), m6e = {
131170
- key: 1,
131171
- class: "text-xs font-medium leading-[16.39px] tracking-[0.02em]"
131172
- }, j5e = /* @__PURE__ */ wt({
131173
- __name: "ButtonScan",
131174
- props: {
131175
- label: {},
131176
- icon: {},
131177
- type: { default: "RFID" },
131178
- autoSwitch: { type: Boolean },
131179
- scanValidation: {},
131180
- modelValue: {},
131181
- bulk: { type: Boolean },
131182
- id: {},
131183
- disabled: { type: Boolean },
131184
- powerbank: { type: Boolean },
131185
- labelOnly: { type: Boolean },
131186
- outlined: { type: Boolean },
131187
- severity: {},
131188
- size: { default: void 0 },
131189
- style: {},
131190
- class: {},
131191
- iconPos: {},
131192
- iconClass: {},
131193
- tooltip: {},
131194
- tooltipPos: {},
131195
- badge: {},
131196
- badgeClass: {},
131197
- badgeSeverity: {},
131198
- loading: { type: Boolean },
131199
- loadingIcon: {},
131200
- link: { type: Boolean },
131201
- raised: { type: Boolean },
131202
- rounded: { type: Boolean },
131203
- text: { type: Boolean },
131204
- plain: { type: Boolean }
131205
- },
131206
- emits: ["update:modelValue", "connect", "connected", "scan", "stop", "error", "beforeStartScan"],
131207
- setup(t, { expose: e, emit: n }) {
131208
- const r = t, a = n;
131209
- J1(() => {
131210
- ze();
131211
- });
131212
- const i = a3(), { devices: s, device: o, saveDevices: l, setDevice: c } = fP(), u = nt(!1), d = nt(!1), p = nt(!1), m = nt(!1), g = nt(!1), _ = nt(!1), v = nt(), b = nt(0), E = nt(r.type ?? "RFID"), T = [], y = Ye(
131213
- () => E.value === "RFID" ? "RFID_Scanning" : "QR_Scanning"
131214
- ), C = Ye(
131215
- () => E.value === "RFID" ? "RFID_Connecting" : "QR_Connecting"
131216
- );
131217
- Ye(() => `The scanner could not identify the ${E.value} code. It may be damaged or improperly positioned. Please check the code and try again.`);
131218
- const A = () => {
131219
- window.scannerWorker ?? (window.scannerWorker = new mP());
131220
- }, x = () => {
131221
- const { serialNumber: xe = "" } = o.value[E.value] ?? {};
131222
- return xe;
131223
- }, k = async () => {
131224
- try {
131225
- A(), await M(), u.value = !0;
131226
- } catch (xe) {
131227
- console.error(xe), u.value = !1;
131228
- }
131229
- }, M = async () => {
131230
- var xe;
131231
- try {
131232
- if (!ve())
131233
- throw new Error("NOT_SUPPORTED_SYSTEM");
131234
- if (a("connect"), !s.value.length || !o.value[E.value])
131235
- throw new Error("HARDWARE_NOT_SYNCHRONIZED");
131236
- i.add({
131237
- customMessage: !0,
131238
- message: E.value === "QR" ? "Connecting QR Scanner..." : "Connecting RFID Scanner...",
131239
- severity: "info",
131240
- life: 0,
131241
- group: C.value
131242
- }), p.value = !0;
131243
- const me = () => {
131244
- a("connected", o.value[E.value]), setTimeout(() => {
131245
- I();
131246
- }, 0);
131247
- };
131248
- window.scannerWorker.onmessage = ({ data: Ne }) => {
131249
- var B;
131250
- if (Ne.status === "connection_established")
131251
- try {
131252
- const { error: q } = (Ne == null ? void 0 : Ne.data) ?? {}, Y = ((B = Ne == null ? void 0 : Ne.data) == null ? void 0 : B.deviceList) ?? [], H = o.value[r.type], le = Y.some(
131253
- (Q) => Q.serialNumber === (H == null ? void 0 : H.serialNumber)
131254
- );
131255
- if (Y.length && le)
131256
- me();
131257
- else {
131258
- if (q === "Driver not connected to server")
131259
- throw new Error("DRIVER_NOT_FOUND");
131260
- if (!Y.length)
131261
- throw new Error("DEVICE_NOT_CONNECTED");
131262
- }
131263
- i.removeGroup(C.value);
131264
- } catch (q) {
131265
- P(q);
131266
- }
131267
- else Ne.status === "connection_reused" ? me() : Ne.status === "error_connecting" && (i.removeGroup(C.value), i.add({
131268
- customMessage: !0,
131269
- message: "Scanner connection failed",
131270
- severity: "error"
131271
- }));
131272
- }, window.scannerWorker.postMessage({
131273
- command: "connect",
131274
- userId: (xe = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : xe._id
131275
- });
131276
- } catch (me) {
131277
- P(me);
131278
- }
131279
- }, I = (xe = !1, me = !1) => {
131280
- var B;
131281
- _.value = !1, i.removeGroup(C.value), localStorage.devmode || (window.addEventListener("blur", ue), window.addEventListener("beforeunload", ue));
131282
- const Ne = o.value[E.value];
131283
- if (Ne) {
131284
- let q = "";
131285
- r.bulk ? q = `bulkscan-${E.value.toLowerCase()}` : q = `scan-${E.value.toLowerCase()}`, window.scannerWorker.onmessage = async ({ data: Y }) => {
131286
- var H;
131287
- if (Y.status === "scan_started")
131288
- me || (b.value++, setTimeout(() => {
131289
- i.add({
131290
- customMessage: !0,
131291
- message: "scanning",
131292
- severity: "info",
131293
- life: 0,
131294
- group: y.value
131295
- });
131296
- }, 0));
131297
- else if (Y.status === "scanned") {
131298
- const { code: le, error: Q, deviceList: Z } = (Y == null ? void 0 : Y.data) ?? {};
131299
- if (Q) return J(Q, Z);
131300
- if (le) {
131301
- if (["scan-rfid", "scan-qr"].includes(q)) {
131302
- g.value = !!r.scanValidation;
131303
- const Ce = await ((H = r.scanValidation) == null ? void 0 : H.call(
131304
- r,
131305
- E.value,
131306
- le,
131307
- x()
131308
- )) ?? !0;
131309
- if (g.value = !1, Ce)
131310
- r.autoSwitch ? (Te(), Ue()) : te(!0);
131311
- else {
131312
- _.value || I(!1, !0);
131313
- return;
131314
- }
131315
- }
131316
- T.includes(le) || (a("update:modelValue", le), a("scan", le, x()), r.bulk && T.push(le));
131317
- }
131318
- } else Y.status === "scan_stopped" ? te(!0) : Y.status === "scan_error" && de(Y.error);
131319
- }, window.scannerWorker.onerror = de, window.scannerWorker.postMessage({
131320
- command: "scan",
131321
- scanCommand: q,
131322
- userId: (B = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : B._id,
131323
- source: "app",
131324
- jenisDevice: Ne.jenisDevice,
131325
- serialNumber: Ne.serialNumber,
131326
- newConnection: xe
131327
- });
131328
- }
131329
- }, P = (xe) => {
131330
- c({ RFID: void 0, QR: void 0 }), m.value = !0, v.value = xe instanceof Error ? xe.message : uP(xe), p.value = !1, a("error", xe), i.removeGroup(C.value);
131331
- }, J = (xe, me = []) => {
131332
- let Ne = "";
131333
- v.value = void 0, ie(!0), xe === "Time out" ? Ne = "The scanning process has timed out. Please try again." : xe === "Driver not connected to server" ? v.value = "DRIVER_NOT_FOUND" : xe === "Device disconnected" && (v.value = "DEVICE_DISCONNECTED", l(me), c({ RFID: void 0, QR: void 0 })), a("error", xe), m.value = !!v.value, Ne && i.add({
131334
- customMessage: !0,
131335
- message: Ne,
131336
- error: xe,
131337
- life: 6e3,
131338
- group: y.value
131339
- });
131340
- }, de = (xe) => {
131341
- ie(!0), a("error", xe), i.add({
131342
- customMessage: !0,
131343
- message: "An unexpected error occurred during scanning. Please try again, and if the issue persists, contact your administrator for assistance.",
131344
- error: xe,
131345
- life: 6e3,
131346
- group: y.value
131347
- });
131348
- }, Le = () => {
131349
- window.Cypress ? oe() : k();
131350
- }, oe = () => {
131351
- i.add({
131352
- customMessage: !0,
131353
- message: "Connecting device...",
131354
- severity: "info",
131355
- life: 3e3,
131356
- group: C.value
131357
- }), setTimeout(async () => {
131358
- var xe;
131359
- if (a("connect"), a("connected", {
131360
- jenisDevice: "Handheld",
131361
- serialNumber: qb(),
131362
- API: "v2",
131363
- rfidScan: !0,
131364
- qrScan: !0,
131365
- name: "Device Test"
131366
- }), r.bulk)
131367
- a("scan", qb(), "serialNumber");
131368
- else {
131369
- const me = qb();
131370
- g.value = !!r.scanValidation;
131371
- const Ne = await ((xe = r.scanValidation) == null ? void 0 : xe.call(
131372
- r,
131373
- E.value,
131374
- me,
131375
- x()
131376
- )) ?? !0;
131377
- g.value = !1, Ne && (a("scan", me, "serialNumber"), te());
131378
- }
131379
- }, 100);
131380
- }, Te = () => {
131381
- i.removeGroup("RFID_Scanning"), i.removeGroup("QR_Scanning");
131382
- }, te = (xe = !1) => {
131383
- Te(), p.value = !1, ze(), xe && a("stop"), T.splice(0);
131384
- }, ie = (xe = !1) => {
131385
- var me;
131386
- window.scannerWorker.onmessage = null, window.scannerWorker.postMessage({
131387
- command: "stopscan",
131388
- userId: (me = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : me._id
131389
- }), te(xe), _.value = !0, u.value = !1;
131390
- }, Ue = () => {
131391
- r.bulk || (o.value[E.value] ? (E.value = E.value === "QR" ? "RFID" : "QR", I()) : (te(), m.value = !0, v.value = "HARDWARE_NOT_SYNCHRONIZED", p.value = !1));
131392
- }, ue = (xe) => {
131393
- d.value = !0, ie(!0), xe.preventDefault();
131394
- }, ze = () => {
131395
- window.removeEventListener("blur", ue), window.removeEventListener("beforeunload", ue);
131396
- }, ve = () => {
131397
- const { userAgent: xe } = navigator;
131398
- return xe.includes("Windows");
131399
- }, Ee = Ye(() => {
131400
- if (!r.labelOnly)
131401
- return r.icon ? r.icon : r.autoSwitch ? "qr-scan-line" : E.value === "QR" ? "qr" : "rfid";
131402
- }), Ae = Ye(() => r.label ? r.label : r.autoSwitch ? "SCAN TAG" : E.value === "QR" ? "Scan QR" : "Scan RFID");
131403
- return e({
131404
- onBeforeStartScan: Le,
131405
- startScan: k,
131406
- stopScan: ie
131407
- }), (xe, me) => (O(), K(lt, null, [
131408
- ge(G(Qt), N(xe.$attrs, {
131409
- class: [
131410
- {
131411
- "[&_i]:w-2 [&_i]:h-2": xe.type === "QR",
131412
- "[&_i]:w-[11px] [&_i]:h-[7px]": xe.type === "RFID"
131413
- },
131414
- "!px-1.5"
131415
- ],
131416
- disabled: r.disabled,
131417
- icon: Ee.value,
131418
- label: Ae.value,
131419
- outlined: r.outlined,
131420
- severity: r.severity,
131421
- size: r.size,
131422
- onClick: Le
131423
- }), null, 16, ["class", "disabled", "icon", "label", "outlined", "severity", "size"]),
131424
- ge(hP, {
131425
- visible: m.value,
131426
- "onUpdate:visible": me[0] || (me[0] = (Ne) => m.value = Ne),
131427
- bulk: xe.bulk,
131428
- "error-code": v.value,
131429
- "search-by": E.value,
131430
- onScan: Le
131431
- }, null, 8, ["visible", "bulk", "error-code", "search-by"]),
131432
- u.value ? (O(), ne(G(Gf), {
131433
- key: 0,
131434
- "base-z-index": 9983,
131435
- group: C.value,
131436
- icon: "info"
131437
- }, null, 8, ["group"])) : fe("", !0),
131438
- u.value ? (O(), ne(G(Gf), {
131439
- key: 1,
131440
- "base-z-index": 9997,
131441
- class: "!absolute !bottom-[80px] !h-max",
131442
- group: "scan-error-validation"
131443
- })) : fe("", !0),
131444
- u.value ? (O(), ne(G(Gf), {
131445
- key: b.value,
131446
- "base-z-index": 9984,
131447
- group: y.value,
131448
- class: "[&_[data-pc-section=buttoncontainer]]"
131449
- }, {
131450
- message: Me(({ message: Ne }) => [
131451
- re("div", {
131452
- class: ht(
131453
- Ne.detail == "scanning" ? "w-full -mr-8 z-10 flex gap-2 justify-between items-center text-general-800 text-xs font-normal" : "w-full"
131454
- )
131455
- }, [
131456
- Ne.detail === "scanning" ? (O(), K(lt, { key: 0 }, [
131457
- re("section", u6e, [
131458
- ge(G(Lt), {
131459
- class: "animate-spin text-base",
131460
- icon: "loader-4"
131461
- }),
131462
- re("span", d6e, [
131463
- E.value === "RFID" ? (O(), K(lt, { key: 0 }, [
131464
- ge(G(Lt), {
131465
- class: "text-base !w-4 !h-4",
131466
- icon: "rfid"
131467
- }),
131468
- dn(" " + We(g.value ? "Validating RFID..." : "RFID Scanning..."), 1)
131469
- ], 64)) : (O(), K(lt, { key: 1 }, [
131470
- ge(G(Lt), {
131471
- class: "text-sm",
131472
- icon: "qr"
131473
- }),
131474
- dn(" " + We(g.value ? "Validating QR..." : "QR Scanning..."), 1)
131475
- ], 64))
131476
- ])
131477
- ]),
131478
- re("section", f6e, [
131479
- p6e,
131480
- ge(G(Qt), {
131481
- onClick: me[1] || (me[1] = (B) => ie(!0)),
131482
- label: "Stop Scan",
131483
- severity: "danger"
131484
- })
131485
- ])
131486
- ], 64)) : (O(), K("span", m6e, We(Ne.detail), 1))
131487
- ], 2)
131488
- ]),
131489
- _: 1
131490
- }, 8, ["group"])) : fe("", !0),
131491
- ge(G(Cy), {
131492
- visible: d.value,
131493
- "onUpdate:visible": me[2] || (me[2] = (Ne) => d.value = Ne),
131494
- header: `${E.value} SCAN STOPPED`,
131495
- onConfirm: me[3] || (me[3] = (Ne) => (d.value = !1, Le())),
131496
- "confirm-label": "Continue",
131497
- message: "The scan process was interrupted because you want to leave this window.",
131498
- severity: "danger"
131499
- }, null, 8, ["visible", "header"]),
131500
- (O(), ne(ES, { to: "body" }, [
131501
- p.value ? (O(), K("div", {
131502
- key: 0,
131503
- class: ht([
131504
- xe.$preset.dialog.mask({ props: { modal: !0 } }).class,
131505
- "w-screen h-screen fixed top-0 left-0",
131506
- "!z-[9982]"
131507
- ]),
131508
- "data-ts-section": "toast-mask"
131509
- }, null, 2)) : fe("", !0)
131510
- ]))
131511
- ], 64));
131512
- }
131513
- }), X5e = /* @__PURE__ */ wt({
131514
- __name: "ButtonSync",
131515
- props: {
131516
- withoutScanBtn: { type: Boolean }
131517
- },
131518
- setup(t) {
131519
- const e = t, n = nt(!1);
131520
- return (r, a) => (O(), K(lt, null, [
131521
- ge(Qt, N({
131522
- onClick: a[0] || (a[0] = (i) => n.value = !0)
131523
- }, r.$attrs, {
131524
- icon: "refresh",
131525
- label: "Sync",
131526
- outlined: ""
131527
- }), null, 16),
131528
- ge(hP, {
131529
- visible: n.value,
131530
- "onUpdate:visible": a[1] || (a[1] = (i) => n.value = i),
131531
- "without-scan-btn": e.withoutScanBtn
131532
- }, null, 8, ["visible", "without-scan-btn"])
131533
- ], 64));
131534
- }
131535
- }), h6e = ["aria-checked", "aria-expanded", "aria-label", "aria-level", "aria-posinset", "aria-selected", "aria-setsize", "tabindex"], g6e = ["data-p-highlight", "data-p-selectable"], _6e = ["data-node-has-children", "data-node-key", "data-node-selected"], v6e = {
131536
- "aria-hidden": "true",
131537
- class: "flex items-center justify-start gap-2 px-4 py-1.5 hover:bg-surface-50 text-xs no-underline overflow-hidden cursor-pointer select-none",
131538
- "data-pc-section": "action",
131539
- tabindex: "-1"
131540
- }, b6e = /* @__PURE__ */ wt({
131541
- __name: "TreeNode",
131542
- props: {
131543
- node: {},
131544
- index: {},
131545
- disabled: { type: Boolean },
131546
- listLabelsNoOption: {},
131547
- pt: {},
131548
- templates: {},
131549
- disableKeys: {},
131550
- disableNodeAll: { type: Boolean },
131551
- exactDisableKeys: {},
131552
- level: {},
131553
- value: {},
131554
- propagateSelection: { type: Boolean },
131555
- expandedKeys: {},
131556
- selectionKeys: {},
131557
- treeNodeMenus: {},
131558
- selectionMode: {},
131559
- metaKeySelection: { type: Boolean },
131560
- loading: { type: Boolean },
131561
- loadingIcon: {},
131562
- loadingMode: {},
131563
- filterText: {},
131564
- filterBy: {},
131565
- filterMode: {},
131566
- filterPlaceholder: {},
131567
- filterLocale: {},
131568
- highlightOnSelect: { type: Boolean },
131569
- scrollHeight: {},
131570
- ariaLabel: {},
131571
- ariaLabelledby: {},
131572
- ptOptions: {},
131573
- unstyled: { type: Boolean },
131574
- useOption: { type: Boolean },
131575
- disableNodeWhen: { type: Function },
131576
- exactDisableNodeWhen: { type: Function },
131577
- nodeSelectedWhen: { type: Function }
131578
- },
131579
- emits: ["nodeToggle", "nodeClick", "checkboxChange", "toggleMenu"],
131580
- setup(t, { emit: e }) {
131581
- const n = e, r = t, a = mn("preset", {}).tree, i = rt(), s = rt(null);
131582
- let o = !1, l = !1;
131583
- const c = Ye(
131584
- () => {
131585
- var Z;
131586
- return ((Z = r.node) == null ? void 0 : Z.children) && r.node.children.length > 0;
131587
- }
131588
- ), u = Ye(
131589
- () => {
131590
- var Z;
131591
- return +r.node.key != -1 && r.useOption && !((Z = r.listLabelsNoOption) != null && Z.includes(r.node.name));
131592
- }
131593
- ), d = Ye(
131594
- () => r.expandedKeys && r.expandedKeys[r.node.key] === !0
131595
- ), p = Ye(
131596
- () => r.node.leaf === !1 ? !1 : !(r.node.children && r.node.children.length)
131597
- ), m = Ye(() => le(r.node) || Q(r.node) || r.node.selectable === !1 ? !1 : r.selectionMode != null), g = Ye(
131598
- () => {
131599
- var Z;
131600
- return ((Z = r.nodeSelectedWhen) == null ? void 0 : Z.call(r, r.node)) || (r.selectionMode && r.selectionKeys ? r.selectionKeys[r.node.key] === !0 : !1);
131601
- }
131602
- ), _ = Ye(
131603
- () => r.selectionMode === "checkbox" && r.node.selectable !== !1
131604
- ), v = Ye(
131605
- () => {
131606
- var Z, Ce;
131607
- return ((Z = r.nodeSelectedWhen) == null ? void 0 : Z.call(r, r.node)) || (r.selectionKeys ? (Ce = r.selectionKeys[r.node.key]) == null ? void 0 : Ce.checked : !1);
130944
+ ), _ = Ye(
130945
+ () => r.selectionMode === "checkbox" && r.node.selectable !== !1
130946
+ ), v = Ye(
130947
+ () => {
130948
+ var Z, Ce;
130949
+ return ((Z = r.nodeSelectedWhen) == null ? void 0 : Z.call(r, r.node)) || (r.selectionKeys ? (Ce = r.selectionKeys[r.node.key]) == null ? void 0 : Ce.checked : !1);
131608
130950
  }
131609
130951
  ), b = Ye(
131610
130952
  () => {
@@ -131942,7 +131284,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
131942
131284
  "data-node-key": Z.node.key,
131943
131285
  "data-node-selected": v.value,
131944
131286
  class: "grow"
131945
- }, We(Z.node.name), 9, _6e)),
131287
+ }, We(Z.node.name), 9, s6e)),
131946
131288
  u.value ? (O(), ne(Qt, {
131947
131289
  key: 2,
131948
131290
  class: ht([
@@ -131959,7 +131301,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
131959
131301
  "tooltip-pos": "left"
131960
131302
  })) : fe("", !0)
131961
131303
  ], 16)
131962
- ], 16, g6e),
131304
+ ], 16, i6e),
131963
131305
  c.value && d.value ? (O(), K("ul", N({
131964
131306
  key: 0,
131965
131307
  role: "group"
@@ -131994,7 +131336,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
131994
131336
  }), null, 16, ["class", "disable-keys", "disabled", "exact-disable-keys", "expanded-keys", "level", "list-labels-no-option", "loading-mode", "node", "propagate-selection", "pt", "selection-keys", "selection-mode", "templates", "tree-node-menus", "unstyled", "use-option"]);
131995
131337
  }), 128))
131996
131338
  ], 16)) : fe("", !0)
131997
- ], 16, h6e),
131339
+ ], 16, a6e),
131998
131340
  u.value ? (O(), ne(Am, {
131999
131341
  key: 0,
132000
131342
  ref_key: "treeNodeMenu",
@@ -132005,7 +131347,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132005
131347
  "data-wv-section": "tree-node-menus"
132006
131348
  }, {
132007
131349
  item: Me(({ item: ot }) => [
132008
- re("a", v6e, [
131350
+ re("a", o6e, [
132009
131351
  ge(Lt, {
132010
131352
  icon: ot.icon,
132011
131353
  severity: ot.danger ? "danger" : void 0
@@ -132021,7 +131363,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132021
131363
  ], 64);
132022
131364
  };
132023
131365
  }
132024
- }), E6e = ["id"], S6e = ["aria-label", "aria-labelledby"], y6e = /* @__PURE__ */ wt({
131366
+ }), c6e = ["id"], u6e = ["aria-label", "aria-labelledby"], d6e = /* @__PURE__ */ wt({
132025
131367
  inheritAttrs: !1,
132026
131368
  __name: "BaseTree",
132027
131369
  props: {
@@ -132146,7 +131488,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132146
131488
  }), [
132147
131489
  (O(!0), K(lt, null, en(b.value, (k, M) => {
132148
131490
  var I, P, J;
132149
- return O(), ne(b6e, N({
131491
+ return O(), ne(l6e, N({
132150
131492
  key: k.key,
132151
131493
  ref_for: !0
132152
131494
  }, n, {
@@ -132175,12 +131517,12 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132175
131517
  onToggleMenu: T[0] || (T[0] = (de) => E.$emit("toggleMenu", de))
132176
131518
  }), null, 16, ["class", "disable-keys", "disable-node-all", "disabled", "exact-disable-keys", "expanded-keys", "index", "level", "list-labels-no-option", "loading-mode", "node", "propagate-selection", "pt", "selection-keys", "selection-mode", "templates", "tree-node-menus", "unstyled", "use-option"]);
132177
131519
  }), 128))
132178
- ], 16, S6e)
131520
+ ], 16, u6e)
132179
131521
  ], 16)
132180
- ], 16, E6e);
131522
+ ], 16, c6e);
132181
131523
  };
132182
131524
  }
132183
- }), T6e = /* @__PURE__ */ wt({
131525
+ }), f6e = /* @__PURE__ */ wt({
132184
131526
  __name: "Tree",
132185
131527
  props: {
132186
131528
  filter: {},
@@ -132386,7 +131728,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132386
131728
  expandAll: oe,
132387
131729
  expandNodeAll: ze,
132388
131730
  fetchTreeList: I
132389
- }), (ve, Ee) => (O(), ne(y6e, N({
131731
+ }), (ve, Ee) => (O(), ne(d6e, N({
132390
131732
  id: c.value,
132391
131733
  ref_key: "tree",
132392
131734
  ref: u
@@ -132429,13 +131771,13 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132429
131771
  } : void 0
132430
131772
  ]), 1040, ["id", "expanded-keys", "selection-keys", "class", "disable-keys", "disable-node-all", "disable-node-when", "exact-disable-keys", "exact-disable-node-when", "filter-text", "list-labels-no-option", "loading", "node-selected-when", "propagate-selection", "selection-mode", "tree-node-menus", "use-option", "value"]));
132431
131773
  }
132432
- }), C6e = {
131774
+ }), p6e = {
132433
131775
  class: /* @__PURE__ */ ht([
132434
131776
  "relative w-full text-xs flex gap-1 py-[4.5px] px-2 items-center",
132435
131777
  "rounded ring-1 ring-inset ring-offset-0 ring-general-500 dark:ring-general-500"
132436
131778
  ]),
132437
131779
  "data-wv-name": "tree-search-input"
132438
- }, A6e = /* @__PURE__ */ wt({
131780
+ }, m6e = /* @__PURE__ */ wt({
132439
131781
  __name: "TreeSearchInput",
132440
131782
  props: {
132441
131783
  modelValue: {}
@@ -132449,7 +131791,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132449
131791
  };
132450
131792
  return (s, o) => {
132451
131793
  const l = vr("focus");
132452
- return O(), K("div", C6e, [
131794
+ return O(), K("div", p6e, [
132453
131795
  ge(Lt, {
132454
131796
  class: "w-4 h-4 shrink-0 grow-0 !text-general-400",
132455
131797
  icon: "search"
@@ -132478,17 +131820,17 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132478
131820
  ]);
132479
131821
  };
132480
131822
  }
132481
- }), x6e = {
131823
+ }), h6e = {
132482
131824
  class: "flex flex-col gap-3 items-start w-full",
132483
131825
  "data-wv-section": "header-wrapper"
132484
- }, O6e = {
131826
+ }, g6e = {
132485
131827
  key: 0,
132486
131828
  class: "list-inside w-full overflow-auto max-h-20",
132487
131829
  "data-wv-section": "dialog-select-tree-lists"
132488
- }, w6e = {
131830
+ }, _6e = {
132489
131831
  class: "flex gap-1 items-center justify-end",
132490
131832
  "data-wv-section": "footer-button"
132491
- }, R6e = /* @__PURE__ */ wt({
131833
+ }, v6e = /* @__PURE__ */ wt({
132492
131834
  __name: "DialogSelectTree",
132493
131835
  props: /* @__PURE__ */ La({
132494
131836
  fetchTree: {},
@@ -132632,11 +131974,11 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132632
131974
  }, () => {
132633
131975
  var C;
132634
131976
  return [
132635
- re("div", x6e, [
131977
+ re("div", h6e, [
132636
131978
  re("h3", {
132637
131979
  class: ht([...G(s).title.class, "!leading-6"])
132638
131980
  }, We(v.value), 3),
132639
- E.lists ? (O(), K("ul", O6e, [
131981
+ E.lists ? (O(), K("ul", g6e, [
132640
131982
  (O(!0), K(lt, null, en(E.lists, (A, x) => (O(), K("li", {
132641
131983
  key: x,
132642
131984
  class: "text-xs leading-[16.39px] tracking-[0.02em] font-medium text-general-800 list-disc ps-[6px]"
@@ -132646,7 +131988,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132646
131988
  key: 1,
132647
131989
  class: ht([...G(s).title.class, "!leading-6 text-sm"])
132648
131990
  }, We(E.subHeader), 3)) : fe("", !0),
132649
- (C = o.value) != null && C.isLoading ? fe("", !0) : (O(), ne(A6e, {
131991
+ (C = o.value) != null && C.isLoading ? fe("", !0) : (O(), ne(m6e, {
132650
131992
  key: 2,
132651
131993
  modelValue: l.value,
132652
131994
  "onUpdate:modelValue": T[0] || (T[0] = (A) => l.value = A),
@@ -132658,7 +132000,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132658
132000
  ];
132659
132001
  }),
132660
132002
  default: Me(() => [
132661
- ge(T6e, N({
132003
+ ge(f6e, N({
132662
132004
  ref_key: "treeComponent",
132663
132005
  ref: o
132664
132006
  }, r, {
@@ -132714,7 +132056,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132714
132056
  }, null, 8, ["message"])), [
132715
132057
  [Qa, !!c.value]
132716
132058
  ]),
132717
- re("div", w6e, [
132059
+ re("div", _6e, [
132718
132060
  ge(Qt, {
132719
132061
  onClick: T[5] || (T[5] = (C) => i.value = !1),
132720
132062
  label: "Cancel",
@@ -132735,10 +132077,10 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132735
132077
  }
132736
132078
  ]), 1032, ["visible", "modal", "pt"]));
132737
132079
  }
132738
- }), I6e = {
132080
+ }), b6e = {
132739
132081
  key: 0,
132740
132082
  class: "inline-flex gap-1 items-center"
132741
- }, N6e = /* @__PURE__ */ wt({
132083
+ }, E6e = /* @__PURE__ */ wt({
132742
132084
  __name: "ButtonSelectTree",
132743
132085
  props: {
132744
132086
  type: {},
@@ -132856,7 +132198,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132856
132198
  "show-optional-text": y.$attrs["show-optional-text"] != !1
132857
132199
  }), {
132858
132200
  default: Me(() => [
132859
- c.value ? (O(), K("span", I6e, [
132201
+ c.value ? (O(), K("span", b6e, [
132860
132202
  ge($l, {
132861
132203
  label: c.value.name,
132862
132204
  format: "nowrap"
@@ -132905,7 +132247,7 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132905
132247
  ]),
132906
132248
  _: 1
132907
132249
  }, 16, ["info", "label", "mandatory", "show-optional-text"]),
132908
- (O(), ne(R6e, {
132250
+ (O(), ne(v6e, {
132909
132251
  key: l.value + +o.value,
132910
132252
  ref_key: "dialogTreeInstance",
132911
132253
  ref: i,
@@ -132941,10 +132283,10 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
132941
132283
  ]), 1032, ["visible", "allow-empty-selection", "auto-select-all", "disable-keys", "disable-node-all", "exact-disable-key", "exact-disable-keys", "excluded-keys", "fetch-tree", "flatten-disposable-node", "header", "hidden", "keys", "params", "readonly", "selection-mode", "show-disposable-groups", "type"]))
132942
132284
  ], 64));
132943
132285
  }
132944
- }), D6e = {
132286
+ }), S6e = {
132945
132287
  class: "flex items-end justify-end gap-2",
132946
132288
  "data-wv-section": "filteractionbuttons"
132947
- }, k6e = /* @__PURE__ */ wt({
132289
+ }, y6e = /* @__PURE__ */ wt({
132948
132290
  inheritAttrs: !1,
132949
132291
  __name: "FilterContainer",
132950
132292
  props: {
@@ -133014,199 +132356,857 @@ const a6e = { class: "flex items-center gap-3 w-full" }, i6e = {
133014
132356
  case "group":
133015
132357
  return `${M.field}.matchMode`;
133016
132358
  }
133017
- }, A = (M) => (() => {
133018
- switch (M.type) {
133019
- case "rangenumber":
133020
- return "BETWEEN";
133021
- case "multiselect":
133022
- case "category":
133023
- case "group":
133024
- return "IN";
133025
- case "dropdown":
133026
- return "EQUALS";
133027
- case "calendar":
133028
- return "DATE_BETWEEN";
132359
+ }, A = (M) => (() => {
132360
+ switch (M.type) {
132361
+ case "rangenumber":
132362
+ return "BETWEEN";
132363
+ case "multiselect":
132364
+ case "category":
132365
+ case "group":
132366
+ return "IN";
132367
+ case "dropdown":
132368
+ return "EQUALS";
132369
+ case "calendar":
132370
+ return "DATE_BETWEEN";
132371
+ }
132372
+ })(), x = () => {
132373
+ if (n.static) {
132374
+ const M = {};
132375
+ n.fields.forEach((I) => {
132376
+ Mu(
132377
+ M,
132378
+ C(I),
132379
+ A(I)
132380
+ );
132381
+ }), o(M);
132382
+ }
132383
+ }, k = (M, I) => {
132384
+ switch (M.type) {
132385
+ case "rangenumber":
132386
+ return M.field ? n.static ? `${M.field}.value.${I}` : `${M.field}` : n.static ? `${M.fields[I]}.value` : M.fields[I];
132387
+ case "multiselect":
132388
+ case "dropdown":
132389
+ case "calendar":
132390
+ case "category":
132391
+ case "group":
132392
+ return n.static ? `${M.field}.value` : `${M.field}`;
132393
+ }
132394
+ };
132395
+ return Mt(() => n.fields, E), (M, I) => tn((O(), K("form", N({
132396
+ ref_key: "container",
132397
+ ref: d
132398
+ }, M.$preset.filtercontainer.root, {
132399
+ style: `grid-template-columns: repeat(${M.fieldsPerRow}, 1fr)`,
132400
+ onSubmit: I[0] || (I[0] = In(
132401
+ //@ts-ignore
132402
+ (...P) => G(y) && G(y)(...P),
132403
+ ["prevent"]
132404
+ )),
132405
+ "data-wv-name": "filtercontainer"
132406
+ }), [
132407
+ (O(!0), K(lt, null, en(M.fields, (P) => (O(), K(lt, {
132408
+ key: JSON.stringify(P) + m.value
132409
+ }, [
132410
+ P.type == "rangenumber" ? (O(), ne(jL, N({
132411
+ key: 0,
132412
+ ref_for: !0
132413
+ }, P, {
132414
+ mandatory: !1,
132415
+ "max-field-name": k(P, 1),
132416
+ "min-field-name": k(P, 0),
132417
+ "show-optional-text": !1,
132418
+ "use-validator": ""
132419
+ }), null, 16, ["max-field-name", "min-field-name"])) : P.type == "multiselect" ? (O(), ne(eP, N({
132420
+ key: 1,
132421
+ ref_for: !0
132422
+ }, P, {
132423
+ "field-name": k(P),
132424
+ loading: l.value[P.optionField ?? P.field],
132425
+ mandatory: !1,
132426
+ options: c.value[P.optionField ?? P.field],
132427
+ "show-optional-text": !1,
132428
+ onShow: (J) => v(
132429
+ P.fetchOptionFn,
132430
+ P.optionField ?? P.field,
132431
+ P.params
132432
+ ),
132433
+ "option-label": "label",
132434
+ "option-value": "value",
132435
+ "use-validator": ""
132436
+ }), null, 16, ["field-name", "loading", "options", "onShow"])) : P.type == "dropdown" ? (O(), ne(O2, N({
132437
+ key: 2,
132438
+ ref_for: !0
132439
+ }, P, {
132440
+ "field-name": k(P),
132441
+ loading: l.value[P.field],
132442
+ mandatory: !1,
132443
+ options: c.value[P.optionField ?? P.field],
132444
+ "show-optional-text": !1,
132445
+ onShow: (J) => v(
132446
+ P.fetchOptionFn,
132447
+ P.optionField ?? P.field,
132448
+ P.params
132449
+ ),
132450
+ "option-label": "label",
132451
+ "option-value": "value",
132452
+ "use-validator": ""
132453
+ }), null, 16, ["field-name", "loading", "options", "onShow"])) : P.type === "calendar" ? (O(), ne(iP, N({
132454
+ key: 3,
132455
+ ref_for: !0
132456
+ }, P, {
132457
+ "field-name": k(P),
132458
+ mandatory: !1,
132459
+ "show-optional-text": !1,
132460
+ "selection-mode": "range",
132461
+ "use-validator": ""
132462
+ }), null, 16, ["field-name"])) : $e(M.$slots, "field", {
132463
+ key: 4,
132464
+ field: P,
132465
+ fieldName: k(P)
132466
+ })
132467
+ ], 64))), 128)),
132468
+ re("div", S6e, [
132469
+ ge(Qt, {
132470
+ label: G(a).clearFieldText,
132471
+ onClick: T,
132472
+ "data-wv-section": "clearbutton",
132473
+ text: ""
132474
+ }, null, 8, ["label"]),
132475
+ ge(Qt, {
132476
+ label: G(a).applyText,
132477
+ onClick: G(y),
132478
+ "data-wv-section": "applybutton",
132479
+ severity: "success"
132480
+ }, null, 8, ["label", "onClick"])
132481
+ ])
132482
+ ], 16)), [
132483
+ [Qa, p.value]
132484
+ ]);
132485
+ }
132486
+ }), j5e = /* @__PURE__ */ wt({
132487
+ __name: "FilterContainer",
132488
+ setup(t) {
132489
+ return (e, n) => (O(), ne(y6e, N({
132490
+ fields: e.$attrs.fields
132491
+ }, e.$attrs), {
132492
+ field: Me(({ field: r, fieldName: a }) => [
132493
+ ge(E6e, N(r, {
132494
+ "field-data-key": r.fieldDataKey ?? "key",
132495
+ "field-label": r.label,
132496
+ "field-name": a,
132497
+ label: r.buttonLabel,
132498
+ mandatory: !1,
132499
+ params: r.params,
132500
+ "show-optional-text": !1,
132501
+ "use-validator": ""
132502
+ }), null, 16, ["field-data-key", "field-label", "field-name", "label", "params"])
132503
+ ]),
132504
+ _: 1
132505
+ }, 16, ["fields"]));
132506
+ }
132507
+ }), T6e = { class: "w-full" }, X5e = /* @__PURE__ */ wt({
132508
+ __name: "InputSearch",
132509
+ emits: ["search"],
132510
+ setup(t, { emit: e }) {
132511
+ const n = e, r = nt(), a = nt(), i = (s) => {
132512
+ r.value = s.target.value || void 0, a.value = s.target.value || void 0;
132513
+ };
132514
+ return (s, o) => {
132515
+ var l, c;
132516
+ return O(), K("form", {
132517
+ class: ht([
132518
+ "text-xs flex gap-1 h-[34px] px-[21px] items-center",
132519
+ "rounded-[18px] bg-general-50"
132520
+ ]),
132521
+ onSubmit: o[1] || (o[1] = In((u) => n("search", r.value), ["prevent"]))
132522
+ }, [
132523
+ re("div", T6e, [
132524
+ ge(G(lu), {
132525
+ class: ht([
132526
+ "h-auto !shadow-none !p-0 !text-general-500 placeholder:text-general-200 !bg-general-50"
132527
+ ]),
132528
+ "model-value": a.value,
132529
+ onInput: i,
132530
+ autocomplete: "off",
132531
+ placeholder: "Search asset"
132532
+ }, null, 8, ["model-value"])
132533
+ ]),
132534
+ ge(Lt, {
132535
+ class: ht([
132536
+ "text-md !text-general-400 !w-4 !h-4",
132537
+ { hidden: (l = a.value) == null ? void 0 : l.length }
132538
+ ]),
132539
+ icon: "search"
132540
+ }, null, 8, ["class"]),
132541
+ ge(Lt, {
132542
+ class: ht([
132543
+ "text-md !text-general-400 !w-4 !h-4",
132544
+ { hidden: !((c = a.value) != null && c.length) }
132545
+ ]),
132546
+ onClick: o[0] || (o[0] = (u) => a.value = void 0),
132547
+ "data-ts-section": "reset-filter-icon",
132548
+ icon: "close"
132549
+ }, null, 8, ["class"])
132550
+ ], 32);
132551
+ };
132552
+ }
132553
+ }), uP = (t) => {
132554
+ if (t instanceof J$)
132555
+ return t.response ? "DEVICE_NOT_CONNECTED" : "DRIVER_NOT_FOUND";
132556
+ if (t instanceof Error && ["NOT_SUPPORTED_SYSTEM", "HARDWARE_NOT_SYNCHRONIZED"].includes(
132557
+ t.message
132558
+ ))
132559
+ return t.message;
132560
+ };
132561
+ let Uf;
132562
+ const C6e = new Uint8Array(16);
132563
+ function A6e() {
132564
+ if (!Uf && (Uf = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Uf))
132565
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
132566
+ return Uf(C6e);
132567
+ }
132568
+ const za = [];
132569
+ for (let t = 0; t < 256; ++t)
132570
+ za.push((t + 256).toString(16).slice(1));
132571
+ function x6e(t, e = 0) {
132572
+ return za[t[e + 0]] + za[t[e + 1]] + za[t[e + 2]] + za[t[e + 3]] + "-" + za[t[e + 4]] + za[t[e + 5]] + "-" + za[t[e + 6]] + za[t[e + 7]] + "-" + za[t[e + 8]] + za[t[e + 9]] + "-" + za[t[e + 10]] + za[t[e + 11]] + za[t[e + 12]] + za[t[e + 13]] + za[t[e + 14]] + za[t[e + 15]];
132573
+ }
132574
+ const O6e = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), PR = {
132575
+ randomUUID: O6e
132576
+ };
132577
+ function qb(t, e, n) {
132578
+ if (PR.randomUUID && !t)
132579
+ return PR.randomUUID();
132580
+ t = t || {};
132581
+ const r = t.random || (t.rng || A6e)();
132582
+ return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, x6e(r);
132583
+ }
132584
+ const dP = () => window.devices ?? [], w6e = () => window.device ?? { RFID: null, QR: null }, FR = rt(dP()), BR = rt(w6e()), fP = () => {
132585
+ const t = (r) => {
132586
+ window.devices = r, n();
132587
+ }, e = (r) => {
132588
+ window.device = r, BR.value = r;
132589
+ }, n = () => {
132590
+ FR.value = dP();
132591
+ };
132592
+ return {
132593
+ devices: FR,
132594
+ device: BR,
132595
+ saveDevices: t,
132596
+ setDevice: e,
132597
+ loadDevices: n
132598
+ };
132599
+ }, pP = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBuPW51bGwsdD1udWxsLGE7c2VsZi5vbm1lc3NhZ2U9cz0+e2NvbnN0IGU9cy5kYXRhO3N3aXRjaChlLmNvbW1hbmQpe2Nhc2Uic3luYyI6dShlKTticmVhaztjYXNlImNvbm5lY3QiOmwoZSk7YnJlYWs7Y2FzZSJzY2FuIjptKGUpO2JyZWFrO2Nhc2Uic3RvcHNjYW4iOmQoZSk7YnJlYWt9fTtjb25zdCByPXM9Pnt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iIsdXNlcklkOnMsc291cmNlOiJhcHAifSxldmVudDoicmVhZGVyIn0pKSxwb3N0TWVzc2FnZSh7c3RhdHVzOiJzY2FuX3N0b3BwZWQifSksY29uc29sZS5pbmZvKCJTY2FuIFByb2Nlc3MgU3RvcHBlZCEiKSl9fSkoKTsK", R6e = (t) => Uint8Array.from(atob(t), (e) => e.charCodeAt(0)), UR = typeof self < "u" && self.Blob && new Blob([R6e(pP)], { type: "text/javascript;charset=utf-8" });
132600
+ function mP(t) {
132601
+ let e;
132602
+ try {
132603
+ if (e = UR && (self.URL || self.webkitURL).createObjectURL(UR), !e) throw "";
132604
+ const n = new Worker(e, {
132605
+ name: t == null ? void 0 : t.name
132606
+ });
132607
+ return n.addEventListener("error", () => {
132608
+ (self.URL || self.webkitURL).revokeObjectURL(e);
132609
+ }), n;
132610
+ } catch {
132611
+ return new Worker(
132612
+ "data:text/javascript;base64," + pP,
132613
+ {
132614
+ name: t == null ? void 0 : t.name
132615
+ }
132616
+ );
132617
+ } finally {
132618
+ e && (self.URL || self.webkitURL).revokeObjectURL(e);
132619
+ }
132620
+ }
132621
+ const hP = /* @__PURE__ */ wt({
132622
+ __name: "HardwareSync",
132623
+ props: {
132624
+ visible: { type: Boolean },
132625
+ errorCode: {},
132626
+ searchBy: {},
132627
+ bulk: { type: Boolean },
132628
+ withoutScanBtn: { type: Boolean }
132629
+ },
132630
+ emits: ["update:visible", "scan"],
132631
+ setup(t, { emit: e }) {
132632
+ const n = t, r = e, a = a3();
132633
+ Pn(() => {
132634
+ de();
132635
+ });
132636
+ const {
132637
+ device: i,
132638
+ devices: s,
132639
+ saveDevices: o,
132640
+ setDevice: l,
132641
+ loadDevices: c
132642
+ } = fP(), u = {
132643
+ label: "None",
132644
+ device: void 0
132645
+ }, d = nt(!1), p = nt(u), m = nt(u), g = (te) => {
132646
+ var ie, Ue;
132647
+ if ((ie = s.value) != null && ie.length) {
132648
+ const ue = (Ue = s.value) == null ? void 0 : Ue.filter((ze) => ze[te]).map((ze) => ({
132649
+ label: `${ze.name ?? ze.jenisDevice + " - " + ze.serialNumber}`,
132650
+ device: ze
132651
+ }));
132652
+ return ue.length ? ue : [];
133029
132653
  }
133030
- })(), x = () => {
133031
- if (n.static) {
133032
- const M = {};
133033
- n.fields.forEach((I) => {
133034
- Mu(
133035
- M,
133036
- C(I),
133037
- A(I)
133038
- );
133039
- }), o(M);
132654
+ return p.value = u, m.value = u, [];
132655
+ }, _ = Ye(() => g("rfidScan")), v = Ye(() => g("qrScan")), b = Ye(
132656
+ () => n.errorCode === "NOT_SUPPORTED_SYSTEM"
132657
+ ), E = Ye(() => n.searchBy === "RFID" && p.value.device), T = Ye(() => n.searchBy === "QR" && m.value.device), y = Ye(() => !!n.searchBy && n.errorCode !== "HARDWARE_NOT_SYNCHRONIZED"), C = async (te) => {
132658
+ try {
132659
+ o(te);
132660
+ const ie = _.value.some(
132661
+ (ue) => {
132662
+ var ze, ve, Ee;
132663
+ return ((ze = ue == null ? void 0 : ue.device) == null ? void 0 : ze.serialNumber) === ((Ee = (ve = p.value) == null ? void 0 : ve.device) == null ? void 0 : Ee.serialNumber);
132664
+ }
132665
+ ), Ue = v.value.some(
132666
+ (ue) => {
132667
+ var ze, ve, Ee;
132668
+ return ((ze = ue == null ? void 0 : ue.device) == null ? void 0 : ze.serialNumber) === ((Ee = (ve = m.value) == null ? void 0 : ve.device) == null ? void 0 : Ee.serialNumber);
132669
+ }
132670
+ );
132671
+ p.value = ie ? p.value : _.value[0] ?? u, m.value = Ue ? m.value : v.value[0] ?? u, J();
132672
+ } catch (ie) {
132673
+ A.value = P(uP(ie));
132674
+ } finally {
132675
+ d.value = !1;
133040
132676
  }
133041
- }, k = (M, I) => {
133042
- switch (M.type) {
133043
- case "rangenumber":
133044
- return M.field ? n.static ? `${M.field}.value.${I}` : `${M.field}` : n.static ? `${M.fields[I]}.value` : M.fields[I];
133045
- case "multiselect":
133046
- case "dropdown":
133047
- case "calendar":
133048
- case "category":
133049
- case "group":
133050
- return n.static ? `${M.field}.value` : `${M.field}`;
132677
+ }, A = rt(), x = nt({
132678
+ title: "The detected OS is not compatible",
132679
+ detail: "Please check the OS compatibility list on our product information page."
132680
+ }), k = nt({
132681
+ title: "Scanner Disconnected",
132682
+ detail: "Your scanner has been disconnected. Please reconnect it or select another device from the list."
132683
+ }), M = nt({
132684
+ title: "Scanner driver not found",
132685
+ detail: "The scanner driver may not be running or installed correctly on your device. Please contact your administrator."
132686
+ }), I = nt({
132687
+ title: "Scanner not detected",
132688
+ detail: "The scanner is either not detected or not identified by our system."
132689
+ });
132690
+ nt({
132691
+ title: "Scanner is not registered",
132692
+ detail: "The scanner is not registered in your company."
132693
+ });
132694
+ const P = (te) => {
132695
+ switch (te ?? n.errorCode) {
132696
+ case "DEVICE_NOT_CONNECTED":
132697
+ return I.value;
132698
+ case "DRIVER_NOT_FOUND":
132699
+ return M.value;
132700
+ case "NOT_SUPPORTED_SYSTEM":
132701
+ return x.value;
132702
+ case "DEVICE_DISCONNECTED":
132703
+ return k.value;
132704
+ default:
132705
+ return;
133051
132706
  }
132707
+ }, J = () => {
132708
+ l({
132709
+ RFID: p.value.device,
132710
+ QR: m.value.device
132711
+ });
132712
+ }, de = () => {
132713
+ c(), i.value.RFID ? p.value = {
132714
+ label: i.value.RFID.name,
132715
+ device: i.value.RFID
132716
+ } : _.value.length && (p.value = _.value[0] ?? u), v.value.length && (m.value = v.value[0] ?? u), J();
132717
+ }, Le = () => {
132718
+ r("update:visible", !1), r("scan");
132719
+ }, oe = () => {
132720
+ var te;
132721
+ d.value = !0, A.value = void 0, window.scannerWorker.onmessage = ({ data: ie }) => {
132722
+ var Ue;
132723
+ if (ie.status === "synced") {
132724
+ const ue = ((Ue = ie == null ? void 0 : ie.data) == null ? void 0 : Ue.deviceList) ?? [];
132725
+ C(ue);
132726
+ const { error: ze } = (ie == null ? void 0 : ie.data) ?? {};
132727
+ ze === "Driver not connected to server" ? (d.value = !1, A.value = P("DRIVER_NOT_FOUND")) : ue.length || (d.value = !1, A.value = P("DEVICE_NOT_CONNECTED"));
132728
+ } else ie.status === "error_sync" && (d.value = !1, C([]), a.add({ message: "Failed to connecting scanner", severity: "error" }));
132729
+ }, window.scannerWorker.postMessage({
132730
+ command: "sync",
132731
+ userId: (te = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : te._id
132732
+ });
132733
+ }, Te = () => {
132734
+ window.scannerWorker ?? (window.scannerWorker = new mP());
133052
132735
  };
133053
- return Mt(() => n.fields, E), (M, I) => tn((O(), K("form", N({
133054
- ref_key: "container",
133055
- ref: d
133056
- }, M.$preset.filtercontainer.root, {
133057
- style: `grid-template-columns: repeat(${M.fieldsPerRow}, 1fr)`,
133058
- onSubmit: I[0] || (I[0] = In(
133059
- //@ts-ignore
133060
- (...P) => G(y) && G(y)(...P),
133061
- ["prevent"]
133062
- )),
133063
- "data-wv-name": "filtercontainer"
133064
- }), [
133065
- (O(!0), K(lt, null, en(M.fields, (P) => (O(), K(lt, {
133066
- key: JSON.stringify(P) + m.value
133067
- }, [
133068
- P.type == "rangenumber" ? (O(), ne(jL, N({
133069
- key: 0,
133070
- ref_for: !0
133071
- }, P, {
133072
- mandatory: !1,
133073
- "max-field-name": k(P, 1),
133074
- "min-field-name": k(P, 0),
133075
- "show-optional-text": !1,
133076
- "use-validator": ""
133077
- }), null, 16, ["max-field-name", "min-field-name"])) : P.type == "multiselect" ? (O(), ne(eP, N({
133078
- key: 1,
133079
- ref_for: !0
133080
- }, P, {
133081
- "field-name": k(P),
133082
- loading: l.value[P.optionField ?? P.field],
133083
- mandatory: !1,
133084
- options: c.value[P.optionField ?? P.field],
133085
- "show-optional-text": !1,
133086
- onShow: (J) => v(
133087
- P.fetchOptionFn,
133088
- P.optionField ?? P.field,
133089
- P.params
133090
- ),
133091
- "option-label": "label",
133092
- "option-value": "value",
133093
- "use-validator": ""
133094
- }), null, 16, ["field-name", "loading", "options", "onShow"])) : P.type == "dropdown" ? (O(), ne(O2, N({
133095
- key: 2,
133096
- ref_for: !0
133097
- }, P, {
133098
- "field-name": k(P),
133099
- loading: l.value[P.field],
133100
- mandatory: !1,
133101
- options: c.value[P.optionField ?? P.field],
133102
- "show-optional-text": !1,
133103
- onShow: (J) => v(
133104
- P.fetchOptionFn,
133105
- P.optionField ?? P.field,
133106
- P.params
133107
- ),
133108
- "option-label": "label",
133109
- "option-value": "value",
133110
- "use-validator": ""
133111
- }), null, 16, ["field-name", "loading", "options", "onShow"])) : P.type === "calendar" ? (O(), ne(iP, N({
133112
- key: 3,
133113
- ref_for: !0
133114
- }, P, {
133115
- "field-name": k(P),
133116
- mandatory: !1,
133117
- "show-optional-text": !1,
133118
- "selection-mode": "range",
133119
- "use-validator": ""
133120
- }), null, 16, ["field-name"])) : $e(M.$slots, "field", {
133121
- key: 4,
133122
- field: P,
133123
- fieldName: k(P)
133124
- })
133125
- ], 64))), 128)),
133126
- re("div", D6e, [
133127
- ge(Qt, {
133128
- label: G(a).clearFieldText,
133129
- onClick: T,
133130
- "data-wv-section": "clearbutton",
132736
+ return Mt(
132737
+ () => n.visible,
132738
+ (te) => {
132739
+ te && (Te(), A.value = P(), de(), d.value = !1);
132740
+ }
132741
+ ), (te, ie) => (O(), ne(A0, {
132742
+ closable: !y.value,
132743
+ "header-class": [
132744
+ {
132745
+ "flex !gap-1 !items-center !justify-center !text-sm !font-bold !leading-[18px] tracking-[0.02em] [&>div]:hidden": y.value
132746
+ }
132747
+ ],
132748
+ visible: te.visible,
132749
+ "onUpdate:visible": ie[3] || (ie[3] = (Ue) => te.$emit("update:visible", Ue)),
132750
+ class: "w-[400px]",
132751
+ "content-class": "!overflow-y-visible",
132752
+ "footer-class": "!gap-1",
132753
+ header: "Hardware Synchronize",
132754
+ modal: ""
132755
+ }, Ma({
132756
+ footer: Me(() => [
132757
+ y.value ? (O(), ne(Qt, {
132758
+ key: 0,
132759
+ onClick: ie[2] || (ie[2] = (Ue) => te.$emit("update:visible", !1)),
132760
+ label: "Close",
132761
+ severity: "secondary",
133131
132762
  text: ""
133132
- }, null, 8, ["label"]),
132763
+ })) : fe("", !0),
132764
+ b.value ? fe("", !0) : (O(), K(lt, { key: 1 }, [
132765
+ E.value && !n.withoutScanBtn ? (O(), ne(Qt, {
132766
+ key: 0,
132767
+ onClick: Le,
132768
+ icon: "rfid",
132769
+ label: "Scan RFID"
132770
+ })) : fe("", !0),
132771
+ T.value && !n.withoutScanBtn ? (O(), ne(Qt, {
132772
+ key: 1,
132773
+ onClick: Le,
132774
+ icon: "qr",
132775
+ label: "Scan QR"
132776
+ })) : fe("", !0)
132777
+ ], 64))
132778
+ ]),
132779
+ default: Me(() => [
132780
+ A.value ? (O(), ne(r6e, {
132781
+ key: 0,
132782
+ class: ht(["p-[9.52px] transition"]),
132783
+ message: A.value.detail,
132784
+ removable: !1,
132785
+ "show-icon": !1,
132786
+ title: A.value.title,
132787
+ "message-wrapper-class": "text-[11px] leading-[14px] tracking-[0.02em]",
132788
+ severity: "danger"
132789
+ }, null, 8, ["message", "title"])) : fe("", !0),
133133
132790
  ge(Qt, {
133134
- label: G(a).applyText,
133135
- onClick: G(y),
133136
- "data-wv-section": "applybutton",
133137
- severity: "success"
133138
- }, null, 8, ["label", "onClick"])
133139
- ])
133140
- ], 16)), [
133141
- [Qa, p.value]
133142
- ]);
133143
- }
133144
- }), Z5e = /* @__PURE__ */ wt({
133145
- __name: "FilterContainer",
133146
- setup(t) {
133147
- return (e, n) => (O(), ne(k6e, N({
133148
- fields: e.$attrs.fields
133149
- }, e.$attrs), {
133150
- field: Me(({ field: r, fieldName: a }) => [
133151
- ge(N6e, N(r, {
133152
- "field-data-key": r.fieldDataKey ?? "key",
133153
- "field-label": r.label,
133154
- "field-name": a,
133155
- label: r.buttonLabel,
133156
- mandatory: !1,
133157
- params: r.params,
133158
- "show-optional-text": !1,
133159
- "use-validator": ""
133160
- }), null, 16, ["field-data-key", "field-label", "field-name", "label", "params"])
132791
+ disabled: b.value,
132792
+ loading: d.value,
132793
+ onClick: oe,
132794
+ icon: "refresh",
132795
+ label: "Sync",
132796
+ "loading-icon": "refresh",
132797
+ outlined: ""
132798
+ }, null, 8, ["disabled", "loading"]),
132799
+ re("section", {
132800
+ class: ht([
132801
+ "grid grid-cols-2 gap-3 justify-start w-full",
132802
+ { "opacity-60 pointer-events-none": b.value }
132803
+ ]),
132804
+ "data-ts-section": "scanner-list"
132805
+ }, [
132806
+ ge(O2, {
132807
+ modelValue: p.value,
132808
+ "onUpdate:modelValue": [
132809
+ ie[0] || (ie[0] = (Ue) => p.value = Ue),
132810
+ J
132811
+ ],
132812
+ options: _.value,
132813
+ label: "RFID Scanner",
132814
+ "option-label": "label"
132815
+ }, null, 8, ["modelValue", "options"]),
132816
+ ge(O2, {
132817
+ modelValue: m.value,
132818
+ "onUpdate:modelValue": [
132819
+ ie[1] || (ie[1] = (Ue) => m.value = Ue),
132820
+ J
132821
+ ],
132822
+ options: v.value,
132823
+ label: "QR Scanner",
132824
+ "option-label": "label"
132825
+ }, null, 8, ["modelValue", "options"])
132826
+ ], 2)
133161
132827
  ]),
133162
- _: 1
133163
- }, 16, ["fields"]));
132828
+ _: 2
132829
+ }, [
132830
+ y.value ? {
132831
+ name: "header",
132832
+ fn: Me(() => {
132833
+ var Ue;
132834
+ return [
132835
+ ge(Lt, {
132836
+ icon: (Ue = te.searchBy) == null ? void 0 : Ue.toLowerCase()
132837
+ }, null, 8, ["icon"]),
132838
+ re("h3", null, "Scan " + We(te.searchBy), 1)
132839
+ ];
132840
+ }),
132841
+ key: "0"
132842
+ } : void 0
132843
+ ]), 1032, ["closable", "header-class", "visible"]));
133164
132844
  }
133165
- }), M6e = { class: "w-full" }, J5e = /* @__PURE__ */ wt({
133166
- __name: "InputSearch",
133167
- emits: ["search"],
133168
- setup(t, { emit: e }) {
133169
- const n = e, r = nt(), a = nt(), i = (s) => {
133170
- r.value = s.target.value || void 0, a.value = s.target.value || void 0;
133171
- };
133172
- return (s, o) => {
133173
- var l, c;
133174
- return O(), K("form", {
133175
- class: ht([
133176
- "text-xs flex gap-1 h-[34px] px-[21px] items-center",
133177
- "rounded-[18px] bg-general-50"
133178
- ]),
133179
- onSubmit: o[1] || (o[1] = In((u) => n("search", r.value), ["prevent"]))
133180
- }, [
133181
- re("div", M6e, [
133182
- ge(G(lu), {
133183
- class: ht([
133184
- "h-auto !shadow-none !p-0 !text-general-500 placeholder:text-general-200 !bg-general-50"
133185
- ]),
133186
- "model-value": a.value,
133187
- onInput: i,
133188
- autocomplete: "off",
133189
- placeholder: "Search asset"
133190
- }, null, 8, ["model-value"])
132845
+ }), I6e = { class: "flex gap-2 items-center" }, N6e = { class: "flex gap-0.5 items-center leading-4" }, D6e = { class: "flex gap-5 items-center" }, k6e = /* @__PURE__ */ re("span", null, "do not leave this page", -1), M6e = {
132846
+ key: 1,
132847
+ class: "text-xs font-medium leading-[16.39px] tracking-[0.02em]"
132848
+ }, Z5e = /* @__PURE__ */ wt({
132849
+ __name: "ButtonScan",
132850
+ props: {
132851
+ label: {},
132852
+ icon: {},
132853
+ type: { default: "RFID" },
132854
+ autoSwitch: { type: Boolean },
132855
+ scanValidation: {},
132856
+ modelValue: {},
132857
+ bulk: { type: Boolean },
132858
+ id: {},
132859
+ disabled: { type: Boolean },
132860
+ powerbank: { type: Boolean },
132861
+ labelOnly: { type: Boolean },
132862
+ outlined: { type: Boolean },
132863
+ severity: {},
132864
+ size: { default: void 0 },
132865
+ style: {},
132866
+ class: {},
132867
+ iconPos: {},
132868
+ iconClass: {},
132869
+ tooltip: {},
132870
+ tooltipPos: {},
132871
+ badge: {},
132872
+ badgeClass: {},
132873
+ badgeSeverity: {},
132874
+ loading: { type: Boolean },
132875
+ loadingIcon: {},
132876
+ link: { type: Boolean },
132877
+ raised: { type: Boolean },
132878
+ rounded: { type: Boolean },
132879
+ text: { type: Boolean },
132880
+ plain: { type: Boolean }
132881
+ },
132882
+ emits: ["update:modelValue", "connect", "connected", "scan", "stop", "error", "beforeStartScan"],
132883
+ setup(t, { expose: e, emit: n }) {
132884
+ const r = t, a = n;
132885
+ J1(() => {
132886
+ ze();
132887
+ });
132888
+ const i = a3(), { devices: s, device: o, saveDevices: l, setDevice: c } = fP(), u = nt(!1), d = nt(!1), p = nt(!1), m = nt(!1), g = nt(!1), _ = nt(!1), v = nt(), b = nt(0), E = nt(r.type ?? "RFID"), T = [], y = Ye(
132889
+ () => E.value === "RFID" ? "RFID_Scanning" : "QR_Scanning"
132890
+ ), C = Ye(
132891
+ () => E.value === "RFID" ? "RFID_Connecting" : "QR_Connecting"
132892
+ );
132893
+ Ye(() => `The scanner could not identify the ${E.value} code. It may be damaged or improperly positioned. Please check the code and try again.`);
132894
+ const A = () => {
132895
+ window.scannerWorker ?? (window.scannerWorker = new mP());
132896
+ }, x = () => {
132897
+ const { serialNumber: xe = "" } = o.value[E.value] ?? {};
132898
+ return xe;
132899
+ }, k = async () => {
132900
+ try {
132901
+ A(), await M(), u.value = !0;
132902
+ } catch (xe) {
132903
+ console.error(xe), u.value = !1;
132904
+ }
132905
+ }, M = async () => {
132906
+ var xe;
132907
+ try {
132908
+ if (!ve())
132909
+ throw new Error("NOT_SUPPORTED_SYSTEM");
132910
+ if (a("connect"), !s.value.length || !o.value[E.value])
132911
+ throw new Error("HARDWARE_NOT_SYNCHRONIZED");
132912
+ i.add({
132913
+ customMessage: !0,
132914
+ message: E.value === "QR" ? "Connecting QR Scanner..." : "Connecting RFID Scanner...",
132915
+ severity: "info",
132916
+ life: 0,
132917
+ group: C.value
132918
+ }), p.value = !0;
132919
+ const me = () => {
132920
+ a("connected", o.value[E.value]), setTimeout(() => {
132921
+ I();
132922
+ }, 0);
132923
+ };
132924
+ window.scannerWorker.onmessage = ({ data: Ne }) => {
132925
+ var B;
132926
+ if (Ne.status === "connection_established")
132927
+ try {
132928
+ const { error: q } = (Ne == null ? void 0 : Ne.data) ?? {}, Y = ((B = Ne == null ? void 0 : Ne.data) == null ? void 0 : B.deviceList) ?? [], H = o.value[r.type], le = Y.some(
132929
+ (Q) => Q.serialNumber === (H == null ? void 0 : H.serialNumber)
132930
+ );
132931
+ if (Y.length && le)
132932
+ me();
132933
+ else {
132934
+ if (q === "Driver not connected to server")
132935
+ throw new Error("DRIVER_NOT_FOUND");
132936
+ if (!Y.length)
132937
+ throw new Error("DEVICE_NOT_CONNECTED");
132938
+ }
132939
+ i.removeGroup(C.value);
132940
+ } catch (q) {
132941
+ P(q);
132942
+ }
132943
+ else Ne.status === "connection_reused" ? me() : Ne.status === "error_connecting" && (i.removeGroup(C.value), i.add({
132944
+ customMessage: !0,
132945
+ message: "Scanner connection failed",
132946
+ severity: "error"
132947
+ }));
132948
+ }, window.scannerWorker.postMessage({
132949
+ command: "connect",
132950
+ userId: (xe = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : xe._id
132951
+ });
132952
+ } catch (me) {
132953
+ P(me);
132954
+ }
132955
+ }, I = (xe = !1, me = !1) => {
132956
+ var B;
132957
+ _.value = !1, i.removeGroup(C.value), localStorage.devmode || (window.addEventListener("blur", ue), window.addEventListener("beforeunload", ue));
132958
+ const Ne = o.value[E.value];
132959
+ if (Ne) {
132960
+ let q = "";
132961
+ r.bulk ? q = `bulkscan-${E.value.toLowerCase()}` : q = `scan-${E.value.toLowerCase()}`, window.scannerWorker.onmessage = async ({ data: Y }) => {
132962
+ var H;
132963
+ if (Y.status === "scan_started")
132964
+ me || (b.value++, setTimeout(() => {
132965
+ i.add({
132966
+ customMessage: !0,
132967
+ message: "scanning",
132968
+ severity: "info",
132969
+ life: 0,
132970
+ group: y.value
132971
+ });
132972
+ }, 0));
132973
+ else if (Y.status === "scanned") {
132974
+ const { code: le, error: Q, deviceList: Z } = (Y == null ? void 0 : Y.data) ?? {};
132975
+ if (Q) return J(Q, Z);
132976
+ if (le) {
132977
+ if (["scan-rfid", "scan-qr"].includes(q)) {
132978
+ g.value = !!r.scanValidation;
132979
+ const Ce = await ((H = r.scanValidation) == null ? void 0 : H.call(
132980
+ r,
132981
+ E.value,
132982
+ le,
132983
+ x()
132984
+ )) ?? !0;
132985
+ if (g.value = !1, Ce)
132986
+ r.autoSwitch ? (Te(), Ue()) : te(!0);
132987
+ else {
132988
+ _.value || I(!1, !0);
132989
+ return;
132990
+ }
132991
+ }
132992
+ T.includes(le) || (a("update:modelValue", le), a("scan", le, x()), r.bulk && T.push(le));
132993
+ }
132994
+ } else Y.status === "scan_stopped" ? te(!0) : Y.status === "scan_error" && de(Y.error);
132995
+ }, window.scannerWorker.onerror = de, window.scannerWorker.postMessage({
132996
+ command: "scan",
132997
+ scanCommand: q,
132998
+ userId: (B = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : B._id,
132999
+ source: "app",
133000
+ jenisDevice: Ne.jenisDevice,
133001
+ serialNumber: Ne.serialNumber,
133002
+ newConnection: xe
133003
+ });
133004
+ }
133005
+ }, P = (xe) => {
133006
+ c({ RFID: void 0, QR: void 0 }), m.value = !0, v.value = xe instanceof Error ? xe.message : uP(xe), p.value = !1, a("error", xe), i.removeGroup(C.value);
133007
+ }, J = (xe, me = []) => {
133008
+ let Ne = "";
133009
+ v.value = void 0, ie(!0), xe === "Time out" ? Ne = "The scanning process has timed out. Please try again." : xe === "Driver not connected to server" ? v.value = "DRIVER_NOT_FOUND" : xe === "Device disconnected" && (v.value = "DEVICE_DISCONNECTED", l(me), c({ RFID: void 0, QR: void 0 })), a("error", xe), m.value = !!v.value, Ne && i.add({
133010
+ customMessage: !0,
133011
+ message: Ne,
133012
+ error: xe,
133013
+ life: 6e3,
133014
+ group: y.value
133015
+ });
133016
+ }, de = (xe) => {
133017
+ ie(!0), a("error", xe), i.add({
133018
+ customMessage: !0,
133019
+ message: "An unexpected error occurred during scanning. Please try again, and if the issue persists, contact your administrator for assistance.",
133020
+ error: xe,
133021
+ life: 6e3,
133022
+ group: y.value
133023
+ });
133024
+ }, Le = () => {
133025
+ window.Cypress ? oe() : k();
133026
+ }, oe = () => {
133027
+ i.add({
133028
+ customMessage: !0,
133029
+ message: "Connecting device...",
133030
+ severity: "info",
133031
+ life: 3e3,
133032
+ group: C.value
133033
+ }), setTimeout(async () => {
133034
+ var xe;
133035
+ if (a("connect"), a("connected", {
133036
+ jenisDevice: "Handheld",
133037
+ serialNumber: qb(),
133038
+ API: "v2",
133039
+ rfidScan: !0,
133040
+ qrScan: !0,
133041
+ name: "Device Test"
133042
+ }), r.bulk)
133043
+ a("scan", qb(), "serialNumber");
133044
+ else {
133045
+ const me = qb();
133046
+ g.value = !!r.scanValidation;
133047
+ const Ne = await ((xe = r.scanValidation) == null ? void 0 : xe.call(
133048
+ r,
133049
+ E.value,
133050
+ me,
133051
+ x()
133052
+ )) ?? !0;
133053
+ g.value = !1, Ne && (a("scan", me, "serialNumber"), te());
133054
+ }
133055
+ }, 100);
133056
+ }, Te = () => {
133057
+ i.removeGroup("RFID_Scanning"), i.removeGroup("QR_Scanning");
133058
+ }, te = (xe = !1) => {
133059
+ Te(), p.value = !1, ze(), xe && a("stop"), T.splice(0);
133060
+ }, ie = (xe = !1) => {
133061
+ var me;
133062
+ window.scannerWorker.onmessage = null, window.scannerWorker.postMessage({
133063
+ command: "stopscan",
133064
+ userId: (me = JSON.parse(localStorage.getItem("user") ?? "{}")) == null ? void 0 : me._id
133065
+ }), te(xe), _.value = !0, u.value = !1;
133066
+ }, Ue = () => {
133067
+ r.bulk || (o.value[E.value] ? (E.value = E.value === "QR" ? "RFID" : "QR", I()) : (te(), m.value = !0, v.value = "HARDWARE_NOT_SYNCHRONIZED", p.value = !1));
133068
+ }, ue = (xe) => {
133069
+ d.value = !0, ie(!0), xe.preventDefault();
133070
+ }, ze = () => {
133071
+ window.removeEventListener("blur", ue), window.removeEventListener("beforeunload", ue);
133072
+ }, ve = () => {
133073
+ const { userAgent: xe } = navigator;
133074
+ return xe.includes("Windows");
133075
+ }, Ee = Ye(() => {
133076
+ if (!r.labelOnly)
133077
+ return r.icon ? r.icon : r.autoSwitch ? "qr-scan" : E.value === "QR" ? "qr" : "rfid";
133078
+ }), Ae = Ye(() => r.label ? r.label : r.autoSwitch ? "SCAN TAG" : E.value === "QR" ? "Scan QR" : "Scan RFID");
133079
+ return e({
133080
+ onBeforeStartScan: Le,
133081
+ startScan: k,
133082
+ stopScan: ie
133083
+ }), (xe, me) => (O(), K(lt, null, [
133084
+ ge(G(Qt), N(xe.$attrs, {
133085
+ class: [
133086
+ {
133087
+ "[&_i]:w-2 [&_i]:h-2": xe.type === "QR",
133088
+ "[&_i]:w-[11px] [&_i]:h-[7px]": xe.type === "RFID"
133089
+ },
133090
+ "!px-1.5"
133091
+ ],
133092
+ disabled: r.disabled,
133093
+ icon: Ee.value,
133094
+ label: Ae.value,
133095
+ outlined: r.outlined,
133096
+ severity: r.severity,
133097
+ size: r.size,
133098
+ onClick: Le
133099
+ }), null, 16, ["class", "disabled", "icon", "label", "outlined", "severity", "size"]),
133100
+ ge(hP, {
133101
+ visible: m.value,
133102
+ "onUpdate:visible": me[0] || (me[0] = (Ne) => m.value = Ne),
133103
+ bulk: xe.bulk,
133104
+ "error-code": v.value,
133105
+ "search-by": E.value,
133106
+ onScan: Le
133107
+ }, null, 8, ["visible", "bulk", "error-code", "search-by"]),
133108
+ u.value ? (O(), ne(G(Gf), {
133109
+ key: 0,
133110
+ "base-z-index": 9983,
133111
+ group: C.value,
133112
+ icon: "info"
133113
+ }, null, 8, ["group"])) : fe("", !0),
133114
+ u.value ? (O(), ne(G(Gf), {
133115
+ key: 1,
133116
+ "base-z-index": 9997,
133117
+ class: "!absolute !bottom-[80px] !h-max",
133118
+ group: "scan-error-validation"
133119
+ })) : fe("", !0),
133120
+ u.value ? (O(), ne(G(Gf), {
133121
+ key: b.value,
133122
+ "base-z-index": 9984,
133123
+ group: y.value,
133124
+ class: "[&_[data-pc-section=buttoncontainer]]"
133125
+ }, {
133126
+ message: Me(({ message: Ne }) => [
133127
+ re("div", {
133128
+ class: ht(
133129
+ Ne.detail == "scanning" ? "w-full -mr-8 z-10 flex gap-2 justify-between items-center text-general-800 text-xs font-normal" : "w-full"
133130
+ )
133131
+ }, [
133132
+ Ne.detail === "scanning" ? (O(), K(lt, { key: 0 }, [
133133
+ re("section", I6e, [
133134
+ ge(G(Lt), {
133135
+ class: "animate-spin text-base",
133136
+ icon: "loader-4"
133137
+ }),
133138
+ re("span", N6e, [
133139
+ E.value === "RFID" ? (O(), K(lt, { key: 0 }, [
133140
+ ge(G(Lt), {
133141
+ class: "text-base !w-4 !h-4",
133142
+ icon: "rfid"
133143
+ }),
133144
+ dn(" " + We(g.value ? "Validating RFID..." : "RFID Scanning..."), 1)
133145
+ ], 64)) : (O(), K(lt, { key: 1 }, [
133146
+ ge(G(Lt), {
133147
+ class: "text-sm",
133148
+ icon: "qr"
133149
+ }),
133150
+ dn(" " + We(g.value ? "Validating QR..." : "QR Scanning..."), 1)
133151
+ ], 64))
133152
+ ])
133153
+ ]),
133154
+ re("section", D6e, [
133155
+ k6e,
133156
+ ge(G(Qt), {
133157
+ onClick: me[1] || (me[1] = (B) => ie(!0)),
133158
+ label: "Stop Scan",
133159
+ severity: "danger"
133160
+ })
133161
+ ])
133162
+ ], 64)) : (O(), K("span", M6e, We(Ne.detail), 1))
133163
+ ], 2)
133191
133164
  ]),
133192
- ge(Lt, {
133193
- class: ht([
133194
- "text-md !text-general-400 !w-4 !h-4",
133195
- { hidden: (l = a.value) == null ? void 0 : l.length }
133196
- ]),
133197
- icon: "search"
133198
- }, null, 8, ["class"]),
133199
- ge(Lt, {
133165
+ _: 1
133166
+ }, 8, ["group"])) : fe("", !0),
133167
+ ge(G(Cy), {
133168
+ visible: d.value,
133169
+ "onUpdate:visible": me[2] || (me[2] = (Ne) => d.value = Ne),
133170
+ header: `${E.value} SCAN STOPPED`,
133171
+ onConfirm: me[3] || (me[3] = (Ne) => (d.value = !1, Le())),
133172
+ "confirm-label": "Continue",
133173
+ message: "The scan process was interrupted because you want to leave this window.",
133174
+ severity: "danger"
133175
+ }, null, 8, ["visible", "header"]),
133176
+ (O(), ne(ES, { to: "body" }, [
133177
+ p.value ? (O(), K("div", {
133178
+ key: 0,
133200
133179
  class: ht([
133201
- "text-md !text-general-400 !w-4 !h-4",
133202
- { hidden: !((c = a.value) != null && c.length) }
133180
+ xe.$preset.dialog.mask({ props: { modal: !0 } }).class,
133181
+ "w-screen h-screen fixed top-0 left-0",
133182
+ "!z-[9982]"
133203
133183
  ]),
133204
- onClick: o[0] || (o[0] = (u) => a.value = void 0),
133205
- "data-ts-section": "reset-filter-icon",
133206
- icon: "close"
133207
- }, null, 8, ["class"])
133208
- ], 32);
133209
- };
133184
+ "data-ts-section": "toast-mask"
133185
+ }, null, 2)) : fe("", !0)
133186
+ ]))
133187
+ ], 64));
133188
+ }
133189
+ }), J5e = /* @__PURE__ */ wt({
133190
+ __name: "ButtonSync",
133191
+ props: {
133192
+ withoutScanBtn: { type: Boolean }
133193
+ },
133194
+ setup(t) {
133195
+ const e = t, n = nt(!1);
133196
+ return (r, a) => (O(), K(lt, null, [
133197
+ ge(Qt, N({
133198
+ onClick: a[0] || (a[0] = (i) => n.value = !0)
133199
+ }, r.$attrs, {
133200
+ icon: "refresh",
133201
+ label: "Sync",
133202
+ outlined: ""
133203
+ }), null, 16),
133204
+ ge(hP, {
133205
+ visible: n.value,
133206
+ "onUpdate:visible": a[1] || (a[1] = (i) => n.value = i),
133207
+ "without-scan-btn": e.withoutScanBtn
133208
+ }, null, 8, ["visible", "without-scan-btn"])
133209
+ ], 64));
133210
133210
  }
133211
133211
  }), L6e = "data:image/svg+xml,%3csvg%20width='125'%20height='125'%20viewBox='0%200%20125%20125'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.25'%20y='0.25'%20width='124.5'%20height='124.5'%20rx='7.75'%20fill='%23EBEAF0'/%3e%3crect%20x='0.25'%20y='0.25'%20width='124.5'%20height='124.5'%20rx='7.75'%20stroke='%23D9DBE9'%20stroke-width='0.5'/%3e%3crect%20x='26'%20y='32'%20width='74'%20height='62'%20fill='url(%23pattern0_7801_14173)'%20fill-opacity='0.25'/%3e%3cdefs%3e%3cpattern%20id='pattern0_7801_14173'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_7801_14173'%20transform='matrix(0.00382482%200%200%200.00458979%200.0059523%200)'/%3e%3c/pattern%3e%3cimage%20id='image0_7801_14173'%20width='747'%20height='215'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAusAAADXCAMAAACUAO/wAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAADNQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAowVGyQAAABF0Uk5TAECAIBBw/7DAYJDgMKDw0FBIfQQ/AAAbK0lEQVR4nO1d6bqjIAy9Lm1ttbbv/7Qz1g1IAgFxQXN+zTf1KuIxHkKWv78ZWU4gK/5SQ3mjbua299AEB8CdRL730LyR0TeT7T02wf4QrguuApoej72H5g3husAGmh7V3kPzxlO4LrDgTFzPhesCC2h63PcemjeE6wIbXtV5uP6i7qR+pOdAFayB5o0zpNx7YL7AX9vqmdyNCNZD8TjFdx/jep3cXQhWxu0MXG/hPTzEpgtMIP665DbW4S289x6S4IiAoj21jVO4lfQRqy5AUAIFkJqD/Zu+ChNsA6BiPnuPyBPAvZ7ayyrYCiUwi3uPyBPAmfTde0SCowJwJTEJUCf+rgq2A9AAaTliwHdJJIyAAvBjpBXVC4b/2ntEgsOiMMlS7z0iL4DP0nPvEQmOC+B1TCpiCkQINHuPSHBcALYkZRnNwcvSVEADqICUttiBXJelqYAGoEtKgh0Er8vSVEAD7iYlJHk/SQswwdYAfEnHww6cSGktrAVbA+iAdEJiQAB+SvpLsD1gpGAyxhF8klJaVwu2BxTsqYgYKGFErgusANYxFREDcwglTUNgBaywkognBsQ4pvKSCvZCA7iehuyF405FfAl2A7CP7d4jYgEmyybyPRLsB1g6K4U1HsyVFY+jwAUoB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/%3e%3c/defs%3e%3c/svg%3e", gc = (t) => {
133212
133212
  const e = [], n = window.location.pathname, r = C0(t);
@@ -133417,7 +133417,7 @@ export {
133417
133417
  E5e as ApproverInfo,
133418
133418
  $l as Badge,
133419
133419
  S5e as BadgeGroup,
133420
- y6e as BaseTree,
133420
+ d6e as BaseTree,
133421
133421
  y5e as Breadcrumb,
133422
133422
  Qt as Button,
133423
133423
  T5e as ButtonBulkAction,
@@ -133426,11 +133426,11 @@ export {
133426
133426
  x5e as ButtonFilter,
133427
133427
  Q5e as ButtonImportExcel,
133428
133428
  sse as ButtonRadio,
133429
- j5e as ButtonScan,
133429
+ Z5e as ButtonScan,
133430
133430
  O5e as ButtonSearch,
133431
- N6e as ButtonSelectTree,
133431
+ E6e as ButtonSelectTree,
133432
133432
  w5e as ButtonSplit,
133433
- X5e as ButtonSync,
133433
+ J5e as ButtonSync,
133434
133434
  R5e as ButtonToggle,
133435
133435
  iP as Calendar,
133436
133436
  I5e as Card,
@@ -133440,17 +133440,17 @@ export {
133440
133440
  A0 as Dialog,
133441
133441
  Cy as DialogConfirm,
133442
133442
  c3e as DialogForm,
133443
- R6e as DialogSelectTree,
133443
+ v6e as DialogSelectTree,
133444
133444
  O2 as Dropdown,
133445
133445
  $be as Editor,
133446
133446
  SEe as FileUpload,
133447
- Z5e as FilterContainer,
133447
+ j5e as FilterContainer,
133448
133448
  m5e as Focus,
133449
133449
  jD as Form,
133450
133450
  Lt as Icon,
133451
133451
  im as Image,
133452
133452
  k5e as ImageCompressor,
133453
- c6e as InlineMessage,
133453
+ r6e as InlineMessage,
133454
133454
  M5e as InputBadge,
133455
133455
  L5e as InputCurrency,
133456
133456
  P5e as InputEmail,
@@ -133458,7 +133458,7 @@ export {
133458
133458
  F5e as InputPassword,
133459
133459
  B5e as InputPhoneNumber,
133460
133460
  jL as InputRangeNumber,
133461
- J5e as InputSearch,
133461
+ X5e as InputSearch,
133462
133462
  f3 as InputText,
133463
133463
  mR as InputURL,
133464
133464
  lSe as InvisibleField,
@@ -133478,7 +133478,7 @@ export {
133478
133478
  nD as ToggleSwitch,
133479
133479
  p5e as Tooltip,
133480
133480
  Y5e as TooltipSpan,
133481
- T6e as Tree,
133481
+ f6e as Tree,
133482
133482
  K5e as UserGroup,
133483
133483
  $c as UserName,
133484
133484
  eTe as WangsVue,