PageSourceSearch

https://www.rheem.com/vike/assets/chunks/chunk-BEsmCmQD.js

js rheem.com collected 2026-09-24 10:19:49 UTC 116,904 bytes, 2,680 lines download raw bytes

1import { j as defineComponent, _ as _export_sfc, o as openBlock, e as createElementBlock, f as createBaseVNode, C as renderSlot, h as toDisplayString, y as createCommentVNode, aM as createStaticVNode, c as computed, I as createTextVNode, v as normalizeClass, r as ref, F as Fragment, x as renderList, q as createVNode, A as withCtx, J as withModifiers, n as normalizeStyle, t as toRefs, z as createBlock, M as useModel, L as mergeModels, l as toValue, H as useId, m as mergeProps, aJ as createSlots, aS as toRaw, w as watch, B as resolveDynamicComponent } from "./chunk-Cy-M6TJt.js";
2import { R as RmcIcon } from "./chunk-Bov-RE3A.js";
3import { c as classNames, R as RmcButton } from "./chunk-B7DFmrmH.js";
4import { u as useI18n } from "./chunk-DUNv5myb.js";
5/* empty css               */
6import { R as RmcInput } from "./chunk-CaJnFBZC.js";
7import { R as RmcRadio } from "./chunk-1AVbsMEF.js";
8import { u as useForm } from "./chunk-Bex0ABu6.js";
9import { P as PreferredDatesSummary, R as RmcDescriptionCard, a as RmcDescriptionCardRow } from "./chunk-NheiM6gj.js";
10import { a as validateZipCode, b as validatePostalCode } from "./chunk-Csv_e5CK.js";
11import { u as useData } from "./chunk-Ch88nc1G.js";
12import { e as contractorBookNow } from "./chunk-BB04vi68.js";
13import { R as RmcDatePicker } from "./chunk-PFZqywlE.js";
14import { C as ContractorProfileSchedule } from "./chunk-Ch7vcZ-e.js";
15import { d as dataLayerUtils } from "./chunk-Br4PuyP7.js";
16import { s as scrollToTop } from "./chunk-CBgEPVdF.js";
17import { R as RmcBreadcrumbs } from "./chunk-Bx8u2xDv.js";
18const _sfc_main$s = /* @__PURE__ */ defineComponent({
19  __name: "RmcHeader",
20  props: {
21    title: { default: "request appointment" }
22  },
23  setup(__props, { expose: __expose }) {
24    __expose();
25    const __returned__ = {};
26    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
27    return __returned__;
28  }
29});
30const _hoisted_1$r = { class: "rmc-header rmc-header-tertiary rmc-header-dot" };
31const _hoisted_2$m = { class: "row" };
32const _hoisted_3$g = { class: "col" };
33const _hoisted_4$e = { class: "rmc-header__content" };
34const _hoisted_5$8 = { class: "rmc-header__title rmc-ty-display-md rmc-ty-xl-display-2xl fw-bold" };
35const _hoisted_6$6 = {
36  key: 0,
37  class: "d-flex rmc-column-gap-xl rmc-row-gap-md flex-wrap"
38};
39function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
40  return openBlock(), createElementBlock("div", _hoisted_1$r, [
41    createBaseVNode("div", _hoisted_2$m, [
42      createBaseVNode("div", _hoisted_3$g, [
43        createBaseVNode("div", _hoisted_4$e, [
44          renderSlot(_ctx.$slots, "breadcrumbs", {}, () => [
45            _cache[0] || (_cache[0] = createStaticVNode('<div class="rmc-breadcrumbs"><a href="#" class="rmc-breadcrumbs-item">Settings</a><a href="#" class="rmc-breadcrumbs-item">Settings</a><a href="#" class="rmc-breadcrumbs-item">...</a><a href="#" class="rmc-breadcrumbs-item">Team</a></div>', 1))
46          ]),
47          createBaseVNode("div", null, [
48            createBaseVNode("h1", _hoisted_5$8, toDisplayString($props.title), 1),
49            _ctx.$slots.buttons ? (openBlock(), createElementBlock("div", _hoisted_6$6, [
50              renderSlot(_ctx.$slots, "buttons")
51            ])) : createCommentVNode("", true)
52          ])
53        ])
54      ])
55    ])
56  ]);
57}
58const RmcHeader = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$s], ["__file", "RmcHeader.vue"]]);
59const _sfc_main$r = /* @__PURE__ */ defineComponent({
60  __name: "BookingNavCard",
61  props: {
62    selected: { type: Boolean }
63  },
64  setup(__props, { expose: __expose }) {
65    __expose();
66    const props = __props;
67    const classes = computed(
68      () => classNames(
69        "text-decoration-none rmc-card-selector rmc-card-selector_device-desktop rmc-color-base-black",
70        { "rmc-card-selector_state-selected": props.selected }
71      )
72    );
73    const __returned__ = { props, classes };
74    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
75    return __returned__;
76  }
77});
78const _hoisted_1$q = { class: "rmc-card-selector__icon" };
79const _hoisted_2$l = { class: "rmc-card-selector__title" };
80function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
81  return openBlock(), createElementBlock("a", {
82    class: normalizeClass($setup.classes)
83  }, [
84    createBaseVNode("div", _hoisted_1$q, [
85      renderSlot(_ctx.$slots, "icon", {}, () => [
86        _cache[0] || (_cache[0] = createTextVNode("icon"))
87      ])
88    ]),
89    createBaseVNode("div", _hoisted_2$l, [
90      renderSlot(_ctx.$slots, "text", {}, () => [
91        _cache[1] || (_cache[1] = createTextVNode("text"))
92      ])
93    ])
94  ], 2);
95}
96const BookingNavCard = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$r], ["__file", "BookingNavCard.vue"]]);
97const _sfc_main$q = /* @__PURE__ */ defineComponent({
98  __name: "RequestTypeSelector",
99  emits: ["change"],
100  setup(__props, { expose: __expose }) {
101    __expose();
102    const currentType = ref();
103    const currentItem = computed(
104      () => items.value.find((v) => v.type === currentType.value)
105    );
106    const { t } = useI18n();
107    const items = computed(() => [
108      { text: t("booking.requestTypes.getConsultation"), icon: "sms", type: "consultation" },
109      { text: t("booking.requestTypes.serviceEquipment"), icon: "build-tool", type: "service" },
110      { text: t("booking.requestTypes.replaceEquipment"), icon: "repeat", type: "replace" }
111    ]);
112    const __returned__ = { currentType, currentItem, t, items, RmcIcon, RmcButton, BookingNavCard };
113    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
114    return __returned__;
115  }
116});
117const _hoisted_1$p = { class: "rmc-container rmc-my-8xl" };
118const _hoisted_2$k = { class: "row row-cols-1 row-cols-md-3 rmc-g-4xl" };
119const _hoisted_3$f = { class: "text-end rmc-mt-8xl" };
120function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
121  return openBlock(), createElementBlock("div", _hoisted_1$p, [
122    createBaseVNode("div", _hoisted_2$k, [
123      (openBlock(true), createElementBlock(Fragment, null, renderList($setup.items, ({ icon, text, type }) => {
124        return openBlock(), createElementBlock("div", {
125          key: type,
126          class: "col"
127        }, [
128          createVNode($setup["BookingNavCard"], {
129            selected: $setup.currentType === type,
130            onClick: withModifiers(($event) => $setup.currentType = type, ["prevent"])
131          }, {
132            icon: withCtx(() => [
133              createVNode($setup["RmcIcon"], { "icon-name": icon }, null, 8, ["icon-name"])
134            ]),
135            text: withCtx(() => [
136              createTextVNode(toDisplayString(text), 1)
137            ]),
138            _: 2
139          }, 1032, ["selected", "onClick"])
140        ]);
141      }), 128))
142    ]),
143    createBaseVNode("div", _hoisted_3$f, [
144      createVNode($setup["RmcButton"], {
145        "data-ga-id": "find-a-pro-booking-continue",
146        disabled: !$setup.currentType,
147        onClick: _cache[0] || (_cache[0] = ($event) => $setup.currentType && _ctx.$emit("change", $setup.currentItem)),
148        variant: "primary",
149        size: "lg"
150      }, {
151        default: withCtx(() => [
152          createTextVNode(toDisplayString($setup.t("booking.continue")), 1)
153        ]),
154        _: 1
155      }, 8, ["disabled"])
156    ])
157  ]);
158}
159const RequestTypeSelector = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__file", "RequestTypeSelector.vue"]]);
160const _sfc_main$p = /* @__PURE__ */ defineComponent({
161  __name: "SuccessWidget",
162  setup(__props, { expose: __expose }) {
163    __expose();
164    const { t } = useI18n();
165    const __returned__ = { t, RmcIcon, RmcButton };
166    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
167    return __returned__;
168  }
169});
170const _hoisted_1$o = { class: "rmc-container d-flex flex-column justify-content-center align-items-center rmc-gap-7xl" };
171const _hoisted_2$j = { class: "text-center" };
172const _hoisted_3$e = { class: "rmc-ty-display-xs fw-bold rmc-mb-xl" };
173const _hoisted_4$d = { class: "rmc-ty-text-lg fw-light" };
174const _hoisted_5$7 = { class: "d-flex flex-column justify-content-center align-items-center rmc-gap-lg" };
175const _hoisted_6$5 = { class: "d-flex justify-content-end" };
176const _hoisted_7$4 = { class: "d-flex rmc-gap-lg" };
177function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
178  return openBlock(), createElementBlock("div", _hoisted_1$o, [
179    createVNode($setup["RmcIcon"], {
180      "icon-name": "success-outline",
181      class: "rmc-width-11xl"
182    }),
183    createBaseVNode("div", _hoisted_2$j, [
184      createBaseVNode("div", _hoisted_3$e, toDisplayString($setup.t("booking.success.title")), 1),
185      createBaseVNode("div", _hoisted_4$d, toDisplayString($setup.t("booking.success.message")), 1)
186    ]),
187    createBaseVNode("div", _hoisted_5$7, [
188      createBaseVNode("div", _hoisted_6$5, toDisplayString($setup.t("booking.success.disclaimer")), 1),
189      createBaseVNode("div", _hoisted_7$4, [
190        createVNode($setup["RmcButton"], {
191          "data-ga-id": "find-a-pro-booking-return",
192          href: "/find-a-pro",
193          variant: "secondary",
194          size: "lg"
195        }, {
196          default: withCtx(() => [
197            createTextVNode(toDisplayString($setup.t("booking.success.returnToFindAPro")), 1)
198          ]),
199          _: 1
200        }),
201        createVNode($setup["RmcButton"], {
202          "data-ga-id": "find-a-pro-booking-go-to-rheem",
203          href: "/",
204          variant: "primary",
205          size: "lg"
206        }, {
207          default: withCtx(() => [
208            createTextVNode(toDisplayString($setup.t("booking.success.goToRheem")), 1
208)
209          ]),
210          _: 1
211        })
212      ])
213    ])
214  ]);
215}
216const SuccessWidget = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__file", "SuccessWidget.vue"]]);
217const _sfc_main$o = /* @__PURE__ */ defineComponent({
218  __name: "RmcProgress",
219  props: {
220    value: {}
221  },
222  setup(__props, { expose: __expose }) {
223    __expose();
224    const __returned__ = {};
225    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
226    return __returned__;
227  }
228});
229const _hoisted_1$n = { class: "rmc-progress-bar-wrap" };
230const _hoisted_2$i = {
231  role: "progressbar",
232  "aria-label": "Progress bar example",
233  "aria-valuemin": "0",
234  "aria-valuemax": 100,
235  class: "rmc-progress"
236};
237function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
238  return openBlock(), createElementBlock("div", _hoisted_1$n, [
239    createBaseVNode("div", _hoisted_2$i, [
240      createBaseVNode("div", {
241        class: "rmc-progress-bar",
242        style: normalizeStyle({ width: `${$props.value}%` })
243      }, [
244        renderSlot(_ctx.$slots, "default")
245      ], 4)
246    ])
247  ]);
248}
249const RmcProgress = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o], ["__file", "RmcProgress.vue"]]);
250const _sfc_main$n = {
251  __name: "RmcProgressStepper",
252  props: {
253    steps: Array,
254    currentStepIndex: Number
255  },
256  setup(__props, { expose: __expose }) {
257    __expose();
258    const props = __props;
259    const { steps, currentStepIndex } = toRefs(props);
260    const progressPercentage = computed(() => {
261      return (currentStepIndex.value + 1) / steps.value.length * 100;
262    });
263    const currentStepLabel = computed(() => {
264      return steps.value[currentStepIndex.value] || "Unknown Step";
265    });
266    const tooltipPosition = computed(() => {
267      return {
268        left: `calc(${progressPercentage.value}% - 10px)`
269      };
270    });
271    const tooltipTransform = computed(() => {
272      const offset = progressPercentage.value > 95 ? "-50%" : "25%";
273      return {
274        transform: `translateX(${offset})`
275      };
276    });
277    const __returned__ = { props, steps, currentStepIndex, progressPercentage, currentStepLabel, tooltipPosition, tooltipTransform, computed, toRefs, RmcProgress };
278    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
279    return __returned__;
280  }
281};
282const _hoisted_1$m = { class: "popover-body" };
283function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
284  return openBlock(), createBlock($setup["RmcProgress"], {
285    value: $setup.progressPercentage,
286    "aria-valuenow": $setup.currentStepIndex + 1,
287    "aria-valuemax": $setup.steps.length
288  }, {
289    default: withCtx(() => [
290      createBaseVNode("div", {
291        style: normalizeStyle($setup.tooltipPosition)
292      }, [
293        createBaseVNode("div", {
294          class: "d-none d-md-block rmc-progress-tooltip rmc-popover",
295          style: normalizeStyle($setup.tooltipTransform)
296        }, [
297          createBaseVNode("div", _hoisted_1$m, toDisplayString($setup.currentStepLabel), 1)
298        ], 4)
299      ], 4)
300    ]),
301    _: 1
302  }, 8, ["value", "aria-valuenow", "aria-valuemax"]);
303}
304const RmcProgressStepper = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-a593b299"], ["__file", "RmcProgressStepper.vue"]]);
305let formState$2 = null;
306function useFormState$2(startDate) {
307  if (!formState$2) {
308    const startDateCurrent = startDate || /* @__PURE__ */ new Date();
309    formState$2 = ref({
310      dates: {
311        first: { date: startDateCurrent, time: "morning" },
312        second: { date: startDateCurrent, time: "morning" },
313        third: { date: startDateCurrent, time: "morning" }
314      },
315      product: {
316        images: [],
317        immediateServiceNeeded: false,
318        modelNumber: "",
319        purchaseLocation: "",
320        serialNumber: "",
321        servicePreferences: "air"
322      },
323      basicInformation: {
324        firstName: "",
325        lastName: "",
326        email: "",
327        phone: "",
328        address: "",
329        city: "",
330        state: "AL",
331        zip: "",
332        comment: ""
333      }
334    });
335  }
336  return {
337    formState: formState$2
338  };
339}
340const _sfc_main$m = /* @__PURE__ */ defineComponent({
341  __name: "ProductForm",
342  props: {
343    "modelValue": {},
344    "modelModifiers": {}
345  },
346  emits: ["update:modelValue"],
347  setup(__props, { expose: __expose }) {
348    __expose();
349    const { t } = useI18n();
350    const model = useModel(__props, "modelValue");
351    const __returned__ = { t, model, RmcInput, RmcRadio };
352    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
353    return __returned__;
354  }
355});
356const _hoisted_1$l = {
357  key: 0,
358  class: "d-flex flex-column rmc-gap-6xl"
359};
360const _hoisted_2$h = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
361const _hoisted_3$d = { class: "row row-cols-1 row-cols-lg-2 rmc-g-xl" };
362const _hoisted_4$c = { class: "col" };
363const _hoisted_5$6 = { class: "col" };
364const _hoisted_6$4 = { class: "col" };
365const _hoisted_7$3 = { class: "row row-cols-1 row-cols-lg-2 rmc-g-3xl" };
366const _hoisted_8$1 = { class: "col" };
367const _hoisted_9$1 = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
368const _hoisted_10$1 = { class: "d-flex rmc-gap-4xl" };
369const _hoisted_11$1 = { class: "col" };
370const _hoisted_12$1 = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
371const _hoisted_13$1 = { class: "d-flex rmc-gap-4xl" };
372function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
373  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
374  return $setup.model ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
375    createBaseVNode("div", null, [
376      createBaseVNode("div", _hoisted_2$h, toDisplayString($setup.t("booking.productDetails.title")), 1),
377      createBaseVNode("div", _hoisted_3$d, [
378        createBaseVNode("div", _hoisted_4$c, [
379          createVNode($setup["RmcInput"], {
380            label: $setup.t("booking.productDetails.serialNumber"),
381            value: (_b = (_a = $setup.model.serialNumber) == null ? void 0 : _a.value) == null ? void 0 : _b.value,
382            error: (_d = (_c = $setup.model.serialNumber) == null ? void 0 : _c.error) == null ? void 0 : _d.value,
383            onInput: _cache[0] || (_cache[0] = (e) => {
384              var _a2, _b2, _c2;
385              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.serialNumber) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
386            }),
387            onBlur: (_e = $setup.model.serialNumber) == null ? void 0 : _e.onBlur
388          }, null, 8, ["label", "value", "error", "onBlur"])
389        ]),
390        createBaseVNode("div", _hoisted_5$6, [
391          createVNode($setup["RmcInput"], {
392            label: $setup.t("booking.productDetails.modelNumber"),
393            value: (_g = (_f = $setup.model.modelNumber) == null ? void 0 : _f.value) == null ? void 0 : _g.value,
394            error: (_i = (_h = $setup.model.modelNumber) == null ? void 0 : _h.error) == null ? void 0 : _i.value,
395            onInput: _cache[1] || (_cache[1] = (e) => {
396              var _a2, _b2;
397              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.modelNumber) == null ? void 0 : _b2.setValue(e.target.value);
398            }),
399            onBlur: (_j = $setup.model.modelNumber) == null ? void 0 : _j.onBlur
400          }, null, 8, ["label", "value", "error", "onBlur"])
401        ]),
402        createBaseVNode("div", _hoisted_6$4, [
403          createVNode($setup["RmcInput"], {
404            label: $setup.t("booking.productDetails.purchaseLocation"),
405            value: (_l = (_k = $setup.model.purchaseLocation) == null ? void 0 : _k.value) == null ? void 0 : _l.value,
406            error: (_n = (_m = $setup.model.purchaseLocation) == null ? void 0 : _m.error) == null ? void 0 : _n.value,
407            onInput: _cache[2] || (_cache[2] = (e) => {
408              var _a2, _b2;
409              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.purchaseLocation) == null ? void 0 : _b2.setValue(e.target.value);
410            }),
411            onBlur: (_o = $setup.model.purchaseLocation) == null ? void 0 : _o.onBlur
412          }, null, 8, ["label", "value", "error", "onBlur"])
413        ])
414      ])
415    ]),
416    createBaseVNode("div", _hoisted_7$3, [
417      createBaseVNode("div", _hoisted_8$1, [
418        createBaseVNode("div", _hoisted_9$1, toDisplayString($setup.t("booking.productDetails.servicePreferences")), 1),
419        createBaseVNode("div", _hoisted_10$1, [
420          createVNode($setup["RmcRadio"], {
421            label: $setup.t("booking.productDetails.air"),
422            value: "air",
423            name: "service-preferences",
424            checked: ((_p = $setup.model.servicePreferences) == null ? void 0 : _p.value.value) === "air",
425            onChange: _cache[3] || (_cache[3] = (e) => {
426              var _a2, _b2;
427              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.servicePreferences) == null ? void 0 : _b2.setValue(e.target.value);
428            })
429          }, null, 8, ["label", "checked"]),
430          createVNode($setup["RmcRadio"], {
431            label: $setup.t("booking.productDetails.water"),
432            value: "water",
433            name: "service-preferences",
434            checked: ((_q = $setup.model.servicePreferences) == null ? void 0 : _q.value.value) === "water",
435            onChange: _cache[4] || (_cache[4] = (e) => {
436              var _a2, _b2;
437              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.servicePreferences) == null ? void 0 : _b2.setValue(e.target.value);
438            })
439          }, null, 8, ["label", "checked"])
440        ])
441      ]),
442      createBaseVNode("div", _hoisted_11$1, [
443        createBaseVNode("div", _hoisted_12$1, toDisplayString($setup.t("booking.productDetails.immediateServiceNeeded")), 1),
444        createBaseVNode("div", _hoisted_13$1, [
445          createVNode($setup["RmcRadio"], {
446            label: $setup.t("booking.productDetails.no"),
447            value: false,
448            name: "immediate-service-needed",
449            checked: ((_r = $setup.model.immediateServiceNeeded) == null ? void 0 : _r.value.value) === false,
450            onChange: _cache[5] || (_cache[5] = (e) => {
451              var _a2, _b2;
452              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.immediateServiceNeeded) == null ? void 0 : _b2.setValue(e.target.value);
453            })
454          }, null, 8, ["label", "checked"]),
455          createVNode($setup["RmcRadio"], {
456            label: $setup.t("booking.productDetails.yes"),
457            value: true,
458            name: "immediate-service-needed",
459            checked: ((_s = $setup.model.immediateServiceNeeded) == null ? void 0 : _s.value.value) === true,
460            onChange: _cache[6] || (_cache[6] = (e) => {
461              var _a2, _b2;
462              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.immediateServiceNeeded) == null ? void 0 : _b2.setValue(e.target.value);
463            })
464          }, null, 8, ["label", "checked"])
465        ])
466      ])
467    ])
468  ])) : createCommentVNode("", true);
469}
470const ProductForm = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m], ["__file", "ProductForm.vue"]]);
471const validateRequired = (value) => {
472  if (!value) {
473    return "Required";
474  }
475};
476const validateEmail = (email) => {
477  email = (email == null ? void 0 : email.trim()) || "";
478  if (!email) {
479    return "Email cannot be empty";
480  }
481  if (email.length > 254) {
482    return "Email must be no longer than 254 characters";
483  }
484  const [localPart, domain] = email.split("@");
485  if (!localPart || !domain) {
486    return "Invalid email format";
487  }
488  if (localPart.length > 64) {
489    return "Local part must be no longer than 64 characters";
490  }
491  if (localPart.startsWith(".") || localPart.endsWith(".")) {
492    return "Local part cannot start or end with a dot";
493  }
494  if (domain.startsWith("-") || domain.endsWith("-")) {
495    return "Domain cannot start or end with a hyphen";
496  }
497  if (!/^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9](\.[a-zA-Z]{2,})+$/.test(domain)) {
498    return "Invalid domain format";
499  }
500  if (/\.{2,}/.test(email)) {
501    return "Email cannot contain consecutive dots";
502  }
503  if (!/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z]{2,})+$/.test(
504    email
505  )) {
506    return "Invalid email format";
507  }
508  return void 0;
509};
510const validatePhone = (phone) => {
511  if (!phone) {
512    return "Phone number cannot be empty";
513  }
514  const cleaned = phone.replace(/[\s\.\-\(\)]/g, "");
515  if (!cleaned) {
516    return "Phone number cannot be empty";
517  }
518  if (cleaned.indexOf("+") > 0) {
519    return "Plus sign (+) can only be at the start of the number";
520  }
521  if (!/^\+?\d+$/.test(cleaned)) {
522    return "Phone number can only contain digits and optionally a plus sign at the start";
523  }
524  const digitCount = cleaned.replace(/\+/g, "").length;
525  if (digitCount < 7) {
526    return "Phone number is too short (minimum 7 digits)";
527  }
528  if (digitCount > 15) {
529    return "Phone number is too long (maximum 15 digits)";
530  }
531  return void 0;
532};
533const validateName = (name) => {
534  name = name == null ? void 0 : name.trim();
535  if (!name) {
536    return "Name cannot be empty";
537  }
538  if (/[\d!@#$%^&*(),.?":{}|<>]/.test(name)) {
539    return "Name cannot contain digits or special characters";
540  }
541  return void 0;
542};
543const validateAddress = (address) => {
544  address = address == null ? void 0 : address.trim();
545  if (!address) {
546    return "Address cannot be empty";
547  }
548  if (/[!@#$%^&*<>?|=+]/.test(address)) {
549    return "Address cannot contain special characters";
550  }
551  return void 0;
552};
553const getValidateMaxLength = (maxLength) => (value) => {
554  if (((value == null ? void 0 : value.length) || 0) > maxLength) {
555    return `Must be no longer than ${maxLength} characters`;
556  }
557  return void 0;
558};
559const createI18nValidators = (t) => {
560  const validateRequired$1 = (value) => {
561    const error = validateRequired(value);
562    return error ? t("booking.validation.required") : void 0;
563  };
564  const validateEmail$1 = (email) => {
565    const error = validateEmail(email);
566    if (!error) return void 0;
567    const errorMap = {
568      "Email cannot be empty": t("booking.validation.emailCannotBeEmpty"),
569      "Email must be no longer than 254 characters": t("booking.validation.emailTooLong"),
570      "Invalid email format": t("booking.validation.invalidEmailFormat"),
571      "Local part must be no longer than 64 characters": t("booking.validation.localPartTooLong"),
572      "Local part cannot start or end with a dot": t("booking.validation.localPartCannotStartOrEndWithDot"),
573      "Domain cannot start or end with a hyphen": t("booking.validation.domainCannotStartOrEndWithHyphen"),
574      "Invalid domain format": t("booking.validation.invalidDomainFormat"),
575      "Email cannot contain consecutive dots": t("booking.validation.emailCannotContainConsecutiveDots")
576    };
577    return errorMap[error] || error;
578  };
579  const validatePhone$1 = (phone) => {
580    const error = validatePhone(phone);
581    if (!error) return void 0;
582    const errorMap = {
583      "Phone number cannot be empty": t("booking.validation.phoneCannotBeEmpty"),
584      "Plus sign (+) can only be at the start of the number": t("booking.validation.plusSignOnlyAtStart"),
585      "Phone number can only contain digits and optionally a plus sign at the start": t("booking.validation.phoneOnlyDigitsAndPlus"),
586      "Phone number is too short (minimum 7 digits)": t("booking.validation.phoneTooShort"),
587      "Phone number is too long (maximum 15 digits)": t("booking.validation.phoneTooLong")
588    };
589    return errorMap[error] || error;
590  };
591  const validateName$1 = (name) => {
592    const error = validateName(name);
593    if (!error) return void 0;
594    const errorMap = {
595      "Name cannot be empty": t("booking.validation.nameCannotBeEmpty"),
596      "Name cannot contain digits or special characters": t("booking.validation.nameCannotContainDigitsOrSpecial")
597    };
598    return errorMap[error] || error;
599  };
600  const validateAddress$1 = (address) => {
601    const error = validateAddress(address);
602    if (!error) return void 0;
603    const errorMap = {
604      "Address cannot be empty": t("booking.validation.addressCannotBeEmpty"),
605      "Address cannot contain special characters": t("booking.validation.addressCannotContainSpecial")
606    };
607    return errorMap[error] || error;
608  };
609  const validateZipCode$1 = (zipCode) => {
610    const error = validateZipCode(zipCode);
611    if (!error) return void 0;
612    const errorMap = {
613      "ZIP code cannot be empty": t("booking.validation.zipCodeCannotBeEmpty"),
614      "Must be a valid 5-digit ZIP code or ZIP+4": t("booking.validation.invalidZipCode")
615    };
616    return errorMap[error] || error;
617  };
618  const validatePostalCode$1 = (postalCode) => {
619    const error = validatePostalCode(postalCode);
620    if (!error) return void 0;
621    const errorMap = {
622      "Postal code cannot be empty": t("booking.validation.postalCodeCannotBeEmpty"),
623      "Must be a valid Canadian postal code (e.g., K1A 0A6 or K1A)": t("booking.validation.invalidPostalCode")
624    };
625    return errorMap[error] || error;
626  };
627  const getValidateMaxLength$1 = (maxLength) => {
628    const baseValidator = getValidateMaxLength(maxLength);
629    return (value) => {
630      const error = baseValidator(value);
631      if (!error) return void 0;
632      return t("booking.validation.maxLength", { maxLength });
633    };
634  };
635  return {
636    validateRequired: validateRequired$1,
637    validateEmail: validateEmail$1,
638    validatePhone: validatePhone$1,
639    validateName: validateName$1,
640    validateAddress: validateAddress$1,
641    validateZipCode: validateZipCode$1,
642    validatePostalCode: validatePostalCode$1,
643    getValidateMaxLength: getValidateMaxLength$1
644  };
645};
646const _sfc_main$l = /* @__PURE__ */ defineComponent({
647  __name: "ProductDetailsStep",
648  props: /* @__PURE__ */ mergeModels({
649    prevStep: {},
650    currentStep: {}
651  }, {
652    "modelValue": {},
653    "modelModifiers": {}
654  }),
655  emits: /* @__PURE__ */ mergeModels(["next", "prev"], ["update:modelValue"]),
656  setup(__props, { expose: __expose, emit: __emit }) {
657    var _a, _b, _c, _d, _e, _f;
658    __expose();
659    const props = __props;
660    const emits = __emit;
661    const { t } = useI18n();
662    const model = useModel(__props, "modelValue");
663    const { formState: formState2 } = useFormState$2();
664    const validators = createI18nValidators(t);
665    const { form, isValid, validateForm, values } = useForm({
666      serialNumber: {
667        initialValue: (_a = model.value) == null ? void 0 : _a.serialNumber,
668        validators: [validators.validateRequired]
669      },
670      modelNumber: {
671        initialValue: (_b = model.value) == null ? void 0 : _b.modelNumber,
672        validators: [validators.validateRequired]
673      },
674      purchaseLocation: {
675        initialValue: ((_c = model.value) == null ? void 0 : _c.purchaseLocation) ?? "",
676        validators: [validators.validateRequired, validators.validateAddress]
677      },
678      immediateServiceNeeded: {
679        initialValue: ((_d = model.value) == null ? void 0 : _d.immediateServiceNeeded) ? !!((_e = model.value) == null ? void 0 : _e.immediateServiceNeeded) : false,
680        validators: []
681      },
682      servicePreferences: {
683        initialValue: ((_f = model.value) == null ? void 0 : _f.servicePreferences) ?? "air",
684        validators: []
685      }
686    }) || {};
687    const handleSubmit = async (e) => {
688      e.preventDefault();
689      validateForm();
690      if (toValue(isValid) && model.value) {
691        model.value = { ...model.value, ...values.value };
692        emits("next");
693      }
694    };
695    const __returned__ = { props, emits, t, model, formState: formState2, validators, form, isValid, validateForm, values, handleSubmit, RmcButton, ProductForm, PreferredDatesSummary };
696    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
697    return __returned__;
698  }
699});
700const _hoisted_1$k = { class: "row" };
701const _hoisted_2$g = { class: "col-12 col-lg-9" };
702const _hoisted_3$c = { class: "col-12 col-lg d-none d-lg-block" };
703const _hoisted_4$b = { class: "rmc-mt-8xl d-flex justify-content-end rmc-gap-lg" };
704function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
705  return openBlock(), createElementBlock("div", null, [
706    createBaseVNode("div", _hoisted_1$k, [
707      createBaseVNode("div", _hoisted_2$g, [
708        createVNode($setup["ProductForm"], {
709          modelValue: $setup.form,
710          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form = $event)
711        }, null, 8, ["modelValue"])
712      ]),
713      createBaseVNode("div", _hoisted_3$c, [
714        $setup.formState ? (openBlock(), createBlock($setup["PreferredDatesSummary"], {
715          key: 0,
716          data: $setup.formState.dates
717        }, null, 8, ["data"])) : createCommentVNode("", true)
718      ])
719    ]),
720    createBaseVNode("div", _hoisted_4$b, [
721      createVNode($setup["RmcButton"], {
722        "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep 
722: ""}`,
723        onClick: _cache[1] || (_cache[1] = ($event) => $setup.emits("prev")),
724        variant: "secondary",
725        size: "lg"
726      }, {
727        default: withCtx(() => [
728          createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
729        ]),
730        _: 1
731      }, 8, ["data-ga-id"]),
732      createVNode($setup["RmcButton"], {
733        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
734        onClick: withModifiers($setup.handleSubmit, ["prevent"]),
735        type: "submit",
736        variant: "primary",
737        size: "lg"
738      }, {
739        default: withCtx(() => [
740          createTextVNode(toDisplayString($setup.t("booking.steps.next")), 1)
741        ]),
742        _: 1
743      }, 8, ["data-ga-id"])
744    ])
745  ]);
746}
747const ProductDetailsStep$1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__file", "ProductDetailsStep.vue"]]);
748const _sfc_main$k = /* @__PURE__ */ defineComponent({
749  ...{ inheritAttrs: false },
750  __name: "RmcTextarea",
751  props: {
752    label: {},
753    error: {}
754  },
755  setup(__props, { expose: __expose }) {
756    __expose();
757    const id = useId();
758    const __returned__ = { id };
759    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
760    return __returned__;
761  }
762});
763const _hoisted_1$j = { class: "rmc-form-floating" };
764const _hoisted_2$f = ["id", "placeholder"];
765const _hoisted_3$b = ["for"];
766function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
767  return openBlock(), createElementBlock("div", _hoisted_1$j, [
768    createBaseVNode("textarea", mergeProps({
769      id: $setup.id,
770      type: "text",
771      class: "rmc-form-control"
772    }, _ctx.$attrs, {
773      placeholder: _ctx.$attrs.placeholder || _ctx.$slots.label || $props.label
774    }), null, 16, _hoisted_2$f),
775    createBaseVNode("label", { for: $setup.id }, [
776      renderSlot(_ctx.$slots, "label", {}, () => [
777        createTextVNode(toDisplayString($props.label), 1)
778      ])
779    ], 8, _hoisted_3$b),
780    _ctx.$slots["helper-text"] || $props.error ? (openBlock(), createElementBlock("div", {
781      key: 0,
782      class: normalizeClass({ "form-text": true, "rmc-color-text-error": $props.error })
783    }, [
784      renderSlot(_ctx.$slots, "helper-text", {}, () => [
785        createTextVNode(toDisplayString($props.error), 1)
786      ])
787    ], 2)) : createCommentVNode("", true)
788  ]);
789}
790const RmcTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__file", "RmcTextarea.vue"]]);
791const _sfc_main$j = /* @__PURE__ */ defineComponent({
792  __name: "BasicInformationForm",
793  props: /* @__PURE__ */ mergeModels({
794    country: {}
795  }, {
796    "modelValue": {},
797    "modelModifiers": {}
798  }),
799  emits: ["update:modelValue"],
800  setup(__props, { expose: __expose }) {
801    __expose();
802    const { t } = useI18n();
803    const props = __props;
804    const model = useModel(__props, "modelValue");
805    const __returned__ = { t, props, model, RmcInput, RmcTextarea };
806    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
807    return __returned__;
808  }
809});
810const _hoisted_1$i = { key: 0 };
811const _hoisted_2$e = { class: "rmc-mb-6xl" };
812const _hoisted_3$a = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
813const _hoisted_4$a = { class: "row row-cols-1 row-cols-lg-2 rmc-g-xl" };
814const _hoisted_5$5 = { class: "col" };
815const _hoisted_6$3 = { class: "col" };
816const _hoisted_7$2 = { class: "col" };
817const _hoisted_8 = { class: "col" };
818const _hoisted_9 = { class: "rmc-mb-6xl" };
819const _hoisted_10 = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
820const _hoisted_11 = { class: "row rmc-mb-xl" };
821const _hoisted_12 = { class: "col" };
822const _hoisted_13 = { class: "row row-cols-1 row-cols-lg-3 rmc-g-xl" };
823const _hoisted_14 = { class: "col" };
824const _hoisted_15 = { class: "col" };
825const _hoisted_16 = { value: "" };
826const _hoisted_17 = ["label"];
827const _hoisted_18 = ["label"];
828const _hoisted_19 = { class: "col" };
829const _hoisted_20 = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
830const _hoisted_21 = { class: "row" };
831const _hoisted_22 = { class: "col" };
832function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
833  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N;
834  return $setup.model ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
835    createBaseVNode("div", _hoisted_2$e, [
836      createBaseVNode("div", _hoisted_3$a, toDisplayString($setup.t("booking.basicInformation.title")), 1
836),
837      createBaseVNode("div", _hoisted_4$a, [
838        createBaseVNode("div", _hoisted_5$5, [
839          createVNode($setup["RmcInput"], {
840            label: $setup.t("booking.basicInformation.firstName"),
841            value: (_b = (_a = $setup.model.firstName) == null ? void 0 : _a.value) == null ? void 0 : _b.value,
842            error: (_d = (_c = $setup.model.firstName) == null ? void 0 : _c.error) == null ? void 0 : _d.value,
843            onInput: _cache[0] || (_cache[0] = (e) => {
844              var _a2, _b2, _c2;
845              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.firstName) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(
846                _b2,
847                e.target.value
848              );
849            }),
850            onBlur: (_e = $setup.model.firstName) == null ? void 0 : _e.onBlur
851          }, null, 8, ["label", "value", "error", "onBlur"])
852        ]),
853        createBaseVNode("div", _hoisted_6$3, [
854          createVNode($setup["RmcInput"], {
855            label: $setup.t("booking.basicInformation.lastName"),
856            value: (_g = (_f = $setup.model.lastName) == null ? void 0 : _f.value) == null ? void 0 : _g.value,
857            error: (_i = (_h = $setup.model.lastName) == null ? void 0 : _h.error) == null ? void 0 : _i.value,
858            onInput: _cache[1] || (_cache[1] = (e) => {
859              var _a2, _b2, _c2;
860              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.lastName) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(
861                _b2,
862                e.target.value
863              );
864            }),
865            onBlur: (_j = $setup.model.lastName) == null ? void 0 : _j.onBlur
866          }, null, 8, ["label", "value", "error", "onBlur"])
867        ]),
868        createBaseVNode("div", _hoisted_7$2, [
869          createVNode($setup["RmcInput"], {
870            type: "email",
871            label: $setup.t("booking.basicInformation.emailAddress"),
872            value: (_l = (_k = $setup.model.email) == null ? void 0 : _k.value) == null ? void 0 : _l.value,
873            error: (_n = (_m = $setup.model.email) == null ? void 0 : _m.error) == null ? void 0 : _n.value,
874            onInput: _cache[2] || (_cache[2] = (e) => {
875              var _a2, _b2, _c2;
876              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.email) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
877            }),
878            onBlur: (_o = $setup.model.email) == null ? void 0 : _o.onBlur
879          }, null, 8, ["label", "value", "error", "onBlur"])
880        ]),
881        createBaseVNode("div", _hoisted_8, [
882          createVNode($setup["RmcInput"], {
883            label: $setup.t("booking.basicInformation.phone"),
884            value: (_q = (_p = $setup.model.phone) == null ? void 0 : _p.value) == null ? void 0 : _q.value,
885            error: (_s = (_r = $setup.model.phone) == null ? void 0 : _r.error) == null ? void 0 : _s.value,
886            onInput: _cache[3] || (_cache[3] = (e) => {
887              var _a2, _b2, _c2;
888              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.phone) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
889            }),
890            onBlur: (_t = $setup.model.phone) == null ? void 0 : _t.onBlur
891          }, null, 8, ["label", "value", "error", "onBlur"])
892        ])
893      ])
894    ]),
895    createBaseVNode("div", _hoisted_9, [
896      createBaseVNode("div", _hoisted_10, toDisplayString($setup.t("booking.basicInformation.address")), 1),
897      createBaseVNode("div", _hoisted_11, [
898        createBaseVNode("div", _hoisted_12, [
899          createVNode($setup["RmcInput"], {
900            label: $setup.t("booking.basicInformation.streetAddress"),
901            value: (_v = (_u = $setup.model.address) == null ? void 0 : _u.value) == null ? void 0 : _v.value,
902            error: (_x = (_w = $setup.model.address) == null ? void 0 : _w.error) == null ? void 0 : _x.value,
903            onInput: _cache[4] || (_cache[4] = (e) => {
904              var _a2, _b2, _c2;
905              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.address) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
906            }),
907            onBlur: (_y = $setup.model.address) == null ? void 0 : _y.onBlur
908          }, null, 8, ["label", "value", "error", "onBlur"])
909        ])
910      ]),
911      createBaseVNode("div", _hoisted_13, [
912        createBaseVNode("div", _hoisted_14, [
913          createVNode($setup["RmcInput"], {
914            label: $setup.t("booking.basicInformation.cityName"),
915            value: (_A = (_z = $setup.model.city) == null ? void 0 : _z.value) == null ? void 0 : _A.value,
916            error: (_C = (_B = $setup.model.city) == null ? void 0 : _B.error) == null ? void 0 : _C.value,
917            onInput: _cache[5] || (_cache[5] = (e) => {
918              var _a2, _b2, _c2;
919              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.city) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
920            }),
921            onBlur: (_D = $setup.model.city) == null ? void 0 : _D.onBlur
922          }, null, 8, ["label", "value", "error", "onBlur"])
923        ]),
924        createBaseVNode("div", _hoisted_15, [
925          createBaseVNode("select", {
926            class: "rmc-form-select",
927            onChange: _cache[6] || (_cache[6] = (e) => {
928              var _a2, _b2, _c2;
929              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.state) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
930            })
931          }, [
932            createBaseVNode("option", _hoisted_16, toDisplayString($props.country === "CA" ? $setup.t("booking.basicInformation.selectProvince") 
932: $setup.t("booking.basicInformation.selectState")), 1),
933            $props.country === "US" ? (openBlock(), createElementBlock("optgroup", {
934              key: 0,
935              label: $setup.t("booking.basicInformation.countries.unitedStates")
936            }, _cache[9] || (_cache[9] = [
937              createStaticVNode('<option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="DC">District Of Columbia</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option>', 51)
938            ]), 8, _hoisted_17)) : createCommentVNode("", true),
939            $props.country === "CA" ? (openBlock(), createElementBlock("optgroup", {
940              key: 1,
941              label: $setup.t("booking.basicInformation.countries.canada")
942            }, _cache[10] || (_cache[10] = [
943              createStaticVNode('<option value="Alberta">Alberta</option><option value="British Columbia">British Columbia</option><option value="Manitoba">Manitoba</option><option value="New Brunswick">New Brunswick</option><option value="Newfoundland and Labrador"> Newfoundland and Labrador </option><option value="Northwest Territories"> Northwest Territories </option><option value="Nova Scotia">Nova Scotia</option><option value="Nunavut">Nunavut</option><option value="Ontario">Ontario</option><option value="Prince Edward Island">Prince Edward Island</option><option value="Quebec">Quebec</option><option value="Saskatchewan">Saskatchewan</option><option value="Yukon">Yukon</option>', 13)
944            ]), 8, _hoisted_18)) : createCommentVNode("", true)
945          ], 32)
946        ]),
947        createBaseVNode("div", _hoisted_19, [
948          createVNode($setup["RmcInput"], {
949            label: $props.country === "CA" ? $setup.t("booking.basicInformation.postalCode") : $setup.t("booking.basicInformation.zipCode"),
950            value: (_F = (_E = $setup.model.zip) == null ? void 0 : _E.value) == null ? void 0 : _F.value,
951            error: (_H = (_G = $setup.model.zip) == null ? void 0 : _G.error) == null ? void 0 : _H.value,
952            onInput: _cache[7] || (_cache[7] = (e) => {
953              var _a2, _b2, _c2;
954              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.zip) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
955            }),
956            onBlur: (_I = $setup.model.zip) == null ? void 0 : _I.onBlur
957          }, null, 8, ["label", "value", "error", "onBlur"])
958        ])
959      ])
960    ]),
961    createBaseVNode("div", null, [
962      createBaseVNode("div", _hoisted_20, toDisplayString($setup.t("booking.basicInformation.additionalInformation")), 1),
963      createBaseVNode("div", _hoisted_21, [
964        createBaseVNode("div", _hoisted_22, [
965          createVNode($setup["RmcTextarea"], {
966            rows: "7",
967            class: "h-auto",
968            label: $setup.t("booking.basicInformation.provideComments"),
969            value: (_K = (_J = $setup.model.comment) == null ? void 0 : _J.value) == null ? void 0 : _K.value,
970            error: (_M = (_L = $setup.model.comment) == null ? void 0 : _L.error) == null ? void 0 : _M.value,
971            onInput: _cache[8] || (_cache[8] = (e) => {
972              var _a2, _b2, _c2;
973              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.comment) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(
974                _b2,
975                e.target.value
976              );
977            }),
978            onBlur: (_N = $setup.model.comment) == null ? void 0 : _N.onBlur
979          }, null, 8, ["label", "value", "error", "onBlur"])
980        ])
981      ])
982    ])
983  ])) : createCommentVNode("", true);
984}
985const BasicInformationForm = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__file", "BasicInformationForm.vue"]]);
986const _sfc_main$i = /* @__PURE__ */ defineComponent({
987  __name: "EquipmentSummary",
988  props: {
989    data: {}
990  },
991  setup(__props, { expose: __expose }) {
992    var _a, _b, _c, _d, _e;
993    __expose();
994    const { t } = useI18n();
995    const items = [
996      { name: t("booking.summary.serialNumber"), value: (_a = __props.data) == null ? void 0 : _a.serialNumber },
997      { name: t("booking.summary.model"), value: (_b = __props.data) == null ? void 0 : _b.modelNumber },
998      { name: t("booking.summary.from"), value: (_c = __props.data) == null ? void 0 : _c.purchaseLocation },
999      { name: t("booking.summary.type"), value: (_d = __props.data) == null ? void 0 : _d.servicePreferences },
1000      { name: t("booking.summary.priority"), value: ((_e = __props.data) == null ? void 0 : _e.immediateServiceNeeded) ? t("booking.summary.high") : t("booking.summary.normal") }
1001    ];
1002    const __returned__ = { t, items, RmcDescriptionCard, RmcDescriptionCardRow };
1003    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1004    return __returned__;
1005  }
1006});
1007const _hoisted_1$h = { class: "text-capitalize" };
1008const _hoisted_2$d = { class: "text-capitalize" };
1009function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
1010  return openBlock(), createBlock($setup["RmcDescriptionCard"], null, createSlots({
1011    title: withCtx(() => [
1012      createTextVNode(toDisplayString($setup.t("booking.summary.equipment")), 1)
1013    ]),
1014    default: withCtx(() => [
1015      _cache[0] || (_cache[0] = createTextVNode("/> "))
1016    ]),
1017    _: 2
1018  }, [
1019    $props.data ? {
1020      name: "items",
1021      fn: withCtx(() => [
1022        (openBlock(), createElementBlock(Fragment, null, renderList($setup.items, ({ name, value }) => {
1023          return createVNode($setup["RmcDescriptionCardRow"], null, {
1024            title: withCtx(() => [
1025              createBaseVNode("span", _hoisted_1$h, toDisplayString(name), 1)
1026            ]),
1027            value: withCtx(() => [
1028              createBaseVNode("div", _hoisted_2$d, toDisplayString(value), 1)
1029            ]),
1030            _: 2
1031          }, 1024);
1032        }), 64))
1033      ]),
1034      key: "0"
1035    } : void 0
1036  ]), 1024);
1037}
1038const EquipmentSummary = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$i], ["__file", "EquipmentSummary.vue"]]);
1039const _sfc_main$h = /* @__PURE__ */ defineComponent({
1040  __name: "BasicInformationStep",
1041  props: /* @__PURE__ */ mergeModels({
1042    prevStep: {},
1043    currentStep: {}
1044  }, {
1045    "modelValue": {},
1046    "modelModifiers": {}
1047  }),
1048  emits: /* @__PURE__ */ mergeModels(["next", "prev"], ["update:modelValue"]),
1049  setup(__props, { expose: __expose, emit: __emit }) {
1050    __expose();
1051    const props = __props;
1052    const { t } = useI18n();
1053    const emits = __emit;
1054    const model = useModel(__props, "modelValue");
1055    const data = useData();
1056    const { contractor } = data.value;
1057    const { formState: formState2 } = useFormState$2();
1058    const validators = createI18nValidators(t);
1059    const { form, isValid, validateForm, values } = useForm({
1060      comment: {
1061        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.comment) ?? "",
1062        validators: [validators.validateRequired, validators.getValidateMaxLength(1e3)]
1063      },
1064      firstName: {
1065        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.firstName) ?? "",
1066        validators: [validators.validateRequired, validators.validateName]
1067      },
1068      lastName: {
1069        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.lastName) ?? "",
1070        validators: [validators.validateRequired, validators.validateName]
1071      },
1072      email: {
1073        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.email) ?? "",
1074        validators: [validators.validateRequired, validators.validateEmail]
1075      },
1076      phone: {
1077        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.phone) ?? "",
1078        validators: [validators.validateRequired, validators.validatePhone]
1079      },
1080      address: {
1081        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.address) ?? "",
1082        validators: [validators.validateRequired, validators.validateAddress]
1083      },
1084      city: {
1085        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.city) ?? "",
1086        validators: [validators.validateRequired, validators.validateAddress]
1087      },
1088      state: {
1089        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.state) ?? ""
1090      },
1091      zip: {
1092        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.zip) ?? "",
1093        validators: [validators.validateRequired, (contractor == null ? void 0 : contractor.Country) === "CA" ? validators.validatePostalCode : validators.validateZipCode]
1094      }
1095    }) || {};
1096    const handleSubmit = async (e) => {
1097      e.preventDefault();
1098      validateForm();
1099      if (toValue(isValid) && model.value) {
1100        model.value = { ...model.value, ...values.value };
1101        emits("next");
1102      }
1103    };
1104    const __returned__ = { props, t, emits, model, data, contractor, formState: formState2, validators, form, isValid, validateForm, values, handleSubmit, RmcButton, BasicInformationForm, PreferredDatesSummary, EquipmentSummary };
1105    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1106    return __returned__;
1107  }
1108});
1109const _hoisted_1$g = { class: "row" };
1110const _hoisted_2$c = { class: "col-12 col-lg-9" };
1111const _hoisted_3$9 = { class: "col-12 col-lg d-none d-lg-block" };
1112const _hoisted_4$9 = { class: "rmc-mt-8xl d-flex justify-content-end rmc-gap-lg" };
1113function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
1114  var _a, _b, _c;
1115  return openBlock(), createElementBlock("div", null, [
1116    createBaseVNode("div", _hoisted_1$g, [
1117      createBaseVNode("div", _hoisted_2$c, [
1118        createVNode($setup["BasicInformationForm"], {
1119          modelValue: $setup.form,
1120          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form = $event),
1121          country: (_a = $setup.contractor) == null ? void 0 : _a.Country
1122        }, null, 8, ["modelValue", "country"])
1123      ]),
1124      createBaseVNode("div", _hoisted_3$9, [
1125        createVNode($setup["PreferredDatesSummary"], {
1126          class: "rounded-bottom-0",
1127          data: (_b = $setup.formState) == null ? void 0 : _b.dates
1128        }, null, 8, ["data"]),
1129        createVNode($setup["EquipmentSummary"], {
1130          class: "rounded-top-0",
1131          data: (_c = $setup.formState) == null ? void 0 : _c.product
1132        }, null, 8, ["data"])
1133      ])
1134    ]),
1135    createBaseVNode("div", _hoisted_4$9, [
1136      createVNode($setup["RmcButton"], {
1137        "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
1138        onClick: _cache[1] || (_cache[1] = ($event) => $setup.emits("prev")),
1139        variant: "secondary",
1140        size: "lg"
1141      }, {
1142        default: withCtx(() => [
1143          createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
1144        ]),
1145        _: 1
1146      }, 8, ["data-ga-id"]),
1147      createVNode($setup["RmcButton"], {
1148        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
1149        onClick: withModifiers($setup.handleSubmit, ["prevent"]),
1150        type: "submit",
1151        variant: "primary",
1152        size: "lg"
1153      }, {
1154        default: withCtx(() => [
1155          createTextVNode(toDisplayString($setup.t("booking.steps.next")), 1
1155)
1156        ]),
1157        _: 1
1158      }, 8, ["data-ga-id"])
1159    ])
1160  ]);
1161}
1162const BasicInformationStep$2 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__file", "BasicInformationStep.vue"]]);
1163const _sfc_main$g = /* @__PURE__ */ defineComponent({
1164  __name: "ContactSummary",
1165  props: {
1166    data: {}
1167  },
1168  setup(__props, { expose: __expose }) {
1169    __expose();
1170    const { t } = useI18n();
1171    const items = computed(() => {
1172      var _a, _b, _c, _d, _e, _f, _g, _h, _i;
1173      return [
1174        { name: t("booking.contact.name"), value: `${(_a = __props.data) == null ? void 0 : _a.firstName} ${(_b = __props.data) == null ? void 0 : _b.lastName}` },
1175        { name: t("booking.contact.phone"), value: (_c = __props.data) == null ? void 0 : _c.phone },
1176        { name: t("booking.contact.email"), value: (_d = __props.data) == null ? void 0 : _d.email },
1177        {
1178          name: t("booking.contact.address"),
1179          value: `${(_e = __props.data) == null ? void 0 : _e.address}, ${(_f = __props.data) == null ? void 0 : _f.city}, ${(_g = __props.data) == null ? void 0 : _g.state} ${(_h = __props.data) == null ? void 0 : _h.zip}`
1180        },
1181        { name: t("booking.contact.additionalInformation"), value: (_i = __props.data) == null ? void 0 : _i.comment }
1182      ];
1183    });
1184    const __returned__ = { t, items, RmcDescriptionCard, RmcDescriptionCardRow };
1185    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1186    return __returned__;
1187  }
1188});
1189const _hoisted_1$f = { class: "text-capitalize" };
1190const _hoisted_2$b = { class: "text-capitalize" };
1191function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
1192  return openBlock(), createBlock($setup["RmcDescriptionCard"], { class: "h-100" }, createSlots({
1193    title: withCtx(() => [
1194      createTextVNode(toDisplayString($setup.t("booking.contact.title")), 1)
1195    ]),
1196    default: withCtx(() => [
1197      _cache[0] || (_cache[0] = createTextVNode("/> "))
1198    ]),
1199    _: 2
1200  }, [
1201    $props.data ? {
1202      name: "items",
1203      fn: withCtx(() => [
1204        (openBlock(true), createElementBlock(Fragment, null, renderList($setup.items, ({ name, value }) => {
1205          return openBlock(), createBlock($setup["RmcDescriptionCardRow"], { key: name }, {
1206            title: withCtx(() => [
1207              createBaseVNode("span", _hoisted_1$f, toDisplayString(name), 1)
1208            ]),
1209            value: withCtx(() => [
1210              createBaseVNode("div", _hoisted_2$b, toDisplayString(value), 1)
1211            ]),
1212            _: 2
1213          }, 1024);
1214        }), 128))
1215      ]),
1216      key: "0"
1217    } : void 0
1218  ]), 1024);
1219}
1220const ContactSummary = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__file", "ContactSummary.vue"]]);
1221const _sfc_main$f = /* @__PURE__ */ defineComponent({
1222  __name: "SummaryStep",
1223  props: {
1224    prevStep: {},
1225    currentStep: {}
1226  },
1227  emits: ["next", "prev"],
1228  setup(__props, { expose: __expose, emit: __emit }) {
1229    __expose();
1230    const props = __props;
1231    const { t } = useI18n();
1232    const data = useData();
1233    const { contractor } = data.value;
1234    const processing = ref(false);
1235    const {
1236      formState: {
1237        value: { dates, product, basicInformation }
1238      }
1239    } = useFormState$2();
1240    const emits = __emit;
1241    const handleSubmit = async () => {
1242      if (!contractor) return;
1243      try {
1244        processing.value = true;
1245        await contractorBookNow(contractor.OrganizationID, {
1246          City: basicInformation == null ? void 0 : basicInformation.city,
1247          Email: basicInformation == null ? void 0 : basicInformation.email,
1248          FirstName: basicInformation == null ? void 0 : basicInformation.firstName,
1249          LastName: basicInformation == null ? void 0 : basicInformation.lastName,
1250          Phone: basicInformation == null ? void 0 : basicInformation.phone,
1251          State: basicInformation == null ? void 0 : basicInformation.state,
1252          PostalCode: basicInformation == null ? void 0 : basicInformation.zip,
1253          ModelNumber: product == null ? void 0 : product.modelNumber,
1254          PurchaseLocation: product == null ? void 0 : product.purchaseLocation,
1255          SerialNumber: product == null ? void 0 : product.serialNumber,
1256          ServicePriority: (product == null ? void 0 : product.immediateServiceNeeded) ? t("booking.summary.high") : t("booking.summary.normal"),
1257          ServiceType: product == null ? void 0 : product.servicePreferences,
1258          Comments: basicInformation == null ? void 0 : basicInformation.comment,
1259          Street1: basicInformation == null ? void 0 : basicInformation.address,
1260          RequestedAppointmentDateChoice1: dateFormat(
1261            (dates == null ? void 0 : dates.first.date) || /* @__PURE__ */ new Date()
1262          ),
1263          RequestedAppointmentTimeChoice1: dates == null ? void 0 : dates.first.time,
1264          RequestedAppointmentDateChoice2: dateFormat(
1265            (dates == null ? void 0 : dates.second.date) || /* @__PURE__ */ new Date()
1266          ),
1267          RequestedAppointmentTimeChoice2: dates == null ? void 0 : dates.second.time,
1268          RequestedAppointmentDateChoice3: dateFormat(
1269            (dates == null ? void 0 : dates.third.date) || /* @__P
1269URE__ */ new Date()
1270          ),
1271          RequestedAppointmentTimeChoice3: dates == null ? void 0 : dates.third.time
1272        });
1273        processing.value = false;
1274        emits("next");
1275      } catch (e) {
1276        processing.value = false;
1277        console.log(e);
1278      }
1279    };
1280    const dateFormat = (date) => {
1281      return date.toLocaleDateString("en-US", {
1282        month: "2-digit",
1283        day: "2-digit",
1284        year: "numeric"
1285      });
1286    };
1287    const __returned__ = { props, t, data, contractor, processing, dates, product, basicInformation, emits, handleSubmit, dateFormat, RmcButton, PreferredDatesSummary, EquipmentSummary, ContactSummary };
1288    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1289    return __returned__;
1290  }
1291});
1292const _hoisted_1$e = { class: "row row-cols-1 row-cols-lg-3 rmc-g-3xl" };
1293const _hoisted_2$a = { class: "col" };
1294const _hoisted_3$8 = { class: "col" };
1295const _hoisted_4$8 = { class: "col" };
1296const _hoisted_5$4 = { class: "rmc-mt-8xl d-flex flex-column rmc-gap-lg" };
1297const _hoisted_6$2 = { class: "d-flex justify-content-end" };
1298const _hoisted_7$1 = { class: "d-flex justify-content-end rmc-gap-lg" };
1299function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
1300  return openBlock(), createElementBlock("div", null, [
1301    createBaseVNode("div", _hoisted_1$e, [
1302      createBaseVNode("div", _hoisted_2$a, [
1303        createVNode($setup["PreferredDatesSummary"], {
1304          class: "h-100",
1305          data: $setup.dates
1306        }, null, 8, ["data"])
1307      ]),
1308      createBaseVNode("div", _hoisted_3$8, [
1309        createVNode($setup["EquipmentSummary"], {
1310          class: "h-100",
1311          data: $setup.product
1312        }, null, 8, ["data"])
1313      ]),
1314      createBaseVNode("div", _hoisted_4$8, [
1315        createVNode($setup["ContactSummary"], {
1316          class: "h-100",
1317          data: $setup.basicInformation
1318        }, null, 8, ["data"])
1319      ])
1320    ]),
1321    createBaseVNode("div", _hoisted_5$4, [
1322      createBaseVNode("div", _hoisted_6$2, toDisplayString($setup.t("booking.success.disclaimer")), 1),
1323      createBaseVNode("div", _hoisted_7$1, [
1324        createVNode($setup["RmcButton"], {
1325          "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
1326          onClick: _cache[0] || (_cache[0] = ($event) => $setup.emits("prev")),
1327          variant: "secondary",
1328          size: "lg"
1329        }, {
1330          default: withCtx(() => [
1331            createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
1332          ]),
1333          _: 1
1334        }, 8, ["data-ga-id"]),
1335        createVNode($setup["RmcButton"], {
1336          "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
1337          disabled: $setup.processing,
1338          onClick: withModifiers($setup.handleSubmit, ["prevent"]),
1339          type: "submit",
1340          variant: "primary",
1341          size: "lg"
1342        }, {
1343          default: withCtx(() => [
1344            createTextVNode(toDisplayString($setup.t("booking.submitRequest")), 1)
1345          ]),
1346          _: 1
1347        }, 8, ["data-ga-id", "disabled"])
1348      ])
1349    ])
1350  ]);
1351}
1352const SummaryStep$2 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__file", "SummaryStep.vue"]]);
1353const _sfc_main$e = /* @__PURE__ */ defineComponent({
1354  __name: "ChoiceItem",
1355  props: /* @__PURE__ */ mergeModels({
1356    name: {}
1357  }, {
1358    "modelValue": {
1359      default: { time: "", date: "" }
1360    },
1361    "modelModifiers": {}
1362  }),
1363  emits: ["update:modelValue"],
1364  setup(__props, { expose: __expose }) {
1365    __expose();
1366    const { t } = useI18n();
1367    const model = useModel(__props, "modelValue");
1368    const minDate = ref(toRaw(toValue(model.value.date)));
1369    const __returned__ = { t, model, minDate, RmcRadio, RmcDatePicker };
1370    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1371    return __returned__;
1372  }
1373});
1374const _hoisted_1$d = { class: "rmc-ty-text-lg fw-bold rmc-mb-xl" };
1375const _hoisted_2$9 = { class: "d-flex flex-column rmc-gap-4xl" };
1376function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
1377  return openBlock(), createElementBlock("div", null, [
1378    createBaseVNode("div", _hoisted_1$d, [
1379      renderSlot(_ctx.$slots, "title")
1380    ]),
1381    createBaseVNode("div", _hoisted_2$9, [
1382      createVNode($setup["RmcDatePicker"], {
1383        modelValue: $setup.model.date,
1384        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.model.date = $event),
1385        "min-date": $setup.minDate
1386      }, null, 8, ["modelValue", "min-date"]),
1387      createVNode($setup["RmcRadio"], {
1388        checked: $setup.model.time === "morning",
1389        onChange: _cache[1] || (_cache[1] = ($event) => $setup.model.time = "morning"),
1390        value: "morning",
1391        name: `${$props.name}-time`
1392      }, {
1393        label: withCtx(() => [
1394          createTextVNode(toDisplayString($setup.t("booking.dateSelection.morning")), 1
1394)
1395        ]),
1396        "helper-text": withCtx(() => [
1397          createTextVNode(toDisplayString($setup.t("booking.dateSelection.morningTime")), 1)
1398        ]),
1399        _: 1
1400      }, 8, ["checked", "name"]),
1401      createVNode($setup["RmcRadio"], {
1402        checked: $setup.model.time === "afternoon",
1403        onChange: _cache[2] || (_cache[2] = ($event) => $setup.model.time = "afternoon"),
1404        value: "afternoon",
1405        name: `${$props.name}-time`
1406      }, {
1407        label: withCtx(() => [
1408          createTextVNode(toDisplayString($setup.t("booking.dateSelection.afternoon")), 1)
1409        ]),
1410        "helper-text": withCtx(() => [
1411          createTextVNode(toDisplayString($setup.t("booking.dateSelection.afternoonTime")), 1)
1412        ]),
1413        _: 1
1414      }, 8, ["checked", "name"])
1415    ])
1416  ]);
1417}
1418const ChoiceItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e], ["__file", "ChoiceItem.vue"]]);
1419const _sfc_main$d = /* @__PURE__ */ defineComponent({
1420  __name: "DatesForm",
1421  props: {
1422    "modelValue": {
1423      default: {
1424        first: { date: /* @__PURE__ */ new Date(), time: "afternoon" },
1425        second: { date: /* @__PURE__ */ new Date(), time: "morning" },
1426        third: { date: /* @__PURE__ */ new Date(), time: "morning" }
1427      }
1428    },
1429    "modelModifiers": {}
1430  },
1431  emits: /* @__PURE__ */ mergeModels(["next"], ["update:modelValue"]),
1432  setup(__props, { expose: __expose, emit: __emit }) {
1433    __expose();
1434    const { t } = useI18n();
1435    const emits = __emit;
1436    const model = useModel(__props, "modelValue");
1437    const __returned__ = { t, emits, model, ChoiceItem };
1438    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1439    return __returned__;
1440  }
1441});
1442const _hoisted_1$c = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
1443const _hoisted_2$8 = { class: "row row-cols-1 row-cols-lg-3 rmc-g-3xl" };
1444const _hoisted_3$7 = { class: "col" };
1445const _hoisted_4$7 = { class: "col" };
1446const _hoisted_5$3 = { class: "col" };
1447function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1448  return openBlock(), createElementBlock("div", null, [
1449    createBaseVNode("div", _hoisted_1$c, toDisplayString($setup.t("booking.dateSelection.title")), 1),
1450    createBaseVNode("div", _hoisted_2$8, [
1451      createBaseVNode("div", _hoisted_3$7, [
1452        createVNode($setup["ChoiceItem"], {
1453          name: "first",
1454          modelValue: $setup.model.first,
1455          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.model.first = $event)
1456        }, {
1457          title: withCtx(() => [
1458            createTextVNode(toDisplayString($setup.t("booking.dateSelection.firstChoice")), 1)
1459          ]),
1460          _: 1
1461        }, 8, ["modelValue"])
1462      ]),
1463      createBaseVNode("div", _hoisted_4$7, [
1464        createVNode($setup["ChoiceItem"], {
1465          name: "second",
1466          modelValue: $setup.model.second,
1467          "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.model.second = $event)
1468        }, {
1469          title: withCtx(() => [
1470            createTextVNode(toDisplayString($setup.t("booking.dateSelection.secondChoice")), 1)
1471          ]),
1472          _: 1
1473        }, 8, ["modelValue"])
1474      ]),
1475      createBaseVNode("div", _hoisted_5$3, [
1476        createVNode($setup["ChoiceItem"], {
1477          name: "third",
1478          modelValue: $setup.model.third,
1479          "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.model.third = $event)
1480        }, {
1481          title: withCtx(() => [
1482            createTextVNode(toDisplayString($setup.t("booking.dateSelection.thirdChoice")), 1)
1483          ]),
1484          _: 1
1485        }, 8, ["modelValue"])
1486      ])
1487    ])
1488  ]);
1489}
1490const DatesForm = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__file", "DatesForm.vue"]]);
1491const _sfc_main$c = /* @__PURE__ */ defineComponent({
1492  __name: "PreferredDateSelectionStep",
1493  props: /* @__PURE__ */ mergeModels({
1494    currentStep: {}
1495  }, {
1496    "modelValue": {},
1497    "modelModifiers": {}
1498  }),
1499  emits: /* @__PURE__ */ mergeModels(["next"], ["update:modelValue"]),
1500  setup(__props, { expose: __expose, emit: __emit }) {
1501    __expose();
1502    const props = __props;
1503    const emits = __emit;
1504    const { t } = useI18n();
1505    const data = useData();
1506    const { contractor } = data.value;
1507    const model = useModel(__props, "modelValue");
1508    const handleSubmit = () => {
1509      emits("next");
1510    };
1511    const __returned__ = { props, emits, t, data, contractor, model, handleSubmit, DatesForm, Rmc
1511Button, ContractorProfileSchedule };
1512    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1513    return __returned__;
1514  }
1515});
1516const _hoisted_1$b = { class: "row" };
1517const _hoisted_2$7 = { class: "col-12 col-lg-9" };
1518const _hoisted_3$6 = { class: "col-12 col-lg d-none d-lg-block" };
1519const _hoisted_4$6 = { class: "rmc-mt-8xl d-flex justify-content-end rmc-gap-lg" };
1520function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1521  var _a, _b;
1522  return openBlock(), createElementBlock("div", null, [
1523    createBaseVNode("div", _hoisted_1$b, [
1524      createBaseVNode("div", _hoisted_2$7, [
1525        createVNode($setup["DatesForm"], {
1526          modelValue: $setup.model,
1527          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.model = $event)
1528        }, null, 8, ["modelValue"])
1529      ]),
1530      createBaseVNode("div", _hoisted_3$6, [
1531        createVNode($setup["ContractorProfileSchedule"], {
1532          data: (_a = $setup.contractor) == null ? void 0 : _a.HoursOperation,
1533          "organization-id": (_b = $setup.contractor) == null ? void 0 : _b.OrganizationID
1534        }, null, 8, ["data", "organization-id"])
1535      ])
1536    ]),
1537    createBaseVNode("div", _hoisted_4$6, [
1538      createVNode($setup["RmcButton"], {
1539        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
1540        onClick: $setup.handleSubmit,
1541        variant: "secondary",
1542        size: "lg"
1543      }, {
1544        default: withCtx(() => [
1545          createTextVNode(toDisplayString($setup.t("booking.continueWithoutDates")), 1)
1546        ]),
1547        _: 1
1548      }, 8, ["data-ga-id"]),
1549      createVNode($setup["RmcButton"], {
1550        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
1551        onClick: $setup.handleSubmit,
1552        variant: "primary",
1553        size: "lg"
1554      }, {
1555        default: withCtx(() => [
1556          createTextVNode(toDisplayString($setup.t("booking.steps.next")), 1)
1557        ]),
1558        _: 1
1559      }, 8, ["data-ga-id"])
1560    ])
1561  ]);
1562}
1563const PreferredDateSelectionStep = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__file", "PreferredDateSelectionStep.vue"]]);
1564const _sfc_main$b = /* @__PURE__ */ defineComponent({
1565  __name: "BookingService",
1566  setup(__props, { expose: __expose }) {
1567    __expose();
1568    const data = useData();
1569    const { contractor } = data.value;
1570    const startDate = /* @__PURE__ */ new Date();
1571    if ((contractor == null ? void 0 : contractor.BookNowLeadTime) && contractor.BookNowLeadTime > 0) {
1572      startDate.setDate(startDate.getDate() + +contractor.BookNowLeadTime);
1573    }
1574    const { formState: formState2 } = useFormState$2(startDate);
1575    const currentStep = ref(0);
1576    const steps = [
1577      {
1578        component: PreferredDateSelectionStep,
1579        key: "dates"
1580      },
1581      {
1582        component: ProductDetailsStep$1,
1583        key: "product"
1584      },
1585      {
1586        component: BasicInformationStep$2,
1587        key: "basicInformation"
1588      },
1589      { component: SummaryStep$2 },
1590      { component: SuccessWidget }
1591    ];
1592    const prevStep = computed(() => currentStep.value > 0 ? currentStep.value - 1 : null);
1593    const currentModel = computed({
1594      get() {
1595        var _a;
1596        const key = (_a = steps[currentStep.value]) == null ? void 0 : _a.key;
1597        return key ? formState2.value[key] : null;
1598      },
1599      set(newValue) {
1600        var _a;
1601        const key = (_a = steps[currentStep.value]) == null ? void 0 : _a.key;
1602        if (key && newValue !== null) {
1603          formState2.value[key] = newValue;
1604        }
1605      }
1606    });
1607    const stepLabels = ["Dates", "Equipment", "Contact", "Review"];
1608    const handleNext = () => {
1609      currentStep.value++;
1610    };
1611    watch(currentStep, (newValue) => {
1612      if (currentStep.value <= 2) {
1613        const step = steps[currentStep.value];
1614        const model = formState2.value[step.key];
1615        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, model);
1616      }
1617      if (currentStep.value === 3) {
1618        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, "Confirm");
1619      }
1620      if (currentStep.value === 4) {
1621        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, "Submit");
1622      }
1623      scrollToTop();
1624    });
1625    const handlePrev = () => {
1626      currentStep.value--;
1627    };
1628    const __returned__ = { data, contractor, startDate, formState: formState2, currentStep, steps, prevStep, currentModel, stepLabels, handleNext, handlePrev, RmcProgressStepper };
1629    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1630    return __returned__;
1631  }
1632});
1633const _hoisted_1$a = { class: "rmc-container rmc-my-8xl" };
1634function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1635  return openBlock(), createElementBlock("div", null, [
1636    $setup.currentStep < 4 ? (openBlock(), createBlock($setup["RmcProgressStepper"], {
1637      key: 0,
1638      steps: $setup.stepLabels,
1639      "current-step-index": $setup.currentStep
1640    }, null, 8, ["current-step-index"])) : createCommentVNode("", true),
1641    createBaseVNode("div", _hoisted_1$a, [
1642      $setup.steps[$setup.currentStep] ? (openBlock(), createBlock(resolveDynamicComponent($setup.steps[$setup.currentStep].component), {
1643        key: 0,
1644        prevStep: $setup.prevStep,
1645        currentStep: $setup.currentStep,
1646        modelValue: $setup.currentModel,
1647        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.currentModel = $event),
1648        onNext: $setup.handleNext,
1649        onPrev: $setup.handlePrev
1650      }, null, 40, ["prevStep", "currentStep", "modelValue"])) : createCommentVNode("", true)
1651    ])
1652  ]);
1653}
1654const BookingService = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__file", "BookingService.vue"]]);
1655let formState$1 = null;
1656function useFormState$1(startDate) {
1657  if (!formState$1) {
1658    const startDateCurrent = startDate || /* @__PURE__ */ new Date();
1659    formState$1 = ref({
1660      dates: {
1661        first: { date: startDateCurrent, time: "morning" },
1662        second: { date: startDateCurrent, time: "morning" },
1663        third: { date: startDateCurrent, time: "morning" }
1664      },
1665      basicInformation: {
1666        firstName: "",
1667        lastName: "",
1668        email: "",
1669        phone: "",
1670        address: "",
1671        city: "",
1672        state: "AL",
1673        zip: "",
1674        comment: ""
1675      }
1676    });
1677  }
1678  return {
1679    formState: formState$1
1680  };
1681}
1682const _sfc_main$a = /* @__PURE__ */ defineComponent({
1683  __name: "BasicInformationStep",
1684  props: /* @__PURE__ */ mergeModels({
1685    prevStep: {},
1686    currentStep: {}
1687  }, {
1688    "modelValue": {},
1689    "modelModifiers": {}
1690  }),
1691  emits: /* @__PURE__ */ mergeModels(["next", "prev"], ["update:modelValue"]),
1692  setup(__props, { expose: __expose, emit: __emit }) {
1693    __expose();
1694    const props = __props;
1695    const { t } = useI18n();
1696    const emits = __emit;
1697    const model = useModel(__props, "modelValue");
1698    const data = useData();
1699    const { contractor } = data.value;
1700    const { formState: formState2 } = useFormState$1();
1701    const validators = createI18nValidators(t);
1702    const { form, isValid, validateForm, values } = useForm({
1703      comment: {
1704        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.comment) ?? "",
1705        validators: [validators.validateRequired, validators.getValidateMaxLength(1e3)]
1706      },
1707      firstName: {
1708        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.firstName) ?? "",
1709        validators: [validators.validateRequired, validators.validateName]
1710      },
1711      lastName: {
1712        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.lastName) ?? "",
1713        validators: [validators.validateRequired, validators.validateName]
1714      },
1715      email: {
1716        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.email) ?? "",
1717        validators: [validators.validateRequired, validators.validateEmail]
1718      },
1719      phone: {
1720        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.phone) ?? "",
1721        validators: [validators.validateRequired, validators.validatePhone]
1722      },
1723      address: {
1724        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.address) ?? "",
1725        validators: [validators.validateRequired, validators.validateAddress]
1726      },
1727      city: {
1728        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.city) ?? "",
1729        validators: [validators.validateRequired, validators.validateAddress]
1730      },
1731      state: {
1732        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.state) ?? ""
1733      },
1734      zip: {
1735        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.zip) ?? "",
1736        validators: [validators.validateRequired, (contractor == null ? void 0 : contractor.Country) === "CA" ? validators.validatePostalCode : validators.validateZipCode]
1737      }
1738    }) || {};
1739    const handleSubmit = async (e) => {
1740      e.preventDefault();
1741      validateForm();
1742      if (toValue(isValid) && model.value) {
1743        model.value = { ...model.value, ...values.value };
1744        emits("next");
1745      }
1746    };
1747    const __returned__ = { props, t, emits, model, data, contractor, formState: formState2, validators, form, isValid, validateForm, values, handleSubmit, RmcButton, BasicInformationForm, PreferredDatesSummary };
1748    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1749    return __returned__;
1750  }
1751});
1752const _hoisted_1$9 = { class: "row" };
1753const _hoisted_2$6 = { class: "col-12 col-lg-9" };
1754const _hoisted_3$5 = { class: "col-12 col-lg d-none d-lg-block" };
1755const _hoisted_4$5 = { class: "rmc-mt-8xl d-flex justify-content-end rmc-gap-lg" };
1756function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
1757  var _a, _b;
1758  return openBlock(), createElementBlock("div", null, [
1759    createBaseVNode("div", _hoisted_1$9, [
1760      createBaseVNode("div", _hoisted_2$6, [
1761        createVNode($setup["BasicInformationForm"], {
1762          modelValue: $setup.form,
1763          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form = $event),
1764          country: (_a = $setup.contractor) == null ? void 0 : _a.Country
1765        }, null, 8, ["modelValue", "country"])
1766      ]),
1767      createBaseVNode("div", _hoisted_3$5, [
1768        createVNode($setup["PreferredDatesSummary"], {
1769          class: "rounded-bottom-0",
1770          data: (_b = $setup.formState) == null ? void 0 : _b.dates
1771        }, null, 8, ["data"])
1772      ])
1773    ]),
1774    createBaseVNode("div", _hoisted_4$5, [
1775      createVNode($setup["RmcButton"], {
1776        "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
1777        onClick: _cache[1] || (_cache[1] = ($event) => $setup.emits("prev")),
1778        variant: "secondary",
1779        size: "lg"
1780      }, {
1781        default: withCtx(() => [
1782          createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
1783        ]),
1784        _: 1
1785      }, 8, ["data-ga-id"]),
1786      createVNode($setup["RmcButton"], {
1787        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
1788        onClick: withModifiers($setup.handleSubmit, ["prevent"]),
1789        type: "submit",
1790        variant: "primary",
1791        size: "lg"
1792      }, {
1793        default: withCtx(() => [
1794          createTextVNode(toDisplayString($setup.t("booking.steps.next")), 1)
1795        ]),
1796        _: 1
1797      }, 8, ["data-ga-id"])
1798    ])
1799  ]);
1800}
1801const BasicInformationStep$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a], ["__file", "BasicInformationStep.vue"]]);
1802const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1803  __name: "SummaryStep",
1804  props: {
1805    prevStep: {},
1806    currentStep: {}
1807  },
1808  emits: ["next", "prev"],
1809  setup(__props, { expose: __expose, emit: __emit }) {
1810    __expose();
1811    const props = __props;
1812    const { t } = useI18n();
1813    const data = useData();
1814    const { contractor } = data.value;
1815    const processing = ref(false);
1816    const {
1817      formState: {
1818        value: { dates, basicInformation }
1819      }
1820    } = useFormState$1();
1821    const emits = __emit;
1822    const handleSubmit = async () => {
1823      if (!contractor) return;
1824      try {
1825        processing.value = true;
1826        await contractorBookNow(contractor.OrganizationID, {
1827          City: basicInformation == null ? void 0 : basicInformation.city,
1828          Email: basicInformation == null ? void 0 : basicInformation.email,
1829          FirstName: basicInformation == null ? void 0 : basicInformation.firstName,
1830          LastName: basicInformation == null ? void 0 : basicInformation.lastName,
1831          Phone: basicInformation == null ? void 0 : basicInformation.phone,
1832          State: basicInformation == null ? void 0 : basicInformation.state,
1833          PostalCode: basicInformation == null ? void 0 : basicInformation.zip,
1834          Comments: basicInformation == null ? void 0 : basicInformation.comment,
1835          Street1: basicInformation == null ? void 0 : basicInformation.address,
1836          RequestedAppointmentDateChoice1: dateFormat(
1837            (dates == null ? void 0 : dates.first.date) || /* @__P
1837URE__ */ new Date()
1838          ),
1839          RequestedAppointmentTimeChoice1: dates == null ? void 0 : dates.first.time,
1840          RequestedAppointmentDateChoice2: dateFormat(
1841            (dates == null ? void 0 : dates.second.date) || /* @__PURE__ */ new Date()
1842          ),
1843          RequestedAppointmentTimeChoice2: dates == null ? void 0 : dates.second.time,
1844          RequestedAppointmentDateChoice3: dateFormat(
1845            (dates == null ? void 0 : dates.third.date) || /* @__PURE__ */ new Date()
1846          ),
1847          RequestedAppointmentTimeChoice3: dates == null ? void 0 : dates.third.time
1848        });
1849        processing.value = false;
1850        emits("next");
1851      } catch (e) {
1852        processing.value = false;
1853        console.log(e);
1854      }
1855    };
1856    const dateFormat = (date) => {
1857      return date.toLocaleDateString("en-US", {
1858        month: "2-digit",
1859        day: "2-digit",
1860        year: "numeric"
1861      });
1862    };
1863    const __returned__ = { props, t, data, contractor, processing, dates, basicInformation, emits, handleSubmit, dateFormat, RmcButton, PreferredDatesSummary, ContactSummary };
1864    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1865    return __returned__;
1866  }
1867});
1868const _hoisted_1$8 = { class: "row row-cols-1 row-cols-lg-2 rmc-g-3xl" };
1869const _hoisted_2$5 = { class: "col" };
1870const _hoisted_3$4 = { class: "col" };
1871const _hoisted_4$4 = { class: "rmc-mt-8xl d-flex flex-column rmc-gap-lg" };
1872const _hoisted_5$2 = { class: "d-flex justify-content-end" };
1873const _hoisted_6$1 = { class: "d-flex justify-content-end rmc-gap-lg" };
1874function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1875  return openBlock(), createElementBlock("div", null, [
1876    createBaseVNode("div", _hoisted_1$8, [
1877      createBaseVNode("div", _hoisted_2$5, [
1878        createVNode($setup["PreferredDatesSummary"], {
1879          class: "h-100",
1880          data: $setup.dates
1881        }, null, 8, ["data"])
1882      ]),
1883      createBaseVNode("div", _hoisted_3$4, [
1884        createVNode($setup["ContactSummary"], {
1885          class: "h-100",
1886          data: $setup.basicInformation
1887        }, null, 8, ["data"])
1888      ])
1889    ]),
1890    createBaseVNode("div", _hoisted_4$4, [
1891      createBaseVNode("div", _hoisted_5$2, toDisplayString($setup.t("booking.success.disclaimer")), 1),
1892      createBaseVNode("div", _hoisted_6$1, [
1893        createVNode($setup["RmcButton"], {
1894          "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
1895          onClick: _cache[0] || (_cache[0] = ($event) => $setup.emits("prev")),
1896          variant: "secondary",
1897          size: "lg"
1898        }, {
1899          default: withCtx(() => [
1900            createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
1901          ]),
1902          _: 1
1903        }, 8, ["data-ga-id"]),
1904        createVNode($setup["RmcButton"], {
1905          "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
1906          disabled: $setup.processing,
1907          onClick: withModifiers($setup.handleSubmit, ["prevent"]),
1908          type: "submit",
1909          variant: "primary",
1910          size: "lg"
1911        }, {
1912          default: withCtx(() => [
1913            createTextVNode(toDisplayString($setup.t("booking.submitRequest")), 1)
1914          ]),
1915          _: 1
1916        }, 8, ["data-ga-id", "disabled"])
1917      ])
1918    ])
1919  ]);
1920}
1921const SummaryStep$1 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__file", "SummaryStep.vue"]]);
1922const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1923  __name: "BookingConsultation",
1924  setup(__props, { expose: __expose }) {
1925    __expose();
1926    const data = useData();
1927    const { contractor } = data.value;
1928    const startDate = /* @__PURE__ */ new Date();
1929    if ((contractor == null ? void 0 : contractor.BookNowLeadTime) && contractor.BookNowLeadTime > 0) {
1930      startDate.setDate(startDate.getDate() + +contractor.BookNowLeadTime);
1931    }
1932    const { formState: formState2 } = useFormState$1(startDate);
1933    const currentStep = ref(0);
1934    const steps = [
1935      {
1936        component: PreferredDateSelectionStep,
1937        key: "dates"
1938      },
1939      {
1940        component: BasicInformationStep$1,
1941        key: "basicInformation"
1942      },
1943      { component: SummaryStep$1 },
1944      { component: SuccessWidget }
1945    ];
1946    const prevStep = computed(() => currentStep.value > 0 ? currentStep.value - 1 : null);
1947    const currentModel = computed({
1948      get() {
1949        var _a;
1950        const key = (_a = steps[currentStep.value]) == null ? void 0 : _a.key;
1951        return key ? formState2.value[key] : null;
1952      },
1953      set(newValue) {
1954        var _a;
1955        const key = (_a = steps[currentStep.value]) == null ? void 0 : _a.key;
1956        if (key && newValue !== null) {
1957          formState2.value[key] = newValue;
1958        }
1959      }
1960    });
1961    const stepLabels = ["Dates", "Contact", "Review"];
1962    const handleNext = () => {
1963      currentStep.value++;
1964    };
1965    watch(currentStep, (newValue) => {
1966      if (currentStep.value <= 1) {
1967        const step = steps[currentStep.value];
1968        const model = formState2.value[step.key];
1969        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, model);
1970      }
1971      if (currentStep.value === 2) {
1972        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, "Confirm");
1973      }
1974      if (currentStep.value === 3) {
1975        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, "Submit");
1976      }
1977      scrollToTop();
1978    });
1979    const handlePrev = () => {
1980      currentStep.value--;
1981    };
1982    const __returned__ = { data, contractor, startDate, formState: formState2, currentStep, steps, prevStep, currentModel, stepLabels, handleNext, handlePrev, RmcProgressStepper };
1983    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1984    return __returned__;
1985  }
1986});
1987const _hoisted_1$7 = { class: "rmc-container rmc-my-8xl" };
1988function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1989  return openBlock(), createElementBlock("div", null, [
1990    $setup.currentStep < 3 ? (openBlock(), createBlock($setup["RmcProgressStepper"], {
1991      key: 0,
1992      steps: $setup.stepLabels,
1993      "current-step-index": $setup.currentStep
1994    }, null, 8, ["current-step-index"])) : createCommentVNode("", true),
1995    createBaseVNode("div", _hoisted_1$7, [
1996      $setup.steps[$setup.currentStep] ? (openBlock(), createBlock(resolveDynamicComponent($setup.steps[$setup.currentStep].component), {
1997        key: 0,
1998        prevStep: $setup.prevStep,
1999        currentStep: $setup.currentStep,
2000        modelValue: $setup.currentModel,
2001        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.currentModel = $event),
2002        onNext: $setup.handleNext,
2003        onPrev: $setup.handlePrev
2004      }, null, 40, ["prevStep", "currentStep", "modelValue"])) : createCommentVNode("", true)
2005    ])
2006  ]);
2007}
2008const BookingConsultation = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__file", "BookingConsultation.vue"]]);
2009let formState = null;
2010function useFormState(startDate) {
2011  if (!formState) {
2012    const startDateCurrent = startDate || /* @__PURE__ */ new Date();
2013    formState = ref({
2014      dates: {
2015        first: { date: startDateCurrent, time: "morning" },
2016        second: { date: startDateCurrent, time: "morning" },
2017        third: { date: startDateCurrent, time: "morning" }
2018      },
2019      product: {
2020        serialNumber: "",
2021        model: ""
2022      },
2023      basicInformation: {
2024        firstName: "",
2025        lastName: "",
2026        email: "",
2027        phone: "",
2028        address: "",
2029        city: "",
2030        state: "AL",
2031        zip: "",
2032        comment: ""
2033      }
2034    });
2035  }
2036  return {
2037    formState
2038  };
2039}
2040const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2041  __name: "ProductReplaceForm",
2042  props: {
2043    "modelValue": {},
2044    "modelModifiers": {}
2045  },
2046  emits: ["update:modelValue"],
2047  setup(__props, { expose: __expose }) {
2048    __expose();
2049    const { t } = useI18n();
2050    const model = useModel(__props, "modelValue");
2051    const __returned__ = { t, model, RmcInput };
2052    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2053    return __returned__;
2054  }
2055});
2056const _hoisted_1$6 = {
2057  key: 0,
2058  class: "d-flex flex-column rmc-gap-6xl"
2059};
2060const _hoisted_2$4 = { class: "rmc-ty-display-xs fw-bold rmc-mb-lg" };
2061const _hoisted_3$3 = { class: "row row-cols-1 row-cols-lg-2 rmc-g-xl" };
2062const _hoisted_4$3 = { class: "col" };
2063const _hoisted_5$1 = { class: "col" };
2064function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
2065  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2066  return $setup.model ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
2067    createBaseVNode("div", null, [
2068      createBaseVNode("div", _hoisted_2$4, toDisplayString($setup.t("booking.summary.equipment")), 1),
2069      createBaseVNode("div", _hoisted_3$3, [
2070        createBaseVNode("div", _hoisted_4$3, [
2071          createVNode($setup["RmcInput"], {
2072            label: $setup.t("booking.summary.serialNumber"),
2073            value: (_b = (_a = $setup.model.serialNumber) == null ? void 0 : _a.value) == null ? void 0 : _b.value,
2074            error: (_d = (_c = $setup.model.serialNumber) == null ? void 0 : _c.error) == null ? void 0 : _d.value,
2075            onInput: _cache[0] || (_cache[0] = (e) => {
2076              var _a2, _b2, _c2;
2077              return (_c2 = (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.serialNumber) == null ? void 0 : _b2.setValue) == null ? void 0 : _c2.call(_b2, e.target.value);
2078            }),
2079            onBlur: (_e = $setup.model.serialNumber) == null ? void 0 : _e.onBlur
2080          }, null, 8, ["label", "value", "error", "onBlur"])
2081        ]),
2082        createBaseVNode("div", _hoisted_5$1, [
2083          createVNode($setup["RmcInput"], {
2084            label: $setup.t("booking.summary.modelNumber"),
2085            value: (_g = (_f = $setup.model.model) == null ? void 0 : _f.value) == null ? void 0 : _g.value,
2086            error: (_i = (_h = $setup.model.model) == null ? void 0 : _h.error) == null ? void 0 : _i.value,
2087            onInput: _cache[1] || (_cache[1] = (e) => {
2088              var _a2, _b2;
2089              return (_b2 = (_a2 = $setup.model) == null ? void 0 : _a2.model) == null ? void 0 : _b2.setValue(e.target.value);
2090            }),
2091            onBlur: (_j = $setup.model.model) == null ? void 0 : _j.onBlur
2092          }, null, 8, ["label", "value", "error", "onBlur"])
2093        ])
2094      ])
2095    ])
2096  ])) : createCommentVNode("", true);
2097}
2098const ProductReplaceForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__file", "ProductReplaceForm.vue"]]);
2099const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2100  __name: "ProductDetailsStep",
2101  props: /* @__PURE__ */ mergeModels({
2102    prevStep: {},
2103    currentStep: {}
2104  }, {
2105    "modelValue": {},
2106    "modelModifiers": {}
2107  }),
2108  emits: /* @__PURE__ */ mergeModels(["next", "prev"], ["update:modelValue"]),
2109  setup(__props, { expose: __expose, emit: __emit }) {
2110    var _a, _b;
2111    __expose();
2112    const props = __props;
2113    const emits = __emit;
2114    const { t } = useI18n();
2115    const model = useModel(__props, "modelValue");
2116    const { formState: formState2 } = useFormState();
2117    const validators = createI18nValidators(t);
2118    const { form, isValid, validateForm, values } = useForm({
2119      serialNumber: {
2120        initialValue: (_a = model.value) == null ? void 0 : _a.seri
2120alNumber,
2121        validators: [validators.validateRequired]
2122      },
2123      model: {
2124        initialValue: (_b = model.value) == null ? void 0 : _b.model,
2125        validators: [validators.validateRequired]
2126      }
2127    }) || {};
2128    const handleSubmit = async (e) => {
2129      e.preventDefault();
2130      validateForm();
2131      if (toValue(isValid) && model.value) {
2132        model.value = { ...model.value, ...values.value };
2133        emits("next");
2134      }
2135    };
2136    const __returned__ = { props, emits, t, model, formState: formState2, validators, form, isValid, validateForm, values, handleSubmit, RmcButton, PreferredDatesSummary, ProductReplaceForm };
2137    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2138    return __returned__;
2139  }
2140});
2141const _hoisted_1$5 = { class: "row" };
2142const _hoisted_2$3 = { class: "col-12 col-lg-9" };
2143const _hoisted_3$2 = { class: "col-12 col-lg d-none d-lg-block" };
2144const _hoisted_4$2 = { class: "rmc-mt-8xl d-flex justify-content-end rmc-gap-lg" };
2145function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
2146  return openBlock(), createElementBlock("div", null, [
2147    createBaseVNode("div", _hoisted_1$5, [
2148      createBaseVNode("div", _hoisted_2$3, [
2149        createVNode($setup["ProductReplaceForm"], {
2150          modelValue: $setup.form,
2151          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form = $event)
2152        }, null, 8, ["modelValue"])
2153      ]),
2154      createBaseVNode("div", _hoisted_3$2, [
2155        $setup.formState ? (openBlock(), createBlock($setup["PreferredDatesSummary"], {
2156          key: 0,
2157          data: $setup.formState.dates
2158        }, null, 8, ["data"])) : createCommentVNode("", true)
2159      ])
2160    ]),
2161    createBaseVNode("div", _hoisted_4$2, [
2162      createVNode($setup["RmcButton"], {
2163        "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
2164        onClick: _cache[1] || (_cache[1] = ($event) => $setup.emits("prev")),
2165        variant: "secondary",
2166        size: "lg"
2167      }, {
2168        default: withCtx(() => [
2169          createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
2170        ]),
2171        _: 1
2172      }, 8, ["data-ga-id"]),
2173      createVNode($setup["RmcButton"], {
2174        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
2175        onClick: withModifiers($setup.handleSubmit, ["prevent"]),
2176        type: "submit",
2177        variant: "primary",
2178        size: "lg"
2179      }, {
2180        default: withCtx(() => [
2181          createTextVNode(toDisplayString($setup.t("booking.steps.next")), 1)
2182        ]),
2183        _: 1
2184      }, 8, ["data-ga-id"])
2185    ])
2186  ]);
2187}
2188const ProductDetailsStep = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__file", "ProductDetailsStep.vue"]]);
2189const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2190  __name: "EquipmentReplaceSummary",
2191  props: {
2192    data: {}
2193  },
2194  setup(__props, { expose: __expose }) {
2195    var _a, _b;
2196    __expose();
2197    const { t } = useI18n();
2198    const items = [
2199      { name: t("booking.summary.serialNumber"), value: (_a = __props.data) == null ? void 0 : _a.serialNumber },
2200      { name: t("booking.summary.model"), value: (_b = __props.data) == null ? void 0 : _b.model }
2201    ];
2202    const __returned__ = { t, items, RmcDescriptionCard, RmcDescriptionCardRow };
2203    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2204    return __returned__;
2205  }
2206});
2207const _hoisted_1$4 = { class: "text-capitalize" };
2208const _hoisted_2$2 = { class: "text-capitalize" };
2209function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
2210  return openBlock(), createBlock($setup["RmcDescriptionCard"], null, createSlots({
2211    title: withCtx(() => [
2212      createTextVNode(toDisplayString($setup.t("booking.summary.equipment")), 1)
2213    ]),
2214    default: withCtx(() => [
2215      _cache[0] || (_cache[0] = createTextVNode("/> "))
2216    ]),
2217    _: 2
2218  }, [
2219    $props.data ? {
2220      name: "items",
2221      fn: withCtx(() => [
2222        (openBlock(), createElementBlock(Fragment, null, renderList($setup.items, ({ name, value }) => {
2223          return createVNode($setup["RmcDescriptionCardRow"], null, {
2224            title: withCtx(() => [
2225              createBaseVNode("span", _hoisted_1$4, toDisplayString(name), 1)
2226            ]),
2227            value: withCtx(() => [
2228              createBaseVNode("div", _hoisted_2$2, toDisplayString(value), 1)
2229            ]),
2230            _: 2
2231          }, 1024);
2232        }), 64))
2233      ]),
2234      key: "0"
2235    } : void 0
2236  ]), 1024);
2237}
2238const EquipmentReplaceSummary = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__file", "EquipmentReplaceSummary.vue"]]);
2239const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2240  __name: "BasicInformationStep",
2241  props: /* @__PURE__ */ mergeModels({
2242    prevStep: {},
2243    currentStep: {}
2244  }, {
2245    "modelValue": {},
2246    "modelModifiers": {}
2247  }),
2248  emits: /* @__PURE__ */ mergeModels(["next", "prev"], ["update:modelValue"]),
2249  setup(__props, { expose: __expose, emit: __emit }) {
2250    __expose();
2251    const props = __props;
2252    const { t } = useI18n();
2253    const emits = __emit;
2254    const model = useModel(__props, "modelValue");
2255    const data = useData();
2256    const { contractor } = data.value;
2257    const { formState: formState2 } = useFormState();
2258    const validators = createI18nValidators(t);
2259    const { form, isValid, validateForm, values } = useForm({
2260      comment: {
2261        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.comment) ?? "",
2262        validators: [validators.validateRequired, validators.getValidateMaxLength(1e3)]
2263      },
2264      firstName: {
2265        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.firstName) ?? "",
2266        validators: [validators.validateRequired, validators.validateName]
2267      },
2268      lastName: {
2269        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.lastName) ?? "",
2270        validators: [validators.validateRequired, validators.validateName]
2271      },
2272      email: {
2273        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.email) ?? "",
2274        validators: [validators.validateRequired, validators.validateEmail]
2275      },
2276      phone: {
2277        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.phone) ?? "",
2278        validators: [validators.validateRequired, validators.validatePhone]
2279      },
2280      address: {
2281        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.address) ?? "",
2282        validators: [validators.validateRequired, validators.validateAddress]
2283      },
2284      city: {
2285        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.city) ?? "",
2286        validators: [validators.validateRequired, validators.validateAddress]
2287      },
2288      state: {
2289        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.state) ?? ""
2290      },
2291      zip: {
2292        initialValue: (formState2 == null ? void 0 : formState2.value.basicInformation.zip) ?? "",
2293        validators: [validators.validateRequired, (contractor == null ? void 0 : contractor.Country) === "CA" ? validators.validatePostalCode : validators.validateZipCode]
2294      }
2295    }) || {};
2296    const handleSubmit = async (e) => {
2297      e.preventDefault();
2298      validateForm();
2299      if (toValue(isValid) && model.value) {
2300        model.value = { ...model.value, ...values.value };
2301        emits("next");
2302      }
2303    };
2304    const __returned__ = { props, t, emits, model, data, contractor, formState: formState2, validators, form, isValid, validateForm, values, handleSubmit, RmcButton, BasicInformationForm, PreferredDatesSummary, EquipmentReplaceSummary };
2305    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2306    return __returned__;
2307  }
2308});
2309const _hoisted_1$3 = { class: "row" };
2310const _hoisted_2$1 = { class: "col-12 col-lg-9" };
2311const _hoisted_3$1 = { class: "col-12 col-lg d-none d-lg-block" };
2312const _hoisted_4$1 = { class: "rmc-mt-8xl d-flex justify-content-end rmc-gap-lg" };
2313function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
2314  var _a, _b, _c;
2315  return openBlock(), createElementBlock("div", null, [
2316    createBaseVNode("div", _hoisted_1$3, [
2317      createBaseVNode("div", _hoisted_2$1, [
2318        createVNode($setup["BasicInformationForm"], {
2319          modelValue: $setup.form,
2320          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.form = $event),
2321          country: (_a = $setup.contractor) == null ? void 0 : _a.Country
2322        }, null, 8, ["modelValue", "country"])
2323      ]),
2324      createBaseVNode("div", _hoisted_3$1, [
2325        createVNode($setup["PreferredDatesSummary"], {
2326          class: "rounded-bottom-0",
2327          data: (_b = $setup.formState) == null ? void 0 : _b.dates
2328        }, null, 8, ["data"]),
2329        createVNode($setup["EquipmentReplaceSummary"], {
2330          class: "rounded-top-0",
2331          data: (_c = $setup.formState) == null ? void 0 : _c.product
2332        }, null, 8, ["data"])
2333      ])
2334    ]),
2335    createBaseVNode("div", _hoisted_4$1, [
2336      createVNode($setup["RmcButton"], {
2337        "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
2338        onClick: _cache[1] || (_cache[1] = ($event) => $setup.emits("prev")),
2339        variant: "secondary",
2340        size: "lg"
2341      }, {
2342        default: withCtx(() => [
2343          createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
2344        ]),
2345        _: 1
2346      }, 8, ["data-ga-id"]),
2347      createVNode($setup["RmcButton"], {
2348        "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
2349        onClick: withModifiers($setup.handleSubmit, ["prevent"]),
2350        type: "submit",
2351        variant: "primary",
2352        size: "lg"
2353      }, {
2354        default: withCtx(() => [
2355          createTextVNode(toDisplayString($setup.t("booking.steps.next")), 1
2355)
2356        ]),
2357        _: 1
2358      }, 8, ["data-ga-id"])
2359    ])
2360  ]);
2361}
2362const BasicInformationStep = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__file", "BasicInformationStep.vue"]]);
2363const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2364  __name: "SummaryStep",
2365  props: {
2366    prevStep: {},
2367    currentStep: {}
2368  },
2369  emits: ["next", "prev"],
2370  setup(__props, { expose: __expose, emit: __emit }) {
2371    __expose();
2372    const props = __props;
2373    const { t } = useI18n();
2374    const data = useData();
2375    const { contractor } = data.value;
2376    const processing = ref(false);
2377    const {
2378      formState: {
2379        value: { dates, product, basicInformation }
2380      }
2381    } = useFormState();
2382    const emits = __emit;
2383    const handleSubmit = async () => {
2384      if (!contractor) return;
2385      try {
2386        processing.value = true;
2387        await contractorBookNow(contractor.OrganizationID, {
2388          City: basicInformation == null ? void 0 : basicInformation.city,
2389          Email: basicInformation == null ? void 0 : basicInformation.email,
2390          FirstName: basicInformation == null ? void 0 : basicInformation.firstName,
2391          LastName: basicInformation == null ? void 0 : basicInformation.lastName,
2392          Phone: basicInformation == null ? void 0 : basicInformation.phone,
2393          State: basicInformation == null ? void 0 : basicInformation.state,
2394          PostalCode: basicInformation == null ? void 0 : basicInformation.zip,
2395          ModelNumber: product == null ? void 0 : product.model,
2396          Comments: basicInformation == null ? void 0 : basicInformation.comment,
2397          Street1: basicInformation == null ? void 0 : basicInformation.address,
2398          RequestedAppointmentDateChoice1: dateFormat(
2399            (dates == null ? void 0 : dates.first.date) || /* @__P
2399URE__ */ new Date()
2400          ),
2401          RequestedAppointmentTimeChoice1: dates == null ? void 0 : dates.first.time,
2402          RequestedAppointmentDateChoice2: dateFormat(
2403            (dates == null ? void 0 : dates.second.date) || /* @__PURE__ */ new Date()
2404          ),
2405          RequestedAppointmentTimeChoice2: dates == null ? void 0 : dates.second.time,
2406          RequestedAppointmentDateChoice3: dateFormat(
2407            (dates == null ? void 0 : dates.third.date) || /* @__PURE__ */ new Date()
2408          ),
2409          RequestedAppointmentTimeChoice3: dates == null ? void 0 : dates.third.time
2410        });
2411        processing.value = false;
2412        emits("next");
2413      } catch (e) {
2414        processing.value = false;
2415        console.log(e);
2416      }
2417    };
2418    const dateFormat = (date) => {
2419      return date.toLocaleDateString("en-US", {
2420        month: "2-digit",
2421        day: "2-digit",
2422        year: "numeric"
2423      });
2424    };
2425    const __returned__ = { props, t, data, contractor, processing, dates, product, basicInformation, emits, handleSubmit, dateFormat, RmcButton, PreferredDatesSummary, ContactSummary, EquipmentReplaceSummary };
2426    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2427    return __returned__;
2428  }
2429});
2430const _hoisted_1$2 = { class: "row row-cols-1 row-cols-lg-3 rmc-g-3xl" };
2431const _hoisted_2 = { class: "col" };
2432const _hoisted_3 = { class: "col" };
2433const _hoisted_4 = { class: "col" };
2434const _hoisted_5 = { class: "rmc-mt-8xl d-flex flex-column rmc-gap-lg" };
2435const _hoisted_6 = { class: "d-flex justify-content-end" };
2436const _hoisted_7 = { class: "d-flex justify-content-end rmc-gap-lg" };
2437function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2438  return openBlock(), createElementBlock("div", null, [
2439    createBaseVNode("div", _hoisted_1$2, [
2440      createBaseVNode("div", _hoisted_2, [
2441        createVNode($setup["PreferredDatesSummary"], {
2442          class: "h-100",
2443          data: $setup.dates
2444        }, null, 8, ["data"])
2445      ]),
2446      createBaseVNode("div", _hoisted_3, [
2447        createVNode($setup["EquipmentReplaceSummary"], {
2448          class: "h-100",
2449          data: $setup.product
2450        }, null, 8, ["data"])
2451      ]),
2452      createBaseVNode("div", _hoisted_4, [
2453        createVNode($setup["ContactSummary"], {
2454          class: "h-100",
2455          data: $setup.basicInformation
2456        }, null, 8, ["data"])
2457      ])
2458    ]),
2459    createBaseVNode("div", _hoisted_5, [
2460      createBaseVNode("div", _hoisted_6, toDisplayString($setup.t("booking.success.disclaimer")), 1),
2461      createBaseVNode("div", _hoisted_7, [
2462        createVNode($setup["RmcButton"], {
2463          "data-ga-id": `find-a-pro-booking-step-${$props.prevStep !== null ? $props.prevStep : ""}`,
2464          onClick: _cache[0] || (_cache[0] = ($event) => $setup.emits("prev")),
2465          variant: "secondary",
2466          size: "lg"
2467        }, {
2468          default: withCtx(() => [
2469            createTextVNode(toDisplayString($setup.t("booking.steps.previous")), 1)
2470          ]),
2471          _: 1
2472        }, 8, ["data-ga-id"]),
2473        createVNode($setup["RmcButton"], {
2474          "data-ga-id": `find-a-pro-booking-step-${$props.currentStep}`,
2475          disabled: $setup.processing,
2476          onClick: withModifiers($setup.handleSubmit, ["prevent"]),
2477          type: "submit",
2478          variant: "primary",
2479          size: "lg"
2480        }, {
2481          default: withCtx(() => [
2482            createTextVNode(toDisplayString($setup.t("booking.submitRequest")), 1)
2483          ]),
2484          _: 1
2485        }, 8, ["data-ga-id", "disabled"])
2486      ])
2487    ])
2488  ]);
2489}
2490const SummaryStep = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__file", "SummaryStep.vue"]]);
2491const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2492  __name: "BookingReplace",
2493  setup(__props, { expose: __expose }) {
2494    __expose();
2495    const data = useData();
2496    const { contractor } = data.value;
2497    const startDate = /* @__PURE__ */ new Date();
2498    if ((contractor == null ? void 0 : contractor.BookNowLeadTime) && contractor.BookNowLeadTime > 0) {
2499      startDate.setDate(startDate.getDate() + +contractor.BookNowLeadTime);
2500    }
2501    const { formState: formState2 } = useFormState(startDate);
2502    const currentStep = ref(0);
2503    const steps = [
2504      {
2505        component: PreferredDateSelectionStep,
2506        key: "dates"
2507      },
2508      {
2509        component: ProductDetailsStep,
2510        key: "product"
2511      },
2512      {
2513        component: BasicInformationStep,
2514        key: "basicInformation"
2515      },
2516      { component: SummaryStep },
2517      { component: SuccessWidget }
2518    ];
2519    const prevStep = computed(() => currentStep.value > 0 ? currentStep.value - 1 : null);
2520    const currentModel = computed({
2521      get() {
2522        var _a;
2523        const key = (_a = steps[currentStep.value]) == null ? void 0 : _a.key;
2524        return key ? formState2.value[key] : null;
2525      },
2526      set(newValue) {
2527        var _a;
2528        const key = (_a = steps[currentStep.value]) == null ? void 0 : _a.key;
2529        if (key && newValue !== null) {
2530          formState2.value[key] = newValue;
2531        }
2532      }
2533    });
2534    const stepLabels = ["Dates", "Equipment", "Contact", "Review"];
2535    const handleNext = () => {
2536      currentStep.value++;
2537    };
2538    watch(currentStep, (newValue) => {
2539      if (currentStep.value <= 2) {
2540        const step = steps[currentStep.value];
2541        const model = formState2.value[step.key];
2542        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, model);
2543      }
2544      if (currentStep.value === 3) {
2545        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, "Confirm");
2546      }
2547      if (currentStep.value === 4) {
2548        dataLayerUtils.pushAppointmentStepEvent(currentStep.value + 1, "Submit");
2549      }
2550      scrollToTop();
2551    });
2552    const handlePrev = () => {
2553      currentStep.value--;
2554    };
2555    const __returned__ = { data, contractor, startDate, formState: formState2, currentStep, steps, prevStep, currentModel, stepLabels, handleNext, handlePrev, RmcProgressStepper };
2556    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2557    return __returned__;
2558  }
2559});
2560const _hoisted_1$1 = { class: "rmc-container rmc-my-8xl" };
2561function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2562  return openBlock(), createElementBlock("div", null, [
2563    $setup.currentStep < 4 ? (openBlock(), createBlock($setup["RmcProgressStepper"], {
2564      key: 0,
2565      steps: $setup.stepLabels,
2566      "current-step-index": $setup.currentStep
2567    }, null, 8, ["current-step-index"])) : createCommentVNode("", true),
2568    createBaseVNode("div", _hoisted_1$1, [
2569      $setup.steps[$setup.currentStep] ? (openBlock(), createBlock(resolveDynamicComponent($setup.steps[$setup.currentStep].component), {
2570        key: 0,
2571        prevStep: $setup.prevStep,
2572        currentStep: $setup.currentStep,
2573        modelValue: $setup.currentModel,
2574        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.currentModel = $event),
2575        onNext: $setup.handleNext,
2576        onPrev: $setup.handlePrev
2577      }, null, 40, ["prevStep", "currentStep", "modelValue"])) : createCommentVNode("", true)
2578    ])
2579  ]);
2580}
2581const BookingReplace = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "BookingReplace.vue"]]);
2582const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2583  __name: "BookingComponent",
2584  setup(__props, { expose: __expose }) {
2585    __expose();
2586    const requestType = ref();
2587    const handleChange = (value) => {
2588      requestType.value = value == null ? void 0 : value.type;
2589      if (value == null ? void 0 : value.text) {
2590        dataLayerUtils.pushAppointmentStepEvent(1, value.text);
2591      }
2592    };
2593    const bookingTypeComponents = {
2594      consultation: BookingConsultation,
2595      service: BookingService,
2596      replace: BookingReplace
2597    };
2598    const CurrentBookingComponent = computed(
2599      () => requestType.value ? bookingTypeComponents[requestType.value] : null
2600    );
2601    const __returned__ = { requestType, handleChange, bookingTypeComponents, CurrentBookingComponent, RequestTypeSelector };
2602    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2603    return __returned__;
2604  }
2605});
2606const _hoisted_1 = { key: 1 };
2607function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
2608  return !$setup.requestType ? (openBlock(), createBlock($setup["RequestTypeSelector"], {
2609    key: 0,
2610    onChange: $setup.handleChange
2611  })) : (openBlock(), createElementBlock("div", _hoisted_1, [
2612    (openBlock(), createBlock(resolveDynamicComponent($setup.CurrentBookingComponent)))
2613  ]));
2614}
2615const BookingComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "BookingComponent.vue"]]);
2616const _sfc_main = /* @__PURE__ */ defineComponent({
2617  __name: "+Page",
2618  setup(__props, { expose: __expose }) {
2619    __expose();
2620    const { t } = useI18n();
2621    const data = useData();
2622    const { contractor, language } = data.value;
2623    const breadcrumbsData = {
2624      [t("booking.breadcrumbs.home")]: language && language !== "en" ? `/${language}/` : "/",
2625      [t("booking.breadcrumbs.findAPro")]: language && language !== "en" ? `/${language}/find-a-pro/` : "/find-a-pro/",
2626      [t("booking.breadcrumbs.getConsultation")]: ""
2627    };
2628    const __returned__ = { t, data, contractor, language, breadcrumbsData, RmcHeader, BookingComponent, RmcBreadcrumbs, RmcButton, RmcIcon };
2629    Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2630    return __returned__;
2631  }
2632});
2633function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2634  return openBlock(), createElementBlock(Fragment, null, [
2635    createVNode($setup["RmcHeader"], {
2636      title: $setup.t("booking.title"),
2637      class: "rmc-container"
2638    }, {
2639      breadcrumbs: withCtx(() => [
2640        createVNode($setup["RmcBreadcrumbs"], { data: $setup.breadcrumbsData })
2641      ]),
2642      buttons: withCtx(() => [
2643        createVNode($setup["RmcButton"], null, {
2644          startIcon: withCtx(() => [
2645            createVNode($setup["RmcIcon"], { "icon-name": "villa" })
2646          ]),
2647          default: withCtx(() => {
2648            var _a;
2649            return [
2650              createTextVNode(" " + toDisplayString((_a = $setup.contractor) == null ? void 0 : _a.OrganizationName), 1)
2651            ];
2652          }),
2653          _: 1
2654        }),
2655        createVNode($setup["RmcButton"], null, {
2656          startIcon: withCtx(() => [
2657            createVNode($setup["RmcIcon"], { "icon-name": "location-on-filled" })
2658          ]),
2659          default: withCtx(() => {
2660            var _a;
2661            return [
2662              createTextVNode(" " + toDisplayString((_a = $setup.contractor) == null ? void 0 : _a.AddressLine1), 1)
2663            ];
2664          }),
2665          _: 1
2666        })
2667      ]),
2668      _: 1
2669    }, 8, ["title"]),
2670    createVNode($setup["BookingComponent"], { contractor: $setup.contractor }, null, 8, ["contractor"])
2671  ], 64);
2672}
2673const _Page = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "+Page.vue"]]);
2674const import4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2675  __proto__: null,
2676  default: _Page
2677}, Symbol.toStringTag, { value: "Module" }));
2678export {
2679  import4 as i
2680};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.