Conditional Fields for Contact Form 7 - Version 2.1

Version Description

(2022-01-27) = * Tested up to wp 5.9 * Scroll success message into view after successful form submission. GH Issue 90 * Small changes GH PR 86 * Make 'change' event bubble up GH PR 88

Download this release

Release Info

Developer Jules Colle
Plugin Icon 128x128 Conditional Fields for Contact Form 7
Version 2.1
Comparing to
See all releases

Code changes from version 2.0.9 to 2.1

admin.php CHANGED
@@ -93,8 +93,6 @@ function wpcf7cf_editor_panel_conditional($form) {
93
 
94
  $wpcf7cf_entries = CF7CF::getConditions($form_id);
95
 
96
- if (!is_array($wpcf7cf_entries)) $wpcf7cf_entries = array();
97
-
98
  $wpcf7cf_entries = array_values($wpcf7cf_entries);
99
 
100
  ?>
93
 
94
  $wpcf7cf_entries = CF7CF::getConditions($form_id);
95
 
 
 
96
  $wpcf7cf_entries = array_values($wpcf7cf_entries);
97
 
98
  ?>
cf7cf.php CHANGED
@@ -331,7 +331,7 @@ class CF7CF {
331
  * load the conditions from the form's post_meta
332
  *
333
  * @param string $form_id
334
- * @return void
335
  */
336
  public static function getConditions($form_id) {
337
  // make sure conditions are an array.
331
  * load the conditions from the form's post_meta
332
  *
333
  * @param string $form_id
334
+ * @return array
335
  */
336
  public static function getConditions($form_id) {
337
  // make sure conditions are an array.
contact-form-7-conditional-fields.php CHANGED
@@ -4,7 +4,7 @@
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: 2.0.9
8
  * Author URI: http://bdwm.be/
9
  * Text Domain: cf7-conditional-fields
10
  * License: GPL v2 or later
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: 2.1
8
  * Author URI: http://bdwm.be/
9
  * Text Domain: cf7-conditional-fields
10
  * License: GPL v2 or later
init.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.0.9' );
4
  if (!defined('WPCF7CF_CF7_MIN_VERSION')) define( 'WPCF7CF_CF7_MIN_VERSION', '5.4' );
5
  if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '5.5.4' );
6
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
1
  <?php
2
 
3
+ if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.1' );
4
  if (!defined('WPCF7CF_CF7_MIN_VERSION')) define( 'WPCF7CF_CF7_MIN_VERSION', '5.4' );
5
  if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '5.5.4' );
6
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
js/scripts.js CHANGED
@@ -365,6 +365,7 @@ var Wpcf7cfForm = function Wpcf7cfForm($form) {
365
  form.updateGroups();
366
  form.updateEventListeners();
367
  form.displayFields(); // bring form in initial state if the reset event is fired on it.
 
368
 
369
  form.$form.on('reset.wpcf7cf', form, function (e) {
370
  var form = e.data;
@@ -373,8 +374,14 @@ var Wpcf7cfForm = function Wpcf7cfForm($form) {
373
  form.resetRepeaters();
374
 
375
  if (form.multistep != null) {
376
- form.multistep.moveToStep(1);
377
  }
 
 
 
 
 
 
378
  }, 200);
379
  }); // PRO ONLY
380
 
@@ -470,7 +477,11 @@ Wpcf7cfForm.prototype.displayFields = function () {
470
  $select.val(jQuery("option:first", $select).val());
471
  }
472
  });
473
- $inputs.trigger('change');
 
 
 
 
474
  }
475
 
476
  if ($group.prop('tagName') === 'SPAN') {
@@ -532,7 +543,6 @@ Wpcf7cfForm.prototype.updateHiddenFields = function () {
532
  });
533
 
534
  if ($group.attr('data-disable_on_hide') !== undefined) {
535
- console.log('disabling');
536
  $group.find(':input').prop('disabled', true);
537
  }
538
  } else {
@@ -953,12 +963,6 @@ function Wpcf7cfMultistep($multistep, form) {
953
  multistep.moveToStep(1);
954
  }
955
 
956
- jQuery(document).ajaxComplete(function (e, xhr, settings) {
957
- if (xhr.hasOwnProperty('responseJSON') && xhr.responseJSON != null && xhr.responseJSON.hasOwnProperty('status') && xhr.responseJSON.hasOwnProperty('into') && xhr.responseJSON.status === "mail_success") {
958
- jQuery(xhr.responseJSON.into).trigger('reset.wpcf7cf');
959
- }
960
- });
961
-
962
  Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
963
  var multistep = this;
964
  var $multistep = multistep.$multistep;
@@ -1021,6 +1025,7 @@ Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
1021
  };
1022
 
1023
  Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
 
1024
  var multistep = this;
1025
  var previousStep = multistep.currentStep;
1026
  multistep.currentStep = step_index > multistep.numSteps ? multistep.numSteps : step_index < 1 ? 1 : step_index; // ANIMATION DISABLED FOR NOW cause it's ugly
@@ -1030,13 +1035,16 @@ Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
1030
  multistep.$multistep.attr('data-current_step', multistep.currentStep);
1031
  multistep.$steps.hide();
1032
  multistep.$steps.eq(multistep.currentStep - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
1033
- var formEl = multistep.form.$form[0];
1034
- var topOffset = formEl.getBoundingClientRect().top;
1035
 
1036
- if (topOffset < 0 && previousStep > 0) {
1037
- formEl.scrollIntoView({
1038
- behavior: "smooth"
1039
- });
 
 
 
 
 
1040
  }
1041
 
1042
  multistep.form.updateSummaryFields();
365
  form.updateGroups();
366
  form.updateEventListeners();
367
  form.displayFields(); // bring form in initial state if the reset event is fired on it.
368
+ // (CF7 triggers the 'reset' event by default on each successfully submitted form)
369
 
370
  form.$form.on('reset.wpcf7cf', form, function (e) {
371
  var form = e.data;
374
  form.resetRepeaters();
375
 
376
  if (form.multistep != null) {
377
+ form.multistep.moveToStep(1, false);
378
  }
379
+
380
+ setTimeout(function () {
381
+ jQuery('.wpcf7-response-output', form.$form)[0].scrollIntoView({
382
+ behavior: "smooth"
383
+ });
384
+ }, 400);
385
  }, 200);
386
  }); // PRO ONLY
387
 
477
  $select.val(jQuery("option:first", $select).val());
478
  }
479
  });
480
+ $inputs.each(function () {
481
+ this.dispatchEvent(new Event("change", {
482
+ "bubbles": true
483
+ }));
484
+ });
485
  }
486
 
487
  if ($group.prop('tagName') === 'SPAN') {
543
  });
544
 
545
  if ($group.attr('data-disable_on_hide') !== undefined) {
 
546
  $group.find(':input').prop('disabled', true);
547
  }
548
  } else {
963
  multistep.moveToStep(1);
964
  }
965
 
 
 
 
 
 
 
966
  Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
967
  var multistep = this;
968
  var $multistep = multistep.$multistep;
1025
  };
1026
 
1027
  Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
1028
+ var scrollToTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1029
  var multistep = this;
1030
  var previousStep = multistep.currentStep;
1031
  multistep.currentStep = step_index > multistep.numSteps ? multistep.numSteps : step_index < 1 ? 1 : step_index; // ANIMATION DISABLED FOR NOW cause it's ugly
1035
  multistep.$multistep.attr('data-current_step', multistep.currentStep);
1036
  multistep.$steps.hide();
