bhl-forms 0.1.9 → 0.1.11

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 (43) hide show
  1. package/dist/forms/accidentsAndInjuries.es.js +2 -58
  2. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  3. package/dist/forms/accidentsAndInjuries.json +1 -1
  4. package/dist/forms/appraisals.es.js +3 -3
  5. package/dist/forms/appraisals.iife.js +1 -1
  6. package/dist/forms/appraisals.json +1 -1
  7. package/dist/forms/childAndFamily.es.js +2 -58
  8. package/dist/forms/childAndFamily.iife.js +1 -1
  9. package/dist/forms/childAndFamily.json +1 -1
  10. package/dist/forms/civilLawsuit.es.js +2 -58
  11. package/dist/forms/civilLawsuit.iife.js +1 -1
  12. package/dist/forms/civilLawsuit.json +1 -1
  13. package/dist/forms/criminal.es.js +2 -58
  14. package/dist/forms/criminal.iife.js +1 -1
  15. package/dist/forms/criminal.json +1 -1
  16. package/dist/forms/employmentAndWorkplace.es.js +2 -58
  17. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  18. package/dist/forms/employmentAndWorkplace.json +1 -1
  19. package/dist/forms/generalLegal.es.js +2 -58
  20. package/dist/forms/generalLegal.iife.js +1 -1
  21. package/dist/forms/generalLegal.json +1 -1
  22. package/dist/forms/generalLegalPopUnder.es.js +2 -58
  23. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  24. package/dist/forms/generalLegalPopUnder.json +1 -1
  25. package/dist/forms/generalLegalPopUnderTF.es.js +2 -58
  26. package/dist/forms/generalLegalPopUnderTF.iife.js +1 -1
  27. package/dist/forms/generalLegalPopUnderTF.json +1 -1
  28. package/dist/forms/harassmentAndDiscrimination.es.js +2 -58
  29. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  30. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  31. package/dist/forms/mechanics.es.js +3 -3
  32. package/dist/forms/mechanics.iife.js +1 -1
  33. package/dist/forms/mechanics.json +1 -1
  34. package/dist/forms/realEstate.es.js +2 -58
  35. package/dist/forms/realEstate.iife.js +1 -1
  36. package/dist/forms/realEstate.json +1 -1
  37. package/dist/forms/testRedirects.es.js +511 -0
  38. package/dist/forms/testRedirects.iife.js +1 -0
  39. package/dist/forms/testRedirects.json +1 -0
  40. package/dist/forms/willsAndTrusts.es.js +2 -58
  41. package/dist/forms/willsAndTrusts.iife.js +1 -1
  42. package/dist/forms/willsAndTrusts.json +1 -1
  43. package/package.json +1 -1
