bhl-forms 0.12.5 → 0.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,17 +15,6 @@ const DEFAULT_COMMENTS_LABEL = "Please briefly describe your issue in a few word
15
15
  const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC =
16
16
  '$getKey($meta, "commentsPlaceholders." + $get(Category).value, $meta.defaultCommentsPlaceholder)';
17
17
 
18
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL =
19
- '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
20
- const DEFAULT_FINAL_HEADLINE_LEGAL = "Connect With The Legal Help You Deserve";
21
- const DEFAULT_FINAL_HEADLINE_DYNAMIC =
22
- '$getKey($meta, "finalHeadlines." + ($get(Type_Of_Legal_Problem).value || $get(Category).value), $meta.defaultFinalHeadline)';
23
- const DEFAULT_FINAL_SUBHEADLINE_LEGAL = "Get a no-obligation consultation with a legal expert.";
24
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC =
25
- '$getKey($meta, "finalSubHeadlines." + ($get(Type_Of_Legal_Problem).value || $get(Category).value), $meta.defaultFinalSubHeadline)';
26
- const TCPA_LANGUAGE_LEGAL =
27
- 'By checking this box, I agree to the Terms of Use and consent to be contacted by <a href="/providers" target="_blank">lawyers, lawyer networks, and partners</a> of this website using live, autodialed, pre-recorded, or artificial voice calls and text messages, at any time including before 8 AM or after 9 PM local time. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.';
28
-
29
18
  // ------ Common Base Settings
30
19
 
31
20
  const ensureIds = (cfg) => {
@@ -51,93 +40,6 @@ const radio = (updates) => {
51
40
  )
52
41
  };
53
42
 