1037
  multistep.$steps.eq(multistep.currentStep - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
 
 
1038
 
1039
+ if (scrollToTop) {
1040
+ var formEl = multistep.form.$form[0];
1041
+ var topOffset = formEl.getBoundingClientRect().top;
1042
+
1043
+ if (topOffset < 0 && previousStep > 0) {
1044
+ formEl.scrollIntoView({
1045
+ behavior: "smooth"
1046
+ });
1047
+ }
1048
  }
1049
 
1050
  multistep.form.updateSummaryFields();
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/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/es6-promise-promise/index.js","webpack:///config/versionTemplate.txt","webpack:///lib/es6-promise/utils.js","webpack:///lib/es6-promise/asap.js","webpack:///lib/es6-promise/then.js","webpack:///lib/es6-promise/promise/resolve.js","webpack:///lib/es6-promise/-internal.js","webpack:///lib/es6-promise/enumerator.js","webpack:///lib/es6-promise/promise/all.js","webpack:///lib/es6-promise/promise/race.js","webpack:///lib/es6-promise/promise/reject.js","webpack:///lib/es6-promise/promise.js","webpack:///lib/es6-promise/polyfill.js","webpack:///lib/es6-promise.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///vertx (ignored)"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_change_time_ms","window","wpcf7","setStatus","form","status","length","defaultStatuses","Map","has","get","Array","from","values","includes","replace","trim","prevStatus","getAttribute","setAttribute","classList","add","remove","wpcf7cf_running_tests","jQuery","each","e","$input","opt","JSON","parse","val","settings","animation_intime","animation_outtime","stringify","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","wpcf7cf_dom","wpcf7cf_reload_dom","$form","wpcf7cf","get_simplified_dom_model","wpcf7cf_getFieldsByOriginalName","originalName","Object","filter","inputField","original_name","wpcf7cf_getFieldByName","name","String","prototype","endsWith","search","this_len","undefined","substring","o","keys","map","k","toStr","toString","isCallable","fn","call","toInteger","value","number","Number","isNaN","isFinite","Math","floor","abs","maxSafeInteger","pow","toLength","len","min","max","arrayLike","C","items","TypeError","mapFn","arguments","T","A","kValue","Wpcf7cfForm","options_element","find","eq","form_options","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","selector","i","condition","and_rules","if_field","if_value","operator","initial_conditions","$groups","repeaters","multistep","fields","parseInt","animation","updateGroups","updateEventListeners","displayFields","on","data","setTimeout","resetRepeaters","moveToStep","push","Wpcf7cfRepeater","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","forEach","repeater","updateSubs","initial_subs","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","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","hide","updateHiddenFields","updateSummaryFields","$summary","fd","FormData","formdata","serializeArray","key","input","append","el","files","fieldName","Blob","file","join","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","success","json","html","summaryHtml","hidden_fields","hidden_groups","visible_groups","disabled_fields","console","log","get_nested_conditions","off","clearTimeout","text","$","parentRepeaters","parents","reverse","num_subs","orig_id","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","new_name","getNewName","orig_name","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","updateButtons","previousName","prev_parts","split","prev_suff","splice","newName","showButtonRemove","showButtonAdd","subs_to_show","subs_to_add","removeSubs","addSubs","html_str","sub_suffix","RegExp","$html","insertBefore","updateSuffixes","updateMultistepState","cf7mdInit","repeater_id","repeater_suffix","simplifiedDomArray","$sub","newIndex","currentSuffix","newSuffix","suffix","pureElName","pureNewName","$nested_repeater","nested_repeater","updateRepeaterSubHTML","getParentRepeaters","subs_to_remove","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","currentStep","numSteps","validateStep","result","stopImmediatePropagation","document","ajaxComplete","xhr","hasOwnProperty","responseJSON","into","step_index","Promise","resolve","checkError","invalid_fields","controlWrap","reason","parent","message","fail","always","previousStep","formEl","topOffset","getBoundingClientRect","top","scrollIntoView","behavior","getFieldsInStep","inStep","hideGroup","showGroup","oldSuffix","oldIndexes","shift","newIndexes","returnHtml","parentRepeatersInfo","repeaterId","replacements","oldIndex","repl","initForm","$forms","some","getWpcf7cfForm","matched_forms","f1","f2","$current_form","groups","sub_conditions","g","relevant_conditions","and_rule","concat","currentNode","simplified_dom","parentGroups","contains","dataset","className","hasAttribute","disabled","newParentRepeaters","newParentGroups","nameWithoutBrackets","originalNameWithoutBrackets","parentGroup","checked","multiple","options","childNode","dom","stepsData","fieldsInCurrentStep","$submit_button","$ajax_loader","detach","appendTo","step","and_rule_i","condition_ok","condition_and_rule","if_val","$field","isConditionTrue","testValue","isArray","valuesAreEmpty","every","v","testValueNumber","parseFloat","NaN","regex_patt","isValidRegex","valueNumber","valsAreNumbers","test","getFormObj","getRepeaterObj","repeaterDataId","getMultiStepObj","repeaterAddSub","repeaterAddSubAtIndex","repeaterRemoveSubAtIndex","repeaterRemoveSub","repeaterSetNumberOfSubs","numberOfSubs","multistepMoveToStep","multistepMoveToStepWithValidation","f","old_wpcf7ExclusiveCheckbox","wpcf7ExclusiveCheckbox","change","_arrayLikeToArray","arr","arr2","module","exports","_arrayWithHoles","arrayLikeToArray","require","_arrayWithoutHoles","asyncGeneratorStep","gen","reject","_next","_throw","arg","info","error","then","_asyncToGenerator","self","args","apply","err","_defineProperty","obj","defineProperty","enumerable","configurable","writable","_iterableToArray","iter","Symbol","iterator","_iterableToArrayLimit","_arr","_n","_d","_e","_i","_s","next","_nonIterableRest","_nonIterableSpread","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","_slicedToArray","arrayWithoutHoles","iterableToArray","nonIterableSpread","_toConsumableArray","_unsupportedIterableToArray","minLen","n","originalThen","originalResolve","Resolve","Reject","process","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","timeout","run","nextTick","Item","array","title","browser","env","argv","version","versions","noop","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","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","state","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","object","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","l"],"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CAAd;AACA;AAJkC,KAApC;AAMA0S,UAAM,CAACqM,eAAP,GAAyB,CAAzB;AACA;;AACD,SAAOrM,MAAP;AACA,CArBD,C;;;;;;;;;;;;;;;;;;;;;;;;ACAA,e","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 = 0);\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 = 100;\n\nif (window.wpcf7 && !wpcf7.setStatus) {\n wpcf7.setStatus = ( form, status ) => {\n form = form.length ? form[0] : form; // if form is a jQuery object, only grab te html-element\n const defaultStatuses = new Map( [\n // 0: Status in API response, 1: Status in HTML class\n [ 'init', 'init' ],\n [ 'validation_failed', 'invalid' ],\n [ 'acceptance_missing', 'unaccepted' ],\n [ 'spam', 'spam' ],\n [ 'aborted', 'aborted' ],\n [ 'mail_sent', 'sent' ],\n [ 'mail_failed', 'failed' ],\n [ 'submitting', 'submitting' ],\n [ 'resetting', 'resetting' ],\n ] );\n \n if ( defaultStatuses.has( status ) ) {\n status = defaultStatuses.get( status );\n }\n \n if ( ! Array.from( defaultStatuses.values() ).includes( status ) ) {\n status = status.replace( /[^0-9a-z]+/i, ' ' ).trim();\n status = status.replace( /\\s+/, '-' );\n status = `custom-${ status }`;\n }\n \n const prevStatus = form.getAttribute( 'data-status' );\n \n form.wpcf7.status = status;\n form.setAttribute( 'data-status', status );\n form.classList.add( status );\n \n if ( prevStatus && prevStatus !== status ) {\n form.classList.remove( prevStatus );\n }\n \n return status;\n };\n}\n\nif (window.wpcf7cf_running_tests) {\n jQuery('input[name=\"_wpcf7cf_options\"]').each(function(e) {\n var $input = jQuery(this);\n var opt = JSON.parse($input.val());\n opt.settings.animation_intime = 0;\n opt.settings.animation_outtime = 0;\n $input.val(JSON.stringify(opt));\n });\n wpcf7cf_change_time_ms = 0;\n}\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\nwindow.wpcf7cf_dom = {};\n\nconst wpcf7cf_reload_dom = function($form) {\n wpcf7cf_dom = wpcf7cf.get_simplified_dom_model($form[0]);\n}\n\nconst wpcf7cf_getFieldsByOriginalName = function(originalName) {\n return Object.values(wpcf7cf_dom).filter(function (inputField) {\n return inputField.original_name === originalName || inputField.original_name === originalName+'[]';\n });\n}\n\nconst wpcf7cf_getFieldByName = function(name) {\n return wpcf7cf_dom[name] || wpcf7cf_dom[name+'[]'];\n}\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\n// Object.values polyfill\nif (!Object.values) Object.values = o=>Object.keys(o).map(k=>o[k]);\n\n// Array.from polyfill\nif (!Array.from) {\n Array.from = (function () {\n var toStr = Object.prototype.toString;\n var isCallable = function (fn) {\n return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n };\n var toInteger = function (value) {\n var number = Number(value);\n if (isNaN(number)) { return 0; }\n if (number === 0 || !isFinite(number)) { return number; }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function (value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n \n // The length property of the from method is 1.\n return function from(arrayLike/*, mapFn, thisArg */) {\n // 1. Let C be the this value.\n var C = this;\n \n // 2. Let items be ToObject(arrayLike).\n var items = Object(arrayLike);\n \n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n }\n \n // 4. If mapfn is undefined, then let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n var T;\n if (typeof mapFn !== 'undefined') {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError('Array.from: when provided, the second argument must be a function');\n }\n \n // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n }\n \n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n var len = toLength(items.length);\n \n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n \n // 16. Let k be 0.\n var k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n } else {\n A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n };\n }());\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 // Wrapper around jQuery(selector, form.$form)\n form.get = function (selector) {\n // TODO: implement some caching here.\n return jQuery(selector, form.$form);\n }\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 form.get('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)').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 = form.get('.wpcf7cf_multistep');\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 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 wpcf7cf_reload_dom(form.$form);\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);\n\n if (show_group) {\n form.get('[data-id=\"'+condition.then_field+'\"]').removeClass('wpcf7cf-hidden');\n }\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')) {\n $group.finish(); // stop any current animations on the group\n }\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group'); // show instantly\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show with animation\n }\n\n if($group.attr('data-disable_on_hide') !== undefined) {\n $group.find(':input').prop('disabled', false);\n }\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.trigger('change');\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 form.updateHiddenFields();\n form.updateSummaryFields();\n};\n\nWpcf7cfForm.prototype.updateSummaryFields = function() {\n const form = this;\n var $summary = form.get('.wpcf7cf-summary');\n\n if ($summary.length == 0 || !$summary.is(':visible')) return;\n\n var fd = new FormData();\n\n var formdata = form.$form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n // Make sure to add file fields to FormData\n jQuery.each(form.$form.find('input[type=\"file\"]'), function(index, el) {\n if (! el.files.length) return true; // continue\n const fieldName = el.name;\n fd.append(fieldName, new Blob() , Array.from(el.files).map(file => file.name).join(', '));\n });\n\n // add file fields to form-data\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 var disabled_fields = [];\n\n form.$groups.each(function () {\n var $group = jQuery(this);\n if ($group.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($group.attr('data-id'));\n $group.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n if($group.attr('data-disable_on_hide') !== undefined) {\n console.log('disabling');\n $group.find(':input').prop('disabled', true);\n }\n } else {\n visible_groups.push($group.attr('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 form.$groups.height('auto');\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 displayFields() if something has changed\n form.get('input, select, textarea, button').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 form.get('.wpcf7cf-togglebutton').off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.attr('data-val-1')) {\n $this.text($this.attr('data-val-2'));\n $this.val($this.attr('data-val-2'));\n } else {\n $this.text($this.attr('data-val-1'));\n $this.val($this.attr('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.parentRepeaters = Array.from($repeater.parents('.wpcf7cf_repeater').map(function() {\n return this.getAttribute('data-id');\n } )).reverse();\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.attr('data-id');\n $repeater.orig_id = $repeater.attr('data-orig_data_id');\n $repeater.min = typeof( $repeater.attr('data-min')) !== 'undefined' ? parseInt($repeater.attr('data-min')) : 1;\n $repeater.max = typeof( $repeater.attr('data-max')) !== 'undefined' ? parseInt($repeater.attr('data-max')) : 200;\n $repeater.initial_subs = typeof( $repeater.attr('data-initial')) !== 'undefined' ? parseInt($repeater.attr('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 new_name = repeater.getNewName(prev_name);\n\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\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.replace('[]',''));\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 = repeater.getNewName(prev_data_id);\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 });\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 = repeater.getNewName(prev_id);\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_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 = repeater.getNewName(prev_for);\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_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 repeater.updateButtons();\n\n}\n\nWpcf7cfRepeater.prototype.getNewName = function(previousName) {\n var prev_parts = previousName.split('[');\n previousName = prev_parts[0];\n var prev_suff = prev_parts.length > 1 ? '['+prev_parts.splice(1).join('[') : '';\n var newName = previousName+'__{{repeater_sub_suffix}}'+prev_suff;\n\n if(previousName.endsWith('_count')) {\n newName = previousName.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n return newName;\n}\n\nWpcf7cfRepeater.prototype.updateButtons = function() {\n const repeater = this;\n const params = repeater.params;\n const num_subs = params.$repeater.num_subs;\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(num_subs);\n}\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n\n // make sure subs_to_show is a valid number\n subs_to_show = subs_to_show < params.$repeater.min ? params.$repeater.min : subs_to_show\n subs_to_show = subs_to_show > params.$repeater.max ? params.$repeater.max : subs_to_show\n\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/**\n * add Subs to repeater\n * @param {Number} subs_to_add \n * @param {Number} index - zero-based. leave blank (or null) to append at the end\n */\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add, index=null) {\n\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n \n\n \n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n if (subs_to_add + $repeater.num_subs > $repeater.max) {\n subs_to_add = $repeater.max - $repeater.num_subs;\n }\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'),'<span class=\"wpcf7cf-index wpcf7cf__'+$repeater.orig_id+'\">'+sub_suffix+'</span>');\n }\n\n\n var $html = jQuery(html_str);\n\n jQuery('> .wpcf7cf_repeater_sub',$repeater).finish(); // finish any currently running animations immediately.\n\n // Add the newly created fields to the form\n if (index === null) {\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n } else {\n $html.hide().insertBefore(jQuery('> .wpcf7cf_repeater_sub', $repeater).eq(index)).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n }\n\n\n jQuery('.wpcf7cf_repeater', $html).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 $repeater.num_subs+= subs_to_add;\n\n if (index !== null) {\n repeater.updateSuffixes();\n }\n\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n repeater.updateButtons();\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};\n\n/** TODO: implement this */\nWpcf7cfRepeater.prototype.updateSuffixes = function() {\n\n // Loop trough all subs\n // -- 1. update all fields, groups and repeaters names, id's, for's, ...\n // -- 2. loop trough all repeaters\n // -- update sub_html template for nested repeater\n // -- call updateSuffixes() for nested repeater\n\n var $repeater = this.params.$repeater;\n var num_subs = this.params.$repeater.num_subs;\n var form = this.form;\n const orig_id = $repeater.attr('data-orig_data_id');\n const repeater_id = $repeater.attr('data-id');\n const repeater_suffix = repeater_id.replace(orig_id,'');\n\n let simplifiedDomArray = Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));\n \n for (let i = 0; i < num_subs; i++) {\n\n const $sub = jQuery('> .wpcf7cf_repeater_sub', $repeater).eq(i);\n\n const newIndex = i+1;\n const currentSuffix = $sub.attr('data-repeater_sub_suffix');\n const newSuffix = repeater_suffix+'__'+newIndex;\n\n $sub.attr('data-repeater_sub_suffix', newSuffix); // update sub attr\n $sub.find('.wpcf7cf__'+orig_id).html(newIndex); // update {{r_index}} parts\n\n simplifiedDomArray.forEach(function(el) {\n\n if (el.suffix !== currentSuffix) return;\n\n // TODO: may need an extra check to verify that the element is inside the current repeater\n // (orig_id) . Otherwise problems may occur if there are repeaters on the same level.\n\n const newName = el.name.replace(currentSuffix, newSuffix);\n\n const pureElName = el.name.replace('[]','');\n const pureNewName = newName.replace('[]','');\n\n jQuery('[name=\"'+el.name+'\"]', $sub).attr('name', newName);\n jQuery('[id=\"'+el.name+'\"]', $sub).attr('id', newName);\n jQuery('label[for=\"'+el.name+'\"]', $sub).attr('for', newName);\n const $nested_repeater = jQuery('[data-id=\"'+el.name+'\"]', $sub);\n $nested_repeater.attr('data-id', newName);\n jQuery('.wpcf7-form-control-wrap.'+pureElName,$sub).removeClass(pureElName).addClass(pureNewName);\n\n if (el.type === 'repeater') {\n const nested_repeater = form.repeaters.find( function(repeater) {\n return repeater.params.$repeater.get(0) === $nested_repeater.get(0);\n });\n\n if (!nested_repeater) return;\n\n nested_repeater.params.repeater_sub_html = wpcf7cf.updateRepeaterSubHTML(\n nested_repeater.params.repeater_sub_html,\n currentSuffix,\n newSuffix,\n nested_repeater.params.$repeater.parentRepeaters\n );\n\n nested_repeater.updateSuffixes();\n\n }\n\n });\n }\n\n};\n\n/**\n * Return the parent repeaters, order is not guaranteed.\n */\nWpcf7cfRepeater.prototype.getParentRepeaters = function() {\n const simplifiedDomArray = Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));\n form.repeaters.map(repeater => {\n\n });\n};\n\nWpcf7cfRepeater.prototype.removeSubs = function(subs_to_remove, index=null) {\n var $ = jQuery;\n var repeater = this;\n var params = repeater.params;\n var form = repeater.form;\n var $repeater = params.$repeater;\n\n if ($repeater.num_subs - subs_to_remove < $repeater.min) {\n subs_to_remove = $repeater.num_subs - $repeater.min;\n }\n\n if (index===null) {\n index = $repeater.num_subs-subs_to_remove;\n }\n $repeater.num_subs-= subs_to_remove;\n\n jQuery('> .wpcf7cf_repeater_sub',$repeater).finish(); // finish any currently running animations immediately.\n\n jQuery('> .wpcf7cf_repeater_sub',$repeater).slice(index,index+subs_to_remove).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 repeater.updateButtons();\n\n if (index !== null) {\n repeater.updateSuffixes();\n }\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).attr('data-title')}</div>\n </div>\n `);\n }\n\n multistep.$btn_next.on('click.wpcf7cf_step', async function() {\n\n multistep.$btn_next.addClass('disabled').attr('disabled', true);\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 Enter 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 var form = multistep.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 true; // = continue\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 multistep.$btn_next.removeClass('disabled').attr('disabled', false);\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 = form.get('.wpcf7-form-control-wrap.' + index);\n controlWrap.find('.wpcf7-form-control').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 wpcf7.setStatus( $form, 'invalid' );\n multistep.$steps.trigger('wpcf7cf_step_invalid');\n\n // wpcf7.triggerEvent( data.into, 'invalid', detail );\n\n } else if (json.success) {\n\n wpcf7.setStatus( $form, 'init' );\n\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 wpcf7cf_reload_dom(this.form.$form);\n var inStep = false;\n return Object.values(wpcf7cf_dom).filter(function(item, i) {\n if(item.type == 'step') {\n inStep = item.val == 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\n/**\n * @global\n * @namespace wpcf7cf\n */\nwindow.wpcf7cf = {\n\n hideGroup : function($group, animate) {\n\n },\n\n showGroup : function($group, animate) {\n\n },\n\n updateRepeaterSubHTML : function(html, oldSuffix, newSuffix, parentRepeaters) {\n const oldIndexes = oldSuffix.split('__');\n oldIndexes.shift(); // remove first empty element\n const newIndexes = newSuffix.split('__');\n newIndexes.shift(); // remove first empty element\n\n let returnHtml = html;\n\n if (\n oldIndexes && newIndexes &&\n oldIndexes.length === parentRepeaters.length &&\n newIndexes.length === parentRepeaters.length\n ) {\n\n const parentRepeatersInfo = parentRepeaters.map((repeaterId, i) => {\n return {[repeaterId.split('__')[0]]: [oldIndexes[i], newIndexes[i]]};\n });\n\n const length = parentRepeatersInfo.length;\n\n let replacements = oldIndexes.map( (oldIndex, i) => {\n return [\n '__'+oldIndexes.slice(0,length-i).join('__'),\n '__'+newIndexes.slice(0,length-i).join('__'),\n ];\n });\n\n \n for (let i=0; i<length ; i++) {\n const id = Object.keys(parentRepeatersInfo[i])[0];\n const find = parentRepeatersInfo[i][id][0];\n const repl = parentRepeatersInfo[i][id][1];\n replacements.push([\n `<span class=\"wpcf7cf-index wpcf7cf__${id}\">${find}<\\\\/span>`,\n `<span class=\"wpcf7cf-index wpcf7cf__${id}\">${repl}</span>`\n ]);\n }\n \n replacements.forEach( ([oldSuffix, newSuffix]) => {\n returnHtml = returnHtml.replace(new RegExp(oldSuffix,'g'), newSuffix);\n });\n\n }\n\n return returnHtml ;\n },\n\n // keep this for backwards compatibility\n initForm : function($forms) {\n $forms.each(function(){\n const $form = jQuery(this);\n // only add form is its class is \"wpcf7-form\" and if the form was not previously added\n if (\n $form.hasClass('wpcf7-form') &&\n !wpcf7cf_forms.some((form)=>{ return form.$form.get(0) === $form.get(0); })\n ) {\n wpcf7cf_forms.push(new Wpcf7cfForm($form));\n }\n });\n },\n\n getWpcf7cfForm : function ($form) {\n const matched_forms = wpcf7cf_forms.filter((form)=>{\n const f1 = form.$form.get(0);\n const f2 = $form.get(0);\n return form.$form.get(0) === $form.get(0);\n });\n if (matched_forms.length) {\n return matched_forms[0];\n }\n return false;\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 wpcf7cf_reload_dom($current_form);\n var groups = Object.values(wpcf7cf_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 sub_conditions;\n },\n\n get_simplified_dom_model : function(currentNode, simplified_dom = {}, parentGroups = [], parentRepeaters = []) {\n\n const type = currentNode.classList && currentNode.classList.contains('wpcf7cf_repeater') ? 'repeater' :\n currentNode.dataset.class == 'wpcf7cf_group' ? 'group' :\n currentNode.className == 'wpcf7cf_step' ? 'step' :\n currentNode.hasAttribute('name') && !currentNode.disabled ? 'input' : false;\n\n let newParentRepeaters = [...parentRepeaters];\n let newParentGroups = [...parentGroups];\n\n if (type) {\n\n \n const name = type === 'input' ? currentNode.getAttribute('name') : currentNode.dataset.id;\n \n if (type === 'repeater') {\n newParentRepeaters.push(name);\n }\n if (type === 'group') {\n newParentGroups.push(name);\n }\n\n // skip _wpcf7 hidden fields\n if (name.substring(0,6) === '_wpcf7') return {}; \n \n const original_name = type === 'repeater' || type === 'group' ? currentNode.dataset.orig_data_id\n : type === 'input' ? (currentNode.getAttribute('data-orig_name') || name)\n : name;\n \n const nameWithoutBrackets = name.replace('[]','');\n const originalNameWithoutBrackets = original_name.replace('[]','');\n \n const val = type === 'step' ? [currentNode.dataset.id.substring(5)] : [];\n \n const parentGroup = 'parent-group';\n \n const suffix = nameWithoutBrackets.replace(originalNameWithoutBrackets, '');\n \n if (!simplified_dom[name]) {\n // init entry\n simplified_dom[name] = {name, type, original_name, suffix, val, parentGroups, parentRepeaters}\n }\n \n if (type === 'input') {\n \n // skip unchecked checkboxes and radiobuttons\n if ( (currentNode.type === 'checkbox' || currentNode.type === 'radio') && !currentNode.checked ) return {};\n \n // if multiselect, make sure to add all the values\n if ( currentNode.multiple && currentNode.options ) {\n simplified_dom[name].val = Object.values(currentNode.options).filter(o => o.selected).map(o => o.value)\n } else {\n simplified_dom[name].val.push(currentNode.value);\n }\n }\n }\n \n Array.from(currentNode.children).forEach(childNode => {\n const dom = wpcf7cf.get_simplified_dom_model(childNode, simplified_dom, newParentGroups, newParentRepeaters);\n simplified_dom = {...dom, ...simplified_dom} ;\n });\n\n return simplified_dom;\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').attr('disabled', false);\n multistep.$btn_next.removeClass('disabled').attr('disabled', false);\n if (multistep.currentStep == multistep.numSteps) {\n multistep.$btn_next.addClass('disabled').attr('disabled', true);\n }\n if (multistep.currentStep == 1) {\n multistep.$btn_prev.addClass('disabled').attr('disabled', true);\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) {\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 inputField = wpcf7cf_getFieldByName(condition_and_rule.if_field);\n\n if (!inputField) continue; // field not found\n\n var if_val = condition_and_rule.if_value;\n var operator = condition_and_rule.operator;\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 const $field = operator === 'function' && jQuery(`[name=\"${inputField.name}\"]`).eq(0);\n\n condition_ok = this.isConditionTrue(inputField.val,operator,if_val, $field);\n\n show_group = show_group && condition_ok;\n }\n\n return show_group;\n\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 getFormObj($form) {\n if (typeof $form === 'string') {\n $form = jQuery($form).eq(0);\n }\n return wpcf7cf.getWpcf7cfForm($form);\n },\n\n getRepeaterObj($form, repeaterDataId) {\n const form = wpcf7cf.getFormObj($form);\n const repeater = form.repeaters.find( repeater => repeater.params.$repeater.attr('data-id') === repeaterDataId );\n\n return repeater;\n\n },\n\n getMultiStepObj($form){\n const form = wpcf7cf.getFormObj($form);\n return form.multistep;\n },\n\n /**\n * Append a new sub-entry to the repeater with the name `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @function wpcf7cf.repeaterAddSub\n * @link\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater. Normally this is simply the name of the repeater. However, in case of a nested repeater you need to append the name with the correct suffix. For example `my-nested-repeater__1__3`. Hint (check the `data-id` attribute in the HTML code to find the correct suffix)\n */\n repeaterAddSub($form,repeaterDataId) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.updateSubs(repeater.params.$repeater.num_subs+1);\n },\n\n /**\n * Insert a new sub-entry at the given `index` of the repeater with the name `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} index - position where to insert the new sub-entry within the repeater\n */\n repeaterAddSubAtIndex($form,repeaterDataId,index) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.addSubs(1, index);\n },\n\n /**\n * Remove the sub-entry at the given `index` of the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} index - position where to insert the new sub-entry within the repeater\n */\n repeaterRemoveSubAtIndex($form,repeaterDataId,index) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.removeSubs(1, index);\n },\n\n /**\n * Remove the last sub-entry from the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} index - position where to insert the new sub-entry within the repeater\n */ \n repeaterRemoveSub($form,repeaterDataId) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.updateSubs(repeater.params.$repeater.num_subs-1);\n },\n\n /**\n * Set the number of subs for the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`.\n * Subs are either appended to or removed from the end of the repeater.\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} numberOfSubs - position where to insert the new sub-entry within the repeater\n */ \n repeaterSetNumberOfSubs($form, repeaterDataId, numberOfSubs) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.updateSubs(numberOfSubs);\n },\n\n /**\n * Move to step number `step`, ignoring any validation.\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {*} step \n */\n multistepMoveToStep($form, step) {\n const multistep = wpcf7cf.getMultiStepObj($form);\n multistep.moveToStep(step); \n },\n\n /**\n * Validate the current step, and move to step number `step` if validation passes.\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {Number} step \n */\n async multistepMoveToStepWithValidation($form, step) {\n const multistep = wpcf7cf.getMultiStepObj($form);\n\n var result = await multistep.validateStep(multistep.currentStep);\n if (result === 'success') {\n multistep.moveToStep(step); \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').on('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};","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","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;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","module.exports = require(\"regenerator-runtime\");\n","module.exports = require('es6-promise').Promise;\n","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 3.3.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return typeof x === 'object' && x !== null;\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\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","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\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","/* (ignored) */"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/scripts_es6.js","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/es6-promise-promise/index.js","webpack:///config/versionTemplate.txt","webpack:///lib/es6-promise/utils.js","webpack:///lib/es6-promise/asap.js","webpack:///lib/es6-promise/then.js","webpack:///lib/es6-promise/promise/resolve.js","webpack:///lib/es6-promise/-internal.js","webpack:///lib/es6-promise/enumerator.js","webpack:///lib/es6-promise/promise/all.js","webpack:///lib/es6-promise/promise/race.js","webpack:///lib/es6-promise/promise/reject.js","webpack:///lib/es6-promise/promise.js","webpack:///lib/es6-promise/polyfill.js","webpack:///lib/es6-promise.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///vertx (ignored)"],"names":["cf7signature_resized","wpcf7cf_timeout","wpcf7cf_change_time_ms","window","wpcf7","setStatus","form","status","length","defaultStatuses","Map","has","get","Array","from","values","includes","replace","trim","prevStatus","getAttribute","setAttribute","classList","add","remove","wpcf7cf_running_tests","jQuery","each","e","$input","opt","JSON","parse","val","settings","animation_intime","animation_outtime","stringify","wpcf7cf_show_animation","wpcf7cf_hide_animation","wpcf7cf_show_step_animation","wpcf7cf_hide_step_animation","wpcf7cf_change_events","wpcf7cf_forms","wpcf7cf_dom","wpcf7cf_reload_dom","$form","wpcf7cf","get_simplified_dom_model","wpcf7cf_getFieldsByOriginalName","originalName","Object","filter","inputField","original_name","wpcf7cf_getFieldByName","name","String","prototype","endsWith","search","this_len","undefined","substring","o","keys","map","k","toStr","toString","isCallable","fn","call","toInteger","value","number","Number","isNaN","isFinite","Math","floor","abs","maxSafeInteger","pow","toLength","len","min","max","arrayLike","C","items","TypeError","mapFn","arguments","T","A","kValue","Wpcf7cfForm","options_element","find","eq","form_options","$input_hidden_group_fields","$input_hidden_groups","$input_visible_groups","$input_repeaters","$input_steps","unit_tag","closest","attr","conditions","selector","i","condition","and_rules","if_field","if_value","operator","initial_conditions","$groups","repeaters","multistep","fields","parseInt","animation","updateGroups","updateEventListeners","displayFields","on","data","setTimeout","resetRepeaters","moveToStep","scrollIntoView","behavior","push","Wpcf7cfRepeater","item","params","$repeater","id","$multistep","Wpcf7cfMultistep","forEach","repeater","updateSubs","initial_subs","wpcf7cf_conditions","wpcf7cf_settings","signatures","constructor","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","dispatchEvent","Event","hide","updateHiddenFields","updateSummaryFields","$summary","fd","FormData","formdata","serializeArray","key","input","append","el","files","fieldName","Blob","file","join","ajax","url","wpcf7cf_global_settings","ajaxurl","type","processData","contentType","dataType","success","json","html","summaryHtml","hidden_fields","hidden_groups","visible_groups","disabled_fields","get_nested_conditions","off","clearTimeout","text","$","parentRepeaters","parents","reverse","num_subs","orig_id","$repeater_sub","children","$repeater_controls","$repeater_sub_clone","clone","addBack","prev_suffix","new_suffix","prev_name","new_name","getNewName","orig_name","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","updateButtons","previousName","prev_parts","split","prev_suff","splice","newName","showButtonRemove","showButtonAdd","subs_to_show","subs_to_add","removeSubs","addSubs","html_str","sub_suffix","RegExp","$html","insertBefore","updateSuffixes","updateMultistepState","cf7mdInit","repeater_id","repeater_suffix","simplifiedDomArray","$sub","newIndex","currentSuffix","newSuffix","suffix","pureElName","pureNewName","$nested_repeater","nested_repeater","updateRepeaterSubHTML","getParentRepeaters","subs_to_remove","slice","duration","done","$steps","$btn_next","$btn_prev","$dots","currentStep","numSteps","validateStep","result","stopImmediatePropagation","step_index","Promise","resolve","checkError","invalid_fields","controlWrap","reason","parent","message","fail","always","scrollToTop","previousStep","formEl","topOffset","getBoundingClientRect","top","getFieldsInStep","inStep","hideGroup","showGroup","oldSuffix","oldIndexes","shift","newIndexes","returnHtml","parentRepeatersInfo","repeaterId","replacements","oldIndex","repl","initForm","$forms","some","getWpcf7cfForm","matched_forms","f1","f2","$current_form","groups","sub_conditions","g","relevant_conditions","and_rule","concat","currentNode","simplified_dom","parentGroups","contains","dataset","className","hasAttribute","disabled","newParentRepeaters","newParentGroups","nameWithoutBrackets","originalNameWithoutBrackets","parentGroup","checked","multiple","options","childNode","dom","stepsData","fieldsInCurrentStep","$submit_button","$ajax_loader","detach","appendTo","step","and_rule_i","condition_ok","condition_and_rule","if_val","$field","isConditionTrue","testValue","isArray","valuesAreEmpty","every","v","testValueNumber","parseFloat","NaN","regex_patt","isValidRegex","valueNumber","valsAreNumbers","test","getFormObj","getRepeaterObj","repeaterDataId","getMultiStepObj","repeaterAddSub","repeaterAddSubAtIndex","repeaterRemoveSubAtIndex","repeaterRemoveSub","repeaterSetNumberOfSubs","numberOfSubs","multistepMoveToStep","multistepMoveToStepWithValidation","f","old_wpcf7ExclusiveCheckbox","wpcf7ExclusiveCheckbox","change","_arrayLikeToArray","arr","arr2","module","exports","_arrayWithHoles","arrayLikeToArray","require","_arrayWithoutHoles","asyncGeneratorStep","gen","reject","_next","_throw","arg","info","error","then","_asyncToGenerator","self","args","apply","err","_defineProperty","obj","defineProperty","enumerable","configurable","writable","_iterableToArray","iter","Symbol","iterator","_iterableToArrayLimit","_arr","_n","_d","_e","_i","_s","next","_nonIterableRest","_nonIterableSpread","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","_slicedToArray","arrayWithoutHoles","iterableToArray","nonIterableSpread","_toConsumableArray","_unsupportedIterableToArray","minLen","n","originalThen","originalResolve","Resolve","Reject","process","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","timeout","run","nextTick","Item","array","title","browser","env","argv","version","versions","noop","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","runtime","Op","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","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","state","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","object","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","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;;;;;;;;;AAEb,IAAIA,oBAAoB,GAAG,CAA3B,C,CAA8B;;AAE9B,IAAIC,eAAJ;AACA,IAAIC,sBAAsB,GAAG,GAA7B;;AAEA,IAAIC,MAAM,CAACC,KAAP,IAAgB,CAACA,KAAK,CAACC,SAA3B,EAAsC;AAClCD,OAAK,CAACC,SAAN,GAAkB,UAAEC,IAAF,EAAQC,MAAR,EAAoB;AAClCD,QAAI,GAAGA,IAAI,CAACE,MAAL,GAAcF,IAAI,CAAC,CAAD,CAAlB,GAAwBA,IAA/B,CADkC,CACG;;AACrC,QAAMG,eAAe,GAAG,IAAIC,GAAJ,CAAS,CAC7B;AACA,KAAE,MAAF,EAAU,MAAV,CAF6B,EAG7B,CAAE,mBAAF,EAAuB,SAAvB,CAH6B,EAI7B,CAAE,oBAAF,EAAwB,YAAxB,CAJ6B,EAK7B,CAAE,MAAF,EAAU,MAAV,CA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;;;;;;;;ACAA,e","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 = 0);\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 = 100;\n\nif (window.wpcf7 && !wpcf7.setStatus) {\n wpcf7.setStatus = ( form, status ) => {\n form = form.length ? form[0] : form; // if form is a jQuery object, only grab te html-element\n const defaultStatuses = new Map( [\n // 0: Status in API response, 1: Status in HTML class\n [ 'init', 'init' ],\n [ 'validation_failed', 'invalid' ],\n [ 'acceptance_missing', 'unaccepted' ],\n [ 'spam', 'spam' ],\n [ 'aborted', 'aborted' ],\n [ 'mail_sent', 'sent' ],\n [ 'mail_failed', 'failed' ],\n [ 'submitting', 'submitting' ],\n [ 'resetting', 'resetting' ],\n ] );\n \n if ( defaultStatuses.has( status ) ) {\n status = defaultStatuses.get( status );\n }\n \n if ( ! Array.from( defaultStatuses.values() ).includes( status ) ) {\n status = status.replace( /[^0-9a-z]+/i, ' ' ).trim();\n status = status.replace( /\\s+/, '-' );\n status = `custom-${ status }`;\n }\n \n const prevStatus = form.getAttribute( 'data-status' );\n \n form.wpcf7.status = status;\n form.setAttribute( 'data-status', status );\n form.classList.add( status );\n \n if ( prevStatus && prevStatus !== status ) {\n form.classList.remove( prevStatus );\n }\n \n return status;\n };\n}\n\nif (window.wpcf7cf_running_tests) {\n jQuery('input[name=\"_wpcf7cf_options\"]').each(function(e) {\n var $input = jQuery(this);\n var opt = JSON.parse($input.val());\n opt.settings.animation_intime = 0;\n opt.settings.animation_outtime = 0;\n $input.val(JSON.stringify(opt));\n });\n wpcf7cf_change_time_ms = 0;\n}\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\nwindow.wpcf7cf_dom = {};\n\nconst wpcf7cf_reload_dom = function($form) {\n wpcf7cf_dom = wpcf7cf.get_simplified_dom_model($form[0]);\n}\n\nconst wpcf7cf_getFieldsByOriginalName = function(originalName) {\n return Object.values(wpcf7cf_dom).filter(function (inputField) {\n return inputField.original_name === originalName || inputField.original_name === originalName+'[]';\n });\n}\n\nconst wpcf7cf_getFieldByName = function(name) {\n return wpcf7cf_dom[name] || wpcf7cf_dom[name+'[]'];\n}\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\n// Object.values polyfill\nif (!Object.values) Object.values = o=>Object.keys(o).map(k=>o[k]);\n\n// Array.from polyfill\nif (!Array.from) {\n Array.from = (function () {\n var toStr = Object.prototype.toString;\n var isCallable = function (fn) {\n return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n };\n var toInteger = function (value) {\n var number = Number(value);\n if (isNaN(number)) { return 0; }\n if (number === 0 || !isFinite(number)) { return number; }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function (value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n \n // The length property of the from method is 1.\n return function from(arrayLike/*, mapFn, thisArg */) {\n // 1. Let C be the this value.\n var C = this;\n \n // 2. Let items be ToObject(arrayLike).\n var items = Object(arrayLike);\n \n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n }\n \n // 4. If mapfn is undefined, then let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n var T;\n if (typeof mapFn !== 'undefined') {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError('Array.from: when provided, the second argument must be a function');\n }\n \n // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n }\n \n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n var len = toLength(items.length);\n \n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n \n // 16. Let k be 0.\n var k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n } else {\n A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n };\n }());\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 // Wrapper around jQuery(selector, form.$form)\n form.get = function (selector) {\n // TODO: implement some caching here.\n return jQuery(selector, form.$form);\n }\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 // (CF7 triggers the 'reset' event by default on each successfully submitted form)\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, false);\n }\n setTimeout(function(){\n jQuery('.wpcf7-response-output', form.$form)[0].scrollIntoView({behavior: \"smooth\"});\n }, 400);\n },200);\n });\n\n // PRO ONLY\n\n form.get('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)').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 = form.get('.wpcf7cf_multistep');\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 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 wpcf7cf_reload_dom(form.$form);\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);\n\n if (show_group) {\n form.get('[data-id=\"'+condition.then_field+'\"]').removeClass('wpcf7cf-hidden');\n }\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')) {\n $group.finish(); // stop any current animations on the group\n }\n if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {\n if ($group.prop('tagName') === 'SPAN') {\n $group.show().trigger('wpcf7cf_show_group'); // show instantly\n } else {\n $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show with animation\n }\n\n if($group.attr('data-disable_on_hide') !== undefined) {\n $group.find(':input').prop('disabled', false);\n }\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.each(function(){this.dispatchEvent(new Event(\"change\",{\"bubbles\":true}))});\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 form.updateHiddenFields();\n form.updateSummaryFields();\n};\n\nWpcf7cfForm.prototype.updateSummaryFields = function() {\n const form = this;\n var $summary = form.get('.wpcf7cf-summary');\n\n if ($summary.length == 0 || !$summary.is(':visible')) return;\n\n var fd = new FormData();\n\n var formdata = form.$form.serializeArray();\n jQuery.each(formdata,function(key, input){\n fd.append(input.name, input.value);\n });\n\n // Make sure to add file fields to FormData\n jQuery.each(form.$form.find('input[type=\"file\"]'), function(index, el) {\n if (! el.files.length) return true; // continue\n const fieldName = el.name;\n fd.append(fieldName, new Blob() , Array.from(el.files).map(file => file.name).join(', '));\n });\n\n // add file fields to form-data\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 var disabled_fields = [];\n\n form.$groups.each(function () {\n var $group = jQuery(this);\n if ($group.hasClass('wpcf7cf-hidden')) {\n hidden_groups.push($group.attr('data-id'));\n $group.find('input,select,textarea').each(function () {\n hidden_fields.push(jQuery(this).attr('name'));\n });\n if($group.attr('data-disable_on_hide') !== undefined) {\n $group.find(':input').prop('disabled', true);\n }\n } else {\n visible_groups.push($group.attr('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 form.$groups.height('auto');\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 displayFields() if something has changed\n form.get('input, select, textarea, button').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 form.get('.wpcf7cf-togglebutton').off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf',function() {\n var $this = jQuery(this);\n if ($this.text() === $this.attr('data-val-1')) {\n $this.text($this.attr('data-val-2'));\n $this.val($this.attr('data-val-2'));\n } else {\n $this.text($this.attr('data-val-1'));\n $this.val($this.attr('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.parentRepeaters = Array.from($repeater.parents('.wpcf7cf_repeater').map(function() {\n return this.getAttribute('data-id');\n } )).reverse();\n\n $repeater.num_subs = 0;\n $repeater.id = $repeater.attr('data-id');\n $repeater.orig_id = $repeater.attr('data-orig_data_id');\n $repeater.min = typeof( $repeater.attr('data-min')) !== 'undefined' ? parseInt($repeater.attr('data-min')) : 1;\n $repeater.max = typeof( $repeater.attr('data-max')) !== 'undefined' ? parseInt($repeater.attr('data-max')) : 200;\n $repeater.initial_subs = typeof( $repeater.attr('data-initial')) !== 'undefined' ? parseInt($repeater.attr('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 new_name = repeater.getNewName(prev_name);\n\n var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;\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.replace('[]',''));\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 = repeater.getNewName(prev_data_id);\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 });\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 = repeater.getNewName(prev_id);\n\n $this.attr('id', new_id);\n $this.attr('data-orig_id', orig_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 = repeater.getNewName(prev_for);\n\n $this.attr('for', new_for);\n $this.attr('data-orig_for', orig_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 repeater.updateButtons();\n\n}\n\nWpcf7cfRepeater.prototype.getNewName = function(previousName) {\n var prev_parts = previousName.split('[');\n previousName = prev_parts[0];\n var prev_suff = prev_parts.length > 1 ? '['+prev_parts.splice(1).join('[') : '';\n var newName = previousName+'__{{repeater_sub_suffix}}'+prev_suff;\n\n if(previousName.endsWith('_count')) {\n newName = previousName.replace('_count','__{{repeater_sub_suffix}}_count');\n }\n\n return newName;\n}\n\nWpcf7cfRepeater.prototype.updateButtons = function() {\n const repeater = this;\n const params = repeater.params;\n const num_subs = params.$repeater.num_subs;\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(num_subs);\n}\n\nWpcf7cfRepeater.prototype.updateSubs = function(subs_to_show) {\n var repeater = this;\n var params = repeater.params;\n\n // make sure subs_to_show is a valid number\n subs_to_show = subs_to_show < params.$repeater.min ? params.$repeater.min : subs_to_show\n subs_to_show = subs_to_show > params.$repeater.max ? params.$repeater.max : subs_to_show\n\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/**\n * add Subs to repeater\n * @param {Number} subs_to_add \n * @param {Number} index - zero-based. leave blank (or null) to append at the end\n */\nWpcf7cfRepeater.prototype.addSubs = function(subs_to_add, index=null) {\n\n var $ = jQuery;\n var params = this.params;\n var repeater = this;\n var form = repeater.form;\n \n\n \n var $repeater = params.$repeater; \n var $repeater_controls = params.$repeater_controls;\n\n if (subs_to_add + $repeater.num_subs > $repeater.max) {\n subs_to_add = $repeater.max - $repeater.num_subs;\n }\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'),'<span class=\"wpcf7cf-index wpcf7cf__'+$repeater.orig_id+'\">'+sub_suffix+'</span>');\n }\n\n\n var $html = jQuery(html_str);\n\n jQuery('> .wpcf7cf_repeater_sub',$repeater).finish(); // finish any currently running animations immediately.\n\n // Add the newly created fields to the form\n if (index === null) {\n $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n } else {\n $html.hide().insertBefore(jQuery('> .wpcf7cf_repeater_sub', $repeater).eq(index)).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');\n }\n\n\n jQuery('.wpcf7cf_repeater', $html).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 $repeater.num_subs+= subs_to_add;\n\n if (index !== null) {\n repeater.updateSuffixes();\n }\n\n window.wpcf7cf.updateMultistepState(form.multistep);\n form.updateGroups();\n form.updateEventListeners();\n form.displayFields();\n\n repeater.updateButtons();\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};\n\n/** TODO: implement this */\nWpcf7cfRepeater.prototype.updateSuffixes = function() {\n\n // Loop trough all subs\n // -- 1. update all fields, groups and repeaters names, id's, for's, ...\n // -- 2. loop trough all repeaters\n // -- update sub_html template for nested repeater\n // -- call updateSuffixes() for nested repeater\n\n var $repeater = this.params.$repeater;\n var num_subs = this.params.$repeater.num_subs;\n var form = this.form;\n const orig_id = $repeater.attr('data-orig_data_id');\n const repeater_id = $repeater.attr('data-id');\n const repeater_suffix = repeater_id.replace(orig_id,'');\n\n let simplifiedDomArray = Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));\n \n for (let i = 0; i < num_subs; i++) {\n\n const $sub = jQuery('> .wpcf7cf_repeater_sub', $repeater).eq(i);\n\n const newIndex = i+1;\n const currentSuffix = $sub.attr('data-repeater_sub_suffix');\n const newSuffix = repeater_suffix+'__'+newIndex;\n\n $sub.attr('data-repeater_sub_suffix', newSuffix); // update sub attr\n $sub.find('.wpcf7cf__'+orig_id).html(newIndex); // update {{r_index}} parts\n\n simplifiedDomArray.forEach(function(el) {\n\n if (el.suffix !== currentSuffix) return;\n\n // TODO: may need an extra check to verify that the element is inside the current repeater\n // (orig_id) . Otherwise problems may occur if there are repeaters on the same level.\n\n const newName = el.name.replace(currentSuffix, newSuffix);\n\n const pureElName = el.name.replace('[]','');\n const pureNewName = newName.replace('[]','');\n\n jQuery('[name=\"'+el.name+'\"]', $sub).attr('name', newName);\n jQuery('[id=\"'+el.name+'\"]', $sub).attr('id', newName);\n jQuery('label[for=\"'+el.name+'\"]', $sub).attr('for', newName);\n const $nested_repeater = jQuery('[data-id=\"'+el.name+'\"]', $sub);\n $nested_repeater.attr('data-id', newName);\n jQuery('.wpcf7-form-control-wrap.'+pureElName,$sub).removeClass(pureElName).addClass(pureNewName);\n\n if (el.type === 'repeater') {\n const nested_repeater = form.repeaters.find( function(repeater) {\n return repeater.params.$repeater.get(0) === $nested_repeater.get(0);\n });\n\n if (!nested_repeater) return;\n\n nested_repeater.params.repeater_sub_html = wpcf7cf.updateRepeaterSubHTML(\n nested_repeater.params.repeater_sub_html,\n currentSuffix,\n newSuffix,\n nested_repeater.params.$repeater.parentRepeaters\n );\n\n nested_repeater.updateSuffixes();\n\n }\n\n });\n }\n\n};\n\n/**\n * Return the parent repeaters, order is not guaranteed.\n */\nWpcf7cfRepeater.prototype.getParentRepeaters = function() {\n const simplifiedDomArray = Object.values(wpcf7cf.get_simplified_dom_model(form.$form[0]));\n form.repeaters.map(repeater => {\n\n });\n};\n\nWpcf7cfRepeater.prototype.removeSubs = function(subs_to_remove, index=null) {\n var $ = jQuery;\n var repeater = this;\n var params = repeater.params;\n var form = repeater.form;\n var $repeater = params.$repeater;\n\n if ($repeater.num_subs - subs_to_remove < $repeater.min) {\n subs_to_remove = $repeater.num_subs - $repeater.min;\n }\n\n if (index===null) {\n index = $repeater.num_subs-subs_to_remove;\n }\n $repeater.num_subs-= subs_to_remove;\n\n jQuery('> .wpcf7cf_repeater_sub',$repeater).finish(); // finish any currently running animations immediately.\n\n jQuery('> .wpcf7cf_repeater_sub',$repeater).slice(index,index+subs_to_remove).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 repeater.updateButtons();\n\n if (index !== null) {\n repeater.updateSuffixes();\n }\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).attr('data-title')}</div>\n </div>\n `);\n }\n\n multistep.$btn_next.on('click.wpcf7cf_step', async function() {\n\n multistep.$btn_next.addClass('disabled').attr('disabled', true);\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 Enter 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\nWpcf7cfMultistep.prototype.validateStep = function(step_index) {\n\n var multistep = this;\n var $multistep = multistep.$multistep;\n var $form = multistep.form.$form;\n var form = multistep.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 true; // = continue\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 multistep.$btn_next.removeClass('disabled').attr('disabled', false);\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 = form.get('.wpcf7-form-control-wrap.' + index);\n controlWrap.find('.wpcf7-form-control').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 wpcf7.setStatus( $form, 'invalid' );\n multistep.$steps.trigger('wpcf7cf_step_invalid');\n\n // wpcf7.triggerEvent( data.into, 'invalid', detail );\n\n } else if (json.success) {\n\n wpcf7.setStatus( $form, 'init' );\n\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, scrollToTop = true) {\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 if (scrollToTop) {\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\n multistep.form.updateSummaryFields();\n\n window.wpcf7cf.updateMultistepState(multistep);\n};\n\nWpcf7cfMultistep.prototype.getFieldsInStep = function(step_index) {\n wpcf7cf_reload_dom(this.form.$form);\n var inStep = false;\n return Object.values(wpcf7cf_dom).filter(function(item, i) {\n if(item.type == 'step') {\n inStep = item.val == 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\n/**\n * @global\n * @namespace wpcf7cf\n */\nwindow.wpcf7cf = {\n\n hideGroup : function($group, animate) {\n\n },\n\n showGroup : function($group, animate) {\n\n },\n\n updateRepeaterSubHTML : function(html, oldSuffix, newSuffix, parentRepeaters) {\n const oldIndexes = oldSuffix.split('__');\n oldIndexes.shift(); // remove first empty element\n const newIndexes = newSuffix.split('__');\n newIndexes.shift(); // remove first empty element\n\n let returnHtml = html;\n\n if (\n oldIndexes && newIndexes &&\n oldIndexes.length === parentRepeaters.length &&\n newIndexes.length === parentRepeaters.length\n ) {\n\n const parentRepeatersInfo = parentRepeaters.map((repeaterId, i) => {\n return {[repeaterId.split('__')[0]]: [oldIndexes[i], newIndexes[i]]};\n });\n\n const length = parentRepeatersInfo.length;\n\n let replacements = oldIndexes.map( (oldIndex, i) => {\n return [\n '__'+oldIndexes.slice(0,length-i).join('__'),\n '__'+newIndexes.slice(0,length-i).join('__'),\n ];\n });\n\n \n for (let i=0; i<length ; i++) {\n const id = Object.keys(parentRepeatersInfo[i])[0];\n const find = parentRepeatersInfo[i][id][0];\n const repl = parentRepeatersInfo[i][id][1];\n replacements.push([\n `<span class=\"wpcf7cf-index wpcf7cf__${id}\">${find}<\\\\/span>`,\n `<span class=\"wpcf7cf-index wpcf7cf__${id}\">${repl}</span>`\n ]);\n }\n \n replacements.forEach( ([oldSuffix, newSuffix]) => {\n returnHtml = returnHtml.replace(new RegExp(oldSuffix,'g'), newSuffix);\n });\n\n }\n\n return returnHtml ;\n },\n\n // keep this for backwards compatibility\n initForm : function($forms) {\n $forms.each(function(){\n const $form = jQuery(this);\n // only add form is its class is \"wpcf7-form\" and if the form was not previously added\n if (\n $form.hasClass('wpcf7-form') &&\n !wpcf7cf_forms.some((form)=>{ return form.$form.get(0) === $form.get(0); })\n ) {\n wpcf7cf_forms.push(new Wpcf7cfForm($form));\n }\n });\n },\n\n getWpcf7cfForm : function ($form) {\n const matched_forms = wpcf7cf_forms.filter((form)=>{\n const f1 = form.$form.get(0);\n const f2 = $form.get(0);\n return form.$form.get(0) === $form.get(0);\n });\n if (matched_forms.length) {\n return matched_forms[0];\n }\n return false;\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 wpcf7cf_reload_dom($current_form);\n var groups = Object.values(wpcf7cf_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 sub_conditions;\n },\n\n get_simplified_dom_model : function(currentNode, simplified_dom = {}, parentGroups = [], parentRepeaters = []) {\n\n const type = currentNode.classList && currentNode.classList.contains('wpcf7cf_repeater') ? 'repeater' :\n currentNode.dataset.class == 'wpcf7cf_group' ? 'group' :\n currentNode.className == 'wpcf7cf_step' ? 'step' :\n currentNode.hasAttribute('name') && !currentNode.disabled ? 'input' : false;\n\n let newParentRepeaters = [...parentRepeaters];\n let newParentGroups = [...parentGroups];\n\n if (type) {\n\n \n const name = type === 'input' ? currentNode.getAttribute('name') : currentNode.dataset.id;\n \n if (type === 'repeater') {\n newParentRepeaters.push(name);\n }\n if (type === 'group') {\n newParentGroups.push(name);\n }\n\n // skip _wpcf7 hidden fields\n if (name.substring(0,6) === '_wpcf7') return {}; \n \n const original_name = type === 'repeater' || type === 'group' ? currentNode.dataset.orig_data_id\n : type === 'input' ? (currentNode.getAttribute('data-orig_name') || name)\n : name;\n \n const nameWithoutBrackets = name.replace('[]','');\n const originalNameWithoutBrackets = original_name.replace('[]','');\n \n const val = type === 'step' ? [currentNode.dataset.id.substring(5)] : [];\n \n const parentGroup = 'parent-group';\n \n const suffix = nameWithoutBrackets.replace(originalNameWithoutBrackets, '');\n \n if (!simplified_dom[name]) {\n // init entry\n simplified_dom[name] = {name, type, original_name, suffix, val, parentGroups, parentRepeaters}\n }\n \n if (type === 'input') {\n \n // skip unchecked checkboxes and radiobuttons\n if ( (currentNode.type === 'checkbox' || currentNode.type === 'radio') && !currentNode.checked ) return {};\n \n // if multiselect, make sure to add all the values\n if ( currentNode.multiple && currentNode.options ) {\n simplified_dom[name].val = Object.values(currentNode.options).filter(o => o.selected).map(o => o.value)\n } else {\n simplified_dom[name].val.push(currentNode.value);\n }\n }\n }\n \n Array.from(currentNode.children).forEach(childNode => {\n const dom = wpcf7cf.get_simplified_dom_model(childNode, simplified_dom, newParentGroups, newParentRepeaters);\n simplified_dom = {...dom, ...simplified_dom} ;\n });\n\n return simplified_dom;\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').attr('disabled', false);\n multistep.$btn_next.removeClass('disabled').attr('disabled', false);\n if (multistep.currentStep == multistep.numSteps) {\n multistep.$btn_next.addClass('disabled').attr('disabled', true);\n }\n if (multistep.currentStep == 1) {\n multistep.$btn_prev.addClass('disabled').attr('disabled', true);\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) {\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 inputField = wpcf7cf_getFieldByName(condition_and_rule.if_field);\n\n if (!inputField) continue; // field not found\n\n var if_val = condition_and_rule.if_value;\n var operator = condition_and_rule.operator;\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 const $field = operator === 'function' && jQuery(`[name=\"${inputField.name}\"]`).eq(0);\n\n condition_ok = this.isConditionTrue(inputField.val,operator,if_val, $field);\n\n show_group = show_group && condition_ok;\n }\n\n return show_group;\n\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 getFormObj($form) {\n if (typeof $form === 'string') {\n $form = jQuery($form).eq(0);\n }\n return wpcf7cf.getWpcf7cfForm($form);\n },\n\n getRepeaterObj($form, repeaterDataId) {\n const form = wpcf7cf.getFormObj($form);\n const repeater = form.repeaters.find( repeater => repeater.params.$repeater.attr('data-id') === repeaterDataId );\n\n return repeater;\n\n },\n\n getMultiStepObj($form){\n const form = wpcf7cf.getFormObj($form);\n return form.multistep;\n },\n\n /**\n * Append a new sub-entry to the repeater with the name `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @function wpcf7cf.repeaterAddSub\n * @link\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater. Normally this is simply the name of the repeater. However, in case of a nested repeater you need to append the name with the correct suffix. For example `my-nested-repeater__1__3`. Hint (check the `data-id` attribute in the HTML code to find the correct suffix)\n */\n repeaterAddSub($form,repeaterDataId) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.updateSubs(repeater.params.$repeater.num_subs+1);\n },\n\n /**\n * Insert a new sub-entry at the given `index` of the repeater with the name `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} index - position where to insert the new sub-entry within the repeater\n */\n repeaterAddSubAtIndex($form,repeaterDataId,index) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.addSubs(1, index);\n },\n\n /**\n * Remove the sub-entry at the given `index` of the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} index - position where to insert the new sub-entry within the repeater\n */\n repeaterRemoveSubAtIndex($form,repeaterDataId,index) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.removeSubs(1, index);\n },\n\n /**\n * Remove the last sub-entry from the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} index - position where to insert the new sub-entry within the repeater\n */ \n repeaterRemoveSub($form,repeaterDataId) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.updateSubs(repeater.params.$repeater.num_subs-1);\n },\n\n /**\n * Set the number of subs for the repeater with the *data-id* attribute of `repeaterDataId` inside the form `$form`.\n * Subs are either appended to or removed from the end of the repeater.\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {String} repeaterDataId - *data-id* attribute of the repeater.\n * @param {Number} numberOfSubs - position where to insert the new sub-entry within the repeater\n */ \n repeaterSetNumberOfSubs($form, repeaterDataId, numberOfSubs) {\n const repeater = wpcf7cf.getRepeaterObj($form, repeaterDataId);\n repeater.updateSubs(numberOfSubs);\n },\n\n /**\n * Move to step number `step`, ignoring any validation.\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {*} step \n */\n multistepMoveToStep($form, step) {\n const multistep = wpcf7cf.getMultiStepObj($form);\n multistep.moveToStep(step); \n },\n\n /**\n * Validate the current step, and move to step number `step` if validation passes.\n * @memberof wpcf7cf\n * @param {String|JQuery} $form - JQuery object or css-selector representing the form\n * @param {Number} step \n */\n async multistepMoveToStepWithValidation($form, step) {\n const multistep = wpcf7cf.getMultiStepObj($form);\n\n var result = await multistep.validateStep(multistep.currentStep);\n if (result === 'success') {\n multistep.moveToStep(step); \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').on('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};","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","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;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","module.exports = require(\"regenerator-runtime\");\n","module.exports = require('es6-promise').Promise;\n","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 3.3.1\n */\n","'use strict';\n\nexport { objectOrFunction };\nexport { isFunction };\nexport { isMaybeThenable };\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nfunction isMaybeThenable(x) {\n return typeof x === 'object' && x !== null;\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\nexport { isArray };","'use strict';\n\nexport { setScheduler };\nexport { setAsap };\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nexport { asap };\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}","'use strict';\n\nexport default then;\nimport { invokeCallback, subscribe, FULFILLED, REJECTED, noop, makePromise, PROMISE_ID } from './-internal';\n\nimport { asap } from './asap';\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}","'use strict';\n\nexport default resolve;\nimport { noop, resolve as _resolve } from '../-internal';\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}","'use strict';\n\nimport { objectOrFunction, isFunction } from './utils';\n\nimport { asap } from './asap';\n\nimport originalThen from './then';\nimport originalResolve from './promise/resolve';\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nexport { PROMISE_ID };\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then) {\n if (maybeThenable.constructor === promise.constructor && then === originalThen && maybeThenable.constructor.resolve === originalResolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n } else if (then === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then)) {\n handleForeignThenable(promise, maybeThenable, then);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nexport { nextId, makePromise, getThen, noop, resolve, reject, fulfill, subscribe, publish, publishRejection, initializePromise, invokeCallback, FULFILLED, REJECTED, PENDING, handleMaybeThenable };","'use strict';\n\nimport { isArray, isMaybeThenable } from './utils';\n\nimport { noop, reject, fulfill, subscribe, FULFILLED, REJECTED, PENDING, getThen, handleMaybeThenable } from './-internal';\n\nimport then from './then';\nimport Promise from './promise';\nimport originalResolve from './promise/resolve';\nimport originalThen from './then';\nimport { makePromise, PROMISE_ID } from './-internal';\n\nexport default Enumerator;\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve = c.resolve;\n\n if (resolve === originalResolve) {\n var _then = getThen(entry);\n\n if (_then === originalThen && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve) {\n return resolve(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};","'use strict';\n\nexport default all;\nimport Enumerator from '../enumerator';\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}","\"use strict\";\n\nexport default race;\nimport { isArray } from \"../utils\";\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}","'use strict';\n\nexport default reject;\nimport { noop, reject as _reject } from '../-internal';\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}","'use strict';\n\nexport default Promise;\n\nimport { isFunction } from './utils';\n\nimport { noop, nextId, PROMISE_ID, initializePromise } from './-internal';\n\nimport { asap, setAsap, setScheduler } from './asap';\n\nimport all from './promise/all';\nimport race from './promise/race';\nimport Resolve from './promise/resolve';\nimport Reject from './promise/reject';\nimport then from './then';\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = Resolve;\nPromise.reject = Reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};","/*global self*/\n'use strict';\n\nexport default polyfill;\nimport Promise from './promise';\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}","'use strict';\n\nimport Promise from './es6-promise/promise';\nimport polyfill from './es6-promise/polyfill';\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\nexport default Promise;","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\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","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\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","/* (ignored) */"],"sourceRoot":""}
js/scripts_es6.js CHANGED
@@ -230,14 +230,18 @@ var Wpcf7cfForm = function($form) {
230
  form.displayFields();
231
 
232
  // bring form in initial state if the reset event is fired on it.
 
233
  form.$form.on('reset.wpcf7cf', form, function(e) {
234
  var form = e.data;
235
  setTimeout(function(){
236
  form.displayFields();
237
  form.resetRepeaters();
238
  if (form.multistep != null) {
239
- form.multistep.moveToStep(1);
240
  }
 
 
 
241
  },200);
242
  });
243
 
@@ -350,7 +354,7 @@ Wpcf7cfForm.prototype.displayFields = function() {
350
  }
351
  });
