@lokalise/harmony 1.6.0-exp-jwtutils.20 → 1.6.0-exp-jwtutils.22

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,17 +1,17 @@
1
- var It = Object.defineProperty;
2
- var Et = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Ce = (e, t, n) => Et(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var Et = Object.defineProperty;
2
+ var kt = (e, t, n) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Ne = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as i, jsxs as p, Fragment as tt } from "react/jsx-runtime";
5
- import * as q from "react";
6
- import { useRef as nt, useState as ge, useCallback as je, useEffect as M, useContext as Pt, createContext as kt, cloneElement as Nt, Fragment as rt, forwardRef as Ct } from "react";
7
- import { Tooltip as he, Link as at, Menu as pe, MenuList as ve, CaretUpIcon as jt, UserIcon as ot, MenuItem as J, MenuDivider as it, Tag as Rt } from "@lokalise/louis";
5
+ import * as M from "react";
6
+ import { useRef as nt, useState as ge, useCallback as je, useEffect as x, useContext as Ct, createContext as Pt, cloneElement as Nt, Fragment as rt, forwardRef as jt } from "react";
7
+ import { Tooltip as he, Link as at, Menu as pe, MenuList as ve, CaretUpIcon as Rt, UserIcon as ot, MenuItem as K, MenuDivider as it, Tag as At } from "@lokalise/louis";
8
8
  import { z as r } from "zod";
9
- import { sendByPayloadRoute as K, sendByGetRoute as W } from "@lokalise/frontend-http-client";
9
+ import { sendByPayloadRoute as J, sendByGetRoute as W } from "@lokalise/frontend-http-client";
10
10
  import { buildPayloadRoute as st } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
11
- import { useMutation as At, useQuery as U } from "@tanstack/react-query";
11
+ import { useMutation as Ot, useQuery as L } from "@tanstack/react-query";
12
12
  import { buildGetRoute as Q } from "@lokalise/universal-ts-utils/node";
13
13
  import { format as ct } from "date-fns";
14
- import { toZonedTime as Ot } from "date-fns-tz";
14
+ import { toZonedTime as Lt } from "date-fns-tz";
15
15
  var H = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
