@contentful/optimization-web 0.1.0-alpha4 → 0.1.0-alpha6

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
@@ -1,4 +1,4 @@
1
- var Ur = Symbol.for("preact-signals");
1
+ var Dr = Symbol.for("preact-signals");
2
2
  function ot() {
3
3
  if (J > 1)
4
4
  J--;
@@ -7,7 +7,7 @@ function ot() {
7
7
  var n = Me;
8
8
  for (Me = void 0, Rt++; n !== void 0; ) {
9
9
  var r = n.o;
10
- if (n.o = void 0, n.f &= -3, !(8 & n.f) && Vn(n)) try {
10
+ if (n.o = void 0, n.f &= -3, !(8 & n.f) && Nn(n)) try {
11
11
  n.c();
12
12
  } catch (i) {
13
13
  e || (t = i, e = !0);
@@ -18,7 +18,7 @@ function ot() {
18
18
  if (Rt = 0, J--, e) throw t;
19
19
  }
20
20
  }
21
- function ye(t) {
21
+ function me(t) {
22
22
  if (J > 0) return t();
23
23
  J++;
24
24
  try {
@@ -38,7 +38,7 @@ function Dt(t) {
38
38
  }
39
39
  }
40
40
  var Me = void 0, J = 0, Rt = 0, Xe = 0;
41
- function xn(t) {
41
+ function Vn(t) {
42
42
  if (y !== void 0) {
43
43
  var e = t.n;
44
44
  if (e === void 0 || e.t !== y)
@@ -50,7 +50,7 @@ function xn(t) {
50
50
  function C(t, e) {
51
51
  this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
52
52
  }
53
- C.prototype.brand = Ur;
53
+ C.prototype.brand = Dr;
54
54
  C.prototype.h = function() {
55
55
  return !0;
56
56
  };
@@ -102,7 +102,7 @@ C.prototype.peek = function() {
102
102
  }
103
103
  };
104
104
  Object.defineProperty(C.prototype, "value", { get: function() {
105
- var t = xn(this);
105
+ var t = Vn(this);
106
106
  return t !== void 0 && (t.i = this.i), this.v;
107
107
  }, set: function(t) {
108
108
  if (t !== this.v) {
@@ -115,14 +115,14 @@ Object.defineProperty(C.prototype, "value", { get: function() {
115
115
  }
116
116
  }
117
117
  } });
118
- function _e(t, e) {
118
+ function we(t, e) {
119
119
  return new C(t, e);
120
120
  }
121
- function Vn(t) {
121
+ function Nn(t) {
122
122
  for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
123
123
  return !1;
124
124
  }
125
- function Nn(t) {
125
+ function Ln(t) {
126
126
  for (var e = t.s; e !== void 0; e = e.n) {
127
127
  var n = e.S.n;
128
128
  if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
@@ -131,7 +131,7 @@ function Nn(t) {
131
131
  }
132
132
  }
133
133
  }
134
- function Ln(t) {
134
+ function jn(t) {
135
135
  for (var e = t.s, n = void 0; e !== void 0; ) {
136
136
  var r = e.p;
137
137
  e.i === -1 ? (e.S.U(e), r !== void 0 && (r.n = e.n), e.n !== void 0 && (e.n.p = r)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = r;
@@ -145,17 +145,17 @@ ae.prototype = new C();
145
145
  ae.prototype.h = function() {
146
146
  if (this.f &= -3, 1 & this.f) return !1;
147
147
  if ((36 & this.f) == 32 || (this.f &= -5, this.g === Xe)) return !0;
148
- if (this.g = Xe, this.f |= 1, this.i > 0 && !Vn(this))
148
+ if (this.g = Xe, this.f |= 1, this.i > 0 && !Nn(this))
149
149
  return this.f &= -2, !0;
150
150
  var t = y;
151
151
  try {
152
- Nn(this), y = this;
152
+ Ln(this), y = this;
153
153
  var e = this.x();
154
154
  (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
155
155
  } catch (n) {
156
156
  this.v = n, this.f |= 16, this.i++;
157
157
  }
158
- return y = t, Ln(this), this.f &= -2, !0;
158
+ return y = t, jn(this), this.f &= -2, !0;
159
159
  };
160
160
  ae.prototype.S = function(t) {
161
161
  if (this.t === void 0) {
@@ -178,14 +178,14 @@ ae.prototype.N = function() {
178
178
  };
179
179
  Object.defineProperty(ae.prototype, "value", { get: function() {
180
180
  if (1 & this.f) throw new Error("Cycle detected");
181
- var t = xn(this);
181
+ var t = Vn(this);
182
182
  if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
183
183
  return this.v;
184
184
  } });
185
- function jn(t, e) {
185
+ function Bn(t, e) {
186
186
  return new ae(t, e);
187
187
  }
188
- function Bn(t) {
188
+ function Un(t) {
189
189
  var e = t.u;
190
190
  if (t.u = void 0, typeof e == "function") {
191
191
  J++;
@@ -202,16 +202,16 @@ function Bn(t) {
202
202
  }
203
203
  function Zt(t) {
204
204
  for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
205
- t.x = void 0, t.s = void 0, Bn(t);
205
+ t.x = void 0, t.s = void 0, Un(t);
206
206
  }
207
- function Dr(t) {
207
+ function Zr(t) {
208
208
  if (y !== this) throw new Error("Out-of-order effect");
209
- Ln(this), y = t, this.f &= -2, 8 & this.f && Zt(this), ot();
209
+ jn(this), y = t, this.f &= -2, 8 & this.f && Zt(this), ot();
210
210
  }
211
- function we(t, e) {
211
+ function Ee(t, e) {
212
212
  this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
213
213
  }
214
- we.prototype.c = function() {
214
+ Ee.prototype.c = function() {
215
215
  var t = this.S();
216
216
  try {
217
217
  if (8 & this.f || this.x === void 0) return;
@@ -221,23 +221,23 @@ we.prototype.c = function() {
221
221
  t();
222
222
  }
223
223
  };
224
- we.prototype.S = function() {
224
+ Ee.prototype.S = function() {
225
225
  if (1 & this.f) throw new Error("Cycle detected");
226
- this.f |= 1, this.f &= -9, Bn(this), Nn(this), J++;
226
+ this.f |= 1, this.f &= -9, Un(this), Ln(this), J++;
227
227
  var t = y;
228
- return y = this, Dr.bind(this, t);
228
+ return y = this, Zr.bind(this, t);
229
229
  };
230
- we.prototype.N = function() {
230
+ Ee.prototype.N = function() {
231
231
  2 & this.f || (this.f |= 2, this.o = Me, Me = this);
232
232
  };
233
- we.prototype.d = function() {
233
+ Ee.prototype.d = function() {
234
234
  this.f |= 8, 1 & this.f || Zt(this);
235
235
  };
236
- we.prototype.dispose = function() {
236
+ Ee.prototype.dispose = function() {
237
237
  this.d();
238
238
  };
239
239
  function x(t, e) {
240
- var n = new we(t, e);
240
+ var n = new Ee(t, e);
241
241
  try {
242
242
  n.c();
243
243
  } catch (i) {
@@ -300,28 +300,28 @@ function p(t, e, n) {
300
300
  value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(t)
301
301
  }), Object.defineProperty(s, "name", { value: t }), s;
302
302
  }
303
- class me extends Error {
303
+ class be extends Error {
304
304
  constructor() {
305
305
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
306
306
  }
307
307
  }
308
- class Zr extends Error {
308
+ class Fr extends Error {
309
309
  constructor(e) {
310
310
  super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
311
311
  }
312
312
  }
313
- const Fr = {};
314
- function Ee(t) {
315
- return Fr;
313
+ const qr = {};
314
+ function Se(t) {
315
+ return qr;
316
316
  }
317
- function qr(t) {
317
+ function Hr(t) {
318
318
  const e = Object.values(t).filter((r) => typeof r == "number");
319
319
  return Object.entries(t).filter(([r, i]) => e.indexOf(+r) === -1).map(([r, i]) => i);
320
320
  }
321
- function Hr(t, e) {
321
+ function Kr(t, e) {
322
322
  return typeof e == "bigint" ? e.toString() : e;
323
323
  }
324
- function Un(t) {
324
+ function Dn(t) {
325
325
  return {
326
326
  get value() {
327
327
  {
@@ -331,7 +331,7 @@ function Un(t) {
331
331
  }
332
332
  };
333
333
  }
334
- function Dn(t) {
334
+ function Zn(t) {
335
335
  return t == null;
336
336
  }
337
337
  function Ft(t) {
@@ -363,7 +363,7 @@ function qt(t, e, n) {
363
363
  configurable: !0
364
364
  });
365
365
  }
366
- function Zn(...t) {
366
+ function Fn(...t) {
367
367
  const e = {};
368
368
  for (const n of t) {
369
369
  const r = Object.getOwnPropertyDescriptors(n);
@@ -371,7 +371,7 @@ function Zn(...t) {
371
371
  }
372
372
  return Object.defineProperties({}, e);
373
373
  }
374
- const Fn = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
374
+ const qn = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
375
375
  };
376
376
  function et(t) {
377
377
  return typeof t == "object" && t !== null && !Array.isArray(t);
@@ -385,10 +385,10 @@ function Ht(t) {
385
385
  const n = e.prototype;
386
386
  return !(et(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
387
387
  }
388
- function Kr(t) {
388
+ function Wr(t) {
389
389
  return Ht(t) ? { ...t } : t;
390
390
  }
391
- const Wr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
391
+ const Yr = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
392
392
  function Mt(t) {
393
393
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
394
394
  }
@@ -399,16 +399,16 @@ function Kt(t, e, n) {
399
399
  function R(t) {
400
400
  return {};
401
401
  }
402
- function Yr(t) {
402
+ function Gr(t) {
403
403
  return Object.keys(t).filter((e) => t[e]._zod.optin === "optional" && t[e]._zod.optout === "optional");
404
404
  }
405
- function Gr(t, e) {
405
+ function Jr(t, e) {
406
406
  if (!Ht(e))
407
407
  throw new Error("Invalid input to extend: expected a plain object");
408
408
  const n = t._zod.def.checks;
409
409
  if (n && n.length > 0)
410
410
  throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
411
- const i = Zn(t._zod.def, {
411
+ const i = Fn(t._zod.def, {
412
412
  get shape() {
413
413
  const o = { ...t._zod.def.shape, ...e };
414
414
  return qt(this, "shape", o), o;
@@ -417,8 +417,8 @@ function Gr(t, e) {
417
417
  });
418
418
  return Kt(t, i);
419
419
  }
420
- function Jr(t, e, n) {
421
- const r = Zn(e._zod.def, {
420
+ function Qr(t, e, n) {
421
+ const r = Fn(e._zod.def, {
422
422
  get shape() {
423
423
  const i = e._zod.def.shape, o = { ...i };
424
424
  for (const s in i)
@@ -432,7 +432,7 @@ function Jr(t, e, n) {
432
432
  });
433
433
  return Kt(e, r);
434
434
  }
435
- function Ce(t, e = 0) {
435
+ function Re(t, e = 0) {
436
436
  if (t.aborted === !0)
437
437
  return !0;
438
438
  for (let n = e; n < t.issues.length; n++)
@@ -449,7 +449,7 @@ function he(t, e) {
449
449
  function qe(t) {
450
450
  return typeof t == "string" ? t : t?.message;
451
451
  }
452
- function Se(t, e, n) {
452
+ function ze(t, e, n) {
453
453
  const r = { ...t, path: t.path ?? [] };
454
454
  if (!t.message) {
455
455
  const i = qe(t.inst?._zod.def?.error?.(t)) ?? qe(e?.error?.(t)) ?? qe(n.customError?.(t)) ?? qe(n.localeError?.(t)) ?? "Invalid input";
@@ -457,10 +457,10 @@ function Se(t, e, n) {
457
457
  }
458
458
  return delete r.inst, delete r.continue, e?.reportInput || delete r.input, r;
459
459
  }
460
- function qn(t) {
460
+ function Hn(t) {
461
461
  return Array.isArray(t) ? "array" : typeof t == "string" ? "string" : "unknown";
462
462
  }
463
- function Qr(...t) {
463
+ function Xr(...t) {
464
464
  const [e, n, r] = t;
465
465
  return typeof e == "string" ? {
466
466
  message: e,
@@ -469,71 +469,71 @@ function Qr(...t) {
469
469
  inst: r
470
470
  } : { ...e };
471
471
  }
472
- const Hn = (t, e) => {
472
+ const Kn = (t, e) => {
473
473
  t.name = "$ZodError", Object.defineProperty(t, "_zod", {
474
474
  value: t._zod,
475
475
  enumerable: !1
476
476
  }), Object.defineProperty(t, "issues", {
477
477
  value: e,
478
478
  enumerable: !1
479
- }), t.message = JSON.stringify(e, Hr, 2), Object.defineProperty(t, "toString", {
479
+ }), t.message = JSON.stringify(e, Kr, 2), Object.defineProperty(t, "toString", {
480
480
  value: () => t.message,
481
481
  enumerable: !1
482
482
  });
483
- }, Xr = p("$ZodError", Hn), st = p("$ZodError", Hn, { Parent: Error }), ei = (t) => (e, n, r, i) => {
483
+ }, ei = p("$ZodError", Kn), st = p("$ZodError", Kn, { Parent: Error }), ti = (t) => (e, n, r, i) => {
484
484
  const o = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = e._zod.run({ value: n, issues: [] }, o);
485
485
  if (s instanceof Promise)
486
- throw new me();
486
+ throw new be();
487
487
  if (s.issues.length) {
488
- const a = new (i?.Err ?? t)(s.issues.map((c) => Se(c, o, Ee())));
489
- throw Fn(a, i?.callee), a;
488
+ const a = new (i?.Err ?? t)(s.issues.map((c) => ze(c, o, Se())));
489
+ throw qn(a, i?.callee), a;
490
490
  }
491
491
  return s.value;
492
- }, ti = /* @__PURE__ */ ei(st), ni = (t) => async (e, n, r, i) => {
492
+ }, ni = /* @__PURE__ */ ti(st), ri = (t) => async (e, n, r, i) => {
493
493
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
494
494
  let s = e._zod.run({ value: n, issues: [] }, o);
495
495
  if (s instanceof Promise && (s = await s), s.issues.length) {
496
- const a = new (i?.Err ?? t)(s.issues.map((c) => Se(c, o, Ee())));
497
- throw Fn(a, i?.callee), a;
496
+ const a = new (i?.Err ?? t)(s.issues.map((c) => ze(c, o, Se())));
497
+ throw qn(a, i?.callee), a;
498
498
  }
499
499
  return s.value;
500
- }, ri = /* @__PURE__ */ ni(st), ii = (t) => (e, n, r) => {
500
+ }, ii = /* @__PURE__ */ ri(st), oi = (t) => (e, n, r) => {
501
501
  const i = r ? { ...r, async: !1 } : { async: !1 }, o = e._zod.run({ value: n, issues: [] }, i);
502
502
  if (o instanceof Promise)
503
- throw new me();
503
+ throw new be();
504
504
  return o.issues.length ? {
505
505
  success: !1,
506
- error: new (t ?? Xr)(o.issues.map((s) => Se(s, i, Ee())))
506
+ error: new (t ?? ei)(o.issues.map((s) => ze(s, i, Se())))
507
507
  } : { success: !0, data: o.value };
508
- }, Kn = /* @__PURE__ */ ii(st), oi = (t) => async (e, n, r) => {
508
+ }, Wn = /* @__PURE__ */ oi(st), si = (t) => async (e, n, r) => {
509
509
  const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
510
510
  let o = e._zod.run({ value: n, issues: [] }, i);
511
511
  return o instanceof Promise && (o = await o), o.issues.length ? {
512
512
  success: !1,
513
- error: new t(o.issues.map((s) => Se(s, i, Ee())))
513
+ error: new t(o.issues.map((s) => ze(s, i, Se())))
514
514
  } : { success: !0, data: o.value };
515
- }, Wn = /* @__PURE__ */ oi(st), si = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";
516
- function ai(t) {
515
+ }, Yn = /* @__PURE__ */ si(st), ai = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";
516
+ function ci(t) {
517
517
  const e = "(?:[01]\\d|2[0-3]):[0-5]\\d";
518
518
  return typeof t.precision == "number" ? t.precision === -1 ? `${e}` : t.precision === 0 ? `${e}:[0-5]\\d` : `${e}:[0-5]\\d\\.\\d{${t.precision}}` : `${e}(?::[0-5]\\d(?:\\.\\d+)?)?`;
519
519
  }
520
- function ci(t) {
521
- const e = ai({ precision: t.precision }), n = ["Z"];
520
+ function ui(t) {
521
+ const e = ci({ precision: t.precision }), n = ["Z"];
522
522
  t.local && n.push(""), t.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
523
523
  const r = `${e}(?:${n.join("|")})`;
524
- return new RegExp(`^${si}T(?:${r})$`);
524
+ return new RegExp(`^${ai}T(?:${r})$`);
525
525
  }
526
- const ui = (t) => {
526
+ const li = (t) => {
527
527
  const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
528
528
  return new RegExp(`^${e}$`);
529
- }, li = /^-?\d+(?:\.\d+)?/i, di = /true|false/i, fi = /null/i, at = /* @__PURE__ */ p("$ZodCheck", (t, e) => {
529
+ }, di = /^-?\d+(?:\.\d+)?/i, fi = /true|false/i, pi = /null/i, at = /* @__PURE__ */ p("$ZodCheck", (t, e) => {
530
530
  var n;
531
531
  t._zod ?? (t._zod = {}), t._zod.def = e, (n = t._zod).onattach ?? (n.onattach = []);
532
- }), pi = /* @__PURE__ */ p("$ZodCheckMinLength", (t, e) => {
532
+ }), hi = /* @__PURE__ */ p("$ZodCheckMinLength", (t, e) => {
533
533
  var n;
534
534
  at.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
535
535
  const i = r.value;
536
- return !Dn(i) && i.length !== void 0;
536
+ return !Zn(i) && i.length !== void 0;
537
537
  }), t._zod.onattach.push((r) => {
538
538
  const i = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
539
539
  e.minimum > i && (r._zod.bag.minimum = e.minimum);
@@ -541,7 +541,7 @@ const ui = (t) => {
541
541
  const i = r.value;
542
542
  if (i.length >= e.minimum)
543
543
  return;
544
- const s = qn(i);
544
+ const s = Hn(i);
545
545
  r.issues.push({
546
546
  origin: s,
547
547
  code: "too_small",
@@ -552,11 +552,11 @@ const ui = (t) => {
552
552
  continue: !e.abort
553
553
  });
554
554
  };
555
- }), hi = /* @__PURE__ */ p("$ZodCheckLengthEquals", (t, e) => {
555
+ }), gi = /* @__PURE__ */ p("$ZodCheckLengthEquals", (t, e) => {
556
556
  var n;
557
557
  at.init(t, e), (n = t._zod.def).when ?? (n.when = (r) => {
558
558
  const i = r.value;
559
- return !Dn(i) && i.length !== void 0;
559
+ return !Zn(i) && i.length !== void 0;
560
560
  }), t._zod.onattach.push((r) => {
561
561
  const i = r._zod.bag;
562
562
  i.minimum = e.length, i.maximum = e.length, i.length = e.length;
@@ -564,7 +564,7 @@ const ui = (t) => {
564
564
  const i = r.value, o = i.length;
565
565
  if (o === e.length)
566
566
  return;
567
- const s = qn(i), a = o > e.length;
567
+ const s = Hn(i), a = o > e.length;
568
568
  r.issues.push({
569
569
  origin: s,
570
570
  ...a ? { code: "too_big", maximum: e.length } : { code: "too_small", minimum: e.length },
@@ -575,7 +575,7 @@ const ui = (t) => {
575
575
  continue: !e.abort
576
576
  });
577
577
  };
578
- }), gi = /* @__PURE__ */ p("$ZodCheckStringFormat", (t, e) => {
578
+ }), vi = /* @__PURE__ */ p("$ZodCheckStringFormat", (t, e) => {
579
579
  var n, r;
580
580
  at.init(t, e), t._zod.onattach.push((i) => {
581
581
  const o = i._zod.bag;
@@ -592,13 +592,13 @@ const ui = (t) => {
592
592
  });
593
593
  }) : (r = t._zod).check ?? (r.check = () => {
594
594
  });
595
- }), vi = {
595
+ }), yi = {
596
596
  major: 4,
597
597
  minor: 1,
598
598
  patch: 5
599
599
  }, z = /* @__PURE__ */ p("$ZodType", (t, e) => {
600
600
  var n;
601
- t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = vi;
601
+ t ?? (t = {}), t._zod.def = e, t._zod.bag = t._zod.bag || {}, t._zod.version = yi;
602
602
  const r = [...t._zod.def.checks ?? []];
603
603
  t._zod.traits.has("$ZodCheck") && r.unshift(t);
604
604
  for (const i of r)
@@ -610,7 +610,7 @@ const ui = (t) => {
610
610
  });
611
611
  else {
612
612
  const i = (s, a, c) => {
613
- let u = Ce(s), d;
613
+ let u = Re(s), d;
614
614
  for (const m of a) {
615
615
  if (m._zod.def.when) {
616
616
  if (!m._zod.def.when(s))
@@ -619,25 +619,25 @@ const ui = (t) => {
619
619
  continue;
620
620
  const _ = s.issues.length, S = m._zod.check(s);
621
621
  if (S instanceof Promise && c?.async === !1)
622
- throw new me();
622
+ throw new be();
623
623
  if (d || S instanceof Promise)
624
624
  d = (d ?? Promise.resolve()).then(async () => {
625
- await S, s.issues.length !== _ && (u || (u = Ce(s, _)));
625
+ await S, s.issues.length !== _ && (u || (u = Re(s, _)));
626
626
  });
627
627
  else {
628
628
  if (s.issues.length === _)
629
629
  continue;
630
- u || (u = Ce(s, _));
630
+ u || (u = Re(s, _));
631
631
  }
632
632
  }
633
633
  return d ? d.then(() => s) : s;
634
634
  }, o = (s, a, c) => {
635
- if (Ce(s))
635
+ if (Re(s))
636
636
  return s.aborted = !0, s;
637
637
  const u = i(a, r, c);
638
638
  if (u instanceof Promise) {
639
639
  if (c.async === !1)
640
- throw new me();
640
+ throw new be();
641
641
  return u.then((d) => t._zod.parse(d, c));
642
642
  }
643
643
  return t._zod.parse(u, c);
@@ -652,7 +652,7 @@ const ui = (t) => {
652
652
  const c = t._zod.parse(s, a);
653
653
  if (c instanceof Promise) {
654
654
  if (a.async === !1)
655
- throw new me();
655
+ throw new be();
656
656
  return c.then((u) => i(u, r, a));
657
657
  }
658
658
  return i(c, r, a);
@@ -661,17 +661,17 @@ const ui = (t) => {
661
661
  t["~standard"] = {
662
662
  validate: (i) => {
663
663
  try {
664
- const o = Kn(t, i);
664
+ const o = Wn(t, i);
665
665
  return o.success ? { value: o.data } : { issues: o.error?.issues };
666
666
  } catch {
667
- return Wn(t, i).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
667
+ return Yn(t, i).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
668
668
  }
669
669
  },
670
670
  vendor: "zod",
671
671
  version: 1
672
672
  };
673
- }), Yn = /* @__PURE__ */ p("$ZodString", (t, e) => {
674
- z.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? ui(t._zod.bag), t._zod.parse = (n, r) => {
673
+ }), Gn = /* @__PURE__ */ p("$ZodString", (t, e) => {
674
+ z.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? li(t._zod.bag), t._zod.parse = (n, r) => {
675
675
  if (e.coerce)
676
676
  try {
677
677
  n.value = String(n.value);
@@ -684,12 +684,12 @@ const ui = (t) => {
684
684
  inst: t
685
685
  }), n;
686
686
  };
687
- }), Gn = /* @__PURE__ */ p("$ZodStringFormat", (t, e) => {
688
- gi.init(t, e), Yn.init(t, e);
689
- }), yi = /* @__PURE__ */ p("$ZodISODateTime", (t, e) => {
690
- e.pattern ?? (e.pattern = ci(e)), Gn.init(t, e);
691
- }), mi = /* @__PURE__ */ p("$ZodNumber", (t, e) => {
692
- z.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? li, t._zod.parse = (n, r) => {
687
+ }), Jn = /* @__PURE__ */ p("$ZodStringFormat", (t, e) => {
688
+ vi.init(t, e), Gn.init(t, e);
689
+ }), mi = /* @__PURE__ */ p("$ZodISODateTime", (t, e) => {
690
+ e.pattern ?? (e.pattern = ui(e)), Jn.init(t, e);
691
+ }), bi = /* @__PURE__ */ p("$ZodNumber", (t, e) => {
692
+ z.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? di, t._zod.parse = (n, r) => {
693
693
  if (e.coerce)
694
694
  try {
695
695
  n.value = Number(n.value);
@@ -707,8 +707,8 @@ const ui = (t) => {
707
707
  ...o ? { received: o } : {}
708
708
  }), n;
709
709
  };
710
- }), bi = /* @__PURE__ */ p("$ZodBoolean", (t, e) => {
711
- z.init(t, e), t._zod.pattern = di, t._zod.parse = (n, r) => {
710
+ }), _i = /* @__PURE__ */ p("$ZodBoolean", (t, e) => {
711
+ z.init(t, e), t._zod.pattern = fi, t._zod.parse = (n, r) => {
712
712
  if (e.coerce)
713
713
  try {
714
714
  n.value = !!n.value;
@@ -722,8 +722,8 @@ const ui = (t) => {
722
722
  inst: t
723
723
  }), n;
724
724
  };
725
- }), _i = /* @__PURE__ */ p("$ZodNull", (t, e) => {
726
- z.init(t, e), t._zod.pattern = fi, t._zod.values = /* @__PURE__ */ new Set([null]), t._zod.parse = (n, r) => {
725
+ }), wi = /* @__PURE__ */ p("$ZodNull", (t, e) => {
726
+ z.init(t, e), t._zod.pattern = pi, t._zod.values = /* @__PURE__ */ new Set([null]), t._zod.parse = (n, r) => {
727
727
  const i = n.value;
728
728
  return i === null || n.issues.push({
729
729
  expected: "null",
@@ -732,15 +732,15 @@ const ui = (t) => {
732
732
  inst: t
733
733
  }), n;
734
734
  };
735
- }), wi = /* @__PURE__ */ p("$ZodAny", (t, e) => {
735
+ }), Ei = /* @__PURE__ */ p("$ZodAny", (t, e) => {
736
736
  z.init(t, e), t._zod.parse = (n) => n;
737
- }), Ei = /* @__PURE__ */ p("$ZodUnknown", (t, e) => {
737
+ }), Si = /* @__PURE__ */ p("$ZodUnknown", (t, e) => {
738
738
  z.init(t, e), t._zod.parse = (n) => n;
739
739
  });
740
740
  function an(t, e, n) {
741
741
  t.issues.length && e.issues.push(...he(n, t.issues)), e.value[n] = t.value;
742
742
  }
743
- const Si = /* @__PURE__ */ p("$ZodArray", (t, e) => {
743
+ const zi = /* @__PURE__ */ p("$ZodArray", (t, e) => {
744
744
  z.init(t, e), t._zod.parse = (n, r) => {
745
745
  const i = n.value;
746
746
  if (!Array.isArray(i))
@@ -765,12 +765,12 @@ const Si = /* @__PURE__ */ p("$ZodArray", (t, e) => {
765
765
  function tt(t, e, n, r) {
766
766
  t.issues.length && e.issues.push(...he(n, t.issues)), t.value === void 0 ? n in r && (e.value[n] = void 0) : e.value[n] = t.value;
767
767
  }
768
- function zi(t) {
768
+ function Ti(t) {
769
769
  const e = Object.keys(t.shape);
770
770
  for (const r of e)
771
771
  if (!t.shape[r]._zod.traits.has("$ZodType"))
772
772
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
773
- const n = Yr(t.shape);
773
+ const n = Gr(t.shape);
774
774
  return {
775
775
  ...t,
776
776
  keys: e,
@@ -779,7 +779,7 @@ function zi(t) {
779
779
  optionalKeys: new Set(n)
780
780
  };
781
781
  }
782
- function Ti(t, e, n, r, i, o) {
782
+ function ki(t, e, n, r, i, o) {
783
783
  const s = [], a = i.keySet, c = i.catchall._zod, u = c.def.type;
784
784
  for (const d of Object.keys(e)) {
785
785
  if (a.has(d))
@@ -798,9 +798,9 @@ function Ti(t, e, n, r, i, o) {
798
798
  inst: o
799
799
  }), t.length ? Promise.all(t).then(() => n) : n;
800
800
  }
801
- const ki = /* @__PURE__ */ p("$ZodObject", (t, e) => {
801
+ const Ai = /* @__PURE__ */ p("$ZodObject", (t, e) => {
802
802
  z.init(t, e);
803
- const n = Un(() => zi(e));
803
+ const n = Dn(() => Ti(e));
804
804
  E(t._zod, "propValues", () => {
805
805
  const s = e.shape, a = {};
806
806
  for (const c in s) {
@@ -831,22 +831,22 @@ const ki = /* @__PURE__ */ p("$ZodObject", (t, e) => {
831
831
  const S = d[m]._zod.run({ value: c[m], issues: [] }, a);
832
832
  S instanceof Promise ? u.push(S.then((b) => tt(b, s, m, c))) : tt(S, s, m, c);
833
833
  }
834
- return i ? Ti(u, c, s, a, n.value, t) : u.length ? Promise.all(u).then(() => s) : s;
834
+ return i ? ki(u, c, s, a, n.value, t) : u.length ? Promise.all(u).then(() => s) : s;
835
835
  };
836
836
  });
837
837
  function cn(t, e, n, r) {
838
838
  for (const o of t)
839
839
  if (o.issues.length === 0)
840
840
  return e.value = o.value, e;
841
- const i = t.filter((o) => !Ce(o));
841
+ const i = t.filter((o) => !Re(o));
842
842
  return i.length === 1 ? (e.value = i[0].value, i[0]) : (e.issues.push({
843
843
  code: "invalid_union",
844
844
  input: e.value,
845
845
  inst: n,
846
- errors: t.map((o) => o.issues.map((s) => Se(s, r, Ee())))
846
+ errors: t.map((o) => o.issues.map((s) => ze(s, r, Se())))
847
847
  }), e);
848
848
  }
849
- const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
849
+ const Qn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
850
850
  z.init(t, e), E(t._zod, "optin", () => e.options.some((i) => i._zod.optin === "optional") ? "optional" : void 0), E(t._zod, "optout", () => e.options.some((i) => i._zod.optout === "optional") ? "optional" : void 0), E(t._zod, "values", () => {
851
851
  if (e.options.every((i) => i._zod.values))
852
852
  return new Set(e.options.flatMap((i) => Array.from(i._zod.values)));
@@ -877,8 +877,8 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
877
877
  }
878
878
  return s ? Promise.all(a).then((c) => cn(c, i, t, o)) : cn(a, i, t, o);
879
879
  };
880
- }), Ai = /* @__PURE__ */ p("$ZodDiscriminatedUnion", (t, e) => {
881
- Jn.init(t, e);
880
+ }), $i = /* @__PURE__ */ p("$ZodDiscriminatedUnion", (t, e) => {
881
+ Qn.init(t, e);
882
882
  const n = t._zod.parse;
883
883
  E(t._zod, "propValues", () => {
884
884
  const i = {};
@@ -894,7 +894,7 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
894
894
  }
895
895
  return i;
896
896
  });
897
- const r = Un(() => {
897
+ const r = Dn(() => {
898
898
  const i = e.options, o = /* @__PURE__ */ new Map();
899
899
  for (const s of i) {
900
900
  const a = s._zod.propValues?.[e.discriminator];
@@ -928,7 +928,7 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
928
928
  inst: t
929
929
  }), i);
930
930
  };
931
- }), $i = /* @__PURE__ */ p("$ZodRecord", (t, e) => {
931
+ }), Pi = /* @__PURE__ */ p("$ZodRecord", (t, e) => {
932
932
  z.init(t, e), t._zod.parse = (n, r) => {
933
933
  const i = n.value;
934
934
  if (!Ht(i))
@@ -970,7 +970,7 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
970
970
  n.issues.push({
971
971
  code: "invalid_key",
972
972
  origin: "record",
973
- issues: a.issues.map((u) => Se(u, r, Ee())),
973
+ issues: a.issues.map((u) => ze(u, r, Se())),
974
974
  input: s,
975
975
  path: [s],
976
976
  inst: t
@@ -985,10 +985,10 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
985
985
  }
986
986
  return o.length ? Promise.all(o).then(() => n) : n;
987
987
  };
988
- }), Pi = /* @__PURE__ */ p("$ZodEnum", (t, e) => {
988
+ }), Ii = /* @__PURE__ */ p("$ZodEnum", (t, e) => {
989
989
  z.init(t, e);
990
- const n = qr(e.entries), r = new Set(n);
991
- t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) => Wr.has(typeof i)).map((i) => typeof i == "string" ? Mt(i) : i.toString()).join("|")})$`), t._zod.parse = (i, o) => {
990
+ const n = Hr(e.entries), r = new Set(n);
991
+ t._zod.values = r, t._zod.pattern = new RegExp(`^(${n.filter((i) => Yr.has(typeof i)).map((i) => typeof i == "string" ? Mt(i) : i.toString()).join("|")})$`), t._zod.parse = (i, o) => {
992
992
  const s = i.value;
993
993
  return r.has(s) || i.issues.push({
994
994
  code: "invalid_value",
@@ -997,7 +997,7 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
997
997
  inst: t
998
998
  }), i;
999
999
  };
1000
- }), Ii = /* @__PURE__ */ p("$ZodLiteral", (t, e) => {
1000
+ }), Ci = /* @__PURE__ */ p("$ZodLiteral", (t, e) => {
1001
1001
  if (z.init(t, e), e.values.length === 0)
1002
1002
  throw new Error("Cannot create literal schema with no valid values");
1003
1003
  t._zod.values = new Set(e.values), t._zod.pattern = new RegExp(`^(${e.values.map((n) => typeof n == "string" ? Mt(n) : n ? Mt(n.toString()) : String(n)).join("|")})$`), t._zod.parse = (n, r) => {
@@ -1009,22 +1009,22 @@ const Jn = /* @__PURE__ */ p("$ZodUnion", (t, e) => {
1009
1009
  inst: t
1010
1010
  }), n;
1011
1011
  };
1012
- }), Ci = /* @__PURE__ */ p("$ZodTransform", (t, e) => {
1012
+ }), Ri = /* @__PURE__ */ p("$ZodTransform", (t, e) => {
1013
1013
  z.init(t, e), t._zod.parse = (n, r) => {
1014
1014
  if (r.direction === "backward")
1015
- throw new Zr(t.constructor.name);
1015
+ throw new Fr(t.constructor.name);
1016
1016
  const i = e.transform(n.value, n);
1017
1017
  if (r.async)
1018
1018
  return (i instanceof Promise ? i : Promise.resolve(i)).then((s) => (n.value = s, n));
1019
1019
  if (i instanceof Promise)
1020
- throw new me();
1020
+ throw new be();
1021
1021
  return n.value = i, n;
1022
1022
  };
1023
1023
  });
1024
1024
  function un(t, e) {
1025
1025
  return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
1026
1026
  }
1027
- const Ri = /* @__PURE__ */ p("$ZodOptional", (t, e) => {
1027
+ const Oi = /* @__PURE__ */ p("$ZodOptional", (t, e) => {
1028
1028
  z.init(t, e), t._zod.optin = "optional", t._zod.optout = "optional", E(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, void 0]) : void 0), E(t._zod, "pattern", () => {
1029
1029
  const n = e.innerType._zod.pattern;
1030
1030
  return n ? new RegExp(`^(${Ft(n.source)})?$`) : void 0;
@@ -1035,14 +1035,14 @@ const Ri = /* @__PURE__ */ p("$ZodOptional", (t, e) => {
1035
1035
  }
1036
1036
  return n.value === void 0 ? n : e.innerType._zod.run(n, r);
1037
1037
  };
1038
- }), Oi = /* @__PURE__ */ p("$ZodNullable", (t, e) => {
1038
+ }), Mi = /* @__PURE__ */ p("$ZodNullable", (t, e) => {
1039
1039
  z.init(t, e), E(t._zod, "optin", () => e.innerType._zod.optin), E(t._zod, "optout", () => e.innerType._zod.optout), E(t._zod, "pattern", () => {
1040
1040
  const n = e.innerType._zod.pattern;
1041
1041
  return n ? new RegExp(`^(${Ft(n.source)}|null)$`) : void 0;
1042
1042
  }), E(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, null]) : void 0), t._zod.parse = (n, r) => n.value === null ? n : e.innerType._zod.run(n, r);
1043
- }), Mi = /* @__PURE__ */ p("$ZodPrefault", (t, e) => {
1043
+ }), xi = /* @__PURE__ */ p("$ZodPrefault", (t, e) => {
1044
1044
  z.init(t, e), t._zod.optin = "optional", E(t._zod, "values", () => e.innerType._zod.values), t._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = e.defaultValue), e.innerType._zod.run(n, r));
1045
- }), xi = /* @__PURE__ */ p("$ZodPipe", (t, e) => {
1045
+ }), Vi = /* @__PURE__ */ p("$ZodPipe", (t, e) => {
1046
1046
  z.init(t, e), E(t._zod, "values", () => e.in._zod.values), E(t._zod, "optin", () => e.in._zod.optin), E(t._zod, "optout", () => e.out._zod.optout), E(t._zod, "propValues", () => e.in._zod.propValues), t._zod.parse = (n, r) => {
1047
1047
  if (r.direction === "backward") {
1048
1048
  const o = e.out._zod.run(n, r);
@@ -1055,9 +1055,9 @@ const Ri = /* @__PURE__ */ p("$ZodOptional", (t, e) => {
1055
1055
  function He(t, e, n) {
1056
1056
  return t.issues.length ? (t.aborted = !0, t) : e._zod.run({ value: t.value, issues: t.issues }, n);
1057
1057
  }
1058
- const Vi = /* @__PURE__ */ p("$ZodLazy", (t, e) => {
1058
+ const Ni = /* @__PURE__ */ p("$ZodLazy", (t, e) => {
1059
1059
  z.init(t, e), E(t._zod, "innerType", () => e.getter()), E(t._zod, "pattern", () => t._zod.innerType._zod.pattern), E(t._zod, "propValues", () => t._zod.innerType._zod.propValues), E(t._zod, "optin", () => t._zod.innerType._zod.optin ?? void 0), E(t._zod, "optout", () => t._zod.innerType._zod.optout ?? void 0), t._zod.parse = (n, r) => t._zod.innerType._zod.run(n, r);
1060
- }), Ni = /* @__PURE__ */ p("$ZodCustom", (t, e) => {
1060
+ }), Li = /* @__PURE__ */ p("$ZodCustom", (t, e) => {
1061
1061
  at.init(t, e), z.init(t, e), t._zod.parse = (n, r) => n, t._zod.check = (n) => {
1062
1062
  const r = n.value, i = e.fn(r);
1063
1063
  if (i instanceof Promise)
@@ -1077,16 +1077,16 @@ function ln(t, e, n, r) {
1077
1077
  continue: !r._zod.def.abort
1078
1078
  // params: inst._zod.def.params,
1079
1079
  };
1080
- r._zod.def.params && (i.params = r._zod.def.params), e.issues.push(Qr(i));
1080
+ r._zod.def.params && (i.params = r._zod.def.params), e.issues.push(Xr(i));
1081
1081
  }
1082
1082
  }
1083
- function Li(t, e) {
1083
+ function ji(t, e) {
1084
1084
  return new t({
1085
1085
  type: "string",
1086
1086
  ...R()
1087
1087
  });
1088
1088
  }
1089
- function ji(t, e) {
1089
+ function Bi(t, e) {
1090
1090
  return new t({
1091
1091
  type: "string",
1092
1092
  format: "datetime",
@@ -1097,50 +1097,50 @@ function ji(t, e) {
1097
1097
  ...R()
1098
1098
  });
1099
1099
  }
1100
- function Bi(t, e) {
1100
+ function Ui(t, e) {
1101
1101
  return new t({
1102
1102
  type: "number",
1103
1103
  checks: [],
1104
1104
  ...R()
1105
1105
  });
1106
1106
  }
1107
- function Ui(t, e) {
1107
+ function Di(t, e) {
1108
1108
  return new t({
1109
1109
  type: "boolean",
1110
1110
  ...R()
1111
1111
  });
1112
1112
  }
1113
- function Di(t, e) {
1113
+ function Zi(t, e) {
1114
1114
  return new t({
1115
1115
  type: "null",
1116
1116
  ...R()
1117
1117
  });
1118
1118
  }
1119
- function Zi(t) {
1119
+ function Fi(t) {
1120
1120
  return new t({
1121
1121
  type: "any"
1122
1122
  });
1123
1123
  }
1124
- function Fi(t) {
1124
+ function qi(t) {
1125
1125
  return new t({
1126
1126
  type: "unknown"
1127
1127
  });
1128
1128
  }
1129
- function qi(t, e) {
1130
- return new pi({
1129
+ function Hi(t, e) {
1130
+ return new hi({
1131
1131
  check: "min_length",
1132
1132
  ...R(),
1133
1133
  minimum: t
1134
1134
  });
1135
1135
  }
1136
- function Hi(t, e) {
1137
- return new hi({
1136
+ function Ki(t, e) {
1137
+ return new gi({
1138
1138
  check: "length_equals",
1139
1139
  ...R(),
1140
1140
  length: t
1141
1141
  });
1142
1142
  }
1143
- function Ki(t, e, n) {
1143
+ function Wi(t, e, n) {
1144
1144
  const r = R();
1145
1145
  return r.abort ?? (r.abort = !0), new t({
1146
1146
  type: "custom",
@@ -1152,7 +1152,7 @@ function Ki(t, e, n) {
1152
1152
  const T = /* @__PURE__ */ p("ZodMiniType", (t, e) => {
1153
1153
  if (!t._zod)
1154
1154
  throw new Error("Uninitialized schema in ZodMiniType.");
1155
- z.init(t, e), t.def = e, t.type = e.type, t.parse = (n, r) => ti(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Kn(t, n, r), t.parseAsync = async (n, r) => ri(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => Wn(t, n, r), t.check = (...n) => t.clone(
1155
+ z.init(t, e), t.def = e, t.type = e.type, t.parse = (n, r) => ni(t, n, r, { callee: t.parse }), t.safeParse = (n, r) => Wn(t, n, r), t.parseAsync = async (n, r) => ii(t, n, r, { callee: t.parseAsync }), t.safeParseAsync = async (n, r) => Yn(t, n, r), t.check = (...n) => t.clone(
1156
1156
  {
1157
1157
  ...e,
1158
1158
  checks: [
@@ -1162,56 +1162,56 @@ const T = /* @__PURE__ */ p("ZodMiniType", (t, e) => {
1162
1162
  }
1163
1163
  // { parent: true }
1164
1164
  ), t.clone = (n, r) => Kt(t, n, r), t.brand = () => t, t.register = (n, r) => (n.add(t, r), t);
1165
- }), Qn = /* @__PURE__ */ p("ZodMiniString", (t, e) => {
1166
- Yn.init(t, e), T.init(t, e);
1165
+ }), Xn = /* @__PURE__ */ p("ZodMiniString", (t, e) => {
1166
+ Gn.init(t, e), T.init(t, e);
1167
1167
  });
1168
1168
  function l(t) {
1169
- return Li(Qn);
1170
- }
1171
- const Wi = /* @__PURE__ */ p("ZodMiniStringFormat", (t, e) => {
1172
- Gn.init(t, e), Qn.init(t, e);
1173
- }), Yi = /* @__PURE__ */ p("ZodMiniNumber", (t, e) => {
1174
- mi.init(t, e), T.init(t, e);
1175
- });
1176
- function $(t) {
1177
- return Bi(Yi);
1169
+ return ji(Xn);
1178
1170
  }
1179
- const Gi = /* @__PURE__ */ p("ZodMiniBoolean", (t, e) => {
1171
+ const Yi = /* @__PURE__ */ p("ZodMiniStringFormat", (t, e) => {
1172
+ Jn.init(t, e), Xn.init(t, e);
1173
+ }), Gi = /* @__PURE__ */ p("ZodMiniNumber", (t, e) => {
1180
1174
  bi.init(t, e), T.init(t, e);
1181
1175
  });
1182
- function q(t) {
1176
+ function $(t) {
1183
1177
  return Ui(Gi);
1184
1178
  }
1185
- const Ji = /* @__PURE__ */ p("ZodMiniNull", (t, e) => {
1179
+ const Ji = /* @__PURE__ */ p("ZodMiniBoolean", (t, e) => {
1186
1180
  _i.init(t, e), T.init(t, e);
1187
1181
  });
1188
- function Wt(t) {
1182
+ function q(t) {
1189
1183
  return Di(Ji);
1190
1184
  }
1191
- const Qi = /* @__PURE__ */ p("ZodMiniAny", (t, e) => {
1185
+ const Qi = /* @__PURE__ */ p("ZodMiniNull", (t, e) => {
1192
1186
  wi.init(t, e), T.init(t, e);
1193
1187
  });
1194
- function dn() {
1188
+ function Wt(t) {
1195
1189
  return Zi(Qi);
1196
1190
  }
1197
- const Xi = /* @__PURE__ */ p("ZodMiniUnknown", (t, e) => {
1191
+ const Xi = /* @__PURE__ */ p("ZodMiniAny", (t, e) => {
1198
1192
  Ei.init(t, e), T.init(t, e);
1199
1193
  });
1200
- function eo() {
1194
+ function dn() {
1201
1195
  return Fi(Xi);
1202
1196
  }
1203
- const to = /* @__PURE__ */ p("ZodMiniArray", (t, e) => {
1197
+ const eo = /* @__PURE__ */ p("ZodMiniUnknown", (t, e) => {
1204
1198
  Si.init(t, e), T.init(t, e);
1205
1199
  });
1200
+ function to() {
1201
+ return qi(eo);
1202
+ }
1203
+ const no = /* @__PURE__ */ p("ZodMiniArray", (t, e) => {
1204
+ zi.init(t, e), T.init(t, e);
1205
+ });
1206
1206
  function A(t, e) {
1207
- return new to({
1207
+ return new no({
1208
1208
  type: "array",
1209
1209
  element: t,
1210
1210
  ...R()
1211
1211
  });
1212
1212
  }
1213
- const no = /* @__PURE__ */ p("ZodMiniObject", (t, e) => {
1214
- ki.init(t, e), T.init(t, e), E(t, "shape", () => e.shape);
1213
+ const ro = /* @__PURE__ */ p("ZodMiniObject", (t, e) => {
1214
+ Ai.init(t, e), T.init(t, e), E(t, "shape", () => e.shape);
1215
1215
  });
1216
1216
  function h(t, e) {
1217
1217
  const n = {
@@ -1221,191 +1221,191 @@ function h(t, e) {
1221
1221
  },
1222
1222
  ...R()
1223
1223
  };
1224
- return new no(n);
1224
+ return new ro(n);
1225
1225
  }
1226
1226
  function g(t, e) {
1227
- return Gr(t, e);
1227
+ return Jr(t, e);
1228
1228
  }
1229
- function ro(t, e) {
1230
- return Jr(er, t);
1229
+ function io(t, e) {
1230
+ return Qr(tr, t);
1231
1231
  }
1232
1232
  function ct(t, e) {
1233
1233
  return t.clone({ ...t._zod.def, catchall: e });
1234
1234
  }
1235
- const io = /* @__PURE__ */ p("ZodMiniUnion", (t, e) => {
1236
- Jn.init(t, e), T.init(t, e);
1235
+ const oo = /* @__PURE__ */ p("ZodMiniUnion", (t, e) => {
1236
+ Qn.init(t, e), T.init(t, e);
1237
1237
  });
1238
1238
  function Q(t, e) {
1239
- return new io({
1239
+ return new oo({
1240
1240
  type: "union",
1241
1241
  options: t,
1242
1242
  ...R()
1243
1243
  });
1244
1244
  }
1245
- const oo = /* @__PURE__ */ p("ZodMiniDiscriminatedUnion", (t, e) => {
1246
- Ai.init(t, e), T.init(t, e);
1245
+ const so = /* @__PURE__ */ p("ZodMiniDiscriminatedUnion", (t, e) => {
1246
+ $i.init(t, e), T.init(t, e);
1247
1247
  });
1248
1248
  function Be(t, e, n) {
1249
- return new oo({
1249
+ return new so({
1250
1250
  type: "union",
1251
1251
  options: e,
1252
1252
  discriminator: t,
1253
1253
  ...R()
1254
1254
  });
1255
1255
  }
1256
- const so = /* @__PURE__ */ p("ZodMiniRecord", (t, e) => {
1257
- $i.init(t, e), T.init(t, e);
1256
+ const ao = /* @__PURE__ */ p("ZodMiniRecord", (t, e) => {
1257
+ Pi.init(t, e), T.init(t, e);
1258
1258
  });
1259
1259
  function ce(t, e, n) {
1260
- return new so({
1260
+ return new ao({
1261
1261
  type: "record",
1262
1262
  keyType: t,
1263
1263
  valueType: e,
1264
1264
  ...R()
1265
1265
  });
1266
1266
  }
1267
- const ao = /* @__PURE__ */ p("ZodMiniEnum", (t, e) => {
1268
- Pi.init(t, e), T.init(t, e), t.options = Object.values(e.entries);
1267
+ const co = /* @__PURE__ */ p("ZodMiniEnum", (t, e) => {
1268
+ Ii.init(t, e), T.init(t, e), t.options = Object.values(e.entries);
1269
1269
  });
1270
- function Xn(t, e) {
1270
+ function er(t, e) {
1271
1271
  const n = Array.isArray(t) ? Object.fromEntries(t.map((r) => [r, r])) : t;
1272
- return new ao({
1272
+ return new co({
1273
1273
  type: "enum",
1274
1274
  entries: n,
1275
1275
  ...R()
1276
1276
  });
1277
1277
  }
1278
- const co = /* @__PURE__ */ p("ZodMiniLiteral", (t, e) => {
1279
- Ii.init(t, e), T.init(t, e);
1278
+ const uo = /* @__PURE__ */ p("ZodMiniLiteral", (t, e) => {
1279
+ Ci.init(t, e), T.init(t, e);
1280
1280
  });
1281
1281
  function v(t, e) {
1282
- return new co({
1282
+ return new uo({
1283
1283
  type: "literal",
1284
1284
  values: Array.isArray(t) ? t : [t],
1285
1285
  ...R()
1286
1286
  });
1287
1287
  }
1288
- const uo = /* @__PURE__ */ p("ZodMiniTransform", (t, e) => {
1289
- Ci.init(t, e), T.init(t, e);
1288
+ const lo = /* @__PURE__ */ p("ZodMiniTransform", (t, e) => {
1289
+ Ri.init(t, e), T.init(t, e);
1290
1290
  });
1291
- function lo(t) {
1292
- return new uo({
1291
+ function fo(t) {
1292
+ return new lo({
1293
1293
  type: "transform",
1294
1294
  transform: t
1295
1295
  });
1296
1296
  }
1297
- const er = /* @__PURE__ */ p("ZodMiniOptional", (t, e) => {
1298
- Ri.init(t, e), T.init(t, e);
1297
+ const tr = /* @__PURE__ */ p("ZodMiniOptional", (t, e) => {
1298
+ Oi.init(t, e), T.init(t, e);
1299
1299
  });
1300
1300
  function f(t) {
1301
- return new er({
1301
+ return new tr({
1302
1302
  type: "optional",
1303
1303
  innerType: t
1304
1304
  });
1305
1305
  }
1306
- const fo = /* @__PURE__ */ p("ZodMiniNullable", (t, e) => {
1307
- Oi.init(t, e), T.init(t, e);
1306
+ const po = /* @__PURE__ */ p("ZodMiniNullable", (t, e) => {
1307
+ Mi.init(t, e), T.init(t, e);
1308
1308
  });
1309
1309
  function Je(t) {
1310
- return new fo({
1310
+ return new po({
1311
1311
  type: "nullable",
1312
1312
  innerType: t
1313
1313
  });
1314
1314
  }
1315
- const po = /* @__PURE__ */ p("ZodMiniPrefault", (t, e) => {
1316
- Mi.init(t, e), T.init(t, e);
1315
+ const ho = /* @__PURE__ */ p("ZodMiniPrefault", (t, e) => {
1316
+ xi.init(t, e), T.init(t, e);
1317
1317
  });
1318
1318
  function K(t, e) {
1319
- return new po({
1319
+ return new ho({
1320
1320
  type: "prefault",
1321
1321
  innerType: t,
1322
1322
  get defaultValue() {
1323
- return typeof e == "function" ? e() : Kr(e);
1323
+ return typeof e == "function" ? e() : Wr(e);
1324
1324
  }
1325
1325
  });
1326
1326
  }
1327
- const ho = /* @__PURE__ */ p("ZodMiniPipe", (t, e) => {
1328
- xi.init(t, e), T.init(t, e);
1327
+ const go = /* @__PURE__ */ p("ZodMiniPipe", (t, e) => {
1328
+ Vi.init(t, e), T.init(t, e);
1329
1329
  });
1330
- function go(t, e) {
1331
- return new ho({
1330
+ function vo(t, e) {
1331
+ return new go({
1332
1332
  type: "pipe",
1333
1333
  in: t,
1334
1334
  out: e
1335
1335
  });
1336
1336
  }
1337
- const vo = /* @__PURE__ */ p("ZodMiniLazy", (t, e) => {
1338
- Vi.init(t, e), T.init(t, e);
1337
+ const yo = /* @__PURE__ */ p("ZodMiniLazy", (t, e) => {
1338
+ Ni.init(t, e), T.init(t, e);
1339
1339
  });
1340
- function yo(t) {
1341
- return new vo({
1340
+ function mo(t) {
1341
+ return new yo({
1342
1342
  type: "lazy",
1343
1343
  getter: t
1344
1344
  });
1345
1345
  }
1346
- const mo = /* @__PURE__ */ p("ZodMiniCustom", (t, e) => {
1347
- Ni.init(t, e), T.init(t, e);
1346
+ const bo = /* @__PURE__ */ p("ZodMiniCustom", (t, e) => {
1347
+ Li.init(t, e), T.init(t, e);
1348
1348
  });
1349
- function bo(t, e) {
1350
- return Ki(mo, () => !0);
1349
+ function _o(t, e) {
1350
+ return Wi(bo, () => !0);
1351
1351
  }
1352
1352
  function X() {
1353
- const t = yo(() => Q([l(), $(), q(), Wt(), A(t), ce(l(), t)]));
1353
+ const t = mo(() => Q([l(), $(), q(), Wt(), A(t), ce(l(), t)]));
1354
1354
  return t;
1355
1355
  }
1356
- const _o = /* @__PURE__ */ p("$ZodISODateTime", (t, e) => {
1357
- yi.init(t, e), Wi.init(t, e);
1356
+ const wo = /* @__PURE__ */ p("$ZodISODateTime", (t, e) => {
1357
+ mi.init(t, e), Yi.init(t, e);
1358
1358
  });
1359
1359
  function pt(t) {
1360
- return ji(_o);
1360
+ return Bi(wo);
1361
1361
  }
1362
- const ut = ct(h({}), X()), wo = h({
1362
+ const ut = ct(h({}), X()), Eo = h({
1363
1363
  sys: h({
1364
1364
  type: v("Link"),
1365
1365
  linkType: l(),
1366
1366
  id: l()
1367
1367
  })
1368
- }), Eo = h({
1368
+ }), So = h({
1369
1369
  sys: h({
1370
1370
  type: v("Link"),
1371
1371
  linkType: v("ContentType"),
1372
1372
  id: l()
1373
1373
  })
1374
- }), So = h({
1374
+ }), zo = h({
1375
1375
  sys: h({
1376
1376
  type: v("Link"),
1377
1377
  linkType: v("Environment"),
1378
1378
  id: l()
1379
1379
  })
1380
- }), zo = h({
1380
+ }), To = h({
1381
1381
  sys: h({
1382
1382
  type: v("Link"),
1383
1383
  linkType: v("Space"),
1384
1384
  id: l()
1385
1385
  })
1386
- }), To = h({
1386
+ }), ko = h({
1387
1387
  sys: h({
1388
1388
  type: v("Link"),
1389
1389
  linkType: v("TaxonomyConcept"),
1390
1390
  id: l()
1391
1391
  })
1392
- }), ko = h({
1392
+ }), Ao = h({
1393
1393
  sys: h({
1394
1394
  type: v("Link"),
1395
1395
  linkType: v("Tag"),
1396
1396
  id: l()
1397
1397
  })
1398
- }), tr = h({
1398
+ }), nr = h({
1399
1399
  type: v("Entry"),
1400
- contentType: Eo,
1400
+ contentType: So,
1401
1401
  publishedVersion: $(),
1402
1402
  id: l(),
1403
1403
  createdAt: dn(),
1404
1404
  updatedAt: dn(),
1405
1405
  locale: f(l()),
1406
1406
  revision: $(),
1407
- space: zo,
1408
- environment: So
1407
+ space: To,
1408
+ environment: zo
1409
1409
  }), Ue = h({
1410
1410
  /**
1411
1411
  * The entry fields payload.
@@ -1415,18 +1415,18 @@ const ut = ct(h({}), X()), wo = h({
1415
1415
  * Contentful metadata, including tags.
1416
1416
  */
1417
1417
  metadata: h({
1418
- tags: A(ko),
1419
- concepts: f(A(To))
1418
+ tags: A(Ao),
1419
+ concepts: f(A(ko))
1420
1420
  }),
1421
1421
  /**
1422
1422
  * System-managed properties describing the entry.
1423
1423
  */
1424
- sys: tr
1424
+ sys: nr
1425
1425
  });
1426
- function Ao(t) {
1426
+ function $o(t) {
1427
1427
  return Ue.safeParse(t).success;
1428
1428
  }
1429
- const $o = g(ut, {
1429
+ const Po = g(ut, {
1430
1430
  /**
1431
1431
  * The internal id of the audience (Short Text).
1432
1432
  *
@@ -1448,11 +1448,11 @@ const $o = g(ut, {
1448
1448
  * Optional field intended for internal documentation and operator context.
1449
1449
  */
1450
1450
  nt_description: f(l())
1451
- }), nr = g(Ue, {
1452
- fields: $o
1453
- }), _c = g(nr, {
1451
+ }), rr = g(Ue, {
1452
+ fields: Po
1453
+ }), _c = g(rr, {
1454
1454
  contentTypeId: v("nt_audience")
1455
- }), Po = g(Ue, {
1455
+ }), Io = g(Ue, {
1456
1456
  fields: h({
1457
1457
  /**
1458
1458
  * Human-readable name of the merge tag.
@@ -1470,7 +1470,7 @@ const $o = g(ut, {
1470
1470
  /**
1471
1471
  * System fields extended to constrain the content type to `nt_mergetag`.
1472
1472
  */
1473
- sys: g(tr, {
1473
+ sys: g(nr, {
1474
1474
  contentType: h({
1475
1475
  sys: h({
1476
1476
  type: v("Link"),
@@ -1491,10 +1491,10 @@ const $o = g(ut, {
1491
1491
  */
1492
1492
  hidden: K(q(), !1)
1493
1493
  });
1494
- function Io(t) {
1494
+ function Co(t) {
1495
1495
  return xt.safeParse(t).success;
1496
1496
  }
1497
- const Co = h({
1497
+ const Ro = h({
1498
1498
  /**
1499
1499
  * Discriminator for the component type.
1500
1500
  *
@@ -1511,7 +1511,7 @@ const Co = h({
1511
1511
  */
1512
1512
  variants: A(xt)
1513
1513
  });
1514
- function Ro(t) {
1514
+ function Oo(t) {
1515
1515
  return t.type === "EntryReplacement" || t.type === void 0;
1516
1516
  }
1517
1517
  const fn = h({
@@ -1519,7 +1519,7 @@ const fn = h({
1519
1519
  * Variant value for the inline variable.
1520
1520
  */
1521
1521
  value: Q([l(), q(), Wt(), $(), ce(l(), X())])
1522
- }), Oo = Xn(["Boolean", "Number", "Object", "String"]), Mo = h({
1522
+ }), Mo = er(["Boolean", "Number", "Object", "String"]), xo = h({
1523
1523
  /**
1524
1524
  * Discriminator for the inline variable component.
1525
1525
  */
@@ -1531,7 +1531,7 @@ const fn = h({
1531
1531
  /**
1532
1532
  * Describes the runtime type of the values for this variable.
1533
1533
  */
1534
- valueType: Oo,
1534
+ valueType: Mo,
1535
1535
  /**
1536
1536
  * Baseline value used when no targeting or allocation selects another variant.
1537
1537
  */
@@ -1544,10 +1544,10 @@ const fn = h({
1544
1544
  function wc(t) {
1545
1545
  return t.type === "InlineVariable";
1546
1546
  }
1547
- const xo = Be("type", [
1548
- Co,
1549
- Mo
1550
- ]), Vo = A(xo), No = h({
1547
+ const Vo = Be("type", [
1548
+ Ro,
1549
+ xo
1550
+ ]), No = A(Vo), Lo = h({
1551
1551
  /**
1552
1552
  * Variant distribution used for traffic allocation.
1553
1553
  *
@@ -1567,7 +1567,7 @@ const xo = Be("type", [
1567
1567
  * A single {@link EntryReplacementComponent} with an empty `baseline` and `variants` ID.
1568
1568
  */
1569
1569
  components: f(
1570
- K(Vo, [
1570
+ K(No, [
1571
1571
  {
1572
1572
  type: "EntryReplacement",
1573
1573
  baseline: { id: "" },
@@ -1581,10 +1581,10 @@ const xo = Be("type", [
1581
1581
  * @defaultValue false
1582
1582
  */
1583
1583
  sticky: f(K(q(), !1))
1584
- }), Lo = Q([
1584
+ }), jo = Q([
1585
1585
  v("nt_experiment"),
1586
1586
  v("nt_personalization")
1587
- ]), jo = g(ut, {
1587
+ ]), Bo = g(ut, {
1588
1588
  /**
1589
1589
  * The name of the personalization (Short Text).
1590
1590
  */
@@ -1599,7 +1599,7 @@ const xo = Be("type", [
1599
1599
  /**
1600
1600
  * The type of the personalization (`nt_experiment` | `nt_personalization`).
1601
1601
  */
1602
- nt_type: Lo,
1602
+ nt_type: jo,
1603
1603
  /**
1604
1604
  * The configuration of a {@link PersonalizationEntry } (JSON).
1605
1605
  *
@@ -1607,9 +1607,9 @@ const xo = Be("type", [
1607
1607
  * Accepts `null` or an explicit {@link PersonalizationConfig} and converts
1608
1608
  * falsy/undefined values into a default configuration.
1609
1609
  */
1610
- nt_config: go(
1611
- f(K(Je(No), null)),
1612
- lo(
1610
+ nt_config: vo(
1611
+ f(K(Je(Lo), null)),
1612
+ fo(
1613
1613
  (t) => t ?? {
1614
1614
  traffic: 0,
1615
1615
  distribution: [0.5, 0.5],
@@ -1625,7 +1625,7 @@ const xo = Be("type", [
1625
1625
  * Optional and nullable; when omitted or `null`, the personalization may apply
1626
1626
  * to all users.
1627
1627
  */
1628
- nt_audience: f(Je(nr)),
1628
+ nt_audience: f(Je(rr)),
1629
1629
  /**
1630
1630
  * All used variants of the personalization (Contentful references to other Content Types).
1631
1631
  *
@@ -1633,31 +1633,31 @@ const xo = Be("type", [
1633
1633
  * Modeled as an array of untyped Contentful entries and defaults to an empty
1634
1634
  * array when omitted.
1635
1635
  */
1636
- nt_variants: f(K(A(bo()), [])),
1636
+ nt_variants: f(K(A(_o()), [])),
1637
1637
  /**
1638
1638
  * The personalization/experience ID related to this personalization entry.
1639
1639
  */
1640
1640
  nt_experience_id: l()
1641
1641
  }), Yt = g(Ue, {
1642
- fields: jo
1642
+ fields: Bo
1643
1643
  }), Ec = g(Yt, {
1644
1644
  contentTypeId: v("nt_experience")
1645
1645
  });
1646
1646
  function Ke(t) {
1647
1647
  return Yt.safeParse(t).success;
1648
1648
  }
1649
- const Bo = A(Q([wo, Yt])), Uo = g(Ue, {
1649
+ const Uo = A(Q([Eo, Yt])), Do = g(Ue, {
1650
1650
  fields: g(ut, {
1651
1651
  /**
1652
1652
  * Personalization or experimentation experiences attached to this entry.
1653
1653
  */
1654
- nt_experiences: Bo
1654
+ nt_experiences: Uo
1655
1655
  })
1656
1656
  });
1657
1657
  function ht(t) {
1658
- return Uo.safeParse(t).success;
1658
+ return Do.safeParse(t).success;
1659
1659
  }
1660
- const Do = f(
1660
+ const Zo = f(
1661
1661
  h({
1662
1662
  /**
1663
1663
  * Name of the application.
@@ -1668,7 +1668,7 @@ const Do = f(
1668
1668
  */
1669
1669
  version: l()
1670
1670
  })
1671
- ), rr = h({
1671
+ ), ir = h({
1672
1672
  /**
1673
1673
  * Name of the campaign (e.g., `utm_campaign`).
1674
1674
  */
@@ -1689,7 +1689,7 @@ const Do = f(
1689
1689
  * Campaign content (e.g., `utm_content`).
1690
1690
  */
1691
1691
  content: f(l())
1692
- }), Zo = Q([v("mobile"), v("server"), v("web")]), Fo = ce(l(), l()), qo = 2, Ho = h({
1692
+ }), Fo = Q([v("mobile"), v("server"), v("web")]), qo = ce(l(), l()), Ho = 2, Ko = h({
1693
1693
  /**
1694
1694
  * Latitude component of the coordinates.
1695
1695
  */
@@ -1702,7 +1702,7 @@ const Do = f(
1702
1702
  /**
1703
1703
  * Geographical coordinates for the location.
1704
1704
  */
1705
- coordinates: f(Ho),
1705
+ coordinates: f(Ko),
1706
1706
  /**
1707
1707
  * City name associated with the location.
1708
1708
  */
@@ -1730,7 +1730,7 @@ const Do = f(
1730
1730
  * Validated to exactly COUNTRY_CODE_LENGTH characters, typically
1731
1731
  * an ISO 3166-1 alpha-2 code.
1732
1732
  */
1733
- countryCode: f(l().check(Hi(qo))),
1733
+ countryCode: f(l().check(Ki(Ho))),
1734
1734
  /**
1735
1735
  * Continent name associated with the location.
1736
1736
  */
@@ -1742,7 +1742,7 @@ const Do = f(
1742
1742
  * Typically an IANA time zone string (e.g., `"Europe/Berlin"`).
1743
1743
  */
1744
1744
  timezone: f(l())
1745
- }), Ko = h({
1745
+ }), Wo = h({
1746
1746
  /**
1747
1747
  * Name of the SDK/library (e.g., `"@contentful/optimization-web"`).
1748
1748
  */
@@ -1751,7 +1751,7 @@ const Do = f(
1751
1751
  * Version of the analytics library.
1752
1752
  */
1753
1753
  version: l()
1754
- }), ze = ct(
1754
+ }), Te = ct(
1755
1755
  h({
1756
1756
  /**
1757
1757
  * Path component of the page URL (e.g., `/products/123`).
@@ -1760,7 +1760,7 @@ const Do = f(
1760
1760
  /**
1761
1761
  * Parsed query parameters for the page.
1762
1762
  */
1763
- query: Fo,
1763
+ query: qo,
1764
1764
  /**
1765
1765
  * Referrer URL that led to the current page.
1766
1766
  */
@@ -1787,7 +1787,7 @@ const Do = f(
1787
1787
  name: l()
1788
1788
  }),
1789
1789
  X()
1790
- ), Qt = ce(l(), X()), Wo = h({
1790
+ ), Qt = ce(l(), X()), Yo = h({
1791
1791
  /**
1792
1792
  * Unique identifier for this session statistics record.
1793
1793
  */
@@ -1807,7 +1807,7 @@ const Do = f(
1807
1807
  *
1808
1808
  * @see Page
1809
1809
  */
1810
- landingPage: ze,
1810
+ landingPage: Te,
1811
1811
  /**
1812
1812
  * Number of sessions associated with this profile or identifier.
1813
1813
  *
@@ -1867,8 +1867,8 @@ const Do = f(
1867
1867
  *
1868
1868
  * @see SessionStatistics
1869
1869
  */
1870
- session: Wo
1871
- }), Yo = ct(
1870
+ session: Yo
1871
+ }), Go = ct(
1872
1872
  h({
1873
1873
  /**
1874
1874
  * Identifier of the profile.
@@ -1879,7 +1879,7 @@ const Do = f(
1879
1879
  id: l()
1880
1880
  }),
1881
1881
  X()
1882
- ), ir = h({
1882
+ ), or = h({
1883
1883
  /**
1884
1884
  * Response payload.
1885
1885
  *
@@ -1899,12 +1899,12 @@ const Do = f(
1899
1899
  * May be `null` when the error state is unknown or not applicable.
1900
1900
  */
1901
1901
  error: Je(q())
1902
- }), Go = h({
1902
+ }), Jo = h({
1903
1903
  /**
1904
1904
  * Profiles evaluated or affected by the batch experience request.
1905
1905
  */
1906
1906
  profiles: f(A(dt))
1907
- }), Jo = g(ir, { data: Go }), Qo = ["Variable"], or = h({
1907
+ }), Qo = g(or, { data: Jo }), Xo = ["Variable"], sr = h({
1908
1908
  /**
1909
1909
  * Key identifying the subject of the change.
1910
1910
  */
@@ -1915,7 +1915,7 @@ const Do = f(
1915
1915
  * @remarks
1916
1916
  * May be one of {@link ChangeType} or an arbitrary string for unknown types.
1917
1917
  */
1918
- type: Q([Xn(Qo), l()]),
1918
+ type: Q([er(Xo), l()]),
1919
1919
  /**
1920
1920
  * Metadata describing the originating experience and variant index.
1921
1921
  */
@@ -1932,13 +1932,13 @@ const Do = f(
1932
1932
  */
1933
1933
  variantIndex: $()
1934
1934
  })
1935
- }), Xo = Q([
1935
+ }), es = Q([
1936
1936
  l(),
1937
1937
  q(),
1938
1938
  Wt(),
1939
1939
  $(),
1940
1940
  ce(l(), X())
1941
- ]), Sc = g(or, {
1941
+ ]), Sc = g(sr, {
1942
1942
  /**
1943
1943
  * Unconstrained change type string.
1944
1944
  */
@@ -1946,8 +1946,8 @@ const Do = f(
1946
1946
  /**
1947
1947
  * Payload for the change value, with unknown structure.
1948
1948
  */
1949
- value: eo()
1950
- }), es = g(or, {
1949
+ value: to()
1950
+ }), ts = g(sr, {
1951
1951
  /**
1952
1952
  * Discriminator for a variable change.
1953
1953
  */
@@ -1955,16 +1955,16 @@ const Do = f(
1955
1955
  /**
1956
1956
  * New value for the variable identified by {@link ChangeBase.key}.
1957
1957
  */
1958
- value: Xo
1959
- }), ts = Be("type", [es]), sr = A(ts), Xt = h({
1958
+ value: es
1959
+ }), ns = Be("type", [ts]), ar = A(ns), Xt = h({
1960
1960
  /**
1961
1961
  * Application-level metadata.
1962
1962
  */
1963
- app: Do,
1963
+ app: Zo,
1964
1964
  /**
1965
1965
  * Campaign attribution metadata.
1966
1966
  */
1967
- campaign: rr,
1967
+ campaign: ir,
1968
1968
  /**
1969
1969
  * GDPR-related consent information.
1970
1970
  */
@@ -1977,7 +1977,7 @@ const Do = f(
1977
1977
  /**
1978
1978
  * Analytics library metadata.
1979
1979
  */
1980
- library: Ko,
1980
+ library: Wo,
1981
1981
  /**
1982
1982
  * Locale identifier of the event (e.g., `"en-US"`).
1983
1983
  */
@@ -1996,12 +1996,12 @@ const Do = f(
1996
1996
  *
1997
1997
  * @see Channel
1998
1998
  */
1999
- channel: Zo,
1999
+ channel: Fo,
2000
2000
  /**
2001
2001
  * Context object carrying environment and client metadata.
2002
2002
  */
2003
2003
  context: g(Xt, {
2004
- page: f(ze),
2004
+ page: f(Te),
2005
2005
  screen: f(Jt)
2006
2006
  }),
2007
2007
  /**
@@ -2036,12 +2036,12 @@ const Do = f(
2036
2036
  * Identifier of the authenticated user, if known.
2037
2037
  */
2038
2038
  userId: f(l())
2039
- }), ar = g(ue, {
2039
+ }), cr = g(ue, {
2040
2040
  /**
2041
2041
  * Discriminator indicating that this event is an alias event.
2042
2042
  */
2043
2043
  type: v("alias")
2044
- }), be = g(ue, {
2044
+ }), _e = g(ue, {
2045
2045
  /**
2046
2046
  * Discriminator indicating that this event is a component view.
2047
2047
  */
@@ -2071,7 +2071,7 @@ const Do = f(
2071
2071
  * Typically corresponds to the index of the selected personalization entry.
2072
2072
  */
2073
2073
  variantIndex: $()
2074
- }), cr = g(ue, {
2074
+ }), ur = g(ue, {
2075
2075
  /**
2076
2076
  * Discriminator indicating that this event is a group event.
2077
2077
  */
@@ -2087,11 +2087,11 @@ const Do = f(
2087
2087
  * @see {@link Traits}
2088
2088
  */
2089
2089
  traits: Qt
2090
- }), ur = g(Xt, {
2090
+ }), lr = g(Xt, {
2091
2091
  /**
2092
2092
  * Page context for events that occur within a web page.
2093
2093
  */
2094
- page: ze
2094
+ page: Te
2095
2095
  }), tn = g(ue, {
2096
2096
  /**
2097
2097
  * Discriminator indicating that this event is a page view.
@@ -2107,13 +2107,13 @@ const Do = f(
2107
2107
  /**
2108
2108
  * Page-level properties such as URL, path, and referrer.
2109
2109
  */
2110
- properties: ze,
2110
+ properties: Te,
2111
2111
  /*
2112
2112
  * Override the context property of {@link UniversalEventProperties}
2113
2113
  * with a page-specific context
2114
2114
  */
2115
- context: ur
2116
- }), lr = g(Xt, {
2115
+ context: lr
2116
+ }), dr = g(Xt, {
2117
2117
  /**
2118
2118
  * Screen context for events that occur within a web page.
2119
2119
  */
@@ -2137,7 +2137,7 @@ const Do = f(
2137
2137
  * Override the context property of {@link UniversalEventProperties}
2138
2138
  * with a screen-specific context
2139
2139
  */
2140
- context: lr
2140
+ context: dr
2141
2141
  }), rn = g(ue, {
2142
2142
  /**
2143
2143
  * Discriminator indicating that this event is a track event.
@@ -2151,23 +2151,23 @@ const Do = f(
2151
2151
  * Additional properties describing the event.
2152
2152
  */
2153
2153
  properties: lt
2154
- }), ne = { anonymousId: l() }, ns = Be("type", [
2155
- g(ar, ne),
2156
- g(be, ne),
2154
+ }), ne = { anonymousId: l() }, rs = Be("type", [
2157
2155
  g(cr, ne),
2156
+ g(_e, ne),
2157
+ g(ur, ne),
2158
2158
  g(en, ne),
2159
2159
  g(tn, ne),
2160
2160
  g(nn, ne),
2161
2161
  g(rn, ne)
2162
- ]), zc = A(ns), dr = Be("type", [
2163
- ar,
2164
- be,
2162
+ ]), zc = A(rs), fr = Be("type", [
2165
2163
  cr,
2164
+ _e,
2165
+ ur,
2166
2166
  en,
2167
2167
  tn,
2168
2168
  nn,
2169
2169
  rn
2170
- ]), Qe = A(dr), rs = h({
2170
+ ]), Qe = A(fr), is = h({
2171
2171
  /**
2172
2172
  * Features or capabilities to enable for this request.
2173
2173
  */
@@ -2179,12 +2179,12 @@ const Do = f(
2179
2179
  * @remarks
2180
2180
  * Must contain at least one event.
2181
2181
  */
2182
- events: Qe.check(qi(1)),
2182
+ events: Qe.check(Hi(1)),
2183
2183
  /**
2184
2184
  * Optional configuration for this experience request.
2185
2185
  */
2186
- options: f(rs)
2187
- }), is = h({
2186
+ options: f(is)
2187
+ }), os = h({
2188
2188
  /**
2189
2189
  * Identifier of the personalization or experiment experience.
2190
2190
  */
@@ -2214,7 +2214,7 @@ const Do = f(
2214
2214
  * same user, rather than re-allocating a new variant.
2215
2215
  */
2216
2216
  sticky: f(K(q(), !1))
2217
- }), fr = A(is), os = h({
2217
+ }), pr = A(os), ss = h({
2218
2218
  /**
2219
2219
  * Profile associated with the evaluated events.
2220
2220
  */
@@ -2224,50 +2224,50 @@ const Do = f(
2224
2224
  *
2225
2225
  * @see {@link SelectedPersonalizationArray}
2226
2226
  */
2227
- experiences: fr,
2227
+ experiences: pr,
2228
2228
  /**
2229
2229
  * Currently used for Custom Flags.
2230
2230
  *
2231
2231
  * @see {@link ChangeArray}
2232
2232
  */
2233
- changes: sr
2234
- }), gt = g(ir, { data: os }), pr = Be("type", [be]), ss = A(pr), as = h({
2233
+ changes: ar
2234
+ }), gt = g(or, { data: ss }), hr = Be("type", [_e]), as = A(hr), cs = h({
2235
2235
  /**
2236
2236
  * Partial profile information used to associate events with a user.
2237
2237
  *
2238
2238
  * @see PartialProfile
2239
2239
  */
2240
- profile: Yo,
2240
+ profile: Go,
2241
2241
  /**
2242
2242
  * Insights events that should be recorded for this profile.
2243
2243
  *
2244
2244
  * @see InsightsEventArray
2245
2245
  */
2246
- events: ss
2247
- }), hr = A(as);
2248
- var Vt = [], cs = (t) => new RegExp(t.replace(/\*/g, ".*") + "$"), us = (t) => {
2249
- Vt = t.split(/[\s,]+/).map(cs);
2246
+ events: as
2247
+ }), gr = A(cs);
2248
+ var Vt = [], us = (t) => new RegExp(t.replace(/\*/g, ".*") + "$"), ls = (t) => {
2249
+ Vt = t.split(/[\s,]+/).map(us);
2250
2250
  }, de = (t, e, n, ...r) => {
2251
2251
  for (let i = Vt.length; i--; ) if (Vt[i].test(t)) return e({ name: t, level: n, messages: r });
2252
- }, ls = (t) => {
2252
+ }, ds = (t) => {
2253
2253
  let e = "";
2254
2254
  const n = console[t.level === "fatal" ? "error" : t.level];
2255
2255
  t.name && (e += `[${t.name}] `), typeof t.messages[0] == "object" ? n(e, ...t.messages) : n(e + t.messages.shift(), ...t.messages);
2256
- }, gr = (t, e) => ({ fatal: de.bind(0, t, e = e || ls, "fatal"), error: de.bind(0, t, e, "error"), warn: de.bind(0, t, e, "warn"), debug: de.bind(0, t, e, "debug"), info: de.bind(0, t, e, "info"), log: de.bind(0, t, e, "log") }), Te = gr("");
2257
- Te.fatal;
2258
- Te.error;
2259
- Te.warn;
2260
- Te.debug;
2261
- Te.info;
2262
- Te.log;
2263
- class ds {
2256
+ }, vr = (t, e) => ({ fatal: de.bind(0, t, e = e || ds, "fatal"), error: de.bind(0, t, e, "error"), warn: de.bind(0, t, e, "warn"), debug: de.bind(0, t, e, "debug"), info: de.bind(0, t, e, "info"), log: de.bind(0, t, e, "log") }), ke = vr("");
2257
+ ke.fatal;
2258
+ ke.error;
2259
+ ke.warn;
2260
+ ke.debug;
2261
+ ke.info;
2262
+ ke.log;
2263
+ class fs {
2264
2264
  name = "@contentful/optimization";
2265
2265
  PREFIX_PARTS = ["Ctfl", "O10n"];
2266
2266
  DELIMITER = ":";
2267
2267
  diary;
2268
2268
  sinks = [];
2269
2269
  constructor() {
2270
- this.diary = gr(this.name, this.onLogEvent.bind(this)), us(this.name);
2270
+ this.diary = vr(this.name, this.onLogEvent.bind(this)), ls(this.name);
2271
2271
  }
2272
2272
  assembleLocationPrefix(e) {
2273
2273
  return `[${[...this.PREFIX_PARTS, e].join(this.DELIMITER)}]`;
@@ -2305,7 +2305,7 @@ class ds {
2305
2305
  });
2306
2306
  }
2307
2307
  }
2308
- const oe = new ds();
2308
+ const oe = new fs();
2309
2309
  function P(t) {
2310
2310
  return {
2311
2311
  debug: (e, ...n) => {
@@ -2328,10 +2328,10 @@ function P(t) {
2328
2328
  }
2329
2329
  };
2330
2330
  }
2331
- class fs {
2331
+ class ps {
2332
2332
  }
2333
- var fe = { fatal: 60, error: 50, warn: 40, info: 30, debug: 20, log: 10 }, ps = (t, e) => e in fe && t in fe ? fe[e] === fe[t] ? 0 : fe[e] < fe[t] ? 1 : -1 : 0;
2334
- const hs = {
2333
+ var fe = { fatal: 60, error: 50, warn: 40, info: 30, debug: 20, log: 10 }, hs = (t, e) => e in fe && t in fe ? fe[e] === fe[t] ? 0 : fe[e] < fe[t] ? 1 : -1 : 0;
2334
+ const gs = {
2335
2335
  debug: (...t) => {
2336
2336
  console.debug(...t);
2337
2337
  },
@@ -2350,22 +2350,22 @@ const hs = {
2350
2350
  fatal: (...t) => {
2351
2351
  console.error(...t);
2352
2352
  }
2353
- }, gs = 0;
2354
- class vs extends fs {
2353
+ }, vs = 0;
2354
+ class ys extends ps {
2355
2355
  name = "ConsoleLogSink";
2356
2356
  verbosity;
2357
2357
  constructor(e) {
2358
2358
  super(), this.verbosity = e ?? "error";
2359
2359
  }
2360
2360
  ingest(e) {
2361
- ps(this.verbosity, e.level) > gs || hs[e.level](...e.messages);
2361
+ hs(this.verbosity, e.level) > vs || gs[e.level](...e.messages);
2362
2362
  }
2363
2363
  }
2364
- function ys(t) {
2364
+ function ms(t) {
2365
2365
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
2366
2366
  }
2367
2367
  var vt = {}, yt, pn;
2368
- function ms() {
2368
+ function bs() {
2369
2369
  if (pn) return yt;
2370
2370
  pn = 1;
2371
2371
  function t(e, n) {
@@ -2419,9 +2419,9 @@ function ms() {
2419
2419
  }, yt;
2420
2420
  }
2421
2421
  var hn;
2422
- function bs() {
2422
+ function _s() {
2423
2423
  return hn || (hn = 1, function(t) {
2424
- var e = ms();
2424
+ var e = bs();
2425
2425
  t.operation = function(n) {
2426
2426
  var r = t.timeouts(n);
2427
2427
  return new e(r, {
@@ -2472,11 +2472,11 @@ function bs() {
2472
2472
  }(vt)), vt;
2473
2473
  }
2474
2474
  var mt, gn;
2475
- function _s() {
2476
- return gn || (gn = 1, mt = bs()), mt;
2475
+ function ws() {
2476
+ return gn || (gn = 1, mt = _s()), mt;
2477
2477
  }
2478
- var ws = _s();
2479
- const Es = /* @__PURE__ */ ys(ws), Ss = Object.prototype.toString, zs = (t) => Ss.call(t) === "[object Error]", Ts = /* @__PURE__ */ new Set([
2478
+ var Es = ws();
2479
+ const Ss = /* @__PURE__ */ ms(Es), zs = Object.prototype.toString, Ts = (t) => zs.call(t) === "[object Error]", ks = /* @__PURE__ */ new Set([
2480
2480
  "network error",
2481
2481
  // Chrome
2482
2482
  "Failed to fetch",
@@ -2494,10 +2494,10 @@ const Es = /* @__PURE__ */ ys(ws), Ss = Object.prototype.toString, zs = (t) => S
2494
2494
  "terminated"
2495
2495
  // Undici (Node.js)
2496
2496
  ]);
2497
- function ks(t) {
2498
- return t && zs(t) && t.name === "TypeError" && typeof t.message == "string" ? t.message === "Load failed" ? t.stack === void 0 : Ts.has(t.message) : !1;
2497
+ function As(t) {
2498
+ return t && Ts(t) && t.name === "TypeError" && typeof t.message == "string" ? t.message === "Load failed" ? t.stack === void 0 : ks.has(t.message) : !1;
2499
2499
  }
2500
- class As extends Error {
2500
+ class $s extends Error {
2501
2501
  constructor(e) {
2502
2502
  super(), e instanceof Error ? (this.originalError = e, { message: e } = e) : (this.originalError = new Error(e), this.originalError.stack = this.stack), this.name = "AbortError", this.message = e;
2503
2503
  }
@@ -2506,11 +2506,11 @@ const vn = (t, e, n) => {
2506
2506
  const r = n.retries - (e - 1);
2507
2507
  return t.attemptNumber = e, t.retriesLeft = r, t;
2508
2508
  };
2509
- async function $s(t, e) {
2509
+ async function Ps(t, e) {
2510
2510
  return new Promise((n, r) => {
2511
2511
  e = { ...e }, e.onFailedAttempt ??= () => {
2512
2512
  }, e.shouldRetry ??= () => !0, e.retries ??= 10;
2513
- const i = Es.operation(e), o = () => {
2513
+ const i = Ss.operation(e), o = () => {
2514
2514
  i.stop(), r(e.signal?.reason);
2515
2515
  };
2516
2516
  e.signal && !e.signal.aborted && e.signal.addEventListener("abort", o, { once: !0 });
@@ -2525,9 +2525,9 @@ async function $s(t, e) {
2525
2525
  try {
2526
2526
  if (!(c instanceof Error))
2527
2527
  throw new TypeError(`Non-error was thrown: "${c}". You should only throw errors.`);
2528
- if (c instanceof As)
2528
+ if (c instanceof $s)
2529
2529
  throw c.originalError;
2530
- if (c instanceof TypeError && !ks(c))
2530
+ if (c instanceof TypeError && !As(c))
2531
2531
  throw c;
2532
2532
  if (vn(c, a, e), await e.shouldRetry(c) || (i.stop(), r(c)), await e.onFailedAttempt(c), !i.retry(c))
2533
2533
  throw i.mainError();
@@ -2538,7 +2538,7 @@ async function $s(t, e) {
2538
2538
  });
2539
2539
  });
2540
2540
  }
2541
- const bt = P("ApiClient:Retry"), Ps = 0, Is = 1, _t = 503, Cs = 500;
2541
+ const bt = P("ApiClient:Retry"), Is = 0, Cs = 1, _t = 503, Rs = 500;
2542
2542
  class nt extends Error {
2543
2543
  /**
2544
2544
  * The HTTP status code associated with the error.
@@ -2550,11 +2550,11 @@ class nt extends Error {
2550
2550
  * @param message - Description of the error.
2551
2551
  * @param status - HTTP status code associated with the error.
2552
2552
  */
2553
- constructor(e, n = Cs) {
2553
+ constructor(e, n = Rs) {
2554
2554
  super(e), Object.setPrototypeOf(this, nt.prototype), this.status = n;
2555
2555
  }
2556
2556
  }
2557
- function Rs({
2557
+ function Os({
2558
2558
  apiName: t = "Optimization",
2559
2559
  controller: e,
2560
2560
  fetchMethod: n = fetch,
@@ -2584,19 +2584,19 @@ function Rs({
2584
2584
  }
2585
2585
  };
2586
2586
  }
2587
- function Os({
2587
+ function Ms({
2588
2588
  apiName: t = "Optimization",
2589
2589
  fetchMethod: e = fetch,
2590
- intervalTimeout: n = Ps,
2590
+ intervalTimeout: n = Is,
2591
2591
  onFailedAttempt: r,
2592
- retries: i = Is
2592
+ retries: i = Cs
2593
2593
  } = {}) {
2594
2594
  return async (o, s) => {
2595
2595
  const a = new AbortController();
2596
2596
  let c;
2597
2597
  try {
2598
- c = await $s(
2599
- Rs({ apiName: t, controller: a, fetchMethod: e, init: s, url: o }),
2598
+ c = await Ps(
2599
+ Os({ apiName: t, controller: a, fetchMethod: e, init: s, url: o }),
2600
2600
  {
2601
2601
  minTimeout: n,
2602
2602
  onFailedAttempt: (u) => r?.({ ...u, apiName: t }),
@@ -2613,30 +2613,30 @@ function Os({
2613
2613
  return c;
2614
2614
  };
2615
2615
  }
2616
- const Ms = P("ApiClient:Timeout"), xs = 3e3;
2617
- function Vs({
2616
+ const xs = P("ApiClient:Timeout"), Vs = 3e3;
2617
+ function Ns({
2618
2618
  apiName: t = "Optimization",
2619
2619
  fetchMethod: e = fetch,
2620
2620
  onRequestTimeout: n,
2621
- requestTimeout: r = xs
2621
+ requestTimeout: r = Vs
2622
2622
  } = {}) {
2623
2623
  return async (i, o) => {
2624
2624
  const s = new AbortController(), a = setTimeout(() => {
2625
- typeof n == "function" ? n({ apiName: t }) : Ms.error(`Request to "${i.toString()}" timed out`, new Error("Request timeout")), s.abort();
2625
+ typeof n == "function" ? n({ apiName: t }) : xs.error(`Request to "${i.toString()}" timed out`, new Error("Request timeout")), s.abort();
2626
2626
  }, r), c = await e(i, { ...o, signal: s.signal });
2627
2627
  return clearTimeout(a), c;
2628
2628
  };
2629
2629
  }
2630
2630
  const yn = P("ApiClient:Fetch");
2631
- function Ns(t) {
2631
+ function Ls(t) {
2632
2632
  try {
2633
- const e = Vs(t);
2634
- return Os({ ...t, fetchMethod: e });
2633
+ const e = Ns(t);
2634
+ return Ms({ ...t, fetchMethod: e });
2635
2635
  } catch (e) {
2636
2636
  throw e instanceof Error && (e.name === "AbortError" ? yn.warn("Request aborted due to network issues. This request may not be retried.") : yn.error("Request failed:", e)), e;
2637
2637
  }
2638
2638
  }
2639
- const Ls = {
2639
+ const js = {
2640
2640
  /**
2641
2641
  * Creates a fully protected fetch method with timeout and retry behavior.
2642
2642
  *
@@ -2653,9 +2653,9 @@ const Ls = {
2653
2653
  *
2654
2654
  * @see createProtectedFetchMethod
2655
2655
  */
2656
- create: Ns
2657
- }, mn = P("ApiClient"), js = "main";
2658
- class vr {
2656
+ create: Ls
2657
+ }, mn = P("ApiClient"), Bs = "main";
2658
+ class yr {
2659
2659
  /**
2660
2660
  * Name of the API client, used in log messages and as the `apiName` for fetch.
2661
2661
  */
@@ -2679,7 +2679,7 @@ class vr {
2679
2679
  * @param config - Configuration options for the client.
2680
2680
  */
2681
2681
  constructor(e, { fetchOptions: n, clientId: r, environment: i }) {
2682
- this.clientId = r, this.environment = i ?? js, this.name = e, this.fetch = Ls.create({ ...n ?? {}, apiName: e });
2682
+ this.clientId = r, this.environment = i ?? Bs, this.name = e, this.fetch = js.create({ ...n ?? {}, apiName: e });
2683
2683
  }
2684
2684
  /**
2685
2685
  * Logs errors that occur during API requests with standardized messages.
@@ -2700,8 +2700,8 @@ class vr {
2700
2700
  ) : mn.error(`[${this.name}] "${n}" request failed:`, e));
2701
2701
  }
2702
2702
  }
2703
- const j = P("ApiClient:Experience"), Bs = "https://experience.ninetailed.co/";
2704
- class Us extends vr {
2703
+ const j = P("ApiClient:Experience"), Us = "https://experience.ninetailed.co/";
2704
+ class Ds extends yr {
2705
2705
  /**
2706
2706
  * Base URL used for Experience API requests.
2707
2707
  */
@@ -2719,7 +2719,7 @@ class Us extends vr {
2719
2719
  constructor(e) {
2720
2720
  super("Experience", e);
2721
2721
  const { baseUrl: n, enabledFeatures: r, ip: i, locale: o, plainText: s, preflight: a } = e;
2722
- this.baseUrl = n || Bs, this.enabledFeatures = r, this.ip = i, this.locale = o, this.plainText = s, this.preflight = a;
2722
+ this.baseUrl = n || Us, this.enabledFeatures = r, this.ip = i, this.locale = o, this.plainText = s, this.preflight = a;
2723
2723
  }
2724
2724
  /**
2725
2725
  * Retrieves a profile by ID.
@@ -2914,7 +2914,7 @@ class Us extends vr {
2914
2914
  options: { plainText: !1, ...n }
2915
2915
  }), {
2916
2916
  data: { profiles: s }
2917
- } = Jo.parse(await o.json());
2917
+ } = Qo.parse(await o.json());
2918
2918
  return j.debug(`"${r}" request successfully completed`), s;
2919
2919
  } catch (o) {
2920
2920
  throw this.logRequestError(o, { requestName: r }), o;
@@ -2963,8 +2963,8 @@ class Us extends vr {
2963
2963
  return e && Array.isArray(e) && e.length > 0 ? n.features = e : n.features = ["ip-enrichment", "location"], n;
2964
2964
  };
2965
2965
  }
2966
- const ke = P("ApiClient:Insights"), Ds = "https://ingest.insights.ninetailed.co/";
2967
- class Zs extends vr {
2966
+ const Ae = P("ApiClient:Insights"), Zs = "https://ingest.insights.ninetailed.co/";
2967
+ class Fs extends yr {
2968
2968
  /**
2969
2969
  * Base URL used for Insights API requests.
2970
2970
  */
@@ -2992,7 +2992,7 @@ class Zs extends vr {
2992
2992
  constructor(e) {
2993
2993
  super("Insights", e);
2994
2994
  const { baseUrl: n, beaconHandler: r } = e;
2995
- this.baseUrl = n ?? Ds, this.beaconHandler = r;
2995
+ this.baseUrl = n ?? Zs, this.beaconHandler = r;
2996
2996
  }
2997
2997
  /**
2998
2998
  * Sends batches of insights events to the Ninetailed Insights API.
@@ -3032,16 +3032,16 @@ class Zs extends vr {
3032
3032
  const { beaconHandler: r = this.beaconHandler } = n, i = new URL(
3033
3033
  `v1/organizations/${this.clientId}/environments/${this.environment}/events`,
3034
3034
  this.baseUrl
3035
- ), o = hr.parse(e);
3035
+ ), o = gr.parse(e);
3036
3036
  if (typeof r == "function") {
3037
- if (ke.debug("Queueing events via beaconHandler"), r(i, o))
3037
+ if (Ae.debug("Queueing events via beaconHandler"), r(i, o))
3038
3038
  return !0;
3039
- ke.warn(
3039
+ Ae.warn(
3040
3040
  "beaconHandler failed to queue events; events will be emitted immediately via fetch"
3041
3041
  );
3042
3042
  }
3043
3043
  const s = "Event Batches";
3044
- ke.info(`Sending "${s}" request`), ke.debug(`"${s}" request body:`, o);
3044
+ Ae.info(`Sending "${s}" request`), Ae.debug(`"${s}" request body:`, o);
3045
3045
  try {
3046
3046
  return await this.fetch(i, {
3047
3047
  method: "POST",
@@ -3050,13 +3050,13 @@ class Zs extends vr {
3050
3050
  },
3051
3051
  body: JSON.stringify(o),
3052
3052
  keepalive: !0
3053
- }), ke.debug(`"${s}" request successfully completed`), !0;
3053
+ }), Ae.debug(`"${s}" request successfully completed`), !0;
3054
3054
  } catch (a) {
3055
3055
  return this.logRequestError(a, { requestName: s }), !1;
3056
3056
  }
3057
3057
  }
3058
3058
  }
3059
- class Fs {
3059
+ class qs {
3060
3060
  /**
3061
3061
  * Shared configuration applied to both Experience and Insights clients.
3062
3062
  */
@@ -3076,16 +3076,16 @@ class Fs {
3076
3076
  */
3077
3077
  constructor(e) {
3078
3078
  const { personalization: n, analytics: r, ...i } = e;
3079
- this.config = i, this.experience = new Us({
3079
+ this.config = i, this.experience = new Ds({
3080
3080
  ...i,
3081
3081
  ...n
3082
- }), this.insights = new Zs({
3082
+ }), this.insights = new Fs({
3083
3083
  ...i,
3084
3084
  ...r
3085
3085
  });
3086
3086
  }
3087
3087
  }
3088
- function qs() {
3088
+ function Hs() {
3089
3089
  }
3090
3090
  function bn(t) {
3091
3091
  return Object.getOwnPropertySymbols(t).filter((e) => Object.prototype.propertyIsEnumerable.call(t, e));
@@ -3093,7 +3093,7 @@ function bn(t) {
3093
3093
  function _n(t) {
3094
3094
  return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
3095
3095
  }
3096
- const Hs = "[object RegExp]", Ks = "[object String]", Ws = "[object Number]", Ys = "[object Boolean]", wn = "[object Arguments]", Gs = "[object Symbol]", Js = "[object Date]", Qs = "[object Map]", Xs = "[object Set]", ea = "[object Array]", ta = "[object Function]", na = "[object ArrayBuffer]", wt = "[object Object]", ra = "[object Error]", ia = "[object DataView]", oa = "[object Uint8Array]", sa = "[object Uint8ClampedArray]", aa = "[object Uint16Array]", ca = "[object Uint32Array]", ua = "[object BigUint64Array]", la = "[object Int8Array]", da = "[object Int16Array]", fa = "[object Int32Array]", pa = "[object BigInt64Array]", ha = "[object Float32Array]", ga = "[object Float64Array]";
3096
+ const Ks = "[object RegExp]", Ws = "[object String]", Ys = "[object Number]", Gs = "[object Boolean]", wn = "[object Arguments]", Js = "[object Symbol]", Qs = "[object Date]", Xs = "[object Map]", ea = "[object Set]", ta = "[object Array]", na = "[object Function]", ra = "[object ArrayBuffer]", wt = "[object Object]", ia = "[object Error]", oa = "[object DataView]", sa = "[object Uint8Array]", aa = "[object Uint8ClampedArray]", ca = "[object Uint16Array]", ua = "[object Uint32Array]", la = "[object BigUint64Array]", da = "[object Int8Array]", fa = "[object Int16Array]", pa = "[object Int32Array]", ha = "[object BigInt64Array]", ga = "[object Float32Array]", va = "[object Float64Array]";
3097
3097
  function rt(t) {
3098
3098
  if (!t || typeof t != "object")
3099
3099
  return !1;
@@ -3114,13 +3114,13 @@ function ge(t, e) {
3114
3114
  }
3115
3115
  return t;
3116
3116
  }
3117
- function va(t, e) {
3117
+ function ya(t, e) {
3118
3118
  return t === e || Number.isNaN(t) && Number.isNaN(e);
3119
3119
  }
3120
- function ya(t, e, n) {
3121
- return Re(t, e, void 0, void 0, void 0, void 0, n);
3120
+ function ma(t, e, n) {
3121
+ return Oe(t, e, void 0, void 0, void 0, void 0, n);
3122
3122
  }
3123
- function Re(t, e, n, r, i, o, s) {
3123
+ function Oe(t, e, n, r, i, o, s) {
3124
3124
  const a = s(t, e, n, r, i, o);
3125
3125
  if (a !== void 0)
3126
3126
  return a;
@@ -3148,19 +3148,19 @@ function xe(t, e, n, r) {
3148
3148
  if (i === wn && (i = wt), o === wn && (o = wt), i !== o)
3149
3149
  return !1;
3150
3150
  switch (i) {
3151
- case Ks:
3151
+ case Ws:
3152
3152
  return t.toString() === e.toString();
3153
- case Ws: {
3153
+ case Ys: {
3154
3154
  const c = t.valueOf(), u = e.valueOf();
3155
- return va(c, u);
3155
+ return ya(c, u);
3156
3156
  }
3157
- case Ys:
3158
- case Js:
3159
3157
  case Gs:
3158
+ case Qs:
3159
+ case Js:
3160
3160
  return Object.is(t.valueOf(), e.valueOf());
3161
- case Hs:
3161
+ case Ks:
3162
3162
  return t.source === e.source && t.flags === e.flags;
3163
- case ta:
3163
+ case na:
3164
3164
  return t === e;
3165
3165
  }
3166
3166
  n = n ?? /* @__PURE__ */ new Map();
@@ -3170,28 +3170,27 @@ function xe(t, e, n, r) {
3170
3170
  n.set(t, e), n.set(e, t);
3171
3171
  try {
3172
3172
  switch (i) {
3173
- case Qs: {
3173
+ case Xs: {
3174
3174
  if (t.size !== e.size)
3175
3175
  return !1;
3176
3176
  for (const [c, u] of t.entries())
3177
- if (!e.has(c) || !Re(u, e.get(c), c, t, e, n, r))
3177
+ if (!e.has(c) || !Oe(u, e.get(c), c, t, e, n, r))
3178
3178
  return !1;
3179
3179
  return !0;
3180
3180
  }
3181
- case Xs: {
3181
+ case ea: {
3182
3182
  if (t.size !== e.size)
3183
3183
  return !1;
3184
3184
  const c = Array.from(t.values()), u = Array.from(e.values());
3185
3185
  for (let d = 0; d < c.length; d++) {
3186
- const m = c[d], _ = u.findIndex((S) => Re(m, S, void 0, t, e, n, r));
3186
+ const m = c[d], _ = u.findIndex((S) => Oe(m, S, void 0, t, e, n, r));
3187
3187
  if (_ === -1)
3188
3188
  return !1;
3189
3189
  u.splice(_, 1);
3190
3190
  }
3191
3191
  return !0;
3192
3192
  }
3193
- case ea:
3194
- case oa:
3193
+ case ta:
3195
3194
  case sa:
3196
3195
  case aa:
3197
3196
  case ca:
@@ -3201,19 +3200,20 @@ function xe(t, e, n, r) {
3201
3200
  case fa:
3202
3201
  case pa:
3203
3202
  case ha:
3204
- case ga: {
3203
+ case ga:
3204
+ case va: {
3205
3205
  if (typeof Buffer < "u" && Buffer.isBuffer(t) !== Buffer.isBuffer(e) || t.length !== e.length)
3206
3206
  return !1;
3207
3207
  for (let c = 0; c < t.length; c++)
3208
- if (!Re(t[c], e[c], c, t, e, n, r))
3208
+ if (!Oe(t[c], e[c], c, t, e, n, r))
3209
3209
  return !1;
3210
3210
  return !0;
3211
3211
  }
3212
- case na:
3212
+ case ra:
3213
3213
  return t.byteLength !== e.byteLength ? !1 : xe(new Uint8Array(t), new Uint8Array(e), n, r);
3214
- case ia:
3214
+ case oa:
3215
3215
  return t.byteLength !== e.byteLength || t.byteOffset !== e.byteOffset ? !1 : xe(new Uint8Array(t), new Uint8Array(e), n, r);
3216
- case ra:
3216
+ case ia:
3217
3217
  return t.name === e.name && t.message === e.message;
3218
3218
  case wt: {
3219
3219
  if (!(xe(t.constructor, e.constructor, n, r) || rt(t) && rt(e)))
@@ -3226,7 +3226,7 @@ function xe(t, e, n, r) {
3226
3226
  if (!Object.hasOwn(e, _))
3227
3227
  return !1;
3228
3228
  const b = e[_];
3229
- if (!Re(S, b, _, t, e, n, r))
3229
+ if (!Oe(S, b, _, t, e, n, r))
3230
3230
  return !1;
3231
3231
  }
3232
3232
  return !0;
@@ -3239,29 +3239,29 @@ function xe(t, e, n, r) {
3239
3239
  }
3240
3240
  }
3241
3241
  function Et(t, e) {
3242
- return ya(t, e, qs);
3242
+ return ma(t, e, Hs);
3243
3243
  }
3244
3244
  const De = h({
3245
- campaign: f(rr),
3245
+ campaign: f(ir),
3246
3246
  locale: f(l()),
3247
3247
  location: f(Gt),
3248
- page: f(ze),
3248
+ page: f(Te),
3249
3249
  screen: f(Jt),
3250
3250
  userAgent: f(l())
3251
- }), ma = g(De, {
3251
+ }), ba = g(De, {
3252
3252
  componentId: l(),
3253
3253
  experienceId: f(l()),
3254
3254
  variantIndex: f($()),
3255
3255
  sticky: f(q())
3256
- }), ba = g(De, {
3256
+ }), _a = g(De, {
3257
3257
  traits: f(Qt),
3258
3258
  userId: l()
3259
- }), _a = g(De, {
3260
- properties: f(ro(ze))
3261
3259
  }), wa = g(De, {
3260
+ properties: f(io(Te))
3261
+ }), Ea = g(De, {
3262
3262
  name: l(),
3263
3263
  properties: lt
3264
- }), Ea = g(De, {
3264
+ }), Sa = g(De, {
3265
3265
  event: l(),
3266
3266
  properties: f(K(lt, {}))
3267
3267
  }), En = {
@@ -3272,7 +3272,7 @@ const De = h({
3272
3272
  title: "",
3273
3273
  url: ""
3274
3274
  };
3275
- class Sa {
3275
+ class za {
3276
3276
  /**
3277
3277
  * Application metadata attached to each event.
3278
3278
  *
@@ -3390,7 +3390,7 @@ class Sa {
3390
3390
  * ```
3391
3391
  */
3392
3392
  buildComponentView(e) {
3393
- const { componentId: n, experienceId: r, variantIndex: i, ...o } = ma.parse(e);
3393
+ const { componentId: n, experienceId: r, variantIndex: i, ...o } = ba.parse(e);
3394
3394
  return {
3395
3395
  ...this.buildUniversalEventProperties(o),
3396
3396
  type: "component",
@@ -3448,7 +3448,7 @@ class Sa {
3448
3448
  * ```
3449
3449
  */
3450
3450
  buildIdentify(e) {
3451
- const { traits: n = {}, userId: r, ...i } = ba.parse(e);
3451
+ const { traits: n = {}, userId: r, ...i } = _a.parse(e);
3452
3452
  return {
3453
3453
  ...this.buildUniversalEventProperties(i),
3454
3454
  type: "identify",
@@ -3481,7 +3481,7 @@ class Sa {
3481
3481
  * ```
3482
3482
  */
3483
3483
  buildPageView(e = {}) {
3484
- const { properties: n = {}, ...r } = _a.parse(e), i = this.getPageProperties(), o = ge(
3484
+ const { properties: n = {}, ...r } = wa.parse(e), i = this.getPageProperties(), o = ge(
3485
3485
  {
3486
3486
  ...i,
3487
3487
  title: i.title ?? En.title
@@ -3490,7 +3490,7 @@ class Sa {
3490
3490
  ), {
3491
3491
  context: { screen: s, ...a },
3492
3492
  ...c
3493
- } = this.buildUniversalEventProperties(r), u = ur.parse(a);
3493
+ } = this.buildUniversalEventProperties(r), u = lr.parse(a);
3494
3494
  return {
3495
3495
  ...c,
3496
3496
  context: u,
@@ -3517,10 +3517,10 @@ class Sa {
3517
3517
  * ```
3518
3518
  */
3519
3519
  buildScreenView(e) {
3520
- const { name: n, properties: r, ...i } = wa.parse(e), {
3520
+ const { name: n, properties: r, ...i } = Ea.parse(e), {
3521
3521
  context: { page: o, ...s },
3522
3522
  ...a
3523
- } = this.buildUniversalEventProperties(i), c = lr.parse(s);
3523
+ } = this.buildUniversalEventProperties(i), c = dr.parse(s);
3524
3524
  return {
3525
3525
  ...a,
3526
3526
  context: c,
@@ -3546,7 +3546,7 @@ class Sa {
3546
3546
  * ```
3547
3547
  */
3548
3548
  buildTrack(e) {
3549
- const { event: n, properties: r = {}, ...i } = Ea.parse(e);
3549
+ const { event: n, properties: r = {}, ...i } = Sa.parse(e);
3550
3550
  return {
3551
3551
  ...this.buildUniversalEventProperties(i),
3552
3552
  type: "track",
@@ -3555,7 +3555,7 @@ class Sa {
3555
3555
  };
3556
3556
  }
3557
3557
  }
3558
- function za(t) {
3558
+ function Ta(t) {
3559
3559
  switch (typeof t) {
3560
3560
  case "number":
3561
3561
  case "symbol":
@@ -3564,10 +3564,10 @@ function za(t) {
3564
3564
  return t.includes(".") || t.includes("[") || t.includes("]");
3565
3565
  }
3566
3566
  }
3567
- function Ta(t) {
3567
+ function ka(t) {
3568
3568
  return typeof t == "string" || typeof t == "symbol" ? t : Object.is(t?.valueOf?.(), -0) ? "-0" : String(t);
3569
3569
  }
3570
- function ka(t) {
3570
+ function Aa(t) {
3571
3571
  const e = [], n = t.length;
3572
3572
  if (n === 0)
3573
3573
  return e;
@@ -3586,17 +3586,17 @@ function Nt(t, e, n) {
3586
3586
  if (it(e))
3587
3587
  return n;
3588
3588
  const r = t[e];
3589
- return r === void 0 ? za(e) ? Nt(t, ka(e), n) : n : r;
3589
+ return r === void 0 ? Ta(e) ? Nt(t, Aa(e), n) : n : r;
3590
3590
  }
3591
3591
  case "number":
3592
3592
  case "symbol": {
3593
- typeof e == "number" && (e = Ta(e));
3593
+ typeof e == "number" && (e = ka(e));
3594
3594
  const r = t[e];
3595
3595
  return r === void 0 ? n : r;
3596
3596
  }
3597
3597
  default: {
3598
3598
  if (Array.isArray(e))
3599
- return Aa(t, e, n);
3599
+ return $a(t, e, n);
3600
3600
  if (Object.is(e?.valueOf(), -0) ? e = "-0" : e = String(e), it(e))
3601
3601
  return n;
3602
3602
  const r = t[e];
@@ -3604,7 +3604,7 @@ function Nt(t, e, n) {
3604
3604
  }
3605
3605
  }
3606
3606
  }
3607
- function Aa(t, e, n) {
3607
+ function $a(t, e, n) {
3608
3608
  if (e.length === 0)
3609
3609
  return n;
3610
3610
  let r = t;
@@ -3629,7 +3629,7 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3629
3629
  * ```
3630
3630
  */
3631
3631
  isMergeTagEntry(t) {
3632
- return Po.safeParse(t).success;
3632
+ return Io.safeParse(t).success;
3633
3633
  },
3634
3634
  /**
3635
3635
  * Generate a list of candidate selectors for a merge-tag ID.
@@ -3697,7 +3697,7 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3697
3697
  } = t;
3698
3698
  return dt.safeParse(e).success ? Ve.getValueFromProfile(t.fields.nt_mergetag_id, e) ?? n : (Sn.warn(`${zn} no valid profile`), n);
3699
3699
  }
3700
- }, Y = P("Personalization"), Ae = "Could not resolve personalized entry variant:", ve = {
3700
+ }, Y = P("Personalization"), $e = "Could not resolve personalized entry variant:", ve = {
3701
3701
  /**
3702
3702
  * Find the personalization entry corresponding to one of the selected experiences.
3703
3703
  *
@@ -3778,7 +3778,7 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3778
3778
  if (!r && (!ht(t) || !Ke(e)))
3779
3779
  return;
3780
3780
  const i = e.fields.nt_config?.components?.filter(
3781
- (o) => Ro(o) && !o.baseline.hidden
3781
+ (o) => Oo(o) && !o.baseline.hidden
3782
3782
  ).find((o) => o.baseline.id === t.sys.id)?.variants;
3783
3783
  if (i?.length)
3784
3784
  return i.at(n - 1);
@@ -3807,12 +3807,12 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3807
3807
  personalizationEntry: t,
3808
3808
  selectedVariant: e
3809
3809
  }, n = !1) {
3810
- if (!n && (!Ke(t) || !Io(e)))
3810
+ if (!n && (!Ke(t) || !Co(e)))
3811
3811
  return;
3812
3812
  const r = t.fields.nt_variants?.find(
3813
3813
  (i) => i.sys.id === e.id
3814
3814
  );
3815
- return Ao(r) ? r : void 0;
3815
+ return $o(r) ? r : void 0;
3816
3816
  },
3817
3817
  /**
3818
3818
  * Resolve the selected entry (baseline or variant) for a personalized entry
@@ -3834,10 +3834,10 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3834
3834
  resolve(t, e) {
3835
3835
  if (Y.debug(`Resolving personalized entry for baseline entry ${t.sys.id}`), !e?.length)
3836
3836
  return Y.warn(
3837
- `${Ae} no selectedPersonalizations exist for the current profile`
3837
+ `${$e} no selectedPersonalizations exist for the current profile`
3838
3838
  ), { entry: t };
3839
3839
  if (!ht(t))
3840
- return Y.warn(`${Ae} entry ${t.sys.id} is not personalized`), { entry: t };
3840
+ return Y.warn(`${$e} entry ${t.sys.id} is not personalized`), { entry: t };
3841
3841
  const n = ve.getPersonalizationEntry(
3842
3842
  {
3843
3843
  personalizedEntry: t,
@@ -3847,7 +3847,7 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3847
3847
  );
3848
3848
  if (!n)
3849
3849
  return Y.warn(
3850
- `${Ae} could not find a personalization entry for ${t.sys.id}`
3850
+ `${$e} could not find a personalization entry for ${t.sys.id}`
3851
3851
  ), { entry: t };
3852
3852
  const r = ve.getSelectedPersonalization(
3853
3853
  {
@@ -3868,7 +3868,7 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3868
3868
  );
3869
3869
  if (!o)
3870
3870
  return Y.warn(
3871
- `${Ae} could not find a valid replacement variant entry for ${t.sys.id}`
3871
+ `${$e} could not find a valid replacement variant entry for ${t.sys.id}`
3872
3872
  ), { entry: t };
3873
3873
  const s = ve.getSelectedVariantEntry(
3874
3874
  {
@@ -3883,11 +3883,11 @@ const Sn = P("Personalization"), zn = "Could not resolve Merge Tag value:", Ve =
3883
3883
  );
3884
3884
  else
3885
3885
  return Y.warn(
3886
- `${Ae} could not find a valid replacement variant entry for ${t.sys.id}`
3886
+ `${$e} could not find a valid replacement variant entry for ${t.sys.id}`
3887
3887
  ), { entry: t };
3888
3888
  return { entry: s, personalization: r };
3889
3889
  }
3890
- }, G = _e(), D = _e(), W = _e(), on = jn(() => Ot.resolve(G.value ?? [])), Le = _e(!0), Z = _e(), k = _e();
3890
+ }, G = we(), D = we(), W = we(), on = Bn(() => Ot.resolve(G.value ?? [])), Le = we(!0), Z = we(), k = we();
3891
3891
  function U(t) {
3892
3892
  return {
3893
3893
  subscribe(e) {
@@ -3897,7 +3897,7 @@ function U(t) {
3897
3897
  }
3898
3898
  };
3899
3899
  }
3900
- const Oe = {
3900
+ const ye = {
3901
3901
  changes: G,
3902
3902
  consent: D,
3903
3903
  event: W,
@@ -3905,9 +3905,9 @@ const Oe = {
3905
3905
  online: Le,
3906
3906
  personalizations: Z,
3907
3907
  profile: k
3908
- }, $a = {
3909
- batch: ye,
3910
- computed: jn,
3908
+ }, Tn = {
3909
+ batch: me,
3910
+ computed: Bn,
3911
3911
  effect: x,
3912
3912
  untracked: Dt
3913
3913
  }, We = (t) => typeof t == "function", Pa = (t) => typeof t == "string" ? t : typeof t == "symbol" ? t.description ?? String(t) : String(t), Ia = (t) => typeof t == "string" || typeof t == "symbol", Ca = (t) => Object.prototype.toString.call(t) === "[object AsyncFunction]";
@@ -4057,7 +4057,7 @@ class Ra {
4057
4057
  }
4058
4058
  }
4059
4059
  const Oa = ["page", "identify"];
4060
- class yr {
4060
+ class mr {
4061
4061
  /**
4062
4062
  * Allow‑list of event {@link AnalyticsEventType | type keys} permitted when consent is not present.
4063
4063
  */
@@ -4083,20 +4083,20 @@ class yr {
4083
4083
  this.allowedEventTypes = i?.allowedEventTypes ?? Oa, this.api = n, this.builder = r, this.duplicationDetector = new Ra(i?.preventedComponentEvents), this.interceptors = o;
4084
4084
  }
4085
4085
  }
4086
- class mr extends yr {
4086
+ class br extends mr {
4087
4087
  }
4088
- var Ma = Object.create, br = Object.defineProperty, xa = Object.getOwnPropertyDescriptor, _r = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), wr = (t) => {
4088
+ var Ma = Object.create, _r = Object.defineProperty, xa = Object.getOwnPropertyDescriptor, wr = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), Er = (t) => {
4089
4089
  throw TypeError(t);
4090
- }, Er = (t, e, n) => e in t ? br(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Va = (t) => [, , , Ma(t?.[_r("metadata")] ?? null)], Sr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], zr = (t) => t !== void 0 && typeof t != "function" ? wr("Function expected") : t, Na = (t, e, n, r, i) => ({ kind: Sr[t], name: e, metadata: r, addInitializer: (o) => n._ ? wr("Already initialized") : i.push(zr(o || null)) }), La = (t, e) => Er(e, _r("metadata"), t[3]), ja = (t, e, n, r) => {
4090
+ }, Sr = (t, e, n) => e in t ? _r(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Va = (t) => [, , , Ma(t?.[wr("metadata")] ?? null)], zr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Tr = (t) => t !== void 0 && typeof t != "function" ? Er("Function expected") : t, Na = (t, e, n, r, i) => ({ kind: zr[t], name: e, metadata: r, addInitializer: (o) => n._ ? Er("Already initialized") : i.push(Tr(o || null)) }), La = (t, e) => Sr(e, wr("metadata"), t[3]), ja = (t, e, n, r) => {
4091
4091
  for (var i = 0, o = t[e >> 1], s = o && o.length; i < s; i++) o[i].call(n);
4092
4092
  return r;
4093
- }, Tr = (t, e, n, r, i, o) => {
4094
- for (var s, a, c, u, d = e & 7, m = !1, _ = !1, S = 2, b = Sr[d + 5], L = t[S] || (t[S] = []), I = (i = i.prototype, xa(i, n)), O = r.length - 1; O >= 0; O--)
4095
- c = Na(d, n, a = {}, t[3], L), c.static = m, c.private = _, u = c.access = { has: (te) => n in te }, u.get = (te) => te[n], s = (0, r[O])(I[b], c), a._ = 1, zr(s) && (I[b] = s);
4096
- return I && br(i, n, I), i;
4097
- }, Tn = (t, e, n) => Er(t, typeof e != "symbol" ? e + "" : e, n), kr, Ar, Lt, Ze;
4093
+ }, kr = (t, e, n, r, i, o) => {
4094
+ for (var s, a, c, u, d = e & 7, m = !1, _ = !1, S = 2, b = zr[d + 5], L = t[S] || (t[S] = []), I = (i = i.prototype, xa(i, n)), O = r.length - 1; O >= 0; O--)
4095
+ c = Na(d, n, a = {}, t[3], L), c.static = m, c.private = _, u = c.access = { has: (te) => n in te }, u.get = (te) => te[n], s = (0, r[O])(I[b], c), a._ = 1, Tr(s) && (I[b] = s);
4096
+ return I && _r(i, n, I), i;
4097
+ }, kn = (t, e, n) => Sr(t, typeof e != "symbol" ? e + "" : e, n), Ar, $r, Lt, Ze;
4098
4098
  const H = P("Analytics"), Ba = 25;
4099
- class ft extends (Lt = mr, Ar = [F("isNotDuplicated", { onBlocked: "onBlockedByDuplication" }), F("hasConsent", { onBlocked: "onBlockedByConsent" })], kr = [F("isNotDuplicated", { onBlocked: "onBlockedByDuplication" }), F("hasConsent", { onBlocked: "onBlockedByConsent" })], Lt) {
4099
+ class ft extends (Lt = br, $r = [F("isNotDuplicated", { onBlocked: "onBlockedByDuplication" }), F("hasConsent", { onBlocked: "onBlockedByConsent" })], Ar = [F("isNotDuplicated", { onBlocked: "onBlockedByDuplication" }), F("hasConsent", { onBlocked: "onBlockedByConsent" })], Lt) {
4100
4100
  /**
4101
4101
  * Create a new stateful analytics instance.
4102
4102
  *
@@ -4104,7 +4104,7 @@ class ft extends (Lt = mr, Ar = [F("isNotDuplicated", { onBlocked: "onBlockedByD
4104
4104
  */
4105
4105
  constructor(e) {
4106
4106
  const { api: n, builder: r, config: i, interceptors: o } = e;
4107
- super({ api: n, builder: r, config: i, interceptors: o }), ja(Ze, 5, this), Tn(this, "queue", /* @__PURE__ */ new Map()), Tn(this, "states", {
4107
+ super({ api: n, builder: r, config: i, interceptors: o }), ja(Ze, 5, this), kn(this, "queue", /* @__PURE__ */ new Map()), kn(this, "states", {
4108
4108
  eventStream: U(W),
4109
4109
  profile: U(k)
4110
4110
  });
@@ -4126,7 +4126,7 @@ class ft extends (Lt = mr, Ar = [F("isNotDuplicated", { onBlocked: "onBlockedByD
4126
4126
  * Reset analytics‑related signals and the last emitted event.
4127
4127
  */
4128
4128
  reset() {
4129
- ye(() => {
4129
+ me(() => {
4130
4130
  W.value = void 0, k.value = void 0;
4131
4131
  });
4132
4132
  }
@@ -4196,7 +4196,7 @@ class ft extends (Lt = mr, Ar = [F("isNotDuplicated", { onBlocked: "onBlockedByD
4196
4196
  H.warn("Attempting to emit an event without an Optimization profile");
4197
4197
  return;
4198
4198
  }
4199
- const r = await this.interceptors.event.run(e), i = pr.parse(r);
4199
+ const r = await this.interceptors.event.run(e), i = hr.parse(r);
4200
4200
  H.debug(`Queueing ${i.type} event for profile ${n.id}`, i);
4201
4201
  const o = this.queue.get(n);
4202
4202
  W.value = i, o ? o.push(i) : this.queue.set(n, [i]), await this.flushMaxEvents();
@@ -4221,11 +4221,11 @@ class ft extends (Lt = mr, Ar = [F("isNotDuplicated", { onBlocked: "onBlockedByD
4221
4221
  }
4222
4222
  }
4223
4223
  Ze = Va(Lt);
4224
- Tr(Ze, 1, "trackComponentView", Ar, ft);
4225
- Tr(Ze, 1, "trackFlagView", kr, ft);
4224
+ kr(Ze, 1, "trackComponentView", $r, ft);
4225
+ kr(Ze, 1, "trackFlagView", Ar, ft);
4226
4226
  La(Ze, ft);
4227
- const kn = P("Analytics");
4228
- class Ua extends mr {
4227
+ const An = P("Analytics");
4228
+ class Ua extends br {
4229
4229
  /**
4230
4230
  * Build, intercept, validate, and send a component view event.
4231
4231
  *
@@ -4234,8 +4234,8 @@ class Ua extends mr {
4234
4234
  * @returns A promise that resolves once the batch has been sent.
4235
4235
  */
4236
4236
  async trackComponentView(e) {
4237
- kn.info('Processing "component view" event');
4238
- const { profile: n, ...r } = e, i = this.builder.buildComponentView(r), o = await this.interceptors.event.run(i), s = be.parse(o);
4237
+ An.info('Processing "component view" event');
4238
+ const { profile: n, ...r } = e, i = this.builder.buildComponentView(r), o = await this.interceptors.event.run(i), s = _e.parse(o);
4239
4239
  await this.sendBatchEvent(s, n);
4240
4240
  }
4241
4241
  /**
@@ -4246,8 +4246,8 @@ class Ua extends mr {
4246
4246
  * @returns A promise that resolves once the batch has been sent.
4247
4247
  */
4248
4248
  async trackFlagView(e) {
4249
- kn.debug('Processing "flag view" event');
4250
- const { profile: n, ...r } = e, i = this.builder.buildFlagView(r), o = await this.interceptors.event.run(i), s = be.parse(o);
4249
+ An.debug('Processing "flag view" event');
4250
+ const { profile: n, ...r } = e, i = this.builder.buildFlagView(r), o = await this.interceptors.event.run(i), s = _e.parse(o);
4251
4251
  await this.sendBatchEvent(s, n);
4252
4252
  }
4253
4253
  /**
@@ -4259,7 +4259,7 @@ class Ua extends mr {
4259
4259
  * @internal
4260
4260
  */
4261
4261
  async sendBatchEvent(e, n) {
4262
- const r = hr.parse([
4262
+ const r = gr.parse([
4263
4263
  {
4264
4264
  profile: n,
4265
4265
  events: [e]
@@ -4268,8 +4268,8 @@ class Ua extends mr {
4268
4268
  await this.api.insights.sendBatchEvents(r);
4269
4269
  }
4270
4270
  }
4271
- const Da = "0.1.0-alpha4", Ye = "ctfl-opt-aid", St = "__ctfl_opt_anonymous_id__", zt = "__ctfl_opt_consent__", Tt = "__ctfl_opt_changes__", kt = "__ctfl_opt_debug__", At = "__ctfl_opt_profile__", $t = "__ctfl_opt_personalizations__", An = "ntaid", $n = "__nt_anonymous_id__";
4272
- class Pn {
4271
+ const Da = "0.1.0-alpha6", Ye = "ctfl-opt-aid", St = "__ctfl_opt_anonymous_id__", zt = "__ctfl_opt_consent__", Tt = "__ctfl_opt_changes__", kt = "__ctfl_opt_debug__", At = "__ctfl_opt_profile__", $t = "__ctfl_opt_personalizations__", $n = "ntaid", Pn = "__nt_anonymous_id__";
4272
+ class In {
4273
4273
  /**
4274
4274
  * The registry of interceptors keyed by their insertion id.
4275
4275
  *
@@ -4368,7 +4368,7 @@ class Pn {
4368
4368
  return r;
4369
4369
  }
4370
4370
  }
4371
- class $r {
4371
+ class Pr {
4372
4372
  /** Shared Optimization API client instance. */
4373
4373
  api;
4374
4374
  /** Shared event builder instance. */
@@ -4376,8 +4376,8 @@ class $r {
4376
4376
  /** Resolved core configuration (minus any name metadata). */
4377
4377
  config;
4378
4378
  interceptors = {
4379
- event: new Pn(),
4380
- state: new Pn()
4379
+ event: new In(),
4380
+ state: new In()
4381
4381
  };
4382
4382
  /**
4383
4383
  * Create the core with API client and logging preconfigured.
@@ -4391,14 +4391,14 @@ class $r {
4391
4391
  constructor(e) {
4392
4392
  this.config = e;
4393
4393
  const { analytics: n, personalization: r, eventBuilder: i, logLevel: o, environment: s, clientId: a } = e;
4394
- oe.addSink(new vs(o));
4394
+ oe.addSink(new ys(o));
4395
4395
  const c = {
4396
4396
  ...n,
4397
4397
  ...r,
4398
4398
  clientId: a,
4399
4399
  environment: s
4400
4400
  };
4401
- this.api = new Fs(c), this.eventBuilder = new Sa(
4401
+ this.api = new qs(c), this.eventBuilder = new za(
4402
4402
  i ?? {
4403
4403
  channel: "server",
4404
4404
  library: { name: "Optimization Core", version: Da }
@@ -4508,7 +4508,7 @@ class $r {
4508
4508
  await this.analytics.trackFlagView(e, n);
4509
4509
  }
4510
4510
  }
4511
- class Pr extends yr {
4511
+ class Ir extends mr {
4512
4512
  /**
4513
4513
  * Static {@link FlagsResolver | resolver} for evaluating personalized
4514
4514
  * custom flags.
@@ -4571,18 +4571,18 @@ class Pr extends yr {
4571
4571
  return Ve.resolve(e, n);
4572
4572
  }
4573
4573
  }
4574
- var Za = Object.create, Ir = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, Cr = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), Rr = (t) => {
4574
+ var Za = Object.create, Cr = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, Rr = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), Or = (t) => {
4575
4575
  throw TypeError(t);
4576
- }, Or = (t, e, n) => e in t ? Ir(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, qa = (t) => [, , , Za(t?.[Cr("metadata")] ?? null)], Mr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], xr = (t) => t !== void 0 && typeof t != "function" ? Rr("Function expected") : t, Ha = (t, e, n, r, i) => ({ kind: Mr[t], name: e, metadata: r, addInitializer: (o) => n._ ? Rr("Already initialized") : i.push(xr(o || null)) }), Ka = (t, e) => Or(e, Cr("metadata"), t[3]), Wa = (t, e, n, r) => {
4576
+ }, Mr = (t, e, n) => e in t ? Cr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, qa = (t) => [, , , Za(t?.[Rr("metadata")] ?? null)], xr = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Vr = (t) => t !== void 0 && typeof t != "function" ? Or("Function expected") : t, Ha = (t, e, n, r, i) => ({ kind: xr[t], name: e, metadata: r, addInitializer: (o) => n._ ? Or("Already initialized") : i.push(Vr(o || null)) }), Ka = (t, e) => Mr(e, Rr("metadata"), t[3]), Wa = (t, e, n, r) => {
4577
4577
  for (var i = 0, o = t[e >> 1], s = o && o.length; i < s; i++) o[i].call(n);
4578
4578
  return r;
4579
4579
  }, Fe = (t, e, n, r, i, o) => {
4580
- for (var s, a, c, u, d = e & 7, m = !1, _ = !1, S = 2, b = Mr[d + 5], L = t[S] || (t[S] = []), I = (i = i.prototype, Fa(i, n)), O = r.length - 1; O >= 0; O--)
4581
- c = Ha(d, n, a = {}, t[3], L), c.static = m, c.private = _, u = c.access = { has: (te) => n in te }, u.get = (te) => te[n], s = (0, r[O])(I[b], c), a._ = 1, xr(s) && (I[b] = s);
4582
- return I && Ir(i, n, I), i;
4583
- }, Pt = (t, e, n) => Or(t, typeof e != "symbol" ? e + "" : e, n), Vr, Nr, Lr, jr, Br, jt, ee;
4580
+ for (var s, a, c, u, d = e & 7, m = !1, _ = !1, S = 2, b = xr[d + 5], L = t[S] || (t[S] = []), I = (i = i.prototype, Fa(i, n)), O = r.length - 1; O >= 0; O--)
4581
+ c = Ha(d, n, a = {}, t[3], L), c.static = m, c.private = _, u = c.access = { has: (te) => n in te }, u.get = (te) => te[n], s = (0, r[O])(I[b], c), a._ = 1, Vr(s) && (I[b] = s);
4582
+ return I && Cr(i, n, I), i;
4583
+ }, Pt = (t, e, n) => Mr(t, typeof e != "symbol" ? e + "" : e, n), Nr, Lr, jr, Br, Ur, jt, ee;
4584
4584
  const M = P("Personalization");
4585
- class le extends (jt = Pr, Br = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], jr = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], Lr = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], Nr = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], Vr = [F("isNotDuplicated", { onBlocked: "onBlockedByDuplication" }), F("hasConsent", { onBlocked: "onBlockedByConsent" })], jt) {
4585
+ class le extends (jt = Ir, Ur = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], Br = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], jr = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], Lr = [F("hasConsent", { onBlocked: "onBlockedByConsent" })], Nr = [F("isNotDuplicated", { onBlocked: "onBlockedByDuplication" }), F("hasConsent", { onBlocked: "onBlockedByConsent" })], jt) {
4586
4586
  /**
4587
4587
  * Create a new stateful personalization instance.
4588
4588
  *
@@ -4603,7 +4603,7 @@ class le extends (jt = Pr, Br = [F("hasConsent", { onBlocked: "onBlockedByConsen
4603
4603
  personalizations: u,
4604
4604
  profile: d
4605
4605
  } = s;
4606
- ye(() => {
4606
+ me(() => {
4607
4607
  G.value = c, Z.value = u, k.value = d;
4608
4608
  });
4609
4609
  }
@@ -4635,7 +4635,7 @@ class le extends (jt = Pr, Br = [F("hasConsent", { onBlocked: "onBlockedByConsen
4635
4635
  * Clears `changes`, `profile`, and selected `personalizations`.
4636
4636
  */
4637
4637
  reset() {
4638
- ye(() => {
4638
+ me(() => {
4639
4639
  G.value = void 0, W.value = void 0, k.value = void 0, Z.value = void 0;
4640
4640
  });
4641
4641
  }
@@ -4759,7 +4759,7 @@ class le extends (jt = Pr, Br = [F("hasConsent", { onBlocked: "onBlockedByConsen
4759
4759
  * @param event - The event to enqueue.
4760
4760
  */
4761
4761
  async sendOrEnqueueEvent(e) {
4762
- const n = await this.interceptors.event.run(e), r = dr.parse(n);
4762
+ const n = await this.interceptors.event.run(e), r = fr.parse(n);
4763
4763
  if (W.value = r, Le.value) return await this.upsertProfile([r]);
4764
4764
  M.debug(`Queueing ${r.type} event`, r), this.offlineQueue.add(r);
4765
4765
  }
@@ -4798,20 +4798,20 @@ class le extends (jt = Pr, Br = [F("hasConsent", { onBlocked: "onBlockedByConsen
4798
4798
  */
4799
4799
  async updateOutputSignals(e) {
4800
4800
  const n = await this.interceptors.state.run(e), { changes: r, personalizations: i, profile: o } = n;
4801
- ye(() => {
4801
+ me(() => {
4802
4802
  Et(G.value, r) || (G.value = r), Et(k.value, o) || (k.value = o), Et(Z.value, i) || (Z.value = i);
4803
4803
  });
4804
4804
  }
4805
4805
  }
4806
4806
  ee = qa(jt);
4807
- Fe(ee, 1, "identify", Br, le);
4808
- Fe(ee, 1, "page", jr, le);
4809
- Fe(ee, 1, "screen", Lr, le);
4810
- Fe(ee, 1, "track", Nr, le);
4811
- Fe(ee, 1, "trackComponentView", Vr, le);
4807
+ Fe(ee, 1, "identify", Ur, le);
4808
+ Fe(ee, 1, "page", Br, le);
4809
+ Fe(ee, 1, "screen", jr, le);
4810
+ Fe(ee, 1, "track", Lr, le);
4811
+ Fe(ee, 1, "trackComponentView", Nr, le);
4812
4812
  Ka(ee, le);
4813
- const $e = P("Personalization");
4814
- class Ya extends Pr {
4813
+ const Pe = P("Personalization");
4814
+ class Ya extends Ir {
4815
4815
  /**
4816
4816
  * Identify the current profile/visitor to associate traits with a profile.
4817
4817
  *
@@ -4820,7 +4820,7 @@ class Ya extends Pr {
4820
4820
  * @returns The resulting {@link OptimizationData} for the identified user.
4821
4821
  */
4822
4822
  async identify(e) {
4823
- $e.info('Sending "identify" event');
4823
+ Pe.info('Sending "identify" event');
4824
4824
  const { profile: n, ...r } = e, i = en.parse(this.builder.buildIdentify(r));
4825
4825
  return await this.upsertProfile(i, n);
4826
4826
  }
@@ -4831,7 +4831,7 @@ class Ya extends Pr {
4831
4831
  * @returns The evaluated {@link OptimizationData} for this page view.
4832
4832
  */
4833
4833
  async page(e) {
4834
- $e.info('Sending "page" event');
4834
+ Pe.info('Sending "page" event');
4835
4835
  const { profile: n, ...r } = e, i = tn.parse(this.builder.buildPageView(r));
4836
4836
  return await this.upsertProfile(i, n);
4837
4837
  }
@@ -4842,7 +4842,7 @@ class Ya extends Pr {
4842
4842
  * @returns The evaluated {@link OptimizationData} for this screen view.
4843
4843
  */
4844
4844
  async screen(e) {
4845
- $e.info(`Sending "screen" event for "${e.name}"`);
4845
+ Pe.info(`Sending "screen" event for "${e.name}"`);
4846
4846
  const { profile: n, ...r } = e, i = nn.parse(this.builder.buildScreenView(r));
4847
4847
  return await this.upsertProfile(i, n);
4848
4848
  }
@@ -4853,7 +4853,7 @@ class Ya extends Pr {
4853
4853
  * @returns The evaluated {@link OptimizationData} for this event.
4854
4854
  */
4855
4855
  async track(e) {
4856
- $e.info(`Sending "track" event "${e.event}"`);
4856
+ Pe.info(`Sending "track" event "${e.event}"`);
4857
4857
  const { profile: n, ...r } = e, i = rn.parse(this.builder.buildTrack(r));
4858
4858
  return await this.upsertProfile(i, n);
4859
4859
  }
@@ -4864,8 +4864,8 @@ class Ya extends Pr {
4864
4864
  * @returns The evaluated {@link OptimizationData} for this component view.
4865
4865
  */
4866
4866
  async trackComponentView(e) {
4867
- $e.info('Sending "track personalization" event');
4868
- const { profile: n, ...r } = e, i = be.parse(this.builder.buildComponentView(r));
4867
+ Pe.info('Sending "track personalization" event');
4868
+ const { profile: n, ...r } = e, i = _e.parse(this.builder.buildComponentView(r));
4869
4869
  return await this.upsertProfile(i, n);
4870
4870
  }
4871
4871
  /**
@@ -4886,7 +4886,7 @@ class Ya extends Pr {
4886
4886
  });
4887
4887
  }
4888
4888
  }
4889
- class Ga extends $r {
4889
+ class Ga extends Pr {
4890
4890
  /** Stateful analytics product. */
4891
4891
  analytics;
4892
4892
  /** Stateful personalization product. */
@@ -4961,7 +4961,7 @@ class Ga extends $r {
4961
4961
  * consequence of the current shared-state design.
4962
4962
  */
4963
4963
  reset() {
4964
- ye(() => {
4964
+ me(() => {
4965
4965
  W.value = void 0, G.value = void 0, k.value = void 0, Z.value = void 0;
4966
4966
  });
4967
4967
  }
@@ -5000,10 +5000,10 @@ class Ga extends $r {
5000
5000
  * Direct signal access allows immediate state updates without API calls.
5001
5001
  */
5002
5002
  registerPreviewPanel(e) {
5003
- e.signals = Oe, e.signalFns = $a;
5003
+ return e && (e.signals = ye, e.signalFns = Tn), { signals: ye, signalFns: Tn };
5004
5004
  }
5005
5005
  }
5006
- class kc extends $r {
5006
+ class kc extends Pr {
5007
5007
  /** Stateless analytics product. */
5008
5008
  analytics;
5009
5009
  /** Stateless personalization product. */
@@ -5112,7 +5112,7 @@ function je(t) {
5112
5112
  } = t;
5113
5113
  return typeof n == "string" && n.trim().length > 0;
5114
5114
  }
5115
- function In(t) {
5115
+ function Cn(t) {
5116
5116
  return !t || typeof t != "object" ? !1 : "entryId" in t && typeof t.entryId == "string" && !!t.entryId.trim().length;
5117
5117
  }
5118
5118
  function Qa(t) {
@@ -5124,9 +5124,9 @@ function Xa(t) {
5124
5124
  return Number.isSafeInteger(e) ? e : void 0;
5125
5125
  }
5126
5126
  const ec = (t) => async (e, n) => {
5127
- if (!In(n.data) && !je(e)) return;
5127
+ if (!Cn(n.data) && !je(e)) return;
5128
5128
  let r, i, o, s, a;
5129
- if (In(n.data))
5129
+ if (Cn(n.data))
5130
5130
  ({
5131
5131
  data: { duplicationScope: r, entryId: i, personalizationId: o, sticky: s, variantIndex: a }
5132
5132
  } = n);
@@ -5159,7 +5159,7 @@ const ec = (t) => async (e, n) => {
5159
5159
  r
5160
5160
  );
5161
5161
  };
5162
- function Cn(t) {
5162
+ function Rn(t) {
5163
5163
  if (je(t)) return t;
5164
5164
  const e = t.querySelector("[data-ctfl-entry-id]") ?? void 0;
5165
5165
  return je(e) ? e : void 0;
@@ -5167,13 +5167,13 @@ function Cn(t) {
5167
5167
  const tc = (t, e = !1) => ({
5168
5168
  onRemoved: (n) => {
5169
5169
  n.forEach((r) => {
5170
- const i = Cn(r);
5170
+ const i = Rn(r);
5171
5171
  !i || !t.getStats(i) || (Ut.info("Auto-unobserving element (remove):", i), t.unobserve(i));
5172
5172
  });
5173
5173
  },
5174
5174
  onAdded: e ? (n) => {
5175
5175
  n.forEach((r) => {
5176
- const i = Cn(r);
5176
+ const i = Rn(r);
5177
5177
  i && (Ut.info("Auto-observing element (add):", i), t.observe(i));
5178
5178
  });
5179
5179
  } : void 0
@@ -5213,7 +5213,7 @@ function oc() {
5213
5213
  function sc() {
5214
5214
  return navigator.userAgent;
5215
5215
  }
5216
- const ac = "0.1.0-alpha4", V = typeof window < "u" && typeof document < "u" && typeof document.addEventListener == "function";
5216
+ const ac = "0.1.0-alpha6", V = typeof window < "u" && typeof document < "u" && typeof document.addEventListener == "function";
5217
5217
  function cc(t, e) {
5218
5218
  const n = new Blob([JSON.stringify(e)], {
5219
5219
  type: "text/plain"
@@ -5269,7 +5269,7 @@ function fc(t) {
5269
5269
  document.removeEventListener("visibilitychange", i), window.removeEventListener("pagehide", o), window.removeEventListener("pageshow", s);
5270
5270
  };
5271
5271
  }
5272
- const Pe = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), Ie = () => V ? document.visibilityState === "visible" : !0, se = {
5272
+ const Ie = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now(), Ce = () => V ? document.visibilityState === "visible" : !0, se = {
5273
5273
  /** Default dwell time in ms before firing. */
5274
5274
  DWELL_MS: 1e3,
5275
5275
  /** Default minimum intersection ratio considered visible. */
@@ -5303,7 +5303,7 @@ const Pe = () => typeof performance < "u" && typeof performance.now == "function
5303
5303
  if (e) return e;
5304
5304
  }
5305
5305
  return t.strongRef ?? null;
5306
- }, Rn = 100, On = 250, hc = 16, gc = 1, vc = V && typeof MutationObserver < "u", Mn = V && typeof window.requestIdleCallback == "function", yc = V && typeof window.cancelIdleCallback == "function";
5306
+ }, On = 100, Mn = 250, hc = 16, gc = 1, vc = V && typeof MutationObserver < "u", xn = V && typeof window.requestIdleCallback == "function", yc = V && typeof window.cancelIdleCallback == "function";
5307
5307
  class B {
5308
5308
  observer;
5309
5309
  root;
@@ -5325,8 +5325,8 @@ class B {
5325
5325
  constructor(e = {}) {
5326
5326
  const {
5327
5327
  root: n,
5328
- idleTimeoutMs: r = Rn,
5329
- maxChunk: i = On,
5328
+ idleTimeoutMs: r = On,
5329
+ maxChunk: i = Mn,
5330
5330
  onChange: o,
5331
5331
  onAdded: s,
5332
5332
  onRemoved: a,
@@ -5334,9 +5334,9 @@ class B {
5334
5334
  } = e;
5335
5335
  this.root = B.isNode(n) ? n : V ? document : null, this.idleTimeoutMs = B.sanitizeInt(
5336
5336
  r,
5337
- Rn,
5337
+ On,
5338
5338
  hc
5339
- ), this.maxChunk = B.sanitizeInt(i, On, gc), this.onChange = o, this.onAdded = s, this.onRemoved = a, this.onError = c, vc && this.root && (this.observer = new MutationObserver((u) => {
5339
+ ), this.maxChunk = B.sanitizeInt(i, Mn, gc), this.onChange = o, this.onAdded = s, this.onRemoved = a, this.onError = c, vc && this.root && (this.observer = new MutationObserver((u) => {
5340
5340
  for (const d of u)
5341
5341
  (d.addedNodes.length > 0 || d.removedNodes.length > 0) && this.pendingRecords.push(d);
5342
5342
  this.pendingRecords.length > 0 && this.scheduleProcess();
@@ -5375,7 +5375,7 @@ class B {
5375
5375
  const e = () => {
5376
5376
  this.idleHandle = null, this.scheduled = !1, this.processNow();
5377
5377
  };
5378
- this.idleHandle = Mn ? window.requestIdleCallback(e, { timeout: this.idleTimeoutMs }) : window.setTimeout(e, this.idleTimeoutMs);
5378
+ this.idleHandle = xn ? window.requestIdleCallback(e, { timeout: this.idleTimeoutMs }) : window.setTimeout(e, this.idleTimeoutMs);
5379
5379
  }
5380
5380
  /**
5381
5381
  * Process all currently pending mutation records immediately.
@@ -5483,7 +5483,7 @@ class B {
5483
5483
  const i = () => {
5484
5484
  if (!this.isActive()) return;
5485
5485
  const o = Math.min(e.length, r + this.maxChunk), s = e.slice(r, o);
5486
- r = o, this.safeCall(() => n(s)), r < e.length && (Mn ? window.requestIdleCallback(i, { timeout: this.idleTimeoutMs }) : V && window.setTimeout(i, this.idleTimeoutMs));
5486
+ r = o, this.safeCall(() => n(s)), r < e.length && (xn ? window.requestIdleCallback(i, { timeout: this.idleTimeoutMs }) : V && window.setTimeout(i, this.idleTimeoutMs));
5487
5487
  };
5488
5488
  i();
5489
5489
  }
@@ -5624,7 +5624,7 @@ class Ne {
5624
5624
  * Handle page visibility changes by pausing/resuming timers and retries.
5625
5625
  */
5626
5626
  onPageVisibilityChange() {
5627
- const e = Pe(), n = !Ie();
5627
+ const e = Ie(), n = !Ce();
5628
5628
  for (const r of this.activeStates)
5629
5629
  n ? Ne.onHidden(r, e) : this.onResume(r, e);
5630
5630
  this.sweepOrphans();
@@ -5653,11 +5653,11 @@ class Ne {
5653
5653
  * visibility state.
5654
5654
  */
5655
5655
  onIntersect(e) {
5656
- const n = Pe();
5656
+ const n = Ie();
5657
5657
  for (const r of e) {
5658
5658
  const i = this.states.get(r.target);
5659
5659
  if (!i || i.done) continue;
5660
- r.isIntersecting && r.intersectionRatio >= this.opts.minVisibleRatio && Ie() ? this.onVisible(i, n) : Ne.onNotVisible(i, n);
5660
+ r.isIntersecting && r.intersectionRatio >= this.opts.minVisibleRatio && Ce() ? this.onVisible(i, n) : Ne.onNotVisible(i, n);
5661
5661
  }
5662
5662
  this.sweepOrphans();
5663
5663
  }
@@ -5689,14 +5689,14 @@ class Ne {
5689
5689
  return;
5690
5690
  }
5691
5691
  e.fireTimer = setTimeout(() => {
5692
- !e.done && e.lastKnownVisible && Ie() ? this.trigger(e) : re(e);
5692
+ !e.done && e.lastKnownVisible && Ce() ? this.trigger(e) : re(e);
5693
5693
  }, Math.ceil(i));
5694
5694
  }
5695
5695
  /**
5696
5696
  * Schedule a retry attempt after a delay, if the element is currently visible.
5697
5697
  */
5698
5698
  scheduleRetry(e, n) {
5699
- e.pendingRetry = !0, e.retryDelayMs = Math.max(0, Math.ceil(n)), !(!Ie() || !e.lastKnownVisible || e.done || e.inFlight) && (e.retryScheduledAt = Pe(), e.retryTimer = setTimeout(() => {
5699
+ e.pendingRetry = !0, e.retryDelayMs = Math.max(0, Math.ceil(n)), !(!Ce() || !e.lastKnownVisible || e.done || e.inFlight) && (e.retryScheduledAt = Ie(), e.retryTimer = setTimeout(() => {
5700
5700
  e.retryTimer = null, e.retryScheduledAt = null, this.attemptCallback(e);
5701
5701
  }, e.retryDelayMs));
5702
5702
  }
@@ -5706,7 +5706,7 @@ class Ne {
5706
5706
  */
5707
5707
  trigger(e) {
5708
5708
  if (e.done || e.inFlight) return;
5709
- const n = Pe(), r = e.accumulatedMs + (e.visibleSince !== null ? n - e.visibleSince : 0);
5709
+ const n = Ie(), r = e.accumulatedMs + (e.visibleSince !== null ? n - e.visibleSince : 0);
5710
5710
  ie(e), e.pendingRetry = !1, re(e), this.attemptCallback(e, r);
5711
5711
  }
5712
5712
  /**
@@ -5724,7 +5724,7 @@ class Ne {
5724
5724
  }
5725
5725
  const i = e.attempts + 1;
5726
5726
  e.attempts = i, e.inFlight = !0;
5727
- const o = n ?? e.accumulatedMs + (e.visibleSince !== null ? Pe() - e.visibleSince : 0);
5727
+ const o = n ?? e.accumulatedMs + (e.visibleSince !== null ? Ie() - e.visibleSince : 0);
5728
5728
  try {
5729
5729
  await this.callback(r, { totalVisibleMs: o, attempts: i, data: e.data }), this.onAttemptSuccess(e, r);
5730
5730
  } catch {
@@ -5748,7 +5748,7 @@ class Ne {
5748
5748
  return;
5749
5749
  }
5750
5750
  const n = e.opts.retryBackoffMs * Math.pow(e.opts.backoffMultiplier, e.attempts - 1), r = pc(n);
5751
- if (!e.lastKnownVisible || !Ie()) {
5751
+ if (!e.lastKnownVisible || !Ce()) {
5752
5752
  e.pendingRetry = !0, e.retryDelayMs = Math.ceil(r), e.retryScheduledAt = null;
5753
5753
  return;
5754
5754
  }
@@ -5836,8 +5836,8 @@ const w = {
5836
5836
  * Anonymous identifier currently stored in localStorage, if any.
5837
5837
  */
5838
5838
  get anonymousId() {
5839
- const t = localStorage.getItem($n);
5840
- return t && localStorage.removeItem($n), t ?? localStorage.getItem(St) ?? void 0;
5839
+ const t = localStorage.getItem(Pn);
5840
+ return t && localStorage.removeItem(Pn), t ?? localStorage.getItem(St) ?? void 0;
5841
5841
  },
5842
5842
  /**
5843
5843
  * Set or clear the anonymous identifier.
@@ -5892,7 +5892,7 @@ const w = {
5892
5892
  * Cached Custom Flags change array, if present.
5893
5893
  */
5894
5894
  get changes() {
5895
- return w.getCache(Tt, sr);
5895
+ return w.getCache(Tt, ar);
5896
5896
  },
5897
5897
  /**
5898
5898
  * Cache a new change array or clear it.
@@ -5920,7 +5920,7 @@ const w = {
5920
5920
  * Cached selected personalizations, if present.
5921
5921
  */
5922
5922
  get personalizations() {
5923
- return w.getCache($t, fr);
5923
+ return w.getCache($t, pr);
5924
5924
  },
5925
5925
  /**
5926
5926
  * Cache new selected personalizations or clear them.
@@ -6039,7 +6039,7 @@ class Ac extends Ga {
6039
6039
  throw new Error("Optimization is already initialized");
6040
6040
  const { autoTrackEntryViews: n, ...r } = e, i = bc(r);
6041
6041
  super(i);
6042
- const o = pe.get(An), s = o ?? pe.get(Ye);
6042
+ const o = pe.get($n), s = o ?? pe.get(Ye);
6043
6043
  this.autoTrackEntryViews = !0, this.cookieAttributes = {
6044
6044
  domain: i.cookie?.domain,
6045
6045
  expires: i.cookie?.expires ?? mc
@@ -6050,22 +6050,22 @@ class Ac extends Ga {
6050
6050
  }), x(() => {
6051
6051
  const {
6052
6052
  changes: { value: a }
6053
- } = Oe;
6053
+ } = ye;
6054
6054
  w.changes = a;
6055
6055
  }), x(() => {
6056
6056
  const {
6057
6057
  consent: { value: a }
6058
- } = Oe;
6058
+ } = ye;
6059
6059
  this.autoTrackEntryViews && (a ? this.startAutoTrackingEntryViews() : this.stopAutoTrackingEntryViews()), w.consent = a;
6060
6060
  }), x(() => {
6061
6061
  const {
6062
6062
  profile: { value: a }
6063
- } = Oe;
6063
+ } = ye;
6064
6064
  w.profile = a, this.setAnonymousId(a?.id);
6065
6065
  }), x(() => {
6066
6066
  const {
6067
6067
  personalizations: { value: a }
6068
- } = Oe;
6068
+ } = ye;
6069
6069
  w.personalizations = a;
6070
6070
  }), this.initializeFromCookieValues(s, o), typeof window < "u" && (window.optimization ??= this);
6071
6071
  }
@@ -6079,7 +6079,7 @@ class Ac extends Ga {
6079
6079
  * in-memory value.
6080
6080
  */
6081
6081
  initializeFromCookieValues(e, n) {
6082
- n && pe.remove(An), e && e !== w.anonymousId && (this.reset(), this.setAnonymousId(e));
6082
+ n && pe.remove($n), e && e !== w.anonymousId && (this.reset(), this.setAnonymousId(e));
6083
6083
  }
6084
6084
  /**
6085
6085
  * Persist (or clear) the anonymous ID in both cookies and {@link LocalStore}.
@@ -6185,110 +6185,110 @@ class Ac extends Ga {
6185
6185
  }
6186
6186
  export {
6187
6187
  Ye as ANONYMOUS_ID_COOKIE,
6188
- An as ANONYMOUS_ID_COOKIE_LEGACY,
6188
+ $n as ANONYMOUS_ID_COOKIE_LEGACY,
6189
6189
  St as ANONYMOUS_ID_KEY,
6190
- $n as ANONYMOUS_ID_KEY_LEGACY,
6191
- ar as AliasEvent,
6190
+ Pn as ANONYMOUS_ID_KEY_LEGACY,
6191
+ cr as AliasEvent,
6192
6192
  ft as AnalyticsStateful,
6193
6193
  Ua as AnalyticsStateless,
6194
- Fs as ApiClient,
6195
- Do as App,
6196
- nr as AudienceEntry,
6197
- $o as AudienceEntryFields,
6194
+ qs as ApiClient,
6195
+ Zo as App,
6196
+ rr as AudienceEntry,
6197
+ Po as AudienceEntryFields,
6198
6198
  _c as AudienceEntrySkeleton,
6199
- Go as BatchExperienceData,
6200
- ns as BatchExperienceEvent,
6199
+ Jo as BatchExperienceData,
6200
+ rs as BatchExperienceEvent,
6201
6201
  zc as BatchExperienceEventArray,
6202
- Jo as BatchExperienceResponse,
6203
- as as BatchInsightsEvent,
6204
- hr as BatchInsightsEventArray,
6202
+ Qo as BatchExperienceResponse,
6203
+ cs as BatchInsightsEvent,
6204
+ gr as BatchInsightsEventArray,
6205
6205
  V as CAN_ADD_LISTENERS,
6206
6206
  Tt as CHANGES_CACHE_KEY,
6207
6207
  zt as CONSENT_KEY,
6208
- rr as Campaign,
6209
- ts as Change,
6210
- sr as ChangeArray,
6211
- Qo as ChangeType,
6212
- Zo as Channel,
6213
- be as ComponentViewEvent,
6214
- vs as ConsoleLogSink,
6215
- Eo as ContentTypeLink,
6208
+ ir as Campaign,
6209
+ ns as Change,
6210
+ ar as ChangeArray,
6211
+ Xo as ChangeType,
6212
+ Fo as Channel,
6213
+ _e as ComponentViewEvent,
6214
+ ys as ConsoleLogSink,
6215
+ So as ContentTypeLink,
6216
6216
  Ga as CoreStateful,
6217
6217
  kc as CoreStateless,
6218
6218
  Ue as CtflEntry,
6219
6219
  kt as DEBUG_FLAG_KEY,
6220
6220
  En as DEFAULT_PAGE_PROPERTIES,
6221
- Fo as Dictionary,
6222
- Bs as EXPERIENCE_BASE_URL,
6221
+ qo as Dictionary,
6222
+ Us as EXPERIENCE_BASE_URL,
6223
6223
  ut as EntryFields,
6224
- Co as EntryReplacementComponent,
6224
+ Ro as EntryReplacementComponent,
6225
6225
  xt as EntryReplacementVariant,
6226
- tr as EntrySys,
6227
- So as EnvironmentLink,
6228
- Sa as EventBuilder,
6229
- os as ExperienceData,
6230
- dr as ExperienceEvent,
6226
+ nr as EntrySys,
6227
+ zo as EnvironmentLink,
6228
+ za as EventBuilder,
6229
+ ss as ExperienceData,
6230
+ fr as ExperienceEvent,
6231
6231
  Qe as ExperienceEventArray,
6232
6232
  Tc as ExperienceRequestData,
6233
- rs as ExperienceRequestOptions,
6233
+ is as ExperienceRequestOptions,
6234
6234
  gt as ExperienceResponse,
6235
6235
  Ot as FlagsResolver,
6236
6236
  Gt as GeoLocation,
6237
- cr as GroupEvent,
6238
- Ds as INSIGHTS_BASE_URL,
6237
+ ur as GroupEvent,
6238
+ Zs as INSIGHTS_BASE_URL,
6239
6239
  en as IdentifyEvent,
6240
- Mo as InlineVariableComponent,
6241
- Oo as InlineVariableComponentValueType,
6240
+ xo as InlineVariableComponent,
6241
+ Mo as InlineVariableComponentValueType,
6242
6242
  fn as InlineVariableVariant,
6243
- pr as InsightsEvent,
6244
- ss as InsightsEventArray,
6245
- Pn as InterceptorManager,
6246
- Ko as Library,
6247
- wo as Link,
6248
- fs as LogSink,
6249
- ds as Logger,
6250
- Po as MergeTagEntry,
6243
+ hr as InsightsEvent,
6244
+ as as InsightsEventArray,
6245
+ In as InterceptorManager,
6246
+ Wo as Library,
6247
+ Eo as Link,
6248
+ ps as LogSink,
6249
+ fs as Logger,
6250
+ Io as MergeTagEntry,
6251
6251
  Ve as MergeTagValueResolver,
6252
6252
  Da as OPTIMIZATION_CORE_SDK_VERSION,
6253
6253
  ac as OPTIMIZATION_WEB_SDK_VERSION,
6254
6254
  Ac as Optimization,
6255
6255
  $t as PERSONALIZATIONS_CACHE_KEY,
6256
6256
  At as PROFILE_CACHE_KEY,
6257
- ze as Page,
6258
- ur as PageEventContext,
6257
+ Te as Page,
6258
+ lr as PageEventContext,
6259
6259
  tn as PageViewEvent,
6260
- Yo as PartialProfile,
6261
- xo as PersonalizationComponent,
6262
- Vo as PersonalizationComponentArray,
6263
- No as PersonalizationConfig,
6260
+ Go as PartialProfile,
6261
+ Vo as PersonalizationComponent,
6262
+ No as PersonalizationComponentArray,
6263
+ Lo as PersonalizationConfig,
6264
6264
  Yt as PersonalizationEntry,
6265
- Bo as PersonalizationEntryArray,
6265
+ Uo as PersonalizationEntryArray,
6266
6266
  Ec as PersonalizationEntrySkeleton,
6267
- jo as PersonalizationFields,
6267
+ Bo as PersonalizationFields,
6268
6268
  le as PersonalizationStateful,
6269
6269
  Ya as PersonalizationStateless,
6270
- Lo as PersonalizationType,
6271
- Uo as PersonalizedEntry,
6270
+ jo as PersonalizationType,
6271
+ Do as PersonalizedEntry,
6272
6272
  ve as PersonalizedEntryResolver,
6273
6273
  dt as Profile,
6274
6274
  lt as Properties,
6275
6275
  Jt as Screen,
6276
- lr as ScreenEventContext,
6276
+ dr as ScreenEventContext,
6277
6277
  nn as ScreenViewEvent,
6278
- is as SelectedPersonalization,
6279
- fr as SelectedPersonalizationArray,
6280
- Wo as SessionStatistics,
6281
- zo as SpaceLink,
6282
- ko as TagLink,
6278
+ os as SelectedPersonalization,
6279
+ pr as SelectedPersonalizationArray,
6280
+ Yo as SessionStatistics,
6281
+ To as SpaceLink,
6282
+ Ao as TagLink,
6283
6283
  rn as TrackEvent,
6284
6284
  Qt as Traits,
6285
6285
  Xt as UniversalEventContext,
6286
6286
  ue as UniversalEventProperties,
6287
6287
  Sc as UnknownChange,
6288
6288
  Ra as ValuePresence,
6289
- es as VariableChange,
6290
- Xo as VariableChangeValue,
6291
- ye as batch,
6289
+ ts as VariableChange,
6290
+ es as VariableChangeValue,
6291
+ me as batch,
6292
6292
  cc as beaconHandler,
6293
6293
  P as createScopedLogger,
6294
6294
  x as effect,
@@ -6296,14 +6296,14 @@ export {
6296
6296
  oc as getPageProperties,
6297
6297
  sc as getUserAgent,
6298
6298
  F as guardedBy,
6299
- Ao as isEntry,
6300
- Ro as isEntryReplacementComponent,
6301
- Io as isEntryReplacementVariant,
6299
+ $o as isEntry,
6300
+ Oo as isEntryReplacementComponent,
6301
+ Co as isEntryReplacementVariant,
6302
6302
  wc as isInlineVariableComponent,
6303
6303
  Ke as isPersonalizationEntry,
6304
6304
  ht as isPersonalizedEntry,
6305
6305
  oe as logger,
6306
- $a as signalFns,
6307
- Oe as signals
6306
+ Tn as signalFns,
6307
+ ye as signals
6308
6308
  };
6309
6309
  //# sourceMappingURL=index.js.map