352
 
353
- $inputs.trigger('change');
354
  }
355
 
356
  if ($group.prop('tagName') === 'SPAN') {
@@ -417,7 +421,6 @@ Wpcf7cfForm.prototype.updateHiddenFields = function() {
417
  hidden_fields.push(jQuery(this).attr('name'));
418
  });
419
  if($group.attr('data-disable_on_hide') !== undefined) {
420
- console.log('disabling');
421
  $group.find(':input').prop('disabled', true);
422
  }
423
  } else {
@@ -889,18 +892,6 @@ function Wpcf7cfMultistep($multistep, form) {
889
  multistep.moveToStep(1);
890
  }
891
 
892
- jQuery(document).ajaxComplete(function(e, xhr, settings){
893
- if (
894
- xhr.hasOwnProperty('responseJSON') &&
895
- xhr.responseJSON != null &&
896
- xhr.responseJSON.hasOwnProperty('status') &&
897
- xhr.responseJSON.hasOwnProperty('into') &&
898
- xhr.responseJSON.status === "mail_success"
899
- ) {
900
- jQuery( xhr.responseJSON.into ).trigger('reset.wpcf7cf');
901
- }
902
- });
903
-
904
  Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
905
 
906
  var multistep = this;
@@ -989,7 +980,7 @@ Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
989
  });
