Version Description
(2020-06-01) =
* PRO: Change auto-update mechanism
* Some minor JS refactoring
* Improved on some edge cases with equals ""
and not equals ""
* Improved test suites.
Download this release
Release Info
Developer | Jules Colle |
Plugin | Conditional Fields for Contact Form 7 |
Version | 1.8.7 |
Comparing to | |
See all releases |
Code changes from version 1.8.6 to 1.8.7
- contact-form-7-conditional-fields.php +1 -1
- init.php +1 -1
- js/scripts.js +25 -33
- js/scripts.js.map +1 -1
- js/scripts_es6.js +19 -27
- readme.txt +8 -2
contact-form-7-conditional-fields.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7 Conditional Fields
|
|
4 |
Plugin URI: http://bdwm.be/
|
5 |
Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
|
6 |
Author: Jules Colle
|
7 |
-
Version: 1.8.
|
8 |
Author URI: http://bdwm.be/
|
9 |
*/
|
10 |
|
4 |
Plugin URI: http://bdwm.be/
|
5 |
Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
|
6 |
Author: Jules Colle
|
7 |
+
Version: 1.8.7
|
8 |
Author URI: http://bdwm.be/
|
9 |
*/
|
10 |
|
init.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.8.
|
4 |
if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
|
5 |
if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
|
6 |
if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
|
1 |
<?php
|
2 |
|
3 |
+
if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.8.7' );
|
4 |
if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
|
5 |
if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
|
6 |
if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
|
js/scripts.js
CHANGED
@@ -461,11 +461,11 @@ function Wpcf7cfRepeater($repeater, form) {
|
|
461 |
wpcf7cf_settings: wpcf7cf_settings
|
462 |
};
|
463 |
this.params = params;
|
464 |
-
$button_add.click
|
465 |
var repeater = e.data;
|
466 |
repeater.updateSubs(params.$repeater.num_subs + 1);
|
467 |
});
|
468 |
-
$button_remove.click
|
469 |
var repeater = e.data;
|
470 |
repeater.updateSubs(params.$repeater.num_subs - 1);
|
471 |
});
|
@@ -612,8 +612,8 @@ function Wpcf7cfMultistep($multistep, form) {
|
|
612 |
}
|
613 |
}
|
614 |
}, _callee);
|
615 |
-
}))); // If form is submitted (by pressing
|
616 |
-
// then trigger click event on the $
|
617 |
|
618 |
multistep.form.$form.on('submit.wpcf7cf_step', function (e) {
|
619 |
if (multistep.currentStep !== multistep.numSteps) {
|
@@ -622,7 +622,7 @@ function Wpcf7cfMultistep($multistep, form) {
|
|
622 |
return false;
|
623 |
}
|
624 |
});
|
625 |
-
multistep.$btn_prev.click
|
626 |
multistep.moveToStep(multistep.currentStep - 1);
|
627 |
});
|
628 |
multistep.moveToStep(1);
|
@@ -660,16 +660,6 @@ Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
|
|
660 |
contentType: false,
|
661 |
dataType: 'json'
|
662 |
}).done(function (json) {
|
663 |
-
/*
|
664 |
-
* Insert _form_data_id if 'json variable' has
|
665 |
-
*/
|
666 |
-
// if (typeof json._cf7mls_db_form_data_id != 'undefined') {
|
667 |
-
// if (!form.find('input[name="_cf7mls_db_form_data_id"]').length) {
|
668 |
-
// form.append('<input type="hidden" name="_cf7mls_db_form_data_id" value="'+json._cf7mls_db_form_data_id+'" />');
|
669 |
-
// }
|
670 |
-
// }
|
671 |
-
//reset error messages
|
672 |
-
//$multistep.find('.wpcf7-form-control-wrap').removeClass('cf7mls-invalid');
|
673 |
$multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
|
674 |
$multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');
|
675 |
$multistep.find('.wpcf7-response-output').remove();
|
@@ -680,15 +670,13 @@ Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
|
|
680 |
jQuery.each(json.invalid_fields, function (index, el) {
|
681 |
if ($multistep.find('input[name="' + index + '"]').length || $multistep.find('input[name="' + index + '[]"]').length || $multistep.find('select[name="' + index + '"]').length || $multistep.find('select[name="' + index + '[]"]').length || $multistep.find('textarea[name="' + index + '"]').length || $multistep.find('textarea[name="' + index + '[]"]').length) {
|
682 |
checkError = checkError + 1;
|
683 |
-
var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);
|
684 |
-
|
685 |
controlWrap.find('input').addClass('wpcf7-not-valid');
|
686 |
controlWrap.find('span.wpcf7-not-valid-tip').remove();
|
687 |
-
controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>');
|
688 |
}
|
689 |
});
|
690 |
-
resolve('failed');
|
691 |
-
|
692 |
$multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);
|
693 |
} else if (json.success) {
|
694 |
resolve('success');
|
@@ -946,23 +934,27 @@ window.wpcf7cf = {
|
|
946 |
}
|
947 |
|
948 |
var condition_ok = false; // start by assuming that the condition is not met
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
949 |
|
950 |
-
if (
|
951 |
-
return !v || 0;
|
952 |
-
})) {
|
953 |
-
// no values or only empty values passed (0 is not considered empty)
|
954 |
if (operator === 'is empty') {
|
955 |
condition_ok = true;
|
956 |
}
|
957 |
-
|
958 |
-
if (operator === 'not empty') {
|
959 |
-
condition_ok = false;
|
960 |
-
}
|
961 |
} else {
|
962 |
-
if (operator === 'is empty') {
|
963 |
-
condition_ok = false;
|
964 |
-
}
|
965 |
-
|
966 |
if (operator === 'not empty') {
|
967 |
condition_ok = true;
|
968 |
}
|
@@ -1023,7 +1015,7 @@ jQuery('document').ready(function () {
|
|
1023 |
var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
|
1024 |
|
1025 |
jQuery.fn.wpcf7ExclusiveCheckbox = function () {
|
1026 |
-
return this.find('input:checkbox').click
|
1027 |
var name = jQuery(this).attr('name');
|
1028 |
jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
|
1029 |
});
|
461 |
wpcf7cf_settings: wpcf7cf_settings
|
462 |
};
|
463 |
this.params = params;
|
464 |
+
$button_add.on('click', null, repeater, function (e) {
|
465 |
var repeater = e.data;
|
466 |
repeater.updateSubs(params.$repeater.num_subs + 1);
|
467 |
});
|
468 |
+
$button_remove.on('click', null, repeater, function (e) {
|
469 |
var repeater = e.data;
|
470 |
repeater.updateSubs(params.$repeater.num_subs - 1);
|
471 |
});
|
612 |
}
|
613 |
}
|
614 |
}, _callee);
|
615 |
+
}))); // If form is submitted (by pressing return for example), and if we are not on the last step,
|
616 |
+
// then trigger click event on the $btn_next button instead.
|
617 |
|
618 |
multistep.form.$form.on('submit.wpcf7cf_step', function (e) {
|
619 |
if (multistep.currentStep !== multistep.numSteps) {
|
622 |
return false;
|
623 |
}
|
624 |
});
|
625 |
+
multistep.$btn_prev.on('click', function () {
|
626 |
multistep.moveToStep(multistep.currentStep - 1);
|
627 |
});
|
628 |
multistep.moveToStep(1);
|
660 |
contentType: false,
|
661 |
dataType: 'json'
|
662 |
}).done(function (json) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
663 |
$multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
|
664 |
$multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');
|
665 |
$multistep.find('.wpcf7-response-output').remove();
|
670 |
jQuery.each(json.invalid_fields, function (index, el) {
|
671 |
if ($multistep.find('input[name="' + index + '"]').length || $multistep.find('input[name="' + index + '[]"]').length || $multistep.find('select[name="' + index + '"]').length || $multistep.find('select[name="' + index + '[]"]').length || $multistep.find('textarea[name="' + index + '"]').length || $multistep.find('textarea[name="' + index + '[]"]').length) {
|
672 |
checkError = checkError + 1;
|
673 |
+
var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);
|
|
|
674 |
controlWrap.find('input').addClass('wpcf7-not-valid');
|
675 |
controlWrap.find('span.wpcf7-not-valid-tip').remove();
|
676 |
+
controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>');
|
677 |
}
|
678 |
});
|
679 |
+
resolve('failed');
|
|
|
680 |
$multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);
|
681 |
} else if (json.success) {
|
682 |
resolve('success');
|
934 |
}
|
935 |
|
936 |
var condition_ok = false; // start by assuming that the condition is not met
|
937 |
+
// Considered EMPTY: [] [''] [null] ['',null] [,,'']
|
938 |
+
// Considered NOT EMPTY: [0] ['ab','c'] ['',0,null]
|
939 |
+
|
940 |
+
var valuesAreEmpty = values.length === 0 || values.every(function (v) {
|
941 |
+
return !v && v !== 0;
|
942 |
+
}); // 0 is not considered empty
|
943 |
+
// special cases: [] equals '' => TRUE; [] not equals '' => FALSE
|
944 |
+
|
945 |
+
if (operator === 'equals' && testValue === '' && valuesAreEmpty) {
|
946 |
+
return true;
|
947 |
+
}
|
948 |
+
|
949 |
+
if (operator === 'not equals' && testValue === '' && valuesAreEmpty) {
|
950 |
+
return false;
|
951 |
+
}
|
952 |
|
953 |
+
if (valuesAreEmpty) {
|
|
|
|
|
|
|
954 |
if (operator === 'is empty') {
|
955 |
condition_ok = true;
|
956 |
}
|
|
|
|
|
|
|
|
|
957 |
} else {
|
|
|
|
|
|
|
|
|
958 |
if (operator === 'not empty') {
|
959 |
condition_ok = true;
|
960 |
}
|
1015 |
var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
|
1016 |
|
1017 |
jQuery.fn.wpcf7ExclusiveCheckbox = function () {
|
1018 |
+
return this.find('input:checkbox').on('click', function () {
|
1019 |
var name = jQuery(this).attr('name');
|
1020 |
jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
|
1021 |
});
|
js/scripts.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/scripts_es6.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/module.js"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_change_time_ms","window","wpcf7cf_running_tests","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","String","prototype","endsWith","search","this_len","undefined","length","substring","Wpcf7cfForm","$form","options_element","find","eq","val","form","form_options","JSON","parse","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","i","condition","and_rules","if_field","if_value","operator","initial_conditions","settings","$groups","jQuery","repeaters","multistep","fields","animation_intime","parseInt","animation_outtime","animation","updateGroups","updateEventListeners","displayFields","on","e","data","setTimeout","resetRepeaters","moveToStep","each","push","Wpcf7cfRepeater","stringify","map","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","forEach","repeater","updateSubs","initial_subs","wpcf7cf","get_simplified_dom_model","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","Array","canvas","width","$sig_canvas","$sig_wrap","height","addClass","show_group","should_group_be_shown","then_field","removeClass","index","$group","is","finish","css","hasClass","prop","show","trigger","animate","$inputs","not","$this","defaultValue","defaultChecked","selected","defaultSelected","$select","change","hide","updateHiddenFields","updateSummaryFields","$summary","fd","FormData","formdata","serializeArray","key","input","append","name","value","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","success","json","html","summaryHtml","hidden_fields","hidden_groups","visible_groups","get_nested_conditions","off","clearTimeout","text","$","num_subs","orig_id","min","max","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","orig_name","new_name","replace","prev_data_id","orig_data_id","new_data_id","prev_id","new_id","prev_for","orig_for","new_for","repeater_sub_html","outerHTML","$repeater_count_field","$button_add","$button_remove","click","remove","subs_to_show","subs_to_add","removeSubs","addSubs","showButtonRemove","showButtonAdd","html_str","sub_suffix","RegExp","$html","insertBefore","updateMultistepState","cf7mdInit","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","currentStep","numSteps","validateStep","result","stopImmediatePropagation","document","ajaxComplete","xhr","hasOwnProperty","responseJSON","status","into","step_index","Promise","resolve","el","files","file","fieldName","checkError","invalid_fields","controlWrap","reason","parent","message","fail","always","previousStep","formEl","topOffset","getBoundingClientRect","top","scrollIntoView","behavior","getFieldsInStep","simpleDom","inStep","filter","step","initForm","$current_form","simplified_dom","groups","sub_conditions","g","relevant_conditions","original_name","and_rule","suffix","concat","currentNode","ni","createNodeIterator","NodeFilter","SHOW_ELEMENT","nextNode","classList","contains","dataset","className","hasAttribute","getAttribute","original_name_length","stepsData","fieldsInCurrentStep","$submit_button","$ajax_loader","detach","appendTo","and_rule_i","condition_ok","condition_and_rule","$field","if_val","if_val_as_number","isFinite","parseFloat","regex_patt","isValidRegex","all_values","checked_values","isConditionTrue","values","testValue","isArray","every","v","testValueNumber","NaN","valueNumber","valsAreNumbers","isNaN","test","ready","f","old_wpcf7ExclusiveCheckbox","fn","wpcf7ExclusiveCheckbox","asyncGeneratorStep","gen","reject","_next","_throw","arg","info","error","then","_asyncToGenerator","self","args","arguments","apply","err","module","exports","require","runtime","Op","Object","hasOwn","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","obj","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","displayName","defineIteratorMethods","method","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","record","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","keys","object","reverse","pop","iterable","iteratorMethod","skipTempReset","prev","charAt","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","webpackPolyfill","deprecate","paths","defineProperty","enumerable","get","l"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eA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A,SAAOjC,OAAP;AAED,CA5rBc,EA6rBb;AACA;AACA;AACA;AACA,8BAAOD,MAAP,OAAkB,QAAlB,GAA6BA,MAAM,CAACC,OAApC,GAA8C,EAjsBjC,CAAf;;AAosBA,IAAI;AACF+G,oBAAkB,GAAG7G,OAArB;AACD,CAFD,CAEE,OAAO8G,oBAAP,EAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,UAAQ,CAAC,GAAD,EAAM,wBAAN,CAAR,CAAwC/G,OAAxC;AACD,C;;;;;;;;;;;;ACxtBDH,MAAM,CAACC,OAAP,GAAiB,UAASD,MAAT,EAAiB;AACjC,MAAI,CAACA,MAAM,CAACmH,eAAZ,EAA6B;AAC5BnH,UAAM,CAACoH,SAAP,GAAmB,YAAW,CAAE,CAAhC;;AACApH,UAAM,CAACqH,KAAP,GAAe,EAAf,CAF4B,CAG5B;;AACA,QAAI,CAACrH,MAAM,CAAC/J,QAAZ,EAAsB+J,MAAM,CAAC/J,QAAP,GAAkB,EAAlB;AACtBoK,UAAM,CAACiH,cAAP,CAAsBtH,MAAtB,EAA8B,QAA9B,EAAwC;AACvCuH,gBAAU,EAAE,IAD2B;AAEvCC,SAAG,EAAE,eAAW;AACf,eAAOxH,MAAM,CAACyH,CAAd;AACA;AAJsC,KAAxC;AAMApH,UAAM,CAACiH,cAAP,CAAsBtH,MAAtB,EAA8B,IAA9B,EAAoC;AACnCuH,gBAAU,EAAE,IADuB;AAEnCC,SAAG,EAAE,eAAW;AACf,eAAOxH,MAAM,CAAClR,CAAd;AACA;AAJkC,KAApC;AAMAkR,UAAM,CAACmH,eAAP,GAAyB,CAAzB;AACA;;AACD,SAAOnH,MAAP;AACA,CArBD,C","file":"scripts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js/scripts_es6.js\");\n","\"use strict\";\n\nvar cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon\n\nvar wpcf7cf_timeout;\nvar wpcf7cf_change_time_ms = window.wpcf7cf_running_tests ? 0 : 100;\n\nvar wpcf7cf_show_animation = { \"height\": \"show\", \"marginTop\": \"show\", \"marginBottom\": \"show\", \"paddingTop\": \"show\", \"paddingBottom\": \"show\" };\nvar wpcf7cf_hide_animation = { \"height\": \"hide\", \"marginTop\": \"hide\", \"marginBottom\": \"hide\", \"paddingTop\": \"hide\", \"paddingBottom\": \"hide\" };\n\nvar wpcf7cf_show_step_animation = { \"opacity\": \"show\" };\nvar wpcf7cf_hide_step_animation = { \"opacity\": \"hide\" };\n\nvar wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';\n\nvar wpcf7cf_forms = [];\n\n// endswith polyfill\nif (!String.prototype.endsWith) {\n\tString.prototype.endsWith = function(search, this_len) {\n\t\tif (this_len === undefined || this_len > this.length) {\n\t\t\tthis_len = this.length;\n\t\t}\n\t\treturn this.substring(this_len - search.length, this_len) === search;\n\t};\n}\n\nvar Wpcf7cfForm = function($form) {\n\n var options_element = $form.find('input[name=\"_wpcf7cf_options\"]').eq(0);\n if (!options_element.length || !options_element.val()) {\n // doesn't look like a CF7 form created with conditional fields plugin enabled.\n return false;\n }\n\n var form = this;\n\n var form_options = JSON.parse(options_element.val());\n\n form.$form = $form;\n form.$input_hidden_group_fields = $form.find('[name=\"_wpcf7cf_hidden_group_fields\"]');\n form.$input_hidden_groups = $form.find('[name=\"_wpcf7cf_hidden_groups\"]');\n form.$input_visible_groups = $form.find('[name=\"_wpcf7cf_visible_groups\"]');\n form.$input_repeaters = $form.find('[name=\"_wpcf7cf_repeaters\"]');\n form.$input_steps = $form.find('[name=\"_wpcf7cf_steps\"]');\n\n form.unit_tag = $form.closest('.wpcf7').attr('id');\n form.conditions = form_options['conditions'];\n\n // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )\n for (var i=0; i < form.conditions.length; i++) {\n var condition = form.conditions[i];\n if (!('and_rules' in condition)) {\n condition.and_rules = [{'if_field':condition.if_field,'if_value':condition.if_value,'operator':condition.operator}];\n }\n }\n\n form.initial_conditions = form.conditions;\n form.settings = form_options['settings'];\n\n form.$groups = jQuery(); // empty jQuery set\n form.repeaters = [];\n form.multistep = null;\n form.fields = [];\n\n form.settings.animation_intime = parseInt(form.settings.animation_intime);\n form.settings.animation_outtime = parseInt(form.settings.animation_outtime);\n\n if (form.settings.animation === 'no') {\n form.settings.animation_intime = 0;\n form.settings.animation_outtime = 0;\n }\n\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // bring form in initial state if the reset event is fired on it.\n form.$form.on('reset.wpcf7cf', form, function(e) {\n var form = e.data;\n setTimeout(function(){\n form.displayFields();\n form.resetRepeaters();\n if (form.multistep != null) {\n form.multistep.moveToStep(1); \n }\n },200);\n });\n\n // PRO ONLY\n\n jQuery('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)', $form).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n var $multistep = jQuery('.wpcf7cf_multistep', $form);\n\n if ($multistep.length) {\n form.multistep = new Wpcf7cfMultistep($multistep, form);\n // window.wpcf7cf.updateMultistepState(form.multistep);\n }\n\n // END PRO ONLY\n\n}\n\n/**\n * reset initial number of subs for each repeater.\n * (does not clear values)\n */\nWpcf7cfForm.prototype.resetRepeaters = function() {\n var form = this;\n form.repeaters.forEach(repeater => {\n repeater.updateSubs( repeater.params.$repeater.initial_subs );\n });\n}\n\nWpcf7cfForm.prototype.displayFields = function() {\n\n var form = this;\n\n window.wpcf7cf.get_simplified_dom_model(form.$form);\n\n var unit_tag = this.unit_tag;\n var wpcf7cf_conditions = this.conditions;\n var wpcf7cf_settings = this.settings;\n\n //for compatibility with contact-form-7-signature-addon\n if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0 ) {\n for (var i = 0; i < signatures.length; i++) {\n if (signatures[i].canvas.width === 0) {\n\n var $sig_canvas = jQuery(\".wpcf7-form-control-signature-body>canvas\");\n var $sig_wrap = jQuery(\".wpcf7-form-control-signature-wrap\");\n $sig_canvas.eq(i).attr('width', $sig_wrap.width());\n $sig_canvas.eq(i).attr('height', $sig_wrap.height());\n\n cf7signature_resized = 1;\n }\n }\n }\n\n form.$groups.addClass('wpcf7cf-hidden');\n\n for (var i=0; i < wpcf7cf_conditions.length; i++) {\n\n var condition = wpcf7cf_conditions[i];\n\n var show_group = window.wpcf7cf.should_group_be_shown(condition, form.$form);\n\n if (show_group) {\n jQuery('[data-id=\"'+condition.then_field+'\"]',form.$form).eq(0).removeClass('wpcf7cf-hidden');\n }\n }\n\n var animation_intime = wpcf7cf_settings.animation_intime;\n var animation_outtime = wpcf7cf_settings.animation_outtime;\n\n form.$groups.each(function (index) {\n var $group = jQuery(this);\n if ($group.is(':animated')) $group.finish(); // stop any current animations on the group\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group');\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show\n }\n } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {\n\n if ($group.attr('data-clear_on_hide') !== undefined) {\n var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');\n\n $inputs.each(function(){\n var $this = jQuery(this);\n $this.val(this.defaultValue);\n $this.prop('checked', this.defaultChecked);\n });\n\n jQuery('option', $group).each(function() {\n this.selected = this.defaultSelected;\n });\n\n jQuery('select', $group).each(function() {\n const $select = jQuery(this);\n if ($select.val() === null) {\n $select.val(jQuery(\"option:first\",$select).val());\n }\n });\n\n $inputs.change();\n //display_fields();\n }\n\n if ($group.prop('tagName') === 'SPAN') {\n $group.hide().trigger('wpcf7cf_hide_group');\n } else {\n $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide\n }\n\n }\n });\n\n form.updateHiddenFields();\n form.updateSummaryFields();\n};\n\nWpcf7cfForm.prototype.updateSummaryFields = function() {\n var $summary = jQuery('.wpcf7cf-summary', this.$form);\n\n if ($summary.length == 0 || !$summary.is(':visible')) return;\n\n var fd = new FormData();\n\n var formdata = this.$form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_get_summary',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n success: function(json) {\n $summary.html(json.summaryHtml);\n }\n });\n};\n\nWpcf7cfForm.prototype.updateHiddenFields = function() {\n\n var form = this;\n\n var hidden_fields = [];\n var hidden_groups = [];\n var visible_groups = [];\n\n form.$groups.each(function () {\n var $this = jQuery(this);\n if ($this.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($this.data('id'));\n $this.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n } else {\n visible_groups.push($this.data('id'));\n }\n });\n\n form.hidden_fields = hidden_fields;\n form.hidden_groups = hidden_groups;\n form.visible_groups = visible_groups;\n\n form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));\n form.$input_hidden_groups.val(JSON.stringify(hidden_groups));\n form.$input_visible_groups.val(JSON.stringify(visible_groups));\n\n return true;\n};\nWpcf7cfForm.prototype.updateGroups = function() {\n var form = this;\n form.$groups = form.$form.find('[data-class=\"wpcf7cf_group\"]');\n\n form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);\n\n};\nWpcf7cfForm.prototype.updateEventListeners = function() {\n\n var form = this;\n\n // monitor input changes, and call display_fields() if something has changed\n jQuery('input, select, textarea, button',form.$form).not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events,form, function(e) {\n var form = e.data;\n clearTimeout(wpcf7cf_timeout);\n wpcf7cf_timeout = setTimeout(function() {\n form.displayFields();\n }, wpcf7cf_change_time_ms);\n });\n\n // PRO ONLY\n jQuery('.wpcf7cf-togglebutton', form.$form).off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.data('val-1')) {\n $this.text($this.data('val-2'));\n $this.val($this.data('val-2'));\n } else {\n $this.text($this.data('val-1'));\n $this.val($this.data('val-1'));\n }\n });\n // END PRO ONLY\n};\n\n// PRO ONLY\nfunction Wpcf7cfRepeater($repeater, form) {\n var $ = jQuery;\n\n var repeater = this;\n\n var wpcf7cf_settings = form.settings;\n\n repeater.form = form;\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.data('id');\n $repeater.orig_id = $repeater.data('orig_data_id');\n $repeater.min = typeof( $repeater.data('min')) !== 'undefined' ? parseInt($repeater.data('min')) : 1;\n $repeater.max = typeof( $repeater.data('max')) !== 'undefined' ? parseInt($repeater.data('max')) : 200;\n $repeater.initial_subs = typeof( $repeater.data('initial')) !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;\n if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;\n var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);\n var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);\n\n var $repeater_sub_clone = $repeater_sub.clone();\n\n $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function() {\n var $this = jQuery(this);\n var prev_suffix = $this.attr('data-repeater_sub_suffix');\n var new_suffix = prev_suffix+'__{{repeater_sub_suffix}}';\n $this.attr('data-repeater_sub_suffix', new_suffix);\n });\n\n $repeater_sub_clone.find('[name]').each(function() {\n var $this = jQuery(this);\n var prev_name = $this.attr('name');\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\n var new_name = prev_name+'__{{repeater_sub_suffix}}';\n\n if(prev_name.endsWith('_count')) {\n new_name = prev_name.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('name', new_name);\n $this.attr('data-orig_name', orig_name);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_name);\n });\n\n $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class=\"wpcf7cf_group\"]').each(function() {\n var $this = jQuery(this);\n var prev_data_id = $this.attr('data-id');\n var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;\n var new_data_id = prev_data_id+'__{{repeater_sub_suffix}}';\n\n if(prev_data_id.endsWith('_count')) {\n new_data_id = prev_data_id.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('data-id', new_data_id);\n $this.attr('data-orig_data_id', orig_data_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_data_id);\n });\n\n $repeater_sub_clone.find('[id]').each(function() {\n var $this = jQuery(this);\n var prev_id = $this.attr('id');\n var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;\n var new_id = prev_id+'__{{repeater_sub_suffix}}';\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_id);\n });\n\n $repeater_sub_clone.find('[for]').each(function() {\n var $this = jQuery(this);\n var prev_for = $this.attr('for');\n var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;\n var new_for = prev_for+'__{{repeater_sub_suffix}}';\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_for);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_for);\n });\n\n var repeater_sub_html = $repeater_sub_clone[0].outerHTML;\n\n var $repeater_count_field = $repeater.find('[name='+$repeater.id+'_count]').eq(0);\n var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);\n var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);\n\n var params = {\n $repeater: $repeater,\n $repeater_count_field: $repeater_count_field,\n repeater_sub_html: repeater_sub_html,\n $repeater_controls: $repeater_controls,\n $button_add: $button_add,\n $button_remove: $button_remove,\n wpcf7cf_settings: wpcf7cf_settings\n };\n \n this.params = params;\n\n $button_add.click( repeater, function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs+1);\n });\n\n $button_remove.click( repeater,function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs-1);\n });\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.\n\n repeater.updateSubs($repeater.initial_subs); \n\n}\n\n\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n var subs_to_add = subs_to_show - params.$repeater.num_subs;\n\n if (subs_to_add < 0) {\n repeater.removeSubs(-subs_to_add);\n } else if (subs_to_add > 0) {\n repeater.addSubs(subs_to_add);\n }\n\n var showButtonRemove = false;\n var showButtonAdd = false;\n\n if (params.$repeater.num_subs < params.$repeater.max) {\n showButtonAdd = true;\n }\n if (params.$repeater.num_subs > params.$repeater.min) {\n showButtonRemove = true;\n }\n\n if (showButtonAdd) {\n params.$button_add.show();\n } else {\n params.$button_add.hide();\n\n }\n\n if (showButtonRemove) {\n params.$button_remove.show();\n } else {\n params.$button_remove.hide();\n }\n\n params.$repeater_count_field.val(subs_to_show);\n\n};\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add) {\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n\n\n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n //jQuery(params.repeater_sub_html.replace(/name=\"(.*?)\"/g,'name=\"wpcf7cf_repeater['+$repeater.id+']['+$repeater.num_subs+'][$1]\" data-original-name=\"$1\"')).hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime);\n\n var html_str = '';\n\n for(var i=1; i<=subs_to_add; i++) {\n var sub_suffix = $repeater.num_subs+i;\n html_str += params.repeater_sub_html.replace(/\\{\\{repeater_sub_suffix\\}\\}/g,sub_suffix)\n .replace(new RegExp('\\{\\{'+$repeater.orig_id+'_index\\}\\}','g'),sub_suffix);\n }\n\n\n var $html = jQuery(html_str);\n\n // Add the newly created fields to the form\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n\n jQuery('.wpcf7cf_repeater', $html).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n $repeater.num_subs+= subs_to_add;\n\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // Exclusive Checkbox\n $html.on( 'click', '.wpcf7-exclusive-checkbox input:checkbox', function() {\n var name = $( this ).attr( 'name' );\n $html.find( 'input:checkbox[name=\"' + name + '\"]' ).not( this ).prop( 'checked', false );\n } );\n\n //basic compatibility with material-design-for-contact-form-7\n if (typeof window.cf7mdInit === \"function\") {\n window.cf7mdInit();\n }\n\n return false;\n};\nWpcf7cfRepeater.prototype.removeSubs = function(num_subs) {\n var $ = jQuery;\n var params = this.params;\n var form = this.form;\n\n params.$repeater.num_subs-= num_subs;\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {duration:params.wpcf7cf_settings.animation_intime, done:function() {\n var $this = jQuery(this);\n //remove the actual fields from the form\n $this.remove();\n params.$repeater.trigger('wpcf7cf_repeater_removed');\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n }});\n\n return false;\n};\n\nfunction Wpcf7cfMultistep($multistep, form) {\n var multistep = this;\n multistep.$multistep = $multistep;\n multistep.form = form;\n multistep.$steps = $multistep.find('.wpcf7cf_step');\n multistep.$btn_next = $multistep.find('.wpcf7cf_next');\n multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');\n multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');\n multistep.currentStep = 0;\n multistep.numSteps = multistep.$steps.length;\n\n\n multistep.$dots.html('');\n for (var i = 1; i <= multistep.numSteps; i++) {\n multistep.$dots.append(`\n <div class=\"dot\" data-step=\"${i}\">\n <div class=\"step-index\">${i}</div>\n <div class=\"step-title\">${multistep.$steps.eq(i-1).data('title')}</div>\n </div>\n `);\n }\n\n multistep.$btn_next.on('click.wpcf7cf_step', async function() {\n \n var result = await multistep.validateStep(multistep.currentStep);\n if (result === 'success') {\n multistep.moveToStep(multistep.currentStep+1); \n }\n\n });\n\n // If form is submitted (by pressing retrun for example), and if we are not on the last step,\n // then trigger click event on the $next button instead.\n multistep.form.$form.on('submit.wpcf7cf_step', function(e) {\n\n if (multistep.currentStep !== multistep.numSteps) {\n multistep.$btn_next.trigger('click.wpcf7cf_step');\n\n e.stopImmediatePropagation();\n return false;\n }\n });\n\n multistep.$btn_prev.click(function() {\n multistep.moveToStep(multistep.currentStep-1);\n });\n\n multistep.moveToStep(1);\n}\n\njQuery(document).ajaxComplete(function(e, xhr, settings){\n if (\n xhr.hasOwnProperty('responseJSON') &&\n xhr.responseJSON != null &&\n xhr.responseJSON.hasOwnProperty('status') &&\n xhr.responseJSON.hasOwnProperty('into') &&\n xhr.responseJSON.status === \"mail_success\"\n ) {\n jQuery( xhr.responseJSON.into ).trigger('reset.wpcf7cf');\n }\n});\n\nWpcf7cfMultistep.prototype.validateStep = function(step_index) {\n\n var multistep = this;\n var $multistep = multistep.$multistep;\n var $form = multistep.form.$form;\n\n $form.find('.wpcf7-response-output').addClass('wpcf7-display-none');\n\n return new Promise(resolve => {\n\n var fd = new FormData();\n\n // Make sure to add file fields to FormData\n jQuery.each($form.find('[data-id=\"step-'+step_index+'\"] input[type=\"file\"]'), function(index, el) {\n if (! el.files.length) return false;\n const file = el.files[0];\n const fieldName = el.name;\n fd.append(fieldName, file);\n });\n\n var formdata = $form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n }).done(function(json) {\n\n /*\n * Insert _form_data_id if 'json variable' has\n */\n // if (typeof json._cf7mls_db_form_data_id != 'undefined') {\n // if (!form.find('input[name=\"_cf7mls_db_form_data_id\"]').length) {\n // form.append('<input type=\"hidden\" name=\"_cf7mls_db_form_data_id\" value=\"'+json._cf7mls_db_form_data_id+'\" />');\n // }\n // }\n\n //reset error messages\n //$multistep.find('.wpcf7-form-control-wrap').removeClass('cf7mls-invalid');\n $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();\n $multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');\n $multistep.find('.wpcf7-response-output').remove();\n $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');\n\n if (!json.success) {\n var checkError = 0;\n\n jQuery.each(json.invalid_fields, function(index, el) {\n if ($multistep.find('input[name=\"'+index+'\"]').length ||\n $multistep.find('input[name=\"'+index+'[]\"]').length ||\n $multistep.find('select[name=\"'+index+'\"]').length ||\n $multistep.find('select[name=\"'+index+'[]\"]').length ||\n $multistep.find('textarea[name=\"'+index+'\"]').length ||\n $multistep.find('textarea[name=\"'+index+'[]\"]').length\n ) {\n checkError = checkError + 1;\n\n var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);\n //controlWrap.addClass('cf7mls-invalid');\n controlWrap.find('input').addClass('wpcf7-not-valid');\n controlWrap.find('span.wpcf7-not-valid-tip').remove();\n controlWrap.append('<span role=\"alert\" class=\"wpcf7-not-valid-tip\">' + el.reason + '</span>');\n\n //return false;\n }\n });\n\n resolve('failed');\n //$multistep.append('<div class=\"wpcf7-response-output wpcf7-display-none wpcf7-validation-errors\" style=\"display: block;\" role=\"alert\">' + json.message + '</div>');\n\n $multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);\n\n } else if (json.success) {\n resolve('success');\n return false;\n }\n\n }).fail(function() {\n resolve('error');\n }).always(function() {\n // do nothing\n });\n });\n\n};\nWpcf7cfMultistep.prototype.moveToStep = function(step_index) {\n var multistep = this;\n var previousStep = multistep.currentStep;\n\n multistep.currentStep = step_index > multistep.numSteps ? multistep.numSteps\n : step_index < 1 ? 1\n : step_index;\n\n // ANIMATION DISABLED FOR NOW cause it's ugly\n // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);\n // multistep.$steps.eq(multistep.currentStep-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);\n\n multistep.$multistep.attr('data-current_step', multistep.currentStep);\n multistep.$steps.hide();\n multistep.$steps\n .eq(multistep.currentStep-1)\n .show()\n .trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);\n\n const formEl = multistep.form.$form[0];\n const topOffset = formEl.getBoundingClientRect().top;\n if (topOffset < 0 && previousStep > 0) {\n formEl.scrollIntoView({behavior: \"smooth\"});\n }\n\n multistep.form.updateSummaryFields();\n\n window.wpcf7cf.updateMultistepState(multistep);\n};\n\nWpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {\n var simpleDom = window.wpcf7cf.get_simplified_dom_model(this.form.$form);\n var inStep = false;\n return simpleDom.filter(function(item, i) {\n if(item.type == 'step') {\n inStep = item.step == step_index+'';\n }\n return inStep && item.type == 'input';\n }).map(function(item) {\n return item.name;\n });\n};\n\n// END PRO ONLY\n\nwindow.wpcf7cf = {\n\n // keep this for backwards compatibility\n initForm : function($form) {\n wpcf7cf_forms.push(new Wpcf7cfForm($form));\n },\n\n get_nested_conditions : function(conditions, $current_form) {\n //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index\n var simplified_dom = window.wpcf7cf.get_simplified_dom_model($current_form);\n var groups = simplified_dom.filter(function(item, i) {\n return item.type==='group';\n });\n\n var sub_conditions = [];\n\n for(var i = 0; i < groups.length; i++) {\n var g = groups[i];\n var relevant_conditions = conditions.filter(function(condition, i) {\n return condition.then_field === g.original_name;\n });\n \n var relevant_conditions = relevant_conditions.map(function(item,i) {\n return {\n then_field : g.name,\n and_rules : item.and_rules.map(function(and_rule, i) {\n return {\n if_field : and_rule.if_field+g.suffix,\n if_value : and_rule.if_value,\n operator : and_rule.operator\n };\n })\n }\n });\n\n sub_conditions = sub_conditions.concat(relevant_conditions);\n }\n return conditions.concat(sub_conditions);\n },\n\n get_simplified_dom_model : function($current_form) {\n // if the dom is something like:\n // <form>\n // <repeater ra>\n // <group ga__1>\n // <repeater rb__1>\n // <input txta__1__1 />\n // <input txta__1__2 />\n // </repeater>\n // <group gb__1>\n // <input txtb__1 />\n // </group>\n // </group>\n // <group ga__2>\n // <repeater rb__2>\n // <input txta__2__1 />\n // </repeater>\n // <group gb__2>\n // <input txtb__2 />\n // </group>\n // </group>\n // </repeater>\n // </form>\n // \n // return something like:\n // [{type:repeater, name:'ra', suffix: '__1'}, {type: group, name:'ga', suffix: '__1'}, ...]\n\n var currentNode;\n var ni = document.createNodeIterator($current_form[0], NodeFilter.SHOW_ELEMENT, null, false); //, NodeFilter.SHOW_ELEMENT, function(){ return NodeFilter.FILTER_ACCEPT; }\n\n var simplified_dom = [];\n\n while(currentNode = ni.nextNode()) {\n if (currentNode.classList.contains('wpcf7cf_repeater')) {\n simplified_dom.push({type:'repeater', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.dataset.class == 'wpcf7cf_group') {\n simplified_dom.push({type:'group', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.className == 'wpcf7cf_step') {\n simplified_dom.push({type:'step', name:currentNode.dataset.id, original_name:currentNode.dataset.id, step: currentNode.dataset.id.substring(5)})\n } else if (currentNode.hasAttribute('name')) {\n simplified_dom.push({type:'input', name:currentNode.getAttribute('name'), original_name:currentNode.getAttribute('data-orig_name')})\n }\n }\n\n simplified_dom = simplified_dom.map(function(item, i){\n var original_name_length = item.original_name == null ? item.name.length : item.original_name.length;\n item.suffix = item.name.substring(original_name_length);\n return item;\n });\n\n //console.table(simplified_dom);\n return simplified_dom;\n\n },\n\n updateMultistepState: function (multistep) {\n if (multistep == null) return;\n\n // update hidden input field\n\n var stepsData = {\n currentStep : multistep.currentStep,\n numSteps : multistep.numSteps,\n fieldsInCurrentStep : multistep.getFieldsInStep(multistep.currentStep)\n };\n multistep.form.$input_steps.val(JSON.stringify(stepsData));\n\n // update Buttons\n multistep.$btn_prev.removeClass('disabled');\n multistep.$btn_next.removeClass('disabled');\n if (multistep.currentStep == multistep.numSteps) {\n multistep.$btn_next.addClass('disabled');\n }\n if (multistep.currentStep == 1) {\n multistep.$btn_prev.addClass('disabled');\n }\n\n // replace next button with submit button on last step.\n // TODO: make this depend on a setting\n var $submit_button = multistep.form.$form.find('input[type=\"submit\"]').eq(0);\n var $ajax_loader = multistep.form.$form.find('.ajax-loader').eq(0);\n if (multistep.currentStep == multistep.numSteps) {\n multistep.$btn_next.hide();\n $ajax_loader.detach().appendTo(multistep.$btn_next.parent());\n $submit_button.detach().appendTo(multistep.$btn_next.parent());\n $submit_button.show();\n } else {\n $submit_button.hide();\n multistep.$btn_next.show();\n }\n\n // update dots\n var $dots = multistep.$dots.find('.dot');\n $dots.removeClass('active').removeClass('completed');\n for(var step = 1; step <= multistep.numSteps; step++) {\n if (step < multistep.currentStep) {\n $dots.eq(step-1).addClass('completed');\n } else if (step == multistep.currentStep) {\n $dots.eq(step-1).addClass('active');\n }\n }\n\n },\n\n should_group_be_shown : function(condition, $current_form) {\n\n var $ = jQuery;\n\n var show_group = true;\n\n for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {\n\n var condition_ok = false;\n\n var condition_and_rule = condition.and_rules[and_rule_i];\n\n var $field = jQuery('[name=\"' + condition_and_rule.if_field + '\"], [name=\"' + condition_and_rule.if_field + '[]\"], [data-original-name=\"' + condition_and_rule.if_field + '\"], [data-original-name=\"' + condition_and_rule.if_field + '[]\"]',$current_form);\n\n var if_val = condition_and_rule.if_value;\n var if_val_as_number = isFinite(parseFloat(if_val)) ? parseFloat(if_val):0;\n var operator = condition_and_rule.operator;\n \n var regex_patt = /.*/i; // fallback regex pattern\n var isValidRegex = true;\n try {\n regex_patt = new RegExp(if_val, 'i');\n } catch(e) {\n isValidRegex = false;\n }\n\n\n //backwards compat\n operator = operator === '≤' ? 'less than or equals' : operator;\n operator = operator === '≥' ? 'greater than or equals' : operator;\n operator = operator === '>' ? 'greater than' : operator;\n operator = operator === '<' ? 'less than' : operator;\n\n\n if ( $field.is(':checkbox') || $field.is(':radio') ) {\n\n var all_values = [];\n var checked_values = [];\n $field.each(function () {\n all_values.push(jQuery(this).val());\n if (jQuery(this).is(':checked')) {\n checked_values.push(jQuery(this).val());\n }\n });\n\n condition_ok = this.isConditionTrue(checked_values,operator,if_val,$field);\n \n } else {\n \n condition_ok = this.isConditionTrue($field.val(),operator,if_val,$field);\n }\n\n show_group = show_group && condition_ok;\n }\n\n return show_group;\n\n },\n isConditionTrue(values, operator, testValue='', $field=jQuery()) {\n\n if (!Array.isArray(values)) {\n values = [values];\n }\n\n let condition_ok = false; // start by assuming that the condition is not met\n\n if (!values || values.length == 0 || values.every((v) => !v||0)) { // no values or only empty values passed (0 is not considered empty)\n if (operator === 'is empty') {\n condition_ok = true;\n }\n if (operator === 'not empty') {\n condition_ok = false;\n }\n } else {\n if (operator === 'is empty') {\n condition_ok = false;\n }\n if (operator === 'not empty') {\n condition_ok = true;\n }\n }\n\n const testValueNumber = isFinite(parseFloat(testValue)) ? parseFloat(testValue) : NaN;\n\n\n if (operator === 'not equals' || operator === 'not equals (regex)') {\n // start by assuming that the condition is met\n condition_ok = true;\n }\n\n if (\n operator === 'function'\n && typeof window[testValue] == 'function'\n && window[testValue]($field) // here we call the actual user defined function\n ) {\n condition_ok = true;\n }\n\n let regex_patt = /.*/i; // fallback regex pattern\n let isValidRegex = true;\n if (operator === 'equals (regex)' || operator === 'not equals (regex)') {\n try {\n regex_patt = new RegExp(testValue, 'i');\n } catch(e) {\n isValidRegex = false;\n }\n }\n\n\n for(let i = 0; i < values.length; i++) {\n\n const value = values[i];\n\n const valueNumber = isFinite(parseFloat(value)) ? parseFloat(value) : NaN;\n const valsAreNumbers = !isNaN(valueNumber) && !isNaN(testValueNumber);\n\n if (\n\n operator === 'equals' && value === testValue ||\n operator === 'equals (regex)' && regex_patt.test(value) ||\n operator === 'greater than' && valsAreNumbers && valueNumber > testValueNumber ||\n operator === 'less than' && valsAreNumbers && valueNumber < testValueNumber ||\n operator === 'greater than or equals' && valsAreNumbers && valueNumber >= testValueNumber ||\n operator === 'less than or equals' && valsAreNumbers && valueNumber <= testValueNumber\n \n ) {\n\n condition_ok = true;\n break;\n\n } else if (\n\n operator === 'not equals' && value === testValue ||\n operator === 'not equals (regex)' && regex_patt.test(value)\n\n ) {\n\n condition_ok = false;\n break;\n\n }\n }\n\n return condition_ok;\n\n }\n\n};\n\n\n\n\njQuery('.wpcf7-form').each(function(){\n wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));\n});\n\n// Call displayFields again on all forms\n// Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.\njQuery('document').ready(function() {\n wpcf7cf_forms.forEach(function(f){\n f.displayFields();\n });\n});\n\n// fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)\nvar old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;\njQuery.fn.wpcf7ExclusiveCheckbox = function() {\n return this.find('input:checkbox').click(function() {\n var name = jQuery(this).attr('name');\n jQuery(this).closest('form').find('input:checkbox[name=\"' + name + '\"]').not(this).prop('checked', false).eq(0).change();\n });\n};\n\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/scripts_es6.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/module.js"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_change_time_ms","window","wpcf7cf_running_tests","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","String","prototype","endsWith","search","this_len","undefined","length","substring","Wpcf7cfForm","$form","options_element","find","eq","val","form","form_options","JSON","parse","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","i","condition","and_rules","if_field","if_value","operator","initial_conditions","settings","$groups","jQuery","repeaters","multistep","fields","animation_intime","parseInt","animation_outtime","animation","updateGroups","updateEventListeners","displayFields","on","e","data","setTimeout","resetRepeaters","moveToStep","each","push","Wpcf7cfRepeater","stringify","map","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","forEach","repeater","updateSubs","initial_subs","wpcf7cf","get_simplified_dom_model","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","Array","canvas","width","$sig_canvas","$sig_wrap","height","addClass","show_group","should_group_be_shown","then_field","removeClass","index","$group","is","finish","css","hasClass","prop","show","trigger","animate","$inputs","not","$this","defaultValue","defaultChecked","selected","defaultSelected","$select","change","hide","updateHiddenFields","updateSummaryFields","$summary","fd","FormData","formdata","serializeArray","key","input","append","name","value","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","success","json","html","summaryHtml","hidden_fields","hidden_groups","visible_groups","get_nested_conditions","off","clearTimeout","text","$","num_subs","orig_id","min","max","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","orig_name","new_name","replace","prev_data_id","orig_data_id","new_data_id","prev_id","new_id","prev_for","orig_for","new_for","repeater_sub_html","outerHTML","$repeater_count_field","$button_add","$button_remove","remove","subs_to_show","subs_to_add","removeSubs","addSubs","showButtonRemove","showButtonAdd","html_str","sub_suffix","RegExp","$html","insertBefore","updateMultistepState","cf7mdInit","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","currentStep","numSteps","validateStep","result","stopImmediatePropagation","document","ajaxComplete","xhr","hasOwnProperty","responseJSON","status","into","step_index","Promise","resolve","el","files","file","fieldName","checkError","invalid_fields","controlWrap","reason","parent","message","fail","always","previousStep","formEl","topOffset","getBoundingClientRect","top","scrollIntoView","behavior","getFieldsInStep","simpleDom","inStep","filter","step","initForm","$current_form","simplified_dom","groups","sub_conditions","g","relevant_conditions","original_name","and_rule","suffix","concat","currentNode","ni","createNodeIterator","NodeFilter","SHOW_ELEMENT","nextNode","classList","contains","dataset","className","hasAttribute","getAttribute","original_name_length","stepsData","fieldsInCurrentStep","$submit_button","$ajax_loader","detach","appendTo","and_rule_i","condition_ok","condition_and_rule","$field","if_val","if_val_as_number","isFinite","parseFloat","regex_patt","isValidRegex","all_values","checked_values","isConditionTrue","values","testValue","isArray","valuesAreEmpty","every","v","testValueNumber","NaN","valueNumber","valsAreNumbers","isNaN","test","ready","f","old_wpcf7ExclusiveCheckbox","fn","wpcf7ExclusiveCheckbox","asyncGeneratorStep","gen","reject","_next","_throw","arg","info","error","then","_asyncToGenerator","self","args","arguments","apply","err","module","exports","require","runtime","Op","Object","hasOwn","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","obj","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","displayName","defineIteratorMethods","method","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","record","unwrapped","previousPromise","enqueue","callInvokeWithMethodAndArg","async","iter","next","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","keys","object","reverse","pop","iterable","iteratorMethod","skipTempReset","prev","charAt","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","webpackPolyfill","deprecate","paths","defineProperty","enumerable","get","l"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;AAEb,IAAIA,oBAAoB,GAAG,CAA3B,C,CAA8B;;AAE9B,IAAIC,eAAJ;AACA,IAAIC,sBAAsB,GAAGC,MAAM,CAACC,qBAAP,GAA+B,CAA/B,GAAmC,GAAhE;AAEA,IAAIC,sBAAsB,GAAG;AAAE,YAAU,MAAZ;AAAoB,eAAa,MAAjC;AAAyC,kBAAgB,MAAzD;AAAiE,gBAAc,MAA/E;AAAuF,mBAAiB;AAAxG,CAA7B;AACA,IAAIC,sBAAsB,GAAG;AAAE,YAAU,MAAZ;AAAoB,eAAa,MAAjC;AAAyC,kBAAgB,MAAzD;AAAiE,gBAAc,MAA/E;AAAuF,mBAAiB;AAAxG,CAA7B;AAEA,IAAIC,2BAA2B,GAAG;AAAE,aAAW;AAAb,CAAlC;AACA,IAAIC,2BAA2B,GAAG;AAAE,aAAW;AAAb,CAAlC;AAEA,IAAIC,qBAAqB,GAAG,iFAA5B;AAEA,IAAIC,aAAa,GAAG,EAApB,C,CAEA;;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CAAC/J,QAAP,GAAkB,EAAlB;AACtBoK,UAAM,CAACiH,cAAP,CAAsBtH,MAAtB,EAA8B,QAA9B,EAAwC;AACvCuH,gBAAU,EAAE,IAD2B;AAEvCC,SAAG,EAAE,eAAW;AACf,eAAOxH,MAAM,CAACyH,CAAd;AACA;AAJsC,KAAxC;AAMApH,UAAM,CAACiH,cAAP,CAAsBtH,MAAtB,EAA8B,IAA9B,EAAoC;AACnCuH,gBAAU,EAAE,IADuB;AAEnCC,SAAG,EAAE,eAAW;AACf,eAAOxH,MAAM,CAAClR,CAAd;AACA;AAJkC,KAApC;AAMAkR,UAAM,CAACmH,eAAP,GAAyB,CAAzB;AACA;;AACD,SAAOnH,MAAP;AACA,CArBD,C","file":"scripts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js/scripts_es6.js\");\n","\"use strict\";\n\nvar cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon\n\nvar wpcf7cf_timeout;\nvar wpcf7cf_change_time_ms = window.wpcf7cf_running_tests ? 0 : 100;\n\nvar wpcf7cf_show_animation = { \"height\": \"show\", \"marginTop\": \"show\", \"marginBottom\": \"show\", \"paddingTop\": \"show\", \"paddingBottom\": \"show\" };\nvar wpcf7cf_hide_animation = { \"height\": \"hide\", \"marginTop\": \"hide\", \"marginBottom\": \"hide\", \"paddingTop\": \"hide\", \"paddingBottom\": \"hide\" };\n\nvar wpcf7cf_show_step_animation = { \"opacity\": \"show\" };\nvar wpcf7cf_hide_step_animation = { \"opacity\": \"hide\" };\n\nvar wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';\n\nvar wpcf7cf_forms = [];\n\n// endswith polyfill\nif (!String.prototype.endsWith) {\n\tString.prototype.endsWith = function(search, this_len) {\n\t\tif (this_len === undefined || this_len > this.length) {\n\t\t\tthis_len = this.length;\n\t\t}\n\t\treturn this.substring(this_len - search.length, this_len) === search;\n\t};\n}\n\nvar Wpcf7cfForm = function($form) {\n\n var options_element = $form.find('input[name=\"_wpcf7cf_options\"]').eq(0);\n if (!options_element.length || !options_element.val()) {\n // doesn't look like a CF7 form created with conditional fields plugin enabled.\n return false;\n }\n\n var form = this;\n\n var form_options = JSON.parse(options_element.val());\n\n form.$form = $form;\n form.$input_hidden_group_fields = $form.find('[name=\"_wpcf7cf_hidden_group_fields\"]');\n form.$input_hidden_groups = $form.find('[name=\"_wpcf7cf_hidden_groups\"]');\n form.$input_visible_groups = $form.find('[name=\"_wpcf7cf_visible_groups\"]');\n form.$input_repeaters = $form.find('[name=\"_wpcf7cf_repeaters\"]');\n form.$input_steps = $form.find('[name=\"_wpcf7cf_steps\"]');\n\n form.unit_tag = $form.closest('.wpcf7').attr('id');\n form.conditions = form_options['conditions'];\n\n // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )\n for (var i=0; i < form.conditions.length; i++) {\n var condition = form.conditions[i];\n if (!('and_rules' in condition)) {\n condition.and_rules = [{'if_field':condition.if_field,'if_value':condition.if_value,'operator':condition.operator}];\n }\n }\n\n form.initial_conditions = form.conditions;\n form.settings = form_options['settings'];\n\n form.$groups = jQuery(); // empty jQuery set\n form.repeaters = [];\n form.multistep = null;\n form.fields = [];\n\n form.settings.animation_intime = parseInt(form.settings.animation_intime);\n form.settings.animation_outtime = parseInt(form.settings.animation_outtime);\n\n if (form.settings.animation === 'no') {\n form.settings.animation_intime = 0;\n form.settings.animation_outtime = 0;\n }\n\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // bring form in initial state if the reset event is fired on it.\n form.$form.on('reset.wpcf7cf', form, function(e) {\n var form = e.data;\n setTimeout(function(){\n form.displayFields();\n form.resetRepeaters();\n if (form.multistep != null) {\n form.multistep.moveToStep(1); \n }\n },200);\n });\n\n // PRO ONLY\n\n jQuery('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)', $form).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n var $multistep = jQuery('.wpcf7cf_multistep', $form);\n\n if ($multistep.length) {\n form.multistep = new Wpcf7cfMultistep($multistep, form);\n // window.wpcf7cf.updateMultistepState(form.multistep);\n }\n\n // END PRO ONLY\n\n}\n\n/**\n * reset initial number of subs for each repeater.\n * (does not clear values)\n */\nWpcf7cfForm.prototype.resetRepeaters = function() {\n var form = this;\n form.repeaters.forEach(repeater => {\n repeater.updateSubs( repeater.params.$repeater.initial_subs );\n });\n}\n\nWpcf7cfForm.prototype.displayFields = function() {\n\n var form = this;\n\n window.wpcf7cf.get_simplified_dom_model(form.$form);\n\n var unit_tag = this.unit_tag;\n var wpcf7cf_conditions = this.conditions;\n var wpcf7cf_settings = this.settings;\n\n //for compatibility with contact-form-7-signature-addon\n if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0 ) {\n for (var i = 0; i < signatures.length; i++) {\n if (signatures[i].canvas.width === 0) {\n\n var $sig_canvas = jQuery(\".wpcf7-form-control-signature-body>canvas\");\n var $sig_wrap = jQuery(\".wpcf7-form-control-signature-wrap\");\n $sig_canvas.eq(i).attr('width', $sig_wrap.width());\n $sig_canvas.eq(i).attr('height', $sig_wrap.height());\n\n cf7signature_resized = 1;\n }\n }\n }\n\n form.$groups.addClass('wpcf7cf-hidden');\n\n for (var i=0; i < wpcf7cf_conditions.length; i++) {\n\n var condition = wpcf7cf_conditions[i];\n\n var show_group = window.wpcf7cf.should_group_be_shown(condition, form.$form);\n\n if (show_group) {\n jQuery('[data-id=\"'+condition.then_field+'\"]',form.$form).eq(0).removeClass('wpcf7cf-hidden');\n }\n }\n\n var animation_intime = wpcf7cf_settings.animation_intime;\n var animation_outtime = wpcf7cf_settings.animation_outtime;\n\n form.$groups.each(function (index) {\n var $group = jQuery(this);\n if ($group.is(':animated')) $group.finish(); // stop any current animations on the group\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group');\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show\n }\n } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {\n\n if ($group.attr('data-clear_on_hide') !== undefined) {\n var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');\n\n $inputs.each(function(){\n var $this = jQuery(this);\n $this.val(this.defaultValue);\n $this.prop('checked', this.defaultChecked);\n });\n\n jQuery('option', $group).each(function() {\n this.selected = this.defaultSelected;\n });\n\n jQuery('select', $group).each(function() {\n const $select = jQuery(this);\n if ($select.val() === null) {\n $select.val(jQuery(\"option:first\",$select).val());\n }\n });\n\n $inputs.change();\n //display_fields();\n }\n\n if ($group.prop('tagName') === 'SPAN') {\n $group.hide().trigger('wpcf7cf_hide_group');\n } else {\n $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide\n }\n\n }\n });\n\n form.updateHiddenFields();\n form.updateSummaryFields();\n};\n\nWpcf7cfForm.prototype.updateSummaryFields = function() {\n var $summary = jQuery('.wpcf7cf-summary', this.$form);\n\n if ($summary.length == 0 || !$summary.is(':visible')) return;\n\n var fd = new FormData();\n\n var formdata = this.$form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_get_summary',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n success: function(json) {\n $summary.html(json.summaryHtml);\n }\n });\n};\n\nWpcf7cfForm.prototype.updateHiddenFields = function() {\n\n var form = this;\n\n var hidden_fields = [];\n var hidden_groups = [];\n var visible_groups = [];\n\n form.$groups.each(function () {\n var $this = jQuery(this);\n if ($this.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($this.data('id'));\n $this.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n } else {\n visible_groups.push($this.data('id'));\n }\n });\n\n form.hidden_fields = hidden_fields;\n form.hidden_groups = hidden_groups;\n form.visible_groups = visible_groups;\n\n form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));\n form.$input_hidden_groups.val(JSON.stringify(hidden_groups));\n form.$input_visible_groups.val(JSON.stringify(visible_groups));\n\n return true;\n};\nWpcf7cfForm.prototype.updateGroups = function() {\n var form = this;\n form.$groups = form.$form.find('[data-class=\"wpcf7cf_group\"]');\n\n form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);\n\n};\nWpcf7cfForm.prototype.updateEventListeners = function() {\n\n var form = this;\n\n // monitor input changes, and call display_fields() if something has changed\n jQuery('input, select, textarea, button',form.$form).not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events,form, function(e) {\n var form = e.data;\n clearTimeout(wpcf7cf_timeout);\n wpcf7cf_timeout = setTimeout(function() {\n form.displayFields();\n }, wpcf7cf_change_time_ms);\n });\n\n // PRO ONLY\n jQuery('.wpcf7cf-togglebutton', form.$form).off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.data('val-1')) {\n $this.text($this.data('val-2'));\n $this.val($this.data('val-2'));\n } else {\n $this.text($this.data('val-1'));\n $this.val($this.data('val-1'));\n }\n });\n // END PRO ONLY\n};\n\n// PRO ONLY\nfunction Wpcf7cfRepeater($repeater, form) {\n var $ = jQuery;\n\n var repeater = this;\n\n var wpcf7cf_settings = form.settings;\n\n repeater.form = form;\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.data('id');\n $repeater.orig_id = $repeater.data('orig_data_id');\n $repeater.min = typeof( $repeater.data('min')) !== 'undefined' ? parseInt($repeater.data('min')) : 1;\n $repeater.max = typeof( $repeater.data('max')) !== 'undefined' ? parseInt($repeater.data('max')) : 200;\n $repeater.initial_subs = typeof( $repeater.data('initial')) !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;\n if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;\n var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);\n var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);\n\n var $repeater_sub_clone = $repeater_sub.clone();\n\n $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function() {\n var $this = jQuery(this);\n var prev_suffix = $this.attr('data-repeater_sub_suffix');\n var new_suffix = prev_suffix+'__{{repeater_sub_suffix}}';\n $this.attr('data-repeater_sub_suffix', new_suffix);\n });\n\n $repeater_sub_clone.find('[name]').each(function() {\n var $this = jQuery(this);\n var prev_name = $this.attr('name');\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\n var new_name = prev_name+'__{{repeater_sub_suffix}}';\n\n if(prev_name.endsWith('_count')) {\n new_name = prev_name.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('name', new_name);\n $this.attr('data-orig_name', orig_name);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_name);\n });\n\n $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class=\"wpcf7cf_group\"]').each(function() {\n var $this = jQuery(this);\n var prev_data_id = $this.attr('data-id');\n var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;\n var new_data_id = prev_data_id+'__{{repeater_sub_suffix}}';\n\n if(prev_data_id.endsWith('_count')) {\n new_data_id = prev_data_id.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n $this.attr('data-id', new_data_id);\n $this.attr('data-orig_data_id', orig_data_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_data_id);\n });\n\n $repeater_sub_clone.find('[id]').each(function() {\n var $this = jQuery(this);\n var prev_id = $this.attr('id');\n var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;\n var new_id = prev_id+'__{{repeater_sub_suffix}}';\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_id);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_id);\n });\n\n $repeater_sub_clone.find('[for]').each(function() {\n var $this = jQuery(this);\n var prev_for = $this.attr('for');\n var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;\n var new_for = prev_for+'__{{repeater_sub_suffix}}';\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_for);\n $this.closest('.wpcf7-form-control-wrap').addClass(new_for);\n });\n\n var repeater_sub_html = $repeater_sub_clone[0].outerHTML;\n\n var $repeater_count_field = $repeater.find('[name='+$repeater.id+'_count]').eq(0);\n var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);\n var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);\n\n var params = {\n $repeater: $repeater,\n $repeater_count_field: $repeater_count_field,\n repeater_sub_html: repeater_sub_html,\n $repeater_controls: $repeater_controls,\n $button_add: $button_add,\n $button_remove: $button_remove,\n wpcf7cf_settings: wpcf7cf_settings\n };\n \n this.params = params;\n\n $button_add.on('click', null, repeater, function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs+1);\n });\n\n $button_remove.on('click', null, repeater,function(e) {\n var repeater = e.data;\n repeater.updateSubs(params.$repeater.num_subs-1);\n });\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.\n\n repeater.updateSubs($repeater.initial_subs); \n\n}\n\n\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n var subs_to_add = subs_to_show - params.$repeater.num_subs;\n\n if (subs_to_add < 0) {\n repeater.removeSubs(-subs_to_add);\n } else if (subs_to_add > 0) {\n repeater.addSubs(subs_to_add);\n }\n\n var showButtonRemove = false;\n var showButtonAdd = false;\n\n if (params.$repeater.num_subs < params.$repeater.max) {\n showButtonAdd = true;\n }\n if (params.$repeater.num_subs > params.$repeater.min) {\n showButtonRemove = true;\n }\n\n if (showButtonAdd) {\n params.$button_add.show();\n } else {\n params.$button_add.hide();\n\n }\n\n if (showButtonRemove) {\n params.$button_remove.show();\n } else {\n params.$button_remove.hide();\n }\n\n params.$repeater_count_field.val(subs_to_show);\n\n};\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add) {\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n\n\n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n //jQuery(params.repeater_sub_html.replace(/name=\"(.*?)\"/g,'name=\"wpcf7cf_repeater['+$repeater.id+']['+$repeater.num_subs+'][$1]\" data-original-name=\"$1\"')).hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime);\n\n var html_str = '';\n\n for(var i=1; i<=subs_to_add; i++) {\n var sub_suffix = $repeater.num_subs+i;\n html_str += params.repeater_sub_html.replace(/\\{\\{repeater_sub_suffix\\}\\}/g,sub_suffix)\n .replace(new RegExp('\\{\\{'+$repeater.orig_id+'_index\\}\\}','g'),sub_suffix);\n }\n\n\n var $html = jQuery(html_str);\n\n // Add the newly created fields to the form\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n\n jQuery('.wpcf7cf_repeater', $html).each(function(){\n form.repeaters.push(new Wpcf7cfRepeater(jQuery(this),form));\n });\n form.$input_repeaters.val(JSON.stringify(form.repeaters.map((item)=>item.params.$repeater.id)));\n\n $repeater.num_subs+= subs_to_add;\n\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n // Exclusive Checkbox\n $html.on( 'click', '.wpcf7-exclusive-checkbox input:checkbox', function() {\n var name = $( this ).attr( 'name' );\n $html.find( 'input:checkbox[name=\"' + name + '\"]' ).not( this ).prop( 'checked', false );\n } );\n\n //basic compatibility with material-design-for-contact-form-7\n if (typeof window.cf7mdInit === \"function\") {\n window.cf7mdInit();\n }\n\n return false;\n};\nWpcf7cfRepeater.prototype.removeSubs = function(num_subs) {\n var $ = jQuery;\n var params = this.params;\n var form = this.form;\n\n params.$repeater.num_subs-= num_subs;\n\n jQuery('> .wpcf7cf_repeater_sub',params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {duration:params.wpcf7cf_settings.animation_intime, done:function() {\n var $this = jQuery(this);\n //remove the actual fields from the form\n $this.remove();\n params.$repeater.trigger('wpcf7cf_repeater_removed');\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n }});\n\n return false;\n};\n\nfunction Wpcf7cfMultistep($multistep, form) {\n var multistep = this;\n multistep.$multistep = $multistep;\n multistep.form = form;\n multistep.$steps = $multistep.find('.wpcf7cf_step');\n multistep.$btn_next = $multistep.find('.wpcf7cf_next');\n multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');\n multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');\n multistep.currentStep = 0;\n multistep.numSteps = multistep.$steps.length;\n\n\n multistep.$dots.html('');\n for (var i = 1; i <= multistep.numSteps; i++) {\n multistep.$dots.append(`\n <div class=\"dot\" data-step=\"${i}\">\n <div class=\"step-index\">${i}</div>\n <div class=\"step-title\">${multistep.$steps.eq(i-1).data('title')}</div>\n </div>\n `);\n }\n\n multistep.$btn_next.on('click.wpcf7cf_step', async function() {\n \n var result = await multistep.validateStep(multistep.currentStep);\n if (result === 'success') {\n multistep.moveToStep(multistep.currentStep+1); \n }\n\n });\n\n // If form is submitted (by pressing return for example), and if we are not on the last step,\n // then trigger click event on the $btn_next button instead.\n multistep.form.$form.on('submit.wpcf7cf_step', function(e) {\n\n if (multistep.currentStep !== multistep.numSteps) {\n multistep.$btn_next.trigger('click.wpcf7cf_step');\n\n e.stopImmediatePropagation();\n return false;\n }\n });\n\n multistep.$btn_prev.on( 'click', function() {\n multistep.moveToStep(multistep.currentStep-1);\n });\n\n multistep.moveToStep(1);\n}\n\njQuery(document).ajaxComplete(function(e, xhr, settings){\n if (\n xhr.hasOwnProperty('responseJSON') &&\n xhr.responseJSON != null &&\n xhr.responseJSON.hasOwnProperty('status') &&\n xhr.responseJSON.hasOwnProperty('into') &&\n xhr.responseJSON.status === \"mail_success\"\n ) {\n jQuery( xhr.responseJSON.into ).trigger('reset.wpcf7cf');\n }\n});\n\nWpcf7cfMultistep.prototype.validateStep = function(step_index) {\n\n var multistep = this;\n var $multistep = multistep.$multistep;\n var $form = multistep.form.$form;\n\n $form.find('.wpcf7-response-output').addClass('wpcf7-display-none');\n\n return new Promise(resolve => {\n\n var fd = new FormData();\n\n // Make sure to add file fields to FormData\n jQuery.each($form.find('[data-id=\"step-'+step_index+'\"] input[type=\"file\"]'), function(index, el) {\n if (! el.files.length) return false;\n const file = el.files[0];\n const fieldName = el.name;\n fd.append(fieldName, file);\n });\n\n var formdata = $form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n jQuery.ajax({\n url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',\n type: 'POST',\n data: fd,\n processData: false,\n contentType: false,\n dataType: 'json',\n }).done(function(json) {\n\n $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();\n $multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');\n $multistep.find('.wpcf7-response-output').remove();\n $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');\n\n if (!json.success) {\n var checkError = 0;\n\n jQuery.each(json.invalid_fields, function(index, el) {\n if ($multistep.find('input[name=\"'+index+'\"]').length ||\n $multistep.find('input[name=\"'+index+'[]\"]').length ||\n $multistep.find('select[name=\"'+index+'\"]').length ||\n $multistep.find('select[name=\"'+index+'[]\"]').length ||\n $multistep.find('textarea[name=\"'+index+'\"]').length ||\n $multistep.find('textarea[name=\"'+index+'[]\"]').length\n ) {\n checkError = checkError + 1;\n\n var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);\n controlWrap.find('input').addClass('wpcf7-not-valid');\n controlWrap.find('span.wpcf7-not-valid-tip').remove();\n controlWrap.append('<span role=\"alert\" class=\"wpcf7-not-valid-tip\">' + el.reason + '</span>');\n\n }\n });\n\n resolve('failed');\n\n $multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);\n\n } else if (json.success) {\n resolve('success');\n return false;\n }\n\n }).fail(function() {\n resolve('error');\n }).always(function() {\n // do nothing\n });\n });\n\n};\nWpcf7cfMultistep.prototype.moveToStep = function(step_index) {\n var multistep = this;\n var previousStep = multistep.currentStep;\n\n multistep.currentStep = step_index > multistep.numSteps ? multistep.numSteps\n : step_index < 1 ? 1\n : step_index;\n\n // ANIMATION DISABLED FOR NOW cause it's ugly\n // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);\n // multistep.$steps.eq(multistep.currentStep-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);\n\n multistep.$multistep.attr('data-current_step', multistep.currentStep);\n multistep.$steps.hide();\n multistep.$steps\n .eq(multistep.currentStep-1)\n .show()\n .trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);\n\n const formEl = multistep.form.$form[0];\n const topOffset = formEl.getBoundingClientRect().top;\n if (topOffset < 0 && previousStep > 0) {\n formEl.scrollIntoView({behavior: \"smooth\"});\n }\n\n multistep.form.updateSummaryFields();\n\n window.wpcf7cf.updateMultistepState(multistep);\n};\n\nWpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {\n var simpleDom = window.wpcf7cf.get_simplified_dom_model(this.form.$form);\n var inStep = false;\n return simpleDom.filter(function(item, i) {\n if(item.type == 'step') {\n inStep = item.step == step_index+'';\n }\n return inStep && item.type == 'input';\n }).map(function(item) {\n return item.name;\n });\n};\n\n// END PRO ONLY\n\nwindow.wpcf7cf = {\n\n // keep this for backwards compatibility\n initForm : function($form) {\n wpcf7cf_forms.push(new Wpcf7cfForm($form));\n },\n\n get_nested_conditions : function(conditions, $current_form) {\n //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index\n var simplified_dom = window.wpcf7cf.get_simplified_dom_model($current_form);\n var groups = simplified_dom.filter(function(item, i) {\n return item.type==='group';\n });\n\n var sub_conditions = [];\n\n for(var i = 0; i < groups.length; i++) {\n var g = groups[i];\n var relevant_conditions = conditions.filter(function(condition, i) {\n return condition.then_field === g.original_name;\n });\n \n var relevant_conditions = relevant_conditions.map(function(item,i) {\n return {\n then_field : g.name,\n and_rules : item.and_rules.map(function(and_rule, i) {\n return {\n if_field : and_rule.if_field+g.suffix,\n if_value : and_rule.if_value,\n operator : and_rule.operator\n };\n })\n }\n });\n\n sub_conditions = sub_conditions.concat(relevant_conditions);\n }\n return conditions.concat(sub_conditions);\n },\n\n get_simplified_dom_model : function($current_form) {\n // if the dom is something like:\n // <form>\n // <repeater ra>\n // <group ga__1>\n // <repeater rb__1>\n // <input txta__1__1 />\n // <input txta__1__2 />\n // </repeater>\n // <group gb__1>\n // <input txtb__1 />\n // </group>\n // </group>\n // <group ga__2>\n // <repeater rb__2>\n // <input txta__2__1 />\n // </repeater>\n // <group gb__2>\n // <input txtb__2 />\n // </group>\n // </group>\n // </repeater>\n // </form>\n // \n // return something like:\n // [{type:repeater, name:'ra', suffix: '__1'}, {type: group, name:'ga', suffix: '__1'}, ...]\n\n var currentNode;\n var ni = document.createNodeIterator($current_form[0], NodeFilter.SHOW_ELEMENT, null, false); //, NodeFilter.SHOW_ELEMENT, function(){ return NodeFilter.FILTER_ACCEPT; }\n\n var simplified_dom = [];\n\n while(currentNode = ni.nextNode()) {\n if (currentNode.classList.contains('wpcf7cf_repeater')) {\n simplified_dom.push({type:'repeater', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.dataset.class == 'wpcf7cf_group') {\n simplified_dom.push({type:'group', name:currentNode.dataset.id, original_name:currentNode.dataset.orig_data_id})\n } else if (currentNode.className == 'wpcf7cf_step') {\n simplified_dom.push({type:'step', name:currentNode.dataset.id, original_name:currentNode.dataset.id, step: currentNode.dataset.id.substring(5)})\n } else if (currentNode.hasAttribute('name')) {\n simplified_dom.push({type:'input', name:currentNode.getAttribute('name'), original_name:currentNode.getAttribute('data-orig_name')})\n }\n }\n\n simplified_dom = simplified_dom.map(function(item, i){\n var original_name_length = item.original_name == null ? item.name.length : item.original_name.length;\n item.suffix = item.name.substring(original_name_length);\n return item;\n });\n\n //console.table(simplified_dom);\n return simplified_dom;\n\n },\n\n updateMultistepState: function (multistep) {\n if (multistep == null) return;\n\n // update hidden input field\n\n var stepsData = {\n currentStep : multistep.currentStep,\n numSteps : multistep.numSteps,\n fieldsInCurrentStep : multistep.getFieldsInStep(multistep.currentStep)\n };\n multistep.form.$input_steps.val(JSON.stringify(stepsData));\n\n // update Buttons\n multistep.$btn_prev.removeClass('disabled');\n multistep.$btn_next.removeClass('disabled');\n if (multistep.currentStep == multistep.numSteps) {\n multistep.$btn_next.addClass('disabled');\n }\n if (multistep.currentStep == 1) {\n multistep.$btn_prev.addClass('disabled');\n }\n\n // replace next button with submit button on last step.\n // TODO: make this depend on a setting\n var $submit_button = multistep.form.$form.find('input[type=\"submit\"]').eq(0);\n var $ajax_loader = multistep.form.$form.find('.ajax-loader').eq(0);\n if (multistep.currentStep == multistep.numSteps) {\n multistep.$btn_next.hide();\n $ajax_loader.detach().appendTo(multistep.$btn_next.parent());\n $submit_button.detach().appendTo(multistep.$btn_next.parent());\n $submit_button.show();\n } else {\n $submit_button.hide();\n multistep.$btn_next.show();\n }\n\n // update dots\n var $dots = multistep.$dots.find('.dot');\n $dots.removeClass('active').removeClass('completed');\n for(var step = 1; step <= multistep.numSteps; step++) {\n if (step < multistep.currentStep) {\n $dots.eq(step-1).addClass('completed');\n } else if (step == multistep.currentStep) {\n $dots.eq(step-1).addClass('active');\n }\n }\n\n },\n\n should_group_be_shown : function(condition, $current_form) {\n\n var $ = jQuery;\n\n var show_group = true;\n\n for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {\n\n var condition_ok = false;\n\n var condition_and_rule = condition.and_rules[and_rule_i];\n\n var $field = jQuery('[name=\"' + condition_and_rule.if_field + '\"], [name=\"' + condition_and_rule.if_field + '[]\"], [data-original-name=\"' + condition_and_rule.if_field + '\"], [data-original-name=\"' + condition_and_rule.if_field + '[]\"]',$current_form);\n\n var if_val = condition_and_rule.if_value;\n var if_val_as_number = isFinite(parseFloat(if_val)) ? parseFloat(if_val):0;\n var operator = condition_and_rule.operator;\n \n var regex_patt = /.*/i; // fallback regex pattern\n var isValidRegex = true;\n try {\n regex_patt = new RegExp(if_val, 'i');\n } catch(e) {\n isValidRegex = false;\n }\n\n\n //backwards compat\n operator = operator === '≤' ? 'less than or equals' : operator;\n operator = operator === '≥' ? 'greater than or equals' : operator;\n operator = operator === '>' ? 'greater than' : operator;\n operator = operator === '<' ? 'less than' : operator;\n\n\n if ( $field.is(':checkbox') || $field.is(':radio') ) {\n\n var all_values = [];\n var checked_values = [];\n $field.each(function () {\n all_values.push(jQuery(this).val());\n if (jQuery(this).is(':checked')) {\n checked_values.push(jQuery(this).val());\n }\n });\n\n condition_ok = this.isConditionTrue(checked_values,operator,if_val,$field);\n \n } else {\n \n condition_ok = this.isConditionTrue($field.val(),operator,if_val,$field);\n }\n\n show_group = show_group && condition_ok;\n }\n\n return show_group;\n\n },\n isConditionTrue(values, operator, testValue='', $field=jQuery()) {\n\n if (!Array.isArray(values)) {\n values = [values];\n }\n\n let condition_ok = false; // start by assuming that the condition is not met\n\n // Considered EMPTY: [] [''] [null] ['',null] [,,'']\n // Considered NOT EMPTY: [0] ['ab','c'] ['',0,null]\n const valuesAreEmpty = values.length === 0 || values.every((v) => !v&&v!==0); // 0 is not considered empty\n\n // special cases: [] equals '' => TRUE; [] not equals '' => FALSE\n if (operator === 'equals' && testValue === '' && valuesAreEmpty) {\n return true;\n }\n if (operator === 'not equals' && testValue === '' && valuesAreEmpty) {\n return false;\n }\n\n if (valuesAreEmpty) {\n if (operator === 'is empty') {\n condition_ok = true;\n }\n } else {\n if (operator === 'not empty') {\n condition_ok = true;\n }\n }\n\n const testValueNumber = isFinite(parseFloat(testValue)) ? parseFloat(testValue) : NaN;\n\n\n if (operator === 'not equals' || operator === 'not equals (regex)') {\n // start by assuming that the condition is met\n condition_ok = true;\n }\n\n if (\n operator === 'function'\n && typeof window[testValue] == 'function'\n && window[testValue]($field) // here we call the actual user defined function\n ) {\n condition_ok = true;\n }\n\n let regex_patt = /.*/i; // fallback regex pattern\n let isValidRegex = true;\n if (operator === 'equals (regex)' || operator === 'not equals (regex)') {\n try {\n regex_patt = new RegExp(testValue, 'i');\n } catch(e) {\n isValidRegex = false;\n }\n }\n\n\n for(let i = 0; i < values.length; i++) {\n\n const value = values[i];\n\n const valueNumber = isFinite(parseFloat(value)) ? parseFloat(value) : NaN;\n const valsAreNumbers = !isNaN(valueNumber) && !isNaN(testValueNumber);\n\n if (\n\n operator === 'equals' && value === testValue ||\n operator === 'equals (regex)' && regex_patt.test(value) ||\n operator === 'greater than' && valsAreNumbers && valueNumber > testValueNumber ||\n operator === 'less than' && valsAreNumbers && valueNumber < testValueNumber ||\n operator === 'greater than or equals' && valsAreNumbers && valueNumber >= testValueNumber ||\n operator === 'less than or equals' && valsAreNumbers && valueNumber <= testValueNumber\n \n ) {\n\n condition_ok = true;\n break;\n\n } else if (\n\n operator === 'not equals' && value === testValue ||\n operator === 'not equals (regex)' && regex_patt.test(value)\n\n ) {\n\n condition_ok = false;\n break;\n\n }\n }\n\n return condition_ok;\n\n }\n\n};\n\n\n\n\njQuery('.wpcf7-form').each(function(){\n wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));\n});\n\n// Call displayFields again on all forms\n// Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.\njQuery('document').ready(function() {\n wpcf7cf_forms.forEach(function(f){\n f.displayFields();\n });\n});\n\n// fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)\nvar old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;\njQuery.fn.wpcf7ExclusiveCheckbox = function() {\n return this.find('input:checkbox').on('click', function() {\n var name = jQuery(this).attr('name');\n jQuery(this).closest('form').find('input:checkbox[name=\"' + name + '\"]').not(this).prop('checked', false).eq(0).change();\n });\n};\n\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n"],"sourceRoot":""}
|
js/scripts_es6.js
CHANGED
@@ -394,12 +394,12 @@ function Wpcf7cfRepeater($repeater, form) {
|
|
394 |
|
395 |
this.params = params;
|
396 |
|
397 |
-
$button_add.click
|
398 |
var repeater = e.data;
|
399 |
repeater.updateSubs(params.$repeater.num_subs+1);
|
400 |
});
|
401 |
|
402 |
-
$button_remove.click
|
403 |
var repeater = e.data;
|
404 |
repeater.updateSubs(params.$repeater.num_subs-1);
|
405 |
});
|
@@ -552,8 +552,8 @@ function Wpcf7cfMultistep($multistep, form) {
|
|
552 |
|
553 |
});
|
554 |
|
555 |
-
// If form is submitted (by pressing
|
556 |
-
// then trigger click event on the $
|
557 |
multistep.form.$form.on('submit.wpcf7cf_step', function(e) {
|
558 |
|
559 |
if (multistep.currentStep !== multistep.numSteps) {
|
@@ -564,7 +564,7 @@ function Wpcf7cfMultistep($multistep, form) {
|
|
564 |
}
|
565 |
});
|
566 |
|
567 |
-
multistep.$btn_prev.click
|
568 |
multistep.moveToStep(multistep.currentStep-1);
|
569 |
});
|
570 |
|
@@ -617,17 +617,6 @@ Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
|
|
617 |
dataType: 'json',
|
618 |
}).done(function(json) {
|
619 |
|
620 |
-
/*
|
621 |
-
* Insert _form_data_id if 'json variable' has
|
622 |
-
*/
|
623 |
-
// if (typeof json._cf7mls_db_form_data_id != 'undefined') {
|
624 |
-
// if (!form.find('input[name="_cf7mls_db_form_data_id"]').length) {
|
625 |
-
// form.append('<input type="hidden" name="_cf7mls_db_form_data_id" value="'+json._cf7mls_db_form_data_id+'" />');
|
626 |
-
// }
|
627 |
-
// }
|
628 |
-
|
629 |
-
//reset error messages
|
630 |
-
//$multistep.find('.wpcf7-form-control-wrap').removeClass('cf7mls-invalid');
|
631 |
$multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
|
632 |
$multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');
|
633 |
$multistep.find('.wpcf7-response-output').remove();
|
@@ -647,17 +636,14 @@ Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
|
|
647 |
checkError = checkError + 1;
|
648 |
|
649 |
var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);
|
650 |
-
//controlWrap.addClass('cf7mls-invalid');
|
651 |
controlWrap.find('input').addClass('wpcf7-not-valid');
|
652 |
controlWrap.find('span.wpcf7-not-valid-tip').remove();
|
653 |
controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>');
|
654 |
|
655 |
-
//return false;
|
656 |
}
|
657 |
});
|
658 |
|
659 |
resolve('failed');
|
660 |
-
//$multistep.append('<div class="wpcf7-response-output wpcf7-display-none wpcf7-validation-errors" style="display: block;" role="alert">' + json.message + '</div>');
|
661 |
|
662 |
$multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);
|
663 |
|
@@ -929,17 +915,23 @@ window.wpcf7cf = {
|
|
929 |
|
930 |
let condition_ok = false; // start by assuming that the condition is not met
|
931 |
|
932 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
if (operator === 'is empty') {
|
934 |
condition_ok = true;
|
935 |
}
|
936 |
-
if (operator === 'not empty') {
|
937 |
-
condition_ok = false;
|
938 |
-
}
|
939 |
} else {
|
940 |
-
if (operator === 'is empty') {
|
941 |
-
condition_ok = false;
|
942 |
-
}
|
943 |
if (operator === 'not empty') {
|
944 |
condition_ok = true;
|
945 |
}
|
@@ -1030,7 +1022,7 @@ jQuery('document').ready(function() {
|
|
1030 |
// fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)
|
1031 |
var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
|
1032 |
jQuery.fn.wpcf7ExclusiveCheckbox = function() {
|
1033 |
-
return this.find('input:checkbox').click
|
1034 |
var name = jQuery(this).attr('name');
|
1035 |
jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
|
1036 |
});
|
394 |
|
395 |
this.params = params;
|
396 |
|
397 |
+
$button_add.on('click', null, repeater, function(e) {
|
398 |
var repeater = e.data;
|
399 |
repeater.updateSubs(params.$repeater.num_subs+1);
|
400 |
});
|
401 |
|
402 |
+
$button_remove.on('click', null, repeater,function(e) {
|
403 |
var repeater = e.data;
|
404 |
repeater.updateSubs(params.$repeater.num_subs-1);
|
405 |
});
|
552 |
|
553 |
});
|
554 |
|
555 |
+
// If form is submitted (by pressing return for example), and if we are not on the last step,
|
556 |
+
// then trigger click event on the $btn_next button instead.
|
557 |
multistep.form.$form.on('submit.wpcf7cf_step', function(e) {
|
558 |
|
559 |
if (multistep.currentStep !== multistep.numSteps) {
|
564 |
}
|
565 |
});
|
566 |
|
567 |
+
multistep.$btn_prev.on( 'click', function() {
|
568 |
multistep.moveToStep(multistep.currentStep-1);
|
569 |
});
|
570 |
|
617 |
dataType: 'json',
|
618 |
}).done(function(json) {
|
619 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
$multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
|
621 |
$multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');
|
622 |
$multistep.find('.wpcf7-response-output').remove();
|
636 |
checkError = checkError + 1;
|
637 |
|
638 |
var controlWrap = jQuery('.wpcf7-form-control-wrap.' + index, $form);
|
|
|
639 |
controlWrap.find('input').addClass('wpcf7-not-valid');
|
640 |
controlWrap.find('span.wpcf7-not-valid-tip').remove();
|
641 |
controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>');
|
642 |
|
|
|
643 |
}
|
644 |
});
|
645 |
|
646 |
resolve('failed');
|
|
|
647 |
|
648 |
$multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);
|
649 |
|
915 |
|
916 |
let condition_ok = false; // start by assuming that the condition is not met
|
917 |
|
918 |
+
// Considered EMPTY: [] [''] [null] ['',null] [,,'']
|
919 |
+
// Considered NOT EMPTY: [0] ['ab','c'] ['',0,null]
|
920 |
+
const valuesAreEmpty = values.length === 0 || values.every((v) => !v&&v!==0); // 0 is not considered empty
|
921 |
+
|
922 |
+
// special cases: [] equals '' => TRUE; [] not equals '' => FALSE
|
923 |
+
if (operator === 'equals' && testValue === '' && valuesAreEmpty) {
|
924 |
+
return true;
|
925 |
+
}
|
926 |
+
if (operator === 'not equals' && testValue === '' && valuesAreEmpty) {
|
927 |
+
return false;
|
928 |
+
}
|
929 |
+
|
930 |
+
if (valuesAreEmpty) {
|
931 |
if (operator === 'is empty') {
|
932 |
condition_ok = true;
|
933 |
}
|
|
|
|
|
|
|
934 |
} else {
|
|
|
|
|
|
|
935 |
if (operator === 'not empty') {
|
936 |
condition_ok = true;
|
937 |
}
|
1022 |
// fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)
|
1023 |
var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
|
1024 |
jQuery.fn.wpcf7ExclusiveCheckbox = function() {
|
1025 |
+
return this.find('input:checkbox').on('click', function() {
|
1026 |
var name = jQuery(this).attr('name');
|
1027 |
jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
|
1028 |
});
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Author: Jules Colle
|
|
5 |
Website: http://bdwm.be
|
6 |
Tags: wordpress, contact form 7, forms, conditional fields
|
7 |
Requires at least: 4.1
|
8 |
-
Tested up to: 5.4
|
9 |
-
Stable tag: 1.8.
|
10 |
Requires PHP: 5.6
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -102,6 +102,12 @@ The conditional fields javascript code is loaded during wp_footer, so a call to
|
|
102 |
|
103 |
== Changelog ==
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
= 1.8.6 (2020-04-18) =
|
106 |
* Fixed: accidentally packed the entire jQuery library in scripts.js
|
107 |
* Cleaned up some console.logs that was still hanging around in the code.
|
5 |
Website: http://bdwm.be
|
6 |
Tags: wordpress, contact form 7, forms, conditional fields
|
7 |
Requires at least: 4.1
|
8 |
+
Tested up to: 5.4.1
|
9 |
+
Stable tag: 1.8.7
|
10 |
Requires PHP: 5.6
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 1.8.7 (2020-06-01) =
|
106 |
+
* PRO: Change auto-update mechanism
|
107 |
+
* Some minor JS refactoring
|
108 |
+
* Improved on some edge cases with `equals ""` and `not equals ""`
|
109 |
+
* Improved test suites.
|
110 |
+
|
111 |
= 1.8.6 (2020-04-18) =
|
112 |
* Fixed: accidentally packed the entire jQuery library in scripts.js
|
113 |
* Cleaned up some console.logs that was still hanging around in the code.
|