bhl-forms 0.7.3 → 0.7.4

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.
Files changed (101) hide show
  1. package/dist/bhl-forms.es.js +551 -543
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +649 -649
  4. package/dist/bhl-forms.modern.iife.js +7 -7
  5. package/dist/bhl-forms.modern.umd.js +7 -7
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +1459 -1151
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +138 -137
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +1432 -1149
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +1327 -1043
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +1526 -1378
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +1998 -1807
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +138 -137
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +1347 -1050
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +1830 -1711
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +1539 -1385
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +1831 -1678
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +1361 -1971
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  40. package/dist/forms/generalHomeImprovement.json +1 -1
  41. package/dist/forms/generalHomeImprovementThankYou.es.js +1361 -1971
  42. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  43. package/dist/forms/generalHomeImprovementThankYou.json +1 -1
  44. package/dist/forms/generalLegal.es.js +3035 -2535
  45. package/dist/forms/generalLegal.iife.js +1 -1
  46. package/dist/forms/generalLegal.json +1 -1
  47. package/dist/forms/generalLegalJustAnswer.es.js +3214 -2872
  48. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  49. package/dist/forms/generalLegalJustAnswer.json +1 -1
  50. package/dist/forms/generalLegalPopUnder.es.js +3035 -2535
  51. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnder.json +1 -1
  53. package/dist/forms/generalLegalPopUnderSingle.es.js +3214 -2872
  54. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  56. package/dist/forms/generalLegalSingle.es.js +3214 -2872
  57. package/dist/forms/generalLegalSingle.iife.js +1 -1
  58. package/dist/forms/generalLegalSingle.json +1 -1
  59. package/dist/forms/generalLegalThankYou.es.js +2823 -2303
  60. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYou.json +1 -1
  62. package/dist/forms/generalLegalThankYouConsultation.es.js +3214 -2872
  63. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  64. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  65. package/dist/forms/harassmentAndDiscrimination.es.js +1423 -1120
  66. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  67. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  68. package/dist/forms/landlordTenant.es.js +1393 -1106
  69. package/dist/forms/landlordTenant.iife.js +1 -1
  70. package/dist/forms/landlordTenant.json +1 -1
  71. package/dist/forms/malpractice.es.js +1529 -1223
  72. package/dist/forms/malpractice.iife.js +1 -1
  73. package/dist/forms/malpractice.json +1 -1
  74. package/dist/forms/mechanics.es.js +701 -530
  75. package/dist/forms/mechanics.iife.js +1 -1
  76. package/dist/forms/mechanics.json +1 -1
  77. package/dist/forms/patentsAndIP.es.js +1828 -1652
  78. package/dist/forms/patentsAndIP.iife.js +1 -1
  79. package/dist/forms/patentsAndIP.json +1 -1
  80. package/dist/forms/realEstate.es.js +2850 -2405
  81. package/dist/forms/realEstate.iife.js +1 -1
  82. package/dist/forms/realEstate.json +1 -1
  83. package/dist/forms/repossession.es.js +1566 -1251
  84. package/dist/forms/repossession.iife.js +1 -1
  85. package/dist/forms/repossession.json +1 -1
  86. package/dist/forms/ssdi.es.js +635 -520
  87. package/dist/forms/ssdi.iife.js +1 -1
  88. package/dist/forms/ssdi.json +1 -1
  89. package/dist/forms/testForm.es.js +409 -371
  90. package/dist/forms/testForm.iife.js +1 -1
  91. package/dist/forms/testForm.json +1 -1
  92. package/dist/forms/testRedirects.es.js +420 -316
  93. package/dist/forms/testRedirects.iife.js +1 -1
  94. package/dist/forms/testRedirects.json +1 -1
  95. package/dist/forms/vets.es.js +138 -137
  96. package/dist/forms/vets.iife.js +1 -1
  97. package/dist/forms/willsAndTrusts.es.js +1426 -1112
  98. package/dist/forms/willsAndTrusts.iife.js +1 -1
  99. package/dist/forms/willsAndTrusts.json +1 -1
  100. package/dist/main.css +1 -1
  101. package/package.json +1 -1
@@ -6,96 +6,101 @@ function LegalRedirectUrl() {
6
6
  return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
7
7
  }
8
8
 
9
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
10
- const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
11
- const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
12
- const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
13
- const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
14
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
15
- const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. 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.";
9
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL =
10
+ '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
11
+ const DEFAULT_COMMENTS_LABEL_LEGAL = "Please briefly describe your legal issue in a few words:";
12
+ const DEFAULT_FINAL_HEADLINE_LEGAL = "Submit Your Case";
13
+ const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL =
14
+ '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
+ const DEFAULT_FINAL_SUBHEADLINE_LEGAL =
16
+ "You may benefit from speaking with a legal professional. Please verify your contact information.";
17
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL =
18
+ '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
19
+ const TCPA_LANGUAGE_LEGAL =
20
+ "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. 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.";
16
21
  const defaultLegalImprovementCrossSells = {
17
- 'Auto and Car Accidents': 'Injured in a Car Accident',
18
- 'Personal Injury': 'Personal or Workplace Injury',
19
- 'DUI and DWI': 'Involved in a DUI/DWI',
20
- 'Wills and Trusts': 'Need a Will or Trust',
21
- 'Power of Attorney': 'Update Power of Attorney',
22
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
22
+ "Auto and Car Accidents": "Injured in a Car Accident",
23
+ "Personal Injury": "Personal or Workplace Injury",
24
+ "DUI and DWI": "Involved in a DUI/DWI",
25
+ "Wills and Trusts": "Need a Will or Trust",
26
+ "Power of Attorney": "Update Power of Attorney",
27
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
23
28
  };
