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