@lokalise/harmony 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/harmony.mjs CHANGED
@@ -1,25 +1,25 @@
1
- var Ct = Object.defineProperty;
2
- var Nt = (e, t, n) => t in e ? Ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Re = (e, t, n) => Nt(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var Pt = Object.defineProperty;
2
+ var Ct = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var ke = (e, t, n) => Ct(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as i, jsxs as p, Fragment as rt } from "react/jsx-runtime";
5
- import * as q from "react";
6
- import { useRef as at, useState as ge, useCallback as je, useEffect as M, useContext as Rt, createContext as jt, cloneElement as Pt, Fragment as ot, forwardRef as At } from "react";
7
- import { Tooltip as he, Link as it, Menu as pe, MenuList as ve, CaretUpIcon as Ot, UserIcon as st, MenuItem as J, MenuDivider as ct, Tag as Lt } from "@lokalise/louis";
5
+ import * as M from "react";
6
+ import { useRef as at, useState as ge, useCallback as Ne, useEffect as U, useContext as kt, createContext as Nt, cloneElement as Rt, Fragment as ot, forwardRef as At } from "react";
7
+ import { Tooltip as he, Link as it, Menu as pe, MenuList as ve, CaretUpIcon as Lt, UserIcon as st, MenuItem as W, MenuDivider as ct, Tag as Ot } from "@lokalise/louis";
8
8
  import { format as lt } from "date-fns";
9
9
  import { toZonedTime as qt } from "date-fns-tz";
10
10
  import { z as r } from "zod";
11
- import { sendByPayloadRoute as K, sendByGetRoute as W } from "@lokalise/frontend-http-client";
11
+ import { sendByPayloadRoute as Q, sendByGetRoute as x } from "@lokalise/frontend-http-client";
12
12
  import { buildPayloadRoute as ut } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
13
- import { useQuery as x, useMutation as Mt } from "@tanstack/react-query";
14
- import { buildGetRoute as Q } from "@lokalise/universal-ts-utils/node";
15
- var H = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
+ import { useQuery as O, useMutation as Mt } from "@tanstack/react-query";
14
+ import { buildGetRoute as B } from "@lokalise/universal-ts-utils/node";
15
+ var D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
16
16
  function dt(e) {
17
17
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
18
18
  }
19
- var Z, Pe;
19
+ var Z, Re;
20
20
  function Te() {
21
- if (Pe) return Z;
22
- Pe = 1;
21
+ if (Re) return Z;
22
+ Re = 1;
23
23
  function e(t) {
24
24
  var n = typeof t;
25
25
  return t != null && (n == "object" || n == "function");
@@ -27,23 +27,23 @@ function Te() {
27
27
  return Z = e, Z;
28
28
  }
29
29
  var X, Ae;
30
- function xt() {
30
+ function Ut() {
31
31
  if (Ae) return X;
32
32
  Ae = 1;
33
- var e = typeof H == "object" && H && H.Object === Object && H;
33
+ var e = typeof D == "object" && D && D.Object === Object && D;
34
34
  return X = e, X;
35
35
  }
36
- var ee, Oe;
36
+ var ee, Le;
37
37
  function mt() {
38
- if (Oe) return ee;
39
- Oe = 1;
40
- var e = xt(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
38
+ if (Le) return ee;
39
+ Le = 1;
40
+ var e = Ut(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
41
41
  return ee = n, ee;
42
42
  }
43
- var te, Le;
44
- function Ut() {
45
- if (Le) return te;
46
- Le = 1;
43
+ var te, Oe;
44
+ function xt() {
45
+ if (Oe) return te;
46
+ Oe = 1;
47
47
  var e = mt(), t = function() {
48
48
  return e.Date.now();
49
49
  };
@@ -62,7 +62,7 @@ function Bt() {
62
62
  return ne = t, ne;
63
63
  }
64
64
  var re, Me;
65
- function $t() {
65
+ function Ht() {
66
66
  if (Me) return re;
67
67
  Me = 1;
68
68
  var e = Bt(), t = /^\s+/;
@@ -71,17 +71,17 @@ function $t() {
71
71
  }
72
72
  return re = n, re;
73
73
  }
74
- var ae, xe;
74
+ var ae, Ue;
75
75
  function ft() {
76
- if (xe) return ae;
77
- xe = 1;
76
+ if (Ue) return ae;
77
+ Ue = 1;
78
78
  var e = mt(), t = e.Symbol;
79
79
  return ae = t, ae;
80
80
  }
81
- var oe, Ue;
82
- function Ht() {
83
- if (Ue) return oe;
84
- Ue = 1;
81
+ var oe, xe;
82
+ function $t() {
83
+ if (xe) return oe;
84
+ xe = 1;
85
85
  var e = ft(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
86
86
  function s(c) {
87
87
  var u = n.call(c, o), d = c[o];
@@ -96,7 +96,7 @@ function Ht() {
96
96
  return oe = s, oe;
97
97
  }
98
98
  var ie, Be;
99
- function Dt() {
99
+ function Gt() {
100
100
  if (Be) return ie;
101
101
  Be = 1;
102
102
  var e = Object.prototype, t = e.toString;
@@ -105,40 +105,40 @@ function Dt() {
105
105
  }
106
106
  return ie = n, ie;
107
107
  }
108
- var se, $e;
109
- function zt() {
110
- if ($e) return se;
111
- $e = 1;
112
- var e = ft(), t = Ht(), n = Dt(), a = "[object Null]", o = "[object Undefined]", s = e ? e.toStringTag : void 0;
108
+ var se, He;
109
+ function Dt() {
110
+ if (He) return se;
111
+ He = 1;
112
+ var e = ft(), t = $t(), n = Gt(), a = "[object Null]", o = "[object Undefined]", s = e ? e.toStringTag : void 0;
113
113
  function c(u) {
114
114
  return u == null ? u === void 0 ? o : a : s && s in Object(u) ? t(u) : n(u);
115
115
  }
116
116
  return se = c, se;
117
117
  }
118
- var ce, He;
118
+ var ce, $e;
119
119
  function Ft() {
120
- if (He) return ce;
121
- He = 1;
120
+ if ($e) return ce;
121
+ $e = 1;
122
122
  function e(t) {
123
123
  return t != null && typeof t == "object";
124
124
  }
125
125
  return ce = e, ce;
126
126
  }
127
- var le, De;
128
- function Gt() {
129
- if (De) return le;
130
- De = 1;
131
- var e = zt(), t = Ft(), n = "[object Symbol]";
127
+ var le, Ge;
128
+ function zt() {
129
+ if (Ge) return le;
130
+ Ge = 1;
131
+ var e = Dt(), t = Ft(), n = "[object Symbol]";
132
132
  function a(o) {
133
133
  return typeof o == "symbol" || t(o) && e(o) == n;
134
134
  }
135
135
  return le = a, le;
136
136
  }
137
- var ue, ze;
138
- function Jt() {
139
- if (ze) return ue;
140
- ze = 1;
141
- var e = $t(), t = Te(), n = Gt(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
137
+ var ue, De;
138
+ function Kt() {
139
+ if (De) return ue;
140
+ De = 1;
141
+ var e = Ht(), t = Te(), n = zt(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
142
142
  function d(l) {
143
143
  if (typeof l == "number")
144
144
  return l;
@@ -151,72 +151,72 @@ function Jt() {
151
151
  if (typeof l != "string")
152
152
  return l === 0 ? l : +l;
153
153
  l = e(l);
154
- var _ = s.test(l);
155
- return _ || c.test(l) ? u(l.slice(2), _ ? 2 : 8) : o.test(l) ? a : +l;
154
+ var b = s.test(l);
155
+ return b || c.test(l) ? u(l.slice(2), b ? 2 : 8) : o.test(l) ? a : +l;
156
156
  }
157
157
  return ue = d, ue;
158
158
  }
159
159
  var de, Fe;
160
- function bt() {
160
+ function _t() {
161
161
  if (Fe) return de;
162
162
  Fe = 1;
163
- var e = Te(), t = Ut(), n = Jt(), a = "Expected a function", o = Math.max, s = Math.min;
163
+ var e = Te(), t = xt(), n = Kt(), a = "Expected a function", o = Math.max, s = Math.min;
164
164
  function c(u, d, l) {
165
- var m, _, y, E, b, T, w = 0, S = !1, g = !1, k = !0;
165
+ var m, b, y, I, _, T, w = 0, S = !1, g = !1, j = !0;
166
166
  if (typeof u != "function")
167
167
  throw new TypeError(a);
168
- d = n(d) || 0, e(l) && (S = !!l.leading, g = "maxWait" in l, y = g ? o(n(l.maxWait) || 0, d) : y, k = "trailing" in l ? !!l.trailing : k);
168
+ d = n(d) || 0, e(l) && (S = !!l.leading, g = "maxWait" in l, y = g ? o(n(l.maxWait) || 0, d) : y, j = "trailing" in l ? !!l.trailing : j);
169
169
  function v(f) {
170
- var C = m, L = _;
171
- return m = _ = void 0, w = f, E = u.apply(L, C), E;
170
+ var P = m, q = b;
171
+ return m = b = void 0, w = f, I = u.apply(q, P), I;
172
172
  }
173
173
  function h(f) {
174
- return w = f, b = setTimeout($, d), S ? v(f) : E;
174
+ return w = f, _ = setTimeout(G, d), S ? v(f) : I;
175
175
  }
176
- function B(f) {
177
- var C = f - T, L = f - w, Ne = d - C;
178
- return g ? s(Ne, y - L) : Ne;
176
+ function $(f) {
177
+ var P = f - T, q = f - w, Ce = d - P;
178
+ return g ? s(Ce, y - q) : Ce;
179
179
  }
180
- function ke(f) {
181
- var C = f - T, L = f - w;
182
- return T === void 0 || C >= d || C < 0 || g && L >= y;
180
+ function je(f) {
181
+ var P = f - T, q = f - w;
182
+ return T === void 0 || P >= d || P < 0 || g && q >= y;
183
183
  }
184
- function $() {
184
+ function G() {
185
185
  var f = t();
186
- if (ke(f))
187
- return Ce(f);
188
- b = setTimeout($, B(f));
186
+ if (je(f))
187
+ return Pe(f);
188
+ _ = setTimeout(G, $(f));
189
189
  }
190
- function Ce(f) {
191
- return b = void 0, k && m ? v(f) : (m = _ = void 0, E);
190
+ function Pe(f) {
191
+ return _ = void 0, j && m ? v(f) : (m = b = void 0, I);
192
192
  }
193
- function Et() {
194
- b !== void 0 && clearTimeout(b), w = 0, m = T = _ = b = void 0;
193
+ function It() {
194
+ _ !== void 0 && clearTimeout(_), w = 0, m = T = b = _ = void 0;
195
195
  }
196
- function kt() {
197
- return b === void 0 ? E : Ce(t());
196
+ function jt() {
197
+ return _ === void 0 ? I : Pe(t());
198
198
  }
199
199
  function V() {
200
- var f = t(), C = ke(f);
201
- if (m = arguments, _ = this, T = f, C) {
202
- if (b === void 0)
200
+ var f = t(), P = je(f);
201
+ if (m = arguments, b = this, T = f, P) {
202
+ if (_ === void 0)
203
203
  return h(T);
204
204
  if (g)
205
- return clearTimeout(b), b = setTimeout($, d), v(T);
205
+ return clearTimeout(_), _ = setTimeout(G, d), v(T);
206
206
  }
207
- return b === void 0 && (b = setTimeout($, d)), E;
207
+ return _ === void 0 && (_ = setTimeout(G, d)), I;
208
208
  }
209
- return V.cancel = Et, V.flush = kt, V;
209
+ return V.cancel = It, V.flush = jt, V;
210
210
  }
211
211
  return de = c, de;
212
212
  }
213
- var Kt = bt();
214
- const Wt = /* @__PURE__ */ dt(Kt);
215
- var me, Ge;
213
+ var Jt = _t();
214
+ const Wt = /* @__PURE__ */ dt(Jt);
215
+ var me, ze;
216
216
  function Qt() {
217
- if (Ge) return me;
218
- Ge = 1;
219
- var e = bt(), t = Te(), n = "Expected a function";
217
+ if (ze) return me;
218
+ ze = 1;
219
+ var e = _t(), t = Te(), n = "Expected a function";
220
220
  function a(o, s, c) {
221
221
  var u = !0, d = !0;
222
222
  if (typeof o != "function")
@@ -242,10 +242,10 @@ const Vt = /* @__PURE__ */ dt(Yt), Zt = (e, t, n, a) => {
242
242
  }, Xt = (
243
243
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
244
244
  (e) => {
245
- const t = q.useRef(e);
246
- return q.useEffect(() => {
245
+ const t = M.useRef(e);
246
+ return M.useEffect(() => {
247
247
  t.current = e;
248
- }), q.useMemo(() => (...n) => {
248
+ }), M.useMemo(() => (...n) => {
249
249
  var a;
250
250
  return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
251
251
  }, []);
@@ -253,10 +253,10 @@ const Vt = /* @__PURE__ */ dt(Yt), Zt = (e, t, n, a) => {
253
253
  ), en = (
254
254
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
255
255
  (e) => {
256
- const [t, n] = q.useState((e == null ? void 0 : e.current) || null);
256
+ const [t, n] = M.useState((e == null ? void 0 : e.current) || null);
257
257
  return e && setTimeout(() => {
258
258
  e.current !== t && n(e.current);
259
- }, 0), { refProxy: q.useMemo(() => new Proxy((o) => {
259
+ }, 0), { refProxy: M.useMemo(() => new Proxy((o) => {
260
260
  o !== t && n(o);
261
261
  }, {
262
262
  get(o, s) {
@@ -278,54 +278,54 @@ const Vt = /* @__PURE__ */ dt(Yt), Zt = (e, t, n, a) => {
278
278
  height: e.contentRect.height
279
279
  };
280
280
  function nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: s = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
281
- const l = at(e), m = Xt(d), [_, y] = ge({
281
+ const l = at(e), m = Xt(d), [b, y] = ge({
282
282
  width: void 0,
283
283
  height: void 0
284
- }), { refProxy: E, refElement: b } = en(c), { box: T } = u || {}, w = je((g) => {
284
+ }), { refProxy: I, refElement: _ } = en(c), { box: T } = u || {}, w = Ne((g) => {
285
285
  if (!o && !s)
286
286
  return;
287
287
  if (l.current) {
288
288
  l.current = !1;
289
289
  return;
290
290
  }
291
- const k = (v, h) => o && v.width !== h.width || s && v.height !== h.height;
291
+ const j = (v, h) => o && v.width !== h.width || s && v.height !== h.height;
292
292
  g.forEach((v) => {
293
293
  const h = tn(v, T);
294
- y((B) => k(B, h) ? (m == null || m({
294
+ y(($) => j($, h) ? (m == null || m({
295
295
  width: h.width,
296
296
  height: h.height,
297
297
  entry: v
298
- }), h) : B);
298
+ }), h) : $);
299
299
  });
300
- }, [o, s, l, T]), S = je(Zt(w, t, n, a), [
300
+ }, [o, s, l, T]), S = Ne(Zt(w, t, n, a), [
301
301
  w,
302
302
  t,
303
303
  n,
304
304
  a
305
305
  ]);
306
- return M(() => {
306
+ return U(() => {
307
307
  let g;
308
- return b ? (g = new window.ResizeObserver(S), g.observe(b, u)) : (_.width || _.height) && (m == null || m({
308
+ return _ ? (g = new window.ResizeObserver(S), g.observe(_, u)) : (b.width || b.height) && (m == null || m({
309
309
  width: null,
310
310
  height: null,
311
311
  entry: null
312
312
  }), y({ width: void 0, height: void 0 })), () => {
313
- var k, v, h;
314
- (k = g == null ? void 0 : g.disconnect) === null || k === void 0 || k.call(g), (h = (v = S).cancel) === null || h === void 0 || h.call(v);
313
+ var j, v, h;
314
+ (j = g == null ? void 0 : g.disconnect) === null || j === void 0 || j.call(g), (h = (v = S).cancel) === null || h === void 0 || h.call(v);
315
315
  };
316
- }, [S, b]), Object.assign({ ref: E }, _);
316
+ }, [S, _]), Object.assign({ ref: I }, b);
317
317
  }
318
- function _t(e) {
318
+ function bt(e) {
319
319
  var t, n, a = "";
320
320
  if (typeof e == "string" || typeof e == "number") a += e;
321
321
  else if (typeof e == "object") if (Array.isArray(e)) {
322
322
  var o = e.length;
323
- for (t = 0; t < o; t++) e[t] && (n = _t(e[t])) && (a && (a += " "), a += n);
323
+ for (t = 0; t < o; t++) e[t] && (n = bt(e[t])) && (a && (a += " "), a += n);
324
324
  } else for (n in e) e[n] && (a && (a += " "), a += n);
325
325
  return a;
326
326
  }
327
- function j() {
328
- for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = _t(e)) && (a && (a += " "), a += t);
327
+ function N() {
328
+ for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = bt(e)) && (a && (a += " "), a += t);
329
329
  return a;
330
330
  }
331
331
  const rn = "_headerContainer_1cubo_1", an = "_navigationTabList_1cubo_8", on = "_navigationTab_1cubo_8", sn = "_headerContent_1cubo_34", cn = "_staticEnabled_1cubo_50", A = {
@@ -339,7 +339,7 @@ const rn = "_headerContainer_1cubo_1", an = "_navigationTabList_1cubo_8", on = "
339
339
  refreshMode: "debounce",
340
340
  refreshRate: 0
341
341
  }), [o, s] = ge(!1), c = () => o ? !e : !0;
342
- M(() => {
342
+ U(() => {
343
343
  const d = () => {
344
344
  s(window.scrollY > 0);
345
345
  };
@@ -350,7 +350,7 @@ const rn = "_headerContainer_1cubo_1", an = "_navigationTabList_1cubo_8", on = "
350
350
  "div",
351
351
  {
352
352
  ref: n,
353
- className: j(A.headerContent, {
353
+ className: N(A.headerContent, {
354
354
  [A.staticEnabled]: c()
355
355
  }),
356
356
  children: [
@@ -367,19 +367,19 @@ const un = "_sidebarContainer_bmdti_1", dn = {
367
367
  sidebarContainer: un
368
368
  }, mn = "_logoLink_1baxb_1", fn = {
369
369
  logoLink: mn
370
- }, bn = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: a = "Lokalise" }) => /* @__PURE__ */ i("a", { className: fn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ i("img", { src: e, alt: a }) }), _n = "_link_1weq1_1", gn = "_active_1weq1_18", Je = {
371
- link: _n,
370
+ }, _n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: a = "Lokalise" }) => /* @__PURE__ */ i("a", { className: fn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ i("img", { src: e, alt: a }) }), bn = "_link_1weq1_1", gn = "_active_1weq1_18", Ke = {
371
+ link: bn,
372
372
  active: gn
373
373
  }, hn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
374
374
  it,
375
375
  {
376
- className: j(Je.link, {
377
- [Je.active]: window.location.pathname.startsWith(t)
376
+ className: N(Ke.link, {
377
+ [Ke.active]: window.location.pathname.startsWith(t)
378
378
  }),
379
379
  href: t,
380
380
  children: /* @__PURE__ */ i(n, { size: "25px" })
381
381
  }
382
- ) }), pn = "_dropdownButton_hwh0c_1", vn = "_dropdownButtonActive_hwh0c_18", Ke = {
382
+ ) }), pn = "_dropdownButton_hwh0c_1", vn = "_dropdownButtonActive_hwh0c_18", Je = {
383
383
  dropdownButton: pn,
384
384
  dropdownButtonActive: vn
385
385
  }, Tn = ({ children: e, icon: t }) => /* @__PURE__ */ i(
@@ -389,8 +389,8 @@ const un = "_sidebarContainer_bmdti_1", dn = {
389
389
  "button",
390
390
  {
391
391
  type: "button",
392
- className: j(Ke.dropdownButton, {
393
- [Ke.dropdownButtonActive]: n
392
+ className: N(Je.dropdownButton, {
393
+ [Je.dropdownButtonActive]: n
394
394
  }),
395
395
  children: /* @__PURE__ */ i(t, { size: "25px" })
396
396
  }
@@ -403,23 +403,23 @@ const un = "_sidebarContainer_bmdti_1", dn = {
403
403
  "div",
404
404
  {
405
405
  "aria-label": "Upgrade Icon",
406
- className: j(
406
+ className: N(
407
407
  wn.iconContainer,
408
408
  "flex-row",
409
409
  "items-center",
410
410
  "justify-center",
411
411
  e
412
412
  ),
413
- children: /* @__PURE__ */ i(Ot, {})
413
+ children: /* @__PURE__ */ i(Lt, {})
414
414
  }
415
- ), Sn = "_menuContainer_wbu3u_5", In = "_profileButton_wbu3u_16", En = "_profileImage_wbu3u_29", kn = "_profileImageHighlight_wbu3u_37", Cn = "_profileImageUpgradeIcon_wbu3u_41", Nn = "_userIconWrapper_wbu3u_47", N = {
415
+ ), Sn = "_menuContainer_wbu3u_5", En = "_profileButton_wbu3u_16", In = "_profileImage_wbu3u_29", jn = "_profileImageHighlight_wbu3u_37", Pn = "_profileImageUpgradeIcon_wbu3u_41", Cn = "_userIconWrapper_wbu3u_47", C = {
416
416
  menuContainer: Sn,
417
- profileButton: In,
418
- profileImage: En,
419
- profileImageHighlight: kn,
420
- profileImageUpgradeIcon: Cn,
421
- userIconWrapper: Nn
422
- }, ht = jt({}), U = () => Rt(ht), Rn = ({ children: e }) => {
417
+ profileButton: En,
418
+ profileImage: In,
419
+ profileImageHighlight: jn,
420
+ profileImageUpgradeIcon: Pn,
421
+ userIconWrapper: Cn
422
+ }, ht = Nt({}), H = () => kt(ht), kn = ({ children: e }) => {
423
423
  const {
424
424
  currentTeam: t,
425
425
  otherTeams: n,
@@ -431,32 +431,32 @@ const un = "_sidebarContainer_bmdti_1", dn = {
431
431
  isEndOfTrialActive: d,
432
432
  isTeamSuspended: l,
433
433
  isFullyAuthenticated: m
434
- } = U();
434
+ } = H();
435
435
  return /* @__PURE__ */ i(
436
436
  pe,
437
437
  {
438
- menuButton: () => /* @__PURE__ */ p("button", { className: N.profileButton, "aria-label": "Profile menu", type: "button", children: [
438
+ menuButton: () => /* @__PURE__ */ p("button", { className: C.profileButton, "aria-label": "Profile menu", type: "button", children: [
439
439
  t != null && t.logoUrl ? /* @__PURE__ */ i(
440
440
  "img",
441
441
  {
442
442
  src: t.logoUrl,
443
- className: j(N.profileImage, {
444
- [N.profileImageHighlight]: a
443
+ className: N(C.profileImage, {
444
+ [C.profileImageHighlight]: a
445
445
  }),
446
446
  alt: "Team Logo"
447
447
  }
448
448
  ) : /* @__PURE__ */ i(
449
449
  "div",
450
450
  {
451
- className: j(N.userIconWrapper, "flex-row", "align-center", "items-center", {
452
- [N.profileImageHighlight]: a
451
+ className: N(C.userIconWrapper, "flex-row", "align-center", "items-center", {
452
+ [C.profileImageHighlight]: a
453
453
  }),
454
454
  children: /* @__PURE__ */ i(st, { size: "25px" })
455
455
  }
456
456
  ),
457
- a && /* @__PURE__ */ i(gt, { className: N.profileImageUpgradeIcon })
457
+ a && /* @__PURE__ */ i(gt, { className: C.profileImageUpgradeIcon })
458
458
  ] }),
459
- children: /* @__PURE__ */ i(ve, { placement: "right-end", className: N.menuContainer, children: e({
459
+ children: /* @__PURE__ */ i(ve, { placement: "right-end", className: C.menuContainer, children: e({
460
460
  allowTeamCreation: s,
461
461
  otherTeams: n,
462
462
  canAccessTeamSettings: u,
@@ -468,7 +468,7 @@ const un = "_sidebarContainer_bmdti_1", dn = {
468
468
  }) })
469
469
  }
470
470
  );
471
- }, pt = 0, jn = 9999, Pn = [150, 151, 250, 251], An = [152, 153, 252, 253], On = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], Ln = [156, 159, 160, 256, 259, 260], vt = 9998, ye = (e) => e === pt, Tt = (e) => e === jn, aa = (e) => Pn.includes(e), oa = (e) => An.includes(e), ia = (e) => On.includes(e), sa = (e) => Ln.includes(e), ca = (e) => e > pt && e < vt, la = (e) => e === vt, qn = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [Pt(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), Mn = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), ua = (e) => Mn(e, qn, /* @__PURE__ */ i("br", {})), xn = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, Un = (e) => e.match(xn) ?? [], Qe = (e, t, n) => {
471
+ }, pt = 0, Nn = 9999, Rn = [150, 151, 250, 251], An = [152, 153, 252, 253], Ln = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], On = [156, 159, 160, 256, 259, 260], vt = 9998, ye = (e) => e === pt, Tt = (e) => e === Nn, ca = (e) => Rn.includes(e), la = (e) => An.includes(e), ua = (e) => Ln.includes(e), da = (e) => On.includes(e), ma = (e) => e > pt && e < vt, fa = (e) => e === vt, qn = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [Rt(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), Mn = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), _a = (e) => Mn(e, qn, /* @__PURE__ */ i("br", {})), Un = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, xn = (e) => e.match(Un) ?? [], Qe = (e, t, n) => {
472
472
  const a = e.split(t);
473
473
  if (a.length === 1)
474
474
  return e;
@@ -477,10 +477,10 @@ const un = "_sidebarContainer_bmdti_1", dn = {
477
477
  /* @__PURE__ */ i("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
478
478
  ), o.push(a.join(t)), o.filter((s) => s !== "");
479
479
  }, Ye = (e) => {
480
- const t = Un(e);
480
+ const t = xn(e);
481
481
  return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? Qe(n, a, o) : n.flatMap((s) => typeof s == "string" ? Qe(s, a, o) : s), e) : e;
482
- }, da = (e) => typeof e == "string" ? Ye(e) : e.flatMap((t) => typeof t == "string" ? Ye(t) : t, e), ma = (e, t = "PP") => lt(e, t), fa = (e, t, n = "PP") => lt(qt(e, t), n), ba = (e) => {
483
- M(e, []);
482
+ }, ba = (e) => typeof e == "string" ? Ye(e) : e.flatMap((t) => typeof t == "string" ? Ye(t) : t, e), ga = (e, t = "PP") => lt(e, t), ha = (e, t, n = "PP") => lt(qt(e, t), n), pa = (e) => {
483
+ U(e, []);
484
484
  }, Ve = {
485
485
  biller: "biller",
486
486
  owner: "owner"
@@ -488,31 +488,31 @@ const un = "_sidebarContainer_bmdti_1", dn = {
488
488
  Ve.biller,
489
489
  Ve.owner
490
490
  ], Bn = ({ children: e, config: t }) => {
491
- const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: s, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((S) => S.id === a), l = n.filter((S) => S.id !== a), m = Ze.includes(u), _ = Ze.includes(u), y = ye(o) || Tt(o), w = {
491
+ const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: s, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((S) => S.id === a), l = n.filter((S) => S.id !== a), m = Ze.includes(u), b = Ze.includes(u), y = ye(o) || Tt(o), w = {
492
492
  ...t,
493
493
  currentTeam: d,
494
494
  otherTeams: l,
495
495
  canChangeBilling: m,
496
- canAccessTeamSettings: _,
496
+ canAccessTeamSettings: b,
497
497
  isOnFreeOrTrialPlan: y,
498
498
  showUpgradeCta: c && y && m,
499
- showBillingButton: c && _ && m,
499
+ showBillingButton: c && b && m,
500
500
  allowTeamCreation: c && !s
501
501
  };
502
502
  return /* @__PURE__ */ i(ht.Provider, { value: w, children: e });
503
- }, $n = ({ config: e, children: t }) => /* @__PURE__ */ i(Bn, { config: e, children: /* @__PURE__ */ i(Rn, { children: t }) }), Hn = "_container_q5pot_1", Dn = "_profileEmail_q5pot_5", Xe = {
504
- container: Hn,
505
- profileEmail: Dn
506
- }, zn = ({
503
+ }, Hn = ({ config: e, children: t }) => /* @__PURE__ */ i(Bn, { config: e, children: /* @__PURE__ */ i(kn, { children: t }) }), $n = "_container_q5pot_1", Gn = "_profileEmail_q5pot_5", Xe = {
504
+ container: $n,
505
+ profileEmail: Gn
506
+ }, Dn = ({
507
507
  href: e,
508
508
  onClick: t,
509
509
  userEmail: n,
510
510
  hideBottomDivider: a
511
511
  }) => {
512
- const { isEndOfTrialActive: o, isTeamSuspended: s } = U();
512
+ const { isEndOfTrialActive: o, isTeamSuspended: s } = H();
513
513
  return o || s ? null : /* @__PURE__ */ p(rt, { children: [
514
514
  /* @__PURE__ */ i(
515
- J,
515
+ W,
516
516
  {
517
517
  href: e,
518
518
  onClick: () => {
@@ -526,31 +526,31 @@ const un = "_sidebarContainer_bmdti_1", dn = {
526
526
  ),
527
527
  !a && /* @__PURE__ */ i(ct, {})
528
528
  ] });
529
- }, Fn = "_wrapper_15d85_1", Gn = "_profileImage_15d85_14", Jn = "_teamName_15d85_22", Kn = "_planLabel_15d85_29", Wn = "_membership_15d85_38", Qn = "_defaultProfileImage_15d85_44", P = {
529
+ }, Fn = "_wrapper_15d85_1", zn = "_profileImage_15d85_14", Kn = "_teamName_15d85_22", Jn = "_planLabel_15d85_29", Wn = "_membership_15d85_38", Qn = "_defaultProfileImage_15d85_44", R = {
530
530
  wrapper: Fn,
531
- profileImage: Gn,
532
- teamName: Jn,
533
- planLabel: Kn,
531
+ profileImage: zn,
532
+ teamName: Kn,
533
+ planLabel: Jn,
534
534
  membership: Wn,
535
535
  defaultProfileImage: Qn
536
536
  }, yt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
537
- const { currentTeam: a, planId: o } = U(), s = e || a;
537
+ const { currentTeam: a, planId: o } = H(), s = e || a;
538
538
  if (!s)
539
539
  return null;
540
540
  const c = ye(o) ? "Free" : Tt(o) ? "Trial" : void 0;
541
541
  return /* @__PURE__ */ p(
542
- t ? J : "div",
542
+ t ? W : "div",
543
543
  {
544
- className: `flex-row gap-2 flex-nowrap items-center ${P.wrapper}`,
544
+ className: `flex-row gap-2 flex-nowrap items-center ${R.wrapper}`,
545
545
  ...t && { onClick: () => t(s) },
546
546
  children: [
547
- s.logoUrl ? /* @__PURE__ */ i("img", { className: P.profileImage, src: s.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${P.defaultProfileImage}`, children: /* @__PURE__ */ i(st, { size: "25px" }) }),
547
+ s.logoUrl ? /* @__PURE__ */ i("img", { className: R.profileImage, src: s.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${R.defaultProfileImage}`, children: /* @__PURE__ */ i(st, { size: "25px" }) }),
548
548
  /* @__PURE__ */ p("div", { className: "flex-col items-start", children: [
549
549
  /* @__PURE__ */ p("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
550
- /* @__PURE__ */ i("span", { title: s.name, className: P.teamName, children: s.name }),
551
- c && !n && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${P.planLabel}`, children: c })
550
+ /* @__PURE__ */ i("span", { title: s.name, className: R.teamName, children: s.name }),
551
+ c && !n && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${R.planLabel}`, children: c })
552
552
  ] }),
553
- /* @__PURE__ */ i("span", { className: P.membership, children: s.role })
553
+ /* @__PURE__ */ i("span", { className: R.membership, children: s.role })
554
554
  ] })
555
555
  ]
556
556
  }
@@ -558,46 +558,46 @@ const un = "_sidebarContainer_bmdti_1", dn = {
558
558
  }, Yn = "_teamsContainer_1t68g_1", Vn = {
559
559
  teamsContainer: Yn
560
560
  }, Zn = ({ onSwitchTeam: e }) => {
561
- const { otherTeams: t } = U();
561
+ const { otherTeams: t } = H();
562
562
  return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${Vn.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ i(yt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
563
563
  }, Xn = "_container_1u995_1", er = "_planCta_1u995_15", tr = "_upgradeIconWrapper_1u995_19", fe = {
564
564
  container: Xn,
565
565
  planCta: er,
566
566
  upgradeIconWrapper: tr
567
567
  }, nr = ({ upgradeOptionHref: e }) => {
568
- const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = U();
568
+ const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = H();
569
569
  if (!a)
570
570
  return null;
571
571
  const c = ye(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
572
- return /* @__PURE__ */ p(J, { href: e, className: `flex-col gap-1 items-start ${fe.container}`, children: [
572
+ return /* @__PURE__ */ p(W, { href: e, className: `flex-col gap-1 items-start ${fe.container}`, children: [
573
573
  /* @__PURE__ */ i("span", { className: fe.planCta, children: c }),
574
574
  /* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${fe.upgradeIconWrapper}`, children: [
575
575
  /* @__PURE__ */ i(gt, {}),
576
576
  /* @__PURE__ */ i("span", { children: "See upgrade options" })
577
577
  ] })
578
578
  ] });
579
- }, I = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className: dn.sidebarContainer, children: e }), rr = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
580
- I.Top = rr;
579
+ }, E = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className: dn.sidebarContainer, children: e }), rr = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
580
+ E.Top = rr;
581
581
  const ar = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
582
- I.Bottom = ar;
583
- I.Avatar = bn;
584
- I.IconLink = hn;
585
- I.Menu = Tn;
586
- I.ProfileMenu = $n;
587
- I.TeamSwitch = Zn;
588
- I.TeamMenuItem = yt;
589
- I.UpgradeMenuItem = nr;
590
- I.ProfileSettingsMenuItem = zn;
582
+ E.Bottom = ar;
583
+ E.Avatar = _n;
584
+ E.IconLink = hn;
585
+ E.Menu = Tn;
586
+ E.ProfileMenu = Hn;
587
+ E.TeamSwitch = Zn;
588
+ E.TeamMenuItem = yt;
589
+ E.UpgradeMenuItem = nr;
590
+ E.ProfileSettingsMenuItem = Dn;
591
591
  const or = "_breadcrumbsItem_1hm6a_1", ir = "_breadcrumbs_1hm6a_1", et = {
592
592
  breadcrumbsItem: or,
593
593
  breadcrumbs: ir
594
- }, _a = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: et.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ p(ot, { children: [
594
+ }, va = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: et.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ p(ot, { children: [
595
595
  /* @__PURE__ */ i(it, { className: et.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
596
596
  n < e.length - 1 && /* @__PURE__ */ i("span", { children: " — " })
597
597
  ] }, `${t.link}-${t.name}`)) }), sr = ({ items: e }) => /* @__PURE__ */ i(rt, { children: e.map((t, n) => /* @__PURE__ */ p(ot, { children: [
598
598
  !!n && t.some((a) => a.visible) && /* @__PURE__ */ i(ct, {}),
599
- t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: s }) => /* @__PURE__ */ i(J, { href: a || "#", "aria-label": o, onClick: s, children: o }, o))
600
- ] }, t[0].label)) }), cr = "_badge_1pc1v_1", lr = "_tag_1pc1v_15", ur = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", dr = "_disabled_1pc1v_57", mr = "_projectNavigationItem_1pc1v_61", fr = "_projectNavigationItemDisabled_1pc1v_67", R = {
599
+ t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: s }) => /* @__PURE__ */ i(W, { href: a || "#", "aria-label": o, onClick: s, children: o }, o))
600
+ ] }, t[0].label)) }), cr = "_badge_1pc1v_1", lr = "_tag_1pc1v_15", ur = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", dr = "_disabled_1pc1v_57", mr = "_projectNavigationItem_1pc1v_61", fr = "_projectNavigationItemDisabled_1pc1v_67", k = {
601
601
  badge: cr,
602
602
  tag: lr,
603
603
  withNavLinkStyle: ur,
@@ -607,32 +607,32 @@ const or = "_breadcrumbsItem_1hm6a_1", ir = "_breadcrumbs_1hm6a_1", et = {
607
607
  }, tt = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
608
608
  /* @__PURE__ */ p("div", { children: [
609
609
  /* @__PURE__ */ i("span", { children: e }),
610
- !!t && /* @__PURE__ */ i("div", { className: R.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
610
+ !!t && /* @__PURE__ */ i("div", { className: k.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
611
611
  ] }),
612
- !!n && /* @__PURE__ */ i(Lt, { className: R.tag, children: n })
613
- ] }), be = At(
612
+ !!n && /* @__PURE__ */ i(Ot, { className: k.tag, children: n })
613
+ ] }), _e = At(
614
614
  ({ label: e, href: t = "", disabled: n = !1, badge: a, onClick: o, novel: s }, c) => /* @__PURE__ */ i(he, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ i(
615
615
  "div",
616
616
  {
617
- className: n ? R.projectNavigationItemDisabled : R.projectNavigationItem,
617
+ className: n ? k.projectNavigationItemDisabled : k.projectNavigationItem,
618
618
  children: o || n || !t ? /* @__PURE__ */ i(
619
619
  "button",
620
620
  {
621
621
  type: "button",
622
622
  ref: c,
623
- className: j(R.withNavLinkStyle, {
624
- [R.disabled]: n
623
+ className: N(k.withNavLinkStyle, {
624
+ [k.disabled]: n
625
625
  }),
626
626
  disabled: n,
627
627
  onClick: o,
628
628
  children: /* @__PURE__ */ i(tt, { label: e, badge: a, novel: s })
629
629
  }
630
- ) : /* @__PURE__ */ i("a", { href: t, className: R.withNavLinkStyle, children: /* @__PURE__ */ i(tt, { label: e, badge: a, novel: s }) })
630
+ ) : /* @__PURE__ */ i("a", { href: t, className: k.withNavLinkStyle, children: /* @__PURE__ */ i(tt, { label: e, badge: a, novel: s }) })
631
631
  }
632
632
  ) })
633
633
  );
634
- be.displayName = "NavigationTabsItem";
635
- const br = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, _r = (e) => e.visible && (!e.dropdown || br(e.dropdown)), ga = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: A.navigationTabList, "aria-orientation": "horizontal", children: e.filter(_r).map((n) => {
634
+ _e.displayName = "NavigationTabsItem";
635
+ const _r = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, br = (e) => e.visible && (!e.dropdown || _r(e.dropdown)), Ta = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: A.navigationTabList, "aria-orientation": "horizontal", children: e.filter(br).map((n) => {
636
636
  var a, o, s;
637
637
  return n.dropdown ? /* @__PURE__ */ i(
638
638
  "li",
@@ -643,7 +643,7 @@ const br = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
643
643
  children: /* @__PURE__ */ i(
644
644
  pe,
645
645
  {
646
- menuButton: ({ opened: c }) => /* @__PURE__ */ i(be, { label: n.label, disabled: n.disabled, active: c }),
646
+ menuButton: ({ opened: c }) => /* @__PURE__ */ i(_e, { label: n.label, disabled: n.disabled, active: c }),
647
647
  children: /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(sr, { items: n.dropdown }) })
648
648
  }
649
649
  )
@@ -656,7 +656,7 @@ const br = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
656
656
  "data-testid": n.key,
657
657
  "aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
658
658
  children: /* @__PURE__ */ i(
659
- be,
659
+ _e,
660
660
  {
661
661
  label: n.label,
662
662
  href: n.link,
@@ -687,9 +687,9 @@ const br = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
687
687
  }), pr = {
688
688
  teamKeyCsrf: (e, t) => ["getUserToken", "x-csrf-token", t, e],
689
689
  teamKeyJwt: (e, t) => ["getUserToken", "Authorization", `Bearer ${t}`, e]
690
- }, vr = (e, t) => x({
690
+ }, vr = (e, t) => O({
691
691
  ...t,
692
- queryFn: ({ queryKey: [n, a, o, s] }) => K(e, we, {
692
+ queryFn: ({ queryKey: [n, a, o, s] }) => Q(e, we, {
693
693
  pathParams: { teamId: s },
694
694
  headers: a === "x-csrf-token" ? { "x-csrf-token": o } : { Authorization: o }
695
695
  })
@@ -720,44 +720,44 @@ function Y(e) {
720
720
  return;
721
721
  }
722
722
  }
723
- const G = class G extends CustomEvent {
723
+ const J = class J extends CustomEvent {
724
724
  constructor(t) {
725
- super(G.eventName, {
725
+ super(J.eventName, {
726
726
  detail: { token: t, payload: Y(t.accessToken) }
727
727
  });
728
728
  }
729
729
  };
730
- Re(G, "eventName", "new-jwt-issued");
731
- let O = G;
730
+ ke(J, "eventName", "new-jwt-issued");
731
+ let L = J;
732
732
  function Se() {
733
- const e = _e(document.cookie, "accessToken"), t = _e(document.cookie, "refreshToken");
733
+ const e = be(document.cookie, "accessToken"), t = be(document.cookie, "refreshToken");
734
734
  if (!(!e || !t))
735
735
  return { accessToken: e, refreshToken: t };
736
736
  }
737
737
  function St() {
738
- return _e(document.cookie, "csrf_token");
738
+ return be(document.cookie, "csrf_token");
739
739
  }
740
- function _e(e, t) {
740
+ function be(e, t) {
741
741
  var n, a;
742
742
  return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
743
743
  }
744
- function ha(e, t) {
744
+ function ya(e, t) {
745
745
  const n = St(), a = vr(e, {
746
746
  queryKey: pr.teamKeyCsrf(t, n ?? ""),
747
747
  enabled: n !== void 0
748
748
  }), o = at();
749
- return M(() => {
750
- a.data && a.data.accessToken !== o.current && (window.dispatchEvent(new O(a.data)), o.current = a.data.accessToken);
749
+ return U(() => {
750
+ a.data && a.data.accessToken !== o.current && (window.dispatchEvent(new L(a.data)), o.current = a.data.accessToken);
751
751
  }, [a.data]), a;
752
752
  }
753
- function It() {
753
+ function Et() {
754
754
  const [e, t] = ge();
755
- return M(() => {
755
+ return U(() => {
756
756
  const n = (o) => {
757
757
  t(o.detail.payload);
758
758
  }, a = Se();
759
- return t(a && Y(a.accessToken)), window.addEventListener(O.eventName, n), () => {
760
- window.removeEventListener(O.eventName, n);
759
+ return t(a && Y(a.accessToken)), window.addEventListener(L.eventName, n), () => {
760
+ window.removeEventListener(L.eventName, n);
761
761
  };
762
762
  }, []), e;
763
763
  }
@@ -771,63 +771,63 @@ const yr = r.object({
771
771
  }), wr = r.object({
772
772
  team_id: r.number(),
773
773
  team_user: yr
774
- }), Sr = Q({
774
+ }), Sr = B({
775
775
  description: "Get the details of a team user",
776
776
  requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
777
777
  pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
778
778
  successResponseBodySchema: wr
779
- }), Ir = {
779
+ }), Er = {
780
780
  teamUserKey: (e, t) => ["GetTeamUsers", e, t]
781
- }, Er = (e, t) => x({
781
+ }, Ir = (e, t) => O({
782
782
  ...t,
783
- queryFn: ({ queryKey: [n, a, o] }) => W(e, Sr, { pathParams: { teamId: a, userId: o } })
783
+ queryFn: ({ queryKey: [n, a, o] }) => x(e, Sr, { pathParams: { teamId: a, userId: o } })
784
784
  });
785
- function pa(e) {
786
- const t = It();
787
- return Er(e, {
788
- queryKey: Ir.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0),
785
+ function wa(e) {
786
+ const t = Et();
787
+ return Ir(e, {
788
+ queryKey: Er.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0),
789
789
  enabled: (t == null ? void 0 : t.userId) !== void 0 && t.teamId !== void 0
790
790
  });
791
791
  }
792
- const kr = r.object({
792
+ const jr = r.object({
793
793
  lang_id: r.number(),
794
794
  lang_iso: r.string(),
795
795
  lang_name: r.string(),
796
796
  is_writable: r.union([r.literal(0), r.literal(1)])
797
- }), Cr = r.object({
797
+ }), Pr = r.object({
798
798
  user_id: r.number(),
799
799
  email: r.string().email(),
800
800
  fullname: r.string(),
801
801
  created_at: r.string(),
802
802
  created_at_timestamp: r.number(),
803
803
  admin_rights: r.array(r.string()),
804
- languages: r.array(kr),
804
+ languages: r.array(jr),
805
805
  is_admin: r.boolean(),
806
806
  is_reviewer: r.boolean()
807
- }), Nr = r.object({
807
+ }), Cr = r.object({
808
808
  project_id: r.string(),
809
- contributors: r.array(Cr)
810
- }), Rr = Q({
809
+ contributors: r.array(Pr)
810
+ }), kr = B({
811
811
  description: "Get the details of a project contributor",
812
812
  requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
813
813
  pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
814
- successResponseBodySchema: Nr
815
- }), jr = {
814
+ successResponseBodySchema: Cr
815
+ }), Nr = {
816
816
  projectUserKey: (e, t) => ["RetrieveContributor", e, t]
817
- }, Pr = (e, t) => x({
817
+ }, Rr = (e, t) => O({
818
818
  ...t,
819
- queryFn: ({ queryKey: [n, a, o] }) => W(e, Rr, {
819
+ queryFn: ({ queryKey: [n, a, o] }) => x(e, kr, {
820
820
  pathParams: { projectId: a, contributorId: o }
821
821
  })
822
822
  });
823
- function va(e, t) {
824
- const n = It();
825
- return Pr(e, {
826
- queryKey: jr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
823
+ function Sa(e, t) {
824
+ const n = Et();
825
+ return Rr(e, {
826
+ queryKey: Nr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
827
827
  enabled: n !== void 0
828
828
  });
829
829
  }
830
- function Ta() {
830
+ function Ea() {
831
831
  const e = Se();
832
832
  if (!e)
833
833
  return;
@@ -835,7 +835,7 @@ function Ta() {
835
835
  if (t)
836
836
  return { ...e, payload: t };
837
837
  }
838
- function ya() {
838
+ function Ia() {
839
839
  return (e) => (t, n) => e(t, {
840
840
  ...n,
841
841
  headers: {
@@ -845,7 +845,7 @@ function ya() {
845
845
  credentials: "omit"
846
846
  });
847
847
  }
848
- function D(e) {
848
+ function F(e) {
849
849
  return { Authorization: `Bearer ${e}` };
850
850
  }
851
851
  function Ar(e, t) {
@@ -856,32 +856,32 @@ function Ar(e, t) {
856
856
  return n(a, o);
857
857
  const c = await n(a, {
858
858
  ...o,
859
- headers: { ...o.headers, ...D(s.accessToken) }
859
+ headers: { ...o.headers, ...F(s.accessToken) }
860
860
  });
861
861
  if (s && (c.status === 401 || c.status === 403)) {
862
862
  const d = Y(s.accessToken);
863
863
  if (!d)
864
864
  return c;
865
- const l = await K(e, we, {
865
+ const l = await Q(e, we, {
866
866
  pathParams: { teamId: d.teamId },
867
- headers: D(s.refreshToken)
867
+ headers: F(s.refreshToken)
868
868
  });
869
869
  return await ((u = t.onNewJwtTokenIssued) == null ? void 0 : u.call(t, l)), n(a, {
870
870
  ...o,
871
- headers: { ...o.headers, ...D(l.accessToken) }
871
+ headers: { ...o.headers, ...F(l.accessToken) }
872
872
  });
873
873
  }
874
874
  return c;
875
875
  };
876
876
  }
877
- const Or = {
877
+ const Lr = {
878
878
  wretch: {
879
879
  lokaliseAuth(e) {
880
880
  return this.middlewares([Ar(this, e)]);
881
881
  }
882
882
  }
883
883
  };
884
- function Lr(e, t) {
884
+ function Or(e, t) {
885
885
  return (n) => async (a, o) => {
886
886
  var d;
887
887
  if (await t.getCachedJwtToken() !== void 0)
@@ -889,24 +889,24 @@ function Lr(e, t) {
889
889
  const c = await t.getCsrfToken();
890
890
  if (c === void 0)
891
891
  return n(a, o);
892
- const u = await K(e, we, {
892
+ const u = await Q(e, we, {
893
893
  pathParams: { teamId: await t.getTeamId() },
894
894
  headers: { "x-csrf-token": c }
895
895
  });
896
896
  return await ((d = t.onNewJwtTokenIssued) == null ? void 0 : d.call(t, u)), n(a, {
897
897
  ...o,
898
- headers: { ...o.headers, ...D(u.accessToken) }
898
+ headers: { ...o.headers, ...F(u.accessToken) }
899
899
  });
900
900
  };
901
901
  }
902
- const wa = {
902
+ const ja = {
903
903
  wretch: {
904
904
  lokaliseAuth(e = {}) {
905
- return this.addon(Or).lokaliseAuth(nt(e));
905
+ return this.addon(Lr).lokaliseAuth(nt(e));
906
906
  },
907
907
  promoteClassicSession(e) {
908
908
  const t = nt(e);
909
- return this.middlewares([Lr(this, t)]);
909
+ return this.middlewares([Or(this, t)]);
910
910
  }
911
911
  }
912
912
  };
@@ -917,7 +917,7 @@ function nt(e) {
917
917
  getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : async () => St(),
918
918
  onNewJwtTokenIssued: (t) => {
919
919
  var n;
920
- return window.dispatchEvent(new O(t)), ((n = e.onNewJwtTokenIssued) == null ? void 0 : n.call(e, t)) ?? Promise.resolve();
920
+ return window.dispatchEvent(new L(t)), ((n = e.onNewJwtTokenIssued) == null ? void 0 : n.call(e, t)) ?? Promise.resolve();
921
921
  }
922
922
  };
923
923
  }
@@ -929,11 +929,22 @@ const qr = r.object({
929
929
  language_iso: r.string(),
930
930
  progress: r.number(),
931
931
  words_to_do: r.number()
932
- }), Ie = r.union([
932
+ }), Ur = r.object({
933
+ projectId: r.string()
934
+ }), xr = r.object({
935
+ lang_id: r.number(),
936
+ lang_iso: r.string(),
937
+ lang_name: r.string(),
938
+ is_rtl: r.boolean(),
939
+ plural_forms: r.array(r.string().optional())
940
+ }), Br = r.object({
941
+ projectId: r.string(),
942
+ languages: r.array(xr)
943
+ }), Ee = r.union([
933
944
  r.literal("localization_files"),
934
945
  r.literal("paged_documents"),
935
946
  r.literal("marketing")
936
- ]), xr = r.object({
947
+ ]), Hr = r.object({
937
948
  per_platform_key_names: r.boolean(),
938
949
  reviewing: r.boolean(),
939
950
  auto_toggle_unverified: r.boolean(),
@@ -944,7 +955,7 @@ const qr = r.object({
944
955
  custom_translation_statuses_allow_multiple: r.boolean(),
945
956
  segmentation: r.boolean(),
946
957
  contributor_preview_download_enabled: r.boolean()
947
- }), Ur = r.object({
958
+ }), $r = r.object({
948
959
  not_reviewed: r.number(),
949
960
  unverified: r.number(),
950
961
  spelling_grammar: r.number(),
@@ -961,18 +972,18 @@ const qr = r.object({
961
972
  double_space: r.number(),
962
973
  special_placeholder: r.number(),
963
974
  unbalanced_brackets: r.number()
964
- }), Br = r.object({
975
+ }), Gr = r.object({
965
976
  progress_total: r.number(),
966
977
  keys_total: r.number(),
967
978
  team: r.number(),
968
979
  base_words: r.number(),
969
980
  qa_issues_total: r.number(),
970
- qa_issues: Ur,
981
+ qa_issues: $r,
971
982
  languages: r.array(Mr)
972
- }), F = r.object({
983
+ }), K = r.object({
973
984
  project_id: r.string(),
974
985
  uuid: r.string().uuid(),
975
- project_type: Ie,
986
+ project_type: Ee,
976
987
  name: r.string(),
977
988
  description: r.string(),
978
989
  created_at: r.string(),
@@ -982,126 +993,143 @@ const qr = r.object({
982
993
  team_id: r.number(),
983
994
  base_language_id: r.number(),
984
995
  base_language_iso: r.string(),
985
- settings: xr,
986
- statistics: Br
987
- }), $r = r.object({
996
+ settings: Hr,
997
+ statistics: Gr
998
+ }), Dr = r.object({
988
999
  name: r.string(),
989
1000
  team_id: r.string(),
990
1001
  base_lang_iso: r.string(),
991
1002
  languages: r.array(qr),
992
- project_type: Ie,
1003
+ project_type: Ee,
993
1004
  is_segmentation_enabled: r.boolean()
994
- }), Hr = r.object({
995
- project_type: Ie.optional(),
1005
+ }), Fr = r.object({
1006
+ project_type: Ee.optional(),
996
1007
  filter_team_id: r.number().optional(),
997
1008
  filter_names: r.string().optional(),
998
1009
  include_statistics: r.boolean().optional(),
999
1010
  include_settings: r.boolean().optional(),
1000
1011
  limit: r.number().optional(),
1001
1012
  page: r.number().optional()
1002
- }), Dr = r.array(
1003
- r.union([
1004
- F.omit({ statistics: !0, settings: !0 }),
1005
- F.pick({ settings: !0, statistics: !0 }).partial()
1006
- ])
1007
- ), zr = r.object({
1013
+ }), zr = r.array(
1014
+ K.omit({ statistics: !0, settings: !0 }).and(
1015
+ K.pick({ settings: !0, statistics: !0 }).partial()
1016
+ )
1017
+ ), Kr = r.object({
1008
1018
  project_id: r.string()
1009
- }), Ee = () => "/projects", Fr = ut({
1019
+ }), Ie = () => "/projects", Jr = ut({
1010
1020
  description: "Create a new project",
1011
1021
  method: "post",
1012
- pathResolver: Ee,
1013
- requestBodySchema: $r,
1014
- successResponseBodySchema: F
1015
- }), Gr = Q({
1022
+ pathResolver: Ie,
1023
+ requestBodySchema: Dr,
1024
+ successResponseBodySchema: K
1025
+ }), Wr = B({
1016
1026
  description: "List all projects",
1017
- pathResolver: Ee,
1018
- requestQuerySchema: Hr,
1019
- successResponseBodySchema: Dr
1020
- }), Jr = Q({
1027
+ pathResolver: Ie,
1028
+ requestQuerySchema: Fr,
1029
+ successResponseBodySchema: zr
1030
+ }), Qr = B({
1021
1031
  description: "Retrieve a project",
1022
- pathResolver: Ee,
1023
- requestQuerySchema: zr,
1024
- successResponseBodySchema: F
1032
+ pathResolver: Ie,
1033
+ requestQuerySchema: Kr,
1034
+ successResponseBodySchema: K
1025
1035
  });
1026
- function Sa(e, t = {}) {
1036
+ function Pa(e, t = {}) {
1027
1037
  return Mt({
1028
1038
  ...t,
1029
- mutationFn: (n) => K(e, Fr, {
1039
+ mutationFn: (n) => Q(e, Jr, {
1030
1040
  body: n
1031
1041
  })
1032
1042
  });
1033
1043
  }
1034
- const Ia = {
1044
+ const Yr = B({
1045
+ description: "List of project languages",
1046
+ requestPathParamsSchema: Ur,
1047
+ pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
1048
+ successResponseBodySchema: Br
1049
+ }), Ca = {
1050
+ projectIdKey: (e) => ["listProjectLanguages", e]
1051
+ };
1052
+ function ka(e, t) {
1053
+ return O({
1054
+ ...t,
1055
+ queryFn: ({ queryKey: [n, a] }) => x(e, Yr, {
1056
+ pathParams: { projectId: a }
1057
+ })
1058
+ });
1059
+ }
1060
+ const Na = {
1035
1061
  paramsKey: (e) => ["listProjects", e]
1036
1062
  };
1037
- function Ea(e, t) {
1038
- return x({
1063
+ function Ra(e, t) {
1064
+ return O({
1039
1065
  ...t,
1040
- queryFn: ({ queryKey: [n, a] }) => W(e, Gr, {
1066
+ queryFn: ({ queryKey: [n, a] }) => x(e, Wr, {
1041
1067
  queryParams: a
1042
1068
  })
1043
1069
  });
1044
1070
  }
1045
- const ka = {
1071
+ const Aa = {
1046
1072
  projectIdKey: (e) => ["retrieveProject", e]
1047
1073
  };
1048
- function Ca(e, t) {
1049
- return x({
1074
+ function La(e, t) {
1075
+ return O({
1050
1076
  ...t,
1051
- queryFn: ({ queryKey: [n, a] }) => W(e, Jr, {
1077
+ queryFn: ({ queryKey: [n, a] }) => x(e, Qr, {
1052
1078
  queryParams: { project_id: a }
1053
1079
  })
1054
1080
  });
1055
1081
  }
1056
1082
  export {
1057
- _a as Breadcrumbs,
1083
+ va as Breadcrumbs,
1058
1084
  vt as ENTERPRISE_OPENSOURCE_PLAN_ID,
1059
- Ln as ENTERPRISE_PLAN_IDS,
1085
+ On as ENTERPRISE_PLAN_IDS,
1060
1086
  An as ESSENTIAL_PLAN_IDS,
1061
1087
  pt as FREE_PLAN_ID,
1062
- Or as LokaliseAuthAddon,
1063
- wa as LokaliseAuthBrowserAddon,
1088
+ Lr as LokaliseAuthAddon,
1089
+ ja as LokaliseAuthBrowserAddon,
1064
1090
  z as NavigationPanel,
1065
- ga as NavigationTabs,
1066
- On as PRO_PLAN_IDS,
1067
- Pn as START_PLAN_IDS,
1068
- I as Sidebar,
1069
- jn as TRIAL_PLAN_ID,
1070
- ua as convertNewLineToBreakTag,
1071
- Fr as createProject,
1072
- ma as formatDate,
1073
- fa as formatDateTz,
1074
- Ta as getAuthenticatedSessionDetailFromRequest,
1091
+ Ta as NavigationTabs,
1092
+ Ln as PRO_PLAN_IDS,
1093
+ Rn as START_PLAN_IDS,
1094
+ E as Sidebar,
1095
+ Nn as TRIAL_PLAN_ID,
1096
+ _a as convertNewLineToBreakTag,
1097
+ Jr as createProject,
1098
+ ga as formatDate,
1099
+ ha as formatDateTz,
1100
+ Ea as getAuthenticatedSessionDetailFromRequest,
1075
1101
  Sr as getTeamUser,
1076
- Ir as getTeamUsersQueryKey,
1102
+ Er as getTeamUsersQueryKey,
1077
1103
  we as getUserToken,
1078
1104
  pr as getUserTokenKey,
1079
- la as isEnterpriseOpenSourcePlan,
1080
- sa as isEnterprisePlan,
1081
- oa as isEssentialPlan,
1105
+ fa as isEnterpriseOpenSourcePlan,
1106
+ da as isEnterprisePlan,
1107
+ la as isEssentialPlan,
1082
1108
  ye as isFreePlan,
1083
- ca as isPaidPlan,
1084
- ia as isProPlan,
1085
- aa as isStartPlan,
1109
+ ma as isPaidPlan,
1110
+ ua as isProPlan,
1111
+ ca as isStartPlan,
1086
1112
  Tt as isTrialPlan,
1087
- Gr as listProjects,
1088
- Ia as listProjectsKey,
1089
- da as makeUrlClickable,
1113
+ Ca as listProjectLanguagesKey,
1114
+ Wr as listProjects,
1115
+ Na as listProjectsKey,
1116
+ ba as makeUrlClickable,
1090
1117
  Y as parseJwtTokenPayload,
1091
- ya as publicApiHeadersMiddleware,
1092
- Rr as retrieveContributor,
1093
- jr as retrieveContributorKeys,
1094
- Jr as retrieveProject,
1095
- ka as retrieveProjectQueryKey,
1096
- va as useAuthenticatedProjectContributor,
1097
- It as useAuthenticatedSessionPayload,
1098
- pa as useAuthenticatedUser,
1099
- Sa as useCreateProjectMutation,
1100
- ba as useEffectOnce,
1101
- ha as useGetPromotedClassicSessionJwtQuery,
1102
- Er as useGetTeamUsersQuery,
1118
+ Ia as publicApiHeadersMiddleware,
1119
+ kr as retrieveContributor,
1120
+ Nr as retrieveContributorKeys,
1121
+ Qr as retrieveProject,
1122
+ Aa as retrieveProjectQueryKey,
1123
+ Sa as useAuthenticatedProjectContributor,
1124
+ Et as useAuthenticatedSessionPayload,
1125
+ wa as useAuthenticatedUser,
1126
+ Pa as useCreateProjectMutation,
1127
+ pa as useEffectOnce,
1128
+ ya as useGetPromotedClassicSessionJwtQuery,
1129
+ Ir as useGetTeamUsersQuery,
1103
1130
  vr as useGetUserTokenQuery,
1104
- Ea as useListProjectsQuery,
1105
- Pr as useRetrieveContributorQuery,
1106
- Ca as useRetrieveProjectQuery
1131
+ ka as useListProjectLanguagesQuery,
1132
+ Ra as useListProjectsQuery,
1133
+ Rr as useRetrieveContributorQuery,
1134
+ La as useRetrieveProjectQuery
1107
1135
  };