54
- // TODO: rename
55
- const col2RadioCenter = (updates) => {
56
- updates.legendClass = "required t-w-[100%] t-text-center";
57
- if (typeof updates.fieldsetClass === "undefined") {
58
- updates.fieldsetClass = "$reset t-flex t-justify-center";
59
- }
60
- updates.innerClass = "t-items-start";
61
- updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
62
- updates.optionClass = "t-pl-4 sm:t-pl-8 sm:t-min-w-[200px]";
63
- updates.optionsClass = "t-pl-0 sm:t-pl-4 t-pt-3 t-grid t-grid-cols-1 sm:t-grid-cols-2";
64
- updates.messagesClass = "t-flex t-justify-center";
65
- updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
66
- return radio(updates)
67
- };
68
-
69
- const sbs2ColRadio = (updates) => {
70
- updates.legendClass = "legend-left-flex md:t-max-w-[40%] required";
71
- updates.fieldsetClass = "$reset side-by-side-flex";
72
- updates.optionsClass = "md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125";
73
- updates.innerClass = "t-flex t-items-start";
74
- updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
75
- return radio(updates)
76
- };
77
-
78
- const sbs2ItemRadio = (updates) => {
79
- updates.legendClass = "legend-left t-pb-1 required";
80
- updates.fieldsetClass = "$reset side-by-side t-items-center";
81
- updates.optionsClass = "t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center";
82
- updates.innerClass = "t-flex t-items-center";
83
- updates.optionClass = "t-pr-1";
84
- return radio(updates)
85
- };
86
-
87
- const sbsYesNoRadio = (updates) => {
88
- updates.options = ["Yes", "No"];
89
- return sbs2ItemRadio(updates)
90
- };
91
-
92
- const verticalButtonRadio = (updates) => {
93
- updates.legendClass = "legend-left";
94
- updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col-reverse t-items-center";
95
- if (typeof updates.optionsClass === "undefined") {
96
- updates.optionsClass = "t-flex t-flex-col sm:t-flex-row t-justify-center t-my-3";
97
- }
98
- updates.optionClass = "radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5";
99
- updates.wrapperClass = "$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]";
100
- updates.labelClass = "t-font-semibold t-text-[#1e448f] t-w-[100%]";
101
- updates.decoratorIcon = false;
102
- updates.messagesClass = "t-flex t-justify-center";
103
- updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
104
- return radio(updates)
105
- };
106
-
107
- const verticalYesNoRadio = (updates) => {
108
- updates.options = ["Yes", "No"];
109
- updates.optionsClass = "t-flex t-justify-center t-my-3";
110
- return verticalButtonRadio(updates)
111
- };
112
-
113
- const text = (updates) => {
114
- ensureIds(updates);
115
- return merge(
116
- {
117
- $formkit: "text",
118
- validation: "required",
119
- validationMessages: {
120
- required: "Field is required",
121
- },
122
- labelClass: "required",
123
- },
124
- updates
125
- )
126
- };
127
-
128
- const sbsText = (updates) => {
129
- updates.wrapperClass = "side-by-side t-items-center";
130
- return text(updates)
131
- };
132
-
133
- const verticalText = (updates) => {
134
- updates.wrapperClass = "t-flex t-justify-center";
135
- updates.messagesClass = "t-flex t-justify-center";
136
- updates.inputClass = "t-text-center";
137
- updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
138
- return text(updates)
139
- };
140
-
141
43
  const textArea = (updates) => {
142
44
  ensureIds(updates);
143
45
  return merge(
@@ -156,171 +58,6 @@ const textArea = (updates) => {
156
58
  )
157
59
  };
158
60
 
159
- const date = (updates) => {
160
- ensureIds(updates);
161
- return merge(
162
- {
163
- $formkit: "DatePicker",
164
- validation: "required",
165
- validationMessages: {
166
- required: "Field is required",
167
- },
168
- labelClass: "required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500",
169
- innerClass:
170
- "t-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500",
171
- },
172
- updates
173
- )
174
- };
175
-
176
- const sbsDate = (updates) => {
177
- updates.wrapperClass = "side-by-side t-items-center";
178
- return date(updates)
179
- };
180
-
181
- const verticalDate = (updates) => {
182
- updates.wrapperClass = "t-flex t-justify-center";
183
- updates.inputClass = "t-text-center";
184
- updates.messagesClass = "t-flex t-justify-center";
185
- return date(updates)
186
- };
187
-
188
- const email = (scope, vertical, updates = {}) => {
189
- const func = vertical ? verticalText : sbsText;
190
- const label = vertical ? updates.label : "Email Address:";
191
- return func({
192
- $formkit: "email",
193
- name: scope ? scope + ":" + "Email" : "Email",
194
- label,
195
- placeholder: "email@domain.com",
196
- autocomplete: "email",
197
- "data-tf-sensitive": "false",
198
- validation: "required|email",
199
- validationMessages: {
200
- required: "Email is required",
201
- email: "Invalid Email",
202
- },
203
- ...updates,
204
- })
205
- };
206
-
207
- const firstName = (scope, vertical, updates = {}) => {
208
- const func = vertical ? verticalText : sbsText;
209
- const label = vertical ? updates.label : "First Name:";
210
- return func({
211
- label,
212
- placeholder: "First Name",
213
- name: scope ? scope + ":" + "First_Name" : "First_Name",
214
- autocomplete: "given-name",
215
- validationMessages: {
216
- required: "First Name is required",
217
- },
218
- ...updates,
219
- })
220
- };
221
-
222
- const lastName = (scope, vertical, updates = {}) => {
223
- const func = vertical ? verticalText : sbsText;
224
- const label = vertical ? updates.label : "Last Name:";
225
- return func({
226
- label,
227
- placeholder: "Last Name",
228
- name: scope ? scope + ":" + "Last_Name" : "Last_Name",
229
- autocomplete: "family-name",
230
- validationMessages: {
231
- required: "Last Name is required",
232
- },
233
- ...updates,
234
- })
235
- };
236
-
237
- const phone = (scope, vertical, updates = {}) => {
238
- const func = vertical ? verticalText : sbsText;
239
- const label = vertical ? updates.label : "Phone Number:";
240
- return func({
241
- $formkit: "tel",
242
- name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
243
- label,
244
- placeholder: updates.placeholder || "###-###-####",
245
- maxlength: 12,
246
- help: updates.help || "10-digit phone number, hyphens optional",
247
- autocomplete: "tel-national",
248
- "data-tf-sensitive": "false",
249
- validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
250
- validationMessages: {
251
- required: "Phone Number is required",
252
- matches: "Invalid Phone Format, use ###-###-####",
253
- valid_phone: "Invalid Phone Number",
254
- },
255
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
256
- ...updates,
257
- })
258
- };
259
-
260
- const zipcode$1 = (scope, vertical, updates = {}) => {
261
- const func = vertical ? verticalText : sbsText;
262
- const label = vertical ? updates.label : "Zip Code:";
263
- const help = vertical ? updates.help ?? "We try to match you with local help" : null;
264
- return func({
265
- label,
266
- help,
267
- placeholder: "#####",
268
- name: scope ? scope + ":" + "Zip" : "Zip",
269
- maxlength: 5,
270
- inputmode: "numeric",
271
- autocomplete: "postal-code",
272
- validation: "required|matches:/^[0-9]{5}$/",
273
- validationMessages: {
274
- required: "Zip Code is required",
275
- matches: "Invalid Zip Code",
276
- },
277
- ...updates,
278
- })
279
- };
280
-
281
- const autoDamageFromAccident$1 = (scope, vertical, updates = {}) => {
282
- const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
283
- const label = vertical ? updates.label : "Auto Damage from Accident?";
284
- return func(
285
- merge(
286
- {
287
- label,
288
- name: scope ? scope + ":" + "Auto_Damage_From_Accident" : "Auto_Damage_From_Accident",
289
- },
290
- updates
291
- )
292
- )
293
- };
294
-
295
- const wouldLikeMVAConsultation$1 = (scope, vertical, updates = {}) => {
296
- const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
297
- const label = vertical ? updates.label : "Would You Like a Free MVA Consultation?";
298
- return func(
299
- merge(
300
- {
301
- label,
302
- name: scope ? scope + ":" + "Would_Like_MVA_Consultation" : "Would_Like_MVA_Consultation",
303
- help: "Note: we'll still connect you for a mechanic.",
304
- },
305
- updates
306
- )
307
- )
308
- };
309
-
310
- const atFault$1 = (scope, vertical, updates = {}) => {
311
- const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
312
- const label = vertical ? updates.label : "Were You at Fault?";
313
- return func(
314
- merge(
315
- {
316
- label,
317
- name: scope ? scope + ":" + "At_Fault" : "At_Fault",
318
- },
319
- updates
320
- )
321
- )
322
- };
323
-
324
61
  // TODO: vertical not supported yet
325
62
  const comments = (scope, vertical, updates) =>
326
63
  textArea(
@@ -335,48 +72,6 @@ const comments = (scope, vertical, updates) =>
335
72
  )
336
73
  );
337
74
 