24
29
  const CROSS_SELL_OPTION_MAP_LEGAL = {
25
30
  // Values can be a list or a map of value -> display value
26
- 'Auto and Car Accidents': {
27
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
28
- 'Wills and Trusts': 'Need a Will or Trust',
29
- 'Workers Compensation': 'Workplace Injury',
30
- 'Power of Attorney': 'Update Power of Attorney',
31
- 'Divorce and Separation': 'Need a Divorce or Separation',
32
- 'Child Custody': 'Need help with Child Custody',
31
+ "Auto and Car Accidents": {
32
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
33
+ "Wills and Trusts": "Need a Will or Trust",
34
+ "Workers Compensation": "Workplace Injury",
35
+ "Power of Attorney": "Update Power of Attorney",
36
+ "Divorce and Separation": "Need a Divorce or Separation",
37
+ "Child Custody": "Need help with Child Custody",
33
38
  },
34
39
  "Personal Injury": {
35
- 'DUI and DWI': 'Involved in a DUI/DWI',
36
- 'Wills and Trusts': 'Need a Will or Trust',
37
- 'Power of Attorney': 'Update Power of Attorney',
38
- 'Divorce and Separation': 'Need a Divorce or Separation',
39
- 'Child Custody': 'Need help with Child Custody',
40
+ "DUI and DWI": "Involved in a DUI/DWI",
41
+ "Wills and Trusts": "Need a Will or Trust",
42
+ "Power of Attorney": "Update Power of Attorney",
43
+ "Divorce and Separation": "Need a Divorce or Separation",
44
+ "Child Custody": "Need help with Child Custody",
40
45
  // TODO add one more?
41
46
  },
42
47
  "Workers Compensation": {
43
- 'DUI and DWI': 'Involved in a DUI/DWI',
44
- 'Wills and Trusts': 'Need a Will or Trust',
45
- 'Power of Attorney': 'Update Power of Attorney',
46
- 'Divorce and Separation': 'Need a Divorce or Separation',
47
- 'Child Custody': 'Need help with Child Custody',
48
+ "DUI and DWI": "Involved in a DUI/DWI",
49
+ "Wills and Trusts": "Need a Will or Trust",
50
+ "Power of Attorney": "Update Power of Attorney",
51
+ "Divorce and Separation": "Need a Divorce or Separation",
52
+ "Child Custody": "Need help with Child Custody",
48
53
  // TODO add one more?
49
54
  },
50
55
  "DUI and DWI": {
51
- 'Personal Injury': 'Personal or Workplace Injury',
52
- 'Wills and Trusts': 'Need a Will or Trust',
53
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
54
- 'Power of Attorney': 'Update Power of Attorney',
55
- 'Divorce and Separation': 'Need a Divorce or Separation',
56
- 'Child Custody': 'Need help with Child Custody',
56
+ "Personal Injury": "Personal or Workplace Injury",
57
+ "Wills and Trusts": "Need a Will or Trust",
58
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
59
+ "Power of Attorney": "Update Power of Attorney",
60
+ "Divorce and Separation": "Need a Divorce or Separation",
61
+ "Child Custody": "Need help with Child Custody",
57
62
  },
58
63
  "Wills and Trusts": {
59
- 'Auto and Car Accidents': 'Injured in a Car Accident',
60
- 'Personal Injury': 'Personal or Workplace Injury',
61
- 'DUI and DWI': 'Involved in a DUI/DWI',
62
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
63
- 'Divorce and Separation': 'Need a Divorce or Separation',
64
- 'Child Custody': 'Need help with Child Custody',
64
+ "Auto and Car Accidents": "Injured in a Car Accident",
65
+ "Personal Injury": "Personal or Workplace Injury",
66
+ "DUI and DWI": "Involved in a DUI/DWI",
67
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
68
+ "Divorce and Separation": "Need a Divorce or Separation",
69
+ "Child Custody": "Need help with Child Custody",
65
70
  },
66
71
  "Probate and Estates": {
67
- 'Auto and Car Accidents': 'Injured in a Car Accident',
68
- 'Personal Injury': 'Personal or Workplace Injury',
69
- 'DUI and DWI': 'Involved in a DUI/DWI',
70
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
71
- 'Divorce and Separation': 'Need a Divorce or Separation',
72
- 'Child Custody': 'Need help with Child Custody',
72
+ "Auto and Car Accidents": "Injured in a Car Accident",
73
+ "Personal Injury": "Personal or Workplace Injury",
74
+ "DUI and DWI": "Involved in a DUI/DWI",
75
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
76
+ "Divorce and Separation": "Need a Divorce or Separation",
77
+ "Child Custody": "Need help with Child Custody",
73
78
  },
74
79
  "Power of Attorney": {
75
- 'Auto and Car Accidents': 'Injured in a Car Accident',
76
- 'Personal Injury': 'Personal or Workplace Injury',
77
- 'DUI and DWI': 'Involved in a DUI/DWI',
78
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
79
- 'Divorce and Separation': 'Need a Divorce or Separation',
80
- 'Child Custody': 'Need help with Child Custody',
80
+ "Auto and Car Accidents": "Injured in a Car Accident",
81
+ "Personal Injury": "Personal or Workplace Injury",
82
+ "DUI and DWI": "Involved in a DUI/DWI",
83
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
84
+ "Divorce and Separation": "Need a Divorce or Separation",
85
+ "Child Custody": "Need help with Child Custody",
81
86
  },
82
87
  "Long Term Disability": {
83
- 'Auto and Car Accidents': 'Injured in a Car Accident',
84
- 'DUI and DWI': 'Involved in a DUI/DWI',
85
- 'Wills and Trusts': 'Need a Will or Trust',
86
- 'Power of Attorney': 'Update Power of Attorney',
87
- 'Divorce and Separation': 'Need a Divorce or Separation',
88
- 'Child Custody': 'Need help with Child Custody',
88
+ "Auto and Car Accidents": "Injured in a Car Accident",
89
+ "DUI and DWI": "Involved in a DUI/DWI",
90
+ "Wills and Trusts": "Need a Will or Trust",
91
+ "Power of Attorney": "Update Power of Attorney",
92
+ "Divorce and Separation": "Need a Divorce or Separation",
93
+ "Child Custody": "Need help with Child Custody",
89
94
  },
90
95
  "Social Security Disability and Insurance": {
91
- 'Auto and Car Accidents': 'Injured in a Car Accident',
92
- 'DUI and DWI': 'Involved in a DUI/DWI',
93
- 'Wills and Trusts': 'Need a Will or Trust',
94
- 'Power of Attorney': 'Update Power of Attorney',
95
- 'Divorce and Separation': 'Need a Divorce or Separation',
96
- 'Child Custody': 'Need help with Child Custody',
96
+ "Auto and Car Accidents": "Injured in a Car Accident",
97
+ "DUI and DWI": "Involved in a DUI/DWI",
98
+ "Wills and Trusts": "Need a Will or Trust",
99
+ "Power of Attorney": "Update Power of Attorney",
100
+ "Divorce and Separation": "Need a Divorce or Separation",
101
+ "Child Custody": "Need help with Child Custody",
97
102
  },
98
- '*': defaultLegalImprovementCrossSells,
103
+ "*": defaultLegalImprovementCrossSells,
99
104
  };
100
105
 
101
106
  // ------ Common Base Settings
@@ -104,32 +109,48 @@ const checkbox = (updates) => {
104
109
  if (updates.name && !updates.id) {
105
110
  updates.id = updates.name;
106
111
  }
107
- return merge({
108
- $formkit: 'checkbox',
109
- validation: 'required',
110
- validationMessages: {
111
- required: 'Field is required'
112
- }
113
- }, updates)
112
+ return merge(
113
+ {
114
+ $formkit: "checkbox",
115
+ validation: "required",
116
+ validationMessages: {
117
+ required: "Field is required",
118
+ },
119
+ },
120
+ updates
121
+ )
114
122
  };
115
123
 
116
124
  const sbsCheckbox = (updates) => {
117
- updates.legendClass = 'legend-left required';
118
- updates.fieldsetClass = '$reset side-by-side';
119
- updates.optionsClass = 't-pl-1';
120
- updates.innerClass = 't-flex t-items-center';
121
- updates.wrapperClass = 't-mb-3';
125
+ updates.legendClass = "legend-left required";
126
+ updates.fieldsetClass = "$reset side-by-side";
127
+ updates.optionsClass = "t-pl-1";
128
+ updates.innerClass = "t-flex t-items-center";
129
+ updates.wrapperClass = "t-mb-3";
122
130
  return checkbox(updates)
123
131
  };
124
132
 
125
133
  const col2Checkbox = (updates) => {
126
134
  if (!updates || !updates.legendClass) {
127
- updates.legendClass = 'required';
135
+ updates.legendClass = "required";
128
136
  }
129
- updates.fieldsetClass = '$reset';
130
- updates.optionsClass = 't-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
131
- updates.innerClass = 't-items-start';
132
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
137
+ updates.fieldsetClass = "$reset";
138
+ updates.optionsClass = "t-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
139
+ updates.innerClass = "t-items-start";
140
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
141
+ return checkbox(updates)
142
+ };
143
+
144
+ const verticalCol2Checkbox = (updates) => {
145
+ if (!updates || !updates.legendClass) {
146
+ updates.legendClass = "required";
147
+ }
148
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
149
+ updates.optionClass = "t-mx-5";
150
+ updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
151
+ updates.innerClass = "t-items-center";
152
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
153
+ updates.messagesClass = "t-flex t-justify-center";
133
154
  return checkbox(updates)
134
155
  };
135
156
 
@@ -137,70 +158,120 @@ const radio = (updates) => {
137
158
  if (updates.name && !updates.id) {
138
159
  updates.id = updates.name;
139
160
  }
140
- return merge({
141
- $formkit: 'radio',
142
- validation: 'required',
143
- validationMessages: {
144
- required: 'Field is required'
161
+ return merge(
162
+ {
163
+ $formkit: "radio",
164
+ validation: "required",
165
+ validationMessages: {
166
+ required: "Field is required",
167
+ },
168
+ optionsClass: "t-pt-3 t-pl-1",
169
+ legendClass: "required",
145
170
  },
146
- optionsClass: 't-pt-3 t-pl-1',
147
- legendClass: 'required'
148
- }, updates)
171
+ updates
172
+ )
149
173
  };
150
174
 
151
175
  const col2Radio = (updates) => {
152
- updates.legendClass = 'required';
153
- updates.fieldsetClass = '$reset';
154
- updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
155
- updates.innerClass = 't-items-start';
156
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
176
+ updates.legendClass = "required";
177
+ updates.fieldsetClass = "$reset";
178
+ updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
179
+ updates.innerClass = "t-items-start";
180
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
181
+ return radio(updates)
182
+ };
183
+
184
+ const col2RadioCenter = (updates) => {
185
+ updates.legendClass = "required t-w-[100%] t-text-center";
186
+ if (typeof updates.fieldsetClass === "undefined") {
187
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
188
+ }
189
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
190
+ updates.innerClass = "t-items-start";
191
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
192
+ updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
193
+ updates.messagesClass = "t-flex t-justify-center";
194
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
157
195
  return radio(updates)
158
196
  };
159
197
 
160
198
  const sbs2ColRadio = (updates) => {
161
- updates.legendClass = 'legend-left-flex md:t-max-w-[40%] required';
162
- updates.fieldsetClass = '$reset side-by-side-flex';
163
- updates.optionsClass = 'md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125';
164
- updates.innerClass = 't-flex t-items-start';
165
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
199
+ updates.legendClass = "legend-left-flex md:t-max-w-[40%] required";
200
+ updates.fieldsetClass = "$reset side-by-side-flex";
201
+ updates.optionsClass = "md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125";
202
+ updates.innerClass = "t-flex t-items-start";
203
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
166
204
  return radio(updates)
167
205
  };
168
206
 
169
207
  const sbs2ItemRadio = (updates) => {
170
- updates.legendClass = 'legend-left t-pb-1 required';
171
- updates.fieldsetClass = '$reset side-by-side t-items-center';
172
- updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
173
- updates.innerClass = 't-flex t-items-center';
174
- updates.optionClass = 't-pr-1';
208
+ updates.legendClass = "legend-left t-pb-1 required";
209
+ updates.fieldsetClass = "$reset side-by-side t-items-center";
210
+ updates.optionsClass = "t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center";
211
+ updates.innerClass = "t-flex t-items-center";
212
+ updates.optionClass = "t-pr-1";
175
213
  return radio(updates)
176
214
  };
177
215
 
178
216
  const sbsYesNoRadio = (updates) => {
179
- updates.options = ['Yes', 'No'];
217
+ updates.options = ["Yes", "No"];
180
218
  return sbs2ItemRadio(updates)
181
219
  };
182
220
 
221
+ const verticalButtonRadio = (updates) => {
222
+ updates.legendClass = "legend-left";
223
+ updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col-reverse t-items-center";
224
+ if (typeof updates.optionsClass === "undefined") {
225
+ updates.optionsClass = "t-flex t-flex-col sm:t-flex-row t-justify-center t-my-3";
226
+ }
227
+ updates.optionClass = "radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5";
228
+ updates.wrapperClass = "$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]";
229
+ updates.labelClass = "t-font-semibold t-text-[#1e448f] t-w-[100%]";
230
+ updates.decoratorIcon = false;
231
+ updates.messagesClass = "t-flex t-justify-center";
232
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
233
+ return radio(updates)
234
+ };
235
+
236
+ const verticalYesNoRadio = (updates) => {
237
+ updates.options = ["Yes", "No"];
238
+ updates.optionsClass = "t-flex t-justify-center t-my-3";
239
+ return verticalButtonRadio(updates)
240
+ };
241
+
183
242
  const select = (updates) => {
184
243
  if (updates.name && !updates.id) {
185
244
  updates.id = updates.name;
186
245
  }
187
- return merge({
188
- $formkit: 'select',
189
- placeholder: "Please Select",
190
- validation: 'required',
191
- validationMessages: {
192
- required: 'Field is required'
246
+ return merge(
247
+ {
248
+ $formkit: "select",
249
+ placeholder: "Please Select",
250
+ validation: "required",
251
+ validationMessages: {
252
+ required: "Field is required",
253
+ },
254
+ inputClass: "t-bg-white",
255
+ labelClass: "required",
193
256
  },
194
- inputClass: 't-bg-white',
195
- labelClass: 'required'
196
- }, updates)
257
+ updates
258
+ )
197
259
  };
198
260
 
199
261
  const sbsSelect = (updates) => {
200
- updates.labelClass = 'required';
201
- updates.wrapperClass = 'side-by-side t-items-center';
202
- updates.innerClass = 'select-height-content';
203
- updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
262
+ updates.labelClass = "required";
263
+ updates.wrapperClass = "side-by-side t-items-center";
264
+ updates.innerClass = "select-height-content";
265
+ updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
266
+ return select(updates)
267
+ };
268
+
269
+ const verticalSelect = (updates) => {
270
+ updates.labelClass = "required";
271
+ updates.wrapperClass = "t-flex t-justify-center";
272
+ updates.messagesClass = "t-flex t-justify-center";
273
+ updates.inputClass = "t-min-w-[150px] t-bg-white";
274
+ updates.helpClass = "t-mt-2.5 t-text-center";
204
275
  return select(updates)
205
276
  };
206
277
 
@@ -208,26 +279,29 @@ const text = (updates) => {
208
279
  if (updates.name && !updates.id) {
209
280
  updates.id = updates.name;
210
281
  }
211
- return merge({
212
- $formkit: 'text',
213
- validation: 'required',
214
- validationMessages: {
215
- required: 'Field is required'
282
+ return merge(
283
+ {
284
+ $formkit: "text",
285
+ validation: "required",
286
+ validationMessages: {
287
+ required: "Field is required",
288
+ },
289
+ labelClass: "required",
216
290
  },
217
- labelClass: 'required'
218
- }, updates)
291
+ updates
292
+ )
219
293
  };
220
294
 
221
295
  const sbsText = (updates) => {
222
- updates.wrapperClass = 'side-by-side t-items-center';
296
+ updates.wrapperClass = "side-by-side t-items-center";
223
297
  return text(updates)
224
298
  };
225
299
 
226
300
  const verticalText = (updates) => {
227
- updates.wrapperClass = 't-flex t-justify-center';
228
- updates.messagesClass = 't-flex t-justify-center';
229
- updates.inputClass = 't-text-center';
230
- updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
301
+ updates.wrapperClass = "t-flex t-justify-center";
302
+ updates.messagesClass = "t-flex t-justify-center";
303
+ updates.inputClass = "t-text-center";
304
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
231
305
  return text(updates)
232
306
  };
233
307
 
@@ -235,533 +309,771 @@ const textArea = (updates) => {
235
309
  if (updates.name && !updates.id) {
236
310
  updates.id = updates.name;
237
311
  }
238
- return merge({
239
- $formkit: 'textarea',
240
- rows: 5,
241
- maxlength: 500,
242
- validation: 'required',
243
- validationMessages: {
244
- required: 'Field is required'
312
+ return merge(
313
+ {
314
+ $formkit: "textarea",
315
+ rows: 5,
316
+ maxlength: 500,
317
+ validation: "required",
318
+ validationMessages: {
319
+ required: "Field is required",
320
+ },
321
+ innerClass: "t-max-w-xl",
322
+ labelClass: "required",
245
323
  },
246
- innerClass: 't-max-w-xl',
247
- labelClass: 'required'
248
- }, updates)
324
+ updates
325
+ )
249
326
  };
250
327
 
251
328
  const date = (updates) => {
252
329
  if (updates.name && !updates.id) {
253
330
  updates.id = updates.name;
254
331
  }
255
- return merge({
256
- $formkit: 'DatePicker',
257
- validation: 'required',
258
- validationMessages: {
259
- required: 'Field is required'
332
+ return merge(
333
+ {
334
+ $formkit: "DatePicker",
335
+ validation: "required",
336
+ validationMessages: {
337
+ required: "Field is required",
338
+ },
339
+ labelClass: "required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500",
340
+ innerClass:
341
+ "t-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500",
260
342
  },
261
- labelClass: 'required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500',
262
- innerClass: 't-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500'
263
- }, updates)
343
+ updates
344
+ )
264
345
  };
265
346
 
266
347
  const sbsDate = (updates) => {
267
- updates.wrapperClass = 'side-by-side t-items-center';
348
+ updates.wrapperClass = "side-by-side t-items-center";
268
349
  return date(updates)
269
350
  };
270
351
 
271
- const email = (scope) => sbsText({
272
- $formkit: 'email',
273
- name: scope ? scope + ':' + 'Email' : 'Email',
274
- label: 'Email Address:',
275
- placeholder: 'email@domain.com',
276
- autocomplete: 'email',
277
- 'data-tf-sensitive': 'false',
278
- validation: 'required|email',
279
- validationMessages: {
280
- required: 'Email is required',
281
- email: 'Invalid Email'
282
- }
283
- });
352
+ const verticalDate = (updates) => {
353
+ updates.wrapperClass = "t-flex t-justify-center";
354
+ updates.inputClass = "t-text-center";
355
+ updates.messagesClass = "t-flex t-justify-center";
356
+ return date(updates)
357
+ };
284
358
 
285
- const firstName = (scope) => sbsText({
286
- label: 'First Name:',
287
- placeholder: 'First',
288
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
289
- autocomplete: "given-name",
290
- validationMessages: {
291
- required: 'First Name is required'
292
- }
293
- });
359
+ const email = (scope, vertical, updates = {}) => {
360
+ const func = vertical ? verticalText : sbsText;
361
+ const label = vertical ? updates.label : "Email Address:";
362
+ return func({
363
+ $formkit: "email",
364
+ name: scope ? scope + ":" + "Email" : "Email",
365
+ label,
366
+ placeholder: "email@domain.com",
367
+ autocomplete: "email",
368
+ "data-tf-sensitive": "false",
369
+ validation: "required|email",
370
+ validationMessages: {
371
+ required: "Email is required",
372
+ email: "Invalid Email",
373
+ },
374
+ ...updates,
375
+ })
376
+ };
294
377
 
295
- const lastName = (scope) => sbsText({
296
- label: 'Last Name:',
297
- placeholder: 'Last',
298
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
299
- autocomplete: "family-name",
300
- validationMessages: {
301
- required: 'Last Name is required'
302
- }
303
- });
378
+ const firstName = (scope, vertical, updates = {}) => {
379
+ const func = vertical ? verticalText : sbsText;
380
+ const label = vertical ? updates.label : "First Name:";
381
+ return func({
382
+ label,
383
+ placeholder: "First",
384
+ name: scope ? scope + ":" + "First_Name" : "First_Name",
385
+ autocomplete: "given-name",
386
+ validationMessages: {
387
+ required: "First Name is required",
388
+ },
389
+ ...updates,
390
+ })
391
+ };
304
392
 
305
- const phone = (scope) => sbsText({
306
- $formkit: 'tel',
307
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
308
- label: 'Phone Number:',
309
- placeholder: '###-###-####',
310
- maxlength: 12,
311
- help: '10-digit phone number, hyphens optional',
312
- autocomplete: 'tel-national',
313
- 'data-tf-sensitive': 'false',
314
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
315
- validationMessages: {
316
- required: 'Field is required',
317
- matches: 'Invalid Phone Format, use ###-###-####',
318
- valid_phone: 'Invalid Phone Number'
319
- },
320
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
321
- });
393
+ const lastName = (scope, vertical, updates = {}) => {
394
+ const func = vertical ? verticalText : sbsText;
395
+ const label = vertical ? updates.label : "Last Name:";
396
+ return func({
397
+ label,
398
+ placeholder: "Last",
399
+ name: scope ? scope + ":" + "Last_Name" : "Last_Name",
400
+ autocomplete: "family-name",
401
+ validationMessages: {
402
+ required: "Last Name is required",
403
+ },
404
+ ...updates,
405
+ })
406
+ };
322
407
 
408
+ const phone = (scope, vertical, updates = {}) => {
409
+ const func = vertical ? verticalText : sbsText;
410
+ const label = vertical ? updates.label : "Phone Number:";
411
+ return func({
412
+ $formkit: "tel",
413
+ name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
414
+ label,
415
+ placeholder: "###-###-####",
416
+ maxlength: 12,
417
+ help: "10-digit phone number, hyphens optional",
418
+ autocomplete: "tel-national",
419
+ "data-tf-sensitive": "false",
420
+ validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
421
+ validationMessages: {
422
+ required: "Phone Number is required",
423
+ matches: "Invalid Phone Format, use ###-###-####",
424
+ valid_phone: "Invalid Phone Number",
425
+ },
426
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
427
+ ...updates,
428
+ })
429
+ };
323
430
 
324
431
  const zipcode = (scope, vertical, updates = {}) => {
325
432
  const func = vertical ? verticalText : sbsText;
326
- const label = vertical ? (updates.label) : 'Zip Code:';
327
- const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
433
+ const label = vertical ? updates.label : "Zip Code:";
434
+ const help = vertical ? updates.help ?? "We try to match you with local help" : null;
328
435
  return func({
329
436
  label,
330
437
  help,
331
- placeholder: '#####',
332
- name: scope ? scope + ':' + 'Zip' : 'Zip',
438
+ placeholder: "#####",
439
+ name: scope ? scope + ":" + "Zip" : "Zip",
333
440
  maxlength: 5,
334
441
  inputmode: "numeric",
335
- autocomplete: 'postal-code',
336
- validation: 'required|matches:/^[0-9]{5}$/',
442
+ autocomplete: "postal-code",
443
+ validation: "required|matches:/^[0-9]{5}$/",
337
444
  validationMessages: {
338
- required: 'Zip Code is required',
339
- matches: 'Invalid Zip Code'
445
+ required: "Zip Code is required",
446
+ matches: "Invalid Zip Code",
340
447
  },
341
- ...updates
448
+ ...updates,
342
449
  })
343
450
  };
344
451
 
345
452
  const applicantAge = (scope, vertical, updates = {}) => {
346
453
  const func = vertical ? verticalText : sbsText;
347
- const label = vertical ? (updates.label) : 'Age of Applicant?';
348
- const value = vertical ? (updates.value ?? "50") : null;
349
- return func(merge({
350
- label,
351
- placeholder: 'Age between 18 and 65',
352
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
353
- value,
354
- maxlength: 2,
355
- inputmode: "numeric",
356
- validation: "required|min:18,max:65",
357
- validationMessages: {
358
- required: 'Applicant Age is required',
359
- min: 'Invalid Age - must be between 18 and 65',
360
- max: 'Invalid Age - must be between 18 and 65',
361
- },
362
- ...updates
363
- }))
454
+ const label = vertical ? updates.label : "Age of Applicant?";
455
+ const value = vertical ? updates.value ?? "50" : null;
456
+ return func(
457
+ merge({
458
+ label,
459
+ placeholder: "Age between 18 and 65",
460
+ name: scope ? scope + ":" + "Applicant_Age" : "Applicant_Age",
461
+ value,
462
+ maxlength: 2,
463
+ inputmode: "numeric",
464
+ validation: "required|min:18,max:65",
465
+ validationMessages: {
466
+ required: "Applicant Age is required",
467
+ min: "Invalid Age - must be between 18 and 65",
468
+ max: "Invalid Age - must be between 18 and 65",
469
+ },
470
+ ...updates,
471
+ })
472
+ )
364
473
  };
365
474
 
366
- const atFault = (scope) => sbsYesNoRadio({
367
- name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
368
- label: 'Were You at Fault?'
369
- });
475
+ const atFault = (scope, vertical, updates = {}) => {
476
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
477
+ const label = vertical ? updates.label : "Were You at Fault?";
478
+ return func(
479
+ merge(
480
+ {
481
+ label,
482
+ name: scope ? scope + ":" + "At_Fault" : "At_Fault",
483
+ },
484
+ updates
485
+ )
486
+ )
487
+ };
370
488
 
371
- const bankruptcyCrossSell = () => sbsCheckbox({
372
- label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
373
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
374
- name: 'CrossSell_Bankruptcy',
375
- id: 'CrossSell_Bankruptcy',
376
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
377
- validation: null,
378
- helpClass: "!t-text-sm"
379
- });
489
+ const bankruptcyCrossSell = (scope) =>
490
+ sbsCheckbox({
491
+ label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
492
+ help: "Note: you will be contacted separately by a bankruptcy/debt expert",
493
+ name: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
494
+ id: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
495
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
496
+ validation: null,
497
+ helpClass: "!t-text-sm",
498
+ });
499
+
500
+ const bloodContentAlcoholTest = (scope, vertical, updates = {}) => {
501
+ const func = vertical ? verticalSelect : sbsSelect;
502
+ const label = vertical ? updates.label : "Blood Alcohol Content Measured by Test:";
503
+ return func(
504
+ merge(
505
+ {
506
+ label,
507
+ name: scope ? scope + ":" + "Blood_Alcohol_Content_Test" : "Blood_Alcohol_Content_Test",
508
+ options: [
509
+ "No Test",
510
+ "0.00% - 0.04%",
511
+ "0.05% - 0.08%",
512
+ "0.09% - 0.12%",
513
+ "0.13% - 0.16%",
514
+ "0.17% - 0.20%",
515
+ "More than 0.20%",
516
+ "Don't know",
517
+ ],
518
+ },
519
+ updates
520
+ )
521
+ )
522
+ };
380
523
 
381
- const bloodContentAlcoholTest = (scope) => sbsSelect({
382
- name: scope ? scope + ':' + 'Blood_Alcohol_Content_Test' : 'Blood_Alcohol_Content_Test',
383
- label: 'Blood Alcohol Content Measured by Test:',
384
- options: [
385
- "No Test",
386
- "0.00% - 0.04%",
387
- "0.05% - 0.08%",
388
- "0.09% - 0.12%",
389
- "0.13% - 0.16%",
390
- "0.17% - 0.20%",
391
- "More than 0.20%",
392
- "Don't know"
393
- ]
394
- });
524
+ const childAndFamilyTOLP = (scope, vertical, updates = {}) => {
525
+ const func = vertical ? col2RadioCenter : col2Radio;
526
+ const label = vertical ? updates.label : "Type of Help Needed:";
527
+ return func(
528
+ merge(
529
+ {
530
+ label,
531
+ id: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
532
+ name: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
533
+ options: [
534
+ "Child Custody",
535
+ "Child Support",
536
+ "Adoption",
537
+ "Family Issues",
538
+ "Guardianship",
539
+ "Divorce and Separation",
540
+ "Not Sure or Other",
541
+ ],
542
+ },
543
+ updates
544
+ )
545
+ )
546
+ };
395
547
 
396
- const childAndFamilyTOLP = () => col2Radio({
397
- label: 'Type of Help Needed:',
398
- name: 'Type_Of_Legal_Problem',
399
- id: 'Type_Of_Legal_Problem',
400
- options: [
401
- 'Child Custody',
402
- 'Child Support',
403
- 'Adoption',
404
- 'Family Issues',
405
- 'Guardianship',
406
- 'Divorce and Separation',
407
- 'Not Sure or Other'
408
- ]
409
- });
548
+ const childHome = (scope, vertical, updates = {}) => {
549
+ const func = vertical ? col2RadioCenter : sbsSelect;
550
+ const label = vertical ? updates.label : "With Whom Do the Children Currently Live?";
551
+ return func(
552
+ merge(
553
+ {
554
+ label,
555
+ name: scope ? scope + ":" + "Child_Home" : "Child_Home",
556
+ options: ["Mother", "Father", "Grandparents", "Other"],
557
+ },
558
+ updates
559
+ )
560
+ )
561
+ };
410
562
 
411
- const childHome = (scope) => sbsSelect({
412
- name: scope ? scope + ':' + 'Child_Home' : 'Child_Home',
413
- label: 'With Whom Do the Children Currently Live?',
414
- options: [
415
- 'Mother',
416
- 'Father',
417
- 'Grandparents',
418
- 'Other'
419
- ]
420
- });
563
+ const childPrimaryCaregiver = (scope, vertical, updates = {}) => {
564
+ const func = vertical ? verticalButtonRadio : sbsSelect;
565
+ const label = vertical ? updates.label : "Who is the Primary Caregiver?";
566
+ return func(
567
+ merge(
568
+ {
569
+ label,
570
+ name: scope ? scope + ":" + "Child_Primary_Caregiver" : "Child_Primary_Caregiver",
571
+ options: ["Mother", "Father", "Other"],
572
+ },
573
+ updates
574
+ )
575
+ )
576
+ };
421
577
 
422
- const childPrimaryCaregiver = (scope) => sbsSelect({
423
- name: scope ? scope + ':' + 'Child_Primary_Caregiver' : 'Child_Primary_Caregiver',
424
- label: 'Who is the Primary Caregiver?',
425
- options: [
426
- 'Mother',
427
- 'Father',
428
- 'Other'
429
- ]
430
- });
578
+ const childRelationship = (scope, vertical, updates = {}) => {
579
+ const func = vertical ? col2RadioCenter : sbsSelect;
580
+ const label = vertical ? updates.label : "Your Relationship to Child(ren):";
581
+ return func(
582
+ merge(
583
+ {
584
+ label,
585
+ name: scope ? scope + ":" + "Child_Relationship" : "Child_Relationship",
586
+ options: ["Father", "Mother", "Grandparent", "Aunt/Uncle", "Other"],
587
+ },
588
+ updates
589
+ )
590
+ )
591
+ };
431
592
 
432
- const childRelationship = (scope) => sbsSelect({
433
- name: scope ? scope + ':' + 'Child_Relationship' : 'Child_Relationship',
434
- label: 'Your Relationship to Child(ren):',
435
- options: [
436
- 'Father',
437
- 'Mother',
438
- 'Grandparent',
439
- 'Aunt/Uncle',
440
- 'Other'
441
- ]
442
- });
593
+ const claimStatus = (scope, vertical, updates = {}) => {
594
+ const func = vertical ? col2RadioCenter : sbsSelect;
595
+ const label = vertical ? updates.label : "Status of Claim:";
596
+ return func(
597
+ merge(
598
+ {
599
+ label,
600
+ name: scope ? scope + ":" + "Claim_Status" : "Claim_Status",
601
+ options: ["No action taken yet", "Demand for compensation made", "Lawsuit filed", "Other"],
602
+ },
603
+ updates
604
+ )
605
+ )
606
+ };
443
607
 
444
- const claimStatus = (scope) => sbsSelect({
445
- name: scope ? scope + ':' + 'Claim_Status' : 'Claim_Status',
446
- label: "Status of Claim:",
447
- options: [
448
- "No action taken yet",
449
- "Demand for compensation made",
450
- "Lawsuit filed",
451
- "Other"
452
- ]
453
- });
608
+ // TODO: vertical not supported yet
609
+ const comments = (scope, vertical, updates) =>
610
+ textArea(
611
+ merge(
612
+ {
613
+ name: scope ? scope + ":" + "Comments" : "Comments",
614
+ label: "Please briefly describe your situation in a few words:",
615
+ placeholder:
616
+ 'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
617
+ },
618
+ updates
619
+ )
620
+ );
454
621
 
455
- const comments = (updates, scope) => textArea(
456
- merge({
457
- name: scope ? scope + ':' + 'Comments' : 'Comments',
458
- label: 'Please briefly describe your situation in a few words:',
459
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
460
- }, updates)
461
- );
462
-
463
- const degreeOfInterest = (scope, help) => sbsSelect({
464
- name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
465
- id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
466
- label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
467
- help: help,
468
- options: [
469
- 'Definitely',
470
- 'Probably',
471
- 'Maybe',
472
- "Absolutely Can't Afford"
473
- ]
474
- });
622
+ const degreeOfInterest = (scope, vertical, updates = {}) => {
623
+ const func = vertical ? col2RadioCenter : sbsSelect;
624
+ const label = vertical ? updates.label : "How Likely Are You to Pay if Your Issue Could be Resolved?";
625
+ const help = vertical ? updates.help : "No payment necessary to speak with lawyers.";
626
+ return func(
627
+ merge(
628
+ {
629
+ name: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
630
+ id: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
631
+ label,
632
+ help,
633
+ options: ["Definitely", "Probably", "Maybe", "Absolutely Can't Afford"],
634
+ },
635
+ updates
636
+ )
637
+ )
638
+ };
475
639
 
476
- const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
640
+ const degreeOfInterestHelp = (scope, vertical, updates = {}) =>
641
+ degreeOfInterest(scope, vertical, merge(updates, { help: "No payment necessary to speak with lawyers." }));
477
642
 
478
- const disabilityConditionStopWork = (scope) => sbsYesNoRadio({
479
- name: scope ? scope + ':' + 'Disability_Condition_Stop_Work' : 'Disability_Condition_Stop_Work',
480
- label: 'Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?'
481
- });
643
+ const disabilityConditionStopWork = (scope, vertical, updates = {}) => {
644
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
645
+ const label = vertical
646
+ ? updates.label
647
+ : "Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?";
648
+ return func(
649
+ merge(
650
+ {
651
+ name: scope ? scope + ":" + "Disability_Condition_Stop_Work" : "Disability_Condition_Stop_Work",
652
+ label,
653
+ },
654
+ updates
655
+ )
656
+ )
657
+ };
482
658
 
483
- const disabilityWorkHistory = (scope) => sbsYesNoRadio({
484
- name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
485
- label: 'Have You Had a Full-Time Job Within the Past 5 Years?'
486
- });
659
+ const disabilityWorkHistory = (scope, vertical, updates = {}) => {
660
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
661
+ const label = vertical ? updates.label : "Have You Had a Full-Time Job Within the Past 5 Years?";
662
+ return func(
663
+ merge(
664
+ {
665
+ name: scope ? scope + ":" + "Disability_Work_History" : "Disability_Work_History",
666
+ label,
667
+ },
668
+ updates
669
+ )
670
+ )
671
+ };
487
672
 
488
- const doctorTreatment = (scope) => sbsYesNoRadio({
489
- name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
490
- label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
491
- });
673
+ const doctorTreatment = (scope, vertical, updates = {}) => {
674
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
675
+ const label = vertical ? updates.label : "Have You Recently Been Treated by a Doctor, Hospital or Clinic?";
676
+ return func(
677
+ merge(
678
+ {
679
+ name: scope ? scope + ":" + "Doctor_Treatment" : "Doctor_Treatment",
680
+ label,
681
+ },
682
+ updates
683
+ )
684
+ )
685
+ };
492
686
 
493
- const estateLegalServicesNeeded = (scope) => sbsSelect({
494
- name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
495
- label: "Legal Services Needed for Your Estate:",
496
- options: [
497
- "Charitable Giving",
498
- "Contested Wills",
499
- "Drafting Wills or Trust",
500
- "Estate Administration",
501
- "Asset Protection",
502
- "Other"
503
- ]
504
- });
687
+ const estateLegalServicesNeeded = (scope, vertical, updates = {}) => {
688
+ const func = vertical ? col2RadioCenter : sbsSelect;
689
+ const label = vertical ? updates.label : "Legal Services Needed for Your Estate:";
690
+ return func(
691
+ merge(
692
+ {
693
+ name: scope ? scope + ":" + "Estate_Legal_Services_Needed" : "Estate_Legal_Services_Needed",
694
+ label,
695
+ options: [
696
+ "Charitable Giving",
697
+ "Contested Wills",
698
+ "Drafting Wills or Trust",
699
+ "Estate Administration",
700
+ "Asset Protection",
701
+ "Other",
702
+ ],
703
+ },
704
+ updates
705
+ )
706
+ )
707
+ };
505
708
 
506
- const haveAttorney = (scope) => sbsYesNoRadio({
507
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
508
- label: 'Already Working with An Attorney?'
509
- });
709
+ const haveAttorney = (scope, vertical, updates = {}) => {
710
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
711
+ const label = vertical ? updates.label : "Already Working with An Attorney?";
712
+ return func(
713
+ merge(
714
+ {
715
+ label,
716
+ name: scope ? scope + ":" + "Have_Attorney" : "Have_Attorney",
717
+ },
718
+ updates
719
+ )
720
+ )
721
+ };
510
722
 
511
- const haveChildren = (scope) => sbsYesNoRadio({
512
- name: scope ? scope + ':' + 'Have_Children' : 'Have_Children',
513
- label: 'Do You Have Children?'
514
- });
723
+ const haveChildren = (scope, vertical, updates = {}) => {
724
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
725
+ const label = vertical ? updates.label : "Do You Have Children?";
726
+ return func(
727
+ merge(
728
+ {
729
+ name: scope ? scope + ":" + "Have_Children" : "Have_Children",
730
+ label,
731
+ },
732
+ updates
733
+ )
734
+ )
735
+ };
515
736
 
516
- const incidentDate = (scope) => sbsDate({
517
- name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
518
- label: 'Date of Incident:',
519
- });
737
+ const incidentDate = (scope, vertical, updates = {}) => {
738
+ const func = vertical ? verticalDate : sbsDate;
739
+ const label = vertical ? updates.label : "Date of Incident:";
740
+ return func(
741
+ merge(
742
+ {
743
+ label,
744
+ name: scope ? scope + ":" + "Incident_Date" : "Incident_Date",
745
+ },
746
+ updates
747
+ )
748
+ )
749
+ };
520
750
 
521
- const lawyerPaymentMethod = (scope) => sbsSelect({
522
- name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
523
- label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
524
- help: 'No payment necessary to speak with lawyers.',
525
- options: [
526
- 'Cash',
527
- 'Check',
528
- 'Credit Card',
529
- 'Friend',
530
- 'Family',
531
- 'Other'
532
- ]
533
- });
751
+ const lawyerPaymentMethod = (scope, vertical, updates = {}) => {
752
+ const func = vertical ? col2RadioCenter : sbsSelect;
753
+ const label = vertical ? updates.label : "How Will You Pay for Legal Fees if You Hire a Lawyer?";
754
+ const help = vertical ? updates.help : "No payment necessary to start a consultation.";
755
+ const options = vertical
756
+ ? {
757
+ Cash: "Cash",
758
+ "Credit Card": "Credit Card",
759
+ Family: "Family or Friend",
760
+ Other: "Other",
761
+ }
762
+ : ["Cash", "Check", "Credit Card", "Friend", "Family", "Other"];
763
+ return func(
764
+ merge(
765
+ {
766
+ label,
767
+ help,
768
+ name: scope ? scope + ":" + "Lawyer_Payment_Method" : "Lawyer_Payment_Method",
769
+ options,
770
+ fieldsetClass: vertical ? "$reset t-flex t-flex-col t-items-center" : undefined,
771
+ },
772
+ updates
773
+ )
774
+ )
775
+ };
534
776
 
535
- const legalCrossSells$1 = () => col2Checkbox({
536
- id: 'Legal_CrossSells',
537
- name: 'Legal_CrossSells',
538
- help: 'Just hit "Next" if none apply',
539
- helpClass: 't-text-center !t-text-sm',
540
- validation: null,
541
- options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
542
- });
777
+ const legalCrossSells$1 = () =>
778
+ col2Checkbox({
779
+ id: "Legal_CrossSells",
780
+ name: "Legal_CrossSells",
781
+ help: 'Just hit "Next" if none apply',
782
+ helpClass: "t-text-center !t-text-sm",
783
+ validation: null,
784
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
785
+ });
786
+
787
+ const maritalStatus = (scope, vertical, updates = {}) => {
788
+ const func = vertical ? col2RadioCenter : sbsSelect;
789
+ const label = vertical ? updates.label : "Marital Status:";
790
+ return func(
791
+ merge(
792
+ {
793
+ label,
794
+ name: scope ? scope + ":" + "Marital_Status" : "Marital_Status",
795
+ options: [
796
+ "Unmarried, Living Together",
797
+ "Unmarried, Do Not Live Together",
798
+ "Married, Living Together",
799
+ "Separated",
800
+ "Divorced",
801
+ "Other",
802
+ ],
803
+ },
804
+ updates
805
+ )
806
+ )
807
+ };
543
808
 
544
- const maritalStatus = (scope) => sbsSelect({
545
- name: scope ? scope + ':' + 'Marital_Status' : 'Marital_Status',
546
- label: 'Marital Status:',
547
- options: [
548
- 'Unmarried, Living Together',
549
- 'Unmarried, Do Not Live Together',
550
- 'Married, Living Together',
551
- 'Separated',
552
- 'Divorced',
553
- 'Other'
554
- ]
555
- });
809
+ // XXX HERE
556
810
 
557
- const pendingCharges = (scope) => sbsYesNoRadio({
558
- name: scope ? scope + ':' + 'Pending_Charges' : 'Pending_Charges',
559
- label: 'Do you currently have any pending charges?'
560
- });
811
+ const pendingCharges = (scope, vertical, updates = {}) => {
812
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
813
+ const label = vertical ? updates.label : "Do you currently have any pending charges?";
814
+ return func(
815
+ merge(
816
+ {
817
+ name: scope ? scope + ":" + "Pending_Charges" : "Pending_Charges",
818
+ label,
819
+ },
820
+ updates
821
+ )
822
+ )
823
+ };
561
824
 
562
- const primaryInjury = (scope) => sbs2ColRadio({
563
- name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
564
- label: 'Primary Injury:',
565
- options: [
566
- "Anxiety",
567
- "Back or Neck Pain",
568
- "Broken Bones",
569
- "Cuts and Bruises",
570
- "Headaches",
571
- "Memory Loss",
572
- "Loss of Limb",
573
- "Not Sure or Other"
574
- ]
575
- });
825
+ const primaryInjury = (scope, vertical, updates = {}) => {
826
+ const func = vertical ? col2RadioCenter : sbs2ColRadio;
827
+ const label = vertical ? updates.label : "Primary Injury:";
828
+ return func(
829
+ merge(
830
+ {
831
+ label,
832
+ name: scope ? scope + ":" + "Primary_Injury" : "Primary_Injury",
833
+ options: [
834
+ "Anxiety",
835
+ "Back or Neck Pain",
836
+ "Broken Bones",
837
+ "Cuts and Bruises",
838
+ "Headaches",
839
+ "Memory Loss",
840
+ "Loss of Limb",
841
+ "Not Sure or Other",
842
+ ],
843
+ },
844
+ updates
845
+ )
846
+ )
847
+ };
576
848
 
577
- const priorAlcoholOffenses = (scope) => sbsYesNoRadio({
578
- name: scope ? scope + ':' + 'Prior_Alcohol_Offenses' : 'Prior_Alcohol_Offenses',
579
- label: 'Any Prior Alcohol Related Offenses?'
580
- });
849
+ const priorAlcoholOffenses = (scope, vertical, updates = {}) => {
850
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
851
+ const label = vertical ? updates.label : "Any Prior Alcohol Related Offenses?";
852
+ return func(
853
+ merge(
854
+ {
855
+ name: scope ? scope + ":" + "Prior_Alcohol_Offenses" : "Prior_Alcohol_Offenses",
856
+ label,
857
+ },
858
+ updates
859
+ )
860
+ )
861
+ };
581
862
 
582
- const policeReportFiled = (scope) => sbsYesNoRadio({
583
- name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
584
- label: 'Was a Police Report Filed?'
585
- });
863
+ const policeReportFiled = (scope, vertical, updates = {}) => {
864
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
865
+ const label = vertical ? updates.label : "Was a Police Report Filed?";
866
+ return func(
867
+ merge(
868
+ {
869
+ name: scope ? scope + ":" + "Police_Report_Filed" : "Police_Report_Filed",
870
+ label,
871
+ },
872
+ updates
873
+ )
874
+ )
875
+ };
586
876
 
587
- const roleInMatterProbate = (scope) => sbsSelect({
588
- name: scope ? scope + ':' + 'Role_In_Matter_Probate' : 'Role_In_Matter_Probate',
589
- label: "What Is Your Role in this Matter?",
590
- options: [
591
- "Preparing My Will",
592
- "Executor",
593
- "Heir",
594
- "Other"
595
- ]
596
- });
877
+ const roleInMatterProbate = (scope, vertical, updates = {}) => {
878
+ const func = vertical ? col2RadioCenter : sbsSelect;
879
+ const label = vertical ? updates.label : "What is Your Role in this Matter?";
880
+ return func(
881
+ merge(
882
+ {
883
+ label,
884
+ name: scope ? scope + ":" + "Role_In_Matter_Probate" : "Role_In_Matter_Probate",
885
+ options: ["Preparing My Will", "Executor", "Heir", "Other"],
886
+ },
887
+ updates
888
+ )
889
+ )
890
+ };
597
891
 
598
- const socialSecurityDisabilityReceivingBenefits = (scope) => sbsYesNoRadio({
599
- name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
600
- label: 'Are You Currently Receiving Social Security Disability Benefits?'
601
- });
892
+ const socialSecurityDisabilityReceivingBenefits = (scope, vertical, updates = {}) => {
893
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
894
+ const label = vertical ? updates.label : "Are You Currently Receiving Social Security Disability Benefits?";
895
+ return func(
896
+ merge(
897
+ {
898
+ name: scope
899
+ ? scope + ":" + "Social_Security_Disability_Receiving_Benefits"
900
+ : "Social_Security_Disability_Receiving_Benefits",
901
+ label,
902
+ },
903
+ updates
904
+ )
905
+ )
906
+ };
602
907
 
603
908
  const TCPAConsent = (scope) => ({
604
- $formkit: 'checkbox',
605
- label: '$meta.tcpaLanguage',
606
- name: scope ? scope + ':' + 'TCPA_Opt_In' : 'TCPA_Opt_In',
607
- 'data-tf-sensitive': 'false',
608
- validation: 'required|accepted',
909
+ $formkit: "checkbox",
910
+ label: "$meta.tcpaLanguage",
911
+ // Necessary to get links to work in the tcpa language
912
+ __raw__sectionsSchema: {
913
+ label: { attrs: { innerHTML: "$label" } },
914
+ },
915
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
916
+ "data-tf-sensitive": "false",
917
+ validation: "required|accepted",
609
918
  validationMessages: {
610
- required: 'Consent is required',
611
- accepted: 'Consent is required'
919
+ required: "Consent is required",
920
+ accepted: "Consent is required",
612
921
  },
613
922
  classes: {
614
- label: "t-text-xs t-text-slate-500 t-font-normal"
615
- }
923
+ label: "t-text-xs t-text-slate-500 t-font-normal",
924
+ },
616
925
  });
617
926
 
618
- const typeOfAlcoholTest = (scope) => sbsSelect({
619
- name: scope ? scope + ':' + 'Type_Of_Alcohol_Test' : 'Type_Of_Alcohol_Test',
620
- label: 'Type of Alcohol Test Performed?',
621
- options: [
622
- "No Test",
623
- "Refused Test",
624
- "Breath Test",
625
- "Blood Test",
626
- "Urine Test",
627
- "Don't Know"
628
- ]
629
- });
927
+ const typeOfAlcoholTest = (scope, vertical, updates = {}) => {
928
+ const func = vertical ? col2RadioCenter : sbsSelect;
929
+ const label = vertical ? updates.label : "Type of Alcohol Test Performed?";
930
+ return func(
931
+ merge(
932
+ {
933
+ label,
934
+ name: scope ? scope + ":" + "Type_Of_Alcohol_Test" : "Type_Of_Alcohol_Test",
935
+ options: ["No Test", "Refused Test", "Breath Test", "Blood Test", "Urine Test", "Don't Know"],
936
+ },
937
+ updates
938
+ )
939
+ )
940
+ };
630
941
 
631
- const typeOfAssets = (scope) => col2Checkbox({
632
- name: scope ? scope + ':' + 'Type_Of_Assets' : 'Type_Of_Assets',
633
- label: 'Type of Assets:',
634
- options: [
635
- "Business Interests",
636
- "Cash",
637
- "Life Insurance Policies",
638
- "Pensions/Retirement",
639
- "Personal Possessions",
640
- "Property",
641
- "Stock/Bonds"
642
- ]
643
- });
942
+ const typeOfAssets = (scope, vertical, updates = {}) => {
943
+ const func = vertical ? verticalCol2Checkbox : col2Checkbox;
944
+ const label = vertical ? updates.label : "Type of Assets:";
945
+ return func(
946
+ merge(
947
+ {
948
+ label,
949
+ name: scope ? scope + ":" + "Type_Of_Assets" : "Type_Of_Assets",
950
+ options: [
951
+ "Business Interests",
952
+ "Cash",
953
+ "Life Insurance Policies",
954
+ "Pensions/Retirement",
955
+ "Personal Possessions",
956
+ "Property",
957
+ "Stock/Bonds",
958
+ ],
959
+ },
960
+ updates
961
+ )
962
+ )
963
+ };
644
964
 
645
- const valueOfAssets = (scope) => sbsSelect({
646
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
647
- label: 'Value of Your Assets?',
648
- options: [
649
- "Less than 50K",
650
- "50K to 100K",
651
- "100K to 250K",
652
- "250K to 500K",
653
- "500K to 1M",
654
- "More than 1M"
655
- ]
656
- });
965
+ const valueOfAssets = (scope, vertical, updates = {}) => {
966
+ const func = vertical ? col2RadioCenter : sbsSelect;
967
+ const label = vertical ? updates.label : "Value of Your Assets?";
968
+ return func(
969
+ merge(
970
+ {
971
+ label,
972
+ name: scope ? scope + ":" + "Value_Of_Assets" : "Value_Of_Assets",
973
+ options: ["Less than 50K", "50K to 100K", "100K to 250K", "250K to 500K", "500K to 1M", "More than 1M"],
974
+ },
975
+ updates
976
+ )
977
+ )
978
+ };
657
979
 
658
- // ------ Question Groups
980
+ // ------ Question Groups - TODO: move these go separate file groups.js
659
981
 
660
982
  // NOTE: name must be unique within a form!
661
983
  const group = (name, updates) => {
662
- return merge({
663
- $cmp: 'FormKit',
664
- props: {
665
- type: 'group',
666
- key: name,
667
- id: name,
668
- name: name
669
- }
670
- }, updates)
984
+ return merge(
985
+ {
986
+ $cmp: "FormKit",
987
+ props: {
988
+ type: "group",
989
+ key: name,
990
+ id: name,
991
+ name: name,
992
+ },
993
+ },
994
+ updates
995
+ )
671
996
  };
672
997
 
673
- const AdoptionQuestions = () => group(
674
- 'AdoptionQuestions',
675
- {
676
- if: '$get(Type_Of_Legal_Problem).value == "Adoption"',
998
+ const AdoptionQuestions = (condition, scope) =>
999
+ group("AdoptionQuestions", {
1000
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Adoption"',
677
1001
  children: [
678
- haveAttorney(),
679
- maritalStatus(),
680
- haveChildren(),
681
- degreeOfInterest(),
682
- lawyerPaymentMethod()
683
- ]
684
- }
685
- );
1002
+ haveAttorney(scope),
1003
+ maritalStatus(scope),
1004
+ haveChildren(scope),
1005
+ degreeOfInterest(scope),
1006
+ lawyerPaymentMethod(scope),
1007
+ ],
1008
+ });
686
1009
 
687
- const AutoAndCarAccidentsQuestions = (condition, scope) => group(
688
- 'AutoAndCarAccidentsQuestions',
689
- {
690
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
1010
+ const AutoAndCarAccidentsQuestions = (condition, scope) =>
1011
+ group("AutoAndCarAccidentsQuestions", {
1012
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
691
1013
  children: [
692
1014
  haveAttorney(scope),
693
1015
  incidentDate(scope),
694
1016
  atFault(scope),
695
1017
  primaryInjury(scope),
696
1018
  doctorTreatment(scope),
697
- policeReportFiled(scope)
698
- ]
699
- }
700
- );
1019
+ policeReportFiled(scope),
1020
+ ],
1021
+ });
701
1022
 
702
- const ChildCustodyAndSupportQuestions = (condition, scope) => group(
703
- 'ChildCustodyAndSupportQuestions',
704
- {
705
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody and Support"'),
1023
+ const ChildCustodyAndSupportQuestions = (condition, scope) =>
1024
+ group("ChildCustodyAndSupportQuestions", {
1025
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody and Support"',
706
1026
  children: [
707
1027
  haveAttorney(scope),
708
1028
  childRelationship(scope),
709
1029
  childHome(scope),
710
1030
  childPrimaryCaregiver(scope),
711
1031
  degreeOfInterest(scope),
712
- lawyerPaymentMethod(scope)
713
- ]
714
- }
715
- );
1032
+ lawyerPaymentMethod(scope),
1033
+ ],
1034
+ });
716
1035
 
717
- const ChildCustodyQuestions = (condition, scope) => group(
718
- 'ChildCustodyQuestions',
719
- {
720
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"'),
1036
+ const ChildCustodyQuestions = (condition, scope) =>
1037
+ group("ChildCustodyQuestions", {
1038
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"',
721
1039
  children: [
722
1040
  haveAttorney(scope),
723
1041
  childRelationship(scope),
724
1042
  childHome(scope),
725
1043
  childPrimaryCaregiver(scope),
726
1044
  degreeOfInterest(scope),
727
- lawyerPaymentMethod(scope)
728
- ]
729
- }
730
- );
1045
+ lawyerPaymentMethod(scope),
1046
+ ],
1047
+ });
731
1048
 
732
- const ChildSupportQuestions = () => group(
733
- 'ChildSupportQuestions',
734
- {
735
- if: '$get(Type_Of_Legal_Problem).value == "Child Support"',
1049
+ const ChildSupportQuestions = (condition, scope) =>
1050
+ group("ChildSupportQuestions", {
1051
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Support"',
736
1052
  children: [
737
- haveAttorney(),
738
- childRelationship(),
739
- childHome(),
740
- childPrimaryCaregiver(),
741
- degreeOfInterest(),
742
- lawyerPaymentMethod()
743
- ]
744
- }
745
- );
1053
+ haveAttorney(scope),
1054
+ childRelationship(scope),
1055
+ childHome(scope),
1056
+ childPrimaryCaregiver(scope),
1057
+ degreeOfInterest(scope),
1058
+ lawyerPaymentMethod(scope),
1059
+ ],
1060
+ });
746
1061
 
