PluginProbe ʕ •ᴥ•ʔ
Conditional Fields for Contact Form 7 / 1.9.6
Conditional Fields for Contact Form 7 v1.9.6
2.7.10 2.7.9 2.7.8 2.7.7 2.7.6 2.7.5 2.7.4 2.7.3 2.7.2 0.2.4 0.2.5 0.2.6 0.2.7 0.2.8 0.2.9 1.0 1.1 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.4 1.4.1 1.4.2 1.4.3 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.6.1 1.6.2 1.6.3 1.6.5 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.8 1.7.9 1.8 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.8.7 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.15 1.9.16 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2 2.2.1 2.2.10 2.2.11 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.10 2.3.11 2.3.12 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.7 2.7.1 trunk 0.1 0.1.1 0.1.2 0.1.3 0.1.4 0.1.5 0.1.6 0.1.7 0.2 0.2.1 0.2.2 0.2.3
cf7-conditional-fields / js / scripts.js
cf7-conditional-fields / js Last commit date
scripts.js 6 years ago scripts.js.map 6 years ago scripts_admin.js 6 years ago scripts_es6.js 6 years ago
scripts.js
1852 lines
1 /******/ (function(modules) { // webpackBootstrap
2 /******/ // The module cache
3 /******/ var installedModules = {};
4 /******/
5 /******/ // The require function
6 /******/ function __webpack_require__(moduleId) {
7 /******/
8 /******/ // Check if module is in cache
9 /******/ if(installedModules[moduleId]) {
10 /******/ return installedModules[moduleId].exports;
11 /******/ }
12 /******/ // Create a new module (and put it into the cache)
13 /******/ var module = installedModules[moduleId] = {
14 /******/ i: moduleId,
15 /******/ l: false,
16 /******/ exports: {}
17 /******/ };
18 /******/
19 /******/ // Execute the module function
20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 /******/
22 /******/ // Flag the module as loaded
23 /******/ module.l = true;
24 /******/
25 /******/ // Return the exports of the module
26 /******/ return module.exports;
27 /******/ }
28 /******/
29 /******/
30 /******/ // expose the modules object (__webpack_modules__)
31 /******/ __webpack_require__.m = modules;
32 /******/
33 /******/ // expose the module cache
34 /******/ __webpack_require__.c = installedModules;
35 /******/
36 /******/ // define getter function for harmony exports
37 /******/ __webpack_require__.d = function(exports, name, getter) {
38 /******/ if(!__webpack_require__.o(exports, name)) {
39 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40 /******/ }
41 /******/ };
42 /******/
43 /******/ // define __esModule on exports
44 /******/ __webpack_require__.r = function(exports) {
45 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47 /******/ }
48 /******/ Object.defineProperty(exports, '__esModule', { value: true });
49 /******/ };
50 /******/
51 /******/ // create a fake namespace object
52 /******/ // mode & 1: value is a module id, require it
53 /******/ // mode & 2: merge all properties of value into the ns
54 /******/ // mode & 4: return value when already ns object
55 /******/ // mode & 8|1: behave like require
56 /******/ __webpack_require__.t = function(value, mode) {
57 /******/ if(mode & 1) value = __webpack_require__(value);
58 /******/ if(mode & 8) return value;
59 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60 /******/ var ns = Object.create(null);
61 /******/ __webpack_require__.r(ns);
62 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64 /******/ return ns;
65 /******/ };
66 /******/
67 /******/ // getDefaultExport function for compatibility with non-harmony modules
68 /******/ __webpack_require__.n = function(module) {
69 /******/ var getter = module && module.__esModule ?
70 /******/ function getDefault() { return module['default']; } :
71 /******/ function getModuleExports() { return module; };
72 /******/ __webpack_require__.d(getter, 'a', getter);
73 /******/ return getter;
74 /******/ };
75 /******/
76 /******/ // Object.prototype.hasOwnProperty.call
77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78 /******/
79 /******/ // __webpack_public_path__
80 /******/ __webpack_require__.p = "";
81 /******/
82 /******/
83 /******/ // Load entry module and return exports
84 /******/ return __webpack_require__(__webpack_require__.s = "./js/scripts_es6.js");
85 /******/ })
86 /************************************************************************/
87 /******/ ({
88
89 /***/ "./js/scripts_es6.js":
90 /*!***************************!*\
91 !*** ./js/scripts_es6.js ***!
92 \***************************/
93 /*! no exports provided */
94 /***/ (function(module, __webpack_exports__, __webpack_require__) {
95
96 "use strict";
97 __webpack_require__.r(__webpack_exports__);
98 /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
99 /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
100 /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js");
101 /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);
102
103
104
105
106 var cf7signature_resized = 0; // for compatibility with contact-form-7-signature-addon
107
108 var wpcf7cf_timeout;
109 var wpcf7cf_change_time_ms = 100;
110
111 if (window.wpcf7cf_running_tests) {
112 jQuery('input[name="_wpcf7cf_options"]').each(function (e) {
113 var $input = jQuery(this);
114 var opt = JSON.parse($input.val());
115 opt.settings.animation_intime = 0;
116 opt.settings.animation_outtime = 0;
117 $input.val(JSON.stringify(opt));
118 });
119 wpcf7cf_change_time_ms = 0;
120 }
121
122 var wpcf7cf_show_animation = {
123 "height": "show",
124 "marginTop": "show",
125 "marginBottom": "show",
126 "paddingTop": "show",
127 "paddingBottom": "show"
128 };
129 var wpcf7cf_hide_animation = {
130 "height": "hide",
131 "marginTop": "hide",
132 "marginBottom": "hide",
133 "paddingTop": "hide",
134 "paddingBottom": "hide"
135 };
136 var wpcf7cf_show_step_animation = {
137 "opacity": "show"
138 };
139 var wpcf7cf_hide_step_animation = {
140 "opacity": "hide"
141 };
142 var wpcf7cf_change_events = 'input.wpcf7cf paste.wpcf7cf change.wpcf7cf click.wpcf7cf propertychange.wpcf7cf';
143 var wpcf7cf_forms = [];
144 window.wpcf7cf_dom = {};
145
146 var wpcf7cf_reload_dom = function wpcf7cf_reload_dom($form) {
147 wpcf7cf_dom = wpcf7cf.get_simplified_dom_model($form);
148 };
149
150 var wpcf7cf_getFieldsByOriginalName = function wpcf7cf_getFieldsByOriginalName(originalName) {
151 return Object.values(wpcf7cf_dom).filter(function (inputField) {
152 return inputField.original_name === originalName || inputField.original_name === originalName + '[]';
153 });
154 };
155
156 var wpcf7cf_getFieldByName = function wpcf7cf_getFieldByName(name) {
157 return wpcf7cf_dom[name] || wpcf7cf_dom[name + '[]'];
158 }; // endsWith polyfill
159
160
161 if (!String.prototype.endsWith) {
162 String.prototype.endsWith = function (search, this_len) {
163 if (this_len === undefined || this_len > this.length) {
164 this_len = this.length;
165 }
166
167 return this.substring(this_len - search.length, this_len) === search;
168 };
169 }
170
171 var Wpcf7cfForm = function Wpcf7cfForm($form) {
172 var options_element = $form.find('input[name="_wpcf7cf_options"]').eq(0);
173
174 if (!options_element.length || !options_element.val()) {
175 // doesn't look like a CF7 form created with conditional fields plugin enabled.
176 return false;
177 }
178
179 var form = this;
180 var form_options = JSON.parse(options_element.val());
181 form.$form = $form;
182 form.$input_hidden_group_fields = $form.find('[name="_wpcf7cf_hidden_group_fields"]');
183 form.$input_hidden_groups = $form.find('[name="_wpcf7cf_hidden_groups"]');
184 form.$input_visible_groups = $form.find('[name="_wpcf7cf_visible_groups"]');
185 form.$input_repeaters = $form.find('[name="_wpcf7cf_repeaters"]');
186 form.$input_steps = $form.find('[name="_wpcf7cf_steps"]');
187 form.unit_tag = $form.closest('.wpcf7').attr('id');
188 form.conditions = form_options['conditions']; // Wrapper around jQuery(selector, form.$form)
189
190 form.get = function (selector) {
191 // TODO: implement some caching here.
192 return jQuery(selector, form.$form);
193 }; // compatibility with conditional forms created with older versions of the plugin ( < 1.4 )
194
195
196 for (var i = 0; i < form.conditions.length; i++) {
197 var condition = form.conditions[i];
198
199 if (!('and_rules' in condition)) {
200 condition.and_rules = [{
201 'if_field': condition.if_field,
202 'if_value': condition.if_value,
203 'operator': condition.operator
204 }];
205 }
206 }
207
208 form.initial_conditions = form.conditions;
209 form.settings = form_options['settings'];
210 form.$groups = jQuery(); // empty jQuery set
211
212 form.repeaters = [];
213 form.multistep = null;
214 form.fields = [];
215 form.settings.animation_intime = parseInt(form.settings.animation_intime);
216 form.settings.animation_outtime = parseInt(form.settings.animation_outtime);
217
218 if (form.settings.animation === 'no') {
219 form.settings.animation_intime = 0;
220 form.settings.animation_outtime = 0;
221 }
222
223 form.updateGroups();
224 form.updateEventListeners();
225 form.displayFields(); // bring form in initial state if the reset event is fired on it.
226
227 form.$form.on('reset.wpcf7cf', form, function (e) {
228 var form = e.data;
229 setTimeout(function () {
230 form.displayFields();
231 form.resetRepeaters();
232
233 if (form.multistep != null) {
234 form.multistep.moveToStep(1);
235 }
236 }, 200);
237 }); // PRO ONLY
238
239 form.get('.wpcf7cf_repeater:not(.wpcf7cf_repeater .wpcf7cf_repeater)').each(function () {
240 form.repeaters.push(new Wpcf7cfRepeater(jQuery(this), form));
241 });
242 form.$input_repeaters.val(JSON.stringify(form.repeaters.map(function (item) {
243 return item.params.$repeater.id;
244 })));
245 var $multistep = form.get('.wpcf7cf_multistep');
246
247 if ($multistep.length) {
248 form.multistep = new Wpcf7cfMultistep($multistep, form); // window.wpcf7cf.updateMultistepState(form.multistep);
249 } // END PRO ONLY
250
251 };
252 /**
253 * reset initial number of subs for each repeater.
254 * (does not clear values)
255 */
256
257
258 Wpcf7cfForm.prototype.resetRepeaters = function () {
259 var form = this;
260 form.repeaters.forEach(function (repeater) {
261 repeater.updateSubs(repeater.params.$repeater.initial_subs);
262 });
263 };
264
265 Wpcf7cfForm.prototype.displayFields = function () {
266 var form = this;
267 var wpcf7cf_conditions = this.conditions;
268 var wpcf7cf_settings = this.settings; //for compatibility with contact-form-7-signature-addon
269
270 if (cf7signature_resized === 0 && typeof signatures !== 'undefined' && signatures.constructor === Array && signatures.length > 0) {
271 for (var i = 0; i < signatures.length; i++) {
272 if (signatures[i].canvas.width === 0) {
273 var $sig_canvas = jQuery(".wpcf7-form-control-signature-body>canvas");
274 var $sig_wrap = jQuery(".wpcf7-form-control-signature-wrap");
275 $sig_canvas.eq(i).attr('width', $sig_wrap.width());
276 $sig_canvas.eq(i).attr('height', $sig_wrap.height());
277 cf7signature_resized = 1;
278 }
279 }
280 }
281
282 form.$groups.addClass('wpcf7cf-hidden');
283 wpcf7cf_reload_dom(form.$form);
284
285 for (var i = 0; i < wpcf7cf_conditions.length; i++) {
286 var condition = wpcf7cf_conditions[i];
287 var show_group = window.wpcf7cf.should_group_be_shown(condition, form);
288
289 if (show_group) {
290 form.get('[data-id="' + condition.then_field + '"]').removeClass('wpcf7cf-hidden');
291 }
292 }
293
294 var animation_intime = wpcf7cf_settings.animation_intime;
295 var animation_outtime = wpcf7cf_settings.animation_outtime;
296 form.$groups.each(function (index) {
297 var $group = jQuery(this);
298 if ($group.is(':animated')) $group.finish(); // stop any current animations on the group
299
300 if ($group.css('display') === 'none' && !$group.hasClass('wpcf7cf-hidden')) {
301 if ($group.prop('tagName') === 'SPAN') {
302 $group.show().trigger('wpcf7cf_show_group');
303 } else {
304 $group.animate(wpcf7cf_show_animation, animation_intime).trigger('wpcf7cf_show_group'); // show
305 }
306 } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {
307 if ($group.attr('data-clear_on_hide') !== undefined) {
308 var $inputs = jQuery(':input', $group).not(':button, :submit, :reset, :hidden');
309 $inputs.each(function () {
310 var $this = jQuery(this);
311 $this.val(this.defaultValue);
312 $this.prop('checked', this.defaultChecked);
313 });
314 jQuery('option', $group).each(function () {
315 this.selected = this.defaultSelected;
316 });
317 jQuery('select', $group).each(function () {
318 var $select = jQuery(this);
319
320 if ($select.val() === null) {
321 $select.val(jQuery("option:first", $select).val());
322 }
323 });
324 $inputs.change(); //display_fields();
325 }
326
327 if ($group.prop('tagName') === 'SPAN') {
328 $group.hide().trigger('wpcf7cf_hide_group');
329 } else {
330 $group.animate(wpcf7cf_hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide
331 }
332 }
333 });
334 form.updateHiddenFields();
335 form.updateSummaryFields();
336 };
337
338 Wpcf7cfForm.prototype.updateSummaryFields = function () {
339 var form = this;
340 var $summary = form.get('.wpcf7cf-summary');
341 if ($summary.length == 0 || !$summary.is(':visible')) return;
342 var fd = new FormData();
343 var formdata = form.$form.serializeArray();
344 jQuery.each(formdata, function (key, input) {
345 fd.append(input.name, input.value);
346 }); // Make sure to add file fields to FormData
347
348 jQuery.each(form.$form.find('input[type="file"]'), function (index, el) {
349 if (!el.files.length) return false;
350 var file = el.files[0];
351 var fieldName = el.name;
352 fd.append(fieldName, new Blob(), file.name);
353 }); // add file fields to form-data
354
355 jQuery.ajax({
356 url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_get_summary',
357 type: 'POST',
358 data: fd,
359 processData: false,
360 contentType: false,
361 dataType: 'json',
362 success: function success(json) {
363 $summary.html(json.summaryHtml);
364 }
365 });
366 };
367
368 Wpcf7cfForm.prototype.updateHiddenFields = function () {
369 var form = this;
370 var hidden_fields = [];
371 var hidden_groups = [];
372 var visible_groups = [];
373 form.$groups.each(function () {
374 var $this = jQuery(this);
375
376 if ($this.hasClass('wpcf7cf-hidden')) {
377 hidden_groups.push($this.data('id'));
378 $this.find('input,select,textarea').each(function () {
379 hidden_fields.push(jQuery(this).attr('name'));
380 });
381 } else {
382 visible_groups.push($this.data('id'));
383 }
384 });
385 form.hidden_fields = hidden_fields;
386 form.hidden_groups = hidden_groups;
387 form.visible_groups = visible_groups;
388 form.$input_hidden_group_fields.val(JSON.stringify(hidden_fields));
389 form.$input_hidden_groups.val(JSON.stringify(hidden_groups));
390 form.$input_visible_groups.val(JSON.stringify(visible_groups));
391 return true;
392 };
393
394 Wpcf7cfForm.prototype.updateGroups = function () {
395 var form = this;
396 form.$groups = form.$form.find('[data-class="wpcf7cf_group"]');
397 form.conditions = window.wpcf7cf.get_nested_conditions(form.initial_conditions, form.$form);
398 };
399
400 Wpcf7cfForm.prototype.updateEventListeners = function () {
401 var form = this; // monitor input changes, and call displayFields() if something has changed
402
403 form.get('input, select, textarea, button').not('.wpcf7cf_add, .wpcf7cf_remove').off(wpcf7cf_change_events).on(wpcf7cf_change_events, form, function (e) {
404 var form = e.data;
405 clearTimeout(wpcf7cf_timeout);
406 wpcf7cf_timeout = setTimeout(function () {
407 form.displayFields();
408 }, wpcf7cf_change_time_ms);
409 }); // PRO ONLY
410
411 form.get('.wpcf7cf-togglebutton').off('click.toggle_wpcf7cf').on('click.toggle_wpcf7cf', function () {
412 var $this = jQuery(this);
413
414 if ($this.text() === $this.data('val-1')) {
415 $this.text($this.data('val-2'));
416 $this.val($this.data('val-2'));
417 } else {
418 $this.text($this.data('val-1'));
419 $this.val($this.data('val-1'));
420 }
421 }); // END PRO ONLY
422 }; // PRO ONLY
423
424
425 function Wpcf7cfRepeater($repeater, form) {
426 var $ = jQuery;
427 var repeater = this;
428 var wpcf7cf_settings = form.settings;
429 repeater.form = form;
430 $repeater.num_subs = 0;
431 $repeater.id = $repeater.data('id');
432 $repeater.orig_id = $repeater.data('orig_data_id');
433 $repeater.min = typeof $repeater.data('min') !== 'undefined' ? parseInt($repeater.data('min')) : 1;
434 $repeater.max = typeof $repeater.data('max') !== 'undefined' ? parseInt($repeater.data('max')) : 200;
435 $repeater.initial_subs = typeof $repeater.data('initial') !== 'undefined' ? parseInt($repeater.data('initial')) : $repeater.min;
436 if ($repeater.initial_subs > $repeater.max) $repeater.initial_subs = $repeater.max;
437 var $repeater_sub = $repeater.children('.wpcf7cf_repeater_sub').eq(0);
438 var $repeater_controls = $repeater.children('.wpcf7cf_repeater_controls').eq(0);
439 var $repeater_sub_clone = $repeater_sub.clone();
440 $repeater_sub_clone.find('.wpcf7cf_repeater_sub').addBack('.wpcf7cf_repeater_sub').each(function () {
441 var $this = jQuery(this);
442 var prev_suffix = $this.attr('data-repeater_sub_suffix');
443 var new_suffix = prev_suffix + '__{{repeater_sub_suffix}}';
444 $this.attr('data-repeater_sub_suffix', new_suffix);
445 });
446 $repeater_sub_clone.find('[name]').each(function () {
447 var $this = jQuery(this);
448 var prev_name = $this.attr('name');
449 var new_name = repeater.getNewName(prev_name);
450 var orig_name = $this.attr('data-orig_name') != null ? $this.attr('data-orig_name') : prev_name;
451 $this.attr('name', new_name);
452 $this.attr('data-orig_name', orig_name);
453 $this.closest('.wpcf7-form-control-wrap').addClass(new_name.replace('[]', ''));
454 });
455 $repeater_sub_clone.find('.wpcf7cf_repeater,[data-class="wpcf7cf_group"]').each(function () {
456 var $this = jQuery(this);
457 var prev_data_id = $this.attr('data-id');
458 var orig_data_id = $this.attr('data-orig_data_id') != null ? $this.attr('data-orig_data_id') : prev_data_id;
459 var new_data_id = repeater.getNewName(prev_data_id);
460
461 if (prev_data_id.endsWith('_count')) {
462 new_data_id = prev_data_id.replace('_count', '__{{repeater_sub_suffix}}_count');
463 }
464
465 $this.attr('data-id', new_data_id);
466 $this.attr('data-orig_data_id', orig_data_id);
467 });
468 $repeater_sub_clone.find('[id]').each(function () {
469 var $this = jQuery(this);
470 var prev_id = $this.attr('id');
471 var orig_id = $this.attr('data-orig_id') != null ? $this.attr('data-orig_id') : prev_id;
472 var new_id = repeater.getNewName(prev_id);
473 $this.attr('id', new_id);
474 $this.attr('data-orig_id', orig_id);
475 });
476 $repeater_sub_clone.find('[for]').each(function () {
477 var $this = jQuery(this);
478 var prev_for = $this.attr('for');
479 var orig_for = $this.attr('data-orig_for') != null ? $this.attr('data-orig_for') : prev_for;
480 var new_for = repeater.getNewName(prev_for);
481 $this.attr('for', new_for);
482 $this.attr('data-orig_for', orig_for);
483 });
484 var repeater_sub_html = $repeater_sub_clone[0].outerHTML;
485 var $repeater_count_field = $repeater.find('[name=' + $repeater.id + '_count]').eq(0);
486 var $button_add = $repeater_controls.find('.wpcf7cf_add').eq(0);
487 var $button_remove = $repeater_controls.find('.wpcf7cf_remove').eq(0);
488 var params = {
489 $repeater: $repeater,
490 $repeater_count_field: $repeater_count_field,
491 repeater_sub_html: repeater_sub_html,
492 $repeater_controls: $repeater_controls,
493 $button_add: $button_add,
494 $button_remove: $button_remove,
495 wpcf7cf_settings: wpcf7cf_settings
496 };
497 this.params = params;
498 $button_add.on('click', null, repeater, function (e) {
499 var repeater = e.data;
500 repeater.updateSubs(params.$repeater.num_subs + 1);
501 });
502 $button_remove.on('click', null, repeater, function (e) {
503 var repeater = e.data;
504 repeater.updateSubs(params.$repeater.num_subs - 1);
505 });
506 jQuery('> .wpcf7cf_repeater_sub', params.$repeater).eq(0).remove(); // remove the first sub, it's just a template.
507
508 repeater.updateSubs($repeater.initial_subs);
509 }
510
511 Wpcf7cfRepeater.prototype.getNewName = function (previousName) {
512 var prev_parts = previousName.split('[');
513 previousName = prev_parts[0];
514 var prev_suff = prev_parts.length > 1 ? '[' + prev_parts.splice(1).join('[') : '';
515 var newName = previousName + '__{{repeater_sub_suffix}}' + prev_suff;
516
517 if (previousName.endsWith('_count')) {
518 newName = previousName.replace('_count', '__{{repeater_sub_suffix}}_count');
519 }
520
521 return newName;
522 };
523
524 Wpcf7cfRepeater.prototype.updateSubs = function (subs_to_show) {
525 var repeater = this;
526 var params = repeater.params;
527 var subs_to_add = subs_to_show - params.$repeater.num_subs;
528
529 if (subs_to_add < 0) {
530 repeater.removeSubs(-subs_to_add);
531 } else if (subs_to_add > 0) {
532 repeater.addSubs(subs_to_add);
533 }
534
535 var showButtonRemove = false;
536 var showButtonAdd = false;
537
538 if (params.$repeater.num_subs < params.$repeater.max) {
539 showButtonAdd = true;
540 }
541
542 if (params.$repeater.num_subs > params.$repeater.min) {
543 showButtonRemove = true;
544 }
545
546 if (showButtonAdd) {
547 params.$button_add.show();
548 } else {
549 params.$button_add.hide();
550 }
551
552 if (showButtonRemove) {
553 params.$button_remove.show();
554 } else {
555 params.$button_remove.hide();
556 }
557
558 params.$repeater_count_field.val(subs_to_show);
559 };
560
561 Wpcf7cfRepeater.prototype.addSubs = function (subs_to_add) {
562 var $ = jQuery;
563 var params = this.params;
564 var repeater = this;
565 var form = repeater.form;
566 var $repeater = params.$repeater;
567 var $repeater_controls = params.$repeater_controls; //jQuery(params.repeater_sub_html.replace(/name="(.*?)"/g,'name="wpcf7cf_repeater['+$repeater.id+']['+$repeater.num_subs+'][$1]" data-original-name="$1"')).hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime);
568
569 var html_str = '';
570
571 for (var i = 1; i <= subs_to_add; i++) {
572 var sub_suffix = $repeater.num_subs + i;
573 html_str += params.repeater_sub_html.replace(/\{\{repeater_sub_suffix\}\}/g, sub_suffix).replace(new RegExp('\{\{' + $repeater.orig_id + '_index\}\}', 'g'), sub_suffix);
574 }
575
576 var $html = jQuery(html_str); // Add the newly created fields to the form
577
578 $html.hide().insertBefore($repeater_controls).animate(wpcf7cf_show_animation, params.wpcf7cf_settings.animation_intime).trigger('wpcf7cf_repeater_added');
579 jQuery('.wpcf7cf_repeater', $html).each(function () {
580 form.repeaters.push(new Wpcf7cfRepeater(jQuery(this), form));
581 });
582 form.$input_repeaters.val(JSON.stringify(form.repeaters.map(function (item) {
583 return item.params.$repeater.id;
584 })));
585 $repeater.num_subs += subs_to_add;
586 window.wpcf7cf.updateMultistepState(form.multistep);
587 form.updateGroups();
588 form.updateEventListeners();
589 form.displayFields(); // Exclusive Checkbox
590
591 $html.on('click', '.wpcf7-exclusive-checkbox input:checkbox', function () {
592 var name = $(this).attr('name');
593 $html.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false);
594 }); //basic compatibility with material-design-for-contact-form-7
595
596 if (typeof window.cf7mdInit === "function") {
597 window.cf7mdInit();
598 }
599
600 return false;
601 };
602
603 Wpcf7cfRepeater.prototype.removeSubs = function (num_subs) {
604 var $ = jQuery;
605 var params = this.params;
606 var form = this.form;
607 params.$repeater.num_subs -= num_subs;
608 jQuery('> .wpcf7cf_repeater_sub', params.$repeater).slice(-num_subs).animate(wpcf7cf_hide_animation, {
609 duration: params.wpcf7cf_settings.animation_intime,
610 done: function done() {
611 var $this = jQuery(this); //remove the actual fields from the form
612
613 $this.remove();
614 params.$repeater.trigger('wpcf7cf_repeater_removed');
615 window.wpcf7cf.updateMultistepState(form.multistep);
616 form.updateGroups();
617 form.updateEventListeners();
618 form.displayFields();
619 }
620 });
621 return false;
622 };
623
624 function Wpcf7cfMultistep($multistep, form) {
625 var multistep = this;
626 multistep.$multistep = $multistep;
627 multistep.form = form;
628 multistep.$steps = $multistep.find('.wpcf7cf_step');
629 multistep.$btn_next = $multistep.find('.wpcf7cf_next');
630 multistep.$btn_prev = $multistep.find('.wpcf7cf_prev');
631 multistep.$dots = $multistep.find('.wpcf7cf_steps-dots');
632 multistep.currentStep = 0;
633 multistep.numSteps = multistep.$steps.length;
634 multistep.$dots.html('');
635
636 for (var i = 1; i <= multistep.numSteps; i++) {
637 multistep.$dots.append("\n <div class=\"dot\" data-step=\"".concat(i, "\">\n <div class=\"step-index\">").concat(i, "</div>\n <div class=\"step-title\">").concat(multistep.$steps.eq(i - 1).data('title'), "</div>\n </div>\n "));
638 }
639
640 multistep.$btn_next.on('click.wpcf7cf_step', /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
641 var result;
642 return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
643 while (1) {
644 switch (_context.prev = _context.next) {
645 case 0:
646 _context.next = 2;
647 return multistep.validateStep(multistep.currentStep);
648
649 case 2:
650 result = _context.sent;
651
652 if (result === 'success') {
653 multistep.moveToStep(multistep.currentStep + 1);
654 }
655
656 case 4:
657 case "end":
658 return _context.stop();
659 }
660 }
661 }, _callee);
662 }))); // If form is submitted (by pressing Enter for example), and if we are not on the last step,
663 // then trigger click event on the $btn_next button instead.
664
665 multistep.form.$form.on('submit.wpcf7cf_step', function (e) {
666 if (multistep.currentStep !== multistep.numSteps) {
667 multistep.$btn_next.trigger('click.wpcf7cf_step');
668 e.stopImmediatePropagation();
669 return false;
670 }
671 });
672 multistep.$btn_prev.on('click', function () {
673 multistep.moveToStep(multistep.currentStep - 1);
674 });
675 multistep.moveToStep(1);
676 }
677
678 jQuery(document).ajaxComplete(function (e, xhr, settings) {
679 if (xhr.hasOwnProperty('responseJSON') && xhr.responseJSON != null && xhr.responseJSON.hasOwnProperty('status') && xhr.responseJSON.hasOwnProperty('into') && xhr.responseJSON.status === "mail_success") {
680 jQuery(xhr.responseJSON.into).trigger('reset.wpcf7cf');
681 }
682 });
683
684 Wpcf7cfMultistep.prototype.validateStep = function (step_index) {
685 var multistep = this;
686 var $multistep = multistep.$multistep;
687 var $form = multistep.form.$form;
688 var form = multistep.form;
689 $form.find('.wpcf7-response-output').addClass('wpcf7-display-none');
690 return new Promise(function (resolve) {
691 var fd = new FormData(); // Make sure to add file fields to FormData
692
693 jQuery.each($form.find('[data-id="step-' + step_index + '"] input[type="file"]'), function (index, el) {
694 if (!el.files.length) return false;
695 var file = el.files[0];
696 var fieldName = el.name;
697 fd.append(fieldName, file);
698 });
699 var formdata = $form.serializeArray();
700 jQuery.each(formdata, function (key, input) {
701 fd.append(input.name, input.value);
702 });
703 jQuery.ajax({
704 url: wpcf7cf_global_settings.ajaxurl + '?action=wpcf7cf_validate_step',
705 type: 'POST',
706 data: fd,
707 processData: false,
708 contentType: false,
709 dataType: 'json'
710 }).done(function (json) {
711 $multistep.find('.wpcf7-form-control-wrap .wpcf7-not-valid-tip').remove();
712 $multistep.find('.wpcf7-not-valid').removeClass('wpcf7-not-valid');
713 $multistep.find('.wpcf7-response-output').remove();
714 $multistep.find('.wpcf7-response-output.wpcf7-validation-errors').removeClass('wpcf7-validation-errors');
715
716 if (!json.success) {
717 var checkError = 0;
718 jQuery.each(json.invalid_fields, function (index, el) {
719 if ($multistep.find('input[name="' + index + '"]').length || $multistep.find('input[name="' + index + '[]"]').length || $multistep.find('select[name="' + index + '"]').length || $multistep.find('select[name="' + index + '[]"]').length || $multistep.find('textarea[name="' + index + '"]').length || $multistep.find('textarea[name="' + index + '[]"]').length) {
720 checkError = checkError + 1;
721 var controlWrap = form.get('.wpcf7-form-control-wrap.' + index);
722 controlWrap.find('.wpcf7-form-control').addClass('wpcf7-not-valid');
723 controlWrap.find('span.wpcf7-not-valid-tip').remove();
724 controlWrap.append('<span role="alert" class="wpcf7-not-valid-tip">' + el.reason + '</span>');
725 }
726 });
727 resolve('failed');
728 $multistep.parent().find('.wpcf7-response-output').removeClass('wpcf7-display-none').html(json.message);
729 } else if (json.success) {
730 resolve('success');
731 return false;
732 }
733 }).fail(function () {
734 resolve('error');
735 }).always(function () {// do nothing
736 });
737 });
738 };
739
740 Wpcf7cfMultistep.prototype.moveToStep = function (step_index) {
741 var multistep = this;
742 var previousStep = multistep.currentStep;
743 multistep.currentStep = step_index > multistep.numSteps ? multistep.numSteps : step_index < 1 ? 1 : step_index; // ANIMATION DISABLED FOR NOW cause it's ugly
744 // multistep.$steps.animate(wpcf7cf_hide_step_animation, multistep.form.settings.animation_outtime);
745 // multistep.$steps.eq(multistep.currentStep-1).animate(wpcf7cf_show_step_animation, multistep.form.settings.animation_intime);
746
747 multistep.$multistep.attr('data-current_step', multistep.currentStep);
748 multistep.$steps.hide();
749 multistep.$steps.eq(multistep.currentStep - 1).show().trigger('wpcf7cf_change_step', [previousStep, multistep.currentStep]);
750 var formEl = multistep.form.$form[0];
751 var topOffset = formEl.getBoundingClientRect().top;
752
753 if (topOffset < 0 && previousStep > 0) {
754 formEl.scrollIntoView({
755 behavior: "smooth"
756 });
757 }
758
759 multistep.form.updateSummaryFields();
760 window.wpcf7cf.updateMultistepState(multistep);
761 };
762
763 Wpcf7cfMultistep.prototype.getFieldsInStep = function (step_index) {
764 wpcf7cf_reload_dom(this.form.$form);
765 var inStep = false;
766 return Object.values(wpcf7cf_dom).filter(function (item, i) {
767 if (item.type == 'step') {
768 inStep = item.val == step_index + '';
769 }
770
771 return inStep && item.type == 'input';
772 }).map(function (item) {
773 return item.name;
774 });
775 }; // END PRO ONLY
776
777
778 window.wpcf7cf = {
779 // keep this for backwards compatibility
780 initForm: function initForm($forms) {
781 $forms.each(function () {
782 var $form = jQuery(this); // only add form is its class is "wpcf7-form" and if the form was not previously added
783
784 if ($form.hasClass('wpcf7-form') && !wpcf7cf_forms.some(function (form) {
785 return form.$form.get(0) === $form.get(0);
786 })) {
787 wpcf7cf_forms.push(new Wpcf7cfForm($form));
788 }
789 });
790 },
791 get_nested_conditions: function get_nested_conditions(conditions, $current_form) {
792 //loop trough conditions. Then loop trough the dom, and each repeater we pass we should update all sub_values we encounter with __index
793 wpcf7cf_reload_dom($current_form);
794 var groups = Object.values(wpcf7cf_dom).filter(function (item, i) {
795 return item.type === 'group';
796 });
797 var sub_conditions = [];
798
799 for (var i = 0; i < groups.length; i++) {
800 var g = groups[i];
801 var relevant_conditions = conditions.filter(function (condition, i) {
802 return condition.then_field === g.original_name;
803 });
804 var relevant_conditions = relevant_conditions.map(function (item, i) {
805 return {
806 then_field: g.name,
807 and_rules: item.and_rules.map(function (and_rule, i) {
808 return {
809 if_field: and_rule.if_field + g.suffix,
810 if_value: and_rule.if_value,
811 operator: and_rule.operator
812 };
813 })
814 };
815 });
816 sub_conditions = sub_conditions.concat(relevant_conditions);
817 }
818
819 return sub_conditions;
820 },
821 get_simplified_dom_model: function get_simplified_dom_model($current_form) {
822 var currentNode;
823 var ni = document.createNodeIterator($current_form[0], NodeFilter.SHOW_ELEMENT, null, false); //, NodeFilter.SHOW_ELEMENT, function(){ return NodeFilter.FILTER_ACCEPT; }
824
825 var simplified_dom = {};
826
827 while (currentNode = ni.nextNode()) {
828 var type = currentNode.classList.contains('wpcf7cf_repeater') ? 'repeater' : currentNode.dataset["class"] == 'wpcf7cf_group' ? 'group' : currentNode.className == 'wpcf7cf_step' ? 'step' : currentNode.hasAttribute('name') ? 'input' : false;
829
830 if (!type) {
831 continue;
832 }
833
834 var name = type === 'input' ? currentNode.getAttribute('name') : currentNode.dataset.id; // skip _wpcf7 hidden fields
835
836 if (name.substring(0, 6) === '_wpcf7') continue;
837 var original_name = type === 'repeater' || type === 'group' ? currentNode.dataset.orig_data_id : type === 'input' ? currentNode.getAttribute('data-orig_name') || name : name;
838 var val = type === 'step' ? [currentNode.dataset.id.substring(5)] : [];
839 var original_name_length = original_name == null ? name.length : original_name.length;
840 var suffix = name.substring(original_name_length);
841
842 if (!simplified_dom[name]) {
843 // init entry
844 simplified_dom[name] = {
845 name: name,
846 type: type,
847 original_name: original_name,
848 suffix: suffix,
849 val: val
850 };
851 }
852
853 if (type === 'input') {
854 // skip unchecked checkboxes and radiobuttons
855 if ((currentNode.type === 'checkbox' || currentNode.type === 'radio') && !currentNode.checked) continue; // if multiselect, make sure to add all the values
856
857 if (currentNode.multiple && currentNode.options) {
858 simplified_dom[name].val = Object.values(currentNode.options).filter(function (o) {
859 return o.selected;
860 }).map(function (o) {
861 return o.value;
862 });
863 } else {
864 simplified_dom[name].val.push(currentNode.value);
865 }
866 }
867 }
868
869 return simplified_dom;
870 },
871 updateMultistepState: function updateMultistepState(multistep) {
872 if (multistep == null) return; // update hidden input field
873
874 var stepsData = {
875 currentStep: multistep.currentStep,
876 numSteps: multistep.numSteps,
877 fieldsInCurrentStep: multistep.getFieldsInStep(multistep.currentStep)
878 };
879 multistep.form.$input_steps.val(JSON.stringify(stepsData)); // update Buttons
880
881 multistep.$btn_prev.removeClass('disabled').attr('disabled', false);
882 multistep.$btn_next.removeClass('disabled').attr('disabled', false);
883
884 if (multistep.currentStep == multistep.numSteps) {
885 multistep.$btn_next.addClass('disabled').attr('disabled', true);
886 }
887
888 if (multistep.currentStep == 1) {
889 multistep.$btn_prev.addClass('disabled').attr('disabled', true);
890 } // replace next button with submit button on last step.
891 // TODO: make this depend on a setting
892
893
894 var $submit_button = multistep.form.$form.find('input[type="submit"]').eq(0);
895 var $ajax_loader = multistep.form.$form.find('.ajax-loader').eq(0);
896
897 if (multistep.currentStep == multistep.numSteps) {
898 multistep.$btn_next.hide();
899 $ajax_loader.detach().appendTo(multistep.$btn_next.parent());
900 $submit_button.detach().appendTo(multistep.$btn_next.parent());
901 $submit_button.show();
902 } else {
903 $submit_button.hide();
904 multistep.$btn_next.show();
905 } // update dots
906
907
908 var $dots = multistep.$dots.find('.dot');
909 $dots.removeClass('active').removeClass('completed');
910
911 for (var step = 1; step <= multistep.numSteps; step++) {
912 if (step < multistep.currentStep) {
913 $dots.eq(step - 1).addClass('completed');
914 } else if (step == multistep.currentStep) {
915 $dots.eq(step - 1).addClass('active');
916 }
917 }
918 },
919 should_group_be_shown: function should_group_be_shown(condition) {
920 var show_group = true;
921
922 for (var and_rule_i = 0; and_rule_i < condition.and_rules.length; and_rule_i++) {
923 var condition_ok = false;
924 var condition_and_rule = condition.and_rules[and_rule_i];
925 var inputField = wpcf7cf_getFieldByName(condition_and_rule.if_field);
926 if (!inputField) continue; // field not found
927
928 var if_val = condition_and_rule.if_value;
929 var operator = condition_and_rule.operator; //backwards compat
930
931 operator = operator === '' ? 'less than or equals' : operator;
932 operator = operator === '' ? 'greater than or equals' : operator;
933 operator = operator === '>' ? 'greater than' : operator;
934 operator = operator === '<' ? 'less than' : operator;
935 var $field = operator === 'function' && jQuery("[name=\"".concat(inputField.name, "\"]")).eq(0);
936 condition_ok = this.isConditionTrue(inputField.val, operator, if_val, $field);
937 show_group = show_group && condition_ok;
938 }
939
940 return show_group;
941 },
942 isConditionTrue: function isConditionTrue(values, operator) {
943 var testValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
944 var $field = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : jQuery();
945
946 if (!Array.isArray(values)) {
947 values = [values];
948 }
949
950 var condition_ok = false; // start by assuming that the condition is not met
951 // Considered EMPTY: [] [''] [null] ['',null] [,,'']
952 // Considered NOT EMPTY: [0] ['ab','c'] ['',0,null]
953
954 var valuesAreEmpty = values.length === 0 || values.every(function (v) {
955 return !v && v !== 0;
956 }); // 0 is not considered empty
957 // special cases: [] equals '' => TRUE; [] not equals '' => FALSE
958
959 if (operator === 'equals' && testValue === '' && valuesAreEmpty) {
960 return true;
961 }
962
963 if (operator === 'not equals' && testValue === '' && valuesAreEmpty) {
964 return false;
965 }
966
967 if (valuesAreEmpty) {
968 if (operator === 'is empty') {
969 condition_ok = true;
970 }
971 } else {
972 if (operator === 'not empty') {
973 condition_ok = true;
974 }
975 }
976
977 var testValueNumber = isFinite(parseFloat(testValue)) ? parseFloat(testValue) : NaN;
978
979 if (operator === 'not equals' || operator === 'not equals (regex)') {
980 // start by assuming that the condition is met
981 condition_ok = true;
982 }
983
984 if (operator === 'function' && typeof window[testValue] == 'function' && window[testValue]($field) // here we call the actual user defined function
985 ) {
986 condition_ok = true;
987 }
988
989 var regex_patt = /.*/i; // fallback regex pattern
990
991 var isValidRegex = true;
992
993 if (operator === 'equals (regex)' || operator === 'not equals (regex)') {
994 try {
995 regex_patt = new RegExp(testValue, 'i');
996 } catch (e) {
997 isValidRegex = false;
998 }
999 }
1000
1001 for (var i = 0; i < values.length; i++) {
1002 var value = values[i];
1003 var valueNumber = isFinite(parseFloat(value)) ? parseFloat(value) : NaN;
1004 var valsAreNumbers = !isNaN(valueNumber) && !isNaN(testValueNumber);
1005
1006 if (operator === 'equals' && value === testValue || operator === 'equals (regex)' && regex_patt.test(value) || operator === 'greater than' && valsAreNumbers && valueNumber > testValueNumber || operator === 'less than' && valsAreNumbers && valueNumber < testValueNumber || operator === 'greater than or equals' && valsAreNumbers && valueNumber >= testValueNumber || operator === 'less than or equals' && valsAreNumbers && valueNumber <= testValueNumber) {
1007 condition_ok = true;
1008 break;
1009 } else if (operator === 'not equals' && value === testValue || operator === 'not equals (regex)' && regex_patt.test(value)) {
1010 condition_ok = false;
1011 break;
1012 }
1013 }
1014
1015 return condition_ok;
1016 }
1017 };
1018 jQuery('.wpcf7-form').each(function () {
1019 wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));
1020 }); // Call displayFields again on all forms
1021 // Necessary in case some theme or plugin changed a form value by the time the entire page is fully loaded.
1022
1023 jQuery('document').ready(function () {
1024 wpcf7cf_forms.forEach(function (f) {
1025 f.displayFields();
1026 });
1027 }); // fix for exclusive checkboxes in IE (this will call the change-event again after all other checkboxes are unchecked, triggering the display_fields() function)
1028
1029 var old_wpcf7ExclusiveCheckbox = jQuery.fn.wpcf7ExclusiveCheckbox;
1030
1031 jQuery.fn.wpcf7ExclusiveCheckbox = function () {
1032 return this.find('input:checkbox').on('click', function () {
1033 var name = jQuery(this).attr('name');
1034 jQuery(this).closest('form').find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false).eq(0).change();
1035 });
1036 };
1037
1038 /***/ }),
1039
1040 /***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
1041 /*!*****************************************************************!*\
1042 !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
1043 \*****************************************************************/
1044 /*! no static exports found */
1045 /***/ (function(module, exports) {
1046
1047 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1048 try {
1049 var info = gen[key](arg);
1050 var value = info.value;
1051 } catch (error) {
1052 reject(error);
1053 return;
1054 }
1055
1056 if (info.done) {
1057 resolve(value);
1058 } else {
1059 Promise.resolve(value).then(_next, _throw);
1060 }
1061 }
1062
1063 function _asyncToGenerator(fn) {
1064 return function () {
1065 var self = this,
1066 args = arguments;
1067 return new Promise(function (resolve, reject) {
1068 var gen = fn.apply(self, args);
1069
1070 function _next(value) {
1071 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1072 }
1073
1074 function _throw(err) {
1075 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1076 }
1077
1078 _next(undefined);
1079 });
1080 };
1081 }
1082
1083 module.exports = _asyncToGenerator;
1084
1085 /***/ }),
1086
1087 /***/ "./node_modules/@babel/runtime/regenerator/index.js":
1088 /*!**********************************************************!*\
1089 !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
1090 \**********************************************************/
1091 /*! no static exports found */
1092 /***/ (function(module, exports, __webpack_require__) {
1093
1094 module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
1095
1096 /***/ }),
1097
1098 /***/ "./node_modules/regenerator-runtime/runtime.js":
1099 /*!*****************************************************!*\
1100 !*** ./node_modules/regenerator-runtime/runtime.js ***!
1101 \*****************************************************/
1102 /*! no static exports found */
1103 /***/ (function(module, exports, __webpack_require__) {
1104
1105 /* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1106
1107 /**
1108 * Copyright (c) 2014-present, Facebook, Inc.
1109 *
1110 * This source code is licensed under the MIT license found in the
1111 * LICENSE file in the root directory of this source tree.
1112 */
1113 var runtime = function (exports) {
1114 "use strict";
1115
1116 var Op = Object.prototype;
1117 var hasOwn = Op.hasOwnProperty;
1118 var undefined; // More compressible than void 0.
1119
1120 var $Symbol = typeof Symbol === "function" ? Symbol : {};
1121 var iteratorSymbol = $Symbol.iterator || "@@iterator";
1122 var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
1123 var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1124
1125 function wrap(innerFn, outerFn, self, tryLocsList) {
1126 // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
1127 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
1128 var generator = Object.create(protoGenerator.prototype);
1129 var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
1130 // .throw, and .return methods.
1131
1132 generator._invoke = makeInvokeMethod(innerFn, self, context);
1133 return generator;
1134 }
1135
1136 exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
1137 // record like context.tryEntries[i].completion. This interface could
1138 // have been (and was previously) designed to take a closure to be
1139 // invoked without arguments, but in all the cases we care about we
1140 // already have an existing method we want to call, so there's no need
1141 // to create a new function object. We can even get away with assuming
1142 // the method takes exactly one argument, since that happens to be true
1143 // in every case, so we don't have to touch the arguments object. The
1144 // only additional allocation required is the completion record, which
1145 // has a stable shape and so hopefully should be cheap to allocate.
1146
1147 function tryCatch(fn, obj, arg) {
1148 try {
1149 return {
1150 type: "normal",
1151 arg: fn.call(obj, arg)
1152 };
1153 } catch (err) {
1154 return {
1155 type: "throw",
1156 arg: err
1157 };
1158 }
1159 }
1160
1161 var GenStateSuspendedStart = "suspendedStart";
1162 var GenStateSuspendedYield = "suspendedYield";
1163 var GenStateExecuting = "executing";
1164 var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
1165 // breaking out of the dispatch switch statement.
1166
1167 var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
1168 // .constructor.prototype properties for functions that return Generator
1169 // objects. For full spec compliance, you may wish to configure your
1170 // minifier not to mangle the names of these two functions.
1171
1172 function Generator() {}
1173
1174 function GeneratorFunction() {}
1175
1176 function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
1177 // don't natively support it.
1178
1179
1180 var IteratorPrototype = {};
1181
1182 IteratorPrototype[iteratorSymbol] = function () {
1183 return this;
1184 };
1185
1186 var getProto = Object.getPrototypeOf;
1187 var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1188
1189 if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
1190 // This environment has a native %IteratorPrototype%; use it instead
1191 // of the polyfill.
1192 IteratorPrototype = NativeIteratorPrototype;
1193 }
1194
1195 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
1196 GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
1197 GeneratorFunctionPrototype.constructor = GeneratorFunction;
1198 GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
1199 // Iterator interface in terms of a single ._invoke method.
1200
1201 function defineIteratorMethods(prototype) {
1202 ["next", "throw", "return"].forEach(function (method) {
1203 prototype[method] = function (arg) {
1204 return this._invoke(method, arg);
1205 };
1206 });
1207 }
1208
1209 exports.isGeneratorFunction = function (genFun) {
1210 var ctor = typeof genFun === "function" && genFun.constructor;
1211 return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
1212 // do is to check its .name property.
1213 (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
1214 };
1215
1216 exports.mark = function (genFun) {
1217 if (Object.setPrototypeOf) {
1218 Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
1219 } else {
1220 genFun.__proto__ = GeneratorFunctionPrototype;
1221
1222 if (!(toStringTagSymbol in genFun)) {
1223 genFun[toStringTagSymbol] = "GeneratorFunction";
1224 }
1225 }
1226
1227 genFun.prototype = Object.create(Gp);
1228 return genFun;
1229 }; // Within the body of any async function, `await x` is transformed to
1230 // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
1231 // `hasOwn.call(value, "__await")` to determine if the yielded value is
1232 // meant to be awaited.
1233
1234
1235 exports.awrap = function (arg) {
1236 return {
1237 __await: arg
1238 };
1239 };
1240
1241 function AsyncIterator(generator, PromiseImpl) {
1242 function invoke(method, arg, resolve, reject) {
1243 var record = tryCatch(generator[method], generator, arg);
1244
1245 if (record.type === "throw") {
1246 reject(record.arg);
1247 } else {
1248 var result = record.arg;
1249 var value = result.value;
1250
1251 if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
1252 return PromiseImpl.resolve(value.__await).then(function (value) {
1253 invoke("next", value, resolve, reject);
1254 }, function (err) {
1255 invoke("throw", err, resolve, reject);
1256 });
1257 }
1258
1259 return PromiseImpl.resolve(value).then(function (unwrapped) {
1260 // When a yielded Promise is resolved, its final value becomes
1261 // the .value of the Promise<{value,done}> result for the
1262 // current iteration.
1263 result.value = unwrapped;
1264 resolve(result);
1265 }, function (error) {
1266 // If a rejected Promise was yielded, throw the rejection back
1267 // into the async generator function so it can be handled there.
1268 return invoke("throw", error, resolve, reject);
1269 });
1270 }
1271 }
1272
1273 var previousPromise;
1274
1275 function enqueue(method, arg) {
1276 function callInvokeWithMethodAndArg() {
1277 return new PromiseImpl(function (resolve, reject) {
1278 invoke(method, arg, resolve, reject);
1279 });
1280 }
1281
1282 return previousPromise = // If enqueue has been called before, then we want to wait until
1283 // all previous Promises have been resolved before calling invoke,
1284 // so that results are always delivered in the correct order. If
1285 // enqueue has not been called before, then it is important to
1286 // call invoke immediately, without waiting on a callback to fire,
1287 // so that the async generator function has the opportunity to do
1288 // any necessary setup in a predictable way. This predictability
1289 // is why the Promise constructor synchronously invokes its
1290 // executor callback, and why async functions synchronously
1291 // execute code before the first await. Since we implement simple
1292 // async functions in terms of async generators, it is especially
1293 // important to get this right, even though it requires care.
1294 previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
1295 // invocations of the iterator.
1296 callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
1297 } // Define the unified helper method that is used to implement .next,
1298 // .throw, and .return (see defineIteratorMethods).
1299
1300
1301 this._invoke = enqueue;
1302 }
1303
1304 defineIteratorMethods(AsyncIterator.prototype);
1305
1306 AsyncIterator.prototype[asyncIteratorSymbol] = function () {
1307 return this;
1308 };
1309
1310 exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
1311 // AsyncIterator objects; they just return a Promise for the value of
1312 // the final result produced by the iterator.
1313
1314 exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1315 if (PromiseImpl === void 0) PromiseImpl = Promise;
1316 var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
1317 return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
1318 : iter.next().then(function (result) {
1319 return result.done ? result.value : iter.next();
1320 });
1321 };
1322
1323 function makeInvokeMethod(innerFn, self, context) {
1324 var state = GenStateSuspendedStart;
1325 return function invoke(method, arg) {
1326 if (state === GenStateExecuting) {
1327 throw new Error("Generator is already running");
1328 }
1329
1330 if (state === GenStateCompleted) {
1331 if (method === "throw") {
1332 throw arg;
1333 } // Be forgiving, per 25.3.3.3.3 of the spec:
1334 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1335
1336
1337 return doneResult();
1338 }
1339
1340 context.method = method;
1341 context.arg = arg;
1342
1343 while (true) {
1344 var delegate = context.delegate;
1345
1346 if (delegate) {
1347 var delegateResult = maybeInvokeDelegate(delegate, context);
1348
1349 if (delegateResult) {
1350 if (delegateResult === ContinueSentinel) continue;
1351 return delegateResult;
1352 }
1353 }
1354
1355 if (context.method === "next") {
1356 // Setting context._sent for legacy support of Babel's
1357 // function.sent implementation.
1358 context.sent = context._sent = context.arg;
1359 } else if (context.method === "throw") {
1360 if (state === GenStateSuspendedStart) {
1361 state = GenStateCompleted;
1362 throw context.arg;
1363 }
1364
1365 context.dispatchException(context.arg);
1366 } else if (context.method === "return") {
1367 context.abrupt("return", context.arg);
1368 }
1369
1370 state = GenStateExecuting;
1371 var record = tryCatch(innerFn, self, context);
1372
1373 if (record.type === "normal") {
1374 // If an exception is thrown from innerFn, we leave state ===
1375 // GenStateExecuting and loop back for another invocation.
1376 state = context.done ? GenStateCompleted : GenStateSuspendedYield;
1377
1378 if (record.arg === ContinueSentinel) {
1379 continue;
1380 }
1381
1382 return {
1383 value: record.arg,
1384 done: context.done
1385 };
1386 } else if (record.type === "throw") {
1387 state = GenStateCompleted; // Dispatch the exception by looping back around to the
1388 // context.dispatchException(context.arg) call above.
1389
1390 context.method = "throw";
1391 context.arg = record.arg;
1392 }
1393 }
1394 };
1395 } // Call delegate.iterator[context.method](context.arg) and handle the
1396 // result, either by returning a { value, done } result from the
1397 // delegate iterator, or by modifying context.method and context.arg,
1398 // setting context.delegate to null, and returning the ContinueSentinel.
1399
1400
1401 function maybeInvokeDelegate(delegate, context) {
1402 var method = delegate.iterator[context.method];
1403
1404 if (method === undefined) {
1405 // A .throw or .return when the delegate iterator has no .throw
1406 // method always terminates the yield* loop.
1407 context.delegate = null;
1408
1409 if (context.method === "throw") {
1410 // Note: ["return"] must be used for ES3 parsing compatibility.
1411 if (delegate.iterator["return"]) {
1412 // If the delegate iterator has a return method, give it a
1413 // chance to clean up.
1414 context.method = "return";
1415 context.arg = undefined;
1416 maybeInvokeDelegate(delegate, context);
1417
1418 if (context.method === "throw") {
1419 // If maybeInvokeDelegate(context) changed context.method from
1420 // "return" to "throw", let that override the TypeError below.
1421 return ContinueSentinel;
1422 }
1423 }
1424
1425 context.method = "throw";
1426 context.arg = new TypeError("The iterator does not provide a 'throw' method");
1427 }
1428
1429 return ContinueSentinel;
1430 }
1431
1432 var record = tryCatch(method, delegate.iterator, context.arg);
1433
1434 if (record.type === "throw") {
1435 context.method = "throw";
1436 context.arg = record.arg;
1437 context.delegate = null;
1438 return ContinueSentinel;
1439 }
1440
1441 var info = record.arg;
1442
1443 if (!info) {
1444 context.method = "throw";
1445 context.arg = new TypeError("iterator result is not an object");
1446 context.delegate = null;
1447 return ContinueSentinel;
1448 }
1449
1450 if (info.done) {
1451 // Assign the result of the finished delegate to the temporary
1452 // variable specified by delegate.resultName (see delegateYield).
1453 context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
1454
1455 context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
1456 // exception, let the outer generator proceed normally. If
1457 // context.method was "next", forget context.arg since it has been
1458 // "consumed" by the delegate iterator. If context.method was
1459 // "return", allow the original .return call to continue in the
1460 // outer generator.
1461
1462 if (context.method !== "return") {
1463 context.method = "next";
1464 context.arg = undefined;
1465 }
1466 } else {
1467 // Re-yield the result returned by the delegate method.
1468 return info;
1469 } // The delegate iterator is finished, so forget it and continue with
1470 // the outer generator.
1471
1472
1473 context.delegate = null;
1474 return ContinueSentinel;
1475 } // Define Generator.prototype.{next,throw,return} in terms of the
1476 // unified ._invoke helper method.
1477
1478
1479 defineIteratorMethods(Gp);
1480 Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
1481 // @@iterator function is called on it. Some browsers' implementations of the
1482 // iterator prototype chain incorrectly implement this, causing the Generator
1483 // object to not be returned from this call. This ensures that doesn't happen.
1484 // See https://github.com/facebook/regenerator/issues/274 for more details.
1485
1486 Gp[iteratorSymbol] = function () {
1487 return this;
1488 };
1489
1490 Gp.toString = function () {
1491 return "[object Generator]";
1492 };
1493
1494 function pushTryEntry(locs) {
1495 var entry = {
1496 tryLoc: locs[0]
1497 };
1498
1499 if (1 in locs) {
1500 entry.catchLoc = locs[1];
1501 }
1502
1503 if (2 in locs) {
1504 entry.finallyLoc = locs[2];
1505 entry.afterLoc = locs[3];
1506 }
1507
1508 this.tryEntries.push(entry);
1509 }
1510
1511 function resetTryEntry(entry) {
1512 var record = entry.completion || {};
1513 record.type = "normal";
1514 delete record.arg;
1515 entry.completion = record;
1516 }
1517
1518 function Context(tryLocsList) {
1519 // The root entry object (effectively a try statement without a catch
1520 // or a finally block) gives us a place to store values thrown from
1521 // locations where there is no enclosing try statement.
1522 this.tryEntries = [{
1523 tryLoc: "root"
1524 }];
1525 tryLocsList.forEach(pushTryEntry, this);
1526 this.reset(true);
1527 }
1528
1529 exports.keys = function (object) {
1530 var keys = [];
1531
1532 for (var key in object) {
1533 keys.push(key);
1534 }
1535
1536 keys.reverse(); // Rather than returning an object with a next method, we keep
1537 // things simple and return the next function itself.
1538
1539 return function next() {
1540 while (keys.length) {
1541 var key = keys.pop();
1542
1543 if (key in object) {
1544 next.value = key;
1545 next.done = false;
1546 return next;
1547 }
1548 } // To avoid creating an additional object, we just hang the .value
1549 // and .done properties off the next function object itself. This
1550 // also ensures that the minifier will not anonymize the function.
1551
1552
1553 next.done = true;
1554 return next;
1555 };
1556 };
1557
1558 function values(iterable) {
1559 if (iterable) {
1560 var iteratorMethod = iterable[iteratorSymbol];
1561
1562 if (iteratorMethod) {
1563 return iteratorMethod.call(iterable);
1564 }
1565
1566 if (typeof iterable.next === "function") {
1567 return iterable;
1568 }
1569
1570 if (!isNaN(iterable.length)) {
1571 var i = -1,
1572 next = function next() {
1573 while (++i < iterable.length) {
1574 if (hasOwn.call(iterable, i)) {
1575 next.value = iterable[i];
1576 next.done = false;
1577 return next;
1578 }
1579 }
1580
1581 next.value = undefined;
1582 next.done = true;
1583 return next;
1584 };
1585
1586 return next.next = next;
1587 }
1588 } // Return an iterator with no values.
1589
1590
1591 return {
1592 next: doneResult
1593 };
1594 }
1595
1596 exports.values = values;
1597
1598 function doneResult() {
1599 return {
1600 value: undefined,
1601 done: true
1602 };
1603 }
1604
1605 Context.prototype = {
1606 constructor: Context,
1607 reset: function reset(skipTempReset) {
1608 this.prev = 0;
1609 this.next = 0; // Resetting context._sent for legacy support of Babel's
1610 // function.sent implementation.
1611
1612 this.sent = this._sent = undefined;
1613 this.done = false;
1614 this.delegate = null;
1615 this.method = "next";
1616 this.arg = undefined;
1617 this.tryEntries.forEach(resetTryEntry);
1618
1619 if (!skipTempReset) {
1620 for (var name in this) {
1621 // Not sure about the optimal order of these conditions:
1622 if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
1623 this[name] = undefined;
1624 }
1625 }
1626 }
1627 },
1628 stop: function stop() {
1629 this.done = true;
1630 var rootEntry = this.tryEntries[0];
1631 var rootRecord = rootEntry.completion;
1632
1633 if (rootRecord.type === "throw") {
1634 throw rootRecord.arg;
1635 }
1636
1637 return this.rval;
1638 },
1639 dispatchException: function dispatchException(exception) {
1640 if (this.done) {
1641 throw exception;
1642 }
1643
1644 var context = this;
1645
1646 function handle(loc, caught) {
1647 record.type = "throw";
1648 record.arg = exception;
1649 context.next = loc;
1650
1651 if (caught) {
1652 // If the dispatched exception was caught by a catch block,
1653 // then let that catch block handle the exception normally.
1654 context.method = "next";
1655 context.arg = undefined;
1656 }
1657
1658 return !!caught;
1659 }
1660
1661 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1662 var entry = this.tryEntries[i];
1663 var record = entry.completion;
1664
1665 if (entry.tryLoc === "root") {
1666 // Exception thrown outside of any try block that could handle
1667 // it, so set the completion value of the entire function to
1668 // throw the exception.
1669 return handle("end");
1670 }
1671
1672 if (entry.tryLoc <= this.prev) {
1673 var hasCatch = hasOwn.call(entry, "catchLoc");
1674 var hasFinally = hasOwn.call(entry, "finallyLoc");
1675
1676 if (hasCatch && hasFinally) {
1677 if (this.prev < entry.catchLoc) {
1678 return handle(entry.catchLoc, true);
1679 } else if (this.prev < entry.finallyLoc) {
1680 return handle(entry.finallyLoc);
1681 }
1682 } else if (hasCatch) {
1683 if (this.prev < entry.catchLoc) {
1684 return handle(entry.catchLoc, true);
1685 }
1686 } else if (hasFinally) {
1687 if (this.prev < entry.finallyLoc) {
1688 return handle(entry.finallyLoc);
1689 }
1690 } else {
1691 throw new Error("try statement without catch or finally");
1692 }
1693 }
1694 }
1695 },
1696 abrupt: function abrupt(type, arg) {
1697 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1698 var entry = this.tryEntries[i];
1699
1700 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
1701 var finallyEntry = entry;
1702 break;
1703 }
1704 }
1705
1706 if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
1707 // Ignore the finally entry if control is not jumping to a
1708 // location outside the try/catch block.
1709 finallyEntry = null;
1710 }
1711
1712 var record = finallyEntry ? finallyEntry.completion : {};
1713 record.type = type;
1714 record.arg = arg;
1715
1716 if (finallyEntry) {
1717 this.method = "next";
1718 this.next = finallyEntry.finallyLoc;
1719 return ContinueSentinel;
1720 }
1721
1722 return this.complete(record);
1723 },
1724 complete: function complete(record, afterLoc) {
1725 if (record.type === "throw") {
1726 throw record.arg;
1727 }
1728
1729 if (record.type === "break" || record.type === "continue") {
1730 this.next = record.arg;
1731 } else if (record.type === "return") {
1732 this.rval = this.arg = record.arg;
1733 this.method = "return";
1734 this.next = "end";
1735 } else if (record.type === "normal" && afterLoc) {
1736 this.next = afterLoc;
1737 }
1738
1739 return ContinueSentinel;
1740 },
1741 finish: function finish(finallyLoc) {
1742 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1743 var entry = this.tryEntries[i];
1744
1745 if (entry.finallyLoc === finallyLoc) {
1746 this.complete(entry.completion, entry.afterLoc);
1747 resetTryEntry(entry);
1748 return ContinueSentinel;
1749 }
1750 }
1751 },
1752 "catch": function _catch(tryLoc) {
1753 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1754 var entry = this.tryEntries[i];
1755
1756 if (entry.tryLoc === tryLoc) {
1757 var record = entry.completion;
1758
1759 if (record.type === "throw") {
1760 var thrown = record.arg;
1761 resetTryEntry(entry);
1762 }
1763
1764 return thrown;
1765 }
1766 } // The context.catch method must only be called with a location
1767 // argument that corresponds to a known catch block.
1768
1769
1770 throw new Error("illegal catch attempt");
1771 },
1772 delegateYield: function delegateYield(iterable, resultName, nextLoc) {
1773 this.delegate = {
1774 iterator: values(iterable),
1775 resultName: resultName,
1776 nextLoc: nextLoc
1777 };
1778
1779 if (this.method === "next") {
1780 // Deliberately forget the last sent value so that we don't
1781 // accidentally pass it on to the delegate.
1782 this.arg = undefined;
1783 }
1784
1785 return ContinueSentinel;
1786 }
1787 }; // Regardless of whether this script is executing as a CommonJS module
1788 // or not, return the runtime object so that we can declare the variable
1789 // regeneratorRuntime in the outer scope, which allows this module to be
1790 // injected easily by `bin/regenerator --include-runtime script.js`.
1791
1792 return exports;
1793 }( // If this script is executing as a CommonJS module, use module.exports
1794 // as the regeneratorRuntime namespace. Otherwise create a new empty
1795 // object. Either way, the resulting object will be used to initialize
1796 // the regeneratorRuntime variable at the top of this file.
1797 ( false ? undefined : _typeof(module)) === "object" ? module.exports : {});
1798
1799 try {
1800 regeneratorRuntime = runtime;
1801 } catch (accidentalStrictMode) {
1802 // This module should not be running in strict mode, so the above
1803 // assignment should always work unless something is misconfigured. Just
1804 // in case runtime.js accidentally runs in strict mode, we can escape
1805 // strict mode using a global Function call. This could conceivably fail
1806 // if a Content Security Policy forbids using Function, but in that case
1807 // the proper solution is to fix the accidental strict mode problem. If
1808 // you've misconfigured your bundler to force strict mode and applied a
1809 // CSP to forbid Function, and you're not willing to fix either of those
1810 // problems, please detail your unique predicament in a GitHub issue.
1811 Function("r", "regeneratorRuntime = r")(runtime);
1812 }
1813 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
1814
1815 /***/ }),
1816
1817 /***/ "./node_modules/webpack/buildin/module.js":
1818 /*!***********************************!*\
1819 !*** (webpack)/buildin/module.js ***!
1820 \***********************************/
1821 /*! no static exports found */
1822 /***/ (function(module, exports) {
1823
1824 module.exports = function (module) {
1825 if (!module.webpackPolyfill) {
1826 module.deprecate = function () {};
1827
1828 module.paths = []; // module.parent = undefined by default
1829
1830 if (!module.children) module.children = [];
1831 Object.defineProperty(module, "loaded", {
1832 enumerable: true,
1833 get: function get() {
1834 return module.l;
1835 }
1836 });
1837 Object.defineProperty(module, "id", {
1838 enumerable: true,
1839 get: function get() {
1840 return module.i;
1841 }
1842 });
1843 module.webpackPolyfill = 1;
1844 }
1845
1846 return module;
1847 };
1848
1849 /***/ })
1850
1851 /******/ });
1852 //# sourceMappingURL=scripts.js.map