338
- const doctorTreatment$1 = (scope, vertical, updates = {}) => {
339
- const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
340
- const label = vertical ? updates.label : "Have You Recently Been Treated by a Doctor, Hospital or Clinic?";
341
- return func(
342
- merge(
343
- {
344
- name: scope ? scope + ":" + "Doctor_Treatment" : "Doctor_Treatment",
345
- label,
346
- },
347
- updates
348
- )
349
- )
350
- };
351
-
352
- const haveAttorney$1 = (scope, vertical, updates = {}) => {
353
- const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
354
- const label = vertical ? updates.label : "Already Working with An Attorney?";
355
- return func(
356
- merge(
357
- {
358
- label,
359
- name: scope ? scope + ":" + "Have_Attorney" : "Have_Attorney",
360
- },
361
- updates
362
- )
363
- )
364
- };
365
-
366
- const incidentDate$1 = (scope, vertical, updates = {}) => {
367
- const func = vertical ? verticalDate : sbsDate;
368
- const label = vertical ? updates.label : "Date of Incident:";
369
- return func(
370
- merge(
371
- {
372
- label,
373
- name: scope ? scope + ":" + "Incident_Date" : "Incident_Date",
374
- },
375
- updates
376
- )
377
- )
378
- };
379
-
380
75
  const mechanicsCrossSells = (scope) =>
381
76
  radio({
382
77
  id: scope ? scope + ":" + "Mechanics_CrossSells" : "Mechanics_CrossSells",
@@ -389,72 +84,11 @@ const mechanicsCrossSells = (scope) =>
389
84
  validation: null,
390
85
  options: {
391
86
  // 'Auto and Car Accidents': "I was involved in a car accident",
392
- "Auto Insurance": "I'd like to save on my auto insurance (optional)",
87
+ // "Auto Insurance": "I'd like to reduce my auto insurance bill (optional)",
88
+ "Auto Insurance": "Save up to $700* on my auto insurance (optional)",
393
89
  },
394
90
  });
395
91
 
396
- const primaryInjury$1 = (scope, vertical, updates = {}) => {
397
- const func = vertical ? col2RadioCenter : sbs2ColRadio;
398
- const label = vertical ? updates.label : "Primary Injury:";
399
- return func(
400
- merge(
401
- {
402
- label,
403
- name: scope ? scope + ":" + "Primary_Injury" : "Primary_Injury",
404
- options: [
405
- "Anxiety",
406
- "Back or Neck Pain",
407
- "Broken Bones",
408
- "Cuts and Bruises",
409
- "Headaches",
410
- "Memory Loss",
411
- "Loss of Limb",
412
- "Not Sure or Other",
413
- ],
414
- },
415
- updates
416
- )
417
- )
418
- };
419
-
420
- const policeReportFiled$1 = (scope, vertical, updates = {}) => {
421
- const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
422
- const label = vertical ? updates.label : "Was a Police Report Filed?";
423
- return func(
424
- merge(
425
- {
426
- name: scope ? scope + ":" + "Police_Report_Filed" : "Police_Report_Filed",
427
- label,
428
- },
429
- updates
430
- )
431
- )
432
- };
433
-
434
- const TCPAConsent = (scope, updates = {}) => ({
435
- $formkit: "checkbox",
436
- label: "$meta.tcpaLanguage",
437
- // Necessary to get links to work in the tcpa language
438
- __raw__sectionsSchema: {
439
- label: { attrs: { innerHTML: "$label" } },
440
- },
441
- name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
442
- "data-tf-sensitive": "false",
443
- validation: "required|accepted",
444
- validationMessages: {
445
- required: "Consent is required",
446
- accepted: "Consent is required",
447
- },
448
- classes: {
449
- outer: updates.outerClass ? updates.outerClass : "",
450
- wrapper: updates.wrapperClass ? updates.wrapperClass : "",
451
- messages: updates.messagesClass ? updates.messagesClass : "",
452
- label:
453
- "!t-text-[0.7rem] t-text-slate-500 t-font-normal !t-leading-[0.9rem]" +
454
- (updates.labelClass ? " " + updates.labelClass : ""),
455
- },
456
- });
457
-
458
92
  const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
459
93
  const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
460
94
 
@@ -482,144 +116,6 @@ const findLastInput = (n) => {
482
116
  return null
483
117
  };
484
118
 