990
 
991
  };
992
- Wpcf7cfMultistep.prototype.moveToStep = function(step_index) {
993
  var multistep = this;
994
  var previousStep = multistep.currentStep;
995
 
@@ -1008,10 +999,12 @@ Wpcf7cfMultistep.prototype.moveToStep = function(step_index) {
1008
  .show()
1009
  .trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
1010
 
1011
- const formEl = multistep.form.$form[0];
1012
- const topOffset = formEl.getBoundingClientRect().top;
1013
- if (topOffset < 0 && previousStep > 0) {
1014
- formEl.scrollIntoView({behavior: "smooth"});
 
 
1015
  }
1016
 
1017
  multistep.form.updateSummaryFields();
230
  form.displayFields();
231
 
232
  // bring form in initial state if the reset event is fired on it.
233
+ // (CF7 triggers the 'reset' event by default on each successfully submitted form)
234
  form.$form.on('reset.wpcf7cf', form, function(e) {
235
  var form = e.data;
236
  setTimeout(function(){
237
  form.displayFields();
238
  form.resetRepeaters();
239
  if (form.multistep != null) {
240
+ form.multistep.moveToStep(1, false);
241
  }
242
+ setTimeout(function(){
243
+ jQuery('.wpcf7-response-output', form.$form)[0].scrollIntoView({behavior: "smooth"});
244
+ }, 400);
245
  },200);
246
  });
247
 
354
  }
355
  });