747
- const DivorceQuestions = (condition, scope) => group(
748
- 'DivorceQuestions',
749
- {
750
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"'),
1062
+ const DivorceQuestions = (condition, scope) =>
1063
+ group("DivorceQuestions", {
1064
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"',
751
1065
  children: [
752
1066
  haveAttorney(scope),
753
1067
  maritalStatus(scope),
754
1068
  haveChildren(scope),
755
1069
  degreeOfInterest(scope),
756
- lawyerPaymentMethod(scope)
757
- ]
758
- }
759
- );
1070
+ lawyerPaymentMethod(scope),
1071
+ ],
1072
+ });
760
1073
 
761
- const DUIAndDWIQuestions = (condition, scope) => group(
762
- 'DUIAndDWIQuestions',
763
- {
764
- if: (condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"'),
1074
+ const DUIAndDWIQuestions = (condition, scope) =>
1075
+ group("DUIAndDWIQuestions", {
1076
+ if: condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"',
765
1077
  children: [
766
1078
  haveAttorney(scope),
767
1079
  incidentDate(scope),
@@ -769,117 +1081,98 @@ const DUIAndDWIQuestions = (condition, scope) => group(
769
1081
  typeOfAlcoholTest(scope),
770
1082
  bloodContentAlcoholTest(scope),
771
1083
  pendingCharges(scope),
772
- degreeOfInterestHelp(scope)
773
- ]
774
- }
775
- );
1084
+ degreeOfInterestHelp(scope),
1085
+ ],
1086
+ });
776
1087
 
777
- const FamilyIssuesQuestions = () => group(
778
- 'FamilyIssuesQuestions',
779
- {
780
- if: '$get(Type_Of_Legal_Problem).value == "Family Issues"',
1088
+ const FamilyIssuesQuestions = (condition, scope) =>
1089
+ group("FamilyIssuesQuestions", {
1090
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Family Issues"',
781
1091
  children: [
782
- haveAttorney(),
783
- maritalStatus(),
784
- haveChildren(),
785
- degreeOfInterest(),
786
- lawyerPaymentMethod()
787
- ]
788
- }
789
- );
1092
+ haveAttorney(scope),
1093
+ maritalStatus(scope),
1094
+ haveChildren(scope),
1095
+ degreeOfInterest(scope),
1096
+ lawyerPaymentMethod(scope),
1097
+ ],
1098
+ });
790
1099
 