485
- const secureIconDefault = {
486
- $el: "div",
487
- if: "$activeStep === $lastStep()",
488
- attrs: {
489
- class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
490
- },
491
- children: [
492
- {
493
- $el: "img",
494
- attrs: {
495
- loading: "lazy",
496
- alt: "",
497
- style: {
498
- border: 0,
499
- },
500
- width: "25",
501
- height: "25",
502
- src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
503
- },
504
- },
505
- {
506
- $el: "span",
507
- children: "Secure & Encrypted",
508
- attrs: {
509
- class: "t-pl-2 t-pt-1 t-font-medium",
510
- },
511
- },
512
- ],
513
- };
514
-
515
- function secureIcon(updates = {}) {
516
- return merge(secureIconDefault, updates)
517
- }
518
-
519
- function verticalStepHeadline(updates) {
520
- return {
521
- $el: "h3",
522
- children: updates.headline || "Tell Us About Your Situation",
523
- attrs: {
524
- class:
525
- "t-flex t-justify-center t-text-center t-text-lg sm:t-text-xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1" +
526
- " " +
527
- (updates.headlineClass || ""),
528
- },
529
- }
530
- }
531
-
532
- function verticalStepSubHeadline(updates) {
533
- return {
534
- $el: "h5",
535
- children: updates.subheadline || "",
536
- attrs: {
537
- class:
538
- "t-flex t-justify-center t-text-center !t-text-lg t-font-normal t-text-dark t-pb-5 t-pt-0 t-px-1" +
539
- " " +
540
- (updates.subheadlineClass || ""),
541
- },
542
- }
543
- }
544
-
545
- function commentsStepHeadline(updates) {
546
- return {
547
- $el: "h3",
548
- children: updates.headline || "Additional Details",
549
- attrs: {
550
- class:
551
- "t-flex t-justify-center t-text-center t-text-lg sm:t-text-xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
552
- " " +
553
- (updates.headlineClass || ""),
554
- },
555
- }
556
- }
557
-
558
- function firstAndLastStepHeadline(updates) {
559
- return {
560
- $el: "h3",
561
- children: updates.headline || "Please Provide a Contact Name",
562
- attrs: {
563
- class:
564
- "t-flex t-justify-center t-text-center t-text-xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
565
- " " +
566
- (updates.headlineClass || ""),
567
- },
568
- }
569
- }
570
-
571
- function contactStepHeadline(updates) {
572
- return {
573
- $el: "h3",
574
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
575
- attrs: {
576
- class:
577
- "t-flex t-justify-center t-text-center !t-text-xl md:!t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-4 t-px-1" +
578
- " " +
579
- (updates.headlineClass || "") +
580
- " f-contact-info-headline",
581
- },
582
- }
583
- }
584
-
585
- function contactStepSubHeadline(updates) {
586
- return {
587
- $el: "h5",
588
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
589
- attrs: {
590
- class:
591
- "t-flex t-justify-center t-text-center !t-text-base md:!t-text-lg t-font-semibold t-pb-6 t-pt-0 t-px-3" +
592
- " " +
593
- (updates.subheadlineClass || "") +
594
- " f-contact-info-subheadline",
595
- },
596
- }
597
- }
598
-
599
- const TRUSTED_FORM_JS = `(function() {
600
- if (window.xxTrustedFormLoaded) {
601
- return
602
- }
603
- var vid = '';
604
- if (typeof window.zar !== 'undefined') {
605
- vid = window.zar.getVID();
606
- }
607
- window.xxTrustedFormLoaded = true;
608
- var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
609
- var tf = document.createElement('script');
610
- tf.type = 'text/javascript'; tf.async = true;
611
- tf.src = ("https:" == document.location.protocol ? 'https' : 'http') + "://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=" + vid + "&ping_field=xxTrustedFormPingUrl&provideReferrer=false&invert_field_sensitivity=true&sandbox=" + sandbox + "&l=" + new Date().getTime() + Math.random();
612
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
613
- })();`;
614
-
615
- function trustedFormScript() {
616
- return {
617
- $el: "script",
618
- if: "$activeStep === $lastStep()",
619
- children: TRUSTED_FORM_JS,
620
- }
621
- }
622
-
623
119
  const stepDefaults = (step, stepKey) => ({
624
120
  $el: "section",
625
121
  if: '$stepEnabled("' + step + '")',
@@ -670,49 +166,11 @@ function step(name, inputs, updates = {}) {
670
166
  return merge(stepDefaults(name, stepKey), mergeUpdates)
671
167
  }
672
168
 
673
- // Single question step
674
- function sqstep(name, input, defaultHeadline, updates = {}) {
675
- if (typeof updates.nextOnInput === "undefined") {
676
- updates.nextOnInput = true;
677
- }
678
-
679
- return step(
680
- name,
681
- [
682
- verticalStepHeadline({
683
- headline: updates.headline ?? defaultHeadline,
684
- headlineClass: updates.headlineClass,
685
- }),
686
- ...(Array.isArray(input) ? input : [input]),
687
- ],
688
- updates
689
- )
690
- }
691
-
692
- function commentsHeadline(updates = {}) {
693
- const mergedUpdates = { ...updates, nextOnEnter: false };
694
-
695
- return step(
696
- "comments",
697
- [
698
- commentsStepHeadline(updates),
699
- comments(updates.scope, false, {
700
- label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL : updates.label,
701
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
702
- inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
703
- innerClass: typeof updates.innerClass === "undefined" ? "t-max-w-xl" : updates.innerClass,
704
- wrapperClass: typeof updates.wrapperClass === "undefined" ? undefined : updates.wrapperClass,
705
- }),
706
- ],
707
- mergedUpdates
708
- )
709
- }
710
-
711
169
  function commentsMechanics(updates = {}) {
712
170
  return step(
713
171
  "commentsMechanics",
714
172
  [
715
- commentsStepHeadline(updates),
173
+ // commentsStepHeadline(updates),
716
174
  comments(updates.scope, false, {
717
175
  label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL : updates.label,
718
176
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
@@ -724,133 +182,17 @@ function commentsMechanics(updates = {}) {
724
182
  )
725
183
  }
726
184
 
727
- function contactInfo(updates = {}) {
728
- return step(
729
- "contactInfo",
730
- [
731
- contactStepHeadline(updates),
732
- contactStepSubHeadline(updates),
733
- trustedFormScript(),
734
- email(updates.scope),
735
- phone(updates.scope),
736
- TCPAConsent(updates.scope),
737
- secureIcon(),
738
- ],
739
- { nextOnEnter: false }
740
- )
741
- }
742
-
743
- function firstAndLastV3(updates = {}) {
744
- return step(
745
- "firstAndLast",
746
- [
747
- firstAndLastStepHeadline({
748
- headline: updates.headline ?? "Who is looking for help?",
749
- headlineClass: updates.headlineClass,
750
- }),
751
- verticalStepSubHeadline({
752
- subheadline: updates.subheadline ?? "We never share info without consent",
753
- subheadlineClass: "!t-text-sm !t-text-gray-500",
754
- }),
755
- firstName(updates.scope),
756
- lastName(updates.scope),
757
- ],
758
- updates
759
- )
760
- }
761
-
762
- function zipcode(updates = {}) {
763
- return sqstep("zipcode", zipcode$1(updates.scope, true, updates.input), "Please verify your Zip Code", updates)
764
- }
765
-
766
- function autoDamageFromAccident(updates = {}) {
767
- return step("autoDamageFromAccident", [autoDamageFromAccident$1(updates.scope, true, updates.input)], updates)
768
- }
769
-
770
- function wouldLikeMVAConsultation(updates = {}) {
771
- return step(
772
- "wouldLikeMVAConsultation",
773
- [
774
- verticalStepHeadline({
775
- headline: updates.headline ?? "Do you want a free legal evaluation?",
776
- }),
777
- verticalStepSubHeadline({
778
- subheadline: updates.subheadline ?? "You may be entitled to compensation for your accident.",
779
- subheadlineClass: "!t-text-blue-900 !t-font-semibold",
780
- }),
781
- {
782
- $formkit: "hidden",
783
- name: "CrossSell:Auto_and_Car_Accidents:Type_Of_Legal_Problem",
784
- id: "CrossSell:Auto_and_Car_Accidents:Type_Of_Legal_Problem",
785
- value: "Auto and Car Accidents",
786
- },
787
- {
788
- $formkit: "hidden",
789
- name: "CrossSell:Auto_and_Car_Accidents:vertical",
790
- value: "Legal",
791
- },
792
- wouldLikeMVAConsultation$1(updates.scope, true, updates.input),
793
- ],
794
- updates
795
- )
796
- }
797
-
798
- function haveAttorney(updates = {}) {
799
- return sqstep(
800
- "haveAttorney",
801
- haveAttorney$1(updates.scope, true, updates.input),
802
- "Already working with an attorney?",
803
- updates
804
- )
805
- }
806
-
807
- function incidentDate(updates = {}) {
808
- return sqstep(
809
- "incidentDate",
810
- incidentDate$1(updates.scope, true, updates.input),
811
- "When did the incident occur?",
812
- updates
813
- )
814
- }
815
-
816
- function doctorTreatment(updates = {}) {
817
- return sqstep(
818
- "doctorTreatment",
819
- doctorTreatment$1(updates.scope, true, updates.input),
820
- "Have you seen a doctor about this?",
821
- updates
822
- )
823
- }
824
-
825
- function atFault(updates = {}) {
826
- return sqstep("atFault", atFault$1(updates.scope, true, updates.input), "Were you at fault?", updates)
827
- }
828
-
829
- function primaryInjury(updates = {}) {
830
- return sqstep(
831
- "primaryInjury",
832
- primaryInjury$1(updates.scope, true, updates.input),
833
- "What was the primary injury?",
834
- updates
835
- )
836
- }
837
-
838
- function policeReportFiled(updates = {}) {
839
- return sqstep(
840
- "policeReportFiled",
841
- policeReportFiled$1(updates.scope, true, updates.input),
842
- "Was a police report filed?",
843
- updates
844
- )
845
- }
846
-
847
- const formNavigation = (updates = {}) => ({
185
+ const formNavigationNoFinalBack = (updates = {}) => ({
848
186
  $el: "div",
849
187
  attrs: {
850
188
  class: {
851
189
  if: "$activeStep === $firstStep()",
852
190
  then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
853
- else: "step-nav !t-justify-between",
191
+ else: {
192
+ if: "$activeStep === $lastStep()",
193
+ then: "step-nav !t-justify-center ",
194
+ else: "step-nav !t-justify-between",
195
+ },
854
196
  },
855
197
  },
856
198
  children: [
@@ -860,12 +202,12 @@ const formNavigation = (updates = {}) => ({
860
202
  onClick: "$setPreviousStep($prevStepFunc($get(form)))",
861
203
  children: "Back",
862
204
  outerClass: {
863
- if: "$activeStep === $firstStep()",
205
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
864
206
  then: "t-hidden sm:t-block",
865
207
  else: "",
866
208
  },
867
209
  style: {
868
- if: "$activeStep === $firstStep()",
210
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
869
211
  then: "display: none;",
870
212
  },
871
213
  classes: {
@@ -904,7 +246,8 @@ const formNavigation = (updates = {}) => ({
904
246
  then: "display: none;",
905
247
  },
906
248
  classes: {
907
- input: (updates.inputClass || "") + " !t-ml-2 sm:!t-ml-auto f-navigation-input",
249
+ input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
250
+ outer: "!t-mt-0 !t-mb-0",
908
251
  },
909
252
  },
910
253
  ],
@@ -978,10 +321,6 @@ const formPropDefaults = {
978
321
  formClass: "!t-max-w-[40rem]",
979
322
  };
980
323
 
981
- function filterMapByKey(obj, keyList) {
982
- return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
983
- }
984
-
985
324
  // export function filteredNextStepsMapLegal(keyList) {
986
325
  // const res = { Type_Of_Legal_Problem: filterMapByKey(nextStepsMapGeneralLegal["Type_Of_Legal_Problem"], keyList) }
987
326
  // res["*"] = nextStepsMapGeneralLegal["*"]
@@ -996,47 +335,6 @@ function formProps(updates) {
996
335
  return props
997
336
  }
998
337
 
999
- const metaDefaults = {};
1000
-
1001
- function metaProps(updates) {
1002
- const data = merge(metaDefaults, updates);
1003
- return {
1004
- type: "meta",
1005
- data,
1006
- }
1007
- }
1008
-
1009
- function defaultMetaPropsLegal(tolps = null) {
1010
- let commentsPlaceholders = TOLPCommentsPlaceholders;
1011
- let finalHeadlines = TOLPFinalHeadlines;
1012
- let finalSubHeadlines = TOLPFinalSubHeadlines;
1013
- if (tolps) {
1014
- commentsPlaceholders = filterMapByKey(TOLPCommentsPlaceholders, tolps);
1015
- finalHeadlines = filterMapByKey(TOLPFinalHeadlines, tolps);
1016
- finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1017
- }
1018
- return metaProps({
1019
- tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1020
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1021
- commentsPlaceholders: commentsPlaceholders,
1022
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1023
- finalHeadlines: finalHeadlines,
1024
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1025
- finalSubHeadlines: finalSubHeadlines,
1026
- })
1027
- }
1028
-
1029
- function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
1030
- return {
1031
- $cmp: "FormKitSchema",
1032
- if: "$get(" + field + ").value",
1033
- props: {
1034
- schema: "$meta.dynamicSchema",
1035
- data: "$buildData($meta)",
1036
- },
1037
- }
1038
- }
1039
-
1040
338
  const formAnchorDefaults = {
1041
339
  $el: "div",
1042
340
  children: [
@@ -1125,198 +423,6 @@ const hiddenInputsMechanics = [
1125
423
  ...hiddenInputsBase,
1126
424
  ];
1127
425
 
1128
- const TOLPCommentsPlaceholders = {
1129
- Adoption: 'Example: "I need help with adoption forms"',
1130
- "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1131
- "Auto and Car Accidents":
1132
- 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1133
- Bankruptcy: 'Example: "I need help filing for bankruptcy"',
1134
- "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
1135
- "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1136
- "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
1137
- "Child Custody": 'Example: "Need help getting custody"',
1138
- "Child Support": 'Example: "Issues with child support payments"',
1139
- "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
1140
- "Civil Lawsuit":
1141
- 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1142
- "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
1143
- "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
1144
- "Consumer Lawyers":
1145
- 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1146
- "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
1147
- "Criminal and Felony":
1148
- 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1149
- "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1150
- "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
1151
- "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
1152
- "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1153
- "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1154
- Expungement: 'Example: "I would like to file for an expungement and clear my record"',
1155
- "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
1156
- Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
1157
- Guardianship: 'Example: "I need help with guardianship documents"',
1158
- "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1159
- "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
1160
- "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
1161
- "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
1162
- "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
1163
- "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
1164
- "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
1165
- "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
1166
- Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
1167
- "Landlord and Tenant":
1168
- 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1169
- "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1170
- "Long Term Disability":
1171
- 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1172
- "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1173
- "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1174
- "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1175
- "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
1176
- "Probate and Estates":
1177
- 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1178
- "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1179
- "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1180
- "Real Estate":
1181
- 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1182
- "Social Security Disability and Insurance":
1183
- 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1184
- "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1185
- "Traffic and Tickets":
1186
- 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1187
- Unemployment: 'Example: "I need help filing for unemployment benefits"',
1188
- "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1189
- "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1190
- "Workers Compensation": 'Example: "I broke my arm at work and need help getting compensation"',
1191
- "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
1192
- "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
1193
- "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1194
- };
1195
-
1196
- const TOLPFinalHeadlines = {
1197
- Adoption: "Connect With Adoption Professionals Today",
1198
- "Auto and Car Accidents": "Connect With Accident Professionals Today",
1199
- Bankruptcy: "Take Control of Your Financial Future",
1200
- "Birth Certificate and Name Change": "Start Your Change Today",
1201
- "Business Lawyers": "Connect With Business Professionals Today",
1202
- "Child Custody": "Connect With Custody Professionals Today",
1203
- "Child Support": "Connect With Child Support Professionals",
1204
- // 'Child Custody and Support': '',
1205
- "Civil Rights and Discrimination": "Stand Up For Your Rights",
1206
- "Civil Lawsuit": "Connect With Lawsuit Professionals Today",
1207
- // "Consumer Lawyers": "",
1208
- "Copyrights and Trademarks": "Protect Your Intellectual Property",
1209
- // "Criminal and Felony": "Connect With Legal Help",
1210
- "Debt and Collections": "Connect With Debt Professionals Today",
1211
- "Divorce and Separation": "Connect With Divorce Professionals Today",
1212
- "DUI and DWI": "Defend Against DUI Charges",
1213
- "Elder Law": "Connect With Elder Law Professionals",
1214
- // "Employment and Workplace": "Connect With Legal Help",
1215
- Expungement: "Clear Your Record",
1216
- "Family Issues": "Connect With Family Legal Help",
1217
- Foreclosure: "Fight to Keep Your Home",
1218
- Guardianship: "Connect With Guardianship Professionals",
1219
- // "Harassment and Discrimination": "Connect With Legal Help",
1220
- // "Identity Theft": "Connect With Legal Help",
1221
- "Immigration and Visas": "Get Immigration Legal Help",
1222
- Insurance: "Get Insurance Legal Help",
1223
- // "Landlord and Tenant": "Connect With Legal Help",
1224
- "Lemon Law": "Connect With Lemon Law Professionals",
1225
- "Long Term Disability": "Connect With Disability Professionals",
1226
- "Medical Malpractice": "Hold Negligent Providers Accountable",
1227
- "Patents and Intellectual Property": "Connect With IP Professionals Today",
1228
- "Personal Injury": "Maximize Your Injury Compensation",
1229
- // "Power of Attorney": "Connect With Legal Help",
1230
- "Probate and Estates": "Manage Probate with Expert Guidance",
1231
- "Product Liability": "Get Justice for Faulty Products",
1232
- // 'Property Damage': 'Connect With Legal Help',
1233
- "Real Estate": "Connect With Real Estate Professionals",
1234
- "Sexual Harassment": "Stand Up Against Sexual Harassment",
1235
- "Social Security Disability and Insurance": "Get the Benefits You Deserve",
1236
- "Tax and IRS": "Connect With Tax Legal Help",
1237
- "Traffic and Tickets": "Protect Your Record Today",
1238
- Unemployment: "Connect With Unemployment Professionals",
1239
- "Victim of a Crime": "Seek Justice as a Crime Victim",
1240
- "Wills and Trusts": "Plan Your Estate with Confidence",
1241
- "Workers Compensation": "Maximize Your Workers' Comp Benefits",
1242
- "Wrongful Death": "Seek Justice for a Loved One",
1243
- "Wrongful Termination": "Fight Back Against Unfair Firing Today",
1244
- // 'Not Sure or Other': ''
1245
- // 'Workplace Harassment': '',
1246
- // 'Non-Workplace Harassment': '',
1247
- // 'Workplace Discrimination': '',
1248
- // 'Non-Workplace Discrimination': '',
1249
- };
1250
-
1251
- const TOLPFinalSubHeadlines = {
1252
- // Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1253
- // // 'Asbestos and Mesothelioma': '',
1254
- // "Auto and Car Accidents":
1255
- // "You may benefit from speaking with an accident professional. Please verify your contact information.",
1256
- // Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1257
- // // 'Birth Certificate and Name Change': '',
1258
- // // 'Business Lawyers': '',
1259
- // // 'Child Custody and Support': '',
1260
- // // 'Civil Rights and Discrimination': '',
1261
- // // 'Civil Lawsuit': '',
1262
- // // 'Consumer Lawyers': '',
1263
- // "Copyrights and Trademarks":
1264
- // "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1265
- // // 'Criminal and Felony': '',
1266
- // // 'Debt and Collections': '',
1267
- // "Divorce and Separation":
1268
- // "You may benefit from speaking with a divorce professional. Please verify your contact information.",
1269
- // "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
1270
- // "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
1271
- // // 'Employment and Workplace': '',
1272
- // // 'Expungement': '',
1273
- // // 'Family Issues': '',
1274
- // Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
1275
- // Guardianship:
1276
- // "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
1277
- // // 'Harassment and Discrimination': '',
1278
- // // 'Identity Theft': '',
1279
- // "Immigration and Visas":
1280
- // "You may benefit from speaking with a immigration professional. Please verify your contact information.",
1281
- // // 'Insurance': '',
1282
- // "Landlord and Tenant":
1283
- // "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
1284
- // // 'Lemon Law': '',
1285
- // "Long Term Disability":
1286
- // "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
1287
- // "Medical Malpractice":
1288
- // "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
1289
- // "Patents and Intellectual Property":
1290
- // "You may benefit from speaking with a patent professional. Please verify your contact information.",
1291
- // "Personal Injury":
1292
- // "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
1293
- // // 'Power of Attorney': '',
1294
- // "Probate and Estates":
1295
- // "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
1296
- // // 'Product Liability': '',
1297
- // // 'Property Damage': '',
1298
- // "Real Estate":
1299
- // "You may benefit from speaking with a real estate professional. Please verify your contact information.",
1300
- // "Social Security Disability and Insurance":
1301
- // "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
1302
- // "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
1303
- // // 'Traffic and Tickets': '',
1304
- // Unemployment:
1305
- // "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
1306
- // // 'Victim of a Crime': '',
1307
- // // 'Wills and Trusts': '',
1308
- // "Workers Compensation":
1309
- // "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
1310
- // // 'Wrongful Death': '',
1311
- // // 'Wrongful Termination': '',
1312
- // // 'Not Sure or Other': ''
1313
- // // 'Sexual Harassment': '',
1314
- // // 'Workplace Harassment': '',
1315
- // // 'Non-Workplace Harassment': '',
1316
- // // 'Workplace Discrimination': '',
1317
- // // 'Non-Workplace Discrimination': '',
1318
- };
1319
-
1320
426
  const nextStepsLegalDefault = [
1321
427
  "haveAttorney",
1322
428
  "degreeOfInterest",
@@ -1731,147 +837,72 @@ filterNextStepsMap(
1731
837
  }
1732
838
  );
1733
839
 
1734
- const tolps = [
1735
- 'Auto and Car Accidents',
1736
- ];
1737
-
1738
- const meta = defaultMetaPropsLegal(tolps);
1739
-
1740
- // All of the dynamic MVA questions get scoped
1741
- const scope = 'CrossSell:Auto_and_Car_Accidents';
1742
-
1743
- meta.data.dynamicSchema = [
1744
- incidentDate({
1745
- scope,
1746
- nextOnInput: false
1747
- }),
1748
- atFault({
1749
- scope,
1750
- }),
1751
- primaryInjury({
1752
- scope,
1753
- }),
1754
- doctorTreatment({
1755
- scope,
1756
- }),
1757
- policeReportFiled({
1758
- scope,
1759
- }),
1760
- haveAttorney({
1761
- scope,
1762
- }),
1763
- commentsHeadline({
1764
- scope,
1765
- label: null,
1766
- placeholder: 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1767
- headline: 'Please briefly describe the accident:',
1768
- headlineClass: '!t-text-dark',
1769
- }),
1770
- zipcode({
1771
- scope,
1772
- help: 'We try to match you with local help'
1773
- }),
1774
- firstAndLastV3({
1775
- scope,
1776
- headlineClass: '!t-text-dark'
1777
- }),
1778
- contactInfo({
1779
- scope,
1780
- headline: 'Connect Now - Final Step',
1781
- subheadline: "After submitting you'll be connected for a mechanic chat and be contacted for an accident legal consultation.",
1782
- }),
1783
- ];
840
+ const meta = {
841
+ type: "meta",
842
+ data: {},
843
+ };
1784
844
 
1785
845
  const schema = [
1786
846
  meta,
1787
- formAnchor(),
847
+ formAnchor({
848
+ children: [
849
+ {
850
+ $el: "div",
851
+ attrs: {
852
+ id: "form-anchor",
853
+ class: "t-absolute",
854
+ // HACK: account for sticky header on theme
855
+ style: { top: "-80px", left: 0 },
856
+ },
857
+ },
858
+ ],
859
+ }),
1788
860
  {
1789
- $cmp: 'FormKit',
861
+ $cmp: "FormKit",
1790
862
  props: formProps({
1791
- formId: 'mechanics',
863
+ formId: "mechanics",
1792
864
  popUnderMap: {
1793
- 'properties.Mechanics_CrossSells': {
1794
- 'Auto Insurance': RedirectUrl("answers-now.com", 'Insurance', "Auto Insurance"),
1795
- }
865
+ "properties.Mechanics_CrossSells": {
866
+ "Auto Insurance": RedirectUrl("answers-now.com", "Insurance", "Auto Insurance"),
867
+ },
1796
868
  },
1797
869
  redirectMap: {
1798
- '*': RedirectUrlComments('answers-now.com', 'AutoRepair', 'Mechanics')
870
+ "*": RedirectUrlComments("answers-now.com", "AutoRepair", "Mechanics"),
1799
871
  },
1800
- formClass: '!t-max-w-[38rem]'
872
+ formClass: "!t-max-w-[38rem]",
1801
873
  }),
1802
874
  children: [
1803
875
  headline({
1804
- children: '$urlParam("hl", "Get Instant Car Advice Online")',
1805
- if: '$activeStep === $firstStep()',
876
+ children: '$urlParam("hl", "Have Questions For A Mechanic?")',
877
+ if: "$activeStep === $firstStep()",
1806
878
  }),
1807
879
  subHeadline({
1808
- children: '$urlParam("shl", "Is the issue due to an auto accident?")',
1809
- if: '$activeStep === $firstStep()',
1810
- subheadlineClass: '!t-text-dark'
880
+ children: '$urlParam("shl", "Get Answers In Minutes!")',
881
+ if: "$activeStep === $firstStep()",
882
+ subheadlineClass: "!t-font-bold !t-text-[#465f87]",
1811
883
  }),
1812
884
  ...hiddenInputsMechanics,
1813
885
  {
1814
- $formkit: 'hidden',
1815
- name: "CrossSell:Auto_and_Car_Accidents:TCPA_Language",
1816
- value: "$meta.tcpaLanguage"
1817
- },
1818
- {
1819
- $el: 'div',
886
+ $el: "div",
1820
887
  attrs: {
1821
- class: 'form-body'
888
+ class: "form-body",
1822
889
  },
1823
890
  children: [
1824
- autoDamageFromAccident({
1825
- nextOnInput: false,
1826
- nextStepMap: {
1827
- values: {
1828
- 'Auto_Damage_From_Accident': {
1829
- 'Yes': ['wouldLikeMVAConsultation', 'commentsMechanics'],
1830
- 'No': ['commentsMechanics'],
1831
- },
1832
- '*': ["commentsMechanics"]
1833
- }
1834
- }
1835
- }),
1836
- wouldLikeMVAConsultation({
1837
- nextOnInput: true,
1838
- nextStepMap: {
1839
- values: {
1840
- 'Would_Like_MVA_Consultation': {
1841
- 'Yes': [
1842
- 'incidentDate',
1843
- 'atFault',
1844
- 'primaryInjury',
1845
- 'doctorTreatment',
1846
- 'policeReportFiled',
1847
- 'haveAttorney',
1848
- 'comments',
1849
- 'zipcode',
1850
- 'firstAndLast',
1851
- 'contactInfo',
1852
- ],
1853
- 'No': ['commentsMechanics'],
1854
- },
1855
- '*': ["commentsMechanics"]
1856
- }
1857
- }
1858
- }),
1859
- dynamicSchemaNode('Auto_Damage_From_Accident'),
1860
891
  commentsMechanics({
1861
- headline: 'Last Step: Describe your vehicle issue',
1862
- headlineClass: '!t-text-dark',
1863
892
  label: null,
1864
893
  placeholder: 'Example: "I\'m having transmission trouble", or "My car won\'t start"',
1865
894
  nextOnEnter: false,
1866
895
  }),
1867
- formNavigation({
1868
- submitLabel: 'Chat Now'
896
+ formNavigationNoFinalBack({
897
+ submitLabel: "Chat Now",
898
+ inputClass: "!t-text-black !t-font-extrabold !t-bg-[#ffce51]",
899
+ firstStepButtonClass: "!t-justify-center",
1869
900
  }),
1870
- formDetails()
1871
- ]
1872
- }
1873
- ]
1874
- }
901
+ formDetails(),
902
+ ],
903
+ },
904
+ ],
905
+ },
1875
906
  ];
1876
907
 
1877
908
  export { schema as default };