356
 
357
+ $inputs.each(function(){this.dispatchEvent(new Event("change",{"bubbles":true}))});
358
  }
359
 
360
  if ($group.prop('tagName') === 'SPAN') {
421
  hidden_fields.push(jQuery(this).attr('name'));
422
  });
423
  if($group.attr('data-disable_on_hide') !== undefined) {
 
424
  $group.find(':input').prop('disabled', true);
425
  }
426
  } else {
892
  multistep.moveToStep(1);
893
  }
894
 
 
 
 
 
 
 
 
 
 
 
 
 
895
  Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
896
 
897
  var multistep = this;
980
  });
981
 
982
  };
983
+ Wpcf7cfMultistep.prototype.moveToStep = function(step_index, scrollToTop = true) {
984
  var multistep = this;
985
  var previousStep = multistep.currentStep;
986
 
999
  .show()
1000
  .trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
1001
 
1002
+ if (scrollToTop) {
1003
+ const formEl = multistep.form.$form[0];
1004
+ const topOffset = formEl.getBoundingClientRect().top;
1005
+ if (topOffset < 0 && previousStep > 0) {
1006
+ formEl.scrollIntoView({behavior: "smooth"});
1007
+ }
1008
  }
1009
 
1010
  multistep.form.updateSummaryFields();
jsdoc-out/index.html CHANGED
@@ -56,7 +56,7 @@
56
  <br class="clear">
57
 
58
  <footer>
59
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Thu Jan 20 2022 13:05:25 GMT+0100 (Midden-Europese standaardtijd)
60
  </footer>
61
 
62
  <script> prettyPrint(); </script>
56
  <br class="clear">
57
 
58
  <footer>
59
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Thu Jan 27 2022 21:16:07 GMT+0100 (Midden-Europese standaardtijd)
60
  </footer>
61
 
62
  <script> prettyPrint(); </script>
jsdoc-out/scripts_es6.js.html CHANGED
@@ -258,14 +258,18 @@ var Wpcf7cfForm = function($form) {
258
  form.displayFields();
259
 
260
  // bring form in initial state if the reset event is fired on it.
 
261
  form.$form.on('reset.wpcf7cf', form, function(e) {
262
  var form = e.data;
263
  setTimeout(function(){
264
  form.displayFields();
265
  form.resetRepeaters();
266
  if (form.multistep != null) {
267
- form.multistep.moveToStep(1);
268
  }
 
 
 
269
  },200);
270
  });
271
 
@@ -378,7 +382,7 @@ Wpcf7cfForm.prototype.displayFields = function() {
378
  }
379
  });
