halo-fe 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -0
- package/dist/main.js +2539 -0
- package/dist/vendor-@monaco-editor-DKC4UNw_.js +258 -0
- package/dist/vendor-@vue-l0sNRNKZ.js +1 -0
- package/dist/vendor-axios-ud9O0vdJ.js +1670 -0
- package/dist/vendor-clone-NGbTzSwJ.js +159 -0
- package/dist/vendor-crypto-js-B6Qe-gIg.js +4995 -0
- package/dist/vendor-file-saver-DKXzEV2Q.js +74 -0
- package/dist/vendor-moment-h96o7c8I.js +2578 -0
- package/dist/vendor-pinia-DVLspbiC.js +310 -0
- package/dist/vendor-sprintf-js-BPTdvBYM.js +148 -0
- package/dist/vendor-state-local-CEworIRt.js +131 -0
- package/dist/vendor-underscore-DVTek3G4.js +1070 -0
- package/dist/vendor-underscore.string-vrHhfBaT.js +425 -0
- package/dist/vendor-util-deprecate-BfbfwJhs.js +28 -0
- package/dist/vendor-vue-demi-CIhrFbpB.js +17 -0
- package/esm/drivers/IDriver.d.ts +10 -0
- package/esm/drivers/cdns/Cdn.d.ts +14 -0
- package/esm/drivers/cdns/CdnFactory.d.ts +11 -0
- package/esm/drivers/cdns/ICdn.d.ts +34 -0
- package/esm/drivers/cdns/implements/BootCdn.d.ts +12 -0
- package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +13 -0
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +12 -0
- package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +16 -0
- package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +10 -0
- package/esm/drivers/cdns/index.d.ts +0 -0
- package/esm/drivers/driver-helper.d.ts +46 -0
- package/esm/drivers/encoders/Encoder.d.ts +11 -0
- package/esm/drivers/encoders/EncoderFactory.d.ts +16 -0
- package/esm/drivers/encoders/IEncoder.d.ts +22 -0
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +11 -0
- package/esm/drivers/encoders/index.d.ts +0 -0
- package/esm/drivers/excels/ExcelFactory.d.ts +11 -0
- package/esm/drivers/excels/IExcel.d.ts +18 -0
- package/esm/drivers/excels/implements/XlsxExcel.d.ts +10 -0
- package/esm/drivers/excels/index.d.ts +2 -0
- package/esm/drivers/explainers/Explainer.d.ts +4 -0
- package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -0
- package/esm/drivers/explainers/IExplainer.d.ts +3 -0
- package/esm/drivers/explainers/implement/JsonExplainer.d.ts +4 -0
- package/esm/drivers/explainers/index.d.ts +0 -0
- package/esm/drivers/factories/DriverFactory.d.ts +19 -0
- package/esm/drivers/factories/Factory.d.ts +8 -0
- package/esm/drivers/factories/IFactory.d.ts +10 -0
- package/esm/drivers/factories/index.d.ts +2 -0
- package/esm/drivers/features/FeatureFactory.d.ts +11 -0
- package/esm/drivers/features/IFeature.d.ts +23 -0
- package/esm/drivers/features/implements/ExpressionFeature.d.ts +12 -0
- package/esm/drivers/features/implements/I18NFeature.d.ts +12 -0
- package/esm/drivers/features/implements/SortFeature.d.ts +13 -0
- package/esm/drivers/features/index.d.ts +2 -0
- package/esm/drivers/hashers/Hasher.d.ts +10 -0
- package/esm/drivers/hashers/HasherFactory.d.ts +13 -0
- package/esm/drivers/hashers/IHasher.d.ts +19 -0
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +10 -0
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +10 -0
- package/esm/drivers/hashers/index.d.ts +2 -0
- package/esm/drivers/index.d.ts +10 -0
- package/esm/drivers/providers/IProvider.d.ts +47 -0
- package/esm/drivers/providers/ProviderFactory.d.ts +11 -0
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +55 -0
- package/esm/drivers/providers/index.d.ts +2 -0
- package/esm/drivers/requesters/IRequester.d.ts +21 -0
- package/esm/drivers/requesters/Requester.d.ts +12 -0
- package/esm/drivers/requesters/RequesterFactory.d.ts +23 -0
- package/esm/drivers/requesters/entities/HttpRequest.d.ts +34 -0
- package/esm/drivers/requesters/entities/HttpResponse.d.ts +19 -0
- package/esm/drivers/requesters/implements/DefaultRequester.d.ts +12 -0
- package/esm/drivers/requesters/implements/LocalRequester.d.ts +43 -0
- package/esm/drivers/requesters/implements/MkRequester.d.ts +40 -0
- package/esm/drivers/requesters/index.d.ts +5 -0
- package/esm/drivers/signers/ISigner.d.ts +33 -0
- package/esm/drivers/signers/SignerFactory.d.ts +11 -0
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +18 -0
- package/esm/drivers/signers/index.d.ts +2 -0
- package/esm/drivers/ssos/ISso.d.ts +41 -0
- package/esm/drivers/ssos/SsoFactory.d.ts +11 -0
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +18 -0
- package/esm/drivers/ssos/implements/BearerSso.d.ts +24 -0
- package/esm/drivers/ssos/implements/NioSso.d.ts +23 -0
- package/esm/drivers/ssos/implements/SecretSso.d.ts +20 -0
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +20 -0
- package/esm/drivers/ssos/index.d.ts +2 -0
- package/esm/helpers/array-helper.d.ts +97 -0
- package/esm/helpers/component-helper.d.ts +10 -0
- package/esm/helpers/cookie-helper.d.ts +6 -0
- package/esm/helpers/dictionary-helper.d.ts +18 -0
- package/esm/helpers/dom-helper.d.ts +86 -0
- package/esm/helpers/event-helper.d.ts +30 -0
- package/esm/helpers/file-helper.d.ts +22 -0
- package/esm/helpers/html-helper.d.ts +10 -0
- package/esm/helpers/i18n-helper.d.ts +14 -0
- package/esm/helpers/image-helper.d.ts +10 -0
- package/esm/helpers/index.d.ts +26 -0
- package/esm/helpers/json-helper.d.ts +31 -0
- package/esm/helpers/math-helper.d.ts +46 -0
- package/esm/helpers/micro-helper.d.ts +10 -0
- package/esm/helpers/mount-helper.d.ts +14 -0
- package/esm/helpers/object-helper.d.ts +34 -0
- package/esm/helpers/script-helper.d.ts +31 -0
- package/esm/helpers/scroll-helper.d.ts +14 -0
- package/esm/helpers/sign-helper.d.ts +14 -0
- package/esm/helpers/storage-helper.d.ts +34 -0
- package/esm/helpers/string-helper.d.ts +94 -0
- package/esm/helpers/task-helper.d.ts +26 -0
- package/esm/helpers/time-helper.d.ts +62 -0
- package/esm/helpers/tree-helper.d.ts +54 -0
- package/esm/helpers/type-helper.d.ts +26 -0
- package/esm/helpers/url-helper.d.ts +96 -0
- package/esm/main.d.ts +3 -0
- package/esm/services/SettingService.d.ts +5 -0
- package/esm/services/index.d.ts +15 -0
- package/esm/stores/config.d.ts +59 -0
- package/esm/stores/driver.d.ts +41 -0
- package/esm/stores/env.d.ts +12 -0
- package/esm/stores/index.d.ts +7 -0
- package/esm/stores/log.d.ts +20 -0
- package/esm/stores/setting.d.ts +47 -0
- package/esm/stores/socket.d.ts +27 -0
- package/esm/stores/user.d.ts +44 -0
- package/esm/thirds/index.d.ts +8 -0
- package/esm/vite.config.d.ts +6 -0
- package/package.json +52 -0
@@ -0,0 +1,310 @@
|
|
1
|
+
import { i as rt, s as $, d as R } from "./vendor-vue-demi-CIhrFbpB.js";
|
2
|
+
import { hasInjectionContext as ct, inject as at, getCurrentInstance as ut, ref as Z, watch as it, reactive as ft, markRaw as S, effectScope as lt, isRef as x, isReactive as A, toRef as L, toRaw as pt, nextTick as B, computed as G, getCurrentScope as dt, onScopeDispose as ht, toRefs as M } from "vue";
|
3
|
+
/*!
|
4
|
+
* pinia v2.1.7
|
5
|
+
* (c) 2023 Eduardo San Martin Morote
|
6
|
+
* @license MIT
|
7
|
+
*/
|
8
|
+
let j;
|
9
|
+
const k = (t) => j = t, Et = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
10
|
+
/* istanbul ignore next */
|
11
|
+
Symbol()
|
12
|
+
);
|
13
|
+
function g(t) {
|
14
|
+
return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
|
15
|
+
}
|
16
|
+
var w;
|
17
|
+
(function(t) {
|
18
|
+
t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
|
19
|
+
})(w || (w = {}));
|
20
|
+
const H = typeof window < "u", U = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && H;
|
21
|
+
function K(t, a) {
|
22
|
+
for (const r in a) {
|
23
|
+
const o = a[r];
|
24
|
+
if (!(r in t))
|
25
|
+
continue;
|
26
|
+
const c = t[r];
|
27
|
+
g(c) && g(o) && !x(o) && !A(o) ? t[r] = K(c, o) : t[r] = o;
|
28
|
+
}
|
29
|
+
return t;
|
30
|
+
}
|
31
|
+
const tt = () => {
|
32
|
+
};
|
33
|
+
function Q(t, a, r, o = tt) {
|
34
|
+
t.push(a);
|
35
|
+
const c = () => {
|
36
|
+
const f = t.indexOf(a);
|
37
|
+
f > -1 && (t.splice(f, 1), o());
|
38
|
+
};
|
39
|
+
return !r && dt() && ht(c), c;
|
40
|
+
}
|
41
|
+
function V(t, ...a) {
|
42
|
+
t.slice().forEach((r) => {
|
43
|
+
r(...a);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
const _t = (t) => t();
|
47
|
+
function F(t, a) {
|
48
|
+
t instanceof Map && a instanceof Map && a.forEach((r, o) => t.set(o, r)), t instanceof Set && a instanceof Set && a.forEach(t.add, t);
|
49
|
+
for (const r in a) {
|
50
|
+
if (!a.hasOwnProperty(r))
|
51
|
+
continue;
|
52
|
+
const o = a[r], c = t[r];
|
53
|
+
g(c) && g(o) && t.hasOwnProperty(r) && !x(o) && !A(o) ? t[r] = F(c, o) : t[r] = o;
|
54
|
+
}
|
55
|
+
return t;
|
56
|
+
}
|
57
|
+
const vt = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
58
|
+
/* istanbul ignore next */
|
59
|
+
Symbol()
|
60
|
+
);
|
61
|
+
function Nt(t) {
|
62
|
+
return !g(t) || !t.hasOwnProperty(vt);
|
63
|
+
}
|
64
|
+
const { assign: y } = Object;
|
65
|
+
function X(t) {
|
66
|
+
return !!(x(t) && t.effect);
|
67
|
+
}
|
68
|
+
function Y(t, a, r, o) {
|
69
|
+
const { state: c, actions: f, getters: h } = a, i = r.state.value[t];
|
70
|
+
let b;
|
71
|
+
function E() {
|
72
|
+
!i && (process.env.NODE_ENV === "production" || !o) && (r.state.value[t] = c ? c() : {});
|
73
|
+
const _ = process.env.NODE_ENV !== "production" && o ? (
|
74
|
+
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
75
|
+
M(Z(c ? c() : {}).value)
|
76
|
+
) : M(r.state.value[t]);
|
77
|
+
return y(_, f, Object.keys(h || {}).reduce((l, p) => (process.env.NODE_ENV !== "production" && p in _ && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${t}".`), l[p] = S(G(() => {
|
78
|
+
k(r);
|
79
|
+
const v = r._s.get(t);
|
80
|
+
return h[p].call(v, v);
|
81
|
+
})), l), {}));
|
82
|
+
}
|
83
|
+
return b = W(t, E, a, r, o, !0), b;
|
84
|
+
}
|
85
|
+
function W(t, a, r = {}, o, c, f) {
|
86
|
+
let h;
|
87
|
+
const i = y({ actions: {} }, r);
|
88
|
+
if (process.env.NODE_ENV !== "production" && !o._e.active)
|
89
|
+
throw new Error("Pinia destroyed");
|
90
|
+
const b = {
|
91
|
+
deep: !0
|
92
|
+
// flush: 'post',
|
93
|
+
};
|
94
|
+
process.env.NODE_ENV !== "production" && !rt && (b.onTrigger = (s) => {
|
95
|
+
E ? v = s : E == !1 && !n._hotUpdating && (Array.isArray(v) ? v.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
96
|
+
});
|
97
|
+
let E, _, l = [], p = [], v;
|
98
|
+
const O = o.state.value[t];
|
99
|
+
!f && !O && (process.env.NODE_ENV === "production" || !c) && (o.state.value[t] = {});
|
100
|
+
const I = Z({});
|
101
|
+
let J;
|
102
|
+
function T(s) {
|
103
|
+
let e;
|
104
|
+
E = _ = !1, process.env.NODE_ENV !== "production" && (v = []), typeof s == "function" ? (s(o.state.value[t]), e = {
|
105
|
+
type: w.patchFunction,
|
106
|
+
storeId: t,
|
107
|
+
events: v
|
108
|
+
}) : (F(o.state.value[t], s), e = {
|
109
|
+
type: w.patchObject,
|
110
|
+
payload: s,
|
111
|
+
storeId: t,
|
112
|
+
events: v
|
113
|
+
});
|
114
|
+
const u = J = Symbol();
|
115
|
+
B().then(() => {
|
116
|
+
J === u && (E = !0);
|
117
|
+
}), _ = !0, V(l, e, o.state.value[t]);
|
118
|
+
}
|
119
|
+
const et = f ? function() {
|
120
|
+
const { state: e } = r, u = e ? e() : {};
|
121
|
+
this.$patch((d) => {
|
122
|
+
y(d, u);
|
123
|
+
});
|
124
|
+
} : (
|
125
|
+
/* istanbul ignore next */
|
126
|
+
process.env.NODE_ENV !== "production" ? () => {
|
127
|
+
throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`);
|
128
|
+
} : tt
|
129
|
+
);
|
130
|
+
function ot() {
|
131
|
+
h.stop(), l = [], p = [], o._s.delete(t);
|
132
|
+
}
|
133
|
+
function q(s, e) {
|
134
|
+
return function() {
|
135
|
+
k(o);
|
136
|
+
const u = Array.from(arguments), d = [], P = [];
|
137
|
+
function st(N) {
|
138
|
+
d.push(N);
|
139
|
+
}
|
140
|
+
function nt(N) {
|
141
|
+
P.push(N);
|
142
|
+
}
|
143
|
+
V(p, {
|
144
|
+
args: u,
|
145
|
+
name: s,
|
146
|
+
store: n,
|
147
|
+
after: st,
|
148
|
+
onError: nt
|
149
|
+
});
|
150
|
+
let D;
|
151
|
+
try {
|
152
|
+
D = e.apply(this && this.$id === t ? this : n, u);
|
153
|
+
} catch (N) {
|
154
|
+
throw V(P, N), N;
|
155
|
+
}
|
156
|
+
return D instanceof Promise ? D.then((N) => (V(d, N), N)).catch((N) => (V(P, N), Promise.reject(N))) : (V(d, D), D);
|
157
|
+
};
|
158
|
+
}
|
159
|
+
const C = /* @__PURE__ */ S({
|
160
|
+
actions: {},
|
161
|
+
getters: {},
|
162
|
+
state: [],
|
163
|
+
hotState: I
|
164
|
+
}), z = {
|
165
|
+
_p: o,
|
166
|
+
// _s: scope,
|
167
|
+
$id: t,
|
168
|
+
$onAction: Q.bind(null, p),
|
169
|
+
$patch: T,
|
170
|
+
$reset: et,
|
171
|
+
$subscribe(s, e = {}) {
|
172
|
+
const u = Q(l, s, e.detached, () => d()), d = h.run(() => it(() => o.state.value[t], (P) => {
|
173
|
+
(e.flush === "sync" ? _ : E) && s({
|
174
|
+
storeId: t,
|
175
|
+
type: w.direct,
|
176
|
+
events: v
|
177
|
+
}, P);
|
178
|
+
}, y({}, b, e)));
|
179
|
+
return u;
|
180
|
+
},
|
181
|
+
$dispose: ot
|
182
|
+
}, n = ft(process.env.NODE_ENV !== "production" || U ? y(
|
183
|
+
{
|
184
|
+
_hmrPayload: C,
|
185
|
+
_customProperties: S(/* @__PURE__ */ new Set())
|
186
|
+
// devtools custom properties
|
187
|
+
},
|
188
|
+
z
|
189
|
+
// must be added later
|
190
|
+
// setupStore
|
191
|
+
) : z);
|
192
|
+
o._s.set(t, n);
|
193
|
+
const m = (o._a && o._a.runWithContext || _t)(() => o._e.run(() => (h = lt()).run(a)));
|
194
|
+
for (const s in m) {
|
195
|
+
const e = m[s];
|
196
|
+
if (x(e) && !X(e) || A(e))
|
197
|
+
process.env.NODE_ENV !== "production" && c ? $(I.value, s, L(m, s)) : f || (O && Nt(e) && (x(e) ? e.value = O[s] : F(e, O[s])), o.state.value[t][s] = e), process.env.NODE_ENV !== "production" && C.state.push(s);
|
198
|
+
else if (typeof e == "function") {
|
199
|
+
const u = process.env.NODE_ENV !== "production" && c ? e : q(s, e);
|
200
|
+
m[s] = u, process.env.NODE_ENV !== "production" && (C.actions[s] = e), i.actions[s] = e;
|
201
|
+
} else process.env.NODE_ENV !== "production" && X(e) && (C.getters[s] = f ? (
|
202
|
+
// @ts-expect-error
|
203
|
+
r.getters[s]
|
204
|
+
) : e, H && (m._getters || // @ts-expect-error: same
|
205
|
+
(m._getters = S([]))).push(s));
|
206
|
+
}
|
207
|
+
if (y(n, m), y(pt(n), m), Object.defineProperty(n, "$state", {
|
208
|
+
get: () => process.env.NODE_ENV !== "production" && c ? I.value : o.state.value[t],
|
209
|
+
set: (s) => {
|
210
|
+
if (process.env.NODE_ENV !== "production" && c)
|
211
|
+
throw new Error("cannot set hotState");
|
212
|
+
T((e) => {
|
213
|
+
y(e, s);
|
214
|
+
});
|
215
|
+
}
|
216
|
+
}), process.env.NODE_ENV !== "production" && (n._hotUpdate = S((s) => {
|
217
|
+
n._hotUpdating = !0, s._hmrPayload.state.forEach((e) => {
|
218
|
+
if (e in n.$state) {
|
219
|
+
const u = s.$state[e], d = n.$state[e];
|
220
|
+
typeof u == "object" && g(u) && g(d) ? K(u, d) : s.$state[e] = d;
|
221
|
+
}
|
222
|
+
$(n, e, L(s.$state, e));
|
223
|
+
}), Object.keys(n.$state).forEach((e) => {
|
224
|
+
e in s.$state || R(n, e);
|
225
|
+
}), E = !1, _ = !1, o.state.value[t] = L(s._hmrPayload, "hotState"), _ = !0, B().then(() => {
|
226
|
+
E = !0;
|
227
|
+
});
|
228
|
+
for (const e in s._hmrPayload.actions) {
|
229
|
+
const u = s[e];
|
230
|
+
$(n, e, q(e, u));
|
231
|
+
}
|
232
|
+
for (const e in s._hmrPayload.getters) {
|
233
|
+
const u = s._hmrPayload.getters[e], d = f ? (
|
234
|
+
// special handling of options api
|
235
|
+
G(() => (k(o), u.call(n, n)))
|
236
|
+
) : u;
|
237
|
+
$(n, e, d);
|
238
|
+
}
|
239
|
+
Object.keys(n._hmrPayload.getters).forEach((e) => {
|
240
|
+
e in s._hmrPayload.getters || R(n, e);
|
241
|
+
}), Object.keys(n._hmrPayload.actions).forEach((e) => {
|
242
|
+
e in s._hmrPayload.actions || R(n, e);
|
243
|
+
}), n._hmrPayload = s._hmrPayload, n._getters = s._getters, n._hotUpdating = !1;
|
244
|
+
})), U) {
|
245
|
+
const s = {
|
246
|
+
writable: !0,
|
247
|
+
configurable: !0,
|
248
|
+
// avoid warning on devtools trying to display this property
|
249
|
+
enumerable: !1
|
250
|
+
};
|
251
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((e) => {
|
252
|
+
Object.defineProperty(n, e, y({ value: n[e] }, s));
|
253
|
+
});
|
254
|
+
}
|
255
|
+
return o._p.forEach((s) => {
|
256
|
+
if (U) {
|
257
|
+
const e = h.run(() => s({
|
258
|
+
store: n,
|
259
|
+
app: o._a,
|
260
|
+
pinia: o,
|
261
|
+
options: i
|
262
|
+
}));
|
263
|
+
Object.keys(e || {}).forEach((u) => n._customProperties.add(u)), y(n, e);
|
264
|
+
} else
|
265
|
+
y(n, h.run(() => s({
|
266
|
+
store: n,
|
267
|
+
app: o._a,
|
268
|
+
pinia: o,
|
269
|
+
options: i
|
270
|
+
})));
|
271
|
+
}), process.env.NODE_ENV !== "production" && n.$state && typeof n.$state == "object" && typeof n.$state.constructor == "function" && !n.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
272
|
+
state: () => new MyClass()
|
273
|
+
Found in store "${n.$id}".`), O && f && r.hydrate && r.hydrate(n.$state, O), E = !0, _ = !0, n;
|
274
|
+
}
|
275
|
+
function gt(t, a, r) {
|
276
|
+
let o, c;
|
277
|
+
const f = typeof a == "function";
|
278
|
+
if (typeof t == "string")
|
279
|
+
o = t, c = f ? r : a;
|
280
|
+
else if (c = t, o = t.id, process.env.NODE_ENV !== "production" && typeof o != "string")
|
281
|
+
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
282
|
+
function h(i, b) {
|
283
|
+
const E = ct();
|
284
|
+
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
285
|
+
// pinia instance with getActivePinia()
|
286
|
+
(process.env.NODE_ENV === "test" && j && j._testing ? null : i) || (E ? at(Et, null) : null), i && k(i), process.env.NODE_ENV !== "production" && !j)
|
287
|
+
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
288
|
+
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
289
|
+
This will fail in production.`);
|
290
|
+
i = j, i._s.has(o) || (f ? W(o, a, c, i) : Y(o, c, i), process.env.NODE_ENV !== "production" && (h._pinia = i));
|
291
|
+
const _ = i._s.get(o);
|
292
|
+
if (process.env.NODE_ENV !== "production" && b) {
|
293
|
+
const l = "__hot:" + o, p = f ? W(l, a, c, i, !0) : Y(l, y({}, c), i, !0);
|
294
|
+
b._hotUpdate(p), delete i.state.value[l], i._s.delete(l);
|
295
|
+
}
|
296
|
+
if (process.env.NODE_ENV !== "production" && H) {
|
297
|
+
const l = ut();
|
298
|
+
if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
|
299
|
+
!b) {
|
300
|
+
const p = l.proxy, v = "_pStores" in p ? p._pStores : p._pStores = {};
|
301
|
+
v[o] = _;
|
302
|
+
}
|
303
|
+
}
|
304
|
+
return _;
|
305
|
+
}
|
306
|
+
return h.$id = o, h;
|
307
|
+
}
|
308
|
+
export {
|
309
|
+
gt as d
|
310
|
+
};
|
@@ -0,0 +1,148 @@
|
|
1
|
+
var y = {}, x;
|
2
|
+
function S() {
|
3
|
+
return x || (x = 1, function(k) {
|
4
|
+
(function() {
|
5
|
+
var i = {
|
6
|
+
not_string: /[^s]/,
|
7
|
+
not_bool: /[^t]/,
|
8
|
+
not_type: /[^T]/,
|
9
|
+
not_primitive: /[^v]/,
|
10
|
+
number: /[diefg]/,
|
11
|
+
numeric_arg: /[bcdiefguxX]/,
|
12
|
+
json: /[j]/,
|
13
|
+
not_json: /[^j]/,
|
14
|
+
text: /^[^\x25]+/,
|
15
|
+
modulo: /^\x25{2}/,
|
16
|
+
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
|
17
|
+
key: /^([a-z_][a-z_\d]*)/i,
|
18
|
+
key_access: /^\.([a-z_][a-z_\d]*)/i,
|
19
|
+
index_access: /^\[(\d+)\]/,
|
20
|
+
sign: /^[+-]/
|
21
|
+
};
|
22
|
+
function f(t) {
|
23
|
+
return _(v(t), arguments);
|
24
|
+
}
|
25
|
+
function w(t, o) {
|
26
|
+
return f.apply(null, [t].concat(o || []));
|
27
|
+
}
|
28
|
+
function _(t, o) {
|
29
|
+
var n = 1, c = t.length, e, p = "", a, s, r, l, d, h, b, u;
|
30
|
+
for (a = 0; a < c; a++)
|
31
|
+
if (typeof t[a] == "string")
|
32
|
+
p += t[a];
|
33
|
+
else if (typeof t[a] == "object") {
|
34
|
+
if (r = t[a], r.keys)
|
35
|
+
for (e = o[n], s = 0; s < r.keys.length; s++) {
|
36
|
+
if (e == null)
|
37
|
+
throw new Error(f('[sprintf] Cannot access property "%s" of undefined value "%s"', r.keys[s], r.keys[s - 1]));
|
38
|
+
e = e[r.keys[s]];
|
39
|
+
}
|
40
|
+
else r.param_no ? e = o[r.param_no] : e = o[n++];
|
41
|
+
if (i.not_type.test(r.type) && i.not_primitive.test(r.type) && e instanceof Function && (e = e()), i.numeric_arg.test(r.type) && typeof e != "number" && isNaN(e))
|
42
|
+
throw new TypeError(f("[sprintf] expecting number but found %T", e));
|
43
|
+
switch (i.number.test(r.type) && (b = e >= 0), r.type) {
|
44
|
+
case "b":
|
45
|
+
e = parseInt(e, 10).toString(2);
|
46
|
+
break;
|
47
|
+
case "c":
|
48
|
+
e = String.fromCharCode(parseInt(e, 10));
|
49
|
+
break;
|
50
|
+
case "d":
|
51
|
+
case "i":
|
52
|
+
e = parseInt(e, 10);
|
53
|
+
break;
|
54
|
+
case "j":
|
55
|
+
e = JSON.stringify(e, null, r.width ? parseInt(r.width) : 0);
|
56
|
+
break;
|
57
|
+
case "e":
|
58
|
+
e = r.precision ? parseFloat(e).toExponential(r.precision) : parseFloat(e).toExponential();
|
59
|
+
break;
|
60
|
+
case "f":
|
61
|
+
e = r.precision ? parseFloat(e).toFixed(r.precision) : parseFloat(e);
|
62
|
+
break;
|
63
|
+
case "g":
|
64
|
+
e = r.precision ? String(Number(e.toPrecision(r.precision))) : parseFloat(e);
|
65
|
+
break;
|
66
|
+
case "o":
|
67
|
+
e = (parseInt(e, 10) >>> 0).toString(8);
|
68
|
+
break;
|
69
|
+
case "s":
|
70
|
+
e = String(e), e = r.precision ? e.substring(0, r.precision) : e;
|
71
|
+
break;
|
72
|
+
case "t":
|
73
|
+
e = String(!!e), e = r.precision ? e.substring(0, r.precision) : e;
|
74
|
+
break;
|
75
|
+
case "T":
|
76
|
+
e = Object.prototype.toString.call(e).slice(8, -1).toLowerCase(), e = r.precision ? e.substring(0, r.precision) : e;
|
77
|
+
break;
|
78
|
+
case "u":
|
79
|
+
e = parseInt(e, 10) >>> 0;
|
80
|
+
break;
|
81
|
+
case "v":
|
82
|
+
e = e.valueOf(), e = r.precision ? e.substring(0, r.precision) : e;
|
83
|
+
break;
|
84
|
+
case "x":
|
85
|
+
e = (parseInt(e, 10) >>> 0).toString(16);
|
86
|
+
break;
|
87
|
+
case "X":
|
88
|
+
e = (parseInt(e, 10) >>> 0).toString(16).toUpperCase();
|
89
|
+
break;
|
90
|
+
}
|
91
|
+
i.json.test(r.type) ? p += e : (i.number.test(r.type) && (!b || r.sign) ? (u = b ? "+" : "-", e = e.toString().replace(i.sign, "")) : u = "", d = r.pad_char ? r.pad_char === "0" ? "0" : r.pad_char.charAt(1) : " ", h = r.width - (u + e).length, l = r.width && h > 0 ? d.repeat(h) : "", p += r.align ? u + e + l : d === "0" ? u + l + e : l + u + e);
|
92
|
+
}
|
93
|
+
return p;
|
94
|
+
}
|
95
|
+
var g = /* @__PURE__ */ Object.create(null);
|
96
|
+
function v(t) {
|
97
|
+
if (g[t])
|
98
|
+
return g[t];
|
99
|
+
for (var o = t, n, c = [], e = 0; o; ) {
|
100
|
+
if ((n = i.text.exec(o)) !== null)
|
101
|
+
c.push(n[0]);
|
102
|
+
else if ((n = i.modulo.exec(o)) !== null)
|
103
|
+
c.push("%");
|
104
|
+
else if ((n = i.placeholder.exec(o)) !== null) {
|
105
|
+
if (n[2]) {
|
106
|
+
e |= 1;
|
107
|
+
var p = [], a = n[2], s = [];
|
108
|
+
if ((s = i.key.exec(a)) !== null)
|
109
|
+
for (p.push(s[1]); (a = a.substring(s[0].length)) !== ""; )
|
110
|
+
if ((s = i.key_access.exec(a)) !== null)
|
111
|
+
p.push(s[1]);
|
112
|
+
else if ((s = i.index_access.exec(a)) !== null)
|
113
|
+
p.push(s[1]);
|
114
|
+
else
|
115
|
+
throw new SyntaxError("[sprintf] failed to parse named argument key");
|
116
|
+
else
|
117
|
+
throw new SyntaxError("[sprintf] failed to parse named argument key");
|
118
|
+
n[2] = p;
|
119
|
+
} else
|
120
|
+
e |= 2;
|
121
|
+
if (e === 3)
|
122
|
+
throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");
|
123
|
+
c.push(
|
124
|
+
{
|
125
|
+
placeholder: n[0],
|
126
|
+
param_no: n[1],
|
127
|
+
keys: n[2],
|
128
|
+
sign: n[3],
|
129
|
+
pad_char: n[4],
|
130
|
+
align: n[5],
|
131
|
+
width: n[6],
|
132
|
+
precision: n[7],
|
133
|
+
type: n[8]
|
134
|
+
}
|
135
|
+
);
|
136
|
+
} else
|
137
|
+
throw new SyntaxError("[sprintf] unexpected placeholder");
|
138
|
+
o = o.substring(n[0].length);
|
139
|
+
}
|
140
|
+
return g[t] = c;
|
141
|
+
}
|
142
|
+
k.sprintf = f, k.vsprintf = w, typeof window < "u" && (window.sprintf = f, window.vsprintf = w);
|
143
|
+
})();
|
144
|
+
}(y)), y;
|
145
|
+
}
|
146
|
+
export {
|
147
|
+
S as r
|
148
|
+
};
|
@@ -0,0 +1,131 @@
|
|
1
|
+
function O(e, t, n) {
|
2
|
+
return t in e ? Object.defineProperty(e, t, {
|
3
|
+
value: n,
|
4
|
+
enumerable: !0,
|
5
|
+
configurable: !0,
|
6
|
+
writable: !0
|
7
|
+
}) : e[t] = n, e;
|
8
|
+
}
|
9
|
+
function g(e, t) {
|
10
|
+
var n = Object.keys(e);
|
11
|
+
if (Object.getOwnPropertySymbols) {
|
12
|
+
var r = Object.getOwnPropertySymbols(e);
|
13
|
+
t && (r = r.filter(function(i) {
|
14
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
15
|
+
})), n.push.apply(n, r);
|
16
|
+
}
|
17
|
+
return n;
|
18
|
+
}
|
19
|
+
function v(e) {
|
20
|
+
for (var t = 1; t < arguments.length; t++) {
|
21
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
22
|
+
t % 2 ? g(Object(n), !0).forEach(function(r) {
|
23
|
+
O(e, r, n[r]);
|
24
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : g(Object(n)).forEach(function(r) {
|
25
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
26
|
+
});
|
27
|
+
}
|
28
|
+
return e;
|
29
|
+
}
|
30
|
+
function y() {
|
31
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
32
|
+
t[n] = arguments[n];
|
33
|
+
return function(r) {
|
34
|
+
return t.reduceRight(function(i, a) {
|
35
|
+
return a(i);
|
36
|
+
}, r);
|
37
|
+
};
|
38
|
+
}
|
39
|
+
function c(e) {
|
40
|
+
return function t() {
|
41
|
+
for (var n = this, r = arguments.length, i = new Array(r), a = 0; a < r; a++)
|
42
|
+
i[a] = arguments[a];
|
43
|
+
return i.length >= e.length ? e.apply(this, i) : function() {
|
44
|
+
for (var f = arguments.length, s = new Array(f), o = 0; o < f; o++)
|
45
|
+
s[o] = arguments[o];
|
46
|
+
return t.apply(n, [].concat(i, s));
|
47
|
+
};
|
48
|
+
};
|
49
|
+
}
|
50
|
+
function h(e) {
|
51
|
+
return {}.toString.call(e).includes("Object");
|
52
|
+
}
|
53
|
+
function m(e) {
|
54
|
+
return !Object.keys(e).length;
|
55
|
+
}
|
56
|
+
function l(e) {
|
57
|
+
return typeof e == "function";
|
58
|
+
}
|
59
|
+
function j(e, t) {
|
60
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
61
|
+
}
|
62
|
+
function w(e, t) {
|
63
|
+
return h(t) || u("changeType"), Object.keys(t).some(function(n) {
|
64
|
+
return !j(e, n);
|
65
|
+
}) && u("changeField"), t;
|
66
|
+
}
|
67
|
+
function P(e) {
|
68
|
+
l(e) || u("selectorType");
|
69
|
+
}
|
70
|
+
function T(e) {
|
71
|
+
l(e) || h(e) || u("handlerType"), h(e) && Object.values(e).some(function(t) {
|
72
|
+
return !l(t);
|
73
|
+
}) && u("handlersType");
|
74
|
+
}
|
75
|
+
function S(e) {
|
76
|
+
e || u("initialIsRequired"), h(e) || u("initialType"), m(e) && u("initialContent");
|
77
|
+
}
|
78
|
+
function E(e, t) {
|
79
|
+
throw new Error(e[t] || e.default);
|
80
|
+
}
|
81
|
+
var D = {
|
82
|
+
initialIsRequired: "initial state is required",
|
83
|
+
initialType: "initial state should be an object",
|
84
|
+
initialContent: "initial state shouldn't be an empty object",
|
85
|
+
handlerType: "handler should be an object or a function",
|
86
|
+
handlersType: "all handlers should be a functions",
|
87
|
+
selectorType: "selector should be a function",
|
88
|
+
changeType: "provided value of changes should be an object",
|
89
|
+
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
|
90
|
+
default: "an unknown error accured in `state-local` package"
|
91
|
+
}, u = c(E)(D), p = {
|
92
|
+
changes: w,
|
93
|
+
selector: P,
|
94
|
+
handler: T,
|
95
|
+
initial: S
|
96
|
+
};
|
97
|
+
function q(e) {
|
98
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
99
|
+
p.initial(e), p.handler(t);
|
100
|
+
var n = {
|
101
|
+
current: e
|
102
|
+
}, r = c(I)(n, t), i = c(F)(n), a = c(p.changes)(e), f = c(C)(n);
|
103
|
+
function s() {
|
104
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(b) {
|
105
|
+
return b;
|
106
|
+
};
|
107
|
+
return p.selector(d), d(n.current);
|
108
|
+
}
|
109
|
+
function o(d) {
|
110
|
+
y(r, i, a, f)(d);
|
111
|
+
}
|
112
|
+
return [s, o];
|
113
|
+
}
|
114
|
+
function C(e, t) {
|
115
|
+
return l(t) ? t(e.current) : t;
|
116
|
+
}
|
117
|
+
function F(e, t) {
|
118
|
+
return e.current = v(v({}, e.current), t), t;
|
119
|
+
}
|
120
|
+
function I(e, t, n) {
|
121
|
+
return l(t) ? t(e.current) : Object.keys(n).forEach(function(r) {
|
122
|
+
var i;
|
123
|
+
return (i = t[r]) === null || i === void 0 ? void 0 : i.call(t, e.current[r]);
|
124
|
+
}), n;
|
125
|
+
}
|
126
|
+
var R = {
|
127
|
+
create: q
|
128
|
+
};
|
129
|
+
export {
|
130
|
+
R as i
|
131
|
+
};
|