@bpinternal/billing-ui 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,10 +4,10 @@ var sr = (a, e, t) => e in a ? rr(a, e, { enumerable: !0, configurable: !0, writ
4
4
  var Nt = (a, e, t) => sr(a, typeof e != "symbol" ? e + "" : e, t);
5
5
  import { jsx as o, jsxs as p, Fragment as ve } from "react/jsx-runtime";
6
6
  import { QueryClient as or, hydrate as ir, dehydrate as lr, useQuery as Te, useMutation as oa } from "@tanstack/react-query";
7
- import { createElement as qe, isValidElement as Sa, Fragment as cr, cloneElement as dr, Children as ur, createContext as Zt, useContext as Ia, useCallback as ka, useState as K, useRef as Ea, useEffect as Ce, useMemo as _e } from "react";
7
+ import { createElement as qe, isValidElement as ka, Fragment as cr, cloneElement as dr, Children as ur, createContext as Zt, useContext as ba, useCallback as wa, useState as K, useRef as Ea, useEffect as Ce, useMemo as _e } from "react";
8
8
  import { loadStripe as pr } from "@stripe/stripe-js";
9
9
  import { createPortal as mr } from "react-dom";
10
- import { CardElement as wa, AddressElement as Xt, useStripe as en, useElements as an, Elements as tn } from "@stripe/react-stripe-js";
10
+ import { CardElement as Aa, AddressElement as Xt, useStripe as en, useElements as an, Elements as tn } from "@stripe/react-stripe-js";
11
11
  const _t = /* @__PURE__ */ new Map();
12
12
  function gr(a) {
13
13
  let e = _t.get(a);
@@ -91,7 +91,7 @@ var _r = { parse: function(a, e) {
91
91
  return e + nn("", t);
92
92
  }, "");
93
93
  } };
94
- function Ca() {
94
+ function Na() {
95
95
  if (console && console.warn) {
96
96
  for (var a = arguments.length, e = new Array(a), t = 0; t < a; t++)
97
97
  e[t] = arguments[t];
@@ -99,10 +99,10 @@ function Ca() {
99
99
  }
100
100
  }
101
101
  const kt = {};
102
- function Aa() {
102
+ function xa() {
103
103
  for (var a = arguments.length, e = new Array(a), t = 0; t < a; t++)
104
104
  e[t] = arguments[t];
105
- ke(e[0]) && kt[e[0]] || (ke(e[0]) && (kt[e[0]] = /* @__PURE__ */ new Date()), Ca(...e));
105
+ ke(e[0]) && kt[e[0]] || (ke(e[0]) && (kt[e[0]] = /* @__PURE__ */ new Date()), Na(...e));
106
106
  }
107
107
  const rn = (a, e) => () => {
108
108
  if (a.isInitialized)
@@ -132,7 +132,7 @@ const rn = (a, e) => () => {
132
132
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !i(e.isLanguageChangingTo, a) ? !1 : !!(e.hasResourceBundle(n, a) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || i(n, a) && (!r || i(s, a)));
133
133
  }, kr = function(a, e) {
134
134
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
135
- return !e.languages || !e.languages.length ? (Aa("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(a, {
135
+ return !e.languages || !e.languages.length ? (xa("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(a, {
136
136
  lng: t.lng,
137
137
  precheck: (r, s) => {
138
138
  if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !s(r.isLanguageChangingTo, a)) return !1;
@@ -160,7 +160,7 @@ const rn = (a, e) => () => {
160
160
  "&#x2F;": "/",
161
161
  "&#47;": "/"
162
162
  }, xr = (a) => Ar[a], Tr = (a) => a.replace(wr, xr);
163
- let Va = {
163
+ let Wa = {
164
164
  bindI18n: "languageChanged",
165
165
  bindI18nStore: "",
166
166
  transEmptyNodeValue: "",
@@ -172,23 +172,23 @@ let Va = {
172
172
  };
173
173
  const Dr = function() {
174
174
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
175
- Va = {
176
- ...Va,
175
+ Wa = {
176
+ ...Wa,
177
177
  ...a
178
178
  };
179
- }, sn = () => Va;
179
+ }, sn = () => Wa;
180
180
  let on;
181
181
  const Pr = (a) => {
182
182
  on = a;
183
- }, Qa = () => on, za = (a, e) => {
183
+ }, Za = () => on, Oa = (a, e) => {
184
184
  if (!a) return !1;
185
185
  const t = a.props ? a.props.children : a.children;
186
186
  return e ? t.length > 0 : !!t;
187
- }, Oa = (a) => {
187
+ }, Ua = (a) => {
188
188
  if (!a) return [];
189
189
  const e = a.props ? a.props.children : a.children;
190
190
  return a.props && a.props.i18nIsDynamicList ? ta(e) : e;
191
- }, Fr = (a) => Array.isArray(a) && a.every(Sa), ta = (a) => Array.isArray(a) ? a : [a], Lr = (a, e) => {
191
+ }, Fr = (a) => Array.isArray(a) && a.every(ka), ta = (a) => Array.isArray(a) ? a : [a], Lr = (a, e) => {
192
192
  const t = {
193
193
  ...e
194
194
  };
@@ -200,7 +200,7 @@ const Pr = (a) => {
200
200
  return n.forEach((s, i) => {
201
201
  if (ke(s))
202
202
  t += `${s}`;
203
- else if (Sa(s)) {
203
+ else if (ka(s)) {
204
204
  const {
205
205
  props: l,
206
206
  type: d
@@ -216,7 +216,7 @@ const Pr = (a) => {
216
216
  t += `<${i}>${g}</${i}>`;
217
217
  }
218
218
  } else if (s === null)
219
- Ca("Trans: the passed in value is invalid - seems you passed in a null child.");
219
+ Na("Trans: the passed in value is invalid - seems you passed in a null child.");
220
220
  else if (aa(s)) {
221
221
  const {
222
222
  format: l,
@@ -226,9 +226,9 @@ const Pr = (a) => {
226
226
  const m = l ? `${c[0]}, ${l}` : c[0];
227
227
  t += `{{${m}}}`;
228
228
  } else
229
- Ca("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", s);
229
+ Na("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", s);
230
230
  } else
231
- Ca("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", s);
231
+ Na("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", s);
232
232
  }), t;
233
233
  }, Ir = (a, e, t, n, r, s) => {
234
234
  if (e === "") return [];
@@ -236,7 +236,7 @@ const Pr = (a) => {
236
236
  if (!a && !l && !s) return [e];
237
237
  const d = {}, c = (N) => {
238
238
  ta(N).forEach((h) => {
239
- ke(h) || (za(h) ? c(Oa(h)) : aa(h) && !Sa(h) && Object.assign(d, h));
239
+ ke(h) || (Oa(h) ? c(Ua(h)) : aa(h) && !ka(h) && Object.assign(d, h));
240
240
  });
241
241
  };
242
242
  c(a);
@@ -244,79 +244,79 @@ const Pr = (a) => {
244
244
  ...d,
245
245
  ...r
246
246
  }, g = (N, v, h) => {
247
- const x = Oa(N), T = f(x, v.children, h);
248
- return Fr(x) && T.length === 0 || N.props && N.props.i18nIsDynamicList ? x : T;
249
- }, b = (N, v, h, x, T) => {
247
+ const A = Ua(N), x = f(A, v.children, h);
248
+ return Fr(A) && x.length === 0 || N.props && N.props.i18nIsDynamicList ? A : x;
249
+ }, b = (N, v, h, A, x) => {
250
250
  N.dummy ? (N.children = v, h.push(dr(N, {
251
- key: x
252
- }, T ? void 0 : v))) : h.push(...ur.map([N], (S) => {
253
- const k = {
254
- ...S.props
251
+ key: A
252
+ }, x ? void 0 : v))) : h.push(...ur.map([N], (k) => {
253
+ const S = {
254
+ ...k.props
255
255
  };
256
- return delete k.i18nIsDynamicList, qe(S.type, {
257
- ...k,
258
- key: x,
259
- ref: S.ref
260
- }, T ? null : v);
256
+ return delete S.i18nIsDynamicList, qe(k.type, {
257
+ ...S,
258
+ key: A,
259
+ ref: k.ref
260
+ }, x ? null : v);
261
261
  }));
262
262
  }, f = (N, v, h) => {
263
- const x = ta(N);
264
- return ta(v).reduce((S, k, w) => {
265
- const y = k.children && k.children[0] && k.children[0].content && t.services.interpolator.interpolate(k.children[0].content, u, t.language);
266
- if (k.type === "tag") {
267
- let P = x[parseInt(k.name, 10)];
268
- h.length === 1 && !P && (P = h[0][k.name]), P || (P = {});
269
- const A = Object.keys(k.attrs).length !== 0 ? Lr({
270
- props: k.attrs
271
- }, P) : P, I = Sa(A), R = I && za(k, !0) && !k.voidElement, E = l && aa(A) && A.dummy && !I, J = aa(a) && Object.hasOwnProperty.call(a, k.name);
272
- if (ke(A)) {
273
- const M = t.services.interpolator.interpolate(A, u, t.language);
274
- S.push(M);
275
- } else if (za(A) || R) {
276
- const M = g(A, k, h);
277
- b(A, M, S, w);
263
+ const A = ta(N);
264
+ return ta(v).reduce((k, S, w) => {
265
+ const y = S.children && S.children[0] && S.children[0].content && t.services.interpolator.interpolate(S.children[0].content, u, t.language);
266
+ if (S.type === "tag") {
267
+ let D = A[parseInt(S.name, 10)];
268
+ h.length === 1 && !D && (D = h[0][S.name]), D || (D = {});
269
+ const T = Object.keys(S.attrs).length !== 0 ? Lr({
270
+ props: S.attrs
271
+ }, D) : D, I = ka(T), R = I && Oa(S, !0) && !S.voidElement, E = l && aa(T) && T.dummy && !I, J = aa(a) && Object.hasOwnProperty.call(a, S.name);
272
+ if (ke(T)) {
273
+ const M = t.services.interpolator.interpolate(T, u, t.language);
274
+ k.push(M);
275
+ } else if (Oa(T) || R) {
276
+ const M = g(T, S, h);
277
+ b(T, M, k, w);
278
278
  } else if (E) {
279
- const M = f(x, k.children, h);
280
- b(A, M, S, w);
281
- } else if (Number.isNaN(parseFloat(k.name)))
279
+ const M = f(A, S.children, h);
280
+ b(T, M, k, w);
281
+ } else if (Number.isNaN(parseFloat(S.name)))
282
282
  if (J) {
283
- const M = g(A, k, h);
284
- b(A, M, S, w, k.voidElement);
285
- } else if (n.transSupportBasicHtmlNodes && i.indexOf(k.name) > -1)
286
- if (k.voidElement)
287
- S.push(qe(k.name, {
288
- key: `${k.name}-${w}`
283
+ const M = g(T, S, h);
284
+ b(T, M, k, w, S.voidElement);
285
+ } else if (n.transSupportBasicHtmlNodes && i.indexOf(S.name) > -1)
286
+ if (S.voidElement)
287
+ k.push(qe(S.name, {
288
+ key: `${S.name}-${w}`
289
289
  }));
290
290
  else {
291
- const M = f(x, k.children, h);
292
- S.push(qe(k.name, {
293
- key: `${k.name}-${w}`
291
+ const M = f(A, S.children, h);
292
+ k.push(qe(S.name, {
293
+ key: `${S.name}-${w}`
294
294
  }, M));
295
295
  }
296
- else if (k.voidElement)
297
- S.push(`<${k.name} />`);
296
+ else if (S.voidElement)
297
+ k.push(`<${S.name} />`);
298
298
  else {
299
- const M = f(x, k.children, h);
300
- S.push(`<${k.name}>${M}</${k.name}>`);
299
+ const M = f(A, S.children, h);
300
+ k.push(`<${S.name}>${M}</${S.name}>`);
301
301
  }
302
- else if (aa(A) && !I) {
303
- const M = k.children[0] ? y : null;
304
- M && S.push(M);
302
+ else if (aa(T) && !I) {
303
+ const M = S.children[0] ? y : null;
304
+ M && k.push(M);
305
305
  } else
306
- b(A, y, S, w, k.children.length !== 1 || !y);
307
- } else if (k.type === "text") {
308
- const P = n.transWrapTextNodes, A = s ? n.unescape(t.services.interpolator.interpolate(k.content, u, t.language)) : t.services.interpolator.interpolate(k.content, u, t.language);
309
- P ? S.push(qe(P, {
310
- key: `${k.name}-${w}`
311
- }, A)) : S.push(A);
306
+ b(T, y, k, w, S.children.length !== 1 || !y);
307
+ } else if (S.type === "text") {
308
+ const D = n.transWrapTextNodes, T = s ? n.unescape(t.services.interpolator.interpolate(S.content, u, t.language)) : t.services.interpolator.interpolate(S.content, u, t.language);
309
+ D ? k.push(qe(D, {
310
+ key: `${S.name}-${w}`
311
+ }, T)) : k.push(T);
312
312
  }
313
- return S;
313
+ return k;
314
314
  }, []);
315
315
  }, C = f([{
316
316
  dummy: !0,
317
317
  children: a || []
318
318
  }], m, ta(a || []));
319
- return Oa(C[0]);
319
+ return Ua(C[0]);
320
320
  };
321
321
  function Er(a) {
322
322
  let {
@@ -335,18 +335,18 @@ function Er(a) {
335
335
  shouldUnescape: b,
336
336
  ...f
337
337
  } = a;
338
- const C = u || Qa();
338
+ const C = u || Za();
339
339
  if (!C)
340
- return Aa("You will need to pass in an i18next instance by using i18nextReactModule"), e;
340
+ return xa("You will need to pass in an i18next instance by using i18nextReactModule"), e;
341
341
  const N = g || C.t.bind(C) || ((R) => R), v = {
342
342
  ...sn(),
343
343
  ...C.options && C.options.react
344
344
  };
345
345
  let h = m || N.ns || C.options && C.options.defaultNS;
346
346
  h = ke(h) ? [h] : h || ["translation"];
347
- const x = ln(e, v), T = d || x || v.transEmptyNodeValue || r, {
348
- hashTransKey: S
349
- } = v, k = r || (S ? S(x || T) : x || T);
347
+ const A = ln(e, v), x = d || A || v.transEmptyNodeValue || r, {
348
+ hashTransKey: k
349
+ } = v, S = r || (k ? k(A || x) : A || x);
350
350
  C.options && C.options.interpolation && C.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
351
351
  ...l,
352
352
  ...C.options.interpolation.defaultVariables
@@ -365,26 +365,26 @@ function Er(a) {
365
365
  count: t,
366
366
  ...l,
367
367
  ...w,
368
- defaultValue: T,
368
+ defaultValue: x,
369
369
  ns: h
370
- }, P = k ? N(k, y) : T;
370
+ }, D = S ? N(S, y) : x;
371
371
  c && Object.keys(c).forEach((R) => {
372
372
  const E = c[R];
373
- if (typeof E.type == "function" || !E.props || !E.props.children || P.indexOf(`${R}/>`) < 0 && P.indexOf(`${R} />`) < 0) return;
373
+ if (typeof E.type == "function" || !E.props || !E.props.children || D.indexOf(`${R}/>`) < 0 && D.indexOf(`${R} />`) < 0) return;
374
374
  function J() {
375
375
  return qe(cr, null, E);
376
376
  }
377
377
  c[R] = qe(J);
378
378
  });
379
- const A = Ir(c || e, P, C, v, y, b), I = n !== void 0 ? n : v.defaultTransParent;
380
- return I ? qe(I, f, A) : A;
379
+ const T = Ir(c || e, D, C, v, y, b), I = n !== void 0 ? n : v.defaultTransParent;
380
+ return I ? qe(I, f, T) : T;
381
381
  }
382
382
  const Rr = {
383
383
  type: "3rdParty",
384
384
  init(a) {
385
385
  Dr(a.options.react), Pr(a);
386
386
  }
387
- }, Za = Zt();
387
+ }, Xa = Zt();
388
388
  class Mr {
389
389
  constructor() {
390
390
  Nt(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
@@ -416,7 +416,7 @@ function xt(a) {
416
416
  const {
417
417
  i18n: C,
418
418
  defaultNS: N
419
- } = Ia(Za) || {}, v = u || C || Qa(), h = g || v && v.t.bind(v);
419
+ } = ba(Xa) || {}, v = u || C || Za(), h = g || v && v.t.bind(v);
420
420
  return Er({
421
421
  children: e,
422
422
  count: t,
@@ -439,20 +439,20 @@ const Br = (a, e) => {
439
439
  return Ce(() => {
440
440
  t.current = a;
441
441
  }, [a, e]), t.current;
442
- }, cn = (a, e, t, n) => a.getFixedT(e, t, n), zr = (a, e, t, n) => ka(cn(a, e, t, n), [a, e, t, n]), oe = function(a) {
442
+ }, cn = (a, e, t, n) => a.getFixedT(e, t, n), zr = (a, e, t, n) => wa(cn(a, e, t, n), [a, e, t, n]), oe = function(a) {
443
443
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
444
444
  const {
445
445
  i18n: t
446
446
  } = e, {
447
447
  i18n: n,
448
448
  defaultNS: r
449
- } = Ia(Za) || {}, s = t || n || Qa();
449
+ } = ba(Xa) || {}, s = t || n || Za();
450
450
  if (s && !s.reportNamespaces && (s.reportNamespaces = new Mr()), !s) {
451
- Aa("You will need to pass in an i18next instance by using initReactI18next");
452
- const T = (k, w) => ke(w) ? w : aa(w) && ke(w.defaultValue) ? w.defaultValue : Array.isArray(k) ? k[k.length - 1] : k, S = [T, {}, !1];
453
- return S.t = T, S.i18n = {}, S.ready = !1, S;
451
+ xa("You will need to pass in an i18next instance by using initReactI18next");
452
+ const x = (S, w) => ke(w) ? w : aa(w) && ke(w.defaultValue) ? w.defaultValue : Array.isArray(S) ? S[S.length - 1] : S, k = [x, {}, !1];
453
+ return k.t = x, k.i18n = {}, k.ready = !1, k;
454
454
  }
455
- s.options.react && s.options.react.wait !== void 0 && Aa("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
455
+ s.options.react && s.options.react.wait !== void 0 && xa("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
456
456
  const i = {
457
457
  ...sn(),
458
458
  ...s.options.react,
@@ -463,33 +463,33 @@ const Br = (a, e) => {
463
463
  } = i;
464
464
  let c = r || s.options && s.options.defaultNS;
465
465
  c = ke(c) ? [c] : c || ["translation"], s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(c);
466
- const m = (s.isInitialized || s.initializedStoreOnce) && c.every((T) => kr(T, s, i)), u = zr(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), g = () => u, b = () => cn(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), [f, C] = K(g);
466
+ const m = (s.isInitialized || s.initializedStoreOnce) && c.every((x) => kr(x, s, i)), u = zr(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), g = () => u, b = () => cn(s, e.lng || null, i.nsMode === "fallback" ? c : c[0], d), [f, C] = K(g);
467
467
  let N = c.join();
468
468
  e.lng && (N = `${e.lng}${N}`);
469
469
  const v = Br(N), h = Ea(!0);
470
470
  Ce(() => {
471
471
  const {
472
- bindI18n: T,
473
- bindI18nStore: S
472
+ bindI18n: x,
473
+ bindI18nStore: k
474
474
  } = i;
475
475
  h.current = !0, !m && !l && (e.lng ? At(s, e.lng, c, () => {
476
476
  h.current && C(b);
477
477
  }) : wt(s, c, () => {
478
478
  h.current && C(b);
479
479
  })), m && v && v !== N && h.current && C(b);
480
- const k = () => {
480
+ const S = () => {
481
481
  h.current && C(b);
482
482
  };
483
- return T && s && s.on(T, k), S && s && s.store.on(S, k), () => {
484
- h.current = !1, T && s && T.split(" ").forEach((w) => s.off(w, k)), S && s && S.split(" ").forEach((w) => s.store.off(w, k));
483
+ return x && s && s.on(x, S), k && s && s.store.on(k, S), () => {
484
+ h.current = !1, x && s && x.split(" ").forEach((w) => s.off(w, S)), k && s && k.split(" ").forEach((w) => s.store.off(w, S));
485
485
  };
486
486
  }, [s, N]), Ce(() => {
487
487
  h.current && m && C(g);
488
488
  }, [s, d, m]);
489
- const x = [f, s, m];
490
- if (x.t = f, x.i18n = s, x.ready = m, m || !m && !l) return x;
491
- throw new Promise((T) => {
492
- e.lng ? At(s, e.lng, c, () => T()) : wt(s, c, () => T());
489
+ const A = [f, s, m];
490
+ if (A.t = f, A.i18n = s, A.ready = m, m || !m && !l) return A;
491
+ throw new Promise((x) => {
492
+ e.lng ? At(s, e.lng, c, () => x()) : wt(s, c, () => x());
493
493
  });
494
494
  };
495
495
  function Or(a) {
@@ -502,7 +502,7 @@ function Or(a) {
502
502
  i18n: e,
503
503
  defaultNS: t
504
504
  }), [e, t]);
505
- return qe(Za.Provider, {
505
+ return qe(Xa.Provider, {
506
506
  value: r
507
507
  }, n);
508
508
  }
@@ -547,7 +547,7 @@ const q = (a) => typeof a == "string", ua = () => {
547
547
  k: s
548
548
  } = ma(a, e, Object);
549
549
  r[s] = r[s] || [], r[s].push(t);
550
- }, xa = (a, e) => {
550
+ }, Ta = (a, e) => {
551
551
  const {
552
552
  obj: t,
553
553
  k: n
@@ -555,8 +555,8 @@ const q = (a) => typeof a == "string", ua = () => {
555
555
  if (t)
556
556
  return t[n];
557
557
  }, jr = (a, e, t) => {
558
- const n = xa(a, t);
559
- return n !== void 0 ? n : xa(e, t);
558
+ const n = Ta(a, t);
559
+ return n !== void 0 ? n : Ta(e, t);
560
560
  }, dn = (a, e, t) => {
561
561
  for (const n in e)
562
562
  n !== "__proto__" && n !== "constructor" && (n in a ? q(a[n]) || a[n] instanceof String || q(e[n]) || e[n] instanceof String ? t && (a[n] = e[n]) : dn(a[n], e[n], t) : a[n] = e[n]);
@@ -594,7 +594,7 @@ const Kr = [" ", ",", "?", "!", ";"], Hr = new Gr(20), Yr = (a, e, t) => {
594
594
  i > 0 && !r.test(a.substring(0, i)) && (s = !0);
595
595
  }
596
596
  return s;
597
- }, Wa = function(a, e) {
597
+ }, Ga = function(a, e) {
598
598
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
599
599
  if (!a) return;
600
600
  if (a[e]) return a[e];
@@ -614,7 +614,7 @@ const Kr = [" ", ",", "?", "!", ";"], Hr = new Gr(20), Yr = (a, e, t) => {
614
614
  r = i;
615
615
  }
616
616
  return r;
617
- }, Ta = (a) => a && a.replace("_", "-"), Jr = {
617
+ }, Da = (a) => a && a.replace("_", "-"), Jr = {
618
618
  type: "logger",
619
619
  log(a) {
620
620
  this.output("log", a);
@@ -629,7 +629,7 @@ const Kr = [" ", ",", "?", "!", ";"], Hr = new Gr(20), Yr = (a, e, t) => {
629
629
  console && console[a] && console[a].apply(console, e);
630
630
  }
631
631
  };
632
- class Da {
632
+ class Pa {
633
633
  constructor(e) {
634
634
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
635
635
  this.init(e, t);
@@ -662,16 +662,16 @@ class Da {
662
662
  return r && !this.debug ? null : (q(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
663
663
  }
664
664
  create(e) {
665
- return new Da(this.logger, {
665
+ return new Pa(this.logger, {
666
666
  prefix: `${this.prefix}:${e}:`,
667
667
  ...this.options
668
668
  });
669
669
  }
670
670
  clone(e) {
671
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new Da(this.logger, e);
671
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new Pa(this.logger, e);
672
672
  }
673
673
  }
674
- var Pe = new Da();
674
+ var Pe = new Pa();
675
675
  class Ra {
676
676
  constructor() {
677
677
  this.observers = {};
@@ -726,8 +726,8 @@ class Lt extends Ra {
726
726
  const s = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator, i = r.ignoreJSONStructure !== void 0 ? r.ignoreJSONStructure : this.options.ignoreJSONStructure;
727
727
  let l;
728
728
  e.indexOf(".") > -1 ? l = e.split(".") : (l = [e, t], n && (Array.isArray(n) ? l.push(...n) : q(n) && s ? l.push(...n.split(s)) : l.push(n)));
729
- const d = xa(this.data, l);
730
- return !d && !t && !n && e.indexOf(".") > -1 && (e = l[0], t = l[1], n = l.slice(2).join(".")), d || !i || !q(n) ? d : Wa(this.data && this.data[e] && this.data[e][t], n, s);
729
+ const d = Ta(this.data, l);
730
+ return !d && !t && !n && e.indexOf(".") > -1 && (e = l[0], t = l[1], n = l.slice(2).join(".")), d || !i || !q(n) ? d : Ga(this.data && this.data[e] && this.data[e][t], n, s);
731
731
  }
732
732
  addResource(e, t, n, r) {
733
733
  let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -753,7 +753,7 @@ class Lt extends Ra {
753
753
  skipCopy: !1
754
754
  }, l = [e, t];
755
755
  e.indexOf(".") > -1 && (l = e.split("."), r = n, n = t, t = l[1]), this.addNamespaces(t);
756
- let d = xa(this.data, l) || {};
756
+ let d = Ta(this.data, l) || {};
757
757
  i.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? dn(d, n, s) : d = {
758
758
  ...d,
759
759
  ...n
@@ -793,7 +793,7 @@ var un = {
793
793
  }
794
794
  };
795
795
  const It = {};
796
- class Pa extends Ra {
796
+ class Fa extends Ra {
797
797
  constructor(e) {
798
798
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
799
799
  super(), Ur(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Pe.create("translator");
@@ -842,15 +842,15 @@ class Pa extends Ra {
842
842
  } = this.extractFromKey(e[e.length - 1], t), d = l[l.length - 1], c = t.lng || this.language, m = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
843
843
  if (c && c.toLowerCase() === "cimode") {
844
844
  if (m) {
845
- const T = t.nsSeparator || this.options.nsSeparator;
845
+ const x = t.nsSeparator || this.options.nsSeparator;
846
846
  return r ? {
847
- res: `${d}${T}${i}`,
847
+ res: `${d}${x}${i}`,
848
848
  usedKey: i,
849
849
  exactUsedKey: i,
850
850
  usedLng: c,
851
851
  usedNS: d,
852
852
  usedParams: this.getUsedParamsDetails(t)
853
- } : `${d}${T}${i}`;
853
+ } : `${d}${x}${i}`;
854
854
  }
855
855
  return r ? {
856
856
  res: i,
@@ -863,39 +863,39 @@ class Pa extends Ra {
863
863
  }
864
864
  const u = this.resolve(e, t);
865
865
  let g = u && u.res;
866
- const b = u && u.usedKey || i, f = u && u.exactUsedKey || i, C = Object.prototype.toString.apply(g), N = ["[object Number]", "[object Function]", "[object RegExp]"], v = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, h = !this.i18nFormat || this.i18nFormat.handleAsObject, x = !q(g) && typeof g != "boolean" && typeof g != "number";
867
- if (h && g && x && N.indexOf(C) < 0 && !(q(v) && Array.isArray(g))) {
866
+ const b = u && u.usedKey || i, f = u && u.exactUsedKey || i, C = Object.prototype.toString.apply(g), N = ["[object Number]", "[object Function]", "[object RegExp]"], v = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, h = !this.i18nFormat || this.i18nFormat.handleAsObject, A = !q(g) && typeof g != "boolean" && typeof g != "number";
867
+ if (h && g && A && N.indexOf(C) < 0 && !(q(v) && Array.isArray(g))) {
868
868
  if (!t.returnObjects && !this.options.returnObjects) {
869
869
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
870
- const T = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, g, {
870
+ const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, g, {
871
871
  ...t,
872
872
  ns: l
873
873
  }) : `key '${i} (${this.language})' returned an object instead of string.`;
874
- return r ? (u.res = T, u.usedParams = this.getUsedParamsDetails(t), u) : T;
874
+ return r ? (u.res = x, u.usedParams = this.getUsedParamsDetails(t), u) : x;
875
875
  }
876
876
  if (s) {
877
- const T = Array.isArray(g), S = T ? [] : {}, k = T ? f : b;
877
+ const x = Array.isArray(g), k = x ? [] : {}, S = x ? f : b;
878
878
  for (const w in g)
879
879
  if (Object.prototype.hasOwnProperty.call(g, w)) {
880
- const y = `${k}${s}${w}`;
881
- S[w] = this.translate(y, {
880
+ const y = `${S}${s}${w}`;
881
+ k[w] = this.translate(y, {
882
882
  ...t,
883
883
  joinArrays: !1,
884
884
  ns: l
885
- }), S[w] === y && (S[w] = g[w]);
885
+ }), k[w] === y && (k[w] = g[w]);
886
886
  }
887
- g = S;
887
+ g = k;
888
888
  }
889
889
  } else if (h && q(v) && Array.isArray(g))
890
890
  g = g.join(v), g && (g = this.extendTranslation(g, e, t, n));
891
891
  else {
892
- let T = !1, S = !1;
893
- const k = t.count !== void 0 && !q(t.count), w = Pa.hasDefaultValue(t), y = k ? this.pluralResolver.getSuffix(c, t.count, t) : "", P = t.ordinal && k ? this.pluralResolver.getSuffix(c, t.count, {
892
+ let x = !1, k = !1;
893
+ const S = t.count !== void 0 && !q(t.count), w = Fa.hasDefaultValue(t), y = S ? this.pluralResolver.getSuffix(c, t.count, t) : "", D = t.ordinal && S ? this.pluralResolver.getSuffix(c, t.count, {
894
894
  ordinal: !1
895
- }) : "", A = k && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), I = A && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${y}`] || t[`defaultValue${P}`] || t.defaultValue;
896
- !this.isValidLookup(g) && w && (T = !0, g = I), this.isValidLookup(g) || (S = !0, g = i);
897
- const E = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && S ? void 0 : g, J = w && I !== g && this.options.updateMissing;
898
- if (S || T || J) {
895
+ }) : "", T = S && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), I = T && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${y}`] || t[`defaultValue${D}`] || t.defaultValue;
896
+ !this.isValidLookup(g) && w && (x = !0, g = I), this.isValidLookup(g) || (k = !0, g = i);
897
+ const E = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && k ? void 0 : g, J = w && I !== g && this.options.updateMissing;
898
+ if (k || x || J) {
899
899
  if (this.logger.log(J ? "updateKey" : "missingKey", c, d, i, J ? I : g), s) {
900
900
  const z = this.resolve(i, {
901
901
  ...t,
@@ -913,14 +913,14 @@ class Pa extends Ra {
913
913
  const ne = w && _ !== g ? _ : E;
914
914
  this.options.missingKeyHandler ? this.options.missingKeyHandler(z, d, H, ne, J, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(z, d, H, ne, J, t), this.emit("missingKey", z, d, H, g);
915
915
  };
916
- this.options.saveMissing && (this.options.saveMissingPlurals && k ? M.forEach((z) => {
916
+ this.options.saveMissing && (this.options.saveMissingPlurals && S ? M.forEach((z) => {
917
917
  const H = this.pluralResolver.getSuffixes(z, t);
918
- A && t[`defaultValue${this.options.pluralSeparator}zero`] && H.indexOf(`${this.options.pluralSeparator}zero`) < 0 && H.push(`${this.options.pluralSeparator}zero`), H.forEach((_) => {
918
+ T && t[`defaultValue${this.options.pluralSeparator}zero`] && H.indexOf(`${this.options.pluralSeparator}zero`) < 0 && H.push(`${this.options.pluralSeparator}zero`), H.forEach((_) => {
919
919
  Q([z], i + _, t[`defaultValue${_}`] || I);
920
920
  });
921
921
  }) : Q(M, i, I));
922
922
  }
923
- g = this.extendTranslation(g, e, t, u, n), S && g === i && this.options.appendNamespaceToMissingKey && (g = `${d}:${i}`), (S || T) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${d}:${i}` : i, T ? g : void 0) : g = this.options.parseMissingKeyHandler(g));
923
+ g = this.extendTranslation(g, e, t, u, n), k && g === i && this.options.appendNamespaceToMissingKey && (g = `${d}:${i}`), (k || x) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${d}:${i}` : i, x ? g : void 0) : g = this.options.parseMissingKeyHandler(g));
924
924
  }
925
925
  return r ? (u.res = g, u.usedParams = this.getUsedParamsDetails(t), u) : g;
926
926
  }
@@ -987,17 +987,17 @@ class Pa extends Ra {
987
987
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
988
988
  this.i18nFormat.addLookupKeys(h, m, v, N, t);
989
989
  else {
990
- let T;
991
- g && (T = this.pluralResolver.getSuffix(v, t.count, t));
992
- const S = `${this.options.pluralSeparator}zero`, k = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
993
- if (g && (h.push(m + T), t.ordinal && T.indexOf(k) === 0 && h.push(m + T.replace(k, this.options.pluralSeparator)), b && h.push(m + S)), f) {
990
+ let x;
991
+ g && (x = this.pluralResolver.getSuffix(v, t.count, t));
992
+ const k = `${this.options.pluralSeparator}zero`, S = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
993
+ if (g && (h.push(m + x), t.ordinal && x.indexOf(S) === 0 && h.push(m + x.replace(S, this.options.pluralSeparator)), b && h.push(m + k)), f) {
994
994
  const w = `${m}${this.options.contextSeparator}${t.context}`;
995
- h.push(w), g && (h.push(w + T), t.ordinal && T.indexOf(k) === 0 && h.push(w + T.replace(k, this.options.pluralSeparator)), b && h.push(w + S));
995
+ h.push(w), g && (h.push(w + x), t.ordinal && x.indexOf(S) === 0 && h.push(w + x.replace(S, this.options.pluralSeparator)), b && h.push(w + k));
996
996
  }
997
997
  }
998
- let x;
999
- for (; x = h.pop(); )
1000
- this.isValidLookup(n) || (s = x, n = this.getResource(v, N, x, t));
998
+ let A;
999
+ for (; A = h.pop(); )
1000
+ this.isValidLookup(n) || (s = A, n = this.getResource(v, N, A, t));
1001
1001
  }));
1002
1002
  });
1003
1003
  }), {
@@ -1039,18 +1039,18 @@ class Pa extends Ra {
1039
1039
  return !1;
1040
1040
  }
1041
1041
  }
1042
- const Ua = (a) => a.charAt(0).toUpperCase() + a.slice(1);
1042
+ const qa = (a) => a.charAt(0).toUpperCase() + a.slice(1);
1043
1043
  class Et {
1044
1044
  constructor(e) {
1045
1045
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Pe.create("languageUtils");
1046
1046
  }
1047
1047
  getScriptPartFromCode(e) {
1048
- if (e = Ta(e), !e || e.indexOf("-") < 0) return null;
1048
+ if (e = Da(e), !e || e.indexOf("-") < 0) return null;
1049
1049
  const t = e.split("-");
1050
1050
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
1051
1051
  }
1052
1052
  getLanguagePartFromCode(e) {
1053
- if (e = Ta(e), !e || e.indexOf("-") < 0) return e;
1053
+ if (e = Da(e), !e || e.indexOf("-") < 0) return e;
1054
1054
  const t = e.split("-");
1055
1055
  return this.formatLanguageCode(t[0]);
1056
1056
  }
@@ -1064,7 +1064,7 @@ class Et {
1064
1064
  }
1065
1065
  const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
1066
1066
  let n = e.split("-");
1067
- return this.options.lowerCaseLng ? n = n.map((r) => r.toLowerCase()) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = Ua(n[1].toLowerCase()))) : n.length === 3 && (n[0] = n[0].toLowerCase(), n[1].length === 2 && (n[1] = n[1].toUpperCase()), n[0] !== "sgn" && n[2].length === 2 && (n[2] = n[2].toUpperCase()), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = Ua(n[1].toLowerCase())), t.indexOf(n[2].toLowerCase()) > -1 && (n[2] = Ua(n[2].toLowerCase()))), n.join("-");
1067
+ return this.options.lowerCaseLng ? n = n.map((r) => r.toLowerCase()) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = qa(n[1].toLowerCase()))) : n.length === 3 && (n[0] = n[0].toLowerCase(), n[1].length === 2 && (n[1] = n[1].toUpperCase()), n[0] !== "sgn" && n[2].length === 2 && (n[2] = n[2].toUpperCase()), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = qa(n[1].toLowerCase())), t.indexOf(n[2].toLowerCase()) > -1 && (n[2] = qa(n[2].toLowerCase()))), n.join("-");
1068
1068
  }
1069
1069
  return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
1070
1070
  }
@@ -1253,7 +1253,7 @@ class ts {
1253
1253
  getRule(e) {
1254
1254
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1255
1255
  if (this.shouldUseIntlApi()) {
1256
- const n = Ta(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({
1256
+ const n = Da(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({
1257
1257
  cleanedCode: n,
1258
1258
  type: r
1259
1259
  });
@@ -1305,8 +1305,8 @@ class ts {
1305
1305
  }
1306
1306
  const Mt = function(a, e, t) {
1307
1307
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = jr(a, e, t);
1308
- return !s && r && q(t) && (s = Wa(a, t, n), s === void 0 && (s = Wa(e, t, n))), s;
1309
- }, qa = (a) => a.replace(/\$/g, "$$$$");
1308
+ return !s && r && q(t) && (s = Ga(a, t, n), s === void 0 && (s = Ga(e, t, n))), s;
1309
+ }, $a = (a) => a.replace(/\$/g, "$$$$");
1310
1310
  class ns {
1311
1311
  constructor() {
1312
1312
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1367,10 +1367,10 @@ class ns {
1367
1367
  const m = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1368
1368
  return [{
1369
1369
  regex: this.regexpUnescape,
1370
- safeValue: (b) => qa(b)
1370
+ safeValue: (b) => $a(b)
1371
1371
  }, {
1372
1372
  regex: this.regexp,
1373
- safeValue: (b) => this.escapeValue ? qa(this.escape(b)) : qa(b)
1373
+ safeValue: (b) => this.escapeValue ? $a(this.escape(b)) : $a(b)
1374
1374
  }].forEach((b) => {
1375
1375
  for (l = 0; s = b.regex.exec(e); ) {
1376
1376
  const f = s[1].trim();
@@ -1459,7 +1459,7 @@ const rs = (a) => {
1459
1459
  });
1460
1460
  const i = n + JSON.stringify(s);
1461
1461
  let l = e[i];
1462
- return l || (l = a(Ta(n), r), e[i] = l), l(t);
1462
+ return l || (l = a(Da(n), r), e[i] = l), l(t);
1463
1463
  };
1464
1464
  };
1465
1465
  class ss {
@@ -1736,7 +1736,7 @@ const Bt = () => ({
1736
1736
  maxReplaces: 1e3,
1737
1737
  skipOnVariables: !0
1738
1738
  }
1739
- }), zt = (a) => (q(a.ns) && (a.ns = [a.ns]), q(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), q(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), a.supportedLngs && a.supportedLngs.indexOf("cimode") < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), a), fa = () => {
1739
+ }), zt = (a) => (q(a.ns) && (a.ns = [a.ns]), q(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), q(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), a.supportedLngs && a.supportedLngs.indexOf("cimode") < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), a), ya = () => {
1740
1740
  }, ls = (a) => {
1741
1741
  Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
1742
1742
  typeof a[t] == "function" && (a[t] = a[t].bind(a));
@@ -1786,7 +1786,7 @@ class ha extends Ra {
1786
1786
  for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
1787
1787
  C[N - 1] = arguments[N];
1788
1788
  e.emit(b, ...C);
1789
- }), this.modules.languageDetector && (g.languageDetector = s(this.modules.languageDetector), g.languageDetector.init && g.languageDetector.init(g, this.options.detection, this.options)), this.modules.i18nFormat && (g.i18nFormat = s(this.modules.i18nFormat), g.i18nFormat.init && g.i18nFormat.init(this)), this.translator = new Pa(this.services, this.options), this.translator.on("*", function(b) {
1789
+ }), this.modules.languageDetector && (g.languageDetector = s(this.modules.languageDetector), g.languageDetector.init && g.languageDetector.init(g, this.options.detection, this.options)), this.modules.i18nFormat && (g.i18nFormat = s(this.modules.i18nFormat), g.i18nFormat.init && g.i18nFormat.init(this)), this.translator = new Fa(this.services, this.options), this.translator.on("*", function(b) {
1790
1790
  for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
1791
1791
  C[N - 1] = arguments[N];
1792
1792
  e.emit(b, ...C);
@@ -1794,7 +1794,7 @@ class ha extends Ra {
1794
1794
  b.init && b.init(this);
1795
1795
  });
1796
1796
  }
1797
- if (this.format = this.options.interpolation.format, n || (n = fa), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1797
+ if (this.format = this.options.interpolation.format, n || (n = ya), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1798
1798
  const m = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1799
1799
  m.length > 0 && m[0] !== "dev" && (this.options.lng = m[0]);
1800
1800
  }
@@ -1817,7 +1817,7 @@ class ha extends Ra {
1817
1817
  return this.options.resources || !this.options.initImmediate ? c() : setTimeout(c, 0), d;
1818
1818
  }
1819
1819
  loadResources(e) {
1820
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : fa;
1820
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ya;
1821
1821
  const r = q(e) ? e : this.language;
1822
1822
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1823
1823
  if (r && r.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -1835,7 +1835,7 @@ class ha extends Ra {
1835
1835
  }
1836
1836
  reloadResources(e, t, n) {
1837
1837
  const r = ua();
1838
- return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n = fa), this.services.backendConnector.reload(e, t, (s) => {
1838
+ return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n = ya), this.services.backendConnector.reload(e, t, (s) => {
1839
1839
  r.resolve(), n(s);
1840
1840
  }), r;
1841
1841
  }
@@ -1948,7 +1948,7 @@ class ha extends Ra {
1948
1948
  return new ha(e, t);
1949
1949
  }
1950
1950
  cloneInstance() {
1951
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : fa;
1951
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ya;
1952
1952
  const n = e.forkResourceStore;
1953
1953
  n && delete e.forkResourceStore;
1954
1954
  const r = {
@@ -1962,7 +1962,7 @@ class ha extends Ra {
1962
1962
  ...this.services
1963
1963
  }, s.services.utils = {
1964
1964
  hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
1965
- }, n && (s.store = new Lt(this.store.data, r), s.services.resourceStore = s.store), s.translator = new Pa(s.services, r), s.translator.on("*", function(l) {
1965
+ }, n && (s.store = new Lt(this.store.data, r), s.services.resourceStore = s.store), s.translator = new Fa(s.services, r), s.translator.on("*", function(l) {
1966
1966
  for (var d = arguments.length, c = new Array(d > 1 ? d - 1 : 0), m = 1; m < d; m++)
1967
1967
  c[m - 1] = arguments[m];
1968
1968
  s.emit(l, ...c);
@@ -2222,7 +2222,7 @@ const ds = {
2222
2222
  dashboardStorageTitle: "Storage",
2223
2223
  dashboardStorageHint: "Shared across files, knowledge base, and tables.",
2224
2224
  dashboardAiTitle: "AI usage",
2225
- dashboardAiHint: "Each conversation includes an AI allowance — this is how much you've used.",
2225
+ dashboardAiHint: "Each conversation includes an allowance of AI usage. Track how much of that allowance you've used",
2226
2226
  dashboardLoadError: "We couldn't load your usage. Try again in a moment.",
2227
2227
  dashboardNoBotSpend: "No per-bot AI spend this period.",
2228
2228
  dashboardAiByBot: "AI spend by bot",
@@ -2525,7 +2525,7 @@ const ds = {
2525
2525
  dashboardStorageTitle: "Stockage",
2526
2526
  dashboardStorageHint: "Partagé entre les fichiers, la base de connaissances et les tables.",
2527
2527
  dashboardAiTitle: "Utilisation de l'IA",
2528
- dashboardAiHint: "Chaque conversation inclut une allocation d'IA — voici combien vous avez utilisé.",
2528
+ dashboardAiHint: "Chaque conversation inclut une allocation d'usage IA. Suivez la part de cette allocation que vous avez utilisée",
2529
2529
  dashboardLoadError: "Impossible de charger votre utilisation. Réessayez dans un instant.",
2530
2530
  dashboardNoBotSpend: "Aucune dépense IA par bot pour cette période.",
2531
2531
  dashboardAiByBot: "Dépenses IA par bot",
@@ -2822,7 +2822,7 @@ const ds = {
2822
2822
  dashboardStorageTitle: "Almacenamiento",
2823
2823
  dashboardStorageHint: "Compartido entre archivos, base de conocimiento y tablas.",
2824
2824
  dashboardAiTitle: "Uso de IA",
2825
- dashboardAiHint: "Cada conversación incluye una asignación de IA — esto es cuánto has usado.",
2825
+ dashboardAiHint: "Cada conversación incluye una asignación de uso de IA. Controla cuánto de esa asignación has usado",
2826
2826
  dashboardLoadError: "No pudimos cargar tu uso. Inténtalo de nuevo en un momento.",
2827
2827
  dashboardNoBotSpend: "Sin gasto de IA por bot en este período.",
2828
2828
  dashboardAiByBot: "Gasto de IA por bot",
@@ -3119,7 +3119,7 @@ const ds = {
3119
3119
  dashboardStorageTitle: "Armazenamento",
3120
3120
  dashboardStorageHint: "Compartilhado entre arquivos, base de conhecimento e tabelas.",
3121
3121
  dashboardAiTitle: "Uso de IA",
3122
- dashboardAiHint: "Cada conversa inclui uma cota de IA — isso é quanto você usou.",
3122
+ dashboardAiHint: "Cada conversa inclui uma cota de uso de IA. Acompanhe quanto dessa cota você já usou",
3123
3123
  dashboardLoadError: "Não foi possível carregar seu uso. Tente novamente em um momento.",
3124
3124
  dashboardNoBotSpend: "Sem gastos de IA por bot neste período.",
3125
3125
  dashboardAiByBot: "Gastos de IA por bot",
@@ -3207,8 +3207,8 @@ const ds = {
3207
3207
  summaryActiveAddons: "{count} add-ons ativos",
3208
3208
  summaryNoAddons: "Sem add-ons",
3209
3209
  summaryNoAddonsMeta: "Adicione conversas ou armazenamento extra"
3210
- }, ea = "billing", Ga = cs();
3211
- Ga.use(Rr).init({
3210
+ }, ea = "billing", Ka = cs();
3211
+ Ka.use(Rr).init({
3212
3212
  resources: {
3213
3213
  en: { [ea]: ds },
3214
3214
  fr: { [ea]: us },
@@ -3225,7 +3225,7 @@ Ga.use(Rr).init({
3225
3225
  suffix: "}"
3226
3226
  }
3227
3227
  });
3228
- const Xa = Zt(null), gs = { capture: () => {
3228
+ const Ma = Zt(null), gs = { capture: () => {
3229
3229
  } };
3230
3230
  function hs(a) {
3231
3231
  const [e, t] = K(
@@ -3238,99 +3238,115 @@ function hs(a) {
3238
3238
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
3239
3239
  }, [a]), a === "system" ? e : a === "dark";
3240
3240
  }
3241
- const gi = ({
3241
+ const hi = ({
3242
3242
  client: a,
3243
3243
  stripePublishableKey: e,
3244
3244
  email: t,
3245
3245
  locale: n = "en",
3246
3246
  theme: r = "light",
3247
- onToast: s,
3248
- analytics: i,
3249
- featureLabels: l,
3250
- billingVersion: d,
3251
- workspaceId: c,
3252
- persist: m = !0,
3253
- manageBillingUrl: u,
3254
- onBillingChange: g,
3255
- refreshInterval: b = 3e4,
3256
- children: f
3247
+ colorScheme: s = "default",
3248
+ onToast: i,
3249
+ analytics: l,
3250
+ featureLabels: d,
3251
+ billingVersion: c,
3252
+ workspaceId: m,
3253
+ persist: u = !0,
3254
+ manageBillingUrl: g,
3255
+ onBillingChange: b,
3256
+ refreshInterval: f = 3e4,
3257
+ children: C
3257
3258
  }) => {
3258
- const C = c || "default", [N] = K(
3259
+ const N = m || "default", [v] = K(
3259
3260
  () => new or({ defaultOptions: { queries: { retry: 1, staleTime: 3e4, gcTime: 1e3 * 60 * 60 } } })
3260
- ), v = hs(r), h = _e(() => gr(e), [e]);
3261
+ ), h = hs(r), A = _e(() => gr(e), [e]);
3261
3262
  Ce(() => {
3262
- if (!m || typeof window > "u")
3263
+ if (!u || typeof window > "u")
3263
3264
  return;
3264
- const w = `bpb-cache:${C}`;
3265
+ const y = `bpb-cache:${N}`;
3265
3266
  try {
3266
- const A = window.localStorage.getItem(w);
3267
- A && ir(N, JSON.parse(A));
3267
+ const I = window.localStorage.getItem(y);
3268
+ I && ir(v, JSON.parse(I));
3268
3269
  } catch {
3269
- window.localStorage.removeItem(w);
3270
+ window.localStorage.removeItem(y);
3270
3271
  }
3271
- let y = null;
3272
- const P = N.getQueryCache().subscribe((A) => {
3273
- A.type !== "added" && A.type !== "removed" && A.type !== "updated" || (y && clearTimeout(y), y = setTimeout(() => {
3272
+ let D = null;
3273
+ const T = v.getQueryCache().subscribe((I) => {
3274
+ I.type !== "added" && I.type !== "removed" && I.type !== "updated" || (D && clearTimeout(D), D = setTimeout(() => {
3274
3275
  try {
3275
- window.localStorage.setItem(w, JSON.stringify(lr(N)));
3276
+ window.localStorage.setItem(y, JSON.stringify(lr(v)));
3276
3277
  } catch {
3277
3278
  }
3278
3279
  }, 250));
3279
3280
  });
3280
3281
  return () => {
3281
- y && clearTimeout(y), P();
3282
+ D && clearTimeout(D), T();
3282
3283
  };
3283
- }, [m, C, N]);
3284
- const x = ka(() => N.invalidateQueries({ queryKey: ["bpb", C] }), [N, C]), T = ka((w) => g == null ? void 0 : g(w), [g]), S = b > 0 ? b : !1;
3285
- Ga.changeLanguage(n);
3286
- const k = _e(
3284
+ }, [u, N, v]);
3285
+ const x = wa(() => v.invalidateQueries({ queryKey: ["bpb", N] }), [v, N]), k = wa((y) => b == null ? void 0 : b(y), [b]), S = f > 0 ? f : !1;
3286
+ Ka.changeLanguage(n);
3287
+ const w = _e(
3287
3288
  () => ({
3288
3289
  client: a,
3289
- queryClient: N,
3290
- scope: C,
3291
- stripePromise: h,
3290
+ queryClient: v,
3291
+ scope: N,
3292
+ stripePromise: A,
3292
3293
  email: t,
3293
3294
  locale: n,
3294
- isDark: v,
3295
- toast: s ?? (() => {
3295
+ isDark: h,
3296
+ colorScheme: s,
3297
+ toast: i ?? (() => {
3296
3298
  }),
3297
- analytics: i ?? gs,
3298
- featureLabels: l,
3299
- isOutdatedBilling: d !== void 0 && d !== "v4",
3300
- manageBillingUrl: u,
3299
+ analytics: l ?? gs,
3300
+ featureLabels: d,
3301
+ isOutdatedBilling: c !== void 0 && c !== "v4",
3302
+ manageBillingUrl: g,
3301
3303
  refetchInterval: S,
3302
3304
  refresh: x,
3303
- notifyBillingChange: T
3305
+ notifyBillingChange: k
3304
3306
  }),
3305
3307
  [
3306
3308
  a,
3309
+ v,
3307
3310
  N,
3308
- C,
3309
- h,
3311
+ A,
3310
3312
  t,
3311
3313
  n,
3312
- v,
3314
+ h,
3313
3315
  s,
3314
3316
  i,
3315
3317
  l,
3316
3318
  d,
3317
- u,
3319
+ c,
3320
+ g,
3318
3321
  S,
3319
3322
  x,
3320
- T
3323
+ k
3321
3324
  ]
3322
3325
  );
3323
- return /* @__PURE__ */ o(Xa.Provider, { value: k, children: /* @__PURE__ */ o(Or, { i18n: Ga, children: /* @__PURE__ */ o("div", { className: "bpb-scope", "data-bpb-theme": v ? "dark" : "light", style: { display: "contents" }, children: f }) }) });
3326
+ return /* @__PURE__ */ o(Ma.Provider, { value: w, children: /* @__PURE__ */ o(Or, { i18n: Ka, children: /* @__PURE__ */ o(
3327
+ "div",
3328
+ {
3329
+ className: "bpb-scope",
3330
+ "data-bpb-theme": h ? "dark" : "light",
3331
+ "data-bpb-color-scheme": s,
3332
+ style: { display: "contents" },
3333
+ children: C
3334
+ }
3335
+ ) }) });
3324
3336
  };
3325
3337
  function G() {
3326
- const a = Ia(Xa);
3338
+ const a = ba(Ma);
3327
3339
  if (!a)
3328
3340
  throw new Error("@bpinternal/billing-ui components must be rendered inside <BillingProvider>");
3329
3341
  return a;
3330
3342
  }
3331
3343
  function bs() {
3332
3344
  var a;
3333
- return ((a = Ia(Xa)) == null ? void 0 : a.isDark) ?? !1;
3345
+ return ((a = ba(Ma)) == null ? void 0 : a.isDark) ?? !1;
3346
+ }
3347
+ function fs() {
3348
+ var a;
3349
+ return ((a = ba(Ma)) == null ? void 0 : a.colorScheme) ?? "default";
3334
3350
  }
3335
3351
  const pe = {
3336
3352
  // Plan picker (UpgradePlanDialog)
@@ -3433,7 +3449,7 @@ function hn(a) {
3433
3449
  t
3434
3450
  );
3435
3451
  }
3436
- function fs(a) {
3452
+ function ys(a) {
3437
3453
  const { client: e, queryClient: t, scope: n, refetchInterval: r } = G();
3438
3454
  return Te(
3439
3455
  {
@@ -3469,7 +3485,7 @@ function la(a) {
3469
3485
  t
3470
3486
  );
3471
3487
  }
3472
- function ys(a, e) {
3488
+ function vs(a, e) {
3473
3489
  const { client: t, queryClient: n, scope: r, refetchInterval: s } = G(), i = t.breakDownWorkspaceUsageByBot, l = t.listBots, d = typeof i == "function" && typeof l == "function", c = e != null && e.period ? new Date(e.period) : /* @__PURE__ */ new Date(), m = `${c.getUTCFullYear()}-${String(c.getUTCMonth() + 1).padStart(2, "0")}`;
3474
3490
  return Te(
3475
3491
  {
@@ -3487,7 +3503,7 @@ function ys(a, e) {
3487
3503
  n
3488
3504
  );
3489
3505
  }
3490
- function vs() {
3506
+ function Cs() {
3491
3507
  const { client: a } = G();
3492
3508
  return typeof a.breakDownWorkspaceUsageByBot == "function" && typeof a.listBots == "function";
3493
3509
  }
@@ -3534,7 +3550,7 @@ function Cn() {
3534
3550
  e
3535
3551
  );
3536
3552
  }
3537
- function Cs() {
3553
+ function Ns() {
3538
3554
  const { client: a, queryClient: e, scope: t, notifyBillingChange: n } = G();
3539
3555
  return oa(
3540
3556
  {
@@ -3580,40 +3596,40 @@ function _n(a) {
3580
3596
  } else for (t in a) a[t] && (n && (n += " "), n += t);
3581
3597
  return n;
3582
3598
  }
3583
- function Ns() {
3599
+ function _s() {
3584
3600
  for (var a, e, t = 0, n = "", r = arguments.length; t < r; t++) (a = arguments[t]) && (e = _n(a)) && (n && (n += " "), n += e);
3585
3601
  return n;
3586
3602
  }
3587
- const _s = (a, e) => {
3603
+ const Ss = (a, e) => {
3588
3604
  const t = new Array(a.length + e.length);
3589
3605
  for (let n = 0; n < a.length; n++)
3590
3606
  t[n] = a[n];
3591
3607
  for (let n = 0; n < e.length; n++)
3592
3608
  t[a.length + n] = e[n];
3593
3609
  return t;
3594
- }, Ss = (a, e) => ({
3610
+ }, ks = (a, e) => ({
3595
3611
  classGroupId: a,
3596
3612
  validator: e
3597
3613
  }), Sn = (a = /* @__PURE__ */ new Map(), e = null, t) => ({
3598
3614
  nextPart: a,
3599
3615
  validators: e,
3600
3616
  classGroupId: t
3601
- }), Fa = "-", Ot = [], ks = "arbitrary..", ws = (a) => {
3602
- const e = xs(a), {
3617
+ }), La = "-", Ot = [], ws = "arbitrary..", As = (a) => {
3618
+ const e = Ts(a), {
3603
3619
  conflictingClassGroups: t,
3604
3620
  conflictingClassGroupModifiers: n
3605
3621
  } = a;
3606
3622
  return {
3607
3623
  getClassGroupId: (i) => {
3608
3624
  if (i.startsWith("[") && i.endsWith("]"))
3609
- return As(i);
3610
- const l = i.split(Fa), d = l[0] === "" && l.length > 1 ? 1 : 0;
3625
+ return xs(i);
3626
+ const l = i.split(La), d = l[0] === "" && l.length > 1 ? 1 : 0;
3611
3627
  return kn(l, d, e);
3612
3628
  },
3613
3629
  getConflictingClassGroupIds: (i, l) => {
3614
3630
  if (l) {
3615
3631
  const d = n[i], c = t[i];
3616
- return d ? c ? _s(c, d) : d : c || Ot;
3632
+ return d ? c ? Ss(c, d) : d : c || Ot;
3617
3633
  }
3618
3634
  return t[i] || Ot;
3619
3635
  }
@@ -3629,22 +3645,22 @@ const _s = (a, e) => {
3629
3645
  const i = t.validators;
3630
3646
  if (i === null)
3631
3647
  return;
3632
- const l = e === 0 ? a.join(Fa) : a.slice(e).join(Fa), d = i.length;
3648
+ const l = e === 0 ? a.join(La) : a.slice(e).join(La), d = i.length;
3633
3649
  for (let c = 0; c < d; c++) {
3634
3650
  const m = i[c];
3635
3651
  if (m.validator(l))
3636
3652
  return m.classGroupId;
3637
3653
  }
3638
- }, As = (a) => a.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
3654
+ }, xs = (a) => a.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
3639
3655
  const e = a.slice(1, -1), t = e.indexOf(":"), n = e.slice(0, t);
3640
- return n ? ks + n : void 0;
3641
- })(), xs = (a) => {
3656
+ return n ? ws + n : void 0;
3657
+ })(), Ts = (a) => {
3642
3658
  const {
3643
3659
  theme: e,
3644
3660
  classGroups: t
3645
3661
  } = a;
3646
- return Ts(t, e);
3647
- }, Ts = (a, e) => {
3662
+ return Ds(t, e);
3663
+ }, Ds = (a, e) => {
3648
3664
  const t = Sn();
3649
3665
  for (const n in a) {
3650
3666
  const r = a[n];
@@ -3655,28 +3671,28 @@ const _s = (a, e) => {
3655
3671
  const r = a.length;
3656
3672
  for (let s = 0; s < r; s++) {
3657
3673
  const i = a[s];
3658
- Ds(i, e, t, n);
3674
+ Ps(i, e, t, n);
3659
3675
  }
3660
- }, Ds = (a, e, t, n) => {
3676
+ }, Ps = (a, e, t, n) => {
3661
3677
  if (typeof a == "string") {
3662
- Ps(a, e, t);
3678
+ Fs(a, e, t);
3663
3679
  return;
3664
3680
  }
3665
3681
  if (typeof a == "function") {
3666
- Fs(a, e, t, n);
3682
+ Ls(a, e, t, n);
3667
3683
  return;
3668
3684
  }
3669
- Ls(a, e, t, n);
3670
- }, Ps = (a, e, t) => {
3685
+ Is(a, e, t, n);
3686
+ }, Fs = (a, e, t) => {
3671
3687
  const n = a === "" ? e : wn(e, a);
3672
3688
  n.classGroupId = t;
3673
- }, Fs = (a, e, t, n) => {
3674
- if (Is(a)) {
3689
+ }, Ls = (a, e, t, n) => {
3690
+ if (Es(a)) {
3675
3691
  et(a(n), e, t, n);
3676
3692
  return;
3677
3693
  }
3678
- e.validators === null && (e.validators = []), e.validators.push(Ss(t, a));
3679
- }, Ls = (a, e, t, n) => {
3694
+ e.validators === null && (e.validators = []), e.validators.push(ks(t, a));
3695
+ }, Is = (a, e, t, n) => {
3680
3696
  const r = Object.entries(a), s = r.length;
3681
3697
  for (let i = 0; i < s; i++) {
3682
3698
  const [l, d] = r[i];
@@ -3684,14 +3700,14 @@ const _s = (a, e) => {
3684
3700
  }
3685
3701
  }, wn = (a, e) => {
3686
3702
  let t = a;
3687
- const n = e.split(Fa), r = n.length;
3703
+ const n = e.split(La), r = n.length;
3688
3704
  for (let s = 0; s < r; s++) {
3689
3705
  const i = n[s];
3690
3706
  let l = t.nextPart.get(i);
3691
3707
  l || (l = Sn(), t.nextPart.set(i, l)), t = l;
3692
3708
  }
3693
3709
  return t;
3694
- }, Is = (a) => "isThemeGetter" in a && a.isThemeGetter === !0, Es = (a) => {
3710
+ }, Es = (a) => "isThemeGetter" in a && a.isThemeGetter === !0, Rs = (a) => {
3695
3711
  if (a < 1)
3696
3712
  return {
3697
3713
  get: () => {
@@ -3715,13 +3731,13 @@ const _s = (a, e) => {
3715
3731
  s in t ? t[s] = i : r(s, i);
3716
3732
  }
3717
3733
  };
3718
- }, Ka = "!", Ut = ":", Rs = [], qt = (a, e, t, n, r) => ({
3734
+ }, Ha = "!", Ut = ":", Ms = [], qt = (a, e, t, n, r) => ({
3719
3735
  modifiers: a,
3720
3736
  hasImportantModifier: e,
3721
3737
  baseClassName: t,
3722
3738
  maybePostfixModifierPosition: n,
3723
3739
  isExternal: r
3724
- }), Ms = (a) => {
3740
+ }), Bs = (a) => {
3725
3741
  const {
3726
3742
  prefix: e,
3727
3743
  experimentalParseClassName: t
@@ -3746,19 +3762,19 @@ const _s = (a, e) => {
3746
3762
  }
3747
3763
  const u = s.length === 0 ? r : r.slice(d);
3748
3764
  let g = u, b = !1;
3749
- u.endsWith(Ka) ? (g = u.slice(0, -1), b = !0) : (
3765
+ u.endsWith(Ha) ? (g = u.slice(0, -1), b = !0) : (
3750
3766
  /**
3751
3767
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
3752
3768
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
3753
3769
  */
3754
- u.startsWith(Ka) && (g = u.slice(1), b = !0)
3770
+ u.startsWith(Ha) && (g = u.slice(1), b = !0)
3755
3771
  );
3756
3772
  const f = c && c > d ? c - d : void 0;
3757
3773
  return qt(s, b, g, f);
3758
3774
  };
3759
3775
  if (e) {
3760
3776
  const r = e + Ut, s = n;
3761
- n = (i) => i.startsWith(r) ? s(i.slice(r.length)) : qt(Rs, !1, i, void 0, !0);
3777
+ n = (i) => i.startsWith(r) ? s(i.slice(r.length)) : qt(Ms, !1, i, void 0, !0);
3762
3778
  }
3763
3779
  if (t) {
3764
3780
  const r = n;
@@ -3768,7 +3784,7 @@ const _s = (a, e) => {
3768
3784
  });
3769
3785
  }
3770
3786
  return n;
3771
- }, Bs = (a) => {
3787
+ }, zs = (a) => {
3772
3788
  const e = /* @__PURE__ */ new Map();
3773
3789
  return a.orderSensitiveModifiers.forEach((t, n) => {
3774
3790
  e.set(t, 1e6 + n);
@@ -3781,26 +3797,26 @@ const _s = (a, e) => {
3781
3797
  }
3782
3798
  return r.length > 0 && (r.sort(), n.push(...r)), n;
3783
3799
  };
3784
- }, zs = (a) => ({
3785
- cache: Es(a.cacheSize),
3786
- parseClassName: Ms(a),
3787
- sortModifiers: Bs(a),
3788
- postfixLookupClassGroupIds: Os(a),
3789
- ...ws(a)
3790
- }), Os = (a) => {
3800
+ }, Os = (a) => ({
3801
+ cache: Rs(a.cacheSize),
3802
+ parseClassName: Bs(a),
3803
+ sortModifiers: zs(a),
3804
+ postfixLookupClassGroupIds: Us(a),
3805
+ ...As(a)
3806
+ }), Us = (a) => {
3791
3807
  const e = /* @__PURE__ */ Object.create(null), t = a.postfixLookupClassGroups;
3792
3808
  if (t)
3793
3809
  for (let n = 0; n < t.length; n++)
3794
3810
  e[t[n]] = !0;
3795
3811
  return e;
3796
- }, Us = /\s+/, qs = (a, e) => {
3812
+ }, qs = /\s+/, $s = (a, e) => {
3797
3813
  const {
3798
3814
  parseClassName: t,
3799
3815
  getClassGroupId: n,
3800
3816
  getConflictingClassGroupIds: r,
3801
3817
  sortModifiers: s,
3802
3818
  postfixLookupClassGroupIds: i
3803
- } = e, l = [], d = a.trim().split(Us);
3819
+ } = e, l = [], d = a.trim().split(qs);
3804
3820
  let c = "";
3805
3821
  for (let m = d.length - 1; m >= 0; m -= 1) {
3806
3822
  const u = d[m], {
@@ -3833,19 +3849,19 @@ const _s = (a, e) => {
3833
3849
  }
3834
3850
  v = !1;
3835
3851
  }
3836
- const x = b.length === 0 ? "" : b.length === 1 ? b[0] : s(b).join(":"), T = f ? x + Ka : x, S = T + h;
3837
- if (l.indexOf(S) > -1)
3852
+ const A = b.length === 0 ? "" : b.length === 1 ? b[0] : s(b).join(":"), x = f ? A + Ha : A, k = x + h;
3853
+ if (l.indexOf(k) > -1)
3838
3854
  continue;
3839
- l.push(S);
3840
- const k = r(h, v);
3841
- for (let w = 0; w < k.length; ++w) {
3842
- const y = k[w];
3843
- l.push(T + y);
3855
+ l.push(k);
3856
+ const S = r(h, v);
3857
+ for (let w = 0; w < S.length; ++w) {
3858
+ const y = S[w];
3859
+ l.push(x + y);
3844
3860
  }
3845
3861
  c = u + (c.length > 0 ? " " + c : c);
3846
3862
  }
3847
3863
  return c;
3848
- }, $s = (...a) => {
3864
+ }, js = (...a) => {
3849
3865
  let e = 0, t, n, r = "";
3850
3866
  for (; e < a.length; )
3851
3867
  (t = a[e++]) && (n = An(t)) && (r && (r += " "), r += n);
@@ -3857,35 +3873,35 @@ const _s = (a, e) => {
3857
3873
  for (let n = 0; n < a.length; n++)
3858
3874
  a[n] && (e = An(a[n])) && (t && (t += " "), t += e);
3859
3875
  return t;
3860
- }, js = (a, ...e) => {
3876
+ }, Vs = (a, ...e) => {
3861
3877
  let t, n, r, s;
3862
3878
  const i = (d) => {
3863
3879
  const c = e.reduce((m, u) => u(m), a());
3864
- return t = zs(c), n = t.cache.get, r = t.cache.set, s = l, l(d);
3880
+ return t = Os(c), n = t.cache.get, r = t.cache.set, s = l, l(d);
3865
3881
  }, l = (d) => {
3866
3882
  const c = n(d);
3867
3883
  if (c)
3868
3884
  return c;
3869
- const m = qs(d, t);
3885
+ const m = $s(d, t);
3870
3886
  return r(d, m), m;
3871
3887
  };
3872
- return s = i, (...d) => s($s(...d));
3873
- }, Vs = [], he = (a) => {
3874
- const e = (t) => t[a] || Vs;
3888
+ return s = i, (...d) => s(js(...d));
3889
+ }, Ws = [], he = (a) => {
3890
+ const e = (t) => t[a] || Ws;
3875
3891
  return e.isThemeGetter = !0, e;
3876
- }, xn = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Tn = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ws = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Gs = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ks = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Hs = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ys = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Js = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Oe = (a) => Ws.test(a), W = (a) => !!a && !Number.isNaN(Number(a)), De = (a) => !!a && Number.isInteger(Number(a)), $a = (a) => a.endsWith("%") && W(a.slice(0, -1)), Me = (a) => Gs.test(a), Dn = () => !0, Qs = (a) => (
3892
+ }, xn = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Tn = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Gs = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Ks = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Hs = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ys = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Js = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Qs = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Oe = (a) => Gs.test(a), W = (a) => !!a && !Number.isNaN(Number(a)), De = (a) => !!a && Number.isInteger(Number(a)), ja = (a) => a.endsWith("%") && W(a.slice(0, -1)), Me = (a) => Ks.test(a), Dn = () => !0, Zs = (a) => (
3877
3893
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
3878
3894
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
3879
3895
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
3880
- Ks.test(a) && !Hs.test(a)
3881
- ), at = () => !1, Zs = (a) => Ys.test(a), Xs = (a) => Js.test(a), eo = (a) => !F(a) && !L(a), ao = (a) => a.startsWith("@container") && (a[10] === "/" && a[11] !== void 0 || a[11] === "s" && a[16] !== void 0 && a.startsWith("-size/", 10) || a[11] === "n" && a[18] !== void 0 && a.startsWith("-normal/", 10)), to = (a) => je(a, Ln, at), F = (a) => xn.test(a), He = (a) => je(a, In, Qs), $t = (a) => je(a, uo, W), no = (a) => je(a, Rn, Dn), ro = (a) => je(a, En, at), jt = (a) => je(a, Pn, at), so = (a) => je(a, Fn, Xs), ya = (a) => je(a, Mn, Zs), L = (a) => Tn.test(a), pa = (a) => Ye(a, In), oo = (a) => Ye(a, En), Vt = (a) => Ye(a, Pn), io = (a) => Ye(a, Ln), lo = (a) => Ye(a, Fn), va = (a) => Ye(a, Mn, !0), co = (a) => Ye(a, Rn, !0), je = (a, e, t) => {
3896
+ Hs.test(a) && !Ys.test(a)
3897
+ ), at = () => !1, Xs = (a) => Js.test(a), eo = (a) => Qs.test(a), ao = (a) => !F(a) && !L(a), to = (a) => a.startsWith("@container") && (a[10] === "/" && a[11] !== void 0 || a[11] === "s" && a[16] !== void 0 && a.startsWith("-size/", 10) || a[11] === "n" && a[18] !== void 0 && a.startsWith("-normal/", 10)), no = (a) => je(a, Ln, at), F = (a) => xn.test(a), He = (a) => je(a, In, Zs), $t = (a) => je(a, po, W), ro = (a) => je(a, Rn, Dn), so = (a) => je(a, En, at), jt = (a) => je(a, Pn, at), oo = (a) => je(a, Fn, eo), va = (a) => je(a, Mn, Xs), L = (a) => Tn.test(a), pa = (a) => Ye(a, In), io = (a) => Ye(a, En), Vt = (a) => Ye(a, Pn), lo = (a) => Ye(a, Ln), co = (a) => Ye(a, Fn), Ca = (a) => Ye(a, Mn, !0), uo = (a) => Ye(a, Rn, !0), je = (a, e, t) => {
3882
3898
  const n = xn.exec(a);
3883
3899
  return n ? n[1] ? e(n[1]) : t(n[2]) : !1;
3884
3900
  }, Ye = (a, e, t = !1) => {
3885
3901
  const n = Tn.exec(a);
3886
3902
  return n ? n[1] ? e(n[1]) : t : !1;
3887
- }, Pn = (a) => a === "position" || a === "percentage", Fn = (a) => a === "image" || a === "url", Ln = (a) => a === "length" || a === "size" || a === "bg-size", In = (a) => a === "length", uo = (a) => a === "number", En = (a) => a === "family-name", Rn = (a) => a === "number" || a === "weight", Mn = (a) => a === "shadow", po = () => {
3888
- const a = he("color"), e = he("font"), t = he("text"), n = he("font-weight"), r = he("tracking"), s = he("leading"), i = he("breakpoint"), l = he("container"), d = he("spacing"), c = he("radius"), m = he("shadow"), u = he("inset-shadow"), g = he("text-shadow"), b = he("drop-shadow"), f = he("blur"), C = he("perspective"), N = he("aspect"), v = he("ease"), h = he("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], T = () => [
3903
+ }, Pn = (a) => a === "position" || a === "percentage", Fn = (a) => a === "image" || a === "url", Ln = (a) => a === "length" || a === "size" || a === "bg-size", In = (a) => a === "length", po = (a) => a === "number", En = (a) => a === "family-name", Rn = (a) => a === "number" || a === "weight", Mn = (a) => a === "shadow", mo = () => {
3904
+ const a = he("color"), e = he("font"), t = he("text"), n = he("font-weight"), r = he("tracking"), s = he("leading"), i = he("breakpoint"), l = he("container"), d = he("spacing"), c = he("radius"), m = he("shadow"), u = he("inset-shadow"), g = he("text-shadow"), b = he("drop-shadow"), f = he("blur"), C = he("perspective"), N = he("aspect"), v = he("ease"), h = he("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
3889
3905
  "center",
3890
3906
  "top",
3891
3907
  "bottom",
@@ -3903,15 +3919,15 @@ const _s = (a, e) => {
3903
3919
  "bottom-left",
3904
3920
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
3905
3921
  "left-bottom"
3906
- ], S = () => [...T(), L, F], k = () => ["auto", "hidden", "clip", "visible", "scroll"], w = () => ["auto", "contain", "none"], y = () => [L, F, d], P = () => [Oe, "full", "auto", ...y()], A = () => [De, "none", "subgrid", L, F], I = () => ["auto", {
3922
+ ], k = () => [...x(), L, F], S = () => ["auto", "hidden", "clip", "visible", "scroll"], w = () => ["auto", "contain", "none"], y = () => [L, F, d], D = () => [Oe, "full", "auto", ...y()], T = () => [De, "none", "subgrid", L, F], I = () => ["auto", {
3907
3923
  span: ["full", De, L, F]
3908
- }, De, L, F], R = () => [De, "auto", L, F], E = () => ["auto", "min", "max", "fr", L, F], J = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], M = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], B = () => ["auto", ...y()], Q = () => [Oe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], z = () => [Oe, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...y()], H = () => [Oe, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...y()], _ = () => [a, L, F], ne = () => [...T(), Vt, jt, {
3924
+ }, De, L, F], R = () => [De, "auto", L, F], E = () => ["auto", "min", "max", "fr", L, F], J = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], M = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], B = () => ["auto", ...y()], Q = () => [Oe, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...y()], z = () => [Oe, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...y()], H = () => [Oe, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...y()], _ = () => [a, L, F], ne = () => [...x(), Vt, jt, {
3909
3925
  position: [L, F]
3910
- }], D = () => ["no-repeat", {
3926
+ }], P = () => ["no-repeat", {
3911
3927
  repeat: ["", "x", "y", "space", "round"]
3912
- }], $ = () => ["auto", "cover", "contain", io, to, {
3928
+ }], $ = () => ["auto", "cover", "contain", lo, no, {
3913
3929
  size: [L, F]
3914
- }], V = () => [$a, pa, He], O = () => [
3930
+ }], V = () => [ja, pa, He], U = () => [
3915
3931
  // Deprecated since Tailwind CSS v4.0.0
3916
3932
  "",
3917
3933
  "none",
@@ -3919,7 +3935,7 @@ const _s = (a, e) => {
3919
3935
  c,
3920
3936
  L,
3921
3937
  F
3922
- ], j = () => ["", W, pa, He], le = () => ["solid", "dashed", "dotted", "double"], ie = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => [W, $a, Vt, jt], ge = () => [
3938
+ ], j = () => ["", W, pa, He], le = () => ["solid", "dashed", "dotted", "double"], ie = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Z = () => [W, ja, Vt, jt], ge = () => [
3923
3939
  // Deprecated since Tailwind CSS v4.0.0
3924
3940
  "",
3925
3941
  "none",
@@ -3938,7 +3954,7 @@ const _s = (a, e) => {
3938
3954
  container: [Me],
3939
3955
  "drop-shadow": [Me],
3940
3956
  ease: ["in", "out", "in-out"],
3941
- font: [eo],
3957
+ font: [ao],
3942
3958
  "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
3943
3959
  "inset-shadow": [Me],
3944
3960
  leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
@@ -3978,7 +3994,7 @@ const _s = (a, e) => {
3978
3994
  * Container Name
3979
3995
  * @see https://tailwindcss.com/docs/responsive-design#named-containers
3980
3996
  */
3981
- "container-named": [ao],
3997
+ "container-named": [to],
3982
3998
  /**
3983
3999
  * Columns
3984
4000
  * @see https://tailwindcss.com/docs/columns
@@ -3991,14 +4007,14 @@ const _s = (a, e) => {
3991
4007
  * @see https://tailwindcss.com/docs/break-after
3992
4008
  */
3993
4009
  "break-after": [{
3994
- "break-after": x()
4010
+ "break-after": A()
3995
4011
  }],
3996
4012
  /**
3997
4013
  * Break Before
3998
4014
  * @see https://tailwindcss.com/docs/break-before
3999
4015
  */
4000
4016
  "break-before": [{
4001
- "break-before": x()
4017
+ "break-before": A()
4002
4018
  }],
4003
4019
  /**
4004
4020
  * Break Inside
@@ -4062,28 +4078,28 @@ const _s = (a, e) => {
4062
4078
  * @see https://tailwindcss.com/docs/object-position
4063
4079
  */
4064
4080
  "object-position": [{
4065
- object: S()
4081
+ object: k()
4066
4082
  }],
4067
4083
  /**
4068
4084
  * Overflow
4069
4085
  * @see https://tailwindcss.com/docs/overflow
4070
4086
  */
4071
4087
  overflow: [{
4072
- overflow: k()
4088
+ overflow: S()
4073
4089
  }],
4074
4090
  /**
4075
4091
  * Overflow X
4076
4092
  * @see https://tailwindcss.com/docs/overflow
4077
4093
  */
4078
4094
  "overflow-x": [{
4079
- "overflow-x": k()
4095
+ "overflow-x": S()
4080
4096
  }],
4081
4097
  /**
4082
4098
  * Overflow Y
4083
4099
  * @see https://tailwindcss.com/docs/overflow
4084
4100
  */
4085
4101
  "overflow-y": [{
4086
- "overflow-y": k()
4102
+ "overflow-y": S()
4087
4103
  }],
4088
4104
  /**
4089
4105
  * Overscroll Behavior
@@ -4116,21 +4132,21 @@ const _s = (a, e) => {
4116
4132
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4117
4133
  */
4118
4134
  inset: [{
4119
- inset: P()
4135
+ inset: D()
4120
4136
  }],
4121
4137
  /**
4122
4138
  * Inset Inline
4123
4139
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4124
4140
  */
4125
4141
  "inset-x": [{
4126
- "inset-x": P()
4142
+ "inset-x": D()
4127
4143
  }],
4128
4144
  /**
4129
4145
  * Inset Block
4130
4146
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4131
4147
  */
4132
4148
  "inset-y": [{
4133
- "inset-y": P()
4149
+ "inset-y": D()
4134
4150
  }],
4135
4151
  /**
4136
4152
  * Inset Inline Start
@@ -4138,12 +4154,12 @@ const _s = (a, e) => {
4138
4154
  * @todo class group will be renamed to `inset-s` in next major release
4139
4155
  */
4140
4156
  start: [{
4141
- "inset-s": P(),
4157
+ "inset-s": D(),
4142
4158
  /**
4143
4159
  * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
4144
4160
  * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
4145
4161
  */
4146
- start: P()
4162
+ start: D()
4147
4163
  }],
4148
4164
  /**
4149
4165
  * Inset Inline End
@@ -4151,54 +4167,54 @@ const _s = (a, e) => {
4151
4167
  * @todo class group will be renamed to `inset-e` in next major release
4152
4168
  */
4153
4169
  end: [{
4154
- "inset-e": P(),
4170
+ "inset-e": D(),
4155
4171
  /**
4156
4172
  * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
4157
4173
  * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
4158
4174
  */
4159
- end: P()
4175
+ end: D()
4160
4176
  }],
4161
4177
  /**
4162
4178
  * Inset Block Start
4163
4179
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4164
4180
  */
4165
4181
  "inset-bs": [{
4166
- "inset-bs": P()
4182
+ "inset-bs": D()
4167
4183
  }],
4168
4184
  /**
4169
4185
  * Inset Block End
4170
4186
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4171
4187
  */
4172
4188
  "inset-be": [{
4173
- "inset-be": P()
4189
+ "inset-be": D()
4174
4190
  }],
4175
4191
  /**
4176
4192
  * Top
4177
4193
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4178
4194
  */
4179
4195
  top: [{
4180
- top: P()
4196
+ top: D()
4181
4197
  }],
4182
4198
  /**
4183
4199
  * Right
4184
4200
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4185
4201
  */
4186
4202
  right: [{
4187
- right: P()
4203
+ right: D()
4188
4204
  }],
4189
4205
  /**
4190
4206
  * Bottom
4191
4207
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4192
4208
  */
4193
4209
  bottom: [{
4194
- bottom: P()
4210
+ bottom: D()
4195
4211
  }],
4196
4212
  /**
4197
4213
  * Left
4198
4214
  * @see https://tailwindcss.com/docs/top-right-bottom-left
4199
4215
  */
4200
4216
  left: [{
4201
- left: P()
4217
+ left: D()
4202
4218
  }],
4203
4219
  /**
4204
4220
  * Visibility
@@ -4269,7 +4285,7 @@ const _s = (a, e) => {
4269
4285
  * @see https://tailwindcss.com/docs/grid-template-columns
4270
4286
  */
4271
4287
  "grid-cols": [{
4272
- "grid-cols": A()
4288
+ "grid-cols": T()
4273
4289
  }],
4274
4290
  /**
4275
4291
  * Grid Column Start / End
@@ -4297,7 +4313,7 @@ const _s = (a, e) => {
4297
4313
  * @see https://tailwindcss.com/docs/grid-template-rows
4298
4314
  */
4299
4315
  "grid-rows": [{
4300
- "grid-rows": A()
4316
+ "grid-rows": T()
4301
4317
  }],
4302
4318
  /**
4303
4319
  * Grid Row Start / End
@@ -4744,21 +4760,21 @@ const _s = (a, e) => {
4744
4760
  * @see https://tailwindcss.com/docs/font-weight
4745
4761
  */
4746
4762
  "font-weight": [{
4747
- font: [n, co, no]
4763
+ font: [n, uo, ro]
4748
4764
  }],
4749
4765
  /**
4750
4766
  * Font Stretch
4751
4767
  * @see https://tailwindcss.com/docs/font-stretch
4752
4768
  */
4753
4769
  "font-stretch": [{
4754
- "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", $a, F]
4770
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", ja, F]
4755
4771
  }],
4756
4772
  /**
4757
4773
  * Font Family
4758
4774
  * @see https://tailwindcss.com/docs/font-family
4759
4775
  */
4760
4776
  "font-family": [{
4761
- font: [oo, ro, e]
4777
+ font: [io, so, e]
4762
4778
  }],
4763
4779
  /**
4764
4780
  * Font Feature Settings
@@ -5007,7 +5023,7 @@ const _s = (a, e) => {
5007
5023
  * @see https://tailwindcss.com/docs/background-repeat
5008
5024
  */
5009
5025
  "bg-repeat": [{
5010
- bg: D()
5026
+ bg: P()
5011
5027
  }],
5012
5028
  /**
5013
5029
  * Background Size
@@ -5027,7 +5043,7 @@ const _s = (a, e) => {
5027
5043
  }, De, L, F],
5028
5044
  radial: ["", L, F],
5029
5045
  conic: [De, L, F]
5030
- }, lo, so]
5046
+ }, co, oo]
5031
5047
  }],
5032
5048
  /**
5033
5049
  * Background Color
@@ -5086,105 +5102,105 @@ const _s = (a, e) => {
5086
5102
  * @see https://tailwindcss.com/docs/border-radius
5087
5103
  */
5088
5104
  rounded: [{
5089
- rounded: O()
5105
+ rounded: U()
5090
5106
  }],
5091
5107
  /**
5092
5108
  * Border Radius Start
5093
5109
  * @see https://tailwindcss.com/docs/border-radius
5094
5110
  */
5095
5111
  "rounded-s": [{
5096
- "rounded-s": O()
5112
+ "rounded-s": U()
5097
5113
  }],
5098
5114
  /**
5099
5115
  * Border Radius End
5100
5116
  * @see https://tailwindcss.com/docs/border-radius
5101
5117
  */
5102
5118
  "rounded-e": [{
5103
- "rounded-e": O()
5119
+ "rounded-e": U()
5104
5120
  }],
5105
5121
  /**
5106
5122
  * Border Radius Top
5107
5123
  * @see https://tailwindcss.com/docs/border-radius
5108
5124
  */
5109
5125
  "rounded-t": [{
5110
- "rounded-t": O()
5126
+ "rounded-t": U()
5111
5127
  }],
5112
5128
  /**
5113
5129
  * Border Radius Right
5114
5130
  * @see https://tailwindcss.com/docs/border-radius
5115
5131
  */
5116
5132
  "rounded-r": [{
5117
- "rounded-r": O()
5133
+ "rounded-r": U()
5118
5134
  }],
5119
5135
  /**
5120
5136
  * Border Radius Bottom
5121
5137
  * @see https://tailwindcss.com/docs/border-radius
5122
5138
  */
5123
5139
  "rounded-b": [{
5124
- "rounded-b": O()
5140
+ "rounded-b": U()
5125
5141
  }],
5126
5142
  /**
5127
5143
  * Border Radius Left
5128
5144
  * @see https://tailwindcss.com/docs/border-radius
5129
5145
  */
5130
5146
  "rounded-l": [{
5131
- "rounded-l": O()
5147
+ "rounded-l": U()
5132
5148
  }],
5133
5149
  /**
5134
5150
  * Border Radius Start Start
5135
5151
  * @see https://tailwindcss.com/docs/border-radius
5136
5152
  */
5137
5153
  "rounded-ss": [{
5138
- "rounded-ss": O()
5154
+ "rounded-ss": U()
5139
5155
  }],
5140
5156
  /**
5141
5157
  * Border Radius Start End
5142
5158
  * @see https://tailwindcss.com/docs/border-radius
5143
5159
  */
5144
5160
  "rounded-se": [{
5145
- "rounded-se": O()
5161
+ "rounded-se": U()
5146
5162
  }],
5147
5163
  /**
5148
5164
  * Border Radius End End
5149
5165
  * @see https://tailwindcss.com/docs/border-radius
5150
5166
  */
5151
5167
  "rounded-ee": [{
5152
- "rounded-ee": O()
5168
+ "rounded-ee": U()
5153
5169
  }],
5154
5170
  /**
5155
5171
  * Border Radius End Start
5156
5172
  * @see https://tailwindcss.com/docs/border-radius
5157
5173
  */
5158
5174
  "rounded-es": [{
5159
- "rounded-es": O()
5175
+ "rounded-es": U()
5160
5176
  }],
5161
5177
  /**
5162
5178
  * Border Radius Top Left
5163
5179
  * @see https://tailwindcss.com/docs/border-radius
5164
5180
  */
5165
5181
  "rounded-tl": [{
5166
- "rounded-tl": O()
5182
+ "rounded-tl": U()
5167
5183
  }],
5168
5184
  /**
5169
5185
  * Border Radius Top Right
5170
5186
  * @see https://tailwindcss.com/docs/border-radius
5171
5187
  */
5172
5188
  "rounded-tr": [{
5173
- "rounded-tr": O()
5189
+ "rounded-tr": U()
5174
5190
  }],
5175
5191
  /**
5176
5192
  * Border Radius Bottom Right
5177
5193
  * @see https://tailwindcss.com/docs/border-radius
5178
5194
  */
5179
5195
  "rounded-br": [{
5180
- "rounded-br": O()
5196
+ "rounded-br": U()
5181
5197
  }],
5182
5198
  /**
5183
5199
  * Border Radius Bottom Left
5184
5200
  * @see https://tailwindcss.com/docs/border-radius
5185
5201
  */
5186
5202
  "rounded-bl": [{
5187
- "rounded-bl": O()
5203
+ "rounded-bl": U()
5188
5204
  }],
5189
5205
  /**
5190
5206
  * Border Width
@@ -5426,8 +5442,8 @@ const _s = (a, e) => {
5426
5442
  "",
5427
5443
  "none",
5428
5444
  m,
5429
- va,
5430
- ya
5445
+ Ca,
5446
+ va
5431
5447
  ]
5432
5448
  }],
5433
5449
  /**
@@ -5442,7 +5458,7 @@ const _s = (a, e) => {
5442
5458
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
5443
5459
  */
5444
5460
  "inset-shadow": [{
5445
- "inset-shadow": ["none", u, va, ya]
5461
+ "inset-shadow": ["none", u, Ca, va]
5446
5462
  }],
5447
5463
  /**
5448
5464
  * Inset Box Shadow Color
@@ -5509,7 +5525,7 @@ const _s = (a, e) => {
5509
5525
  * @see https://tailwindcss.com/docs/text-shadow
5510
5526
  */
5511
5527
  "text-shadow": [{
5512
- "text-shadow": ["none", g, va, ya]
5528
+ "text-shadow": ["none", g, Ca, va]
5513
5529
  }],
5514
5530
  /**
5515
5531
  * Text Shadow Color
@@ -5669,7 +5685,7 @@ const _s = (a, e) => {
5669
5685
  }]
5670
5686
  }],
5671
5687
  "mask-image-radial-pos": [{
5672
- "mask-radial-at": T()
5688
+ "mask-radial-at": x()
5673
5689
  }],
5674
5690
  "mask-image-conic-pos": [{
5675
5691
  "mask-conic": [W]
@@ -5712,7 +5728,7 @@ const _s = (a, e) => {
5712
5728
  * @see https://tailwindcss.com/docs/mask-repeat
5713
5729
  */
5714
5730
  "mask-repeat": [{
5715
- mask: D()
5731
+ mask: P()
5716
5732
  }],
5717
5733
  /**
5718
5734
  * Mask Size
@@ -5782,8 +5798,8 @@ const _s = (a, e) => {
5782
5798
  "",
5783
5799
  "none",
5784
5800
  b,
5785
- va,
5786
- ya
5801
+ Ca,
5802
+ va
5787
5803
  ]
5788
5804
  }],
5789
5805
  /**
@@ -6016,7 +6032,7 @@ const _s = (a, e) => {
6016
6032
  * @see https://tailwindcss.com/docs/perspective-origin
6017
6033
  */
6018
6034
  "perspective-origin": [{
6019
- "perspective-origin": S()
6035
+ "perspective-origin": k()
6020
6036
  }],
6021
6037
  /**
6022
6038
  * Rotate
@@ -6112,7 +6128,7 @@ const _s = (a, e) => {
6112
6128
  * @see https://tailwindcss.com/docs/transform-origin
6113
6129
  */
6114
6130
  "transform-origin": [{
6115
- origin: S()
6131
+ origin: k()
6116
6132
  }],
6117
6133
  /**
6118
6134
  * Transform Style
@@ -6569,9 +6585,9 @@ const _s = (a, e) => {
6569
6585
  postfixLookupClassGroups: ["container-type"],
6570
6586
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
6571
6587
  };
6572
- }, mo = /* @__PURE__ */ js(po);
6573
- function U(...a) {
6574
- return mo(Ns(a));
6588
+ }, go = /* @__PURE__ */ Vs(mo);
6589
+ function O(...a) {
6590
+ return go(_s(a));
6575
6591
  }
6576
6592
  function ee(a, e = "usd", t = 2, n = "en-US") {
6577
6593
  return new Intl.NumberFormat(n, {
@@ -6584,7 +6600,7 @@ function ee(a, e = "usd", t = 2, n = "en-US") {
6584
6600
  function $e(a, e = "en-US") {
6585
6601
  return new Date(a).toLocaleDateString(e, { month: "short", day: "numeric", year: "numeric" });
6586
6602
  }
6587
- function go(a, e) {
6603
+ function ho(a, e) {
6588
6604
  const t = new Date(a);
6589
6605
  return t.setDate(t.getDate() + e), t.toISOString();
6590
6606
  }
@@ -6603,10 +6619,10 @@ function ra(a) {
6603
6619
  function se(a) {
6604
6620
  return a.replace("Plan - ", "");
6605
6621
  }
6606
- function Na(a) {
6622
+ function _a(a) {
6607
6623
  return { usd: "$", eur: "€", gbp: "£", cad: "$", aud: "$", jpy: "¥" }[a.toLowerCase()] ?? `${a.toUpperCase()} `;
6608
6624
  }
6609
- const na = ["community", "plus", "team", "enterprise", "managed"], ho = ["community", "plus", "team", "enterprise", "managed"];
6625
+ const na = ["community", "plus", "team", "enterprise", "managed"], bo = ["community", "plus", "team", "enterprise", "managed"];
6610
6626
  function ue(a) {
6611
6627
  var n;
6612
6628
  const e = a.name.toLowerCase();
@@ -6621,7 +6637,7 @@ function ue(a) {
6621
6637
  if (e.includes("enterprise"))
6622
6638
  return "enterprise";
6623
6639
  const t = (n = a.metadata) == null ? void 0 : n.legacyName;
6624
- return ho.find((r) => r === t) ?? "community";
6640
+ return bo.find((r) => r === t) ?? "community";
6625
6641
  }
6626
6642
  const Bn = "https://botpress.com/contact-us/managed-plan", Ue = {
6627
6643
  conversation_sessions_addon: "addonNameConversationSessions",
@@ -6633,10 +6649,10 @@ const Bn = "https://botpress.com/contact-us/managed-plan", Ue = {
6633
6649
  function tt(a, e, t) {
6634
6650
  return a.prices[e.id] ?? a.prices[ue(e)] ?? a.prices[t] ?? null;
6635
6651
  }
6636
- function _a(a) {
6652
+ function Sa(a) {
6637
6653
  return a.replace("Add-on - ", "");
6638
6654
  }
6639
- function bo(a) {
6655
+ function fo(a) {
6640
6656
  return (a == null ? void 0 : a.find((e) => {
6641
6657
  var t;
6642
6658
  return (((t = e.increments) == null ? void 0 : t.conversation_sessions) ?? 0) > 0;
@@ -6648,7 +6664,7 @@ const zn = [
6648
6664
  { key: "vector_db_storage", label: "Vector DB storage", unit: "bytes" },
6649
6665
  { key: "file_storage", label: "File storage", unit: "bytes" }
6650
6666
  ];
6651
- function fo(a, e, t) {
6667
+ function yo(a, e, t) {
6652
6668
  var r;
6653
6669
  if (!e)
6654
6670
  return [];
@@ -6664,7 +6680,7 @@ function fo(a, e, t) {
6664
6680
  }
6665
6681
  return n;
6666
6682
  }
6667
- function yo(a, e, t) {
6683
+ function vo(a, e, t) {
6668
6684
  var r;
6669
6685
  if (!a)
6670
6686
  return [];
@@ -6680,7 +6696,7 @@ function yo(a, e, t) {
6680
6696
  }
6681
6697
  function nt(a, e, t) {
6682
6698
  var i;
6683
- const n = bo(a);
6699
+ const n = fo(a);
6684
6700
  if (!n)
6685
6701
  return null;
6686
6702
  const r = ((i = n.increments) == null ? void 0 : i.conversation_sessions) ?? 0, s = tt(n, e, t);
@@ -6721,7 +6737,7 @@ const On = {
6721
6737
  "Dedicated support": { label: "planFeatureDedicatedSupport", desc: "planFeatureDescDedicatedSupport" },
6722
6738
  "SLA & security review": { label: "planFeatureSlaSecurity", desc: "planFeatureDescSlaSecurity" },
6723
6739
  "Custom storage": { label: "planFeatureCustomStorage", desc: "planFeatureDescCustomStorage" }
6724
- }, vo = {
6740
+ }, Co = {
6725
6741
  community: "planDescriptionCommunity",
6726
6742
  plus: "planDescriptionPlus",
6727
6743
  team: "planDescriptionTeam",
@@ -6760,7 +6776,7 @@ const On = {
6760
6776
  ],
6761
6777
  enterprise: ["Voice channel", "Dedicated support", "SLA & security review", "Custom storage"],
6762
6778
  managed: []
6763
- }, st = ({ variant: a = "accent", children: e, className: t }) => /* @__PURE__ */ o("span", { className: U("bpb-badge", `bpb-badge--${a}`, t), children: e }), be = ({
6779
+ }, st = ({ variant: a = "accent", children: e, className: t }) => /* @__PURE__ */ o("span", { className: O("bpb-badge", `bpb-badge--${a}`, t), children: e }), be = ({
6764
6780
  variant: a = "primary",
6765
6781
  size: e = "md",
6766
6782
  block: t = !1,
@@ -6774,7 +6790,7 @@ const On = {
6774
6790
  "button",
6775
6791
  {
6776
6792
  type: l,
6777
- className: U("bpb-btn", `bpb-btn--${a}`, `bpb-btn--${e}`, t && "bpb-btn--block", r),
6793
+ className: O("bpb-btn", `bpb-btn--${a}`, `bpb-btn--${e}`, t && "bpb-btn--block", r),
6778
6794
  disabled: s || n,
6779
6795
  "data-loading": n || void 0,
6780
6796
  ...d,
@@ -6791,7 +6807,7 @@ const On = {
6791
6807
  xmlns: "http://www.w3.org/2000/svg",
6792
6808
  "aria-hidden": !0,
6793
6809
  ...e
6794
- }), Co = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6810
+ }), No = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6795
6811
  "path",
6796
6812
  {
6797
6813
  d: "M3 8.5l3.5 3.5L13 4.5",
@@ -6811,7 +6827,7 @@ const On = {
6811
6827
  }
6812
6828
  ),
6813
6829
  /* @__PURE__ */ o("path", { d: "M12.8 11l.5 1.2 1.2.5-1.2.5-.5 1.3-.5-1.3-1.2-.5 1.2-.5.5-1.2z", fill: "currentColor" })
6814
- ] }), No = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6830
+ ] }), _o = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6815
6831
  "path",
6816
6832
  {
6817
6833
  d: "M2.5 8a5.5 5.5 0 115.5 5.5c-.9 0-1.8-.2-2.5-.6L2.5 13.5l.6-3A5.5 5.5 0 012.5 8z",
@@ -6839,7 +6855,7 @@ const On = {
6839
6855
  strokeLinejoin: "round"
6840
6856
  }
6841
6857
  )
6842
- ] }), _o = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6858
+ ] }), So = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6843
6859
  "path",
6844
6860
  {
6845
6861
  d: "M6 2.5h3v1.6a1.4 1.4 0 102.8 0V2.5h1.7v3h-1.6a1.4 1.4 0 100 2.8h1.6v3h-3v1.6a1.4 1.4 0 11-2.8 0v-1.6h-3v-3h1.6a1.4 1.4 0 100-2.8H2.5v-3H6z",
@@ -6850,14 +6866,14 @@ const On = {
6850
6866
  ) }), ot = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6851
6867
  /* @__PURE__ */ o("path", { d: "M8 2l6 3-6 3-6-3 6-3z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }),
6852
6868
  /* @__PURE__ */ o("path", { d: "M2 8l6 3 6-3M2 11l6 3 6-3", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
6853
- ] }), So = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6869
+ ] }), ko = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6854
6870
  "path",
6855
6871
  {
6856
6872
  d: "M8 8c-1.2-1.6-2-2.4-3.3-2.4a2.4 2.4 0 100 4.8C6 10.4 6.8 9.6 8 8zm0 0c1.2 1.6 2 2.4 3.3 2.4a2.4 2.4 0 100-4.8C10 5.6 9.2 6.4 8 8z",
6857
6873
  stroke: "currentColor",
6858
6874
  strokeWidth: "1.3"
6859
6875
  }
6860
- ) }), it = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M8.5 1.5L3 9h4l-.5 5.5L12 7H8l.5-5.5z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }) }), ko = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6876
+ ) }), it = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M8.5 1.5L3 9h4l-.5 5.5L12 7H8l.5-5.5z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }) }), wo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6861
6877
  /* @__PURE__ */ o("circle", { cx: "6", cy: "5.5", r: "2.2", stroke: "currentColor", strokeWidth: "1.3" }),
6862
6878
  /* @__PURE__ */ o("path", { d: "M2 13c0-2.2 1.8-3.6 4-3.6s4 1.4 4 3.6", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" }),
6863
6879
  /* @__PURE__ */ o(
@@ -6869,7 +6885,7 @@ const On = {
6869
6885
  strokeLinecap: "round"
6870
6886
  }
6871
6887
  )
6872
- ] }), wo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6888
+ ] }), Ao = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6873
6889
  /* @__PURE__ */ o("path", { d: "M2.5 2.5v11h11", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }),
6874
6890
  /* @__PURE__ */ o(
6875
6891
  "path",
@@ -6881,7 +6897,7 @@ const On = {
6881
6897
  strokeLinejoin: "round"
6882
6898
  }
6883
6899
  )
6884
- ] }), Ao = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6900
+ ] }), xo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6885
6901
  /* @__PURE__ */ o("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.3" }),
6886
6902
  /* @__PURE__ */ o(
6887
6903
  "path",
@@ -6891,13 +6907,13 @@ const On = {
6891
6907
  strokeWidth: "1.3"
6892
6908
  }
6893
6909
  )
6894
- ] }), xo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6910
+ ] }), To = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6895
6911
  /* @__PURE__ */ o("path", { d: "M2.5 11.5L9 5l2 2-6.5 6.5H2.5v-2z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" }),
6896
6912
  /* @__PURE__ */ o("path", { d: "M9 5l1.8-1.8a1.4 1.4 0 012 2L11 7", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
6897
6913
  ] }), Kt = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6898
6914
  /* @__PURE__ */ o("rect", { x: "1.8", y: "3.5", width: "12.4", height: "9", rx: "1.6", stroke: "currentColor", strokeWidth: "1.3" }),
6899
6915
  /* @__PURE__ */ o("path", { d: "M1.8 6.4h12.4", stroke: "currentColor", strokeWidth: "1.3" })
6900
- ] }), hi = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6916
+ ] }), bi = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6901
6917
  "path",
6902
6918
  {
6903
6919
  d: "M2 6l6-3.5L14 6v1H2V6zM3 7v5M6.3 7v5M9.7 7v5M13 7v5M2 12.5h12",
@@ -6905,7 +6921,7 @@ const On = {
6905
6921
  strokeWidth: "1.2",
6906
6922
  strokeLinejoin: "round"
6907
6923
  }
6908
- ) }), bi = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6924
+ ) }), fi = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6909
6925
  /* @__PURE__ */ o("rect", { x: "3.5", y: "7", width: "9", height: "6.5", rx: "1.4", stroke: "currentColor", strokeWidth: "1.3" }),
6910
6926
  /* @__PURE__ */ o("path", { d: "M5.5 7V5.5a2.5 2.5 0 015 0V7", stroke: "currentColor", strokeWidth: "1.3" })
6911
6927
  ] }), lt = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), ct = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M4 6.5L8 10.5l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), qn = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
@@ -6926,7 +6942,7 @@ const On = {
6926
6942
  strokeLinecap: "round",
6927
6943
  strokeLinejoin: "round"
6928
6944
  }
6929
- ) }), To = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), Do = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M8 3.5v9M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), $n = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6945
+ ) }), Do = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), Po = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o("path", { d: "M8 3.5v9M3.5 8h9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), $n = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6930
6946
  /* @__PURE__ */ o(
6931
6947
  "path",
6932
6948
  {
@@ -6938,7 +6954,7 @@ const On = {
6938
6954
  ),
6939
6955
  /* @__PURE__ */ o("path", { d: "M8 6.3v3.1", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }),
6940
6956
  /* @__PURE__ */ o("circle", { cx: "8", cy: "11.6", r: "0.85", fill: "currentColor" })
6941
- ] }), Ma = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6957
+ ] }), Ba = ({ size: a, ...e }) => /* @__PURE__ */ o("svg", { ...te(a, e), children: /* @__PURE__ */ o(
6942
6958
  "path",
6943
6959
  {
6944
6960
  d: "M9 3.5h3.5V7M12 4L7 9M11 9.5v2a1 1 0 01-1 1H4.5a1 1 0 01-1-1V6a1 1 0 011-1h2",
@@ -6947,7 +6963,7 @@ const On = {
6947
6963
  strokeLinecap: "round",
6948
6964
  strokeLinejoin: "round"
6949
6965
  }
6950
- ) }), Po = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6966
+ ) }), Fo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6951
6967
  /* @__PURE__ */ o("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.3" }),
6952
6968
  /* @__PURE__ */ o(
6953
6969
  "path",
@@ -6977,7 +6993,7 @@ const On = {
6977
6993
  strokeLinecap: "round",
6978
6994
  strokeLinejoin: "round"
6979
6995
  }
6980
- ) }), fi = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6996
+ ) }), yi = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6981
6997
  /* @__PURE__ */ o(
6982
6998
  "path",
6983
6999
  {
@@ -6988,7 +7004,7 @@ const On = {
6988
7004
  }
6989
7005
  ),
6990
7006
  /* @__PURE__ */ o("path", { d: "M6.2 5.5h3.6M6.2 8h3.6", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
6991
- ] }), Fo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
7007
+ ] }), Lo = ({ size: a, ...e }) => /* @__PURE__ */ p("svg", { ...te(a, e), children: [
6992
7008
  /* @__PURE__ */ o("rect", { x: "2.5", y: "3.5", width: "11", height: "10", rx: "1.5", stroke: "currentColor", strokeWidth: "1.3" }),
6993
7009
  /* @__PURE__ */ o("path", { d: "M2.5 6.5h11M5.5 2v2.5M10.5 2v2.5", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
6994
7010
  ] }), jn = ({ brand: a }) => {
@@ -7017,7 +7033,7 @@ const On = {
7017
7033
  };
7018
7034
  function ut(a) {
7019
7035
  const e = a.toLowerCase();
7020
- return /seat|member|user|team|rbac|rout/.test(e) ? ko : /analytic|report|insight|dashboard/.test(e) ? wo : /whatsapp|channel|chat|message|conversation|webchat|voice/.test(e) ? No : /storage|table|vector|file|gb|rows|db/.test(e) ? ot : /domain|help center|whitelabel|website|url|web/.test(e) ? Ao : /brand|theme|custom|white-?label/.test(e) ? xo : /unlimited|infinit/.test(e) ? So : /security|sla|compliance|soc|audit/.test(e) || /support|sla|dedicated|priority/.test(e) ? Gt : /integration|api|plugin|sdk|adk|studio/.test(e) ? _o : /ai|agent|model|gpt|llm/.test(e) ? it : Un;
7036
+ return /seat|member|user|team|rbac|rout/.test(e) ? wo : /analytic|report|insight|dashboard/.test(e) ? Ao : /whatsapp|channel|chat|message|conversation|webchat|voice/.test(e) ? _o : /storage|table|vector|file|gb|rows|db/.test(e) ? ot : /domain|help center|whitelabel|website|url|web/.test(e) ? xo : /brand|theme|custom|white-?label/.test(e) ? To : /unlimited|infinit/.test(e) ? ko : /security|sla|compliance|soc|audit/.test(e) || /support|sla|dedicated|priority/.test(e) ? Gt : /integration|api|plugin|sdk|adk|studio/.test(e) ? So : /ai|agent|model|gpt|llm/.test(e) ? it : Un;
7021
7037
  }
7022
7038
  const xe = ({
7023
7039
  open: a,
@@ -7028,39 +7044,48 @@ const xe = ({
7028
7044
  showClose: s = !0,
7029
7045
  ...i
7030
7046
  }) => {
7031
- const l = Ea(null), d = bs(), c = ka(() => e(!1), [e]);
7047
+ const l = Ea(null), d = bs(), c = fs(), m = wa(() => e(!1), [e]);
7032
7048
  return Ce(() => {
7033
- var g;
7049
+ var b;
7034
7050
  if (!a)
7035
7051
  return;
7036
- const m = (b) => {
7037
- b.key === "Escape" && c();
7052
+ const u = (f) => {
7053
+ f.key === "Escape" && m();
7038
7054
  };
7039
- document.addEventListener("keydown", m);
7040
- const u = document.body.style.overflow;
7041
- return document.body.style.overflow = "hidden", (g = l.current) == null || g.focus(), () => {
7042
- document.removeEventListener("keydown", m), document.body.style.overflow = u;
7055
+ document.addEventListener("keydown", u);
7056
+ const g = document.body.style.overflow;
7057
+ return document.body.style.overflow = "hidden", (b = l.current) == null || b.focus(), () => {
7058
+ document.removeEventListener("keydown", u), document.body.style.overflow = g;
7043
7059
  };
7044
- }, [a, c]), a ? mr(
7045
- /* @__PURE__ */ o("div", { className: "bpb-portal bpb-dialog__overlay", "data-bpb-theme": d ? "dark" : "light", onClick: c, children: /* @__PURE__ */ p(
7060
+ }, [a, m]), a ? mr(
7061
+ /* @__PURE__ */ o(
7046
7062
  "div",
7047
7063
  {
7048
- ref: l,
7049
- role: "dialog",
7050
- "aria-modal": "true",
7051
- "aria-label": i["aria-label"],
7052
- tabIndex: -1,
7053
- className: U("bpb-dialog", `bpb-dialog--${t}`, r),
7054
- onClick: (m) => m.stopPropagation(),
7055
- children: [
7056
- s && /* @__PURE__ */ o("button", { type: "button", className: "bpb-dialog__close", "aria-label": "Close", onClick: c, children: /* @__PURE__ */ o(lt, { size: 18 }) }),
7057
- n
7058
- ]
7064
+ className: "bpb-portal bpb-dialog__overlay",
7065
+ "data-bpb-theme": d ? "dark" : "light",
7066
+ "data-bpb-color-scheme": c,
7067
+ onClick: m,
7068
+ children: /* @__PURE__ */ p(
7069
+ "div",
7070
+ {
7071
+ ref: l,
7072
+ role: "dialog",
7073
+ "aria-modal": "true",
7074
+ "aria-label": i["aria-label"],
7075
+ tabIndex: -1,
7076
+ className: O("bpb-dialog", `bpb-dialog--${t}`, r),
7077
+ onClick: (u) => u.stopPropagation(),
7078
+ children: [
7079
+ s && /* @__PURE__ */ o("button", { type: "button", className: "bpb-dialog__close", "aria-label": "Close", onClick: m, children: /* @__PURE__ */ o(lt, { size: 18 }) }),
7080
+ n
7081
+ ]
7082
+ }
7083
+ )
7059
7084
  }
7060
- ) }),
7085
+ ),
7061
7086
  document.body
7062
7087
  ) : null;
7063
- }, La = ({ label: a, children: e }) => /* @__PURE__ */ p("span", { className: "bpb-tooltip", tabIndex: 0, role: "note", children: [
7088
+ }, Ia = ({ label: a, children: e }) => /* @__PURE__ */ p("span", { className: "bpb-tooltip", tabIndex: 0, role: "note", children: [
7064
7089
  /* @__PURE__ */ o("span", { className: "bpb-tooltip__term", children: a }),
7065
7090
  /* @__PURE__ */ o("span", { className: "bpb-tooltip__bubble", role: "tooltip", children: e })
7066
7091
  ] }), ca = () => {
@@ -7070,16 +7095,16 @@ const xe = ({
7070
7095
  /* @__PURE__ */ o("p", { className: "bpb-outdated__text", children: e("outdatedText") }),
7071
7096
  a && /* @__PURE__ */ p(be, { variant: "primary", onClick: () => window.open(a, "_blank", "noopener"), children: [
7072
7097
  e("outdatedCta"),
7073
- /* @__PURE__ */ o(Ma, { size: 15 })
7098
+ /* @__PURE__ */ o(Ba, { size: 15 })
7074
7099
  ] })
7075
7100
  ] });
7076
- }, Lo = ({
7101
+ }, Io = ({
7077
7102
  options: a,
7078
7103
  value: e,
7079
7104
  onChange: t,
7080
7105
  className: n,
7081
7106
  ...r
7082
- }) => /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": r["aria-label"], className: U("bpb-segmented", n), children: a.map((s) => {
7107
+ }) => /* @__PURE__ */ o("div", { role: "radiogroup", "aria-label": r["aria-label"], className: O("bpb-segmented", n), children: a.map((s) => {
7083
7108
  const i = s.value === e;
7084
7109
  return /* @__PURE__ */ p(
7085
7110
  "button",
@@ -7087,7 +7112,7 @@ const xe = ({
7087
7112
  type: "button",
7088
7113
  role: "radio",
7089
7114
  "aria-checked": i,
7090
- className: U("bpb-segmented__option", i && "bpb-segmented__option--selected"),
7115
+ className: O("bpb-segmented__option", i && "bpb-segmented__option--selected"),
7091
7116
  onClick: () => t(s.value),
7092
7117
  children: [
7093
7118
  s.label,
@@ -7100,15 +7125,15 @@ const xe = ({
7100
7125
  "span",
7101
7126
  {
7102
7127
  "aria-hidden": !0,
7103
- className: U("bpb-skeleton", t && "bpb-skeleton--rounded", n),
7128
+ className: O("bpb-skeleton", t && "bpb-skeleton--rounded", n),
7104
7129
  style: { width: a ?? "100%", height: e }
7105
7130
  }
7106
7131
  );
7107
- function Io(a, e) {
7132
+ function Eo(a, e) {
7108
7133
  const t = a.prices[e];
7109
7134
  return t || ((e === "month" ? a.prices.year : a.prices.month) ?? null);
7110
7135
  }
7111
- function Eo(a, e) {
7136
+ function Ro(a, e) {
7112
7137
  var r, s;
7113
7138
  const t = (r = a.prices.month) == null ? void 0 : r.amount;
7114
7139
  if (e === "month")
@@ -7116,7 +7141,7 @@ function Eo(a, e) {
7116
7141
  const n = ((s = a.prices.year) == null ? void 0 : s.amount) ?? (t === void 0 ? void 0 : t * 12);
7117
7142
  return n === void 0 ? null : n / 12;
7118
7143
  }
7119
- function Ro(a) {
7144
+ function Mo(a) {
7120
7145
  var t, n;
7121
7146
  let e = 0;
7122
7147
  for (const r of a) {
@@ -7125,7 +7150,7 @@ function Ro(a) {
7125
7150
  }
7126
7151
  return Math.round(e * 100);
7127
7152
  }
7128
- const Mo = ({
7153
+ const Bo = ({
7129
7154
  open: a,
7130
7155
  onOpenChange: e,
7131
7156
  onSelectPlan: t,
@@ -7136,16 +7161,16 @@ const Mo = ({
7136
7161
  featureDescriptions: l
7137
7162
  }) => {
7138
7163
  var Q, z, H;
7139
- const { isOutdatedBilling: d, toast: c, analytics: m } = G(), { t: u } = oe(), [g, b] = K(r), { data: f, isLoading: C } = ze(), { data: N } = ia(), { data: v } = Fe({ enabled: a }), { data: h } = bn({ enabled: a }), x = Nn(), T = (h == null ? void 0 : h.planReadonly) ?? !1;
7164
+ const { isOutdatedBilling: d, toast: c, analytics: m } = G(), { t: u } = oe(), [g, b] = K(r), { data: f, isLoading: C } = ze(), { data: N } = ia(), { data: v } = Fe({ enabled: a }), { data: h } = bn({ enabled: a }), A = Nn(), x = (h == null ? void 0 : h.planReadonly) ?? !1;
7140
7165
  Ce(() => {
7141
7166
  a && m.capture(pe.PLAN_PICKER_VIEWED, { interval: g });
7142
7167
  }, [a, m]);
7143
- const S = (_) => {
7168
+ const k = (_) => {
7144
7169
  _ !== g && m.capture(pe.PLAN_INTERVAL_TOGGLED, { interval: _ }), b(_);
7145
- }, k = v == null ? void 0 : v.plan.current.interval, w = f == null ? void 0 : f.find((_) => _.id === (v == null ? void 0 : v.plan.current.planId)), y = v ? w ? ue(w) : "community" : void 0, P = ((Q = v == null ? void 0 : v.plan.next) == null ? void 0 : Q.planId) ?? null, A = !!P && P !== (v == null ? void 0 : v.plan.current.planId), I = T || y === "enterprise" || y === "managed", R = _e(() => f ? f.filter(
7170
+ }, S = v == null ? void 0 : v.plan.current.interval, w = f == null ? void 0 : f.find((_) => _.id === (v == null ? void 0 : v.plan.current.planId)), y = v ? w ? ue(w) : "community" : void 0, D = ((Q = v == null ? void 0 : v.plan.next) == null ? void 0 : Q.planId) ?? null, T = !!D && D !== (v == null ? void 0 : v.plan.current.planId), I = x || y === "enterprise" || y === "managed", R = _e(() => f ? f.filter(
7146
7171
  (_) => ue(_) !== "managed" && ue(_) !== "enterprise" && !s.includes(_.id)
7147
- ).sort((_, ne) => na.indexOf(ue(_)) - na.indexOf(ue(ne))) : [], [f, s]), E = _e(() => Ro(R), [R]), J = ((H = (z = f == null ? void 0 : f.find((_) => ue(_) === "enterprise")) == null ? void 0 : z.metadata) == null ? void 0 : H.contact_url) ?? Bn, M = (_) => {
7148
- x.mutate(
7172
+ ).sort((_, ne) => na.indexOf(ue(_)) - na.indexOf(ue(ne))) : [], [f, s]), E = _e(() => Mo(R), [R]), J = ((H = (z = f == null ? void 0 : f.find((_) => ue(_) === "enterprise")) == null ? void 0 : z.metadata) == null ? void 0 : H.contact_url) ?? Bn, M = (_) => {
7173
+ A.mutate(
7149
7174
  { planId: _.id, interval: g },
7150
7175
  {
7151
7176
  onSuccess: () => {
@@ -7159,7 +7184,7 @@ const Mo = ({
7159
7184
  }
7160
7185
  );
7161
7186
  }, B = () => {
7162
- v && x.mutate(
7187
+ v && A.mutate(
7163
7188
  { planId: v.plan.current.planId, interval: v.plan.current.interval },
7164
7189
  {
7165
7190
  onSuccess: () => {
@@ -7192,11 +7217,11 @@ const Mo = ({
7192
7217
  children: /* @__PURE__ */ p("div", { className: "bpb-upgrade", children: [
7193
7218
  /* @__PURE__ */ o("h2", { className: "bpb-upgrade__title", children: u("upgradeDialogTitle") }),
7194
7219
  /* @__PURE__ */ o("div", { className: "bpb-upgrade__toggle", children: /* @__PURE__ */ o(
7195
- Lo,
7220
+ Io,
7196
7221
  {
7197
7222
  "aria-label": u("dashboardBillingPeriod"),
7198
7223
  value: g,
7199
- onChange: S,
7224
+ onChange: k,
7200
7225
  options: [
7201
7226
  { value: "month", label: u("upgradeMonthly") },
7202
7227
  {
@@ -7216,11 +7241,11 @@ const Mo = ({
7216
7241
  ] }, _)),
7217
7242
  R.map((_, ne) => {
7218
7243
  var ce, ae;
7219
- const D = ue(_), $ = Io(_, g), V = Eo(_, g), O = (((ce = _.prices.month) == null ? void 0 : ce.amount) ?? 0) <= 0, j = D === y && (y === "community" || g === k), le = D === y && y !== "community" && g !== k, ie = !!P && _.id === P && !j, Z = y !== void 0 && na.indexOf(D) < na.indexOf(y), ge = (D === n || _.id === n) && !j, fe = j && A ? "cancel_downgrade" : j ? "current" : le ? "switch_interval" : ie ? "next" : Z ? "downgrade" : "upgrade", ye = ne > 0 ? R[ne - 1] : void 0, Le = i[D] ?? rt[D], we = _.features.conversation_sessions, Ie = nt(N, _, g), X = x.isPending && (fe === "downgrade" && ((ae = x.variables) == null ? void 0 : ae.planId) === _.id || fe === "cancel_downgrade");
7244
+ const P = ue(_), $ = Eo(_, g), V = Ro(_, g), U = (((ce = _.prices.month) == null ? void 0 : ce.amount) ?? 0) <= 0, j = P === y && (y === "community" || g === S), le = P === y && y !== "community" && g !== S, ie = !!D && _.id === D && !j, Z = y !== void 0 && na.indexOf(P) < na.indexOf(y), ge = (P === n || _.id === n) && !j, fe = j && T ? "cancel_downgrade" : j ? "current" : le ? "switch_interval" : ie ? "next" : Z ? "downgrade" : "upgrade", ye = ne > 0 ? R[ne - 1] : void 0, Le = i[P] ?? rt[P], we = _.features.conversation_sessions, Ie = nt(N, _, g), X = A.isPending && (fe === "downgrade" && ((ae = A.variables) == null ? void 0 : ae.planId) === _.id || fe === "cancel_downgrade");
7220
7245
  return /* @__PURE__ */ p(
7221
7246
  "div",
7222
7247
  {
7223
- className: U("bpb-plan-card", ge && "bpb-plan-card--highlighted bpb-glow"),
7248
+ className: O("bpb-plan-card", ge && "bpb-plan-card--highlighted bpb-glow"),
7224
7249
  "data-plan-id": _.id,
7225
7250
  children: [
7226
7251
  /* @__PURE__ */ p("div", { className: "bpb-plan-card__header", children: [
@@ -7228,9 +7253,9 @@ const Mo = ({
7228
7253
  se(_.name),
7229
7254
  ge && /* @__PURE__ */ o(st, { className: "bpb-plan-card__badge", children: u("upgradeRecommended") })
7230
7255
  ] }),
7231
- /* @__PURE__ */ o("p", { className: "bpb-plan-card__tagline", children: u(vo[ue(_)]) }),
7256
+ /* @__PURE__ */ o("p", { className: "bpb-plan-card__tagline", children: u(Co[ue(_)]) }),
7232
7257
  /* @__PURE__ */ o("div", { className: "bpb-plan-card__price", children: V !== null && $ ? /* @__PURE__ */ p(ve, { children: [
7233
- /* @__PURE__ */ o("span", { className: "bpb-plan-card__currency", children: Na($.currency) }),
7258
+ /* @__PURE__ */ o("span", { className: "bpb-plan-card__currency", children: _a($.currency) }),
7234
7259
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__amount", children: Number.isInteger(V) ? V : V.toFixed(2).replace(/\.00$/, "") }),
7235
7260
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__per", children: u("upgradePerMonthSuffix", { currency: $.currency.toUpperCase() }) })
7236
7261
  ] }) : /* @__PURE__ */ o("span", { className: "bpb-plan-card__amount", children: ee(0, "usd", 0) }) })
@@ -7238,7 +7263,7 @@ const Mo = ({
7238
7263
  we !== void 0 && /* @__PURE__ */ p("div", { className: "bpb-plan-card__allowance", children: [
7239
7264
  /* @__PURE__ */ p("div", { className: "bpb-plan-card__metric", children: [
7240
7265
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-value", children: re(we) }),
7241
- /* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-unit", children: u(O ? "conversationsUnit" : "conversationsPerMonth") })
7266
+ /* @__PURE__ */ o("span", { className: "bpb-plan-card__metric-unit", children: u(U ? "conversationsUnit" : "conversationsPerMonth") })
7242
7267
  ] }),
7243
7268
  Ie ? /* @__PURE__ */ o("p", { className: "bpb-plan-card__pack", children: u("upgradeThenPer", {
7244
7269
  price: ee(Ie.amount, Ie.currency, 0),
@@ -7253,7 +7278,7 @@ const Mo = ({
7253
7278
  {
7254
7279
  variant: "outline",
7255
7280
  block: !0,
7256
- disabled: I || x.isPending,
7281
+ disabled: I || A.isPending,
7257
7282
  loading: X,
7258
7283
  onClick: () => M(_),
7259
7284
  children: u("upgradeDowngrade")
@@ -7264,7 +7289,7 @@ const Mo = ({
7264
7289
  {
7265
7290
  variant: "primary",
7266
7291
  block: !0,
7267
- disabled: I || x.isPending,
7292
+ disabled: I || A.isPending,
7268
7293
  title: I ? u("upgradePlanManaged") : void 0,
7269
7294
  onClick: () => {
7270
7295
  m.capture(pe.PLAN_UPGRADE_INITIATED, {
@@ -7281,7 +7306,7 @@ const Mo = ({
7281
7306
  {
7282
7307
  variant: ge ? "accent" : "primary",
7283
7308
  block: !0,
7284
- disabled: I || x.isPending,
7309
+ disabled: I || A.isPending,
7285
7310
  title: I ? u("upgradePlanManaged") : void 0,
7286
7311
  onClick: () => {
7287
7312
  m.capture(pe.PLAN_UPGRADE_INITIATED, {
@@ -7295,14 +7320,14 @@ const Mo = ({
7295
7320
  ),
7296
7321
  /* @__PURE__ */ p("ul", { className: "bpb-plan-card__features", children: [
7297
7322
  ye && /* @__PURE__ */ p("li", { className: "bpb-plan-card__features-lead", children: [
7298
- /* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ o(Co, { size: 13 }) }),
7323
+ /* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip bpb-plan-card__feature-chip--lead", children: /* @__PURE__ */ o(No, { size: 13 }) }),
7299
7324
  /* @__PURE__ */ o("span", { children: u("upgradeEverythingIn", { planName: se(ye.name) }) })
7300
7325
  ] }),
7301
7326
  Le.map((de) => {
7302
7327
  const Ae = ut(de), Ee = On[de], Je = Ee !== void 0 ? u(Ee.label) : de, da = (l == null ? void 0 : l[de]) ?? (Ee !== void 0 ? u(Ee.desc) : void 0);
7303
7328
  return /* @__PURE__ */ p("li", { children: [
7304
7329
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ o(Ae, { size: 13 }) }),
7305
- da ? /* @__PURE__ */ o(La, { label: Je, children: da }) : /* @__PURE__ */ o("span", { children: Je })
7330
+ da ? /* @__PURE__ */ o(Ia, { label: Je, children: da }) : /* @__PURE__ */ o("span", { children: Je })
7306
7331
  ] }, de);
7307
7332
  })
7308
7333
  ] })
@@ -7325,13 +7350,13 @@ const Mo = ({
7325
7350
  ] })
7326
7351
  }
7327
7352
  );
7328
- }, Ha = '-apple-system, "ui-sans-serif", "system-ui", "Segoe UI", Helvetica, Arial, sans-serif', Ya = "14px", Yt = "10px";
7353
+ }, Ya = '-apple-system, "ui-sans-serif", "system-ui", "Segoe UI", Helvetica, Arial, sans-serif', Ja = "14px", Yt = "10px";
7329
7354
  function Vn(a) {
7330
7355
  return a ? {
7331
7356
  theme: "night",
7332
7357
  variables: {
7333
- fontFamily: Ha,
7334
- fontSizeBase: Ya,
7358
+ fontFamily: Ya,
7359
+ fontSizeBase: Ja,
7335
7360
  borderRadius: Yt,
7336
7361
  colorPrimary: "#ececec",
7337
7362
  colorBackground: "#1c1c1c",
@@ -7355,8 +7380,8 @@ function Vn(a) {
7355
7380
  } : {
7356
7381
  theme: "stripe",
7357
7382
  variables: {
7358
- fontFamily: Ha,
7359
- fontSizeBase: Ya,
7383
+ fontFamily: Ya,
7384
+ fontSizeBase: Ja,
7360
7385
  borderRadius: Yt,
7361
7386
  colorPrimary: "#0d0d0d",
7362
7387
  colorBackground: "#f7f7f7",
@@ -7388,20 +7413,20 @@ function Vn(a) {
7388
7413
  function Wn(a) {
7389
7414
  return {
7390
7415
  base: {
7391
- fontFamily: Ha,
7392
- fontSize: Ya,
7416
+ fontFamily: Ya,
7417
+ fontSize: Ja,
7393
7418
  color: a ? "#f9f9f9" : "#0d0d0d",
7394
7419
  "::placeholder": { color: a ? "#9b9b9b" : "#8f8f8f" }
7395
7420
  },
7396
7421
  invalid: { color: a ? "#ff8583" : "#e02e2a" }
7397
7422
  };
7398
7423
  }
7399
- const Bo = { pt: "pt-BR", es: "es-419" };
7424
+ const zo = { pt: "pt-BR", es: "es-419" };
7400
7425
  function Gn(a) {
7401
7426
  const e = a.split("-")[0] ?? a;
7402
- return Bo[e] ?? a;
7427
+ return zo[e] ?? a;
7403
7428
  }
7404
- const zo = 4, Oo = ({
7429
+ const Oo = 4, Uo = ({
7405
7430
  plan: a,
7406
7431
  interval: e,
7407
7432
  preview: t,
@@ -7412,7 +7437,7 @@ const zo = 4, Oo = ({
7412
7437
  onSubscribe: l
7413
7438
  }) => {
7414
7439
  var E, J, M, B, Q;
7415
- const { locale: d } = G(), { t: c } = oe(), { data: m } = ia(), u = ((E = a == null ? void 0 : a.prices.month) == null ? void 0 : E.currency) ?? ((J = a == null ? void 0 : a.prices.year) == null ? void 0 : J.currency) ?? "usd", g = a == null ? void 0 : a.features.conversation_sessions, b = a && ue(a) === "community" ? c("conversationsUnit") : c("conversationsPerMonth"), f = a ? nt(m, a, e) : null, C = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, N = (t == null ? void 0 : t.costs.immediate.accountBalance) ?? 0, v = (t == null ? void 0 : t.costs.nextCycle.total) ?? 0, h = t != null && t.nextBillingDate ? $e(go(t.nextBillingDate, 1), d) : null, x = a ? rt[ue(a)].slice(0, zo) : [], T = a ? ((M = a.prices[e]) == null ? void 0 : M.amount) ?? 0 : 0, S = (t == null ? void 0 : t.costs.immediate.lineItems) ?? [], k = S.filter((z) => z.type === "discount"), w = S.filter((z) => z.type === "proration_credit" || z.type === "proration_charge").reduce((z, H) => z + H.amount, 0), y = !!(t != null && t.subscription.plan.effectiveDate), P = ((B = a == null ? void 0 : a.prices.month) == null ? void 0 : B.amount) ?? 0, A = ((Q = a == null ? void 0 : a.prices.year) == null ? void 0 : Q.amount) ?? 0, I = e === "year" && P > 0 && A > 0 ? Math.round(P * 12 - A) : 0, R = Math.round(I / 12);
7440
+ const { locale: d } = G(), { t: c } = oe(), { data: m } = ia(), u = ((E = a == null ? void 0 : a.prices.month) == null ? void 0 : E.currency) ?? ((J = a == null ? void 0 : a.prices.year) == null ? void 0 : J.currency) ?? "usd", g = a == null ? void 0 : a.features.conversation_sessions, b = a && ue(a) === "community" ? c("conversationsUnit") : c("conversationsPerMonth"), f = a ? nt(m, a, e) : null, C = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, N = (t == null ? void 0 : t.costs.immediate.accountBalance) ?? 0, v = (t == null ? void 0 : t.costs.nextCycle.total) ?? 0, h = t != null && t.nextBillingDate ? $e(ho(t.nextBillingDate, 1), d) : null, A = a ? rt[ue(a)].slice(0, Oo) : [], x = a ? ((M = a.prices[e]) == null ? void 0 : M.amount) ?? 0 : 0, k = (t == null ? void 0 : t.costs.immediate.lineItems) ?? [], S = k.filter((z) => z.type === "discount"), w = k.filter((z) => z.type === "proration_credit" || z.type === "proration_charge").reduce((z, H) => z + H.amount, 0), y = !!(t != null && t.subscription.plan.effectiveDate), D = ((B = a == null ? void 0 : a.prices.month) == null ? void 0 : B.amount) ?? 0, T = ((Q = a == null ? void 0 : a.prices.year) == null ? void 0 : Q.amount) ?? 0, I = e === "year" && D > 0 && T > 0 ? Math.round(D * 12 - T) : 0, R = Math.round(I / 12);
7416
7441
  return /* @__PURE__ */ p("div", { className: "bpb-summary-wrap", children: [
7417
7442
  /* @__PURE__ */ p("div", { className: "bpb-summary bpb-glow", children: [
7418
7443
  /* @__PURE__ */ o("h3", { className: "bpb-summary__title", children: a ? `${se(a.name)} plan` : /* @__PURE__ */ o(Y, { width: 140, height: 24 }) }),
@@ -7424,9 +7449,9 @@ const zo = 4, Oo = ({
7424
7449
  packSize: re(f.packSize)
7425
7450
  }) })
7426
7451
  ] }),
7427
- x.length > 0 && /* @__PURE__ */ p(ve, { children: [
7452
+ A.length > 0 && /* @__PURE__ */ p(ve, { children: [
7428
7453
  /* @__PURE__ */ o("p", { className: "bpb-summary__features-label", children: c("orderTopFeatures") }),
7429
- /* @__PURE__ */ o("ul", { className: "bpb-summary__features", children: x.map((z) => {
7454
+ /* @__PURE__ */ o("ul", { className: "bpb-summary__features", children: A.map((z) => {
7430
7455
  const H = ut(z);
7431
7456
  return /* @__PURE__ */ p("li", { children: [
7432
7457
  /* @__PURE__ */ o(H, { size: 16, className: "bpb-summary__feature-icon" }),
@@ -7455,7 +7480,7 @@ const zo = 4, Oo = ({
7455
7480
  ] })
7456
7481
  ] }),
7457
7482
  /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7458
- /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(La, { label: c("orderProratedToday"), children: c("orderProratedTodayDesc") }) }),
7483
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: c("orderProratedToday"), children: c("orderProratedTodayDesc") }) }),
7459
7484
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(C, u) })
7460
7485
  ] }),
7461
7486
  /* @__PURE__ */ p("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
@@ -7473,16 +7498,16 @@ const zo = 4, Oo = ({
7473
7498
  ")"
7474
7499
  ] }),
7475
7500
  /* @__PURE__ */ p("span", { className: "bpb-summary__line-amount", children: [
7476
- ee(T, u),
7501
+ ee(x, u),
7477
7502
  c(e === "year" ? "perYear" : "perMonth")
7478
7503
  ] })
7479
7504
  ] }),
7480
- k.map((z, H) => /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7505
+ S.map((z, H) => /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7481
7506
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: z.description }),
7482
7507
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(z.amount, u) })
7483
7508
  ] }, `${z.id}-${H}`)),
7484
7509
  w !== 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7485
- /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(La, { label: w < 0 ? c("orderCreditUnusedTime") : c("orderAdjustUnusedTime"), children: w < 0 ? c("orderCreditUnusedTimeDesc") : c("orderAdjustUnusedTimeDesc") }) }),
7510
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: w < 0 ? c("orderCreditUnusedTime") : c("orderAdjustUnusedTime"), children: w < 0 ? c("orderCreditUnusedTimeDesc") : c("orderAdjustUnusedTimeDesc") }) }),
7486
7511
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(w, u) })
7487
7512
  ] }),
7488
7513
  N !== 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
@@ -7533,7 +7558,7 @@ const zo = 4, Oo = ({
7533
7558
  c("orderCancelNote")
7534
7559
  ] })
7535
7560
  ] });
7536
- }, Uo = [
7561
+ }, qo = [
7537
7562
  "AT",
7538
7563
  "BE",
7539
7564
  "BG",
@@ -7561,7 +7586,7 @@ const zo = 4, Oo = ({
7561
7586
  "SI",
7562
7587
  "ES",
7563
7588
  "SE"
7564
- ], qo = {
7589
+ ], $o = {
7565
7590
  CA: [
7566
7591
  { type: "ca_bn", label: "CA BN", description: "Canadian BN" },
7567
7592
  { type: "ca_gst_hst", label: "CA GST/HST", description: "Canadian GST/HST number" },
@@ -7588,30 +7613,30 @@ const zo = 4, Oo = ({
7588
7613
  { type: "sg_uen", label: "SG UEN", description: "Singaporean UEN" }
7589
7614
  ],
7590
7615
  ZA: [{ type: "za_vat", label: "ZA VAT", description: "South African VAT number" }]
7591
- }, $o = [{ type: "eu_vat", label: "EU VAT", description: "European VAT number" }];
7616
+ }, jo = [{ type: "eu_vat", label: "EU VAT", description: "European VAT number" }];
7592
7617
  function Kn(a) {
7593
7618
  if (!a)
7594
7619
  return [];
7595
7620
  const e = a.toUpperCase();
7596
- return Uo.includes(e) ? $o : qo[e] ?? [];
7621
+ return qo.includes(e) ? jo : $o[e] ?? [];
7597
7622
  }
7598
- const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("label", { className: U("bpb-input", e), children: [
7623
+ const Qa = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("label", { className: O("bpb-input", e), children: [
7599
7624
  /* @__PURE__ */ o("span", { className: "bpb-input__label", children: a }),
7600
7625
  /* @__PURE__ */ o("input", { className: "bpb-input__field bpb-input__field--labeled", id: t, ...n })
7601
- ] }) : /* @__PURE__ */ o("input", { className: U("bpb-input__field", e), id: t, ...n }), Hn = ({ label: a, className: e, children: t, ...n }) => /* @__PURE__ */ p("label", { className: U("bpb-input", e), children: [
7626
+ ] }) : /* @__PURE__ */ o("input", { className: O("bpb-input__field", e), id: t, ...n }), Hn = ({ label: a, className: e, children: t, ...n }) => /* @__PURE__ */ p("label", { className: O("bpb-input", e), children: [
7602
7627
  a && /* @__PURE__ */ o("span", { className: "bpb-input__label", children: a }),
7603
7628
  /* @__PURE__ */ p("span", { className: "bpb-input__select-wrap", children: [
7604
7629
  /* @__PURE__ */ o(
7605
7630
  "select",
7606
7631
  {
7607
- className: U("bpb-input__field bpb-input__field--select", a && "bpb-input__field--labeled"),
7632
+ className: O("bpb-input__field bpb-input__field--select", a && "bpb-input__field--labeled"),
7608
7633
  ...n,
7609
7634
  children: t
7610
7635
  }
7611
7636
  ),
7612
7637
  /* @__PURE__ */ o(ct, { size: 16, className: "bpb-input__chevron" })
7613
7638
  ] })
7614
- ] }), jo = ({
7639
+ ] }), Vo = ({
7615
7640
  plan: a,
7616
7641
  interval: e,
7617
7642
  onChange: t
@@ -7626,7 +7651,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7626
7651
  type: "button",
7627
7652
  role: "radio",
7628
7653
  "aria-checked": e === "month",
7629
- className: U("bpb-interval-card", e === "month" && "bpb-interval-card--selected"),
7654
+ className: O("bpb-interval-card", e === "month" && "bpb-interval-card--selected"),
7630
7655
  onClick: () => t("month"),
7631
7656
  children: [
7632
7657
  /* @__PURE__ */ o("span", { className: "bpb-interval-card__title", children: n("checkoutMonthlyBilling") }),
@@ -7644,7 +7669,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7644
7669
  type: "button",
7645
7670
  role: "radio",
7646
7671
  "aria-checked": e === "year",
7647
- className: U("bpb-interval-card", e === "year" && "bpb-interval-card--selected"),
7672
+ className: O("bpb-interval-card", e === "year" && "bpb-interval-card--selected"),
7648
7673
  onClick: () => t("year"),
7649
7674
  children: [
7650
7675
  /* @__PURE__ */ p("span", { className: "bpb-interval-card__title", children: [
@@ -7679,7 +7704,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7679
7704
  ] }),
7680
7705
  t && /* @__PURE__ */ o("button", { type: "button", className: "bpb-step__edit", onClick: t, children: n("edit") })
7681
7706
  ] });
7682
- }, Vo = ({
7707
+ }, Wo = ({
7683
7708
  stepNumber: a,
7684
7709
  savedCard: e,
7685
7710
  isDark: t,
@@ -7697,7 +7722,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7697
7722
  type: "button",
7698
7723
  role: "tab",
7699
7724
  "aria-selected": n === "saved",
7700
- className: U("bpb-pay-tab", n === "saved" && "bpb-pay-tab--selected"),
7725
+ className: O("bpb-pay-tab", n === "saved" && "bpb-pay-tab--selected"),
7701
7726
  onClick: () => r("saved"),
7702
7727
  children: [
7703
7728
  /* @__PURE__ */ o(Kt, { size: 16 }),
@@ -7711,7 +7736,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7711
7736
  type: "button",
7712
7737
  role: "tab",
7713
7738
  "aria-selected": n === "new",
7714
- className: U("bpb-pay-tab", n === "new" && "bpb-pay-tab--selected"),
7739
+ className: O("bpb-pay-tab", n === "new" && "bpb-pay-tab--selected"),
7715
7740
  onClick: () => r("new"),
7716
7741
  children: [
7717
7742
  /* @__PURE__ */ o(Kt, { size: 16 }),
@@ -7735,8 +7760,8 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7735
7760
  ] }),
7736
7761
  c && /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
7737
7762
  !l && /* @__PURE__ */ o("div", { className: "bpb-payment-element__skeleton", children: /* @__PURE__ */ o(Y, { height: 48 }) }),
7738
- /* @__PURE__ */ o("div", { className: U("bpb-card-element", !l && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7739
- wa,
7763
+ /* @__PURE__ */ o("div", { className: O("bpb-card-element", !l && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7764
+ Aa,
7740
7765
  {
7741
7766
  options: { style: Wn(t), hidePostalCode: !0 },
7742
7767
  onReady: () => d(!0),
@@ -7745,7 +7770,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7745
7770
  ) })
7746
7771
  ] })
7747
7772
  ] });
7748
- }, Wo = ({
7773
+ }, Go = ({
7749
7774
  stepNumber: a,
7750
7775
  existingAddress: e,
7751
7776
  customerName: t,
@@ -7765,15 +7790,15 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7765
7790
  taxValue: N,
7766
7791
  onTaxValueChange: v
7767
7792
  }) => {
7768
- const { t: h } = oe(), [x, T] = K(!1), S = r || !e, k = Kn(c), w = k.find((y) => y.type === f);
7793
+ const { t: h } = oe(), [A, x] = K(!1), k = r || !e, S = Kn(c), w = S.find((y) => y.type === f);
7769
7794
  return /* @__PURE__ */ p("section", { className: "bpb-step", children: [
7770
7795
  /* @__PURE__ */ o(Yn, { number: a, title: h("checkoutBillingAddressTitle") }),
7771
- n ? /* @__PURE__ */ o(Y, { height: 72 }) : S ? /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
7772
- !x && /* @__PURE__ */ p("div", { className: "bpb-payment-element__skeleton", children: [
7796
+ n ? /* @__PURE__ */ o(Y, { height: 72 }) : k ? /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
7797
+ !A && /* @__PURE__ */ p("div", { className: "bpb-payment-element__skeleton", children: [
7773
7798
  /* @__PURE__ */ o(Y, { height: 48 }),
7774
7799
  /* @__PURE__ */ o(Y, { height: 48 })
7775
7800
  ] }),
7776
- /* @__PURE__ */ o("div", { className: U(!x && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7801
+ /* @__PURE__ */ o("div", { className: O(!A && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7777
7802
  Xt,
7778
7803
  {
7779
7804
  options: {
@@ -7799,7 +7824,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7799
7824
  } : void 0
7800
7825
  },
7801
7826
  onReady: () => {
7802
- T(!0), l();
7827
+ x(!0), l();
7803
7828
  },
7804
7829
  onChange: (y) => {
7805
7830
  d(y.value.address.country || void 0);
@@ -7833,7 +7858,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7833
7858
  type: "checkbox",
7834
7859
  checked: m,
7835
7860
  onChange: (y) => {
7836
- u(y.target.checked), y.target.checked && !f && k[0] && C(k[0].type);
7861
+ u(y.target.checked), y.target.checked && !f && S[0] && C(S[0].type);
7837
7862
  }
7838
7863
  }
7839
7864
  ),
@@ -7842,7 +7867,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7842
7867
  m && /* @__PURE__ */ p("div", { className: "bpb-business-fields", children: [
7843
7868
  /* @__PURE__ */ o("h4", { className: "bpb-step__subtitle", children: h("checkoutBusinessDetails") }),
7844
7869
  /* @__PURE__ */ o(
7845
- Ja,
7870
+ Qa,
7846
7871
  {
7847
7872
  placeholder: h("checkoutBusinessNamePlaceholder"),
7848
7873
  value: g,
@@ -7850,14 +7875,14 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7850
7875
  autoComplete: "organization"
7851
7876
  }
7852
7877
  ),
7853
- k.length > 0 ? /* @__PURE__ */ p(ve, { children: [
7878
+ S.length > 0 ? /* @__PURE__ */ p(ve, { children: [
7854
7879
  /* @__PURE__ */ o(
7855
7880
  Hn,
7856
7881
  {
7857
7882
  "aria-label": h("checkoutTaxIdTypeLabel"),
7858
7883
  value: f,
7859
7884
  onChange: (y) => C(y.target.value),
7860
- children: k.map((y) => /* @__PURE__ */ p("option", { value: y.type, children: [
7885
+ children: S.map((y) => /* @__PURE__ */ p("option", { value: y.type, children: [
7861
7886
  y.label,
7862
7887
  " — ",
7863
7888
  y.description
@@ -7865,7 +7890,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7865
7890
  }
7866
7891
  ),
7867
7892
  /* @__PURE__ */ o(
7868
- Ja,
7893
+ Qa,
7869
7894
  {
7870
7895
  placeholder: w ? w.description : h("checkoutTaxIdNumberPlaceholder"),
7871
7896
  value: N,
@@ -7876,15 +7901,15 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7876
7901
  ] }) : /* @__PURE__ */ o("p", { className: "bpb-business-fields__note", children: h(c ? "checkoutNoTaxRequired" : "checkoutSelectCountryForTax") })
7877
7902
  ] })
7878
7903
  ] });
7879
- }, Go = ({ planId: a, initialInterval: e, clientSecret: t, onSuccess: n }) => {
7904
+ }, Ko = ({ planId: a, initialInterval: e, clientSecret: t, onSuccess: n }) => {
7880
7905
  var ht;
7881
- const r = en(), s = an(), { email: i, toast: l, analytics: d, isDark: c } = G(), { t: m } = oe(), [u, g] = K(e), [b, f] = K("payment"), [C, N] = K(null), [v, h] = K(!1), [x, T] = K(!1), [S, k] = K(!1), [w, y] = K(void 0), [P, A] = K(!1), [I, R] = K(""), [E, J] = K(""), [M, B] = K(""), [Q, z] = K(!1), [H, _] = K(null), { data: ne } = ze(), { data: D } = Fe(), { data: $, isLoading: V } = mn(), { data: O, isLoading: j } = gn(), { data: le } = hn(), ie = ne == null ? void 0 : ne.find((Se) => Se.id === a), Z = ((ht = $ == null ? void 0 : $.paymentMethod) == null ? void 0 : ht.card) ?? null, ge = (O == null ? void 0 : O.address) ?? null;
7906
+ const r = en(), s = an(), { email: i, toast: l, analytics: d, isDark: c } = G(), { t: m } = oe(), [u, g] = K(e), [b, f] = K("payment"), [C, N] = K(null), [v, h] = K(!1), [A, x] = K(!1), [k, S] = K(!1), [w, y] = K(void 0), [D, T] = K(!1), [I, R] = K(""), [E, J] = K(""), [M, B] = K(""), [Q, z] = K(!1), [H, _] = K(null), { data: ne } = ze(), { data: P } = Fe(), { data: $, isLoading: V } = mn(), { data: U, isLoading: j } = gn(), { data: le } = hn(), ie = ne == null ? void 0 : ne.find((Se) => Se.id === a), Z = ((ht = $ == null ? void 0 : $.paymentMethod) == null ? void 0 : ht.card) ?? null, ge = (U == null ? void 0 : U.address) ?? null;
7882
7907
  Ce(() => {
7883
7908
  C === null && !V && $ !== void 0 && N(Z ? "saved" : "new");
7884
7909
  }, [C, V, $, Z]), Ce(() => {
7885
7910
  w === void 0 && ge && y(ge.country);
7886
7911
  }, [w, ge]);
7887
- const fe = _e(() => ({ plan: { planId: a, interval: u } }), [a, u]), ye = pn(fe), Le = yn(), we = vn(), Ie = Cn(), X = Nn(), ce = ie ? se(ie.name) : "", ae = C === "new" || !Z, de = x || !ge, Ae = ae ? v : !!Z, Ee = de ? S : !0;
7912
+ const fe = _e(() => ({ plan: { planId: a, interval: u } }), [a, u]), ye = pn(fe), Le = yn(), we = vn(), Ie = Cn(), X = Nn(), ce = ie ? se(ie.name) : "", ae = C === "new" || !Z, de = A || !ge, Ae = ae ? v : !!Z, Ee = de ? k : !0;
7888
7913
  Ce(() => {
7889
7914
  f(Ae ? "address" : "payment");
7890
7915
  }, [Ae]), Ce(() => {
@@ -7899,10 +7924,10 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7899
7924
  if (!r || !s || !ie)
7900
7925
  return;
7901
7926
  z(!0), _(null);
7902
- const Se = (We, ba) => d.capture(pe.CHECKOUT_ERROR, { plan_name: ce, interval: u, step: b, reason: We, message: ba });
7927
+ const Se = (We, fa) => d.capture(pe.CHECKOUT_ERROR, { plan_name: ce, interval: u, step: b, reason: We, message: fa });
7903
7928
  try {
7904
7929
  if (d.capture(pe.PAYMENT_DETAILS_CONFIRMED, { plan_name: ce, interval: u }), ae) {
7905
- const Ge = s.getElement(wa);
7930
+ const Ge = s.getElement(Aa);
7906
7931
  if (!Ge) {
7907
7932
  _(m("checkoutCardNotReady")), Se("card_element_not_ready");
7908
7933
  return;
@@ -7947,16 +7972,16 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7947
7972
  });
7948
7973
  }
7949
7974
  }
7950
- const ba = P && I.trim() || We || void 0, Ct = P && E && M.trim() ? [{ type: E, value: M.trim() }] : void 0;
7951
- (ba !== void 0 || Ct !== void 0) && await Ie.mutateAsync({ name: ba, taxIds: Ct });
7975
+ const fa = D && I.trim() || We || void 0, Ct = D && E && M.trim() ? [{ type: E, value: M.trim() }] : void 0;
7976
+ (fa !== void 0 || Ct !== void 0) && await Ie.mutateAsync({ name: fa, taxIds: Ct });
7952
7977
  const tr = ((ft = ye.data) == null ? void 0 : ft.costs.immediate.amountDue) ?? 0, nr = ((yt = ye.data) == null ? void 0 : yt.costs.nextCycle.total) ?? 0;
7953
7978
  await X.mutateAsync({ planId: a, interval: u }), d.capture(pe.PLAN_UPGRADED, {
7954
7979
  plan_name: ce,
7955
7980
  interval: u,
7956
7981
  amount_paid: tr,
7957
7982
  next_cycle_amount: nr,
7958
- previous_plan_name: (vt = ne == null ? void 0 : ne.find((Ge) => Ge.id === (D == null ? void 0 : D.plan.current.planId))) == null ? void 0 : vt.name.replace("Plan - ", ""),
7959
- previous_interval: D == null ? void 0 : D.plan.current.interval
7983
+ previous_plan_name: (vt = ne == null ? void 0 : ne.find((Ge) => Ge.id === (P == null ? void 0 : P.plan.current.planId))) == null ? void 0 : vt.name.replace("Plan - ", ""),
7984
+ previous_interval: P == null ? void 0 : P.plan.current.interval
7960
7985
  }), l({ type: "success", message: m("checkoutSuccessToast") }), n();
7961
7986
  } catch (We) {
7962
7987
  _(m("checkoutGenericError")), Se("exception", We instanceof Error ? We.message : void 0), l({ type: "error", message: m("checkoutErrorToast") });
@@ -7966,7 +7991,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7966
7991
  };
7967
7992
  return /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", children: [
7968
7993
  /* @__PURE__ */ p("div", { className: "bpb-checkout__main", children: [
7969
- ie && /* @__PURE__ */ o(jo, { plan: ie, interval: u, onChange: Je }),
7994
+ ie && /* @__PURE__ */ o(Vo, { plan: ie, interval: u, onChange: Je }),
7970
7995
  i && /* @__PURE__ */ p("section", { className: "bpb-checkout__section", children: [
7971
7996
  /* @__PURE__ */ o("h3", { className: "bpb-checkout__section-title", children: m("checkoutContactInfo") }),
7972
7997
  /* @__PURE__ */ p("div", { className: "bpb-checkout__static-field", children: [
@@ -7975,7 +8000,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7975
8000
  ] })
7976
8001
  ] }),
7977
8002
  /* @__PURE__ */ o(
7978
- Vo,
8003
+ Wo,
7979
8004
  {
7980
8005
  stepNumber: 1,
7981
8006
  savedCard: Z,
@@ -7986,20 +8011,20 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7986
8011
  }
7987
8012
  ),
7988
8013
  b === "address" && /* @__PURE__ */ o(
7989
- Wo,
8014
+ Go,
7990
8015
  {
7991
8016
  stepNumber: 2,
7992
8017
  existingAddress: ge,
7993
8018
  customerName: (le == null ? void 0 : le.name) ?? null,
7994
8019
  isLoading: j,
7995
- editing: x,
7996
- onEdit: () => T(!0),
7997
- onCancelEdit: ge ? () => T(!1) : void 0,
7998
- onReady: () => k(!0),
8020
+ editing: A,
8021
+ onEdit: () => x(!0),
8022
+ onCancelEdit: ge ? () => x(!1) : void 0,
8023
+ onReady: () => S(!0),
7999
8024
  onCountryChange: y,
8000
8025
  country: w,
8001
- isBusiness: P,
8002
- onIsBusinessChange: A,
8026
+ isBusiness: D,
8027
+ onIsBusinessChange: T,
8003
8028
  businessName: I,
8004
8029
  onBusinessNameChange: R,
8005
8030
  taxType: E,
@@ -8011,7 +8036,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8011
8036
  H && /* @__PURE__ */ o("p", { role: "alert", className: "bpb-checkout__submit-error", children: H })
8012
8037
  ] }),
8013
8038
  /* @__PURE__ */ o("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ o(
8014
- Oo,
8039
+ Uo,
8015
8040
  {
8016
8041
  plan: ie,
8017
8042
  interval: u,
@@ -8024,7 +8049,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8024
8049
  }
8025
8050
  ) })
8026
8051
  ] });
8027
- }, Ko = ({ open: a, onOpenChange: e, planId: t, interval: n, onBack: r, onSuccess: s }) => {
8052
+ }, Ho = ({ open: a, onOpenChange: e, planId: t, interval: n, onBack: r, onSuccess: s }) => {
8028
8053
  var N;
8029
8054
  const { stripePromise: i, isDark: l, locale: d, isOutdatedBilling: c } = G(), { t: m } = oe(), u = fn(), g = (N = u.data) == null ? void 0 : N.clientSecret, { mutate: b, reset: f } = u;
8030
8055
  Ce(() => {
@@ -8057,7 +8082,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8057
8082
  ] }),
8058
8083
  /* @__PURE__ */ o("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ o(Y, { height: 320 }) })
8059
8084
  ] }) : /* @__PURE__ */ o(tn, { stripe: i, options: C, children: /* @__PURE__ */ o(
8060
- Go,
8085
+ Ko,
8061
8086
  {
8062
8087
  planId: t,
8063
8088
  initialInterval: n,
@@ -8068,9 +8093,9 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8068
8093
  }
8069
8094
  ) })
8070
8095
  ] }) });
8071
- }, Ho = ({ value: a, onChange: e, min: t = 0, max: n, step: r = 1, className: s, ...i }) => {
8096
+ }, Yo = ({ value: a, onChange: e, min: t = 0, max: n, step: r = 1, className: s, ...i }) => {
8072
8097
  const l = () => e(Math.max(t, a - r)), d = () => e(n === void 0 ? a + r : Math.min(n, a + r));
8073
- return /* @__PURE__ */ p("div", { className: U("bpb-stepper", s), children: [
8098
+ return /* @__PURE__ */ p("div", { className: O("bpb-stepper", s), children: [
8074
8099
  /* @__PURE__ */ o(
8075
8100
  "button",
8076
8101
  {
@@ -8079,7 +8104,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8079
8104
  "aria-label": `Decrease ${i["aria-label"]}`,
8080
8105
  onClick: l,
8081
8106
  disabled: a <= t,
8082
- children: /* @__PURE__ */ o(To, { size: 14 })
8107
+ children: /* @__PURE__ */ o(Do, { size: 14 })
8083
8108
  }
8084
8109
  ),
8085
8110
  /* @__PURE__ */ o("span", { className: "bpb-stepper__value", "aria-label": i["aria-label"], children: a }),
@@ -8091,11 +8116,11 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8091
8116
  "aria-label": `Increase ${i["aria-label"]}`,
8092
8117
  onClick: d,
8093
8118
  disabled: n !== void 0 && a >= n,
8094
- children: /* @__PURE__ */ o(Do, { size: 14 })
8119
+ children: /* @__PURE__ */ o(Po, { size: 14 })
8095
8120
  }
8096
8121
  )
8097
8122
  ] });
8098
- }, yi = ({ open: a, onOpenChange: e, onSuccess: t, onUpgrade: n }) => {
8123
+ }, vi = ({ open: a, onOpenChange: e, onSuccess: t, onUpgrade: n }) => {
8099
8124
  const { isOutdatedBilling: r } = G(), { t: s } = oe();
8100
8125
  return r ? /* @__PURE__ */ o(
8101
8126
  xe,
@@ -8107,42 +8132,42 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8107
8132
  className: "bpb-scope",
8108
8133
  children: /* @__PURE__ */ o(ca, {})
8109
8134
  }
8110
- ) : /* @__PURE__ */ o(xe, { open: a, onOpenChange: e, size: "md", "aria-label": s("addonsDialogTitle"), className: "bpb-scope", children: /* @__PURE__ */ o(Yo, { onOpenChange: e, onSuccess: t, onUpgrade: n }) });
8111
- }, Yo = ({
8135
+ ) : /* @__PURE__ */ o(xe, { open: a, onOpenChange: e, size: "md", "aria-label": s("addonsDialogTitle"), className: "bpb-scope", children: /* @__PURE__ */ o(Jo, { onOpenChange: e, onSuccess: t, onUpgrade: n }) });
8136
+ }, Jo = ({
8112
8137
  onOpenChange: a,
8113
8138
  onSuccess: e,
8114
8139
  onUpgrade: t
8115
8140
  }) => {
8116
8141
  var z, H, _, ne;
8117
- const { toast: n, locale: r } = G(), { t: s } = oe(), { data: i } = Fe(), { data: l } = ia(), { data: d } = ze(), { data: c } = bn(), m = Cs(), [u, g] = K(null), b = d == null ? void 0 : d.find((D) => D.id === (i == null ? void 0 : i.plan.current.planId)), f = (i == null ? void 0 : i.plan.current.interval) ?? "month", C = (c == null ? void 0 : c.addonsReadonly) ?? !1, N = i != null && i.plan.current.periodEnd ? $e(i.plan.current.periodEnd, r) : null, v = _e(() => {
8142
+ const { toast: n, locale: r } = G(), { t: s } = oe(), { data: i } = Fe(), { data: l } = ia(), { data: d } = ze(), { data: c } = bn(), m = Ns(), [u, g] = K(null), b = d == null ? void 0 : d.find((P) => P.id === (i == null ? void 0 : i.plan.current.planId)), f = (i == null ? void 0 : i.plan.current.interval) ?? "month", C = (c == null ? void 0 : c.addonsReadonly) ?? !1, N = i != null && i.plan.current.periodEnd ? $e(i.plan.current.periodEnd, r) : null, v = _e(() => {
8118
8143
  var $;
8119
8144
  if (!i || !l)
8120
8145
  return null;
8121
- const D = {};
8146
+ const P = {};
8122
8147
  for (const V of l) {
8123
- const O = i.addons[V.id];
8124
- D[V.id] = (($ = O == null ? void 0 : O.next) == null ? void 0 : $.quantity) ?? (O == null ? void 0 : O.current.quantity) ?? 0;
8148
+ const U = i.addons[V.id];
8149
+ P[V.id] = (($ = U == null ? void 0 : U.next) == null ? void 0 : $.quantity) ?? (U == null ? void 0 : U.current.quantity) ?? 0;
8125
8150
  }
8126
- return D;
8127
- }, [i, l]), h = u ?? v, x = _e(() => !l || !b ? [] : l.flatMap((D) => {
8128
- const $ = tt(D, b, f);
8129
- return $ ? [{ addon: D, price: $ }] : [];
8130
- }), [l, b, f]), T = !!h && !!v && Object.keys(h).some((D) => h[D] !== v[D]), S = x.reduce(
8131
- (D, { addon: $, price: V }) => D + ((h == null ? void 0 : h[$.id]) ?? 0) * V.amount,
8151
+ return P;
8152
+ }, [i, l]), h = u ?? v, A = _e(() => !l || !b ? [] : l.flatMap((P) => {
8153
+ const $ = tt(P, b, f);
8154
+ return $ ? [{ addon: P, price: $ }] : [];
8155
+ }), [l, b, f]), x = !!h && !!v && Object.keys(h).some((P) => h[P] !== v[P]), k = A.reduce(
8156
+ (P, { addon: $, price: V }) => P + ((h == null ? void 0 : h[$.id]) ?? 0) * V.amount,
8132
8157
  0
8133
- ), k = _e(
8158
+ ), S = _e(
8134
8159
  () => b && h ? { plan: { planId: b.id, interval: f }, addons: h } : null,
8135
8160
  [b, f, h]
8136
- ), w = pn(k ?? { plan: { planId: "", interval: f } }, {
8137
- enabled: !!k && T
8138
- }), y = ((z = b == null ? void 0 : b.prices[f]) == null ? void 0 : z.currency) ?? "usd", P = ((H = w.data) == null ? void 0 : H.costs.immediate.amountDue) ?? 0, A = (_ = w.data) != null && _.nextBillingDate ? $e(w.data.nextBillingDate, r) : null, I = ((ne = b == null ? void 0 : b.prices[f]) == null ? void 0 : ne.amount) ?? 0, R = I + S, E = b && h ? fo(b, l, h) : [], J = (D, $) => $ === "bytes" ? ra(D) : re(D), M = (D, $) => {
8139
- const V = l == null ? void 0 : l.find((ie) => ie.id === D), O = V == null ? void 0 : V.increments;
8140
- if (!O || $ <= 0)
8161
+ ), w = pn(S ?? { plan: { planId: "", interval: f } }, {
8162
+ enabled: !!S && x
8163
+ }), y = ((z = b == null ? void 0 : b.prices[f]) == null ? void 0 : z.currency) ?? "usd", D = ((H = w.data) == null ? void 0 : H.costs.immediate.amountDue) ?? 0, T = (_ = w.data) != null && _.nextBillingDate ? $e(w.data.nextBillingDate, r) : null, I = ((ne = b == null ? void 0 : b.prices[f]) == null ? void 0 : ne.amount) ?? 0, R = I + k, E = b && h ? yo(b, l, h) : [], J = (P, $) => $ === "bytes" ? ra(P) : re(P), M = (P, $) => {
8164
+ const V = l == null ? void 0 : l.find((ie) => ie.id === P), U = V == null ? void 0 : V.increments;
8165
+ if (!U || $ <= 0)
8141
8166
  return null;
8142
- const j = O.conversation_sessions ?? 0;
8167
+ const j = U.conversation_sessions ?? 0;
8143
8168
  if (j > 0)
8144
8169
  return s("addonsConvos", { n: re(j * $) });
8145
- const le = O.file_storage ?? 0;
8170
+ const le = U.file_storage ?? 0;
8146
8171
  return le > 0 ? ra(le * $) : null;
8147
8172
  }, B = () => {
8148
8173
  h && m.mutate(
@@ -8157,13 +8182,13 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8157
8182
  }, Q = !i || !l || !d;
8158
8183
  return /* @__PURE__ */ p("div", { className: "bpb-manage-addons", children: [
8159
8184
  /* @__PURE__ */ o("h2", { className: "bpb-manage-addons__title", children: s("addonsDialogTitle") }),
8160
- (Q || x.length > 0) && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__subtitle", children: b ? s("addonsSubtitleWithPlan", { planName: se(b.name) }) : s("addonsSubtitleGeneric") }),
8185
+ (Q || A.length > 0) && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__subtitle", children: b ? s("addonsSubtitleWithPlan", { planName: se(b.name) }) : s("addonsSubtitleGeneric") }),
8161
8186
  Q ? /* @__PURE__ */ p("div", { className: "bpb-manage-addons__loading", "aria-busy": "true", children: [
8162
8187
  /* @__PURE__ */ o(Y, { height: 56 }),
8163
8188
  /* @__PURE__ */ o(Y, { height: 56 })
8164
- ] }) : x.length === 0 ? /* @__PURE__ */ p(ve, { children: [
8189
+ ] }) : A.length === 0 ? /* @__PURE__ */ p(ve, { children: [
8165
8190
  /* @__PURE__ */ p("div", { className: "bpb-manage-addons__upgrade-gate", children: [
8166
- /* @__PURE__ */ o(Po, { size: 28, className: "bpb-manage-addons__upgrade-icon" }),
8191
+ /* @__PURE__ */ o(Fo, { size: 28, className: "bpb-manage-addons__upgrade-icon" }),
8167
8192
  /* @__PURE__ */ p("div", { className: "bpb-manage-addons__upgrade-text", children: [
8168
8193
  /* @__PURE__ */ o("p", { className: "bpb-manage-addons__upgrade-title", children: s("addonsRequirePaidPlanTitle") }),
8169
8194
  /* @__PURE__ */ o("p", { className: "bpb-manage-addons__upgrade-body", children: s("addonsRequirePaidPlanBody") })
@@ -8181,13 +8206,13 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8181
8206
  }
8182
8207
  ) : /* @__PURE__ */ o(be, { variant: "outline", onClick: () => a(!1), children: s("close") }) })
8183
8208
  ] }) : /* @__PURE__ */ p(ve, { children: [
8184
- /* @__PURE__ */ o("div", { className: "bpb-addons", children: x.map(({ addon: D, price: $ }) => {
8209
+ /* @__PURE__ */ o("div", { className: "bpb-addons", children: A.map(({ addon: P, price: $ }) => {
8185
8210
  var ie;
8186
- const V = ((ie = i == null ? void 0 : i.addons[D.id]) == null ? void 0 : ie.current.quantity) ?? 0, O = (h == null ? void 0 : h[D.id]) ?? 0, j = O !== V ? O === 0 ? N ? s("addonRemovedOnDate", { activeNow: V, date: N }) : s("addonRemovedNextCycle", { activeNow: V }) : N ? s("addonChangedOnDate", { activeNow: V, pending: O, date: N }) : s("addonChangedNextCycle", { activeNow: V, pending: O }) : V > 0 ? s("addonActiveOnly", { count: V }) : null, le = M(D.id, O);
8211
+ const V = ((ie = i == null ? void 0 : i.addons[P.id]) == null ? void 0 : ie.current.quantity) ?? 0, U = (h == null ? void 0 : h[P.id]) ?? 0, j = U !== V ? U === 0 ? N ? s("addonRemovedOnDate", { activeNow: V, date: N }) : s("addonRemovedNextCycle", { activeNow: V }) : N ? s("addonChangedOnDate", { activeNow: V, pending: U, date: N }) : s("addonChangedNextCycle", { activeNow: V, pending: U }) : V > 0 ? s("addonActiveOnly", { count: V }) : null, le = M(P.id, U);
8187
8212
  return /* @__PURE__ */ p("div", { className: "bpb-addon-row", children: [
8188
8213
  /* @__PURE__ */ p("div", { className: "bpb-addon-row__info", children: [
8189
- /* @__PURE__ */ o("span", { className: "bpb-addon-row__name", children: Ue[D.id] ? s(Ue[D.id]) : _a(D.name) }),
8190
- /* @__PURE__ */ o("span", { className: "bpb-addon-row__description", children: Wt[D.id] ? s(Wt[D.id]) : D.description }),
8214
+ /* @__PURE__ */ o("span", { className: "bpb-addon-row__name", children: Ue[P.id] ? s(Ue[P.id]) : Sa(P.name) }),
8215
+ /* @__PURE__ */ o("span", { className: "bpb-addon-row__description", children: Wt[P.id] ? s(Wt[P.id]) : P.description }),
8191
8216
  /* @__PURE__ */ p("span", { className: "bpb-addon-row__price", children: [
8192
8217
  ee($.amount, $.currency),
8193
8218
  " ",
@@ -8196,9 +8221,9 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8196
8221
  j && /* @__PURE__ */ o(
8197
8222
  "span",
8198
8223
  {
8199
- className: U(
8224
+ className: O(
8200
8225
  "bpb-addon-row__status",
8201
- O !== V && "bpb-addon-row__status--changed"
8226
+ U !== V && "bpb-addon-row__status--changed"
8202
8227
  ),
8203
8228
  children: j
8204
8229
  }
@@ -8207,33 +8232,33 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8207
8232
  /* @__PURE__ */ p("div", { className: "bpb-addon-row__control", children: [
8208
8233
  le && /* @__PURE__ */ o("span", { className: "bpb-addon-row__grant", children: le }),
8209
8234
  /* @__PURE__ */ o(
8210
- Ho,
8235
+ Yo,
8211
8236
  {
8212
- "aria-label": `${Ue[D.id] ? s(Ue[D.id]) : _a(D.name)} quantity`,
8213
- value: O,
8214
- onChange: (Z) => g({ ...h ?? {}, [D.id]: Z })
8237
+ "aria-label": `${Ue[P.id] ? s(Ue[P.id]) : Sa(P.name)} quantity`,
8238
+ value: U,
8239
+ onChange: (Z) => g({ ...h ?? {}, [P.id]: Z })
8215
8240
  }
8216
8241
  )
8217
8242
  ] })
8218
- ] }, D.id);
8243
+ ] }, P.id);
8219
8244
  }) }),
8220
8245
  E.length > 0 && /* @__PURE__ */ p("div", { className: "bpb-manage-addons__limits", children: [
8221
8246
  /* @__PURE__ */ o("p", { className: "bpb-manage-addons__limits-title", children: s("addonsNewLimits") }),
8222
- E.map((D) => {
8247
+ E.map((P) => {
8223
8248
  const $ = {
8224
8249
  conversation_sessions: "resourceConversations",
8225
8250
  table_rows: "resourceTableRows",
8226
8251
  vector_db_storage: "resourceVectorDb",
8227
8252
  file_storage: "resourceFileStorage"
8228
- }[D.key];
8253
+ }[P.key];
8229
8254
  return /* @__PURE__ */ p("div", { className: "bpb-manage-addons__limit-row", children: [
8230
- /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-label", children: $ ? s($) : D.label }),
8255
+ /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-label", children: $ ? s($) : P.label }),
8231
8256
  /* @__PURE__ */ p("span", { className: "bpb-manage-addons__limit-values", children: [
8232
- /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-now", children: J(D.now, D.unit) }),
8257
+ /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-now", children: J(P.now, P.unit) }),
8233
8258
  /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-arrow", "aria-hidden": !0, children: "→" }),
8234
- /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-next", children: J(D.next, D.unit) })
8259
+ /* @__PURE__ */ o("span", { className: "bpb-manage-addons__limit-next", children: J(P.next, P.unit) })
8235
8260
  ] })
8236
- ] }, D.key);
8261
+ ] }, P.key);
8237
8262
  })
8238
8263
  ] }),
8239
8264
  /* @__PURE__ */ p("div", { className: "bpb-manage-addons__totals", children: [
@@ -8241,17 +8266,17 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8241
8266
  /* @__PURE__ */ o("span", { children: b ? s("addonsPlanLine", { planName: se(b.name) }) : s("addonsGenericPlan") }),
8242
8267
  /* @__PURE__ */ o("span", { children: ee(I, y) })
8243
8268
  ] }),
8244
- x.map(({ addon: D, price: $ }) => {
8245
- const V = (h == null ? void 0 : h[D.id]) ?? 0;
8269
+ A.map(({ addon: P, price: $ }) => {
8270
+ const V = (h == null ? void 0 : h[P.id]) ?? 0;
8246
8271
  return V <= 0 ? null : /* @__PURE__ */ p("div", { className: "bpb-manage-addons__line", children: [
8247
8272
  /* @__PURE__ */ p("span", { children: [
8248
8273
  V,
8249
8274
  "×",
8250
8275
  " ",
8251
- Ue[D.id] ? s(Ue[D.id]) : _a(D.name)
8276
+ Ue[P.id] ? s(Ue[P.id]) : Sa(P.name)
8252
8277
  ] }),
8253
8278
  /* @__PURE__ */ o("span", { children: ee($.amount * V, y) })
8254
- ] }, D.id);
8279
+ ] }, P.id);
8255
8280
  }),
8256
8281
  /* @__PURE__ */ p("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--total", children: [
8257
8282
  /* @__PURE__ */ o("span", { children: s(f === "year" ? "addonsTotalYearly" : "addonsTotalMonthly") }),
@@ -8260,19 +8285,19 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8260
8285
  s(f === "year" ? "perYear" : "perMonth")
8261
8286
  ] })
8262
8287
  ] }),
8263
- T && /* @__PURE__ */ p("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--due", children: [
8288
+ x && /* @__PURE__ */ p("div", { className: "bpb-manage-addons__line bpb-manage-addons__line--due", children: [
8264
8289
  /* @__PURE__ */ o("span", { children: s("addonsDueToday") }),
8265
- /* @__PURE__ */ o("span", { children: w.isLoading ? "…" : w.isError ? "—" : ee(Math.max(P, 0), y) })
8290
+ /* @__PURE__ */ o("span", { children: w.isLoading ? "…" : w.isError ? "—" : ee(Math.max(D, 0), y) })
8266
8291
  ] })
8267
8292
  ] }),
8268
- T && !w.isError && /* @__PURE__ */ p("p", { className: "bpb-manage-addons__note", children: [
8269
- P > 0 ? s("addonsChargedNow", { amount: ee(P, y) }) : s("addonsNoChargeToday"),
8270
- A ? s("addonsRenewalWithDate", {
8271
- date: A,
8272
- amount: ee(S, y),
8293
+ x && !w.isError && /* @__PURE__ */ p("p", { className: "bpb-manage-addons__note", children: [
8294
+ D > 0 ? s("addonsChargedNow", { amount: ee(D, y) }) : s("addonsNoChargeToday"),
8295
+ T ? s("addonsRenewalWithDate", {
8296
+ date: T,
8297
+ amount: ee(k, y),
8273
8298
  interval: s(f === "year" ? "perYear" : "perMonth")
8274
8299
  }) : s("addonsRenewalNoDate", {
8275
- amount: ee(S, y),
8300
+ amount: ee(k, y),
8276
8301
  interval: s(f === "year" ? "perYear" : "perMonth")
8277
8302
  })
8278
8303
  ] }),
@@ -8283,7 +8308,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8283
8308
  be,
8284
8309
  {
8285
8310
  variant: "primary",
8286
- disabled: !T || C,
8311
+ disabled: !x || C,
8287
8312
  loading: m.isPending,
8288
8313
  onClick: B,
8289
8314
  children: s("addonsUpdateSubscription")
@@ -8292,11 +8317,11 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8292
8317
  ] })
8293
8318
  ] })
8294
8319
  ] });
8295
- }, vi = ({ open: a, onOpenChange: e }) => {
8320
+ }, Ci = ({ open: a, onOpenChange: e }) => {
8296
8321
  const { isOutdatedBilling: t } = G(), { t: n } = oe();
8297
- return t ? /* @__PURE__ */ o(xe, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ o(ca, {}) }) : /* @__PURE__ */ o(xe, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ o(Jo, { open: a }) });
8298
- }, Jo = ({ open: a }) => {
8299
- const { locale: e, analytics: t } = G(), { t: n } = oe(), { data: r, isLoading: s, isError: i } = fs({ enabled: a }), l = (r == null ? void 0 : r.invoices) ?? [], d = {
8322
+ return t ? /* @__PURE__ */ o(xe, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ o(ca, {}) }) : /* @__PURE__ */ o(xe, { open: a, onOpenChange: e, size: "md", "aria-label": n("invoicesTitle"), className: "bpb-scope", children: /* @__PURE__ */ o(Qo, { open: a }) });
8323
+ }, Qo = ({ open: a }) => {
8324
+ const { locale: e, analytics: t } = G(), { t: n } = oe(), { data: r, isLoading: s, isError: i } = ys({ enabled: a }), l = (r == null ? void 0 : r.invoices) ?? [], d = {
8300
8325
  paid: n("invoiceStatusPaid"),
8301
8326
  open: n("invoiceStatusDue"),
8302
8327
  draft: n("invoiceStatusDraft"),
@@ -8331,7 +8356,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8331
8356
  ] })
8332
8357
  ] }, c.id)) })
8333
8358
  ] });
8334
- }, Ci = ({ open: a, onOpenChange: e, onSuccess: t }) => {
8359
+ }, Ni = ({ open: a, onOpenChange: e, onSuccess: t }) => {
8335
8360
  var b;
8336
8361
  const { stripePromise: n, isDark: r, locale: s, isOutdatedBilling: i } = G(), { t: l } = oe(), d = fn(), c = (b = d.data) == null ? void 0 : b.clientSecret, { mutate: m, reset: u } = d;
8337
8362
  Ce(() => {
@@ -8371,23 +8396,23 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8371
8396
  ] }) : !g || !c ? /* @__PURE__ */ p("div", { className: "bpb-payment-dialog__loading", "aria-busy": "true", children: [
8372
8397
  /* @__PURE__ */ o(Y, { height: 48 }),
8373
8398
  /* @__PURE__ */ o(Y, { height: 120 })
8374
- ] }) : /* @__PURE__ */ o(tn, { stripe: n, options: g, children: /* @__PURE__ */ o(Qo, { clientSecret: c, isDark: r, onSuccess: t }) })
8399
+ ] }) : /* @__PURE__ */ o(tn, { stripe: n, options: g, children: /* @__PURE__ */ o(Zo, { clientSecret: c, isDark: r, onSuccess: t }) })
8375
8400
  ] })
8376
8401
  }
8377
8402
  );
8378
- }, Qo = ({
8403
+ }, Zo = ({
8379
8404
  clientSecret: a,
8380
8405
  isDark: e,
8381
8406
  onSuccess: t
8382
8407
  }) => {
8383
8408
  var Ie;
8384
- const n = en(), r = an(), { toast: s, analytics: i } = G(), { t: l } = oe(), { data: d, isLoading: c } = mn(), { data: m, isLoading: u } = gn(), { data: g, isLoading: b } = hn(), f = yn(), C = vn(), N = Cn(), v = ((Ie = d == null ? void 0 : d.paymentMethod) == null ? void 0 : Ie.card) ?? null, h = (m == null ? void 0 : m.address) ?? null, x = (g == null ? void 0 : g.taxIds) ?? [], [T, S] = K(!1), [k, w] = K(!1), [y, P] = K(!1), [A, I] = K(!1), [R, E] = K(null), [J, M] = K(!1), [B, Q] = K(!1), [z, H] = K(null), [_, ne] = K(h == null ? void 0 : h.country), [D, $] = K(x.length > 0), [V, O] = K(null), j = V ?? x.map((X) => ({ type: X.type, value: X.value })), le = Kn(_), ie = V !== null, Z = T || !v, ge = (X, ce) => O(j.map((ae, de) => de === X ? { ...ae, ...ce } : ae)), fe = () => {
8409
+ const n = en(), r = an(), { toast: s, analytics: i } = G(), { t: l } = oe(), { data: d, isLoading: c } = mn(), { data: m, isLoading: u } = gn(), { data: g, isLoading: b } = hn(), f = yn(), C = vn(), N = Cn(), v = ((Ie = d == null ? void 0 : d.paymentMethod) == null ? void 0 : Ie.card) ?? null, h = (m == null ? void 0 : m.address) ?? null, A = (g == null ? void 0 : g.taxIds) ?? [], [x, k] = K(!1), [S, w] = K(!1), [y, D] = K(!1), [T, I] = K(!1), [R, E] = K(null), [J, M] = K(!1), [B, Q] = K(!1), [z, H] = K(null), [_, ne] = K(h == null ? void 0 : h.country), [P, $] = K(A.length > 0), [V, U] = K(null), j = V ?? A.map((X) => ({ type: X.type, value: X.value })), le = Kn(_), ie = V !== null, Z = x || !v, ge = (X, ce) => U(j.map((ae, de) => de === X ? { ...ae, ...ce } : ae)), fe = () => {
8385
8410
  var X;
8386
- return O([...j, { type: ((X = le[0]) == null ? void 0 : X.type) ?? "", value: "" }]);
8387
- }, ye = (X) => O(j.filter((ce, ae) => ae !== X)), Le = async () => {
8411
+ return U([...j, { type: ((X = le[0]) == null ? void 0 : X.type) ?? "", value: "" }]);
8412
+ }, ye = (X) => U(j.filter((ce, ae) => ae !== X)), Le = async () => {
8388
8413
  if (!n || !r)
8389
8414
  return;
8390
- const X = r.getElement(wa);
8415
+ const X = r.getElement(Aa);
8391
8416
  if (X) {
8392
8417
  I(!0), E(null);
8393
8418
  try {
@@ -8402,7 +8427,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8402
8427
  E(l("paymentMethodMissing"));
8403
8428
  return;
8404
8429
  }
8405
- await f.mutateAsync({ paymentMethodId: ae.payment_method }), i.capture(pe.PAYMENT_METHOD_UPDATED), s({ type: "success", message: l("paymentCardUpdated") }), S(!1), t == null || t();
8430
+ await f.mutateAsync({ paymentMethodId: ae.payment_method }), i.capture(pe.PAYMENT_METHOD_UPDATED), s({ type: "success", message: l("paymentCardUpdated") }), k(!1), t == null || t();
8406
8431
  } catch {
8407
8432
  E(l("paymentCardGenericError"));
8408
8433
  } finally {
@@ -8444,19 +8469,19 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8444
8469
  /* @__PURE__ */ p("section", { className: "bpb-payment-dialog__section", children: [
8445
8470
  /* @__PURE__ */ o("h3", { className: "bpb-payment-dialog__section-title", children: l("paymentMethodSection") }),
8446
8471
  c ? /* @__PURE__ */ o(Y, { height: 56 }) : Z ? /* @__PURE__ */ p("div", { className: "bpb-payment-element", children: [
8447
- !k && /* @__PURE__ */ o(Y, { height: 48 }),
8448
- /* @__PURE__ */ o("div", { className: k ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ o(
8449
- wa,
8472
+ !S && /* @__PURE__ */ o(Y, { height: 48 }),
8473
+ /* @__PURE__ */ o("div", { className: S ? "bpb-card-element" : "bpb-payment-element--hidden", children: /* @__PURE__ */ o(
8474
+ Aa,
8450
8475
  {
8451
8476
  options: { style: Wn(e), hidePostalCode: !0 },
8452
8477
  onReady: () => w(!0),
8453
- onChange: (X) => P(X.complete)
8478
+ onChange: (X) => D(X.complete)
8454
8479
  }
8455
8480
  ) }),
8456
8481
  R && /* @__PURE__ */ o("p", { role: "alert", className: "bpb-payment-dialog__field-error", children: R }),
8457
8482
  /* @__PURE__ */ p("div", { className: "bpb-payment-dialog__section-actions", children: [
8458
- v && /* @__PURE__ */ o(be, { variant: "ghost", onClick: () => S(!1), disabled: A, children: l("cancel") }),
8459
- /* @__PURE__ */ o(be, { variant: "primary", disabled: !y, loading: A, onClick: Le, children: l("paymentSaveCard") })
8483
+ v && /* @__PURE__ */ o(be, { variant: "ghost", onClick: () => k(!1), disabled: T, children: l("cancel") }),
8484
+ /* @__PURE__ */ o(be, { variant: "primary", disabled: !y, loading: T, onClick: Le, children: l("paymentSaveCard") })
8460
8485
  ] })
8461
8486
  ] }) : /* @__PURE__ */ p("div", { className: "bpb-saved-card", children: [
8462
8487
  /* @__PURE__ */ o(jn, { brand: v.brand }),
@@ -8470,7 +8495,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8470
8495
  "/",
8471
8496
  String(v.expYear).slice(-2)
8472
8497
  ] }),
8473
- /* @__PURE__ */ o("button", { type: "button", className: "bpb-link-button", onClick: () => S(!0), children: l("paymentReplace") })
8498
+ /* @__PURE__ */ o("button", { type: "button", className: "bpb-link-button", onClick: () => k(!0), children: l("paymentReplace") })
8474
8499
  ] })
8475
8500
  ] }),
8476
8501
  /* @__PURE__ */ p("section", { className: "bpb-payment-dialog__section", children: [
@@ -8505,22 +8530,22 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8505
8530
  {
8506
8531
  type: "button",
8507
8532
  className: "bpb-tax-toggle",
8508
- "aria-expanded": D,
8533
+ "aria-expanded": P,
8509
8534
  onClick: () => $((X) => !X),
8510
8535
  children: [
8511
8536
  /* @__PURE__ */ o(
8512
8537
  ct,
8513
8538
  {
8514
8539
  size: 16,
8515
- className: U("bpb-tax-toggle__chevron", D && "bpb-tax-toggle__chevron--open")
8540
+ className: O("bpb-tax-toggle__chevron", P && "bpb-tax-toggle__chevron--open")
8516
8541
  }
8517
8542
  ),
8518
8543
  l("paymentTaxIds"),
8519
- x.length > 0 && /* @__PURE__ */ o("span", { className: "bpb-tax-toggle__count", children: x.length })
8544
+ A.length > 0 && /* @__PURE__ */ o("span", { className: "bpb-tax-toggle__count", children: A.length })
8520
8545
  ]
8521
8546
  }
8522
8547
  ),
8523
- D && /* @__PURE__ */ p("div", { className: "bpb-tax", children: [
8548
+ P && /* @__PURE__ */ p("div", { className: "bpb-tax", children: [
8524
8549
  j.length === 0 && /* @__PURE__ */ o("p", { className: "bpb-tax__empty", children: l("paymentTaxEmpty") }),
8525
8550
  j.map((X, ce) => /* @__PURE__ */ p("div", { className: "bpb-tax__row", children: [
8526
8551
  /* @__PURE__ */ p(
@@ -8537,7 +8562,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8537
8562
  }
8538
8563
  ),
8539
8564
  /* @__PURE__ */ o(
8540
- Ja,
8565
+ Qa,
8541
8566
  {
8542
8567
  placeholder: l("paymentTaxIdNumber"),
8543
8568
  value: X.value,
@@ -8580,7 +8605,7 @@ function Xn(a, e, t) {
8580
8605
  } catch {
8581
8606
  }
8582
8607
  }
8583
- const pt = 1e9, Zo = {
8608
+ const pt = 1e9, Xo = {
8584
8609
  incoming_messages_events: (a) => `${re(a)} incoming messages & events`,
8585
8610
  conversation_sessions: (a) => `${re(a)} conversation sessions`,
8586
8611
  table_rows: (a) => `${re(a)} table rows`,
@@ -8592,11 +8617,11 @@ const pt = 1e9, Zo = {
8592
8617
  ai_spend: (a) => `${ee(a / pt, "usd", 0)} AI credit included`,
8593
8618
  always_alive: (a) => a === 1 ? "1 always-alive bot" : `${re(a)} always-alive bots`
8594
8619
  };
8595
- function Ni(a, e, t) {
8596
- const n = (t == null ? void 0 : t[a]) ?? Zo[a];
8620
+ function _i(a, e, t) {
8621
+ const n = (t == null ? void 0 : t[a]) ?? Xo[a];
8597
8622
  return n ? n(e) : `${re(e)} ${a.replaceAll("_", " ")}`;
8598
8623
  }
8599
- const Xo = [
8624
+ const ei = [
8600
8625
  { key: "conversation_sessions", label: "Conversations", unit: "count" },
8601
8626
  { key: "ai_spend", label: "AI spend", unit: "nano-usd" },
8602
8627
  { key: "table_rows", label: "Table rows", unit: "count" },
@@ -8609,8 +8634,8 @@ function ga(a, e) {
8609
8634
  function mt(a) {
8610
8635
  return a >= 90 ? "critical" : a >= 75 ? "warning" : "normal";
8611
8636
  }
8612
- function Ba(a) {
8613
- return a ? Xo.flatMap(({ key: e, label: t, unit: n }) => {
8637
+ function za(a) {
8638
+ return a ? ei.flatMap(({ key: e, label: t, unit: n }) => {
8614
8639
  const r = a[e];
8615
8640
  if (!r || r.quota <= 0)
8616
8641
  return [];
@@ -8618,11 +8643,11 @@ function Ba(a) {
8618
8643
  return [{ key: e, label: t, unit: n, used: s, quota: r.quota, remaining: Math.max(0, r.quota - s), pct: i }];
8619
8644
  }).sort((e, t) => t.pct - e.pct) : [];
8620
8645
  }
8621
- const Jt = "outgrow-free", ei = 0.75, ai = 5;
8622
- function ti(a, e) {
8646
+ const Jt = "outgrow-free", ai = 0.75, ti = 5;
8647
+ function ni(a, e) {
8623
8648
  return a.prices[e] ?? (e === "month" ? a.prices.year : a.prices.month) ?? null;
8624
8649
  }
8625
- function ni(a, e) {
8650
+ function ri(a, e) {
8626
8651
  var r, s;
8627
8652
  const t = (r = a.prices.month) == null ? void 0 : r.amount;
8628
8653
  if (e === "month")
@@ -8630,7 +8655,7 @@ function ni(a, e) {
8630
8655
  const n = ((s = a.prices.year) == null ? void 0 : s.amount) ?? (t === void 0 ? void 0 : t * 12);
8631
8656
  return n === void 0 ? null : n / 12;
8632
8657
  }
8633
- const _i = ({
8658
+ const Si = ({
8634
8659
  open: a,
8635
8660
  onOpenChange: e,
8636
8661
  onSelectPlan: t,
@@ -8641,7 +8666,7 @@ const _i = ({
8641
8666
  period: l
8642
8667
  }) => {
8643
8668
  var J, M;
8644
- const { isOutdatedBilling: d, analytics: c, scope: m } = G(), { t: u } = oe(), { data: g } = ze(), { data: b } = ia(), { data: f } = Fe({ enabled: !d }), { data: C } = la({ period: l, enabled: !d }), N = a !== void 0, [v, h] = K(!1), x = g == null ? void 0 : g.find((B) => B.id === (f == null ? void 0 : f.plan.current.planId)), T = f ? x ? ue(x) === "community" : !0 : !1, S = _e(() => Ba(C).find((B) => B.key === "conversation_sessions"), [C]), k = !N && !d && T && !!S && S.pct / 100 >= ei && !v && !Zn(Jt, m, "modal"), w = N ? !!a : k;
8669
+ const { isOutdatedBilling: d, analytics: c, scope: m } = G(), { t: u } = oe(), { data: g } = ze(), { data: b } = ia(), { data: f } = Fe({ enabled: !d }), { data: C } = la({ period: l, enabled: !d }), N = a !== void 0, [v, h] = K(!1), A = g == null ? void 0 : g.find((B) => B.id === (f == null ? void 0 : f.plan.current.planId)), x = f ? A ? ue(A) === "community" : !0 : !1, k = _e(() => za(C).find((B) => B.key === "conversation_sessions"), [C]), S = !N && !d && x && !!k && k.pct / 100 >= ai && !v && !Zn(Jt, m, "modal"), w = N ? !!a : S;
8645
8670
  Ce(() => {
8646
8671
  w && c.capture(pe.PLAN_PICKER_VIEWED, {
8647
8672
  source: N ? "outgrow_free" : "outgrow_free_auto",
@@ -8650,13 +8675,13 @@ const _i = ({
8650
8675
  }, [w, N, c]);
8651
8676
  const y = () => {
8652
8677
  N || (Xn(Jt, m, "modal"), h(!0)), e == null || e(!1);
8653
- }, P = _e(() => g ? g.filter((B) => {
8678
+ }, D = _e(() => g ? g.filter((B) => {
8654
8679
  const Q = ue(B);
8655
8680
  return Q !== "community" && Q !== "enterprise" && Q !== "managed";
8656
- }).sort((B, Q) => na.indexOf(ue(B)) - na.indexOf(ue(Q))) : [], [g]), A = ((M = (J = g == null ? void 0 : g.find((B) => ue(B) === "enterprise")) == null ? void 0 : J.metadata) == null ? void 0 : M.contact_url) ?? Bn;
8681
+ }).sort((B, Q) => na.indexOf(ue(B)) - na.indexOf(ue(Q))) : [], [g]), T = ((M = (J = g == null ? void 0 : g.find((B) => ue(B) === "enterprise")) == null ? void 0 : J.metadata) == null ? void 0 : M.contact_url) ?? Bn;
8657
8682
  if (d || !w)
8658
8683
  return null;
8659
- const I = (S == null ? void 0 : S.quota) ?? (x == null ? void 0 : x.features.conversation_sessions) ?? 100, R = (S == null ? void 0 : S.used) ?? 0, E = S && S.pct > 0 ? Math.min(100, Math.max(5, Math.round(S.pct))) : 0;
8684
+ const I = (k == null ? void 0 : k.quota) ?? (A == null ? void 0 : A.features.conversation_sessions) ?? 100, R = (k == null ? void 0 : k.used) ?? 0, E = k && k.pct > 0 ? Math.min(100, Math.max(5, Math.round(k.pct))) : 0;
8660
8685
  return /* @__PURE__ */ o(xe, { open: w, onOpenChange: y, size: "xl", "aria-label": u("outgrowTitle"), children: /* @__PURE__ */ p("div", { className: "bpb-outgrow", children: [
8661
8686
  /* @__PURE__ */ p("header", { className: "bpb-outgrow__head", children: [
8662
8687
  /* @__PURE__ */ o("h2", { className: "bpb-outgrow__title", children: u("outgrowTitle") }),
@@ -8691,12 +8716,12 @@ const _i = ({
8691
8716
  }
8692
8717
  ) })
8693
8718
  ] }),
8694
- /* @__PURE__ */ o("div", { className: "bpb-outgrow__grid", children: P.map((B, Q) => {
8695
- const z = ue(B), H = ti(B, r), _ = ni(B, r), ne = z === n || B.id === n, D = B.features.conversation_sessions, $ = nt(b, B, r), V = Q > 0 ? P[Q - 1] : void 0, O = (s[z] ?? rt[z]).slice(0, ai);
8719
+ /* @__PURE__ */ o("div", { className: "bpb-outgrow__grid", children: D.map((B, Q) => {
8720
+ const z = ue(B), H = ni(B, r), _ = ri(B, r), ne = z === n || B.id === n, P = B.features.conversation_sessions, $ = nt(b, B, r), V = Q > 0 ? D[Q - 1] : void 0, U = (s[z] ?? rt[z]).slice(0, ti);
8696
8721
  return /* @__PURE__ */ p(
8697
8722
  "div",
8698
8723
  {
8699
- className: U("bpb-plan-card", ne && "bpb-plan-card--highlighted bpb-glow"),
8724
+ className: O("bpb-plan-card", ne && "bpb-plan-card--highlighted bpb-glow"),
8700
8725
  "data-plan-id": B.id,
8701
8726
  children: [
8702
8727
  /* @__PURE__ */ p("div", { className: "bpb-plan-card__header", children: [
@@ -8705,18 +8730,18 @@ const _i = ({
8705
8730
  ne && /* @__PURE__ */ o(st, { className: "bpb-plan-card__badge", children: u("upgradeRecommended") })
8706
8731
  ] }),
8707
8732
  /* @__PURE__ */ o("div", { className: "bpb-plan-card__price", children: _ !== null && H ? /* @__PURE__ */ p(ve, { children: [
8708
- /* @__PURE__ */ o("span", { className: "bpb-plan-card__currency", children: Na(H.currency) }),
8733
+ /* @__PURE__ */ o("span", { className: "bpb-plan-card__currency", children: _a(H.currency) }),
8709
8734
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__amount", children: Number.isInteger(_) ? _ : _.toFixed(2).replace(/\.00$/, "") }),
8710
8735
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__per", children: u("perMonth") })
8711
8736
  ] }) : /* @__PURE__ */ p("span", { className: "bpb-plan-card__amount", children: [
8712
- Na((H == null ? void 0 : H.currency) ?? "usd"),
8737
+ _a((H == null ? void 0 : H.currency) ?? "usd"),
8713
8738
  "0"
8714
8739
  ] }) })
8715
8740
  ] }),
8716
- D !== void 0 && /* @__PURE__ */ p("div", { className: "bpb-outgrow__allowance", children: [
8741
+ P !== void 0 && /* @__PURE__ */ p("div", { className: "bpb-outgrow__allowance", children: [
8717
8742
  /* @__PURE__ */ p("p", { className: "bpb-outgrow__allowance-value", children: [
8718
8743
  /* @__PURE__ */ p("strong", { children: [
8719
- re(D),
8744
+ re(P),
8720
8745
  " ",
8721
8746
  u("conversationsUnit")
8722
8747
  ] }),
@@ -8724,7 +8749,7 @@ const _i = ({
8724
8749
  u("perMonth")
8725
8750
  ] }),
8726
8751
  /* @__PURE__ */ o("p", { className: "bpb-outgrow__allowance-pack", children: $ ? u("outgrowThenPer", {
8727
- symbol: Na($.currency),
8752
+ symbol: _a($.currency),
8728
8753
  amount: $.amount,
8729
8754
  packSize: re($.packSize)
8730
8755
  }) : u("outgrowNoTopup") })
@@ -8749,11 +8774,11 @@ const _i = ({
8749
8774
  ),
8750
8775
  /* @__PURE__ */ p("ul", { className: "bpb-plan-card__features", children: [
8751
8776
  V && /* @__PURE__ */ o("li", { className: "bpb-outgrow__features-lead", children: u("outgrowEverythingIn", { planName: se(V.name) }) }),
8752
- O.map((j) => {
8777
+ U.map((j) => {
8753
8778
  const le = ut(j), ie = On[j], Z = ie !== void 0 ? u(ie.label) : j, ge = (i == null ? void 0 : i[j]) ?? (ie !== void 0 ? u(ie.desc) : void 0);
8754
8779
  return /* @__PURE__ */ p("li", { children: [
8755
8780
  /* @__PURE__ */ o("span", { className: "bpb-plan-card__feature-chip", children: /* @__PURE__ */ o(le, { size: 13 }) }),
8756
- ge ? /* @__PURE__ */ o(La, { label: Z, children: ge }) : /* @__PURE__ */ o("span", { children: Z })
8781
+ ge ? /* @__PURE__ */ o(Ia, { label: Z, children: ge }) : /* @__PURE__ */ o("span", { children: Z })
8757
8782
  ] }, j);
8758
8783
  })
8759
8784
  ] })
@@ -8766,7 +8791,7 @@ const _i = ({
8766
8791
  /* @__PURE__ */ p("span", { children: [
8767
8792
  u("outgrowNeedCustom"),
8768
8793
  " ",
8769
- /* @__PURE__ */ o("a", { href: A, target: "_blank", rel: "noopener noreferrer", children: u("outgrowTalkToSales") })
8794
+ /* @__PURE__ */ o("a", { href: T, target: "_blank", rel: "noopener noreferrer", children: u("outgrowTalkToSales") })
8770
8795
  ] }),
8771
8796
  /* @__PURE__ */ p(
8772
8797
  "a",
@@ -8777,13 +8802,13 @@ const _i = ({
8777
8802
  rel: "noopener noreferrer",
8778
8803
  children: [
8779
8804
  u("outgrowCompareAll"),
8780
- /* @__PURE__ */ o(Ma, { size: 14 })
8805
+ /* @__PURE__ */ o(Ba, { size: 14 })
8781
8806
  ]
8782
8807
  }
8783
8808
  )
8784
8809
  ] })
8785
8810
  ] }) });
8786
- }, Be = (a, e) => e === "bytes" ? ra(a) : e === "nano-usd" ? `$${(a / pt).toFixed(2)}` : re(a), ri = (a, e) => {
8811
+ }, Be = (a, e) => e === "bytes" ? ra(a) : e === "nano-usd" ? `$${(a / pt).toFixed(2)}` : re(a), si = (a, e) => {
8787
8812
  const t = /* @__PURE__ */ new Date();
8788
8813
  return Array.from({ length: a }, (n, r) => {
8789
8814
  const s = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth() - r, 1));
@@ -8792,8 +8817,8 @@ const _i = ({
8792
8817
  label: s.toLocaleDateString(e, { month: "long", year: "numeric", timeZone: "UTC" })
8793
8818
  };
8794
8819
  });
8795
- }, si = ({ period: a }) => {
8796
- const { data: e, isLoading: t, isError: n } = ys("ai_spend", { period: a }), { t: r } = oe();
8820
+ }, oi = ({ period: a }) => {
8821
+ const { data: e, isLoading: t, isError: n } = vs("ai_spend", { period: a }), { t: r } = oe();
8797
8822
  if (n)
8798
8823
  return null;
8799
8824
  if (t)
@@ -8810,157 +8835,176 @@ const _i = ({
8810
8835
  "div",
8811
8836
  {
8812
8837
  className: "bpb-usage-bar__fill bpb-usage-bar__fill--normal",
8813
- style: { width: `${Math.max(2, Math.round(i.value / s * 100))}%` }
8838
+ style: { width: `${i.value > 0 ? Math.max(2, Math.round(i.value / s * 100)) : 0}%` }
8814
8839
  }
8815
8840
  ) })
8816
8841
  ] }, i.botId)) });
8817
- }, ja = ({
8842
+ }, Va = ({
8818
8843
  entry: a,
8819
8844
  metric: e,
8820
8845
  planAllowance: t,
8821
- planName: n
8846
+ planName: n,
8847
+ stacked: r
8822
8848
  }) => {
8823
- const { t: r } = oe(), s = a.usage ?? 0, i = a.quota > 0 ? Math.max(0, Math.min(100, Math.round(s / a.quota * 100))) : 0, l = i > 0 ? Math.max(5, i) : 0, d = i >= 90 ? "critical" : i >= 75 ? "warning" : "normal", c = t ?? a.quota, m = Math.max(0, a.quota - c), u = m > 0 ? n ? r("dashboardFromPlanWithAddons", {
8824
- amount: Be(c, e.unit),
8849
+ const { t: s } = oe(), i = a.usage ?? 0, l = a.quota > 0 ? Math.max(0, Math.min(100, Math.round(i / a.quota * 100))) : 0, d = l > 0 ? Math.max(5, l) : 0, c = l >= 90 ? "critical" : l >= 75 ? "warning" : "normal", m = t ?? a.quota, u = Math.max(0, a.quota - m), g = u > 0 ? n ? s("dashboardFromPlanWithAddons", {
8850
+ amount: Be(m, e.unit),
8825
8851
  planName: n,
8826
- addonAmount: Be(m, e.unit)
8827
- }) : r("dashboardFromPlanGenericWithAddons", {
8828
- amount: Be(c, e.unit),
8829
- addonAmount: Be(m, e.unit)
8830
- }) : n ? r("dashboardFromPlan", { amount: Be(a.quota, e.unit), planName: n }) : r("dashboardFromPlanGeneric", { amount: Be(a.quota, e.unit) });
8852
+ addonAmount: Be(u, e.unit)
8853
+ }) : s("dashboardFromPlanGenericWithAddons", {
8854
+ amount: Be(m, e.unit),
8855
+ addonAmount: Be(u, e.unit)
8856
+ }) : n ? s("dashboardFromPlan", { amount: Be(a.quota, e.unit), planName: n }) : s("dashboardFromPlanGeneric", { amount: Be(a.quota, e.unit) });
8831
8857
  return /* @__PURE__ */ p("div", { className: "bpb-usage-row", children: [
8832
- /* @__PURE__ */ p("div", { className: "bpb-usage-row__head", children: [
8858
+ /* @__PURE__ */ p("div", { className: O("bpb-usage-row__head", r && "bpb-usage-row__head--stacked"), children: [
8833
8859
  /* @__PURE__ */ o("span", { className: "bpb-usage-row__label", children: e.label }),
8834
8860
  /* @__PURE__ */ p("span", { className: "bpb-usage-row__value", children: [
8835
- /* @__PURE__ */ o("span", { className: "bpb-usage-row__used", children: Be(s, e.unit) }),
8861
+ /* @__PURE__ */ o("span", { className: "bpb-usage-row__used", children: Be(i, e.unit) }),
8836
8862
  /* @__PURE__ */ p("span", { className: "bpb-usage-row__quota", children: [
8837
8863
  " / ",
8838
8864
  Be(a.quota, e.unit)
8839
8865
  ] })
8840
8866
  ] })
8841
8867
  ] }),
8842
- /* @__PURE__ */ p("span", { className: "bpb-usage-tip", tabIndex: 0, role: "note", "aria-label": u, children: [
8843
- /* @__PURE__ */ o("div", { className: "bpb-usage-bar", role: "progressbar", "aria-valuenow": i, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ o(
8844
- "div",
8845
- {
8846
- className: U("bpb-usage-bar__fill", `bpb-usage-bar__fill--${d}`),
8847
- style: { width: `${l}%` }
8848
- }
8849
- ) }),
8850
- /* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children: u })
8851
- ] })
8868
+ /* @__PURE__ */ p(
8869
+ "span",
8870
+ {
8871
+ className: "bpb-usage-tip",
8872
+ tabIndex: 0,
8873
+ role: "note",
8874
+ "aria-label": g,
8875
+ onMouseMove: (b) => {
8876
+ const f = b.currentTarget.getBoundingClientRect(), C = (b.clientX - f.left) / f.width * 100;
8877
+ b.currentTarget.style.setProperty("--bpb-tip-x", `${C}%`);
8878
+ },
8879
+ children: [
8880
+ /* @__PURE__ */ o("div", { className: "bpb-usage-bar", role: "progressbar", "aria-valuenow": l, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ o(
8881
+ "div",
8882
+ {
8883
+ className: O("bpb-usage-bar__fill", `bpb-usage-bar__fill--${c}`),
8884
+ style: { width: `${d}%` }
8885
+ }
8886
+ ) }),
8887
+ /* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children: g })
8888
+ ]
8889
+ }
8890
+ )
8852
8891
  ] });
8853
- }, Si = ({
8892
+ }, ki = ({
8854
8893
  period: a,
8855
8894
  showPeriodSelector: e = !0,
8856
8895
  periodMonths: t = 12,
8857
8896
  className: n
8858
8897
  }) => {
8859
- var P;
8860
- const { isOutdatedBilling: r, locale: s } = G(), { t: i } = oe(), l = _e(() => ri(t, s), [t, s]), [d, c] = K(a ?? ((P = l[0]) == null ? void 0 : P.value) ?? ""), m = vs(), u = Math.max(
8898
+ var D;
8899
+ const { isOutdatedBilling: r, locale: s } = G(), { t: i } = oe(), l = _e(() => si(t, s), [t, s]), [d, c] = K(a ?? ((D = l[0]) == null ? void 0 : D.value) ?? ""), m = Cs(), u = Math.max(
8861
8900
  0,
8862
- l.findIndex((A) => A.value === d)
8863
- ), g = (A) => {
8864
- const I = l[u + A];
8901
+ l.findIndex((T) => T.value === d)
8902
+ ), g = (T) => {
8903
+ const I = l[u + T];
8865
8904
  I && c(I.value);
8866
- }, { data: b, isLoading: f, isError: C } = la({ period: d, enabled: !r }), { data: N } = Fe({ enabled: !r }), { data: v } = ze(), h = v == null ? void 0 : v.find((A) => A.id === (N == null ? void 0 : N.plan.current.planId)), x = h ? se(h.name) : void 0, T = (A) => h == null ? void 0 : h.features[A];
8905
+ }, { data: b, isLoading: f, isError: C } = la({ period: d, enabled: !r }), { data: N } = Fe({ enabled: !r }), { data: v } = ze(), h = v == null ? void 0 : v.find((T) => T.id === (N == null ? void 0 : N.plan.current.planId)), A = h ? se(h.name) : void 0, x = (T) => h == null ? void 0 : h.features[T];
8867
8906
  if (r)
8868
- return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o(ca, {}) });
8907
+ return /* @__PURE__ */ o("div", { className: O("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o(ca, {}) });
8869
8908
  if (f)
8870
- return /* @__PURE__ */ p("div", { className: U("bpb-usage bpb-scope", n), "aria-busy": "true", children: [
8909
+ return /* @__PURE__ */ p("div", { className: O("bpb-usage bpb-scope", n), "aria-busy": "true", children: [
8871
8910
  /* @__PURE__ */ o(Y, { height: 80 }),
8872
8911
  /* @__PURE__ */ o(Y, { height: 140 })
8873
8912
  ] });
8874
8913
  if (C || !b)
8875
- return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o("p", { className: "bpb-usage__error", role: "alert", children: i("dashboardLoadError") }) });
8876
- const S = b.conversation_sessions, k = b.ai_spend, y = [
8914
+ return /* @__PURE__ */ o("div", { className: O("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o("p", { className: "bpb-usage__error", role: "alert", children: i("dashboardLoadError") }) });
8915
+ const k = b.conversation_sessions, S = b.ai_spend, y = [
8877
8916
  { key: "table_rows", label: i("dashboardTableRows"), unit: "count" },
8878
8917
  { key: "vector_db_storage", label: i("dashboardVectorDb"), unit: "bytes" },
8879
8918
  { key: "file_storage", label: i("dashboardFileStorage"), unit: "bytes" }
8880
- ].filter((A) => b[A.key]);
8881
- return /* @__PURE__ */ p("div", { className: U("bpb-usage bpb-scope", n), children: [
8882
- e && l.length > 1 && /* @__PURE__ */ p("div", { className: "bpb-usage__header", children: [
8883
- /* @__PURE__ */ o("span", { className: "bpb-usage__header-title", children: i("dashboardUsage") }),
8884
- /* @__PURE__ */ p("div", { className: "bpb-usage__period", children: [
8885
- /* @__PURE__ */ o("span", { className: "bpb-usage__period-label", children: i("dashboardBillingPeriod") }),
8886
- /* @__PURE__ */ p("div", { className: "bpb-usage__period-control", children: [
8919
+ ].filter((T) => b[T.key]);
8920
+ return /* @__PURE__ */ p("div", { className: O("bpb-usage bpb-scope", n), children: [
8921
+ e && l.length > 1 && /* @__PURE__ */ o("div", { className: "bpb-usage__header", children: /* @__PURE__ */ p("div", { className: "bpb-usage__period", children: [
8922
+ /* @__PURE__ */ o("span", { className: "bpb-usage__period-label", children: i("dashboardBillingPeriod") }),
8923
+ /* @__PURE__ */ p("div", { className: "bpb-usage__period-control", children: [
8924
+ /* @__PURE__ */ o(
8925
+ "button",
8926
+ {
8927
+ type: "button",
8928
+ className: "bpb-usage__period-step",
8929
+ "aria-label": i("dashboardPrevMonth"),
8930
+ onClick: () => g(1),
8931
+ disabled: u >= l.length - 1,
8932
+ children: /* @__PURE__ */ o(qn, { size: 15 })
8933
+ }
8934
+ ),
8935
+ /* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
8936
+ /* @__PURE__ */ o(Lo, { size: 15, className: "bpb-usage__period-icon" }),
8887
8937
  /* @__PURE__ */ o(
8888
- "button",
8938
+ "select",
8889
8939
  {
8890
- type: "button",
8891
- className: "bpb-usage__period-step",
8892
- "aria-label": i("dashboardPrevMonth"),
8893
- onClick: () => g(1),
8894
- disabled: u >= l.length - 1,
8895
- children: /* @__PURE__ */ o(qn, { size: 15 })
8940
+ className: "bpb-usage__period-select",
8941
+ "aria-label": i("dashboardBillingPeriod"),
8942
+ value: d,
8943
+ onChange: (T) => c(T.target.value),
8944
+ children: l.map((T) => /* @__PURE__ */ o("option", { value: T.value, children: T.label }, T.value))
8896
8945
  }
8897
8946
  ),
8898
- /* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
8899
- /* @__PURE__ */ o(Fo, { size: 15, className: "bpb-usage__period-icon" }),
8900
- /* @__PURE__ */ o(
8901
- "select",
8902
- {
8903
- className: "bpb-usage__period-select",
8904
- "aria-label": i("dashboardBillingPeriod"),
8905
- value: d,
8906
- onChange: (A) => c(A.target.value),
8907
- children: l.map((A) => /* @__PURE__ */ o("option", { value: A.value, children: A.label }, A.value))
8908
- }
8909
- ),
8910
- /* @__PURE__ */ o(ct, { size: 14, className: "bpb-usage__period-chevron" })
8911
- ] }),
8912
- /* @__PURE__ */ o(
8913
- "button",
8914
- {
8915
- type: "button",
8916
- className: "bpb-usage__period-step",
8917
- "aria-label": i("dashboardNextMonth"),
8918
- onClick: () => g(-1),
8919
- disabled: u <= 0,
8920
- children: /* @__PURE__ */ o(sa, { size: 15 })
8921
- }
8922
- )
8923
- ] })
8947
+ /* @__PURE__ */ o(ct, { size: 14, className: "bpb-usage__period-chevron" })
8948
+ ] }),
8949
+ /* @__PURE__ */ o(
8950
+ "button",
8951
+ {
8952
+ type: "button",
8953
+ className: "bpb-usage__period-step",
8954
+ "aria-label": i("dashboardNextMonth"),
8955
+ onClick: () => g(-1),
8956
+ disabled: u <= 0,
8957
+ children: /* @__PURE__ */ o(sa, { size: 15 })
8958
+ }
8959
+ )
8924
8960
  ] })
8925
- ] }),
8926
- S && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8961
+ ] }) }),
8962
+ k && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8927
8963
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardConversationsTitle") }),
8928
8964
  /* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: i("dashboardConversationsHint") }),
8929
8965
  /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(
8930
- ja,
8966
+ Va,
8931
8967
  {
8932
- entry: S,
8968
+ entry: k,
8933
8969
  metric: { key: "conversation_sessions", label: i("dashboardConversationsMetric"), unit: "count" },
8934
- planAllowance: T("conversation_sessions"),
8935
- planName: x
8970
+ planAllowance: x("conversation_sessions"),
8971
+ planName: A,
8972
+ stacked: !0
8936
8973
  }
8937
8974
  ) })
8938
8975
  ] }),
8939
8976
  y.length > 0 && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8940
8977
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardStorageTitle") }),
8941
8978
  /* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: i("dashboardStorageHint") }),
8942
- /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: y.map((A) => /* @__PURE__ */ o(
8943
- ja,
8979
+ /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: y.map((T) => /* @__PURE__ */ o(
8980
+ Va,
8944
8981
  {
8945
- entry: b[A.key],
8946
- metric: A,
8947
- planAllowance: T(A.key),
8948
- planName: x
8982
+ entry: b[T.key],
8983
+ metric: T,
8984
+ planAllowance: x(T.key),
8985
+ planName: A
8949
8986
  },
8950
- A.key
8987
+ T.key
8951
8988
  )) })
8952
8989
  ] }),
8953
- k && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8990
+ S && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8954
8991
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardAiTitle") }),
8955
8992
  /* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: i("dashboardAiHint") }),
8956
- /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(ja, { entry: k, metric: { key: "ai_spend", label: i("dashboardAiSpend"), unit: "nano-usd" } }) }),
8993
+ /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(
8994
+ Va,
8995
+ {
8996
+ entry: S,
8997
+ metric: { key: "ai_spend", label: i("dashboardAiSpend"), unit: "nano-usd" },
8998
+ stacked: !0
8999
+ }
9000
+ ) }),
8957
9001
  m && /* @__PURE__ */ p("div", { className: "bpb-usage__card bpb-usage__card--bots", children: [
8958
9002
  /* @__PURE__ */ o("span", { className: "bpb-usage__subhead", children: i("dashboardAiByBot") }),
8959
- /* @__PURE__ */ o(si, { period: d })
9003
+ /* @__PURE__ */ o(oi, { period: d })
8960
9004
  ] })
8961
9005
  ] })
8962
9006
  ] });
8963
- }, Qt = "usage-banner", ki = ({
9007
+ }, Qt = "usage-banner", wi = ({
8964
9008
  position: a = "inline",
8965
9009
  threshold: e = 0.9,
8966
9010
  onUpgrade: t,
@@ -8969,37 +9013,37 @@ const _i = ({
8969
9013
  period: s,
8970
9014
  className: i
8971
9015
  }) => {
8972
- const { isOutdatedBilling: l, analytics: d, scope: c } = G(), { t: m } = oe(), { data: u } = la({ period: s, enabled: !l }), [g, b] = K({}), [f, C] = K(!1), [N, v] = K(null), h = u ? Object.entries(u).map(([A, I]) => ({ key: A, pct: I.quota > 0 ? (I.usage ?? 0) / I.quota : 0 })).filter((A) => A.pct >= e).sort((A, I) => I.pct - A.pct)[0] : void 0, x = !!h && (g[h.key] || Zn(Qt, c, h.key));
8973
- if (l || !h || x)
9016
+ const { isOutdatedBilling: l, analytics: d, scope: c } = G(), { t: m } = oe(), { data: u } = la({ period: s, enabled: !l }), [g, b] = K({}), [f, C] = K(!1), [N, v] = K(null), h = u ? Object.entries(u).map(([T, I]) => ({ key: T, pct: I.quota > 0 ? (I.usage ?? 0) / I.quota : 0 })).filter((T) => T.pct >= e).sort((T, I) => I.pct - T.pct)[0] : void 0, A = !!h && (g[h.key] || Zn(Qt, c, h.key));
9017
+ if (l || !h || A)
8974
9018
  return null;
8975
- const S = {
9019
+ const k = {
8976
9020
  conversation_sessions: m("metricConversations"),
8977
9021
  table_rows: m("metricTableRows"),
8978
9022
  vector_db_storage: m("metricVectorDb"),
8979
9023
  file_storage: m("metricFileStorage"),
8980
9024
  ai_spend: m("metricAiSpend")
8981
- }[h.key] ?? h.key.replace(/_/g, " "), k = Math.min(100, Math.round(h.pct * 100)), w = h.pct >= 1, y = () => {
9025
+ }[h.key] ?? h.key.replace(/_/g, " "), S = Math.min(100, Math.round(h.pct * 100)), w = h.pct >= 1, y = () => {
8982
9026
  d.capture(pe.UPGRADE_CTA_CLICKED, {
8983
9027
  source: "usage_banner",
8984
9028
  metric: h.key,
8985
9029
  usage_pct: Math.round(h.pct * 100)
8986
9030
  }), t ? t() : C(!0);
8987
- }, P = w ? "critical" : "warning";
9031
+ }, D = w ? "critical" : "warning";
8988
9032
  return /* @__PURE__ */ p(ve, { children: [
8989
9033
  /* @__PURE__ */ p(
8990
9034
  "div",
8991
9035
  {
8992
- className: U(
9036
+ className: O(
8993
9037
  "bpb-usage-banner bpb-scope",
8994
9038
  `bpb-usage-banner--${a}`,
8995
- `bpb-usage-banner--${P}`,
9039
+ `bpb-usage-banner--${D}`,
8996
9040
  i
8997
9041
  ),
8998
9042
  role: "alert",
8999
9043
  "aria-live": "polite",
9000
9044
  children: [
9001
9045
  /* @__PURE__ */ o($n, { size: 18, className: "bpb-usage-banner__icon" }),
9002
- /* @__PURE__ */ o("p", { className: "bpb-usage-banner__text", children: w ? m("usageBannerLimitReached", { label: S }) : m("usageBannerNearLimit", { pct: k, label: S }) }),
9046
+ /* @__PURE__ */ o("p", { className: "bpb-usage-banner__text", children: w ? m("usageBannerLimitReached", { label: k }) : m("usageBannerNearLimit", { pct: S, label: k }) }),
9003
9047
  /* @__PURE__ */ p("div", { className: "bpb-usage-banner__actions", children: [
9004
9048
  /* @__PURE__ */ o(be, { variant: "primary", size: "sm", onClick: y, children: r ?? m("usageBannerDefaultCta") }),
9005
9049
  n && /* @__PURE__ */ o(
@@ -9009,7 +9053,7 @@ const _i = ({
9009
9053
  className: "bpb-usage-banner__dismiss",
9010
9054
  "aria-label": m("usageBannerDismiss"),
9011
9055
  onClick: () => {
9012
- Xn(Qt, c, h.key), b((A) => ({ ...A, [h.key]: !0 }));
9056
+ Xn(Qt, c, h.key), b((T) => ({ ...T, [h.key]: !0 }));
9013
9057
  },
9014
9058
  children: /* @__PURE__ */ o(lt, { size: 16 })
9015
9059
  }
@@ -9020,20 +9064,20 @@ const _i = ({
9020
9064
  ),
9021
9065
  !t && /* @__PURE__ */ p(ve, { children: [
9022
9066
  /* @__PURE__ */ o(
9023
- Mo,
9067
+ Bo,
9024
9068
  {
9025
9069
  open: f,
9026
9070
  onOpenChange: C,
9027
- onSelectPlan: (A, I) => {
9028
- C(!1), v({ planId: A, interval: I });
9071
+ onSelectPlan: (T, I) => {
9072
+ C(!1), v({ planId: T, interval: I });
9029
9073
  }
9030
9074
  }
9031
9075
  ),
9032
9076
  N && /* @__PURE__ */ o(
9033
- Ko,
9077
+ Ho,
9034
9078
  {
9035
9079
  open: !!N,
9036
- onOpenChange: (A) => !A && v(null),
9080
+ onOpenChange: (T) => !T && v(null),
9037
9081
  planId: N.planId,
9038
9082
  interval: N.interval,
9039
9083
  onBack: () => {
@@ -9044,7 +9088,7 @@ const _i = ({
9044
9088
  )
9045
9089
  ] })
9046
9090
  ] });
9047
- }, wi = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ p("button", { type: "button", className: U("bpb-action-card bpb-scope", r), onClick: n, children: [
9091
+ }, Ai = ({ Icon: a, title: e, description: t, onClick: n, className: r }) => /* @__PURE__ */ p("button", { type: "button", className: O("bpb-action-card bpb-scope", r), onClick: n, children: [
9048
9092
  /* @__PURE__ */ p("div", { className: "bpb-action-card__header", children: [
9049
9093
  /* @__PURE__ */ o(a, { size: 20 }),
9050
9094
  e
@@ -9056,7 +9100,7 @@ const _i = ({
9056
9100
  "button",
9057
9101
  {
9058
9102
  type: "button",
9059
- className: U(
9103
+ className: O(
9060
9104
  "bpb-summary-card bpb-scope",
9061
9105
  a ? "bpb-summary-card--addons" : "bpb-summary-card--plan",
9062
9106
  e
@@ -9073,25 +9117,25 @@ const _i = ({
9073
9117
  ] }),
9074
9118
  /* @__PURE__ */ p("span", { className: "bpb-summary-card__action", children: [
9075
9119
  n("open"),
9076
- /* @__PURE__ */ o(Ma, { size: 15 })
9120
+ /* @__PURE__ */ o(Ba, { size: 15 })
9077
9121
  ] })
9078
9122
  ] })
9079
9123
  ]
9080
9124
  }
9081
9125
  );
9082
- }, Ai = ({ onManage: a, className: e }) => {
9126
+ }, xi = ({ onManage: a, className: e }) => {
9083
9127
  var C, N;
9084
9128
  const { isOutdatedBilling: t } = G(), { t: n } = oe(), { data: r, isLoading: s } = Fe({ enabled: !t }), { data: i, isLoading: l } = ze();
9085
9129
  if (t)
9086
9130
  return /* @__PURE__ */ o(er, { isAddons: !1, className: e });
9087
9131
  if (s || l)
9088
- return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: U("bpb-scope", e) });
9132
+ return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: O("bpb-scope", e) });
9089
9133
  const d = r == null ? void 0 : r.plan.current, c = i == null ? void 0 : i.find((v) => v.id === (d == null ? void 0 : d.planId)), m = (d == null ? void 0 : d.interval) ?? "month", u = ((C = c == null ? void 0 : c.prices[m]) == null ? void 0 : C.amount) ?? 0, g = ((N = c == null ? void 0 : c.prices[m]) == null ? void 0 : N.currency) ?? "usd", b = c == null ? void 0 : c.features.conversation_sessions, f = c ? ue(c) : "community";
9090
9134
  return /* @__PURE__ */ p(
9091
9135
  "button",
9092
9136
  {
9093
9137
  type: "button",
9094
- className: U(
9138
+ className: O(
9095
9139
  "bpb-summary-card bpb-summary-card--plan bpb-scope",
9096
9140
  `bpb-summary-card--tier-${f === "managed" ? "enterprise" : f}`,
9097
9141
  e
@@ -9116,22 +9160,22 @@ const _i = ({
9116
9160
  ]
9117
9161
  }
9118
9162
  );
9119
- }, xi = ({ onManage: a, className: e }) => {
9163
+ }, Ti = ({ onManage: a, className: e }) => {
9120
9164
  const { isOutdatedBilling: t } = G(), { t: n } = oe(), { data: r, isLoading: s } = Fe({ enabled: !t }), { data: i, isLoading: l } = ia();
9121
9165
  if (t)
9122
9166
  return /* @__PURE__ */ o(er, { isAddons: !0, className: e });
9123
9167
  if (s || l)
9124
- return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: U("bpb-scope", e) });
9168
+ return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: O("bpb-scope", e) });
9125
9169
  const d = (i ?? []).flatMap((c) => {
9126
9170
  var u;
9127
9171
  const m = ((u = r == null ? void 0 : r.addons[c.id]) == null ? void 0 : u.current.quantity) ?? 0;
9128
- return m > 0 ? [{ name: Ue[c.id] ? n(Ue[c.id]) : _a(c.name), quantity: m }] : [];
9172
+ return m > 0 ? [{ name: Ue[c.id] ? n(Ue[c.id]) : Sa(c.name), quantity: m }] : [];
9129
9173
  });
9130
9174
  return /* @__PURE__ */ p(
9131
9175
  "button",
9132
9176
  {
9133
9177
  type: "button",
9134
- className: U(
9178
+ className: O(
9135
9179
  "bpb-summary-card bpb-summary-card--addons bpb-scope",
9136
9180
  d.length > 0 && "bpb-summary-card--active",
9137
9181
  e
@@ -9158,7 +9202,7 @@ const _i = ({
9158
9202
  ]
9159
9203
  }
9160
9204
  );
9161
- }, Ti = ({ onManage: a, className: e }) => {
9205
+ }, Di = ({ onManage: a, className: e }) => {
9162
9206
  var I, R;
9163
9207
  const { isOutdatedBilling: t, locale: n, manageBillingUrl: r, analytics: s } = G(), { t: i } = oe(), { data: l, isLoading: d } = Fe({ enabled: !t }), { data: c, isLoading: m } = ze(), { data: u, isLoading: g } = ia();
9164
9208
  if (t) {
@@ -9167,7 +9211,7 @@ const _i = ({
9167
9211
  "button",
9168
9212
  {
9169
9213
  type: "button",
9170
- className: U("bpb-plan-banner bpb-plan-banner--community bpb-scope", e),
9214
+ className: O("bpb-plan-banner bpb-plan-banner--community bpb-scope", e),
9171
9215
  onClick: E,
9172
9216
  disabled: !r,
9173
9217
  children: [
@@ -9179,28 +9223,28 @@ const _i = ({
9179
9223
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__cta", children: [
9180
9224
  i("open"),
9181
9225
  " ",
9182
- /* @__PURE__ */ o(Ma, { size: 16 })
9226
+ /* @__PURE__ */ o(Ba, { size: 16 })
9183
9227
  ] })
9184
9228
  ]
9185
9229
  }
9186
9230
  );
9187
9231
  }
9188
9232
  if (d || m || g)
9189
- return /* @__PURE__ */ o(Y, { height: 132, rounded: !0, className: U("bpb-scope", e) });
9233
+ return /* @__PURE__ */ o(Y, { height: 132, rounded: !0, className: O("bpb-scope", e) });
9190
9234
  const b = l == null ? void 0 : l.plan.current, f = c == null ? void 0 : c.find((E) => E.id === (b == null ? void 0 : b.planId)), C = (b == null ? void 0 : b.interval) ?? "month", N = ((I = f == null ? void 0 : f.prices[C]) == null ? void 0 : I.currency) ?? "usd", v = f ? ue(f) : "community", h = Object.fromEntries(
9191
9235
  Object.entries((l == null ? void 0 : l.addons) ?? {}).map(([E, J]) => {
9192
9236
  var M;
9193
9237
  return [E, ((M = J.current) == null ? void 0 : M.quantity) ?? 0];
9194
9238
  })
9195
- ), x = ((R = f == null ? void 0 : f.prices[C]) == null ? void 0 : R.amount) ?? 0, T = (u ?? []).reduce((E, J) => {
9239
+ ), A = ((R = f == null ? void 0 : f.prices[C]) == null ? void 0 : R.amount) ?? 0, x = (u ?? []).reduce((E, J) => {
9196
9240
  const M = f ? tt(J, f, C) : null;
9197
9241
  return E + (h[J.id] ?? 0) * ((M == null ? void 0 : M.amount) ?? 0);
9198
- }, 0), S = x + T, k = C === "year" ? "/yr" : "/mo", w = yo(f, u, h).find((E) => E.key === "conversation_sessions"), y = i(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), P = b != null && b.periodEnd ? $e(b.periodEnd, n) : null, A = v === "enterprise" || v === "managed";
9242
+ }, 0), k = A + x, S = C === "year" ? "/yr" : "/mo", w = vo(f, u, h).find((E) => E.key === "conversation_sessions"), y = i(v === "community" ? "conversationsUnit" : "conversationsPerMonth"), D = b != null && b.periodEnd ? $e(b.periodEnd, n) : null, T = v === "enterprise" || v === "managed";
9199
9243
  return /* @__PURE__ */ p(
9200
9244
  "button",
9201
9245
  {
9202
9246
  type: "button",
9203
- className: U("bpb-plan-banner", `bpb-plan-banner--${v}`, "bpb-scope", e),
9247
+ className: O("bpb-plan-banner", `bpb-plan-banner--${v}`, "bpb-scope", e),
9204
9248
  onClick: () => {
9205
9249
  s.capture(pe.UPGRADE_CTA_CLICKED, { source: "plan_banner", current_tier: v }), a();
9206
9250
  },
@@ -9217,15 +9261,15 @@ const _i = ({
9217
9261
  ] }) : `${re(w.total)} ${y}` })
9218
9262
  ] }),
9219
9263
  /* @__PURE__ */ p("div", { className: "bpb-plan-banner__summary", children: [
9220
- A ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: i("planBannerCustomPricing") }) : /* @__PURE__ */ p("span", { className: "bpb-plan-banner__price", children: [
9221
- S > 0 ? ee(S, N, 0) : i("free"),
9222
- S > 0 && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price-suffix", children: k })
9264
+ T ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: i("planBannerCustomPricing") }) : /* @__PURE__ */ p("span", { className: "bpb-plan-banner__price", children: [
9265
+ k > 0 ? ee(k, N, 0) : i("free"),
9266
+ k > 0 && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price-suffix", children: S })
9223
9267
  ] }),
9224
9268
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__meta", children: [
9225
9269
  i(C === "year" ? "billedAnnually" : "billedMonthly"),
9226
- T > 0 && ` ${i("planBannerInclAddons")}`
9270
+ x > 0 && ` ${i("planBannerInclAddons")}`
9227
9271
  ] }),
9228
- P && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: i("planBannerRenews", { date: P }) })
9272
+ D && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: i("planBannerRenews", { date: D }) })
9229
9273
  ] }),
9230
9274
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__cta", children: [
9231
9275
  i("planBannerManageCta"),
@@ -9235,70 +9279,70 @@ const _i = ({
9235
9279
  ]
9236
9280
  }
9237
9281
  );
9238
- }, Di = ({ onManage: a, period: e, variant: t = "card", className: n, style: r }) => {
9282
+ }, Pi = ({ onManage: a, period: e, variant: t = "card", className: n, style: r }) => {
9239
9283
  const { isOutdatedBilling: s, locale: i } = G(), { t: l } = oe(), { data: d, isLoading: c } = Fe({ enabled: !s }), { data: m, isLoading: u } = ze(), { data: g, isLoading: b } = la({ period: e, enabled: !s });
9240
9284
  if (s)
9241
9285
  return null;
9242
9286
  if (c || u || b)
9243
- return /* @__PURE__ */ o(Y, { height: 72, rounded: !0, className: U("bpb-scope", n) });
9244
- const f = m == null ? void 0 : m.find((E) => E.id === (d == null ? void 0 : d.plan.current.planId)), C = Ba(g), N = C.find((E) => E.key === "conversation_sessions"), v = C[0], h = v && v.key !== "conversation_sessions" && v.pct >= 75 ? v : N ?? v, x = h ? Math.round(h.pct) : 0, T = x > 0 ? Math.max(5, x) : 0, S = h ? mt(h.pct) : "normal", k = S !== "normal", w = f ? ue(f) === "community" : !1, y = d != null && d.plan.current.periodEnd ? $e(d.plan.current.periodEnd, i) : null;
9245
- let P = null, A = null;
9246
- if (h && k) {
9287
+ return /* @__PURE__ */ o(Y, { height: 72, rounded: !0, className: O("bpb-scope", n) });
9288
+ const f = m == null ? void 0 : m.find((E) => E.id === (d == null ? void 0 : d.plan.current.planId)), C = za(g), N = C.find((E) => E.key === "conversation_sessions"), v = C[0], h = v && v.key !== "conversation_sessions" && v.pct >= 75 ? v : N ?? v, A = h ? Math.round(h.pct) : 0, x = A > 0 ? Math.max(5, A) : 0, k = h ? mt(h.pct) : "normal", S = k !== "normal", w = f ? ue(f) === "community" : !1, y = d != null && d.plan.current.periodEnd ? $e(d.plan.current.periodEnd, i) : null;
9289
+ let D = null, T = null;
9290
+ if (h && S) {
9247
9291
  const E = ga(h.remaining, h.unit);
9248
- P = l(S === "critical" ? "usageWidgetLimitReached" : "usageWidgetRunningLow"), w && h.key === "conversation_sessions" ? A = S === "critical" ? l("usageWidgetFreeExhausted") : l("usageWidgetFreeLeft", { left: E }) : A = S === "critical" ? l("usageWidgetUpgradeToKeepGoing") : l("usageWidgetOnlyLeft", { left: E });
9292
+ D = l(k === "critical" ? "usageWidgetLimitReached" : "usageWidgetRunningLow"), w && h.key === "conversation_sessions" ? T = k === "critical" ? l("usageWidgetFreeExhausted") : l("usageWidgetFreeLeft", { left: E }) : T = k === "critical" ? l("usageWidgetUpgradeToKeepGoing") : l("usageWidgetOnlyLeft", { left: E });
9249
9293
  }
9250
9294
  const I = /* @__PURE__ */ o(ve, { children: h ? /* @__PURE__ */ p(ve, { children: [
9251
9295
  /* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
9252
- k && /* @__PURE__ */ o($n, { size: 16, className: U("bpb-plan-usage__alert", `bpb-plan-usage__alert--${S}`) }),
9296
+ S && /* @__PURE__ */ o($n, { size: 16, className: O("bpb-plan-usage__alert", `bpb-plan-usage__alert--${k}`) }),
9253
9297
  /* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: h.label }),
9254
9298
  /* @__PURE__ */ p("span", { className: "bpb-plan-usage__count", children: [
9255
9299
  ga(h.used, h.unit),
9256
9300
  " / ",
9257
9301
  ga(h.quota, h.unit)
9258
9302
  ] }),
9259
- a && !k && /* @__PURE__ */ o(sa, { size: 15, className: "bpb-plan-usage__chevron" })
9303
+ a && !S && /* @__PURE__ */ o(sa, { size: 15, className: "bpb-plan-usage__chevron" })
9260
9304
  ] }),
9261
9305
  /* @__PURE__ */ o(
9262
9306
  "div",
9263
9307
  {
9264
9308
  className: "bpb-plan-usage__bar",
9265
9309
  role: "progressbar",
9266
- "aria-valuenow": x,
9310
+ "aria-valuenow": A,
9267
9311
  "aria-valuemin": 0,
9268
9312
  "aria-valuemax": 100,
9269
9313
  children: /* @__PURE__ */ o(
9270
9314
  "div",
9271
9315
  {
9272
- className: U("bpb-plan-usage__fill", `bpb-plan-usage__fill--${S}`),
9273
- style: { width: `${T}%` }
9316
+ className: O("bpb-plan-usage__fill", `bpb-plan-usage__fill--${k}`),
9317
+ style: { width: `${x}%` }
9274
9318
  }
9275
9319
  )
9276
9320
  }
9277
9321
  ),
9278
- P ? /* @__PURE__ */ p("p", { className: "bpb-plan-usage__status", children: [
9279
- /* @__PURE__ */ p("strong", { className: U("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${S}`), children: [
9280
- P,
9322
+ D ? /* @__PURE__ */ p("p", { className: "bpb-plan-usage__status", children: [
9323
+ /* @__PURE__ */ p("strong", { className: O("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${k}`), children: [
9324
+ D,
9281
9325
  "."
9282
9326
  ] }),
9283
9327
  " ",
9284
- A && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__status-detail", children: A })
9328
+ T && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__status-detail", children: T })
9285
9329
  ] }) : y && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__reset", children: l("usageWidgetResets", { date: y }) }),
9286
- a && k && /* @__PURE__ */ p("span", { className: "bpb-plan-usage__cta", children: [
9330
+ a && S && /* @__PURE__ */ p("span", { className: "bpb-plan-usage__cta", children: [
9287
9331
  l("usageWidgetViewOptions"),
9288
9332
  /* @__PURE__ */ o(dt, { size: 14 })
9289
9333
  ] })
9290
9334
  ] }) : /* @__PURE__ */ p("div", { className: "bpb-plan-usage__head", children: [
9291
9335
  /* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: f ? se(f.name) : l("free") }),
9292
9336
  a && /* @__PURE__ */ o(sa, { size: 15, className: "bpb-plan-usage__chevron" })
9293
- ] }) }), R = U(
9337
+ ] }) }), R = O(
9294
9338
  "bpb-plan-usage bpb-scope",
9295
9339
  `bpb-plan-usage--${t}`,
9296
- k && `bpb-plan-usage--${S}`,
9340
+ S && `bpb-plan-usage--${k}`,
9297
9341
  a && "bpb-plan-usage--clickable",
9298
9342
  n
9299
9343
  );
9300
9344
  return a ? /* @__PURE__ */ o("button", { type: "button", className: R, style: r, onClick: a, children: I }) : /* @__PURE__ */ o("div", { className: R, style: r, children: I });
9301
- }, oi = ({
9345
+ }, ii = ({
9302
9346
  children: a,
9303
9347
  delay: e = 200,
9304
9348
  placement: t = "top",
@@ -9311,29 +9355,29 @@ const _i = ({
9311
9355
  C.current && (clearTimeout(C.current), C.current = null);
9312
9356
  };
9313
9357
  Ce(() => N, []);
9314
- const v = Ba(m), h = !l && v.length > 0, x = () => {
9358
+ const v = za(m), h = !l && v.length > 0, A = () => {
9315
9359
  h && (N(), C.current = setTimeout(() => f(!0), Math.max(0, e)));
9316
- }, T = () => {
9360
+ }, x = () => {
9317
9361
  N(), f(!1);
9318
- }, S = g == null ? void 0 : g.find((R) => R.id === (u == null ? void 0 : u.plan.current.planId)), k = S ? se(S.name) : "Free", w = u != null && u.plan.current.periodEnd ? $e(u.plan.current.periodEnd, d) : null, y = S ? ue(S) === "community" : !S, P = y ? v.find((R) => R.key === "conversation_sessions") : void 0, A = y && !!r, I = () => {
9362
+ }, k = g == null ? void 0 : g.find((R) => R.id === (u == null ? void 0 : u.plan.current.planId)), S = k ? se(k.name) : "Free", w = u != null && u.plan.current.periodEnd ? $e(u.plan.current.periodEnd, d) : null, y = k ? ue(k) === "community" : !k, D = y ? v.find((R) => R.key === "conversation_sessions") : void 0, T = y && !!r, I = () => {
9319
9363
  c.capture(pe.UPGRADE_CTA_CLICKED, { source: "usage_popover" }), r == null || r();
9320
9364
  };
9321
9365
  return /* @__PURE__ */ p(
9322
9366
  "span",
9323
9367
  {
9324
- className: U("bpb-usage-pop bpb-scope", s && "bpb-usage-pop--block", i),
9325
- onMouseEnter: x,
9326
- onMouseLeave: T,
9327
- onFocus: x,
9328
- onBlur: T,
9368
+ className: O("bpb-usage-pop bpb-scope", s && "bpb-usage-pop--block", i),
9369
+ onMouseEnter: A,
9370
+ onMouseLeave: x,
9371
+ onFocus: A,
9372
+ onBlur: x,
9329
9373
  children: [
9330
9374
  a,
9331
- b && h && /* @__PURE__ */ p("span", { className: U("bpb-usage-pop__card", `bpb-usage-pop__card--${t}`), role: "tooltip", children: [
9375
+ b && h && /* @__PURE__ */ p("span", { className: O("bpb-usage-pop__card", `bpb-usage-pop__card--${t}`), role: "tooltip", children: [
9332
9376
  y ? /* @__PURE__ */ p("span", { className: "bpb-usage-pop__header", children: [
9333
9377
  /* @__PURE__ */ o("span", { className: "bpb-usage-pop__plan-name", children: "Free plan usage" }),
9334
- P && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__subtitle", children: [
9378
+ D && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__subtitle", children: [
9335
9379
  /* @__PURE__ */ p("strong", { children: [
9336
- re(P.quota),
9380
+ re(D.quota),
9337
9381
  " conversations"
9338
9382
  ] }),
9339
9383
  " included, total. They do not renew, and Free has no top-ups."
@@ -9341,7 +9385,7 @@ const _i = ({
9341
9385
  ] }) : /* @__PURE__ */ p(ve, { children: [
9342
9386
  /* @__PURE__ */ p("span", { className: "bpb-usage-pop__plan", children: [
9343
9387
  /* @__PURE__ */ p("span", { className: "bpb-usage-pop__plan-name", children: [
9344
- k,
9388
+ S,
9345
9389
  " plan"
9346
9390
  ] }),
9347
9391
  w && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__reset", children: [
@@ -9365,13 +9409,13 @@ const _i = ({
9365
9409
  /* @__PURE__ */ o("span", { className: "bpb-usage-pop__bar", children: /* @__PURE__ */ o(
9366
9410
  "span",
9367
9411
  {
9368
- className: U("bpb-usage-pop__fill", `bpb-usage-pop__fill--${mt(R.pct)}`),
9412
+ className: O("bpb-usage-pop__fill", `bpb-usage-pop__fill--${mt(R.pct)}`),
9369
9413
  style: { width: `${E}%` }
9370
9414
  }
9371
9415
  ) })
9372
9416
  ] }, R.key);
9373
9417
  }),
9374
- A && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__nudge", children: [
9418
+ T && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__nudge", children: [
9375
9419
  /* @__PURE__ */ p("span", { className: "bpb-usage-pop__nudge-text", children: [
9376
9420
  /* @__PURE__ */ o("strong", { children: "Need more room?" }),
9377
9421
  " Plus includes 250 conversations a month, unlimited AI agents, and packs of 100 when you need them."
@@ -9385,7 +9429,7 @@ const _i = ({
9385
9429
  ]
9386
9430
  }
9387
9431
  );
9388
- }, Pi = ({
9432
+ }, Fi = ({
9389
9433
  size: a = 20,
9390
9434
  thickness: e = 3.5,
9391
9435
  showLabel: t = !1,
@@ -9395,7 +9439,7 @@ const _i = ({
9395
9439
  className: i,
9396
9440
  ...l
9397
9441
  }) => {
9398
- const { isOutdatedBilling: d } = G(), { data: c } = la({ period: s, enabled: !d }), m = Ba(c);
9442
+ const { isOutdatedBilling: d } = G(), { data: c } = la({ period: s, enabled: !d }), m = za(c);
9399
9443
  if (d || m.length === 0)
9400
9444
  return null;
9401
9445
  const u = m[0], g = mt(u.pct), b = u.pct > 0 ? Math.max(5, u.pct) : 0, f = (a - e) / 2, C = 2 * Math.PI * f, N = C * (1 - b / 100), v = l["aria-label"] ?? `${Math.round(u.pct)}% of your ${u.label.toLowerCase()} used`, h = /* @__PURE__ */ p(ve, { children: [
@@ -9414,7 +9458,7 @@ const _i = ({
9414
9458
  /* @__PURE__ */ o(
9415
9459
  "circle",
9416
9460
  {
9417
- className: U("bpb-usage-ring__arc", `bpb-usage-ring__arc--${g}`),
9461
+ className: O("bpb-usage-ring__arc", `bpb-usage-ring__arc--${g}`),
9418
9462
  cx: a / 2,
9419
9463
  cy: a / 2,
9420
9464
  r: f,
@@ -9431,81 +9475,81 @@ const _i = ({
9431
9475
  Math.round(u.pct),
9432
9476
  "%"
9433
9477
  ] })
9434
- ] }), x = U("bpb-usage-ring", n && "bpb-usage-ring--clickable");
9435
- return /* @__PURE__ */ o(oi, { delay: r, period: s, className: i, children: n ? /* @__PURE__ */ o("button", { type: "button", className: x, onClick: n, "aria-label": v, children: h }) : /* @__PURE__ */ o("span", { className: x, tabIndex: 0, role: "img", "aria-label": v, children: h }) });
9478
+ ] }), A = O("bpb-usage-ring", n && "bpb-usage-ring--clickable");
9479
+ return /* @__PURE__ */ o(ii, { delay: r, period: s, className: i, children: n ? /* @__PURE__ */ o("button", { type: "button", className: A, onClick: n, "aria-label": v, children: h }) : /* @__PURE__ */ o("span", { className: A, tabIndex: 0, role: "img", "aria-label": v, children: h }) });
9436
9480
  };
9437
9481
  export {
9438
- xi as AddonsSummaryCard,
9482
+ Ti as AddonsSummaryCard,
9439
9483
  dt as ArrowRightIcon,
9440
9484
  pe as BILLING_EVENTS,
9441
9485
  st as Badge,
9442
- hi as BankIcon,
9443
- wi as BillingActionCard,
9444
- gi as BillingProvider,
9486
+ bi as BankIcon,
9487
+ Ai as BillingActionCard,
9488
+ hi as BillingProvider,
9445
9489
  it as BoltIcon,
9446
9490
  be as Button,
9447
- Fo as CalendarIcon,
9491
+ Lo as CalendarIcon,
9448
9492
  jn as CardBrandBadge,
9449
9493
  Kt as CardIcon,
9450
- wo as ChartIcon,
9451
- Co as CheckIcon,
9452
- Ko as CheckoutDialog,
9494
+ Ao as ChartIcon,
9495
+ No as CheckIcon,
9496
+ Ho as CheckoutDialog,
9453
9497
  ct as ChevronDownIcon,
9454
9498
  qn as ChevronLeftIcon,
9455
9499
  sa as ChevronRightIcon,
9456
9500
  lt as CloseIcon,
9457
- Zo as DEFAULT_FEATURE_LABELS,
9501
+ Xo as DEFAULT_FEATURE_LABELS,
9458
9502
  rt as DEFAULT_PLAN_FEATURES,
9459
9503
  xe as Dialog,
9460
9504
  Ht as DownloadIcon,
9461
9505
  Bn as ENTERPRISE_CONTACT_URL,
9462
- Ma as ExternalLinkIcon,
9463
- Ao as GlobeIcon,
9464
- So as InfinityIcon,
9465
- La as InfoTooltip,
9466
- Ja as Input,
9467
- vi as InvoicesDialog,
9506
+ Ba as ExternalLinkIcon,
9507
+ xo as GlobeIcon,
9508
+ ko as InfinityIcon,
9509
+ Ia as InfoTooltip,
9510
+ Qa as Input,
9511
+ Ci as InvoicesDialog,
9468
9512
  ot as LayersIcon,
9469
- bi as LockIcon,
9470
- yi as ManageAddonsDialog,
9471
- No as MessageIcon,
9472
- To as MinusIcon,
9513
+ fi as LockIcon,
9514
+ vi as ManageAddonsDialog,
9515
+ _o as MessageIcon,
9516
+ Do as MinusIcon,
9473
9517
  pt as NANO_DOLLARS_PER_DOLLAR,
9474
9518
  ca as OutdatedBillingGate,
9475
- _i as OutgrowFreeDialog,
9519
+ Si as OutgrowFreeDialog,
9476
9520
  On as PLAN_FEATURE_KEYS,
9477
9521
  na as PLAN_ORDER,
9478
- xo as PaintIcon,
9479
- Ci as PaymentMethodDialog,
9480
- Ti as PlanBanner,
9481
- Ai as PlanSummaryCard,
9482
- Di as PlanUsageWidget,
9483
- Do as PlusIcon,
9484
- _o as PuzzleIcon,
9485
- fi as ReceiptIcon,
9486
- Lo as SegmentedControl,
9522
+ To as PaintIcon,
9523
+ Ni as PaymentMethodDialog,
9524
+ Di as PlanBanner,
9525
+ xi as PlanSummaryCard,
9526
+ Pi as PlanUsageWidget,
9527
+ Po as PlusIcon,
9528
+ So as PuzzleIcon,
9529
+ yi as ReceiptIcon,
9530
+ Io as SegmentedControl,
9487
9531
  Hn as Select,
9488
9532
  Gt as ShieldIcon,
9489
9533
  Y as Skeleton,
9490
9534
  Un as SparkleIcon,
9491
- Ho as Stepper,
9492
- Xo as USAGE_METRICS,
9493
- Mo as UpgradePlanDialog,
9494
- ki as UsageBanner,
9495
- Si as UsageDashboard,
9496
- oi as UsagePopover,
9497
- Pi as UsageRing,
9498
- ko as UsersIcon,
9499
- go as addDays,
9500
- _a as addonDisplayName,
9501
- fo as addonLimitsPreview,
9535
+ Yo as Stepper,
9536
+ ei as USAGE_METRICS,
9537
+ Bo as UpgradePlanDialog,
9538
+ wi as UsageBanner,
9539
+ ki as UsageDashboard,
9540
+ ii as UsagePopover,
9541
+ Fi as UsageRing,
9542
+ wo as UsersIcon,
9543
+ ho as addDays,
9544
+ Sa as addonDisplayName,
9545
+ yo as addonLimitsPreview,
9502
9546
  tt as addonPrice,
9503
9547
  me as billingKeys,
9504
- U as cn,
9548
+ O as cn,
9505
9549
  nt as conversationPackPrice,
9506
- bo as conversationsAddon,
9507
- Na as currencySymbol,
9508
- Ni as featureLabel,
9550
+ fo as conversationsAddon,
9551
+ _a as currencySymbol,
9552
+ _i as featureLabel,
9509
9553
  ra as formatBytes,
9510
9554
  ee as formatCurrency,
9511
9555
  $e as formatDate,
@@ -9516,10 +9560,10 @@ export {
9516
9560
  gr as getStripePromise,
9517
9561
  ut as iconForFeature,
9518
9562
  se as planDisplayName,
9519
- yo as planEntitlements,
9563
+ vo as planEntitlements,
9520
9564
  ue as planKind,
9521
9565
  Gn as toStripeLocale,
9522
- Ba as usageItems,
9566
+ za as usageItems,
9523
9567
  mt as usageTier,
9524
9568
  ia as useAddons,
9525
9569
  G as useBilling,
@@ -9527,17 +9571,17 @@ export {
9527
9571
  bn as useBillingReadonly,
9528
9572
  fn as useCreatePaymentMethodIntent,
9529
9573
  hn as useCustomer,
9530
- fs as useInvoices,
9574
+ ys as useInvoices,
9531
9575
  mn as usePaymentMethod,
9532
9576
  ze as usePlans,
9533
- Cs as useSetAddons,
9577
+ Ns as useSetAddons,
9534
9578
  vn as useSetBillingAddress,
9535
9579
  Cn as useSetCustomer,
9536
9580
  yn as useSetPaymentMethod,
9537
9581
  Nn as useSetSubscription,
9538
9582
  Fe as useSubscription,
9539
9583
  pn as useSubscriptionPreview,
9540
- vs as useSupportsUsageByBot,
9584
+ Cs as useSupportsUsageByBot,
9541
9585
  la as useUsage,
9542
- ys as useUsageByBot
9586
+ vs as useUsageByBot
9543
9587
  };