380
 
381
- $inputs.trigger('change');
382
  }
383
 
384
  if ($group.prop('tagName') === 'SPAN') {
@@ -445,7 +449,6 @@ Wpcf7cfForm.prototype.updateHiddenFields = function() {
445
  hidden_fields.push(jQuery(this).attr('name'));
446
  });
447
  if($group.attr('data-disable_on_hide') !== undefined) {
448
- console.log('disabling');
449
  $group.find(':input').prop('disabled', true);
450
  }
451
  } else {
@@ -917,18 +920,6 @@ function Wpcf7cfMultistep($multistep, form) {
917
  multistep.moveToStep(1);
918
  }
919
 
920
- jQuery(document).ajaxComplete(function(e, xhr, settings){
921
- if (
922
- xhr.hasOwnProperty('responseJSON') &amp;&amp;
923
- xhr.responseJSON != null &amp;&amp;
924
- xhr.responseJSON.hasOwnProperty('status') &amp;&amp;
925
- xhr.responseJSON.hasOwnProperty('into') &amp;&amp;
926
- xhr.responseJSON.status === "mail_success"
927
- ) {
928
- jQuery( xhr.responseJSON.into ).trigger('reset.wpcf7cf');
929
- }
930
- });
931
-
932
  Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
933
 
934
  var multistep = this;
@@ -1017,7 +1008,7 @@ Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
1017
  });