791
- const GuardianshipQuestions = () => group(
792
- 'GuardianshipQuestions',
793
- {
794
- if: '$get(Type_Of_Legal_Problem).value == "Guardianship"',
1100
+ const GuardianshipQuestions = (condition, scope) =>
1101
+ group("GuardianshipQuestions", {
1102
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Guardianship"',
795
1103
  children: [
796
- haveAttorney(),
797
- maritalStatus(),
798
- haveChildren(),
799
- degreeOfInterest(),
800
- lawyerPaymentMethod()
801
- ]
802
- }
803
- );
1104
+ haveAttorney(scope),
1105
+ maritalStatus(scope),
1106
+ haveChildren(scope),
1107
+ degreeOfInterest(scope),
1108
+ lawyerPaymentMethod(scope),
1109
+ ],
1110
+ });
804
1111
 
805
- const PersonalInjuryQuestions = (condition, scope) => group(
806
- 'PersonalInjuryQuestions',
807
- {
808
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
1112
+ const PersonalInjuryQuestions = (condition, scope) =>
1113
+ group("PersonalInjuryQuestions", {
1114
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"',
809
1115
  children: [
810
1116
  haveAttorney(scope),
811
1117
  incidentDate(scope),
812
1118
  claimStatus(scope),
813
1119
  atFault(scope),
814
1120
  primaryInjury(scope),
815
- doctorTreatment(scope)
816
- ]
817
- }
818
- );
1121
+ doctorTreatment(scope),
1122
+ ],
1123
+ });
819
1124
 