16
16
  function lt(e) {
17
17
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -27,7 +27,7 @@ function Te() {
27
27
  return Z = e, Z;
28
28
  }
29
29
  var X, Ae;
30
- function Lt() {
30
+ function qt() {
31
31
  if (Ae) return X;
32
32
  Ae = 1;
33
33
  var e = typeof H == "object" && H && H.Object === Object && H;
@@ -37,11 +37,11 @@ var ee, Oe;
37
37
  function ut() {
38
38
  if (Oe) return ee;
39
39
  Oe = 1;
40
- var e = Lt(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
40
+ var e = qt(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
41
41
  return ee = n, ee;
42
42
  }
43
43
  var te, Le;
44
- function qt() {
44
+ function Mt() {
45
45
  if (Le) return te;
46
46
  Le = 1;
47
47
  var e = ut(), t = function() {
@@ -50,7 +50,7 @@ function qt() {
50
50
  return te = t, te;
51
51
  }
52
52
  var ne, qe;
53
- function Mt() {
53
+ function xt() {
54
54
  if (qe) return ne;
55
55
  qe = 1;
56
56
  var e = /\s/;
@@ -65,23 +65,23 @@ var re, Me;
65
65
  function Ut() {
66
66
  if (Me) return re;
67
67
  Me = 1;
68
- var e = Mt(), t = /^\s+/;
68
+ var e = xt(), t = /^\s+/;
69
69
  function n(a) {
70
70
  return a && a.slice(0, e(a) + 1).replace(t, "");
71
71
  }
72
72
  return re = n, re;
73
73
  }
74
- var ae, Ue;
74
+ var ae, xe;
75
75
  function dt() {
76
- if (Ue) return ae;
77
- Ue = 1;
76
+ if (xe) return ae;
77
+ xe = 1;
78
78
  var e = ut(), t = e.Symbol;
79
79
  return ae = t, ae;
80
80
  }
81
- var oe, xe;
82
- function xt() {
83
- if (xe) return oe;
84
- xe = 1;
81
+ var oe, Ue;
82
+ function Bt() {
83
+ if (Ue) return oe;
84
+ Ue = 1;
85
85
  var e = dt(), 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 xt() {
96
96
  return oe = s, oe;
97
97
  }
98
98
  var ie, Be;
99
- function Bt() {
99
+ function $t() {
100
100
  if (Be) return ie;
101
101
  Be = 1;
102
102
  var e = Object.prototype, t = e.toString;
@@ -106,17 +106,17 @@ function Bt() {
106
106
  return ie = n, ie;
107
107
  }
108
108
  var se, $e;
109
- function $t() {
109
+ function Ht() {
110
110
  if ($e) return se;
111
111
  $e = 1;
112
- var e = dt(), t = xt(), n = Bt(), a = "[object Null]", o = "[object Undefined]", s = e ? e.toStringTag : void 0;
112
+ var e = dt(), t = Bt(), n = $t(), 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
118
  var ce, He;
119
- function Ht() {
119
+ function Ft() {
120
120
  if (He) return ce;
121
121
  He = 1;
122
122
  function e(t) {
@@ -124,21 +124,21 @@ function Ht() {
124
124
  }
125
125
  return ce = e, ce;
126
126
  }
127
- var le, De;
128
- function Dt() {
129
- if (De) return le;
130
- De = 1;
131
- var e = $t(), t = Ht(), n = "[object Symbol]";
127
+ var le, Fe;
128
+ function zt() {
129
+ if (Fe) return le;
130
+ Fe = 1;
131
+ var e = Ht(), 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
137
  var ue, ze;
138
- function zt() {
138
+ function Dt() {
139
139
  if (ze) return ue;
140
140
  ze = 1;
141
- var e = Ut(), t = Te(), n = Dt(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
141
+ var e = Ut(), 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;
@@ -156,49 +156,49 @@ function zt() {
156
156
  }
157
157
  return ue = d, ue;
158
158
  }
159
- var de, Fe;
159
+ var de, De;
160
160
  function mt() {
161
- if (Fe) return de;
162
- Fe = 1;
163
- var e = Te(), t = qt(), n = zt(), a = "Expected a function", o = Math.max, s = Math.min;
161
+ if (De) return de;
162
+ De = 1;
163
+ var e = Te(), t = Mt(), n = Dt(), a = "Expected a function", o = Math.max, s = Math.min;
164
164
  function c(u, d, l) {
165
- var m, g, T, y, b, w, I = 0, P = !1, _ = !1, E = !0;
165
+ var m, g, T, y, b, w, I = 0, k = !1, _ = !1, E = !0;
166
166
  if (typeof u != "function")
167
167
  throw new TypeError(a);
168
- d = n(d) || 0, e(l) && (P = !!l.leading, _ = "maxWait" in l, T = _ ? o(n(l.maxWait) || 0, d) : T, E = "trailing" in l ? !!l.trailing : E);
168
+ d = n(d) || 0, e(l) && (k = !!l.leading, _ = "maxWait" in l, T = _ ? o(n(l.maxWait) || 0, d) : T, E = "trailing" in l ? !!l.trailing : E);
169
169
  function v(f) {
170
- var k = m, L = g;
171
- return m = g = void 0, I = f, y = u.apply(L, k), y;
170
+ var C = m, q = g;
171
+ return m = g = void 0, I = f, y = u.apply(q, C), y;
172
172
  }
173
173
  function h(f) {
174
- return I = f, b = setTimeout($, d), P ? v(f) : y;
174
+ return I = f, b = setTimeout($, d), k ? v(f) : y;
175
175
  }
176
176
  function B(f) {
177
- var k = f - w, L = f - I, Ne = d - k;
178
- return _ ? s(Ne, T - L) : Ne;
177
+ var C = f - w, q = f - I, Pe = d - C;
178
+ return _ ? s(Pe, T - q) : Pe;
179
179
  }
180
- function Pe(f) {
181
- var k = f - w, L = f - I;
182
- return w === void 0 || k >= d || k < 0 || _ && L >= T;
180
+ function ke(f) {
181
+ var C = f - w, q = f - I;
182
+ return w === void 0 || C >= d || C < 0 || _ && q >= T;
183
183
  }
184
184
  function $() {
185
185
  var f = t();
186
- if (Pe(f))
187
- return ke(f);
186
+ if (ke(f))
187
+ return Ce(f);
188
188
  b = setTimeout($, B(f));
189
189
  }
190
- function ke(f) {
190
+ function Ce(f) {
191
191
  return b = void 0, E && m ? v(f) : (m = g = void 0, y);
192
192
  }
193
- function wt() {
193
+ function St() {
194
194
  b !== void 0 && clearTimeout(b), I = 0, m = w = g = b = void 0;
195
195
  }
196
- function St() {
197
- return b === void 0 ? y : ke(t());
196
+ function It() {
197
+ return b === void 0 ? y : Ce(t());
198
198
  }
199
199
  function V() {
200
- var f = t(), k = Pe(f);
201
- if (m = arguments, g = this, w = f, k) {
200
+ var f = t(), C = ke(f);
201
+ if (m = arguments, g = this, w = f, C) {
202
202
  if (b === void 0)
203
203
  return h(w);
204
204
  if (_)
@@ -206,12 +206,12 @@ function mt() {
206
206
  }
207
207
  return b === void 0 && (b = setTimeout($, d)), y;
208
208
  }
209
- return V.cancel = wt, V.flush = St, V;
209
+ return V.cancel = St, V.flush = It, V;
210
210
  }
211
211
  return de = c, de;
212
212
  }
213
- var Ft = mt();
214
- const Gt = /* @__PURE__ */ lt(Ft);
213
+ var Gt = mt();
214
+ const Kt = /* @__PURE__ */ lt(Gt);
215
215
  var me, Ge;
216
216
  function Jt() {
217
217
  if (Ge) return me;
@@ -229,34 +229,34 @@ function Jt() {
229
229
  }
230
230
  return me = a, me;
231
231
  }
232
- var Kt = Jt();
233
- const Wt = /* @__PURE__ */ lt(Kt), Qt = (e, t, n, a) => {
232
+ var Wt = Jt();
233
+ const Qt = /* @__PURE__ */ lt(Wt), Yt = (e, t, n, a) => {
234
234
  switch (t) {
235
235
  case "debounce":
236
- return Gt(e, n, a);
236
+ return Kt(e, n, a);
237
237
  case "throttle":
238
- return Wt(e, n, a);
238
+ return Qt(e, n, a);
239
239
  default:
240
240
  return e;
241
241
  }
242
- }, Yt = (
242
+ }, Vt = (
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
  }, []);
252
252
  }
253
- ), Vt = (
253
+ ), Zt = (
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) {
@@ -267,7 +267,7 @@ const Wt = /* @__PURE__ */ lt(Kt), Qt = (e, t, n, a) => {
267
267
  }
268
268
  }), [t]), refElement: t, setRefElement: n };
269
269
  }
270
- ), Zt = (e, t) => t === "border-box" ? {
270
+ ), Xt = (e, t) => t === "border-box" ? {
271
271
  width: e.borderBoxSize[0].inlineSize,
272
272
  height: e.borderBoxSize[0].blockSize
273
273
  } : t === "content-box" ? {
@@ -277,11 +277,11 @@ const Wt = /* @__PURE__ */ lt(Kt), Qt = (e, t, n, a) => {
277
277
  width: e.contentRect.width,
278
278
  height: e.contentRect.height
279
279
  };
280
- function Xt({ 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 = nt(e), m = Yt(d), [g, T] = ge({
280
+ function en({ 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 = nt(e), m = Vt(d), [g, T] = ge({
282
282
  width: void 0,
283
283
  height: void 0
284
- }), { refProxy: y, refElement: b } = Vt(c), { box: w } = u || {}, I = je((_) => {
284
+ }), { refProxy: y, refElement: b } = Zt(c), { box: w } = u || {}, I = je((_) => {
285
285
  if (!o && !s)
286
286
  return;
287
287
  if (l.current) {
@@ -290,30 +290,30 @@ function Xt({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
290
290
  }
291
291
  const E = (v, h) => o && v.width !== h.width || s && v.height !== h.height;
292
292
  _.forEach((v) => {
293
- const h = Zt(v, w);
293
+ const h = Xt(v, w);
294
294
  T((B) => E(B, h) ? (m == null || m({
295
295
  width: h.width,
296
296
  height: h.height,
297
297
  entry: v
298
298
  }), h) : B);
299
299
  });
300
- }, [o, s, l, w]), P = je(Qt(I, t, n, a), [
300
+ }, [o, s, l, w]), k = je(Yt(I, t, n, a), [
301
301
  I,
302
302
  t,
303
303
  n,
304
304
  a
305
305
  ]);
306
- return M(() => {
306
+ return x(() => {
307
307
  let _;
308
- return b ? (_ = new window.ResizeObserver(P), _.observe(b, u)) : (g.width || g.height) && (m == null || m({
308
+ return b ? (_ = new window.ResizeObserver(k), _.observe(b, u)) : (g.width || g.height) && (m == null || m({
309
309
  width: null,
310
310
  height: null,
311
311
  entry: null
312
312
  }), T({ width: void 0, height: void 0 })), () => {
313
313
  var E, v, h;
314
- (E = _ == null ? void 0 : _.disconnect) === null || E === void 0 || E.call(_), (h = (v = P).cancel) === null || h === void 0 || h.call(v);
314
+ (E = _ == null ? void 0 : _.disconnect) === null || E === void 0 || E.call(_), (h = (v = k).cancel) === null || h === void 0 || h.call(v);
315
315
  };
316
- }, [P, b]), Object.assign({ ref: y }, g);
316
+ }, [k, b]), Object.assign({ ref: y }, g);
317
317
  }
318
318
  function ft(e) {
319
319
  var t, n, a = "";
@@ -328,24 +328,24 @@ function j() {
328
328
  for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = ft(e)) && (a && (a += " "), a += t);
329
329
  return a;
330
330
  }
331
- const en = "_headerContainer_1cubo_1", tn = "_navigationTabList_1cubo_8", nn = "_navigationTab_1cubo_8", rn = "_headerContent_1cubo_34", an = "_staticEnabled_1cubo_50", A = {
332
- headerContainer: en,
333
- navigationTabList: tn,
334
- navigationTab: nn,
335
- headerContent: rn,
336
- staticEnabled: an
337
- }, on = 77, z = ({ sticky: e, children: t }) => {
338
- const { ref: n, height: a } = Xt({
331
+ const tn = "_headerContainer_1cubo_1", nn = "_navigationTabList_1cubo_8", rn = "_navigationTab_1cubo_8", an = "_headerContent_1cubo_34", on = "_staticEnabled_1cubo_50", A = {
332
+ headerContainer: tn,
333
+ navigationTabList: nn,
334
+ navigationTab: rn,
335
+ headerContent: an,
336
+ staticEnabled: on
337
+ }, sn = 77, z = ({ sticky: e, children: t }) => {
338
+ const { ref: n, height: a } = en({
339
339
  refreshMode: "debounce",
340
340
  refreshRate: 0
341
341
  }), [o, s] = ge(!1), c = () => o ? !e : !0;
342
- M(() => {
342
+ x(() => {
343
343
  const d = () => {
344
344
  s(window.scrollY > 0);
345
345
  };
346
346
  return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
347
347
  }, []);
348
- const u = `${a || on}px`;
348
+ const u = `${a || sn}px`;
349
349
  return /* @__PURE__ */ i("div", { style: { minHeight: u }, children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ p(
350
350
  "div",
351
351
  {
@@ -363,63 +363,63 @@ const en = "_headerContainer_1cubo_1", tn = "_navigationTabList_1cubo_8", nn = "
363
363
  };
364
364
  z.Header = ({ children: e }) => /* @__PURE__ */ i("div", { className: A.headerContainer, children: e });
365
365
  z.Tabs = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 nowrap", children: e });
366
- const sn = "_sidebarContainer_bmdti_1", cn = {
367
- sidebarContainer: sn
368
- }, ln = "_logoLink_1baxb_1", un = {
369
- logoLink: ln
370
- }, dn = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: a = "Lokalise" }) => /* @__PURE__ */ i("a", { className: un.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ i("img", { src: e, alt: a }) }), mn = "_link_1weq1_1", fn = "_active_1weq1_18", Je = {
371
- link: mn,
372
- active: fn
373
- }, _n = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
366
+ const cn = "_sidebarContainer_bmdti_1", ln = {
367
+ sidebarContainer: cn
368
+ }, un = "_logoLink_1baxb_1", dn = {
369
+ logoLink: un
370
+ }, mn = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: a = "Lokalise" }) => /* @__PURE__ */ i("a", { className: dn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ i("img", { src: e, alt: a }) }), fn = "_link_1weq1_1", _n = "_active_1weq1_18", Ke = {
371
+ link: fn,
372
+ active: _n
373
+ }, bn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
374
374
  at,
375
375
  {
376
- className: j(Je.link, {
377
- [Je.active]: window.location.pathname.startsWith(t)
376
+ className: j(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
- ) }), bn = "_dropdownButton_hwh0c_1", gn = "_dropdownButtonActive_hwh0c_18", Ke = {
383
- dropdownButton: bn,
384
- dropdownButtonActive: gn
385
- }, hn = ({ children: e, icon: t }) => /* @__PURE__ */ i(
382
+ ) }), gn = "_dropdownButton_hwh0c_1", hn = "_dropdownButtonActive_hwh0c_18", Je = {
383
+ dropdownButton: gn,
384
+ dropdownButtonActive: hn
385
+ }, pn = ({ children: e, icon: t }) => /* @__PURE__ */ i(
386
386
  pe,
387
387
  {
388
388
  menuButton: ({ opened: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ i(
389
389
  "button",
390
390
  {
391
391
  type: "button",
392
- className: j(Ke.dropdownButton, {
393
- [Ke.dropdownButtonActive]: n
392
+ className: j(Je.dropdownButton, {
393
+ [Je.dropdownButtonActive]: n
394
394
  }),
395
395
  children: /* @__PURE__ */ i(t, { size: "25px" })
396
396
  }
397
397
  ) }),
398
398
  children: /* @__PURE__ */ i(ve, { placement: "right-start", children: e })
399
399
  }
400
- ), pn = "_iconContainer_nz34m_1", vn = {
401
- iconContainer: pn
400
+ ), vn = "_iconContainer_nz34m_1", Tn = {
401
+ iconContainer: vn
402
402
  }, _t = ({ className: e = "" }) => /* @__PURE__ */ i(
403
403
  "div",
404
404
  {
405
405
  "aria-label": "Upgrade Icon",
406
406
  className: j(
407
- vn.iconContainer,
407
+ Tn.iconContainer,
408
408
  "flex-row",
409
409
  "items-center",
410
410
  "justify-center",
411
411
  e
412
412
  ),
413
- children: /* @__PURE__ */ i(jt, {})
413
+ children: /* @__PURE__ */ i(Rt, {})
414
414
  }
415
- ), Tn = "_menuContainer_wbu3u_5", yn = "_profileButton_wbu3u_16", wn = "_profileImage_wbu3u_29", Sn = "_profileImageHighlight_wbu3u_37", In = "_profileImageUpgradeIcon_wbu3u_41", En = "_userIconWrapper_wbu3u_47", N = {
416
- menuContainer: Tn,
417
- profileButton: yn,
418
- profileImage: wn,
419
- profileImageHighlight: Sn,
420
- profileImageUpgradeIcon: In,
421
- userIconWrapper: En
422
- }, bt = kt({}), x = () => Pt(bt), Pn = ({ children: e }) => {
415
+ ), yn = "_menuContainer_wbu3u_5", wn = "_profileButton_wbu3u_16", Sn = "_profileImage_wbu3u_29", In = "_profileImageHighlight_wbu3u_37", En = "_profileImageUpgradeIcon_wbu3u_41", kn = "_userIconWrapper_wbu3u_47", P = {
416
+ menuContainer: yn,
417
+ profileButton: wn,
418
+ profileImage: Sn,
419
+ profileImageHighlight: In,
420
+ profileImageUpgradeIcon: En,
421
+ userIconWrapper: kn
422
+ }, bt = Pt({}), U = () => Ct(bt), Cn = ({ children: e }) => {
423
423
  const {
424
424
  currentTeam: t,
425
425
  otherTeams: n,
@@ -431,32 +431,32 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
431
431
  canAccessTeamSettings: d,
432
432
  isEndOfTrialActive: l,
433
433
  isTeamSuspended: m
434
- } = x();
434
+ } = U();
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: P.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: j(P.profileImage, {
444
+ [P.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: j(P.userIconWrapper, "flex-row", "align-center", "items-center", {
452
+ [P.profileImageHighlight]: a
453
453
  }),
454
454
  children: /* @__PURE__ */ i(ot, { size: "25px" })
455
455
  }
456
456
  ),
457
- a && /* @__PURE__ */ i(_t, { className: N.profileImageUpgradeIcon })
457
+ a && /* @__PURE__ */ i(_t, { className: P.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: P.menuContainer, children: e({
460
460
  allowTeamCreation: s,
461
461
  otherTeams: n,
462
462
  isLimitedView: c,
@@ -468,7 +468,7 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
468
468
  }) })
469
469
  }
470
470
  );
471
- }, gt = 0, kn = 9999, Nn = [150, 151, 250, 251], Cn = [152, 153, 252, 253], jn = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], Rn = [156, 159, 160, 256, 259, 260], ht = 9998, ye = (e) => e === gt, pt = (e) => e === kn, Xr = (e) => Nn.includes(e), ea = (e) => Cn.includes(e), ta = (e) => jn.includes(e), na = (e) => Rn.includes(e), ra = (e) => e > gt && e < ht, aa = (e) => e === ht, An = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [Nt(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), On = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), oa = (e) => On(e, An, /* @__PURE__ */ i("br", {})), Ln = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, qn = (e) => e.match(Ln) ?? [], Qe = (e, t, n) => {
471
+ }, gt = 0, Pn = 9999, Nn = [150, 151, 250, 251], jn = [152, 153, 252, 253], Rn = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], An = [156, 159, 160, 256, 259, 260], ht = 9998, ye = (e) => e === gt, pt = (e) => e === Pn, Xr = (e) => Nn.includes(e), ea = (e) => jn.includes(e), ta = (e) => Rn.includes(e), na = (e) => An.includes(e), ra = (e) => e > gt && e < ht, aa = (e) => e === ht, On = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [Nt(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), Ln = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), oa = (e) => Ln(e, On, /* @__PURE__ */ i("br", {})), qn = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, Mn = (e) => e.match(qn) ?? [], Qe = (e, t, n) => {
472
472
  const a = e.split(t);
473
473
  if (a.length === 1)
474
474
  return e;
@@ -477,11 +477,11 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
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 = qn(e);
480
+ const t = Mn(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
- }, ia = (e) => typeof e == "string" ? Ye(e) : e.flatMap((t) => typeof t == "string" ? Ye(t) : t, e), sa = (e, t = "PP") => ct(e, t), ca = (e, t, n = "PP") => ct(Ot(e, t), n), la = (e) => {
483
- M(e, []);
484
- }, Mn = ({ children: e, config: t }) => {
482
+ }, ia = (e) => typeof e == "string" ? Ye(e) : e.flatMap((t) => typeof t == "string" ? Ye(t) : t, e), sa = (e, t = "PP") => ct(e, t), ca = (e, t, n = "PP") => ct(Lt(e, t), n), la = (e) => {
483
+ x(e, []);
484
+ }, xn = ({ children: e, config: t }) => {
485
485
  const {
486
486
  teams: n,
487
487
  currentTeamId: a,
@@ -490,7 +490,7 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
490
490
  isTeamSuspended: c,
491
491
  canAccessTeamSettings: u,
492
492
  isEndOfTrialActive: d
493
- } = t, l = n.find((_) => _.id === a), m = n.filter((_) => _.id !== a), g = (l == null ? void 0 : l.role) ?? "", T = ["biller", "owner"].includes(g), y = ye(o) || pt(o), P = {
493
+ } = t, l = n.find((_) => _.id === a), m = n.filter((_) => _.id !== a), g = (l == null ? void 0 : l.role) ?? "", T = ["biller", "owner"].includes(g), y = ye(o) || pt(o), k = {
494
494
  ...t,
495
495
  currentTeam: l,
496
496
  otherTeams: m,
@@ -500,20 +500,20 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
500
500
  showBillingButton: !s && u && T,
501
501
  allowTeamCreation: !s && !d
502
502
  };
503
- return /* @__PURE__ */ i(bt.Provider, { value: P, children: e });
504
- }, Un = ({ config: e, children: t }) => /* @__PURE__ */ i(Mn, { config: e, children: /* @__PURE__ */ i(Pn, { children: t }) }), xn = "_container_q5pot_1", Bn = "_profileEmail_q5pot_5", Ve = {
505
- container: xn,
506
- profileEmail: Bn
507
- }, $n = ({
503
+ return /* @__PURE__ */ i(bt.Provider, { value: k, children: e });
504
+ }, Un = ({ config: e, children: t }) => /* @__PURE__ */ i(xn, { config: e, children: /* @__PURE__ */ i(Cn, { children: t }) }), Bn = "_container_q5pot_1", $n = "_profileEmail_q5pot_5", Ve = {
505
+ container: Bn,
506
+ profileEmail: $n
507
+ }, Hn = ({
508
508
  href: e,
509
509
  onClick: t,
510
510
  userEmail: n,
511
511
  hideBottomDivider: a
512
512
  }) => {
513
- const { isEndOfTrialActive: o, isTeamSuspended: s } = x();
513
+ const { isEndOfTrialActive: o, isTeamSuspended: s } = U();
514
514
  return o || s ? null : /* @__PURE__ */ p(tt, { children: [
515
515
  /* @__PURE__ */ i(
516
- J,
516
+ K,
517
517
  {
518
518
  href: e,
519
519
  onClick: () => {
@@ -527,20 +527,20 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
527
527
  ),
528
528
  !a && /* @__PURE__ */ i(it, {})
529
529
  ] });
530
- }, Hn = "_wrapper_15d85_1", Dn = "_profileImage_15d85_14", zn = "_teamName_15d85_22", Fn = "_planLabel_15d85_29", Gn = "_membership_15d85_38", Jn = "_defaultProfileImage_15d85_44", R = {
531
- wrapper: Hn,
532
- profileImage: Dn,
533
- teamName: zn,
534
- planLabel: Fn,
535
- membership: Gn,
530
+ }, Fn = "_wrapper_15d85_1", zn = "_profileImage_15d85_14", Dn = "_teamName_15d85_22", Gn = "_planLabel_15d85_29", Kn = "_membership_15d85_38", Jn = "_defaultProfileImage_15d85_44", R = {
531
+ wrapper: Fn,
532
+ profileImage: zn,
533
+ teamName: Dn,
534
+ planLabel: Gn,
535
+ membership: Kn,
536
536
  defaultProfileImage: Jn
537
537
  }, vt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
538
- const { currentTeam: a, planId: o } = x(), s = e || a;
538
+ const { currentTeam: a, planId: o } = U(), s = e || a;
539
539
  if (!s)
540
540
  return null;
541
541
  const c = ye(o) ? "Free" : pt(o) ? "Trial" : void 0;
542
542
  return /* @__PURE__ */ p(
543
- t ? J : "div",
543
+ t ? K : "div",
544
544
  {
545
545
  className: `flex-row gap-2 flex-nowrap items-center ${R.wrapper}`,
546
546
  ...t && { onClick: () => t(s) },
@@ -556,83 +556,83 @@ const sn = "_sidebarContainer_bmdti_1", cn = {
556
556
  ]
557
557
  }
558
558
  );
559
- }, Kn = "_teamsContainer_1t68g_1", Wn = {
560
- teamsContainer: Kn
561
- }, Qn = ({ onSwitchTeam: e }) => {
562
- const { otherTeams: t } = x();
563
- return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${Wn.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ i(vt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
564
- }, Yn = "_container_1u995_1", Vn = "_planCta_1u995_15", Zn = "_upgradeIconWrapper_1u995_19", fe = {
565
- container: Yn,
566
- planCta: Vn,
567
- upgradeIconWrapper: Zn
568
- }, Xn = ({ upgradeOptionHref: e }) => {
569
- const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = x();
559
+ }, Wn = "_teamsContainer_1t68g_1", Qn = {
560
+ teamsContainer: Wn
561
+ }, Yn = ({ onSwitchTeam: e }) => {
562
+ const { otherTeams: t } = U();
563
+ return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${Qn.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ i(vt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
564
+ }, Vn = "_container_1u995_1", Zn = "_planCta_1u995_15", Xn = "_upgradeIconWrapper_1u995_19", fe = {
565
+ container: Vn,
566
+ planCta: Zn,
567
+ upgradeIconWrapper: Xn
568
+ }, er = ({ upgradeOptionHref: e }) => {
569
+ const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = U();
570
570
  if (!a)
571
571
  return null;
572
572
  const c = ye(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
573
- return /* @__PURE__ */ p(J, { href: e, className: `flex-col gap-1 items-start ${fe.container}`, children: [
573
+ return /* @__PURE__ */ p(K, { href: e, className: `flex-col gap-1 items-start ${fe.container}`, children: [
574
574
  /* @__PURE__ */ i("span", { className: fe.planCta, children: c }),
575
575
  /* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${fe.upgradeIconWrapper}`, children: [
576
576
  /* @__PURE__ */ i(_t, {}),
577
577
  /* @__PURE__ */ i("span", { children: "See upgrade options" })
578
578
  ] })
579
579
  ] });
580
- }, S = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className: cn.sidebarContainer, children: e });
580
+ }, S = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className: ln.sidebarContainer, children: e });
581
581
  S.Top = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
582
582
  S.Bottom = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
583
- S.Avatar = dn;
584
- S.IconLink = _n;
585
- S.Menu = hn;
583
+ S.Avatar = mn;
584
+ S.IconLink = bn;
585
+ S.Menu = pn;
586
586
  S.ProfileMenu = Un;
587
- S.TeamSwitch = Qn;
587
+ S.TeamSwitch = Yn;
588
588
  S.TeamMenuItem = vt;
589
- S.UpgradeMenuItem = Xn;
590
- S.ProfileSettingsMenuItem = $n;
591
- const er = "_breadcrumbsItem_1hm6a_1", tr = "_breadcrumbs_1hm6a_1", Ze = {
592
- breadcrumbsItem: er,
593
- breadcrumbs: tr
589
+ S.UpgradeMenuItem = er;
590
+ S.ProfileSettingsMenuItem = Hn;
591
+ const tr = "_breadcrumbsItem_1hm6a_1", nr = "_breadcrumbs_1hm6a_1", Ze = {
592
+ breadcrumbsItem: tr,
593
+ breadcrumbs: nr
594
594
  }, ua = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: Ze.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ p(rt, { children: [
595
595
  /* @__PURE__ */ i(at, { className: Ze.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
596
596
  n < e.length - 1 && /* @__PURE__ */ i("span", { children: " — " })
597
- ] }, `${t.link}-${t.name}`)) }), nr = ({ items: e }) => /* @__PURE__ */ i(tt, { children: e.map((t, n) => /* @__PURE__ */ p(rt, { children: [
597
+ ] }, `${t.link}-${t.name}`)) }), rr = ({ items: e }) => /* @__PURE__ */ i(tt, { children: e.map((t, n) => /* @__PURE__ */ p(rt, { children: [
598
598
  !!n && t.some((a) => a.visible) && /* @__PURE__ */ i(it, {}),
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)) }), rr = "_badge_1pc1v_1", ar = "_tag_1pc1v_15", or = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ir = "_disabled_1pc1v_57", sr = "_projectNavigationItem_1pc1v_61", cr = "_projectNavigationItemDisabled_1pc1v_67", C = {
601
- badge: rr,
602
- tag: ar,
603
- withNavLinkStyle: or,
604
- disabled: ir,
605
- projectNavigationItem: sr,
606
- projectNavigationItemDisabled: cr
599
+ t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: s }) => /* @__PURE__ */ i(K, { href: a || "#", "aria-label": o, onClick: s, children: o }, o))
600
+ ] }, t[0].label)) }), ar = "_badge_1pc1v_1", or = "_tag_1pc1v_15", ir = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", sr = "_disabled_1pc1v_57", cr = "_projectNavigationItem_1pc1v_61", lr = "_projectNavigationItemDisabled_1pc1v_67", N = {
601
+ badge: ar,
602
+ tag: or,
603
+ withNavLinkStyle: ir,
604
+ disabled: sr,
605
+ projectNavigationItem: cr,
606
+ projectNavigationItemDisabled: lr
607
607
  }, Xe = ({ 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: C.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
610
+ !!t && /* @__PURE__ */ i("div", { className: N.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
611
611
  ] }),
612
- !!n && /* @__PURE__ */ i(Rt, { className: C.tag, children: n })
613
- ] }), _e = Ct(
612
+ !!n && /* @__PURE__ */ i(At, { className: N.tag, children: n })
613
+ ] }), _e = jt(
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 ? C.projectNavigationItemDisabled : C.projectNavigationItem,
617
+ className: n ? N.projectNavigationItemDisabled : N.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(C.withNavLinkStyle, {
624
- [C.disabled]: n
623
+ className: j(N.withNavLinkStyle, {
624
+ [N.disabled]: n
625
625
  }),
626
626
  disabled: n,
627
627
  onClick: o,
628
628
  children: /* @__PURE__ */ i(Xe, { label: e, badge: a, novel: s })
629
629
  }
630
- ) : /* @__PURE__ */ i("a", { href: t, className: C.withNavLinkStyle, children: /* @__PURE__ */ i(Xe, { label: e, badge: a, novel: s }) })
630
+ ) : /* @__PURE__ */ i("a", { href: t, className: N.withNavLinkStyle, children: /* @__PURE__ */ i(Xe, { label: e, badge: a, novel: s }) })
631
631
  }
632
632
  ) })
633
633
  );
634
634
  _e.displayName = "NavigationTabsItem";
635
- const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, ur = (e) => e.visible && (!e.dropdown || lr(e.dropdown)), da = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: A.navigationTabList, "aria-orientation": "horizontal", children: e.filter(ur).map((n) => {
635
+ const ur = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, dr = (e) => e.visible && (!e.dropdown || ur(e.dropdown)), da = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: A.navigationTabList, "aria-orientation": "horizontal", children: e.filter(dr).map((n) => {
636
636
  var a, o, s;
637
637
  return n.dropdown ? /* @__PURE__ */ i(
638
638
  "li",
@@ -644,7 +644,7 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
644
644
  pe,
645
645
  {
646
646
  menuButton: ({ opened: c }) => /* @__PURE__ */ i(_e, { label: n.label, disabled: n.disabled, active: c }),
647
- children: /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(nr, { items: n.dropdown }) })
647
+ children: /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(rr, { items: n.dropdown }) })
648
648
  }
649
649
  )
650
650
  },
@@ -670,34 +670,34 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
670
670
  },
671
671
  n.key
672
672
  );
673
- }) }) }), dr = r.object({
673
+ }) }) }), mr = r.object({
674
674
  lang_id: r.number(),
675
675
  lang_iso: r.string(),
676
676
  lang_name: r.string(),
677
677
  is_writable: r.union([r.literal(0), r.literal(1)])
678
- }), mr = r.object({
678
+ }), fr = r.object({
679
679
  user_id: r.number(),
680
680
  email: r.string().email(),
681
681
  fullname: r.string(),
682
682
  created_at: r.string(),
683
683
  created_at_timestamp: r.number(),
684
684
  admin_rights: r.array(r.string()),
685
- languages: r.array(dr),
685
+ languages: r.array(mr),
686
686
  // TODO nic: Do I need this?
687
687
  is_admin: r.boolean(),
688
688
  is_reviewer: r.boolean()
689
- }), fr = r.object({
689
+ }), _r = r.object({
690
690
  project_id: r.string(),
691
- contributors: r.array(mr)
692
- }), _r = Q({
691
+ contributors: r.array(fr)
692
+ }), br = Q({
693
693
  description: "Get the details of a project contributor",
694
694
  requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
695
695
  pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
696
- successResponseBodySchema: fr
697
- }), br = r.object({
696
+ successResponseBodySchema: _r
697
+ }), gr = r.object({
698
698
  lang_iso: r.string(),
699
699
  custom_iso: r.string().optional()
700
- }), gr = r.object({
700
+ }), hr = r.object({
701
701
  language_id: r.number(),
702
702
  language_iso: r.string(),
703
703
  progress: r.number(),
@@ -706,7 +706,7 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
706
706
  r.literal("localization_files"),
707
707
  r.literal("paged_documents"),
708
708
  r.literal("marketing")
709
- ]), hr = r.object({
709
+ ]), pr = r.object({
710
710
  per_platform_key_names: r.boolean(),
711
711
  reviewing: r.boolean(),
712
712
  auto_toggle_unverified: r.boolean(),
@@ -717,7 +717,7 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
717
717
  custom_translation_statuses_allow_multiple: r.boolean(),
718
718
  segmentation: r.boolean(),
719
719
  contributor_preview_download_enabled: r.boolean()
720
- }), pr = r.object({
720
+ }), vr = r.object({
721
721
  not_reviewed: r.number(),
722
722
  unverified: r.number(),
723
723
  spelling_grammar: r.number(),
@@ -734,14 +734,15 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
734
734
  double_space: r.number(),
735
735
  special_placeholder: r.number(),
736
736
  unbalanced_brackets: r.number()
737
- }), vr = r.object({
737
+ }), Tr = r.object({
738
738
  progress_total: r.number(),
739
739
  keys_total: r.number(),
740
740
  team: r.number(),
741
741
  base_words: r.number(),
742
742
  qa_issues_total: r.number(),
743
- qa_issues: pr
744
- }), F = r.object({
743
+ qa_issues: vr,
744
+ languages: r.array(hr)
745
+ }), D = r.object({
745
746
  project_id: r.string(),
746
747
  uuid: r.string().uuid(),
747
748
  project_type: we,
@@ -754,23 +755,22 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
754
755
  team_id: r.number(),
755
756
  base_language_id: r.number(),
756
757
  base_language_iso: r.string(),
757
- settings: hr,
758
- statistics: vr,
759
- languages: r.array(gr)
760
- }), Tr = r.object({
758
+ settings: pr,
759
+ statistics: Tr
760
+ }), yr = r.object({
761
761
  name: r.string(),
762
762
  team_id: r.string(),
763
763
  base_lang_iso: r.string(),
764
- languages: r.array(br),
764
+ languages: r.array(gr),
765
765
  project_type: we,
766
766
  is_segmentation_enabled: r.boolean()
767
- }), Se = () => "/projects", yr = st({
767
+ }), Se = () => "/projects", wr = st({
768
768
  description: "Create a new project",
769
769
  method: "post",
770
770
  pathResolver: Se,
771
- requestBodySchema: Tr,
772
- successResponseBodySchema: F
773
- }), wr = r.object({
771
+ requestBodySchema: yr,
772
+ successResponseBodySchema: D
773
+ }), Sr = r.object({
774
774
  project_type: we.optional(),
775
775
  filter_team_id: r.number().optional(),
776
776
  filter_names: r.string().optional(),
@@ -778,29 +778,29 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
778
778
  include_settings: r.boolean().optional(),
779
779
  limit: r.number().optional(),
780
780
  page: r.number().optional()
781
- }), Sr = r.array(
781
+ }), Ir = r.array(
782
782
  r.union([
783
- F.omit({ statistics: !0, settings: !0 }),
784
- F.pick({ settings: !0, statistics: !0 }).partial()
783
+ D.omit({ statistics: !0, settings: !0 }),
784
+ D.pick({ settings: !0, statistics: !0 }).partial()
785
785
  ])
786
- ), Ir = Q({
786
+ ), Er = Q({
787
787
  description: "List all projects",
788
788
  pathResolver: Se,
789
- requestQuerySchema: wr,
790
- successResponseBodySchema: Sr
791
- }), Er = r.object({
789
+ requestQuerySchema: Sr,
790
+ successResponseBodySchema: Ir
791
+ }), kr = r.object({
792
792
  project_id: r.string()
793
- }), Pr = Q({
793
+ }), Cr = Q({
794
794
  description: "Retrieve a project",
795
795
  pathResolver: Se,
796
- requestQuerySchema: Er,
797
- successResponseBodySchema: F
796
+ requestQuerySchema: kr,
797
+ successResponseBodySchema: D
798
798
  }), Tt = r.union([
799
799
  r.literal("owner"),
800
800
  r.literal("admin"),
801
801
  r.literal("biller"),
802
802
  r.literal("member")
803
- ]), kr = r.object({
803
+ ]), Pr = r.object({
804
804
  user_id: r.number(),
805
805
  email: r.string().email(),
806
806
  fullname: r.string(),
@@ -809,13 +809,13 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
809
809
  role: Tt
810
810
  }), Nr = r.object({
811
811
  team_id: r.number(),
812
- team_user: kr
813
- }), Cr = Q({
812
+ team_user: Pr
813
+ }), jr = Q({
814
814
  description: "Get the details of a team user",
815
815
  requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
816
816
  pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
817
817
  successResponseBodySchema: Nr
818
- }), jr = r.object({
818
+ }), Rr = r.object({
819
819
  accessToken: r.string(),
820
820
  refreshToken: r.string()
821
821
  }), Ie = st({
@@ -823,60 +823,61 @@ const lr = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
823
823
  method: "post",
824
824
  requestPathParamsSchema: r.object({ teamId: r.number() }),
825
825
  pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
826
- requestHeaderSchema: r.object({
827
- Authorization: r.string().optional(),
828
- "x-csrf-token": r.string().optional()
829
- }),
826
+ requestHeaderSchema: r.union([
827
+ r.object({ Authorization: r.string().startsWith("Bearer ") }),
828
+ r.object({ "x-csrf-token": r.string() })
829
+ ]),
830
830
  requestBodySchema: r.undefined(),
831
- successResponseBodySchema: jr
831
+ successResponseBodySchema: Rr
832
832
  });
833
833
  function ma(e, t = {}) {
834
- return At({
834
+ return Ot({
835
835
  ...t,
836
- mutationFn: (n) => K(e, yr, {
836
+ mutationFn: (n) => J(e, wr, {
837
837
  body: n
838
838
  })
839
839
  });
840
840
  }
841
- const Rr = {
841
+ const Ar = {
842
842
  teamUserKey: (e, t) => ["GetTeamUsers", e, t]
843
- }, Ar = (e, t) => U({
843
+ }, Or = (e, t) => L({
844
844
  ...t,
845
- queryFn: ({ queryKey: [n, a, o] }) => W(e, Cr, { pathParams: { teamId: a, userId: o } })
846
- }), Or = {
847
- teamKey: (e) => ["getUserToken", e]
848
- }, Lr = (e, t) => U({
845
+ queryFn: ({ queryKey: [n, a, o] }) => W(e, jr, { pathParams: { teamId: a, userId: o } })
846
+ }), Lr = {
847
+ teamKeyCsrf: (e, t) => ["getUserToken", "x-csrf-token", t, e],
848
+ teamKeyJwt: (e, t) => ["getUserToken", "Authorization", `Bearer ${t}`, e]
849
+ }, qr = (e, t) => L({
849
850
  ...t,
850
- queryFn: ({ queryKey: [n, a] }) => K(e, Ie, {
851
- pathParams: { teamId: a },
852
- headers: {}
851
+ queryFn: ({ queryKey: [n, a, o, s] }) => J(e, Ie, {
852
+ pathParams: { teamId: s },
853
+ headers: a === "x-csrf-token" ? { "x-csrf-token": o } : { Authorization: o }
853
854
  })
854
855
  }), fa = {
855
856
  // TODO nic: Is there a better way to key this?
856
857
  paramsKey: (e) => ["listProjects", e]
857
858
  };
858
859
  function _a(e, t) {
859
- return U({
860
+ return L({
860
861
  ...t,
861
- queryFn: ({ queryKey: [n, a] }) => W(e, Ir, {
862
+ queryFn: ({ queryKey: [n, a] }) => W(e, Er, {
862
863
  queryParams: a
863
864
  })
864
865
  });
865
866
  }
866
- const qr = {
867
+ const Mr = {
867
868
  projectUserKey: (e, t) => ["RetrieveContributor", e, t]
868
- }, Mr = (e, t) => U({
869
+ }, xr = (e, t) => L({
869
870
  ...t,
870
- queryFn: ({ queryKey: [n, a, o] }) => W(e, _r, {
871
+ queryFn: ({ queryKey: [n, a, o] }) => W(e, br, {
871
872
  pathParams: { projectId: a, contributorId: o }
872
873
  })
873
874
  }), ba = {
874
875
  projectIdKey: (e) => ["retrieveProject", e]
875
876
  };
876
877
  function ga(e, t) {
877
- return U({
878
+ return L({
878
879
  ...t,
879
- queryFn: ({ queryKey: [n, a] }) => W(e, Pr, {
880
+ queryFn: ({ queryKey: [n, a] }) => W(e, Cr, {
880
881
  queryParams: { project_id: a }
881
882
  })
882
883
  });
@@ -910,30 +911,34 @@ const G = class G extends CustomEvent {
910
911
  });
911
912
  }
912
913
  };
913
- Ce(G, "eventName", "new-jwt-issued");
914
+ Ne(G, "eventName", "new-jwt-issued");
914
915
  let O = G;
915
- function ha(e, t) {
916
- const n = Lr(e, {
917
- queryKey: Or.teamKey(t)
918
- }), a = nt();
919
- return M(() => {
920
- n.data && n.data.accessToken !== a.current && (window.dispatchEvent(new O(n.data)), a.current = n.data.accessToken);
921
- }, [n.data]), n;
922
- }
923
916
  function Ee() {
924
917
  const e = be(document.cookie, "accessToken"), t = be(document.cookie, "refreshToken");
925
918
  return !e || !t ? Promise.resolve(void 0) : Promise.resolve({ accessToken: e, refreshToken: t });
926
919
  }
927
- function xr() {
920
+ function yt() {
928
921
  return Promise.resolve(be(document.cookie, "csrf_token"));
929
922
  }
930
923
  function be(e, t) {
931
924
  var n, a;
932
925
  return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
933
926
  }
934
- function yt() {
927
+ function ha(e, t) {
928
+ const { data: n, isFetching: a } = L({
929
+ queryKey: ["csrf-token"],
930
+ queryFn: yt
931
+ }), o = qr(e, {
932
+ queryKey: Lr.teamKeyCsrf(t, n ?? ""),
933
+ enabled: a || n !== void 0
934
+ }), s = nt();
935
+ return x(() => {
936
+ o.data && o.data.accessToken !== s.current && (window.dispatchEvent(new O(o.data)), s.current = o.data.accessToken);
937
+ }, [o.data]), { ...o, isFetching: o.isFetching || a };
938
+ }
939
+ function wt() {
935
940
  const [e, t] = ge();
936
- return M(() => {
941
+ return x(() => {
937
942
  let n = !1;
938
943
  const a = (o) => {
939
944
  t(o.detail.payload), n = !0;
@@ -946,15 +951,15 @@ function yt() {
946
951
  }, []), e;
947
952
  }
948
953
  function pa(e) {
949
- const t = yt();
950
- return Ar(e, {
951
- queryKey: Rr.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0)
954
+ const t = wt();
955
+ return Or(e, {
956
+ queryKey: Ar.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0)
952
957
  });
953
958
  }
954
959
  function va(e, t) {
955
- const n = yt();
956
- return Mr(e, {
957
- queryKey: qr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
960
+ const n = wt();
961
+ return xr(e, {
962
+ queryKey: Mr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
958
963
  enabled: n !== void 0
959
964
  });
960
965
  }
@@ -965,7 +970,17 @@ async function Ta() {
965
970
  const t = Y(e.accessToken);
966
971
  return t ? { ...e, payload: t } : Promise.resolve(void 0);
967
972
  }
968
- function D(e) {
973
+ function ya() {
974
+ return (e) => (t, n) => e(t, {
975
+ ...n,
976
+ headers: {
977
+ ...n.headers,
978
+ "x-lokalise-plugin": "true"
979
+ },
980
+ credentials: "omit"
981
+ });
982
+ }
983
+ function F(e) {
969
984
  return { Authorization: `Bearer ${e}` };
970
985
  }
971
986
  function Br(e, t) {
@@ -976,19 +991,19 @@ function Br(e, t) {
976
991
  return n(a, o);
977
992
  const c = await n(a, {
978
993
  ...o,
979
- headers: { ...o.headers, ...D(s.accessToken) }
994
+ headers: { ...o.headers, ...F(s.accessToken) }
980
995
  });
981
996
  if (s && (c.status === 401 || c.status === 403)) {
982
997
  const d = Y(s.accessToken);
983
998
  if (!d)
984
999
  return c;
985
- const l = await K(e, Ie, {
1000
+ const l = await J(e, Ie, {
986
1001
  pathParams: { teamId: d.teamId },
987
- headers: D(s.refreshToken)
1002
+ headers: F(s.refreshToken)
988
1003
  });
989
1004
  return await ((u = t.onNewJwtTokenIssued) == null ? void 0 : u.call(t, l)), n(a, {
990
1005
  ...o,
991
- headers: { ...o.headers, ...D(l.accessToken) }
1006
+ headers: { ...o.headers, ...F(l.accessToken) }
992
1007
  });
993
1008
  }
994
1009
  return c;
@@ -1009,17 +1024,17 @@ function Hr(e, t) {
1009
1024
  const c = await t.getCsrfToken();
1010
1025
  if (c === void 0)
1011
1026
  return n(a, o);
1012
- const u = await K(e, Ie, {
1027
+ const u = await J(e, Ie, {
1013
1028
  pathParams: { teamId: await t.getTeamId() },
1014
1029
  headers: { "x-csrf-token": c }
1015
1030
  });
1016
1031
  return await ((d = t.onNewJwtTokenIssued) == null ? void 0 : d.call(t, u)), n(a, {
1017
1032
  ...o,
1018
- headers: { ...o.headers, ...D(u.accessToken) }
1033
+ headers: { ...o.headers, ...F(u.accessToken) }
1019
1034
  });
1020
1035
  };
1021
1036
  }
1022
- const ya = {
1037
+ const wa = {
1023
1038
  wretch: {
1024
1039
  lokaliseAuth(e = {}) {
1025
1040
  return this.addon($r).lokaliseAuth(et(e));
@@ -1034,7 +1049,7 @@ function et(e) {
1034
1049
  return {
1035
1050
  ...e,
1036
1051
  getCachedJwtToken: e.getCachedJwtToken ?? Ee,
1037
- getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : xr,
1052
+ getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : yt,
1038
1053
  onNewJwtTokenIssued: (t) => {
1039
1054
  var n;
1040
1055
  return window.dispatchEvent(new O(t)), ((n = e.onNewJwtTokenIssued) == null ? void 0 : n.call(e, t)) ?? Promise.resolve();
@@ -1044,28 +1059,28 @@ function et(e) {
1044
1059
  export {
1045
1060
  ua as Breadcrumbs,
1046
1061
  ht as ENTERPRISE_OPENSOURCE_PLAN_ID,
1047
- Rn as ENTERPRISE_PLAN_IDS,
1048
- Cn as ESSENTIAL_PLAN_IDS,
1062
+ An as ENTERPRISE_PLAN_IDS,
1063
+ jn as ESSENTIAL_PLAN_IDS,
1049
1064
  gt as FREE_PLAN_ID,
1050
- jr as JWT_TOKEN_SCHEMA,
1065
+ Rr as JWT_TOKEN_SCHEMA,
1051
1066
  $r as LokaliseAuthAddon,
1052
- ya as LokaliseAuthBrowserAddon,
1067
+ wa as LokaliseAuthBrowserAddon,
1053
1068
  z as NavigationPanel,
1054
1069
  da as NavigationTabs,
1055
- jn as PRO_PLAN_IDS,
1070
+ Rn as PRO_PLAN_IDS,
1056
1071
  Nn as START_PLAN_IDS,
1057
1072
  S as Sidebar,
1058
- kr as TEAM_USER_SCHEMA,
1059
- kn as TRIAL_PLAN_ID,
1073
+ Pr as TEAM_USER_SCHEMA,
1074
+ Pn as TRIAL_PLAN_ID,
1060
1075
  oa as convertNewLineToBreakTag,
1061
- yr as createProject,
1076
+ wr as createProject,
1062
1077
  sa as formatDate,
1063
1078
  ca as formatDateTz,
1064
1079
  Ta as getAuthenticatedSessionDetailFromRequest,
1065
- Cr as getTeamUser,
1066
- Rr as getTeamUsersQueryKey,
1080
+ jr as getTeamUser,
1081
+ Ar as getTeamUsersQueryKey,
1067
1082
  Ie as getUserToken,
1068
- Or as getUserTokenKey,
1083
+ Lr as getUserTokenKey,
1069
1084
  aa as isEnterpriseOpenSourcePlan,
1070
1085
  na as isEnterprisePlan,
1071
1086
  ea as isEssentialPlan,
@@ -1074,23 +1089,24 @@ export {
1074
1089
  ta as isProPlan,
1075
1090
  Xr as isStartPlan,
1076
1091
  pt as isTrialPlan,
1077
- Ir as listProjects,
1092
+ Er as listProjects,
1078
1093
  fa as listProjectsKey,
1079
1094
  ia as makeUrlClickable,
1080
1095
  Y as parseJwtTokenPayload,
1081
- _r as retrieveContributor,
1082
- qr as retrieveContributorKeys,
1083
- Pr as retrieveProject,
1096
+ ya as publicApiHeadersMiddleware,
1097
+ br as retrieveContributor,
1098
+ Mr as retrieveContributorKeys,
1099
+ Cr as retrieveProject,
1084
1100
  ba as retrieveProjectQueryKey,
1085
1101
  va as useAuthenticatedProjectContributor,
1086
- yt as useAuthenticatedSessionPayload,
1102
+ wt as useAuthenticatedSessionPayload,
1087
1103
  pa as useAuthenticatedUser,
1088
1104
  ma as useCreateProjectMutation,
1089
1105
  la as useEffectOnce,
1090
1106
  ha as useGetPromotedClassicSessionJwtQuery,
1091
- Ar as useGetTeamUsersQuery,
1092
- Lr as useGetUserTokenQuery,
1107
+ Or as useGetTeamUsersQuery,
1108
+ qr as useGetUserTokenQuery,
1093
1109
  _a as useListProjectsQuery,
1094
- Mr as useRetrieveContributorQuery,
1110
+ xr as useRetrieveContributorQuery,
1095
1111
  ga as useRetrieveProjectQuery
1096
1112
  };