1018
 
1019
  };
1020
- Wpcf7cfMultistep.prototype.moveToStep = function(step_index) {
1021
  var multistep = this;
1022
  var previousStep = multistep.currentStep;
1023
 
@@ -1036,10 +1027,12 @@ Wpcf7cfMultistep.prototype.moveToStep = function(step_index) {
1036
  .show()
1037
  .trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
1038
 
1039
- const formEl = multistep.form.$form[0];
1040
- const topOffset = formEl.getBoundingClientRect().top;
1041
- if (topOffset &lt; 0 &amp;&amp; previousStep > 0) {
1042
- formEl.scrollIntoView({behavior: "smooth"});
 
 
1043
  }
1044
 
1045
  multistep.form.updateSummaryFields();
@@ -1571,7 +1564,7 @@ jQuery.fn.wpcf7ExclusiveCheckbox = function() {
1571
  <br class="clear">
1572
 
1573
  <footer>
1574
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Thu Jan 20 2022 13:05:25 GMT+0100 (Midden-Europese standaardtijd)
1575
  </footer>
1576
 
1577
  <script> prettyPrint(); </script>
258
  form.displayFields();
259
 
260
  // bring form in initial state if the reset event is fired on it.
261
+ // (CF7 triggers the 'reset' event by default on each successfully submitted form)
262
  form.$form.on('reset.wpcf7cf', form, function(e) {
263
  var form = e.data;
264
  setTimeout(function(){
265
  form.displayFields();
266
  form.resetRepeaters();
267
  if (form.multistep != null) {
268
+ form.multistep.moveToStep(1, false);
269
  }
270
+ setTimeout(function(){
271
+ jQuery('.wpcf7-response-output', form.$form)[0].scrollIntoView({behavior: "smooth"});
272
+ }, 400);
273
  },200);
274
  });
275
 
382
  }
383
  });