820
- const PowerofAttorneyQuestions = (condition, scope) => group(
821
- 'PowerofAttorneyQuestions',
822
- {
823
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"'),
824
- children: [
825
- haveAttorney(scope),
826
- degreeOfInterestHelp(scope)
827
- ]
828
- }
829
- );
1125
+ const PowerofAttorneyQuestions = (condition, scope) =>
1126
+ group("PowerofAttorneyQuestions", {
1127
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"',
1128
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1129
+ });
830
1130
 
831
- const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) => group(
832
- 'SocialSecurityDisabilityAndInsuranceQuestions',
833
- {
834
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"'),
1131
+ const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) =>
1132
+ group("SocialSecurityDisabilityAndInsuranceQuestions", {
1133
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"',
835
1134
  children: [
836
1135
  haveAttorney(scope),
837
1136
  applicantAge(scope),
838
1137
  disabilityConditionStopWork(scope),
839
1138
  disabilityWorkHistory(scope),
840
1139
  socialSecurityDisabilityReceivingBenefits(scope),
841
- doctorTreatment(scope)
842
- ]
843
- }
844
- );
1140
+ doctorTreatment(scope),
1141
+ ],
1142
+ });
845
1143
 
846
- const WillsAndTrustsQuestions = (condition, scope) => group(
847
- 'WillsAndTrustsQuestions',
848
- {
849
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"'),
1144
+ const WillsAndTrustsQuestions = (condition, scope) =>
1145
+ group("WillsAndTrustsQuestions", {
1146
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"',
850
1147
  children: [
851
1148
  haveAttorney(scope),
852
1149
  valueOfAssets(scope),
853
1150
  typeOfAssets(scope),
854
1151
  roleInMatterProbate(scope),
855
1152
  estateLegalServicesNeeded(scope),
856
- degreeOfInterestHelp(scope)
857
- ]
858
- }
859
- );
1153
+ degreeOfInterestHelp(scope),
1154
+ ],
1155
+ });
860
1156
 
861
- const NotSureOrOtherQuestions = () => group(
862
- 'NotSureOrOtherQuestions',
863
- {
864
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
865
- children: [
866
- haveAttorney(),
867
- degreeOfInterestHelp()
868
- ]
869
- }
870
- );
1157
+ const NotSureOrOtherQuestions = (condition, scope) =>
1158
+ group("NotSureOrOtherQuestions", {
1159
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
1160
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1161
+ });
871
1162
 
872
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
873
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
1163
+ const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1164
+ const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
874
1165
 
