@owp/core 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Close-Cm04EulE.js → Close-DnXyQZKh.js} +378 -307
- package/dist/Close-DnXyQZKh.js.map +1 -0
- package/dist/{OwpStoreProvider-CFq963Pl.js → OwpStoreProvider-Bx5p7ooQ.js} +2 -2
- package/dist/{OwpStoreProvider-CFq963Pl.js.map → OwpStoreProvider-Bx5p7ooQ.js.map} +1 -1
- package/dist/{OwpUtils-9lHSCdan.js → OwpUtils-C81bM1Gz.js} +2 -2
- package/dist/{OwpUtils-9lHSCdan.js.map → OwpUtils-C81bM1Gz.js.map} +1 -1
- package/dist/{QuickPanel-DlrhsNXW.js → QuickPanel-CO7Tyc8C.js} +2 -2
- package/dist/{QuickPanel-DlrhsNXW.js.map → QuickPanel-CO7Tyc8C.js.map} +1 -1
- package/dist/colors.js +3 -18
- package/dist/colors.js.map +1 -1
- package/dist/constants.js +19 -21
- package/dist/constants.js.map +1 -1
- package/dist/context.js +65 -38
- package/dist/context.js.map +1 -1
- package/dist/hooks.js +68 -98
- package/dist/hooks.js.map +1 -1
- package/dist/{index-Dn7pPU3W.js → index-KlA5Es4t.js} +7603 -7681
- package/dist/index-KlA5Es4t.js.map +1 -0
- package/dist/index.js +85 -75
- package/dist/{isTypedArray-xp-fB7W4.js → isTypedArray-DPyC49cI.js} +3 -3
- package/dist/{isTypedArray-xp-fB7W4.js.map → isTypedArray-DPyC49cI.js.map} +1 -1
- package/dist/{lazyLoadedSlices-BYAl2fil.js → lazyLoadedSlices-DC7yg4GT.js} +977 -931
- package/dist/lazyLoadedSlices-DC7yg4GT.js.map +1 -0
- package/dist/localStorageKeys-Che0CNci.js +10 -0
- package/dist/localStorageKeys-Che0CNci.js.map +1 -0
- package/dist/owp-app.css +1 -1
- package/dist/owpDark-DAY0F6Ph.js +21 -0
- package/dist/owpDark-DAY0F6Ph.js.map +1 -0
- package/dist/storageKeys-C6xHFiTo.js +42 -0
- package/dist/storageKeys-C6xHFiTo.js.map +1 -0
- package/dist/store.js +32 -33
- package/dist/{toUpper-K8I4frC5.js → toUpper-i_I6Tyuv.js} +2 -2
- package/dist/{toUpper-K8I4frC5.js.map → toUpper-i_I6Tyuv.js.map} +1 -1
- package/dist/treeGrid-DtKg-9uf.js +8 -0
- package/dist/treeGrid-DtKg-9uf.js.map +1 -0
- package/dist/{treeGridUtil-C46Qi5LG.js → treeGridUtil-WTM_djsN.js} +62 -61
- package/dist/{treeGridUtil-C46Qi5LG.js.map → treeGridUtil-WTM_djsN.js.map} +1 -1
- package/dist/types/components/OwpTable/OwpTable.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTab.d.ts +1 -1
- package/dist/types/components/OwpTabs/OwpTabs.d.ts +1 -1
- package/dist/types/components/layouts/shared-components/navigation/store/navigationSlice.d.ts +2 -2
- package/dist/types/context/OwpAppProvider.d.ts +4 -3
- package/dist/types/default-settings/OwpDefaultSettings.d.ts +25 -171
- package/dist/types/hooks/useStorage.d.ts +0 -13
- package/dist/types/index.d.ts +1 -0
- package/dist/types/store/owpSettingsSlice.d.ts +1 -456
- package/dist/usePageLockLoading-BUI_3PlR.js +39 -0
- package/dist/usePageLockLoading-BUI_3PlR.js.map +1 -0
- package/dist/useShortcuts-CCf98L8m.js +241 -0
- package/dist/useShortcuts-CCf98L8m.js.map +1 -0
- package/dist/useStorage-CuUmH4fD.js +50 -0
- package/dist/useStorage-CuUmH4fD.js.map +1 -0
- package/dist/useTreeGridExcelExport-N2nOKmkz.js +138 -0
- package/dist/useTreeGridExcelExport-N2nOKmkz.js.map +1 -0
- package/dist/utils.js +294 -293
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/Close-Cm04EulE.js.map +0 -1
- package/dist/index-Dn7pPU3W.js.map +0 -1
- package/dist/lazyLoadedSlices-BYAl2fil.js.map +0 -1
- package/dist/storageKeys-DRzte9LZ.js +0 -15
- package/dist/storageKeys-DRzte9LZ.js.map +0 -1
- package/dist/treeGrid-DRAoPLXh.js +0 -35
- package/dist/treeGrid-DRAoPLXh.js.map +0 -1
- package/dist/useOwpTranslation-CMrtqKkT.js +0 -190
- package/dist/useOwpTranslation-CMrtqKkT.js.map +0 -1
- package/dist/useStorage-BA0D8KA7.js +0 -67
- package/dist/useStorage-BA0D8KA7.js.map +0 -1
- package/dist/useTreeGridExcelExport-DLMecvHS.js +0 -186
- package/dist/useTreeGridExcelExport-DLMecvHS.js.map +0 -1
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var r = (e, t) =>
|
|
3
|
-
import { a as
|
|
4
|
-
import { DialogContent as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import { useNavigate as
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
var Jt = Object.defineProperty;
|
|
2
|
+
var r = (e, t) => Jt(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { a as ge, j as P, b as qt } from "./emotion-react-jsx-runtime.browser.esm-Cb9H5d3i.js";
|
|
4
|
+
import { DialogContent as Yt, DialogActions as Wt, Dialog as $t, DialogTitle as Ht, Box as Kt, Button as bt, Typography as It } from "@mui/material";
|
|
5
|
+
import { forwardRef as Xt, createContext as Zt, useRef as v, useEffect as w, useCallback as g, useMemo as Qt, Component as en, useState as Ge } from "react";
|
|
6
|
+
import { useTranslation as tn } from "react-i18next";
|
|
7
|
+
import { n as kt, d as nn, q as rn } from "./useShortcuts-CCf98L8m.js";
|
|
8
|
+
import { u as on } from "./useStorage-CuUmH4fD.js";
|
|
9
|
+
import { useNavigate as un, useLocation as an } from "react-router-dom";
|
|
10
|
+
import sn from "@mui/material/Box";
|
|
11
|
+
import cn from "@mui/material/Typography";
|
|
12
|
+
import ln from "@mui/material/Backdrop";
|
|
13
|
+
import fn from "@mui/material/CircularProgress";
|
|
14
|
+
import { createSvgIcon as hn } from "@mui/material/utils";
|
|
15
|
+
function Pe(e) {
|
|
12
16
|
return typeof e == "number" || e instanceof Number;
|
|
13
17
|
}
|
|
14
|
-
r(
|
|
15
|
-
const
|
|
18
|
+
r(Pe, "isNumber");
|
|
19
|
+
const Fe = Xt(
|
|
16
20
|
({
|
|
17
21
|
title: e,
|
|
18
22
|
children: t,
|
|
@@ -25,15 +29,15 @@ const Ue = Kt(
|
|
|
25
29
|
actions: c,
|
|
26
30
|
contentProps: l,
|
|
27
31
|
...y
|
|
28
|
-
},
|
|
29
|
-
const { t:
|
|
32
|
+
}, V) => {
|
|
33
|
+
const { t: B, i18n: T } = tn("owp"), A = (y == null ? void 0 : y.confirmText) ?? B(T.exists("button.save") ? "button.save" : "Button.저장", { defaultValue: "저장" }), m = (y == null ? void 0 : y.cancelText) ?? B(
|
|
30
34
|
i ? T.exists("button.cancel") ? "button.cancel" : "Button.취소" : "Button.닫기",
|
|
31
35
|
{ defaultValue: i ? "취소" : "닫기" }
|
|
32
36
|
);
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
37
|
+
return /* @__PURE__ */ ge(
|
|
38
|
+
$t,
|
|
35
39
|
{
|
|
36
|
-
ref:
|
|
40
|
+
ref: V,
|
|
37
41
|
fullWidth: !0,
|
|
38
42
|
component: a ? "form" : void 0,
|
|
39
43
|
onClose: /* @__PURE__ */ r((G, k) => {
|
|
@@ -41,12 +45,12 @@ const Ue = Kt(
|
|
|
41
45
|
}, "onClose"),
|
|
42
46
|
...y,
|
|
43
47
|
children: [
|
|
44
|
-
e && /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
c && /* @__PURE__ */
|
|
48
|
-
n && /* @__PURE__ */
|
|
49
|
-
|
|
48
|
+
e && /* @__PURE__ */ P(Ht, { children: e }),
|
|
49
|
+
/* @__PURE__ */ P(Yt, { dividers: !0, ...l, children: t }),
|
|
50
|
+
/* @__PURE__ */ ge(Wt, { children: [
|
|
51
|
+
c && /* @__PURE__ */ P(Kt, { className: "flex w-full items-start", children: c }),
|
|
52
|
+
n && /* @__PURE__ */ P(
|
|
53
|
+
bt,
|
|
50
54
|
{
|
|
51
55
|
variant: "outlined",
|
|
52
56
|
onClick: /* @__PURE__ */ r(() => {
|
|
@@ -59,8 +63,8 @@ const Ue = Kt(
|
|
|
59
63
|
children: m
|
|
60
64
|
}
|
|
61
65
|
),
|
|
62
|
-
i && /* @__PURE__ */
|
|
63
|
-
|
|
66
|
+
i && /* @__PURE__ */ P(
|
|
67
|
+
bt,
|
|
64
68
|
{
|
|
65
69
|
variant: "contained",
|
|
66
70
|
color: "secondary",
|
|
@@ -83,20 +87,20 @@ const Ue = Kt(
|
|
|
83
87
|
);
|
|
84
88
|
}
|
|
85
89
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
var
|
|
90
|
+
Fe.displayName = "OwpDialog";
|
|
91
|
+
const or = Fe;
|
|
92
|
+
var dn = Object.create, Lt = Object.defineProperty, vn = Object.getOwnPropertyDescriptor, mn = Object.getOwnPropertyNames, pn = Object.getPrototypeOf, gn = Object.prototype.hasOwnProperty, yn = /* @__PURE__ */ r(function(e, t) {
|
|
89
93
|
return function() {
|
|
90
94
|
return t || e((t = { exports: {} }).exports, t), t.exports;
|
|
91
95
|
};
|
|
92
|
-
}, "yr"),
|
|
93
|
-
if (t && typeof t == "object" || typeof t == "function") for (var o =
|
|
96
|
+
}, "yr"), En = /* @__PURE__ */ r(function(e, t, n, i) {
|
|
97
|
+
if (t && typeof t == "object" || typeof t == "function") for (var o = mn(t), h = 0, s = o.length, a; h < s; h++) a = o[h], !gn.call(e, a) && a !== n && Lt(e, a, { get: (function(c) {
|
|
94
98
|
return t[c];
|
|
95
|
-
}).bind(null, a), enumerable: !(i =
|
|
99
|
+
}).bind(null, a), enumerable: !(i = vn(t, a)) || i.enumerable });
|
|
96
100
|
return e;
|
|
97
|
-
}, "gr"),
|
|
98
|
-
return n = e != null ?
|
|
99
|
-
}, "wr"),
|
|
101
|
+
}, "gr"), bn = /* @__PURE__ */ r(function(e, t, n) {
|
|
102
|
+
return n = e != null ? dn(pn(e)) : {}, En(!e || !e.__esModule ? Lt(n, "default", { value: e, enumerable: !0 }) : n, e);
|
|
103
|
+
}, "wr"), wn = yn(function(e, t) {
|
|
100
104
|
(function(n, i) {
|
|
101
105
|
typeof e == "object" && typeof t < "u" ? i(e) : typeof define == "function" && define.amd ? define(["exports"], i) : (n = typeof globalThis < "u" ? globalThis : n || self, i(n.fastUniqueNumbers = {}));
|
|
102
106
|
})(e, function(n) {
|
|
@@ -121,45 +125,45 @@ var an = Object.create, It = Object.defineProperty, sn = Object.getOwnPropertyDe
|
|
|
121
125
|
for (; m.has(k); ) k = Math.floor(Math.random() * h);
|
|
122
126
|
return T(m, k);
|
|
123
127
|
};
|
|
124
|
-
}, "s"), l = /* @__PURE__ */ new WeakMap(), y = o(l),
|
|
125
|
-
n.addUniqueNumber =
|
|
128
|
+
}, "s"), l = /* @__PURE__ */ new WeakMap(), y = o(l), V = c(y, l), B = i(V);
|
|
129
|
+
n.addUniqueNumber = B, n.generateUniqueNumber = V;
|
|
126
130
|
});
|
|
127
131
|
});
|
|
128
|
-
function
|
|
132
|
+
function te(e) {
|
|
129
133
|
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
130
134
|
return e;
|
|
131
135
|
}
|
|
132
|
-
r(
|
|
133
|
-
function
|
|
134
|
-
return t != null && typeof Symbol < "u" && t[Symbol.hasInstance] ? !!t[Symbol.hasInstance](e) :
|
|
136
|
+
r(te, "Y");
|
|
137
|
+
function St(e, t) {
|
|
138
|
+
return t != null && typeof Symbol < "u" && t[Symbol.hasInstance] ? !!t[Symbol.hasInstance](e) : St(e, t);
|
|
135
139
|
}
|
|
136
|
-
r(
|
|
137
|
-
function
|
|
138
|
-
if (!
|
|
140
|
+
r(St, "je");
|
|
141
|
+
function ye(e, t) {
|
|
142
|
+
if (!St(e, t)) throw new TypeError("Cannot call a class as a function");
|
|
139
143
|
}
|
|
140
|
-
r(
|
|
141
|
-
function
|
|
142
|
-
return
|
|
144
|
+
r(ye, "z");
|
|
145
|
+
function Ue(e, t) {
|
|
146
|
+
return Ue = Object.setPrototypeOf || function(n, i) {
|
|
143
147
|
return n.__proto__ = i, n;
|
|
144
|
-
},
|
|
148
|
+
}, Ue(e, t);
|
|
145
149
|
}
|
|
146
|
-
r(
|
|
147
|
-
function
|
|
150
|
+
r(Ue, "De");
|
|
151
|
+
function Ot(e, t) {
|
|
148
152
|
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
149
|
-
e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t &&
|
|
153
|
+
e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && Ue(e, t);
|
|
150
154
|
}
|
|
151
|
-
r(
|
|
155
|
+
r(Ot, "Ke");
|
|
152
156
|
function b(e, t, n) {
|
|
153
157
|
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
154
158
|
}
|
|
155
159
|
r(b, "h");
|
|
156
|
-
function
|
|
157
|
-
return
|
|
160
|
+
function Re(e) {
|
|
161
|
+
return Re = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) {
|
|
158
162
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
159
|
-
},
|
|
163
|
+
}, Re(e);
|
|
160
164
|
}
|
|
161
|
-
r(
|
|
162
|
-
function
|
|
165
|
+
r(Re, "be");
|
|
166
|
+
function Tn() {
|
|
163
167
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
164
168
|
if (typeof Proxy == "function") return !0;
|
|
165
169
|
try {
|
|
@@ -169,100 +173,100 @@ function pn() {
|
|
|
169
173
|
return !1;
|
|
170
174
|
}
|
|
171
175
|
}
|
|
172
|
-
r(
|
|
173
|
-
function
|
|
176
|
+
r(Tn, "Pt");
|
|
177
|
+
function Mt(e) {
|
|
174
178
|
"@swc/helpers - typeof";
|
|
175
179
|
return e && typeof Symbol < "u" && e.constructor === Symbol ? "symbol" : typeof e;
|
|
176
180
|
}
|
|
177
|
-
r(
|
|
178
|
-
function
|
|
179
|
-
return t && (
|
|
181
|
+
r(Mt, "Ne");
|
|
182
|
+
function An(e, t) {
|
|
183
|
+
return t && (Mt(t) === "object" || typeof t == "function") ? t : te(e);
|
|
180
184
|
}
|
|
181
|
-
r(
|
|
182
|
-
function
|
|
183
|
-
var t =
|
|
185
|
+
r(An, "kt");
|
|
186
|
+
function Pt(e) {
|
|
187
|
+
var t = Tn();
|
|
184
188
|
return function() {
|
|
185
|
-
var n =
|
|
189
|
+
var n = Re(e), i;
|
|
186
190
|
if (t) {
|
|
187
|
-
var o =
|
|
191
|
+
var o = Re(this).constructor;
|
|
188
192
|
i = Reflect.construct(n, arguments, o);
|
|
189
193
|
} else i = n.apply(this, arguments);
|
|
190
|
-
return
|
|
194
|
+
return An(this, i);
|
|
191
195
|
};
|
|
192
196
|
}
|
|
193
|
-
r(
|
|
194
|
-
var
|
|
195
|
-
|
|
196
|
-
var t =
|
|
197
|
+
r(Pt, "Ze");
|
|
198
|
+
var In = function(e) {
|
|
199
|
+
Ot(n, e);
|
|
200
|
+
var t = Pt(n);
|
|
197
201
|
function n() {
|
|
198
|
-
return
|
|
202
|
+
return ye(this, n), t.apply(this, arguments);
|
|
199
203
|
}
|
|
200
204
|
return r(n, "t"), n;
|
|
201
|
-
}(
|
|
205
|
+
}(en);
|
|
202
206
|
(function(e) {
|
|
203
|
-
|
|
204
|
-
var t =
|
|
207
|
+
Ot(n, e);
|
|
208
|
+
var t = Pt(n);
|
|
205
209
|
function n(i) {
|
|
206
|
-
|
|
210
|
+
ye(this, n);
|
|
207
211
|
var o;
|
|
208
|
-
return o = t.call(this, i), o.onPresenceChange && i.setOnPresenceChange(o.onPresenceChange.bind(
|
|
212
|
+
return o = t.call(this, i), o.onPresenceChange && i.setOnPresenceChange(o.onPresenceChange.bind(te(o))), o.onPrompt && i.setOnPrompt(o.onPrompt.bind(te(o))), o.onIdle && i.setOnIdle(o.onIdle.bind(te(o))), o.onActive && i.setOnActive(o.onActive.bind(te(o))), o.onAction && i.setOnAction(o.onAction.bind(te(o))), o.onMessage && i.setOnMessage(o.onMessage.bind(te(o))), o;
|
|
209
213
|
}
|
|
210
214
|
return r(n, "t"), n;
|
|
211
|
-
})(
|
|
212
|
-
function
|
|
215
|
+
})(In);
|
|
216
|
+
function ze(e, t) {
|
|
213
217
|
(t == null || t > e.length) && (t = e.length);
|
|
214
218
|
for (var n = 0, i = new Array(t); n < t; n++) i[n] = e[n];
|
|
215
219
|
return i;
|
|
216
220
|
}
|
|
217
|
-
r(
|
|
218
|
-
function
|
|
219
|
-
if (Array.isArray(e)) return
|
|
221
|
+
r(ze, "Ee");
|
|
222
|
+
function kn(e) {
|
|
223
|
+
if (Array.isArray(e)) return ze(e);
|
|
220
224
|
}
|
|
221
|
-
r(
|
|
222
|
-
function
|
|
225
|
+
r(kn, "At");
|
|
226
|
+
function Ln(e) {
|
|
223
227
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
224
228
|
}
|
|
225
|
-
r(
|
|
226
|
-
function
|
|
229
|
+
r(Ln, "Rt");
|
|
230
|
+
function Sn() {
|
|
227
231
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
228
232
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
229
233
|
}
|
|
230
|
-
r(
|
|
231
|
-
function
|
|
234
|
+
r(Sn, "Mt");
|
|
235
|
+
function On(e, t) {
|
|
232
236
|
if (e) {
|
|
233
|
-
if (typeof e == "string") return
|
|
237
|
+
if (typeof e == "string") return ze(e, t);
|
|
234
238
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
235
239
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
236
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
240
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ze(e, t);
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
|
-
r(
|
|
243
|
+
r(On, "Ct");
|
|
240
244
|
function j(e) {
|
|
241
|
-
return
|
|
245
|
+
return kn(e) || Ln(e) || On(e) || Sn();
|
|
242
246
|
}
|
|
243
247
|
r(j, "O");
|
|
244
|
-
function
|
|
248
|
+
function Mn(e, t) {
|
|
245
249
|
for (var n = 0; n < t.length; n++) {
|
|
246
250
|
var i = t[n];
|
|
247
251
|
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
248
252
|
}
|
|
249
253
|
}
|
|
250
|
-
r(
|
|
251
|
-
function
|
|
252
|
-
return t &&
|
|
254
|
+
r(Mn, "jt");
|
|
255
|
+
function Je(e, t, n) {
|
|
256
|
+
return t && Mn(e.prototype, t), e;
|
|
253
257
|
}
|
|
254
|
-
r(
|
|
255
|
-
|
|
256
|
-
var
|
|
257
|
-
function
|
|
258
|
-
|
|
258
|
+
r(Je, "ce");
|
|
259
|
+
bn(wn());
|
|
260
|
+
var W = (typeof window > "u" || typeof window > "u" ? "undefined" : Mt(window)) === "object", _ = { setTimeout: W ? setTimeout.bind(window) : setTimeout, clearTimeout: W ? clearTimeout.bind(window) : clearTimeout, setInterval: W ? setInterval.bind(window) : setInterval, clearInterval: W ? clearInterval.bind(window) : clearInterval };
|
|
261
|
+
function Pn(e) {
|
|
262
|
+
_.setTimeout = e.setTimeout, _.clearTimeout = e.clearTimeout, _.setInterval = e.setInterval, _.clearInterval = e.clearInterval;
|
|
259
263
|
}
|
|
260
|
-
r(
|
|
261
|
-
var ue = {},
|
|
264
|
+
r(Pn, "Jt");
|
|
265
|
+
var ue = {}, Rn = function() {
|
|
262
266
|
function e(t) {
|
|
263
|
-
|
|
267
|
+
ye(this, e), b(this, "name", void 0), b(this, "closed", !1), b(this, "mc", new MessageChannel()), this.name = t, ue[t] = ue[t] || [], ue[t].push(this), this.mc.port1.start(), this.mc.port2.start(), this.onStorage = this.onStorage.bind(this), window.addEventListener("storage", this.onStorage);
|
|
264
268
|
}
|
|
265
|
-
return r(e, "e"),
|
|
269
|
+
return r(e, "e"), Je(e, [{ key: "onStorage", value: /* @__PURE__ */ r(function(t) {
|
|
266
270
|
if (t.storageArea === window.localStorage && t.key.substring(0, this.name.length) === this.name && t.newValue !== null) {
|
|
267
271
|
var n = JSON.parse(t.newValue);
|
|
268
272
|
this.mc.port2.postMessage(n);
|
|
@@ -271,7 +275,7 @@ var ue = {}, kn = function() {
|
|
|
271
275
|
var n = this;
|
|
272
276
|
if (this.closed) throw new Error("InvalidStateError");
|
|
273
277
|
var i = JSON.stringify(t), o = "".concat(this.name, ":").concat(String(Date.now())).concat(String(Math.random()));
|
|
274
|
-
window.localStorage.setItem(o, i),
|
|
278
|
+
window.localStorage.setItem(o, i), _.setTimeout(function() {
|
|
275
279
|
window.localStorage.removeItem(o);
|
|
276
280
|
}, 500), ue[this.name].forEach(function(h) {
|
|
277
281
|
h !== n && h.mc.port2.postMessage(JSON.parse(i));
|
|
@@ -297,7 +301,7 @@ var ue = {}, kn = function() {
|
|
|
297
301
|
}, "value") }, { key: "dispatchEvent", value: /* @__PURE__ */ r(function(t) {
|
|
298
302
|
return this.mc.port1.dispatchEvent(t);
|
|
299
303
|
}, "value") }]), e;
|
|
300
|
-
}(),
|
|
304
|
+
}(), xn = typeof window > "u" ? void 0 : typeof window.BroadcastChannel == "function" ? window.BroadcastChannel : Rn;
|
|
301
305
|
function wt(e, t, n, i, o, h, s) {
|
|
302
306
|
try {
|
|
303
307
|
var a = e[h](s), c = a.value;
|
|
@@ -308,7 +312,7 @@ function wt(e, t, n, i, o, h, s) {
|
|
|
308
312
|
a.done ? t(c) : Promise.resolve(c).then(i, o);
|
|
309
313
|
}
|
|
310
314
|
r(wt, "Xt");
|
|
311
|
-
function
|
|
315
|
+
function Cn(e) {
|
|
312
316
|
return function() {
|
|
313
317
|
var t = this, n = arguments;
|
|
314
318
|
return new Promise(function(i, o) {
|
|
@@ -324,8 +328,8 @@ function Ln(e) {
|
|
|
324
328
|
});
|
|
325
329
|
};
|
|
326
330
|
}
|
|
327
|
-
r(
|
|
328
|
-
function
|
|
331
|
+
r(Cn, "$t");
|
|
332
|
+
function Dn(e, t) {
|
|
329
333
|
var n = /* @__PURE__ */ r(function(l) {
|
|
330
334
|
return function(y) {
|
|
331
335
|
return i([l, y]);
|
|
@@ -383,31 +387,31 @@ function Mn(e, t) {
|
|
|
383
387
|
return this;
|
|
384
388
|
}), c;
|
|
385
389
|
}
|
|
386
|
-
r(
|
|
387
|
-
function
|
|
390
|
+
r(Dn, "Ve");
|
|
391
|
+
function Nn() {
|
|
388
392
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
389
393
|
return new Promise(function(t) {
|
|
390
|
-
return
|
|
394
|
+
return _.setTimeout(t, e);
|
|
391
395
|
});
|
|
392
396
|
}
|
|
393
|
-
r(
|
|
394
|
-
function
|
|
397
|
+
r(Nn, "Kt");
|
|
398
|
+
function Rt() {
|
|
395
399
|
return Math.random().toString(36).substring(2);
|
|
396
400
|
}
|
|
397
|
-
r(
|
|
401
|
+
r(Rt, "Ge");
|
|
398
402
|
var d;
|
|
399
403
|
(function(e) {
|
|
400
404
|
e[e.APPLY = 0] = "APPLY", e[e.TELL = 1] = "TELL", e[e.CLOSE = 2] = "CLOSE", e[e.REGISTER = 3] = "REGISTER", e[e.DEREGISTER = 4] = "DEREGISTER", e[e.IDLE = 5] = "IDLE", e[e.ACTIVE = 6] = "ACTIVE", e[e.PROMPT = 7] = "PROMPT", e[e.START = 8] = "START", e[e.RESET = 9] = "RESET", e[e.ACTIVATE = 10] = "ACTIVATE", e[e.PAUSE = 11] = "PAUSE", e[e.RESUME = 12] = "RESUME", e[e.MESSAGE = 13] = "MESSAGE";
|
|
401
405
|
})(d || (d = {}));
|
|
402
|
-
var
|
|
406
|
+
var jn = function() {
|
|
403
407
|
function e(t, n) {
|
|
404
|
-
|
|
408
|
+
ye(this, e), b(this, "options", void 0), b(this, "channel", void 0), b(this, "token", Rt()), b(this, "isLeader", !1), b(this, "isDead", !1), b(this, "isApplying", !1), b(this, "reApply", !1), b(this, "intervals", []), b(this, "listeners", []), b(this, "deferred", void 0), this.channel = t, this.options = n, this.apply = this.apply.bind(this), this.awaitLeadership = this.awaitLeadership.bind(this), this.sendAction = this.sendAction.bind(this);
|
|
405
409
|
}
|
|
406
|
-
return r(e, "e"),
|
|
410
|
+
return r(e, "e"), Je(e, [{ key: "apply", value: /* @__PURE__ */ r(function() {
|
|
407
411
|
var t = this;
|
|
408
|
-
return
|
|
412
|
+
return Cn(function() {
|
|
409
413
|
var n, i;
|
|
410
|
-
return
|
|
414
|
+
return Dn(this, function(o) {
|
|
411
415
|
switch (o.label) {
|
|
412
416
|
case 0:
|
|
413
417
|
if (t.isLeader) return [2, !1];
|
|
@@ -418,7 +422,7 @@ var Pn = function() {
|
|
|
418
422
|
a !== t.token && (c === d.APPLY && a > t.token && (n = !0), c === d.TELL && (n = !0));
|
|
419
423
|
}, "n"), t.channel.addEventListener("message", i), o.label = 1;
|
|
420
424
|
case 1:
|
|
421
|
-
return o.trys.push([1, 3, , 4]), t.sendAction(d.APPLY), [4,
|
|
425
|
+
return o.trys.push([1, 3, , 4]), t.sendAction(d.APPLY), [4, Nn(t.options.responseTime)];
|
|
422
426
|
case 2:
|
|
423
427
|
return o.sent(), t.channel.removeEventListener("message", i), t.isApplying = !1, n ? t.reApply ? [2, t.apply()] : [2, !1] : (t.assumeLead(), [2, !0]);
|
|
424
428
|
case 3:
|
|
@@ -437,14 +441,14 @@ var Pn = function() {
|
|
|
437
441
|
if (!n) {
|
|
438
442
|
n = !0;
|
|
439
443
|
try {
|
|
440
|
-
|
|
444
|
+
_.clearInterval(i);
|
|
441
445
|
} catch {
|
|
442
446
|
}
|
|
443
447
|
var a = t.intervals.indexOf(i);
|
|
444
448
|
a >= 0 && t.intervals.splice(a, 1), t.channel.removeEventListener("message", s), o();
|
|
445
449
|
}
|
|
446
450
|
}, "s");
|
|
447
|
-
i =
|
|
451
|
+
i = _.setInterval(function() {
|
|
448
452
|
t.apply().then(function() {
|
|
449
453
|
t.isLeader && h();
|
|
450
454
|
});
|
|
@@ -477,30 +481,30 @@ var Pn = function() {
|
|
|
477
481
|
this.listeners.forEach(function(n) {
|
|
478
482
|
return t.channel.removeEventListener("message", n);
|
|
479
483
|
}), this.intervals.forEach(function(n) {
|
|
480
|
-
return
|
|
484
|
+
return _.clearInterval(n);
|
|
481
485
|
});
|
|
482
486
|
} catch {
|
|
483
487
|
}
|
|
484
488
|
}
|
|
485
489
|
}, "value") }]), e;
|
|
486
|
-
}(),
|
|
490
|
+
}(), M;
|
|
487
491
|
(function(e) {
|
|
488
492
|
e[e.PROMPTED = 0] = "PROMPTED", e[e.ACTIVE = 1] = "ACTIVE", e[e.IDLE = 2] = "IDLE";
|
|
489
|
-
})(
|
|
490
|
-
var
|
|
493
|
+
})(M || (M = {}));
|
|
494
|
+
var _n = function() {
|
|
491
495
|
function e(t) {
|
|
492
496
|
var n = this;
|
|
493
|
-
|
|
497
|
+
ye(this, e), b(this, "channel", void 0), b(this, "options", void 0), b(this, "elector", void 0), b(this, "token", Rt()), b(this, "registry", /* @__PURE__ */ new Map()), b(this, "allIdle", !1), b(this, "isLastActive", !1);
|
|
494
498
|
var i = t.channelName;
|
|
495
|
-
if (this.options = t, this.channel = new
|
|
499
|
+
if (this.options = t, this.channel = new xn(i), this.registry.set(this.token, M.ACTIVE), t.leaderElection) {
|
|
496
500
|
var o = { fallbackInterval: 2e3, responseTime: 100 };
|
|
497
|
-
this.elector = new
|
|
501
|
+
this.elector = new jn(this.channel, o), this.elector.waitForLeadership();
|
|
498
502
|
}
|
|
499
503
|
this.channel.addEventListener("message", function(h) {
|
|
500
504
|
var s = h.data, a = s.action, c = s.token, l = s.data;
|
|
501
505
|
switch (a) {
|
|
502
506
|
case d.REGISTER:
|
|
503
|
-
n.registry.set(c,
|
|
507
|
+
n.registry.set(c, M.IDLE);
|
|
504
508
|
break;
|
|
505
509
|
case d.DEREGISTER:
|
|
506
510
|
n.registry.delete(c);
|
|
@@ -535,39 +539,39 @@ var Rn = function() {
|
|
|
535
539
|
}
|
|
536
540
|
}), this.send(d.REGISTER);
|
|
537
541
|
}
|
|
538
|
-
return r(e, "e"),
|
|
542
|
+
return r(e, "e"), Je(e, [{ key: "isLeader", get: /* @__PURE__ */ r(function() {
|
|
539
543
|
if (!this.elector) throw new Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');
|
|
540
544
|
return this.elector.isLeader;
|
|
541
545
|
}, "get") }, { key: "prompt", value: /* @__PURE__ */ r(function() {
|
|
542
546
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
543
|
-
this.registry.set(t,
|
|
547
|
+
this.registry.set(t, M.PROMPTED);
|
|
544
548
|
var n = j(this.registry.values()).every(function(i) {
|
|
545
|
-
return i ===
|
|
549
|
+
return i === M.PROMPTED;
|
|
546
550
|
});
|
|
547
551
|
t === this.token && this.send(d.PROMPT), n && this.options.onPrompt();
|
|
548
552
|
}, "value") }, { key: "idle", value: /* @__PURE__ */ r(function() {
|
|
549
553
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
550
|
-
this.registry.set(t,
|
|
554
|
+
this.registry.set(t, M.IDLE);
|
|
551
555
|
var n = j(this.registry.values()).every(function(i) {
|
|
552
|
-
return i ===
|
|
556
|
+
return i === M.IDLE;
|
|
553
557
|
});
|
|
554
558
|
t === this.token && this.send(d.IDLE), !this.allIdle && n && (this.allIdle = !0, this.options.onIdle());
|
|
555
559
|
}, "value") }, { key: "active", value: /* @__PURE__ */ r(function() {
|
|
556
560
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
557
|
-
this.allIdle = !1, this.registry.set(t,
|
|
561
|
+
this.allIdle = !1, this.registry.set(t, M.ACTIVE);
|
|
558
562
|
var n = j(this.registry.values()).some(function(i) {
|
|
559
|
-
return i ===
|
|
563
|
+
return i === M.ACTIVE;
|
|
560
564
|
});
|
|
561
565
|
t === this.token && this.send(d.ACTIVE), n && this.options.onActive(), this.isLastActive = t === this.token;
|
|
562
566
|
}, "value") }, { key: "start", value: /* @__PURE__ */ r(function() {
|
|
563
567
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
564
|
-
this.allIdle = !1, this.registry.set(t,
|
|
568
|
+
this.allIdle = !1, this.registry.set(t, M.ACTIVE), t === this.token ? this.send(d.START) : this.options.start(!0), this.isLastActive = t === this.token;
|
|
565
569
|
}, "value") }, { key: "reset", value: /* @__PURE__ */ r(function() {
|
|
566
570
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
567
|
-
this.allIdle = !1, this.registry.set(t,
|
|
571
|
+
this.allIdle = !1, this.registry.set(t, M.ACTIVE), t === this.token ? this.send(d.RESET) : this.options.reset(!0), this.isLastActive = t === this.token;
|
|
568
572
|
}, "value") }, { key: "activate", value: /* @__PURE__ */ r(function() {
|
|
569
573
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
570
|
-
this.allIdle = !1, this.registry.set(t,
|
|
574
|
+
this.allIdle = !1, this.registry.set(t, M.ACTIVE), t === this.token ? this.send(d.ACTIVATE) : this.options.activate(!0), this.isLastActive = t === this.token;
|
|
571
575
|
}, "value") }, { key: "pause", value: /* @__PURE__ */ r(function() {
|
|
572
576
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.token;
|
|
573
577
|
t === this.token ? this.send(d.PAUSE) : this.options.pause(!0);
|
|
@@ -587,8 +591,8 @@ var Rn = function() {
|
|
|
587
591
|
}, "value") }, { key: "close", value: /* @__PURE__ */ r(function() {
|
|
588
592
|
this.options.leaderElection && this.elector.close(), this.send(d.DEREGISTER), this.channel.close();
|
|
589
593
|
}, "value") }]), e;
|
|
590
|
-
}(),
|
|
591
|
-
function
|
|
594
|
+
}(), Vn = W ? document : null, Bn = ["mousemove", "keydown", "wheel", "DOMMouseScroll", "mousewheel", "mousedown", "touchstart", "touchmove", "MSPointerDown", "MSPointerMove", "visibilitychange", "focus"];
|
|
595
|
+
function Gn(e, t) {
|
|
592
596
|
var n = /* @__PURE__ */ r(function() {
|
|
593
597
|
for (var o = arguments.length, h = new Array(o), s = 0; s < o; s++) h[s] = arguments[s];
|
|
594
598
|
i && clearTimeout(i), i = setTimeout(function() {
|
|
@@ -599,8 +603,8 @@ function xn(e, t) {
|
|
|
599
603
|
clearTimeout(i);
|
|
600
604
|
}, n;
|
|
601
605
|
}
|
|
602
|
-
r(
|
|
603
|
-
function
|
|
606
|
+
r(Gn, "tr");
|
|
607
|
+
function Be(e, t) {
|
|
604
608
|
var n = 0;
|
|
605
609
|
return function() {
|
|
606
610
|
for (var i = arguments.length, o = new Array(i), h = 0; h < i; h++) o[h] = arguments[h];
|
|
@@ -608,226 +612,226 @@ function Ve(e, t) {
|
|
|
608
612
|
if (!(s - n < t)) return n = s, e.apply(void 0, j(o));
|
|
609
613
|
};
|
|
610
614
|
}
|
|
611
|
-
r(
|
|
615
|
+
r(Be, "Fe");
|
|
612
616
|
var E = /* @__PURE__ */ r(function() {
|
|
613
617
|
return Date.now();
|
|
614
618
|
}, "g"), ae = 2147483647;
|
|
615
|
-
function
|
|
616
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.timeout, n = t === void 0 ? 1e3 * 60 * 20 : t, i = e.promptTimeout, o = i === void 0 ? 0 : i, h = e.promptBeforeIdle, s = h === void 0 ? 0 : h, a = e.element, c = a === void 0 ?
|
|
617
|
-
} : m, k = e.onPrompt,
|
|
618
|
-
} : k,
|
|
619
|
-
} :
|
|
620
|
-
} : Ye,
|
|
621
|
-
} :
|
|
622
|
-
} :
|
|
619
|
+
function Un() {
|
|
620
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.timeout, n = t === void 0 ? 1e3 * 60 * 20 : t, i = e.promptTimeout, o = i === void 0 ? 0 : i, h = e.promptBeforeIdle, s = h === void 0 ? 0 : h, a = e.element, c = a === void 0 ? Vn : a, l = e.events, y = l === void 0 ? Bn : l, V = e.timers, B = V === void 0 ? void 0 : V, T = e.immediateEvents, A = T === void 0 ? [] : T, m = e.onPresenceChange, G = m === void 0 ? function() {
|
|
621
|
+
} : m, k = e.onPrompt, Ee = k === void 0 ? function() {
|
|
622
|
+
} : k, qe = e.onIdle, be = qe === void 0 ? function() {
|
|
623
|
+
} : qe, Ye = e.onActive, we = Ye === void 0 ? function() {
|
|
624
|
+
} : Ye, We = e.onAction, Te = We === void 0 ? function() {
|
|
625
|
+
} : We, $e = e.onMessage, se = $e === void 0 ? function() {
|
|
626
|
+
} : $e, He = e.debounce, ce = He === void 0 ? 0 : He, Ke = e.throttle, le = Ke === void 0 ? 0 : Ke, Xe = e.eventsThrottle, xe = Xe === void 0 ? 200 : Xe, Ze = e.startOnMount, fe = Ze === void 0 ? !0 : Ze, Qe = e.startManually, z = Qe === void 0 ? !1 : Qe, et = e.stopOnIdle, Ae = et === void 0 ? !1 : et, tt = e.crossTab, ne = tt === void 0 ? !1 : tt, nt = e.name, rt = nt === void 0 ? "idle-timer" : nt, it = e.syncTimers, he = it === void 0 ? 0 : it, ot = e.leaderElection, ut = ot === void 0 ? !1 : ot, at = e.disabled, U = at === void 0 ? !1 : at, st = v(E()), Ie = v(E()), L = v(null), x = v(null), $ = v(0), de = v(0), F = v(0), R = v(0), p = v(!1), I = v(!1), J = v(!1), q = v(!0), ve = v(!1), Y = v(null), f = v(null), C = v(n), K = v(0);
|
|
623
627
|
w(function() {
|
|
624
628
|
if (o && console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."), s && o) throw new Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");
|
|
625
629
|
if (n >= ae) throw new Error("❌ The value for the timeout property must fit in a 32 bit signed integer, ".concat(ae, "."));
|
|
626
630
|
if (o >= ae) throw new Error("❌ The value for the promptTimeout property must fit in a 32 bit signed integer, ".concat(ae, "."));
|
|
627
631
|
if (s >= ae) throw new Error("❌ The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ".concat(ae, "."));
|
|
628
632
|
if (s >= n) throw new Error("❌ The value for the promptBeforeIdle property must be less than the timeout property, ".concat(n, "."));
|
|
629
|
-
if (s ? (
|
|
630
|
-
if (
|
|
631
|
-
p.current && (re.current(null,
|
|
633
|
+
if (s ? (C.current = n - s, K.current = s) : (C.current = n, K.current = o), !q.current) {
|
|
634
|
+
if (z || U) return;
|
|
635
|
+
p.current && (re.current(null, O), f.current && f.current.active()), ee();
|
|
632
636
|
}
|
|
633
|
-
}, [n, o, s,
|
|
634
|
-
var
|
|
637
|
+
}, [n, o, s, z, U]);
|
|
638
|
+
var ct = v(Ae);
|
|
635
639
|
w(function() {
|
|
636
|
-
|
|
637
|
-
}, [
|
|
638
|
-
var
|
|
640
|
+
ct.current = Ae;
|
|
641
|
+
}, [Ae]);
|
|
642
|
+
var lt = v(A), me = v(c), Ce = v(j(new Set(j(y).concat(j(A))).values())), D = v(U);
|
|
639
643
|
w(function() {
|
|
640
|
-
|
|
641
|
-
}, [
|
|
644
|
+
D.current = U, !q.current && (U ? Me() : z || ee());
|
|
645
|
+
}, [U]);
|
|
642
646
|
var pe = v(G);
|
|
643
647
|
w(function() {
|
|
644
648
|
pe.current = G;
|
|
645
649
|
}, [G]);
|
|
646
|
-
var Ie = v(ye);
|
|
647
|
-
w(function() {
|
|
648
|
-
Ie.current = ye;
|
|
649
|
-
}, [ye]);
|
|
650
650
|
var ke = v(Ee);
|
|
651
651
|
w(function() {
|
|
652
652
|
ke.current = Ee;
|
|
653
653
|
}, [Ee]);
|
|
654
|
-
var
|
|
654
|
+
var Le = v(be);
|
|
655
655
|
w(function() {
|
|
656
|
-
|
|
656
|
+
Le.current = be;
|
|
657
657
|
}, [be]);
|
|
658
|
-
var
|
|
658
|
+
var re = v(we);
|
|
659
659
|
w(function() {
|
|
660
|
-
|
|
660
|
+
re.current = we;
|
|
661
661
|
}, [we]);
|
|
662
|
+
var Se = v(Te);
|
|
663
|
+
w(function() {
|
|
664
|
+
Se.current = Te;
|
|
665
|
+
}, [Te]);
|
|
662
666
|
var ie = v(se);
|
|
663
667
|
w(function() {
|
|
664
668
|
ie.current = se;
|
|
665
669
|
}, [se]);
|
|
666
|
-
var X =
|
|
667
|
-
var u = /* @__PURE__ */ r(function(
|
|
668
|
-
return Se.current(
|
|
670
|
+
var X = Qt(function() {
|
|
671
|
+
var u = /* @__PURE__ */ r(function(S, oe) {
|
|
672
|
+
return Se.current(S, oe);
|
|
669
673
|
}, "i");
|
|
670
|
-
return ce > 0 ?
|
|
671
|
-
}, [le, ce]),
|
|
674
|
+
return ce > 0 ? Gn(u, ce) : le > 0 ? Be(u, le) : u;
|
|
675
|
+
}, [le, ce]), ft = v();
|
|
672
676
|
w(function() {
|
|
673
|
-
ne && he && (
|
|
677
|
+
ne && he && (ft.current = Be(function() {
|
|
674
678
|
f.current.active();
|
|
675
679
|
}, he));
|
|
676
680
|
}, [ne, he]);
|
|
677
|
-
var
|
|
678
|
-
|
|
679
|
-
}, "N"),
|
|
680
|
-
var
|
|
681
|
-
|
|
682
|
-
}, "Z"),
|
|
683
|
-
!I.current && !p.current && (
|
|
684
|
-
}, "wt"),
|
|
685
|
-
|
|
686
|
-
}, "bt"),
|
|
687
|
-
|
|
688
|
-
}, "ze"),
|
|
689
|
-
var
|
|
690
|
-
if (
|
|
681
|
+
var N = /* @__PURE__ */ r(function() {
|
|
682
|
+
Y.current !== null && (_.clearTimeout(Y.current), Y.current = null);
|
|
683
|
+
}, "N"), Z = /* @__PURE__ */ r(function(u) {
|
|
684
|
+
var S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
685
|
+
N(), Y.current = _.setTimeout(Ne, u || C.current), S && (x.current = E());
|
|
686
|
+
}, "Z"), ht = /* @__PURE__ */ r(function(u) {
|
|
687
|
+
!I.current && !p.current && (ke.current(u, O), pe.current({ type: "active", prompted: !0 }, O)), R.current = 0, F.current = E(), I.current = !0, Z(K.current, !1);
|
|
688
|
+
}, "wt"), dt = /* @__PURE__ */ r(function() {
|
|
689
|
+
N(), p.current || (Le.current(null, O), pe.current({ type: "idle" }, O)), p.current = !0, L.current = E(), ct.current ? Q() : I.current && (F.current = 0, I.current = !1);
|
|
690
|
+
}, "bt"), De = /* @__PURE__ */ r(function(u) {
|
|
691
|
+
N(), (p.current || I.current) && (re.current(u, O), pe.current({ type: "active", prompted: !1 }, O)), I.current = !1, F.current = 0, p.current = !1, $.current += E() - L.current, de.current += E() - L.current, H(), Z();
|
|
692
|
+
}, "ze"), Ne = /* @__PURE__ */ r(function(u) {
|
|
693
|
+
var S = !p.current;
|
|
694
|
+
if (S) {
|
|
691
695
|
X.cancel && X.cancel();
|
|
692
|
-
var oe = E() -
|
|
693
|
-
if (!
|
|
694
|
-
f.current ? f.current.prompt() :
|
|
696
|
+
var oe = E() - x.current, Ft = C.current + K.current < oe;
|
|
697
|
+
if (!Ft && K.current > 0 && !I.current) {
|
|
698
|
+
f.current ? f.current.prompt() : ht(u);
|
|
695
699
|
return;
|
|
696
700
|
}
|
|
697
|
-
f.current ? f.current.idle() :
|
|
701
|
+
f.current ? f.current.idle() : dt();
|
|
698
702
|
return;
|
|
699
703
|
}
|
|
700
|
-
f.current ? f.current.active() :
|
|
704
|
+
f.current ? f.current.active() : De(u);
|
|
701
705
|
}, "Je"), je = /* @__PURE__ */ r(function(u) {
|
|
702
|
-
if (!fe && !
|
|
703
|
-
if (
|
|
704
|
-
|
|
706
|
+
if (!fe && !x.current && (x.current = E(), re.current(null, O)), X(u, O), !I.current) {
|
|
707
|
+
if (N(), !p.current && lt.current.includes(u.type)) {
|
|
708
|
+
Ne(u);
|
|
705
709
|
return;
|
|
706
710
|
}
|
|
707
|
-
var
|
|
708
|
-
if (p.current && !
|
|
709
|
-
|
|
711
|
+
var S = E() - x.current;
|
|
712
|
+
if (p.current && !Ae || !p.current && S >= C.current) {
|
|
713
|
+
Ne(u);
|
|
710
714
|
return;
|
|
711
715
|
}
|
|
712
|
-
J.current = !1,
|
|
716
|
+
J.current = !1, R.current = 0, F.current = 0, Z(), ne && he && ft.current();
|
|
713
717
|
}
|
|
714
|
-
}, "He"),
|
|
718
|
+
}, "He"), Oe = v(je);
|
|
715
719
|
w(function() {
|
|
716
720
|
var u = ve.current;
|
|
717
|
-
u &&
|
|
718
|
-
}, [
|
|
721
|
+
u && Q(), xe > 0 ? Oe.current = Be(je, xe) : Oe.current = je, u && H();
|
|
722
|
+
}, [xe, le, ce, Se, ne, he]);
|
|
719
723
|
var H = /* @__PURE__ */ r(function() {
|
|
720
|
-
|
|
721
|
-
me.current.addEventListener(u,
|
|
724
|
+
W && me.current && (ve.current || (Ce.current.forEach(function(u) {
|
|
725
|
+
me.current.addEventListener(u, Oe.current, { capture: !0, passive: !0 });
|
|
722
726
|
}), ve.current = !0));
|
|
723
|
-
}, "H"),
|
|
727
|
+
}, "H"), Q = /* @__PURE__ */ r(function() {
|
|
724
728
|
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
725
|
-
|
|
726
|
-
me.current.removeEventListener(
|
|
729
|
+
W && me.current && (ve.current || u) && (Ce.current.forEach(function(S) {
|
|
730
|
+
me.current.removeEventListener(S, Oe.current, { capture: !0 });
|
|
727
731
|
}), ve.current = !1);
|
|
728
|
-
}, "ee"),
|
|
729
|
-
return
|
|
730
|
-
}, [
|
|
731
|
-
return
|
|
732
|
-
}, [
|
|
733
|
-
return
|
|
734
|
-
}, [
|
|
732
|
+
}, "ee"), ee = g(function(u) {
|
|
733
|
+
return D.current ? !1 : (N(), H(), p.current = !1, I.current = !1, J.current = !1, R.current = 0, F.current = 0, f.current && !u && f.current.start(), Z(), !0);
|
|
734
|
+
}, [Y, p, D, C, f]), _e = g(function(u) {
|
|
735
|
+
return D.current ? !1 : (N(), H(), Ie.current = E(), $.current += E() - L.current, de.current += E() - L.current, $.current = 0, p.current = !1, I.current = !1, J.current = !1, R.current = 0, F.current = 0, f.current && !u && f.current.reset(), z || Z(), !0);
|
|
736
|
+
}, [Y, p, C, z, D, f]), vt = g(function(u) {
|
|
737
|
+
return D.current ? !1 : (N(), H(), (p.current || I.current) && De(), p.current = !1, I.current = !1, J.current = !1, R.current = 0, F.current = 0, Ie.current = E(), f.current && !u && f.current.activate(), Z(), !0);
|
|
738
|
+
}, [Y, p, I, D, C, f]), Me = g(function() {
|
|
735
739
|
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
736
|
-
return
|
|
737
|
-
}, [
|
|
740
|
+
return D.current || J.current ? !1 : (R.current = mt(), J.current = !0, Q(), N(), f.current && !u && f.current.pause(), !0);
|
|
741
|
+
}, [Y, D, f]), Ve = g(function() {
|
|
738
742
|
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
739
|
-
return
|
|
740
|
-
}, [
|
|
741
|
-
return f.current ? (
|
|
742
|
-
}, [se]),
|
|
743
|
+
return D.current || !J.current ? !1 : (J.current = !1, I.current || H(), p.current || Z(R.current), F.current && (F.current = E()), f.current && !u && f.current.resume(), !0);
|
|
744
|
+
}, [Y, C, D, R, f]), Ct = g(function(u, S) {
|
|
745
|
+
return f.current ? (S && ie.current(u, O), f.current.message(u)) : S && ie.current(u, O), !0;
|
|
746
|
+
}, [se]), Dt = g(function() {
|
|
743
747
|
return p.current;
|
|
744
|
-
}, [p]),
|
|
748
|
+
}, [p]), Nt = g(function() {
|
|
745
749
|
return I.current;
|
|
746
|
-
}, [I]),
|
|
750
|
+
}, [I]), jt = g(function() {
|
|
747
751
|
return f.current ? f.current.isLeader : null;
|
|
748
|
-
}, [f]),
|
|
752
|
+
}, [f]), _t = g(function() {
|
|
749
753
|
return f.current ? f.current.isLastActive : null;
|
|
750
|
-
}, [f]),
|
|
754
|
+
}, [f]), Vt = g(function() {
|
|
751
755
|
return f.current ? f.current.token : null;
|
|
752
|
-
}, [f]),
|
|
753
|
-
if (J.current) return
|
|
754
|
-
var u =
|
|
756
|
+
}, [f]), mt = g(function() {
|
|
757
|
+
if (J.current) return R.current;
|
|
758
|
+
var u = R.current ? R.current : K.current + C.current, S = x.current ? E() - x.current : 0, oe = Math.floor(u - S);
|
|
755
759
|
return oe < 0 ? 0 : Math.abs(oe);
|
|
756
|
-
}, [
|
|
757
|
-
return Math.round(E() -
|
|
758
|
-
}, [
|
|
759
|
-
return Math.round(E() -
|
|
760
|
-
}, [
|
|
761
|
-
return
|
|
762
|
-
}, [
|
|
763
|
-
return
|
|
764
|
-
}, [
|
|
765
|
-
return p.current ? Math.round(E() -
|
|
766
|
-
}, [
|
|
767
|
-
return p.current ? Math.round(E() -
|
|
768
|
-
}, [
|
|
769
|
-
var u = Math.round(
|
|
760
|
+
}, [C, K, I, R, x]), pt = g(function() {
|
|
761
|
+
return Math.round(E() - Ie.current);
|
|
762
|
+
}, [Ie]), gt = g(function() {
|
|
763
|
+
return Math.round(E() - st.current);
|
|
764
|
+
}, [st]), Bt = g(function() {
|
|
765
|
+
return L.current ? new Date(L.current) : null;
|
|
766
|
+
}, [L]), Gt = g(function() {
|
|
767
|
+
return x.current ? new Date(x.current) : null;
|
|
768
|
+
}, [x]), yt = g(function() {
|
|
769
|
+
return p.current ? Math.round(E() - L.current + $.current) : Math.round($.current);
|
|
770
|
+
}, [L, $]), Et = g(function() {
|
|
771
|
+
return p.current ? Math.round(E() - L.current + de.current) : Math.round(de.current);
|
|
772
|
+
}, [L, de]), Ut = g(function() {
|
|
773
|
+
var u = Math.round(pt() - yt());
|
|
770
774
|
return u >= 0 ? u : 0;
|
|
771
|
-
}, [
|
|
772
|
-
var u = Math.round(
|
|
775
|
+
}, [L, $]), zt = g(function() {
|
|
776
|
+
var u = Math.round(gt() - Et());
|
|
773
777
|
return u >= 0 ? u : 0;
|
|
774
|
-
}, [
|
|
778
|
+
}, [L, $]);
|
|
775
779
|
w(function() {
|
|
776
780
|
if (ce > 0 && le > 0) throw new Error("❌ onAction can either be throttled or debounced, not both.");
|
|
777
|
-
|
|
781
|
+
B && Pn(B);
|
|
778
782
|
var u = /* @__PURE__ */ r(function() {
|
|
779
|
-
f.current && f.current.close(), X.cancel && X.cancel(),
|
|
783
|
+
f.current && f.current.close(), X.cancel && X.cancel(), N(), Q(!0);
|
|
780
784
|
}, "i");
|
|
781
|
-
return
|
|
782
|
-
|
|
785
|
+
return W && window.addEventListener("beforeunload", u), function() {
|
|
786
|
+
W && window.removeEventListener("beforeunload", u), f.current && f.current.close(), X.cancel && X.cancel(), N(), Q(!0);
|
|
783
787
|
};
|
|
784
788
|
}, []), w(function() {
|
|
785
|
-
f.current && f.current.close(), ne ? f.current = new
|
|
786
|
-
|
|
789
|
+
f.current && f.current.close(), ne ? f.current = new _n({ channelName: rt, leaderElection: ut, onPrompt: /* @__PURE__ */ r(function() {
|
|
790
|
+
ht();
|
|
787
791
|
}, "onPrompt"), onIdle: /* @__PURE__ */ r(function() {
|
|
788
|
-
|
|
792
|
+
dt();
|
|
789
793
|
}, "onIdle"), onActive: /* @__PURE__ */ r(function() {
|
|
790
|
-
|
|
794
|
+
De();
|
|
791
795
|
}, "onActive"), onMessage: /* @__PURE__ */ r(function(u) {
|
|
792
|
-
ie.current(u,
|
|
793
|
-
}, "onMessage"), start:
|
|
794
|
-
}, [ne,
|
|
795
|
-
|
|
796
|
-
}, [
|
|
797
|
-
if (!
|
|
796
|
+
ie.current(u, O);
|
|
797
|
+
}, "onMessage"), start: ee, reset: _e, activate: vt, pause: Me, resume: Ve }) : f.current = null;
|
|
798
|
+
}, [ne, rt, ut, ke, Le, re, ie, ee, _e, Me, Ve]), w(function() {
|
|
799
|
+
q.current || (N(), Q(!0)), !(z || U) && (fe ? ee() : H());
|
|
800
|
+
}, [z, fe, U, q]), w(function() {
|
|
801
|
+
if (!q.current) {
|
|
798
802
|
var u = j(new Set(j(y).concat(j(A))).values());
|
|
799
|
-
if (
|
|
800
|
-
fe ?
|
|
803
|
+
if (Q(), Ce.current = u, me.current = c, lt.current = A, z || U) return;
|
|
804
|
+
fe ? ee() : H();
|
|
801
805
|
}
|
|
802
|
-
}, [c, JSON.stringify(y), JSON.stringify(A),
|
|
803
|
-
|
|
804
|
-
}, [
|
|
805
|
-
var
|
|
806
|
+
}, [c, JSON.stringify(y), JSON.stringify(A), q, U, z, fe]), w(function() {
|
|
807
|
+
q.current && (q.current = !1);
|
|
808
|
+
}, [q]);
|
|
809
|
+
var O = { message: Ct, start: ee, reset: _e, activate: vt, pause: Me, resume: Ve, isIdle: Dt, isPrompted: Nt, isLeader: jt, isLastActiveTab: _t, getTabId: Vt, getRemainingTime: mt, getElapsedTime: pt, getTotalElapsedTime: gt, getLastIdleTime: Bt, getLastActiveTime: Gt, getIdleTime: yt, getTotalIdleTime: Et, getActiveTime: Ut, getTotalActiveTime: zt, setOnPresenceChange: /* @__PURE__ */ r(function(u) {
|
|
806
810
|
G = u, pe.current = u;
|
|
807
811
|
}, "setOnPresenceChange"), setOnPrompt: /* @__PURE__ */ r(function(u) {
|
|
808
|
-
ye = u, Ie.current = u;
|
|
809
|
-
}, "setOnPrompt"), setOnIdle: /* @__PURE__ */ r(function(u) {
|
|
810
812
|
Ee = u, ke.current = u;
|
|
813
|
+
}, "setOnPrompt"), setOnIdle: /* @__PURE__ */ r(function(u) {
|
|
814
|
+
be = u, Le.current = u;
|
|
811
815
|
}, "setOnIdle"), setOnActive: /* @__PURE__ */ r(function(u) {
|
|
812
|
-
|
|
816
|
+
we = u, re.current = u;
|
|
813
817
|
}, "setOnActive"), setOnAction: /* @__PURE__ */ r(function(u) {
|
|
814
|
-
|
|
818
|
+
Te = u, Se.current = u;
|
|
815
819
|
}, "setOnAction"), setOnMessage: /* @__PURE__ */ r(function(u) {
|
|
816
820
|
se = u, ie.current = u;
|
|
817
821
|
}, "setOnMessage") };
|
|
818
|
-
return
|
|
819
|
-
}
|
|
820
|
-
r(
|
|
821
|
-
var
|
|
822
|
-
|
|
823
|
-
const Tt = 6e4,
|
|
824
|
-
function
|
|
825
|
-
return
|
|
826
|
-
}
|
|
827
|
-
r(
|
|
828
|
-
function
|
|
829
|
-
const t =
|
|
830
|
-
timeout: e ??
|
|
822
|
+
return O;
|
|
823
|
+
}
|
|
824
|
+
r(Un, "Te");
|
|
825
|
+
var zn = Zt(null);
|
|
826
|
+
zn.Consumer;
|
|
827
|
+
const Tt = 6e4, Fn = 36e5, At = "/auth/login";
|
|
828
|
+
function Jn(e) {
|
|
829
|
+
return Pe(e) ? Math.floor(e / 1e3) : "";
|
|
830
|
+
}
|
|
831
|
+
r(Jn, "millisToSeconds");
|
|
832
|
+
function ur({ timeout: e }) {
|
|
833
|
+
const t = un(), { pathname: n } = an(), { t: i } = kt(), { confirmInfo: o } = nn(), { resetStorage: h } = on(), [s, a] = Ge(!1), [c, l] = Ge(null), y = v(!1), { getRemainingTime: V, reset: B } = Un({
|
|
834
|
+
timeout: e ?? Fn,
|
|
831
835
|
events: [
|
|
832
836
|
"mousemove",
|
|
833
837
|
"keydown",
|
|
@@ -845,15 +849,15 @@ function Kn({ timeout: e }) {
|
|
|
845
849
|
});
|
|
846
850
|
w(() => {
|
|
847
851
|
const m = setInterval(() => {
|
|
848
|
-
l(
|
|
852
|
+
l(V());
|
|
849
853
|
}, 500);
|
|
850
854
|
return () => {
|
|
851
855
|
clearInterval(m);
|
|
852
856
|
};
|
|
853
|
-
}, [
|
|
857
|
+
}, [V]);
|
|
854
858
|
const T = g(() => {
|
|
855
|
-
a(!1),
|
|
856
|
-
}, [
|
|
859
|
+
a(!1), B();
|
|
860
|
+
}, [B]), A = g(async () => {
|
|
857
861
|
y.current || (y.current = !0, l(null), a(!1), await o({
|
|
858
862
|
title: i("Message.로그인 페이지로 이동합니다.", {
|
|
859
863
|
defaultValue: "로그인 페이지로 이동합니다."
|
|
@@ -865,17 +869,17 @@ function Kn({ timeout: e }) {
|
|
|
865
869
|
a(!1);
|
|
866
870
|
return;
|
|
867
871
|
}
|
|
868
|
-
if (!s &&
|
|
872
|
+
if (!s && Pe(c) && c > 0 && c <= Tt) {
|
|
869
873
|
a(!0);
|
|
870
874
|
return;
|
|
871
875
|
}
|
|
872
|
-
if (s &&
|
|
876
|
+
if (s && Pe(c) && c > Tt) {
|
|
873
877
|
T();
|
|
874
878
|
return;
|
|
875
879
|
}
|
|
876
|
-
|
|
877
|
-
}, [s, c, n, T, A]), /* @__PURE__ */
|
|
878
|
-
|
|
880
|
+
Pe(c) && c <= 0 && A();
|
|
881
|
+
}, [s, c, n, T, A]), /* @__PURE__ */ P(
|
|
882
|
+
Fe,
|
|
879
883
|
{
|
|
880
884
|
title: i("Title.로그인 연장", { defaultValue: "로그인 연장" }),
|
|
881
885
|
canConfirm: !1,
|
|
@@ -883,22 +887,89 @@ function Kn({ timeout: e }) {
|
|
|
883
887
|
onClose: /* @__PURE__ */ r(() => T(), "onClose"),
|
|
884
888
|
maxWidth: "xs",
|
|
885
889
|
fullWidth: !0,
|
|
886
|
-
children: /* @__PURE__ */
|
|
890
|
+
children: /* @__PURE__ */ P(It, { variant: "h6", children: i("Message.자동 로그아웃 남은 시간 안내", {
|
|
887
891
|
defaultValue: "{{seconds}}초 후 로그인 페이지로 이동합니다.",
|
|
888
|
-
seconds:
|
|
892
|
+
seconds: Jn(c)
|
|
889
893
|
}) })
|
|
890
894
|
}
|
|
891
895
|
);
|
|
892
896
|
}
|
|
893
|
-
r(
|
|
894
|
-
|
|
897
|
+
r(ur, "OwpAutoLogoutDialog");
|
|
898
|
+
function xt(e) {
|
|
899
|
+
var t, n, i = "";
|
|
900
|
+
if (typeof e == "string" || typeof e == "number") i += e;
|
|
901
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
902
|
+
var o = e.length;
|
|
903
|
+
for (t = 0; t < o; t++) e[t] && (n = xt(e[t])) && (i && (i += " "), i += n);
|
|
904
|
+
} else for (n in e) e[n] && (i && (i += " "), i += n);
|
|
905
|
+
return i;
|
|
906
|
+
}
|
|
907
|
+
r(xt, "r");
|
|
908
|
+
function qn() {
|
|
909
|
+
for (var e, t, n = 0, i = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = xt(e)) && (i && (i += " "), i += t);
|
|
910
|
+
return i;
|
|
911
|
+
}
|
|
912
|
+
r(qn, "clsx");
|
|
913
|
+
function ar(e) {
|
|
914
|
+
const { delay: t = 0, className: n } = e, [i, o] = Ge(!t);
|
|
915
|
+
return rn(() => {
|
|
916
|
+
o(!0);
|
|
917
|
+
}, t), /* @__PURE__ */ ge(
|
|
918
|
+
"div",
|
|
919
|
+
{
|
|
920
|
+
className: qn(
|
|
921
|
+
n,
|
|
922
|
+
"flex flex-1 h-full w-full self-center flex-col items-center justify-center p-24",
|
|
923
|
+
i ? "" : "hidden"
|
|
924
|
+
),
|
|
925
|
+
children: [
|
|
926
|
+
/* @__PURE__ */ P(cn, { className: "-mb-16 text-md font-medium sm:text-xl", color: "text.secondary" }),
|
|
927
|
+
/* @__PURE__ */ ge(
|
|
928
|
+
sn,
|
|
929
|
+
{
|
|
930
|
+
id: "spinner",
|
|
931
|
+
sx: {
|
|
932
|
+
"& > div": {
|
|
933
|
+
backgroundColor: "palette.secondary.main"
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
children: [
|
|
937
|
+
/* @__PURE__ */ P("div", { className: "bounce1" }),
|
|
938
|
+
/* @__PURE__ */ P("div", { className: "bounce2" }),
|
|
939
|
+
/* @__PURE__ */ P("div", { className: "bounce3" })
|
|
940
|
+
]
|
|
941
|
+
}
|
|
942
|
+
)
|
|
943
|
+
]
|
|
944
|
+
}
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
r(ar, "OwpLoading");
|
|
948
|
+
const sr = /* @__PURE__ */ r(({ loading: e, title: t }) => {
|
|
949
|
+
const { t: n } = kt(), i = t ?? n("Common.로딩 중...");
|
|
950
|
+
return /* @__PURE__ */ ge(
|
|
951
|
+
ln,
|
|
952
|
+
{
|
|
953
|
+
className: "flex flex-1 flex-col space-y-12",
|
|
954
|
+
sx: /* @__PURE__ */ r((o) => ({ color: "#fff", zIndex: o.zIndex.tooltip + 1 }), "sx"),
|
|
955
|
+
open: !!e,
|
|
956
|
+
children: [
|
|
957
|
+
/* @__PURE__ */ P(fn, { color: "inherit" }),
|
|
958
|
+
i && /* @__PURE__ */ P(It, { variant: "h6", children: i })
|
|
959
|
+
]
|
|
960
|
+
}
|
|
961
|
+
);
|
|
962
|
+
}, "OwpPageLockLoading"), cr = hn(/* @__PURE__ */ qt.jsx("path", {
|
|
895
963
|
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
896
964
|
}), "Close");
|
|
897
965
|
export {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
966
|
+
cr as C,
|
|
967
|
+
ar as O,
|
|
968
|
+
sr as a,
|
|
969
|
+
ur as b,
|
|
970
|
+
qn as c,
|
|
971
|
+
Fe as d,
|
|
972
|
+
or as e,
|
|
973
|
+
Pe as i
|
|
903
974
|
};
|
|
904
|
-
//# sourceMappingURL=Close-
|
|
975
|
+
//# sourceMappingURL=Close-DnXyQZKh.js.map
|