@bpinternal/billing-ui 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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);
@@ -77,13 +77,13 @@ var _r = { parse: function(a, e) {
77
77
  }
78
78
  var m, u = d.charAt(1) !== "/", g = d.startsWith("<!--"), b = c + d.length, f = a.charAt(b);
79
79
  if (g) {
80
- var C = St(d);
81
- return s < 0 ? (n.push(C), n) : ((m = r[s]).children.push(C), n);
80
+ var N = St(d);
81
+ return s < 0 ? (n.push(N), n) : ((m = r[s]).children.push(N), n);
82
82
  }
83
83
  if (u && (s++, (t = St(d)).type === "tag" && e.components[t.name] && (t.type = "component", i = !0), t.voidElement || i || !f || f === "<" || t.children.push({ type: "text", content: a.slice(b, a.indexOf("<", b)) }), s === 0 && n.push(t), (m = r[s - 1]) && m.children.push(t), r[s] = t), (!u || t.voidElement) && (s > -1 && (t.voidElement || t.name === d.slice(2, -1)) && (s--, t = s === -1 ? n : r[s]), !i && f !== "<" && f)) {
84
84
  m = s === -1 ? n : r[s].children;
85
- var N = a.indexOf("<", b), v = a.slice(b, N === -1 ? void 0 : N);
86
- Cr.test(v) && (v = " "), (N > -1 && s + m.length >= 0 || v !== " ") && m.push({ type: "text", content: v });
85
+ var C = a.indexOf("<", b), v = a.slice(b, C === -1 ? void 0 : C);
86
+ Cr.test(v) && (v = " "), (C > -1 && s + m.length >= 0 || v !== " ") && m.push({ type: "text", content: v });
87
87
  }
88
88
  }), n;