875
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
1166
+ const isInput = (n) => {
1167
+ return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
1168
+ };
876
1169
 
877
1170
  const findLastInput = (n) => {
878
1171
  if (isInput(n)) {
879
1172
  return n
880
1173
  }
881
1174
  for (var i = n.children.length - 1; i >= 0; i--) {
882
- if (typeof n.children === 'string') {
1175
+ if (typeof n.children === "string") {
883
1176
  continue
884
1177
  }
885
1178
  const child = n.children[i];
@@ -895,126 +1188,138 @@ const findLastInput = (n) => {
895
1188
  };
896
1189
 
897
1190
  const secureIconDefault = {
898
- $el: 'div',
899
- if: '$activeStep === $lastStep()',
1191
+ $el: "div",
1192
+ if: "$activeStep === $lastStep()",
900
1193
  attrs: {
901
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
1194
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
902
1195
  },
903
1196
  children: [
904
1197
  {
905
- $el: 'img',
1198
+ $el: "img",
906
1199
  attrs: {
907
- loading: 'lazy',
908
- alt: '',
1200
+ loading: "lazy",
1201
+ alt: "",
909
1202
  style: {
910
- border: 0
1203
+ border: 0,
911
1204
  },
912
- width: '25',
913
- height: '25',
914
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
915
- }
1205
+ width: "25",
1206
+ height: "25",
1207
+ src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
1208
+ },
916
1209
  },
917
1210
  {
918
- $el: 'span',
919
- children: 'Secure & Encrypted',
1211
+ $el: "span",
1212
+ children: "Secure & Encrypted",
920
1213
  attrs: {
921
- class: 't-pl-2 t-pt-1 t-font-medium'
922
- }
923
- }
924
- ]
1214
+ class: "t-pl-2 t-pt-1 t-font-medium",
1215
+ },
1216
+ },
1217
+ ],
925
1218
  };
926
1219
 
927
1220
  function secureIcon(updates) {
928
- return merge(
929
- secureIconDefault,
930
- updates
931
- )
1221
+ return merge(secureIconDefault, updates)
932
1222
  }
933
1223
 
934
1224
  function questionsStepHeadline(updates) {
935
1225
  return {
936
- $el: 'h3',
937
- children: updates.headline || 'Tell Us About Your Situation',
1226
+ $el: "h3",
1227
+ children: updates.headline || "Tell Us About Your Situation",
938
1228
  attrs: {
939
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
940
- }
1229
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1",
1230
+ },
941
1231
  }
942
1232
  }
943
1233
 
944
1234
  function crossSellQuestionsStepHeadline(updates) {
945
1235
  return {
946
- $el: 'h3',
947
- children: updates.headline || 'Tell Us About Your Situation',
1236
+ $el: "h3",
1237
+ children: updates.headline || "Tell Us About Your Situation",
948
1238
  attrs: {
949
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
950
- }
1239
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1",
1240
+ },
951
1241
  }
952
1242
  }
953
1243
 
954
1244
  function crossSellQuestionsStepSubHeadline(updates) {
955
1245
  return {
956
- $el: 'h5',
957
- children: updates.subheadline || 'Tell us about your situation:',
1246
+ $el: "h5",
1247
+ children: updates.subheadline || "Tell us about your situation:",
958
1248
  attrs: {
959
- class: 't-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3'
960
- }
1249
+ class: "t-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3",
1250
+ },
961
1251
  }
962
1252
  }
963
1253
 
964
1254
  function commentsStepHeadline(updates) {
965
1255
  return {
966
- $el: 'h3',
967
- children: updates.headline || 'Additional Details',
1256
+ $el: "h3",
1257
+ children: updates.headline || "Additional Details",
968
1258
  attrs: {
969
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
970
- }
1259
+ class:
1260
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1261
+ " " +
1262
+ (updates.headlineClass || ""),
1263
+ },
971
1264
  }
972
1265
  }
973
1266
 
974
1267
  function commentsStepHeadlineLegal(updates) {
975
1268
  return commentsStepHeadline({
976
- headline: updates.headline || 'Additional Case Details',
977
- headlineClass: updates.headlineClass
1269
+ headline: updates.headline || "Additional Case Details",
1270
+ headlineClass: updates.headlineClass,
978
1271
  })
979
1272
  }
980
1273
 
981
1274
  function firstAndLastStepHeadline(updates) {
982
1275
  return {
983
- $el: 'h3',
984
- children: updates.headline || 'Please Provide a Contact Name',
1276
+ $el: "h3",
1277
+ children: updates.headline || "Please Provide a Contact Name",
985
1278
  attrs: {
986
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
987
- }
1279
+ class:
1280
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1281
+ " " +
1282
+ (updates.headlineClass || ""),
1283
+ },
988
1284
  }
989
1285
  }
990
1286
 
991
1287
  function legalCrossSellsStepHeadline(updates) {
992
1288
  return {
993
- $el: 'h3',
994
- children: updates.headline || 'Do any of the following situations apply?',
1289
+ $el: "h3",
1290
+ children: updates.headline || "Do any of the following situations apply?",
995
1291
  attrs: {
996
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
997
- }
1292
+ class:
1293
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1294
+ " " +
1295
+ (updates.headlineClass || ""),
1296
+ },
998
1297
  }
999
1298
  }
1000
1299
 
1001
1300
  function contactStepHeadline(updates) {
1002
1301
  return {
1003
- $el: 'h3',
1302
+ $el: "h3",
1004
1303
  children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1005
1304
  attrs: {
1006
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1007
- }
1305
+ class:
1306
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1" +
1307
+ " " +
1308
+ (updates.headlineClass || ""),
1309
+ },
1008
1310
  }
1009
1311
  }
1010
1312
 
1011
1313
  function contactStepSubHeadline(updates) {
1012
1314
  return {
1013
- $el: 'h5',
1315
+ $el: "h5",
1014
1316
  children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1015
1317
  attrs: {
1016
- class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
1017
- }
1318
+ class:
1319
+ "t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3" +
1320
+ " " +
1321
+ (updates.subheadlineClass || ""),
1322
+ },
1018
1323
  }
1019
1324
  }
1020
1325
 
