@lokalise/harmony 1.24.2 → 1.25.1

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/harmony.mjs CHANGED
@@ -1,36 +1,36 @@
1
- var Zt = Object.defineProperty;
2
- var en = (e, t, r) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var re = (e, t, r) => en(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { jsx as o, jsxs as p, Fragment as He } from "react/jsx-runtime";
5
- import * as z from "react";
6
- import { useRef as Ct, useState as I, useCallback as Qe, useEffect as Q, useContext as Pt, createContext as wt, cloneElement as tn, Fragment as At, forwardRef as nn } from "react";
7
- import { Tooltip as D, Link as U, Menu as le, MenuList as ue, CaretUpIcon as rn, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as an, Alert as sn, Tag as Oe, Button as xe, Loading as on, Popover as cn, JobIcon as ln } from "@lokalise/louis";
8
- import { format as It, parseISO as un, isThisSecond as dn } from "date-fns";
9
- import { toZonedTime as mn } from "date-fns-tz";
1
+ var rn = Object.defineProperty;
2
+ var sn = (e, t, r) => t in e ? rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var re = (e, t, r) => sn(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { jsx as a, jsxs as p, Fragment as He } from "react/jsx-runtime";
5
+ import * as J from "react";
6
+ import { useRef as Ct, useState as k, useCallback as Qe, useEffect as W, useContext as Pt, createContext as At, cloneElement as on, Fragment as Rt, forwardRef as an } from "react";
7
+ import { Tooltip as D, Link as U, Menu as le, MenuList as ue, CaretUpIcon as cn, UserIcon as wt, MenuItem as Y, MenuDivider as It, ConfirmModal as ln, Alert as un, Tag as Oe, Button as xe, Loading as dn, Popover as mn, JobIcon as _n } from "@lokalise/louis";
8
+ import { format as kt, parseISO as gn, isThisSecond as hn } from "date-fns";
9
+ import { toZonedTime as pn } from "date-fns-tz";
10
10
  import { z as n } from "zod";
11
- import { buildPayloadRoute as Y, buildGetRoute as X } from "@lokalise/api-contracts";
12
- import { sendByPayloadRoute as $, sendByGetRoute as G } from "@lokalise/frontend-http-client";
13
- import { useQuery as H, useMutation as qe } from "@tanstack/react-query";
11
+ import { buildPayloadRoute as X, buildGetRoute as $ } from "@lokalise/api-contracts";
12
+ import { sendByPayloadRoute as G, sendByGetRoute as F } from "@lokalise/frontend-http-client";
13
+ import { useQuery as H, useMutation as Be } from "@tanstack/react-query";
14
14
  const Le = {
15
15
  Completed: "completed",
16
16
  InProgress: "in_progress",
17
17
  Created: "created",
18
18
  Queued: "queued"
19
- }, A = {
19
+ }, R = {
20
20
  ...Le,
21
21
  NotStarted: "not_started"
22
- }, ae = {
22
+ }, se = {
23
23
  translation: "translation",
24
24
  review: "review",
25
25
  lqa_by_ai: "lqa_by_ai",
26
26
  automatic_translation: "automatic_translation"
27
27
  };
28
- var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
28
+ var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
29
29
  function jt(e) {
30
30
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
31
31
  }
32
32
  var he, We;
33
- function Be() {
33
+ function qe() {
34
34
  if (We) return he;
35
35
  We = 1;
36
36
  function e(t) {
@@ -40,21 +40,21 @@ function Be() {
40
40
  return he = e, he;
41
41
  }
42
42
  var pe, Ye;
43
- function _n() {
43
+ function fn() {
44
44
  if (Ye) return pe;
45
45
  Ye = 1;
46
- var e = typeof se == "object" && se && se.Object === Object && se;
46
+ var e = typeof oe == "object" && oe && oe.Object === Object && oe;
47
47
  return pe = e, pe;
48
48
  }
49
49
  var fe, Xe;
50
50
  function Nt() {
51
51
  if (Xe) return fe;
52
52
  Xe = 1;
53
- var e = _n(), t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
53
+ var e = fn(), t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
54
54
  return fe = r, fe;
55
55
  }
56
56
  var be, Ve;
57
- function gn() {
57
+ function bn() {
58
58
  if (Ve) return be;
59
59
  Ve = 1;
60
60
  var e = Nt(), t = function() {
@@ -63,24 +63,24 @@ function gn() {
63
63
  return be = t, be;
64
64
  }
65
65
  var Te, Ze;
66
- function hn() {
66
+ function Tn() {
67
67
  if (Ze) return Te;
68
68
  Ze = 1;
69
69
  var e = /\s/;
70
70
  function t(r) {
71
- for (var a = r.length; a-- && e.test(r.charAt(a)); )
71
+ for (var s = r.length; s-- && e.test(r.charAt(s)); )
72
72
  ;
73
- return a;
73
+ return s;
74
74
  }
75
75
  return Te = t, Te;
76
76
  }
77
77
  var ve, et;
78
- function pn() {
78
+ function vn() {
79
79
  if (et) return ve;
80
80
  et = 1;
81
- var e = hn(), t = /^\s+/;
82
- function r(a) {
83
- return a && a.slice(0, e(a) + 1).replace(t, "");
81
+ var e = Tn(), t = /^\s+/;
82
+ function r(s) {
83
+ return s && s.slice(0, e(s) + 1).replace(t, "");
84
84
  }
85
85
  return ve = r, ve;
86
86
  }
@@ -91,72 +91,72 @@ function Ot() {
91
91
  var e = Nt(), t = e.Symbol;
92
92
  return Se = t, Se;
93
93
  }
94
- var ye, nt;
95
- function fn() {
96
- if (nt) return ye;
94
+ var Ee, nt;
95
+ function Sn() {
96
+ if (nt) return Ee;
97
97
  nt = 1;
98
- var e = Ot(), t = Object.prototype, r = t.hasOwnProperty, a = t.toString, s = e ? e.toStringTag : void 0;
98
+ var e = Ot(), t = Object.prototype, r = t.hasOwnProperty, s = t.toString, o = e ? e.toStringTag : void 0;
99
99
  function i(c) {
100
- var u = r.call(c, s), d = c[s];
100
+ var u = r.call(c, o), d = c[o];
101
101
  try {
102
- c[s] = void 0;
102
+ c[o] = void 0;
103
103
  var l = !0;
104
104
  } catch {
105
105
  }
106
- var m = a.call(c);
107
- return l && (u ? c[s] = d : delete c[s]), m;
106
+ var m = s.call(c);
107
+ return l && (u ? c[o] = d : delete c[o]), m;
108
108
  }
109
- return ye = i, ye;
109
+ return Ee = i, Ee;
110
110
  }
111
- var Ee, rt;
112
- function bn() {
113
- if (rt) return Ee;
111
+ var ye, rt;
112
+ function En() {
113
+ if (rt) return ye;
114
114
  rt = 1;
115
115
  var e = Object.prototype, t = e.toString;
116
- function r(a) {
117
- return t.call(a);
116
+ function r(s) {
117
+ return t.call(s);
118
118
  }
119
- return Ee = r, Ee;
119
+ return ye = r, ye;
120
120
  }
121
- var Ce, at;
122
- function Tn() {
123
- if (at) return Ce;
124
- at = 1;
125
- var e = Ot(), t = fn(), r = bn(), a = "[object Null]", s = "[object Undefined]", i = e ? e.toStringTag : void 0;
121
+ var Ce, st;
122
+ function yn() {
123
+ if (st) return Ce;
124
+ st = 1;
125
+ var e = Ot(), t = Sn(), r = En(), s = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
126
126
  function c(u) {
127
- return u == null ? u === void 0 ? s : a : i && i in Object(u) ? t(u) : r(u);
127
+ return u == null ? u === void 0 ? o : s : i && i in Object(u) ? t(u) : r(u);
128
128
  }
129
129
  return Ce = c, Ce;
130
130
  }
131
- var Pe, st;
132
- function vn() {
133
- if (st) return Pe;
134
- st = 1;
131
+ var Pe, ot;
132
+ function Cn() {
133
+ if (ot) return Pe;
134
+ ot = 1;
135
135
  function e(t) {
136
136
  return t != null && typeof t == "object";
137
137
  }
138
138
  return Pe = e, Pe;
139
139
  }
140
- var we, ot;
141
- function Sn() {
142
- if (ot) return we;
143
- ot = 1;
144
- var e = Tn(), t = vn(), r = "[object Symbol]";
145
- function a(s) {
146
- return typeof s == "symbol" || t(s) && e(s) == r;
140
+ var Ae, at;
141
+ function Pn() {
142
+ if (at) return Ae;
143
+ at = 1;
144
+ var e = yn(), t = Cn(), r = "[object Symbol]";
145
+ function s(o) {
146
+ return typeof o == "symbol" || t(o) && e(o) == r;
147
147
  }
148
- return we = a, we;
148
+ return Ae = s, Ae;
149
149
  }
150
- var Ae, it;
151
- function yn() {
152
- if (it) return Ae;
150
+ var Re, it;
151
+ function An() {
152
+ if (it) return Re;
153
153
  it = 1;
154
- var e = pn(), t = Be(), r = Sn(), a = NaN, s = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
154
+ var e = vn(), t = qe(), r = Pn(), s = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
155
155
  function d(l) {
156
156
  if (typeof l == "number")
157
157
  return l;
158
158
  if (r(l))
159
- return a;
159
+ return s;
160
160
  if (t(l)) {
161
161
  var m = typeof l.valueOf == "function" ? l.valueOf() : l;
162
162
  l = t(m) ? m + "" : m;
@@ -165,122 +165,122 @@ function yn() {
165
165
  return l === 0 ? l : +l;
166
166
  l = e(l);
167
167
  var g = i.test(l);
168
- return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : s.test(l) ? a : +l;
168
+ return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : o.test(l) ? s : +l;
169
169
  }
170
- return Ae = d, Ae;
170
+ return Re = d, Re;
171
171
  }
172
- var Re, ct;
172
+ var we, ct;
173
173
  function xt() {
174
- if (ct) return Re;
174
+ if (ct) return we;
175
175
  ct = 1;
176
- var e = Be(), t = gn(), r = yn(), a = "Expected a function", s = Math.max, i = Math.min;
176
+ var e = qe(), t = bn(), r = An(), s = "Expected a function", o = Math.max, i = Math.min;
177
177
  function c(u, d, l) {
178
- var m, g, v, S, _, E, b = 0, h = !1, f = !1, T = !0;
178
+ var m, g, v, S, _, y, b = 0, h = !1, f = !1, T = !0;
179
179
  if (typeof u != "function")
180
- throw new TypeError(a);
181
- d = r(d) || 0, e(l) && (h = !!l.leading, f = "maxWait" in l, v = f ? s(r(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
182
- function P(y) {
183
- var N = m, F = g;
184
- return m = g = void 0, b = y, S = u.apply(F, N), S;
180
+ throw new TypeError(s);
181
+ d = r(d) || 0, e(l) && (h = !!l.leading, f = "maxWait" in l, v = f ? o(r(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
182
+ function P(E) {
183
+ var O = m, K = g;
184
+ return m = g = void 0, b = E, S = u.apply(K, O), S;
185
185
  }
186
- function C(y) {
187
- return b = y, _ = setTimeout(ne, d), h ? P(y) : S;
186
+ function C(E) {
187
+ return b = E, _ = setTimeout(ne, d), h ? P(E) : S;
188
188
  }
189
- function te(y) {
190
- var N = y - E, F = y - b, Je = d - N;
191
- return f ? i(Je, v - F) : Je;
189
+ function te(E) {
190
+ var O = E - y, K = E - b, Je = d - O;
191
+ return f ? i(Je, v - K) : Je;
192
192
  }
193
- function Ke(y) {
194
- var N = y - E, F = y - b;
195
- return E === void 0 || N >= d || N < 0 || f && F >= v;
193
+ function Ke(E) {
194
+ var O = E - y, K = E - b;
195
+ return y === void 0 || O >= d || O < 0 || f && K >= v;
196
196
  }
197
197
  function ne() {
198
- var y = t();
199
- if (Ke(y))
200
- return ze(y);
201
- _ = setTimeout(ne, te(y));
198
+ var E = t();
199
+ if (Ke(E))
200
+ return ze(E);
201
+ _ = setTimeout(ne, te(E));
202
202
  }
203
- function ze(y) {
204
- return _ = void 0, T && m ? P(y) : (m = g = void 0, S);
203
+ function ze(E) {
204
+ return _ = void 0, T && m ? P(E) : (m = g = void 0, S);
205
205
  }
206
- function Xt() {
207
- _ !== void 0 && clearTimeout(_), b = 0, m = E = g = _ = void 0;
206
+ function tn() {
207
+ _ !== void 0 && clearTimeout(_), b = 0, m = y = g = _ = void 0;
208
208
  }
209
- function Vt() {
209
+ function nn() {
210
210
  return _ === void 0 ? S : ze(t());
211
211
  }
212
212
  function ge() {
213
- var y = t(), N = Ke(y);
214
- if (m = arguments, g = this, E = y, N) {
213
+ var E = t(), O = Ke(E);
214
+ if (m = arguments, g = this, y = E, O) {
215
215
  if (_ === void 0)
216
- return C(E);
216
+ return C(y);
217
217
  if (f)
218
- return clearTimeout(_), _ = setTimeout(ne, d), P(E);
218
+ return clearTimeout(_), _ = setTimeout(ne, d), P(y);
219
219
  }
220
220
  return _ === void 0 && (_ = setTimeout(ne, d)), S;
221
221
  }
222
- return ge.cancel = Xt, ge.flush = Vt, ge;
222
+ return ge.cancel = tn, ge.flush = nn, ge;
223
223
  }
224
- return Re = c, Re;
224
+ return we = c, we;
225
225
  }
226
- var En = xt();
227
- const Cn = /* @__PURE__ */ jt(En);
228
- var ke, lt;
229
- function Pn() {
230
- if (lt) return ke;
226
+ var Rn = xt();
227
+ const wn = /* @__PURE__ */ jt(Rn);
228
+ var Ie, lt;
229
+ function In() {
230
+ if (lt) return Ie;
231
231
  lt = 1;
232
- var e = xt(), t = Be(), r = "Expected a function";
233
- function a(s, i, c) {
232
+ var e = xt(), t = qe(), r = "Expected a function";
233
+ function s(o, i, c) {
234
234
  var u = !0, d = !0;
235
- if (typeof s != "function")
235
+ if (typeof o != "function")
236
236
  throw new TypeError(r);
237
- return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(s, i, {
237
+ return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(o, i, {
238
238
  leading: u,
239
239
  maxWait: i,
240
240
  trailing: d
241
241
  });
242
242
  }
243
- return ke = a, ke;
243
+ return Ie = s, Ie;
244
244
  }
245
- var wn = Pn();
246
- const An = /* @__PURE__ */ jt(wn), Rn = (e, t, r, a) => {
245
+ var kn = In();
246
+ const jn = /* @__PURE__ */ jt(kn), Nn = (e, t, r, s) => {
247
247
  switch (t) {
248
248
  case "debounce":
249
- return Cn(e, r, a);
249
+ return wn(e, r, s);
250
250
  case "throttle":
251
- return An(e, r, a);
251
+ return jn(e, r, s);
252
252
  default:
253
253
  return e;
254
254
  }
255
- }, kn = (
255
+ }, On = (
256
256
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
257
257
  (e) => {
258
- const t = z.useRef(e);
259
- return z.useEffect(() => {
258
+ const t = J.useRef(e);
259
+ return J.useEffect(() => {
260
260
  t.current = e;
261
- }), z.useMemo(() => (...r) => {
262
- var a;
263
- return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...r);
261
+ }), J.useMemo(() => (...r) => {
262
+ var s;
263
+ return (s = t.current) === null || s === void 0 ? void 0 : s.call(t, ...r);
264
264
  }, []);
265
265
  }
266
- ), In = (
266
+ ), xn = (
267
267
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
268
268
  (e) => {
269
- const [t, r] = z.useState((e == null ? void 0 : e.current) || null);
269
+ const [t, r] = J.useState((e == null ? void 0 : e.current) || null);
270
270
  return e && setTimeout(() => {
271
271
  e.current !== t && r(e.current);
272
- }, 0), { refProxy: z.useMemo(() => new Proxy((s) => {
273
- s !== t && r(s);
272
+ }, 0), { refProxy: J.useMemo(() => new Proxy((o) => {
273
+ o !== t && r(o);
274
274
  }, {
275
- get(s, i) {
276
- return i === "current" ? t : s[i];
275
+ get(o, i) {
276
+ return i === "current" ? t : o[i];
277
277
  },
278
- set(s, i, c) {
279
- return i === "current" ? r(c) : s[i] = c, !0;
278
+ set(o, i, c) {
279
+ return i === "current" ? r(c) : o[i] = c, !0;
280
280
  }
281
281
  }), [t]), refElement: t, setRefElement: r };
282
282
  }
283
- ), jn = (e, t) => t === "border-box" ? {
283
+ ), Ln = (e, t) => t === "border-box" ? {
284
284
  width: e.borderBoxSize[0].inlineSize,
285
285
  height: e.borderBoxSize[0].blockSize
286
286
  } : t === "content-box" ? {
@@ -290,33 +290,33 @@ const An = /* @__PURE__ */ jt(wn), Rn = (e, t, r, a) => {
290
290
  width: e.contentRect.width,
291
291
  height: e.contentRect.height
292
292
  };
293
- function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refreshOptions: a, handleWidth: s = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
294
- const l = Ct(e), m = kn(d), [g, v] = I({
293
+ function Mn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refreshOptions: s, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
294
+ const l = Ct(e), m = On(d), [g, v] = k({
295
295
  width: void 0,
296
296
  height: void 0
297
- }), { refProxy: S, refElement: _ } = In(c), { box: E } = u || {}, b = Qe((f) => {
298
- if (!s && !i)
297
+ }), { refProxy: S, refElement: _ } = xn(c), { box: y } = u || {}, b = Qe((f) => {
298
+ if (!o && !i)
299
299
  return;
300
300
  if (l.current) {
301
301
  l.current = !1;
302
302
  return;
303
303
  }
304
- const T = (P, C) => s && P.width !== C.width || i && P.height !== C.height;
304
+ const T = (P, C) => o && P.width !== C.width || i && P.height !== C.height;
305
305
  f.forEach((P) => {
306
- const C = jn(P, E);
306
+ const C = Ln(P, y);
307
307
  v((te) => T(te, C) ? (m == null || m({
308
308
  width: C.width,
309
309
  height: C.height,
310
310
  entry: P
311
311
  }), C) : te);
312
312
  });
313
- }, [s, i, l, E]), h = Qe(Rn(b, t, r, a), [
313
+ }, [o, i, l, y]), h = Qe(Nn(b, t, r, s), [
314
314
  b,
315
315
  t,
316
316
  r,
317
- a
317
+ s
318
318
  ]);
319
- return Q(() => {
319
+ return W(() => {
320
320
  let f;
321
321
  return _ ? (f = new window.ResizeObserver(h), f.observe(_, u)) : (g.width || g.height) && (m == null || m({
322
322
  width: null,
@@ -329,66 +329,66 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refresh
329
329
  }, [h, _]), Object.assign({ ref: S }, g);
330
330
  }
331
331
  function Lt(e) {
332
- var t, r, a = "";
333
- if (typeof e == "string" || typeof e == "number") a += e;
332
+ var t, r, s = "";
333
+ if (typeof e == "string" || typeof e == "number") s += e;
334
334
  else if (typeof e == "object") if (Array.isArray(e)) {
335
- var s = e.length;
336
- for (t = 0; t < s; t++) e[t] && (r = Lt(e[t])) && (a && (a += " "), a += r);
337
- } else for (r in e) e[r] && (a && (a += " "), a += r);
338
- return a;
335
+ var o = e.length;
336
+ for (t = 0; t < o; t++) e[t] && (r = Lt(e[t])) && (s && (s += " "), s += r);
337
+ } else for (r in e) e[r] && (s && (s += " "), s += r);
338
+ return s;
339
339
  }
340
340
  function j() {
341
- for (var e, t, r = 0, a = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = Lt(e)) && (a && (a += " "), a += t);
342
- return a;
341
+ for (var e, t, r = 0, s = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = Lt(e)) && (s && (s += " "), s += t);
342
+ return s;
343
343
  }
344
- const On = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", Ln = "_navigationTab_1cubo_8", Mn = "_headerContent_1cubo_34", Un = "_staticEnabled_1cubo_50", B = {
345
- headerContainer: On,
346
- navigationTabList: xn,
347
- navigationTab: Ln,
348
- headerContent: Mn,
349
- staticEnabled: Un
350
- }, Hn = 77, oe = ({ sticky: e, children: t }) => {
351
- const { ref: r, height: a } = Nn({
344
+ const Un = "_headerContainer_1cubo_1", Hn = "_navigationTabList_1cubo_8", Bn = "_navigationTab_1cubo_8", qn = "_headerContent_1cubo_34", Dn = "_staticEnabled_1cubo_50", q = {
345
+ headerContainer: Un,
346
+ navigationTabList: Hn,
347
+ navigationTab: Bn,
348
+ headerContent: qn,
349
+ staticEnabled: Dn
350
+ }, $n = 77, ae = ({ sticky: e, children: t }) => {
351
+ const { ref: r, height: s } = Mn({
352
352
  refreshMode: "debounce",
353
353
  refreshRate: 0
354
- }), [s, i] = I(!1), c = () => s ? !e : !0;
355
- Q(() => {
354
+ }), [o, i] = k(!1), c = () => o ? !e : !0;
355
+ W(() => {
356
356
  const d = () => {
357
357
  i(window.scrollY > 0);
358
358
  };
359
359
  return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
360
360
  }, []);
361
- const u = `${a || Hn}px`;
362
- return /* @__PURE__ */ o("div", { style: { minHeight: u }, children: /* @__PURE__ */ o("div", { children: /* @__PURE__ */ p(
361
+ const u = `${s || $n}px`;
362
+ return /* @__PURE__ */ a("div", { style: { minHeight: u }, children: /* @__PURE__ */ a("div", { children: /* @__PURE__ */ p(
363
363
  "div",
364
364
  {
365
365
  ref: r,
366
- className: j(B.headerContent, {
367
- [B.staticEnabled]: c()
366
+ className: j(q.headerContent, {
367
+ [q.staticEnabled]: c()
368
368
  }),
369
369
  children: [
370
- /* @__PURE__ */ o(oe.Header, {}),
371
- /* @__PURE__ */ o(oe.Tabs, {}),
370
+ /* @__PURE__ */ a(ae.Header, {}),
371
+ /* @__PURE__ */ a(ae.Tabs, {}),
372
372
  t
373
373
  ]
374
374
  }
375
375
  ) }) });
376
376
  };
377
- oe.Header = ({ children: e }) => /* @__PURE__ */ o("div", { className: B.headerContainer, children: e });
378
- oe.Tabs = ({ children: e }) => /* @__PURE__ */ o("div", { className: "flex justify-between gap-2 nowrap", children: e });
379
- const qn = "_sidebarContainer_bmdti_1", Bn = {
380
- sidebarContainer: qn
381
- }, Dn = "_logoLink_1baxb_1", $n = {
382
- logoLink: Dn
383
- }, Gn = ({
377
+ ae.Header = ({ children: e }) => /* @__PURE__ */ a("div", { className: q.headerContainer, children: e });
378
+ ae.Tabs = ({ children: e }) => /* @__PURE__ */ a("div", { className: "flex justify-between gap-2 nowrap", children: e });
379
+ const Gn = "_sidebarContainer_bmdti_1", Fn = {
380
+ sidebarContainer: Gn
381
+ }, Kn = "_logoLink_1baxb_1", zn = {
382
+ logoLink: Kn
383
+ }, Jn = ({
384
384
  src: e,
385
385
  href: t = "/",
386
386
  ariaLabel: r = "Lokalise App Home",
387
- alt: a = "Lokalise Logo"
388
- }) => /* @__PURE__ */ o("a", { className: $n.logoLink, href: t, "aria-label": r, children: /* @__PURE__ */ o("img", { src: e, alt: a }) }), Fn = "_link_18vhx_1", Kn = "_active_18vhx_18", ut = {
389
- link: Fn,
390
- active: Kn
391
- }, zn = ({ label: e, to: t, icon: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: e, children: /* @__PURE__ */ o(
387
+ alt: s = "Lokalise Logo"
388
+ }) => /* @__PURE__ */ a("a", { className: zn.logoLink, href: t, "aria-label": r, children: /* @__PURE__ */ a("img", { src: e, alt: s }) }), Qn = "_link_18vhx_1", Wn = "_active_18vhx_18", ut = {
389
+ link: Qn,
390
+ active: Wn
391
+ }, Yn = ({ label: e, to: t, icon: r }) => /* @__PURE__ */ a(D, { placement: "right", tooltip: e, children: /* @__PURE__ */ a(
392
392
  U,
393
393
  {
394
394
  "aria-label": e,
@@ -396,54 +396,54 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
396
396
  [ut.active]: window.location.pathname.startsWith(t)
397
397
  }),
398
398
  href: t,
399
- children: /* @__PURE__ */ o(r, { size: "25px" })
399
+ children: /* @__PURE__ */ a(r, { size: "25px" })
400
400
  }
401
- ) }), Jn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18", dt = {
402
- dropdownButton: Jn,
403
- dropdownButtonActive: Qn
404
- }, Wn = ({ children: e, icon: t }) => /* @__PURE__ */ o(
401
+ ) }), Xn = "_dropdownButton_13l5r_1", Vn = "_dropdownButtonActive_13l5r_18", dt = {
402
+ dropdownButton: Xn,
403
+ dropdownButtonActive: Vn
404
+ }, Zn = ({ children: e, icon: t }) => /* @__PURE__ */ a(
405
405
  le,
406
406
  {
407
- menuButton: ({ opened: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ o(
407
+ menuButton: ({ opened: r }) => /* @__PURE__ */ a(D, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ a(
408
408
  "button",
409
409
  {
410
410
  type: "button",
411
411
  className: j(dt.dropdownButton, {
412
412
  [dt.dropdownButtonActive]: r
413
413
  }),
414
- children: /* @__PURE__ */ o(t, { size: "25px" })
414
+ children: /* @__PURE__ */ a(t, { size: "25px" })
415
415
  }
416
416
  ) }),
417
- children: /* @__PURE__ */ o(ue, { placement: "right-start", children: e })
417
+ children: /* @__PURE__ */ a(ue, { placement: "right-start", children: e })
418
418
  }
419
- ), Yn = "_iconContainer_nz34m_1", Xn = {
420
- iconContainer: Yn
421
- }, Mt = ({ className: e = "" }) => /* @__PURE__ */ o(
419
+ ), er = "_iconContainer_nz34m_1", tr = {
420
+ iconContainer: er
421
+ }, Mt = ({ className: e = "" }) => /* @__PURE__ */ a(
422
422
  "div",
423
423
  {
424
424
  "aria-label": "Upgrade Icon",
425
425
  className: j(
426
- Xn.iconContainer,
426
+ tr.iconContainer,
427
427
  "flex-row",
428
428
  "items-center",
429
429
  "justify-center",
430
430
  e
431
431
  ),
432
- children: /* @__PURE__ */ o(rn, {})
432
+ children: /* @__PURE__ */ a(cn, {})
433
433
  }
434
- ), Vn = "_menuContainer_1phdw_10", Zn = "_profileButton_1phdw_20", er = "_profileImage_1phdw_33", tr = "_profileImageHighlight_1phdw_41", nr = "_profileImageUpgradeIcon_1phdw_45", rr = "_userIconWrapper_1phdw_51", L = {
435
- menuContainer: Vn,
436
- profileButton: Zn,
437
- profileImage: er,
438
- profileImageHighlight: tr,
439
- profileImageUpgradeIcon: nr,
440
- userIconWrapper: rr
441
- }, Ut = wt({}), V = () => Pt(Ut), ar = ({ children: e }) => {
434
+ ), nr = "_menuContainer_1phdw_10", rr = "_profileButton_1phdw_20", sr = "_profileImage_1phdw_33", or = "_profileImageHighlight_1phdw_41", ar = "_profileImageUpgradeIcon_1phdw_45", ir = "_userIconWrapper_1phdw_51", L = {
435
+ menuContainer: nr,
436
+ profileButton: rr,
437
+ profileImage: sr,
438
+ profileImageHighlight: or,
439
+ profileImageUpgradeIcon: ar,
440
+ userIconWrapper: ir
441
+ }, Ut = At({}), V = () => Pt(Ut), cr = ({ children: e }) => {
442
442
  const {
443
443
  currentTeam: t,
444
444
  otherTeams: r,
445
- showUpgradeCta: a,
446
- showBillingButton: s,
445
+ showUpgradeCta: s,
446
+ showBillingButton: o,
447
447
  allowTeamCreation: i,
448
448
  isProviderAlpha: c,
449
449
  canAccessTeamSettings: u,
@@ -451,63 +451,63 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
451
451
  isTeamSuspended: l,
452
452
  isFullyAuthenticated: m
453
453
  } = V();
454
- return /* @__PURE__ */ o(
454
+ return /* @__PURE__ */ a(
455
455
  le,
456
456
  {
457
457
  menuButton: () => /* @__PURE__ */ p("button", { className: L.profileButton, "aria-label": "Profile menu", type: "button", children: [
458
- t != null && t.logoUrl ? /* @__PURE__ */ o(
458
+ t != null && t.logoUrl ? /* @__PURE__ */ a(
459
459
  "img",
460
460
  {
461
461
  src: t.logoUrl,
462
462
  className: j(L.profileImage, {
463
- [L.profileImageHighlight]: a
463
+ [L.profileImageHighlight]: s
464
464
  }),
465
465
  alt: "Team Logo"
466
466
  }
467
- ) : /* @__PURE__ */ o(
467
+ ) : /* @__PURE__ */ a(
468
468
  "div",
469
469
  {
470
470
  className: j(L.userIconWrapper, "flex-row", "align-center", "items-center", {
471
- [L.profileImageHighlight]: a
471
+ [L.profileImageHighlight]: s
472
472
  }),
473
- children: /* @__PURE__ */ o(Rt, { size: "25px" })
473
+ children: /* @__PURE__ */ a(wt, { size: "25px" })
474
474
  }
475
475
  ),
476
- a && /* @__PURE__ */ o(Mt, { className: L.profileImageUpgradeIcon })
476
+ s && /* @__PURE__ */ a(Mt, { className: L.profileImageUpgradeIcon })
477
477
  ] }),
478
- children: /* @__PURE__ */ o(ue, { placement: "right-end", className: L.menuContainer, children: e({
478
+ children: /* @__PURE__ */ a(ue, { placement: "right-end", className: L.menuContainer, children: e({
479
479
  allowTeamCreation: i,
480
480
  otherTeams: r,
481
481
  canAccessTeamSettings: u,
482
482
  isEndOfTrialActive: d,
483
483
  isTeamSuspended: l,
484
- showBillingButton: s,
484
+ showBillingButton: o,
485
485
  isProviderAlpha: c,
486
486
  isFullyAuthenticated: m
487
487
  }) })
488
488
  }
489
489
  );
490
- }, Ht = 0, sr = 9999, or = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Ht, Bt = (e) => e === sr, Qs = (e) => or.includes(e), Ws = (e) => ir.includes(e), Ys = (e) => cr.includes(e), Xs = (e) => lr.includes(e), Vs = (e) => e > Ht && e < qt, Zs = (e) => e === qt, ur = /\n/, mt = (e, t, r) => e.split(t).flatMap((a, s) => s !== 0 ? [tn(r, { key: Math.random().toString(32).slice(0, 10) }), a] : a), dr = (e, t, r) => typeof e == "string" ? mt(e, t, r) : e.flatMap((a) => typeof a == "string" ? mt(a, t, r) : a), mr = (e) => dr(e, ur, /* @__PURE__ */ o("br", {})), _r = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, gr = (e) => e.match(_r) ?? [], _t = (e, t, r) => {
491
- const a = e.split(t);
492
- if (a.length === 1)
490
+ }, Ht = 0, lr = 9999, ur = [150, 151, 250, 251], dr = [152, 153, 252, 253], mr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], _r = [156, 159, 160, 256, 259, 260], Bt = 9998, De = (e) => e === Ht, qt = (e) => e === lr, ea = (e) => ur.includes(e), ta = (e) => dr.includes(e), na = (e) => mr.includes(e), ra = (e) => _r.includes(e), sa = (e) => e > Ht && e < Bt, oa = (e) => e === Bt, gr = /\n/, mt = (e, t, r) => e.split(t).flatMap((s, o) => o !== 0 ? [on(r, { key: Math.random().toString(32).slice(0, 10) }), s] : s), hr = (e, t, r) => typeof e == "string" ? mt(e, t, r) : e.flatMap((s) => typeof s == "string" ? mt(s, t, r) : s), pr = (e) => hr(e, gr, /* @__PURE__ */ a("br", {})), fr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, br = (e) => e.match(fr) ?? [], _t = (e, t, r) => {
491
+ const s = e.split(t);
492
+ if (s.length === 1)
493
493
  return e;
494
- const s = [];
495
- return a[0] !== "" && s.push(a[0]), a.shift(), a[a.length - 1] === "" && a.pop(), s.push(
496
- /* @__PURE__ */ o("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + r)
497
- ), s.push(a.join(t)), s.filter((i) => i !== "");
494
+ const o = [];
495
+ return s[0] !== "" && o.push(s[0]), s.shift(), s[s.length - 1] === "" && s.pop(), o.push(
496
+ /* @__PURE__ */ a("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + r)
497
+ ), o.push(s.join(t)), o.filter((i) => i !== "");
498
498
  }, gt = (e) => {
499
- const t = gr(e);
500
- return t != null && t.length ? t.reduce((r, a, s) => typeof r == "string" ? _t(r, a, s) : r.flatMap((i) => typeof i == "string" ? _t(i, a, s) : i), e) : e;
501
- }, hr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), pr = (e, t = "PP") => It(e, t), eo = (e, t, r = "PP") => It(mn(e, t), r), $e = (e) => {
502
- Q(e, []);
499
+ const t = br(e);
500
+ return t != null && t.length ? t.reduce((r, s, o) => typeof r == "string" ? _t(r, s, o) : r.flatMap((i) => typeof i == "string" ? _t(i, s, o) : i), e) : e;
501
+ }, Tr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), vr = (e, t = "PP") => kt(e, t), aa = (e, t, r = "PP") => kt(pn(e, t), r), $e = (e) => {
502
+ W(e, []);
503
503
  }, ht = {
504
504
  biller: "biller",
505
505
  owner: "owner"
506
506
  }, pt = [
507
507
  ht.biller,
508
508
  ht.owner
509
- ], fr = ({ children: e, config: t }) => {
510
- const { teams: r, currentTeamId: a, planId: s, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((h) => h.id === a), l = r.filter((h) => h.id !== a), m = pt.includes(u), g = pt.includes(u), v = De(s) || Bt(s), b = {
509
+ ], Sr = ({ children: e, config: t }) => {
510
+ const { teams: r, currentTeamId: s, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((h) => h.id === s), l = r.filter((h) => h.id !== s), m = pt.includes(u), g = pt.includes(u), v = De(o) || qt(o), b = {
511
511
  ...t,
512
512
  currentTeam: d,
513
513
  otherTeams: l,
@@ -518,102 +518,102 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
518
518
  showBillingButton: c && g && m,
519
519
  allowTeamCreation: c && !i
520
520
  };
521
- return /* @__PURE__ */ o(Ut.Provider, { value: b, children: e });
522
- }, br = ({ config: e, children: t }) => /* @__PURE__ */ o(fr, { config: e, children: /* @__PURE__ */ o(ar, { children: t }) }), Tr = "_container_q5pot_1", vr = "_profileEmail_q5pot_5", ft = {
523
- container: Tr,
524
- profileEmail: vr
525
- }, Sr = ({
521
+ return /* @__PURE__ */ a(Ut.Provider, { value: b, children: e });
522
+ }, Er = ({ config: e, children: t }) => /* @__PURE__ */ a(Sr, { config: e, children: /* @__PURE__ */ a(cr, { children: t }) }), yr = "_container_q5pot_1", Cr = "_profileEmail_q5pot_5", ft = {
523
+ container: yr,
524
+ profileEmail: Cr
525
+ }, Pr = ({
526
526
  href: e,
527
527
  onClick: t,
528
528
  userEmail: r,
529
- hideBottomDivider: a
529
+ hideBottomDivider: s
530
530
  }) => {
531
- const { isEndOfTrialActive: s, isTeamSuspended: i } = V();
532
- return s || i ? null : /* @__PURE__ */ p(He, { children: [
533
- /* @__PURE__ */ o(
534
- W,
531
+ const { isEndOfTrialActive: o, isTeamSuspended: i } = V();
532
+ return o || i ? null : /* @__PURE__ */ p(He, { children: [
533
+ /* @__PURE__ */ a(
534
+ Y,
535
535
  {
536
536
  href: e,
537
537
  onClick: () => {
538
538
  t == null || t();
539
539
  },
540
540
  children: /* @__PURE__ */ p("div", { className: `flex-col ${ft.container}`, children: [
541
- /* @__PURE__ */ o("span", { children: "Profile Settings" }),
542
- /* @__PURE__ */ o("span", { className: ft.profileEmail, children: r })
541
+ /* @__PURE__ */ a("span", { children: "Profile Settings" }),
542
+ /* @__PURE__ */ a("span", { className: ft.profileEmail, children: r })
543
543
  ] })
544
544
  }
545
545
  ),
546
- !a && /* @__PURE__ */ o(kt, {})
546
+ !s && /* @__PURE__ */ a(It, {})
547
547
  ] });
548
- }, yr = "_wrapper_1in7x_5", Er = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", wr = "_teamName_1in7x_36", Ar = "_membership_1in7x_53", Rr = "_defaultProfileImage_1in7x_59", O = {
549
- wrapper: yr,
550
- profileImage: Er,
551
- teamDetails: Cr,
552
- planWrapper: Pr,
553
- teamName: wr,
554
- membership: Ar,
555
- defaultProfileImage: Rr
548
+ }, Ar = "_wrapper_1in7x_5", Rr = "_profileImage_1in7x_11", wr = "_teamDetails_1in7x_19", Ir = "_planWrapper_1in7x_28", kr = "_teamName_1in7x_36", jr = "_membership_1in7x_53", Nr = "_defaultProfileImage_1in7x_59", x = {
549
+ wrapper: Ar,
550
+ profileImage: Rr,
551
+ teamDetails: wr,
552
+ planWrapper: Ir,
553
+ teamName: kr,
554
+ membership: jr,
555
+ defaultProfileImage: Nr
556
556
  }, Dt = ({ team: e, onClick: t, hidePlanLabel: r }) => {
557
- const { currentTeam: a, planId: s } = V(), i = e || a;
557
+ const { currentTeam: s, planId: o } = V(), i = e || s;
558
558
  if (!i)
559
559
  return null;
560
- const c = De(s) ? "Free" : Bt(s) ? "Trial" : void 0;
560
+ const c = De(o) ? "Free" : qt(o) ? "Trial" : void 0;
561
561
  return /* @__PURE__ */ p(
562
- t ? W : "div",
562
+ t ? Y : "div",
563
563
  {
564
- className: O.wrapper,
564
+ className: x.wrapper,
565
565
  ...t && { onClick: () => t(i) },
566
566
  children: [
567
- i.logoUrl ? /* @__PURE__ */ o("img", { className: O.profileImage, src: i.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ o("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ o(Rt, { size: "25px" }) }),
568
- /* @__PURE__ */ p("div", { className: O.teamDetails, children: [
569
- /* @__PURE__ */ p("div", { className: O.planWrapper, children: [
570
- /* @__PURE__ */ o("span", { title: i.name, className: O.teamName, children: i.name }),
571
- c && !r && /* @__PURE__ */ o("span", { className: O.teamName, children: c })
567
+ i.logoUrl ? /* @__PURE__ */ a("img", { className: x.profileImage, src: i.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ a("span", { className: `${x.defaultProfileImage}`, children: /* @__PURE__ */ a(wt, { size: "25px" }) }),
568
+ /* @__PURE__ */ p("div", { className: x.teamDetails, children: [
569
+ /* @__PURE__ */ p("div", { className: x.planWrapper, children: [
570
+ /* @__PURE__ */ a("span", { title: i.name, className: x.teamName, children: i.name }),
571
+ c && !r && /* @__PURE__ */ a("span", { className: x.teamName, children: c })
572
572
  ] }),
573
- /* @__PURE__ */ o("span", { className: O.membership, children: i.role })
573
+ /* @__PURE__ */ a("span", { className: x.membership, children: i.role })
574
574
  ] })
575
575
  ]
576
576
  }
577
577
  );
578
- }, kr = "_teamsContainer_1ncrr_5", Ir = {
579
- teamsContainer: kr
580
- }, jr = ({ onSwitchTeam: e }) => {
578
+ }, Or = "_teamsContainer_1ncrr_5", xr = {
579
+ teamsContainer: Or
580
+ }, Lr = ({ onSwitchTeam: e }) => {
581
581
  const { otherTeams: t } = V();
582
- return t.length === 0 ? null : /* @__PURE__ */ o(
582
+ return t.length === 0 ? null : /* @__PURE__ */ a(
583
583
  "div",
584
584
  {
585
585
  "data-testid": "sidebar-team-switch",
586
- className: `flex-col items-stretch ${Ir.teamsContainer}`,
587
- children: t.map((r) => /* @__PURE__ */ o(Dt, { team: r, onClick: e, hidePlanLabel: !0 }, r.id))
586
+ className: `flex-col items-stretch ${xr.teamsContainer}`,
587
+ children: t.map((r) => /* @__PURE__ */ a(Dt, { team: r, onClick: e, hidePlanLabel: !0 }, r.id))
588
588
  }
589
589
  );
590
- }, Nr = "_container_1u995_1", Or = "_planCta_1u995_15", xr = "_upgradeIconWrapper_1u995_19", Ie = {
591
- container: Nr,
592
- planCta: Or,
593
- upgradeIconWrapper: xr
594
- }, Lr = ({ upgradeOptionHref: e }) => {
595
- const { planId: t, trialDaysLeft: r, showUpgradeCta: a } = V();
596
- if (!a)
590
+ }, Mr = "_container_1u995_1", Ur = "_planCta_1u995_15", Hr = "_upgradeIconWrapper_1u995_19", ke = {
591
+ container: Mr,
592
+ planCta: Ur,
593
+ upgradeIconWrapper: Hr
594
+ }, Br = ({ upgradeOptionHref: e }) => {
595
+ const { planId: t, trialDaysLeft: r, showUpgradeCta: s } = V();
596
+ if (!s)
597
597
  return null;
598
598
  const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${r} ${r === 1 ? "day" : "days"}`;
599
599
  return /* @__PURE__ */ p(
600
- W,
600
+ Y,
601
601
  {
602
602
  "data-testid": "sidebar-upgrade-menu-item",
603
603
  href: e,
604
- className: `flex-col gap-1 items-start ${Ie.container}`,
604
+ className: `flex-col gap-1 items-start ${ke.container}`,
605
605
  children: [
606
- /* @__PURE__ */ o("span", { className: Ie.planCta, children: c }),
607
- /* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
608
- /* @__PURE__ */ o(Mt, {}),
609
- /* @__PURE__ */ o("span", { children: "See upgrade options" })
606
+ /* @__PURE__ */ a("span", { className: ke.planCta, children: c }),
607
+ /* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${ke.upgradeIconWrapper}`, children: [
608
+ /* @__PURE__ */ a(Mt, {}),
609
+ /* @__PURE__ */ a("span", { children: "See upgrade options" })
610
610
  ] })
611
611
  ]
612
612
  }
613
613
  );
614
- }, Mr = Math.min, Ur = Math.max;
614
+ }, qr = Math.min, Dr = Math.max;
615
615
  function bt(e, t, r) {
616
- return Ur(e, Mr(t, r));
616
+ return Dr(e, qr(t, r));
617
617
  }
618
618
  function $t(e, t) {
619
619
  return typeof e == "function" ? e(t) : e;
@@ -621,13 +621,13 @@ function $t(e, t) {
621
621
  function Gt(e) {
622
622
  return e.split("-")[0];
623
623
  }
624
- function Hr(e) {
624
+ function $r(e) {
625
625
  return e === "x" ? "y" : "x";
626
626
  }
627
- function qr(e) {
627
+ function Gr(e) {
628
628
  return ["top", "bottom"].includes(Gt(e)) ? "y" : "x";
629
629
  }
630
- function Br(e) {
630
+ function Fr(e) {
631
631
  return {
632
632
  top: 0,
633
633
  right: 0,
@@ -636,8 +636,8 @@ function Br(e) {
636
636
  ...e
637
637
  };
638
638
  }
639
- function Dr(e) {
640
- return typeof e != "number" ? Br(e) : {
639
+ function Kr(e) {
640
+ return typeof e != "number" ? Fr(e) : {
641
641
  top: e,
642
642
  right: e,
643
643
  bottom: e,
@@ -648,26 +648,26 @@ function Tt(e) {
648
648
  const {
649
649
  x: t,
650
650
  y: r,
651
- width: a,
652
- height: s
651
+ width: s,
652
+ height: o
653
653
  } = e;
654
654
  return {
655
- width: a,
656
- height: s,
655
+ width: s,
656
+ height: o,
657
657
  top: r,
658
658
  left: t,
659
- right: t + a,
660
- bottom: r + s,
659
+ right: t + s,
660
+ bottom: r + o,
661
661
  x: t,
662
662
  y: r
663
663
  };
664
664
  }
665
- async function $r(e, t) {
665
+ async function zr(e, t) {
666
666
  var r;
667
667
  t === void 0 && (t = {});
668
668
  const {
669
- x: a,
670
- y: s,
669
+ x: s,
670
+ y: o,
671
671
  platform: i,
672
672
  rects: c,
673
673
  elements: u,
@@ -678,14 +678,14 @@ async function $r(e, t) {
678
678
  elementContext: g = "floating",
679
679
  altBoundary: v = !1,
680
680
  padding: S = 0
681
- } = $t(t, e), _ = Dr(S), b = u[v ? g === "floating" ? "reference" : "floating" : g], h = Tt(await i.getClippingRect({
681
+ } = $t(t, e), _ = Kr(S), b = u[v ? g === "floating" ? "reference" : "floating" : g], h = Tt(await i.getClippingRect({
682
682
  element: (r = await (i.isElement == null ? void 0 : i.isElement(b))) == null || r ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
683
683
  boundary: l,
684
684
  rootBoundary: m,
685
685
  strategy: d
686
686
  })), f = g === "floating" ? {
687
- x: a,
688
- y: s,
687
+ x: s,
688
+ y: o,
689
689
  width: c.floating.width,
690
690
  height: c.floating.height
691
691
  } : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), P = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
@@ -707,15 +707,15 @@ async function $r(e, t) {
707
707
  right: (C.right - h.right + _.right) / P.x
708
708
  };
709
709
  }
710
- const Gr = function(e) {
710
+ const Jr = function(e) {
711
711
  return e === void 0 && (e = {}), {
712
712
  name: "shift",
713
713
  options: e,
714
714
  async fn(t) {
715
715
  const {
716
716
  x: r,
717
- y: a,
718
- placement: s
717
+ y: s,
718
+ placement: o
719
719
  } = t, {
720
720
  mainAxis: i = !0,
721
721
  crossAxis: c = !1,
@@ -734,8 +734,8 @@ const Gr = function(e) {
734
734
  ...d
735
735
  } = $t(e, t), l = {
736
736
  x: r,
737
- y: a
738
- }, m = await $r(t, d), g = qr(Gt(s)), v = Hr(g);
737
+ y: s
738
+ }, m = await zr(t, d), g = Gr(Gt(o)), v = $r(g);
739
739
  let S = l[v], _ = l[g];
740
740
  if (i) {
741
741
  const b = v === "y" ? "top" : "left", h = v === "y" ? "bottom" : "right", f = S + m[b], T = S - m[h];
@@ -745,16 +745,16 @@ const Gr = function(e) {
745
745
  const b = g === "y" ? "top" : "left", h = g === "y" ? "bottom" : "right", f = _ + m[b], T = _ - m[h];
746
746
  _ = bt(f, _, T);
747
747
  }
748
- const E = u.fn({
748
+ const y = u.fn({
749
749
  ...t,
750
750
  [v]: S,
751
751
  [g]: _
752
752
  });
753
753
  return {
754
- ...E,
754
+ ...y,
755
755
  data: {
756
- x: E.x - r,
757
- y: E.y - a,
756
+ x: y.x - r,
757
+ y: y.y - s,
758
758
  enabled: {
759
759
  [v]: i,
760
760
  [g]: c
@@ -763,50 +763,50 @@ const Gr = function(e) {
763
763
  };
764
764
  }
765
765
  };
766
- }, Fr = "_navItem_1dudv_1", Kr = "_activeNavItem_1dudv_18", zr = "_badge_1dudv_23", je = {
767
- navItem: Fr,
768
- activeNavItem: Kr,
769
- badge: zr
770
- }, Ft = wt({}), Z = () => Pt(Ft), Jr = (e) => {
771
- const t = e.lastIndexOf("."), r = e.slice(0, t), a = e.slice(t + 1);
772
- return { name: r, extension: a };
773
- }, Qr = (e, t) => {
766
+ }, Qr = "_navItem_1dudv_1", Wr = "_activeNavItem_1dudv_18", Yr = "_badge_1dudv_23", je = {
767
+ navItem: Qr,
768
+ activeNavItem: Wr,
769
+ badge: Yr
770
+ }, Ft = At({}), Z = () => Pt(Ft), Xr = (e) => {
771
+ const t = e.lastIndexOf("."), r = e.slice(0, t), s = e.slice(t + 1);
772
+ return { name: r, extension: s };
773
+ }, Vr = (e, t) => {
774
774
  switch (e) {
775
- case A.Completed:
775
+ case R.Completed:
776
776
  return t < 100 ? "Closed" : "Completed";
777
- case A.Created:
777
+ case R.Created:
778
778
  return t > 0 ? "In progress" : "Not started";
779
- case A.InProgress:
779
+ case R.InProgress:
780
780
  return "In progress";
781
- case A.Queued:
781
+ case R.Queued:
782
782
  return "Queued";
783
- case A.NotStarted:
783
+ case R.NotStarted:
784
784
  return "Not started";
785
785
  default:
786
786
  return "-";
787
787
  }
788
- }, Wr = (e) => {
788
+ }, Zr = (e) => {
789
789
  const t = e.progress ?? 0;
790
- return e.status === A.Created && t > 0 ? A.InProgress : e.status;
791
- }, Yr = {
792
- [ae.translation]: "#0891B2",
793
- [ae.review]: "#16922D",
794
- [ae.lqa_by_ai]: "#8B5CF6",
795
- [ae.automatic_translation]: "#60A5FA"
796
- }, Xr = (e) => {
790
+ return e.status === R.Created && t > 0 ? R.InProgress : e.status;
791
+ }, es = {
792
+ [se.translation]: "#0891B2",
793
+ [se.review]: "#16922D",
794
+ [se.lqa_by_ai]: "#8B5CF6",
795
+ [se.automatic_translation]: "#60A5FA"
796
+ }, ts = (e) => {
797
797
  const t = [
798
- A.InProgress,
799
- A.Created,
800
- A.Completed
798
+ R.InProgress,
799
+ R.Created,
800
+ R.Completed
801
801
  ];
802
- return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status: Wr(r) })).sort((r, a) => r.status === A.InProgress && r.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : r.status === a.status ? r.name < a.name ? 1 : -1 : t.indexOf(r.status) - t.indexOf(a.status));
803
- }, vt = (e) => [Le.InProgress, Le.Created].includes(e), Vr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, Zr = ({ task: e, language: t }) => {
804
- const [r, a] = I(!1), [s, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
802
+ return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status: Zr(r) })).sort((r, s) => r.status === R.InProgress && r.progress === 100 ? -1 : s.status === R.InProgress && s.progress === 100 ? 1 : r.status === s.status ? r.name < s.name ? 1 : -1 : t.indexOf(r.status) - t.indexOf(s.status));
803
+ }, vt = (e) => [Le.InProgress, Le.Created].includes(e), ns = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, rs = ({ task: e, language: t }) => {
804
+ const [r, s] = k(!1), [o, i] = k(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
805
805
  i(!1);
806
806
  };
807
807
  return /* @__PURE__ */ p(He, { children: [
808
- s && /* @__PURE__ */ o(
809
- an,
808
+ o && /* @__PURE__ */ a(
809
+ ln,
810
810
  {
811
811
  opened: !0,
812
812
  loading: r,
@@ -815,16 +815,16 @@ const Gr = function(e) {
815
815
  closeText: "Cancel",
816
816
  onClose: d,
817
817
  onConfirm: async () => {
818
- a(!0), await c({ task: e, language: t, closePrompt: d }), u();
818
+ s(!0), await c({ task: e, language: t, closePrompt: d }), u();
819
819
  },
820
- children: /* @__PURE__ */ p(sn, { status: "info", children: [
820
+ children: /* @__PURE__ */ p(un, { status: "info", children: [
821
821
  "Make sure you are finished and ",
822
- /* @__PURE__ */ o("strong", { children: "mark it as done" }),
822
+ /* @__PURE__ */ a("strong", { children: "mark it as done" }),
823
823
  " to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
824
824
  ] })
825
825
  }
826
826
  ),
827
- /* @__PURE__ */ o(
827
+ /* @__PURE__ */ a(
828
828
  U,
829
829
  {
830
830
  disabled: r,
@@ -835,12 +835,12 @@ const Gr = function(e) {
835
835
  }
836
836
  )
837
837
  ] });
838
- }, ea = "_langRowCompleted_vpgdi_1", ta = "_langCellSecondary_vpgdi_15", na = "_langStatus_vpgdi_20", Ne = {
839
- langRowCompleted: ea,
840
- langCellSecondary: ta,
841
- langStatus: na
842
- }, ra = ({ language: e, task: t }) => {
843
- const { getProjectUrl: r, langNameOnClick: a, langProgressOnClick: s } = Z(), i = e.progress ?? 0, c = e.status === A.Completed, u = Vr(t, e);
838
+ }, ss = "_langRowCompleted_vpgdi_1", os = "_langCellSecondary_vpgdi_15", as = "_langStatus_vpgdi_20", Ne = {
839
+ langRowCompleted: ss,
840
+ langCellSecondary: os,
841
+ langStatus: as
842
+ }, is = ({ language: e, task: t }) => {
843
+ const { getProjectUrl: r, langNameOnClick: s, langProgressOnClick: o } = Z(), i = e.progress ?? 0, c = e.status === R.Completed, u = ns(t, e);
844
844
  return /* @__PURE__ */ p(
845
845
  "tr",
846
846
  {
@@ -848,22 +848,22 @@ const Gr = function(e) {
848
848
  [Ne.langRowCompleted]: u
849
849
  }),
850
850
  children: [
851
- /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(D, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ o(
851
+ /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(D, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ a(
852
852
  U,
853
853
  {
854
854
  href: r({ task: t, language: e }),
855
855
  onClick: () => {
856
- a == null || a({ task: t, language: e });
856
+ s == null || s({ task: t, language: e });
857
857
  },
858
858
  children: e.name
859
859
  }
860
860
  ) }) }),
861
- /* @__PURE__ */ o("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ o(D, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ o(
861
+ /* @__PURE__ */ a("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ a(D, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ a(
862
862
  U,
863
863
  {
864
864
  href: r({ task: t, language: e, taskUncompleted: !0 }),
865
865
  onClick: () => {
866
- s == null || s({ task: t, language: e });
866
+ o == null || o({ task: t, language: e });
867
867
  },
868
868
  children: e.base_words_total - e.base_words_done
869
869
  }
@@ -872,64 +872,64 @@ const Gr = function(e) {
872
872
  i,
873
873
  "%"
874
874
  ] }),
875
- /* @__PURE__ */ o("td", { children: u ? /* @__PURE__ */ o(Zr, { task: t, language: e }) : /* @__PURE__ */ o(
875
+ /* @__PURE__ */ a("td", { children: u ? /* @__PURE__ */ a(rs, { task: t, language: e }) : /* @__PURE__ */ a(
876
876
  "span",
877
877
  {
878
878
  className: `${Ne.langStatus} flex-row items-center justify-start`,
879
879
  "data-status": e.status,
880
- children: Qr(e.status, i)
880
+ children: Vr(e.status, i)
881
881
  }
882
882
  ) })
883
883
  ]
884
884
  }
885
885
  );
886
- }, aa = "_taskContainer_mt2or_1", sa = "_taskTitle_mt2or_21", oa = "_taskDescription_mt2or_28", ia = "_languagesTable_mt2or_35", ca = "_metadata_mt2or_87", q = {
887
- taskContainer: aa,
888
- taskTitle: sa,
889
- taskDescription: oa,
890
- languagesTable: ia,
891
- metadata: ca
892
- }, la = ({ task: e }) => {
893
- const { getProjectUrl: t, taskTitleOnClick: r } = Z(), a = Xr(e.langs), s = (i) => {
886
+ }, cs = "_taskContainer_mt2or_1", ls = "_taskTitle_mt2or_21", us = "_taskDescription_mt2or_28", ds = "_languagesTable_mt2or_35", ms = "_metadata_mt2or_87", B = {
887
+ taskContainer: cs,
888
+ taskTitle: ls,
889
+ taskDescription: us,
890
+ languagesTable: ds,
891
+ metadata: ms
892
+ }, _s = ({ task: e }) => {
893
+ const { getProjectUrl: t, taskTitleOnClick: r } = Z(), s = ts(e.langs), o = (i) => {
894
894
  window.open(
895
895
  `/style-guide/${e.team_id}/download/${i.id}/link`,
896
896
  "_blank",
897
897
  "noopener,noreferrer"
898
898
  );
899
899
  };
900
- return /* @__PURE__ */ p("div", { className: q.taskContainer, children: [
900
+ return /* @__PURE__ */ p("div", { className: B.taskContainer, children: [
901
901
  /* @__PURE__ */ p("div", { className: "flex-row gap-1 items-center", children: [
902
902
  /* @__PURE__ */ p("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
903
- /* @__PURE__ */ o(Oe, { color: Yr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
903
+ /* @__PURE__ */ a(Oe, { color: es[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
904
904
  e.due_date && /* @__PURE__ */ p(Oe, { color: "#EAB308", children: [
905
905
  "DUE ",
906
- pr(un(e.due_date), "yyyy-MM-dd")
906
+ vr(gn(e.due_date), "yyyy-MM-dd")
907
907
  ] })
908
908
  ] }),
909
- e.style_guides.length > 0 && /* @__PURE__ */ o("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ o(
909
+ e.style_guides.length > 0 && /* @__PURE__ */ a("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ a(
910
910
  xe,
911
911
  {
912
912
  size: "sm",
913
913
  variant: "secondary",
914
- onClick: () => s(e.style_guides[0]),
914
+ onClick: () => o(e.style_guides[0]),
915
915
  children: "Download style guide"
916
916
  }
917
- ) : /* @__PURE__ */ o(
917
+ ) : /* @__PURE__ */ a(
918
918
  le,
919
919
  {
920
- menuButton: /* @__PURE__ */ o(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
921
- children: /* @__PURE__ */ o(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ o(
922
- W,
920
+ menuButton: /* @__PURE__ */ a(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
921
+ children: /* @__PURE__ */ a(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ a(
922
+ Y,
923
923
  {
924
- onClick: () => s(i),
925
- children: Jr(i.name).name
924
+ onClick: () => o(i),
925
+ children: Xr(i.name).name
926
926
  },
927
927
  i.id
928
928
  )) })
929
929
  }
930
930
  ) })
931
931
  ] }),
932
- /* @__PURE__ */ o("h4", { className: q.taskTitle, children: /* @__PURE__ */ o(
932
+ /* @__PURE__ */ a("h4", { className: B.taskTitle, children: /* @__PURE__ */ a(
933
933
  U,
934
934
  {
935
935
  href: t({ task: e, view: "multi" }),
@@ -939,79 +939,79 @@ const Gr = function(e) {
939
939
  children: e.title
940
940
  }
941
941
  ) }),
942
- e.description && /* @__PURE__ */ o("div", { className: q.taskDescription, children: mr(hr(e.description)) }),
943
- /* @__PURE__ */ p("table", { className: q.languagesTable, children: [
944
- /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ p("tr", { children: [
945
- /* @__PURE__ */ o("th", { children: "Languages" }),
946
- /* @__PURE__ */ o("th", { children: "Words to do" }),
947
- /* @__PURE__ */ o("th", { children: "Progress" }),
948
- /* @__PURE__ */ o("th", { children: "Status" })
942
+ e.description && /* @__PURE__ */ a("div", { className: B.taskDescription, children: pr(Tr(e.description)) }),
943
+ /* @__PURE__ */ p("table", { className: B.languagesTable, children: [
944
+ /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ p("tr", { children: [
945
+ /* @__PURE__ */ a("th", { children: "Languages" }),
946
+ /* @__PURE__ */ a("th", { children: "Words to do" }),
947
+ /* @__PURE__ */ a("th", { children: "Progress" }),
948
+ /* @__PURE__ */ a("th", { children: "Status" })
949
949
  ] }) }),
950
- /* @__PURE__ */ o("tbody", { children: a.map((i) => /* @__PURE__ */ o(ra, { language: i, task: e }, i.lang_id)) })
950
+ /* @__PURE__ */ a("tbody", { children: s.map((i) => /* @__PURE__ */ a(is, { language: i, task: e }, i.lang_id)) })
951
951
  ] }),
952
- /* @__PURE__ */ p("div", { "data-testid": "sidebar-task-overview-metadata", className: q.metadata, children: [
952
+ /* @__PURE__ */ p("div", { "data-testid": "sidebar-task-overview-metadata", className: B.metadata, children: [
953
953
  /* @__PURE__ */ p("span", { children: [
954
954
  "Source: ",
955
955
  e.source_lang_name
956
956
  ] }),
957
- /* @__PURE__ */ o("span", { children: e.created_by_fullname }),
957
+ /* @__PURE__ */ a("span", { children: e.created_by_fullname }),
958
958
  /* @__PURE__ */ p("span", { children: [
959
959
  "In ",
960
960
  e.project_name,
961
- e.master_branching_enabled === "1" && /* @__PURE__ */ o("div", { className: q.tag, children: e.branch_name ? e.branch_name : "master" })
961
+ e.master_branching_enabled === "1" && /* @__PURE__ */ a("div", { className: B.tag, children: e.branch_name ? e.branch_name : "master" })
962
962
  ] })
963
963
  ] })
964
964
  ] });
965
- }, w = {
965
+ }, A = {
966
966
  TaskCompleted: "task_completed",
967
967
  TaskClosed: "task_closed",
968
968
  Refresh: "refresh",
969
969
  ShowDialog: "show_dialog"
970
- }, ua = "_loadingContainer_19d6m_1", da = "_noTasksContainer_19d6m_7", ma = "_noTasksHeading_19d6m_14", _a = "_noTasksText_19d6m_18", ga = "_tasksContainer_19d6m_23", K = {
971
- loadingContainer: ua,
972
- noTasksContainer: da,
973
- noTasksHeading: ma,
974
- noTasksText: _a,
975
- tasksContainer: ga
976
- }, ha = () => {
977
- const { tasks: e, onTasksWidgetOpen: t, loadingTasks: r, fetchTasks: a } = Z();
970
+ }, gs = "_loadingContainer_19d6m_1", hs = "_noTasksContainer_19d6m_7", ps = "_noTasksHeading_19d6m_14", fs = "_noTasksText_19d6m_18", bs = "_tasksContainer_19d6m_23", z = {
971
+ loadingContainer: gs,
972
+ noTasksContainer: hs,
973
+ noTasksHeading: ps,
974
+ noTasksText: fs,
975
+ tasksContainer: bs
976
+ }, Ts = () => {
977
+ const { tasks: e, onTasksWidgetOpen: t, loadingTasks: r, fetchTasks: s } = Z();
978
978
  return $e(() => ((async () => {
979
- const i = await a();
979
+ const i = await s();
980
980
  t == null || t({ tasks: i });
981
- })(), document.addEventListener(w.TaskCompleted, a), document.addEventListener(w.TaskClosed, a), document.addEventListener(w.Refresh, a), () => {
982
- document.removeEventListener(w.TaskCompleted, a), document.removeEventListener(w.TaskClosed, a), document.removeEventListener(w.Refresh, a);
983
- })), r ? /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-loading-popover", className: K.loadingContainer, children: /* @__PURE__ */ o(on, {}) }) : e.length === 0 ? /* @__PURE__ */ p("div", { "data-testid": "sidebar-no-tasks-popover", className: K.noTasksContainer, children: [
984
- /* @__PURE__ */ o("h3", { className: K.noTasksHeading, children: "No tasks" }),
985
- /* @__PURE__ */ p("div", { className: K.noTasksText, children: [
981
+ })(), document.addEventListener(A.TaskCompleted, s), document.addEventListener(A.TaskClosed, s), document.addEventListener(A.Refresh, s), () => {
982
+ document.removeEventListener(A.TaskCompleted, s), document.removeEventListener(A.TaskClosed, s), document.removeEventListener(A.Refresh, s);
983
+ })), r ? /* @__PURE__ */ a("div", { "data-testid": "sidebar-tasks-loading-popover", className: z.loadingContainer, children: /* @__PURE__ */ a(dn, {}) }) : e.length === 0 ? /* @__PURE__ */ p("div", { "data-testid": "sidebar-no-tasks-popover", className: z.noTasksContainer, children: [
984
+ /* @__PURE__ */ a("h3", { className: z.noTasksHeading, children: "No tasks" }),
985
+ /* @__PURE__ */ p("div", { className: z.noTasksText, children: [
986
986
  "Your incoming tasks will appear here.",
987
- /* @__PURE__ */ o("br", {}),
988
- /* @__PURE__ */ o(U, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
987
+ /* @__PURE__ */ a("br", {}),
988
+ /* @__PURE__ */ a(U, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
989
989
  ] })
990
- ] }) : /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-popover", className: K.tasksContainer, children: e.map((s) => /* @__PURE__ */ o(la, { task: s }, s.id)) });
991
- }, pa = ({ children: e, config: t }) => {
992
- const [r, a] = I([]), [s, i] = I(!0), [c, u] = I(0), {
990
+ ] }) : /* @__PURE__ */ a("div", { "data-testid": "sidebar-tasks-popover", className: z.tasksContainer, children: e.map((o) => /* @__PURE__ */ a(_s, { task: o }, o.id)) });
991
+ }, vs = ({ children: e, config: t }) => {
992
+ const [r, s] = k([]), [o, i] = k(!0), [c, u] = k(0), {
993
993
  getProjectUrl: d,
994
994
  onLanguageCompleteConfirm: l,
995
995
  onTasksWidgetOpen: m,
996
996
  langNameOnClick: g,
997
997
  langProgressOnClick: v,
998
998
  taskTitleOnClick: S
999
- } = t, { getTasks: _, getTasksCount: E } = t, b = async () => {
999
+ } = t, { getTasks: _, getTasksCount: y } = t, b = async () => {
1000
1000
  i(!0);
1001
1001
  const T = await _();
1002
- return a(T), i(!1), T;
1002
+ return s(T), i(!1), T;
1003
1003
  }, h = async () => {
1004
- const T = await E();
1004
+ const T = await y();
1005
1005
  u(T);
1006
1006
  };
1007
- $e(() => (h(), document.addEventListener(w.TaskCompleted, h), document.addEventListener(w.TaskClosed, h), document.addEventListener(w.Refresh, h), () => {
1008
- document.removeEventListener(w.TaskCompleted, h), document.removeEventListener(w.TaskClosed, h), document.removeEventListener(w.Refresh, h);
1007
+ $e(() => (h(), document.addEventListener(A.TaskCompleted, h), document.addEventListener(A.TaskClosed, h), document.addEventListener(A.Refresh, h), () => {
1008
+ document.removeEventListener(A.TaskCompleted, h), document.removeEventListener(A.TaskClosed, h), document.removeEventListener(A.Refresh, h);
1009
1009
  }));
1010
1010
  const f = {
1011
1011
  fetchTasks: b,
1012
1012
  tasks: r,
1013
1013
  tasksCount: c,
1014
- loadingTasks: s,
1014
+ loadingTasks: o,
1015
1015
  getProjectUrl: d,
1016
1016
  onLanguageCompleteConfirm: l,
1017
1017
  onTasksWidgetOpen: m,
@@ -1019,28 +1019,28 @@ const Gr = function(e) {
1019
1019
  langProgressOnClick: v,
1020
1020
  taskTitleOnClick: S
1021
1021
  };
1022
- return /* @__PURE__ */ o(Ft.Provider, { value: f, children: e });
1023
- }, fa = (e) => function(r) {
1024
- const { config: a, ...s } = r;
1025
- return /* @__PURE__ */ o(pa, { config: a, children: /* @__PURE__ */ o(e, { ...s }) });
1026
- }, ba = fa(() => {
1027
- const [e, t] = I(!1), { tasksCount: r } = Z();
1022
+ return /* @__PURE__ */ a(Ft.Provider, { value: f, children: e });
1023
+ }, Ss = (e) => function(r) {
1024
+ const { config: s, ...o } = r;
1025
+ return /* @__PURE__ */ a(vs, { config: s, children: /* @__PURE__ */ a(e, { ...o }) });
1026
+ }, Es = Ss(() => {
1027
+ const [e, t] = k(!1), { tasksCount: r } = Z();
1028
1028
  return $e(() => {
1029
- const a = () => {
1029
+ const s = () => {
1030
1030
  t(!0);
1031
1031
  };
1032
- return document.addEventListener(w.ShowDialog, a), () => {
1033
- document.removeEventListener(w.ShowDialog, a);
1032
+ return document.addEventListener(A.ShowDialog, s), () => {
1033
+ document.removeEventListener(A.ShowDialog, s);
1034
1034
  };
1035
- }), /* @__PURE__ */ o(D, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ o(
1036
- cn,
1035
+ }), /* @__PURE__ */ a(D, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ a(
1036
+ mn,
1037
1037
  {
1038
- content: /* @__PURE__ */ o(ha, {}),
1038
+ content: /* @__PURE__ */ a(Ts, {}),
1039
1039
  placement: "right",
1040
1040
  open: e,
1041
1041
  onOpenChange: t,
1042
1042
  middlewares: [
1043
- Gr({
1043
+ Jr({
1044
1044
  // Adding some spacing to the top and bottom so the popover
1045
1045
  // doesn't extend to the edges of the screen.
1046
1046
  padding: {
@@ -1049,64 +1049,64 @@ const Gr = function(e) {
1049
1049
  }
1050
1050
  })
1051
1051
  ],
1052
- children: (a) => /* @__PURE__ */ p(
1052
+ children: (s) => /* @__PURE__ */ p(
1053
1053
  xe,
1054
1054
  {
1055
1055
  type: "button",
1056
1056
  "data-testid": "sidebar-tasks-widget-button",
1057
1057
  "aria-label": "Tasks",
1058
1058
  className: j(je.navItem, {
1059
- [je.activeNavItem]: a
1059
+ [je.activeNavItem]: s
1060
1060
  }),
1061
1061
  children: [
1062
- /* @__PURE__ */ o(ln, { size: "25px" }),
1063
- r > 0 && /* @__PURE__ */ o("div", { className: je.badge, "aria-label": `${r} items requiring attention`, children: r > 9 ? "9+" : r })
1062
+ /* @__PURE__ */ a(_n, { size: "25px" }),
1063
+ r > 0 && /* @__PURE__ */ a("div", { className: je.badge, "aria-label": `${r} items requiring attention`, children: r > 9 ? "9+" : r })
1064
1064
  ]
1065
1065
  }
1066
1066
  )
1067
1067
  }
1068
1068
  ) });
1069
- }), R = ({ children: e, ...t }) => /* @__PURE__ */ o("nav", { ...t, className: Bn.sidebarContainer, children: e }), Ta = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
1070
- R.Top = Ta;
1071
- const va = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
1072
- R.Bottom = va;
1073
- R.Avatar = Gn;
1074
- R.IconLink = zn;
1075
- R.Menu = Wn;
1076
- R.ProfileMenu = br;
1077
- R.TeamSwitch = jr;
1078
- R.TeamMenuItem = Dt;
1079
- R.UpgradeMenuItem = Lr;
1080
- R.ProfileSettingsMenuItem = Sr;
1081
- R.Tasks = ba;
1082
- const Sa = "_breadcrumbsItem_1hm6a_1", ya = "_breadcrumbs_1hm6a_1", St = {
1083
- breadcrumbsItem: Sa,
1084
- breadcrumbs: ya
1085
- }, to = ({ items: e }) => /* @__PURE__ */ o("nav", { "aria-label": "breadcrumb", className: St.breadcrumbs, children: e.map((t, r) => /* @__PURE__ */ p(At, { children: [
1086
- /* @__PURE__ */ o(U, { className: St.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
1087
- r < e.length - 1 && /* @__PURE__ */ o("span", { children: " — " })
1088
- ] }, `${t.link}-${t.name}`)) }), Ea = ({ items: e }) => /* @__PURE__ */ o(He, { children: e.map((t, r) => /* @__PURE__ */ p(At, { children: [
1089
- !!r && t.some((a) => a.visible) && /* @__PURE__ */ o(kt, {}),
1090
- t.filter(({ visible: a }) => a).map(({ link: a, label: s, onClick: i }) => /* @__PURE__ */ o(W, { href: a || "#", "aria-label": s, onClick: i, children: s }, s))
1091
- ] }, t[0].label)) }), Ca = "_badge_1pc1v_1", Pa = "_tag_1pc1v_15", wa = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Aa = "_disabled_1pc1v_57", Ra = "_projectNavigationItem_1pc1v_61", ka = "_projectNavigationItemDisabled_1pc1v_67", M = {
1092
- badge: Ca,
1093
- tag: Pa,
1094
- withNavLinkStyle: wa,
1095
- disabled: Aa,
1096
- projectNavigationItem: Ra,
1097
- projectNavigationItemDisabled: ka
1098
- }, yt = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
1069
+ }), w = ({ children: e, ...t }) => /* @__PURE__ */ a("nav", { ...t, className: Fn.sidebarContainer, children: e }), ys = ({ children: e }) => /* @__PURE__ */ a("div", { children: e });
1070
+ w.Top = ys;
1071
+ const Cs = ({ children: e }) => /* @__PURE__ */ a("div", { children: e });
1072
+ w.Bottom = Cs;
1073
+ w.Avatar = Jn;
1074
+ w.IconLink = Yn;
1075
+ w.Menu = Zn;
1076
+ w.ProfileMenu = Er;
1077
+ w.TeamSwitch = Lr;
1078
+ w.TeamMenuItem = Dt;
1079
+ w.UpgradeMenuItem = Br;
1080
+ w.ProfileSettingsMenuItem = Pr;
1081
+ w.Tasks = Es;
1082
+ const Ps = "_breadcrumbsItem_1hm6a_1", As = "_breadcrumbs_1hm6a_1", St = {
1083
+ breadcrumbsItem: Ps,
1084
+ breadcrumbs: As
1085
+ }, ia = ({ items: e }) => /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", className: St.breadcrumbs, children: e.map((t, r) => /* @__PURE__ */ p(Rt, { children: [
1086
+ /* @__PURE__ */ a(U, { className: St.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
1087
+ r < e.length - 1 && /* @__PURE__ */ a("span", { children: " — " })
1088
+ ] }, `${t.link}-${t.name}`)) }), Rs = ({ items: e }) => /* @__PURE__ */ a(He, { children: e.map((t, r) => /* @__PURE__ */ p(Rt, { children: [
1089
+ !!r && t.some((s) => s.visible) && /* @__PURE__ */ a(It, {}),
1090
+ t.filter(({ visible: s }) => s).map(({ link: s, label: o, onClick: i }) => /* @__PURE__ */ a(Y, { href: s || "#", "aria-label": o, onClick: i, children: o }, o))
1091
+ ] }, t[0].label)) }), ws = "_badge_1pc1v_1", Is = "_tag_1pc1v_15", ks = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", js = "_disabled_1pc1v_57", Ns = "_projectNavigationItem_1pc1v_61", Os = "_projectNavigationItemDisabled_1pc1v_67", M = {
1092
+ badge: ws,
1093
+ tag: Is,
1094
+ withNavLinkStyle: ks,
1095
+ disabled: js,
1096
+ projectNavigationItem: Ns,
1097
+ projectNavigationItemDisabled: Os
1098
+ }, Et = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
1099
1099
  /* @__PURE__ */ p("div", { children: [
1100
- /* @__PURE__ */ o("span", { children: e }),
1101
- !!t && /* @__PURE__ */ o("div", { className: M.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
1100
+ /* @__PURE__ */ a("span", { children: e }),
1101
+ !!t && /* @__PURE__ */ a("div", { className: M.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
1102
1102
  ] }),
1103
- !!r && /* @__PURE__ */ o(Oe, { className: M.tag, children: r })
1104
- ] }), Me = nn(
1105
- ({ label: e, href: t = "", disabled: r = !1, badge: a, onClick: s, novel: i }, c) => /* @__PURE__ */ o(D, { tooltip: "You do not have access to this function", show: r, children: /* @__PURE__ */ o(
1103
+ !!r && /* @__PURE__ */ a(Oe, { className: M.tag, children: r })
1104
+ ] }), Me = an(
1105
+ ({ label: e, href: t = "", disabled: r = !1, badge: s, onClick: o, novel: i }, c) => /* @__PURE__ */ a(D, { tooltip: "You do not have access to this function", show: r, children: /* @__PURE__ */ a(
1106
1106
  "div",
1107
1107
  {
1108
1108
  className: r ? M.projectNavigationItemDisabled : M.projectNavigationItem,
1109
- children: s || r || !t ? /* @__PURE__ */ o(
1109
+ children: o || r || !t ? /* @__PURE__ */ a(
1110
1110
  "button",
1111
1111
  {
1112
1112
  type: "button",
@@ -1115,38 +1115,38 @@ const Sa = "_breadcrumbsItem_1hm6a_1", ya = "_breadcrumbs_1hm6a_1", St = {
1115
1115
  [M.disabled]: r
1116
1116
  }),
1117
1117
  disabled: r,
1118
- onClick: s,
1119
- children: /* @__PURE__ */ o(yt, { label: e, badge: a, novel: i })
1118
+ onClick: o,
1119
+ children: /* @__PURE__ */ a(Et, { label: e, badge: s, novel: i })
1120
1120
  }
1121
- ) : /* @__PURE__ */ o("a", { href: t, className: M.withNavLinkStyle, children: /* @__PURE__ */ o(yt, { label: e, badge: a, novel: i }) })
1121
+ ) : /* @__PURE__ */ a("a", { href: t, className: M.withNavLinkStyle, children: /* @__PURE__ */ a(Et, { label: e, badge: s, novel: i }) })
1122
1122
  }
1123
1123
  ) })
1124
1124
  );
1125
1125
  Me.displayName = "NavigationTabsItem";
1126
- const Ia = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, ja = (e) => e.visible && (!e.dropdown || Ia(e.dropdown)), no = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ o("nav", { "aria-label": "Project", children: /* @__PURE__ */ o("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(ja).map((r) => {
1127
- var a, s, i;
1128
- return r.dropdown ? /* @__PURE__ */ o(
1126
+ const xs = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, Ls = (e) => e.visible && (!e.dropdown || xs(e.dropdown)), ca = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ a("nav", { "aria-label": "Project", children: /* @__PURE__ */ a("ul", { className: q.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ls).map((r) => {
1127
+ var s, o, i;
1128
+ return r.dropdown ? /* @__PURE__ */ a(
1129
1129
  "li",
1130
1130
  {
1131
- className: B.navigationTab,
1131
+ className: q.navigationTab,
1132
1132
  "data-testid": r.key,
1133
- "aria-selected": (a = r.isActive) == null ? void 0 : a.call(r, t),
1134
- children: /* @__PURE__ */ o(
1133
+ "aria-selected": (s = r.isActive) == null ? void 0 : s.call(r, t),
1134
+ children: /* @__PURE__ */ a(
1135
1135
  le,
1136
1136
  {
1137
- menuButton: ({ opened: c }) => /* @__PURE__ */ o(Me, { label: r.label, disabled: r.disabled, active: c }),
1138
- children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(Ea, { items: r.dropdown }) })
1137
+ menuButton: ({ opened: c }) => /* @__PURE__ */ a(Me, { label: r.label, disabled: r.disabled, active: c }),
1138
+ children: /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(Rs, { items: r.dropdown }) })
1139
1139
  }
1140
1140
  )
1141
1141
  },
1142
1142
  r.key
1143
- ) : /* @__PURE__ */ o(
1143
+ ) : /* @__PURE__ */ a(
1144
1144
  "li",
1145
1145
  {
1146
- className: B.navigationTab,
1146
+ className: q.navigationTab,
1147
1147
  "data-testid": r.key,
1148
- "aria-selected": (s = r.isActive) == null ? void 0 : s.call(r, t),
1149
- children: /* @__PURE__ */ o(
1148
+ "aria-selected": (o = r.isActive) == null ? void 0 : o.call(r, t),
1149
+ children: /* @__PURE__ */ a(
1150
1150
  Me,
1151
1151
  {
1152
1152
  label: r.label,
@@ -1162,7 +1162,7 @@ const Ia = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible)))
1162
1162
  r.key
1163
1163
  );
1164
1164
  }) }) });
1165
- class k {
1165
+ class I {
1166
1166
  /**
1167
1167
  * This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail
1168
1168
  * that users of this class should not be aware of. The only way to create a HeaderBuilder is through the
@@ -1174,7 +1174,7 @@ class k {
1174
1174
  this.factories = t;
1175
1175
  }
1176
1176
  static create(t = {}) {
1177
- return new k([() => t]);
1177
+ return new I([() => t]);
1178
1178
  }
1179
1179
  /**
1180
1180
  * Adds a single header to the builder by providing a key and a value.
@@ -1194,7 +1194,7 @@ class k {
1194
1194
  * @param value - The value of the header
1195
1195
  */
1196
1196
  add(t, r) {
1197
- return new k([...this.factories, () => ({ [t]: r })]);
1197
+ return new I([...this.factories, () => ({ [t]: r })]);
1198
1198
  }
1199
1199
  /**
1200
1200
  * Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
@@ -1218,7 +1218,7 @@ class k {
1218
1218
  * @param extension - An object with the headers to add
1219
1219
  */
1220
1220
  and(t) {
1221
- return new k([...this.factories, () => t]);
1221
+ return new I([...this.factories, () => t]);
1222
1222
  }
1223
1223
  /**
1224
1224
  * Adds a factory function that returns a promise of headers to the builder.
@@ -1239,7 +1239,7 @@ class k {
1239
1239
  * @param factory - A function that returns a promise of headers
1240
1240
  */
1241
1241
  from(t) {
1242
- return new k([...this.factories, t]);
1242
+ return new I([...this.factories, t]);
1243
1243
  }
1244
1244
  /**
1245
1245
  * Takes a middleware function that receives the current builder and returns a new, modified, builder.
@@ -1284,7 +1284,7 @@ class k {
1284
1284
  * @param builder - The builder to merge with
1285
1285
  */
1286
1286
  merge(t) {
1287
- return new k([...this.factories, ...t.factories]);
1287
+ return new I([...this.factories, ...t.factories]);
1288
1288
  }
1289
1289
  /**
1290
1290
  * Resolves the headers by waiting for all the promises to resolve and merging them together.
@@ -1298,21 +1298,21 @@ class k {
1298
1298
  * console.log(headers) // { 'Content-Type': 'application/json' }
1299
1299
  */
1300
1300
  async resolve() {
1301
- const t = this.factories.map((a) => a()), r = await Promise.all(t);
1301
+ const t = this.factories.map((s) => s()), r = await Promise.all(t);
1302
1302
  return Object.assign({}, ...r);
1303
1303
  }
1304
1304
  }
1305
1305
  function Kt(e) {
1306
- return new Na(e);
1306
+ return new Ms(e);
1307
1307
  }
1308
- class Na {
1308
+ class Ms {
1309
1309
  constructor(t) {
1310
1310
  this.middleware = t;
1311
1311
  }
1312
1312
  apply(t) {
1313
1313
  return t.from(async () => {
1314
- const r = this.middleware(k.create());
1315
- return r instanceof Promise ? r.then((a) => a.resolve()) : r.resolve();
1314
+ const r = this.middleware(I.create());
1315
+ return r instanceof Promise ? r.then((s) => s.resolve()) : r.resolve();
1316
1316
  });
1317
1317
  }
1318
1318
  }
@@ -1321,7 +1321,7 @@ const zt = n.union([
1321
1321
  n.literal("admin"),
1322
1322
  n.literal("biller"),
1323
1323
  n.literal("member")
1324
- ]), Oa = n.object({
1324
+ ]), Us = n.object({
1325
1325
  userId: n.number(),
1326
1326
  userUuid: n.string().uuid(),
1327
1327
  teamId: n.number(),
@@ -1339,7 +1339,7 @@ const zt = n.union([
1339
1339
  function ee(e) {
1340
1340
  try {
1341
1341
  const t = e.split(".")[1], r = atob(t);
1342
- return Oa.parse(JSON.parse(r));
1342
+ return Us.parse(JSON.parse(r));
1343
1343
  } catch {
1344
1344
  return;
1345
1345
  }
@@ -1351,36 +1351,36 @@ class ie extends Error {
1351
1351
  re(this, "status", 401);
1352
1352
  }
1353
1353
  }
1354
- function ro(e) {
1354
+ function la(e) {
1355
1355
  return Kt(async (t) => {
1356
1356
  var i, c;
1357
1357
  const r = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
1358
1358
  if (!r)
1359
1359
  throw new ie();
1360
- const { exp: a } = ee(r.accessToken) ?? { exp: 0 };
1361
- if (!dn(new Date(a)))
1360
+ const { exp: s } = ee(r.accessToken) ?? { exp: 0 };
1361
+ if (!hn(new Date(s)))
1362
1362
  return t.add("authorization", `Bearer ${r.accessToken}`);
1363
- const s = await e.refreshToken(r);
1364
- if (!s)
1363
+ const o = await e.refreshToken(r);
1364
+ if (!o)
1365
1365
  throw new ie();
1366
- return (c = e.onNewTokenIssued) == null || c.call(e, s), t.add("authorization", `Bearer ${s.accessToken}`);
1366
+ return (c = e.onNewTokenIssued) == null || c.call(e, o), t.add("authorization", `Bearer ${o.accessToken}`);
1367
1367
  });
1368
1368
  }
1369
- const ao = Kt(
1369
+ const ua = Kt(
1370
1370
  (e) => e.and({ "x-lokalise-plugin": "true" })
1371
1371
  );
1372
1372
  function Jt() {
1373
1373
  const e = Ue(document.cookie, "accessToken"), t = Ue(document.cookie, "refreshToken");
1374
1374
  return !e || !t ? null : { accessToken: e, refreshToken: t };
1375
1375
  }
1376
- function xa() {
1376
+ function Hs() {
1377
1377
  return Ue(document.cookie, "csrf_token") ?? null;
1378
1378
  }
1379
1379
  function Ue(e, t) {
1380
- var r, a;
1381
- return (a = (r = e.split(";").find((s) => s.trim().startsWith(`${t}=`))) == null ? void 0 : r.trim()) == null ? void 0 : a.substring(t.length + 1);
1380
+ var r, s;
1381
+ return (s = (r = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : r.trim()) == null ? void 0 : s.substring(t.length + 1);
1382
1382
  }
1383
- function so() {
1383
+ function da() {
1384
1384
  const e = Jt();
1385
1385
  if (!e)
1386
1386
  return;
@@ -1391,68 +1391,68 @@ function so() {
1391
1391
  const Qt = n.union([
1392
1392
  n.object({ authorization: n.string() }),
1393
1393
  n.object({ AUTHORIZATION: n.string() })
1394
- ]), La = n.union([
1394
+ ]), Bs = n.union([
1395
1395
  n.object({ "X-API-Token": n.string() }),
1396
1396
  n.object({ "X-Api-Token": n.string() }),
1397
1397
  n.object({ "x-api-token": n.string() }),
1398
1398
  n.object({ "X-API-TOKEN": n.string() })
1399
- ]), Ma = n.union([
1399
+ ]), qs = n.union([
1400
1400
  Qt,
1401
- La
1402
- ]), Ua = n.union([
1401
+ Bs
1402
+ ]), Ds = n.union([
1403
1403
  n.object({ "X-Lokalise-Plugin": n.string() }),
1404
1404
  n.object({ "x-lokalise-plugin": n.string() }),
1405
1405
  n.object({ "X-LOKALISE-PLUGIN": n.string() })
1406
- ]), x = Ma.and(Ua), Ha = n.object({
1406
+ ]), N = qs.and(Ds), $s = n.object({
1407
1407
  accessToken: n.string(),
1408
1408
  refreshToken: n.string()
1409
- }), qa = n.union([
1409
+ }), Gs = n.union([
1410
1410
  n.object({ "X-Csrf-Token": n.string() }),
1411
1411
  n.object({ "X-CSRF-Token": n.string() }),
1412
1412
  n.object({ "x-csrf-token": n.string() }),
1413
1413
  n.object({ "X-CSRF-TOKEN": n.string() })
1414
- ]), Ba = n.union([
1414
+ ]), Fs = n.union([
1415
1415
  Qt,
1416
- qa
1417
- ]), Ge = Y({
1416
+ Gs
1417
+ ]), Ge = X({
1418
1418
  description: "Takes a teamId and returns a JWT token access and refresh token for the user",
1419
1419
  method: "post",
1420
1420
  requestPathParamsSchema: n.object({ teamId: n.number() }),
1421
1421
  pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
1422
- requestHeaderSchema: Ba,
1422
+ requestHeaderSchema: Fs,
1423
1423
  requestBodySchema: n.undefined(),
1424
1424
  isEmptyResponseExpected: !0,
1425
- successResponseBodySchema: Ha
1425
+ successResponseBodySchema: $s
1426
1426
  });
1427
- function oo(e, t, r) {
1427
+ function ma(e, t, r) {
1428
1428
  return async () => {
1429
- const a = t();
1430
- if (!a)
1429
+ const s = t();
1430
+ if (!s)
1431
1431
  throw new ie();
1432
- return $(e, Ge, {
1432
+ return G(e, Ge, {
1433
1433
  pathParams: { teamId: Number(await r()) },
1434
- headers: await k.create().add("x-csrf-token", a).resolve()
1434
+ headers: await I.create().add("x-csrf-token", s).resolve()
1435
1435
  });
1436
1436
  };
1437
1437
  }
1438
- function io(e) {
1438
+ function _a(e) {
1439
1439
  return async ({ accessToken: t, refreshToken: r }) => {
1440
- const a = ee(t);
1441
- if (!a)
1440
+ const s = ee(t);
1441
+ if (!s)
1442
1442
  throw new ie();
1443
- return $(e, Ge, {
1444
- pathParams: { teamId: a.teamId },
1445
- headers: await k.create().add("authorization", `Bearer ${r}`).resolve()
1443
+ return G(e, Ge, {
1444
+ pathParams: { teamId: s.teamId },
1445
+ headers: await I.create().add("authorization", `Bearer ${r}`).resolve()
1446
1446
  });
1447
1447
  };
1448
1448
  }
1449
- const Da = {
1449
+ const Ks = {
1450
1450
  teamKey: (e) => ["getUserToken", e]
1451
- }, $a = (e, t, r) => H({
1451
+ }, zs = (e, t, r) => H({
1452
1452
  ...r,
1453
- queryFn: async ({ queryKey: [a, s] }) => $(e, Ge, {
1453
+ queryFn: async ({ queryKey: [s, o] }) => G(e, Ge, {
1454
1454
  headers: await t.resolve(),
1455
- pathParams: { teamId: s }
1455
+ pathParams: { teamId: o }
1456
1456
  })
1457
1457
  }), ce = class ce extends CustomEvent {
1458
1458
  constructor(t) {
@@ -1462,125 +1462,138 @@ const Da = {
1462
1462
  }
1463
1463
  };
1464
1464
  re(ce, "eventName", "new-jwt-issued");
1465
- let J = ce;
1466
- function co(e, t, r) {
1467
- const a = xa(), s = $a(e, t.add("x-csrf-token", a ?? ""), {
1468
- queryKey: Da.teamKey(r),
1469
- enabled: a !== void 0
1465
+ let Q = ce;
1466
+ function ga(e, t, r) {
1467
+ const s = Hs(), o = zs(e, t.add("x-csrf-token", s ?? ""), {
1468
+ queryKey: Ks.teamKey(r),
1469
+ enabled: s !== void 0
1470
1470
  }), i = Ct();
1471
- return Q(() => {
1472
- s.data && s.data.accessToken !== i.current && (window.dispatchEvent(new J(s.data)), i.current = s.data.accessToken);
1473
- }, [s.data]), s;
1471
+ return W(() => {
1472
+ o.data && o.data.accessToken !== i.current && (window.dispatchEvent(new Q(o.data)), i.current = o.data.accessToken);
1473
+ }, [o.data]), o;
1474
1474
  }
1475
1475
  function Wt() {
1476
- const [e, t] = I();
1477
- return Q(() => {
1478
- const r = (s) => {
1479
- t(s.detail.payload);
1480
- }, a = Jt();
1481
- return t(a ? ee(a.accessToken) : void 0), window.addEventListener(J.eventName, r), () => {
1482
- window.removeEventListener(J.eventName, r);
1476
+ const [e, t] = k();
1477
+ return W(() => {
1478
+ const r = (o) => {
1479
+ t(o.detail.payload);
1480
+ }, s = Jt();
1481
+ return t(s ? ee(s.accessToken) : void 0), window.addEventListener(Q.eventName, r), () => {
1482
+ window.removeEventListener(Q.eventName, r);
1483
1483
  };
1484
1484
  }, []), e;
1485
1485
  }
1486
- const Ga = x, Fa = n.object({
1486
+ const Js = N, Qs = n.object({
1487
1487
  user_id: n.number(),
1488
1488
  email: n.string().email(),
1489
1489
  fullname: n.string(),
1490
1490
  created_at: n.string(),
1491
1491
  created_at_timestamp: n.number(),
1492
1492
  role: zt
1493
- }), Ka = n.object({
1493
+ }), Ws = n.object({
1494
1494
  teamId: n.number(),
1495
1495
  userId: n.number()
1496
- }), za = n.object({
1496
+ }), Ys = n.object({
1497
1497
  team_id: n.number(),
1498
- team_user: Fa
1499
- }), Ja = X({
1498
+ team_user: Qs
1499
+ }), Xs = $({
1500
1500
  description: "Get the details of a team user",
1501
- requestHeaderSchema: Ga,
1502
- requestPathParamsSchema: Ka,
1501
+ requestHeaderSchema: Js,
1502
+ requestPathParamsSchema: Ws,
1503
1503
  pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
1504
- successResponseBodySchema: za
1505
- }), Qa = {
1504
+ successResponseBodySchema: Ys
1505
+ }), Vs = {
1506
1506
  teamUserKey: (e, t) => ["GetTeamUsers", e, t]
1507
- }, Wa = (e, t, r) => H({
1507
+ }, Zs = (e, t, r) => H({
1508
1508
  ...r,
1509
- queryFn: async ({ queryKey: [a, s, i] }) => G(e, Ja, {
1509
+ queryFn: async ({ queryKey: [s, o, i] }) => F(e, Xs, {
1510
1510
  headers: await t.resolve(),
1511
- pathParams: { teamId: s, userId: i }
1511
+ pathParams: { teamId: o, userId: i }
1512
1512
  })
1513
1513
  });
1514
- function lo(e, t) {
1514
+ function ha(e, t) {
1515
1515
  const r = Wt();
1516
- return Wa(e, t, {
1517
- queryKey: Qa.teamUserKey((r == null ? void 0 : r.teamId) ?? 0, (r == null ? void 0 : r.userId) ?? 0),
1516
+ return Zs(e, t, {
1517
+ queryKey: Vs.teamUserKey((r == null ? void 0 : r.teamId) ?? 0, (r == null ? void 0 : r.userId) ?? 0),
1518
1518
  enabled: (r == null ? void 0 : r.userId) !== void 0 && r.teamId !== void 0
1519
1519
  });
1520
1520
  }
1521
- const uo = x, Ya = n.object({
1521
+ const pa = N, eo = n.object({
1522
1522
  lang_id: n.number(),
1523
1523
  lang_iso: n.string(),
1524
1524
  lang_name: n.string(),
1525
- is_writable: n.union([n.literal(0), n.literal(1)])
1526
- }), Xa = n.object({
1525
+ is_writable: n.union([
1526
+ n.literal(0),
1527
+ n.literal(1),
1528
+ n.boolean()
1529
+ // (╥﹏╥) this is a workaround for the API returning boolean instead of 0/1, as the API spec says
1530
+ ])
1531
+ }), Yt = n.object({
1527
1532
  user_id: n.number(),
1528
1533
  email: n.string().email(),
1529
1534
  fullname: n.string(),
1530
1535
  created_at: n.string(),
1531
1536
  created_at_timestamp: n.number(),
1532
1537
  admin_rights: n.array(n.string()),
1533
- languages: n.array(Ya),
1538
+ languages: n.array(eo),
1534
1539
  is_admin: n.boolean(),
1535
1540
  is_reviewer: n.boolean()
1536
- }), Va = n.union([
1537
- n.object({ uuid: n.string().uuid() }),
1538
- n.object({ id: n.string() })
1539
- ]), Za = n.union([
1541
+ }), to = n.object({ id: n.string() }), no = n.object({ id: n.number() }), Xt = n.object({ uuid: n.string().uuid() }), Vt = n.union([Xt, to]), ro = n.union([
1540
1542
  n.object({ authenticatedUser: n.literal(!0) }),
1541
- n.object({ uuid: n.string().uuid() }),
1542
- n.object({ id: n.number() })
1543
- ]), es = n.object({
1544
- project: Va,
1545
- contributor: Za
1546
- }), ts = n.object({
1543
+ Xt,
1544
+ no
1545
+ ]), so = n.object({
1546
+ project: Vt
1547
+ }), oo = n.object({
1547
1548
  project_id: n.string(),
1548
- contributor: Xa
1549
- }), ns = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, rs = (e) => "uuid" in e ? e.uuid : e.id, as = X({
1549
+ contributors: n.array(Yt)
1550
+ }), ao = n.object({
1551
+ project: Vt,
1552
+ contributor: ro
1553
+ }), io = n.object({
1554
+ project_id: n.string(),
1555
+ contributor: Yt
1556
+ }), co = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, Zt = (e) => "uuid" in e ? e.uuid : e.id, fa = $({
1557
+ description: "List all contributors for a project",
1558
+ requestHeaderSchema: N,
1559
+ requestPathParamsSchema: so,
1560
+ pathResolver: ({ project: e }) => `/projects/${Zt(e)}/contributors`,
1561
+ successResponseBodySchema: oo
1562
+ }), lo = $({
1550
1563
  description: "Get the details of a project contributor",
1551
- requestHeaderSchema: x,
1552
- requestPathParamsSchema: es,
1553
- pathResolver: ({ project: e, contributor: t }) => `/projects/${rs(e)}/contributors/${ns(t)}`,
1554
- successResponseBodySchema: ts
1555
- }), ss = {
1564
+ requestHeaderSchema: N,
1565
+ requestPathParamsSchema: ao,
1566
+ pathResolver: ({ project: e, contributor: t }) => `/projects/${Zt(e)}/contributors/${co(t)}`,
1567
+ successResponseBodySchema: io
1568
+ }), uo = {
1556
1569
  projectUserKey: (e) => ["RetrieveContributor", e]
1557
- }, os = (e, t, r) => H({
1570
+ }, mo = (e, t, r) => H({
1558
1571
  ...r,
1559
- queryFn: async ({ queryKey: [a, s] }) => G(e, as, {
1560
- pathParams: s,
1572
+ queryFn: async ({ queryKey: [s, o] }) => F(e, lo, {
1573
+ pathParams: o,
1561
1574
  headers: await t.resolve()
1562
1575
  })
1563
1576
  });
1564
- function mo(e, t, r) {
1565
- const a = Wt(), s = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
1566
- return os(e, t, {
1567
- queryKey: ss.projectUserKey({ project: { id: r }, contributor: s }),
1568
- enabled: a !== void 0
1577
+ function ba(e, t, r) {
1578
+ const s = Wt(), o = s != null && s.userId ? { id: s.userId } : { authenticatedUser: !0 };
1579
+ return mo(e, t, {
1580
+ queryKey: uo.projectUserKey({ project: { id: r }, contributor: o }),
1581
+ enabled: s !== void 0
1569
1582
  });
1570
1583
  }
1571
- const is = n.object({
1584
+ const _o = n.object({
1572
1585
  lang_iso: n.string(),
1573
1586
  custom_iso: n.string().optional()
1574
- }), cs = n.object({
1587
+ }), go = n.object({
1575
1588
  language_id: n.number(),
1576
1589
  language_iso: n.string(),
1577
1590
  progress: n.number(),
1578
1591
  words_to_do: n.number(),
1579
1592
  project_language_id: n.number(),
1580
1593
  project_language_uuid: n.string().uuid()
1581
- }), ls = n.object({
1594
+ }), ho = n.object({
1582
1595
  projectId: n.string()
1583
- }), Yt = n.object({
1596
+ }), en = n.object({
1584
1597
  lang_id: n.number(),
1585
1598
  lang_iso: n.string(),
1586
1599
  lang_name: n.string(),
@@ -1588,13 +1601,13 @@ const is = n.object({
1588
1601
  plural_forms: n.array(n.string().optional()),
1589
1602
  project_language_id: n.string(),
1590
1603
  project_language_uuid: n.string().uuid()
1591
- }), us = n.object({
1604
+ }), po = n.object({
1592
1605
  project_id: n.string(),
1593
1606
  project_uuid: n.string().uuid(),
1594
- languages: n.array(Yt)
1595
- }), ds = n.object({
1607
+ languages: n.array(en)
1608
+ }), fo = n.object({
1596
1609
  projectId: n.string()
1597
- }), ms = n.object({
1610
+ }), bo = n.object({
1598
1611
  languages: n.array(
1599
1612
  n.object({
1600
1613
  lang_iso: n.string(),
@@ -1603,10 +1616,10 @@ const is = n.object({
1603
1616
  custom_plural_forms: n.array(n.string()).optional()
1604
1617
  })
1605
1618
  )
1606
- }), _s = n.object({
1619
+ }), To = n.object({
1607
1620
  project_id: n.string(),
1608
1621
  project_uuid: n.string().uuid(),
1609
- languages: n.array(Yt),
1622
+ languages: n.array(en),
1610
1623
  errors: n.array(
1611
1624
  n.object({
1612
1625
  message: n.string(),
@@ -1614,44 +1627,44 @@ const is = n.object({
1614
1627
  lang_iso: n.string()
1615
1628
  })
1616
1629
  ).optional()
1617
- }), gs = n.object({
1630
+ }), vo = n.object({
1618
1631
  projectId: n.string()
1619
- }), hs = n.object({
1632
+ }), So = n.object({
1620
1633
  langs: n.array(
1621
1634
  n.object({
1622
1635
  lang_iso: n.string(),
1623
1636
  base_lang: n.boolean()
1624
1637
  })
1625
1638
  )
1626
- }), ps = n.object({
1639
+ }), Eo = n.object({
1627
1640
  result: n.boolean()
1628
- }), fs = X({
1641
+ }), yo = $({
1629
1642
  description: "List of project languages",
1630
- requestHeaderSchema: x,
1631
- requestPathParamsSchema: ls,
1643
+ requestHeaderSchema: N,
1644
+ requestPathParamsSchema: ho,
1632
1645
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
1633
- successResponseBodySchema: us
1634
- }), _o = Y({
1646
+ successResponseBodySchema: po
1647
+ }), Ta = X({
1635
1648
  description: "Add languages to existing project",
1636
- requestHeaderSchema: x,
1649
+ requestHeaderSchema: N,
1637
1650
  method: "post",
1638
- requestPathParamsSchema: ds,
1651
+ requestPathParamsSchema: fo,
1639
1652
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
1640
- requestBodySchema: ms,
1641
- successResponseBodySchema: _s
1642
- }), bs = Y({
1653
+ requestBodySchema: bo,
1654
+ successResponseBodySchema: To
1655
+ }), Co = X({
1643
1656
  description: "Bulk update project languages",
1644
- requestHeaderSchema: x,
1657
+ requestHeaderSchema: N,
1645
1658
  method: "put",
1646
- requestPathParamsSchema: gs,
1659
+ requestPathParamsSchema: vo,
1647
1660
  pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
1648
- requestBodySchema: hs,
1649
- successResponseBodySchema: ps
1650
- }), de = x, Fe = n.union([
1661
+ requestBodySchema: So,
1662
+ successResponseBodySchema: Eo
1663
+ }), de = N, Fe = n.union([
1651
1664
  n.literal("localization_files"),
1652
1665
  n.literal("paged_documents"),
1653
1666
  n.literal("marketing")
1654
- ]), Ts = n.object({
1667
+ ]), Po = n.object({
1655
1668
  per_platform_key_names: n.boolean(),
1656
1669
  reviewing: n.boolean(),
1657
1670
  auto_toggle_unverified: n.boolean(),
@@ -1662,7 +1675,7 @@ const is = n.object({
1662
1675
  custom_translation_statuses_allow_multiple: n.boolean(),
1663
1676
  segmentation: n.boolean(),
1664
1677
  contributor_preview_download_enabled: n.boolean()
1665
- }), vs = n.object({
1678
+ }), Ao = n.object({
1666
1679
  not_reviewed: n.number(),
1667
1680
  unverified: n.number(),
1668
1681
  spelling_grammar: n.number(),
@@ -1679,14 +1692,14 @@ const is = n.object({
1679
1692
  double_space: n.number(),
1680
1693
  special_placeholder: n.number(),
1681
1694
  unbalanced_brackets: n.number()
1682
- }), Ss = n.object({
1695
+ }), Ro = n.object({
1683
1696
  progress_total: n.number(),
1684
1697
  keys_total: n.number(),
1685
1698
  team: n.number(),
1686
1699
  base_words: n.number(),
1687
1700
  qa_issues_total: n.number(),
1688
- qa_issues: vs,
1689
- languages: n.array(cs)
1701
+ qa_issues: Ao,
1702
+ languages: n.array(go)
1690
1703
  }), me = n.object({
1691
1704
  project_id: n.string(),
1692
1705
  uuid: n.string().uuid(),
@@ -1703,138 +1716,138 @@ const is = n.object({
1703
1716
  base_language_iso: n.string(),
1704
1717
  base_project_language_id: n.number(),
1705
1718
  base_project_language_uuid: n.string().uuid(),
1706
- settings: Ts.optional(),
1707
- statistics: Ss.optional()
1708
- }), ys = n.object({
1719
+ settings: Po.optional(),
1720
+ statistics: Ro.optional()
1721
+ }), wo = n.object({
1709
1722
  name: n.string(),
1710
1723
  team_id: n.string(),
1711
1724
  base_lang_iso: n.string(),
1712
- languages: n.array(is),
1725
+ languages: n.array(_o),
1713
1726
  project_type: Fe,
1714
1727
  is_segmentation_enabled: n.boolean()
1715
- }), Et = n.union([n.literal(0), n.literal(1)]), Es = n.object({
1728
+ }), yt = n.union([n.literal(0), n.literal(1)]), Io = n.object({
1716
1729
  filter_type: Fe.optional(),
1717
1730
  filter_team_id: n.number().optional(),
1718
1731
  filter_names: n.string().optional(),
1719
- include_statistics: Et.optional(),
1720
- include_settings: Et.optional(),
1732
+ include_statistics: yt.optional(),
1733
+ include_settings: yt.optional(),
1721
1734
  limit: n.number().optional(),
1722
1735
  page: n.number().optional()
1723
- }), Cs = n.object({
1736
+ }), ko = n.object({
1724
1737
  projects: n.array(me)
1725
- }), Ps = n.object({
1738
+ }), jo = n.object({
1726
1739
  project_id: n.string()
1727
- }), ws = n.object({
1740
+ }), No = n.object({
1728
1741
  project_id: n.string()
1729
- }), As = n.object({
1742
+ }), Oo = n.object({
1730
1743
  name: n.string().min(1),
1731
1744
  description: n.string().optional()
1732
- }), _e = () => "/projects", Rs = Y({
1745
+ }), _e = () => "/projects", xo = X({
1733
1746
  description: "Create a new project",
1734
1747
  requestHeaderSchema: de,
1735
1748
  method: "post",
1736
1749
  pathResolver: _e,
1737
- requestBodySchema: ys,
1750
+ requestBodySchema: wo,
1738
1751
  successResponseBodySchema: me
1739
- }), ks = X({
1752
+ }), Lo = $({
1740
1753
  description: "List all projects",
1741
1754
  requestHeaderSchema: de,
1742
1755
  pathResolver: _e,
1743
- requestQuerySchema: Es,
1744
- successResponseBodySchema: Cs
1745
- }), Is = X({
1756
+ requestQuerySchema: Io,
1757
+ successResponseBodySchema: ko
1758
+ }), Mo = $({
1746
1759
  description: "Retrieve a project",
1747
1760
  requestHeaderSchema: de,
1748
- requestPathParamsSchema: Ps,
1761
+ requestPathParamsSchema: jo,
1749
1762
  pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
1750
1763
  successResponseBodySchema: me
1751
- }), js = Y({
1764
+ }), Uo = X({
1752
1765
  description: "Update a project",
1753
1766
  requestHeaderSchema: de,
1754
1767
  method: "put",
1755
- requestPathParamsSchema: ws,
1768
+ requestPathParamsSchema: No,
1756
1769
  pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
1757
- requestBodySchema: As,
1770
+ requestBodySchema: Oo,
1758
1771
  successResponseBodySchema: me
1759
- }), Ns = n.object({
1772
+ }), Ho = n.object({
1760
1773
  projectId: n.string(),
1761
1774
  translationId: n.number()
1762
- }), Os = n.enum(["critical", "major", "minor", "neutral"]), xs = n.object({
1775
+ }), Bo = n.enum(["critical", "major", "minor", "neutral"]), qo = n.object({
1763
1776
  category: n.string(),
1764
1777
  comment: n.string(),
1765
- severity: Os
1766
- }), Ls = n.object({
1778
+ severity: Bo
1779
+ }), Do = n.object({
1767
1780
  score: n.number(),
1768
1781
  hasMajorIssue: n.boolean(),
1769
1782
  hasCriticalIssue: n.boolean(),
1770
- issues: n.array(xs)
1783
+ issues: n.array(qo)
1771
1784
  });
1772
- function go(e, t, r = {}) {
1773
- return qe({
1785
+ function va(e, t, r = {}) {
1786
+ return Be({
1774
1787
  ...r,
1775
- mutationFn: async (a) => $(e, Rs, {
1788
+ mutationFn: async (s) => G(e, xo, {
1776
1789
  headers: await t.resolve(),
1777
- body: a
1790
+ body: s
1778
1791
  })
1779
1792
  });
1780
1793
  }
1781
- const ho = {
1794
+ const Sa = {
1782
1795
  projectIdKey: (e) => ["listProjectLanguages", e]
1783
1796
  };
1784
- function po(e, t, r) {
1797
+ function Ea(e, t, r) {
1785
1798
  return H({
1786
1799
  ...r,
1787
- queryFn: async ({ queryKey: [a, s] }) => G(e, fs, {
1800
+ queryFn: async ({ queryKey: [s, o] }) => F(e, yo, {
1788
1801
  headers: await t.resolve(),
1789
- pathParams: { projectId: s }
1802
+ pathParams: { projectId: o }
1790
1803
  })
1791
1804
  });
1792
1805
  }
1793
- const fo = {
1806
+ const ya = {
1794
1807
  paramsKey: (e) => ["listProjects", e]
1795
1808
  };
1796
- function bo(e, t, r) {
1809
+ function Ca(e, t, r) {
1797
1810
  return H({
1798
1811
  ...r,
1799
- queryFn: async ({ queryKey: [a, s] }) => G(e, ks, {
1812
+ queryFn: async ({ queryKey: [s, o] }) => F(e, Lo, {
1800
1813
  headers: await t.resolve(),
1801
- queryParams: s
1814
+ queryParams: o
1802
1815
  })
1803
1816
  });
1804
1817
  }
1805
- const To = {
1818
+ const Pa = {
1806
1819
  projectIdKey: (e) => ["retrieveProject", e]
1807
1820
  };
1808
- function vo(e, t, r) {
1821
+ function Aa(e, t, r) {
1809
1822
  return H({
1810
1823
  ...r,
1811
- queryFn: async ({ queryKey: [a, s] }) => G(e, Is, {
1824
+ queryFn: async ({ queryKey: [s, o] }) => F(e, Mo, {
1812
1825
  headers: await t.resolve(),
1813
- pathParams: { project_id: s }
1826
+ pathParams: { project_id: o }
1814
1827
  })
1815
1828
  });
1816
1829
  }
1817
- function So(e, t, r, a = {}) {
1818
- return qe({
1819
- ...a,
1820
- mutationFn: async (s) => $(e, js, {
1830
+ function Ra(e, t, r, s = {}) {
1831
+ return Be({
1832
+ ...s,
1833
+ mutationFn: async (o) => G(e, Uo, {
1821
1834
  headers: await t.resolve(),
1822
- body: s,
1835
+ body: o,
1823
1836
  pathParams: r
1824
1837
  })
1825
1838
  });
1826
1839
  }
1827
- function yo(e, t, r, a = {}) {
1828
- return qe({
1829
- ...a,
1830
- mutationFn: async (s) => $(e, bs, {
1840
+ function wa(e, t, r, s = {}) {
1841
+ return Be({
1842
+ ...s,
1843
+ mutationFn: async (o) => G(e, Co, {
1831
1844
  pathParams: t,
1832
1845
  headers: await r.resolve(),
1833
- body: s
1846
+ body: o
1834
1847
  })
1835
1848
  });
1836
1849
  }
1837
- function Ms(e) {
1850
+ function $o(e) {
1838
1851
  return {
1839
1852
  isEmptyResponseExpected: e.isEmptyResponseExpected ?? !1,
1840
1853
  isNonJSONResponseExpected: e.isNonJSONResponseExpected ?? !1,
@@ -1849,131 +1862,134 @@ function Ms(e) {
1849
1862
  metadata: e.metadata
1850
1863
  };
1851
1864
  }
1852
- const Us = Ms({
1865
+ const Go = $o({
1853
1866
  description: "Generate translation quality score",
1854
- requestHeaderSchema: x,
1855
- requestPathParamsSchema: Ns,
1867
+ requestHeaderSchema: N,
1868
+ requestPathParamsSchema: Ho,
1856
1869
  pathResolver: ({ projectId: e, translationId: t }) => `/projects/${e}/translations/${t}/scoring-guidance`,
1857
- successResponseBodySchema: Ls
1858
- }), Eo = {
1870
+ successResponseBodySchema: Do
1871
+ }), Ia = {
1859
1872
  paramsKey: (e) => ["getScore", e]
1860
1873
  };
1861
- function Co(e, t, r) {
1874
+ function ka(e, t, r) {
1862
1875
  return H({
1863
1876
  ...r,
1864
- queryFn: async ({ queryKey: [a, s] }) => G(e, Us, {
1877
+ queryFn: async ({ queryKey: [s, o] }) => F(e, Go, {
1865
1878
  headers: await t.resolve(),
1866
- pathParams: s
1879
+ pathParams: o
1867
1880
  })
1868
1881
  });
1869
1882
  }
1870
1883
  export {
1871
- ds as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
1872
- ms as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
1873
- _s as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
1874
- gs as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1875
- hs as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
1876
- ps as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1877
- to as Breadcrumbs,
1878
- uo as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
1879
- Ya as CONTRIBUTOR_LANGUAGE_SCHEMA,
1880
- Xa as CONTRIBUTOR_SCHEMA,
1881
- ys as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
1882
- qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
1883
- lr as ENTERPRISE_PLAN_IDS,
1884
- ir as ESSENTIAL_PLAN_IDS,
1884
+ fo as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
1885
+ bo as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
1886
+ To as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
1887
+ vo as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1888
+ So as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
1889
+ Eo as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1890
+ ia as Breadcrumbs,
1891
+ pa as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
1892
+ eo as CONTRIBUTOR_LANGUAGE_SCHEMA,
1893
+ Yt as CONTRIBUTOR_SCHEMA,
1894
+ wo as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
1895
+ Bt as ENTERPRISE_OPENSOURCE_PLAN_ID,
1896
+ _r as ENTERPRISE_PLAN_IDS,
1897
+ dr as ESSENTIAL_PLAN_IDS,
1885
1898
  Ht as FREE_PLAN_ID,
1886
- Ns as GET_SCORE_REQUEST_QUERY_SCHEMA,
1887
- Ls as GET_SCORE_RESPONSE_SCHEMA,
1888
- k as HeaderBuilder,
1889
- xs as ISSUE_SCHEMA,
1890
- Ha as JWT_TOKEN_SCHEMA,
1891
- ro as JwtAuthHeaderBuilderMiddleware,
1892
- is as LANGUAGE_ISO_SCHEMA,
1893
- Yt as LANGUAGE_SCHEMA,
1894
- cs as LANGUAGE_STATISTICS_SCHEMA,
1895
- Es as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
1896
- Cs as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
1897
- ls as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1898
- us as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1899
- oe as NavigationPanel,
1900
- no as NavigationTabs,
1899
+ Ho as GET_SCORE_REQUEST_QUERY_SCHEMA,
1900
+ Do as GET_SCORE_RESPONSE_SCHEMA,
1901
+ I as HeaderBuilder,
1902
+ qo as ISSUE_SCHEMA,
1903
+ $s as JWT_TOKEN_SCHEMA,
1904
+ la as JwtAuthHeaderBuilderMiddleware,
1905
+ _o as LANGUAGE_ISO_SCHEMA,
1906
+ en as LANGUAGE_SCHEMA,
1907
+ go as LANGUAGE_STATISTICS_SCHEMA,
1908
+ so as LIST_CONTRIBUTORS_PATH_PARAMS_SCHEMA,
1909
+ oo as LIST_CONTRIBUTORS_RESPONSE_SCHEMA,
1910
+ Io as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
1911
+ ko as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
1912
+ ho as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
1913
+ po as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
1914
+ ae as NavigationPanel,
1915
+ ca as NavigationTabs,
1901
1916
  de as PROJECT_API_BASE_HEADERS_SCHEMA,
1902
- vs as PROJECT_QA_ISSUES_SCHEMA,
1917
+ Ao as PROJECT_QA_ISSUES_SCHEMA,
1903
1918
  me as PROJECT_SCHEMA,
1904
- Ts as PROJECT_SETTINGS_SCHEMA,
1905
- Ss as PROJECT_STATISTICS_SCHEMA,
1919
+ Po as PROJECT_SETTINGS_SCHEMA,
1920
+ Ro as PROJECT_STATISTICS_SCHEMA,
1906
1921
  Fe as PROJECT_TYPE_SCHEMA,
1907
- cr as PRO_PLAN_IDS,
1908
- ao as PublicApiHeaderBuilderMiddleware,
1909
- es as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
1910
- ts as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
1911
- Ps as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
1912
- Os as SEVERITY_ENUM,
1913
- or as START_PLAN_IDS,
1914
- R as Sidebar,
1915
- A as SidebarTaskLanguageStatuses,
1922
+ mr as PRO_PLAN_IDS,
1923
+ ua as PublicApiHeaderBuilderMiddleware,
1924
+ ao as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
1925
+ io as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
1926
+ jo as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
1927
+ Bo as SEVERITY_ENUM,
1928
+ ur as START_PLAN_IDS,
1929
+ w as Sidebar,
1930
+ R as SidebarTaskLanguageStatuses,
1916
1931
  Le as SidebarTaskStatuses,
1917
- ae as SidebarTaskTypeOptions,
1932
+ se as SidebarTaskTypeOptions,
1918
1933
  zt as TEAM_ROLE_SCHEMA,
1919
- Ga as TEAM_USER_API_BASE_HEADERS_SCHEMA,
1920
- Ka as TEAM_USER_PATH_PARAMS_SCHEMA,
1921
- za as TEAM_USER_RESPONSE_SCHEMA,
1922
- Fa as TEAM_USER_SCHEMA,
1923
- sr as TRIAL_PLAN_ID,
1924
- ws as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
1925
- As as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
1926
- Ba as USER_TOKEN_REQUEST_HEADER_SCHEMA,
1934
+ Js as TEAM_USER_API_BASE_HEADERS_SCHEMA,
1935
+ Ws as TEAM_USER_PATH_PARAMS_SCHEMA,
1936
+ Ys as TEAM_USER_RESPONSE_SCHEMA,
1937
+ Qs as TEAM_USER_SCHEMA,
1938
+ lr as TRIAL_PLAN_ID,
1939
+ No as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
1940
+ Oo as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
1941
+ Fs as USER_TOKEN_REQUEST_HEADER_SCHEMA,
1927
1942
  ie as UnauthorizedError,
1928
- _o as addLanguagesToProject,
1929
- bs as bulkUpdateProjectLanguages,
1930
- mr as convertNewLineToBreakTag,
1943
+ Ta as addLanguagesToProject,
1944
+ Co as bulkUpdateProjectLanguages,
1945
+ pr as convertNewLineToBreakTag,
1931
1946
  Kt as createHeaderBuilderMiddleware,
1932
- Rs as createProject,
1933
- pr as formatDate,
1934
- eo as formatDateTz,
1935
- oo as generateTokenFromClassicSession,
1936
- so as getAuthenticatedSessionDetailFromRequest,
1937
- xa as getCsrfTokenFromCookie,
1947
+ xo as createProject,
1948
+ vr as formatDate,
1949
+ aa as formatDateTz,
1950
+ ma as generateTokenFromClassicSession,
1951
+ da as getAuthenticatedSessionDetailFromRequest,
1952
+ Hs as getCsrfTokenFromCookie,
1938
1953
  Jt as getJwtTokenFromCookie,
1939
- Eo as getScoreKey,
1940
- Ja as getTeamUser,
1941
- Qa as getTeamUsersQueryKey,
1954
+ Ia as getScoreKey,
1955
+ Xs as getTeamUser,
1956
+ Vs as getTeamUsersQueryKey,
1942
1957
  Ge as getUserToken,
1943
- Da as getUserTokenKey,
1944
- Zs as isEnterpriseOpenSourcePlan,
1945
- Xs as isEnterprisePlan,
1946
- Ws as isEssentialPlan,
1958
+ Ks as getUserTokenKey,
1959
+ oa as isEnterpriseOpenSourcePlan,
1960
+ ra as isEnterprisePlan,
1961
+ ta as isEssentialPlan,
1947
1962
  De as isFreePlan,
1948
- Vs as isPaidPlan,
1949
- Ys as isProPlan,
1950
- Qs as isStartPlan,
1951
- Bt as isTrialPlan,
1952
- fs as listProjectLanguages,
1953
- ho as listProjectLanguagesKey,
1954
- ks as listProjects,
1955
- fo as listProjectsKey,
1956
- hr as makeUrlClickable,
1963
+ sa as isPaidPlan,
1964
+ na as isProPlan,
1965
+ ea as isStartPlan,
1966
+ qt as isTrialPlan,
1967
+ fa as listContributors,
1968
+ yo as listProjectLanguages,
1969
+ Sa as listProjectLanguagesKey,
1970
+ Lo as listProjects,
1971
+ ya as listProjectsKey,
1972
+ Tr as makeUrlClickable,
1957
1973
  ee as parseJwtTokenPayload,
1958
- io as refreshExpiredToken,
1959
- as as retrieveContributor,
1960
- ss as retrieveContributorKeys,
1961
- Is as retrieveProject,
1962
- To as retrieveProjectQueryKey,
1963
- js as updateProject,
1964
- mo as useAuthenticatedProjectContributor,
1974
+ _a as refreshExpiredToken,
1975
+ lo as retrieveContributor,
1976
+ uo as retrieveContributorKeys,
1977
+ Mo as retrieveProject,
1978
+ Pa as retrieveProjectQueryKey,
1979
+ Uo as updateProject,
1980
+ ba as useAuthenticatedProjectContributor,
1965
1981
  Wt as useAuthenticatedSessionPayload,
1966
- lo as useAuthenticatedUser,
1967
- yo as useBulkUpdateProjectLanguagesMutation,
1968
- go as useCreateProjectMutation,
1982
+ ha as useAuthenticatedUser,
1983
+ wa as useBulkUpdateProjectLanguagesMutation,
1984
+ va as useCreateProjectMutation,
1969
1985
  $e as useEffectOnce,
1970
- co as useGetPromotedClassicSessionJwtQuery,
1971
- Co as useGetScoreQuery,
1972
- Wa as useGetTeamUsersQuery,
1973
- $a as useGetUserTokenQuery,
1974
- po as useListProjectLanguagesQuery,
1975
- bo as useListProjectsQuery,
1976
- os as useRetrieveContributorQuery,
1977
- vo as useRetrieveProjectQuery,
1978
- So as useUpdateProjectMutation
1986
+ ga as useGetPromotedClassicSessionJwtQuery,
1987
+ ka as useGetScoreQuery,
1988
+ Zs as useGetTeamUsersQuery,
1989
+ zs as useGetUserTokenQuery,
1990
+ Ea as useListProjectLanguagesQuery,
1991
+ Ca as useListProjectsQuery,
1992
+ mo as useRetrieveContributorQuery,
1993
+ Aa as useRetrieveProjectQuery,
1994
+ Ra as useUpdateProjectMutation
1979
1995
  };