@walkeros/web-destination-gtag 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -619,7 +619,7 @@ function $constructor(name, initializer3, params) {
619
619
  Object.defineProperty(inst, "_zod", {
620
620
  value: {
621
621
  def,
622
- constr: _,
622
+ constr: _2,
623
623
  traits: /* @__PURE__ */ new Set()
624
624
  },
625
625
  enumerable: false
@@ -630,7 +630,7 @@ function $constructor(name, initializer3, params) {
630
630
  }
631
631
  inst._zod.traits.add(name);
632
632
  initializer3(inst, def);
633
- const proto = _.prototype;
633
+ const proto = _2.prototype;
634
634
  const keys = Object.keys(proto);
635
635
  for (let i = 0; i < keys.length; i++) {
636
636
  const k = keys[i];
@@ -643,7 +643,7 @@ function $constructor(name, initializer3, params) {
643
643
  class Definition extends Parent {
644
644
  }
645
645
  Object.defineProperty(Definition, "name", { value: name });
646
- function _(def) {
646
+ function _2(def) {
647
647
  var _a5;
648
648
  var _a4;
649
649
  const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
@@ -654,8 +654,8 @@ function $constructor(name, initializer3, params) {
654
654
  }
655
655
  return inst;
656
656
  }
657
- Object.defineProperty(_, "init", { value: init2 });
658
- Object.defineProperty(_, Symbol.hasInstance, {
657
+ Object.defineProperty(_2, "init", { value: init2 });
658
+ Object.defineProperty(_2, Symbol.hasInstance, {
659
659
  value: (inst) => {
660
660
  var _a4, _b;
661
661
  if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
@@ -663,8 +663,8 @@ function $constructor(name, initializer3, params) {
663
663
  return (_b = (_a4 = inst == null ? void 0 : inst._zod) == null ? void 0 : _a4.traits) == null ? void 0 : _b.has(name);
664
664
  }
665
665
  });
666
- Object.defineProperty(_, "name", { value: name });
667
- return _;
666
+ Object.defineProperty(_2, "name", { value: name });
667
+ return _2;
668
668
  }
669
669
  var $brand = /* @__PURE__ */ Symbol("zod_brand");
670
670
  var $ZodAsyncError = class extends Error {
@@ -762,17 +762,17 @@ function assertIs(_arg) {
762
762
  function assertNever(_x) {
763
763
  throw new Error("Unexpected value in exhaustive check");
764
764
  }
765
- function assert(_) {
765
+ function assert(_2) {
766
766
  }
767
767
  function getEnumValues(entries) {
768
768
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
769
- const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
769
+ const values = Object.entries(entries).filter(([k, _2]) => numericValues.indexOf(+k) === -1).map(([_2, v]) => v);
770
770
  return values;
771
771
  }
772
772
  function joinValues(array2, separator = "|") {
773
773
  return array2.map((val) => stringifyPrimitive(val)).join(separator);
774
774
  }
775
- function jsonStringifyReplacer(_, value) {
775
+ function jsonStringifyReplacer(_2, value) {
776
776
  if (typeof value === "bigint")
777
777
  return value.toString();
778
778
  return value;
@@ -899,10 +899,10 @@ var allowsEval = cached(() => {
899
899
  return false;
900
900
  }
901
901
  try {
902
- const F = Function;
903
- new F("");
902
+ const F2 = Function;
903
+ new F2("");
904
904
  return true;
905
- } catch (_) {
905
+ } catch (_2) {
906
906
  return false;
907
907
  }
908
908
  });
@@ -1012,31 +1012,31 @@ function normalizeParams(_params) {
1012
1012
  function createTransparentProxy(getter) {
1013
1013
  let target;
1014
1014
  return new Proxy({}, {
1015
- get(_, prop, receiver) {
1015
+ get(_2, prop, receiver) {
1016
1016
  target != null ? target : target = getter();
1017
1017
  return Reflect.get(target, prop, receiver);
1018
1018
  },
1019
- set(_, prop, value, receiver) {
1019
+ set(_2, prop, value, receiver) {
1020
1020
  target != null ? target : target = getter();
1021
1021
  return Reflect.set(target, prop, value, receiver);
1022
1022
  },
1023
- has(_, prop) {
1023
+ has(_2, prop) {
1024
1024
  target != null ? target : target = getter();
1025
1025
  return Reflect.has(target, prop);
1026
1026
  },
1027
- deleteProperty(_, prop) {
1027
+ deleteProperty(_2, prop) {
1028
1028
  target != null ? target : target = getter();
1029
1029
  return Reflect.deleteProperty(target, prop);
1030
1030
  },
1031
- ownKeys(_) {
1031
+ ownKeys(_2) {
1032
1032
  target != null ? target : target = getter();
1033
1033
  return Reflect.ownKeys(target);
1034
1034
  },
1035
- getOwnPropertyDescriptor(_, prop) {
1035
+ getOwnPropertyDescriptor(_2, prop) {
1036
1036
  target != null ? target : target = getter();
1037
1037
  return Reflect.getOwnPropertyDescriptor(target, prop);
1038
1038
  },
1039
- defineProperty(_, prop, descriptor) {
1039
+ defineProperty(_2, prop, descriptor) {
1040
1040
  target != null ? target : target = getter();
1041
1041
  return Reflect.defineProperty(target, prop, descriptor);
1042
1042
  }
@@ -1322,7 +1322,7 @@ function issue(...args) {
1322
1322
  return { ...iss };
1323
1323
  }
1324
1324
  function cleanEnum(obj) {
1325
- return Object.entries(obj).filter(([k, _]) => {
1325
+ return Object.entries(obj).filter(([k, _2]) => {
1326
1326
  return Number.isNaN(Number.parseInt(k, 10));
1327
1327
  }).map((el) => el[1]);
1328
1328
  }
@@ -2358,11 +2358,11 @@ var Doc = class {
2358
2358
  }
2359
2359
  compile() {
2360
2360
  var _a3;
2361
- const F = Function;
2361
+ const F2 = Function;
2362
2362
  const args = this == null ? void 0 : this.args;
2363
2363
  const content = (_a3 = this == null ? void 0 : this.content) != null ? _a3 : [``];
2364
2364
  const lines = [...content.map((x) => ` ${x}`)];
2365
- return new F(...args, lines.join("\n"));
2365
+ return new F2(...args, lines.join("\n"));
2366
2366
  }
2367
2367
  };
2368
2368
 
@@ -2408,13 +2408,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2408
2408
  continue;
2409
2409
  }
2410
2410
  const currLen = payload.issues.length;
2411
- const _ = ch._zod.check(payload);
2412
- if (_ instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
2411
+ const _2 = ch._zod.check(payload);
2412
+ if (_2 instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
2413
2413
  throw new $ZodAsyncError();
2414
2414
  }
2415
- if (asyncResult || _ instanceof Promise) {
2415
+ if (asyncResult || _2 instanceof Promise) {
2416
2416
  asyncResult = (asyncResult != null ? asyncResult : Promise.resolve()).then(async () => {
2417
- await _;
2417
+ await _2;
2418
2418
  const nextLen = payload.issues.length;
2419
2419
  if (nextLen === currLen)
2420
2420
  return;
@@ -2477,7 +2477,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2477
2477
  try {
2478
2478
  const r = safeParse(inst, value);
2479
2479
  return r.success ? { value: r.data } : { issues: (_a5 = r.error) == null ? void 0 : _a5.issues };
2480
- } catch (_) {
2480
+ } catch (_2) {
2481
2481
  return safeParseAsync(inst, value).then((r) => {
2482
2482
  var _a6;
2483
2483
  return r.success ? { value: r.data } : { issues: (_a6 = r.error) == null ? void 0 : _a6.issues };
@@ -2492,11 +2492,11 @@ var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
2492
2492
  var _a3, _b, _c;
2493
2493
  $ZodType.init(inst, def);
2494
2494
  inst._zod.pattern = (_c = [...(_b = (_a3 = inst == null ? void 0 : inst._zod.bag) == null ? void 0 : _a3.patterns) != null ? _b : []].pop()) != null ? _c : string(inst._zod.bag);
2495
- inst._zod.parse = (payload, _) => {
2495
+ inst._zod.parse = (payload, _2) => {
2496
2496
  if (def.coerce)
2497
2497
  try {
2498
2498
  payload.value = String(payload.value);
2499
- } catch (_2) {
2499
+ } catch (_3) {
2500
2500
  }
2501
2501
  if (typeof payload.value === "string")
2502
2502
  return payload;
@@ -2584,7 +2584,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
2584
2584
  payload.value = trimmed;
2585
2585
  }
2586
2586
  return;
2587
- } catch (_) {
2587
+ } catch (_2) {
2588
2588
  payload.issues.push({
2589
2589
  code: "invalid_format",
2590
2590
  format: "url",
@@ -2747,7 +2747,7 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
2747
2747
  function isValidBase64URL(data) {
2748
2748
  if (!base64url.test(data))
2749
2749
  return false;
2750
- const base643 = data.replace(/[-_]/g, (c2) => c2 === "-" ? "+" : "/");
2750
+ const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
2751
2751
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
2752
2752
  return isValidBase64(padded);
2753
2753
  }
@@ -2829,7 +2829,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
2829
2829
  if (def.coerce)
2830
2830
  try {
2831
2831
  payload.value = Number(payload.value);
2832
- } catch (_) {
2832
+ } catch (_2) {
2833
2833
  }
2834
2834
  const input = payload.value;
2835
2835
  if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
@@ -2857,7 +2857,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
2857
2857
  if (def.coerce)
2858
2858
  try {
2859
2859
  payload.value = Boolean(payload.value);
2860
- } catch (_) {
2860
+ } catch (_2) {
2861
2861
  }
2862
2862
  const input = payload.value;
2863
2863
  if (typeof input === "boolean")
@@ -2878,7 +2878,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
2878
2878
  if (def.coerce)
2879
2879
  try {
2880
2880
  payload.value = BigInt(payload.value);
2881
- } catch (_) {
2881
+ } catch (_2) {
2882
2882
  }
2883
2883
  if (typeof payload.value === "bigint")
2884
2884
  return payload;
@@ -4304,9 +4304,9 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
4304
4304
  return payload;
4305
4305
  };
4306
4306
  inst.input = (...args) => {
4307
- const F = inst.constructor;
4307
+ const F2 = inst.constructor;
4308
4308
  if (Array.isArray(args[0])) {
4309
- return new F({
4309
+ return new F2({
4310
4310
  type: "function",
4311
4311
  input: new $ZodTuple({
4312
4312
  type: "tuple",
@@ -4316,15 +4316,15 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
4316
4316
  output: inst._def.output
4317
4317
  });
4318
4318
  }
4319
- return new F({
4319
+ return new F2({
4320
4320
  type: "function",
4321
4321
  input: args[0],
4322
4322
  output: inst._def.output
4323
4323
  });
4324
4324
  };
4325
4325
  inst.output = (output) => {
4326
- const F = inst.constructor;
4327
- return new F({
4326
+ const F2 = inst.constructor;
4327
+ return new F2({
4328
4328
  type: "function",
4329
4329
  input: inst._def.input,
4330
4330
  output
@@ -4365,7 +4365,7 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4365
4365
  var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
4366
4366
  $ZodCheck.init(inst, def);
4367
4367
  $ZodType.init(inst, def);
4368
- inst._zod.parse = (payload, _) => {
4368
+ inst._zod.parse = (payload, _2) => {
4369
4369
  return payload;
4370
4370
  };
4371
4371
  inst._zod.check = (payload) => {
@@ -12047,7 +12047,7 @@ function toJSONSchema(input, params) {
12047
12047
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
12048
12048
  const defs = {};
12049
12049
  for (const entry of registry2._idmap.entries()) {
12050
- const [_, schema] = entry;
12050
+ const [_2, schema] = entry;
12051
12051
  process2(schema, ctx2);
12052
12052
  }
12053
12053
  const schemas = {};
@@ -12147,7 +12147,7 @@ var JSONSchemaGenerator = class {
12147
12147
  }
12148
12148
  extractDefs(this.ctx, schema);
12149
12149
  const result = finalize(this.ctx, schema);
12150
- const { "~standard": _, ...plainResult } = result;
12150
+ const { "~standard": _2, ...plainResult } = result;
12151
12151
  return plainResult;
12152
12152
  }
12153
12153
  };
@@ -12935,9 +12935,9 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
12935
12935
  inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
12936
12936
  inst.min = (value, params) => inst.check(_gte(value, params));
12937
12937
  inst.max = (value, params) => inst.check(_lte(value, params));
12938
- const c2 = inst._zod.bag;
12939
- inst.minDate = c2.minimum ? new Date(c2.minimum) : null;
12940
- inst.maxDate = c2.maximum ? new Date(c2.maximum) : null;
12938
+ const c = inst._zod.bag;
12939
+ inst.minDate = c.minimum ? new Date(c.minimum) : null;
12940
+ inst.maxDate = c.maximum ? new Date(c.maximum) : null;
12941
12941
  });
12942
12942
  function date3(params) {
12943
12943
  return _date(ZodDate, params);
@@ -14075,157 +14075,164 @@ var e = Object.defineProperty;
14075
14075
  var n = (n2, t) => {
14076
14076
  for (var i in t) e(n2, i, { get: t[i], enumerable: true });
14077
14077
  };
14078
- var c = {};
14079
- n(c, { Level: () => l });
14080
- var l = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(l || {});
14081
- var W = { merge: true, shallow: true, extend: true };
14082
- function U(e2, n2 = {}, t = {}) {
14083
- t = { ...W, ...t };
14078
+ var l = {};
14079
+ n(l, { Level: () => d });
14080
+ var d = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(d || {});
14081
+ var _ = { merge: true, shallow: true, extend: true };
14082
+ function B(e2, n2 = {}, t = {}) {
14083
+ t = { ..._, ...t };
14084
14084
  const i = Object.entries(n2).reduce((n3, [i2, o]) => {
14085
14085
  const r = e2[i2];
14086
14086
  return t.merge && Array.isArray(r) && Array.isArray(o) ? n3[i2] = o.reduce((e3, n4) => e3.includes(n4) ? e3 : [...e3, n4], [...r]) : (t.extend || i2 in e2) && (n3[i2] = o), n3;
14087
14087
  }, {});
14088
14088
  return t.shallow ? { ...e2, ...i } : (Object.assign(e2, i), e2);
14089
14089
  }
14090
- function B(e2) {
14090
+ function F(e2) {
14091
14091
  return Array.isArray(e2);
14092
14092
  }
14093
- function Q(e2) {
14094
- return "object" == typeof e2 && null !== e2 && !B(e2) && "[object Object]" === Object.prototype.toString.call(e2);
14093
+ function Y(e2) {
14094
+ return "object" == typeof e2 && null !== e2 && !F(e2) && "[object Object]" === Object.prototype.toString.call(e2);
14095
14095
  }
14096
- function se(e2 = {}) {
14096
+ function le(e2 = {}) {
14097
14097
  var _a3;
14098
- const n2 = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), t = e2.group || "gr0up", i = e2.count || 1, o = U({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${n2}-${t}-${i}`, trigger: "test", entity: "entity", action: "action", timestamp: n2, timing: 3.14, group: t, count: i, version: { source: "3.1.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
14098
+ const n2 = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), t = e2.group || "gr0up", i = e2.count || 1, o = B({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${n2}-${t}-${i}`, trigger: "test", entity: "entity", action: "action", timestamp: n2, timing: 3.14, group: t, count: i, version: { source: "3.1.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
14099
14099
  if (e2.name) {
14100
14100
  const [n3, t2] = (_a3 = e2.name.split(" ")) != null ? _a3 : [];
14101
14101
  n3 && t2 && (o.entity = n3, o.action = t2);
14102
14102
  }
14103
14103
  return o;
14104
14104
  }
14105
- function ae(e2 = "entity action", n2 = {}) {
14105
+ function de(e2 = "entity action", n2 = {}) {
14106
14106
  const t = n2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), i = { data: { id: "ers", name: "Everyday Ruck Snack", color: "black", size: "l", price: 420 } }, o = { data: { id: "cc", name: "Cool Cap", size: "one size", price: 42 } };
14107
- return se({ ...{ "cart view": { data: { currency: "EUR", value: 2 * i.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...i.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: i.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...i, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...i, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...i, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...i, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...i.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: t, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...n2, name: e2 });
14107
+ return le({ ...{ "cart view": { data: { currency: "EUR", value: 2 * i.data.price }, context: { shopping: ["cart", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", data: { ...i.data, quantity: 2 }, context: { shopping: ["cart", 0] }, nested: [] }], trigger: "load" }, "checkout view": { data: { step: "payment", currency: "EUR", value: i.data.price + o.data.price }, context: { shopping: ["checkout", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...i, context: { shopping: ["checkout", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["checkout", 0] }, nested: [] }], trigger: "load" }, "order complete": { data: { id: "0rd3r1d", currency: "EUR", shipping: 5.22, taxes: 73.76, total: 555 }, context: { shopping: ["complete", 0] }, globals: { pagegroup: "shop" }, nested: [{ entity: "product", ...i, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "product", ...o, context: { shopping: ["complete", 0] }, nested: [] }, { entity: "gift", data: { name: "Surprise" }, context: { shopping: ["complete", 0] }, nested: [] }], trigger: "load" }, "page view": { data: { domain: "www.example.com", title: "walkerOS documentation", referrer: "https://www.walkeros.io/", search: "?foo=bar", hash: "#hash", id: "/docs/" }, globals: { pagegroup: "docs" }, trigger: "load" }, "product add": { ...i, context: { shopping: ["intent", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "click" }, "product view": { ...i, context: { shopping: ["detail", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "product visible": { data: { ...i.data, position: 3, promo: true }, context: { shopping: ["discover", 0] }, globals: { pagegroup: "shop" }, nested: [], trigger: "load" }, "promotion visible": { data: { name: "Setting up tracking easily", position: "hero" }, context: { ab_test: ["engagement", 0] }, globals: { pagegroup: "homepage" }, trigger: "visible" }, "session start": { data: { id: "s3ss10n", start: t, isNew: true, count: 1, runs: 1, isStart: true, storage: true, referrer: "", device: "c00k13" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n", hash: "h4sh", address: "street number", email: "user@example.com", phone: "+49 123 456 789", userAgent: "Mozilla...", browser: "Chrome", browserVersion: "90", deviceType: "desktop", language: "de-DE", country: "DE", region: "HH", city: "Hamburg", zip: "20354", timezone: "Berlin", os: "walkerOS", osVersion: "1.0", screenSize: "1337x420", ip: "127.0.0.0", internal: true, custom: "value" } } }[e2], ...n2, name: e2 });
14108
14108
  }
14109
- function Ye(e2, n2, t = "draft-7") {
14109
+ function cn(e2, n2, t = "draft-7") {
14110
14110
  return external_exports.toJSONSchema(e2, { target: t });
14111
14111
  }
14112
- var en;
14113
- var nn = external_exports.string();
14114
- var tn = external_exports.number();
14115
- var on = (external_exports.boolean(), external_exports.string().min(1));
14116
- var rn = external_exports.number().int().positive();
14117
- var sn = external_exports.number().int().nonnegative();
14118
- var an = external_exports.number().describe("Tagging version number");
14119
- var cn = (external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional(), external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"));
14120
- var ln = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references");
14121
- var dn = external_exports.any().describe("Error handler function: (error, state?) => void");
14122
- var pn = external_exports.any().describe("Log handler function: (message, verbose?) => void");
14123
- var un = external_exports.object({ Error: dn.describe("Error handler function"), Log: pn.describe("Log handler function") }).describe("Handler interface with error and log functions");
14124
- var fn = (Ye(cn), Ye(ln), Ye(dn), Ye(pn), Ye(un), external_exports.object({ onError: dn.optional().describe("Error handler function: (error, state?) => void"), onLog: pn.optional().describe("Log handler function: (message, verbose?) => void") }).partial(), external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(), external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(), external_exports.object({}).partial(), external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(), external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(), external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(), external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(), external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial(), external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial(), external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial(), external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(), external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial(), external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial(), external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), bn)])));
14125
- var bn = external_exports.lazy(() => external_exports.union([fn, external_exports.array(fn)]));
14126
- var gn = external_exports.record(external_exports.string(), bn.optional()).describe("Flexible property collection with optional values");
14127
- var mn = external_exports.record(external_exports.string(), external_exports.tuple([bn, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control");
14128
- var hn = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom");
14129
- var vn = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)");
14130
- var yn = gn.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties");
14131
- var wn = gn.and(external_exports.object({ source: nn.describe('Walker implementation version (e.g., "2.0.0")'), tagging: an })).describe("Walker version information");
14132
- var kn = gn.and(external_exports.object({ type: hn.describe("Source type identifier"), id: nn.describe("Source identifier (typically URL on web)"), previous_id: nn.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
14133
- var Sn = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: gn.describe("Entity-specific properties"), nested: external_exports.array(Sn).describe("Nested child entities"), context: mn.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
14134
- var jn = external_exports.array(Sn).describe("Array of nested entities");
14135
- var xn = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: gn.describe("Event-specific properties"), context: mn.describe("Ordered context properties with priorities"), globals: gn.describe("Global properties shared across events"), custom: gn.describe("Custom implementation-specific properties"), user: yn.describe("User identification and attributes"), nested: jn.describe("Related nested entities"), consent: vn.describe("Consent states at event time"), id: on.describe("Unique event identifier (timestamp-based)"), trigger: nn.describe("Event trigger identifier"), entity: nn.describe("Parsed entity from event name"), action: nn.describe("Parsed action from event name"), timestamp: rn.describe("Unix timestamp in milliseconds since epoch"), timing: tn.describe("Event processing timing information"), group: nn.describe("Event grouping identifier"), count: sn.describe("Event count in session"), version: wn.describe("Walker version information"), source: kn.describe("Event source information") }).describe("Complete walkerOS event structure");
14136
- var En = xn.partial().describe("Partial event structure with all fields optional");
14137
- var On = (xn.partial().describe("Partial event structure with all top-level fields optional"), Ye(xn), Ye(En), Ye(yn), Ye(gn), Ye(mn), Ye(Sn), Ye(hn), Ye(vn), external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => en), external_exports.array(On).describe("Array of values")])));
14138
- var Pn = external_exports.array(On).describe("Array of transformation values");
14139
- var Cn = external_exports.lazy(() => external_exports.tuple([On, On]).describe("Loop transformation: [source, transform] tuple for array processing"));
14140
- var Nn = external_exports.lazy(() => external_exports.array(On).describe("Set: Array of values for selection or combination"));
14141
- var $n = external_exports.lazy(() => external_exports.record(external_exports.string(), On).describe("Map: Object mapping keys to transformation values"));
14142
- var An = en = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: $n.optional().describe("Object mapping: transform event data to structured output"), loop: Cn.optional().describe("Loop transformation: [source, transform] for array processing"), set: Nn.optional().describe("Set of values: combine or select from multiple values"), consent: vn.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e2) => Object.keys(e2).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies");
14143
- var Dn = external_exports.record(external_exports.string(), On).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
14144
- var In = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: vn.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([On, Pn]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: Dn.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
14145
- var Rn = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([In, external_exports.array(In)])).optional()).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
14146
- var zn = external_exports.object({ consent: vn.optional().describe("Required consent states to process any events"), data: external_exports.union([On, Pn]).optional().describe("Global data transformation applied to all events"), mapping: Rn.optional().describe("Entity-action specific mapping rules"), policy: Dn.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
14147
- var Mn = (external_exports.object({ eventMapping: In.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"), Ye(On), Ye(An), Ye(Cn), Ye(Nn), Ye($n), Ye(Dn), Ye(In), Ye(Rn), Ye(zn), {});
14148
- n(Mn, { BatchSchema: () => Hn, ConfigSchema: () => Tn, ContextSchema: () => Ln, DLQSchema: () => et, DataSchema: () => Fn, DestinationPolicySchema: () => Jn, DestinationsSchema: () => Gn, InitDestinationsSchema: () => Zn, InitSchema: () => Kn, InstanceSchema: () => Vn, PartialConfigSchema: () => qn, PushBatchContextSchema: () => Un, PushContextSchema: () => Wn, PushEventSchema: () => _n, PushEventsSchema: () => Bn, PushResultSchema: () => Xn, RefSchema: () => Qn, ResultSchema: () => Yn, batchJsonSchema: () => rt, configJsonSchema: () => nt, contextJsonSchema: () => it, instanceJsonSchema: () => st, partialConfigJsonSchema: () => tt, pushContextJsonSchema: () => ot, resultJsonSchema: () => at });
14149
- var Tn = external_exports.object({ consent: vn.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([On, Pn]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: on.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Rn.optional().describe("Entity-action specific mapping rules for this destination"), policy: Dn.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), require: external_exports.array(external_exports.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'), logger: external_exports.object({ level: external_exports.union([external_exports.number(), external_exports.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: external_exports.any().optional().describe("Custom log handler function") }).optional().describe("Logger configuration (level, handler) to override the collector defaults"), onError: dn.optional(), onLog: pn.optional() }).describe("Destination configuration");
14150
- var qn = Tn.partial().describe("Partial destination configuration with all fields optional");
14151
- var Jn = Dn.describe("Destination policy rules for event pre-processing");
14152
- var Ln = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Tn.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions");
14153
- var Wn = Ln.extend({ mapping: In.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
14154
- var Un = Wn.describe("Batch push context with event-specific mapping");
14155
- var _n = external_exports.object({ event: xn.describe("The event to process"), mapping: In.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
14156
- var Bn = external_exports.array(_n).describe("Array of events with mappings");
14157
- var Hn = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(xn).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: In.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
14158
- var Fn = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
14159
- var Vn = external_exports.object({ config: Tn.describe("Destination configuration"), queue: external_exports.array(xn).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([xn, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)");
14160
- var Kn = external_exports.object({ code: Vn.describe("Destination instance with implementation"), config: qn.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
14161
- var Zn = external_exports.record(external_exports.string(), Kn).describe("Map of destination IDs to initialization configurations");
14162
- var Gn = external_exports.record(external_exports.string(), Vn).describe("Map of destination IDs to runtime instances");
14163
- var Qn = external_exports.object({ type: external_exports.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: external_exports.unknown().optional().describe("Response from push()"), error: external_exports.unknown().optional().describe("Error if failed") }).describe("Destination reference with type and response data");
14164
- var Xn = external_exports.object({ queue: external_exports.array(xn).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
14165
- var Yn = external_exports.object({ ok: external_exports.boolean().describe("True if nothing failed"), event: external_exports.unknown().optional().describe("The processed event"), done: external_exports.record(external_exports.string(), Qn).optional().describe("Destinations that processed successfully"), queued: external_exports.record(external_exports.string(), Qn).optional().describe("Destinations that queued events"), failed: external_exports.record(external_exports.string(), Qn).optional().describe("Destinations that failed to process") }).describe("Push result with destination outcomes");
14166
- var et = external_exports.array(external_exports.tuple([xn, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
14167
- var nt = Ye(Tn);
14168
- var tt = Ye(qn);
14169
- var it = Ye(Ln);
14170
- var ot = Ye(Wn);
14171
- var rt = Ye(Hn);
14172
- var st = Ye(Vn);
14173
- var at = Ye(Yn);
14174
- var ct = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions");
14175
- var lt = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: an, globalsStatic: gn.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: dn.optional(), onLog: pn.optional() }).describe("Core collector configuration");
14176
- var dt = gn.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: on.describe("Session identifier").optional(), start: rn.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: rn.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: on.describe("Device identifier").optional(), count: sn.describe("Event count in session").optional(), runs: sn.describe("Number of runs").optional() })).describe("Session state and tracking data");
14177
- var pt = lt.partial().extend({ consent: vn.optional().describe("Initial consent state"), user: yn.optional().describe("Initial user data"), globals: gn.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: gn.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state");
14178
- var ut = external_exports.object({ mapping: zn.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
14179
- var ft = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
14180
- var bt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
14181
- var gt = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: lt.describe("Current collector configuration"), consent: vn.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: gn.describe("Custom implementation-specific properties"), sources: ft.describe("Registered source instances"), destinations: bt.describe("Registered destination instances"), globals: gn.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(xn).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([dt]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: yn.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
14182
- var mt = (Ye(ct), Ye(lt), Ye(dt), Ye(pt), Ye(ut), Ye(gt), {});
14183
- n(mt, { BaseEnvSchema: () => ht, ConfigSchema: () => vt, InitSchema: () => kt, InitSourceSchema: () => St, InitSourcesSchema: () => jt, InstanceSchema: () => wt, PartialConfigSchema: () => yt, baseEnvJsonSchema: () => xt, configJsonSchema: () => Et, initSourceJsonSchema: () => Ct, initSourcesJsonSchema: () => Nt, instanceJsonSchema: () => Pt, partialConfigJsonSchema: () => Ot });
14184
- var ht = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this");
14185
- var vt = zn.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: ht.optional().describe("Environment dependencies (platform-specific)"), id: on.describe("Source identifier (defaults to source key)").optional(), onError: dn.optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional(), require: external_exports.array(external_exports.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'), logger: external_exports.object({ level: external_exports.union([external_exports.number(), external_exports.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: external_exports.any().optional().describe("Custom log handler function") }).optional().describe("Logger configuration (level, handler) to override the collector defaults"), ingest: external_exports.union([On, Pn]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax.") }).describe("Source configuration with mapping and environment");
14186
- var yt = vt.partial().describe("Partial source configuration with all fields optional");
14187
- var wt = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: vt.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods");
14188
- var kt = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
14189
- var St = external_exports.object({ code: kt.describe("Source initialization function"), config: yt.optional().describe("Partial configuration overrides"), env: ht.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration");
14190
- var jt = external_exports.record(external_exports.string(), St).describe("Map of source IDs to initialization configurations");
14191
- var xt = Ye(ht);
14192
- var Et = Ye(vt);
14193
- var Ot = Ye(yt);
14194
- var Pt = Ye(wt);
14195
- var Ct = Ye(St);
14196
- var Nt = Ye(jt);
14197
- var $t = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
14198
- var At = external_exports.record(external_exports.string(), $t).describe("Variables for interpolation");
14199
- var Dt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Reusable configuration definitions");
14200
- var It = external_exports.record(external_exports.string().regex(/^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/, "Invalid npm package name"), external_exports.object({ version: external_exports.string().optional(), imports: external_exports.array(external_exports.string()).optional(), path: external_exports.string().optional() })).describe("NPM packages to bundle");
14201
- var Rt = external_exports.object({ windowCollector: external_exports.string().default("collector").optional().describe('Window property name for the collector instance (default: "collector")'), windowElb: external_exports.string().default("elb").optional().describe('Window property name for the elb command queue (default: "elb")') }).describe("Web platform configuration");
14202
- var zt = external_exports.object({}).passthrough().describe("Server platform configuration (reserved for future options)");
14203
- var Mt = external_exports.object({ push: external_exports.string().min(1, "Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix. Example: "$code:(event) => { console.log(event); }"'), type: external_exports.string().optional().describe("Optional type identifier for the inline instance"), init: external_exports.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.") }).describe("Inline code for custom sources/transformers/destinations");
14204
- var Tt = external_exports.object({ description: external_exports.string().optional().describe("Human-readable description"), in: external_exports.unknown().optional().describe("Input to the step"), trigger: external_exports.object({ type: external_exports.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"), options: external_exports.unknown().optional().describe("Mechanism-specific options") }).optional().describe("Source trigger metadata"), mapping: external_exports.unknown().optional().describe("Mapping configuration"), out: external_exports.unknown().optional().describe("Expected output from the step") }).describe("Named example with input/output pair");
14205
- var qt = external_exports.record(external_exports.string(), Tt).describe("Named step examples for testing and documentation");
14206
- var Jt = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), code: external_exports.union([external_exports.string(), Mt]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: At.optional().describe("Source-level variables (highest priority in cascade)"), definitions: Dt.optional().describe("Source-level definitions (highest priority in cascade)"), next: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional().describe("Pre-collector transformer chain. Name of the first transformer to run after this source captures an event. If omitted, events go directly to the collector. Can be an array for explicit chain control."), examples: qt.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Source package reference with configuration");
14207
- var Lt = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: external_exports.union([external_exports.string(), Mt]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Transformer-specific configuration object"), env: external_exports.unknown().optional().describe("Transformer environment configuration"), next: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional().describe("Next transformer in chain. If omitted: pre-collector routes to collector, post-collector routes to destination."), variables: At.optional().describe("Transformer-level variables (highest priority in cascade)"), definitions: Dt.optional().describe("Transformer-level definitions (highest priority in cascade)"), examples: qt.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Transformer package reference with configuration");
14208
- var Wt = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), code: external_exports.union([external_exports.string(), Mt]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration"), variables: At.optional().describe("Destination-level variables (highest priority in cascade)"), definitions: Dt.optional().describe("Destination-level definitions (highest priority in cascade)"), before: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional().describe("Post-collector transformer chain. Name of the first transformer to run before sending events to this destination. If omitted, events come directly from the collector. Can be an array for explicit chain control."), examples: qt.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Destination package reference with configuration");
14209
- var Ut = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: external_exports.union([external_exports.string(), Mt]).optional().describe("Named export string or inline code definition"), config: external_exports.unknown().optional().describe("Store-specific configuration object"), env: external_exports.unknown().optional().describe("Store environment configuration"), variables: At.optional().describe("Store-level variables (highest priority in cascade)"), definitions: Dt.optional().describe("Store-level definitions (highest priority in cascade)"), examples: qt.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Store package reference with configuration");
14210
- var _t = external_exports.record(external_exports.string(), external_exports.unknown()).describe("JSON Schema object for event validation with description/examples annotations");
14211
- var Bt = external_exports.record(external_exports.string(), _t).describe("Action-level contract entries");
14212
- var Ht = external_exports.record(external_exports.string(), Bt).describe("Entity-action event schemas");
14213
- var Ft = external_exports.object({ extends: external_exports.string().optional().describe("Inherit from another named contract"), tagging: external_exports.number().int().min(0).optional().describe("Contract version number"), description: external_exports.string().optional().describe("Human-readable description"), globals: _t.optional().describe("JSON Schema for event.globals"), context: _t.optional().describe("JSON Schema for event.context"), custom: _t.optional().describe("JSON Schema for event.custom"), user: _t.optional().describe("JSON Schema for event.user"), consent: _t.optional().describe("JSON Schema for event.consent"), events: Ht.optional().describe("Entity-action event schemas") }).describe("Named contract entry with optional sections and events");
14214
- var Vt = external_exports.record(external_exports.string(), Ft).describe("Named contracts with optional extends inheritance");
14215
- var Kt = external_exports.object({ web: Rt.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."), server: zt.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."), sources: external_exports.record(external_exports.string(), Jt).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), Wt).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: external_exports.record(external_exports.string(), Lt).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: external_exports.record(external_exports.string(), Ut).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), packages: It.optional().describe("NPM packages to bundle"), variables: At.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"), definitions: Dt.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)") }).refine((e2) => {
14112
+ var ln;
14113
+ var dn = external_exports.string();
14114
+ var un = external_exports.number();
14115
+ var pn = (external_exports.boolean(), external_exports.string().min(1));
14116
+ var fn = external_exports.number().int().positive();
14117
+ var bn = external_exports.number().int().nonnegative();
14118
+ var gn = external_exports.number().describe("Tagging version number");
14119
+ var mn = (external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional(), external_exports.enum(["local", "session", "cookie"]).describe("Storage mechanism: local, session, or cookie"));
14120
+ var hn = external_exports.object({ Local: external_exports.literal("local"), Session: external_exports.literal("session"), Cookie: external_exports.literal("cookie") }).describe("Storage type constants for type-safe references");
14121
+ var vn = external_exports.any().describe("Error handler function: (error, state?) => void");
14122
+ var yn = external_exports.any().describe("Log handler function: (message, verbose?) => void");
14123
+ var wn = external_exports.object({ Error: vn.describe("Error handler function"), Log: yn.describe("Log handler function") }).describe("Handler interface with error and log functions");
14124
+ var kn = (cn(mn), cn(hn), cn(vn), cn(yn), cn(wn), external_exports.object({ onError: vn.optional().describe("Error handler function: (error, state?) => void"), onLog: yn.optional().describe("Log handler function: (message, verbose?) => void") }).partial(), external_exports.object({ verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional() }).partial(), external_exports.object({ queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional() }).partial(), external_exports.object({}).partial(), external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial(), external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial(), external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial(), external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial(), external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial(), external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial(), external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial(), external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial(), external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial(), external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial(), external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), jn)])));
14125
+ var jn = external_exports.lazy(() => external_exports.union([kn, external_exports.array(kn)]));
14126
+ var Sn = external_exports.record(external_exports.string(), jn.optional()).describe("Flexible property collection with optional values");
14127
+ var xn = external_exports.record(external_exports.string(), external_exports.tuple([jn, external_exports.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control");
14128
+ var En = external_exports.union([external_exports.enum(["web", "server", "app", "other"]), external_exports.string()]).describe("Source type: web, server, app, other, or custom");
14129
+ var On = external_exports.record(external_exports.string(), external_exports.boolean()).describe("Consent requirement mapping (group name \u2192 state)");
14130
+ var Cn = Sn.and(external_exports.object({ id: external_exports.string().optional().describe("User identifier"), device: external_exports.string().optional().describe("Device identifier"), session: external_exports.string().optional().describe("Session identifier"), hash: external_exports.string().optional().describe("Hashed identifier"), address: external_exports.string().optional().describe("User address"), email: external_exports.string().email().optional().describe("User email address"), phone: external_exports.string().optional().describe("User phone number"), userAgent: external_exports.string().optional().describe("Browser user agent string"), browser: external_exports.string().optional().describe("Browser name"), browserVersion: external_exports.string().optional().describe("Browser version"), deviceType: external_exports.string().optional().describe("Device type (mobile, desktop, tablet)"), os: external_exports.string().optional().describe("Operating system"), osVersion: external_exports.string().optional().describe("Operating system version"), screenSize: external_exports.string().optional().describe("Screen dimensions"), language: external_exports.string().optional().describe("User language"), country: external_exports.string().optional().describe("User country"), region: external_exports.string().optional().describe("User region/state"), city: external_exports.string().optional().describe("User city"), zip: external_exports.string().optional().describe("User postal code"), timezone: external_exports.string().optional().describe("User timezone"), ip: external_exports.string().optional().describe("User IP address"), internal: external_exports.boolean().optional().describe("Internal user flag (employee, test user)") })).describe("User identification and properties");
14131
+ var Pn = Sn.and(external_exports.object({ source: dn.describe('Walker implementation version (e.g., "2.0.0")'), tagging: gn })).describe("Walker version information");
14132
+ var $n = Sn.and(external_exports.object({ type: En.describe("Source type identifier"), id: dn.describe("Source identifier (typically URL on web)"), previous_id: dn.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
14133
+ var Nn = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: Sn.describe("Entity-specific properties"), nested: external_exports.array(Nn).describe("Nested child entities"), context: xn.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
14134
+ var An = external_exports.array(Nn).describe("Array of nested entities");
14135
+ var Dn = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: Sn.describe("Event-specific properties"), context: xn.describe("Ordered context properties with priorities"), globals: Sn.describe("Global properties shared across events"), custom: Sn.describe("Custom implementation-specific properties"), user: Cn.describe("User identification and attributes"), nested: An.describe("Related nested entities"), consent: On.describe("Consent states at event time"), id: pn.describe("Unique event identifier (timestamp-based)"), trigger: dn.describe("Event trigger identifier"), entity: dn.describe("Parsed entity from event name"), action: dn.describe("Parsed action from event name"), timestamp: fn.describe("Unix timestamp in milliseconds since epoch"), timing: un.describe("Event processing timing information"), group: dn.describe("Event grouping identifier"), count: bn.describe("Event count in session"), version: Pn.describe("Walker version information"), source: $n.describe("Event source information") }).describe("Complete walkerOS event structure");
14136
+ var Rn = Dn.partial().describe("Partial event structure with all fields optional");
14137
+ var In = (Dn.partial().describe("Partial event structure with all top-level fields optional"), cn(Dn), cn(Rn), cn(Cn), cn(Sn), cn(xn), cn(Nn), cn(En), cn(On), external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => ln), external_exports.array(In).describe("Array of values")])));
14138
+ var zn = external_exports.array(In).describe("Array of transformation values");
14139
+ var Mn = external_exports.lazy(() => external_exports.tuple([In, In]).describe("Loop transformation: [source, transform] tuple for array processing"));
14140
+ var Tn = external_exports.lazy(() => external_exports.array(In).describe("Set: Array of values for selection or combination"));
14141
+ var qn = external_exports.lazy(() => external_exports.record(external_exports.string(), In).describe("Map: Object mapping keys to transformation values"));
14142
+ var Un = ln = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: qn.optional().describe("Object mapping: transform event data to structured output"), loop: Mn.optional().describe("Loop transformation: [source, transform] for array processing"), set: Tn.optional().describe("Set of values: combine or select from multiple values"), consent: On.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e2) => Object.keys(e2).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies");
14143
+ var Jn = external_exports.record(external_exports.string(), In).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
14144
+ var Wn = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: On.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([In, zn]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: Jn.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
14145
+ var Ln = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([Wn, external_exports.array(Wn)])).optional()).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
14146
+ var _n = external_exports.object({ consent: On.optional().describe("Required consent states to process any events"), data: external_exports.union([In, zn]).optional().describe("Global data transformation applied to all events"), mapping: Ln.optional().describe("Entity-action specific mapping rules"), policy: Jn.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
14147
+ var Bn = (external_exports.object({ eventMapping: Wn.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result"), cn(In), cn(Un), cn(Mn), cn(Tn), cn(qn), cn(Jn), cn(Wn), cn(Ln), cn(_n), {});
14148
+ n(Bn, { BatchSchema: () => Yn, ConfigSchema: () => Hn, ContextSchema: () => Kn, DLQSchema: () => ct, DataSchema: () => et, DestinationPolicySchema: () => Vn, DestinationsSchema: () => ot, InitDestinationsSchema: () => it, InitSchema: () => tt, InstanceSchema: () => nt, PartialConfigSchema: () => Fn, PushBatchContextSchema: () => Gn, PushContextSchema: () => Zn, PushEventSchema: () => Qn, PushEventsSchema: () => Xn, PushResultSchema: () => st, RefSchema: () => rt, ResultSchema: () => at, batchJsonSchema: () => ft, configJsonSchema: () => lt, contextJsonSchema: () => ut, instanceJsonSchema: () => bt, partialConfigJsonSchema: () => dt, pushContextJsonSchema: () => pt, resultJsonSchema: () => gt });
14149
+ var Hn = external_exports.object({ consent: On.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([In, zn]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: pn.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: Ln.optional().describe("Entity-action specific mapping rules for this destination"), policy: Jn.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), require: external_exports.array(external_exports.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'), logger: external_exports.object({ level: external_exports.union([external_exports.number(), external_exports.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: external_exports.any().optional().describe("Custom log handler function") }).optional().describe("Logger configuration (level, handler) to override the collector defaults"), onError: vn.optional(), onLog: yn.optional() }).describe("Destination configuration");
14150
+ var Fn = Hn.partial().describe("Partial destination configuration with all fields optional");
14151
+ var Vn = Jn.describe("Destination policy rules for event pre-processing");
14152
+ var Kn = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Hn.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions");
14153
+ var Zn = Kn.extend({ mapping: Wn.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
14154
+ var Gn = Zn.describe("Batch push context with event-specific mapping");
14155
+ var Qn = external_exports.object({ event: Dn.describe("The event to process"), mapping: Wn.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
14156
+ var Xn = external_exports.array(Qn).describe("Array of events with mappings");
14157
+ var Yn = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(Dn).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: Wn.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
14158
+ var et = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
14159
+ var nt = external_exports.object({ config: Hn.describe("Destination configuration"), queue: external_exports.array(Dn).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([Dn, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)");
14160
+ var tt = external_exports.object({ code: nt.describe("Destination instance with implementation"), config: Fn.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
14161
+ var it = external_exports.record(external_exports.string(), tt).describe("Map of destination IDs to initialization configurations");
14162
+ var ot = external_exports.record(external_exports.string(), nt).describe("Map of destination IDs to runtime instances");
14163
+ var rt = external_exports.object({ type: external_exports.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: external_exports.unknown().optional().describe("Response from push()"), error: external_exports.unknown().optional().describe("Error if failed") }).describe("Destination reference with type and response data");
14164
+ var st = external_exports.object({ queue: external_exports.array(Dn).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
14165
+ var at = external_exports.object({ ok: external_exports.boolean().describe("True if nothing failed"), event: external_exports.unknown().optional().describe("The processed event"), done: external_exports.record(external_exports.string(), rt).optional().describe("Destinations that processed successfully"), queued: external_exports.record(external_exports.string(), rt).optional().describe("Destinations that queued events"), failed: external_exports.record(external_exports.string(), rt).optional().describe("Destinations that failed to process") }).describe("Push result with destination outcomes");
14166
+ var ct = external_exports.array(external_exports.tuple([Dn, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
14167
+ var lt = cn(Hn);
14168
+ var dt = cn(Fn);
14169
+ var ut = cn(Kn);
14170
+ var pt = cn(Zn);
14171
+ var ft = cn(Yn);
14172
+ var bt = cn(nt);
14173
+ var gt = cn(at);
14174
+ var mt = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions");
14175
+ var ht = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: gn, globalsStatic: Sn.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: vn.optional(), onLog: yn.optional() }).describe("Core collector configuration");
14176
+ var vt = Sn.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: pn.describe("Session identifier").optional(), start: fn.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: fn.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: pn.describe("Device identifier").optional(), count: bn.describe("Event count in session").optional(), runs: bn.describe("Number of runs").optional() })).describe("Session state and tracking data");
14177
+ var yt = ht.partial().extend({ consent: On.optional().describe("Initial consent state"), user: Cn.optional().describe("Initial user data"), globals: Sn.optional().describe("Initial global properties"), sources: external_exports.unknown().optional().describe("Source configurations"), destinations: external_exports.unknown().optional().describe("Destination configurations"), custom: Sn.optional().describe("Initial custom implementation-specific properties") }).describe("Collector initialization configuration with initial state");
14178
+ var wt = external_exports.object({ mapping: _n.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
14179
+ var kt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
14180
+ var jt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
14181
+ var St = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: ht.describe("Current collector configuration"), consent: On.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: Sn.describe("Custom implementation-specific properties"), sources: kt.describe("Registered source instances"), destinations: jt.describe("Registered destination instances"), globals: Sn.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(Dn).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([vt]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: Cn.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
14182
+ var xt = (cn(mt), cn(ht), cn(vt), cn(yt), cn(wt), cn(St), {});
14183
+ n(xt, { BaseEnvSchema: () => Et, ConfigSchema: () => Ot, InitSchema: () => $t, InitSourceSchema: () => Nt, InitSourcesSchema: () => At, InstanceSchema: () => Pt, PartialConfigSchema: () => Ct, baseEnvJsonSchema: () => Dt, configJsonSchema: () => Rt, initSourceJsonSchema: () => Mt, initSourcesJsonSchema: () => Tt, instanceJsonSchema: () => zt, partialConfigJsonSchema: () => It });
14184
+ var Et = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this");
14185
+ var Ot = _n.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: Et.optional().describe("Environment dependencies (platform-specific)"), id: pn.describe("Source identifier (defaults to source key)").optional(), onError: vn.optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional(), require: external_exports.array(external_exports.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'), logger: external_exports.object({ level: external_exports.union([external_exports.number(), external_exports.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: external_exports.any().optional().describe("Custom log handler function") }).optional().describe("Logger configuration (level, handler) to override the collector defaults"), ingest: external_exports.union([In, zn]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax.") }).describe("Source configuration with mapping and environment");
14186
+ var Ct = Ot.partial().describe("Partial source configuration with all fields optional");
14187
+ var Pt = external_exports.object({ type: external_exports.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Ot.describe("Current source configuration"), push: external_exports.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: external_exports.any().optional().describe("Cleanup function called when source is removed"), on: external_exports.unknown().optional().describe("Lifecycle hook function for event types") }).describe("Source instance with push handler and lifecycle methods");
14188
+ var $t = external_exports.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
14189
+ var Nt = external_exports.object({ code: $t.describe("Source initialization function"), config: Ct.optional().describe("Partial configuration overrides"), env: Et.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration");
14190
+ var At = external_exports.record(external_exports.string(), Nt).describe("Map of source IDs to initialization configurations");
14191
+ var Dt = cn(Et);
14192
+ var Rt = cn(Ot);
14193
+ var It = cn(Ct);
14194
+ var zt = cn(Pt);
14195
+ var Mt = cn(Nt);
14196
+ var Tt = cn(At);
14197
+ var qt = external_exports.enum(["eq", "contains", "prefix", "suffix", "regex", "gt", "lt", "exists"]);
14198
+ var Ut = external_exports.object({ key: external_exports.string(), operator: qt, value: external_exports.string(), not: external_exports.boolean().optional() });
14199
+ var Jt = external_exports.union([Ut, external_exports.object({ and: external_exports.array(external_exports.lazy(() => Jt)) }), external_exports.object({ or: external_exports.array(external_exports.lazy(() => Jt)) })]);
14200
+ var Wt = external_exports.union([Jt, external_exports.literal("*")]);
14201
+ var Lt = external_exports.union([external_exports.string(), external_exports.array(external_exports.string()), external_exports.array(external_exports.object({ match: Wt, next: external_exports.lazy(() => Lt) }))]);
14202
+ var _t = (external_exports.object({ match: Wt, next: external_exports.lazy(() => Lt) }), external_exports.object({ match: external_exports.union([Jt, external_exports.literal("*")]).describe("Match expression or wildcard to determine when this rule applies"), key: external_exports.array(external_exports.string()).min(1).describe("Dot-path fields used to build the cache key"), ttl: external_exports.number().positive().describe("Time-to-live in seconds for cached entries"), update: external_exports.record(external_exports.string(), In).optional().describe("Response mutations applied on cache hit (key \u2192 Value mapping)") }));
14203
+ var Bt = external_exports.object({ full: external_exports.boolean().optional().describe("Stop flow on cache HIT (default: false). When true, skip remaining steps and return cached value."), store: external_exports.string().optional().describe("Store ID for persistent caching (references a configured store)"), rules: external_exports.array(_t).min(1).describe("Cache rules \u2014 at least one required") });
14204
+ var Ht = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
14205
+ var Ft = external_exports.record(external_exports.string(), Ht).describe("Variables for interpolation");
14206
+ var Vt = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Reusable configuration definitions");
14207
+ var Kt = external_exports.record(external_exports.string().regex(/^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/, "Invalid npm package name"), external_exports.object({ version: external_exports.string().optional(), imports: external_exports.array(external_exports.string()).optional(), path: external_exports.string().optional() })).describe("NPM packages to bundle");
14208
+ var Zt = external_exports.object({ windowCollector: external_exports.string().default("collector").optional().describe('Window property name for the collector instance (default: "collector")'), windowElb: external_exports.string().default("elb").optional().describe('Window property name for the elb command queue (default: "elb")') }).describe("Web platform configuration");
14209
+ var Gt = external_exports.object({}).passthrough().describe("Server platform configuration (reserved for future options)");
14210
+ var Qt = external_exports.object({ push: external_exports.string().min(1, "Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix. Example: "$code:(event) => { console.log(event); }"'), type: external_exports.string().optional().describe("Optional type identifier for the inline instance"), init: external_exports.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.") }).describe("Inline code for custom sources/transformers/destinations");
14211
+ var Xt = external_exports.object({ description: external_exports.string().optional().describe("Human-readable description"), in: external_exports.unknown().optional().describe("Input to the step"), trigger: external_exports.object({ type: external_exports.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"), options: external_exports.unknown().optional().describe("Mechanism-specific options") }).optional().describe("Source trigger metadata"), mapping: external_exports.unknown().optional().describe("Mapping configuration"), out: external_exports.unknown().optional().describe("Expected output from the step") }).describe("Named example with input/output pair");
14212
+ var Yt = external_exports.record(external_exports.string(), Xt).describe("Named step examples for testing and documentation");
14213
+ var ei = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), code: external_exports.union([external_exports.string(), Qt]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: Ft.optional().describe("Source-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Source-level definitions (highest priority in cascade)"), next: Lt.optional().describe("Pre-collector transformer chain. String, string[], or NextRule[] for conditional routing based on ingest data."), before: Lt.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Bt.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)") }).describe("Source package reference with configuration");
14214
+ var ni = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: external_exports.union([external_exports.string(), Qt]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Transformer-specific configuration object"), env: external_exports.unknown().optional().describe("Transformer environment configuration"), before: Lt.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Lt.optional().describe("Next transformer in chain. String, string[], or NextRule[] for conditional routing."), variables: Ft.optional().describe("Transformer-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Transformer-level definitions (highest priority in cascade)"), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Bt.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)") }).describe("Transformer package reference with configuration");
14215
+ var ti = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), code: external_exports.union([external_exports.string(), Qt]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration"), variables: Ft.optional().describe("Destination-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Destination-level definitions (highest priority in cascade)"), before: Lt.optional().describe("Post-collector transformer chain. String, string[], or NextRule[] for conditional routing."), next: Lt.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Bt.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)") }).describe("Destination package reference with configuration");
14216
+ var ii = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: external_exports.union([external_exports.string(), Qt]).optional().describe("Named export string or inline code definition"), config: external_exports.unknown().optional().describe("Store-specific configuration object"), env: external_exports.unknown().optional().describe("Store environment configuration"), variables: Ft.optional().describe("Store-level variables (highest priority in cascade)"), definitions: Vt.optional().describe("Store-level definitions (highest priority in cascade)"), examples: Yt.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Store package reference with configuration");
14217
+ var oi = external_exports.record(external_exports.string(), external_exports.unknown()).describe("JSON Schema object for event validation with description/examples annotations");
14218
+ var ri = external_exports.record(external_exports.string(), oi).describe("Action-level contract entries");
14219
+ var si = external_exports.record(external_exports.string(), ri).describe("Entity-action event schemas");
14220
+ var ai = external_exports.object({ extends: external_exports.string().optional().describe("Inherit from another named contract"), tagging: external_exports.number().int().min(0).optional().describe("Contract version number"), description: external_exports.string().optional().describe("Human-readable description"), globals: oi.optional().describe("JSON Schema for event.globals"), context: oi.optional().describe("JSON Schema for event.context"), custom: oi.optional().describe("JSON Schema for event.custom"), user: oi.optional().describe("JSON Schema for event.user"), consent: oi.optional().describe("JSON Schema for event.consent"), events: si.optional().describe("Entity-action event schemas") }).describe("Named contract entry with optional sections and events");
14221
+ var ci = external_exports.record(external_exports.string(), ai).describe("Named contracts with optional extends inheritance");
14222
+ var li = external_exports.object({ web: Zt.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."), server: Gt.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."), sources: external_exports.record(external_exports.string(), ei).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), ti).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: external_exports.record(external_exports.string(), ni).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: external_exports.record(external_exports.string(), ii).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), packages: Kt.optional().describe("NPM packages to bundle"), variables: Ft.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"), definitions: Vt.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)") }).refine((e2) => {
14216
14223
  const n2 = void 0 !== e2.web, t = void 0 !== e2.server;
14217
14224
  return (n2 || t) && !(n2 && t);
14218
14225
  }, { message: 'Exactly one of "web" or "server" must be present' }).describe("Single flow settings for one deployment target");
14219
- var Zt = external_exports.object({ $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'), include: external_exports.array(external_exports.string()).optional().describe("Folders to include in the bundle output"), variables: At.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"), definitions: Dt.optional().describe("Reusable configuration definitions (use $def.name syntax)"), flows: external_exports.record(external_exports.string(), Kt).refine((e2) => Object.keys(e2).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).extend({ version: external_exports.literal(3).describe("Configuration schema version"), contract: Vt.optional().describe("Named contracts with extends inheritance and dot-path references") }).describe("walkerOS flow configuration (walkeros.config.json)");
14220
- external_exports.toJSONSchema(Zt, { target: "draft-7" }), Ye(Kt), Ye(Jt), Ye(Wt), Ye(Lt), Ye(Ut), Ye(Ft), Ye(Vt);
14221
- var Qt = external_exports.object({ lang: external_exports.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: external_exports.string().describe("Code snippet") });
14222
- var Xt = external_exports.object({ text: external_exports.string().describe("Short actionable hint text focused on walkerOS usage"), code: external_exports.array(Qt).optional().describe("Optional code snippets") });
14223
- var Yt = (external_exports.record(external_exports.string(), Xt).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples"), /* @__PURE__ */ new Set(["env", "onError", "onLog", "primary"]));
14224
- var ei = { source: mt.configJsonSchema, destination: Mn.configJsonSchema };
14226
+ var di = external_exports.object({ $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'), include: external_exports.array(external_exports.string()).optional().describe("Folders to include in the bundle output"), variables: Ft.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"), definitions: Vt.optional().describe("Reusable configuration definitions (use $def.name syntax)"), flows: external_exports.record(external_exports.string(), li).refine((e2) => Object.keys(e2).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).extend({ version: external_exports.literal(3).describe("Configuration schema version"), contract: ci.optional().describe("Named contracts with extends inheritance and dot-path references") }).describe("walkerOS flow configuration (walkeros.config.json)");
14227
+ external_exports.toJSONSchema(di, { target: "draft-7" }), cn(li), cn(ei), cn(ti), cn(ni), cn(ii), cn(ai), cn(ci);
14228
+ var pi = external_exports.object({ lang: external_exports.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: external_exports.string().describe("Code snippet") });
14229
+ var fi = external_exports.object({ text: external_exports.string().describe("Short actionable hint text focused on walkerOS usage"), code: external_exports.array(pi).optional().describe("Optional code snippets") });
14230
+ var bi = (external_exports.record(external_exports.string(), fi).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples"), /* @__PURE__ */ new Set(["env", "onError", "onLog", "primary"]));
14231
+ var gi = { source: xt.configJsonSchema, destination: Bn.configJsonSchema };
14225
14232
 
14226
14233
  // src/examples/step.ts
14227
14234
  var purchase = {
14228
- in: ae("order complete", { timestamp: 1700000100 }),
14235
+ in: de("order complete", { timestamp: 1700000100 }),
14229
14236
  mapping: {
14230
14237
  name: "purchase",
14231
14238
  settings: {
@@ -14244,7 +14251,7 @@ var purchase = {
14244
14251
  loop: [
14245
14252
  "nested",
14246
14253
  {
14247
- condition: (entity) => Q(entity) && entity.entity === "product",
14254
+ condition: (entity) => Y(entity) && entity.entity === "product",
14248
14255
  map: {
14249
14256
  item_id: "data.id",
14250
14257
  item_name: "data.name",
@@ -14274,7 +14281,7 @@ var purchase = {
14274
14281
  ]
14275
14282
  };
14276
14283
  var addToCart = {
14277
- in: ae("product add", { timestamp: 1700000101 }),
14284
+ in: de("product add", { timestamp: 1700000101 }),
14278
14285
  mapping: {
14279
14286
  name: "add_to_cart",
14280
14287
  settings: {
@@ -14313,12 +14320,12 @@ var addToCart = {
14313
14320
  ]
14314
14321
  };
14315
14322
  var pageView = {
14316
- in: ae("page view", { timestamp: 1700000102 }),
14323
+ in: de("page view", { timestamp: 1700000102 }),
14317
14324
  mapping: void 0,
14318
14325
  out: ["event", "page_view", { send_to: "G-XXXXXX-1" }]
14319
14326
  };
14320
14327
  var googleAdsConversion = {
14321
- in: ae("order complete", { timestamp: 1700000103 }),
14328
+ in: de("order complete", { timestamp: 1700000103 }),
14322
14329
  mapping: {
14323
14330
  name: "PURCHASE_CONV",
14324
14331
  settings: {
@@ -14341,7 +14348,7 @@ var googleAdsConversion = {
14341
14348
  ]
14342
14349
  };
14343
14350
  var gtmDataLayerPush = {
14344
- in: ae("page view", { timestamp: 1700000104 }),
14351
+ in: de("page view", { timestamp: 1700000104 }),
14345
14352
  mapping: {
14346
14353
  name: "page_view",
14347
14354
  settings: {
@@ -14377,7 +14384,7 @@ var consentModeV2 = {
14377
14384
  ]
14378
14385
  };
14379
14386
  var ga4WithIncludeAll = {
14380
- in: ae("page view", { timestamp: 1700000106 }),
14387
+ in: de("page view", { timestamp: 1700000106 }),
14381
14388
  mapping: {
14382
14389
  settings: {
14383
14390
  ga4: {
@@ -14420,7 +14427,7 @@ var ga4WithIncludeAll = {
14420
14427
  ]
14421
14428
  };
14422
14429
  var multipleToolsSimultaneous = {
14423
- in: ae("order complete", { timestamp: 1700000107 }),
14430
+ in: de("order complete", { timestamp: 1700000107 }),
14424
14431
  mapping: {
14425
14432
  name: "purchase",
14426
14433
  settings: {