@heycater/qualification-funnel 1.19.29 → 1.19.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -7224,15 +7224,21 @@ const EVENT_TYPE_ITEMS = [
7224
7224
  },
7225
7225
  {
7226
7226
  value: "conference",
7227
- labelDe: "Konferenz/Messe",
7228
- labelEn: "Conference/Trade Show",
7227
+ labelDe: "Konferenz / Messe",
7228
+ labelEn: "Conference / Trade Show",
7229
7229
  iconName: "conference"
7230
7230
  },
7231
7231
  {
7232
7232
  value: "workshop",
7233
- labelDe: "Workshop/Teamtag",
7234
- labelEn: "Workshop/Team Day",
7233
+ labelDe: "Workshop / Teamtag",
7234
+ labelEn: "Workshop / Team Day",
7235
7235
  iconName: "workshop"
7236
+ },
7237
+ {
7238
+ value: "other",
7239
+ labelDe: "Anderer Anlass",
7240
+ labelEn: "Other occasion",
7241
+ iconName: "other"
7236
7242
  }
7237
7243
  ];
7238
7244
  function mapEventTypeToServiceAndCategory(eventType) {
@@ -12703,7 +12709,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
12703
12709
  var ys = arrObjKeys(obj, inspect2);
12704
12710
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
12705
12711
  var protoTag = obj instanceof Object ? "" : "null prototype";
12706
- var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
12712
+ var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
12707
12713
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
12708
12714
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
12709
12715
  if (ys.length === 0) {
@@ -12728,25 +12734,25 @@ function canTrustToString(obj) {
12728
12734
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
12729
12735
  }
12730
12736
  function isArray$3(obj) {
12731
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
12737
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
12732
12738
  }
12733
12739
  function isDate(obj) {
12734
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
12740
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
12735
12741
  }
12736
12742
  function isRegExp$1(obj) {
12737
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
12743
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
12738
12744
  }
12739
12745
  function isError(obj) {
12740
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
12746
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
12741
12747
  }
12742
12748
  function isString(obj) {
12743
- return toStr(obj) === "[object String]" && canTrustToString(obj);
12749
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
12744
12750
  }
12745
12751
  function isNumber(obj) {
12746
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
12752
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
12747
12753
  }
12748
12754
  function isBoolean(obj) {
12749
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
12755
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
12750
12756
  }
12751
12757
  function isSymbol(obj) {
12752
12758
  if (hasShammedSymbols) {
@@ -12782,7 +12788,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
12782
12788
  function has$4(obj, key) {
12783
12789
  return hasOwn$1.call(obj, key);
12784
12790
  }
12785
- function toStr(obj) {
12791
+ function toStr$1(obj) {
12786
12792
  return objectToString.call(obj);
12787
12793
  }
12788
12794
  function nameOf(f) {
@@ -13091,7 +13097,7 @@ var syntax = SyntaxError;
13091
13097
  var uri = URIError;
13092
13098
  var abs$1 = Math.abs;
13093
13099
  var floor$1 = Math.floor;
13094
- var max$1 = Math.max;
13100
+ var max$2 = Math.max;
13095
13101
  var min$1 = Math.min;
13096
13102
  var pow$1 = Math.pow;
13097
13103
  var round$2 = Math.round;
@@ -13220,99 +13226,78 @@ function requireObject_getPrototypeOf() {
13220
13226
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
13221
13227
  return Object_getPrototypeOf;
13222
13228
  }
13223
- var implementation;
13224
- var hasRequiredImplementation;
13225
- function requireImplementation() {
13226
- if (hasRequiredImplementation) return implementation;
13227
- hasRequiredImplementation = 1;
13228
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
13229
- var toStr2 = Object.prototype.toString;
13230
- var max2 = Math.max;
13231
- var funcType = "[object Function]";
13232
- var concatty = function concatty2(a3, b2) {
13233
- var arr = [];
13234
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
13235
- arr[i2] = a3[i2];
13236
- }
13237
- for (var j = 0; j < b2.length; j += 1) {
13238
- arr[j + a3.length] = b2[j];
13239
- }
13240
- return arr;
13241
- };
13242
- var slicy = function slicy2(arrLike, offset2) {
13243
- var arr = [];
13244
- for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
13245
- arr[j] = arrLike[i2];
13229
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
13230
+ var toStr = Object.prototype.toString;
13231
+ var max$1 = Math.max;
13232
+ var funcType = "[object Function]";
13233
+ var concatty = function concatty2(a3, b2) {
13234
+ var arr = [];
13235
+ for (var i2 = 0; i2 < a3.length; i2 += 1) {
13236
+ arr[i2] = a3[i2];
13237
+ }
13238
+ for (var j = 0; j < b2.length; j += 1) {
13239
+ arr[j + a3.length] = b2[j];
13240
+ }
13241
+ return arr;
13242
+ };
13243
+ var slicy = function slicy2(arrLike, offset2) {
13244
+ var arr = [];
13245
+ for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
13246
+ arr[j] = arrLike[i2];
13247
+ }
13248
+ return arr;
13249
+ };
13250
+ var joiny = function(arr, joiner) {
13251
+ var str = "";
13252
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
13253
+ str += arr[i2];
13254
+ if (i2 + 1 < arr.length) {
13255
+ str += joiner;
13246
13256
  }
13247
- return arr;
13248
- };
13249
- var joiny = function(arr, joiner) {
13250
- var str = "";
13251
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
13252
- str += arr[i2];
13253
- if (i2 + 1 < arr.length) {
13254
- str += joiner;
13257
+ }
13258
+ return str;
13259
+ };
13260
+ var implementation$1 = function bind(that) {
13261
+ var target = this;
13262
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
13263
+ throw new TypeError(ERROR_MESSAGE + target);
13264
+ }
13265
+ var args = slicy(arguments, 1);
13266
+ var bound;
13267
+ var binder = function() {
13268
+ if (this instanceof bound) {
13269
+ var result = target.apply(
13270
+ this,
13271
+ concatty(args, arguments)
13272
+ );
13273
+ if (Object(result) === result) {
13274
+ return result;
13255
13275
  }
13276
+ return this;
13256
13277
  }
13257
- return str;
13278
+ return target.apply(
13279
+ that,
13280
+ concatty(args, arguments)
13281
+ );
13258
13282
  };
13259
- implementation = function bind2(that) {
13260
- var target = this;
13261
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
13262
- throw new TypeError(ERROR_MESSAGE + target);
13263
- }
13264
- var args = slicy(arguments, 1);
13265
- var bound;
13266
- var binder = function() {
13267
- if (this instanceof bound) {
13268
- var result = target.apply(
13269
- this,
13270
- concatty(args, arguments)
13271
- );
13272
- if (Object(result) === result) {
13273
- return result;
13274
- }
13275
- return this;
13276
- }
13277
- return target.apply(
13278
- that,
13279
- concatty(args, arguments)
13280
- );
13283
+ var boundLength = max$1(0, target.length - args.length);
13284
+ var boundArgs = [];
13285
+ for (var i2 = 0; i2 < boundLength; i2++) {
13286
+ boundArgs[i2] = "$" + i2;
13287
+ }
13288
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13289
+ if (target.prototype) {
13290
+ var Empty = function Empty2() {
13281
13291
  };
13282
- var boundLength = max2(0, target.length - args.length);
13283
- var boundArgs = [];
13284
- for (var i2 = 0; i2 < boundLength; i2++) {
13285
- boundArgs[i2] = "$" + i2;
13286
- }
13287
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
13288
- if (target.prototype) {
13289
- var Empty = function Empty2() {
13290
- };
13291
- Empty.prototype = target.prototype;
13292
- bound.prototype = new Empty();
13293
- Empty.prototype = null;
13294
- }
13295
- return bound;
13296
- };
13297
- return implementation;
13298
- }
13299
- var functionBind;
13300
- var hasRequiredFunctionBind;
13301
- function requireFunctionBind() {
13302
- if (hasRequiredFunctionBind) return functionBind;
13303
- hasRequiredFunctionBind = 1;
13304
- var implementation2 = requireImplementation();
13305
- functionBind = Function.prototype.bind || implementation2;
13306
- return functionBind;
13307
- }
13308
- var functionCall;
13309
- var hasRequiredFunctionCall;
13310
- function requireFunctionCall() {
13311
- if (hasRequiredFunctionCall) return functionCall;
13312
- hasRequiredFunctionCall = 1;
13313
- functionCall = Function.prototype.call;
13314
- return functionCall;
13315
- }
13292
+ Empty.prototype = target.prototype;
13293
+ bound.prototype = new Empty();
13294
+ Empty.prototype = null;
13295
+ }
13296
+ return bound;
13297
+ };
13298
+ var implementation = implementation$1;
13299
+ var functionBind = Function.prototype.bind || implementation;
13300
+ var functionCall = Function.prototype.call;
13316
13301
  var functionApply;
13317
13302
  var hasRequiredFunctionApply;
13318
13303
  function requireFunctionApply() {
@@ -13322,14 +13307,14 @@ function requireFunctionApply() {
13322
13307
  return functionApply;
13323
13308
  }
13324
13309
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
13325
- var bind$2 = requireFunctionBind();
13310
+ var bind$2 = functionBind;
13326
13311
  var $apply$1 = requireFunctionApply();
13327
- var $call$2 = requireFunctionCall();
13312
+ var $call$2 = functionCall;
13328
13313
  var $reflectApply = reflectApply;
13329
13314
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
13330
- var bind$1 = requireFunctionBind();
13315
+ var bind$1 = functionBind;
13331
13316
  var $TypeError$4 = type;
13332
- var $call$1 = requireFunctionCall();
13317
+ var $call$1 = functionCall;
13333
13318
  var $actualApply = actualApply;
13334
13319
  var callBindApplyHelpers = function callBindBasic(args) {
13335
13320
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -13395,8 +13380,8 @@ function requireHasown() {
13395
13380
  hasRequiredHasown = 1;
13396
13381
  var call = Function.prototype.call;
13397
13382
  var $hasOwn = Object.prototype.hasOwnProperty;
13398
- var bind2 = requireFunctionBind();
13399
- hasown = bind2.call(call, $hasOwn);
13383
+ var bind3 = functionBind;
13384
+ hasown = bind3.call(call, $hasOwn);
13400
13385
  return hasown;
13401
13386
  }
13402
13387
  var undefined$1;
@@ -13410,7 +13395,7 @@ var $TypeError$3 = type;
13410
13395
  var $URIError = uri;
13411
13396
  var abs = abs$1;
13412
13397
  var floor = floor$1;
13413
- var max = max$1;
13398
+ var max = max$2;
13414
13399
  var min = min$1;
13415
13400
  var pow = pow$1;
13416
13401
  var round$1 = round$2;
@@ -13444,7 +13429,7 @@ var getProto = requireGetProto();
13444
13429
  var $ObjectGPO = requireObject_getPrototypeOf();
13445
13430
  var $ReflectGPO = requireReflect_getPrototypeOf();
13446
13431
  var $apply = requireFunctionApply();
13447
- var $call = requireFunctionCall();
13432
+ var $call = functionCall;
13448
13433
  var needsEval = {};
13449
13434
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
13450
13435
  var INTRINSICS = {
@@ -13615,13 +13600,13 @@ var LEGACY_ALIASES = {
13615
13600
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13616
13601
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13617
13602
  };
13618
- var bind = requireFunctionBind();
13603
+ var bind2 = functionBind;
13619
13604
  var hasOwn = requireHasown();
13620
- var $concat = bind.call($call, Array.prototype.concat);
13621
- var $spliceApply = bind.call($apply, Array.prototype.splice);
13622
- var $replace = bind.call($call, String.prototype.replace);
13623
- var $strSlice = bind.call($call, String.prototype.slice);
13624
- var $exec = bind.call($call, RegExp.prototype.exec);
13605
+ var $concat = bind2.call($call, Array.prototype.concat);
13606
+ var $spliceApply = bind2.call($apply, Array.prototype.splice);
13607
+ var $replace = bind2.call($call, String.prototype.replace);
13608
+ var $strSlice = bind2.call($call, String.prototype.slice);
13609
+ var $exec = bind2.call($call, RegExp.prototype.exec);
13625
13610
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13626
13611
  var reEscapeChar = /\\(\\)?/g;
13627
13612
  var stringToPath = function stringToPath2(string2) {
@@ -26840,9 +26825,10 @@ function useFunnelCheckout() {
26840
26825
  const { locale: locale2 } = useRouter();
26841
26826
  const client = useClient();
26842
26827
  const funnelCheckout = async (variables) => {
26843
- var _a2;
26844
26828
  try {
26845
- const result = await funnelCheckoutMutation(
26829
+ const {
26830
+ data: { funnelCheckout: response }
26831
+ } = await funnelCheckoutMutation(
26846
26832
  {
26847
26833
  userAttributes: {
26848
26834
  email: variables.email,
@@ -26856,22 +26842,13 @@ function useFunnelCheckout() {
26856
26842
  },
26857
26843
  { client }
26858
26844
  );
26859
- if (!((_a2 = result == null ? void 0 : result.data) == null ? void 0 : _a2.funnelCheckout)) {
26860
- const error = new Error("funnelCheckout returned no data");
26861
- BugsnagExport.notify(error, (event) => {
26862
- event.addMetadata("funnelCheckoutArgs", variables);
26863
- event.addMetadata("funnelCheckoutResult", result);
26864
- });
26865
- throw error;
26866
- }
26867
- return result.data.funnelCheckout;
26845
+ return response;
26868
26846
  } catch (error) {
26869
26847
  if (error instanceof Error) {
26870
26848
  BugsnagExport.notify(error, (event) => {
26871
26849
  event.addMetadata("funnelCheckoutArgs", variables);
26872
26850
  });
26873
26851
  }
26874
- throw error;
26875
26852
  }
26876
26853
  };
26877
26854
  return {
@@ -27059,18 +27036,17 @@ function useRequestForm() {
27059
27036
  return { success: false, isUkLead };
27060
27037
  }
27061
27038
  } else {
27062
- try {
27063
- const result = await funnelCheckout(buildOpportunityPayload(values2));
27064
- return {
27065
- signInToken: result.signInToken,
27066
- customerAccount: result.customerAccount,
27067
- opportunity: result.opportunity,
27068
- isUkLead: false
27069
- };
27070
- } catch (error) {
27071
- console.error("[HeyCater Funnel] funnelCheckout failed:", error);
27072
- throw error;
27073
- }
27039
+ const {
27040
+ signInToken,
27041
+ customerAccount,
27042
+ opportunity
27043
+ } = await funnelCheckout(buildOpportunityPayload(values2));
27044
+ return {
27045
+ signInToken,
27046
+ customerAccount,
27047
+ opportunity,
27048
+ isUkLead: false
27049
+ };
27074
27050
  }
27075
27051
  };
27076
27052
  return {
@@ -30562,9 +30538,10 @@ const EVENT_TYPE_TO_ICON = {
30562
30538
  lunch: "business_lunch",
30563
30539
  breakfast: "breakfast",
30564
30540
  party: "buffet",
30565
- meeting: "fingerfood",
30566
- conference: "buffet",
30567
- workshop: "business_lunch"
30541
+ meeting: "drinks",
30542
+ conference: "fine_dining",
30543
+ workshop: "fingerfood",
30544
+ other: null
30568
30545
  };
30569
30546
  const EventTypeTiles = ({
30570
30547
  onSelect,
@@ -30589,10 +30566,11 @@ const EventTypeTiles = ({
30589
30566
  children: [
30590
30567
  isSelected && /* @__PURE__ */ jsx(SelectionBadge, { children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) }),
30591
30568
  /* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(EventIcon, { iconName: item.iconName }) }),
30592
- /* @__PURE__ */ jsx(TileLabel, { children: label.includes("/") ? /* @__PURE__ */ jsxs(Fragment, { children: [
30593
- label.split("/")[0],
30569
+ /* @__PURE__ */ jsx(TileLabel, { children: label.includes(" / ") ? /* @__PURE__ */ jsxs(Fragment, { children: [
30570
+ label.split(" / ")[0],
30571
+ " /",
30594
30572
  /* @__PURE__ */ jsx("br", {}),
30595
- label.split("/")[1]
30573
+ label.split(" / ")[1]
30596
30574
  ] }) : label })
30597
30575
  ]
30598
30576
  },
@@ -30603,7 +30581,7 @@ const EventTypeTiles = ({
30603
30581
  const EventIcon = ({ iconName }) => {
30604
30582
  const mappedIcon = EVENT_TYPE_TO_ICON[iconName];
30605
30583
  if (!mappedIcon) {
30606
- return /* @__PURE__ */ jsx(QuestionMark, { height: "46px" });
30584
+ return /* @__PURE__ */ jsx(GreyIconWrapper, { children: /* @__PURE__ */ jsx(QuestionMark, { height: "46px" }) });
30607
30585
  }
30608
30586
  return /* @__PURE__ */ jsx(
30609
30587
  StyledImg,
@@ -30618,6 +30596,10 @@ const EventIcon = ({ iconName }) => {
30618
30596
  const StyledImg = styled.img`
30619
30597
  object-fit: contain;
30620
30598
  `;
30599
+ const GreyIconWrapper = styled.div`
30600
+ opacity: 0.4;
30601
+ filter: grayscale(100%);
30602
+ `;
30621
30603
  const popIn = keyframes`
30622
30604
  0% { transform: scale(0.4); opacity: 0; }
30623
30605
  60% { transform: scale(1.12); }
@@ -30964,35 +30946,94 @@ const BudgetPeopleStep = ({
30964
30946
  var _a2;
30965
30947
  const { i18n } = useTranslation();
30966
30948
  const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
30949
+ const [peopleInputValue, setPeopleInputValue] = useState(String(peopleCount));
30950
+ const [budgetInputValue, setBudgetInputValue] = useState(String(budgetPerPerson2));
30951
+ const peopleInputRef = useRef(null);
30952
+ const budgetInputRef = useRef(null);
30967
30953
  const totalBudget = peopleCount * budgetPerPerson2;
30968
30954
  const formattedTotal = totalBudget.toLocaleString("de-DE");
30969
30955
  const handlePeopleIncrement = useCallback(() => {
30970
- onPeopleCountChange(peopleCount + 5);
30956
+ const newValue = peopleCount + 5;
30957
+ onPeopleCountChange(newValue);
30958
+ setPeopleInputValue(String(newValue));
30971
30959
  }, [peopleCount, onPeopleCountChange]);
30972
30960
  const handlePeopleDecrement = useCallback(() => {
30973
- onPeopleCountChange(Math.max(1, peopleCount - 5));
30961
+ const newValue = Math.max(1, peopleCount - 5);
30962
+ onPeopleCountChange(newValue);
30963
+ setPeopleInputValue(String(newValue));
30974
30964
  }, [peopleCount, onPeopleCountChange]);
30975
30965
  const handleBudgetIncrement = useCallback(() => {
30976
- onBudgetPerPersonChange(budgetPerPerson2 + 5);
30966
+ const newValue = budgetPerPerson2 + 5;
30967
+ onBudgetPerPersonChange(newValue);
30968
+ setBudgetInputValue(String(newValue));
30977
30969
  }, [budgetPerPerson2, onBudgetPerPersonChange]);
30978
30970
  const handleBudgetDecrement = useCallback(() => {
30979
- onBudgetPerPersonChange(Math.max(5, budgetPerPerson2 - 5));
30971
+ const newValue = Math.max(5, budgetPerPerson2 - 5);
30972
+ onBudgetPerPersonChange(newValue);
30973
+ setBudgetInputValue(String(newValue));
30980
30974
  }, [budgetPerPerson2, onBudgetPerPersonChange]);
30975
+ const handlePeopleInputChange = useCallback((e2) => {
30976
+ const value = e2.target.value.replace(/[^0-9]/g, "");
30977
+ setPeopleInputValue(value);
30978
+ const numValue = parseInt(value, 10);
30979
+ if (!isNaN(numValue) && numValue >= 1) {
30980
+ onPeopleCountChange(numValue);
30981
+ }
30982
+ }, [onPeopleCountChange]);
30983
+ const handlePeopleInputBlur = useCallback(() => {
30984
+ const numValue = parseInt(peopleInputValue, 10);
30985
+ if (isNaN(numValue) || numValue < 1) {
30986
+ setPeopleInputValue(String(peopleCount));
30987
+ }
30988
+ }, [peopleInputValue, peopleCount]);
30989
+ const handleBudgetInputChange = useCallback((e2) => {
30990
+ const value = e2.target.value.replace(/[^0-9]/g, "");
30991
+ setBudgetInputValue(value);
30992
+ const numValue = parseInt(value, 10);
30993
+ if (!isNaN(numValue) && numValue >= 1) {
30994
+ onBudgetPerPersonChange(numValue);
30995
+ }
30996
+ }, [onBudgetPerPersonChange]);
30997
+ const handleBudgetInputBlur = useCallback(() => {
30998
+ const numValue = parseInt(budgetInputValue, 10);
30999
+ if (isNaN(numValue) || numValue < 1) {
31000
+ setBudgetInputValue(String(budgetPerPerson2));
31001
+ }
31002
+ }, [budgetInputValue, budgetPerPerson2]);
31003
+ const handlePresetClick = useCallback((preset) => {
31004
+ onPeopleCountChange(preset);
31005
+ setPeopleInputValue(String(preset));
31006
+ }, [onPeopleCountChange]);
30981
31007
  return /* @__PURE__ */ jsx(Container$2, { children: /* @__PURE__ */ jsxs(Card, { children: [
30982
31008
  /* @__PURE__ */ jsxs(Row, { children: [
30983
31009
  /* @__PURE__ */ jsx(Label, { children: isGerman ? "Personenanzahl" : "Number of people" }),
30984
31010
  /* @__PURE__ */ jsxs(InputGroup, { children: [
30985
- /* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleDecrement, children: "−" }),
30986
- /* @__PURE__ */ jsx(ValueDisplay, { children: peopleCount }),
30987
- /* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleIncrement, children: "+" })
31011
+ /* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleDecrement, type: "button", children: "−" }),
31012
+ /* @__PURE__ */ jsx(
31013
+ ValueInput,
31014
+ {
31015
+ ref: peopleInputRef,
31016
+ type: "tel",
31017
+ inputMode: "numeric",
31018
+ value: peopleInputValue,
31019
+ onChange: handlePeopleInputChange,
31020
+ onBlur: handlePeopleInputBlur
31021
+ }
31022
+ ),
31023
+ /* @__PURE__ */ jsx(StepButton, { onClick: handlePeopleIncrement, type: "button", children: "+" })
30988
31024
  ] })
30989
31025
  ] }),
30990
- /* @__PURE__ */ jsx(PresetRow, { children: PRESETS.map((preset) => /* @__PURE__ */ jsx(
30991
- PresetButton,
31026
+ /* @__PURE__ */ jsx(PresetRow, { children: PRESETS.map((preset) => /* @__PURE__ */ jsxs(
31027
+ PresetLink,
30992
31028
  {
30993
31029
  $selected: peopleCount === preset,
30994
- onClick: () => onPeopleCountChange(preset),
30995
- children: preset
31030
+ onClick: () => handlePresetClick(preset),
31031
+ type: "button",
31032
+ children: [
31033
+ preset,
31034
+ " ",
31035
+ isGerman ? "Personen" : "People"
31036
+ ]
30996
31037
  },
30997
31038
  preset
30998
31039
  )) }),
@@ -31003,12 +31044,22 @@ const BudgetPeopleStep = ({
31003
31044
  isGerman ? "pro Person" : "per person"
31004
31045
  ] }),
31005
31046
  /* @__PURE__ */ jsxs(InputGroup, { children: [
31006
- /* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetDecrement, children: "−" }),
31007
- /* @__PURE__ */ jsxs(ValueDisplay, { children: [
31008
- budgetPerPerson2,
31009
- " €"
31047
+ /* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetDecrement, type: "button", children: "−" }),
31048
+ /* @__PURE__ */ jsxs(ValueInputWrapper, { children: [
31049
+ /* @__PURE__ */ jsx(
31050
+ ValueInput,
31051
+ {
31052
+ ref: budgetInputRef,
31053
+ type: "tel",
31054
+ inputMode: "numeric",
31055
+ value: budgetInputValue,
31056
+ onChange: handleBudgetInputChange,
31057
+ onBlur: handleBudgetInputBlur
31058
+ }
31059
+ ),
31060
+ /* @__PURE__ */ jsx(CurrencyLabel, { children: "€" })
31010
31061
  ] }),
31011
- /* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetIncrement, children: "+" })
31062
+ /* @__PURE__ */ jsx(StepButton, { onClick: handleBudgetIncrement, type: "button", children: "+" })
31012
31063
  ] })
31013
31064
  ] }),
31014
31065
  /* @__PURE__ */ jsxs(TotalRow, { children: [
@@ -31078,47 +31129,64 @@ const StepButton = styled.button`
31078
31129
  transform: scale(0.95);
31079
31130
  }
31080
31131
  `;
31081
- const ValueDisplay = styled.div`
31082
- width: 96px;
31132
+ const ValueInput = styled.input`
31133
+ width: 80px;
31083
31134
  height: 40px;
31084
31135
  border-radius: 12px;
31085
31136
  background: ${REDESIGN_COLORS.white};
31086
31137
  border: 1px solid ${REDESIGN_COLORS.inputBorder};
31138
+ font-family: ${REDESIGN_FONTS.family};
31139
+ font-weight: ${REDESIGN_FONTS.weight.semibold};
31140
+ font-size: 16px;
31141
+ color: ${REDESIGN_COLORS.mainText};
31142
+ text-align: center;
31143
+ outline: none;
31144
+ transition: border-color 0.15s;
31145
+
31146
+ &:focus {
31147
+ border-color: ${REDESIGN_COLORS.orange};
31148
+ }
31149
+
31150
+ &::-webkit-outer-spin-button,
31151
+ &::-webkit-inner-spin-button {
31152
+ -webkit-appearance: none;
31153
+ margin: 0;
31154
+ }
31155
+ `;
31156
+ const ValueInputWrapper = styled.div`
31157
+ position: relative;
31087
31158
  display: flex;
31088
31159
  align-items: center;
31089
- justify-content: center;
31160
+ `;
31161
+ const CurrencyLabel = styled.span`
31162
+ position: absolute;
31163
+ right: 12px;
31090
31164
  font-family: ${REDESIGN_FONTS.family};
31091
31165
  font-weight: ${REDESIGN_FONTS.weight.semibold};
31092
31166
  font-size: 16px;
31093
31167
  color: ${REDESIGN_COLORS.mainText};
31168
+ pointer-events: none;
31094
31169
  `;
31095
31170
  const PresetRow = styled.div`
31096
31171
  display: flex;
31097
- gap: 8px;
31172
+ gap: 16px;
31098
31173
  margin-bottom: 20px;
31174
+ flex-wrap: wrap;
31099
31175
  `;
31100
- const PresetButton = styled.button`
31101
- width: 44px;
31102
- height: 44px;
31103
- border-radius: 50%;
31176
+ const PresetLink = styled.button`
31177
+ background: none;
31178
+ border: none;
31179
+ padding: 0;
31104
31180
  font-family: ${REDESIGN_FONTS.family};
31105
31181
  font-size: 13px;
31106
- cursor: pointer;
31107
- display: flex;
31108
- align-items: center;
31109
- justify-content: center;
31110
- text-align: center;
31111
- line-height: 1;
31112
- flex: none;
31113
- box-sizing: border-box;
31114
- transition: all 0.15s;
31115
- background: ${({ $selected }) => $selected ? REDESIGN_COLORS.orange : REDESIGN_COLORS.white};
31116
- color: ${({ $selected }) => $selected ? "#fff" : REDESIGN_COLORS.secondaryText};
31117
- border: 1px solid ${({ $selected }) => $selected ? REDESIGN_COLORS.orange : REDESIGN_COLORS.inputBorder};
31182
+ color: ${({ $selected }) => $selected ? REDESIGN_COLORS.mainText : REDESIGN_COLORS.secondaryText};
31118
31183
  font-weight: ${({ $selected }) => $selected ? REDESIGN_FONTS.weight.semibold : REDESIGN_FONTS.weight.regular};
31184
+ text-decoration: underline;
31185
+ cursor: pointer;
31186
+ transition: color 0.15s;
31119
31187
 
31120
31188
  &:hover {
31121
- border-color: ${REDESIGN_COLORS.orange};
31189
+ color: ${REDESIGN_COLORS.mainText};
31122
31190
  }
31123
31191
  `;
31124
31192
  const Divider = styled.div`
@@ -31168,9 +31236,9 @@ const REDESIGN_STEPS = {
31168
31236
  [REDESIGN_STEP_IDS.city]: {
31169
31237
  id: REDESIGN_STEP_IDS.city,
31170
31238
  titleDe: "Wo findet dein Event statt?",
31171
- titleEn: "Where is your event?",
31172
- subtitleDe: "Wähle deinen Standort – dort finden wir die passenden Caterer.",
31173
- subtitleEn: "Choose your location – we'll find the right caterers there.",
31239
+ titleEn: "Where is your event taking place?",
31240
+ subtitleDe: "Wähle deinen Standort – wir kennen die besten Caterer in deiner Region.",
31241
+ subtitleEn: "Choose your location – we know the best caterers around you.",
31174
31242
  breadcrumbDe: "Stadt",
31175
31243
  breadcrumbEn: "City"
31176
31244
  },
@@ -31201,68 +31269,81 @@ const REDESIGN_STEPS = {
31201
31269
  },
31202
31270
  [REDESIGN_STEP_IDS.contact]: {
31203
31271
  id: REDESIGN_STEP_IDS.contact,
31204
- titleDe: "Fast geschafft! Wie können wir dich erreichen?",
31205
- titleEn: "Almost done! How can we reach you?",
31206
- breadcrumbDe: "Kontakt",
31207
- breadcrumbEn: "Contact"
31272
+ titleDe: "Wohin dürfen wir deine Angebote schicken?",
31273
+ titleEn: "Where should we send your quotes?",
31274
+ subtitleDe: "Nur noch deine Kontaktdaten – danach erhältst du kostenlos & unverbindlich passende Angebote.",
31275
+ subtitleEn: "Just your contact details, and you'll receive matching quotes, free and with no obligation.",
31276
+ breadcrumbDe: "Angebote erhalten",
31277
+ breadcrumbEn: "Get quotes"
31208
31278
  }
31209
31279
  };
31210
- function getRedesignTotalSteps() {
31211
- return REDESIGN_STEP_ORDER.length + 1;
31212
- }
31213
- const RAIL_DISPLAY_STEPS = [
31214
- ...REDESIGN_STEP_ORDER,
31215
- REDESIGN_STEP_IDS.contact
31216
- ];
31217
- const StepRail = ({ currentStepId, onStepClick }) => {
31280
+ const StepRail = ({ currentStepId, onStepClick, answers }) => {
31218
31281
  var _a2;
31219
31282
  const { i18n } = useTranslation();
31220
31283
  const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
31221
- const currentIndex = RAIL_DISPLAY_STEPS.indexOf(currentStepId);
31284
+ const { state } = useQualification();
31285
+ const isCityStepDisabled = useMemo(() => {
31286
+ if (!("qualification" in state)) return false;
31287
+ const cityStep2 = state.qualification.steps.find((s3) => s3.id === "city");
31288
+ return (cityStep2 == null ? void 0 : cityStep2.disabled) === true;
31289
+ }, ["qualification" in state ? state.qualification.steps : null]);
31290
+ const railDisplaySteps = useMemo(() => {
31291
+ const steps2 = isCityStepDisabled ? REDESIGN_STEP_ORDER.filter((step2) => step2 !== REDESIGN_STEP_IDS.city) : [...REDESIGN_STEP_ORDER];
31292
+ return [...steps2, REDESIGN_STEP_IDS.contact];
31293
+ }, [isCityStepDisabled]);
31294
+ const currentIndex = railDisplaySteps.indexOf(currentStepId);
31222
31295
  const handleStepClick = (stepId, index) => {
31223
31296
  if (index < currentIndex && onStepClick && stepId !== REDESIGN_STEP_IDS.contact) {
31224
31297
  onStepClick(stepId);
31225
31298
  }
31226
31299
  };
31300
+ const getAnswerDisplay = (stepId) => {
31301
+ if (!answers) return null;
31302
+ switch (stepId) {
31303
+ case REDESIGN_STEP_IDS.city:
31304
+ return answers.city ? CITY_LABELS[answers.city] || answers.city : null;
31305
+ case REDESIGN_STEP_IDS.eventType:
31306
+ if (!answers.eventType) return null;
31307
+ const labels2 = isGerman ? EVENT_LABELS_DE : EVENT_LABELS_EN;
31308
+ return labels2[answers.eventType] || answers.eventType;
31309
+ case REDESIGN_STEP_IDS.date:
31310
+ return answers.eventDate ? format(answers.eventDate, "dd.MM.yy") : null;
31311
+ case REDESIGN_STEP_IDS.peopleCount:
31312
+ return answers.peopleCount ? `${answers.peopleCount} Pax` : null;
31313
+ default:
31314
+ return null;
31315
+ }
31316
+ };
31227
31317
  return /* @__PURE__ */ jsxs(RailContainer, { children: [
31228
31318
  /* @__PURE__ */ jsxs(TopSection, { children: [
31229
31319
  /* @__PURE__ */ jsx(LogoWrapper$1, { children: /* @__PURE__ */ jsx(Logo, { height: 26 }) }),
31230
31320
  /* @__PURE__ */ jsx(SectionLabel, { children: isGerman ? "Catering anfragen" : "Request catering" }),
31231
31321
  /* @__PURE__ */ jsx(Title$1, { children: isGerman ? "In wenigen Schritten zum passenden Catering." : "Get the perfect catering in just a few steps." }),
31232
- /* @__PURE__ */ jsxs(StepList, { children: [
31233
- RAIL_DISPLAY_STEPS.map((stepId, index) => {
31234
- const step2 = REDESIGN_STEPS[stepId];
31235
- const isActive = index === currentIndex;
31236
- const isCompleted = index < currentIndex;
31237
- const breadcrumb = isGerman ? step2.breadcrumbDe : step2.breadcrumbEn;
31238
- const isClickable = index < currentIndex;
31239
- return /* @__PURE__ */ jsxs(StepItemWrapper, { children: [
31240
- index > 0 && /* @__PURE__ */ jsx(Connector, { $completed: index <= currentIndex }),
31241
- /* @__PURE__ */ jsxs(
31242
- StepRow,
31243
- {
31244
- $clickable: isClickable,
31245
- onClick: () => handleStepClick(stepId, index),
31246
- children: [
31247
- /* @__PURE__ */ jsx(StepCircle, { $isActive: isActive, $isCompleted: isCompleted, children: isCompleted ? /* @__PURE__ */ jsx(CheckIcon$2, {}) : index + 1 }),
31248
- /* @__PURE__ */ jsx(StepLabel, { $isActive: isActive, $isCompleted: isCompleted, children: breadcrumb })
31249
- ]
31250
- }
31251
- )
31252
- ] }, stepId);
31253
- }),
31254
- /* @__PURE__ */ jsx(FinalConnector, {}),
31255
- /* @__PURE__ */ jsxs(OffersRow, { children: [
31256
- /* @__PURE__ */ jsx(OffersCircle, { children: /* @__PURE__ */ jsx(CheckIconMuted, {}) }),
31257
- /* @__PURE__ */ jsxs(OffersText, { children: [
31258
- /* @__PURE__ */ jsxs(OffersTitle, { children: [
31259
- "3 ",
31260
- isGerman ? "passende Angebote" : "matching offers"
31261
- ] }),
31262
- /* @__PURE__ */ jsx(OffersSubtitle, { children: isGerman ? "nach wenigen Stunden" : "within hours" })
31263
- ] })
31264
- ] })
31265
- ] })
31322
+ /* @__PURE__ */ jsx(StepList, { children: railDisplaySteps.map((stepId, index) => {
31323
+ const step2 = REDESIGN_STEPS[stepId];
31324
+ const isActive = index === currentIndex;
31325
+ const isCompleted = index < currentIndex;
31326
+ const breadcrumb = isGerman ? step2.breadcrumbDe : step2.breadcrumbEn;
31327
+ const isClickable = index < currentIndex;
31328
+ const answerDisplay = isCompleted ? getAnswerDisplay(stepId) : null;
31329
+ return /* @__PURE__ */ jsxs(StepItemWrapper, { children: [
31330
+ index > 0 && /* @__PURE__ */ jsx(Connector, { $completed: index <= currentIndex }),
31331
+ /* @__PURE__ */ jsxs(
31332
+ StepRow,
31333
+ {
31334
+ $clickable: isClickable,
31335
+ onClick: () => handleStepClick(stepId, index),
31336
+ children: [
31337
+ /* @__PURE__ */ jsx(StepCircle, { $isActive: isActive, $isCompleted: isCompleted, children: isCompleted ? /* @__PURE__ */ jsx(CheckIcon$2, {}) : index + 1 }),
31338
+ /* @__PURE__ */ jsxs(StepLabelGroup, { children: [
31339
+ /* @__PURE__ */ jsx(StepLabel, { $isActive: isActive, $isCompleted: isCompleted, children: breadcrumb }),
31340
+ answerDisplay && /* @__PURE__ */ jsx(StepAnswerValue, { children: answerDisplay })
31341
+ ] })
31342
+ ]
31343
+ }
31344
+ )
31345
+ ] }, stepId);
31346
+ }) })
31266
31347
  ] }),
31267
31348
  /* @__PURE__ */ jsx(BottomSection, { children: /* @__PURE__ */ jsxs(RatingRow, { children: [
31268
31349
  /* @__PURE__ */ jsx(Stars, { children: "★★★★★" }),
@@ -31275,7 +31356,6 @@ const StepRail = ({ currentStepId, onStepClick }) => {
31275
31356
  ] });
31276
31357
  };
31277
31358
  const CheckIcon$2 = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) });
31278
- const CheckIconMuted = () => /* @__PURE__ */ jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) });
31279
31359
  const RailContainer = styled.div`
31280
31360
  display: none;
31281
31361
 
@@ -31319,13 +31399,8 @@ const Connector = styled.div`
31319
31399
  width: 2px;
31320
31400
  height: ${REDESIGN_SPACING.connectorHeight};
31321
31401
  margin: 3px 0 3px 14px;
31322
- background: ${({ $completed }) => $completed ? REDESIGN_COLORS.mainText : REDESIGN_COLORS.railConnector};
31323
- `;
31324
- const FinalConnector = styled.div`
31325
- width: 2px;
31326
- height: ${REDESIGN_SPACING.connectorHeight};
31327
- margin: 3px 0 3px 14px;
31328
- background: ${REDESIGN_COLORS.railConnector};
31402
+ background: ${({ $completed }) => $completed ? REDESIGN_COLORS.orange : REDESIGN_COLORS.railConnector};
31403
+ transition: background 0.3s ease;
31329
31404
  `;
31330
31405
  const StepRow = styled.div`
31331
31406
  display: flex;
@@ -31352,6 +31427,7 @@ const StepCircle = styled.div`
31352
31427
  font-size: 13px;
31353
31428
  font-weight: ${REDESIGN_FONTS.weight.semibold};
31354
31429
  flex: none;
31430
+ transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
31355
31431
  background: ${({ $isActive, $isCompleted }) => {
31356
31432
  if ($isCompleted) return REDESIGN_COLORS.mainText;
31357
31433
  if ($isActive) return REDESIGN_COLORS.orange;
@@ -31362,45 +31438,39 @@ const StepCircle = styled.div`
31362
31438
  return REDESIGN_COLORS.railMuted;
31363
31439
  }};
31364
31440
  `;
31441
+ const StepLabelGroup = styled.div`
31442
+ display: flex;
31443
+ flex-direction: column;
31444
+ gap: 2px;
31445
+ `;
31365
31446
  const StepLabel = styled.span`
31366
31447
  font-family: ${REDESIGN_FONTS.family};
31367
31448
  font-size: 14px;
31368
31449
  font-weight: ${({ $isActive }) => $isActive ? REDESIGN_FONTS.weight.semibold : REDESIGN_FONTS.weight.regular};
31450
+ transition: color 0.3s ease;
31369
31451
  color: ${({ $isActive, $isCompleted }) => {
31370
31452
  if ($isActive) return REDESIGN_COLORS.mainText;
31371
31453
  if ($isCompleted) return REDESIGN_COLORS.secondaryText;
31372
31454
  return REDESIGN_COLORS.railMuted;
31373
31455
  }};
31374
31456
  `;
31375
- const OffersRow = styled.div`
31376
- display: flex;
31377
- align-items: center;
31378
- gap: 13px;
31379
- `;
31380
- const OffersCircle = styled.div`
31381
- width: ${REDESIGN_SPACING.stepCircleSize};
31382
- height: ${REDESIGN_SPACING.stepCircleSize};
31383
- border-radius: 50%;
31384
- flex: none;
31385
- display: flex;
31386
- align-items: center;
31387
- justify-content: center;
31388
- background: ${REDESIGN_COLORS.railInactive};
31389
- color: ${REDESIGN_COLORS.muted};
31390
- `;
31391
- const OffersText = styled.div``;
31392
- const OffersTitle = styled.div`
31393
- font-family: ${REDESIGN_FONTS.family};
31394
- font-size: 14px;
31395
- font-weight: ${REDESIGN_FONTS.weight.semibold};
31396
- color: ${REDESIGN_COLORS.mainText};
31397
- line-height: 1.25;
31398
- `;
31399
- const OffersSubtitle = styled.div`
31457
+ const StepAnswerValue = styled.span`
31400
31458
  font-family: ${REDESIGN_FONTS.family};
31401
31459
  font-size: 12px;
31402
- color: ${REDESIGN_COLORS.muted};
31403
- line-height: 1.3;
31460
+ font-weight: ${REDESIGN_FONTS.weight.medium};
31461
+ color: ${REDESIGN_COLORS.mainText};
31462
+ animation: fadeIn 0.3s ease;
31463
+
31464
+ @keyframes fadeIn {
31465
+ from {
31466
+ opacity: 0;
31467
+ transform: translateY(-4px);
31468
+ }
31469
+ to {
31470
+ opacity: 1;
31471
+ transform: translateY(0);
31472
+ }
31473
+ }
31404
31474
  `;
31405
31475
  const BottomSection = styled.div``;
31406
31476
  const RatingRow = styled.div`
@@ -31578,8 +31648,8 @@ const RedesignContactForm = ({
31578
31648
  company: create$5().required(isGerman ? "Bitte Firma eingeben" : "Please enter company"),
31579
31649
  email: create$5().email(isGerman ? "Bitte gültige E-Mail eingeben" : "Please enter valid email").required(isGerman ? "Bitte E-Mail eingeben" : "Please enter email"),
31580
31650
  phone: create$5().required(isGerman ? "Bitte Telefon eingeben" : "Please enter phone"),
31581
- deliveryAddressStreet: create$5().min(1).required(),
31582
- deliveryAddressCity: create$5().min(1).required()
31651
+ deliveryAddressStreet: create$5().min(1).required(isGerman ? "Bitte Lieferadresse eingeben" : "Please enter delivery address"),
31652
+ deliveryAddressCity: create$5().min(1).required(isGerman ? "Bitte Stadt eingeben" : "Please enter city")
31583
31653
  });
31584
31654
  const buildSummaryChips = () => {
31585
31655
  const chips = [];
@@ -31655,12 +31725,12 @@ const RedesignContactForm = ({
31655
31725
  ] }, index))
31656
31726
  ] }),
31657
31727
  /* @__PURE__ */ jsx(NudgeWrap, { children: !commentOpen ? /* @__PURE__ */ jsxs(NudgeClosed, { onClick: () => setCommentOpen(true), children: [
31658
- /* @__PURE__ */ jsx(NudgeIconWrap, { children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }) }),
31659
31728
  /* @__PURE__ */ jsxs(NudgeContent, { children: [
31660
- /* @__PURE__ */ jsx(NudgeTitle, { children: isGerman ? "Du möchtest uns weitere Wünsche mitteilen?" : "Would you like to share additional preferences?" }),
31661
- /* @__PURE__ */ jsx(NudgeDesc, { children: isGerman ? "Schreib uns Wünsche, Ernährungspräferenzen oder den Ablauf." : "Tell us your preferences, dietary requirements or schedule." })
31729
+ /* @__PURE__ */ jsx(NudgeTitle, { children: isGerman ? "Hast du weitere konkrete Vorstellungen?" : "Anything specific you have in mind?" }),
31730
+ /* @__PURE__ */ jsx(NudgeDesc, { children: isGerman ? "Je genauer du Ablauf oder besondere Wünsche beschreibst, desto passender werden deine Angebote." : "The more you tell us about the schedule or any special requests, the better your quotes will match." }),
31731
+ /* @__PURE__ */ jsx(NudgeReassurance, { children: isGerman ? "Optional – du kannst uns auch ohne weitere Details anfragen und wir beraten dich." : "Optional. You can also send your enquiry without any further details and we'll advise you." })
31662
31732
  ] }),
31663
- /* @__PURE__ */ jsx(NudgeAction, { children: isGerman ? "Ergänzen" : "Add" })
31733
+ /* @__PURE__ */ jsx(NudgeIconWrap, { children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }) })
31664
31734
  ] }) : /* @__PURE__ */ jsxs(NudgeOpen, { children: [
31665
31735
  /* @__PURE__ */ jsxs(FormLabel, { children: [
31666
31736
  isGerman ? "Deine Wünsche" : "Your preferences",
@@ -31909,7 +31979,8 @@ const NudgeWrap = styled.div`
31909
31979
  `;
31910
31980
  const NudgeClosed = styled.div`
31911
31981
  display: flex;
31912
- align-items: center;
31982
+ align-items: flex-start;
31983
+ justify-content: space-between;
31913
31984
  gap: 12px;
31914
31985
  cursor: pointer;
31915
31986
  padding: 13px 16px;
@@ -31924,6 +31995,7 @@ const NudgeIconWrap = styled.div`
31924
31995
  display: flex;
31925
31996
  align-items: center;
31926
31997
  justify-content: center;
31998
+ margin-top: 2px;
31927
31999
  `;
31928
32000
  const NudgeContent = styled.div`
31929
32001
  flex: 1;
@@ -31942,12 +32014,14 @@ const NudgeDesc = styled.div`
31942
32014
  line-height: 1.4;
31943
32015
  margin-top: 1px;
31944
32016
  `;
31945
- const NudgeAction = styled.span`
31946
- flex: none;
32017
+ const NudgeReassurance = styled.div`
31947
32018
  font-family: ${REDESIGN_FONTS.family};
31948
- font-size: 12.5px;
31949
- font-weight: ${REDESIGN_FONTS.weight.semibold};
31950
- color: ${REDESIGN_COLORS.orange};
32019
+ font-size: 11px;
32020
+ color: ${REDESIGN_COLORS.muted};
32021
+ line-height: 1.4;
32022
+ margin-top: 8px;
32023
+ padding-top: 8px;
32024
+ border-top: 1px solid ${REDESIGN_COLORS.inputBorder};
31951
32025
  `;
31952
32026
  const NudgeOpen = styled.div`
31953
32027
  padding: 14px 16px;
@@ -32012,8 +32086,10 @@ const AddressFieldWrapper = styled.div`
32012
32086
  position: relative;
32013
32087
  z-index: 1;
32014
32088
 
32015
- .MuiFormControl-root {
32089
+ .MuiFormControl-root,
32090
+ .hc-form-control {
32016
32091
  width: 100%;
32092
+ margin-bottom: 0;
32017
32093
  }
32018
32094
 
32019
32095
  .MuiAutocomplete-root {
@@ -32032,7 +32108,7 @@ const AddressFieldWrapper = styled.div`
32032
32108
  font-family: ${REDESIGN_FONTS.family};
32033
32109
  font-size: 15px;
32034
32110
  color: ${REDESIGN_COLORS.mainText};
32035
- background: ${REDESIGN_COLORS.white};
32111
+ background: ${REDESIGN_COLORS.white} !important;
32036
32112
  transition: border-color 0.15s;
32037
32113
  cursor: text;
32038
32114
 
@@ -32057,6 +32133,7 @@ const AddressFieldWrapper = styled.div`
32057
32133
  font-family: ${REDESIGN_FONTS.family};
32058
32134
  font-size: 15px;
32059
32135
  cursor: text;
32136
+ background: transparent !important;
32060
32137
 
32061
32138
  &::placeholder {
32062
32139
  color: #a5a5a5;
@@ -32065,7 +32142,35 @@ const AddressFieldWrapper = styled.div`
32065
32142
  }
32066
32143
  }
32067
32144
 
32068
- .MuiInputLabel-root {
32145
+ /* Override the custom Input component styles */
32146
+ .hc-form-control input[name="delivery_address"] {
32147
+ width: 100%;
32148
+ padding: 13px 16px;
32149
+ border: 1px solid ${REDESIGN_COLORS.inputBorder};
32150
+ border-radius: 12px;
32151
+ font-family: ${REDESIGN_FONTS.family};
32152
+ font-size: 15px;
32153
+ color: ${REDESIGN_COLORS.mainText};
32154
+ background: ${REDESIGN_COLORS.white} !important;
32155
+ transition: border-color 0.15s;
32156
+
32157
+ &:hover {
32158
+ border-color: #cfcfcf;
32159
+ }
32160
+
32161
+ &:focus {
32162
+ border-color: ${REDESIGN_COLORS.orange};
32163
+ outline: none;
32164
+ }
32165
+
32166
+ &::placeholder {
32167
+ color: #a5a5a5;
32168
+ opacity: 1;
32169
+ }
32170
+ }
32171
+
32172
+ .MuiInputLabel-root,
32173
+ label {
32069
32174
  font-family: ${REDESIGN_FONTS.family};
32070
32175
  font-size: 13px;
32071
32176
  font-weight: ${REDESIGN_FONTS.weight.semibold};
@@ -32073,25 +32178,37 @@ const AddressFieldWrapper = styled.div`
32073
32178
  position: relative;
32074
32179
  transform: none;
32075
32180
  margin-bottom: 6px;
32181
+ margin-left: 0 !important;
32076
32182
  pointer-events: none;
32183
+ display: block;
32077
32184
 
32078
32185
  &.Mui-focused {
32079
32186
  color: ${REDESIGN_COLORS.mainText};
32080
32187
  }
32081
32188
  }
32082
32189
 
32083
- .MuiFormHelperText-root {
32190
+ .MuiFormHelperText-root,
32191
+ .hc-form-control span {
32084
32192
  font-family: ${REDESIGN_FONTS.family};
32085
32193
  font-size: 11.5px;
32086
32194
  color: ${REDESIGN_COLORS.muted};
32087
32195
  margin: 5px 0 0;
32196
+ margin-left: 0 !important;
32197
+ display: block;
32088
32198
 
32089
32199
  &.Mui-error {
32090
- ${({ $hideInitialError }) => $hideInitialError && "display: none;"}
32200
+ display: ${({ $hideInitialError }) => $hideInitialError ? "none !important" : "block"};
32091
32201
  color: ${REDESIGN_COLORS.error};
32092
32202
  }
32093
32203
  }
32094
32204
 
32205
+ /* Hide error text from AddressAutocomplete until form submission */
32206
+ .hc-form-control--error {
32207
+ span:not(:last-of-type) {
32208
+ display: ${({ $hideInitialError }) => $hideInitialError ? "none" : "block"} !important;
32209
+ }
32210
+ }
32211
+
32095
32212
  .MuiAutocomplete-listbox {
32096
32213
  font-family: ${REDESIGN_FONTS.family};
32097
32214
  }
@@ -32277,6 +32394,17 @@ const RedesignedFunnel = ({
32277
32394
  const isGerman = (_a2 = i18n.language) == null ? void 0 : _a2.startsWith("de");
32278
32395
  const router = useRouter();
32279
32396
  const { state, actions, answerOf } = useQualification();
32397
+ const isCityStepDisabled = React__default.useMemo(() => {
32398
+ if (!("qualification" in state)) return false;
32399
+ const cityStep2 = state.qualification.steps.find((s3) => s3.id === "city");
32400
+ return (cityStep2 == null ? void 0 : cityStep2.disabled) === true;
32401
+ }, ["qualification" in state ? state.qualification.steps : null]);
32402
+ const stepOrder = React__default.useMemo(() => {
32403
+ if (isCityStepDisabled) {
32404
+ return REDESIGN_STEP_ORDER.filter((step2) => step2 !== REDESIGN_STEP_IDS.city);
32405
+ }
32406
+ return REDESIGN_STEP_ORDER;
32407
+ }, [isCityStepDisabled]);
32280
32408
  const [currentStepIndex, setCurrentStepIndex] = useState(0);
32281
32409
  const [phase, setPhase] = useState("questions");
32282
32410
  const [budgetPerPerson2, setBudgetPerPerson] = useState(20);
@@ -32285,16 +32413,22 @@ const RedesignedFunnel = ({
32285
32413
  const [redirectUrl, setRedirectUrl] = useState(null);
32286
32414
  const hasTrackedStart = useRef(false);
32287
32415
  const { submitAsNewCustomer } = useRequestForm();
32288
- const currentStepId = REDESIGN_STEP_ORDER[currentStepIndex];
32416
+ const currentStepId = stepOrder[currentStepIndex];
32289
32417
  const handleCancel = onCancel || (() => window.history.back());
32290
32418
  useEffect(() => {
32291
32419
  if (currentStepId === "redesign_people_count") {
32292
32420
  const existingCount = answerOf("min_order_number");
32293
- const existingBudget = answerOf("price_per_person");
32294
32421
  if (existingCount === void 0) {
32295
32422
  actions.answerQuestion("min_order_number", 100);
32296
32423
  }
32297
- if (existingBudget === void 0) {
32424
+ const eventType = answerOf("event_type");
32425
+ const existingBudget = answerOf("price_per_person");
32426
+ if (existingBudget === void 0 && eventType) {
32427
+ const category = EVENT_TYPE_MAPPINGS[eventType].catering_category;
32428
+ const defaultBudget = PRICE_PER_PERSON_OF_CATEGORY[category].defaultPricePerPerson;
32429
+ setBudgetPerPerson(defaultBudget);
32430
+ actions.answerQuestion("price_per_person", defaultBudget);
32431
+ } else if (existingBudget === void 0) {
32298
32432
  actions.answerQuestion("price_per_person", budgetPerPerson2);
32299
32433
  }
32300
32434
  }
@@ -32320,26 +32454,26 @@ const RedesignedFunnel = ({
32320
32454
  }, [funnelContextRef, currentStepIndex, currentStepId]);
32321
32455
  const nextStep = useCallback(() => {
32322
32456
  const nextIndex = currentStepIndex + 1;
32323
- if (nextIndex >= REDESIGN_STEP_ORDER.length) {
32457
+ if (nextIndex >= stepOrder.length) {
32324
32458
  setPhase("loading");
32325
32459
  } else {
32326
32460
  setCurrentStepIndex(nextIndex);
32327
32461
  }
32328
- }, [currentStepIndex]);
32462
+ }, [currentStepIndex, stepOrder.length]);
32329
32463
  const previousStep = useCallback(() => {
32330
32464
  if (currentStepIndex > 0) {
32331
32465
  setCurrentStepIndex(currentStepIndex - 1);
32332
32466
  }
32333
32467
  }, [currentStepIndex]);
32334
32468
  const goToStep = useCallback((stepId) => {
32335
- const index = REDESIGN_STEP_ORDER.indexOf(stepId);
32469
+ const index = stepOrder.indexOf(stepId);
32336
32470
  if (index >= 0) {
32337
32471
  if (phase === "contact") {
32338
32472
  setPhase("questions");
32339
32473
  }
32340
32474
  setCurrentStepIndex(index);
32341
32475
  }
32342
- }, [phase]);
32476
+ }, [phase, stepOrder]);
32343
32477
  const handleCitySelect = useCallback((city) => {
32344
32478
  actions.answerQuestion("city", city);
32345
32479
  trackAnswer("city", city);
@@ -32352,9 +32486,9 @@ const RedesignedFunnel = ({
32352
32486
  actions.answerQuestion("service_type", mapping.service_type);
32353
32487
  actions.answerQuestion("catering_categories", [mapping.catering_category]);
32354
32488
  trackAnswer("event_type", eventType);
32355
- updateContext({ service_type: mapping.service_type, total_steps: getRedesignTotalSteps() });
32489
+ updateContext({ service_type: mapping.service_type, total_steps: stepOrder.length + 1 });
32356
32490
  nextStep();
32357
- }, [actions, trackAnswer, updateContext, nextStep]);
32491
+ }, [actions, trackAnswer, updateContext, nextStep, stepOrder.length]);
32358
32492
  const handleDateChange = useCallback((date2) => {
32359
32493
  if (date2) {
32360
32494
  actions.answerQuestion("event_date", date2);
@@ -32412,8 +32546,8 @@ const RedesignedFunnel = ({
32412
32546
  }, [submitAsNewCustomer, funnelContextRef, router.locale]);
32413
32547
  const handleContactBack = useCallback(() => {
32414
32548
  setPhase("questions");
32415
- setCurrentStepIndex(REDESIGN_STEP_ORDER.length - 1);
32416
- }, []);
32549
+ setCurrentStepIndex(stepOrder.length - 1);
32550
+ }, [stepOrder.length]);
32417
32551
  const canContinue = useCallback(() => {
32418
32552
  switch (currentStepId) {
32419
32553
  case "redesign_city":
@@ -32429,6 +32563,12 @@ const RedesignedFunnel = ({
32429
32563
  return false;
32430
32564
  }
32431
32565
  }, [currentStepId, answerOf]);
32566
+ const buildStepAnswers = () => ({
32567
+ city: answerOf("city"),
32568
+ eventType: answerOf("event_type"),
32569
+ eventDate: answerOf("event_date"),
32570
+ peopleCount: answerOf("min_order_number")
32571
+ });
32432
32572
  const buildSelectionChips = () => {
32433
32573
  const chips2 = [];
32434
32574
  const city = answerOf("city");
@@ -32450,10 +32590,11 @@ const RedesignedFunnel = ({
32450
32590
  return /* @__PURE__ */ jsx(FunnelContainer, { children: /* @__PURE__ */ jsx(MainContent, { $fullWidth: true, children: /* @__PURE__ */ jsx(LoadingScreen, { onComplete: handleLoadingComplete }) }) });
32451
32591
  }
32452
32592
  if (phase === "contact") {
32453
- const contactTitle = isGerman ? "Fast geschafft – nur noch deine Kontaktdaten" : "Almost done – just your contact details";
32454
- const contactSubtitle = isGerman ? "Danach meldet sich dein Cateringexperte und schickt dir passende Angebote." : "Your catering expert will then get in touch and send you matching offers.";
32593
+ const contactStep = REDESIGN_STEPS[REDESIGN_STEP_IDS.contact];
32594
+ const contactTitle = isGerman ? contactStep.titleDe : contactStep.titleEn;
32595
+ const contactSubtitle = isGerman ? contactStep.subtitleDe : contactStep.subtitleEn;
32455
32596
  return /* @__PURE__ */ jsxs(FunnelContainer, { children: [
32456
- /* @__PURE__ */ jsx(StepRail, { currentStepId: REDESIGN_STEP_IDS.contact, onStepClick: goToStep }),
32597
+ /* @__PURE__ */ jsx(StepRail, { currentStepId: REDESIGN_STEP_IDS.contact, onStepClick: goToStep, answers: buildStepAnswers() }),
32457
32598
  /* @__PURE__ */ jsxs(MainContent, { children: [
32458
32599
  /* @__PURE__ */ jsxs(MobileHeader, { children: [
32459
32600
  /* @__PURE__ */ jsx(MobileLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 20 }) }),
@@ -32524,7 +32665,7 @@ const RedesignedFunnel = ({
32524
32665
  const currentStep = REDESIGN_STEPS[currentStepId];
32525
32666
  const stepTitle = isGerman ? currentStep.titleDe : currentStep.titleEn;
32526
32667
  const stepSubtitle = isGerman ? currentStep.subtitleDe : currentStep.subtitleEn;
32527
- const totalSteps = getRedesignTotalSteps();
32668
+ const totalSteps = stepOrder.length + 1;
32528
32669
  const chips = buildSelectionChips();
32529
32670
  const showBack = currentStepIndex > 0;
32530
32671
  const showChips = currentStepIndex >= 1 && chips.length > 0;
@@ -32572,7 +32713,7 @@ const RedesignedFunnel = ({
32572
32713
  }
32573
32714
  };
32574
32715
  return /* @__PURE__ */ jsxs(FunnelContainer, { children: [
32575
- /* @__PURE__ */ jsx(StepRail, { currentStepId, onStepClick: goToStep }),
32716
+ /* @__PURE__ */ jsx(StepRail, { currentStepId, onStepClick: goToStep, answers: buildStepAnswers() }),
32576
32717
  /* @__PURE__ */ jsxs(MainContent, { children: [
32577
32718
  /* @__PURE__ */ jsxs(MobileHeader, { children: [
32578
32719
  /* @__PURE__ */ jsx(MobileLogoWrapper, { children: /* @__PURE__ */ jsx(Logo, { height: 20 }) }),
@@ -32701,9 +32842,7 @@ const CancelText = styled.span`
32701
32842
  }
32702
32843
  `;
32703
32844
  const DesktopStepCount = styled.span`
32704
- font-family: ${REDESIGN_FONTS.family};
32705
- font-size: 13px;
32706
- color: ${REDESIGN_COLORS.muted};
32845
+ display: none;
32707
32846
  `;
32708
32847
  const ContentArea = styled.div`
32709
32848
  flex: 1;
@@ -32786,7 +32925,7 @@ const ChipRow = styled.div`
32786
32925
  justify-content: center;
32787
32926
 
32788
32927
  @media (min-width: 960px) {
32789
- gap: 8px;
32928
+ display: none;
32790
32929
  }
32791
32930
  `;
32792
32931
  const ChipLabel = styled.span`