89
89
  }, stringify: function(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,97 +226,97 @@ 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 [];
235
- const i = n.transKeepBasicHtmlNodesFor || [], l = e && new RegExp(i.map((N) => `<${N}`).join("|")).test(e);
235
+ const i = n.transKeepBasicHtmlNodesFor || [], l = e && new RegExp(i.map((C) => `<${C}`).join("|")).test(e);
236
236
  if (!a && !l && !s) return [e];
237
- const d = {}, c = (N) => {
238
- ta(N).forEach((h) => {
239
- ke(h) || (za(h) ? c(Oa(h)) : aa(h) && !Sa(h) && Object.assign(d, h));
237
+ const d = {}, c = (C) => {
238
+ ta(C).forEach((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);
243
243
  const m = _r.parse(`<0>${e}</0>`), u = {
244
244
  ...d,
245
245
  ...r
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) => {
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
246
+ }, g = (C, v, h) => {
247
+ const A = Ua(C), x = f(A, v.children, h);
248
+ return Fr(A) && x.length === 0 || C.props && C.props.i18nIsDynamicList ? A : x;
249
+ }, b = (C, v, h, A, x) => {
250
+ C.dummy ? (C.children = v, h.push(dr(C, {
251
+ key: A
252
+ }, x ? void 0 : v))) : h.push(...ur.map([C], (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
- }, 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);
262
+ }, f = (C, v, h) => {
263
+ const A = ta(C);
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
- }, C = f([{
315
+ }, N = f([{
316
316
  dummy: !0,
317
317
  children: a || []
318
318
  }], m, ta(a || []));
319
- return Oa(C[0]);
319
+ return Ua(N[0]);
320
320
  };
321
321
  function Er(a) {
322
322
  let {
@@ -335,23 +335,23 @@ function Er(a) {
335
335
  shouldUnescape: b,
336
336
  ...f
337
337
  } = a;
338
- const C = u || Qa();
339
- if (!C)
340
- return Aa("You will need to pass in an i18next instance by using i18nextReactModule"), e;
341
- const N = g || C.t.bind(C) || ((R) => R), v = {
338
+ const N = u || Za();
339
+ if (!N)
340
+ return xa("You will need to pass in an i18next instance by using i18nextReactModule"), e;
341
+ const C = g || N.t.bind(N) || ((R) => R), v = {
342
342
  ...sn(),
343
- ...C.options && C.options.react
343
+ ...N.options && N.options.react
344
344
  };
345
- let h = m || N.ns || C.options && C.options.defaultNS;
345
+ let h = m || C.ns || N.options && N.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);
350
- C.options && C.options.interpolation && C.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
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
+ N.options && N.options.interpolation && N.options.interpolation.defaultVariables && (l = l && Object.keys(l).length > 0 ? {
351
351
  ...l,
352
- ...C.options.interpolation.defaultVariables
352
+ ...N.options.interpolation.defaultVariables
353
353
  } : {
354
- ...C.options.interpolation.defaultVariables
354
+ ...N.options.interpolation.defaultVariables
355
355
  });
356
356
  const w = l || t !== void 0 || !e ? i.interpolation : {
357
357
  interpolation: {
@@ -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 ? C(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, N, 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));
@@ -414,9 +414,9 @@ function xt(a) {
414
414
  ...f
415
415
  } = a;
416
416
  const {
417
- i18n: C,
418
- defaultNS: N
419
- } = Ia(Za) || {}, v = u || C || Qa(), h = g || v && v.t.bind(v);
417
+ i18n: N,
418
+ defaultNS: C
419
+ } = ba(Xa) || {}, v = u || N || Za(), h = g || v && v.t.bind(v);
420
420
  return Er({
421
421
  children: e,
422
422
  count: t,
@@ -427,7 +427,7 @@ function xt(a) {
427
427
  values: l,
428
428
  defaults: d,
429
429
  components: c,
430
- ns: m || h && h.ns || N || v && v.options && v.options.defaultNS,
430
+ ns: m || h && h.ns || C || v && v.options && v.options.defaultNS,
431
431
  i18n: v,
432
432
  t: g,
433
433
  shouldUnescape: b,
@@ -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);
467
- let N = c.join();
468
- e.lng && (N = `${e.lng}${N}`);
469
- const v = Br(N), h = Ea(!0);
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, N] = K(g);
467
+ let C = c.join();
468
+ e.lng && (C = `${e.lng}${C}`);
469
+ const v = Br(C), 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
- h.current && C(b);
476
+ h.current && N(b);
477
477
  }) : wt(s, c, () => {
478
- h.current && C(b);
479
- })), m && v && v !== N && h.current && C(b);
480
- const k = () => {
481
- h.current && C(b);
478
+ h.current && N(b);
479
+ })), m && v && v !== C && h.current && N(b);
480
+ const S = () => {
481
+ h.current && N(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
- }, [s, N]), Ce(() => {
487
- h.current && m && C(g);
486
+ }, [s, C]), Ce(() => {
487
+ h.current && m && N(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, N = Object.prototype.toString.apply(g), C = ["[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 && C.indexOf(N) < 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
  }
@@ -978,26 +978,26 @@ class Pa extends Ra {
978
978
  r = m;
979
979
  let u = c.namespaces;
980
980
  this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
981
- const g = t.count !== void 0 && !q(t.count), b = g && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), f = t.context !== void 0 && (q(t.context) || typeof t.context == "number") && t.context !== "", C = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
982
- u.forEach((N) => {
983
- this.isValidLookup(n) || (l = N, !It[`${C[0]}-${N}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(l) && (It[`${C[0]}-${N}`] = !0, this.logger.warn(`key "${r}" for languages "${C.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), C.forEach((v) => {
981
+ const g = t.count !== void 0 && !q(t.count), b = g && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), f = t.context !== void 0 && (q(t.context) || typeof t.context == "number") && t.context !== "", N = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
982
+ u.forEach((C) => {
983
+ this.isValidLookup(n) || (l = C, !It[`${N[0]}-${C}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(l) && (It[`${N[0]}-${C}`] = !0, this.logger.warn(`key "${r}" for languages "${N.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), N.forEach((v) => {
984
984
  if (this.isValidLookup(n)) return;
985
985
  i = v;
986
986
  const h = [m];
987
987
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
988
- this.i18nFormat.addLookupKeys(h, m, v, N, t);
988
+ this.i18nFormat.addLookupKeys(h, m, v, C, 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, C, 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] : {};
@@ -1331,12 +1331,12 @@ class ns {
1331
1331
  nestingPrefix: g,
1332
1332
  nestingPrefixEscaped: b,
1333
1333
  nestingSuffix: f,
1334
- nestingSuffixEscaped: C,
1335
- nestingOptionsSeparator: N,
1334
+ nestingSuffixEscaped: N,
1335
+ nestingOptionsSeparator: C,
1336
1336
  maxReplaces: v,
1337
1337
  alwaysFormat: h
1338
1338
  } = e.interpolation;
1339
- this.escape = t !== void 0 ? t : Wr, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Ze(s) : i || "{{", this.suffix = l ? Ze(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = m ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : m || "", this.nestingPrefix = g ? Ze(g) : b || Ze("$t("), this.nestingSuffix = f ? Ze(f) : C || Ze(")"), this.nestingOptionsSeparator = N || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = h !== void 0 ? h : !1, this.resetRegExp();
1339
+ this.escape = t !== void 0 ? t : Wr, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = s ? Ze(s) : i || "{{", this.suffix = l ? Ze(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = m ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : m || "", this.nestingPrefix = g ? Ze(g) : b || Ze("$t("), this.nestingSuffix = f ? Ze(f) : N || Ze(")"), this.nestingOptionsSeparator = C || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = h !== void 0 ? h : !1, this.resetRegExp();
1340
1340
  }
1341
1341
  reset() {
1342
1342
  this.options && this.init(this.options);
@@ -1356,28 +1356,28 @@ class ns {
1356
1356
  interpolationkey: b
1357
1357
  }) : v;
1358
1358
  }
1359
- const f = b.split(this.formatSeparator), C = f.shift().trim(), N = f.join(this.formatSeparator).trim();
1360
- return this.format(Mt(t, d, C, this.options.keySeparator, this.options.ignoreJSONStructure), N, n, {
1359
+ const f = b.split(this.formatSeparator), N = f.shift().trim(), C = f.join(this.formatSeparator).trim();
1360
+ return this.format(Mt(t, d, N, this.options.keySeparator, this.options.ignoreJSONStructure), C, n, {
1361
1361
  ...r,
1362
1362
  ...t,
1363
- interpolationkey: C
1363
+ interpolationkey: N
1364
1364
  });
1365
1365
  };
1366
1366
  this.resetRegExp();
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();
1377
1377
  if (i = c(f), i === void 0)
1378
1378
  if (typeof m == "function") {
1379
- const N = m(e, s, r);
1380
- i = q(N) ? N : "";
1379
+ const C = m(e, s, r);
1380
+ i = q(C) ? C : "";
1381
1381
  } else if (r && Object.prototype.hasOwnProperty.call(r, f))
1382
1382
  i = "";
1383
1383
  else if (u) {
@@ -1386,8 +1386,8 @@ class ns {
1386
1386
  } else
1387
1387
  this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`), i = "";
1388
1388
  else !q(i) && !this.useRawValueToEscape && (i = Tt(i));
1389
- const C = b.safeValue(i);
1390
- if (e = e.replace(s[0], C), u ? (b.regex.lastIndex += i.length, b.regex.lastIndex -= s[0].length) : b.regex.lastIndex = 0, l++, l >= this.maxReplaces)
1389
+ const N = b.safeValue(i);
1390
+ if (e = e.replace(s[0], N), u ? (b.regex.lastIndex += i.length, b.regex.lastIndex -= s[0].length) : b.regex.lastIndex = 0, l++, l >= this.maxReplaces)
1391
1391
  break;
1392
1392
  }
1393
1393
  }), e;
@@ -1407,8 +1407,8 @@ class ns {
1407
1407
  ...c,
1408
1408
  ...i
1409
1409
  });
1410
- } catch (C) {
1411
- return this.logger.warn(`failed parsing options string in nesting for key ${d}`, C), `${d}${m}${g}`;
1410
+ } catch (N) {
1411
+ return this.logger.warn(`failed parsing options string in nesting for key ${d}`, N), `${d}${m}${g}`;
1412
1412
  }
1413
1413
  return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, d;
1414
1414
  };
@@ -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));
@@ -1783,18 +1783,18 @@ class ha extends Ra {
1783
1783
  }), m && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (g.formatter = s(m), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new ns(this.options), g.utils = {
1784
1784
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1785
1785
  }, g.backendConnector = new is(s(this.modules.backend), g.resourceStore, g, this.options), g.backendConnector.on("*", function(b) {
1786
- for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
1787
- C[N - 1] = arguments[N];
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) {
1790
- for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), N = 1; N < f; N++)
1791
- C[N - 1] = arguments[N];
1792
- e.emit(b, ...C);
1786
+ for (var f = arguments.length, N = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
1787
+ N[C - 1] = arguments[C];
1788
+ e.emit(b, ...N);
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
+ for (var f = arguments.length, N = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
1791
+ N[C - 1] = arguments[C];
1792
+ e.emit(b, ...N);
1793
1793
  }), this.modules.external.forEach((b) => {
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);
@@ -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: N
3257
3258
  }) => {
3258
- const C = c || "default", [N] = K(
3259
+ const C = 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:${C}`;
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, C, v]);
3285
+ const x = wa(() => v.invalidateQueries({ queryKey: ["bpb", C] }), [v, C]), 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
+ queryClient: v,
3290
3291
  scope: C,
3291
- stripePromise: h,
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,
3307
- N,
3309
+ v,
3308
3310
  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: N
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
  {
@@ -3479,7 +3495,7 @@ function ys(a, e) {
3479
3495
  i({ id: r, type: a, period: `${m}-01T00:00:00.000Z` }),
3480
3496
  l({})
3481
3497
  ]), b = new Map(g.bots.map((f) => [f.id, f.name]));
3482
- return u.data.map((f) => ({ botId: f.botId, name: b.get(f.botId) ?? f.botId, value: f.value })).sort((f, C) => C.value - f.value);
3498
+ return u.data.map((f) => ({ botId: f.botId, name: b.get(f.botId) ?? f.botId, value: f.value })).sort((f, N) => N.value - f.value);
3483
3499
  },
3484
3500
  enabled: d && ((e == null ? void 0 : e.enabled) ?? !0),
3485
3501
  refetchInterval: s
@@ -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
@@ -3730,35 +3746,35 @@ const _s = (a, e) => {
3730
3746
  const s = [];
3731
3747
  let i = 0, l = 0, d = 0, c;
3732
3748
  const m = r.length;
3733
- for (let C = 0; C < m; C++) {
3734
- const N = r[C];
3749
+ for (let N = 0; N < m; N++) {
3750
+ const C = r[N];
3735
3751
  if (i === 0 && l === 0) {
3736
- if (N === Ut) {
3737
- s.push(r.slice(d, C)), d = C + 1;
3752
+ if (C === Ut) {
3753
+ s.push(r.slice(d, N)), d = N + 1;
3738
3754
  continue;
3739
3755
  }
3740
- if (N === "/") {
3741
- c = C;
3756
+ if (C === "/") {
3757
+ c = N;
3742
3758
  continue;
3743
3759
  }
3744
3760
  }
3745
- N === "[" ? i++ : N === "]" ? i-- : N === "(" ? l++ : N === ")" && l--;
3761
+ C === "[" ? i++ : C === "]" ? i-- : C === "(" ? l++ : C === ")" && l--;
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,71 +3797,71 @@ 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], {
3807
3823
  isExternal: g,
3808
3824
  modifiers: b,
3809
3825
  hasImportantModifier: f,
3810
- baseClassName: C,
3811
- maybePostfixModifierPosition: N
3826
+ baseClassName: N,
3827
+ maybePostfixModifierPosition: C
3812
3828
  } = t(u);
3813
3829
  if (g) {
3814
3830
  c = u + (c.length > 0 ? " " + c : c);
3815
3831
  continue;
3816
3832
  }
3817
- let v = !!N, h;
3833
+ let v = !!C, h;
3818
3834
  if (v) {
3819
- const w = C.substring(0, N);
3835
+ const w = N.substring(0, C);
3820
3836
  h = n(w);
3821
- const y = h && i[h] ? n(C) : void 0;
3837
+ const y = h && i[h] ? n(N) : void 0;
3822
3838
  y && y !== h && (h = y, v = !1);
3823
3839
  } else
3824
- h = n(C);
3840
+ h = n(N);
3825
3841
  if (!h) {
3826
3842
  if (!v) {
3827
3843
  c = u + (c.length > 0 ? " " + c : c);
3828
3844
  continue;
3829
3845
  }
3830
- if (h = n(C), !h) {
3846
+ if (h = n(N), !h) {
3831
3847
  c = u + (c.length > 0 ? " " + c : c);
3832
3848
  continue;
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"), N = he("perspective"), C = 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], O = () => [
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"],
@@ -3959,7 +3975,7 @@ const _s = (a, e) => {
3959
3975
  * @see https://tailwindcss.com/docs/aspect-ratio
3960
3976
  */
3961
3977
  aspect: [{
3962
- aspect: ["auto", "square", Oe, F, L, N]
3978
+ aspect: ["auto", "square", Oe, F, L, C]
3963
3979
  }],
3964
3980
  /**
3965
3981
  * Container
@@ -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
@@ -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
  /**
@@ -6009,14 +6025,14 @@ const _s = (a, e) => {
6009
6025
  * @see https://tailwindcss.com/docs/perspective
6010
6026
  */
6011
6027
  perspective: [{
6012
- perspective: [C, L, F]
6028
+ perspective: [N, L, F]
6013
6029
  }],
6014
6030
  /**
6015
6031
  * Perspective Origin
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);
6588
+ }, go = /* @__PURE__ */ Vs(mo);
6573
6589
  function U(...a) {
6574
- return mo(Ns(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",
@@ -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: U("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,10 +7095,10 @@ 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,
@@ -7104,11 +7129,11 @@ const xe = ({
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: N } = ze(), { data: C } = 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
  {
@@ -7208,7 +7233,7 @@ const Mo = ({
7208
7233
  }
7209
7234
  ) }),
7210
7235
  /* @__PURE__ */ p("div", { className: "bpb-upgrade__grid", children: [
7211
- C && [0, 1, 2].map((_) => /* @__PURE__ */ p("div", { className: "bpb-plan-card", "aria-hidden": !0, children: [
7236
+ N && [0, 1, 2].map((_) => /* @__PURE__ */ p("div", { className: "bpb-plan-card", "aria-hidden": !0, children: [
7212
7237
  /* @__PURE__ */ o(Y, { width: 120, height: 22 }),
7213
7238
  /* @__PURE__ */ o(Y, { width: 90, height: 40 }),
7214
7239
  /* @__PURE__ */ o(Y, { width: "100%", height: 36, rounded: !0 }),
@@ -7216,7 +7241,7 @@ 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), O = (((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(C, _, 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
  {
@@ -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) }) })
@@ -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, N = (t == null ? void 0 : t.costs.immediate.amountDue) ?? 0, C = (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,12 +7480,12 @@ 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") }) }),
7459
- /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(C, u) })
7483
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: /* @__PURE__ */ o(Ia, { label: c("orderProratedToday"), children: c("orderProratedTodayDesc") }) }),
7484
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(N, u) })
7460
7485
  ] }),
7461
7486
  /* @__PURE__ */ p("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
7462
7487
  /* @__PURE__ */ o("span", { children: c("orderDueToday") }),
7463
- /* @__PURE__ */ o("span", { children: ee(C, u) })
7488
+ /* @__PURE__ */ o("span", { children: ee(N, u) })
7464
7489
  ] }),
7465
7490
  w < 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: c("orderCreditTowardNext", { amount: ee(Math.abs(w), u) }) })
7466
7491
  ] }),
@@ -7473,27 +7498,27 @@ 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
- N !== 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7513
+ C !== 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__line", children: [
7489
7514
  /* @__PURE__ */ o("span", { className: "bpb-summary__line-label", children: c("orderAccountCredit") }),
7490
- /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(N, u) })
7515
+ /* @__PURE__ */ o("span", { className: "bpb-summary__line-amount", children: ee(C, u) })
7491
7516
  ] }),
7492
7517
  /* @__PURE__ */ p("div", { className: "bpb-summary__line bpb-summary__line--total", children: [
7493
7518
  /* @__PURE__ */ o("span", { children: c("orderDueToday") }),
7494
- /* @__PURE__ */ o("span", { children: ee(C, u) })
7519
+ /* @__PURE__ */ o("span", { children: ee(N, u) })
7495
7520
  ] }),
7496
- w < 0 && C === 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: c("orderBalanceAsCredit", { amount: ee(Math.abs(w), u) }) })
7521
+ w < 0 && N === 0 && /* @__PURE__ */ o("p", { className: "bpb-summary__addon-note", children: c("orderBalanceAsCredit", { amount: ee(Math.abs(w), u) }) })
7497
7522
  ] }),
7498
7523
  I > 0 && /* @__PURE__ */ p("div", { className: "bpb-summary__savings", children: [
7499
7524
  /* @__PURE__ */ o(Un, { size: 18, className: "bpb-summary__savings-icon" }),
@@ -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,14 +7613,14 @@ 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: U("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
7626
  ] }) : /* @__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: [
@@ -7611,7 +7636,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
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
@@ -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,
@@ -7736,7 +7761,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
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
7763
  /* @__PURE__ */ o("div", { className: U("bpb-card-element", !l && "bpb-payment-element--hidden"), children: /* @__PURE__ */ o(
7739
- wa,
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,
@@ -7761,19 +7786,19 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7761
7786
  businessName: g,
7762
7787
  onBusinessNameChange: b,
7763
7788
  taxType: f,
7764
- onTaxTypeChange: C,
7765
- taxValue: N,
7789
+ onTaxTypeChange: N,
7790
+ taxValue: C,
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: U(!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] && N(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
- onChange: (y) => C(y.target.value),
7860
- children: k.map((y) => /* @__PURE__ */ p("option", { value: y.type, children: [
7884
+ onChange: (y) => N(y.target.value),
7885
+ children: S.map((y) => /* @__PURE__ */ p("option", { value: y.type, children: [
7861
7886
  y.label,
7862
7887
  " — ",
7863
7888
  y.description
@@ -7865,10 +7890,10 @@ 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
- value: N,
7896
+ value: C,
7872
7897
  onChange: (y) => v(y.target.value),
7873
7898
  inputMode: "text"
7874
7899
  }
@@ -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"), [N, C] = 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: 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;
7882
7907
  Ce(() => {
7883
- C === null && !V && $ !== void 0 && N(Z ? "saved" : "new");
7884
- }, [C, V, $, Z]), Ce(() => {
7908
+ N === null && !V && $ !== void 0 && C(Z ? "saved" : "new");
7909
+ }, [N, 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 = N === "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(() => {
@@ -7893,16 +7918,16 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
7893
7918
  const Je = (Se) => {
7894
7919
  Se !== u && d.capture(pe.CHECKOUT_INTERVAL_CHANGED, { plan_name: ce, interval: Se }), g(Se);
7895
7920
  }, da = (Se) => {
7896
- d.capture(pe.PAYMENT_METHOD_SELECTED, { method: Se === "saved" ? "saved_card" : "new_card" }), N(Se);
7921
+ d.capture(pe.PAYMENT_METHOD_SELECTED, { method: Se === "saved" ? "saved_card" : "new_card" }), C(Se);
7897
7922
  }, Ve = !!r && !!s && !!ie && !ye.isError && !!ye.data && Ae && Ee && !Q, ar = async () => {
7898
7923
  var bt, ft, yt, vt;
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,31 +8000,31 @@ 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,
7982
8007
  isDark: c,
7983
- tab: C ?? "new",
8008
+ tab: N ?? "new",
7984
8009
  onTabChange: da,
7985
8010
  onPaymentChange: h
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,13 +8049,13 @@ 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 }) => {
8028
- var N;
8029
- 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;
8052
+ }, Ho = ({ open: a, onOpenChange: e, planId: t, interval: n, onBack: r, onSuccess: s }) => {
8053
+ var C;
8054
+ const { stripePromise: i, isDark: l, locale: d, isOutdatedBilling: c } = G(), { t: m } = oe(), u = fn(), g = (C = u.data) == null ? void 0 : C.clientSecret, { mutate: b, reset: f } = u;
8030
8055
  Ce(() => {
8031
8056
  a && !c ? b() : f();
8032
8057
  }, [a, c, b, f]);
8033
- const C = _e(
8058
+ const N = _e(
8034
8059
  () => g ? {
8035
8060
  clientSecret: g,
8036
8061
  appearance: Vn(l),
@@ -8048,7 +8073,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8048
8073
  u.error instanceof Error && u.error.message && /* @__PURE__ */ o("p", { className: "bpb-checkout__error-detail", children: u.error.message }),
8049
8074
  /* @__PURE__ */ o("p", { className: "bpb-checkout__error-detail", children: m("checkoutSessionErrorDetail") }),
8050
8075
  /* @__PURE__ */ o(be, { variant: "outline", onClick: () => b(), children: m("tryAgain") })
8051
- ] }) : !C || !g ? /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", "aria-busy": "true", children: [
8076
+ ] }) : !N || !g ? /* @__PURE__ */ p("div", { className: "bpb-checkout__columns", "aria-busy": "true", children: [
8052
8077
  /* @__PURE__ */ p("div", { className: "bpb-checkout__main", children: [
8053
8078
  /* @__PURE__ */ o(Y, { height: 56 }),
8054
8079
  /* @__PURE__ */ o(Y, { height: 56 }),
@@ -8056,8 +8081,8 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8056
8081
  /* @__PURE__ */ o(Y, { height: 56 })
8057
8082
  ] }),
8058
8083
  /* @__PURE__ */ o("div", { className: "bpb-checkout__aside", children: /* @__PURE__ */ o(Y, { height: 320 }) })
8059
- ] }) : /* @__PURE__ */ o(tn, { stripe: i, options: C, children: /* @__PURE__ */ o(
8060
- Go,
8084
+ ] }) : /* @__PURE__ */ o(tn, { stripe: i, options: N, children: /* @__PURE__ */ o(
8085
+ Ko,
8061
8086
  {
8062
8087
  planId: t,
8063
8088
  initialInterval: n,
@@ -8068,7 +8093,7 @@ 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
8098
  return /* @__PURE__ */ p("div", { className: U("bpb-stepper", s), children: [
8074
8099
  /* @__PURE__ */ o(
@@ -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,36 +8132,36 @@ 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", N = (c == null ? void 0 : c.addonsReadonly) ?? !1, C = 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
8148
  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;
8149
+ P[V.id] = (($ = O == null ? void 0 : O.next) == null ? void 0 : $.quantity) ?? (O == null ? void 0 : O.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;
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), O = V == null ? void 0 : V.increments;
8140
8165
  if (!O || $ <= 0)
8141
8166
  return null;
8142
8167
  const j = O.conversation_sessions ?? 0;
@@ -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, O = (h == null ? void 0 : h[P.id]) ?? 0, j = O !== V ? O === 0 ? C ? s("addonRemovedOnDate", { activeNow: V, date: C }) : s("addonRemovedNextCycle", { activeNow: V }) : C ? s("addonChangedOnDate", { activeNow: V, pending: O, date: C }) : s("addonChangedNextCycle", { activeNow: V, pending: O }) : V > 0 ? s("addonActiveOnly", { count: V }) : null, le = M(P.id, O);
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
  " ",
@@ -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`,
8237
+ "aria-label": `${Ue[P.id] ? s(Ue[P.id]) : Sa(P.name)} quantity`,
8213
8238
  value: O,
8214
- onChange: (Z) => g({ ...h ?? {}, [D.id]: Z })
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,30 +8285,30 @@ 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
  ] }),
8279
- C && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__note", role: "alert", children: s("addonsReadonlyNote") }),
8304
+ N && /* @__PURE__ */ o("p", { className: "bpb-manage-addons__note", role: "alert", children: s("addonsReadonlyNote") }),
8280
8305
  /* @__PURE__ */ p("div", { className: "bpb-manage-addons__actions", children: [
8281
8306
  /* @__PURE__ */ o(be, { variant: "outline", onClick: () => a(!1), disabled: m.isPending, children: s("cancel") }),
8282
8307
  /* @__PURE__ */ o(
8283
8308
  be,
8284
8309
  {
8285
8310
  variant: "primary",
8286
- disabled: !T || C,
8311
+ disabled: !x || N,
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(), N = vn(), C = 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, O] = K(null), j = V ?? A.map((X) => ({ type: X.type, value: X.value })), le = Kn(_), ie = V !== null, Z = x || !v, ge = (X, ce) => O(j.map((ae, de) => de === X ? { ...ae, ...ce } : ae)), fe = () => {
8385
8410
  var X;
8386
8411
  return O([...j, { type: ((X = le[0]) == null ? void 0 : X.type) ?? "", value: "" }]);
8387
8412
  }, ye = (X) => O(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 {
@@ -8423,7 +8448,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8423
8448
  Q(!0), H(null);
8424
8449
  try {
8425
8450
  const { address: de, name: Ae } = ae;
8426
- await C.mutateAsync({
8451
+ await N.mutateAsync({
8427
8452
  lineOne: de.line1 ?? "",
8428
8453
  lineTwo: de.line2 ?? void 0,
8429
8454
  city: de.city ?? "",
@@ -8432,7 +8457,7 @@ const Ja = ({ label: a, className: e, id: t, ...n }) => a ? /* @__PURE__ */ p("l
8432
8457
  country: de.country ?? ""
8433
8458
  });
8434
8459
  const Ee = (Ae == null ? void 0 : Ae.trim()) || void 0, Je = j.filter((Ve) => !!Ve.type && Ve.value.trim() !== "").map((Ve) => ({ type: Ve.type, value: Ve.value.trim() }));
8435
- (Ee !== ((g == null ? void 0 : g.name) ?? void 0) || ie) && await N.mutateAsync({ name: Ee, taxIds: Je }), i.capture(pe.BILLING_ADDRESS_UPDATED), s({ type: "success", message: l("paymentDetailsUpdated") }), t == null || t();
8460
+ (Ee !== ((g == null ? void 0 : g.name) ?? void 0) || ie) && await C.mutateAsync({ name: Ee, taxIds: Je }), i.capture(pe.BILLING_ADDRESS_UPDATED), s({ type: "success", message: l("paymentDetailsUpdated") }), t == null || t();
8436
8461
  } catch (de) {
8437
8462
  const Ae = de instanceof Error && de.message ? de.message : l("paymentAddressError");
8438
8463
  H(Ae), s({ type: "error", message: l("paymentDetailsUpdateError") });
@@ -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: U("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,22 +8666,22 @@ 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: N } = la({ period: l, enabled: !d }), C = 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(N).find((B) => B.key === "conversation_sessions"), [N]), S = !C && !d && x && !!k && k.pct / 100 >= ai && !v && !Zn(Jt, m, "modal"), w = C ? !!a : S;
8645
8670
  Ce(() => {
8646
8671
  w && c.capture(pe.PLAN_PICKER_VIEWED, {
8647
- source: N ? "outgrow_free" : "outgrow_free_auto",
8672
+ source: C ? "outgrow_free" : "outgrow_free_auto",
8648
8673
  interval: r
8649
8674
  });
8650
- }, [w, N, c]);
8675
+ }, [w, C, c]);
8651
8676
  const y = () => {
8652
- N || (Xn(Jt, m, "modal"), h(!0)), e == null || e(!1);
8653
- }, P = _e(() => g ? g.filter((B) => {
8677
+ C || (Xn(Jt, m, "modal"), h(!0)), e == null || e(!1);
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,8 +8716,8 @@ 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, O = (s[z] ?? rt[z]).slice(0, ti);
8696
8721
  return /* @__PURE__ */ p(
8697
8722
  "div",
8698
8723
  {
@@ -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") })
@@ -8753,7 +8778,7 @@ const _i = ({
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)
@@ -8814,7 +8839,7 @@ const _i = ({
8814
8839
  }
8815
8840
  ) })
8816
8841
  ] }, i.botId)) });
8817
- }, ja = ({
8842
+ }, Va = ({
8818
8843
  entry: a,
8819
8844
  metric: e,
8820
8845
  planAllowance: t,
@@ -8850,20 +8875,20 @@ const _i = ({
8850
8875
  /* @__PURE__ */ o("span", { className: "bpb-usage-tip__bubble", role: "tooltip", children: u })
8851
8876
  ] })
8852
8877
  ] });
8853
- }, Si = ({
8878
+ }, ki = ({
8854
8879
  period: a,
8855
8880
  showPeriodSelector: e = !0,
8856
8881
  periodMonths: t = 12,
8857
8882
  className: n
8858
8883
  }) => {
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(
8884
+ var D;
8885
+ 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
8886
  0,
8862
- l.findIndex((A) => A.value === d)
8863
- ), g = (A) => {
8864
- const I = l[u + A];
8887
+ l.findIndex((T) => T.value === d)
8888
+ ), g = (T) => {
8889
+ const I = l[u + T];
8865
8890
  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];
8891
+ }, { data: b, isLoading: f, isError: N } = la({ period: d, enabled: !r }), { data: C } = Fe({ enabled: !r }), { data: v } = ze(), h = v == null ? void 0 : v.find((T) => T.id === (C == null ? void 0 : C.plan.current.planId)), A = h ? se(h.name) : void 0, x = (T) => h == null ? void 0 : h.features[T];
8867
8892
  if (r)
8868
8893
  return /* @__PURE__ */ o("div", { className: U("bpb-usage bpb-scope", n), children: /* @__PURE__ */ o(ca, {}) });
8869
8894
  if (f)
@@ -8871,13 +8896,13 @@ const _i = ({
8871
8896
  /* @__PURE__ */ o(Y, { height: 80 }),
8872
8897
  /* @__PURE__ */ o(Y, { height: 140 })
8873
8898
  ] });
8874
- if (C || !b)
8899
+ if (N || !b)
8875
8900
  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 = [
8901
+ const k = b.conversation_sessions, S = b.ai_spend, y = [
8877
8902
  { key: "table_rows", label: i("dashboardTableRows"), unit: "count" },
8878
8903
  { key: "vector_db_storage", label: i("dashboardVectorDb"), unit: "bytes" },
8879
8904
  { key: "file_storage", label: i("dashboardFileStorage"), unit: "bytes" }
8880
- ].filter((A) => b[A.key]);
8905
+ ].filter((T) => b[T.key]);
8881
8906
  return /* @__PURE__ */ p("div", { className: U("bpb-usage bpb-scope", n), children: [
8882
8907
  e && l.length > 1 && /* @__PURE__ */ p("div", { className: "bpb-usage__header", children: [
8883
8908
  /* @__PURE__ */ o("span", { className: "bpb-usage__header-title", children: i("dashboardUsage") }),
@@ -8896,15 +8921,15 @@ const _i = ({
8896
8921
  }
8897
8922
  ),
8898
8923
  /* @__PURE__ */ p("span", { className: "bpb-usage__period-field", children: [
8899
- /* @__PURE__ */ o(Fo, { size: 15, className: "bpb-usage__period-icon" }),
8924
+ /* @__PURE__ */ o(Lo, { size: 15, className: "bpb-usage__period-icon" }),
8900
8925
  /* @__PURE__ */ o(
8901
8926
  "select",
8902
8927
  {
8903
8928
  className: "bpb-usage__period-select",
8904
8929
  "aria-label": i("dashboardBillingPeriod"),
8905
8930
  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))
8931
+ onChange: (T) => c(T.target.value),
8932
+ children: l.map((T) => /* @__PURE__ */ o("option", { value: T.value, children: T.label }, T.value))
8908
8933
  }
8909
8934
  ),
8910
8935
  /* @__PURE__ */ o(ct, { size: 14, className: "bpb-usage__period-chevron" })
@@ -8923,44 +8948,44 @@ const _i = ({
8923
8948
  ] })
8924
8949
  ] })
8925
8950
  ] }),
8926
- S && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8951
+ k && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8927
8952
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardConversationsTitle") }),
8928
8953
  /* @__PURE__ */ o("p", { className: "bpb-usage__group-hint", children: i("dashboardConversationsHint") }),
8929
8954
  /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(
8930
- ja,
8955
+ Va,
8931
8956
  {
8932
- entry: S,
8957
+ entry: k,
8933
8958
  metric: { key: "conversation_sessions", label: i("dashboardConversationsMetric"), unit: "count" },
8934
- planAllowance: T("conversation_sessions"),
8935
- planName: x
8959
+ planAllowance: x("conversation_sessions"),
8960
+ planName: A
8936
8961
  }
8937
8962
  ) })
8938
8963
  ] }),
8939
8964
  y.length > 0 && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8940
8965
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardStorageTitle") }),
8941
8966
  /* @__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,
8967
+ /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: y.map((T) => /* @__PURE__ */ o(
8968
+ Va,
8944
8969
  {
8945
- entry: b[A.key],
8946
- metric: A,
8947
- planAllowance: T(A.key),
8948
- planName: x
8970
+ entry: b[T.key],
8971
+ metric: T,
8972
+ planAllowance: x(T.key),
8973
+ planName: A
8949
8974
  },
8950
- A.key
8975
+ T.key
8951
8976
  )) })
8952
8977
  ] }),
8953
- k && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8978
+ S && /* @__PURE__ */ p("section", { className: "bpb-usage__group", children: [
8954
8979
  /* @__PURE__ */ o("h3", { className: "bpb-usage__group-title", children: i("dashboardAiTitle") }),
8955
8980
  /* @__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" } }) }),
8981
+ /* @__PURE__ */ o("div", { className: "bpb-usage__card", children: /* @__PURE__ */ o(Va, { entry: S, metric: { key: "ai_spend", label: i("dashboardAiSpend"), unit: "nano-usd" } }) }),
8957
8982
  m && /* @__PURE__ */ p("div", { className: "bpb-usage__card bpb-usage__card--bots", children: [
8958
8983
  /* @__PURE__ */ o("span", { className: "bpb-usage__subhead", children: i("dashboardAiByBot") }),
8959
- /* @__PURE__ */ o(si, { period: d })
8984
+ /* @__PURE__ */ o(oi, { period: d })
8960
8985
  ] })
8961
8986
  ] })
8962
8987
  ] });
8963
- }, Qt = "usage-banner", ki = ({
8988
+ }, Qt = "usage-banner", wi = ({
8964
8989
  position: a = "inline",
8965
8990
  threshold: e = 0.9,
8966
8991
  onUpgrade: t,
@@ -8969,22 +8994,22 @@ const _i = ({
8969
8994
  period: s,
8970
8995
  className: i
8971
8996
  }) => {
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)
8997
+ const { isOutdatedBilling: l, analytics: d, scope: c } = G(), { t: m } = oe(), { data: u } = la({ period: s, enabled: !l }), [g, b] = K({}), [f, N] = K(!1), [C, 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));
8998
+ if (l || !h || A)
8974
8999
  return null;
8975
- const S = {
9000
+ const k = {
8976
9001
  conversation_sessions: m("metricConversations"),
8977
9002
  table_rows: m("metricTableRows"),
8978
9003
  vector_db_storage: m("metricVectorDb"),
8979
9004
  file_storage: m("metricFileStorage"),
8980
9005
  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 = () => {
9006
+ }[h.key] ?? h.key.replace(/_/g, " "), S = Math.min(100, Math.round(h.pct * 100)), w = h.pct >= 1, y = () => {
8982
9007
  d.capture(pe.UPGRADE_CTA_CLICKED, {
8983
9008
  source: "usage_banner",
8984
9009
  metric: h.key,
8985
9010
  usage_pct: Math.round(h.pct * 100)
8986
- }), t ? t() : C(!0);
8987
- }, P = w ? "critical" : "warning";
9011
+ }), t ? t() : N(!0);
9012
+ }, D = w ? "critical" : "warning";
8988
9013
  return /* @__PURE__ */ p(ve, { children: [
8989
9014
  /* @__PURE__ */ p(
8990
9015
  "div",
@@ -8992,14 +9017,14 @@ const _i = ({
8992
9017
  className: U(
8993
9018
  "bpb-usage-banner bpb-scope",
8994
9019
  `bpb-usage-banner--${a}`,
8995
- `bpb-usage-banner--${P}`,
9020
+ `bpb-usage-banner--${D}`,
8996
9021
  i
8997
9022
  ),
8998
9023
  role: "alert",
8999
9024
  "aria-live": "polite",
9000
9025
  children: [
9001
9026
  /* @__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 }) }),
9027
+ /* @__PURE__ */ o("p", { className: "bpb-usage-banner__text", children: w ? m("usageBannerLimitReached", { label: k }) : m("usageBannerNearLimit", { pct: S, label: k }) }),
9003
9028
  /* @__PURE__ */ p("div", { className: "bpb-usage-banner__actions", children: [
9004
9029
  /* @__PURE__ */ o(be, { variant: "primary", size: "sm", onClick: y, children: r ?? m("usageBannerDefaultCta") }),
9005
9030
  n && /* @__PURE__ */ o(
@@ -9009,7 +9034,7 @@ const _i = ({
9009
9034
  className: "bpb-usage-banner__dismiss",
9010
9035
  "aria-label": m("usageBannerDismiss"),
9011
9036
  onClick: () => {
9012
- Xn(Qt, c, h.key), b((A) => ({ ...A, [h.key]: !0 }));
9037
+ Xn(Qt, c, h.key), b((T) => ({ ...T, [h.key]: !0 }));
9013
9038
  },
9014
9039
  children: /* @__PURE__ */ o(lt, { size: 16 })
9015
9040
  }
@@ -9020,31 +9045,31 @@ const _i = ({
9020
9045
  ),
9021
9046
  !t && /* @__PURE__ */ p(ve, { children: [
9022
9047
  /* @__PURE__ */ o(
9023
- Mo,
9048
+ Bo,
9024
9049
  {
9025
9050
  open: f,
9026
- onOpenChange: C,
9027
- onSelectPlan: (A, I) => {
9028
- C(!1), v({ planId: A, interval: I });
9051
+ onOpenChange: N,
9052
+ onSelectPlan: (T, I) => {
9053
+ N(!1), v({ planId: T, interval: I });
9029
9054
  }
9030
9055
  }
9031
9056
  ),
9032
- N && /* @__PURE__ */ o(
9033
- Ko,
9057
+ C && /* @__PURE__ */ o(
9058
+ Ho,
9034
9059
  {
9035
- open: !!N,
9036
- onOpenChange: (A) => !A && v(null),
9037
- planId: N.planId,
9038
- interval: N.interval,
9060
+ open: !!C,
9061
+ onOpenChange: (T) => !T && v(null),
9062
+ planId: C.planId,
9063
+ interval: C.interval,
9039
9064
  onBack: () => {
9040
- v(null), C(!0);
9065
+ v(null), N(!0);
9041
9066
  },
9042
9067
  onSuccess: () => v(null)
9043
9068
  }
9044
9069
  )
9045
9070
  ] })
9046
9071
  ] });
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: [
9072
+ }, Ai = ({ 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: [
9048
9073
  /* @__PURE__ */ p("div", { className: "bpb-action-card__header", children: [
9049
9074
  /* @__PURE__ */ o(a, { size: 20 }),
9050
9075
  e
@@ -9073,20 +9098,20 @@ const _i = ({
9073
9098
  ] }),
9074
9099
  /* @__PURE__ */ p("span", { className: "bpb-summary-card__action", children: [
9075
9100
  n("open"),
9076
- /* @__PURE__ */ o(Ma, { size: 15 })
9101
+ /* @__PURE__ */ o(Ba, { size: 15 })
9077
9102
  ] })
9078
9103
  ] })
9079
9104
  ]
9080
9105
  }
9081
9106
  );
9082
- }, Ai = ({ onManage: a, className: e }) => {
9083
- var C, N;
9107
+ }, xi = ({ onManage: a, className: e }) => {
9108
+ var N, C;
9084
9109
  const { isOutdatedBilling: t } = G(), { t: n } = oe(), { data: r, isLoading: s } = Fe({ enabled: !t }), { data: i, isLoading: l } = ze();
9085
9110
  if (t)
9086
9111
  return /* @__PURE__ */ o(er, { isAddons: !1, className: e });
9087
9112
  if (s || l)
9088
9113
  return /* @__PURE__ */ o(Y, { height: 84, rounded: !0, className: U("bpb-scope", e) });
9089
- 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";
9114
+ 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 = ((N = c == null ? void 0 : c.prices[m]) == null ? void 0 : N.amount) ?? 0, g = ((C = c == null ? void 0 : c.prices[m]) == null ? void 0 : C.currency) ?? "usd", b = c == null ? void 0 : c.features.conversation_sessions, f = c ? ue(c) : "community";
9090
9115
  return /* @__PURE__ */ p(
9091
9116
  "button",
9092
9117
  {
@@ -9116,7 +9141,7 @@ const _i = ({
9116
9141
  ]
9117
9142
  }
9118
9143
  );
9119
- }, xi = ({ onManage: a, className: e }) => {
9144
+ }, Ti = ({ onManage: a, className: e }) => {
9120
9145
  const { isOutdatedBilling: t } = G(), { t: n } = oe(), { data: r, isLoading: s } = Fe({ enabled: !t }), { data: i, isLoading: l } = ia();
9121
9146
  if (t)
9122
9147
  return /* @__PURE__ */ o(er, { isAddons: !0, className: e });
@@ -9125,7 +9150,7 @@ const _i = ({
9125
9150
  const d = (i ?? []).flatMap((c) => {
9126
9151
  var u;
9127
9152
  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 }] : [];
9153
+ return m > 0 ? [{ name: Ue[c.id] ? n(Ue[c.id]) : Sa(c.name), quantity: m }] : [];
9129
9154
  });
9130
9155
  return /* @__PURE__ */ p(
9131
9156
  "button",
@@ -9158,7 +9183,7 @@ const _i = ({
9158
9183
  ]
9159
9184
  }
9160
9185
  );
9161
- }, Ti = ({ onManage: a, className: e }) => {
9186
+ }, Di = ({ onManage: a, className: e }) => {
9162
9187
  var I, R;
9163
9188
  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
9189
  if (t) {
@@ -9179,7 +9204,7 @@ const _i = ({
9179
9204
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__cta", children: [
9180
9205
  i("open"),
9181
9206
  " ",
9182
- /* @__PURE__ */ o(Ma, { size: 16 })
9207
+ /* @__PURE__ */ o(Ba, { size: 16 })
9183
9208
  ] })
9184
9209
  ]
9185
9210
  }
@@ -9187,15 +9212,15 @@ const _i = ({
9187
9212
  }
9188
9213
  if (d || m || g)
9189
9214
  return /* @__PURE__ */ o(Y, { height: 132, rounded: !0, className: U("bpb-scope", e) });
9190
- 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(
9215
+ 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)), N = (b == null ? void 0 : b.interval) ?? "month", C = ((I = f == null ? void 0 : f.prices[N]) == null ? void 0 : I.currency) ?? "usd", v = f ? ue(f) : "community", h = Object.fromEntries(
9191
9216
  Object.entries((l == null ? void 0 : l.addons) ?? {}).map(([E, J]) => {
9192
9217
  var M;
9193
9218
  return [E, ((M = J.current) == null ? void 0 : M.quantity) ?? 0];
9194
9219
  })
9195
- ), x = ((R = f == null ? void 0 : f.prices[C]) == null ? void 0 : R.amount) ?? 0, T = (u ?? []).reduce((E, J) => {
9196
- const M = f ? tt(J, f, C) : null;
9220
+ ), A = ((R = f == null ? void 0 : f.prices[N]) == null ? void 0 : R.amount) ?? 0, x = (u ?? []).reduce((E, J) => {
9221
+ const M = f ? tt(J, f, N) : null;
9197
9222
  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";
9223
+ }, 0), k = A + x, S = N === "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
9224
  return /* @__PURE__ */ p(
9200
9225
  "button",
9201
9226
  {
@@ -9217,15 +9242,15 @@ const _i = ({
9217
9242
  ] }) : `${re(w.total)} ${y}` })
9218
9243
  ] }),
9219
9244
  /* @__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 })
9245
+ T ? /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price", children: i("planBannerCustomPricing") }) : /* @__PURE__ */ p("span", { className: "bpb-plan-banner__price", children: [
9246
+ k > 0 ? ee(k, C, 0) : i("free"),
9247
+ k > 0 && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__price-suffix", children: S })
9223
9248
  ] }),
9224
9249
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__meta", children: [
9225
- i(C === "year" ? "billedAnnually" : "billedMonthly"),
9226
- T > 0 && ` ${i("planBannerInclAddons")}`
9250
+ i(N === "year" ? "billedAnnually" : "billedMonthly"),
9251
+ x > 0 && ` ${i("planBannerInclAddons")}`
9227
9252
  ] }),
9228
- P && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: i("planBannerRenews", { date: P }) })
9253
+ D && /* @__PURE__ */ o("span", { className: "bpb-plan-banner__meta", children: i("planBannerRenews", { date: D }) })
9229
9254
  ] }),
9230
9255
  /* @__PURE__ */ p("span", { className: "bpb-plan-banner__cta", children: [
9231
9256
  i("planBannerManageCta"),
@@ -9235,55 +9260,55 @@ const _i = ({
9235
9260
  ]
9236
9261
  }
9237
9262
  );
9238
- }, Di = ({ onManage: a, period: e, variant: t = "card", className: n, style: r }) => {
9263
+ }, Pi = ({ onManage: a, period: e, variant: t = "card", className: n, style: r }) => {
9239
9264
  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
9265
  if (s)
9241
9266
  return null;
9242
9267
  if (c || u || b)
9243
9268
  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) {
9269
+ const f = m == null ? void 0 : m.find((E) => E.id === (d == null ? void 0 : d.plan.current.planId)), N = za(g), C = N.find((E) => E.key === "conversation_sessions"), v = N[0], h = v && v.key !== "conversation_sessions" && v.pct >= 75 ? v : C ?? 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;
9270
+ let D = null, T = null;
9271
+ if (h && S) {
9247
9272
  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 });
9273
+ 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
9274
  }
9250
9275
  const I = /* @__PURE__ */ o(ve, { children: h ? /* @__PURE__ */ p(ve, { children: [
9251
9276
  /* @__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}`) }),
9277
+ S && /* @__PURE__ */ o($n, { size: 16, className: U("bpb-plan-usage__alert", `bpb-plan-usage__alert--${k}`) }),
9253
9278
  /* @__PURE__ */ o("span", { className: "bpb-plan-usage__plan", children: h.label }),
9254
9279
  /* @__PURE__ */ p("span", { className: "bpb-plan-usage__count", children: [
9255
9280
  ga(h.used, h.unit),
9256
9281
  " / ",
9257
9282
  ga(h.quota, h.unit)
9258
9283
  ] }),
9259
- a && !k && /* @__PURE__ */ o(sa, { size: 15, className: "bpb-plan-usage__chevron" })
9284
+ a && !S && /* @__PURE__ */ o(sa, { size: 15, className: "bpb-plan-usage__chevron" })
9260
9285
  ] }),
9261
9286
  /* @__PURE__ */ o(
9262
9287
  "div",
9263
9288
  {
9264
9289
  className: "bpb-plan-usage__bar",
9265
9290
  role: "progressbar",
9266
- "aria-valuenow": x,
9291
+ "aria-valuenow": A,
9267
9292
  "aria-valuemin": 0,
9268
9293
  "aria-valuemax": 100,
9269
9294
  children: /* @__PURE__ */ o(
9270
9295
  "div",
9271
9296
  {
9272
- className: U("bpb-plan-usage__fill", `bpb-plan-usage__fill--${S}`),
9273
- style: { width: `${T}%` }
9297
+ className: U("bpb-plan-usage__fill", `bpb-plan-usage__fill--${k}`),
9298
+ style: { width: `${x}%` }
9274
9299
  }
9275
9300
  )
9276
9301
  }
9277
9302
  ),
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,
9303
+ D ? /* @__PURE__ */ p("p", { className: "bpb-plan-usage__status", children: [
9304
+ /* @__PURE__ */ p("strong", { className: U("bpb-plan-usage__status-word", `bpb-plan-usage__status-word--${k}`), children: [
9305
+ D,
9281
9306
  "."
9282
9307
  ] }),
9283
9308
  " ",
9284
- A && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__status-detail", children: A })
9309
+ T && /* @__PURE__ */ o("span", { className: "bpb-plan-usage__status-detail", children: T })
9285
9310
  ] }) : 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: [
9311
+ a && S && /* @__PURE__ */ p("span", { className: "bpb-plan-usage__cta", children: [
9287
9312
  l("usageWidgetViewOptions"),
9288
9313
  /* @__PURE__ */ o(dt, { size: 14 })
9289
9314
  ] })
@@ -9293,12 +9318,12 @@ const _i = ({
9293
9318
  ] }) }), R = U(
9294
9319
  "bpb-plan-usage bpb-scope",
9295
9320
  `bpb-plan-usage--${t}`,
9296
- k && `bpb-plan-usage--${S}`,
9321
+ S && `bpb-plan-usage--${k}`,
9297
9322
  a && "bpb-plan-usage--clickable",
9298
9323
  n
9299
9324
  );
9300
9325
  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 = ({
9326
+ }, ii = ({
9302
9327
  children: a,
9303
9328
  delay: e = 200,
9304
9329
  placement: t = "top",
@@ -9307,33 +9332,33 @@ const _i = ({
9307
9332
  block: s = !1,
9308
9333
  className: i
9309
9334
  }) => {
9310
- const { isOutdatedBilling: l, locale: d, analytics: c } = G(), { data: m } = la({ period: n, enabled: !l }), { data: u } = Fe({ enabled: !l }), { data: g } = ze(), [b, f] = K(!1), C = Ea(null), N = () => {
9311
- C.current && (clearTimeout(C.current), C.current = null);
9335
+ const { isOutdatedBilling: l, locale: d, analytics: c } = G(), { data: m } = la({ period: n, enabled: !l }), { data: u } = Fe({ enabled: !l }), { data: g } = ze(), [b, f] = K(!1), N = Ea(null), C = () => {
9336
+ N.current && (clearTimeout(N.current), N.current = null);
9312
9337
  };
9313
- Ce(() => N, []);
9314
- const v = Ba(m), h = !l && v.length > 0, x = () => {
9315
- h && (N(), C.current = setTimeout(() => f(!0), Math.max(0, e)));
9316
- }, T = () => {
9317
- 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 = () => {
9338
+ Ce(() => C, []);
9339
+ const v = za(m), h = !l && v.length > 0, A = () => {
9340
+ h && (C(), N.current = setTimeout(() => f(!0), Math.max(0, e)));
9341
+ }, x = () => {
9342
+ C(), f(!1);
9343
+ }, 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
9344
  c.capture(pe.UPGRADE_CTA_CLICKED, { source: "usage_popover" }), r == null || r();
9320
9345
  };
9321
9346
  return /* @__PURE__ */ p(
9322
9347
  "span",
9323
9348
  {
9324
9349
  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,
9350
+ onMouseEnter: A,
9351
+ onMouseLeave: x,
9352
+ onFocus: A,
9353
+ onBlur: x,
9329
9354
  children: [
9330
9355
  a,
9331
9356
  b && h && /* @__PURE__ */ p("span", { className: U("bpb-usage-pop__card", `bpb-usage-pop__card--${t}`), role: "tooltip", children: [
9332
9357
  y ? /* @__PURE__ */ p("span", { className: "bpb-usage-pop__header", children: [
9333
9358
  /* @__PURE__ */ o("span", { className: "bpb-usage-pop__plan-name", children: "Free plan usage" }),
9334
- P && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__subtitle", children: [
9359
+ D && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__subtitle", children: [
9335
9360
  /* @__PURE__ */ p("strong", { children: [
9336
- re(P.quota),
9361
+ re(D.quota),
9337
9362
  " conversations"
9338
9363
  ] }),
9339
9364
  " included, total. They do not renew, and Free has no top-ups."
@@ -9341,7 +9366,7 @@ const _i = ({
9341
9366
  ] }) : /* @__PURE__ */ p(ve, { children: [
9342
9367
  /* @__PURE__ */ p("span", { className: "bpb-usage-pop__plan", children: [
9343
9368
  /* @__PURE__ */ p("span", { className: "bpb-usage-pop__plan-name", children: [
9344
- k,
9369
+ S,
9345
9370
  " plan"
9346
9371
  ] }),
9347
9372
  w && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__reset", children: [
@@ -9371,7 +9396,7 @@ const _i = ({
9371
9396
  ) })
9372
9397
  ] }, R.key);
9373
9398
  }),
9374
- A && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__nudge", children: [
9399
+ T && /* @__PURE__ */ p("span", { className: "bpb-usage-pop__nudge", children: [
9375
9400
  /* @__PURE__ */ p("span", { className: "bpb-usage-pop__nudge-text", children: [
9376
9401
  /* @__PURE__ */ o("strong", { children: "Need more room?" }),
9377
9402
  " Plus includes 250 conversations a month, unlimited AI agents, and packs of 100 when you need them."
@@ -9385,7 +9410,7 @@ const _i = ({
9385
9410
  ]
9386
9411
  }
9387
9412
  );
9388
- }, Pi = ({
9413
+ }, Fi = ({
9389
9414
  size: a = 20,
9390
9415
  thickness: e = 3.5,
9391
9416
  showLabel: t = !1,
@@ -9395,10 +9420,10 @@ const _i = ({
9395
9420
  className: i,
9396
9421
  ...l
9397
9422
  }) => {
9398
- const { isOutdatedBilling: d } = G(), { data: c } = la({ period: s, enabled: !d }), m = Ba(c);
9423
+ const { isOutdatedBilling: d } = G(), { data: c } = la({ period: s, enabled: !d }), m = za(c);
9399
9424
  if (d || m.length === 0)
9400
9425
  return null;
9401
- 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: [
9426
+ const u = m[0], g = mt(u.pct), b = u.pct > 0 ? Math.max(5, u.pct) : 0, f = (a - e) / 2, N = 2 * Math.PI * f, C = N * (1 - b / 100), v = l["aria-label"] ?? `${Math.round(u.pct)}% of your ${u.label.toLowerCase()} used`, h = /* @__PURE__ */ p(ve, { children: [
9402
9427
  /* @__PURE__ */ p("svg", { className: "bpb-usage-ring__svg", width: a, height: a, viewBox: `0 0 ${a} ${a}`, "aria-hidden": !0, children: [
9403
9428
  /* @__PURE__ */ o(
9404
9429
  "circle",
@@ -9421,8 +9446,8 @@ const _i = ({
9421
9446
  fill: "none",
9422
9447
  strokeWidth: e,
9423
9448
  strokeLinecap: "round",
9424
- strokeDasharray: C,
9425
- strokeDashoffset: N,
9449
+ strokeDasharray: N,
9450
+ strokeDashoffset: C,
9426
9451
  transform: `rotate(-90 ${a / 2} ${a / 2})`
9427
9452
  }
9428
9453
  )
@@ -9431,81 +9456,81 @@ const _i = ({
9431
9456
  Math.round(u.pct),
9432
9457
  "%"
9433
9458
  ] })
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 }) });
9459
+ ] }), A = U("bpb-usage-ring", n && "bpb-usage-ring--clickable");
9460
+ 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
9461
  };
9437
9462
  export {
9438
- xi as AddonsSummaryCard,
9463
+ Ti as AddonsSummaryCard,
9439
9464
  dt as ArrowRightIcon,
9440
9465
  pe as BILLING_EVENTS,
9441
9466
  st as Badge,
9442
- hi as BankIcon,
9443
- wi as BillingActionCard,
9444
- gi as BillingProvider,
9467
+ bi as BankIcon,
9468
+ Ai as BillingActionCard,
9469
+ hi as BillingProvider,
9445
9470
  it as BoltIcon,
9446
9471
  be as Button,
9447
- Fo as CalendarIcon,
9472
+ Lo as CalendarIcon,
9448
9473
  jn as CardBrandBadge,
9449
9474
  Kt as CardIcon,
9450
- wo as ChartIcon,
9451
- Co as CheckIcon,
9452
- Ko as CheckoutDialog,
9475
+ Ao as ChartIcon,
9476
+ No as CheckIcon,
9477
+ Ho as CheckoutDialog,
9453
9478
  ct as ChevronDownIcon,
9454
9479
  qn as ChevronLeftIcon,
9455
9480
  sa as ChevronRightIcon,
9456
9481
  lt as CloseIcon,
9457
- Zo as DEFAULT_FEATURE_LABELS,
9482
+ Xo as DEFAULT_FEATURE_LABELS,
9458
9483
  rt as DEFAULT_PLAN_FEATURES,
9459
9484
  xe as Dialog,
9460
9485
  Ht as DownloadIcon,
9461
9486
  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,
9487
+ Ba as ExternalLinkIcon,
9488
+ xo as GlobeIcon,
9489
+ ko as InfinityIcon,
9490
+ Ia as InfoTooltip,
9491
+ Qa as Input,
9492
+ Ci as InvoicesDialog,
9468
9493
  ot as LayersIcon,
9469
- bi as LockIcon,
9470
- yi as ManageAddonsDialog,
9471
- No as MessageIcon,
9472
- To as MinusIcon,
9494
+ fi as LockIcon,
9495
+ vi as ManageAddonsDialog,
9496
+ _o as MessageIcon,
9497
+ Do as MinusIcon,
9473
9498
  pt as NANO_DOLLARS_PER_DOLLAR,
9474
9499
  ca as OutdatedBillingGate,
9475
- _i as OutgrowFreeDialog,
9500
+ Si as OutgrowFreeDialog,
9476
9501
  On as PLAN_FEATURE_KEYS,
9477
9502
  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,
9503
+ To as PaintIcon,
9504
+ Ni as PaymentMethodDialog,
9505
+ Di as PlanBanner,
9506
+ xi as PlanSummaryCard,
9507
+ Pi as PlanUsageWidget,
9508
+ Po as PlusIcon,
9509
+ So as PuzzleIcon,
9510
+ yi as ReceiptIcon,
9511
+ Io as SegmentedControl,
9487
9512
  Hn as Select,
9488
9513
  Gt as ShieldIcon,
9489
9514
  Y as Skeleton,
9490
9515
  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,
9516
+ Yo as Stepper,
9517
+ ei as USAGE_METRICS,
9518
+ Bo as UpgradePlanDialog,
9519
+ wi as UsageBanner,
9520
+ ki as UsageDashboard,
9521
+ ii as UsagePopover,
9522
+ Fi as UsageRing,
9523
+ wo as UsersIcon,
9524
+ ho as addDays,
9525
+ Sa as addonDisplayName,
9526
+ yo as addonLimitsPreview,
9502
9527
  tt as addonPrice,
9503
9528
  me as billingKeys,
9504
9529
  U as cn,
9505
9530
  nt as conversationPackPrice,
9506
- bo as conversationsAddon,
9507
- Na as currencySymbol,
9508
- Ni as featureLabel,
9531
+ fo as conversationsAddon,
9532
+ _a as currencySymbol,
9533
+ _i as featureLabel,
9509
9534
  ra as formatBytes,
9510
9535
  ee as formatCurrency,
9511
9536
  $e as formatDate,
@@ -9516,10 +9541,10 @@ export {
9516
9541
  gr as getStripePromise,
9517
9542
  ut as iconForFeature,
9518
9543
  se as planDisplayName,
9519
- yo as planEntitlements,
9544
+ vo as planEntitlements,
9520
9545
  ue as planKind,
9521
9546
  Gn as toStripeLocale,
9522
- Ba as usageItems,
9547
+ za as usageItems,
9523
9548
  mt as usageTier,
9524
9549
  ia as useAddons,
9525
9550
  G as useBilling,
@@ -9527,17 +9552,17 @@ export {
9527
9552
  bn as useBillingReadonly,
9528
9553
  fn as useCreatePaymentMethodIntent,
9529
9554
  hn as useCustomer,
9530
- fs as useInvoices,
9555
+ ys as useInvoices,
9531
9556
  mn as usePaymentMethod,
9532
9557
  ze as usePlans,
9533
- Cs as useSetAddons,
9558
+ Ns as useSetAddons,
9534
9559
  vn as useSetBillingAddress,
9535
9560
  Cn as useSetCustomer,
9536
9561
  yn as useSetPaymentMethod,
9537
9562
  Nn as useSetSubscription,
9538
9563
  Fe as useSubscription,
9539
9564
  pn as useSubscriptionPreview,
9540
- vs as useSupportsUsageByBot,
9565
+ Cs as useSupportsUsageByBot,
9541
9566
  la as useUsage,
9542
- ys as useUsageByBot
9567
+ vs as useUsageByBot
9543
9568
  };