384
 
385
+ $inputs.each(function(){this.dispatchEvent(new Event("change",{"bubbles":true}))});
386
  }
387
 
388
  if ($group.prop('tagName') === 'SPAN') {
449
  hidden_fields.push(jQuery(this).attr('name'));
450
  });
451
  if($group.attr('data-disable_on_hide') !== undefined) {
 
452
  $group.find(':input').prop('disabled', true);
453
  }
454
  } else {
920
  multistep.moveToStep(1);
921
  }
922
 
 
 
 
 
 
 
 
 
 
 
 
 
923
  Wpcf7cfMultistep.prototype.validateStep = function(step_index) {
924
 
925
  var multistep = this;
1008
  });
1009
 
1010
  };
1011
+ Wpcf7cfMultistep.prototype.moveToStep = function(step_index, scrollToTop = true) {
1012
  var multistep = this;
1013
  var previousStep = multistep.currentStep;
1014
 
1027
  .show()
1028
  .trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
1029
 
1030
+ if (scrollToTop) {
1031
+ const formEl = multistep.form.$form[0];
1032
+ const topOffset = formEl.getBoundingClientRect().top;
1033
+ if (topOffset &lt; 0 &amp;&amp; previousStep > 0) {
1034
+ formEl.scrollIntoView({behavior: "smooth"});
1035
+ }
1036
  }
1037
 
1038
  multistep.form.updateSummaryFields();
1564
  <br class="clear">
1565
 
1566
  <footer>
1567
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Thu Jan 27 2022 21:16:07 GMT+0100 (Midden-Europese standaardtijd)
1568
  </footer>
1569
 
1570
  <script> prettyPrint(); </script>
jsdoc-out/wpcf7cf.html CHANGED
@@ -70,7 +70,7 @@
70
 
71
  <dt class="tag-source">Source:</dt>
72
  <dd class="tag-source"><ul class="dummy"><li>
73
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1037">line 1037</a>
74
  </li></ul></dd>
75
 
76
 
@@ -236,7 +236,7 @@
236
 
237
  <dt class="tag-source">Source:</dt>
238
  <dd class="tag-source"><ul class="dummy"><li>
239
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1488">line 1488</a>
240
  </li></ul></dd>
241
 
242
 
@@ -399,7 +399,7 @@
399
 
400
  <dt class="tag-source">Source:</dt>
401
  <dd class="tag-source"><ul class="dummy"><li>
402
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1499">line 1499</a>
403
  </li></ul></dd>
404
 
405
 
@@ -562,7 +562,7 @@
562
 
563
  <dt class="tag-source">Source:</dt>
564
  <dd class="tag-source"><ul class="dummy"><li>
565
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1420">line 1420</a>
566
  </li></ul></dd>
567
 
568
 
@@ -748,7 +748,7 @@
748
 
749
  <dt class="tag-source">Source:</dt>
750
  <dd class="tag-source"><ul class="dummy"><li>
751
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1440">line 1440</a>
752
  </li></ul></dd>
753
 
754
 
@@ -934,7 +934,7 @@
934
 
935
  <dt class="tag-source">Source:</dt>
936
  <dd class="tag-source"><ul class="dummy"><li>
937
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1464">line 1464</a>
938
  </li></ul></dd>
939
 
940
 
@@ -1120,7 +1120,7 @@
1120
 
1121
  <dt class="tag-source">Source:</dt>
1122
  <dd class="tag-source"><ul class="dummy"><li>
1123
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1452">line 1452</a>
1124
  </li></ul></dd>
1125
 
1126
 
@@ -1307,7 +1307,7 @@ Subs are either appended to or removed from the end of the repeater.</p>
1307
 
1308
  <dt class="tag-source">Source:</dt>
1309
  <dd class="tag-source"><ul class="dummy"><li>
1310
- <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1477">line 1477</a>
1311
  </li></ul></dd>
1312
 
1313
 
@@ -1359,7 +1359,7 @@ Subs are either appended to or removed from the end of the repeater.</p>
1359
  <br class="clear">
1360
 
1361
  <footer>
1362
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Thu Jan 20 2022 13:05:25 GMT+0100 (Midden-Europese standaardtijd)
1363
  </footer>
1364
 
1365
  <script> prettyPrint(); </script>
70
 
71
  <dt class="tag-source">Source:</dt>
72
  <dd class="tag-source"><ul class="dummy"><li>
73
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1030">line 1030</a>
74
  </li></ul></dd>
75
 
76
 
236
 
237
  <dt class="tag-source">Source:</dt>
238
  <dd class="tag-source"><ul class="dummy"><li>
239
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1481">line 1481</a>
240
  </li></ul></dd>
241
 
242
 
399
 
400
  <dt class="tag-source">Source:</dt>
401
  <dd class="tag-source"><ul class="dummy"><li>
402
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1492">line 1492</a>
403
  </li></ul></dd>
404
 
405
 
562
 
563
  <dt class="tag-source">Source:</dt>
564
  <dd class="tag-source"><ul class="dummy"><li>
565
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1413">line 1413</a>
566
  </li></ul></dd>
567
 
568
 
748
 
749
  <dt class="tag-source">Source:</dt>
750
  <dd class="tag-source"><ul class="dummy"><li>
751
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1433">line 1433</a>
752
  </li></ul></dd>
753
 
754
 
934
 
935
  <dt class="tag-source">Source:</dt>
936
  <dd class="tag-source"><ul class="dummy"><li>
937
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1457">line 1457</a>
938
  </li></ul></dd>
939
 
940
 
1120
 
1121
  <dt class="tag-source">Source:</dt>
1122
  <dd class="tag-source"><ul class="dummy"><li>
1123
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1445">line 1445</a>
1124
  </li></ul></dd>
1125
 
1126
 
1307
 
1308
  <dt class="tag-source">Source:</dt>
1309
  <dd class="tag-source"><ul class="dummy"><li>
1310
+ <a href="scripts_es6.js.html">scripts_es6.js</a>, <a href="scripts_es6.js.html#line1470">line 1470</a>
1311
  </li></ul></dd>
1312
 
1313
 
1359
  <br class="clear">
1360
 
1361
  <footer>
1362
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Thu Jan 27 2022 21:16:07 GMT+0100 (Midden-Europese standaardtijd)
1363
  </footer>
1364
 
1365
  <script> prettyPrint(); </script>
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: 5.0
8
- Tested up to: 5.8.3
9
- Stable tag: 2.0.9
10
  Requires PHP: 7.0
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -123,6 +123,12 @@ Make sure to also update CF7 to the latest version! (Version 2.0 is only compati
123
 
124
  == Changelog ==
125
 
 
 
 
 
 
 
126
  = 2.0.9 (2022-01-20) =
127
  * Fully tested with Contact Form 7 version 5.5.4
128
 
5
  Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 5.0
8
+ Tested up to: 5.9
9
+ Stable tag: 2.1
10
  Requires PHP: 7.0
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
123
 
124
  == Changelog ==
125
 
126
+ = 2.1 (2022-01-27) =
127
+ * Tested up to wp 5.9
128
+ * Scroll success message into view after successful form submission. [GH Issue 90](https://github.com/pwkip/contact-form-7-conditional-fields/issues/90)
129
+ * Small changes [GH PR 86](https://github.com/pwkip/contact-form-7-conditional-fields/pull/86)
130
+ * Make 'change' event bubble up [GH PR 88](https://github.com/pwkip/contact-form-7-conditional-fields/pull/88)
131
+
132
  = 2.0.9 (2022-01-20) =
133
  * Fully tested with Contact Form 7 version 5.5.4
134
 
wpcf7cf-options.php CHANGED
@@ -63,7 +63,7 @@ function wpcf7cf_reset_options() {
63
 
64
  add_action( 'admin_enqueue_scripts', 'wpcf7cf_load_page_options_wp_admin_style' );
65
  function wpcf7cf_load_page_options_wp_admin_style() {
66
- wp_register_style( 'wpcf7cf_admin_css', plugins_url('admin-style.css',__FILE__), false, WPCF7CF_VERSION );
67
  wp_enqueue_style( 'wpcf7cf_admin_css' );
68
  }
69
 
@@ -294,4 +294,4 @@ function wpcf7cf_dismiss_notice() {
294
  $settings = wpcf7cf_get_settings();
295
  $settings['notice_dismissed'.$notice_suffix] = true;
296
  wpcf7cf_set_options($settings);
297
- }
63
 
64
  add_action( 'admin_enqueue_scripts', 'wpcf7cf_load_page_options_wp_admin_style' );
65
  function wpcf7cf_load_page_options_wp_admin_style() {
66
+ wp_register_style( 'wpcf7cf_admin_css', plugins_url('admin-style.css',__FILE__), [], WPCF7CF_VERSION );
67
  wp_enqueue_style( 'wpcf7cf_admin_css' );
68
  }
69
 
294
  $settings = wpcf7cf_get_settings();
295
  $settings['notice_dismissed'.$notice_suffix] = true;
296
  wpcf7cf_set_options($settings);
297
+ }