@meyicloud/meyi-cost-ui 1.5.0 → 1.5.2
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/features/analysis/hooks/use-cost-analysis.d.ts +2 -0
- package/dist/index.js +8 -8
- package/dist/index.mjs +798 -774
- package/dist/services/cost.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as B from "react";
|
|
2
|
-
import Pe, { useCallback as Ut, forwardRef as Jn, createElement as or, useState as U, useRef as yr, useEffect as
|
|
2
|
+
import Pe, { useCallback as Ut, forwardRef as Jn, createElement as or, useState as U, useRef as yr, useEffect as Me, useMemo as Ps, createContext as Ta, useContext as Aa } from "react";
|
|
3
3
|
import { flushSync as Oa } from "react-dom";
|
|
4
|
-
var Jt = { exports: {} },
|
|
4
|
+
var Jt = { exports: {} }, Pt = {};
|
|
5
5
|
var Dr;
|
|
6
6
|
function La() {
|
|
7
|
-
if (Dr) return
|
|
7
|
+
if (Dr) return Pt;
|
|
8
8
|
Dr = 1;
|
|
9
9
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
10
|
function s(r, n, o) {
|
|
@@ -22,152 +22,152 @@ function La() {
|
|
|
22
22
|
props: o
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return Pt.Fragment = t, Pt.jsx = s, Pt.jsxs = s, Pt;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var Tt = {};
|
|
28
28
|
var Fr;
|
|
29
|
-
function
|
|
29
|
+
function Ia() {
|
|
30
30
|
return Fr || (Fr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
-
function e(
|
|
32
|
-
if (
|
|
33
|
-
if (typeof
|
|
34
|
-
return
|
|
35
|
-
if (typeof
|
|
36
|
-
switch (
|
|
31
|
+
function e(C) {
|
|
32
|
+
if (C == null) return null;
|
|
33
|
+
if (typeof C == "function")
|
|
34
|
+
return C.$$typeof === O ? null : C.displayName || C.name || null;
|
|
35
|
+
if (typeof C == "string") return C;
|
|
36
|
+
switch (C) {
|
|
37
37
|
case x:
|
|
38
38
|
return "Fragment";
|
|
39
39
|
case y:
|
|
40
40
|
return "Profiler";
|
|
41
41
|
case b:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case j:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case _:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case M:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
|
-
if (typeof
|
|
51
|
-
switch (typeof
|
|
50
|
+
if (typeof C == "object")
|
|
51
|
+
switch (typeof C.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
-
),
|
|
53
|
+
), C.$$typeof) {
|
|
54
54
|
case g:
|
|
55
55
|
return "Portal";
|
|
56
56
|
case w:
|
|
57
|
-
return
|
|
57
|
+
return C.displayName || "Context";
|
|
58
58
|
case S:
|
|
59
|
-
return (
|
|
59
|
+
return (C._context.displayName || "Context") + ".Consumer";
|
|
60
60
|
case N:
|
|
61
|
-
var F =
|
|
62
|
-
return
|
|
61
|
+
var F = C.render;
|
|
62
|
+
return C = C.displayName, C || (C = F.displayName || F.name || "", C = C !== "" ? "ForwardRef(" + C + ")" : "ForwardRef"), C;
|
|
63
63
|
case R:
|
|
64
|
-
return F =
|
|
64
|
+
return F = C.displayName || null, F !== null ? F : e(C.type) || "Memo";
|
|
65
65
|
case k:
|
|
66
|
-
F =
|
|
66
|
+
F = C._payload, C = C._init;
|
|
67
67
|
try {
|
|
68
|
-
return e(
|
|
68
|
+
return e(C(F));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
|
-
function t(
|
|
75
|
-
return "" +
|
|
74
|
+
function t(C) {
|
|
75
|
+
return "" + C;
|
|
76
76
|
}
|
|
77
|
-
function s(
|
|
77
|
+
function s(C) {
|
|
78
78
|
try {
|
|
79
|
-
t(
|
|
79
|
+
t(C);
|
|
80
80
|
var F = !1;
|
|
81
81
|
} catch {
|
|
82
82
|
F = !0;
|
|
83
83
|
}
|
|
84
84
|
if (F) {
|
|
85
85
|
F = console;
|
|
86
|
-
var W = F.error, q = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
86
|
+
var W = F.error, q = typeof Symbol == "function" && Symbol.toStringTag && C[Symbol.toStringTag] || C.constructor.name || "Object";
|
|
87
87
|
return W.call(
|
|
88
88
|
F,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
90
|
q
|
|
91
|
-
), t(
|
|
91
|
+
), t(C);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function r(
|
|
95
|
-
if (
|
|
96
|
-
if (typeof
|
|
94
|
+
function r(C) {
|
|
95
|
+
if (C === x) return "<>";
|
|
96
|
+
if (typeof C == "object" && C !== null && C.$$typeof === k)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var F = e(
|
|
99
|
+
var F = e(C);
|
|
100
100
|
return F ? "<" + F + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function n() {
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var C = D.A;
|
|
107
|
+
return C === null ? null : C.getOwner();
|
|
108
108
|
}
|
|
109
109
|
function o() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
|
-
function i(
|
|
113
|
-
if (ee.call(
|
|
114
|
-
var F = Object.getOwnPropertyDescriptor(
|
|
112
|
+
function i(C) {
|
|
113
|
+
if (ee.call(C, "key")) {
|
|
114
|
+
var F = Object.getOwnPropertyDescriptor(C, "key").get;
|
|
115
115
|
if (F && F.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return C.key !== void 0;
|
|
118
118
|
}
|
|
119
|
-
function c(
|
|
119
|
+
function c(C, F) {
|
|
120
120
|
function W() {
|
|
121
121
|
Q || (Q = !0, console.error(
|
|
122
122
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
123
|
F
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
W.isReactWarning = !0, Object.defineProperty(
|
|
126
|
+
W.isReactWarning = !0, Object.defineProperty(C, "key", {
|
|
127
127
|
get: W,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
function l() {
|
|
132
|
-
var
|
|
133
|
-
return Y[
|
|
132
|
+
var C = e(this.type);
|
|
133
|
+
return Y[C] || (Y[C] = !0, console.error(
|
|
134
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
|
-
)),
|
|
135
|
+
)), C = this.props.ref, C !== void 0 ? C : null;
|
|
136
136
|
}
|
|
137
|
-
function d(
|
|
137
|
+
function d(C, F, W, q, L, I) {
|
|
138
138
|
var $ = W.ref;
|
|
139
|
-
return
|
|
139
|
+
return C = {
|
|
140
140
|
$$typeof: p,
|
|
141
|
-
type:
|
|
141
|
+
type: C,
|
|
142
142
|
key: F,
|
|
143
143
|
props: W,
|
|
144
144
|
_owner: q
|
|
145
|
-
}, ($ !== void 0 ? $ : null) !== null ? Object.defineProperty(
|
|
145
|
+
}, ($ !== void 0 ? $ : null) !== null ? Object.defineProperty(C, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
147
|
get: l
|
|
148
|
-
}) : Object.defineProperty(
|
|
148
|
+
}) : Object.defineProperty(C, "ref", { enumerable: !1, value: null }), C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
151
151
|
writable: !0,
|
|
152
152
|
value: 0
|
|
153
|
-
}), Object.defineProperty(
|
|
153
|
+
}), Object.defineProperty(C, "_debugInfo", {
|
|
154
154
|
configurable: !1,
|
|
155
155
|
enumerable: !1,
|
|
156
156
|
writable: !0,
|
|
157
157
|
value: null
|
|
158
|
-
}), Object.defineProperty(
|
|
158
|
+
}), Object.defineProperty(C, "_debugStack", {
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
162
|
value: L
|
|
163
|
-
}), Object.defineProperty(
|
|
163
|
+
}), Object.defineProperty(C, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
168
|
-
}), Object.freeze && (Object.freeze(
|
|
167
|
+
value: I
|
|
168
|
+
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
169
169
|
}
|
|
170
|
-
function f(
|
|
170
|
+
function f(C, F, W, q, L, I) {
|
|
171
171
|
var $ = F.children;
|
|
172
172
|
if ($ !== void 0)
|
|
173
173
|
if (q)
|
|
@@ -181,9 +181,9 @@ function Ma() {
|
|
|
181
181
|
);
|
|
182
182
|
else u($);
|
|
183
183
|
if (ee.call(F, "key")) {
|
|
184
|
-
$ = e(
|
|
185
|
-
var J = Object.keys(F).filter(function(
|
|
186
|
-
return
|
|
184
|
+
$ = e(C);
|
|
185
|
+
var J = Object.keys(F).filter(function(ue) {
|
|
186
|
+
return ue !== "key";
|
|
187
187
|
});
|
|
188
188
|
q = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", P[$ + q] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -205,62 +205,62 @@ React keys must be passed directly to JSX without using spread:
|
|
|
205
205
|
} else W = F;
|
|
206
206
|
return $ && c(
|
|
207
207
|
W,
|
|
208
|
-
typeof
|
|
208
|
+
typeof C == "function" ? C.displayName || C.name || "Unknown" : C
|
|
209
209
|
), d(
|
|
210
|
-
|
|
210
|
+
C,
|
|
211
211
|
$,
|
|
212
212
|
W,
|
|
213
213
|
n(),
|
|
214
214
|
L,
|
|
215
|
-
|
|
215
|
+
I
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function u(
|
|
219
|
-
h(
|
|
218
|
+
function u(C) {
|
|
219
|
+
h(C) ? C._store && (C._store.validated = 1) : typeof C == "object" && C !== null && C.$$typeof === k && (C._payload.status === "fulfilled" ? h(C._payload.value) && C._payload.value._store && (C._payload.value._store.validated = 1) : C._store && (C._store.validated = 1));
|
|
220
220
|
}
|
|
221
|
-
function h(
|
|
222
|
-
return typeof
|
|
221
|
+
function h(C) {
|
|
222
|
+
return typeof C == "object" && C !== null && C.$$typeof === p;
|
|
223
223
|
}
|
|
224
|
-
var m = Pe, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), b = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), S = /* @__PURE__ */ Symbol.for("react.consumer"), w = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"),
|
|
224
|
+
var m = Pe, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), b = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), S = /* @__PURE__ */ Symbol.for("react.consumer"), w = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), j = /* @__PURE__ */ Symbol.for("react.suspense"), _ = /* @__PURE__ */ Symbol.for("react.suspense_list"), R = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), M = /* @__PURE__ */ Symbol.for("react.activity"), O = /* @__PURE__ */ Symbol.for("react.client.reference"), D = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, V = Array.isArray, Z = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
227
|
m = {
|
|
228
|
-
react_stack_bottom_frame: function(
|
|
229
|
-
return
|
|
228
|
+
react_stack_bottom_frame: function(C) {
|
|
229
|
+
return C();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var Q, Y = {},
|
|
232
|
+
var Q, Y = {}, de = m.react_stack_bottom_frame.bind(
|
|
233
233
|
m,
|
|
234
234
|
o
|
|
235
235
|
)(), fe = Z(r(o)), P = {};
|
|
236
|
-
|
|
236
|
+
Tt.Fragment = x, Tt.jsx = function(C, F, W) {
|
|
237
237
|
var q = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
238
238
|
return f(
|
|
239
|
-
|
|
239
|
+
C,
|
|
240
240
|
F,
|
|
241
241
|
W,
|
|
242
242
|
!1,
|
|
243
|
-
q ? Error("react-stack-top-frame") :
|
|
244
|
-
q ? Z(r(
|
|
243
|
+
q ? Error("react-stack-top-frame") : de,
|
|
244
|
+
q ? Z(r(C)) : fe
|
|
245
245
|
);
|
|
246
|
-
},
|
|
246
|
+
}, Tt.jsxs = function(C, F, W) {
|
|
247
247
|
var q = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
248
248
|
return f(
|
|
249
|
-
|
|
249
|
+
C,
|
|
250
250
|
F,
|
|
251
251
|
W,
|
|
252
252
|
!0,
|
|
253
|
-
q ? Error("react-stack-top-frame") :
|
|
254
|
-
q ? Z(r(
|
|
253
|
+
q ? Error("react-stack-top-frame") : de,
|
|
254
|
+
q ? Z(r(C)) : fe
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), Tt;
|
|
258
258
|
}
|
|
259
259
|
var Ur;
|
|
260
|
-
function
|
|
261
|
-
return Ur || (Ur = 1, process.env.NODE_ENV === "production" ? Jt.exports = La() : Jt.exports =
|
|
260
|
+
function Ma() {
|
|
261
|
+
return Ur || (Ur = 1, process.env.NODE_ENV === "production" ? Jt.exports = La() : Jt.exports = Ia()), Jt.exports;
|
|
262
262
|
}
|
|
263
|
-
var a =
|
|
263
|
+
var a = Ma(), Ft = typeof window < "u" ? B.useLayoutEffect : B.useEffect;
|
|
264
264
|
function Us(e) {
|
|
265
265
|
const t = B.useRef({
|
|
266
266
|
value: e,
|
|
@@ -383,7 +383,7 @@ function nt(e, t, s) {
|
|
|
383
383
|
}
|
|
384
384
|
return !1;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function wt(e) {
|
|
387
387
|
let t, s;
|
|
388
388
|
const r = new Promise((n, o) => {
|
|
389
389
|
t = n, s = o;
|
|
@@ -437,7 +437,7 @@ function bs(e, t) {
|
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function At(e) {
|
|
441
441
|
if (!e) return {
|
|
442
442
|
path: e,
|
|
443
443
|
handledProtocolRelativeURL: !1
|
|
@@ -568,26 +568,26 @@ function Ts(e, t, s, r, n, o, i) {
|
|
|
568
568
|
break;
|
|
569
569
|
}
|
|
570
570
|
case 1: {
|
|
571
|
-
const b = l.substring(g, m[1]), y = l.substring(m[4], x), S = f && !!(b || y), w = b ? S ? b : b.toLowerCase() : void 0, N = y ? S ? y : y.toLowerCase() : void 0,
|
|
572
|
-
if (
|
|
571
|
+
const b = l.substring(g, m[1]), y = l.substring(m[4], x), S = f && !!(b || y), w = b ? S ? b : b.toLowerCase() : void 0, N = y ? S ? y : y.toLowerCase() : void 0, j = !u && n.dynamic?.find((_) => !_.parse && _.caseSensitive === S && _.prefix === w && _.suffix === N);
|
|
572
|
+
if (j) p = j;
|
|
573
573
|
else {
|
|
574
|
-
const
|
|
575
|
-
p =
|
|
574
|
+
const _ = Bs(1, s.fullPath ?? s.from, S, w, N);
|
|
575
|
+
p = _, _.depth = o, _.parent = n, n.dynamic ??= [], n.dynamic.push(_);
|
|
576
576
|
}
|
|
577
577
|
break;
|
|
578
578
|
}
|
|
579
579
|
case 3: {
|
|
580
|
-
const b = l.substring(g, m[1]), y = l.substring(m[4], x), S = f && !!(b || y), w = b ? S ? b : b.toLowerCase() : void 0, N = y ? S ? y : y.toLowerCase() : void 0,
|
|
581
|
-
if (
|
|
580
|
+
const b = l.substring(g, m[1]), y = l.substring(m[4], x), S = f && !!(b || y), w = b ? S ? b : b.toLowerCase() : void 0, N = y ? S ? y : y.toLowerCase() : void 0, j = !u && n.optional?.find((_) => !_.parse && _.caseSensitive === S && _.prefix === w && _.suffix === N);
|
|
581
|
+
if (j) p = j;
|
|
582
582
|
else {
|
|
583
|
-
const
|
|
584
|
-
p =
|
|
583
|
+
const _ = Bs(3, s.fullPath ?? s.from, S, w, N);
|
|
584
|
+
p = _, _.parent = n, _.depth = o, n.optional ??= [], n.optional.push(_);
|
|
585
585
|
}
|
|
586
586
|
break;
|
|
587
587
|
}
|
|
588
588
|
case 2: {
|
|
589
|
-
const b = l.substring(g, m[1]), y = l.substring(m[4], x), S = f && !!(b || y), w = b ? S ? b : b.toLowerCase() : void 0, N = y ? S ? y : y.toLowerCase() : void 0,
|
|
590
|
-
p =
|
|
589
|
+
const b = l.substring(g, m[1]), y = l.substring(m[4], x), S = f && !!(b || y), w = b ? S ? b : b.toLowerCase() : void 0, N = y ? S ? y : y.toLowerCase() : void 0, j = Bs(2, s.fullPath ?? s.from, S, w, N);
|
|
590
|
+
p = j, j.parent = n, j.depth = o, n.wildcard ??= [], n.wildcard.push(j);
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
n = p;
|
|
@@ -828,9 +828,9 @@ function ei(e, t, s, r) {
|
|
|
828
828
|
if (w && (u.route && (!o || u.kind === He || u.kind === 2) && Zt(d, f) && (d = f), !u.optional && !u.wildcard && !u.index && !u.pathless))
|
|
829
829
|
continue;
|
|
830
830
|
const N = w ? void 0 : t[h];
|
|
831
|
-
let
|
|
831
|
+
let j;
|
|
832
832
|
if (w && u.index) {
|
|
833
|
-
const
|
|
833
|
+
const _ = {
|
|
834
834
|
node: u.index,
|
|
835
835
|
index: h,
|
|
836
836
|
skipped: m,
|
|
@@ -842,18 +842,18 @@ function ei(e, t, s, r) {
|
|
|
842
842
|
rawParams: S
|
|
843
843
|
};
|
|
844
844
|
let R = !0;
|
|
845
|
-
if (u.index.parse && (qr(e, t,
|
|
846
|
-
if (!x && !b && !m && ti(g, i)) return
|
|
847
|
-
Zt(d,
|
|
845
|
+
if (u.index.parse && (qr(e, t, _) || (R = !1)), R) {
|
|
846
|
+
if (!x && !b && !m && ti(g, i)) return _;
|
|
847
|
+
Zt(d, _) && (d = _);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
if (u.wildcard) for (let
|
|
851
|
-
const R = u.wildcard[
|
|
852
|
-
if (!(k && (w || !(R.caseSensitive ? N :
|
|
853
|
-
if (
|
|
850
|
+
if (u.wildcard) for (let _ = u.wildcard.length - 1; _ >= 0; _--) {
|
|
851
|
+
const R = u.wildcard[_], { prefix: k, suffix: M } = R;
|
|
852
|
+
if (!(k && (w || !(R.caseSensitive ? N : j ??= N.toLowerCase()).startsWith(k)))) {
|
|
853
|
+
if (M) {
|
|
854
854
|
if (w) continue;
|
|
855
|
-
const O = t.slice(h).join("/").slice(-
|
|
856
|
-
if ((R.caseSensitive ? O : O.toLowerCase()) !==
|
|
855
|
+
const O = t.slice(h).join("/").slice(-M.length);
|
|
856
|
+
if ((R.caseSensitive ? O : O.toLowerCase()) !== M) continue;
|
|
857
857
|
}
|
|
858
858
|
c.push({
|
|
859
859
|
node: R,
|
|
@@ -869,13 +869,13 @@ function ei(e, t, s, r) {
|
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
if (u.optional) {
|
|
872
|
-
const
|
|
872
|
+
const _ = m | 1 << p, R = p + 1;
|
|
873
873
|
for (let k = u.optional.length - 1; k >= 0; k--) {
|
|
874
|
-
const
|
|
874
|
+
const M = u.optional[k];
|
|
875
875
|
c.push({
|
|
876
|
-
node:
|
|
876
|
+
node: M,
|
|
877
877
|
index: h,
|
|
878
|
-
skipped:
|
|
878
|
+
skipped: _,
|
|
879
879
|
depth: R,
|
|
880
880
|
statics: g,
|
|
881
881
|
dynamics: x,
|
|
@@ -885,13 +885,13 @@ function ei(e, t, s, r) {
|
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
887
|
if (!w) for (let k = u.optional.length - 1; k >= 0; k--) {
|
|
888
|
-
const
|
|
888
|
+
const M = u.optional[k], { prefix: O, suffix: D } = M;
|
|
889
889
|
if (O || D) {
|
|
890
|
-
const ee =
|
|
890
|
+
const ee = M.caseSensitive ? N : j ??= N.toLowerCase();
|
|
891
891
|
if (O && !ee.startsWith(O) || D && !ee.endsWith(D)) continue;
|
|
892
892
|
}
|
|
893
893
|
c.push({
|
|
894
|
-
node:
|
|
894
|
+
node: M,
|
|
895
895
|
index: h + 1,
|
|
896
896
|
skipped: m,
|
|
897
897
|
depth: R,
|
|
@@ -903,11 +903,11 @@ function ei(e, t, s, r) {
|
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
if (!w && u.dynamic && N) for (let
|
|
907
|
-
const R = u.dynamic[
|
|
908
|
-
if (k ||
|
|
909
|
-
const O = R.caseSensitive ? N :
|
|
910
|
-
if (k && !O.startsWith(k) ||
|
|
906
|
+
if (!w && u.dynamic && N) for (let _ = u.dynamic.length - 1; _ >= 0; _--) {
|
|
907
|
+
const R = u.dynamic[_], { prefix: k, suffix: M } = R;
|
|
908
|
+
if (k || M) {
|
|
909
|
+
const O = R.caseSensitive ? N : j ??= N.toLowerCase();
|
|
910
|
+
if (k && !O.startsWith(k) || M && !O.endsWith(M)) continue;
|
|
911
911
|
}
|
|
912
912
|
c.push({
|
|
913
913
|
node: R,
|
|
@@ -922,9 +922,9 @@ function ei(e, t, s, r) {
|
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
924
|
if (!w && u.staticInsensitive) {
|
|
925
|
-
const
|
|
926
|
-
|
|
927
|
-
node:
|
|
925
|
+
const _ = u.staticInsensitive.get(j ??= N.toLowerCase());
|
|
926
|
+
_ && c.push({
|
|
927
|
+
node: _,
|
|
928
928
|
index: h + 1,
|
|
929
929
|
skipped: m,
|
|
930
930
|
depth: p + 1,
|
|
@@ -936,9 +936,9 @@ function ei(e, t, s, r) {
|
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
if (!w && u.static) {
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
node:
|
|
939
|
+
const _ = u.static.get(N);
|
|
940
|
+
_ && c.push({
|
|
941
|
+
node: _,
|
|
942
942
|
index: h + 1,
|
|
943
943
|
skipped: m,
|
|
944
944
|
depth: p + 1,
|
|
@@ -950,14 +950,14 @@ function ei(e, t, s, r) {
|
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
952
|
if (u.pathless) {
|
|
953
|
-
const
|
|
953
|
+
const _ = p + 1;
|
|
954
954
|
for (let R = u.pathless.length - 1; R >= 0; R--) {
|
|
955
955
|
const k = u.pathless[R];
|
|
956
956
|
c.push({
|
|
957
957
|
node: k,
|
|
958
958
|
index: h,
|
|
959
959
|
skipped: m,
|
|
960
|
-
depth:
|
|
960
|
+
depth: _,
|
|
961
961
|
statics: g,
|
|
962
962
|
dynamics: x,
|
|
963
963
|
optionals: b,
|
|
@@ -1228,7 +1228,7 @@ const ar = (e) => {
|
|
|
1228
1228
|
...n,
|
|
1229
1229
|
context: r
|
|
1230
1230
|
}));
|
|
1231
|
-
},
|
|
1231
|
+
}, Ot = (e, t, s) => {
|
|
1232
1232
|
const { id: r, routeId: n } = e.matches[t], o = e.router.looseRoutesById[n];
|
|
1233
1233
|
if (s instanceof Promise) throw s;
|
|
1234
1234
|
e.firstBadMatchIndex ??= t, qe(e, e.router.getMatch(r), s);
|
|
@@ -1266,11 +1266,11 @@ const ar = (e) => {
|
|
|
1266
1266
|
}, mi = (e, t, s, r) => {
|
|
1267
1267
|
const n = e.router.getMatch(t);
|
|
1268
1268
|
let o = n._nonReactive.loadPromise;
|
|
1269
|
-
n._nonReactive.loadPromise =
|
|
1269
|
+
n._nonReactive.loadPromise = wt(() => {
|
|
1270
1270
|
o?.resolve(), o = void 0;
|
|
1271
1271
|
});
|
|
1272
1272
|
const { paramsError: i, searchError: c } = n;
|
|
1273
|
-
i &&
|
|
1273
|
+
i && Ot(e, s, i), c && Ot(e, s, c), io(e, t, r, n);
|
|
1274
1274
|
const l = new AbortController();
|
|
1275
1275
|
let d = !1;
|
|
1276
1276
|
const f = () => {
|
|
@@ -1292,7 +1292,7 @@ const ar = (e) => {
|
|
|
1292
1292
|
});
|
|
1293
1293
|
return;
|
|
1294
1294
|
}
|
|
1295
|
-
n._nonReactive.beforeLoadPromise =
|
|
1295
|
+
n._nonReactive.beforeLoadPromise = wt();
|
|
1296
1296
|
const h = {
|
|
1297
1297
|
...at(e, s, !1),
|
|
1298
1298
|
...n.__routeContext
|
|
@@ -1319,7 +1319,7 @@ const ar = (e) => {
|
|
|
1319
1319
|
});
|
|
1320
1320
|
return;
|
|
1321
1321
|
}
|
|
1322
|
-
(Se(w) || ge(w)) && (f(),
|
|
1322
|
+
(Se(w) || ge(w)) && (f(), Ot(e, s, w)), e.router.batch(() => {
|
|
1323
1323
|
f(), e.updateMatch(t, (N) => ({
|
|
1324
1324
|
...N,
|
|
1325
1325
|
__beforeLoadContext: w
|
|
@@ -1330,10 +1330,10 @@ const ar = (e) => {
|
|
|
1330
1330
|
try {
|
|
1331
1331
|
if (S = r.options.beforeLoad(b), Bt(S))
|
|
1332
1332
|
return f(), S.catch((w) => {
|
|
1333
|
-
|
|
1333
|
+
Ot(e, s, w);
|
|
1334
1334
|
}).then(y);
|
|
1335
1335
|
} catch (w) {
|
|
1336
|
-
f(),
|
|
1336
|
+
f(), Ot(e, s, w);
|
|
1337
1337
|
}
|
|
1338
1338
|
y(S);
|
|
1339
1339
|
}, pi = (e, t) => {
|
|
@@ -1445,8 +1445,8 @@ const ar = (e) => {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
}, xi = async (e, t, s) => {
|
|
1447
1447
|
async function r(m, p, g, x, b) {
|
|
1448
|
-
const y = Date.now() - p.updatedAt, S = m ? b.options.preloadStaleTime ?? e.router.options.defaultPreloadStaleTime ?? 3e4 : b.options.staleTime ?? e.router.options.defaultStaleTime ?? 0, w = b.options.shouldReload, N = typeof w == "function" ? w(co(e, t, n, s, b)) : w, { status:
|
|
1449
|
-
i =
|
|
1448
|
+
const y = Date.now() - p.updatedAt, S = m ? b.options.preloadStaleTime ?? e.router.options.defaultPreloadStaleTime ?? 3e4 : b.options.staleTime ?? e.router.options.defaultStaleTime ?? 0, w = b.options.shouldReload, N = typeof w == "function" ? w(co(e, t, n, s, b)) : w, { status: j, invalid: _ } = x, R = y >= S && (!!e.forceStaleReload || x.cause === "enter" || g !== void 0 && g !== x.id);
|
|
1449
|
+
i = j === "success" && (_ || (N ?? R)), m && b.options.preload === !1 || (i && !e.sync && f ? (c = !0, (async () => {
|
|
1450
1450
|
try {
|
|
1451
1451
|
await Xr(e, t, n, s, b);
|
|
1452
1452
|
const k = e.router.getMatch(n);
|
|
@@ -1454,7 +1454,7 @@ const ar = (e) => {
|
|
|
1454
1454
|
} catch (k) {
|
|
1455
1455
|
Se(k) && await e.router.navigate(k.options);
|
|
1456
1456
|
}
|
|
1457
|
-
})()) :
|
|
1457
|
+
})()) : j !== "success" || i ? await Xr(e, t, n, s, b) : Jr(e, n, s));
|
|
1458
1458
|
}
|
|
1459
1459
|
const { id: n, routeId: o } = e.matches[s];
|
|
1460
1460
|
let i = !1, c = !1;
|
|
@@ -1471,7 +1471,7 @@ const ar = (e) => {
|
|
|
1471
1471
|
y && qe(e, b, y), b.status === "pending" && await r(x, m, g, b, l);
|
|
1472
1472
|
} else {
|
|
1473
1473
|
const b = x && !e.router.stores.matchStores.has(n), y = e.router.getMatch(n);
|
|
1474
|
-
y._nonReactive.loaderPromise =
|
|
1474
|
+
y._nonReactive.loaderPromise = wt(), b !== y.preload && e.updateMatch(n, (S) => ({
|
|
1475
1475
|
...S,
|
|
1476
1476
|
preload: b
|
|
1477
1477
|
})), await r(x, m, g, y, l);
|
|
@@ -1647,11 +1647,11 @@ function uo(e, t) {
|
|
|
1647
1647
|
return t;
|
|
1648
1648
|
}
|
|
1649
1649
|
function vi(e, t) {
|
|
1650
|
-
const { createMutableStore: s, createReadonlyStore: r, batch: n, init: o } = t, i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), d = s(e.status), f = s(e.loadedAt), u = s(e.isLoading), h = s(e.isTransitioning), m = s(e.location), p = s(e.resolvedLocation), g = s(e.statusCode), x = s(e.redirect), b = s([]), y = s([]), S = s([]), w = r(() => Ws(i, b.get())), N = r(() => Ws(c, y.get())),
|
|
1650
|
+
const { createMutableStore: s, createReadonlyStore: r, batch: n, init: o } = t, i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), d = s(e.status), f = s(e.loadedAt), u = s(e.isLoading), h = s(e.isTransitioning), m = s(e.location), p = s(e.resolvedLocation), g = s(e.statusCode), x = s(e.redirect), b = s([]), y = s([]), S = s([]), w = r(() => Ws(i, b.get())), N = r(() => Ws(c, y.get())), j = r(() => Ws(l, S.get())), _ = r(() => b.get()[0]), R = r(() => b.get().some((Y) => i.get(Y)?.get().status === "pending")), k = r(() => ({
|
|
1651
1651
|
locationHref: m.get().href,
|
|
1652
1652
|
resolvedLocationHref: p.get()?.href,
|
|
1653
1653
|
status: d.get()
|
|
1654
|
-
})),
|
|
1654
|
+
})), M = r(() => ({
|
|
1655
1655
|
status: d.get(),
|
|
1656
1656
|
loadedAt: f.get(),
|
|
1657
1657
|
isLoading: u.get(),
|
|
@@ -1663,14 +1663,14 @@ function vi(e, t) {
|
|
|
1663
1663
|
redirect: x.get()
|
|
1664
1664
|
})), O = zt(64);
|
|
1665
1665
|
function D(Y) {
|
|
1666
|
-
let
|
|
1667
|
-
return
|
|
1666
|
+
let de = O.get(Y);
|
|
1667
|
+
return de || (de = r(() => {
|
|
1668
1668
|
const fe = b.get();
|
|
1669
1669
|
for (const P of fe) {
|
|
1670
|
-
const
|
|
1671
|
-
if (
|
|
1670
|
+
const C = i.get(P);
|
|
1671
|
+
if (C && C.routeId === Y) return C.get();
|
|
1672
1672
|
}
|
|
1673
|
-
}), O.set(Y,
|
|
1673
|
+
}), O.set(Y, de)), de;
|
|
1674
1674
|
}
|
|
1675
1675
|
const ee = {
|
|
1676
1676
|
status: d,
|
|
@@ -1686,14 +1686,14 @@ function vi(e, t) {
|
|
|
1686
1686
|
cachedIds: S,
|
|
1687
1687
|
matches: w,
|
|
1688
1688
|
pendingMatches: N,
|
|
1689
|
-
cachedMatches:
|
|
1690
|
-
firstId:
|
|
1689
|
+
cachedMatches: j,
|
|
1690
|
+
firstId: _,
|
|
1691
1691
|
hasPending: R,
|
|
1692
1692
|
matchRouteDeps: k,
|
|
1693
1693
|
matchStores: i,
|
|
1694
1694
|
pendingMatchStores: c,
|
|
1695
1695
|
cachedMatchStores: l,
|
|
1696
|
-
__store:
|
|
1696
|
+
__store: M,
|
|
1697
1697
|
getRouteMatchStore: D,
|
|
1698
1698
|
setMatches: V,
|
|
1699
1699
|
setPending: Z,
|
|
@@ -1871,22 +1871,22 @@ function Si(e) {
|
|
|
1871
1871
|
const g = () => d;
|
|
1872
1872
|
let x, b;
|
|
1873
1873
|
const y = () => {
|
|
1874
|
-
x && (
|
|
1875
|
-
}, S = (R, k,
|
|
1874
|
+
x && (_._ignoreSubscribers = !0, (x.isPush ? t.history.pushState : t.history.replaceState)(x.state, "", x.href), _._ignoreSubscribers = !1, x = void 0, b = void 0, f = void 0);
|
|
1875
|
+
}, S = (R, k, M) => {
|
|
1876
1876
|
const O = c(k);
|
|
1877
|
-
b || (f = d), d = vs(k,
|
|
1877
|
+
b || (f = d), d = vs(k, M), x = {
|
|
1878
1878
|
href: O,
|
|
1879
|
-
state:
|
|
1879
|
+
state: M,
|
|
1880
1880
|
isPush: x?.isPush || R === "push"
|
|
1881
1881
|
}, b || (b = Promise.resolve().then(() => y()));
|
|
1882
1882
|
}, w = (R) => {
|
|
1883
|
-
d = l(),
|
|
1883
|
+
d = l(), _.notify({ type: R });
|
|
1884
1884
|
}, N = async () => {
|
|
1885
1885
|
if (h) {
|
|
1886
1886
|
h = !1;
|
|
1887
1887
|
return;
|
|
1888
1888
|
}
|
|
1889
|
-
const R = l(), k = R.state[Ge] - d.state[Ge],
|
|
1889
|
+
const R = l(), k = R.state[Ge] - d.state[Ge], M = k === 1, O = k === -1, D = !M && !O || u;
|
|
1890
1890
|
u = !1;
|
|
1891
1891
|
const ee = D ? "GO" : O ? "BACK" : "FORWARD", V = D ? {
|
|
1892
1892
|
type: "GO",
|
|
@@ -1901,20 +1901,20 @@ function Si(e) {
|
|
|
1901
1901
|
nextLocation: R,
|
|
1902
1902
|
action: ee
|
|
1903
1903
|
})) {
|
|
1904
|
-
h = !0, t.history.go(1),
|
|
1904
|
+
h = !0, t.history.go(1), _.notify(V);
|
|
1905
1905
|
return;
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
d = l(),
|
|
1910
|
-
},
|
|
1909
|
+
d = l(), _.notify(V);
|
|
1910
|
+
}, j = (R) => {
|
|
1911
1911
|
if (p) {
|
|
1912
1912
|
p = !1;
|
|
1913
1913
|
return;
|
|
1914
1914
|
}
|
|
1915
1915
|
let k = !1;
|
|
1916
|
-
const
|
|
1917
|
-
if (typeof document < "u" &&
|
|
1916
|
+
const M = o();
|
|
1917
|
+
if (typeof document < "u" && M.length) for (const O of M) {
|
|
1918
1918
|
const D = O.enableBeforeUnload ?? !0;
|
|
1919
1919
|
if (D === !0) {
|
|
1920
1920
|
k = !0;
|
|
@@ -1927,7 +1927,7 @@ function Si(e) {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
if (k)
|
|
1929
1929
|
return R.preventDefault(), R.returnValue = "";
|
|
1930
|
-
},
|
|
1930
|
+
}, _ = wi({
|
|
1931
1931
|
getLocation: g,
|
|
1932
1932
|
getLength: () => t.history.length,
|
|
1933
1933
|
pushState: (R, k) => S("push", R, k),
|
|
@@ -1942,7 +1942,7 @@ function Si(e) {
|
|
|
1942
1942
|
createHref: (R) => c(R),
|
|
1943
1943
|
flush: y,
|
|
1944
1944
|
destroy: () => {
|
|
1945
|
-
t.history.pushState = s, t.history.replaceState = r, t.removeEventListener(tn,
|
|
1945
|
+
t.history.pushState = s, t.history.replaceState = r, t.removeEventListener(tn, j, { capture: !0 }), t.removeEventListener(en, N);
|
|
1946
1946
|
},
|
|
1947
1947
|
onBlocked: () => {
|
|
1948
1948
|
f && d !== f && (d = f);
|
|
@@ -1951,13 +1951,13 @@ function Si(e) {
|
|
|
1951
1951
|
setBlockers: i,
|
|
1952
1952
|
notifyOnIndexChange: !1
|
|
1953
1953
|
});
|
|
1954
|
-
return t.addEventListener(tn,
|
|
1954
|
+
return t.addEventListener(tn, j, { capture: !0 }), t.addEventListener(en, N), t.history.pushState = function(...R) {
|
|
1955
1955
|
const k = s.apply(t.history, R);
|
|
1956
|
-
return
|
|
1956
|
+
return _._ignoreSubscribers || w("PUSH"), k;
|
|
1957
1957
|
}, t.history.replaceState = function(...R) {
|
|
1958
1958
|
const k = r.apply(t.history, R);
|
|
1959
|
-
return
|
|
1960
|
-
},
|
|
1959
|
+
return _._ignoreSubscribers || w("REPLACE"), k;
|
|
1960
|
+
}, _;
|
|
1961
1961
|
}
|
|
1962
1962
|
function Ri(e) {
|
|
1963
1963
|
let t = e.replace(/[\x00-\x1f\x7f]/g, "");
|
|
@@ -2045,11 +2045,11 @@ var ji = class {
|
|
|
2045
2045
|
return {
|
|
2046
2046
|
href: l + y + f,
|
|
2047
2047
|
publicHref: l + y + f,
|
|
2048
|
-
pathname:
|
|
2048
|
+
pathname: At(l).path,
|
|
2049
2049
|
external: !1,
|
|
2050
2050
|
searchStr: y,
|
|
2051
2051
|
search: Xe(r?.search, b),
|
|
2052
|
-
hash:
|
|
2052
|
+
hash: At(f.slice(1)).path,
|
|
2053
2053
|
state: tt(r?.state, h)
|
|
2054
2054
|
};
|
|
2055
2055
|
}
|
|
@@ -2057,11 +2057,11 @@ var ji = class {
|
|
|
2057
2057
|
return p.search = x, {
|
|
2058
2058
|
href: p.href.replace(p.origin, ""),
|
|
2059
2059
|
publicHref: u,
|
|
2060
|
-
pathname:
|
|
2060
|
+
pathname: At(p.pathname).path,
|
|
2061
2061
|
external: !!this.rewrite && p.origin !== this.origin,
|
|
2062
2062
|
searchStr: x,
|
|
2063
2063
|
search: Xe(r?.search, g),
|
|
2064
|
-
hash:
|
|
2064
|
+
hash: At(p.hash.slice(1)).path,
|
|
2065
2065
|
state: tt(r?.state, h)
|
|
2066
2066
|
};
|
|
2067
2067
|
}, o = n(s), { __tempLocation: i, __tempKey: c } = o.state;
|
|
@@ -2118,7 +2118,7 @@ var ji = class {
|
|
|
2118
2118
|
} catch {
|
|
2119
2119
|
}
|
|
2120
2120
|
}
|
|
2121
|
-
const b = s.leaveParams ? m :
|
|
2121
|
+
const b = s.leaveParams ? m : At(Gr({
|
|
2122
2122
|
path: m,
|
|
2123
2123
|
params: p,
|
|
2124
2124
|
decoder: this.pathParamsDecoder,
|
|
@@ -2149,24 +2149,24 @@ var ji = class {
|
|
|
2149
2149
|
_includeValidateSearch: s._includeValidateSearch
|
|
2150
2150
|
}), y = Xe(f, y);
|
|
2151
2151
|
const S = this.options.stringifySearch(y), w = o.hash === !0 ? i.hash : o.hash ? et(o.hash, i.hash) : void 0, N = w ? `#${w}` : "";
|
|
2152
|
-
let
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2155
|
-
let R, k,
|
|
2152
|
+
let j = o.state === !0 ? i.state : o.state ? et(o.state, i.state) : {};
|
|
2153
|
+
j = tt(i.state, j);
|
|
2154
|
+
const _ = `${b}${S}${N}`;
|
|
2155
|
+
let R, k, M = !1;
|
|
2156
2156
|
if (this.rewrite) {
|
|
2157
|
-
const O = new URL(
|
|
2158
|
-
R = O.href.replace(O.origin, ""), D.origin !== this.origin ? (k = D.href,
|
|
2157
|
+
const O = new URL(_, this.origin), D = uo(this.rewrite, O);
|
|
2158
|
+
R = O.href.replace(O.origin, ""), D.origin !== this.origin ? (k = D.href, M = !0) : k = D.pathname + D.search + D.hash;
|
|
2159
2159
|
} else
|
|
2160
|
-
R = Wa(
|
|
2160
|
+
R = Wa(_), k = R;
|
|
2161
2161
|
return {
|
|
2162
2162
|
publicHref: k,
|
|
2163
2163
|
href: R,
|
|
2164
2164
|
pathname: b,
|
|
2165
2165
|
search: y,
|
|
2166
2166
|
searchStr: S,
|
|
2167
|
-
state:
|
|
2167
|
+
state: j,
|
|
2168
2168
|
hash: w ?? "",
|
|
2169
|
-
external:
|
|
2169
|
+
external: M,
|
|
2170
2170
|
unmaskOnReload: o.unmaskOnReload
|
|
2171
2171
|
};
|
|
2172
2172
|
}, n = (o = {}, i) => {
|
|
@@ -2211,7 +2211,7 @@ var ji = class {
|
|
|
2211
2211
|
}), f;
|
|
2212
2212
|
}, c = $e(this.latestLocation.href) === $e(n.href);
|
|
2213
2213
|
let l = this.commitLocationPromise;
|
|
2214
|
-
if (this.commitLocationPromise =
|
|
2214
|
+
if (this.commitLocationPromise = wt(() => {
|
|
2215
2215
|
l?.resolve(), l = void 0;
|
|
2216
2216
|
}), c && i()) this.load();
|
|
2217
2217
|
else {
|
|
@@ -2544,36 +2544,36 @@ var ji = class {
|
|
|
2544
2544
|
params: n,
|
|
2545
2545
|
decoder: this.pathParamsDecoder,
|
|
2546
2546
|
server: this.isServer
|
|
2547
|
-
}), w = u.id + y + b, N = this.getMatch(w),
|
|
2547
|
+
}), w = u.id + y + b, N = this.getMatch(w), j = d.get(u.id), _ = N?._strictParams ?? S;
|
|
2548
2548
|
let R;
|
|
2549
2549
|
if (!N) try {
|
|
2550
|
-
on(u,
|
|
2550
|
+
on(u, _);
|
|
2551
2551
|
} catch (D) {
|
|
2552
2552
|
if (ge(D) || Se(D) ? R = D : R = new Ni(D.message, { cause: D }), t?.throwOnError) throw R;
|
|
2553
2553
|
}
|
|
2554
|
-
Object.assign(n,
|
|
2555
|
-
const k =
|
|
2556
|
-
let
|
|
2557
|
-
if (N)
|
|
2554
|
+
Object.assign(n, _);
|
|
2555
|
+
const k = j ? "stay" : "enter";
|
|
2556
|
+
let M;
|
|
2557
|
+
if (N) M = {
|
|
2558
2558
|
...N,
|
|
2559
2559
|
cause: k,
|
|
2560
|
-
params:
|
|
2561
|
-
_strictParams:
|
|
2562
|
-
search: Xe(
|
|
2560
|
+
params: j?.params ?? n,
|
|
2561
|
+
_strictParams: _,
|
|
2562
|
+
search: Xe(j ? j.search : N.search, m),
|
|
2563
2563
|
_strictSearch: p
|
|
2564
2564
|
};
|
|
2565
2565
|
else {
|
|
2566
2566
|
const D = u.options.loader || u.options.beforeLoad || u.lazyFn || lo(u) ? "pending" : "success";
|
|
2567
|
-
|
|
2567
|
+
M = {
|
|
2568
2568
|
id: w,
|
|
2569
2569
|
ssr: u.options.ssr,
|
|
2570
2570
|
index: f,
|
|
2571
2571
|
routeId: u.id,
|
|
2572
|
-
params:
|
|
2573
|
-
_strictParams:
|
|
2572
|
+
params: j?.params ?? n,
|
|
2573
|
+
_strictParams: _,
|
|
2574
2574
|
pathname: y,
|
|
2575
2575
|
updatedAt: Date.now(),
|
|
2576
|
-
search:
|
|
2576
|
+
search: j ? Xe(j.search, m) : m,
|
|
2577
2577
|
_strictSearch: p,
|
|
2578
2578
|
searchError: void 0,
|
|
2579
2579
|
status: D,
|
|
@@ -2581,13 +2581,13 @@ var ji = class {
|
|
|
2581
2581
|
error: void 0,
|
|
2582
2582
|
paramsError: R,
|
|
2583
2583
|
__routeContext: void 0,
|
|
2584
|
-
_nonReactive: { loadPromise:
|
|
2584
|
+
_nonReactive: { loadPromise: wt() },
|
|
2585
2585
|
__beforeLoadContext: void 0,
|
|
2586
2586
|
context: {},
|
|
2587
2587
|
abortController: new AbortController(),
|
|
2588
2588
|
fetchCount: 0,
|
|
2589
2589
|
cause: k,
|
|
2590
|
-
loaderDeps:
|
|
2590
|
+
loaderDeps: j ? tt(j.loaderDeps, x) : x,
|
|
2591
2591
|
invalid: !1,
|
|
2592
2592
|
preload: !1,
|
|
2593
2593
|
links: void 0,
|
|
@@ -2598,13 +2598,13 @@ var ji = class {
|
|
|
2598
2598
|
fullPath: u.fullPath
|
|
2599
2599
|
};
|
|
2600
2600
|
}
|
|
2601
|
-
t?.preload || (
|
|
2601
|
+
t?.preload || (M.globalNotFound = c === u.id), M.searchError = g;
|
|
2602
2602
|
const O = this.getParentContext(h);
|
|
2603
|
-
|
|
2603
|
+
M.context = {
|
|
2604
2604
|
...O,
|
|
2605
|
-
...
|
|
2606
|
-
...
|
|
2607
|
-
}, l[f] =
|
|
2605
|
+
...M.__routeContext,
|
|
2606
|
+
...M.__beforeLoadContext
|
|
2607
|
+
}, l[f] = M;
|
|
2608
2608
|
}
|
|
2609
2609
|
for (let f = 0; f < l.length; f++) {
|
|
2610
2610
|
const u = l[f], h = this.looseRoutesById[u.routeId], m = this.getMatch(u.id), p = d.get(u.routeId);
|
|
@@ -2809,8 +2809,8 @@ function Li() {
|
|
|
2809
2809
|
process.env.NODE_ENV !== "production" && console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.");
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
|
-
const gt = /* @__PURE__ */ Oi(), an = "data-scroll-restoration-id",
|
|
2813
|
-
function
|
|
2812
|
+
const gt = /* @__PURE__ */ Oi(), an = "data-scroll-restoration-id", Ii = (e) => e.state.__TSR_key || e.href;
|
|
2813
|
+
function Mi(e) {
|
|
2814
2814
|
const t = e.getAttribute(an);
|
|
2815
2815
|
if (t) return `[${an}="${t}"]`;
|
|
2816
2816
|
let s = "", r = e, n;
|
|
@@ -2842,7 +2842,7 @@ function cn(e) {
|
|
|
2842
2842
|
function Di(e, t) {
|
|
2843
2843
|
const s = e.options.scrollRestoration, r = e._scroll;
|
|
2844
2844
|
s && (r.restoring = !0);
|
|
2845
|
-
const n = e.options.getScrollRestorationKey ||
|
|
2845
|
+
const n = e.options.getScrollRestorationKey || Ii, o = /* @__PURE__ */ new Map(), i = (d, f, u) => {
|
|
2846
2846
|
const h = o.get(d) || {};
|
|
2847
2847
|
h.scrollX = f, h.scrollY = u, o.set(d, h);
|
|
2848
2848
|
}, c = (d) => {
|
|
@@ -2855,7 +2855,7 @@ function Di(e, t) {
|
|
|
2855
2855
|
}, l = (d) => {
|
|
2856
2856
|
if (!r.restoring) return;
|
|
2857
2857
|
const f = gt[d] ||= {};
|
|
2858
|
-
for (const [u, h] of o) u === xt ? f[xt] = h : u.isConnected && (f[
|
|
2858
|
+
for (const [u, h] of o) u === xt ? f[xt] = h : u.isConnected && (f[Mi(u)] = h);
|
|
2859
2859
|
};
|
|
2860
2860
|
s && !r.restoration && (r.restoration = !0, Qt = !1, history.scrollRestoration = "manual", document.addEventListener("scroll", c, !0), e.subscribe("onBeforeLoad", (d) => {
|
|
2861
2861
|
d.fromLocation && l(n(d.fromLocation)), o.clear();
|
|
@@ -2888,29 +2888,29 @@ function Di(e, t) {
|
|
|
2888
2888
|
let y = !1;
|
|
2889
2889
|
if (h) {
|
|
2890
2890
|
const S = cr.get(d.toLocation), w = x && b && (S === "PUSH" || S === "REPLACE"), N = r.restoring ? gt[p] : void 0;
|
|
2891
|
-
if (N) for (const
|
|
2892
|
-
const { scrollX:
|
|
2893
|
-
if (
|
|
2891
|
+
if (N) for (const j in N) {
|
|
2892
|
+
const { scrollX: _, scrollY: R } = N[j];
|
|
2893
|
+
if (j === xt) {
|
|
2894
2894
|
if (w) continue;
|
|
2895
2895
|
scrollTo({
|
|
2896
2896
|
top: R,
|
|
2897
|
-
left:
|
|
2897
|
+
left: _,
|
|
2898
2898
|
behavior: f
|
|
2899
2899
|
}), y = !0;
|
|
2900
2900
|
} else {
|
|
2901
|
-
const k = lr(
|
|
2902
|
-
k && (k.scrollLeft =
|
|
2901
|
+
const k = lr(j);
|
|
2902
|
+
k && (k.scrollLeft = _, k.scrollTop = R);
|
|
2903
2903
|
}
|
|
2904
2904
|
}
|
|
2905
2905
|
if (!y && !x) {
|
|
2906
|
-
const
|
|
2906
|
+
const j = {
|
|
2907
2907
|
top: 0,
|
|
2908
2908
|
left: 0,
|
|
2909
2909
|
behavior: f
|
|
2910
2910
|
};
|
|
2911
|
-
if (scrollTo(
|
|
2911
|
+
if (scrollTo(j), u) {
|
|
2912
2912
|
m ??= cn(u);
|
|
2913
|
-
for (const
|
|
2913
|
+
for (const _ of m) _.scrollTo(j);
|
|
2914
2914
|
}
|
|
2915
2915
|
}
|
|
2916
2916
|
}
|
|
@@ -3425,18 +3425,18 @@ function Xi() {
|
|
|
3425
3425
|
} else g = p.current;
|
|
3426
3426
|
p = c(
|
|
3427
3427
|
function() {
|
|
3428
|
-
function b(
|
|
3428
|
+
function b(j) {
|
|
3429
3429
|
if (!y) {
|
|
3430
|
-
if (y = !0, S =
|
|
3431
|
-
var
|
|
3432
|
-
if (m(
|
|
3433
|
-
return w =
|
|
3430
|
+
if (y = !0, S = j, j = h(j), m !== void 0 && g.hasValue) {
|
|
3431
|
+
var _ = g.value;
|
|
3432
|
+
if (m(_, j))
|
|
3433
|
+
return w = _;
|
|
3434
3434
|
}
|
|
3435
|
-
return w =
|
|
3435
|
+
return w = j;
|
|
3436
3436
|
}
|
|
3437
|
-
if (
|
|
3438
|
-
var R = h(
|
|
3439
|
-
return m !== void 0 && m(
|
|
3437
|
+
if (_ = w, r(S, j)) return _;
|
|
3438
|
+
var R = h(j);
|
|
3439
|
+
return m !== void 0 && m(_, R) ? (S = j, _) : (S = j, w = R);
|
|
3440
3440
|
}
|
|
3441
3441
|
var y = !1, S, w, N = u === void 0 ? null : u;
|
|
3442
3442
|
return [
|
|
@@ -3476,19 +3476,19 @@ function Zi() {
|
|
|
3476
3476
|
} else g = p.current;
|
|
3477
3477
|
p = c(
|
|
3478
3478
|
function() {
|
|
3479
|
-
function b(
|
|
3479
|
+
function b(j) {
|
|
3480
3480
|
if (!y) {
|
|
3481
|
-
if (y = !0, S =
|
|
3482
|
-
var
|
|
3483
|
-
if (m(
|
|
3484
|
-
return w =
|
|
3481
|
+
if (y = !0, S = j, j = h(j), m !== void 0 && g.hasValue) {
|
|
3482
|
+
var _ = g.value;
|
|
3483
|
+
if (m(_, j))
|
|
3484
|
+
return w = _;
|
|
3485
3485
|
}
|
|
3486
|
-
return w =
|
|
3486
|
+
return w = j;
|
|
3487
3487
|
}
|
|
3488
|
-
if (
|
|
3489
|
-
return
|
|
3490
|
-
var R = h(
|
|
3491
|
-
return m !== void 0 && m(
|
|
3488
|
+
if (_ = w, r(S, j))
|
|
3489
|
+
return _;
|
|
3490
|
+
var R = h(j);
|
|
3491
|
+
return m !== void 0 && m(_, R) ? (S = j, _) : (S = j, w = R);
|
|
3492
3492
|
}
|
|
3493
3493
|
var y = !1, S, w, N = u === void 0 ? null : u;
|
|
3494
3494
|
return [
|
|
@@ -3612,7 +3612,7 @@ function No(e) {
|
|
|
3612
3612
|
});
|
|
3613
3613
|
}
|
|
3614
3614
|
function rc(e, t) {
|
|
3615
|
-
const s = Ce(), r = Fa(t), { activeProps: n, inactiveProps: o, activeOptions: i, to: c, preload: l, preloadDelay: d, preloadIntentProximity: f, hashScrollIntoView: u, replace: h, startTransition: m, resetScroll: p, viewTransition: g, children: x, target: b, disabled: y, style: S, className: w, onClick: N, onBlur:
|
|
3615
|
+
const s = Ce(), r = Fa(t), { activeProps: n, inactiveProps: o, activeOptions: i, to: c, preload: l, preloadDelay: d, preloadIntentProximity: f, hashScrollIntoView: u, replace: h, startTransition: m, resetScroll: p, viewTransition: g, children: x, target: b, disabled: y, style: S, className: w, onClick: N, onBlur: j, onFocus: _, onMouseEnter: R, onMouseLeave: k, onTouchStart: M, ignoreBlocker: O, params: D, search: ee, hash: V, state: Z, mask: Q, reloadDocument: Y, unsafeRelative: de, from: fe, _fromLocation: P, ...C } = e, F = mo(), W = B.useMemo(() => e, [
|
|
3616
3616
|
s,
|
|
3617
3617
|
e.from,
|
|
3618
3618
|
e._fromLocation,
|
|
@@ -3633,10 +3633,10 @@ function rc(e, t) {
|
|
|
3633
3633
|
s,
|
|
3634
3634
|
q,
|
|
3635
3635
|
W
|
|
3636
|
-
]),
|
|
3636
|
+
]), I = L.maskedLocation ? L.maskedLocation.publicHref : L.publicHref, $ = L.maskedLocation ? L.maskedLocation.external : L.external, J = B.useMemo(() => lc(I, $, s.history, y), [
|
|
3637
3637
|
y,
|
|
3638
3638
|
$,
|
|
3639
|
-
|
|
3639
|
+
I,
|
|
3640
3640
|
s.history
|
|
3641
3641
|
]), G = B.useMemo(() => {
|
|
3642
3642
|
if (J?.external) {
|
|
@@ -3659,7 +3659,7 @@ function rc(e, t) {
|
|
|
3659
3659
|
c,
|
|
3660
3660
|
J,
|
|
3661
3661
|
s.protocolAllowlist
|
|
3662
|
-
]),
|
|
3662
|
+
]), ue = B.useMemo(() => {
|
|
3663
3663
|
if (G) return !1;
|
|
3664
3664
|
if (i?.exact) {
|
|
3665
3665
|
if (!si(q.pathname, L.pathname, s.basepath)) return !1;
|
|
@@ -3683,14 +3683,14 @@ function rc(e, t) {
|
|
|
3683
3683
|
L.pathname,
|
|
3684
3684
|
L.search,
|
|
3685
3685
|
s.basepath
|
|
3686
|
-
]), be =
|
|
3686
|
+
]), be = ue ? et(n, {}) ?? nc : Xs, ne = ue ? Xs : et(o, {}) ?? Xs, De = [
|
|
3687
3687
|
w,
|
|
3688
3688
|
be.className,
|
|
3689
|
-
|
|
3690
|
-
].filter(Boolean).join(" "), _e = (S || be.style ||
|
|
3689
|
+
ne.className
|
|
3690
|
+
].filter(Boolean).join(" "), _e = (S || be.style || ne.style) && {
|
|
3691
3691
|
...S,
|
|
3692
3692
|
...be.style,
|
|
3693
|
-
...
|
|
3693
|
+
...ne.style
|
|
3694
3694
|
}, [ke, z] = B.useState(!1), me = B.useRef(!1), ye = e.reloadDocument || G ? !1 : l ?? s.options.defaultPreload, Ee = d ?? s.options.defaultPreloadDelay ?? 0, Ae = B.useCallback(() => {
|
|
3695
3695
|
s.preloadRoute({
|
|
3696
3696
|
...W,
|
|
@@ -3733,7 +3733,7 @@ function rc(e, t) {
|
|
|
3733
3733
|
}
|
|
3734
3734
|
};
|
|
3735
3735
|
if (G) return {
|
|
3736
|
-
...
|
|
3736
|
+
...C,
|
|
3737
3737
|
ref: r,
|
|
3738
3738
|
href: G,
|
|
3739
3739
|
...x && { children: x },
|
|
@@ -3742,11 +3742,11 @@ function rc(e, t) {
|
|
|
3742
3742
|
...S && { style: S },
|
|
3743
3743
|
...w && { className: w },
|
|
3744
3744
|
...N && { onClick: N },
|
|
3745
|
-
...
|
|
3746
|
-
...
|
|
3745
|
+
...j && { onBlur: j },
|
|
3746
|
+
..._ && { onFocus: _ },
|
|
3747
3747
|
...R && { onMouseEnter: R },
|
|
3748
3748
|
...k && { onMouseLeave: k },
|
|
3749
|
-
...
|
|
3749
|
+
...M && { onTouchStart: M }
|
|
3750
3750
|
};
|
|
3751
3751
|
const ze = (te) => {
|
|
3752
3752
|
if (y || ye !== "intent") return;
|
|
@@ -3755,36 +3755,36 @@ function rc(e, t) {
|
|
|
3755
3755
|
return;
|
|
3756
3756
|
}
|
|
3757
3757
|
const we = te.currentTarget;
|
|
3758
|
-
if (
|
|
3758
|
+
if (Lt.has(we)) return;
|
|
3759
3759
|
const Je = setTimeout(() => {
|
|
3760
|
-
|
|
3760
|
+
Lt.delete(we), Ae();
|
|
3761
3761
|
}, Ee);
|
|
3762
|
-
|
|
3762
|
+
Lt.set(we, Je);
|
|
3763
3763
|
}, Ea = (te) => {
|
|
3764
3764
|
y || ye !== "intent" || Ae();
|
|
3765
|
-
},
|
|
3765
|
+
}, Mr = (te) => {
|
|
3766
3766
|
if (y || !ye || !Ee) return;
|
|
3767
|
-
const we = te.currentTarget, Je =
|
|
3768
|
-
Je && (clearTimeout(Je),
|
|
3767
|
+
const we = te.currentTarget, Je = Lt.get(we);
|
|
3768
|
+
Je && (clearTimeout(Je), Lt.delete(we));
|
|
3769
3769
|
};
|
|
3770
3770
|
return {
|
|
3771
|
-
...
|
|
3771
|
+
...C,
|
|
3772
3772
|
...be,
|
|
3773
|
-
...
|
|
3773
|
+
...ne,
|
|
3774
3774
|
href: J?.href,
|
|
3775
3775
|
ref: r,
|
|
3776
3776
|
onClick: mt([N, Fs]),
|
|
3777
|
-
onBlur: mt([
|
|
3778
|
-
onFocus: mt([
|
|
3777
|
+
onBlur: mt([j, Mr]),
|
|
3778
|
+
onFocus: mt([_, ze]),
|
|
3779
3779
|
onMouseEnter: mt([R, ze]),
|
|
3780
|
-
onMouseLeave: mt([k,
|
|
3781
|
-
onTouchStart: mt([
|
|
3780
|
+
onMouseLeave: mt([k, Mr]),
|
|
3781
|
+
onTouchStart: mt([M, Ea]),
|
|
3782
3782
|
disabled: !!y,
|
|
3783
3783
|
target: b,
|
|
3784
3784
|
..._e && { style: _e },
|
|
3785
3785
|
...De && { className: De },
|
|
3786
3786
|
...y && oc,
|
|
3787
|
-
...
|
|
3787
|
+
...ue && ac,
|
|
3788
3788
|
...F && ke && ic
|
|
3789
3789
|
};
|
|
3790
3790
|
}
|
|
@@ -3794,7 +3794,7 @@ var Xs = {}, nc = { className: "active" }, oc = {
|
|
|
3794
3794
|
}, ac = {
|
|
3795
3795
|
"data-status": "active",
|
|
3796
3796
|
"aria-current": "page"
|
|
3797
|
-
}, ic = { "data-transitioning": "transitioning" },
|
|
3797
|
+
}, ic = { "data-transitioning": "transitioning" }, Lt = /* @__PURE__ */ new WeakMap(), cc = { rootMargin: "100px" }, mt = (e) => (t) => {
|
|
3798
3798
|
for (const s of e)
|
|
3799
3799
|
if (s) {
|
|
3800
3800
|
if (t.defaultPrevented) return;
|
|
@@ -3986,7 +3986,7 @@ function wc({ router: e, matchId: t, resetKey: s, matchState: r }) {
|
|
|
3986
3986
|
}
|
|
3987
3987
|
function Sc() {
|
|
3988
3988
|
const e = Ce(), t = B.useRef();
|
|
3989
|
-
return
|
|
3989
|
+
return Ft(() => {
|
|
3990
3990
|
const s = e.stores.resolvedLocation.get(), r = t.current;
|
|
3991
3991
|
s && (!r || r.href !== s.href) && e.emit({
|
|
3992
3992
|
type: "onRendered",
|
|
@@ -4030,7 +4030,7 @@ var bn = B.memo(function({ matchId: t }) {
|
|
|
4030
4030
|
if (f) {
|
|
4031
4031
|
const u = s.getMatch(o.id);
|
|
4032
4032
|
if (u && !u._nonReactive.minPendingPromise) {
|
|
4033
|
-
const h =
|
|
4033
|
+
const h = wt();
|
|
4034
4034
|
u._nonReactive.minPendingPromise = h, setTimeout(() => {
|
|
4035
4035
|
h.resolve(), u._nonReactive.minPendingPromise = void 0;
|
|
4036
4036
|
}, f);
|
|
@@ -4101,7 +4101,7 @@ function Rc() {
|
|
|
4101
4101
|
}), () => {
|
|
4102
4102
|
u();
|
|
4103
4103
|
};
|
|
4104
|
-
}, [e, e.history]),
|
|
4104
|
+
}, [e, e.history]), Ft(() => {
|
|
4105
4105
|
if (typeof window < "u" && e.ssr || t.current.router === e && t.current.mounted) return;
|
|
4106
4106
|
t.current = {
|
|
4107
4107
|
router: e,
|
|
@@ -4113,7 +4113,7 @@ function Rc() {
|
|
|
4113
4113
|
console.error(h);
|
|
4114
4114
|
}
|
|
4115
4115
|
})();
|
|
4116
|
-
}, [e]),
|
|
4116
|
+
}, [e]), Ft(() => {
|
|
4117
4117
|
i && !n && e.emit({
|
|
4118
4118
|
type: "onLoad",
|
|
4119
4119
|
...yt(e.stores.location.get(), e.stores.resolvedLocation.get())
|
|
@@ -4122,7 +4122,7 @@ function Rc() {
|
|
|
4122
4122
|
i,
|
|
4123
4123
|
e,
|
|
4124
4124
|
n
|
|
4125
|
-
]),
|
|
4125
|
+
]), Ft(() => {
|
|
4126
4126
|
f && !d && e.emit({
|
|
4127
4127
|
type: "onBeforeRouteMount",
|
|
4128
4128
|
...yt(e.stores.location.get(), e.stores.resolvedLocation.get())
|
|
@@ -4131,7 +4131,7 @@ function Rc() {
|
|
|
4131
4131
|
d,
|
|
4132
4132
|
f,
|
|
4133
4133
|
e
|
|
4134
|
-
]),
|
|
4134
|
+
]), Ft(() => {
|
|
4135
4135
|
if (l && !c) {
|
|
4136
4136
|
const u = yt(e.stores.location.get(), e.stores.resolvedLocation.get());
|
|
4137
4137
|
e.emit({
|
|
@@ -4204,7 +4204,7 @@ function Po(e, t) {
|
|
|
4204
4204
|
return e.apply(t, arguments);
|
|
4205
4205
|
};
|
|
4206
4206
|
}
|
|
4207
|
-
const { toString: Pc } = Object.prototype, { getPrototypeOf:
|
|
4207
|
+
const { toString: Pc } = Object.prototype, { getPrototypeOf: St } = Object, { iterator: qt, toStringTag: To } = Symbol, js = (({ hasOwnProperty: e }) => (t, s) => e.call(t, s))(Object.prototype), Wt = (e, t) => {
|
|
4208
4208
|
let s = e;
|
|
4209
4209
|
const r = [];
|
|
4210
4210
|
for (; s != null && s !== Object.prototype; ) {
|
|
@@ -4212,45 +4212,45 @@ const { toString: Pc } = Object.prototype, { getPrototypeOf: wt } = Object, { it
|
|
|
4212
4212
|
return !1;
|
|
4213
4213
|
if (r.push(s), js(s, t))
|
|
4214
4214
|
return !0;
|
|
4215
|
-
s =
|
|
4215
|
+
s = St(s);
|
|
4216
4216
|
}
|
|
4217
4217
|
return !1;
|
|
4218
4218
|
}, Tc = (e, t) => e != null && Wt(e, t) ? e[t] : void 0, Nr = /* @__PURE__ */ ((e) => (t) => {
|
|
4219
4219
|
const s = Pc.call(t);
|
|
4220
4220
|
return e[s] || (e[s] = s.slice(8, -1).toLowerCase());
|
|
4221
|
-
})(/* @__PURE__ */ Object.create(null)), Te = (e) => (e = e.toLowerCase(), (t) => Nr(t) === e), Ls = (e) => (t) => typeof t === e, { isArray: lt } = Array,
|
|
4222
|
-
function
|
|
4223
|
-
return e !== null && !
|
|
4221
|
+
})(/* @__PURE__ */ Object.create(null)), Te = (e) => (e = e.toLowerCase(), (t) => Nr(t) === e), Ls = (e) => (t) => typeof t === e, { isArray: lt } = Array, Rt = Ls("undefined");
|
|
4222
|
+
function Ct(e) {
|
|
4223
|
+
return e !== null && !Rt(e) && e.constructor !== null && !Rt(e.constructor) && Re(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
4224
4224
|
}
|
|
4225
4225
|
const Ao = Te("ArrayBuffer");
|
|
4226
4226
|
function Ac(e) {
|
|
4227
4227
|
let t;
|
|
4228
4228
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ao(e.buffer), t;
|
|
4229
4229
|
}
|
|
4230
|
-
const Oc = Ls("string"), Re = Ls("function"), Oo = Ls("number"),
|
|
4231
|
-
if (!
|
|
4230
|
+
const Oc = Ls("string"), Re = Ls("function"), Oo = Ls("number"), _t = (e) => e !== null && typeof e == "object", Lc = (e) => e === !0 || e === !1, ms = (e) => {
|
|
4231
|
+
if (!_t(e))
|
|
4232
4232
|
return !1;
|
|
4233
|
-
const t =
|
|
4234
|
-
return (t === null || t === Object.prototype ||
|
|
4233
|
+
const t = St(e);
|
|
4234
|
+
return (t === null || t === Object.prototype || St(t) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
4235
4235
|
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
4236
4236
|
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
4237
4237
|
!Wt(e, To) && !Wt(e, qt);
|
|
4238
|
-
},
|
|
4239
|
-
if (!
|
|
4238
|
+
}, Ic = (e) => {
|
|
4239
|
+
if (!_t(e) || Ct(e))
|
|
4240
4240
|
return !1;
|
|
4241
4241
|
try {
|
|
4242
4242
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
4243
4243
|
} catch {
|
|
4244
4244
|
return !1;
|
|
4245
4245
|
}
|
|
4246
|
-
},
|
|
4246
|
+
}, Mc = Te("Date"), Dc = Te("File"), Fc = (e) => !!(e && typeof e.uri < "u"), Uc = (e) => e && typeof e.getParts < "u", $c = Te("Blob"), Bc = Te("FileList"), zc = (e) => _t(e) && Re(e.pipe);
|
|
4247
4247
|
function Vc() {
|
|
4248
4248
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
4249
4249
|
}
|
|
4250
4250
|
const yn = Vc(), vn = typeof yn.FormData < "u" ? yn.FormData : void 0, Wc = (e) => {
|
|
4251
4251
|
if (!e) return !1;
|
|
4252
4252
|
if (vn && e instanceof vn) return !0;
|
|
4253
|
-
const t =
|
|
4253
|
+
const t = St(e);
|
|
4254
4254
|
if (!t || t === Object.prototype || !Re(e.append)) return !1;
|
|
4255
4255
|
const s = Nr(e);
|
|
4256
4256
|
return s === "formdata" || // detect form-data instance
|
|
@@ -4269,7 +4269,7 @@ function Gt(e, t, { allOwnKeys: s = !1 } = {}) {
|
|
|
4269
4269
|
for (r = 0, n = e.length; r < n; r++)
|
|
4270
4270
|
t.call(null, e[r], r, e);
|
|
4271
4271
|
else {
|
|
4272
|
-
if (
|
|
4272
|
+
if (Ct(e))
|
|
4273
4273
|
return;
|
|
4274
4274
|
const o = s ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
4275
4275
|
let c;
|
|
@@ -4278,7 +4278,7 @@ function Gt(e, t, { allOwnKeys: s = !1 } = {}) {
|
|
|
4278
4278
|
}
|
|
4279
4279
|
}
|
|
4280
4280
|
function Lo(e, t) {
|
|
4281
|
-
if (
|
|
4281
|
+
if (Ct(e))
|
|
4282
4282
|
return null;
|
|
4283
4283
|
t = t.toLowerCase();
|
|
4284
4284
|
const s = Object.keys(e);
|
|
@@ -4288,17 +4288,17 @@ function Lo(e, t) {
|
|
|
4288
4288
|
return n;
|
|
4289
4289
|
return null;
|
|
4290
4290
|
}
|
|
4291
|
-
const rt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
4291
|
+
const rt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Io = (e) => !Rt(e) && e !== rt;
|
|
4292
4292
|
function hr(...e) {
|
|
4293
|
-
const { caseless: t, skipUndefined: s } =
|
|
4293
|
+
const { caseless: t, skipUndefined: s } = Io(this) && this || {}, r = {}, n = (o, i) => {
|
|
4294
4294
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
4295
4295
|
return;
|
|
4296
4296
|
const c = t && typeof i == "string" && Lo(r, i) || i, l = js(r, c) ? r[c] : void 0;
|
|
4297
|
-
ms(l) && ms(o) ? r[c] = hr(l, o) : ms(o) ? r[c] = hr({}, o) : lt(o) ? r[c] = o.slice() : (!s || !
|
|
4297
|
+
ms(l) && ms(o) ? r[c] = hr(l, o) : ms(o) ? r[c] = hr({}, o) : lt(o) ? r[c] = o.slice() : (!s || !Rt(o)) && (r[c] = o);
|
|
4298
4298
|
};
|
|
4299
4299
|
for (let o = 0, i = e.length; o < i; o++) {
|
|
4300
4300
|
const c = e[o];
|
|
4301
|
-
if (!c ||
|
|
4301
|
+
if (!c || Ct(c) || (Gt(c, n), typeof c != "object" || lt(c)))
|
|
4302
4302
|
continue;
|
|
4303
4303
|
const l = Object.getOwnPropertySymbols(c);
|
|
4304
4304
|
for (let d = 0; d < l.length; d++) {
|
|
@@ -4346,7 +4346,7 @@ const Xc = (e, t, s, { allOwnKeys: r } = {}) => (Gt(
|
|
|
4346
4346
|
do {
|
|
4347
4347
|
for (n = Object.getOwnPropertyNames(e), o = n.length; o-- > 0; )
|
|
4348
4348
|
i = n[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
4349
|
-
e = s !== !1 &&
|
|
4349
|
+
e = s !== !1 && St(e);
|
|
4350
4350
|
} while (e && (!s || s(e, t)) && e !== Object.prototype);
|
|
4351
4351
|
return t;
|
|
4352
4352
|
}, tl = (e, t, s) => {
|
|
@@ -4362,7 +4362,7 @@ const Xc = (e, t, s, { allOwnKeys: r } = {}) => (Gt(
|
|
|
4362
4362
|
for (; t-- > 0; )
|
|
4363
4363
|
s[t] = e[t];
|
|
4364
4364
|
return s;
|
|
4365
|
-
}, rl = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
4365
|
+
}, rl = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && St(Uint8Array)), nl = (e, t) => {
|
|
4366
4366
|
const r = (e && e[qt]).call(e);
|
|
4367
4367
|
let n;
|
|
4368
4368
|
for (; (n = r.next()) && !n.done; ) {
|
|
@@ -4377,14 +4377,14 @@ const Xc = (e, t, s, { allOwnKeys: r } = {}) => (Gt(
|
|
|
4377
4377
|
return r;
|
|
4378
4378
|
}, al = Te("HTMLFormElement"), il = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(s, r, n) {
|
|
4379
4379
|
return r.toUpperCase() + n;
|
|
4380
|
-
}), { propertyIsEnumerable: cl } = Object.prototype, ll = Te("RegExp"),
|
|
4380
|
+
}), { propertyIsEnumerable: cl } = Object.prototype, ll = Te("RegExp"), Mo = (e, t) => {
|
|
4381
4381
|
const s = Object.getOwnPropertyDescriptors(e), r = {};
|
|
4382
4382
|
Gt(s, (n, o) => {
|
|
4383
4383
|
let i;
|
|
4384
4384
|
(i = t(n, o, e)) !== !1 && (r[o] = i || n);
|
|
4385
4385
|
}), Object.defineProperties(e, r);
|
|
4386
4386
|
}, dl = (e) => {
|
|
4387
|
-
|
|
4387
|
+
Mo(e, (t, s) => {
|
|
4388
4388
|
if (Re(e) && ["arguments", "caller", "callee"].includes(s))
|
|
4389
4389
|
return !1;
|
|
4390
4390
|
const r = e[s];
|
|
@@ -4412,24 +4412,24 @@ function ml(e) {
|
|
|
4412
4412
|
}
|
|
4413
4413
|
const pl = (e) => {
|
|
4414
4414
|
const t = /* @__PURE__ */ new WeakSet(), s = (r) => {
|
|
4415
|
-
if (
|
|
4415
|
+
if (_t(r)) {
|
|
4416
4416
|
if (t.has(r))
|
|
4417
4417
|
return;
|
|
4418
|
-
if (
|
|
4418
|
+
if (Ct(r))
|
|
4419
4419
|
return r;
|
|
4420
4420
|
if (!("toJSON" in r)) {
|
|
4421
4421
|
t.add(r);
|
|
4422
4422
|
const n = lt(r) ? [] : {};
|
|
4423
4423
|
return Gt(r, (o, i) => {
|
|
4424
4424
|
const c = s(o);
|
|
4425
|
-
!
|
|
4425
|
+
!Rt(c) && (n[i] = c);
|
|
4426
4426
|
}), t.delete(r), n;
|
|
4427
4427
|
}
|
|
4428
4428
|
}
|
|
4429
4429
|
return r;
|
|
4430
4430
|
};
|
|
4431
4431
|
return s(e);
|
|
4432
|
-
}, gl = Te("AsyncFunction"), xl = (e) => e && (
|
|
4432
|
+
}, gl = Te("AsyncFunction"), xl = (e) => e && (_t(e) || Re(e)) && Re(e.then) && Re(e.catch), Do = ((e, t) => e ? setImmediate : t ? ((s, r) => (rt.addEventListener(
|
|
4433
4433
|
"message",
|
|
4434
4434
|
({ source: n, data: o }) => {
|
|
4435
4435
|
n === rt && o === s && r.length && r.shift()();
|
|
@@ -4440,21 +4440,21 @@ const pl = (e) => {
|
|
|
4440
4440
|
}))(`axios@${Math.random()}`, []) : (s) => setTimeout(s))(typeof setImmediate == "function", Re(rt.postMessage)), bl = typeof queueMicrotask < "u" ? queueMicrotask.bind(rt) : typeof process < "u" && process.nextTick || Do, Fo = (e) => e != null && Re(e[qt]), yl = (e) => e != null && Wt(e, qt) && Fo(e), v = {
|
|
4441
4441
|
isArray: lt,
|
|
4442
4442
|
isArrayBuffer: Ao,
|
|
4443
|
-
isBuffer:
|
|
4443
|
+
isBuffer: Ct,
|
|
4444
4444
|
isFormData: Wc,
|
|
4445
4445
|
isArrayBufferView: Ac,
|
|
4446
4446
|
isString: Oc,
|
|
4447
4447
|
isNumber: Oo,
|
|
4448
4448
|
isBoolean: Lc,
|
|
4449
|
-
isObject:
|
|
4449
|
+
isObject: _t,
|
|
4450
4450
|
isPlainObject: ms,
|
|
4451
|
-
isEmptyObject:
|
|
4451
|
+
isEmptyObject: Ic,
|
|
4452
4452
|
isReadableStream: qc,
|
|
4453
4453
|
isRequest: Gc,
|
|
4454
4454
|
isResponse: Kc,
|
|
4455
4455
|
isHeaders: Yc,
|
|
4456
|
-
isUndefined:
|
|
4457
|
-
isDate:
|
|
4456
|
+
isUndefined: Rt,
|
|
4457
|
+
isDate: Mc,
|
|
4458
4458
|
isFile: Dc,
|
|
4459
4459
|
isReactNativeBlob: Fc,
|
|
4460
4460
|
isReactNative: Uc,
|
|
@@ -4484,7 +4484,7 @@ const pl = (e) => {
|
|
|
4484
4484
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
4485
4485
|
hasOwnInPrototypeChain: Wt,
|
|
4486
4486
|
getSafeProp: Tc,
|
|
4487
|
-
reduceDescriptors:
|
|
4487
|
+
reduceDescriptors: Mo,
|
|
4488
4488
|
freezeMethods: dl,
|
|
4489
4489
|
toObjectSet: ul,
|
|
4490
4490
|
toCamelCase: il,
|
|
@@ -4492,7 +4492,7 @@ const pl = (e) => {
|
|
|
4492
4492
|
toFiniteNumber: hl,
|
|
4493
4493
|
findKey: Lo,
|
|
4494
4494
|
global: rt,
|
|
4495
|
-
isContextDefined:
|
|
4495
|
+
isContextDefined: Io,
|
|
4496
4496
|
isSpecCompliantForm: ml,
|
|
4497
4497
|
toJSONObject: pl,
|
|
4498
4498
|
isAsyncFn: gl,
|
|
@@ -4555,7 +4555,7 @@ function Uo(e) {
|
|
|
4555
4555
|
}), t;
|
|
4556
4556
|
}
|
|
4557
4557
|
const wn = /* @__PURE__ */ Symbol("internals");
|
|
4558
|
-
function
|
|
4558
|
+
function It(e) {
|
|
4559
4559
|
return e && String(e).trim().toLowerCase();
|
|
4560
4560
|
}
|
|
4561
4561
|
function ps(e) {
|
|
@@ -4603,7 +4603,7 @@ let xe = class {
|
|
|
4603
4603
|
set(t, s, r) {
|
|
4604
4604
|
const n = this;
|
|
4605
4605
|
function o(c, l, d) {
|
|
4606
|
-
const f =
|
|
4606
|
+
const f = It(l);
|
|
4607
4607
|
if (!f)
|
|
4608
4608
|
return;
|
|
4609
4609
|
const u = v.findKey(n, f);
|
|
@@ -4627,7 +4627,7 @@ let xe = class {
|
|
|
4627
4627
|
return this;
|
|
4628
4628
|
}
|
|
4629
4629
|
get(t, s) {
|
|
4630
|
-
if (t =
|
|
4630
|
+
if (t = It(t), t) {
|
|
4631
4631
|
const r = v.findKey(this, t);
|
|
4632
4632
|
if (r) {
|
|
4633
4633
|
const n = this[r];
|
|
@@ -4644,7 +4644,7 @@ let xe = class {
|
|
|
4644
4644
|
}
|
|
4645
4645
|
}
|
|
4646
4646
|
has(t, s) {
|
|
4647
|
-
if (t =
|
|
4647
|
+
if (t = It(t), t) {
|
|
4648
4648
|
const r = v.findKey(this, t);
|
|
4649
4649
|
return !!(r && this[r] !== void 0 && (!s || Zs(this, this[r], r, s)));
|
|
4650
4650
|
}
|
|
@@ -4654,7 +4654,7 @@ let xe = class {
|
|
|
4654
4654
|
const r = this;
|
|
4655
4655
|
let n = !1;
|
|
4656
4656
|
function o(i) {
|
|
4657
|
-
if (i =
|
|
4657
|
+
if (i = It(i), i) {
|
|
4658
4658
|
const c = v.findKey(r, i);
|
|
4659
4659
|
c && (!s || Zs(r, r[c], c, s)) && (delete r[c], n = !0);
|
|
4660
4660
|
}
|
|
@@ -4716,7 +4716,7 @@ let xe = class {
|
|
|
4716
4716
|
accessors: {}
|
|
4717
4717
|
}).accessors, n = this.prototype;
|
|
4718
4718
|
function o(i) {
|
|
4719
|
-
const c =
|
|
4719
|
+
const c = It(i);
|
|
4720
4720
|
r[c] || (Pl(n, i), r[c] = !0);
|
|
4721
4721
|
}
|
|
4722
4722
|
return v.isArray(t) ? t.forEach(o) : o(t), this;
|
|
@@ -4856,13 +4856,13 @@ function Qs(e, t, s) {
|
|
|
4856
4856
|
return n = zo(n), !s && o ? "[" + n + "]" : n;
|
|
4857
4857
|
}).join(s ? "." : "") : t;
|
|
4858
4858
|
}
|
|
4859
|
-
function
|
|
4859
|
+
function Il(e) {
|
|
4860
4860
|
return v.isArray(e) && !e.some(mr);
|
|
4861
4861
|
}
|
|
4862
|
-
const
|
|
4862
|
+
const Ml = v.toFlatObject(v, {}, null, function(t) {
|
|
4863
4863
|
return /^is[A-Z]/.test(t);
|
|
4864
4864
|
});
|
|
4865
|
-
function
|
|
4865
|
+
function Is(e, t, s) {
|
|
4866
4866
|
if (!v.isObject(e))
|
|
4867
4867
|
throw new TypeError("target must be an object");
|
|
4868
4868
|
t = t || new FormData(), s = v.toFlatObject(
|
|
@@ -4908,12 +4908,12 @@ function Ms(e, t, s) {
|
|
|
4908
4908
|
if (l === 1 / 0)
|
|
4909
4909
|
return JSON.stringify(b);
|
|
4910
4910
|
const S = [];
|
|
4911
|
-
return JSON.stringify(b, function(N,
|
|
4912
|
-
if (!v.isObject(
|
|
4913
|
-
return
|
|
4911
|
+
return JSON.stringify(b, function(N, j) {
|
|
4912
|
+
if (!v.isObject(j))
|
|
4913
|
+
return j;
|
|
4914
4914
|
for (; S.length && S[S.length - 1] !== this; )
|
|
4915
4915
|
S.pop();
|
|
4916
|
-
return S.push(
|
|
4916
|
+
return S.push(j), h(y + S.length - 1), j;
|
|
4917
4917
|
});
|
|
4918
4918
|
}
|
|
4919
4919
|
function p(b, y, S) {
|
|
@@ -4923,18 +4923,18 @@ function Ms(e, t, s) {
|
|
|
4923
4923
|
if (b && !S && typeof b == "object") {
|
|
4924
4924
|
if (v.endsWith(y, "{}"))
|
|
4925
4925
|
y = r ? y : y.slice(0, -2), b = m(b, 1);
|
|
4926
|
-
else if (v.isArray(b) &&
|
|
4927
|
-
return y = zo(y), w.forEach(function(
|
|
4928
|
-
!(v.isUndefined(
|
|
4926
|
+
else if (v.isArray(b) && Il(b) || (v.isFileList(b) || v.endsWith(y, "[]")) && (w = v.toArray(b)))
|
|
4927
|
+
return y = zo(y), w.forEach(function(j, _) {
|
|
4928
|
+
!(v.isUndefined(j) || j === null) && t.append(
|
|
4929
4929
|
// eslint-disable-next-line no-nested-ternary
|
|
4930
|
-
i === !0 ? Qs([y],
|
|
4931
|
-
u(
|
|
4930
|
+
i === !0 ? Qs([y], _, o) : i === null ? y : y + "[]",
|
|
4931
|
+
u(j)
|
|
4932
4932
|
);
|
|
4933
4933
|
}), !1;
|
|
4934
4934
|
}
|
|
4935
4935
|
return mr(b) ? !0 : (t.append(Qs(S, y, o), u(b)), !1);
|
|
4936
4936
|
}
|
|
4937
|
-
const g = Object.assign(
|
|
4937
|
+
const g = Object.assign(Ml, {
|
|
4938
4938
|
defaultVisitor: p,
|
|
4939
4939
|
convertValue: u,
|
|
4940
4940
|
isVisitable: mr
|
|
@@ -4943,8 +4943,8 @@ function Ms(e, t, s) {
|
|
|
4943
4943
|
if (!v.isUndefined(b)) {
|
|
4944
4944
|
if (h(S), f.indexOf(b) !== -1)
|
|
4945
4945
|
throw new Error("Circular reference detected in " + y.join("."));
|
|
4946
|
-
f.push(b), v.forEach(b, function(N,
|
|
4947
|
-
(!(v.isUndefined(N) || N === null) && n.call(t, N, v.isString(
|
|
4946
|
+
f.push(b), v.forEach(b, function(N, j) {
|
|
4947
|
+
(!(v.isUndefined(N) || N === null) && n.call(t, N, v.isString(j) ? j.trim() : j, y, g)) === !0 && x(N, y ? y.concat(j) : [j], S + 1);
|
|
4948
4948
|
}), f.pop();
|
|
4949
4949
|
}
|
|
4950
4950
|
}
|
|
@@ -4966,7 +4966,7 @@ function Sn(e) {
|
|
|
4966
4966
|
});
|
|
4967
4967
|
}
|
|
4968
4968
|
function _r(e, t) {
|
|
4969
|
-
this._pairs = [], e &&
|
|
4969
|
+
this._pairs = [], e && Is(e, this, t);
|
|
4970
4970
|
}
|
|
4971
4971
|
const Vo = _r.prototype;
|
|
4972
4972
|
Vo.append = function(t, s) {
|
|
@@ -5078,7 +5078,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Wl
|
|
|
5078
5078
|
...Bl
|
|
5079
5079
|
};
|
|
5080
5080
|
function ql(e, t) {
|
|
5081
|
-
return
|
|
5081
|
+
return Is(e, new he.classes.URLSearchParams(), {
|
|
5082
5082
|
visitor: function(s, r, n, o) {
|
|
5083
5083
|
return he.isNode && v.isBuffer(s) ? (this.append(r, s.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
5084
5084
|
},
|
|
@@ -5157,7 +5157,7 @@ const Kt = {
|
|
|
5157
5157
|
return ql(t, l).toString();
|
|
5158
5158
|
if ((c = v.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
5159
5159
|
const d = pt(this, "env"), f = d && d.FormData;
|
|
5160
|
-
return
|
|
5160
|
+
return Is(
|
|
5161
5161
|
c ? { "files[]": t } : t,
|
|
5162
5162
|
f && new f(),
|
|
5163
5163
|
l
|
|
@@ -5531,11 +5531,11 @@ const dd = typeof XMLHttpRequest < "u", ud = dd && function(e) {
|
|
|
5531
5531
|
request: x
|
|
5532
5532
|
};
|
|
5533
5533
|
Ko(
|
|
5534
|
-
function(
|
|
5535
|
-
s(
|
|
5534
|
+
function(_) {
|
|
5535
|
+
s(_), g();
|
|
5536
5536
|
},
|
|
5537
|
-
function(
|
|
5538
|
-
r(
|
|
5537
|
+
function(_) {
|
|
5538
|
+
r(_), g();
|
|
5539
5539
|
},
|
|
5540
5540
|
N
|
|
5541
5541
|
), x = null;
|
|
@@ -5545,8 +5545,8 @@ const dd = typeof XMLHttpRequest < "u", ud = dd && function(e) {
|
|
|
5545
5545
|
}, x.onabort = function() {
|
|
5546
5546
|
x && (r(new E("Request aborted", E.ECONNABORTED, e, x)), g(), x = null);
|
|
5547
5547
|
}, x.onerror = function(w) {
|
|
5548
|
-
const N = w && w.message ? w.message : "Network Error",
|
|
5549
|
-
|
|
5548
|
+
const N = w && w.message ? w.message : "Network Error", j = new E(N, E.ERR_NETWORK, e, x);
|
|
5549
|
+
j.event = w || null, r(j), g(), x = null;
|
|
5550
5550
|
}, x.ontimeout = function() {
|
|
5551
5551
|
let w = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
5552
5552
|
const N = n.transitional || kr;
|
|
@@ -5785,24 +5785,24 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5785
5785
|
method: S,
|
|
5786
5786
|
data: w,
|
|
5787
5787
|
signal: N,
|
|
5788
|
-
cancelToken:
|
|
5789
|
-
timeout:
|
|
5788
|
+
cancelToken: j,
|
|
5789
|
+
timeout: _,
|
|
5790
5790
|
onDownloadProgress: R,
|
|
5791
5791
|
onUploadProgress: k,
|
|
5792
|
-
responseType:
|
|
5792
|
+
responseType: M,
|
|
5793
5793
|
headers: O,
|
|
5794
5794
|
withCredentials: D = "same-origin",
|
|
5795
5795
|
fetchOptions: ee,
|
|
5796
5796
|
maxContentLength: V,
|
|
5797
5797
|
maxBodyLength: Z
|
|
5798
5798
|
} = Jo(b);
|
|
5799
|
-
const Q = v.isNumber(V) && V > -1, Y = v.isNumber(Z) && Z > -1,
|
|
5799
|
+
const Q = v.isNumber(V) && V > -1, Y = v.isNumber(Z) && Z > -1, de = (I) => v.hasOwnProp(b, I) ? b[I] : void 0;
|
|
5800
5800
|
let fe = n || fetch;
|
|
5801
|
-
|
|
5801
|
+
M = M ? (M + "").toLowerCase() : "text";
|
|
5802
5802
|
let P = fd(
|
|
5803
|
-
[N,
|
|
5804
|
-
|
|
5805
|
-
),
|
|
5803
|
+
[N, j && j.toAbortSignal()],
|
|
5804
|
+
_
|
|
5805
|
+
), C = null;
|
|
5806
5806
|
const F = P && P.unsubscribe && (() => {
|
|
5807
5807
|
P.unsubscribe();
|
|
5808
5808
|
});
|
|
@@ -5811,38 +5811,38 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5811
5811
|
"Request body larger than maxBodyLength limit",
|
|
5812
5812
|
E.ERR_BAD_REQUEST,
|
|
5813
5813
|
b,
|
|
5814
|
-
|
|
5814
|
+
C
|
|
5815
5815
|
);
|
|
5816
5816
|
try {
|
|
5817
|
-
let
|
|
5818
|
-
const $ =
|
|
5817
|
+
let I;
|
|
5818
|
+
const $ = de("auth");
|
|
5819
5819
|
if ($) {
|
|
5820
5820
|
const z = v.getSafeProp($, "username") || "", me = v.getSafeProp($, "password") || "";
|
|
5821
|
-
|
|
5821
|
+
I = {
|
|
5822
5822
|
username: z,
|
|
5823
5823
|
password: me
|
|
5824
5824
|
};
|
|
5825
5825
|
}
|
|
5826
5826
|
if (yd(y)) {
|
|
5827
5827
|
const z = new URL(y, he.origin);
|
|
5828
|
-
if (!
|
|
5828
|
+
if (!I && (z.username || z.password)) {
|
|
5829
5829
|
const me = Tn(z.username), ye = Tn(z.password);
|
|
5830
|
-
|
|
5830
|
+
I = {
|
|
5831
5831
|
username: me,
|
|
5832
5832
|
password: ye
|
|
5833
5833
|
};
|
|
5834
5834
|
}
|
|
5835
5835
|
(z.username || z.password) && (z.username = "", z.password = "", y = z.href);
|
|
5836
5836
|
}
|
|
5837
|
-
if (
|
|
5837
|
+
if (I && (O.delete("authorization"), O.set(
|
|
5838
5838
|
"Authorization",
|
|
5839
|
-
"Basic " + btoa(bd((
|
|
5839
|
+
"Basic " + btoa(bd((I.username || "") + ":" + (I.password || "")))
|
|
5840
5840
|
)), Q && typeof y == "string" && y.startsWith("data:") && xd(y) > V)
|
|
5841
5841
|
throw new E(
|
|
5842
5842
|
"maxContentLength size of " + V + " exceeded",
|
|
5843
5843
|
E.ERR_BAD_RESPONSE,
|
|
5844
5844
|
b,
|
|
5845
|
-
|
|
5845
|
+
C
|
|
5846
5846
|
);
|
|
5847
5847
|
if (Y && S !== "get" && S !== "head") {
|
|
5848
5848
|
const z = await g(w);
|
|
@@ -5881,10 +5881,10 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5881
5881
|
"Stream request bodies are not supported by the current fetch implementation",
|
|
5882
5882
|
E.ERR_NOT_SUPPORT,
|
|
5883
5883
|
b,
|
|
5884
|
-
|
|
5884
|
+
C
|
|
5885
5885
|
);
|
|
5886
5886
|
v.isString(D) || (D = D ? "include" : "omit");
|
|
5887
|
-
const
|
|
5887
|
+
const ue = l && "credentials" in o.prototype;
|
|
5888
5888
|
if (v.isFormData(w)) {
|
|
5889
5889
|
const z = O.getContentType();
|
|
5890
5890
|
z && /^multipart\/form-data/i.test(z) && !/boundary=/i.test(z) && O.delete("content-type");
|
|
@@ -5897,11 +5897,11 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5897
5897
|
headers: Uo(O.normalize()),
|
|
5898
5898
|
body: w,
|
|
5899
5899
|
duplex: "half",
|
|
5900
|
-
credentials:
|
|
5900
|
+
credentials: ue ? D : void 0
|
|
5901
5901
|
};
|
|
5902
|
-
|
|
5903
|
-
let
|
|
5904
|
-
const De = xe.from(
|
|
5902
|
+
C = l && new o(y, be);
|
|
5903
|
+
let ne = await (l ? fe(C, ee) : fe(y, be));
|
|
5904
|
+
const De = xe.from(ne.headers);
|
|
5905
5905
|
if (Q) {
|
|
5906
5906
|
const z = v.toFiniteNumber(De.getContentLength());
|
|
5907
5907
|
if (z != null && z > V)
|
|
@@ -5909,14 +5909,14 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5909
5909
|
"maxContentLength size of " + V + " exceeded",
|
|
5910
5910
|
E.ERR_BAD_RESPONSE,
|
|
5911
5911
|
b,
|
|
5912
|
-
|
|
5912
|
+
C
|
|
5913
5913
|
);
|
|
5914
5914
|
}
|
|
5915
|
-
const _e = m && (
|
|
5916
|
-
if (m &&
|
|
5915
|
+
const _e = m && (M === "stream" || M === "response");
|
|
5916
|
+
if (m && ne.body && (R || Q || _e && F)) {
|
|
5917
5917
|
const z = {};
|
|
5918
5918
|
["status", "statusText", "headers"].forEach((ze) => {
|
|
5919
|
-
z[ze] =
|
|
5919
|
+
z[ze] = ne[ze];
|
|
5920
5920
|
});
|
|
5921
5921
|
const me = v.toFiniteNumber(De.getContentLength()), [ye, Ee] = R && Nn(
|
|
5922
5922
|
me,
|
|
@@ -5929,20 +5929,20 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5929
5929
|
"maxContentLength size of " + V + " exceeded",
|
|
5930
5930
|
E.ERR_BAD_RESPONSE,
|
|
5931
5931
|
b,
|
|
5932
|
-
|
|
5932
|
+
C
|
|
5933
5933
|
);
|
|
5934
5934
|
ye && ye(ze);
|
|
5935
5935
|
};
|
|
5936
|
-
|
|
5937
|
-
En(
|
|
5936
|
+
ne = new i(
|
|
5937
|
+
En(ne.body, Pn, Fs, () => {
|
|
5938
5938
|
Ee && Ee(), F && F();
|
|
5939
5939
|
}),
|
|
5940
5940
|
z
|
|
5941
5941
|
);
|
|
5942
5942
|
}
|
|
5943
|
-
|
|
5944
|
-
let ke = await p[v.findKey(p,
|
|
5945
|
-
|
|
5943
|
+
M = M || "text";
|
|
5944
|
+
let ke = await p[v.findKey(p, M) || "text"](
|
|
5945
|
+
ne,
|
|
5946
5946
|
b
|
|
5947
5947
|
);
|
|
5948
5948
|
if (Q && !m && !_e) {
|
|
@@ -5952,51 +5952,51 @@ const Pr = "1.18.1", Pn = 64 * 1024, { isFunction: rs } = v, bd = (e) => encodeU
|
|
|
5952
5952
|
"maxContentLength size of " + V + " exceeded",
|
|
5953
5953
|
E.ERR_BAD_RESPONSE,
|
|
5954
5954
|
b,
|
|
5955
|
-
|
|
5955
|
+
C
|
|
5956
5956
|
);
|
|
5957
5957
|
}
|
|
5958
5958
|
return !_e && F && F(), await new Promise((z, me) => {
|
|
5959
5959
|
Ko(z, me, {
|
|
5960
5960
|
data: ke,
|
|
5961
|
-
headers: xe.from(
|
|
5962
|
-
status:
|
|
5963
|
-
statusText:
|
|
5961
|
+
headers: xe.from(ne.headers),
|
|
5962
|
+
status: ne.status,
|
|
5963
|
+
statusText: ne.statusText,
|
|
5964
5964
|
config: b,
|
|
5965
|
-
request:
|
|
5965
|
+
request: C
|
|
5966
5966
|
});
|
|
5967
5967
|
});
|
|
5968
|
-
} catch (
|
|
5968
|
+
} catch (I) {
|
|
5969
5969
|
if (F && F(), P && P.aborted && P.reason instanceof E) {
|
|
5970
5970
|
const $ = P.reason;
|
|
5971
|
-
throw $.config = b,
|
|
5971
|
+
throw $.config = b, C && ($.request = C), I !== $ && Object.defineProperty($, "cause", {
|
|
5972
5972
|
__proto__: null,
|
|
5973
|
-
value:
|
|
5973
|
+
value: I,
|
|
5974
5974
|
writable: !0,
|
|
5975
5975
|
enumerable: !1,
|
|
5976
5976
|
configurable: !0
|
|
5977
5977
|
}), $;
|
|
5978
5978
|
}
|
|
5979
5979
|
if (q)
|
|
5980
|
-
throw
|
|
5981
|
-
if (
|
|
5982
|
-
throw
|
|
5983
|
-
if (
|
|
5980
|
+
throw C && !q.request && (q.request = C), q;
|
|
5981
|
+
if (I instanceof E)
|
|
5982
|
+
throw C && !I.request && (I.request = C), I;
|
|
5983
|
+
if (I && I.name === "TypeError" && /Load failed|fetch/i.test(I.message)) {
|
|
5984
5984
|
const $ = new E(
|
|
5985
5985
|
"Network Error",
|
|
5986
5986
|
E.ERR_NETWORK,
|
|
5987
5987
|
b,
|
|
5988
|
-
|
|
5989
|
-
|
|
5988
|
+
C,
|
|
5989
|
+
I && I.response
|
|
5990
5990
|
);
|
|
5991
5991
|
throw Object.defineProperty($, "cause", {
|
|
5992
5992
|
__proto__: null,
|
|
5993
|
-
value:
|
|
5993
|
+
value: I.cause || I,
|
|
5994
5994
|
writable: !0,
|
|
5995
5995
|
enumerable: !1,
|
|
5996
5996
|
configurable: !0
|
|
5997
5997
|
}), $;
|
|
5998
5998
|
}
|
|
5999
|
-
throw E.from(
|
|
5999
|
+
throw E.from(I, I && I.code, b, C, I && I.response);
|
|
6000
6000
|
}
|
|
6001
6001
|
};
|
|
6002
6002
|
}, wd = /* @__PURE__ */ new Map(), Xo = (e) => {
|
|
@@ -6098,14 +6098,14 @@ function Ln(e) {
|
|
|
6098
6098
|
}
|
|
6099
6099
|
);
|
|
6100
6100
|
}
|
|
6101
|
-
const
|
|
6101
|
+
const Ms = {};
|
|
6102
6102
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
6103
|
-
|
|
6103
|
+
Ms[e] = function(r) {
|
|
6104
6104
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
6105
6105
|
};
|
|
6106
6106
|
});
|
|
6107
|
-
const
|
|
6108
|
-
|
|
6107
|
+
const In = {};
|
|
6108
|
+
Ms.transitional = function(t, s, r) {
|
|
6109
6109
|
function n(o, i) {
|
|
6110
6110
|
return "[Axios v" + Pr + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
6111
6111
|
}
|
|
@@ -6115,7 +6115,7 @@ Is.transitional = function(t, s, r) {
|
|
|
6115
6115
|
n(i, " has been removed" + (s ? " in " + s : "")),
|
|
6116
6116
|
E.ERR_DEPRECATED
|
|
6117
6117
|
);
|
|
6118
|
-
return s && !
|
|
6118
|
+
return s && !In[i] && (In[i] = !0, console.warn(
|
|
6119
6119
|
n(
|
|
6120
6120
|
i,
|
|
6121
6121
|
" has been deprecated since v" + s + " and will be removed in the near future"
|
|
@@ -6123,7 +6123,7 @@ Is.transitional = function(t, s, r) {
|
|
|
6123
6123
|
)), t ? t(o, i, c) : !0;
|
|
6124
6124
|
};
|
|
6125
6125
|
};
|
|
6126
|
-
|
|
6126
|
+
Ms.spelling = function(t) {
|
|
6127
6127
|
return (s, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
6128
6128
|
};
|
|
6129
6129
|
function jd(e, t, s) {
|
|
@@ -6148,7 +6148,7 @@ function jd(e, t, s) {
|
|
|
6148
6148
|
}
|
|
6149
6149
|
const gs = {
|
|
6150
6150
|
assertOptions: jd,
|
|
6151
|
-
validators:
|
|
6151
|
+
validators: Ms
|
|
6152
6152
|
}, pe = gs.validators;
|
|
6153
6153
|
let it = class {
|
|
6154
6154
|
constructor(t) {
|
|
@@ -6471,7 +6471,7 @@ oe.CanceledError = Yt;
|
|
|
6471
6471
|
oe.CancelToken = Nd;
|
|
6472
6472
|
oe.isCancel = Go;
|
|
6473
6473
|
oe.VERSION = Pr;
|
|
6474
|
-
oe.toFormData =
|
|
6474
|
+
oe.toFormData = Is;
|
|
6475
6475
|
oe.AxiosError = E;
|
|
6476
6476
|
oe.Cancel = oe.CanceledError;
|
|
6477
6477
|
oe.all = function(t) {
|
|
@@ -6486,28 +6486,28 @@ oe.getAdapter = Zo.getAdapter;
|
|
|
6486
6486
|
oe.HttpStatusCode = gr;
|
|
6487
6487
|
oe.default = oe;
|
|
6488
6488
|
const {
|
|
6489
|
-
Axios:
|
|
6490
|
-
AxiosError:
|
|
6491
|
-
CanceledError:
|
|
6492
|
-
isCancel:
|
|
6493
|
-
CancelToken:
|
|
6494
|
-
VERSION:
|
|
6495
|
-
all:
|
|
6496
|
-
Cancel:
|
|
6497
|
-
isAxiosError:
|
|
6498
|
-
spread:
|
|
6499
|
-
toFormData:
|
|
6500
|
-
AxiosHeaders:
|
|
6501
|
-
HttpStatusCode:
|
|
6502
|
-
formToJSON:
|
|
6503
|
-
getAdapter:
|
|
6504
|
-
mergeConfig:
|
|
6505
|
-
create:
|
|
6506
|
-
} = oe,
|
|
6489
|
+
Axios: lh,
|
|
6490
|
+
AxiosError: dh,
|
|
6491
|
+
CanceledError: uh,
|
|
6492
|
+
isCancel: fh,
|
|
6493
|
+
CancelToken: hh,
|
|
6494
|
+
VERSION: mh,
|
|
6495
|
+
all: ph,
|
|
6496
|
+
Cancel: gh,
|
|
6497
|
+
isAxiosError: xh,
|
|
6498
|
+
spread: bh,
|
|
6499
|
+
toFormData: yh,
|
|
6500
|
+
AxiosHeaders: vh,
|
|
6501
|
+
HttpStatusCode: wh,
|
|
6502
|
+
formToJSON: Sh,
|
|
6503
|
+
getAdapter: Rh,
|
|
6504
|
+
mergeConfig: jh,
|
|
6505
|
+
create: Nh
|
|
6506
|
+
} = oe, re = oe.create({ baseURL: "/api/v1/cost" });
|
|
6507
6507
|
function kd(e, t) {
|
|
6508
|
-
|
|
6508
|
+
re.defaults.baseURL = `${e.replace(/\/$/, "")}/cost`, t ? re.defaults.headers.common.Authorization = `Bearer ${t}` : delete re.defaults.headers.common.Authorization;
|
|
6509
6509
|
}
|
|
6510
|
-
function
|
|
6510
|
+
function Ch(e) {
|
|
6511
6511
|
e.interceptors.request.use((t) => {
|
|
6512
6512
|
if (typeof window < "u") {
|
|
6513
6513
|
const s = window.localStorage.getItem("access_token");
|
|
@@ -6519,7 +6519,7 @@ function jh(e) {
|
|
|
6519
6519
|
const Ed = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Pd = (e) => e.replace(
|
|
6520
6520
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
6521
6521
|
(t, s, r) => r ? r.toUpperCase() : s.toLowerCase()
|
|
6522
|
-
),
|
|
6522
|
+
), Mn = (e) => {
|
|
6523
6523
|
const t = Pd(e);
|
|
6524
6524
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
6525
6525
|
}, ta = (...e) => e.filter((t, s, r) => !!t && t.trim() !== "" && r.indexOf(t) === s).join(" ").trim(), Td = (e) => {
|
|
@@ -6573,14 +6573,14 @@ const X = (e, t) => {
|
|
|
6573
6573
|
ref: o,
|
|
6574
6574
|
iconNode: t,
|
|
6575
6575
|
className: ta(
|
|
6576
|
-
`lucide-${Ed(
|
|
6576
|
+
`lucide-${Ed(Mn(e))}`,
|
|
6577
6577
|
`lucide-${e}`,
|
|
6578
6578
|
r
|
|
6579
6579
|
),
|
|
6580
6580
|
...n
|
|
6581
6581
|
})
|
|
6582
6582
|
);
|
|
6583
|
-
return s.displayName =
|
|
6583
|
+
return s.displayName = Mn(e), s;
|
|
6584
6584
|
};
|
|
6585
6585
|
const Ld = [
|
|
6586
6586
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
@@ -6594,15 +6594,15 @@ const Ld = [
|
|
|
6594
6594
|
}
|
|
6595
6595
|
],
|
|
6596
6596
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
6597
|
-
],
|
|
6598
|
-
const
|
|
6597
|
+
], Id = X("building-2", Ld);
|
|
6598
|
+
const Md = [
|
|
6599
6599
|
["path", { d: "M16 14v2.2l1.6 1", key: "fo4ql5" }],
|
|
6600
6600
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
6601
6601
|
["path", { d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5", key: "1osxxc" }],
|
|
6602
6602
|
["path", { d: "M3 10h5", key: "r794hk" }],
|
|
6603
6603
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
6604
6604
|
["circle", { cx: "16", cy: "16", r: "6", key: "qoo3c4" }]
|
|
6605
|
-
], sa = X("calendar-clock",
|
|
6605
|
+
], sa = X("calendar-clock", Md);
|
|
6606
6606
|
const Dd = [
|
|
6607
6607
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
6608
6608
|
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
@@ -6674,7 +6674,7 @@ const nu = [
|
|
|
6674
6674
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
6675
6675
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
6676
6676
|
], ou = X("list", nu);
|
|
6677
|
-
const au = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
6677
|
+
const au = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], vt = X("loader-circle", au);
|
|
6678
6678
|
const iu = [
|
|
6679
6679
|
[
|
|
6680
6680
|
"path",
|
|
@@ -6694,7 +6694,7 @@ const uu = [
|
|
|
6694
6694
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
6695
6695
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
6696
6696
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
6697
|
-
],
|
|
6697
|
+
], jt = X("refresh-cw", uu);
|
|
6698
6698
|
const fu = [
|
|
6699
6699
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
6700
6700
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
@@ -6724,17 +6724,24 @@ const pu = [
|
|
|
6724
6724
|
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
6725
6725
|
], Dn = X("sparkles", pu);
|
|
6726
6726
|
const gu = [
|
|
6727
|
+
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
6728
|
+
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
6729
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
6730
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
6731
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
6732
|
+
], xu = X("trash-2", gu);
|
|
6733
|
+
const bu = [
|
|
6727
6734
|
["path", { d: "M16 17h6v-6", key: "t6n2it" }],
|
|
6728
6735
|
["path", { d: "m22 17-8.5-8.5-5 5L2 7", key: "x473p" }]
|
|
6729
|
-
],
|
|
6730
|
-
const
|
|
6736
|
+
], yu = X("trending-down", bu);
|
|
6737
|
+
const vu = [
|
|
6731
6738
|
["path", { d: "M16 7h6v6", key: "box55l" }],
|
|
6732
6739
|
["path", { d: "m22 7-8.5 8.5-5-5L2 17", key: "1t1m79" }]
|
|
6733
|
-
], la = X("trending-up",
|
|
6734
|
-
const
|
|
6740
|
+
], la = X("trending-up", vu);
|
|
6741
|
+
const wu = [
|
|
6735
6742
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
6736
6743
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
6737
|
-
], Ds = X("x",
|
|
6744
|
+
], Ds = X("x", wu);
|
|
6738
6745
|
function da(e) {
|
|
6739
6746
|
var t, s, r = "";
|
|
6740
6747
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
@@ -6744,40 +6751,40 @@ function da(e) {
|
|
|
6744
6751
|
} else for (s in e) e[s] && (r && (r += " "), r += s);
|
|
6745
6752
|
return r;
|
|
6746
6753
|
}
|
|
6747
|
-
function
|
|
6754
|
+
function Su() {
|
|
6748
6755
|
for (var e, t, s = 0, r = "", n = arguments.length; s < n; s++) (e = arguments[s]) && (t = da(e)) && (r && (r += " "), r += t);
|
|
6749
6756
|
return r;
|
|
6750
6757
|
}
|
|
6751
|
-
const
|
|
6758
|
+
const Ru = (e, t) => {
|
|
6752
6759
|
const s = new Array(e.length + t.length);
|
|
6753
6760
|
for (let r = 0; r < e.length; r++)
|
|
6754
6761
|
s[r] = e[r];
|
|
6755
6762
|
for (let r = 0; r < t.length; r++)
|
|
6756
6763
|
s[e.length + r] = t[r];
|
|
6757
6764
|
return s;
|
|
6758
|
-
},
|
|
6765
|
+
}, ju = (e, t) => ({
|
|
6759
6766
|
classGroupId: e,
|
|
6760
6767
|
validator: t
|
|
6761
6768
|
}), ua = (e = /* @__PURE__ */ new Map(), t = null, s) => ({
|
|
6762
6769
|
nextPart: e,
|
|
6763
6770
|
validators: t,
|
|
6764
6771
|
classGroupId: s
|
|
6765
|
-
}), ks = "-", Fn = [],
|
|
6766
|
-
const t =
|
|
6772
|
+
}), ks = "-", Fn = [], Nu = "arbitrary..", Cu = (e) => {
|
|
6773
|
+
const t = ku(e), {
|
|
6767
6774
|
conflictingClassGroups: s,
|
|
6768
6775
|
conflictingClassGroupModifiers: r
|
|
6769
6776
|
} = e;
|
|
6770
6777
|
return {
|
|
6771
6778
|
getClassGroupId: (i) => {
|
|
6772
6779
|
if (i.startsWith("[") && i.endsWith("]"))
|
|
6773
|
-
return
|
|
6780
|
+
return _u(i);
|
|
6774
6781
|
const c = i.split(ks), l = c[0] === "" && c.length > 1 ? 1 : 0;
|
|
6775
6782
|
return fa(c, l, t);
|
|
6776
6783
|
},
|
|
6777
6784
|
getConflictingClassGroupIds: (i, c) => {
|
|
6778
6785
|
if (c) {
|
|
6779
6786
|
const l = r[i], d = s[i];
|
|
6780
|
-
return l ? d ?
|
|
6787
|
+
return l ? d ? Ru(d, l) : l : d || Fn;
|
|
6781
6788
|
}
|
|
6782
6789
|
return s[i] || Fn;
|
|
6783
6790
|
}
|
|
@@ -6799,16 +6806,16 @@ const wu = (e, t) => {
|
|
|
6799
6806
|
if (f.validator(c))
|
|
6800
6807
|
return f.classGroupId;
|
|
6801
6808
|
}
|
|
6802
|
-
},
|
|
6809
|
+
}, _u = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
6803
6810
|
const t = e.slice(1, -1), s = t.indexOf(":"), r = t.slice(0, s);
|
|
6804
|
-
return r ?
|
|
6805
|
-
})(),
|
|
6811
|
+
return r ? Nu + r : void 0;
|
|
6812
|
+
})(), ku = (e) => {
|
|
6806
6813
|
const {
|
|
6807
6814
|
theme: t,
|
|
6808
6815
|
classGroups: s
|
|
6809
6816
|
} = e;
|
|
6810
|
-
return
|
|
6811
|
-
},
|
|
6817
|
+
return Eu(s, t);
|
|
6818
|
+
}, Eu = (e, t) => {
|
|
6812
6819
|
const s = ua();
|
|
6813
6820
|
for (const r in e) {
|
|
6814
6821
|
const n = e[r];
|
|
@@ -6819,28 +6826,28 @@ const wu = (e, t) => {
|
|
|
6819
6826
|
const n = e.length;
|
|
6820
6827
|
for (let o = 0; o < n; o++) {
|
|
6821
6828
|
const i = e[o];
|
|
6822
|
-
|
|
6829
|
+
Pu(i, t, s, r);
|
|
6823
6830
|
}
|
|
6824
|
-
},
|
|
6831
|
+
}, Pu = (e, t, s, r) => {
|
|
6825
6832
|
if (typeof e == "string") {
|
|
6826
|
-
|
|
6833
|
+
Tu(e, t, s);
|
|
6827
6834
|
return;
|
|
6828
6835
|
}
|
|
6829
6836
|
if (typeof e == "function") {
|
|
6830
|
-
|
|
6837
|
+
Au(e, t, s, r);
|
|
6831
6838
|
return;
|
|
6832
6839
|
}
|
|
6833
|
-
|
|
6834
|
-
},
|
|
6840
|
+
Ou(e, t, s, r);
|
|
6841
|
+
}, Tu = (e, t, s) => {
|
|
6835
6842
|
const r = e === "" ? t : ha(t, e);
|
|
6836
6843
|
r.classGroupId = s;
|
|
6837
|
-
},
|
|
6838
|
-
if (
|
|
6844
|
+
}, Au = (e, t, s, r) => {
|
|
6845
|
+
if (Lu(e)) {
|
|
6839
6846
|
Lr(e(r), t, s, r);
|
|
6840
6847
|
return;
|
|
6841
6848
|
}
|
|
6842
|
-
t.validators === null && (t.validators = []), t.validators.push(
|
|
6843
|
-
},
|
|
6849
|
+
t.validators === null && (t.validators = []), t.validators.push(ju(s, e));
|
|
6850
|
+
}, Ou = (e, t, s, r) => {
|
|
6844
6851
|
const n = Object.entries(e), o = n.length;
|
|
6845
6852
|
for (let i = 0; i < o; i++) {
|
|
6846
6853
|
const [c, l] = n[i];
|
|
@@ -6855,7 +6862,7 @@ const wu = (e, t) => {
|
|
|
6855
6862
|
c || (c = ua(), s.nextPart.set(i, c)), s = c;
|
|
6856
6863
|
}
|
|
6857
6864
|
return s;
|
|
6858
|
-
},
|
|
6865
|
+
}, Lu = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Iu = (e) => {
|
|
6859
6866
|
if (e < 1)
|
|
6860
6867
|
return {
|
|
6861
6868
|
get: () => {
|
|
@@ -6879,13 +6886,13 @@ const wu = (e, t) => {
|
|
|
6879
6886
|
o in s ? s[o] = i : n(o, i);
|
|
6880
6887
|
}
|
|
6881
6888
|
};
|
|
6882
|
-
}, xr = "!", Un = ":",
|
|
6889
|
+
}, xr = "!", Un = ":", Mu = [], $n = (e, t, s, r, n) => ({
|
|
6883
6890
|
modifiers: e,
|
|
6884
6891
|
hasImportantModifier: t,
|
|
6885
6892
|
baseClassName: s,
|
|
6886
6893
|
maybePostfixModifierPosition: r,
|
|
6887
6894
|
isExternal: n
|
|
6888
|
-
}),
|
|
6895
|
+
}), Du = (e) => {
|
|
6889
6896
|
const {
|
|
6890
6897
|
prefix: t,
|
|
6891
6898
|
experimentalParseClassName: s
|
|
@@ -6922,7 +6929,7 @@ const wu = (e, t) => {
|
|
|
6922
6929
|
};
|
|
6923
6930
|
if (t) {
|
|
6924
6931
|
const n = t + Un, o = r;
|
|
6925
|
-
r = (i) => i.startsWith(n) ? o(i.slice(n.length)) : $n(
|
|
6932
|
+
r = (i) => i.startsWith(n) ? o(i.slice(n.length)) : $n(Mu, !1, i, void 0, !0);
|
|
6926
6933
|
}
|
|
6927
6934
|
if (s) {
|
|
6928
6935
|
const n = r;
|
|
@@ -6932,7 +6939,7 @@ const wu = (e, t) => {
|
|
|
6932
6939
|
});
|
|
6933
6940
|
}
|
|
6934
6941
|
return r;
|
|
6935
|
-
},
|
|
6942
|
+
}, Fu = (e) => {
|
|
6936
6943
|
const t = /* @__PURE__ */ new Map();
|
|
6937
6944
|
return e.orderSensitiveModifiers.forEach((s, r) => {
|
|
6938
6945
|
t.set(s, 1e6 + r);
|
|
@@ -6945,26 +6952,26 @@ const wu = (e, t) => {
|
|
|
6945
6952
|
}
|
|
6946
6953
|
return n.length > 0 && (n.sort(), r.push(...n)), r;
|
|
6947
6954
|
};
|
|
6948
|
-
},
|
|
6949
|
-
cache:
|
|
6950
|
-
parseClassName:
|
|
6951
|
-
sortModifiers:
|
|
6952
|
-
postfixLookupClassGroupIds:
|
|
6953
|
-
...
|
|
6954
|
-
}),
|
|
6955
|
+
}, Uu = (e) => ({
|
|
6956
|
+
cache: Iu(e.cacheSize),
|
|
6957
|
+
parseClassName: Du(e),
|
|
6958
|
+
sortModifiers: Fu(e),
|
|
6959
|
+
postfixLookupClassGroupIds: $u(e),
|
|
6960
|
+
...Cu(e)
|
|
6961
|
+
}), $u = (e) => {
|
|
6955
6962
|
const t = /* @__PURE__ */ Object.create(null), s = e.postfixLookupClassGroups;
|
|
6956
6963
|
if (s)
|
|
6957
6964
|
for (let r = 0; r < s.length; r++)
|
|
6958
6965
|
t[s[r]] = !0;
|
|
6959
6966
|
return t;
|
|
6960
|
-
},
|
|
6967
|
+
}, Bu = /\s+/, zu = (e, t) => {
|
|
6961
6968
|
const {
|
|
6962
6969
|
parseClassName: s,
|
|
6963
6970
|
getClassGroupId: r,
|
|
6964
6971
|
getConflictingClassGroupIds: n,
|
|
6965
6972
|
sortModifiers: o,
|
|
6966
6973
|
postfixLookupClassGroupIds: i
|
|
6967
|
-
} = t, c = [], l = e.trim().split(
|
|
6974
|
+
} = t, c = [], l = e.trim().split(Bu);
|
|
6968
6975
|
let d = "";
|
|
6969
6976
|
for (let f = l.length - 1; f >= 0; f -= 1) {
|
|
6970
6977
|
const u = l[f], {
|
|
@@ -6980,8 +6987,8 @@ const wu = (e, t) => {
|
|
|
6980
6987
|
}
|
|
6981
6988
|
let b = !!x, y;
|
|
6982
6989
|
if (b) {
|
|
6983
|
-
const
|
|
6984
|
-
y = r(
|
|
6990
|
+
const _ = g.substring(0, x);
|
|
6991
|
+
y = r(_);
|
|
6985
6992
|
const R = y && i[y] ? r(g) : void 0;
|
|
6986
6993
|
R && R !== y && (y = R, b = !1);
|
|
6987
6994
|
} else
|
|
@@ -7001,15 +7008,15 @@ const wu = (e, t) => {
|
|
|
7001
7008
|
if (c.indexOf(N) > -1)
|
|
7002
7009
|
continue;
|
|
7003
7010
|
c.push(N);
|
|
7004
|
-
const
|
|
7005
|
-
for (let
|
|
7006
|
-
const R = _
|
|
7011
|
+
const j = n(y, b);
|
|
7012
|
+
for (let _ = 0; _ < j.length; ++_) {
|
|
7013
|
+
const R = j[_];
|
|
7007
7014
|
c.push(w + R);
|
|
7008
7015
|
}
|
|
7009
7016
|
d = u + (d.length > 0 ? " " + d : d);
|
|
7010
7017
|
}
|
|
7011
7018
|
return d;
|
|
7012
|
-
},
|
|
7019
|
+
}, Vu = (...e) => {
|
|
7013
7020
|
let t = 0, s, r, n = "";
|
|
7014
7021
|
for (; t < e.length; )
|
|
7015
7022
|
(s = e[t++]) && (r = ma(s)) && (n && (n += " "), n += r);
|
|
@@ -7021,34 +7028,34 @@ const wu = (e, t) => {
|
|
|
7021
7028
|
for (let r = 0; r < e.length; r++)
|
|
7022
7029
|
e[r] && (t = ma(e[r])) && (s && (s += " "), s += t);
|
|
7023
7030
|
return s;
|
|
7024
|
-
},
|
|
7031
|
+
}, Wu = (e, ...t) => {
|
|
7025
7032
|
let s, r, n, o;
|
|
7026
7033
|
const i = (l) => {
|
|
7027
7034
|
const d = t.reduce((f, u) => u(f), e());
|
|
7028
|
-
return s =
|
|
7035
|
+
return s = Uu(d), r = s.cache.get, n = s.cache.set, o = c, c(l);
|
|
7029
7036
|
}, c = (l) => {
|
|
7030
7037
|
const d = r(l);
|
|
7031
7038
|
if (d)
|
|
7032
7039
|
return d;
|
|
7033
|
-
const f =
|
|
7040
|
+
const f = zu(l, s);
|
|
7034
7041
|
return n(l, f), f;
|
|
7035
7042
|
};
|
|
7036
|
-
return o = i, (...l) => o(
|
|
7037
|
-
},
|
|
7038
|
-
const t = (s) => s[e] ||
|
|
7043
|
+
return o = i, (...l) => o(Vu(...l));
|
|
7044
|
+
}, Hu = [], ae = (e) => {
|
|
7045
|
+
const t = (s) => s[e] || Hu;
|
|
7039
7046
|
return t.isThemeGetter = !0, t;
|
|
7040
|
-
}, pa = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ga = /^\((?:(\w[\w-]*):)?(.+)\)$/i,
|
|
7047
|
+
}, pa = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ga = /^\((?:(\w[\w-]*):)?(.+)\)$/i, qu = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Gu = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ku = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Yu = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ju = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Xu = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ve = (e) => qu.test(e), H = (e) => !!e && !Number.isNaN(Number(e)), Oe = (e) => !!e && Number.isInteger(Number(e)), sr = (e) => e.endsWith("%") && H(e.slice(0, -1)), Fe = (e) => Gu.test(e), xa = () => !0, Zu = (e) => (
|
|
7041
7048
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
7042
7049
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
7043
7050
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
7044
|
-
|
|
7045
|
-
),
|
|
7051
|
+
Ku.test(e) && !Yu.test(e)
|
|
7052
|
+
), Ir = () => !1, Qu = (e) => Ju.test(e), ef = (e) => Xu.test(e), tf = (e) => !T(e) && !A(e), sf = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), rf = (e) => Ye(e, va, Ir), T = (e) => pa.test(e), Ze = (e) => Ye(e, wa, Zu), Bn = (e) => Ye(e, ff, H), nf = (e) => Ye(e, Ra, xa), of = (e) => Ye(e, Sa, Ir), zn = (e) => Ye(e, ba, Ir), af = (e) => Ye(e, ya, ef), ns = (e) => Ye(e, ja, Qu), A = (e) => ga.test(e), Mt = (e) => ht(e, wa), cf = (e) => ht(e, Sa), Vn = (e) => ht(e, ba), lf = (e) => ht(e, va), df = (e) => ht(e, ya), os = (e) => ht(e, ja, !0), uf = (e) => ht(e, Ra, !0), Ye = (e, t, s) => {
|
|
7046
7053
|
const r = pa.exec(e);
|
|
7047
7054
|
return r ? r[1] ? t(r[1]) : s(r[2]) : !1;
|
|
7048
7055
|
}, ht = (e, t, s = !1) => {
|
|
7049
7056
|
const r = ga.exec(e);
|
|
7050
7057
|
return r ? r[1] ? t(r[1]) : s : !1;
|
|
7051
|
-
}, ba = (e) => e === "position" || e === "percentage", ya = (e) => e === "image" || e === "url", va = (e) => e === "length" || e === "size" || e === "bg-size", wa = (e) => e === "length",
|
|
7058
|
+
}, ba = (e) => e === "position" || e === "percentage", ya = (e) => e === "image" || e === "url", va = (e) => e === "length" || e === "size" || e === "bg-size", wa = (e) => e === "length", ff = (e) => e === "number", Sa = (e) => e === "family-name", Ra = (e) => e === "number" || e === "weight", ja = (e) => e === "shadow", hf = () => {
|
|
7052
7059
|
const e = ae("color"), t = ae("font"), s = ae("text"), r = ae("font-weight"), n = ae("tracking"), o = ae("leading"), i = ae("breakpoint"), c = ae("container"), l = ae("spacing"), d = ae("radius"), f = ae("shadow"), u = ae("inset-shadow"), h = ae("text-shadow"), m = ae("drop-shadow"), p = ae("blur"), g = ae("perspective"), x = ae("aspect"), b = ae("ease"), y = ae("animate"), S = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], w = () => [
|
|
7053
7060
|
"center",
|
|
7054
7061
|
"top",
|
|
@@ -7067,13 +7074,13 @@ const wu = (e, t) => {
|
|
|
7067
7074
|
"bottom-left",
|
|
7068
7075
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
7069
7076
|
"left-bottom"
|
|
7070
|
-
], N = () => [...w(), A, T],
|
|
7077
|
+
], N = () => [...w(), A, T], j = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], R = () => [A, T, l], k = () => [Ve, "full", "auto", ...R()], M = () => [Oe, "none", "subgrid", A, T], O = () => ["auto", {
|
|
7071
7078
|
span: ["full", Oe, A, T]
|
|
7072
|
-
}, Oe, A, T], D = () => [Oe, "auto", A, T], ee = () => ["auto", "min", "max", "fr", A, T], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Z = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], Q = () => ["auto", ...R()], Y = () => [Ve, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...R()],
|
|
7079
|
+
}, Oe, A, T], D = () => [Oe, "auto", A, T], ee = () => ["auto", "min", "max", "fr", A, T], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Z = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], Q = () => ["auto", ...R()], Y = () => [Ve, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...R()], de = () => [Ve, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...R()], fe = () => [Ve, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...R()], P = () => [e, A, T], C = () => [...w(), Vn, zn, {
|
|
7073
7080
|
position: [A, T]
|
|
7074
7081
|
}], F = () => ["no-repeat", {
|
|
7075
7082
|
repeat: ["", "x", "y", "space", "round"]
|
|
7076
|
-
}], W = () => ["auto", "cover", "contain",
|
|
7083
|
+
}], W = () => ["auto", "cover", "contain", lf, rf, {
|
|
7077
7084
|
size: [A, T]
|
|
7078
7085
|
}], q = () => [sr, Mt, Ze], L = () => [
|
|
7079
7086
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -7083,14 +7090,14 @@ const wu = (e, t) => {
|
|
|
7083
7090
|
d,
|
|
7084
7091
|
A,
|
|
7085
7092
|
T
|
|
7086
|
-
],
|
|
7093
|
+
], I = () => ["", H, Mt, Ze], $ = () => ["solid", "dashed", "dotted", "double"], J = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], G = () => [H, sr, Vn, zn], ue = () => [
|
|
7087
7094
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7088
7095
|
"",
|
|
7089
7096
|
"none",
|
|
7090
7097
|
p,
|
|
7091
7098
|
A,
|
|
7092
7099
|
T
|
|
7093
|
-
], be = () => ["none", H, A, T],
|
|
7100
|
+
], be = () => ["none", H, A, T], ne = () => ["none", H, A, T], De = () => [H, A, T], _e = () => [Ve, "full", ...R()];
|
|
7094
7101
|
return {
|
|
7095
7102
|
cacheSize: 500,
|
|
7096
7103
|
theme: {
|
|
@@ -7102,7 +7109,7 @@ const wu = (e, t) => {
|
|
|
7102
7109
|
container: [Fe],
|
|
7103
7110
|
"drop-shadow": [Fe],
|
|
7104
7111
|
ease: ["in", "out", "in-out"],
|
|
7105
|
-
font: [
|
|
7112
|
+
font: [tf],
|
|
7106
7113
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
7107
7114
|
"inset-shadow": [Fe],
|
|
7108
7115
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -7142,7 +7149,7 @@ const wu = (e, t) => {
|
|
|
7142
7149
|
* Container Name
|
|
7143
7150
|
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
7144
7151
|
*/
|
|
7145
|
-
"container-named": [
|
|
7152
|
+
"container-named": [sf],
|
|
7146
7153
|
/**
|
|
7147
7154
|
* Columns
|
|
7148
7155
|
* @see https://tailwindcss.com/docs/columns
|
|
@@ -7233,42 +7240,42 @@ const wu = (e, t) => {
|
|
|
7233
7240
|
* @see https://tailwindcss.com/docs/overflow
|
|
7234
7241
|
*/
|
|
7235
7242
|
overflow: [{
|
|
7236
|
-
overflow:
|
|
7243
|
+
overflow: j()
|
|
7237
7244
|
}],
|
|
7238
7245
|
/**
|
|
7239
7246
|
* Overflow X
|
|
7240
7247
|
* @see https://tailwindcss.com/docs/overflow
|
|
7241
7248
|
*/
|
|
7242
7249
|
"overflow-x": [{
|
|
7243
|
-
"overflow-x":
|
|
7250
|
+
"overflow-x": j()
|
|
7244
7251
|
}],
|
|
7245
7252
|
/**
|
|
7246
7253
|
* Overflow Y
|
|
7247
7254
|
* @see https://tailwindcss.com/docs/overflow
|
|
7248
7255
|
*/
|
|
7249
7256
|
"overflow-y": [{
|
|
7250
|
-
"overflow-y":
|
|
7257
|
+
"overflow-y": j()
|
|
7251
7258
|
}],
|
|
7252
7259
|
/**
|
|
7253
7260
|
* Overscroll Behavior
|
|
7254
7261
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
7255
7262
|
*/
|
|
7256
7263
|
overscroll: [{
|
|
7257
|
-
overscroll:
|
|
7264
|
+
overscroll: _()
|
|
7258
7265
|
}],
|
|
7259
7266
|
/**
|
|
7260
7267
|
* Overscroll Behavior X
|
|
7261
7268
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
7262
7269
|
*/
|
|
7263
7270
|
"overscroll-x": [{
|
|
7264
|
-
"overscroll-x":
|
|
7271
|
+
"overscroll-x": _()
|
|
7265
7272
|
}],
|
|
7266
7273
|
/**
|
|
7267
7274
|
* Overscroll Behavior Y
|
|
7268
7275
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
7269
7276
|
*/
|
|
7270
7277
|
"overscroll-y": [{
|
|
7271
|
-
"overscroll-y":
|
|
7278
|
+
"overscroll-y": _()
|
|
7272
7279
|
}],
|
|
7273
7280
|
/**
|
|
7274
7281
|
* Position
|
|
@@ -7433,7 +7440,7 @@ const wu = (e, t) => {
|
|
|
7433
7440
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
7434
7441
|
*/
|
|
7435
7442
|
"grid-cols": [{
|
|
7436
|
-
"grid-cols":
|
|
7443
|
+
"grid-cols": M()
|
|
7437
7444
|
}],
|
|
7438
7445
|
/**
|
|
7439
7446
|
* Grid Column Start / End
|
|
@@ -7461,7 +7468,7 @@ const wu = (e, t) => {
|
|
|
7461
7468
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
7462
7469
|
*/
|
|
7463
7470
|
"grid-rows": [{
|
|
7464
|
-
"grid-rows":
|
|
7471
|
+
"grid-rows": M()
|
|
7465
7472
|
}],
|
|
7466
7473
|
/**
|
|
7467
7474
|
* Grid Row Start / End
|
|
@@ -7787,21 +7794,21 @@ const wu = (e, t) => {
|
|
|
7787
7794
|
* @see https://tailwindcss.com/docs/width
|
|
7788
7795
|
*/
|
|
7789
7796
|
"inline-size": [{
|
|
7790
|
-
inline: ["auto", ...
|
|
7797
|
+
inline: ["auto", ...de()]
|
|
7791
7798
|
}],
|
|
7792
7799
|
/**
|
|
7793
7800
|
* Min-Inline Size
|
|
7794
7801
|
* @see https://tailwindcss.com/docs/min-width
|
|
7795
7802
|
*/
|
|
7796
7803
|
"min-inline-size": [{
|
|
7797
|
-
"min-inline": ["auto", ...
|
|
7804
|
+
"min-inline": ["auto", ...de()]
|
|
7798
7805
|
}],
|
|
7799
7806
|
/**
|
|
7800
7807
|
* Max-Inline Size
|
|
7801
7808
|
* @see https://tailwindcss.com/docs/max-width
|
|
7802
7809
|
*/
|
|
7803
7810
|
"max-inline-size": [{
|
|
7804
|
-
"max-inline": ["none", ...
|
|
7811
|
+
"max-inline": ["none", ...de()]
|
|
7805
7812
|
}],
|
|
7806
7813
|
/**
|
|
7807
7814
|
* Block Size
|
|
@@ -7908,7 +7915,7 @@ const wu = (e, t) => {
|
|
|
7908
7915
|
* @see https://tailwindcss.com/docs/font-weight
|
|
7909
7916
|
*/
|
|
7910
7917
|
"font-weight": [{
|
|
7911
|
-
font: [r,
|
|
7918
|
+
font: [r, uf, nf]
|
|
7912
7919
|
}],
|
|
7913
7920
|
/**
|
|
7914
7921
|
* Font Stretch
|
|
@@ -7922,7 +7929,7 @@ const wu = (e, t) => {
|
|
|
7922
7929
|
* @see https://tailwindcss.com/docs/font-family
|
|
7923
7930
|
*/
|
|
7924
7931
|
"font-family": [{
|
|
7925
|
-
font: [
|
|
7932
|
+
font: [cf, of, t]
|
|
7926
7933
|
}],
|
|
7927
7934
|
/**
|
|
7928
7935
|
* Font Feature Settings
|
|
@@ -8164,7 +8171,7 @@ const wu = (e, t) => {
|
|
|
8164
8171
|
* @see https://tailwindcss.com/docs/background-position
|
|
8165
8172
|
*/
|
|
8166
8173
|
"bg-position": [{
|
|
8167
|
-
bg:
|
|
8174
|
+
bg: C()
|
|
8168
8175
|
}],
|
|
8169
8176
|
/**
|
|
8170
8177
|
* Background Repeat
|
|
@@ -8191,7 +8198,7 @@ const wu = (e, t) => {
|
|
|
8191
8198
|
}, Oe, A, T],
|
|
8192
8199
|
radial: ["", A, T],
|
|
8193
8200
|
conic: [Oe, A, T]
|
|
8194
|
-
},
|
|
8201
|
+
}, df, af]
|
|
8195
8202
|
}],
|
|
8196
8203
|
/**
|
|
8197
8204
|
* Background Color
|
|
@@ -8355,84 +8362,84 @@ const wu = (e, t) => {
|
|
|
8355
8362
|
* @see https://tailwindcss.com/docs/border-width
|
|
8356
8363
|
*/
|
|
8357
8364
|
"border-w": [{
|
|
8358
|
-
border:
|
|
8365
|
+
border: I()
|
|
8359
8366
|
}],
|
|
8360
8367
|
/**
|
|
8361
8368
|
* Border Width Inline
|
|
8362
8369
|
* @see https://tailwindcss.com/docs/border-width
|
|
8363
8370
|
*/
|
|
8364
8371
|
"border-w-x": [{
|
|
8365
|
-
"border-x":
|
|
8372
|
+
"border-x": I()
|
|
8366
8373
|
}],
|
|
8367
8374
|
/**
|
|
8368
8375
|
* Border Width Block
|
|
8369
8376
|
* @see https://tailwindcss.com/docs/border-width
|
|
8370
8377
|
*/
|
|
8371
8378
|
"border-w-y": [{
|
|
8372
|
-
"border-y":
|
|
8379
|
+
"border-y": I()
|
|
8373
8380
|
}],
|
|
8374
8381
|
/**
|
|
8375
8382
|
* Border Width Inline Start
|
|
8376
8383
|
* @see https://tailwindcss.com/docs/border-width
|
|
8377
8384
|
*/
|
|
8378
8385
|
"border-w-s": [{
|
|
8379
|
-
"border-s":
|
|
8386
|
+
"border-s": I()
|
|
8380
8387
|
}],
|
|
8381
8388
|
/**
|
|
8382
8389
|
* Border Width Inline End
|
|
8383
8390
|
* @see https://tailwindcss.com/docs/border-width
|
|
8384
8391
|
*/
|
|
8385
8392
|
"border-w-e": [{
|
|
8386
|
-
"border-e":
|
|
8393
|
+
"border-e": I()
|
|
8387
8394
|
}],
|
|
8388
8395
|
/**
|
|
8389
8396
|
* Border Width Block Start
|
|
8390
8397
|
* @see https://tailwindcss.com/docs/border-width
|
|
8391
8398
|
*/
|
|
8392
8399
|
"border-w-bs": [{
|
|
8393
|
-
"border-bs":
|
|
8400
|
+
"border-bs": I()
|
|
8394
8401
|
}],
|
|
8395
8402
|
/**
|
|
8396
8403
|
* Border Width Block End
|
|
8397
8404
|
* @see https://tailwindcss.com/docs/border-width
|
|
8398
8405
|
*/
|
|
8399
8406
|
"border-w-be": [{
|
|
8400
|
-
"border-be":
|
|
8407
|
+
"border-be": I()
|
|
8401
8408
|
}],
|
|
8402
8409
|
/**
|
|
8403
8410
|
* Border Width Top
|
|
8404
8411
|
* @see https://tailwindcss.com/docs/border-width
|
|
8405
8412
|
*/
|
|
8406
8413
|
"border-w-t": [{
|
|
8407
|
-
"border-t":
|
|
8414
|
+
"border-t": I()
|
|
8408
8415
|
}],
|
|
8409
8416
|
/**
|
|
8410
8417
|
* Border Width Right
|
|
8411
8418
|
* @see https://tailwindcss.com/docs/border-width
|
|
8412
8419
|
*/
|
|
8413
8420
|
"border-w-r": [{
|
|
8414
|
-
"border-r":
|
|
8421
|
+
"border-r": I()
|
|
8415
8422
|
}],
|
|
8416
8423
|
/**
|
|
8417
8424
|
* Border Width Bottom
|
|
8418
8425
|
* @see https://tailwindcss.com/docs/border-width
|
|
8419
8426
|
*/
|
|
8420
8427
|
"border-w-b": [{
|
|
8421
|
-
"border-b":
|
|
8428
|
+
"border-b": I()
|
|
8422
8429
|
}],
|
|
8423
8430
|
/**
|
|
8424
8431
|
* Border Width Left
|
|
8425
8432
|
* @see https://tailwindcss.com/docs/border-width
|
|
8426
8433
|
*/
|
|
8427
8434
|
"border-w-l": [{
|
|
8428
|
-
"border-l":
|
|
8435
|
+
"border-l": I()
|
|
8429
8436
|
}],
|
|
8430
8437
|
/**
|
|
8431
8438
|
* Divide Width X
|
|
8432
8439
|
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
8433
8440
|
*/
|
|
8434
8441
|
"divide-x": [{
|
|
8435
|
-
"divide-x":
|
|
8442
|
+
"divide-x": I()
|
|
8436
8443
|
}],
|
|
8437
8444
|
/**
|
|
8438
8445
|
* Divide Width X Reverse
|
|
@@ -8444,7 +8451,7 @@ const wu = (e, t) => {
|
|
|
8444
8451
|
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
8445
8452
|
*/
|
|
8446
8453
|
"divide-y": [{
|
|
8447
|
-
"divide-y":
|
|
8454
|
+
"divide-y": I()
|
|
8448
8455
|
}],
|
|
8449
8456
|
/**
|
|
8450
8457
|
* Divide Width Y Reverse
|
|
@@ -8620,7 +8627,7 @@ const wu = (e, t) => {
|
|
|
8620
8627
|
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
8621
8628
|
*/
|
|
8622
8629
|
"ring-w": [{
|
|
8623
|
-
ring:
|
|
8630
|
+
ring: I()
|
|
8624
8631
|
}],
|
|
8625
8632
|
/**
|
|
8626
8633
|
* Ring Width Inset
|
|
@@ -8659,7 +8666,7 @@ const wu = (e, t) => {
|
|
|
8659
8666
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
8660
8667
|
*/
|
|
8661
8668
|
"inset-ring-w": [{
|
|
8662
|
-
"inset-ring":
|
|
8669
|
+
"inset-ring": I()
|
|
8663
8670
|
}],
|
|
8664
8671
|
/**
|
|
8665
8672
|
* Inset Ring Color
|
|
@@ -8869,7 +8876,7 @@ const wu = (e, t) => {
|
|
|
8869
8876
|
* @see https://tailwindcss.com/docs/mask-position
|
|
8870
8877
|
*/
|
|
8871
8878
|
"mask-position": [{
|
|
8872
|
-
mask:
|
|
8879
|
+
mask: C()
|
|
8873
8880
|
}],
|
|
8874
8881
|
/**
|
|
8875
8882
|
* Mask Repeat
|
|
@@ -8920,7 +8927,7 @@ const wu = (e, t) => {
|
|
|
8920
8927
|
* @see https://tailwindcss.com/docs/blur
|
|
8921
8928
|
*/
|
|
8922
8929
|
blur: [{
|
|
8923
|
-
blur:
|
|
8930
|
+
blur: ue()
|
|
8924
8931
|
}],
|
|
8925
8932
|
/**
|
|
8926
8933
|
* Brightness
|
|
@@ -9010,7 +9017,7 @@ const wu = (e, t) => {
|
|
|
9010
9017
|
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
9011
9018
|
*/
|
|
9012
9019
|
"backdrop-blur": [{
|
|
9013
|
-
"backdrop-blur":
|
|
9020
|
+
"backdrop-blur": ue()
|
|
9014
9021
|
}],
|
|
9015
9022
|
/**
|
|
9016
9023
|
* Backdrop Brightness
|
|
@@ -9215,28 +9222,28 @@ const wu = (e, t) => {
|
|
|
9215
9222
|
* @see https://tailwindcss.com/docs/scale
|
|
9216
9223
|
*/
|
|
9217
9224
|
scale: [{
|
|
9218
|
-
scale:
|
|
9225
|
+
scale: ne()
|
|
9219
9226
|
}],
|
|
9220
9227
|
/**
|
|
9221
9228
|
* Scale X
|
|
9222
9229
|
* @see https://tailwindcss.com/docs/scale
|
|
9223
9230
|
*/
|
|
9224
9231
|
"scale-x": [{
|
|
9225
|
-
"scale-x":
|
|
9232
|
+
"scale-x": ne()
|
|
9226
9233
|
}],
|
|
9227
9234
|
/**
|
|
9228
9235
|
* Scale Y
|
|
9229
9236
|
* @see https://tailwindcss.com/docs/scale
|
|
9230
9237
|
*/
|
|
9231
9238
|
"scale-y": [{
|
|
9232
|
-
"scale-y":
|
|
9239
|
+
"scale-y": ne()
|
|
9233
9240
|
}],
|
|
9234
9241
|
/**
|
|
9235
9242
|
* Scale Z
|
|
9236
9243
|
* @see https://tailwindcss.com/docs/scale
|
|
9237
9244
|
*/
|
|
9238
9245
|
"scale-z": [{
|
|
9239
|
-
"scale-z":
|
|
9246
|
+
"scale-z": ne()
|
|
9240
9247
|
}],
|
|
9241
9248
|
/**
|
|
9242
9249
|
* Scale 3D
|
|
@@ -9733,9 +9740,9 @@ const wu = (e, t) => {
|
|
|
9733
9740
|
postfixLookupClassGroups: ["container-type"],
|
|
9734
9741
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
9735
9742
|
};
|
|
9736
|
-
},
|
|
9737
|
-
function
|
|
9738
|
-
return
|
|
9743
|
+
}, mf = /* @__PURE__ */ Wu(hf);
|
|
9744
|
+
function kt(...e) {
|
|
9745
|
+
return mf(Su(e));
|
|
9739
9746
|
}
|
|
9740
9747
|
function K(e, t = "USD") {
|
|
9741
9748
|
return new Intl.NumberFormat("en-US", {
|
|
@@ -9744,37 +9751,37 @@ function K(e, t = "USD") {
|
|
|
9744
9751
|
minimumFractionDigits: 2
|
|
9745
9752
|
}).format(e);
|
|
9746
9753
|
}
|
|
9747
|
-
const
|
|
9754
|
+
const ce = B.forwardRef(
|
|
9748
9755
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
9749
9756
|
"div",
|
|
9750
9757
|
{
|
|
9751
9758
|
ref: s,
|
|
9752
|
-
className:
|
|
9759
|
+
className: kt("rounded-xl border bg-card text-card-foreground shadow", e),
|
|
9753
9760
|
...t
|
|
9754
9761
|
}
|
|
9755
9762
|
)
|
|
9756
9763
|
);
|
|
9757
|
-
|
|
9764
|
+
ce.displayName = "Card";
|
|
9758
9765
|
const ve = B.forwardRef(
|
|
9759
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className:
|
|
9766
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: kt("flex flex-col space-y-1.5 p-6", e), ...t })
|
|
9760
9767
|
);
|
|
9761
9768
|
ve.displayName = "CardHeader";
|
|
9762
9769
|
const Ne = B.forwardRef(
|
|
9763
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className:
|
|
9770
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className: kt("font-semibold leading-none tracking-tight", e), ...t })
|
|
9764
9771
|
);
|
|
9765
9772
|
Ne.displayName = "CardTitle";
|
|
9766
|
-
const
|
|
9767
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className:
|
|
9773
|
+
const pf = B.forwardRef(
|
|
9774
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className: kt("text-sm text-muted-foreground", e), ...t })
|
|
9768
9775
|
);
|
|
9769
|
-
|
|
9770
|
-
const
|
|
9771
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className:
|
|
9776
|
+
pf.displayName = "CardDescription";
|
|
9777
|
+
const le = B.forwardRef(
|
|
9778
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: kt("p-6 pt-0", e), ...t })
|
|
9772
9779
|
);
|
|
9773
|
-
|
|
9774
|
-
const
|
|
9775
|
-
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className:
|
|
9780
|
+
le.displayName = "CardContent";
|
|
9781
|
+
const gf = B.forwardRef(
|
|
9782
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: kt("flex items-center p-6 pt-0", e), ...t })
|
|
9776
9783
|
);
|
|
9777
|
-
|
|
9784
|
+
gf.displayName = "CardFooter";
|
|
9778
9785
|
function Es({ status: e, error: t }) {
|
|
9779
9786
|
const s = e?.action === "connect_source" || e?.state === "not_configured", r = e?.message || t || "CUR status could not be loaded. Verify the cost source, discovery job, and Athena configuration.";
|
|
9780
9787
|
return /* @__PURE__ */ a.jsx("section", { className: "rounded-md border bg-card p-6", "aria-live": "polite", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
@@ -9792,7 +9799,7 @@ function Es({ status: e, error: t }) {
|
|
|
9792
9799
|
] })
|
|
9793
9800
|
] }) });
|
|
9794
9801
|
}
|
|
9795
|
-
function
|
|
9802
|
+
function xf({ points: e, currency: t = "USD" }) {
|
|
9796
9803
|
const [s, r] = U(null);
|
|
9797
9804
|
if (!e.length) return /* @__PURE__ */ a.jsx("p", { className: "py-20 text-center text-sm text-muted-foreground", children: "No trend data for this period." });
|
|
9798
9805
|
const n = 900, o = 260, i = 70, c = 24, l = 22, d = 48, f = n - i - c, u = o - l - d, h = Math.max(...e.map((x) => x.value), 1), m = e.map((x, b) => ({
|
|
@@ -9833,20 +9840,20 @@ function pf({ points: e, currency: t = "USD" }) {
|
|
|
9833
9840
|
] })
|
|
9834
9841
|
] });
|
|
9835
9842
|
}
|
|
9836
|
-
const Wn = (e) => e.length > 16 ? `${e.slice(0, 14)}...` : e,
|
|
9843
|
+
const Wn = (e) => e.length > 16 ? `${e.slice(0, 14)}...` : e, bf = (e, t) => new Intl.NumberFormat("en-US", {
|
|
9837
9844
|
style: "currency",
|
|
9838
9845
|
currency: t || "USD",
|
|
9839
9846
|
notation: "compact",
|
|
9840
9847
|
maximumFractionDigits: 1
|
|
9841
9848
|
}).format(e);
|
|
9842
|
-
function
|
|
9849
|
+
function yf({ title: e, items: t, currency: s }) {
|
|
9843
9850
|
const o = { top: 38, right: 18, bottom: 72, left: 76 }, i = 720 - o.left - o.right, c = 320 - o.top - o.bottom, l = Math.max(...t.map((u) => u.amount), 1), d = i / t.length, f = Math.min(56, d * 0.58);
|
|
9844
9851
|
return /* @__PURE__ */ a.jsxs("svg", { viewBox: "0 0 720 320", className: "h-80 w-full", role: "img", "aria-label": `${e} cost bar chart`, children: [
|
|
9845
9852
|
[0, 0.25, 0.5, 0.75, 1].map((u) => {
|
|
9846
9853
|
const h = o.top + c - u * c;
|
|
9847
9854
|
return /* @__PURE__ */ a.jsxs("g", { children: [
|
|
9848
9855
|
/* @__PURE__ */ a.jsx("line", { x1: o.left, y1: h, x2: 720 - o.right, y2: h, stroke: "currentColor", opacity: u === 0 ? 0.3 : 0.12, vectorEffect: "non-scaling-stroke" }),
|
|
9849
|
-
/* @__PURE__ */ a.jsx("text", { x: o.left - 12, y: h + 4, textAnchor: "end", fill: "currentColor", opacity: "0.7", fontSize: "11", children:
|
|
9856
|
+
/* @__PURE__ */ a.jsx("text", { x: o.left - 12, y: h + 4, textAnchor: "end", fill: "currentColor", opacity: "0.7", fontSize: "11", children: bf(l * u, s) })
|
|
9850
9857
|
] }, u);
|
|
9851
9858
|
}),
|
|
9852
9859
|
/* @__PURE__ */ a.jsx("line", { x1: o.left, y1: o.top, x2: o.left, y2: o.top + c, stroke: "currentColor", opacity: "0.3", vectorEffect: "non-scaling-stroke" }),
|
|
@@ -9874,7 +9881,7 @@ function xf({ title: e, items: t, currency: s }) {
|
|
|
9874
9881
|
const Na = "min-h-32 transition-all duration-200 ease-out hover:-translate-y-1 hover:scale-[1.01] hover:border-primary/30 hover:shadow-lg";
|
|
9875
9882
|
function rr({ title: e, icon: t, items: s, currency: r }) {
|
|
9876
9883
|
const [n, o] = U("chart"), i = s.slice(0, 6), c = Math.max(...i.map((l) => l.amount), 1);
|
|
9877
|
-
return /* @__PURE__ */ a.jsxs(
|
|
9884
|
+
return /* @__PURE__ */ a.jsxs(ce, { className: "min-w-0", children: [
|
|
9878
9885
|
/* @__PURE__ */ a.jsxs(ve, { className: "flex flex-row items-center justify-between gap-3 pb-3", children: [
|
|
9879
9886
|
/* @__PURE__ */ a.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
9880
9887
|
/* @__PURE__ */ a.jsx("span", { className: "text-primary", children: t }),
|
|
@@ -9885,7 +9892,7 @@ function rr({ title: e, icon: t, items: s, currency: r }) {
|
|
|
9885
9892
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => o("list"), "aria-label": `Show ${e} as list`, "aria-pressed": n === "list", title: "List", className: `rounded p-1.5 ${n === "list" ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`, children: /* @__PURE__ */ a.jsx(ou, { className: "h-4 w-4" }) })
|
|
9886
9893
|
] })
|
|
9887
9894
|
] }),
|
|
9888
|
-
/* @__PURE__ */ a.jsx(
|
|
9895
|
+
/* @__PURE__ */ a.jsx(le, { children: i.length ? n === "chart" ? /* @__PURE__ */ a.jsx(yf, { title: e, items: i, currency: r }) : /* @__PURE__ */ a.jsx("div", { className: "space-y-3", children: i.map((l) => /* @__PURE__ */ a.jsxs("div", { className: "space-y-1", children: [
|
|
9889
9896
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
9890
9897
|
/* @__PURE__ */ a.jsxs("span", { className: "truncate text-muted-foreground", title: l.label, children: [
|
|
9891
9898
|
l.label,
|
|
@@ -9901,22 +9908,22 @@ function rr({ title: e, icon: t, items: s, currency: r }) {
|
|
|
9901
9908
|
] }, l.key || l.label)) }) : /* @__PURE__ */ a.jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No cost data for this period." }) })
|
|
9902
9909
|
] });
|
|
9903
9910
|
}
|
|
9904
|
-
function
|
|
9911
|
+
function vf() {
|
|
9905
9912
|
return /* @__PURE__ */ a.jsxs("div", { "aria-live": "polite", "aria-busy": "true", className: "contents", children: [
|
|
9906
|
-
/* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,240px),1fr))] gap-4", children: Array.from({ length: 4 }, (e, t) => /* @__PURE__ */ a.jsxs(
|
|
9913
|
+
/* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,240px),1fr))] gap-4", children: Array.from({ length: 4 }, (e, t) => /* @__PURE__ */ a.jsxs(ce, { className: Na, children: [
|
|
9907
9914
|
/* @__PURE__ */ a.jsx(ve, { className: "pb-2", children: /* @__PURE__ */ a.jsx("div", { className: "h-3 w-24 animate-pulse rounded bg-muted" }) }),
|
|
9908
|
-
/* @__PURE__ */ a.jsxs(
|
|
9915
|
+
/* @__PURE__ */ a.jsxs(le, { children: [
|
|
9909
9916
|
/* @__PURE__ */ a.jsx("div", { className: "h-6 w-3/4 animate-pulse rounded bg-muted" }),
|
|
9910
9917
|
/* @__PURE__ */ a.jsx("div", { className: "mt-3 h-3 w-1/2 animate-pulse rounded bg-muted/80" })
|
|
9911
9918
|
] })
|
|
9912
9919
|
] }, t)) }),
|
|
9913
|
-
/* @__PURE__ */ a.jsxs(
|
|
9920
|
+
/* @__PURE__ */ a.jsxs(ce, { children: [
|
|
9914
9921
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx("div", { className: "h-4 w-36 animate-pulse rounded bg-muted" }) }),
|
|
9915
|
-
/* @__PURE__ */ a.jsx(
|
|
9922
|
+
/* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsx("div", { className: "h-72 animate-pulse rounded-lg bg-muted/70" }) })
|
|
9916
9923
|
] }),
|
|
9917
|
-
/* @__PURE__ */ a.jsx("div", { className: "grid gap-4 lg:grid-cols-2", children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ a.jsxs(
|
|
9924
|
+
/* @__PURE__ */ a.jsx("div", { className: "grid gap-4 lg:grid-cols-2", children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ a.jsxs(ce, { children: [
|
|
9918
9925
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx("div", { className: "h-4 w-32 animate-pulse rounded bg-muted" }) }),
|
|
9919
|
-
/* @__PURE__ */ a.jsx(
|
|
9926
|
+
/* @__PURE__ */ a.jsx(le, { className: "space-y-4", children: Array.from({ length: 5 }, (s, r) => /* @__PURE__ */ a.jsxs("div", { children: [
|
|
9920
9927
|
/* @__PURE__ */ a.jsxs("div", { className: "flex justify-between", children: [
|
|
9921
9928
|
/* @__PURE__ */ a.jsx("div", { className: "h-3 w-2/5 animate-pulse rounded bg-muted" }),
|
|
9922
9929
|
/* @__PURE__ */ a.jsx("div", { className: "h-3 w-20 animate-pulse rounded bg-muted" })
|
|
@@ -9926,7 +9933,7 @@ function bf() {
|
|
|
9926
9933
|
] }, t)) })
|
|
9927
9934
|
] });
|
|
9928
9935
|
}
|
|
9929
|
-
function
|
|
9936
|
+
function wf({ data: e, period: t, selectedMonth: s }) {
|
|
9930
9937
|
const r = e.topServices[0], n = e.topAccounts[0], o = /* @__PURE__ */ new Date(), [i, c] = s.split("-").map(Number), l = t === "monthly" ? new Intl.DateTimeFormat("en-US", { month: "long", year: "numeric" }).format(new Date(i, c - 1, 1)) : String(o.getFullYear()), d = [
|
|
9931
9938
|
{ label: "Total cost", value: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
9932
9939
|
/* @__PURE__ */ a.jsx("span", { className: "block", children: K(e.totalCost, e.currency) }),
|
|
@@ -9942,59 +9949,60 @@ Cost - ${K(r.amount, e.currency)}` }) : "-", helper: l, icon: /* @__PURE__ */ a.
|
|
|
9942
9949
|
Account Id - ${n.accountId || n.key || "Unknown"}
|
|
9943
9950
|
Cost - ${K(n.amount, e.currency)}` }) : "-", helper: l, icon: /* @__PURE__ */ a.jsx(_s, {}) }
|
|
9944
9951
|
];
|
|
9945
|
-
return /* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,240px),1fr))] gap-4", children: d.map((f) => /* @__PURE__ */ a.jsxs(
|
|
9952
|
+
return /* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,240px),1fr))] gap-4", children: d.map((f) => /* @__PURE__ */ a.jsxs(ce, { className: Na, children: [
|
|
9946
9953
|
/* @__PURE__ */ a.jsxs(ve, { className: "flex flex-row items-center justify-between pb-2", children: [
|
|
9947
9954
|
/* @__PURE__ */ a.jsx(Ne, { className: "text-xs font-medium text-muted-foreground", children: f.label }),
|
|
9948
9955
|
/* @__PURE__ */ a.jsx("span", { className: "text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", children: f.icon })
|
|
9949
9956
|
] }),
|
|
9950
|
-
/* @__PURE__ */ a.jsxs(
|
|
9957
|
+
/* @__PURE__ */ a.jsxs(le, { children: [
|
|
9951
9958
|
/* @__PURE__ */ a.jsx("div", { className: "break-words text-base font-semibold leading-snug xl:text-lg", children: f.value }),
|
|
9952
9959
|
/* @__PURE__ */ a.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: f.helper })
|
|
9953
9960
|
] })
|
|
9954
9961
|
] }, f.label)) });
|
|
9955
9962
|
}
|
|
9956
|
-
const
|
|
9957
|
-
getOverview: (e) =>
|
|
9958
|
-
getAccounts: () =>
|
|
9959
|
-
getReports: (e) =>
|
|
9960
|
-
getFilterOptions: (e) =>
|
|
9961
|
-
getTags: (e) =>
|
|
9962
|
-
getDataStatus: () =>
|
|
9963
|
-
getAnalysisStatus: () =>
|
|
9964
|
-
getLatestAnalysis: () =>
|
|
9965
|
-
getAnalysisSchedule: () =>
|
|
9966
|
-
updateAnalysisSchedule: (e) =>
|
|
9967
|
-
getAnalysisReports: () =>
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9963
|
+
const ie = {
|
|
9964
|
+
getOverview: (e) => re.get("/overview", { params: e }).then((t) => t.data),
|
|
9965
|
+
getAccounts: () => re.get("/accounts").then((e) => e.data),
|
|
9966
|
+
getReports: (e) => re.get("/reports", { params: e }).then((t) => t.data),
|
|
9967
|
+
getFilterOptions: (e) => re.get("/filter-options", { params: { start: e?.start, end: e?.end, tagKey: e?.filterTagKey } }).then((t) => t.data),
|
|
9968
|
+
getTags: (e) => re.get("/tags", { params: e }).then((t) => t.data),
|
|
9969
|
+
getDataStatus: () => re.get("/data-status").then((e) => e.data),
|
|
9970
|
+
getAnalysisStatus: () => re.get("/analysis/status").then((e) => e.data),
|
|
9971
|
+
getLatestAnalysis: () => re.get("/analysis/latest").then((e) => e.data.analysis),
|
|
9972
|
+
getAnalysisSchedule: () => re.get("/analysis/schedule").then((e) => e.data),
|
|
9973
|
+
updateAnalysisSchedule: (e) => re.put("/analysis/schedule", e).then((t) => t.data),
|
|
9974
|
+
getAnalysisReports: () => re.get("/analysis/reports").then((e) => e.data.reports),
|
|
9975
|
+
removeAnalysisReport: (e) => re.delete(`/analysis/reports/${e}`).then((t) => t.data),
|
|
9976
|
+
downloadAnalysisPdf: (e) => re.get(`/analysis/reports/${e}/pdf`, { responseType: "blob" }).then((t) => t.data),
|
|
9977
|
+
getSources: () => re.get("/sources").then((e) => e.data),
|
|
9978
|
+
createSource: (e) => re.post("/sources", e).then((t) => t.data),
|
|
9979
|
+
getSourceStatus: (e) => re.get(`/sources/${e}/status`).then((t) => t.data),
|
|
9980
|
+
verifySource: (e) => re.post(`/sources/${e}/verify`).then((t) => t.data),
|
|
9981
|
+
downloadSourceTemplate: (e) => re.get(`/sources/${e}/template`, { responseType: "blob" }).then((t) => t.data)
|
|
9974
9982
|
};
|
|
9975
|
-
function
|
|
9983
|
+
function Sf() {
|
|
9976
9984
|
const e = /* @__PURE__ */ new Date(), t = `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`, [s, r] = U(null), [n, o] = U(!0), [i, c] = U(null), [l, d] = U(null), [f, u] = U("monthly"), [h, m] = U(t), p = yr(0), g = Array.from({ length: e.getMonth() + 1 }, (S, w) => ({ value: `${e.getFullYear()}-${String(w + 1).padStart(2, "0")}`, label: new Intl.DateTimeFormat("en-US", { month: "long", year: "numeric" }).format(new Date(e.getFullYear(), w, 1)) })), x = async (S = f, w = h) => {
|
|
9977
9985
|
const N = ++p.current;
|
|
9978
9986
|
o(!0), r(null), c(null);
|
|
9979
9987
|
try {
|
|
9980
|
-
let
|
|
9988
|
+
let j;
|
|
9981
9989
|
if (S === "yearly")
|
|
9982
|
-
|
|
9990
|
+
j = { period: S, start: `${e.getFullYear()}-01-01` };
|
|
9983
9991
|
else {
|
|
9984
|
-
const [k,
|
|
9985
|
-
|
|
9992
|
+
const [k, M] = w.split("-").map(Number), O = w === t ? e.getDate() : new Date(k, M, 0).getDate();
|
|
9993
|
+
j = { period: S, start: `${w}-01`, end: `${w}-${String(O).padStart(2, "0")}` };
|
|
9986
9994
|
}
|
|
9987
|
-
const
|
|
9988
|
-
if (N === p.current && d(
|
|
9989
|
-
const R = await
|
|
9995
|
+
const _ = await ie.getDataStatus();
|
|
9996
|
+
if (N === p.current && d(_), !_.ready) return;
|
|
9997
|
+
const R = await ie.getOverview(j);
|
|
9990
9998
|
N === p.current && r(R);
|
|
9991
|
-
} catch (
|
|
9992
|
-
N === p.current && c(
|
|
9999
|
+
} catch (j) {
|
|
10000
|
+
N === p.current && c(j?.response?.data?.error || j.message || "Failed to load AWS costs");
|
|
9993
10001
|
} finally {
|
|
9994
10002
|
N === p.current && o(!1);
|
|
9995
10003
|
}
|
|
9996
10004
|
};
|
|
9997
|
-
return
|
|
10005
|
+
return Me(() => {
|
|
9998
10006
|
x(f, h);
|
|
9999
10007
|
}, [f, h]), { data: s, dataStatus: l, loading: n, error: i, period: f, selectedMonth: h, monthOptions: g, changePeriod: (S) => {
|
|
10000
10008
|
S !== f && (o(!0), r(null), u(S));
|
|
@@ -10002,8 +10010,8 @@ function vf() {
|
|
|
10002
10010
|
S === h || !g.some((w) => w.value === S) || (o(!0), r(null), m(S));
|
|
10003
10011
|
}, refresh: () => x(f, h) };
|
|
10004
10012
|
}
|
|
10005
|
-
function
|
|
10006
|
-
const { data: e, dataStatus: t, loading: s, error: r, period: n, selectedMonth: o, monthOptions: i, changePeriod: c, changeMonth: l, refresh: d } =
|
|
10013
|
+
function Rf() {
|
|
10014
|
+
const { data: e, dataStatus: t, loading: s, error: r, period: n, selectedMonth: o, monthOptions: i, changePeriod: c, changeMonth: l, refresh: d } = Sf();
|
|
10007
10015
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex w-full flex-col gap-6 p-2 md:p-6", children: [
|
|
10008
10016
|
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-4", children: [
|
|
10009
10017
|
/* @__PURE__ */ a.jsxs("div", { children: [
|
|
@@ -10018,14 +10026,14 @@ function wf() {
|
|
|
10018
10026
|
/* @__PURE__ */ a.jsx("div", { className: "flex rounded-lg border p-1", children: ["monthly", "yearly"].map((f) => /* @__PURE__ */ a.jsx("button", { onClick: () => c(f), className: `rounded-md px-3 py-1.5 text-sm capitalize transition-colors ${n === f ? "bg-primary text-primary-foreground" : "hover:bg-muted"}`, children: f }, f)) }),
|
|
10019
10027
|
/* @__PURE__ */ a.jsx("button", { onClick: () => {
|
|
10020
10028
|
d();
|
|
10021
|
-
}, disabled: s, className: "rounded-lg border p-2 hover:bg-muted", children: /* @__PURE__ */ a.jsx(
|
|
10029
|
+
}, disabled: s, className: "rounded-lg border p-2 hover:bg-muted", children: /* @__PURE__ */ a.jsx(jt, { className: `h-4 w-4 ${s ? "animate-spin" : ""}` }) })
|
|
10022
10030
|
] })
|
|
10023
10031
|
] }),
|
|
10024
10032
|
r && e && /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive", children: [
|
|
10025
10033
|
/* @__PURE__ */ a.jsx(ut, { className: "h-4 w-4" }),
|
|
10026
10034
|
r
|
|
10027
10035
|
] }),
|
|
10028
|
-
s ? /* @__PURE__ */ a.jsx(
|
|
10036
|
+
s ? /* @__PURE__ */ a.jsx(vf, {}) : t && !t.ready ? /* @__PURE__ */ a.jsx(Es, { status: t }) : r && !e ? /* @__PURE__ */ a.jsx(Es, { status: t, error: r }) : e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10029
10037
|
e.dataSource && /* @__PURE__ */ a.jsxs("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground", children: [
|
|
10030
10038
|
/* @__PURE__ */ a.jsx("span", { children: "Source: AWS CUR via SaaS Athena - gross positive unblended charges" }),
|
|
10031
10039
|
/* @__PURE__ */ a.jsxs("span", { children: [
|
|
@@ -10033,9 +10041,9 @@ function wf() {
|
|
|
10033
10041
|
t?.lastDataAt ? `, updated ${new Date(t.lastDataAt).toLocaleString()}` : ""
|
|
10034
10042
|
] })
|
|
10035
10043
|
] }),
|
|
10036
|
-
/* @__PURE__ */ a.jsx(
|
|
10037
|
-
e.message && !/historical data beyond 14 months/i.test(e.message) && /* @__PURE__ */ a.jsx(
|
|
10038
|
-
/* @__PURE__ */ a.jsxs(
|
|
10044
|
+
/* @__PURE__ */ a.jsx(wf, { data: e, period: n, selectedMonth: o }),
|
|
10045
|
+
e.message && !/historical data beyond 14 months/i.test(e.message) && /* @__PURE__ */ a.jsx(ce, { children: /* @__PURE__ */ a.jsx(le, { className: "py-8 text-center text-sm text-muted-foreground", children: e.message }) }),
|
|
10046
|
+
/* @__PURE__ */ a.jsxs(ce, { children: [
|
|
10039
10047
|
/* @__PURE__ */ a.jsxs(ve, { className: "flex flex-row items-center gap-2", children: [
|
|
10040
10048
|
/* @__PURE__ */ a.jsx(la, { className: "h-4 w-4 text-primary" }),
|
|
10041
10049
|
/* @__PURE__ */ a.jsxs(Ne, { className: "text-sm", children: [
|
|
@@ -10043,11 +10051,11 @@ function wf() {
|
|
|
10043
10051
|
n === "monthly" ? "Monthly" : "Yearly"
|
|
10044
10052
|
] })
|
|
10045
10053
|
] }),
|
|
10046
|
-
/* @__PURE__ */ a.jsx(
|
|
10054
|
+
/* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsx(xf, { points: e.trends.map((f) => ({ key: f.month, label: n === "yearly" ? f.month.slice(0, 4) : (/* @__PURE__ */ new Date(`${f.month}T00:00:00Z`)).toLocaleDateString(void 0, { month: "short", year: "2-digit" }), value: f.amount })), currency: e.currency }) })
|
|
10047
10055
|
] }),
|
|
10048
10056
|
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
10049
10057
|
/* @__PURE__ */ a.jsx(rr, { title: "Top services", icon: /* @__PURE__ */ a.jsx(ia, { className: "h-4 w-4" }), items: e.topServices, currency: e.currency }),
|
|
10050
|
-
/* @__PURE__ */ a.jsx(rr, { title: "AWS accounts", icon: /* @__PURE__ */ a.jsx(
|
|
10058
|
+
/* @__PURE__ */ a.jsx(rr, { title: "AWS accounts", icon: /* @__PURE__ */ a.jsx(Id, { className: "h-4 w-4" }), items: e.topAccounts, currency: e.currency }),
|
|
10051
10059
|
/* @__PURE__ */ a.jsx(rr, { title: "Regional distribution", icon: /* @__PURE__ */ a.jsx(cu, { className: "h-4 w-4" }), items: e.topRegions, currency: e.currency })
|
|
10052
10060
|
] })
|
|
10053
10061
|
] }) : null
|
|
@@ -10058,7 +10066,7 @@ function Hn(e, t) {
|
|
|
10058
10066
|
const s = new Date(e.length === 10 ? `${e}T00:00:00Z` : e);
|
|
10059
10067
|
return Number.isFinite(s.getTime()) ? s.toLocaleDateString(void 0, t ? { month: "short", day: "numeric", year: "numeric" } : { month: "short", year: "numeric" }) : e;
|
|
10060
10068
|
}
|
|
10061
|
-
function
|
|
10069
|
+
function jf({ timeline: e, currency: t = "USD", daily: s = !1 }) {
|
|
10062
10070
|
const [r, n] = U(null), [o, i] = U(null), c = Ps(() => {
|
|
10063
10071
|
const h = /* @__PURE__ */ new Map();
|
|
10064
10072
|
for (const m of e) for (const p of m.groups) h.set(p.label, (h.get(p.label) || 0) + p.amount);
|
|
@@ -10109,11 +10117,11 @@ function Sf({ timeline: e, currency: t = "USD", daily: s = !1 }) {
|
|
|
10109
10117
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "flex min-h-44 items-center justify-center rounded-2xl border border-dashed p-4 text-center text-xs text-muted-foreground", children: "Hover over a bar to view its cost details." }) })
|
|
10110
10118
|
] }) : /* @__PURE__ */ a.jsx("p", { className: "py-24 text-center text-sm text-muted-foreground", children: "No trend data for this period." });
|
|
10111
10119
|
}
|
|
10112
|
-
function
|
|
10120
|
+
function Nf({ rows: e, currency: t }) {
|
|
10113
10121
|
const s = e.slice(0, 8), r = Math.max(1, ...s.flatMap((n) => [n.current?.amount || 0, n.previous?.amount || 0]));
|
|
10114
|
-
return /* @__PURE__ */ a.jsxs(
|
|
10122
|
+
return /* @__PURE__ */ a.jsxs(ce, { className: "bg-primary/5", children: [
|
|
10115
10123
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx(Ne, { className: "text-sm", children: "Comparison Overview" }) }),
|
|
10116
|
-
/* @__PURE__ */ a.jsx(
|
|
10124
|
+
/* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsxs("div", { className: "rounded-xl border bg-card p-5", children: [
|
|
10117
10125
|
/* @__PURE__ */ a.jsx("div", { className: "flex h-72 items-end gap-4 border-b border-l px-4 pt-4", children: s.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-center", children: [
|
|
10118
10126
|
/* @__PURE__ */ a.jsxs("div", { className: "flex h-56 w-full items-end justify-center gap-1", children: [
|
|
10119
10127
|
/* @__PURE__ */ a.jsx("div", { title: `Current: ${K(n.current?.amount || 0, t)}`, className: "w-1/3 max-w-10 rounded-t bg-indigo-500", style: { height: `${Math.max((n.current?.amount || 0) / r * 100, n.current?.amount ? 1 : 0)}%` } }),
|
|
@@ -10134,10 +10142,10 @@ function Rf({ rows: e, currency: t }) {
|
|
|
10134
10142
|
] }) })
|
|
10135
10143
|
] });
|
|
10136
10144
|
}
|
|
10137
|
-
function
|
|
10145
|
+
function Ie({ label: e, value: t, helper: s, accent: r = !1, trend: n }) {
|
|
10138
10146
|
return /* @__PURE__ */ a.jsxs("div", { className: "rounded-xl border bg-card p-5 shadow-sm", children: [
|
|
10139
10147
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10140
|
-
n != null && (n < 0 ? /* @__PURE__ */ a.jsx(
|
|
10148
|
+
n != null && (n < 0 ? /* @__PURE__ */ a.jsx(yu, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ a.jsx(la, { className: "h-4 w-4 text-emerald-500" })),
|
|
10141
10149
|
/* @__PURE__ */ a.jsx("p", { className: "text-xs uppercase tracking-wide text-muted-foreground", children: e })
|
|
10142
10150
|
] }),
|
|
10143
10151
|
/* @__PURE__ */ a.jsx("p", { className: `mt-2 text-2xl font-bold ${r ? "text-primary" : n != null && n < 0 ? "text-red-500" : ""}`, children: t }),
|
|
@@ -10157,11 +10165,11 @@ function is({ label: e, options: t, selected: s, onChange: r }) {
|
|
|
10157
10165
|
] }, o.value)) : /* @__PURE__ */ a.jsx("p", { className: "p-2 text-xs text-muted-foreground", children: "No values available." }) })
|
|
10158
10166
|
] });
|
|
10159
10167
|
}
|
|
10160
|
-
function
|
|
10168
|
+
function Cf() {
|
|
10161
10169
|
return /* @__PURE__ */ a.jsxs("div", { "aria-live": "polite", "aria-busy": "true", className: "space-y-5", children: [
|
|
10162
10170
|
/* @__PURE__ */ a.jsxs("section", { className: "rounded-xl bg-primary/5 p-5", children: [
|
|
10163
10171
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3 text-sm font-medium text-primary", children: [
|
|
10164
|
-
/* @__PURE__ */ a.jsx(
|
|
10172
|
+
/* @__PURE__ */ a.jsx(vt, { className: "h-5 w-5 animate-spin" }),
|
|
10165
10173
|
"Loading live AWS cost report..."
|
|
10166
10174
|
] }),
|
|
10167
10175
|
/* @__PURE__ */ a.jsx("div", { className: "mt-5 grid gap-3 sm:grid-cols-3", children: [1, 2, 3].map((e) => /* @__PURE__ */ a.jsx("div", { className: "h-28 animate-pulse rounded-xl border bg-card/70" }, e)) })
|
|
@@ -10170,7 +10178,7 @@ function jf() {
|
|
|
10170
10178
|
/* @__PURE__ */ a.jsx("div", { className: "h-64 animate-pulse rounded-xl border bg-muted/40" })
|
|
10171
10179
|
] });
|
|
10172
10180
|
}
|
|
10173
|
-
const Ke = 10, br = /* @__PURE__ */ new Date(),
|
|
10181
|
+
const Ke = 10, br = /* @__PURE__ */ new Date(), _f = new Date(Date.UTC(br.getUTCFullYear(), br.getUTCMonth() - 2, 1)).toISOString().slice(0, 10), kf = br.toISOString().slice(0, 10), Dt = { services: [], regions: [], accountIds: [], tagKey: "", tagValues: [] }, ct = {
|
|
10174
10182
|
service: { tab: "Services", title: "Service Cost Summary", pdfTitle: "Service Cost Report", top: "Top service cost", count: "Service count", item: "Service", empty: "No service cost data found." },
|
|
10175
10183
|
account: { tab: "Accounts", title: "Account Cost Summary", pdfTitle: "Account Cost Report", top: "Top account cost", count: "Account count", item: "Linked account", empty: "No linked account cost data found." },
|
|
10176
10184
|
region: { tab: "Regions", title: "Regional Cost Summary", pdfTitle: "Region Cost Report", top: "Top region cost", count: "Region count", item: "Region", empty: "No regional cost data found." },
|
|
@@ -10191,14 +10199,14 @@ function Gn(e, t) {
|
|
|
10191
10199
|
const r = new Date(s);
|
|
10192
10200
|
return r.setUTCDate(r.getUTCDate() - 1), { currentStart: e, currentEnd: e, previousStart: r.toISOString().slice(0, 10), previousEnd: r.toISOString().slice(0, 10) };
|
|
10193
10201
|
}
|
|
10194
|
-
function
|
|
10202
|
+
function Nt(e, t, s) {
|
|
10195
10203
|
const r = /* @__PURE__ */ new Date(`${e}T00:00:00Z`), n = /* @__PURE__ */ new Date(`${t}T00:00:00Z`);
|
|
10196
10204
|
if (s === "monthly" && r.getUTCFullYear() === n.getUTCFullYear() && r.getUTCMonth() === n.getUTCMonth())
|
|
10197
10205
|
return new Intl.DateTimeFormat("en-US", { month: "long", year: "numeric", timeZone: "UTC" }).format(r);
|
|
10198
10206
|
const o = new Intl.DateTimeFormat("en-US", { month: "short", day: "numeric", year: "numeric", timeZone: "UTC" });
|
|
10199
10207
|
return `${o.format(r)} – ${o.format(n)}`;
|
|
10200
10208
|
}
|
|
10201
|
-
function
|
|
10209
|
+
function Ef(e) {
|
|
10202
10210
|
const t = /* @__PURE__ */ new Map();
|
|
10203
10211
|
return e.current.summary.forEach((s) => t.set(s.key || s.label, { current: s })), e.previous.summary.forEach((s) => {
|
|
10204
10212
|
const r = s.key || s.label;
|
|
@@ -10255,14 +10263,14 @@ function Ca({ page: e, pages: t, total: s, onChange: r }) {
|
|
|
10255
10263
|
] })
|
|
10256
10264
|
] });
|
|
10257
10265
|
}
|
|
10258
|
-
function
|
|
10266
|
+
function Pf({ groupBy: e, report: t }) {
|
|
10259
10267
|
const [s, r] = U(""), [n, o] = U(1), [i, c] = U(null), [l, d] = U({ percentage: !0, accounts: !0, regions: !0 }), f = ct[e], u = Ps(() => {
|
|
10260
10268
|
const g = s.trim().toLowerCase();
|
|
10261
10269
|
return g ? t.summary.filter((x) => `${x.label} ${x.accountId || ""}`.toLowerCase().includes(g)) : t.summary;
|
|
10262
10270
|
}, [t, s]), h = Math.max(1, Math.ceil(u.length / Ke)), m = u.slice((n - 1) * Ke, n * Ke), p = 3 + Number(l.percentage) + Number(l.accounts) + Number(l.regions);
|
|
10263
|
-
return
|
|
10271
|
+
return Me(() => {
|
|
10264
10272
|
o(1);
|
|
10265
|
-
}, [t, s, e]), /* @__PURE__ */ a.jsxs(
|
|
10273
|
+
}, [t, s, e]), /* @__PURE__ */ a.jsxs(ce, { children: [
|
|
10266
10274
|
/* @__PURE__ */ a.jsxs(ve, { className: "flex flex-row flex-wrap items-center justify-between gap-3", children: [
|
|
10267
10275
|
/* @__PURE__ */ a.jsx(Ne, { className: "text-sm text-primary", children: "Cost and usage breakdown" }),
|
|
10268
10276
|
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
@@ -10282,7 +10290,7 @@ function kf({ groupBy: e, report: t }) {
|
|
|
10282
10290
|
] })
|
|
10283
10291
|
] })
|
|
10284
10292
|
] }),
|
|
10285
|
-
/* @__PURE__ */ a.jsx(
|
|
10293
|
+
/* @__PURE__ */ a.jsx(le, { className: "overflow-x-auto", children: /* @__PURE__ */ a.jsxs("table", { className: "w-full text-sm", children: [
|
|
10286
10294
|
/* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { className: "border-b bg-primary/5 text-left text-xs uppercase text-primary", children: [
|
|
10287
10295
|
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-4", children: f.item }),
|
|
10288
10296
|
/* @__PURE__ */ a.jsx("th", { className: "px-4", children: "Cost" }),
|
|
@@ -10319,9 +10327,9 @@ function kf({ groupBy: e, report: t }) {
|
|
|
10319
10327
|
/* @__PURE__ */ a.jsx("button", { onClick: () => c(null), children: /* @__PURE__ */ a.jsx(Ds, {}) })
|
|
10320
10328
|
] }),
|
|
10321
10329
|
/* @__PURE__ */ a.jsxs("div", { className: "mt-5 grid gap-3 sm:grid-cols-3", children: [
|
|
10322
|
-
/* @__PURE__ */ a.jsx(
|
|
10323
|
-
/* @__PURE__ */ a.jsx(
|
|
10324
|
-
/* @__PURE__ */ a.jsx(
|
|
10330
|
+
/* @__PURE__ */ a.jsx(Ie, { label: "Cost", value: K(i.amount, t.currency) }),
|
|
10331
|
+
/* @__PURE__ */ a.jsx(Ie, { label: "Accounts", value: String(i.accounts?.length || 0) }),
|
|
10332
|
+
/* @__PURE__ */ a.jsx(Ie, { label: "Regions", value: String(i.regions?.length || 0) })
|
|
10325
10333
|
] }),
|
|
10326
10334
|
/* @__PURE__ */ a.jsxs("div", { className: "mt-5 grid gap-5 sm:grid-cols-2", children: [
|
|
10327
10335
|
/* @__PURE__ */ a.jsxs("div", { children: [
|
|
@@ -10342,14 +10350,14 @@ function kf({ groupBy: e, report: t }) {
|
|
|
10342
10350
|
] }) })
|
|
10343
10351
|
] });
|
|
10344
10352
|
}
|
|
10345
|
-
function
|
|
10353
|
+
function Tf({ rows: e, groupBy: t, comparison: s, granularity: r }) {
|
|
10346
10354
|
const [n, o] = U(""), [i, c] = U(1), l = Ps(() => {
|
|
10347
10355
|
const m = n.trim().toLowerCase();
|
|
10348
10356
|
return m ? e.filter((p) => p.label.toLowerCase().includes(m)) : e;
|
|
10349
|
-
}, [e, n]), d = Math.max(1, Math.ceil(l.length / Ke)), f = l.slice((i - 1) * Ke, i * Ke), u =
|
|
10350
|
-
return
|
|
10357
|
+
}, [e, n]), d = Math.max(1, Math.ceil(l.length / Ke)), f = l.slice((i - 1) * Ke, i * Ke), u = Nt(s.currentStart, s.currentEnd, r), h = Nt(s.previousStart, s.previousEnd, r);
|
|
10358
|
+
return Me(() => {
|
|
10351
10359
|
c(1);
|
|
10352
|
-
}, [n, t, s]), /* @__PURE__ */ a.jsxs(
|
|
10360
|
+
}, [n, t, s]), /* @__PURE__ */ a.jsxs(ce, { children: [
|
|
10353
10361
|
/* @__PURE__ */ a.jsxs(ve, { className: "flex flex-row flex-wrap items-center justify-between gap-3", children: [
|
|
10354
10362
|
/* @__PURE__ */ a.jsx(Ne, { className: "text-sm text-primary", children: "Comparison Details" }),
|
|
10355
10363
|
/* @__PURE__ */ a.jsxs("label", { className: "flex items-center gap-2 rounded-full border bg-background px-4 py-2 text-sm", children: [
|
|
@@ -10357,7 +10365,7 @@ function Ef({ rows: e, groupBy: t, comparison: s, granularity: r }) {
|
|
|
10357
10365
|
/* @__PURE__ */ a.jsx("input", { "aria-label": "Search comparison", value: n, onChange: (m) => o(m.target.value), placeholder: "Search...", className: "w-48 bg-transparent outline-none" })
|
|
10358
10366
|
] })
|
|
10359
10367
|
] }),
|
|
10360
|
-
/* @__PURE__ */ a.jsx(
|
|
10368
|
+
/* @__PURE__ */ a.jsx(le, { className: "overflow-x-auto", children: /* @__PURE__ */ a.jsxs("table", { className: "w-full text-sm", children: [
|
|
10361
10369
|
/* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { className: "border-b bg-primary/5 text-left text-xs uppercase text-primary", children: [
|
|
10362
10370
|
/* @__PURE__ */ a.jsxs("th", { className: "px-4 py-4", children: [
|
|
10363
10371
|
ct[t].item,
|
|
@@ -10392,12 +10400,12 @@ function Ef({ rows: e, groupBy: t, comparison: s, granularity: r }) {
|
|
|
10392
10400
|
/* @__PURE__ */ a.jsx(Ca, { page: i, pages: d, total: l.length, onChange: c })
|
|
10393
10401
|
] });
|
|
10394
10402
|
}
|
|
10395
|
-
function
|
|
10403
|
+
function Af(e) {
|
|
10396
10404
|
const { mode: t, groupBy: s, start: r, end: n, granularity: o, reportTagKey: i, options: c, filters: l, loading: d, filtersLoading: f, comparisonPeriods: u } = e;
|
|
10397
10405
|
return /* @__PURE__ */ a.jsxs("aside", { className: "space-y-4", children: [
|
|
10398
|
-
/* @__PURE__ */ a.jsxs(
|
|
10406
|
+
/* @__PURE__ */ a.jsxs(ce, { className: "bg-primary/5", children: [
|
|
10399
10407
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx(Ne, { className: "text-sm uppercase text-primary", children: "Report parameters" }) }),
|
|
10400
|
-
/* @__PURE__ */ a.jsxs(
|
|
10408
|
+
/* @__PURE__ */ a.jsxs(le, { className: "space-y-4", children: [
|
|
10401
10409
|
/* @__PURE__ */ a.jsxs("div", { className: "flex gap-2", children: [
|
|
10402
10410
|
/* @__PURE__ */ a.jsx("button", { onClick: () => e.onModeChange("standard"), className: `rounded-md px-4 py-2 text-xs font-semibold ${t === "standard" ? "bg-primary text-primary-foreground" : "border text-primary"}`, children: "Standard" }),
|
|
10403
10411
|
/* @__PURE__ */ a.jsx("button", { onClick: () => e.onModeChange("compare"), className: `rounded-md px-4 py-2 text-xs font-semibold ${t === "compare" ? "bg-primary text-primary-foreground" : "border text-primary"}`, children: "Compare" })
|
|
@@ -10435,14 +10443,14 @@ function Pf(e) {
|
|
|
10435
10443
|
/* @__PURE__ */ a.jsx("select", { value: i, onChange: (h) => e.onReportTagKeyChange(h.target.value), className: "mt-1 w-full rounded-md border bg-background p-2 text-sm text-foreground", children: c.tagKeys.map((h) => /* @__PURE__ */ a.jsx("option", { children: h }, h)) })
|
|
10436
10444
|
] }),
|
|
10437
10445
|
/* @__PURE__ */ a.jsxs("button", { onClick: e.onRun, disabled: d, className: "flex w-full items-center justify-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50", children: [
|
|
10438
|
-
/* @__PURE__ */ a.jsx(
|
|
10446
|
+
/* @__PURE__ */ a.jsx(jt, { className: `h-4 w-4 ${d ? "animate-spin" : ""}` }),
|
|
10439
10447
|
"Run report"
|
|
10440
10448
|
] })
|
|
10441
10449
|
] })
|
|
10442
10450
|
] }),
|
|
10443
|
-
/* @__PURE__ */ a.jsxs(
|
|
10451
|
+
/* @__PURE__ */ a.jsxs(ce, { className: "bg-primary/5", children: [
|
|
10444
10452
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx(Ne, { className: "text-sm uppercase text-primary", children: "Filter by" }) }),
|
|
10445
|
-
/* @__PURE__ */ a.jsxs(
|
|
10453
|
+
/* @__PURE__ */ a.jsxs(le, { className: "space-y-3", children: [
|
|
10446
10454
|
/* @__PURE__ */ a.jsx(is, { label: "Services", options: c.services, selected: l.services, onChange: (h) => e.onFiltersChange((m) => ({ ...m, services: h })) }),
|
|
10447
10455
|
/* @__PURE__ */ a.jsx(is, { label: "Region", options: c.regions, selected: l.regions, onChange: (h) => e.onFiltersChange((m) => ({ ...m, regions: h })) }),
|
|
10448
10456
|
/* @__PURE__ */ a.jsx(is, { label: "Linked Account", options: c.accounts, selected: l.accountIds, onChange: (h) => e.onFiltersChange((m) => ({ ...m, accountIds: h })) }),
|
|
@@ -10462,9 +10470,9 @@ function Pf(e) {
|
|
|
10462
10470
|
] })
|
|
10463
10471
|
] });
|
|
10464
10472
|
}
|
|
10465
|
-
function
|
|
10466
|
-
const [e, t] = U("service"), [s, r] = U("standard"), [n, o] = U(
|
|
10467
|
-
start:
|
|
10473
|
+
function Of() {
|
|
10474
|
+
const [e, t] = U("service"), [s, r] = U("standard"), [n, o] = U(_f), [i, c] = U(kf), [l, d] = U("monthly"), [f, u] = U("Name"), [h, m] = U({ services: [], regions: [], accounts: [], tagKeys: [], tagValues: [] }), [p, g] = U(Dt), [x, b] = U(Dt), [y, S] = U(null), [w, N] = U(null), [j, _] = U(!0), [R, k] = U(!1), [M, O] = U(null), [D, ee] = U(null), V = yr(0), Z = Ps(() => w ? Ef(w) : [], [w]), Q = Gn(i, l), Y = (L, I, $, J) => ({
|
|
10475
|
+
start: I,
|
|
10468
10476
|
end: $,
|
|
10469
10477
|
groupBy: J,
|
|
10470
10478
|
granularity: l,
|
|
@@ -10474,44 +10482,44 @@ function Tf() {
|
|
|
10474
10482
|
accountIds: L.accountIds.join(","),
|
|
10475
10483
|
filterTagKey: L.tagKey || void 0,
|
|
10476
10484
|
tagValues: L.tagValues.join(",")
|
|
10477
|
-
}),
|
|
10485
|
+
}), de = async (L = "") => {
|
|
10478
10486
|
k(!0);
|
|
10479
10487
|
try {
|
|
10480
|
-
const
|
|
10481
|
-
if (ee(
|
|
10482
|
-
const $ = await
|
|
10488
|
+
const I = D || await ie.getDataStatus();
|
|
10489
|
+
if (ee(I), !I.ready) return;
|
|
10490
|
+
const $ = await ie.getFilterOptions({ start: n, end: i, filterTagKey: L || void 0 });
|
|
10483
10491
|
m((J) => L ? { ...J, tagValues: $.tagValues } : $), !L && $.tagKeys.length && !$.tagKeys.includes(f) && u($.tagKeys[0]);
|
|
10484
|
-
} catch (
|
|
10485
|
-
O(
|
|
10492
|
+
} catch (I) {
|
|
10493
|
+
O(I?.response?.data?.error || I.message || "Failed to load filter values");
|
|
10486
10494
|
} finally {
|
|
10487
10495
|
k(!1);
|
|
10488
10496
|
}
|
|
10489
|
-
}, fe = async (L = x,
|
|
10497
|
+
}, fe = async (L = x, I = s, $ = e) => {
|
|
10490
10498
|
const J = ++V.current;
|
|
10491
|
-
|
|
10499
|
+
_(!0), O(null), S(null), N(null);
|
|
10492
10500
|
try {
|
|
10493
|
-
const G = await
|
|
10501
|
+
const G = await ie.getDataStatus();
|
|
10494
10502
|
if (J === V.current && ee(G), !G.ready) return;
|
|
10495
|
-
if (
|
|
10496
|
-
const
|
|
10497
|
-
|
|
10498
|
-
|
|
10503
|
+
if (I === "compare") {
|
|
10504
|
+
const ue = Gn(i, l), [be, ne] = await Promise.all([
|
|
10505
|
+
ie.getReports(Y(L, ue.currentStart, ue.currentEnd, $)),
|
|
10506
|
+
ie.getReports(Y(L, ue.previousStart, ue.previousEnd, $))
|
|
10499
10507
|
]);
|
|
10500
|
-
J === V.current && (S(be), N({ current: be, previous:
|
|
10508
|
+
J === V.current && (S(be), N({ current: be, previous: ne, ...ue }));
|
|
10501
10509
|
} else {
|
|
10502
|
-
const
|
|
10503
|
-
J === V.current && S(
|
|
10510
|
+
const ue = await ie.getReports(Y(L, n, i, $));
|
|
10511
|
+
J === V.current && S(ue);
|
|
10504
10512
|
}
|
|
10505
10513
|
} catch (G) {
|
|
10506
10514
|
J === V.current && O(G?.response?.data?.error || G.message || "Failed to generate cost report");
|
|
10507
10515
|
} finally {
|
|
10508
|
-
J === V.current &&
|
|
10516
|
+
J === V.current && _(!1);
|
|
10509
10517
|
}
|
|
10510
10518
|
};
|
|
10511
|
-
return
|
|
10519
|
+
return Me(() => {
|
|
10512
10520
|
fe(x, s, e);
|
|
10513
|
-
}, [e, s]),
|
|
10514
|
-
|
|
10521
|
+
}, [e, s]), Me(() => {
|
|
10522
|
+
de();
|
|
10515
10523
|
}, []), {
|
|
10516
10524
|
groupBy: e,
|
|
10517
10525
|
mode: s,
|
|
@@ -10523,9 +10531,9 @@ function Tf() {
|
|
|
10523
10531
|
draftFilters: p,
|
|
10524
10532
|
report: y,
|
|
10525
10533
|
comparison: w,
|
|
10526
|
-
loading:
|
|
10534
|
+
loading: j,
|
|
10527
10535
|
filtersLoading: R,
|
|
10528
|
-
error:
|
|
10536
|
+
error: M,
|
|
10529
10537
|
dataStatus: D,
|
|
10530
10538
|
comparedRows: Z,
|
|
10531
10539
|
selectedComparisonPeriods: Q,
|
|
@@ -10535,25 +10543,25 @@ function Tf() {
|
|
|
10535
10543
|
setReportTagKey: u,
|
|
10536
10544
|
setDraftFilters: g,
|
|
10537
10545
|
changeGroup: (L) => {
|
|
10538
|
-
L !== e && (
|
|
10546
|
+
L !== e && (_(!0), S(null), N(null), t(L));
|
|
10539
10547
|
},
|
|
10540
10548
|
changeMode: (L) => {
|
|
10541
|
-
L !== s && (
|
|
10549
|
+
L !== s && (_(!0), S(null), N(null), r(L));
|
|
10542
10550
|
},
|
|
10543
10551
|
applyFilters: () => {
|
|
10544
10552
|
const L = { ...p, services: [...p.services], regions: [...p.regions], accountIds: [...p.accountIds], tagValues: [...p.tagValues] };
|
|
10545
10553
|
b(L), fe(L);
|
|
10546
10554
|
},
|
|
10547
10555
|
resetFilters: () => {
|
|
10548
|
-
g(
|
|
10556
|
+
g(Dt), b(Dt), fe(Dt);
|
|
10549
10557
|
},
|
|
10550
10558
|
runReport: () => {
|
|
10551
|
-
|
|
10559
|
+
de(), fe();
|
|
10552
10560
|
},
|
|
10553
|
-
loadOptions:
|
|
10561
|
+
loadOptions: de
|
|
10554
10562
|
};
|
|
10555
10563
|
}
|
|
10556
|
-
function
|
|
10564
|
+
function Lf(e) {
|
|
10557
10565
|
const { report: t, comparison: s, rows: r, groupBy: n, mode: o, start: i, end: c } = e, l = ct[n];
|
|
10558
10566
|
let d, f;
|
|
10559
10567
|
o === "compare" && s ? (d = [[l.item, "Current Cost", "Previous Cost", "Difference", "Change %"].join(","), ...r.map((h) => [`"${h.label.replace(/"/g, '""')}"`, h.current?.amount || 0, h.previous?.amount || 0, h.difference, h.change.toFixed(2)].join(","))].join(`
|
|
@@ -10562,25 +10570,25 @@ function Af(e) {
|
|
|
10562
10570
|
const u = document.createElement("a");
|
|
10563
10571
|
u.href = URL.createObjectURL(new Blob([d], { type: "text/csv" })), u.download = f, u.click(), URL.revokeObjectURL(u.href);
|
|
10564
10572
|
}
|
|
10565
|
-
async function
|
|
10573
|
+
async function If(e) {
|
|
10566
10574
|
const { report: t, comparison: s, rows: r, groupBy: n, mode: o, start: i, end: c, granularity: l } = e, d = ct[n], [{ jsPDF: f }, { default: u }] = await Promise.all([import("./jspdf.es.min-6LRJ71fx.js").then((g) => g.j), import("./jspdf.plugin.autotable-CogKBV4l.js")]), h = new f({ orientation: "landscape", unit: "pt", format: "a4" }), m = (g, x, b) => {
|
|
10567
10575
|
h.setFontSize(7), h.setTextColor(100), h.text(`Report generated · All costs in ${t.currency} · ${x} to ${b}`, 40, h.internal.pageSize.height - 18), h.text(`Page ${g.pageNumber}`, h.internal.pageSize.width - 70, h.internal.pageSize.height - 18);
|
|
10568
10576
|
};
|
|
10569
10577
|
if (o === "compare" && s) {
|
|
10570
|
-
h.setFontSize(18), h.setTextColor(25), h.text("Comparison Report", 40, 42), h.setFontSize(9), h.setTextColor(98, 86, 230), h.text("TOTAL COST", 40, 66), h.setTextColor(40), h.text(`Previous Cost: ${s.previous.totalCost}`, 40, 82), h.text(`Current Cost: ${s.current.totalCost}`, 220, 82), h.text(`Granularity: ${l}`, 400, 82), u(h, { startY: 100, head: [[`${d.item} Name`, "Current Cost", "Previous Cost", "Current Period", "Previous Period", "Change %", "Current Accounts", "Previous Accounts", "Current Regions", "Previous Regions"]], body: r.map((g) => [g.label, g.current?.amount?.toFixed(2) || "0.00", g.previous?.amount?.toFixed(2) || "0.00",
|
|
10578
|
+
h.setFontSize(18), h.setTextColor(25), h.text("Comparison Report", 40, 42), h.setFontSize(9), h.setTextColor(98, 86, 230), h.text("TOTAL COST", 40, 66), h.setTextColor(40), h.text(`Previous Cost: ${s.previous.totalCost}`, 40, 82), h.text(`Current Cost: ${s.current.totalCost}`, 220, 82), h.text(`Granularity: ${l}`, 400, 82), u(h, { startY: 100, head: [[`${d.item} Name`, "Current Cost", "Previous Cost", "Current Period", "Previous Period", "Change %", "Current Accounts", "Previous Accounts", "Current Regions", "Previous Regions"]], body: r.map((g) => [g.label, g.current?.amount?.toFixed(2) || "0.00", g.previous?.amount?.toFixed(2) || "0.00", Nt(s.currentStart, s.currentEnd, l), Nt(s.previousStart, s.previousEnd, l), `${g.change.toFixed(4)}%`, Qe(g.current?.accounts), Qe(g.previous?.accounts), Qe(g.current?.regions), Qe(g.previous?.regions)]), styles: { fontSize: 6, cellPadding: 3, overflow: "linebreak" }, headStyles: { fillColor: [242, 237, 255], textColor: [82, 35, 190] }, didDrawPage: (g) => m(g, s.previousStart, s.currentEnd), margin: { bottom: 32 } }), h.save(`comparison-report-${n}-${Date.now()}.pdf`);
|
|
10571
10579
|
return;
|
|
10572
10580
|
}
|
|
10573
10581
|
h.setFontSize(18), h.setTextColor(25), h.text(d.pdfTitle, 40, 42), h.setFontSize(9), h.setTextColor(98, 86, 230), h.text("REPORT METADATA", 40, 66), h.setTextColor(40), h.text(`Tenant ID: ${t.tenantId || "Current tenant"}`, 40, 82), h.text(`Date Range: ${i} to ${c}`, 40, 97), h.text(`Accrued Total Cost: ${K(t.totalCost, t.currency)}`, 40, 112), h.setTextColor(98, 86, 230), h.text("COST SUMMARY BREAKDOWN", 40, 136);
|
|
10574
10582
|
const p = n === "account";
|
|
10575
10583
|
u(h, { startY: 146, head: [p ? ["Account ID", "Account Name", "Total Cost", "Percentage", "Regions"] : [`${d.item} Name`, "Total Cost", "Percentage", "Accounts", "Regions"]], body: t.summary.map((g) => p ? [g.accountId || g.key || "—", g.label, K(g.amount, t.currency), `${(g.percentage || 0).toFixed(2)}%`, Qe(g.regions)] : [g.label, K(g.amount, t.currency), `${(g.percentage || 0).toFixed(2)}%`, Qe(g.accounts), Qe(g.regions)]), styles: { fontSize: 7, cellPadding: 4, overflow: "linebreak" }, headStyles: { fillColor: [242, 237, 255], textColor: [82, 35, 190] }, didDrawPage: (g) => m(g, i, c), margin: { bottom: 32 } }), h.save(`${n}-summary-report-${Date.now()}.pdf`);
|
|
10576
10584
|
}
|
|
10577
|
-
function
|
|
10578
|
-
const e =
|
|
10579
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () => x && void
|
|
10585
|
+
function Mf() {
|
|
10586
|
+
const e = Of(), { groupBy: t, mode: s, report: r, comparison: n, comparedRows: o, loading: i, error: c, dataStatus: l, granularity: d, start: f, end: u } = e, h = ct[t], m = r?.summary[0], p = n ? n.current.totalCost - n.previous.totalCost : 0, g = n?.previous.totalCost ? p / Math.abs(n.previous.totalCost) * 100 : 0, x = r ? { report: r, comparison: n, rows: o, groupBy: t, mode: s, start: f, end: u, granularity: d } : null, b = /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2", children: [
|
|
10587
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => x && void If(x), disabled: !x || i, className: "flex items-center gap-2 rounded-md border bg-card px-3 py-1.5 text-sm disabled:opacity-50", children: [
|
|
10580
10588
|
/* @__PURE__ */ a.jsx(su, { className: "h-4 w-4" }),
|
|
10581
10589
|
"PDF"
|
|
10582
10590
|
] }),
|
|
10583
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () => x &&
|
|
10591
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => x && Lf(x), disabled: !x || i, className: "flex items-center gap-2 rounded-md border bg-card px-3 py-1.5 text-sm disabled:opacity-50", children: [
|
|
10584
10592
|
/* @__PURE__ */ a.jsx(Ar, { className: "h-4 w-4" }),
|
|
10585
10593
|
"CSV"
|
|
10586
10594
|
] })
|
|
@@ -10601,7 +10609,7 @@ function Lf() {
|
|
|
10601
10609
|
/* @__PURE__ */ a.jsx(ut, { className: "h-4 w-4" }),
|
|
10602
10610
|
c
|
|
10603
10611
|
] }),
|
|
10604
|
-
i ? /* @__PURE__ */ a.jsx(
|
|
10612
|
+
i ? /* @__PURE__ */ a.jsx(Cf, {}) : s === "compare" && n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10605
10613
|
/* @__PURE__ */ a.jsxs("section", { className: "rounded-xl bg-primary/5 p-4", children: [
|
|
10606
10614
|
/* @__PURE__ */ a.jsxs("div", { className: "mb-4 flex flex-wrap items-start justify-between gap-4", children: [
|
|
10607
10615
|
/* @__PURE__ */ a.jsxs("div", { children: [
|
|
@@ -10614,14 +10622,14 @@ function Lf() {
|
|
|
10614
10622
|
b
|
|
10615
10623
|
] }),
|
|
10616
10624
|
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-4", children: [
|
|
10617
|
-
/* @__PURE__ */ a.jsx(
|
|
10618
|
-
/* @__PURE__ */ a.jsx(
|
|
10619
|
-
/* @__PURE__ */ a.jsx(
|
|
10620
|
-
/* @__PURE__ */ a.jsx(
|
|
10625
|
+
/* @__PURE__ */ a.jsx(Ie, { label: "Period accrued total", value: `${K(n.current.totalCost, n.current.currency)} vs ${K(n.previous.totalCost, n.previous.currency)}`, helper: `${g >= 0 ? "+" : ""}${g.toFixed(1)}% from previous period`, trend: g }),
|
|
10626
|
+
/* @__PURE__ */ a.jsx(Ie, { label: Nt(n.currentStart, n.currentEnd, d), value: K(n.current.totalCost, n.current.currency), helper: "Current period spending" }),
|
|
10627
|
+
/* @__PURE__ */ a.jsx(Ie, { label: Nt(n.previousStart, n.previousEnd, d), value: K(n.previous.totalCost, n.previous.currency), helper: "Previous period spending" }),
|
|
10628
|
+
/* @__PURE__ */ a.jsx(Ie, { label: d === "monthly" ? "Monthly change" : "Period change", value: `${p >= 0 ? "+" : ""}${K(p, n.current.currency)}`, helper: `${g >= 0 ? "+" : ""}${g.toFixed(1)}% from previous period`, trend: p })
|
|
10621
10629
|
] })
|
|
10622
10630
|
] }),
|
|
10623
|
-
/* @__PURE__ */ a.jsx(
|
|
10624
|
-
/* @__PURE__ */ a.jsx(
|
|
10631
|
+
/* @__PURE__ */ a.jsx(Nf, { rows: o, currency: n.current.currency }),
|
|
10632
|
+
/* @__PURE__ */ a.jsx(Tf, { rows: o, groupBy: t, comparison: n, granularity: d })
|
|
10625
10633
|
] }) : r ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10626
10634
|
r.message && /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 rounded-lg border bg-muted/50 p-3 text-sm text-muted-foreground", children: [
|
|
10627
10635
|
/* @__PURE__ */ a.jsx(ut, { className: "h-4 w-4" }),
|
|
@@ -10639,20 +10647,20 @@ function Lf() {
|
|
|
10639
10647
|
b
|
|
10640
10648
|
] }),
|
|
10641
10649
|
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
10642
|
-
/* @__PURE__ */ a.jsx(
|
|
10643
|
-
/* @__PURE__ */ a.jsx(
|
|
10644
|
-
/* @__PURE__ */ a.jsx(
|
|
10650
|
+
/* @__PURE__ */ a.jsx(Ie, { label: "Accrued cost", value: K(r.totalCost, r.currency) }),
|
|
10651
|
+
/* @__PURE__ */ a.jsx(Ie, { label: h.top, value: m ? K(m.amount, r.currency) : "-", accent: !0 }),
|
|
10652
|
+
/* @__PURE__ */ a.jsx(Ie, { label: h.count, value: String(r.count || 0), accent: !0 })
|
|
10645
10653
|
] })
|
|
10646
10654
|
] }),
|
|
10647
|
-
/* @__PURE__ */ a.jsxs(
|
|
10655
|
+
/* @__PURE__ */ a.jsxs(ce, { children: [
|
|
10648
10656
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx(Ne, { className: "text-sm", children: "Cost Trend" }) }),
|
|
10649
|
-
/* @__PURE__ */ a.jsx(
|
|
10657
|
+
/* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsx(jf, { timeline: r.timeline || [], currency: r.currency || "USD", daily: d === "daily" }) })
|
|
10650
10658
|
] }),
|
|
10651
|
-
/* @__PURE__ */ a.jsx(
|
|
10659
|
+
/* @__PURE__ */ a.jsx(Pf, { groupBy: t, report: r })
|
|
10652
10660
|
] }) : null
|
|
10653
10661
|
] }),
|
|
10654
10662
|
/* @__PURE__ */ a.jsx(
|
|
10655
|
-
|
|
10663
|
+
Af,
|
|
10656
10664
|
{
|
|
10657
10665
|
mode: s,
|
|
10658
10666
|
groupBy: t,
|
|
@@ -10690,12 +10698,12 @@ const Yn = {
|
|
|
10690
10698
|
WAITING_FOR_TABLE: "bg-amber-500/10 text-amber-600 border-amber-500/30",
|
|
10691
10699
|
FAILED: "bg-destructive/10 text-destructive border-destructive/30",
|
|
10692
10700
|
PENDING: "bg-muted text-muted-foreground border-border"
|
|
10693
|
-
},
|
|
10701
|
+
}, Df = {
|
|
10694
10702
|
INFO: "text-muted-foreground",
|
|
10695
10703
|
WARN: "text-amber-600",
|
|
10696
10704
|
ERROR: "text-destructive"
|
|
10697
10705
|
}, cs = (e) => e ? new Date(e).toLocaleString() : "—";
|
|
10698
|
-
function
|
|
10706
|
+
function Ff({ status: e }) {
|
|
10699
10707
|
return /* @__PURE__ */ a.jsx("span", { className: `rounded-full border px-2 py-0.5 text-xs font-medium ${Yn[e] || Yn.PENDING}`, children: e.replace(/_/g, " ") });
|
|
10700
10708
|
}
|
|
10701
10709
|
function Ue({ label: e, value: t, mono: s }) {
|
|
@@ -10704,11 +10712,11 @@ function Ue({ label: e, value: t, mono: s }) {
|
|
|
10704
10712
|
/* @__PURE__ */ a.jsx("span", { className: `break-all text-sm ${s ? "font-mono text-xs" : ""}`, children: t || "—" })
|
|
10705
10713
|
] });
|
|
10706
10714
|
}
|
|
10707
|
-
function
|
|
10715
|
+
function Uf() {
|
|
10708
10716
|
const [e, t] = U([]), [s, r] = U([]), [n, o] = U(!0), [i, c] = U(null), l = Ut(async () => {
|
|
10709
10717
|
o(!0), c(null);
|
|
10710
10718
|
try {
|
|
10711
|
-
const d = await
|
|
10719
|
+
const d = await re.get("/cur-discovery", { params: { logLimit: 100 } });
|
|
10712
10720
|
t(d.data?.jobs || []), r(d.data?.logs || []);
|
|
10713
10721
|
} catch (d) {
|
|
10714
10722
|
c(d?.response?.data?.error || d?.message || "Unable to load CUR discovery status");
|
|
@@ -10716,7 +10724,7 @@ function Df() {
|
|
|
10716
10724
|
o(!1);
|
|
10717
10725
|
}
|
|
10718
10726
|
}, []);
|
|
10719
|
-
return
|
|
10727
|
+
return Me(() => {
|
|
10720
10728
|
l();
|
|
10721
10729
|
}, [l]), /* @__PURE__ */ a.jsxs("div", { className: "flex w-full flex-col gap-6 p-2 md:p-6", children: [
|
|
10722
10730
|
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-4", children: [
|
|
@@ -10729,21 +10737,21 @@ function Df() {
|
|
|
10729
10737
|
] }),
|
|
10730
10738
|
/* @__PURE__ */ a.jsx("button", { onClick: () => {
|
|
10731
10739
|
l();
|
|
10732
|
-
}, disabled: n, className: "rounded-lg border p-2 hover:bg-muted disabled:opacity-50", "aria-label": "Refresh", children: /* @__PURE__ */ a.jsx(
|
|
10740
|
+
}, disabled: n, className: "rounded-lg border p-2 hover:bg-muted disabled:opacity-50", "aria-label": "Refresh", children: /* @__PURE__ */ a.jsx(jt, { className: `h-4 w-4 ${n ? "animate-spin" : ""}` }) })
|
|
10733
10741
|
] }),
|
|
10734
10742
|
i && /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive", children: [
|
|
10735
10743
|
/* @__PURE__ */ a.jsx(ut, { className: "h-4 w-4" }),
|
|
10736
10744
|
i
|
|
10737
10745
|
] }),
|
|
10738
|
-
!n && !i && !e.length && /* @__PURE__ */ a.jsx(
|
|
10739
|
-
e.map((d) => /* @__PURE__ */ a.jsxs(
|
|
10746
|
+
!n && !i && !e.length && /* @__PURE__ */ a.jsx(ce, { children: /* @__PURE__ */ a.jsx(le, { className: "py-10 text-center text-sm text-muted-foreground", children: "No discovery job exists for this tenant yet. One is created automatically once the AWS connection is verified and the Cost plugin is entitled." }) }),
|
|
10747
|
+
e.map((d) => /* @__PURE__ */ a.jsxs(ce, { children: [
|
|
10740
10748
|
/* @__PURE__ */ a.jsxs(ve, { className: "flex flex-row flex-wrap items-center gap-3", children: [
|
|
10741
10749
|
/* @__PURE__ */ a.jsx(ra, { className: "h-4 w-4 text-primary" }),
|
|
10742
10750
|
/* @__PURE__ */ a.jsxs(Ne, { className: "text-sm", children: [
|
|
10743
10751
|
"Connection ",
|
|
10744
10752
|
d.connectionId
|
|
10745
10753
|
] }),
|
|
10746
|
-
/* @__PURE__ */ a.jsx(
|
|
10754
|
+
/* @__PURE__ */ a.jsx(Ff, { status: d.status }),
|
|
10747
10755
|
/* @__PURE__ */ a.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
10748
10756
|
"attempt ",
|
|
10749
10757
|
d.attemptCount
|
|
@@ -10753,7 +10761,7 @@ function Df() {
|
|
|
10753
10761
|
cs(d.nextRunAt)
|
|
10754
10762
|
] })
|
|
10755
10763
|
] }),
|
|
10756
|
-
/* @__PURE__ */ a.jsxs(
|
|
10764
|
+
/* @__PURE__ */ a.jsxs(le, { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3", children: [
|
|
10757
10765
|
/* @__PURE__ */ a.jsx(Ue, { label: "Source", value: d.curS3Uri || `s3://${d.bucket}/${d.prefix}`, mono: !0 }),
|
|
10758
10766
|
/* @__PURE__ */ a.jsx(Ue, { label: "Tenant partition", value: d.tenantPartition, mono: !0 }),
|
|
10759
10767
|
/* @__PURE__ */ a.jsx(Ue, { label: "Region", value: d.region }),
|
|
@@ -10766,9 +10774,9 @@ function Df() {
|
|
|
10766
10774
|
d.lastError && /* @__PURE__ */ a.jsx("div", { className: "md:col-span-2 lg:col-span-3 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive", children: d.lastError })
|
|
10767
10775
|
] })
|
|
10768
10776
|
] }, d.id)),
|
|
10769
|
-
e.length > 0 && /* @__PURE__ */ a.jsxs(
|
|
10777
|
+
e.length > 0 && /* @__PURE__ */ a.jsxs(ce, { children: [
|
|
10770
10778
|
/* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx(Ne, { className: "text-sm", children: "Recent activity" }) }),
|
|
10771
|
-
/* @__PURE__ */ a.jsx(
|
|
10779
|
+
/* @__PURE__ */ a.jsx(le, { children: s.length ? /* @__PURE__ */ a.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a.jsxs("table", { className: "w-full text-sm", children: [
|
|
10772
10780
|
/* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { className: "border-b text-left text-xs uppercase text-muted-foreground", children: [
|
|
10773
10781
|
/* @__PURE__ */ a.jsx("th", { className: "py-2 pe-4 font-medium", children: "Time" }),
|
|
10774
10782
|
/* @__PURE__ */ a.jsx("th", { className: "py-2 pe-4 font-medium", children: "Level" }),
|
|
@@ -10777,7 +10785,7 @@ function Df() {
|
|
|
10777
10785
|
] }) }),
|
|
10778
10786
|
/* @__PURE__ */ a.jsx("tbody", { children: s.map((d) => /* @__PURE__ */ a.jsxs("tr", { className: "border-b last:border-0 align-top", children: [
|
|
10779
10787
|
/* @__PURE__ */ a.jsx("td", { className: "whitespace-nowrap py-2 pe-4 text-xs text-muted-foreground", children: cs(d.createdAt) }),
|
|
10780
|
-
/* @__PURE__ */ a.jsx("td", { className: `py-2 pe-4 text-xs font-medium ${
|
|
10788
|
+
/* @__PURE__ */ a.jsx("td", { className: `py-2 pe-4 text-xs font-medium ${Df[d.level] || ""}`, children: d.level }),
|
|
10781
10789
|
/* @__PURE__ */ a.jsx("td", { className: "whitespace-nowrap py-2 pe-4 font-mono text-xs", children: d.event }),
|
|
10782
10790
|
/* @__PURE__ */ a.jsx("td", { className: "py-2", children: d.message })
|
|
10783
10791
|
] }, d.id)) })
|
|
@@ -10785,19 +10793,19 @@ function Df() {
|
|
|
10785
10793
|
] })
|
|
10786
10794
|
] });
|
|
10787
10795
|
}
|
|
10788
|
-
const
|
|
10789
|
-
function
|
|
10796
|
+
const $f = "https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/template", Bf = (e) => e === "CONNECTED" ? "border-emerald-500/30 bg-emerald-500/10 text-emerald-600" : e === "FAILED" ? "border-destructive/30 bg-destructive/10 text-destructive" : "border-amber-500/30 bg-amber-500/10 text-amber-700", ls = (e) => e?.response?.data?.error || e?.response?.data?.message || e?.message || "Request failed";
|
|
10797
|
+
function zf() {
|
|
10790
10798
|
const [e, t] = U([]), [s, r] = U(!0), [n, o] = U(!1), [i, c] = U(""), [l, d] = U(!1), [f, u] = U(null), [h, m] = U(null), [p, g] = U(null), x = Ut(async () => {
|
|
10791
10799
|
r(!0), g(null);
|
|
10792
10800
|
try {
|
|
10793
|
-
t((await
|
|
10801
|
+
t((await ie.getSources()).sources || []);
|
|
10794
10802
|
} catch (w) {
|
|
10795
10803
|
g(ls(w));
|
|
10796
10804
|
} finally {
|
|
10797
10805
|
r(!1);
|
|
10798
10806
|
}
|
|
10799
10807
|
}, []);
|
|
10800
|
-
|
|
10808
|
+
Me(() => {
|
|
10801
10809
|
x();
|
|
10802
10810
|
}, [x]);
|
|
10803
10811
|
const b = async (w) => {
|
|
@@ -10807,7 +10815,7 @@ function $f() {
|
|
|
10807
10815
|
}
|
|
10808
10816
|
m("create"), g(null);
|
|
10809
10817
|
try {
|
|
10810
|
-
const N = await
|
|
10818
|
+
const N = await ie.createSource({ managementAccountId: i, regionMode: l ? "ALL" : "SINGLE" });
|
|
10811
10819
|
u(N.connectionId), o(!1), c(""), d(!1), await x();
|
|
10812
10820
|
} catch (N) {
|
|
10813
10821
|
g(ls(N));
|
|
@@ -10817,8 +10825,8 @@ function $f() {
|
|
|
10817
10825
|
}, y = async (w) => {
|
|
10818
10826
|
m(`download-${w}`), g(null);
|
|
10819
10827
|
try {
|
|
10820
|
-
const N = await
|
|
10821
|
-
|
|
10828
|
+
const N = await ie.downloadSourceTemplate(w), j = URL.createObjectURL(N), _ = document.createElement("a");
|
|
10829
|
+
_.href = j, _.download = `meyi-connect-cost-${w}.yaml`, _.click(), URL.revokeObjectURL(j), u(w);
|
|
10822
10830
|
} catch (N) {
|
|
10823
10831
|
g(ls(N));
|
|
10824
10832
|
} finally {
|
|
@@ -10827,7 +10835,7 @@ function $f() {
|
|
|
10827
10835
|
}, S = async (w) => {
|
|
10828
10836
|
m(`verify-${w}`), g(null);
|
|
10829
10837
|
try {
|
|
10830
|
-
const N = await
|
|
10838
|
+
const N = await ie.verifySource(w);
|
|
10831
10839
|
N.status === "FAILED" && g(N.message || "AWS connection verification failed"), await x();
|
|
10832
10840
|
} catch (N) {
|
|
10833
10841
|
g(ls(N));
|
|
@@ -10847,7 +10855,7 @@ function $f() {
|
|
|
10847
10855
|
/* @__PURE__ */ a.jsxs("div", { className: "flex gap-2", children: [
|
|
10848
10856
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
|
|
10849
10857
|
x();
|
|
10850
|
-
}, disabled: s, className: "rounded-md border p-2 hover:bg-muted disabled:opacity-50", "aria-label": "Refresh sources", title: "Refresh sources", children: /* @__PURE__ */ a.jsx(
|
|
10858
|
+
}, disabled: s, className: "rounded-md border p-2 hover:bg-muted disabled:opacity-50", "aria-label": "Refresh sources", title: "Refresh sources", children: /* @__PURE__ */ a.jsx(jt, { className: `h-4 w-4 ${s ? "animate-spin" : ""}` }) }),
|
|
10851
10859
|
/* @__PURE__ */ a.jsxs("button", { type: "button", onClick: () => {
|
|
10852
10860
|
g(null), o(!0);
|
|
10853
10861
|
}, className: "flex items-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:opacity-90", children: [
|
|
@@ -10882,18 +10890,18 @@ function $f() {
|
|
|
10882
10890
|
w.regionMode
|
|
10883
10891
|
] }),
|
|
10884
10892
|
/* @__PURE__ */ a.jsxs("td", { className: "px-4 py-3", children: [
|
|
10885
|
-
/* @__PURE__ */ a.jsx("span", { className: `rounded-full border px-2 py-1 text-xs font-medium ${
|
|
10893
|
+
/* @__PURE__ */ a.jsx("span", { className: `rounded-full border px-2 py-1 text-xs font-medium ${Bf(w.status)}`, children: w.status.replace(/_/g, " ") }),
|
|
10886
10894
|
w.stackSetStatus && /* @__PURE__ */ a.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: w.stackSetStatus.replace(/_/g, " ") })
|
|
10887
10895
|
] }),
|
|
10888
10896
|
/* @__PURE__ */ a.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ a.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10889
10897
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
|
|
10890
10898
|
y(w.connectionId);
|
|
10891
|
-
}, disabled: !!h, className: "rounded-md border p-2 hover:bg-muted disabled:opacity-50", title: "Download CloudFormation template", "aria-label": "Download CloudFormation template", children: h === `download-${w.connectionId}` ? /* @__PURE__ */ a.jsx(
|
|
10892
|
-
/* @__PURE__ */ a.jsx("a", { href:
|
|
10899
|
+
}, disabled: !!h, className: "rounded-md border p-2 hover:bg-muted disabled:opacity-50", title: "Download CloudFormation template", "aria-label": "Download CloudFormation template", children: h === `download-${w.connectionId}` ? /* @__PURE__ */ a.jsx(vt, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ a.jsx(Ar, { className: "h-4 w-4" }) }),
|
|
10900
|
+
/* @__PURE__ */ a.jsx("a", { href: $f, target: "_blank", rel: "noreferrer", className: "rounded-md border p-2 hover:bg-muted", title: "Open AWS CloudFormation", "aria-label": "Open AWS CloudFormation", children: /* @__PURE__ */ a.jsx(oa, { className: "h-4 w-4" }) }),
|
|
10893
10901
|
/* @__PURE__ */ a.jsxs("button", { type: "button", onClick: () => {
|
|
10894
10902
|
S(w.connectionId);
|
|
10895
10903
|
}, disabled: !!h || w.status === "CONNECTED", className: "flex items-center gap-2 rounded-md border px-3 py-2 font-medium hover:bg-muted disabled:opacity-50", children: [
|
|
10896
|
-
h === `verify-${w.connectionId}` ? /* @__PURE__ */ a.jsx(
|
|
10904
|
+
h === `verify-${w.connectionId}` ? /* @__PURE__ */ a.jsx(vt, { className: "h-4 w-4 animate-spin" }) : w.status === "CONNECTED" ? /* @__PURE__ */ a.jsx(Gd, { className: "h-4 w-4 text-emerald-600" }) : /* @__PURE__ */ a.jsx(jt, { className: "h-4 w-4" }),
|
|
10897
10905
|
w.status === "CONNECTED" ? "Connected" : "Verify"
|
|
10898
10906
|
] })
|
|
10899
10907
|
] }) })
|
|
@@ -10918,17 +10926,17 @@ function $f() {
|
|
|
10918
10926
|
/* @__PURE__ */ a.jsxs("div", { className: "mt-5 flex justify-end gap-2", children: [
|
|
10919
10927
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => o(!1), className: "rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted", children: "Cancel" }),
|
|
10920
10928
|
/* @__PURE__ */ a.jsxs("button", { type: "submit", disabled: h === "create" || i.length !== 12, className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50", children: [
|
|
10921
|
-
h === "create" && /* @__PURE__ */ a.jsx(
|
|
10929
|
+
h === "create" && /* @__PURE__ */ a.jsx(vt, { className: "h-4 w-4 animate-spin" }),
|
|
10922
10930
|
"Create source"
|
|
10923
10931
|
] })
|
|
10924
10932
|
] })
|
|
10925
10933
|
] }) })
|
|
10926
10934
|
] });
|
|
10927
10935
|
}
|
|
10928
|
-
const _a = Ta("user"),
|
|
10929
|
-
function
|
|
10936
|
+
const _a = Ta("user"), Vf = _a.Provider, Wf = () => Aa(_a), Hf = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], qf = ["UTC", "Asia/Kolkata", "America/New_York", "America/Los_Angeles", "Europe/London", "Europe/Berlin", "Asia/Singapore", "Asia/Tokyo", "Australia/Sydney"];
|
|
10937
|
+
function Gf({ open: e, schedule: t, saving: s, onClose: r, onSave: n }) {
|
|
10930
10938
|
const [o, i] = U(t);
|
|
10931
|
-
if (
|
|
10939
|
+
if (Me(() => i(t), [t, e]), !e) return null;
|
|
10932
10940
|
const c = (l) => i((d) => ({ ...d, frequency: l }));
|
|
10933
10941
|
return /* @__PURE__ */ a.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4", role: "presentation", onMouseDown: (l) => {
|
|
10934
10942
|
l.target === l.currentTarget && r();
|
|
@@ -10965,12 +10973,12 @@ function Hf({ open: e, schedule: t, saving: s, onClose: r, onSave: n }) {
|
|
|
10965
10973
|
] }),
|
|
10966
10974
|
/* @__PURE__ */ a.jsxs("label", { className: "text-sm font-medium", children: [
|
|
10967
10975
|
"Timezone",
|
|
10968
|
-
/* @__PURE__ */ a.jsx("select", { value: o.timezone, onChange: (l) => i((d) => ({ ...d, timezone: l.target.value })), className: "mt-2 block h-10 w-full rounded-lg border bg-background px-3 font-normal", children: [.../* @__PURE__ */ new Set([o.timezone, ...
|
|
10976
|
+
/* @__PURE__ */ a.jsx("select", { value: o.timezone, onChange: (l) => i((d) => ({ ...d, timezone: l.target.value })), className: "mt-2 block h-10 w-full rounded-lg border bg-background px-3 font-normal", children: [.../* @__PURE__ */ new Set([o.timezone, ...qf])].map((l) => /* @__PURE__ */ a.jsx("option", { children: l }, l)) })
|
|
10969
10977
|
] })
|
|
10970
10978
|
] }),
|
|
10971
10979
|
o.frequency === "weekly" && /* @__PURE__ */ a.jsxs("label", { className: "block text-sm font-medium", children: [
|
|
10972
10980
|
"Day of week",
|
|
10973
|
-
/* @__PURE__ */ a.jsx("select", { value: o.dayOfWeek ?? 1, onChange: (l) => i((d) => ({ ...d, dayOfWeek: Number(l.target.value) })), className: "mt-2 block h-10 w-full rounded-lg border bg-background px-3 font-normal", children:
|
|
10981
|
+
/* @__PURE__ */ a.jsx("select", { value: o.dayOfWeek ?? 1, onChange: (l) => i((d) => ({ ...d, dayOfWeek: Number(l.target.value) })), className: "mt-2 block h-10 w-full rounded-lg border bg-background px-3 font-normal", children: Hf.map((l, d) => /* @__PURE__ */ a.jsx("option", { value: d, children: l }, l)) })
|
|
10974
10982
|
] }),
|
|
10975
10983
|
o.frequency === "monthly" && /* @__PURE__ */ a.jsxs("label", { className: "block text-sm font-medium", children: [
|
|
10976
10984
|
"Day of month",
|
|
@@ -10985,62 +10993,73 @@ function Hf({ open: e, schedule: t, saving: s, onClose: r, onSave: n }) {
|
|
|
10985
10993
|
] })
|
|
10986
10994
|
] }) });
|
|
10987
10995
|
}
|
|
10988
|
-
function
|
|
10989
|
-
const [e, t] = U(null), [s, r] = U(null), [n, o] = U(null), [i, c] = U([]), [l, d] = U(!0), [f, u] = U(!1), [h, m] = U(null), p = yr(!0),
|
|
10990
|
-
|
|
10996
|
+
function Kf() {
|
|
10997
|
+
const [e, t] = U(null), [s, r] = U(null), [n, o] = U(null), [i, c] = U([]), [l, d] = U(!0), [f, u] = U(!1), [h, m] = U(null), [p, g] = U(null), x = yr(!0), b = Ut(async (N = !1) => {
|
|
10998
|
+
N || d(!0);
|
|
10991
10999
|
try {
|
|
10992
|
-
const [
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
11000
|
+
const [j, _, R, k] = await Promise.all([
|
|
11001
|
+
ie.getAnalysisStatus(),
|
|
11002
|
+
ie.getDataStatus(),
|
|
11003
|
+
ie.getAnalysisSchedule(),
|
|
11004
|
+
ie.getAnalysisReports()
|
|
10997
11005
|
]);
|
|
10998
|
-
if (!
|
|
10999
|
-
t(
|
|
11000
|
-
} catch (
|
|
11001
|
-
|
|
11006
|
+
if (!x.current) return;
|
|
11007
|
+
t(j), r(_), o(R), c(k), g(null);
|
|
11008
|
+
} catch (j) {
|
|
11009
|
+
x.current && g(j?.response?.data?.error || j?.message || "Unable to load scheduled AI reports");
|
|
11002
11010
|
} finally {
|
|
11003
|
-
|
|
11011
|
+
x.current && !N && d(!1);
|
|
11004
11012
|
}
|
|
11005
11013
|
}, []);
|
|
11006
|
-
return
|
|
11007
|
-
|
|
11008
|
-
}), [
|
|
11009
|
-
if (!i.some((
|
|
11010
|
-
const
|
|
11011
|
-
|
|
11014
|
+
return Me(() => (x.current = !0, b(), () => {
|
|
11015
|
+
x.current = !1;
|
|
11016
|
+
}), [b]), Me(() => {
|
|
11017
|
+
if (!i.some((j) => j.status === "PENDING" || j.status === "RUNNING")) return;
|
|
11018
|
+
const N = window.setInterval(() => {
|
|
11019
|
+
b(!0);
|
|
11012
11020
|
}, 15e3);
|
|
11013
|
-
return () => window.clearInterval(
|
|
11014
|
-
}, [
|
|
11015
|
-
u(!0),
|
|
11021
|
+
return () => window.clearInterval(N);
|
|
11022
|
+
}, [b, i]), { status: e, dataStatus: s, schedule: n, reports: i, loading: l, saving: f, removingId: h, error: p, load: b, saveSchedule: async (N) => {
|
|
11023
|
+
u(!0), g(null);
|
|
11016
11024
|
try {
|
|
11017
|
-
const
|
|
11018
|
-
|
|
11019
|
-
} catch (
|
|
11020
|
-
throw
|
|
11025
|
+
const j = await ie.updateAnalysisSchedule(N);
|
|
11026
|
+
x.current && o(j);
|
|
11027
|
+
} catch (j) {
|
|
11028
|
+
throw g(j?.response?.data?.error || j?.message || "Unable to save the AI report schedule"), j;
|
|
11021
11029
|
} finally {
|
|
11022
|
-
|
|
11030
|
+
x.current && u(!1);
|
|
11023
11031
|
}
|
|
11024
|
-
}, download: async (
|
|
11032
|
+
}, download: async (N) => {
|
|
11025
11033
|
try {
|
|
11026
|
-
const
|
|
11027
|
-
|
|
11028
|
-
} catch (
|
|
11029
|
-
|
|
11034
|
+
const j = await ie.downloadAnalysisPdf(N.id), _ = URL.createObjectURL(j), R = document.createElement("a");
|
|
11035
|
+
R.href = _, R.download = `meyi-cost-analysis-${N.period.Start}.pdf`, R.click(), URL.revokeObjectURL(_);
|
|
11036
|
+
} catch (j) {
|
|
11037
|
+
g(j?.response?.data?.error || j?.message || "Unable to download the PDF report");
|
|
11038
|
+
}
|
|
11039
|
+
}, remove: async (N) => {
|
|
11040
|
+
if (window.confirm(`Remove the AI cost report for ${N.period.Start} through ${N.period.End}?`)) {
|
|
11041
|
+
m(N.id), g(null);
|
|
11042
|
+
try {
|
|
11043
|
+
await ie.removeAnalysisReport(N.id), x.current && c((j) => j.filter((_) => _.id !== N.id));
|
|
11044
|
+
} catch (j) {
|
|
11045
|
+
x.current && g(j?.response?.data?.error || j?.message || "Unable to remove the AI report");
|
|
11046
|
+
} finally {
|
|
11047
|
+
x.current && m(null);
|
|
11048
|
+
}
|
|
11030
11049
|
}
|
|
11031
11050
|
} };
|
|
11032
11051
|
}
|
|
11033
|
-
const nr = (e) => e ? new Date(e).toLocaleString() : "Not scheduled",
|
|
11052
|
+
const nr = (e) => e ? new Date(e).toLocaleString() : "Not scheduled", Yf = (e) => (/* @__PURE__ */ new Date(`${e}T00:00:00Z`)).toLocaleDateString(), Jf = (e) => {
|
|
11034
11053
|
const t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
|
|
11035
11054
|
return t.setUTCDate(t.getUTCDate() - 1), t.toLocaleDateString();
|
|
11036
|
-
},
|
|
11055
|
+
}, Xf = {
|
|
11037
11056
|
COMPLETED: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700",
|
|
11038
11057
|
RUNNING: "border-blue-500/30 bg-blue-500/10 text-blue-700",
|
|
11039
11058
|
PENDING: "border-amber-500/30 bg-amber-500/10 text-amber-700",
|
|
11040
11059
|
FAILED: "border-destructive/30 bg-destructive/10 text-destructive"
|
|
11041
11060
|
};
|
|
11042
|
-
function
|
|
11043
|
-
const e =
|
|
11061
|
+
function Zf() {
|
|
11062
|
+
const e = Kf(), t = Wf(), [s, r] = U(!1), n = t.toLowerCase() === "admin";
|
|
11044
11063
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex min-w-0 max-w-full flex-col gap-6 overflow-x-hidden p-2 md:p-6", children: [
|
|
11045
11064
|
/* @__PURE__ */ a.jsxs("header", { className: "flex flex-wrap items-start justify-between gap-4", children: [
|
|
11046
11065
|
/* @__PURE__ */ a.jsxs("div", { children: [
|
|
@@ -11048,12 +11067,12 @@ function Jf() {
|
|
|
11048
11067
|
/* @__PURE__ */ a.jsx(Dn, { className: "h-6 w-6 text-primary" }),
|
|
11049
11068
|
"AI Cost Analysis"
|
|
11050
11069
|
] }),
|
|
11051
|
-
/* @__PURE__ */ a.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Scheduled
|
|
11070
|
+
/* @__PURE__ */ a.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Scheduled Cost reports generated from AWS CUR data" })
|
|
11052
11071
|
] }),
|
|
11053
11072
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
11054
11073
|
/* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
|
|
11055
11074
|
e.load();
|
|
11056
|
-
}, disabled: e.loading, className: "rounded-lg border p-2.5 hover:bg-muted disabled:opacity-50", title: "Refresh reports", "aria-label": "Refresh reports", children: /* @__PURE__ */ a.jsx(
|
|
11075
|
+
}, disabled: e.loading, className: "rounded-lg border p-2.5 hover:bg-muted disabled:opacity-50", title: "Refresh reports", "aria-label": "Refresh reports", children: /* @__PURE__ */ a.jsx(jt, { className: `h-4 w-4 ${e.loading ? "animate-spin" : ""}` }) }),
|
|
11057
11076
|
n && e.schedule && /* @__PURE__ */ a.jsxs("button", { type: "button", onClick: () => r(!0), className: "inline-flex h-10 items-center gap-2 rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground", children: [
|
|
11058
11077
|
/* @__PURE__ */ a.jsx(ca, { className: "h-4 w-4" }),
|
|
11059
11078
|
"Report settings"
|
|
@@ -11064,7 +11083,7 @@ function Jf() {
|
|
|
11064
11083
|
/* @__PURE__ */ a.jsx(ut, { className: "mt-0.5 h-4 w-4 shrink-0" }),
|
|
11065
11084
|
e.error
|
|
11066
11085
|
] }),
|
|
11067
|
-
e.loading ? /* @__PURE__ */ a.jsx("div", { className: "h-72 animate-pulse rounded-lg bg-muted" }) : e.dataStatus && !e.dataStatus.ready ? /* @__PURE__ */ a.jsx(Es, { status: e.dataStatus }) : e.status && !e.status.enabled ? /* @__PURE__ */ a.jsx(
|
|
11086
|
+
e.loading ? /* @__PURE__ */ a.jsx("div", { className: "h-72 animate-pulse rounded-lg bg-muted" }) : e.dataStatus && !e.dataStatus.ready ? /* @__PURE__ */ a.jsx(Es, { status: e.dataStatus }) : e.status && !e.status.enabled ? /* @__PURE__ */ a.jsx(ce, { children: /* @__PURE__ */ a.jsxs(le, { className: "flex min-h-64 flex-col items-center justify-center px-6 text-center", children: [
|
|
11068
11087
|
/* @__PURE__ */ a.jsx(Dn, { className: "h-8 w-8 text-muted-foreground" }),
|
|
11069
11088
|
/* @__PURE__ */ a.jsx("h2", { className: "mt-4 text-base font-semibold", children: e.status.reason === "AI_PROVIDER_REQUIRED" ? "Configure an AI provider" : "AI cost analysis is not enabled" }),
|
|
11070
11089
|
/* @__PURE__ */ a.jsx("p", { className: "mt-2 max-w-xl text-sm text-muted-foreground", children: e.status.reason === "AI_PROVIDER_REQUIRED" ? "Configure and activate an AI provider in Meyi Connect before scheduled cost reports can run." : "An administrator must enable the Cost AI deployment setting before scheduled reports can run." })
|
|
@@ -11082,7 +11101,7 @@ function Jf() {
|
|
|
11082
11101
|
nr(e.schedule.lastRunAt)
|
|
11083
11102
|
] })
|
|
11084
11103
|
] }),
|
|
11085
|
-
e.reports.length ? /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden rounded-lg border bg-card", children: /* @__PURE__ */ a.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a.jsxs("table", { className: "w-full min-w-[
|
|
11104
|
+
e.reports.length ? /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden rounded-lg border bg-card", children: /* @__PURE__ */ a.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a.jsxs("table", { className: "w-full min-w-[960px] text-sm", children: [
|
|
11086
11105
|
/* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { className: "border-b bg-muted/40 text-left text-xs text-muted-foreground", children: [
|
|
11087
11106
|
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 font-medium", children: "Report period" }),
|
|
11088
11107
|
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 font-medium", children: "Schedule" }),
|
|
@@ -11090,13 +11109,13 @@ function Jf() {
|
|
|
11090
11109
|
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 font-medium", children: "Generated" }),
|
|
11091
11110
|
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 font-medium", children: "Status" }),
|
|
11092
11111
|
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 font-medium", children: "Total cost" }),
|
|
11093
|
-
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 text-right font-medium", children: "
|
|
11112
|
+
/* @__PURE__ */ a.jsx("th", { className: "px-4 py-3 text-right font-medium", children: "Actions" })
|
|
11094
11113
|
] }) }),
|
|
11095
11114
|
/* @__PURE__ */ a.jsx("tbody", { children: e.reports.map((o) => /* @__PURE__ */ a.jsxs("tr", { className: "border-b last:border-0", children: [
|
|
11096
11115
|
/* @__PURE__ */ a.jsxs("td", { className: "px-4 py-3 font-medium", children: [
|
|
11097
|
-
|
|
11116
|
+
Yf(o.period.Start),
|
|
11098
11117
|
" - ",
|
|
11099
|
-
|
|
11118
|
+
Jf(o.period.End)
|
|
11100
11119
|
] }),
|
|
11101
11120
|
/* @__PURE__ */ a.jsx("td", { className: "px-4 py-3 capitalize text-muted-foreground", children: o.frequency }),
|
|
11102
11121
|
/* @__PURE__ */ a.jsxs("td", { className: "px-4 py-3", children: [
|
|
@@ -11105,70 +11124,75 @@ function Jf() {
|
|
|
11105
11124
|
] }),
|
|
11106
11125
|
/* @__PURE__ */ a.jsx("td", { className: "px-4 py-3 text-muted-foreground", children: nr(o.completedAt || o.startedAt || o.createdAt) }),
|
|
11107
11126
|
/* @__PURE__ */ a.jsxs("td", { className: "px-4 py-3", children: [
|
|
11108
|
-
/* @__PURE__ */ a.jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full border px-2 py-1 text-xs font-medium ${
|
|
11109
|
-
(o.status === "RUNNING" || o.status === "PENDING") && /* @__PURE__ */ a.jsx(
|
|
11127
|
+
/* @__PURE__ */ a.jsxs("span", { className: `inline-flex items-center gap-1.5 rounded-full border px-2 py-1 text-xs font-medium ${Xf[o.status]}`, children: [
|
|
11128
|
+
(o.status === "RUNNING" || o.status === "PENDING") && /* @__PURE__ */ a.jsx(vt, { className: "h-3 w-3 animate-spin" }),
|
|
11110
11129
|
o.status.toLowerCase()
|
|
11111
11130
|
] }),
|
|
11112
11131
|
o.error && /* @__PURE__ */ a.jsx("p", { className: "mt-1 max-w-xs truncate text-xs text-destructive", title: o.error, children: o.error })
|
|
11113
11132
|
] }),
|
|
11114
11133
|
/* @__PURE__ */ a.jsx("td", { className: "px-4 py-3", children: o.facts ? new Intl.NumberFormat(void 0, { style: "currency", currency: o.facts.currency }).format(o.facts.currentTotal) : "-" }),
|
|
11115
|
-
/* @__PURE__ */ a.jsx("td", { className: "px-4 py-3
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11134
|
+
/* @__PURE__ */ a.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ a.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11135
|
+
/* @__PURE__ */ a.jsxs("button", { type: "button", onClick: () => {
|
|
11136
|
+
e.download(o);
|
|
11137
|
+
}, disabled: !o.pdfReady, className: "inline-flex h-9 items-center gap-2 rounded-lg border px-3 text-sm font-medium hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40", title: o.pdfReady ? "Download PDF" : "PDF not ready", children: [
|
|
11138
|
+
/* @__PURE__ */ a.jsx(Ar, { className: "h-4 w-4" }),
|
|
11139
|
+
"Download"
|
|
11140
|
+
] }),
|
|
11141
|
+
n && /* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => {
|
|
11142
|
+
e.remove(o);
|
|
11143
|
+
}, disabled: e.removingId === o.id || o.status === "RUNNING" || o.status === "PENDING", className: "inline-flex h-9 w-9 items-center justify-center rounded-lg border text-destructive hover:bg-destructive/10 disabled:cursor-not-allowed disabled:opacity-40", title: "Remove report", "aria-label": "Remove report", children: e.removingId === o.id ? /* @__PURE__ */ a.jsx(vt, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ a.jsx(xu, { className: "h-4 w-4" }) })
|
|
11120
11144
|
] }) })
|
|
11121
11145
|
] }, o.id)) })
|
|
11122
|
-
] }) }) }) : /* @__PURE__ */ a.jsx(
|
|
11146
|
+
] }) }) }) : /* @__PURE__ */ a.jsx(ce, { children: /* @__PURE__ */ a.jsxs(le, { className: "flex min-h-64 flex-col items-center justify-center px-6 text-center", children: [
|
|
11123
11147
|
/* @__PURE__ */ a.jsx(aa, { className: "h-8 w-8 text-muted-foreground" }),
|
|
11124
11148
|
/* @__PURE__ */ a.jsx("h2", { className: "mt-4 text-base font-semibold", children: "No scheduled reports yet" }),
|
|
11125
11149
|
/* @__PURE__ */ a.jsx("p", { className: "mt-2 max-w-lg text-sm text-muted-foreground", children: "The first report will appear here after the configured schedule runs." })
|
|
11126
11150
|
] }) })
|
|
11127
11151
|
] }),
|
|
11128
|
-
e.schedule && /* @__PURE__ */ a.jsx(
|
|
11152
|
+
e.schedule && /* @__PURE__ */ a.jsx(Gf, { open: s, schedule: e.schedule, saving: e.saving, onClose: () => r(!1), onSave: e.saveSchedule })
|
|
11129
11153
|
] });
|
|
11130
11154
|
}
|
|
11131
|
-
const
|
|
11155
|
+
const Et = mc({
|
|
11132
11156
|
component: ko
|
|
11133
|
-
}),
|
|
11134
|
-
getParentRoute: () =>
|
|
11157
|
+
}), Qf = Ht({
|
|
11158
|
+
getParentRoute: () => Et,
|
|
11135
11159
|
path: "/",
|
|
11136
|
-
component:
|
|
11137
|
-
}),
|
|
11138
|
-
getParentRoute: () =>
|
|
11160
|
+
component: Rf
|
|
11161
|
+
}), eh = Ht({
|
|
11162
|
+
getParentRoute: () => Et,
|
|
11139
11163
|
path: "/reports",
|
|
11140
|
-
component:
|
|
11141
|
-
}),
|
|
11142
|
-
getParentRoute: () =>
|
|
11164
|
+
component: Mf
|
|
11165
|
+
}), th = Ht({
|
|
11166
|
+
getParentRoute: () => Et,
|
|
11143
11167
|
path: "/cur-discovery",
|
|
11144
|
-
component:
|
|
11145
|
-
}),
|
|
11146
|
-
getParentRoute: () =>
|
|
11168
|
+
component: Uf
|
|
11169
|
+
}), sh = Ht({
|
|
11170
|
+
getParentRoute: () => Et,
|
|
11147
11171
|
path: "/analysis",
|
|
11148
|
-
component:
|
|
11149
|
-
}),
|
|
11150
|
-
getParentRoute: () =>
|
|
11172
|
+
component: Zf
|
|
11173
|
+
}), rh = Ht({
|
|
11174
|
+
getParentRoute: () => Et,
|
|
11151
11175
|
path: "/sources",
|
|
11152
|
-
component:
|
|
11176
|
+
component: zf
|
|
11153
11177
|
});
|
|
11154
11178
|
function ka() {
|
|
11155
|
-
return
|
|
11179
|
+
return Et.addChildren([Qf, sh, eh, rh, th]);
|
|
11156
11180
|
}
|
|
11157
|
-
function
|
|
11181
|
+
function _h(e = "/cost") {
|
|
11158
11182
|
return Eo({
|
|
11159
11183
|
routeTree: ka(),
|
|
11160
11184
|
basepath: e
|
|
11161
11185
|
});
|
|
11162
11186
|
}
|
|
11163
|
-
function
|
|
11187
|
+
function kh({ apiBase: e, token: t, basePath: s = "/cost", userRole: r = "user" }) {
|
|
11164
11188
|
kd(e, t);
|
|
11165
11189
|
const n = Pe.useMemo(
|
|
11166
11190
|
() => Eo({ routeTree: ka(), basepath: s }),
|
|
11167
11191
|
[s]
|
|
11168
11192
|
);
|
|
11169
|
-
return /* @__PURE__ */ a.jsx(
|
|
11193
|
+
return /* @__PURE__ */ a.jsx(Vf, { value: r, children: /* @__PURE__ */ a.jsx(Ec, { router: n }) });
|
|
11170
11194
|
}
|
|
11171
|
-
const
|
|
11195
|
+
const Eh = [
|
|
11172
11196
|
{
|
|
11173
11197
|
title: "Overview",
|
|
11174
11198
|
url: "/",
|
|
@@ -11201,11 +11225,11 @@ const _h = [
|
|
|
11201
11225
|
}
|
|
11202
11226
|
];
|
|
11203
11227
|
export {
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11228
|
+
kh as CostPage,
|
|
11229
|
+
re as api,
|
|
11230
|
+
Ch as attachAuthInterceptors,
|
|
11207
11231
|
kd as configureApi,
|
|
11208
|
-
|
|
11209
|
-
|
|
11232
|
+
Eh as costNavItems,
|
|
11233
|
+
_h as createCostRouter,
|
|
11210
11234
|
ka as createRouteTree
|
|
11211
11235
|
};
|