@@ -1036,19 +1341,19 @@ const TRUSTED_FORM_JS = `(function() {
1036
1341
 
1037
1342
  function trustedFormScript() {
1038
1343
  return {
1039
- $el: 'script',
1040
- if: '$activeStep === $lastStep()',
1041
- children: TRUSTED_FORM_JS
1344
+ $el: "script",
1345
+ if: "$activeStep === $lastStep()",
1346
+ children: TRUSTED_FORM_JS,
1042
1347
  }
1043
1348
  }
1044
1349
 
1045
1350
  const stepDefaults = (step, stepKey) => ({
1046
- $el: 'section',
1351
+ $el: "section",
1047
1352
  if: '$stepEnabled("' + step + '")',
1048
1353
  attrs: {
1049
1354
  hidden: '$activeStep !== "' + step + '"',
1050
- key: stepKey ? stepKey : step
1051
- }
1355
+ key: stepKey ? stepKey : step,
1356
+ },
1052
1357
  });
1053
1358
 
1054
1359
  function step(name, inputs, updates = {}) {
@@ -1071,27 +1376,24 @@ function step(name, inputs, updates = {}) {
1071
1376
  }
1072
1377
  }
1073
1378
 
1074
- return merge(
1075
- stepDefaults(name, stepKey),
1076
- {
1077
- children: [
1078
- {
1079
- $formkit: 'group',
1080
- id: name,
1081
- name: name,
1082
- nextStepMap: nextStepMap,
1083
- triggerRedirectMap: triggerRedirectMap,
1084
- autoFocus: autoFocus,
1085
- children: inputs
1086
- }
1087
- ]
1088
- }
1089
- )
1379
+ return merge(stepDefaults(name, stepKey), {
1380
+ children: [
1381
+ {
1382
+ $formkit: "group",
1383
+ id: name,
1384
+ name: name,
1385
+ nextStepMap: nextStepMap,
1386
+ triggerRedirectMap: triggerRedirectMap,
1387
+ autoFocus: autoFocus,
1388
+ children: inputs,
1389
+ },
1390
+ ],
1391
+ })
1090
1392
  }
1091
1393
 
1092
1394
  function contactInfo(updates = {}) {
1093
1395
  return step(
1094
- 'contactInfo',
1396
+ "contactInfo",
1095
1397
  [
1096
1398
  contactStepHeadline(updates),
1097
1399
  contactStepSubHeadline(updates),
@@ -1099,7 +1401,7 @@ function contactInfo(updates = {}) {
1099
1401
  email(updates.scope),
1100
1402
  phone(updates.scope),
1101
1403
  TCPAConsent(updates.scope),
1102
- secureIcon()
1404
+ secureIcon(),
1103
1405
  ],
1104
1406
  { nextOnEnter: false }
1105
1407
  )
@@ -1107,50 +1409,39 @@ function contactInfo(updates = {}) {
1107
1409
 
1108
1410
  function firstAndLastV2(updates = {}) {
1109
1411
  return step(
1110
- 'firstAndLast',
1111
- [
1112
- firstAndLastStepHeadline(updates),
1113
- firstName(),
1114
- lastName()
1115
- ],
1412
+ "firstAndLast",
1413
+ [firstAndLastStepHeadline(updates), firstName(updates.scope), lastName(updates.scope)],
1116
1414
  updates
1117
1415
  )
1118
1416
  }
1119
1417
 
1120
1418
  function childAndFamilyTOLPAndZip(updates = {}) {
1121
- return step(
1122
- 'childAndFamilyTOLPAndZip',
1123
- [
1124
- childAndFamilyTOLP(),
1125
- zipcode()
1126
- ],
1127
- updates
1128
- )
1419
+ return step("childAndFamilyTOLPAndZip", [childAndFamilyTOLP(updates.scope), zipcode(updates.scope)], updates)
1129
1420
  }
1130
1421
 
1131
1422
  function commentsWithBankruptcy(updates = {}) {
1132
1423
  return step(
1133
- 'commentsWithBankruptcy',
1424
+ "commentsWithBankruptcy",
1134
1425
  [
1135
1426
  commentsStepHeadlineLegal(updates),
1136
- comments({
1137
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1427
+ comments(updates.scope, false, {
1428
+ label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1138
1429
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1139
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1140
- }, updates.scope),
1430
+ inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1431
+ }),
1141
1432
  // TODO: needs scope support
1142
1433
  bankruptcyCrossSell(),
1143
1434
  {
1144
- $el: 'div',
1145
- if: '$get(CrossSell_Bankruptcy).value == true',
1435
+ $el: "div",
1436
+ if: "$get(CrossSell_Bankruptcy).value == true",
1146
1437
  children: [
1147
- comments({
1148
- label: 'Bankruptcy or debt details:',
1149
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1150
- inputClass: '!t-h-16'
1151
- }, 'CrossSell:Bankruptcy')
1438
+ comments("CrossSell:Bankruptcy", false, {
1439
+ label: "Bankruptcy or debt details:",
1440
+ placeholder: "Please describe your bankrtupcy or debt situation in a few words...",
1441
+ inputClass: "!t-h-16",
1442
+ }),
1152
1443
  ],
1153
- }
1444
+ },
1154
1445
  ],
1155
1446
  { nextOnEnter: false }
1156
1447
  )
@@ -1158,19 +1449,20 @@ function commentsWithBankruptcy(updates = {}) {
1158
1449
 
1159
1450
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1160
1451
  return step(
1161
- 'autoAndCarAccidentCrossSellQuestions',
1452
+ "autoAndCarAccidentCrossSellQuestions",
1162
1453
  [
1163
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1164
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1165
- AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1166
- comments(
1167
- {
1168
- label: 'Accident Description:',
1169
- placeholder: 'Please describe your accident in a few words...',
1170
- inputClass: '!t-h-16'
1171
- },
1172
- 'CrossSell:Auto_and_Car_Accidents'
1173
- )
1454
+ crossSellQuestionsStepHeadline({
1455
+ headline: "You May Be Entitled To Compensation",
1456
+ }),
1457
+ crossSellQuestionsStepSubHeadline({
1458
+ subheadline: "Tell us about your accident:",
1459
+ }),
1460
+ AutoAndCarAccidentsQuestions("true", "CrossSell:Auto_and_Car_Accidents"),
1461
+ comments("CrossSell:Auto_and_Car_Accidents", false, {
1462
+ label: "Accident Description:",
1463
+ placeholder: "Please describe your accident in a few words...",
1464
+ inputClass: "!t-h-16",
1465
+ }),
1174
1466
  ],
1175
1467
  updates
1176
1468
  )
@@ -1178,18 +1470,15 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1178
1470
 
1179
1471
  function duiAndDWICrossSellQuestions(updates = {}) {
1180
1472
  return step(
1181
- 'duiAndDWICrossSellQuestions',
1473
+ "duiAndDWICrossSellQuestions",
1182
1474
  [
1183
- crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1184
- DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1185
- comments(
1186
- {
1187
- label: 'Incident Description:',
1188
- placeholder: 'Please describe your incident in a few words...',
1189
- inputClass: '!t-h-16'
1190
- },
1191
- 'CrossSell:DUI_and_DWI'
1192
- )
1475
+ crossSellQuestionsStepHeadline({ headline: "About Your DUI/DWI" }),
1476
+ DUIAndDWIQuestions("true", "CrossSell:DUI_and_DWI"),
1477
+ comments("CrossSell:DUI_and_DWI", false, {
1478
+ label: "Incident Description:",
1479
+ placeholder: "Please describe your incident in a few words...",
1480
+ inputClass: "!t-h-16",
1481
+ }),
1193
1482
  ],
1194
1483
  updates
1195
1484
  )
@@ -1197,19 +1486,20 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1197
1486
 
1198
1487
  function ssdiCrossSellQuestions(updates = {}) {
1199
1488
  return step(
1200
- 'ssdiCrossSellQuestions',
1489
+ "ssdiCrossSellQuestions",
1201
1490
  [
1202
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1203
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1204
- SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1205
- comments(
1206
- {
1207
- label: 'Description:',
1208
- placeholder: 'Please describe your situation in a few words...',
1209
- inputClass: '!t-h-16'
1210
- },
1211
- 'CrossSell:Social_Security_Disability_and_Insurance'
1212
- )
1491
+ crossSellQuestionsStepHeadline({
1492
+ headline: "You May Be Entitled To Benefits",
1493
+ }),
1494
+ crossSellQuestionsStepSubHeadline({
1495
+ subheadline: "Tell us about your disability:",
1496
+ }),
1497
+ SocialSecurityDisabilityAndInsuranceQuestions("true", "CrossSell:Social_Security_Disability_and_Insurance"),
1498
+ comments("CrossSell:Social_Security_Disability_and_Insurance", false, {
1499
+ label: "Description:",
1500
+ placeholder: "Please describe your situation in a few words...",
1501
+ inputClass: "!t-h-16",
1502
+ }),
1213
1503
  ],
1214
1504
  updates
1215
1505
  )
@@ -1217,19 +1507,20 @@ function ssdiCrossSellQuestions(updates = {}) {
1217
1507
 
1218
1508
  function personalInjuryCrossSellQuestions(updates = {}) {
1219
1509
  return step(
1220
- 'personalInjuryCrossSellQuestions',
1510
+ "personalInjuryCrossSellQuestions",
1221
1511
  [
1222
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1223
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1224
- PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1225
- comments(
1226
- {
1227
- label: 'Injury Description:',
1228
- placeholder: 'Please describe your injury in a few words...',
1229
- inputClass: '!t-h-16'
1230
- },
1231
- 'CrossSell:Personal_Injury'
1232
- )
1512
+ crossSellQuestionsStepHeadline({
1513
+ headline: "You May Be Entitled To Compensation",
1514
+ }),
1515
+ crossSellQuestionsStepSubHeadline({
1516
+ subheadline: "Tell us about your injury:",
1517
+ }),
1518
+ PersonalInjuryQuestions("true", "CrossSell:Personal_Injury"),
1519
+ comments("CrossSell:Personal_Injury", false, {
1520
+ label: "Injury Description:",
1521
+ placeholder: "Please describe your injury in a few words...",
1522
+ inputClass: "!t-h-16",
1523
+ }),
1233
1524
  ],
1234
1525
  updates
1235
1526
  )
@@ -1237,18 +1528,17 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1237
1528
 
1238
1529
  function powerOfAttorneyCrossSellQuestions(updates = {}) {
1239
1530
  return step(
1240
- 'powerOfAttorneyCrossSellQuestions',
1531
+ "powerOfAttorneyCrossSellQuestions",
1241
1532
  [
1242
- crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1243
- PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1244
- comments(
1245
- {
1246
- label: 'Description:',
1247
- placeholder: 'Please describe your situation in a few words...',
1248
- inputClass: '!t-h-16'
1249
- },
1250
- 'CrossSell:Power_of_Attorney'
1251
- )
1533
+ crossSellQuestionsStepHeadline({
1534
+ headline: "Power of Attorney Information",
1535
+ }),
1536
+ PowerofAttorneyQuestions("true", "CrossSell:Power_of_Attorney"),
1537
+ comments("CrossSell:Power_of_Attorney", false, {
1538
+ label: "Description:",
1539
+ placeholder: "Please describe your situation in a few words...",
1540
+ inputClass: "!t-h-16",
1541
+ }),
1252
1542
  ],
1253
1543
  updates
1254
1544
  )
@@ -1256,18 +1546,15 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1256
1546
 
1257
1547
  function willsAndTrustsCrossSellQuestions(updates = {}) {
1258
1548
  return step(
1259
- 'willsAndTrustsCrossSellQuestions',
1549
+ "willsAndTrustsCrossSellQuestions",
1260
1550
  [
1261
- crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1262
- WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1263
- comments(
1264
- {
1265
- label: 'Description:',
1266
- placeholder: 'Please describe your situation in a few words...',
1267
- inputClass: '!t-h-16'
1268
- },
1269
- 'CrossSell:Wills_and_Trusts'
1270
- )
1551
+ crossSellQuestionsStepHeadline({ headline: "Will or Trust Information" }),
1552
+ WillsAndTrustsQuestions("true", "CrossSell:Wills_and_Trusts"),
1553
+ comments("CrossSell:Wills_and_Trusts", false, {
1554
+ label: "Description:",
1555
+ placeholder: "Please describe your situation in a few words...",
1556
+ inputClass: "!t-h-16",
1557
+ }),
1271
1558
  ],
1272
1559
  updates
1273
1560
  )
@@ -1275,7 +1562,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1275
1562
 
1276
1563
  function childAndFamilyTOLPQuestions(updates = {}) {
1277
1564
  return step(
1278
- 'TOLPQuestions',
1565
+ "TOLPQuestions",
1279
1566
  [
1280
1567
  questionsStepHeadline(updates),
1281
1568
  AdoptionQuestions(),
@@ -1285,7 +1572,7 @@ function childAndFamilyTOLPQuestions(updates = {}) {
1285
1572
  FamilyIssuesQuestions(),
1286
1573
  GuardianshipQuestions(),
1287
1574
  DivorceQuestions(),
1288
- NotSureOrOtherQuestions()
1575
+ NotSureOrOtherQuestions(),
1289
1576
  ],
1290
1577
  updates
1291
1578
  )
@@ -1293,123 +1580,116 @@ function childAndFamilyTOLPQuestions(updates = {}) {
1293
1580
 
1294
1581
  function legalCrossSells(updates = {}) {
1295
1582
  updates.nextOnInput = false;
1296
- updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1297
- return step(
1298
- 'legalCrossSells',
1299
- [
1300
- legalCrossSellsStepHeadline(updates),
1301
- legalCrossSells$1(),
1302
- ],
1303
- updates
1304
- )
1583
+ updates.stepKey = "$get(Type_Of_Legal_Problem).value";
1584
+ return step("legalCrossSells", [legalCrossSellsStepHeadline(updates), legalCrossSells$1()], updates)
1305
1585
  }
1306
1586
 
1307
1587
  const formNavigation = (updates = {}) => ({
1308
- $el: 'div',
1588
+ $el: "div",
1309
1589
  attrs: {
1310
- class: 'step-nav'
1590
+ class: "step-nav",
1311
1591
  },
1312
1592
  children: [
1313
1593
  {
1314
- $formkit: 'button',
1315
- name: 'back_button',
1316
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1317
- children: 'Back',
1594
+ $formkit: "button",
1595
+ name: "back_button",
1596
+ onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1597
+ children: "Back",
1318
1598
  style: {
1319
- if: '$activeStep === $firstStep()',
1320
- then: 'visibility: hidden;'
1321
- }
1599
+ if: "$activeStep === $firstStep()",
1600
+ then: "visibility: hidden;",
1601
+ },
1322
1602
  },
1323
1603
  {
1324
- $formkit: 'button',
1325
- name: 'next_button',
1326
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1604
+ $formkit: "button",
1605
+ name: "next_button",
1606
+ onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
1327
1607
  children: {
1328
- if: '$activeStep === $firstStep()',
1329
- then: 'Start',
1330
- else: 'Next'
1608
+ if: "$activeStep === $firstStep()",
1609
+ then: "Start",
1610
+ else: "Next",
1331
1611
  },
1332
1612
  outerClass: {
1333
- if: '$activeStep === $lastStep()',
1334
- then: 't-hidden',
1335
- else: ''
1613
+ if: "$activeStep === $lastStep()",
1614
+ then: "t-hidden",
1615
+ else: "",
1336
1616
  },
1337
1617
  style: {
1338
- if: '$activeStep === $lastStep()',
1339
- then: 'display: none;'
1340
- }
1618
+ if: "$activeStep === $lastStep()",
1619
+ then: "display: none;",
1620
+ },
1341
1621
  },
1342
1622
  {
1343
- $formkit: 'submit',
1344
- name: 'submit_button',
1345
- label: updates.submitLabel || 'Submit',
1346
- if: '$activeStep === $lastStep()',
1623
+ $formkit: "submit",
1624
+ name: "submit_button",
1625
+ label: updates.submitLabel || "Submit",
1626
+ if: "$activeStep === $lastStep()",
1347
1627
  style: {
1348
- if: '$activeStep !== $lastStep()',
1349
- then: 'display: none;'
1350
- }
1351
- }
1352
- ]
1628
+ if: "$activeStep !== $lastStep()",
1629
+ then: "display: none;",
1630
+ },
1631
+ },
1632
+ ],
1353
1633
  });
1354
1634
 
1355
1635
  const formDetails = () => ({
1356
- $el: 'pre',
1636
+ $el: "pre",
1357
1637
  if: '$urlParam("fdbg", "") == 1',
1358
1638
  children: [
1359
1639
  {
1360
- $el: 'pre',
1361
- children: '$stringify( $get(form).value )',
1640
+ $el: "pre",
1641
+ children: "$stringify( $get(form).value )",
1362
1642
  attrs: {
1363
- class: 't-text-xs',
1364
- style: 'overflow: scroll'
1365
- }
1643
+ class: "t-text-xs",
1644
+ style: "overflow: scroll",
1645
+ },
1366
1646
  },
1367
1647
  {
1368
- $el: 'pre',
1369
- children: ['activeStep: ', '$activeStep'],
1648
+ $el: "pre",
1649
+ children: ["activeStep: ", "$activeStep"],
1370
1650
  attrs: {
1371
- class: 't-text-xs',
1372
- style: 'overflow: scroll'
1373
- }
1651
+ class: "t-text-xs",
1652
+ style: "overflow: scroll",
1653
+ },
1374
1654
  },
1375
1655
  {
1376
- $el: 'pre',
1377
- children: ['stepHistory: ', '$stepHistory'],
1656
+ $el: "pre",
1657
+ children: ["stepHistory: ", "$stepHistory"],
1378
1658
  attrs: {
1379
- class: 't-text-xs',
1380
- style: 'overflow: scroll'
1381
- }
1659
+ class: "t-text-xs",
1660
+ style: "overflow: scroll",
1661
+ },
1382
1662
  },
1383
1663
  {
1384
- $el: 'pre',
1385
- children: ['stepQueue: ', '$stepQueue'],
1664
+ $el: "pre",
1665
+ children: ["stepQueue: ", "$stepQueue"],
1386
1666
  attrs: {
1387
- class: 't-text-xs',
1388
- style: 'overflow: scroll'
1389
- }
1667
+ class: "t-text-xs",
1668
+ style: "overflow: scroll",
1669
+ },
1390
1670
  },
1391
1671
  {
1392
- $el: 'pre',
1393
- children: ['steps: ', '$stepKeys()'],
1672
+ $el: "pre",
1673
+ children: ["steps: ", "$stepKeys()"],
1394
1674
  attrs: {
1395
- class: 't-text-xs',
1396
- style: 'overflow: scroll'
1397
- }
1398
- }
1399
- ]
1675
+ class: "t-text-xs",
1676
+ style: "overflow: scroll",
1677
+ },
1678
+ },
1679
+ ],
1400
1680
  });
1401
1681
 
1402
1682
  const formPropDefaults = {
1403
- type: 'form',
1404
- id: 'form',
1405
- config: { validationVisibility: 'submit' },
1683
+ type: "form",
1684
+ id: "form",
1685
+ config: { validationVisibility: "submit" },
1406
1686
  onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1407
- plugins: '$plugins',
1687
+ plugins: "$plugins",
1408
1688
  actions: false,
1409
- anchorElement: 'form-anchor',
1689
+ anchorElement: "form-anchor",
1410
1690
  useLocalStorage: true,
1411
1691
  prepop: {
1412
- fromURL: true
1692
+ fromURL: true,
1413
1693
  },
1414
1694
  errorCodes: {
1415
1695
  403: { message: "An Error Occurred", abort: false },
@@ -1417,13 +1697,11 @@ const formPropDefaults = {
1417
1697
  429: "An Error Occurred",
1418
1698
  504: { message: "An Error Occurred", abort: false },
1419
1699
  },
1420
- formClass: '!t-max-w-[40rem]'
1700
+ formClass: "!t-max-w-[40rem]",
1421
1701
  };
1422
1702
 
1423
1703
  function filterMapByKey(obj, keyList) {
1424
- return Object.fromEntries(
1425
- Object.entries(obj).filter(([key]) => keyList.includes(key))
1426
- );
1704
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
1427
1705
  }
1428
1706
 
1429
1707
  // export function filteredNextStepsMapLegal(keyList) {
@@ -1433,10 +1711,7 @@ function filterMapByKey(obj, keyList) {
1433
1711
  // }
1434
1712
 
1435
1713
  function formProps(updates) {
1436
- const props = merge(
1437
- formPropDefaults,
1438
- updates
1439
- );
1714
+ const props = merge(formPropDefaults, updates);
1440
1715
  if (props.formId && !props.name) {
1441
1716
  props.name = props.formId;
1442
1717
  }
@@ -1446,13 +1721,10 @@ function formProps(updates) {
1446
1721
  const metaDefaults = {};
1447
1722
 
1448
1723
  function metaProps(updates) {
1449
- const data = merge(
1450
- metaDefaults,
1451
- updates
1452
- );
1724
+ const data = merge(metaDefaults, updates);
1453
1725
  return {
1454
- type: 'meta',
1455
- data
1726
+ type: "meta",
1727
+ data,
1456
1728
  }
1457
1729
  }
1458
1730
 
@@ -1472,177 +1744,180 @@ function defaultMetaPropsLegal(tolps = null) {
1472
1744
  defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1473
1745
  finalHeadlines: finalHeadlines,
1474
1746
  defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1475
- finalSubHeadlines: finalSubHeadlines
1747
+ finalSubHeadlines: finalSubHeadlines,
1476
1748
  })
1477
1749
  }
1478
1750
 
1479
- function dynamicSchemaNode(field = 'Type_Of_Legal_Problem') {
1751
+ function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
1480
1752
  return {
1481
- $cmp: 'FormKitSchema',
1482
- if: '$get(' + field + ').value',
1753
+ $cmp: "FormKitSchema",
1754
+ if: "$get(" + field + ").value",
1483
1755
  props: {
1484
- schema: '$meta.dynamicSchema',
1485
- data: '$buildData($meta)'
1486
- }
1756
+ schema: "$meta.dynamicSchema",
1757
+ data: "$buildData($meta)",
1758
+ },
1487
1759
  }
1488
1760
  }
1489
1761
 
1490
1762
  const formAnchorDefaults = {
1491
- $el: 'div',
1763
+ $el: "div",
1492
1764
  children: [
1493
1765
  {
1494
- $el: 'div',
1766
+ $el: "div",
1495
1767
  attrs: {
1496
- id: 'form-anchor',
1497
- class: 't-absolute',
1498
- style: { top: '-30px', left: 0 }
1499
- }
1500
- }
1768
+ id: "form-anchor",
1769
+ class: "t-absolute",
1770
+ style: { top: "-30px", left: 0 },
1771
+ },
1772
+ },
1501
1773
  ],
1502
1774
  attrs: {
1503
- class: 't-relative'
1504
- }
1775
+ class: "t-relative",
1776
+ },
1505
1777
  };
1506
1778
 
1507
1779
  function formAnchor(updates) {
1508
- return merge(
1509
- formAnchorDefaults,
1510
- updates
1511
- )
1780
+ return merge(formAnchorDefaults, updates)
1512
1781
  }
1513
1782
 
1514
1783
  function headlineDefaults(updates = {}) {
1515
1784
  return {
1516
- $el: 'h1',
1785
+ $el: "h1",
1517
1786
  attrs: {
1518
- class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
1519
- }
1787
+ class:
1788
+ "t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
1789
+ " " +
1790
+ (updates.headlineClass || ""),
1791
+ },
1520
1792
  }
1521
1793
  }
1522
1794
 
1523
1795
  function headline(updates = {}) {
1524
- return merge(
1525
- headlineDefaults(updates),
1526
- updates
1527
- )
1796
+ return merge(headlineDefaults(updates), updates)
1528
1797
  }
1529
1798
 
1530
1799
  function subHeadlineDefaults(updates = {}) {
1531
1800
  return {
1532
- $el: 'h3',
1801
+ $el: "h3",
1533
1802
  attrs: {
1534
- class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
1535
- }
1803
+ class:
1804
+ "t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10" +
1805
+ " " +
1806
+ (updates.subheadlineClass || ""),
1807
+ },
1536
1808
  }
1537
1809
  }
1538
1810
 
1539
1811
  function subHeadline(updates = {}) {
1540
- return merge(
1541
- subHeadlineDefaults(updates),
1542
- updates
1543
- )
1812
+ return merge(subHeadlineDefaults(updates), updates)
1544
1813
  }
1545
1814
 
1546
1815
  const hiddenInputsBase = [
1547
1816
  {
1548
- $formkit: 'hidden',
1817
+ $formkit: "hidden",
1549
1818
  name: "gclid",
1550
- value: null
1819
+ value: null,
1551
1820
  },
1552
1821
  {
1553
- $formkit: 'hidden',
1822
+ $formkit: "hidden",
1554
1823
  name: "campaignid",
1555
- value: null
1824
+ value: null,
1556
1825
  },
1557
1826
  {
1558
- $formkit: 'hidden',
1827
+ $formkit: "hidden",
1559
1828
  name: "s",
1560
- value: null
1561
- }
1829
+ value: null,
1830
+ },
1562
1831
  ];
1563
1832
 
1564
1833
  const hiddenInputsLegal = [
1565
1834
  {
1566
- $formkit: 'hidden',
1835
+ $formkit: "hidden",
1567
1836
  name: "vertical",
1568
- value: "Legal"
1837
+ value: "Legal",
1569
1838
  },
1570
1839
  {
1571
- $formkit: 'hidden',
1840
+ $formkit: "hidden",
1572
1841
  name: "TCPA_Language",
1573
- value: "$meta.tcpaLanguage"
1842
+ value: "$meta.tcpaLanguage",
1574
1843
  },
1575
- ...hiddenInputsBase
1844
+ ...hiddenInputsBase,
1576
1845
  ];
1577
1846
 
1578
1847
  const legalRedirectMapDefaults = {
1579
- '*': LegalRedirectUrl()
1848
+ "*": LegalRedirectUrl(),
1580
1849
  };
1581
1850
 
1582
-
1583
1851
  function legalRedirectMap(updates) {
1584
- return merge(
1585
- legalRedirectMapDefaults,
1586
- updates
1587
- )
1852
+ return merge(legalRedirectMapDefaults, updates)
1588
1853
  }
1589
1854
 
1590
1855
  const TOLPCommentsPlaceholders = {
1591
- 'Adoption': 'Example: "I need help with adoption forms"',
1592
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1593
- 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1594
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1595
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1596
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1597
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1598
- 'Child Custody': 'Example: "Need help getting custody"',
1599
- 'Child Support': 'Example: "Issues with child support payments"',
1600
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1601
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1602
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1603
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1604
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1605
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1606
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1607
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1608
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1609
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1610
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1611
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1612
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1613
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1614
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1615
- 'Guardianship': 'Example: "I need help with guardianship documents"',
1616
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1617
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1618
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1619
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1620
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1621
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1622
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1623
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1624
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1625
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1626
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1627
- 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1628
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1629
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1630
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1631
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1632
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1633
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1634
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1635
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1636
- 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1637
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1638
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1639
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1640
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1641
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1642
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1643
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1644
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1645
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
1856
+ Adoption: 'Example: "I need help with adoption forms"',
1857
+ "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1858
+ "Auto and Car Accidents":
1859
+ 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1860
+ Bankruptcy: 'Example: "I need help filing for bankruptcy"',
1861
+ "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
1862
+ "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1863
+ "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
1864
+ "Child Custody": 'Example: "Need help getting custody"',
1865
+ "Child Support": 'Example: "Issues with child support payments"',
1866
+ "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
1867
+ "Civil Lawsuit":
1868
+ 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1869
+ "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
1870
+ "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
1871
+ "Consumer Lawyers":
1872
+ 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1873
+ "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
1874
+ "Criminal and Felony":
1875
+ 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1876
+ "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1877
+ "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
1878
+ "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
1879
+ "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1880
+ "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1881
+ Expungement: 'Example: "I would like to file for an expungement and clear my record"',
1882
+ "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
1883
+ Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
1884
+ Guardianship: 'Example: "I need help with guardianship documents"',
1885
+ "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1886
+ "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
1887
+ "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
1888
+ "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
1889
+ "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
1890
+ "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
1891
+ "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
1892
+ "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
1893
+ Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
1894
+ "Landlord and Tenant":
1895
+ 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1896
+ "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1897
+ "Long Term Disability":
1898
+ 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1899
+ "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1900
+ "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1901
+ "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1902
+ "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
1903
+ "Probate and Estates":
1904
+ 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1905
+ "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1906
+ "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1907
+ "Real Estate":
1908
+ 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1909
+ "Social Security Disability and Insurance":
1910
+ 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1911
+ "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1912
+ "Traffic and Tickets":
1913
+ 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1914
+ Unemployment: 'Example: "I need help filing for unemployment benefits"',
1915
+ "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1916
+ "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1917
+ "Workers Compensation": 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1918
+ "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
1919
+ "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
1920
+ "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1646
1921
  };
1647
1922
 
1648
1923
  const TOLPFinalHeadlines = {
@@ -1650,49 +1925,64 @@ const TOLPFinalHeadlines = {
1650
1925
  };
1651
1926
 
1652
1927
  const TOLPFinalSubHeadlines = {
1653
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
1928
+ Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1654
1929
  // 'Asbestos and Mesothelioma': '',
1655
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1656
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
1930
+ "Auto and Car Accidents":
1931
+ "You may benefit from speaking with an accident professional. Please verify your contact information.",
1932
+ Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1657
1933
  // 'Birth Certificate and Name Change': '',
1658
1934
  // 'Business Lawyers': '',
1659
1935
  // 'Child Custody and Support': '',
1660
1936
  // 'Civil Rights and Discrimination': '',
1661
1937
  // 'Civil Lawsuit': '',
1662
1938
  // 'Consumer Lawyers': '',
1663
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
1939
+ "Copyrights and Trademarks":
1940
+ "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1664
1941
  // 'Criminal and Felony': '',
1665
1942
  // 'Debt and Collections': '',
1666
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1667
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
1668
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
1943
+ "Divorce and Separation":
1944
+ "You may benefit from speaking with a divorce professional. Please verify your contact information.",
1945
+ "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
1946
+ "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
1669
1947
  // 'Employment and Workplace': '',
1670
1948
  // 'Expungement': '',
1671
1949
  // 'Family Issues': '',
1672
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
1673
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
1950
+ Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
1951
+ Guardianship:
1952
+ "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
1674
1953
  // 'Harassment and Discrimination': '',
1675
1954
  // 'Identity Theft': '',
1676
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
1955
+ "Immigration and Visas":
1956
+ "You may benefit from speaking with a immigration professional. Please verify your contact information.",
1677
1957
  // 'Insurance': '',
1678
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
1958
+ "Landlord and Tenant":
1959
+ "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
1679
1960
  // 'Lemon Law': '',
1680
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
1681
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
1682
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
1683
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
1961
+ "Long Term Disability":
1962
+ "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
1963
+ "Medical Malpractice":
1964
+ "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
1965
+ "Patents and Intellectual Property":
1966
+ "You may benefit from speaking with a patent professional. Please verify your contact information.",
1967
+ "Personal Injury":
1968
+ "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
1684
1969
  // 'Power of Attorney': '',
1685
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
1970
+ "Probate and Estates":
1971
+ "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
1686
1972
  // 'Product Liability': '',
1687
1973
  // 'Property Damage': '',
1688
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
1689
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
1690
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
1974
+ "Real Estate":
1975
+ "You may benefit from speaking with a real estate professional. Please verify your contact information.",
1976
+ "Social Security Disability and Insurance":
1977
+ "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
1978
+ "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
1691
1979
  // 'Traffic and Tickets': '',
1692
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
1980
+ Unemployment:
1981
+ "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
1693
1982
  // 'Victim of a Crime': '',
1694
1983
  // 'Wills and Trusts': '',
1695
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
1984
+ "Workers Compensation":
1985
+ "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
1696
1986
  // 'Wrongful Death': '',
1697
1987
  // 'Wrongful Termination': '',
1698
1988
  // 'Not Sure or Other': ''
@@ -1705,37 +1995,31 @@ const TOLPFinalSubHeadlines = {
1705
1995
 
1706
1996
  const nextStepsMapLegalLegacy = {
1707
1997
  values: {
1708
- '*': [
1709
- 'TOLPQuestions',
1710
- 'commentsWithBankruptcy',
1711
- 'legalCrossSells',
1712
- 'firstAndLast',
1713
- 'contactInfo',
1714
- ]
1715
- }
1998
+ "*": ["TOLPQuestions", "commentsWithBankruptcy", "legalCrossSells", "firstAndLast", "contactInfo"],
1999
+ },
1716
2000
  };
1717
2001
 
1718
2002
  const nextStepsMapLegalCrossSells = {
1719
2003
  values: {
1720
- 'Legal_CrossSells': {
1721
- 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
1722
- 'Personal Injury': ['personalInjuryCrossSellQuestions'],
1723
- 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
1724
- 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
1725
- 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
1726
- 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
1727
- 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
1728
- 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
1729
- 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
1730
- 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
1731
- 'Child Custody': ['childCustodyCrossSellQuestions'],
2004
+ Legal_CrossSells: {
2005
+ "Auto and Car Accidents": ["autoAndCarAccidentCrossSellQuestions"],
2006
+ "Personal Injury": ["personalInjuryCrossSellQuestions"],
2007
+ "Workers Compensation": ["workersCompensationCrossSellQuestions"],
2008
+ "DUI and DWI": ["duiAndDWICrossSellQuestions"],
2009
+ "Long Term Disability": ["longTermDisabilityCrossSellQuestions"],
2010
+ "Social Security Disability and Insurance": ["ssdiCrossSellQuestions"],
2011
+ Bankruptcy: ["bankruptcyCrossSellQuestions"],
2012
+ "Power of Attorney": ["powerOfAttorneyCrossSellQuestions"],
2013
+ "Wills and Trusts": ["willsAndTrustsCrossSellQuestions"],
2014
+ "Divorce and Separation": ["divorceAndSeparationCrossSellQuestions"],
2015
+ "Child Custody": ["childCustodyCrossSellQuestions"],
1732
2016
  },
1733
- '*': ['firstAndLast', 'contactInfo'],
2017
+ "*": ["firstAndLast", "contactInfo"],
1734
2018
  },
1735
-
2019
+
1736
2020
  // NOTE: this assumes a certain placement of the cross sell question
1737
2021
  // in the form flow.
1738
- appendSteps: ['firstAndLast', 'contactInfo'],
2022
+ appendSteps: ["firstAndLast", "contactInfo"],
1739
2023
  matchesAllowed: 1,
1740
2024
  };
1741
2025