­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ (()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n",{value:e,text:e}))})),a.attr("disabled",!1).val(e[t])}))}))}else jQuery.each(e,(function(e,n){jQuery('[name="'.concat(t,"[").concat(e,']"]')).val(n).change()}))}else if("[object Array]"===a){var o=jQuery("[name=".concat(t,"]"));if("file"==(o=(o=o.length?o:jQuery("[data-name=".concat(t,"]"))).length?o:jQuery("[name=".concat(t,"\\[\\]]"))).attr("type"))w(o,e);else if(o.prop("multiple"))if(n.isFunction(window.Choices)){var l=o.data("choicesjs");r.push({handler:l,values:e})}else o.val(e).change();else if("repeater_field"===o.attr("data-type")){var c=o.find("tbody"),d=o.attr("data-name");jQuery.each(e,(function(t,e){0!=t?c.find("tr:last").clone().appendTo(c).find(".ff-el-form-control").each((function(a,i){var f="ffrpt-"+(new Date).getTime()+a;n(i).val(e[a]),n(i).attr({id:f,name:"".concat(d,"[").concat(t,"][]"),value:e[a]}).change()})):c.find("tr:first .ff-el-form-control").each((function(t,a){n(a).val(e[t]).change()}))}))}else o.each((function(t,a){-1!=jQuery.inArray(n(a).val(),e)&&n(a).prop("checked",!0).change()}))}else{var u=jQuery("[name=".concat(t,"]"));if(u.hasClass("fluentform-post-content")&&window.wp&&window.wp.editor){var p=u.attr("id");window.tinymce.get(p).setContent(e)}if("undefined"!=typeof flatpickr&&u.prop("_flatpickr")){var v=u.prop("_flatpickr");v&&(v.config.altInput?v.setDate(e,!0):u.val(e).trigger("change"))}if("radio"===u.prop("type")||"checkbox"===u.prop("type"))jQuery("[name=".concat(t,'][value="').concat(e,'"]')).prop("checked",!0).change();else{var m=u.closest(".ff-el-group").find(".fluentform-signature-pad");if(m.length){var _=m[0].getContext("2d"),h=new Image;h.src=e,h.onload=function(){_.drawImage(h,0,0)}}u.val(e).change()}}}})),r.length>0)for(var s=0;s2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"next";return new Promise((function(u){n("div"+f+"_errors").empty(),r=t;var p=a.find(".ff-step-body"),v=a.find(".ff-step-titles li"),_=a.find(".fluentform-step"),h=_.length;_.removeClass("active"),n(_[r]).addClass("active"),v.removeClass("ff_active ff_completed"),n.each(e(Array(r).keys()),(function(t){n(n(v[t])).addClass("ff_completed")})),n(v[r]).addClass("ff_active");var g,y={left:-100*r+"%"};switch(c&&(y={right:-100*r+"%"}),n(_[r]).closest(".ff-step-container").data("animation_type")){case"slide":g=p.animate(y,i).promise();break;case"fade":p.css({opacity:0}),g=p.animate(y,i).animate({opacity:1},i).promise();break;case"slide_down":p.hide(),p.css(y),g=p.slideDown(i).promise();break;default:p.css(y),g=Promise.resolve()}g.then((function(){if(s&&function(){if(!window.ff_disable_step_scroll){var t,e,f,r,s,o,l=a.find(".ff_step_start");t=window.ff_scroll_top_offset?window.ff_scroll_top_offset:l.offset().top-20,r=(f=(e=l).offset().top)+e.outerHeight(),o=(s=n(window).scrollTop())+n(window).height(),r>s&&f div").length-1,f=a.find(".fluentform-step.active > .ff_excluded").length;if(a.find(".fluentform-step.active > .ff-t-container").length&&(e-=a.find(".fluentform-step.active > .ff-t-container").length,e+=a.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > div").length,f+=a.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > .ff_excluded").length,a.find(".fluentform-step.active > .ff-t-container.ff_excluded").length&&(f-=a.find(".fluentform-step.active > .ff-t-container.ff_excluded").length,f-=a.find(".fluentform-step.active > .ff-t-container.ff_excluded > .ff-t-cell > .ff_excluded").length,f+=a.find(".fluentform-step.active > .ff-t-container.ff_excluded > .ff-t-cell > div").length)),e===f)return t.find(".step-nav button[data-action="+l+"], .step-nav img[data-action="+l+"]").click(),void u()}a.find(".fluentform-step.active").find('.step-nav button[data-action="next"]').css("visibility","visible"),a.find(".fluentform-step.active").find('.step-nav button[data-action="prev"]').css("visibility","visible"),a.find(".fluentform-step.active").find('.step-nav img[data-action="next"]').css("visibility","visible"),a.find(".fluentform-step.active").find('.step-nav img[data-action="prev"]').css("visibility","visible"),u()}))}))};function y(t){var e=t.find("input, select, textarea, button").filter(":visible"),n=e.first(),a=e.last();t.on("keydown",(function(t){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?document.activeElement===n[0]&&(a.focus(),t.preventDefault()):document.activeElement===a[0]&&(n.focus(),t.preventDefault()))}))}var b=function(t,e){var a=t.find(":input").filter((function(t,e){return!n(e).closest(".has-conditions").hasClass("ff_excluded")}));a.filter((function(t,e){var a=n(e);return a.parents().hasClass("ff_repeater_table")&&"select"==a.attr("type")&&!a.val()})).prepend("