@@ -0,0 +1,511 @@
1
+ function merge() {
2
+ return Object.assign({}, ...arguments)
3
+ }
4
+
5
+ function LegalRedirectUrl() {
6
+ return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=1&category=${properties.Type_Of_Legal_Problem}&sub_id=${properties.vid}'
7
+ }
8
+
9
+ const formPropDefaults = {
10
+ type: 'form',
11
+ id: 'form',
12
+ config: { validationVisibility: 'submit' },
13
+ onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
14
+ plugins: '$plugins',
15
+ actions: false,
16
+ anchorElement: 'form-anchor',
17
+ prepop: {
18
+ fromURL: true
19
+ },
20
+ errorCodes: {
21
+ 403: { message: "An Error Occurred", abort: false },
22
+ 409: { abort: false },
23
+ 429: "An Error Occurred",
24
+ 504: { message: "An Error Occurred", abort: false },
25
+ },
26
+ formClass: '!t-max-w-[40rem]'
27
+ };
28
+
29
+ function formProps(updates) {
30
+ return merge(
31
+ formPropDefaults,
32
+ updates
33
+ )
34
+ }
35
+
36
+ const formAnchorDefaults = {
37
+ $el: 'div',
38
+ children: [
39
+ {
40
+ $el: 'div',
41
+ attrs: {
42
+ id: 'form-anchor',
43
+ class: 't-absolute',
44
+ style: { top: '-30px', left: 0 }
45
+ }
46
+ }
47
+ ],
48
+ attrs: {
49
+ class: 't-relative'
50
+ }
51
+ };
52
+
53
+ function formAnchor(updates) {
54
+ return merge(
55
+ formAnchorDefaults,
56
+ updates
57
+ )
58
+ }
59
+
60
+ const headlineDefaults = {
61
+ $el: 'h1',
62
+ attrs: {
63
+ 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'
64
+ }
65
+ };
66
+
67
+ function headline(updates) {
68
+ return merge(
69
+ headlineDefaults,
70
+ updates
71
+ )
72
+ }
73
+
74
+ const hiddenInputsBase = [
75
+ {
76
+ $formkit: 'hidden',
77
+ name: "gclid",
78
+ value: null
79
+ },
80
+ {
81
+ $formkit: 'hidden',
82
+ name: "campaignid",
83
+ value: null
84
+ },
85
+ {
86
+ $formkit: 'hidden',
87
+ name: "s",
88
+ value: null
89
+ }
90
+ ];
91
+
92
+ const hiddenInputsMechanics = [
93
+ {
94
+ $formkit: 'hidden',
95
+ name: "vertical",
96
+ value: "Mechanics"
97
+ },
98
+ ...hiddenInputsBase
99
+ ];
100
+
101
+ const radio = (updates) => {
102
+ return merge({
103
+ $formkit: 'radio',
104
+ validation: 'required',
105
+ validationMessages: {
106
+ required: 'Field is required'
107
+ },
108
+ optionsClass: 't-pt-3 t-pl-1',
109
+ legendClass: 'required'
110
+ }, updates)
111
+ };
112
+
113
+ const col2Radio = (updates) => {
114
+ updates.legendClass = 'required';
115
+ updates.fieldsetClass = '$reset';
116
+ updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
117
+ updates.innerClass = 't-items-start';
118
+ updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
119
+ return radio(updates)
120
+ };
121
+
122
+ const sbs2ItemRadio = (updates) => {
123
+ updates.legendClass = 'legend-left t-pb-1 required';
124
+ updates.fieldsetClass = '$reset side-by-side t-items-center';
125
+ updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
126
+ updates.innerClass = 't-flex t-items-center';
127
+ updates.optionClass = 't-pr-1';
128
+ return radio(updates)
129
+ };
130
+
131
+ const select = (updates) => {
132
+ return merge({
133
+ $formkit: 'select',
134
+ placeholder: "Please Select",
135
+ validation: 'required',
136
+ validationMessages: {
137
+ required: 'Field is required'
138
+ },
139
+ inputClass: 't-bg-white',
140
+ labelClass: 'required'
141
+ }, updates)
142
+ };
143
+
144
+ const sbsSelect = (updates) => {
145
+ updates.labelClass = 'required';
146
+ updates.wrapperClass = 'side-by-side t-items-center';
147
+ updates.innerClass = 'select-height-content';
148
+ updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
149
+ return select(updates)
150
+ };
151
+
152
+ const text = (updates) => {
153
+ return merge({
154
+ $formkit: 'text',
155
+ validation: 'required',
156
+ validationMessages: {
157
+ required: 'Field is required'
158
+ },
159
+ labelClass: 'required'
160
+ }, updates)
161
+ };
162
+
163
+ const sbsText = (updates) => {
164
+ updates.wrapperClass = 'side-by-side t-items-center';
165
+ return text(updates)
166
+ };
167
+
168
+ const civilDefense = (updates) => sbs2ItemRadio(merge({
169
+ name: 'Civil_Defense',
170
+ id: 'Civil_Defense',
171
+ if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
172
+ label: 'Do You Need Representation to File a Lawsuit or Defend One?',
173
+ options: {
174
+ Yes: 'Defend a Lawsuit',
175
+ No: 'File a Lawsuit'
176
+ }
177
+ }, updates));
178
+
179
+ const civilLawsuitTOLPDisplay = (updates) => col2Radio(merge({
180
+ name: 'Type_Of_Legal_Problem_Display',
181
+ if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit" && $get(Civil_Defense).value == "No"',
182
+ label: 'Select The Type of Lawsuit You Would Like to File:',
183
+ options: [
184
+ 'Automobile Accident',
185
+ 'Contract Disputes',
186
+ 'Defamation and Slander',
187
+ 'Dog Bite',
188
+ 'Employment and Workplace',
189
+ 'Fraud',
190
+ 'Medical Malpractice',
191
+ 'Personal Injury',
192
+ 'Property Damage',
193
+ 'Small Claims',
194
+ 'Real Estate',
195
+ 'Other (describe on next page)'
196
+ ]
197
+ }, updates));
198
+
199
+ const employmentAndWorkplaceTOLPDisplay = (updates) => col2Radio(merge({
200
+ name: 'Type_Of_Legal_Problem_Display',
201
+ if: '$get(Type_Of_Legal_Problem).value == "Employment and Workplace"',
202
+ label: 'Select The Workplace Issue:',
203
+ options: [
204
+ 'Workplace Harassment',
205
+ 'Workplace Discrimination',
206
+ 'Wrongful Termination',
207
+ 'Payment Disputes',
208
+ 'Workers Compensation',
209
+ 'Personal Injury',
210
+ 'Unemployment',
211
+ 'Other Workplace Issues'
212
+ ]
213
+ }, updates));
214
+
215
+ const generalTOLP = (updates) => sbsSelect(merge({
216
+ label: 'Type of Help Needed:',
217
+ name: 'Type_Of_Legal_Problem',
218
+ id: 'Type_Of_Legal_Problem',
219
+ options: [
220
+ 'Adoption',
221
+ 'Asbestos and Mesothelioma',
222
+ 'Auto and Car Accidents',
223
+ 'Bankruptcy',
224
+ 'Birth Certificate and Name Change',
225
+ 'Business Lawyers',
226
+ 'Child Custody',
227
+ 'Child Support',
228
+ 'Civil Rights and Discrimination',
229
+ 'Civil Lawsuit',
230
+ 'Consumer Lawyers',
231
+ 'Copyrights and Trademarks',
232
+ 'Criminal and Felony',
233
+ 'Debt and Collections',
234
+ 'Divorce and Separation',
235
+ 'DUI and DWI',
236
+ 'Elder Law',
237
+ 'Employment and Workplace',
238
+ 'Expungement',
239
+ 'Family Issues',
240
+ 'Foreclosure',
241
+ 'Guardianship',
242
+ 'Harassment and Discrimination',
243
+ 'Identity Theft',
244
+ 'Immigration and Visas',
245
+ 'Insurance',
246
+ 'Landlord and Tenant',
247
+ 'Lemon Law',
248
+ 'Long Term Disability',
249
+ 'Medical Malpractice',
250
+ 'Non-Workplace Discrimination',
251
+ 'Non-Workplace Harassment',
252
+ 'Nursing Home Abuse',
253
+ 'Patents and Intellectual Property',
254
+ 'Personal Injury',
255
+ 'Power of Attorney',
256
+ 'Probate and Estates',
257
+ 'Product Liability',
258
+ 'Property Damage',
259
+ 'Real Estate',
260
+ 'Sexual Harassment',
261
+ 'Social Security Disability and Insurance',
262
+ 'Tax and IRS',
263
+ 'Traffic and Tickets',
264
+ 'Unemployment',
265
+ 'Vaccination Injury',
266
+ "Veteran's Disability",
267
+ 'Victim of a Crime',
268
+ 'Wills and Trusts',
269
+ 'Workers Compensation',
270
+ 'Workplace Discrimination',
271
+ 'Workplace Harassment',
272
+ 'Wrongful Death',
273
+ 'Wrongful Termination',
274
+ 'Not Sure or Other'
275
+ ]
276
+ }, updates));
277
+
278
+ const landlordTenantIssueRadio = () => col2Radio({
279
+ label: 'What is the Landlord / Tenant Issue?',
280
+ if: '$get(Type_Of_Legal_Problem).value == "Landlord and Tenant"',
281
+ id: 'Landlord_Tenant_Issue',
282
+ name: 'Landlord_Tenant_Issue',
283
+ options: [
284
+ "Eviction",
285
+ "Repairs and Maintenance",
286
+ "Lease and Rental Agreements",
287
+ "Discrimination",
288
+ "Right of Entry and Privacy",
289
+ "Screening and Applications",
290
+ "Environmental Hazards",
291
+ "Other Dispute"
292
+ ]
293
+ });
294
+
295
+ const realEstateTOLPDisplay = (updates) => col2Radio(merge({
296
+ name: 'Type_Of_Legal_Problem_Display',
297
+ if: '$get(Type_Of_Legal_Problem).value == "Real Estate"',
298
+ label: 'Select The Type of Real Estate Issue:',
299
+ options: [
300
+ 'Contracts and Agreements',
301
+ 'Deeds, Liens, and Titles',
302
+ 'Foreclosure',
303
+ 'Insurance',
304
+ 'Landlord and Tenant',
305
+ 'Loans and Mortgages',
306
+ 'Wills, Trusts, and Estates',
307
+ 'Property Damage',
308
+ 'Other Real Estate Issues'
309
+ ]
310
+ }, updates));
311
+
312
+ const zipcode = () => sbsText({
313
+ label: 'Zip Code:',
314
+ placeholder: '#####',
315
+ name: 'Zip',
316
+ maxlength: 5,
317
+ inputmode: "numeric",
318
+ autocomplete: 'postal-code',
319
+ validation: 'required|matches:/^[0-9]{5}$/',
320
+ validationMessages: {
321
+ required: 'Zip Code is required',
322
+ matches: 'Invalid Zip Code'
323
+ }
324
+ });
325
+
326
+ const criminalTOLPDisplay = (updates) => col2Radio(merge({
327
+ name: 'Type_Of_Legal_Problem_Display',
328
+ if: '$get(Type_Of_Legal_Problem).value == "Criminal and Felony"',
329
+ label: 'Which Type of Criminal Issue?',
330
+ options: [
331
+ 'Criminal Defense',
332
+ 'Victim of a Crime',
333
+ 'DUI and DWI',
334
+ 'Expungement',
335
+ 'Harassment',
336
+ 'Not Sure or Other',
337
+ ]
338
+ }, updates));
339
+
340
+ const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
341
+
342
+ const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
343
+
344
+ const findLastInput = (n) => {
345
+ if (isInput(n)) {
346
+ return n
347
+ }
348
+ for (var i = n.children.length - 1; i >= 0; i--) {
349
+ if (typeof n.children === 'string') {
350
+ continue
351
+ }
352
+ const child = n.children[i];
353
+ if (isInput(child)) {
354
+ return child
355
+ }
356
+ const res = findLastInput(child);
357
+ if (res) {
358
+ return res
359
+ }
360
+ }
361
+ return null
362
+ };
363
+
364
+ const stepDefaults = (step) => ({
365
+ $el: 'section',
366
+ if: '$stepIsEnabled("' + step + '")',
367
+ attrs: {
368
+ style: {
369
+ if: '$activeStep !== "' + step + '"',
370
+ then: 'display: none;'
371
+ }
372
+ }
373
+ });
374
+
375
+ function step(name, inputs, nextOnEnter = true) {
376
+ if (typeof nextOnEnter === 'undefined') {
377
+ nextOnEnter = true;
378
+ }
379
+ if (inputs && inputs.length && nextOnEnter) {
380
+ const lastInput = findLastInput(inputs[inputs.length - 1]);
381
+ lastInput.onKeypress = NEXT_ON_ENTER;
382
+ }
383
+
384
+ return merge(
385
+ stepDefaults(name),
386
+ {
387
+ children: [
388
+ {
389
+ $formkit: 'group',
390
+ id: name,
391
+ name: name,
392
+ children: inputs
393
+ }
394
+ ]
395
+ }
396
+ )
397
+ }
398
+
399
+ function generalLegalTOLPAndZip(updates = {}) {
400
+ return step(
401
+ 'generalLegalTOLPAndZip',
402
+ [
403
+ generalTOLP(),
404
+ civilDefense(),
405
+ civilLawsuitTOLPDisplay(),
406
+ criminalTOLPDisplay(),
407
+ employmentAndWorkplaceTOLPDisplay(),
408
+ landlordTenantIssueRadio(),
409
+ realEstateTOLPDisplay(),
410
+ zipcode()
411
+ ],
412
+ updates.nextOnEnter
413
+ )
414
+ }
415
+
416
+ const formNavigationOnlySubmit = () => ({
417
+ $el: 'div',
418
+ attrs: {
419
+ class: 'step-nav'
420
+ },
421
+ children: [
422
+ {
423
+ $formkit: 'button',
424
+ name: 'hidden_button',
425
+ children: 'Hidden',
426
+ style: {
427
+ if: '$activeStep === $firstStep()',
428
+ then: 'visibility: hidden;'
429
+ }
430
+ },
431
+ {
432
+ $formkit: 'submit',
433
+ name: 'submit_button',
434
+ // TODO ability to customize this
435
+ label: 'Chat Now'
436
+ }
437
+ ]
438
+ });
439
+
440
+ const formDetails = () => ({
441
+ $el: 'pre',
442
+ if: '$urlParam("fdbg", "") == 1',
443
+ children: [
444
+ {
445
+ $el: 'pre',
446
+ children: '$stringify( $get(form).value )',
447
+ attrs: {
448
+ class: 't-text-xs',
449
+ style: 'overflow: scroll'
450
+ }
451
+ },
452
+ {
453
+ $el: 'pre',
454
+ children: ['activeStep: ', '$activeStep'],
455
+ attrs: {
456
+ class: 't-text-xs',
457
+ style: 'overflow: scroll'
458
+ }
459
+ },
460
+ {
461
+ $el: 'pre',
462
+ children: ['stepHistory: ', '$stepHistory'],
463
+ attrs: {
464
+ class: 't-text-xs',
465
+ style: 'overflow: scroll'
466
+ }
467
+ },
468
+ {
469
+ $el: 'pre',
470
+ children: ['stepQueue: ', '$stepQueue'],
471
+ attrs: {
472
+ class: 't-text-xs',
473
+ style: 'overflow: scroll'
474
+ }
475
+ }
476
+ ]
477
+ });
478
+
479
+ const schema = [
480
+ formAnchor(),
481
+ {
482
+ $cmp: 'FormKit',
483
+ props: formProps({
484
+ formId: 'testRedirects',
485
+ redirectMap: {
486
+ '*': LegalRedirectUrl()
487
+ },
488
+ formClass: '!t-max-w-[36rem]'
489
+ }),
490
+ children: [
491
+ headline({
492
+ children: '$urlParam("hl", "Have Questions for a Lawyer?")',
493
+ if: '$activeStep === $firstStep()'
494
+ }),
495
+ ...hiddenInputsMechanics,
496
+ {
497
+ $el: 'div',
498
+ attrs: {
499
+ class: 'form-body'
500
+ },
501
+ children: [
502
+ generalLegalTOLPAndZip(),
503
+ formNavigationOnlySubmit(),
504
+ formDetails()
505
+ ]
506
+ }
507
+ ]
508
+ }
509
+ ];
510
+
511
+ export { schema as default };
@@ -0,0 +1 @@
1
+ var testRedirects=function(){"use strict";function e(){return Object.assign({},...arguments)}const t={type:"form",id:"form",config:{validationVisibility:"submit"},onSubmit:'$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',plugins:"$plugins",actions:!1,anchorElement:"form-anchor",prepop:{fromURL:!0},errorCodes:{403:{message:"An Error Occurred",abort:!1},409:{abort:!1},429:"An Error Occurred",504:{message:"An Error Occurred",abort:!1}},formClass:"!t-max-w-[40rem]"};const a={$el:"h1",attrs:{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"}};const i=[{$formkit:"hidden",name:"vertical",value:"Mechanics"},{$formkit:"hidden",name:"gclid",value:null},{$formkit:"hidden",name:"campaignid",value:null},{$formkit:"hidden",name:"s",value:null}],r=t=>e({$formkit:"radio",validation:"required",validationMessages:{required:"Field is required"},optionsClass:"t-pt-3 t-pl-1",legendClass:"required"},t),s=e=>(e.legendClass="required",e.fieldsetClass="$reset",e.optionsClass="t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2",e.innerClass="t-items-start",e.wrapperClass="$reset t-flex t-cursor-pointer t-mb-3",r(e)),n=t=>(t.labelClass="required",t.wrapperClass="side-by-side t-items-center",t.innerClass="select-height-content",t.helpClass="t-mt-2.5 md:t-text-right md:t-mt-[-5px]",(t=>e({$formkit:"select",placeholder:"Please Select",validation:"required",validationMessages:{required:"Field is required"},inputClass:"t-bg-white",labelClass:"required"},t))(t)),l=t=>(t.wrapperClass="side-by-side t-items-center",(t=>e({$formkit:"text",validation:"required",validationMessages:{required:"Field is required"},labelClass:"required"},t))(t)),o=t=>(e=>(e.legendClass="legend-left t-pb-1 required",e.fieldsetClass="$reset side-by-side t-items-center",e.optionsClass="t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center",e.innerClass="t-flex t-items-center",e.optionClass="t-pr-1",r(e)))(e({name:"Civil_Defense",id:"Civil_Defense",if:'$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',label:"Do You Need Representation to File a Lawsuit or Defend One?",options:{Yes:"Defend a Lawsuit",No:"File a Lawsuit"}},t)),d=t=>s(e({name:"Type_Of_Legal_Problem_Display",if:'$get(Type_Of_Legal_Problem).value == "Civil Lawsuit" && $get(Civil_Defense).value == "No"',label:"Select The Type of Lawsuit You Would Like to File:",options:["Automobile Accident","Contract Disputes","Defamation and Slander","Dog Bite","Employment and Workplace","Fraud","Medical Malpractice","Personal Injury","Property Damage","Small Claims","Real Estate","Other (describe on next page)"]},t)),c=t=>s(e({name:"Type_Of_Legal_Problem_Display",if:'$get(Type_Of_Legal_Problem).value == "Employment and Workplace"',label:"Select The Workplace Issue:",options:["Workplace Harassment","Workplace Discrimination","Wrongful Termination","Payment Disputes","Workers Compensation","Personal Injury","Unemployment","Other Workplace Issues"]},t)),p=t=>n(e({label:"Type of Help Needed:",name:"Type_Of_Legal_Problem",id:"Type_Of_Legal_Problem",options:["Adoption","Asbestos and Mesothelioma","Auto and Car Accidents","Bankruptcy","Birth Certificate and Name Change","Business Lawyers","Child Custody","Child Support","Civil Rights and Discrimination","Civil Lawsuit","Consumer Lawyers","Copyrights and Trademarks","Criminal and Felony","Debt and Collections","Divorce and Separation","DUI and DWI","Elder Law","Employment and Workplace","Expungement","Family Issues","Foreclosure","Guardianship","Harassment and Discrimination","Identity Theft","Immigration and Visas","Insurance","Landlord and Tenant","Lemon Law","Long Term Disability","Medical Malpractice","Non-Workplace Discrimination","Non-Workplace Harassment","Nursing Home Abuse","Patents and Intellectual Property","Personal Injury","Power of Attorney","Probate and Estates","Product Liability","Property Damage","Real Estate","Sexual Harassment","Social Security Disability and Insurance","Tax and IRS","Traffic and Tickets","Unemployment","Vaccination Injury","Veteran's Disability","Victim of a Crime","Wills and Trusts","Workers Compensation","Workplace Discrimination","Workplace Harassment","Wrongful Death","Wrongful Termination","Not Sure or Other"]},t)),m=t=>s(e({name:"Type_Of_Legal_Problem_Display",if:'$get(Type_Of_Legal_Problem).value == "Real Estate"',label:"Select The Type of Real Estate Issue:",options:["Contracts and Agreements","Deeds, Liens, and Titles","Foreclosure","Insurance","Landlord and Tenant","Loans and Mortgages","Wills, Trusts, and Estates","Property Damage","Other Real Estate Issues"]},t)),u=t=>s(e({name:"Type_Of_Legal_Problem_Display",if:'$get(Type_Of_Legal_Problem).value == "Criminal and Felony"',label:"Which Type of Criminal Issue?",options:["Criminal Defense","Victim of a Crime","DUI and DWI","Expungement","Harassment","Not Sure or Other"]},t)),f=e=>"group"!==e.type&&"section"!==e.type&&"form"!==e.type&&"hidden"!==e.$formkit&&!e.children,g=e=>{if(f(e))return e;for(var t=e.children.length-1;t>=0;t--){if("string"==typeof e.children)continue;const a=e.children[t];if(f(a))return a;const i=g(a);if(i)return i}return null};const y=[e({$el:"div",children:[{$el:"div",attrs:{id:"form-anchor",class:"t-absolute",style:{top:"-30px",left:0}}}],attrs:{class:"t-relative"}},h),{$cmp:"FormKit",props:function(a){return e(t,a)}({formId:"testRedirects",redirectMap:{"*":"https://listings.ziplawyer.com/api/v1/redirect?zone_id=1&category=${properties.Type_Of_Legal_Problem}&sub_id=${properties.vid}"},formClass:"!t-max-w-[36rem]"}),children:[function(t){return e(a,t)}({children:'$urlParam("hl", "Have Questions for a Lawyer?")',if:"$activeStep === $firstStep()"}),...i,{$el:"div",attrs:{class:"form-body"},children:[function(t={}){return function(t,a,i=!0){void 0===i&&(i=!0),a&&a.length&&i&&(g(a[a.length-1]).onKeypress="$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))");return e((e=>({$el:"section",if:'$stepIsEnabled("'+e+'")',attrs:{style:{if:'$activeStep !== "'+e+'"',then:"display: none;"}}}))(t),{children:[{$formkit:"group",id:t,name:t,children:a}]})}("generalLegalTOLPAndZip",[p(),o(),d(),u(),c(),s({label:"What is the Landlord / Tenant Issue?",if:'$get(Type_Of_Legal_Problem).value == "Landlord and Tenant"',id:"Landlord_Tenant_Issue",name:"Landlord_Tenant_Issue",options:["Eviction","Repairs and Maintenance","Lease and Rental Agreements","Discrimination","Right of Entry and Privacy","Screening and Applications","Environmental Hazards","Other Dispute"]}),m(),l({label:"Zip Code:",placeholder:"#####",name:"Zip",maxlength:5,inputmode:"numeric",autocomplete:"postal-code",validation:"required|matches:/^[0-9]{5}$/",validationMessages:{required:"Zip Code is required",matches:"Invalid Zip Code"}})],t.nextOnEnter)}(),{$el:"div",attrs:{class:"step-nav"},children:[{$formkit:"button",name:"hidden_button",children:"Hidden",style:{if:"$activeStep === $firstStep()",then:"visibility: hidden;"}},{$formkit:"submit",name:"submit_button",label:"Chat Now"}]},{$el:"pre",if:'$urlParam("fdbg", "") == 1',children:[{$el:"pre",children:"$stringify( $get(form).value )",attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["activeStep: ","$activeStep"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepHistory: ","$stepHistory"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepQueue: ","$stepQueue"],attrs:{class:"t-text-xs",style:"overflow: scroll"}}]}]}]}];var h;return y}();
@@ -0,0 +1 @@
1
+ [{"$el":"div","children":[{"$el":"div","attrs":{"id":"form-anchor","class":"t-absolute","style":{"top":"-30px","left":0}}}],"attrs":{"class":"t-relative"}},{"$cmp":"FormKit","props":{"type":"form","id":"form","config":{"validationVisibility":"submit"},"onSubmit":"$submit($submitUrl, $prepData, $handleRedirect, \"text/plain; charset=UTF-8\")","plugins":"$plugins","actions":false,"anchorElement":"form-anchor","prepop":{"fromURL":true},"errorCodes":{"403":{"message":"An Error Occurred","abort":false},"409":{"abort":false},"429":"An Error Occurred","504":{"message":"An Error Occurred","abort":false}},"formClass":"!t-max-w-[36rem]","formId":"testRedirects","redirectMap":{"*":"https://listings.ziplawyer.com/api/v1/redirect?zone_id=1&category=${properties.Type_Of_Legal_Problem}&sub_id=${properties.vid}"}},"children":[{"$el":"h1","attrs":{"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"},"children":"$urlParam(\"hl\", \"Have Questions for a Lawyer?\")","if":"$activeStep === $firstStep()"},{"$formkit":"hidden","name":"vertical","value":"Mechanics"},{"$formkit":"hidden","name":"gclid","value":null},{"$formkit":"hidden","name":"campaignid","value":null},{"$formkit":"hidden","name":"s","value":null},{"$el":"div","attrs":{"class":"form-body"},"children":[{"$el":"section","if":"$stepIsEnabled(\"generalLegalTOLPAndZip\")","attrs":{"style":{"if":"$activeStep !== \"generalLegalTOLPAndZip\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"generalLegalTOLPAndZip","name":"generalLegalTOLPAndZip","children":[{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Type of Help Needed:","name":"Type_Of_Legal_Problem","id":"Type_Of_Legal_Problem","options":["Adoption","Asbestos and Mesothelioma","Auto and Car Accidents","Bankruptcy","Birth Certificate and Name Change","Business Lawyers","Child Custody","Child Support","Civil Rights and Discrimination","Civil Lawsuit","Consumer Lawyers","Copyrights and Trademarks","Criminal and Felony","Debt and Collections","Divorce and Separation","DUI and DWI","Elder Law","Employment and Workplace","Expungement","Family Issues","Foreclosure","Guardianship","Harassment and Discrimination","Identity Theft","Immigration and Visas","Insurance","Landlord and Tenant","Lemon Law","Long Term Disability","Medical Malpractice","Non-Workplace Discrimination","Non-Workplace Harassment","Nursing Home Abuse","Patents and Intellectual Property","Personal Injury","Power of Attorney","Probate and Estates","Product Liability","Property Damage","Real Estate","Sexual Harassment","Social Security Disability and Insurance","Tax and IRS","Traffic and Tickets","Unemployment","Vaccination Injury","Veteran's Disability","Victim of a Crime","Wills and Trusts","Workers Compensation","Workplace Discrimination","Workplace Harassment","Wrongful Death","Wrongful Termination","Not Sure or Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content","helpClass":"t-mt-2.5 md:t-text-right md:t-mt-[-5px]"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center","legendClass":"legend-left t-pb-1 required","name":"Civil_Defense","id":"Civil_Defense","if":"$get(Type_Of_Legal_Problem).value == \"Civil Lawsuit\"","label":"Do You Need Representation to File a Lawsuit or Defend One?","options":{"Yes":"Defend a Lawsuit","No":"File a Lawsuit"},"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center","optionClass":"t-pr-1"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Civil Lawsuit\" && $get(Civil_Defense).value == \"No\"","label":"Select The Type of Lawsuit You Would Like to File:","options":["Automobile Accident","Contract Disputes","Defamation and Slander","Dog Bite","Employment and Workplace","Fraud","Medical Malpractice","Personal Injury","Property Damage","Small Claims","Real Estate","Other (describe on next page)"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Criminal and Felony\"","label":"Which Type of Criminal Issue?","options":["Criminal Defense","Victim of a Crime","DUI and DWI","Expungement","Harassment","Not Sure or Other"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Employment and Workplace\"","label":"Select The Workplace Issue:","options":["Workplace Harassment","Workplace Discrimination","Wrongful Termination","Payment Disputes","Workers Compensation","Personal Injury","Unemployment","Other Workplace Issues"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","label":"What is the Landlord / Tenant Issue?","if":"$get(Type_Of_Legal_Problem).value == \"Landlord and Tenant\"","id":"Landlord_Tenant_Issue","name":"Landlord_Tenant_Issue","options":["Eviction","Repairs and Maintenance","Lease and Rental Agreements","Discrimination","Right of Entry and Privacy","Screening and Applications","Environmental Hazards","Other Dispute"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Real Estate\"","label":"Select The Type of Real Estate Issue:","options":["Contracts and Agreements","Deeds, Liens, and Titles","Foreclosure","Insurance","Landlord and Tenant","Loans and Mortgages","Wills, Trusts, and Estates","Property Damage","Other Real Estate Issues"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"text","validation":"required|matches:/^[0-9]{5}$/","validationMessages":{"required":"Zip Code is required","matches":"Invalid Zip Code"},"labelClass":"required","label":"Zip Code:","placeholder":"#####","name":"Zip","maxlength":5,"inputmode":"numeric","autocomplete":"postal-code","wrapperClass":"side-by-side t-items-center","onKeypress":"$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))"}]}]},{"$el":"div","attrs":{"class":"step-nav"},"children":[{"$formkit":"button","name":"hidden_button","children":"Hidden","style":{"if":"$activeStep === $firstStep()","then":"visibility: hidden;"}},{"$formkit":"submit","name":"submit_button","label":"Chat Now"}]},{"$el":"pre","if":"$urlParam(\"fdbg\", \"\") == 1","children":[{"$el":"pre","children":"$stringify( $get(form).value )","attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["activeStep: ","$activeStep"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepHistory: ","$stepHistory"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepQueue: ","$stepQueue"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}}]}]}]}]
@@ -2,11 +2,7 @@ function merge() {
2
2
  return Object.assign({}, ...arguments)
3
3
  }
4
4
 
5
- function JAUrl(pageId) {
6
- return 'https://justanswer.9pctbx.net/c/2880795/' + pageId + '/9320?sharedid=${properties.vid}&subid1=${properties.Domain_Abbrev}'
7
- }
8
-
9
- function RedirectUrl() {
5
+ function LegalRedirectUrl() {
10
6
  return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=1&category=${properties.Type_Of_Legal_Problem}&sub_id=${properties.vid}'
11
7
  }
12
8
 
@@ -210,59 +206,7 @@ const hiddenInputsLegal = [
210
206
  ];
211
207
 
212
208
  const legalRedirectMapDefaults = {
213
- "properties.Type_Of_Legal_Problem": {
214
- 'Adoption': JAUrl('565949'),
215
- 'Asbestos and Mesothelioma': JAUrl('897042'),
216
- 'Auto and Car Accidents': JAUrl('1026554'),
217
- 'Bankruptcy': 'https://shareasale.com/r.cfm?b=407913&u=3084319&m=43003&urllink=&afftrack=${properties.vid}',
218
- 'Birth Certificate and Name Change': JAUrl('1503011'),
219
- 'Business Lawyers': JAUrl('1487960'),
220
- 'Child Custody and Support': JAUrl('565949'),
221
- 'Child Custody': JAUrl('565949'),
222
- 'Child Support': JAUrl('565949'),
223
- 'Civil Lawsuit': JAUrl('897042'),
224
- 'Civil Rights and Discrimination': JAUrl('897038'),
225
- 'Copyrights and Trademarks': JAUrl('1503020'),
226
- 'Family Issues': JAUrl('565949'),
227
- 'File a Lawsuit': JAUrl('897042'),
228
- 'Defend a Lawsuit': JAUrl('897042'),
229
- 'Consumer Lawyers': JAUrl('897042'),
230
- 'Criminal and Felony': JAUrl('897012'),
231
- 'Debt and Collections': JAUrl('1147978'),
232
- 'Divorce and Separation': RedirectUrl(), // JAUrl('966410'),
233
- 'DUI and DWI': JAUrl('897012'),
234
- 'Elder Law': JAUrl('565949'),
235
- 'Employment and Workplace': JAUrl('897014'),
236
- 'Expungement': JAUrl('897012'),
237
- 'Foreclosure': JAUrl('565923'),
238
- 'Guardianship': JAUrl('565949'),
239
- 'Immigration and Visas': JAUrl('565916'),
240
- 'Landlord and Tenant': RedirectUrl(), // JAUrl('1315025'),
241
- 'Lemon Law': JAUrl('1347399'),
242
- 'Medical Malpractice': JAUrl('1503025'),
243
- 'Non-Workplace Discrimination': JAUrl('1498134'),
244
- 'Non-Workplace Harassment': JAUrl('1503017'),
245
- 'Patents and Intellectual Property': JAUrl('1503020'),
246
- 'Personal Injury': JAUrl('1026554'),
247
- 'Power of Attorney': JAUrl('1097602'),
248
- 'Probate and Estates': JAUrl('1097602'),
249
- 'Product Liability': JAUrl('897042'),
250
- 'Property Damage': JAUrl('897042'),
251
- 'Real Estate': JAUrl('565923'),
252
- 'Sexual Harassment': JAUrl('897015'),
253
- 'Social Security Disability and Insurance': JAUrl('897033'),
254
- 'Tax and IRS': JAUrl('1147978'),
255
- 'Traffic and Tickets': JAUrl('808601'),
256
- 'Unemployment': JAUrl('897014'),
257
- 'Vaccination Injury': JAUrl('1026554'),
258
- 'Victim of a Crime': JAUrl('897012'),
259
- 'Wills and Trusts': JAUrl('1097602'),
260
- 'Workers Compensation': JAUrl('897014'),
261
- 'Workplace Discrimination': JAUrl('1498134'),
262
- 'Workplace Harassment': JAUrl('897014'),
263
- 'Wrongful Termination': JAUrl('897014')
264
- },
265
- '*': RedirectUrl() // JAUrl('808601')
209
+ '*': LegalRedirectUrl()
266
210
  };
267
211
 
268
212