!function(e){"use strict";e.WS_Form=function(t){e.WS_Form.this=this,this.is_admin=this.set_is_admin(),this.user_roles=ws_form_settings.user_roles,this.form_interface=!1,this.group_data_cache=[],this.group_index=0,this.section_data_cache=[],this.field_data_cache=[],this.action_data_cache=[],this.validation_message_cache=[],this.invalid_feedback_cache=[],this.object_cache={},this.object_cache.condition=[],this.object_cache.then=[],this.object_cache.else=[],this.action=!1,this.object_data_scratch=!1,this.form_history=[],this.history_index=0,this.framework_id=!1,this.framework=!1,this.framework_fields=!1,this.column_resize_obj=!1,this.column_size_value=0,this.column_size_value_old=0,this.offset_value=0,this.offset_value_old=0,this.dragged_field=null,this.dragged_field_in_section=null,this.dragged_section=null,this.dragged_section_in_group=null,this.dragging=!1,this.next_sibling_id_old=null,this.section_id_old=null,this.group_id_old=null,this.section_repeatable_dragged=!1,this.section_repeatable_indexes={},this.checksum=!1,this.checksum_setTimeout=!1,this.published_checksum="",this.recaptchas=[],this.recaptchas_v2_default=[],this.recaptchas_v2_invisible=[],this.recaptchas_v3_default=[],this.recaptchas_conditions=[],this.timeout_recaptcha=3e4,this.hcaptchas=[],this.hcaptchas_default=[],this.hcaptchas_invisible=[],this.hcaptchas_conditions=[],this.timeout_hcaptcha=3e4,this.turnstiles=[],this.turnstiles_default=[],this.turnstiles_conditions=[],this.timeout_turnstile=3e4,this.captchafoxes=[],this.captchafoxes_default=[],this.captchafoxes_invisible=[],this.captchafoxes_conditions=[],this.timeout_captchafox=3e4,this.conditional=!1,this.conditional_data=!1,this.conditional_index_dragged_from=!1,this.conditional_icons_array=!1,this.conditional_highlight_array=!1,this.conditional_highlight_row_index=!1,this.conditional_row_array=!1,this.conditional_actions_run_action=[],this.conditional_actions_run_save=[],this.conditional_actions_run_submit=[],this.conditional_cache=!1,this.conditional_event_selector_to_condition=[],this.signatures=[],this.signatures_by_name=[],this.timeout_signature=3e4,this.media_captures=[],this.media_captures_by_name={},this.google_maps=[],this.timeout_google_maps=3e4,this.timeout_analytics_google=3e4,this.timeout_analytics_data_layer=3e4,this.analytics_function=[],this.text_editor_index=1,this.code_editor_index=1,this.form_events_reset=[],this.keydown=[],this.timeout_interval=100,this.api_call_queue=[],this.api_call_queue_running=!1,this.number_to_word=["nought","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"],this.label_old="",this.submit=!1,this.action_js=[],this.form_draft=!1,this.submit_auto_populate=!1,this.form_id_prefix="wsf-",this.field_name_prefix=ws_form_settings.field_prefix,this.meta_key_options_cache=[],this.options_action_objects=[],this.options_action_cache=[],this.sidebar_conditions=[],this.sidebar_expanded_obj=!1,this.sidebar_lock_count=0,this.touch_device="ontouchend"in document,this.hash="",this.token="",this.token_validated=!1,this.form_post_locked=!1,this.form_post_lock_start=0,this.form_post_lock_duration_max=1e3,this.form_loader_showing=!1,this.form_loader_show_start=0,this.form_loader_show_duration_max=this.form_post_lock_duration_max,this.form_loader_timeout_id=!1,this.field_required_bypass=[],this.form_valid=!1,this.form_valid_old=null,this.form_validation_real_time_hooks=[],this.ecommerce_cart_price_type=[],this.has_ecommerce=!1,this.form_ecommerce_calculate_enabled=!0,this.progress=0,this.progress_percent="0%",this.progress_array=[],this.progress_class_complete="",this.progress_class_incomplete="",this.upload_obj=!1;var a=document.createElement("input");a.setAttribute("type","date"),this.native_date="date"==a.type,this.timeout_datetimepicker=5e3;var r=document.createElement("input");r.setAttribute("type","color"),this.native_color="color"==r.type,this.form_action_custom=!1,this.form_ajax=!0,this.object_focus=!1,this.field_type_click_drag_check=!1,this.section_id_click_drag_check=!1,this.password_strength_status=0,this.cascade_cache=[],this.select_ajax_cache=[],this.preview_window=void 0,this.calc=[],this.file_frame=!1,this.file_frame_input_obj=!1,this.api_call_handle=[],this.visual_builder=!1,this.form_bypass_enabled=!1,this.action_js_process_validation_focus=!0,this.action_ga=!1,this.dropzonejs_processes=0,this.dropzonejs_index_dragged_from=0,this.conversational=!1,this.form_stat_add_lock=!1,this.form_geo_cache=!1,this.form_geo_cache_request=!1,this.form_geo_stack=[]},e.WS_Form.prototype.render=function(t){var a=this;void 0===t&&this.error("error_attributes"),void 0===t.obj&&this.error("error_attributes_obj"),void 0===t.form_id&&this.error("error_attributes_form_id"),this.form_canvas_obj=t.obj instanceof e?t.obj:e(t.obj),this.form_obj_id=this.form_canvas_obj.attr("id"),this.form_id=parseInt(t.form_id,10),0!==this.form_id&&(this.form_instance_id=parseInt(this.form_canvas_obj.attr("data-instance-id"),10),0!==this.form_instance_id&&(this.form_id_prefix=this.is_admin?"wsf-":"wsf-"+this.form_instance_id+"-",this.form_id_prefix_function=this.is_admin?"wsf_":"wsf_"+this.form_instance_id+"_",this.form_obj=this.form_canvas_obj.closest("form"),this.form_obj.length?this.form_obj.attr("novalidate",""):this.form_obj=this.form_canvas_obj,this.form_obj[0]!=this.form_canvas_obj[0]&&(this.form_obj.hasClass("wsf-form")||this.form_obj.addClass("wsf-form"),this.form_canvas_obj.hasClass("wsf-form")&&this.form_canvas_obj.removeClass("wsf-form"),void 0!==this.form_canvas_obj.attr("data-wsf-style-id")&&(this.form_obj.attr("data-wsf-style-id",this.form_canvas_obj.attr("data-wsf-style-id")),this.form_canvas_obj.removeAttr("data-wsf-style-id"))),this.form_canvas_obj.html(""),this.get_configuration(function(){a.get_form(function(){"function"==typeof a.debug&&a.debug(),a.is_admin||("function"==typeof a.form_loader&&a.form_loader(),"function"==typeof a.form_loader_show&&a.form_loader_show("render")),a.init()})})))},e.WS_Form.configured=!1,e.WS_Form.css_rendered=!1,e.WS_Form.debug,e.WS_Form.debug_rendered=!1,e.WS_Form.analytics,e.WS_Form.tracking,e.WS_Form.ecommerce,e.WS_Form.calc,e.WS_Form.styler,e.WS_Form.styler_rendered=!1,e.WS_Form.settings_plugin,e.WS_Form.settings_form=null,e.WS_Form.frameworks,e.WS_Form.parse_variables,e.WS_Form.parse_variable_help,e.WS_Form.parse_variable_repairable,e.WS_Form.actions,e.WS_Form.field_types,e.WS_Form.field_type_cache=[],e.WS_Form.file_types,e.WS_Form.meta_keys,e.WS_Form.meta_keys_required_setting=[],e.WS_Form.breakpoints,e.WS_Form.data_sources,e.WS_Form.templates_section,e.WS_Form.language_tag_to_locale=function(e){return"string"!=typeof e?"":""===(e=e.trim())?"":e.replace(/-/g,"_")},e.WS_Form.locale_to_language_tag=function(t){if("string"!=typeof t)return"";var a=e.WS_Form.language_tag_to_locale(t);if(""===a)return"";var r=a.split("_"),i=r[0]?r[0].toLowerCase():"";return""===i?"":void 0===r[1]||""===r[1]?i:i+"-"+r[1].toUpperCase()},e.WS_Form.get_language_code=function(t){var a=e.WS_Form.language_tag_to_locale(t);if(""===a)return"";var r=a.split("_");return r[0]?r[0].toLowerCase():""},e.WS_Form.get_country_code=function(t){var a=e.WS_Form.language_tag_to_locale(t);if(""===a)return"";var r=a.split("_");return void 0===r[1]||""===r[1]?"":r[1].toUpperCase()},e.WS_Form.prototype.get_configuration=function(t,a,r){if(void 0===a&&(a=!1),void 0===r&&(r=!1),this.options_action_cache=[],r||this.loader_on(),!e.WS_Form.configured||a)if("undefined"==typeof wsf_form_json_config){var i=this;this.api_call("config","GET",!1,function(e){i.set_configuration(e.data),window.wsf_form_json_config=e.data,"function"==typeof t&&t()},!1,r)}else this.set_configuration(wsf_form_json_config),"function"==typeof t&&t();else"function"==typeof t&&t()},e.WS_Form.prototype.set_configuration=function(t){if(e.WS_Form.settings_plugin=t.settings_plugin,e.WS_Form.settings_form=t.settings_form,e.WS_Form.frameworks=t.frameworks,e.WS_Form.field_types=t.field_types,e.WS_Form.file_types=t.file_types,e.WS_Form.meta_keys=t.meta_keys,e.WS_Form.parse_variables=t.parse_variables,e.WS_Form.parse_variables_repairable=t.parse_variables_repairable,e.WS_Form.parse_variable_help=t.parse_variable_help,e.WS_Form.actions=t.actions,e.WS_Form.data_sources=t.data_sources,e.WS_Form.templates_section=t.templates_section,e.WS_Form.calc=t.calc,e.WS_Form.tracking=t.tracking,e.WS_Form.ecommerce=t.ecommerce,this.is_admin||(e.WS_Form.analytics=JSON.parse(atob(t.analytics))),void 0!==e.WS_Form.parse_variables){var a=[];for(var r in e.WS_Form.parse_variables)e.WS_Form.parse_variables.hasOwnProperty(r)&&a.push([r,e.WS_Form.parse_variables[r].priority]);a.sort(function(e,t){var a=void 0!==e[1]?e[1]:0;return(void 0!==t[1]?t[1]:0)-a});var i={};for(var r in a)if(a.hasOwnProperty(r)){var s=a[r][0];i[s]=e.WS_Form.parse_variables[s]}e.WS_Form.parse_variables=i}void 0!==t.debug&&(e.WS_Form.debug=t.debug),this.field_type_cache_build(),e.WS_Form.configured=!0},e.WS_Form.prototype.get_form=function(t){if(0==this.form_id)return this.error("error_form_id"),void this.loader_off();if(e("#"+this.form_obj_id).attr("data-id",this.form_id),void 0===window.wsf_form_json||void 0===window.wsf_form_json[this.form_id]){var a=this;this.api_call("form/"+this.form_id+"/full/?wsf_fp=true","GET",!1,function(e){a.form=e.form,void 0===window.wsf_form_json&&(window.wsf_form_json=[]),window.wsf_form_json[a.form_id]=e.form,a.data_cache_build(),"function"==typeof t&&t(),a.loader_off()})}else this.form=window.wsf_form_json[this.form_id],this.data_cache_build(),"function"==typeof t&&t(),this.loader_off()},e.WS_Form.prototype.form_build=function(){if(this.timer_start=new Date,this.form_canvas_obj.children().not(".wsf-loader").remove(),this.form_canvas_obj.append(this.get_form_html(this.form)),!this.is_admin){var t=this.get_object_meta_value(this.form,"class_form_wrapper","");if(""!=t){var a=this.form_canvas_obj.attr("class");a+=" "+t.trim(),this.form_canvas_obj.attr("class",a)}}this.form_render(),this.timer_duration=new Date-this.timer_start,e.WS_Form.debug_rendered&&this.debug_info("debug_info_duration",this.timer_duration+"ms")},e.WS_Form.prototype.get_form_style_id=function(){var t=this.is_admin?"ws-form":e.WS_Form.settings_plugin.framework;return e.WS_Form.frameworks.types[t]},e.WS_Form.prototype.get_framework=function(){var t=this.is_admin?"ws-form":e.WS_Form.settings_plugin.framework;return e.WS_Form.frameworks.types[t]},e.WS_Form.prototype.get_form_html=function(e){if(void 0===e)return"";if(void 0===e.groups)return"";var t=this.get_framework().form[this.is_admin?"admin":"public"],a=this.esc_html(e.label);if(!this.is_admin&&"on"==this.get_object_meta_value(e,"label_render","on"))var r=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_form",""),i=""!=r?r:void 0!==t.mask_label?t.mask_label:"",s={label:a},_=this.mask_parse(i,s);else _="";var o=this.get_tabs_html(e);o+=this.get_groups_html(e.groups);i=t.mask_single,s={form:o,id:this.form_id_prefix+"tabs",label:_};return this.comment_html("Form: "+a)+this.mask_parse(i,s)+this.comment_html("Form: "+a,!0)},e.WS_Form.prototype.get_tabs_html=function(e){if(void 0===e.groups)return"";var t=e.groups,a=Object.keys(t).length;if(1==a&&!this.is_admin)return"";var r="",i=this.get_framework().tabs[this.is_admin?"admin":"public"],s=this.get_object_meta_value(this.form,"cookie_tab_index")?this.cookie_get("tab_index",0):0;if(a>1||this.is_admin){for(var _ in t)if(t.hasOwnProperty(_)){var o=t[_];r+=this.get_tab_html(o,_,s==_)}var l="";if(!this.is_admin)this.get_object_meta_value(e,"tabs_hide",!1)&&(l+=' style="display: none;"');var n=["wsf-group-tabs"];if(!this.is_admin){var c=this.get_object_meta_value(e,"class_tabs_wrapper",!1);""!=c&&n.push(c.trim())}var d=i.mask_wrapper,p={attributes:l,class:n.join(" "),tabs:r,id:this.form_id_prefix+"tabs"};return this.comment_html(this.language("comment_group_tabs"))+this.mask_parse(d,p)+this.comment_html(this.language("comment_group_tabs"),!0)}return""},e.WS_Form.prototype.get_tab_html=function(e,t,a){void 0===t&&(t=0),void 0===a&&(a=!1);var r=this.get_framework().tabs[this.is_admin?"admin":"public"],i=this.esc_html(e.label),s="";!this.is_admin&&"on"==this.get_object_meta_value(e,"hidden","")&&(s=' style="display: none;" data-wsf-group-hidden');var _=r.mask_single,o={attributes:s,data_id:e.id,href:"#"+this.form_id_prefix+"group-"+e.id,label:i};return a&&void 0!==r.active?o.active=r.active:o.active="",this.mask_parse(_,o)},e.WS_Form.prototype.get_groups_html=function(t){if(void 0===t)return"";var a=Object.keys(t).length,r=this.get_framework().groups[this.is_admin?"admin":"public"],i=this.get_object_meta_value(this.form,"cookie_tab_index")?this.cookie_get("tab_index",0):0,s="",_=this.is_admin||a>1,o=0;for(var l in t)if(t.hasOwnProperty(l)){var n=t[l];s+=this.get_group_html(n,l==i,_,o++)}var c=_?r.mask_wrapper:"#groups",d={class:["wsf-groups"].join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,groups:s,id:this.form_id_prefix+"tabs"};return(_?this.comment_html(this.language("comment_groups")):"")+this.mask_parse(c,d)+(_?this.comment_html(this.language("comment_groups"),!0):"")},e.WS_Form.prototype.get_group_html=function(t,a,r,i){void 0===a&&(a=!1),void 0===r&&(r=!0);var s=this.get_framework().groups[this.is_admin?"admin":"public"],_=this.esc_html(t.id),o=this.esc_html(t.label);if(!this.is_admin&&"on"==this.get_object_meta_value(t,"label_render","on"))var l=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_group",""),n=""!=l?l:void 0!==s.mask_label?s.mask_label:"",c={label:o},d=this.mask_parse(n,c);else d="";var p,u=this.get_sections_html(t),f=[];(void 0!==s.class&&f.push(s.class),this.is_admin)||(""!=(p=this.get_object_meta_value(this.form,"class_group_wrapper",""))&&f.push(p.trim()),""!=(p=this.get_object_meta_value(t,"class_group_wrapper",""))&&f.push(p.trim()));a&&void 0!==s.class_active&&f.push(s.class_active);var h=[];this.is_admin||!this.is_admin&&"on"==this.get_object_meta_value(t,"hidden","")&&h.push("data-wsf-group-hidden");n=r?s.mask_single:"#group",c={attributes:(h.length>0?" ":"")+h.join(" "),class:f.join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,data_group_index:i,group:u,id:this.form_id_prefix+"group-"+_,label:d};return(r?this.comment_html(this.language("comment_group")+": "+o):"")+this.mask_parse(n,c)+(r?this.comment_html(this.language("comment_group")+": "+o,!0):"")},e.WS_Form.prototype.get_sections_html=function(t){var a="",r=this.get_framework().sections[this.is_admin?"admin":"public"],i=(t.id,t.sections),s={};if("object"==typeof this.submit?void 0!==this.submit.section_repeatable&&(s=this.submit.section_repeatable):!1!==this.submit_auto_populate&&void 0!==this.submit_auto_populate.section_repeatable&&(s=this.submit_auto_populate.section_repeatable),void 0===i)return"";for(var _ in i)if(i.hasOwnProperty(_)){var o=i[_],l="section_"+o.id,n=!1!==s&&void 0!==s[l]&&void 0!==s[l].index?s[l].index:[!1];for(var c in n)if(n.hasOwnProperty(c)){var d=n[c];a+=this.get_section_html(o,d)}}var p=r.mask_wrapper,u={class:"wsf-sections",column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,sections:a,id:this.form_id_prefix+"sections-"+t.id};return this.comment_html(this.language("comment_sections"))+this.mask_parse(p,u)+this.comment_html(this.language("comment_sections"),!0)},e.WS_Form.prototype.get_section_html=function(t,a){void 0===a&&(a=!1);var r=!1;if(!this.is_admin&&((r="on"==this.get_object_meta_value(t,"section_repeatable",""))&&!1===a)){a=0;do{a++}while(e("#"+this.form_id_prefix+"section-"+t.id+"-repeat-"+a).length)}var i="",s=this.get_framework().sections[this.is_admin?"admin":"public"],_=this.column_class_array(t);if(r&&!this.is_admin&&(i=this.attribute_modify(i,"data-repeatable","",!0),i=this.attribute_modify(i,"data-repeatable-index",a,!0)),void 0!==s.class_single&&(_=_.concat(s.class_single)),!this.is_admin){var o;""!=(o=this.get_object_meta_value(this.form,"class_section_wrapper",""))&&_.push(o.trim()),""!=(o=this.get_object_meta_value(t,"class_section_wrapper",""))&&_.push(o.trim());var l=this.get_object_meta_value(t,"class_single_vertical_align","");if(l){var n=this.get_field_value_fallback(!1,!1,"class_single_vertical_align");void 0!==n[l]&&_.push(n[l])}var c=this.get_object_meta_value(t,"validate_inline","");if(""!=c){var d=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];switch(c){case"on":this.is_iterable(d)?_.push(...d):_.push(d);break;case"change_blur":i=this.attribute_modify(i,"data-wsf-section-validated-class",d.join(" "),!0)}}var p=this.get_object_meta_value(this.form,"conversational",!1),u=this.get_object_meta_value(t,"conversational_full_height_section",!1);p&&u&&_.push("wsf-form-conversational-section-full-height")}var f=this.esc_html(t.label);if(this.is_admin||"on"==this.get_object_meta_value(t,"label_render","on"))var h=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_section",""),m=""!=h?h:void 0!==s.mask_label?s.mask_label:"",v={label:f},b=this.mask_parse(m,v);else b="";if(!this.is_admin){"on"==this.get_object_meta_value(t,"disabled_section","")&&(i=this.attribute_modify(i,"disabled","",!0),i=this.attribute_modify(i,"aria-disabled","true",!0)),"on"==this.get_object_meta_value(t,"hidden_section","")&&(i=this.attribute_modify(i,"style","display: none;",!0),i=this.attribute_modify(i,"aria-live","polite",!0),i=this.attribute_modify(i,"aria-hidden","true",!0));var g=this.get_object_meta_value(t,"aria_label","");""==g&&(g=t.label),i=this.attribute_modify(i,"aria-label",g,!0),i=this.custom_attributes(i,t,"section",a)}var y=this.get_fields_html(t,a);m=s.mask_single,v={attributes:(i?" ":"")+i,class:_.join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,id:this.form_id_prefix+"section-"+t.id+(a?"-repeat-"+a:""),label:b,section:y,section_id:e.WS_Form.settings_plugin.helper_section_id?'<span class="wsf-section-id">'+this.language("id")+": "+t.id+"</span>":""};return this.comment_html(this.language("comment_section")+": "+f)+this.mask_parse(m,v)+this.comment_html(this.language("comment_section")+": "+f,!0)},e.WS_Form.prototype.custom_attributes=function(e,t,a,r,i){var s=this.custom_attributes_get(t,a,r);for(const t in s){var _=s[t];e=this.attribute_modify(e,t,_,!0)}return e},e.WS_Form.prototype.custom_attributes_get=function(e,t,a){var r={},i=this.get_object_meta_value(e,"custom_attributes",!1);if(!1!==i&&"object"==typeof i&&i.length>0)for(var s in"field"!=t&&(e=!1),i)if(i.hasOwnProperty(s)){var _=i[s];""!=_.custom_attribute_name&&(_.custom_attribute_value=this.parse_variables_process(_.custom_attribute_value,a,!1,e).output,r[_.custom_attribute_name]=_.custom_attribute_value)}return r},e.WS_Form.prototype.get_fields_html=function(t,a){var r="on"==this.get_object_meta_value(t,"section_repeatable","");void 0===a&&(a=!!r&&0);var i="",s=this.get_framework().fields[this.is_admin?"admin":"public"],_=(t.id,t.fields),o=this.esc_html(t.label);if(!this.is_admin&&"on"==this.get_object_meta_value(t,"label_render","on"))var l=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_section",""),n=""!=l?l:void 0!==s.mask_wrapper_label?s.mask_wrapper_label:"",c={label:o},d=this.mask_parse(n,c);else d="";if(void 0===_)return"";for(var p in _)if(_.hasOwnProperty(p)){var u=_[p];i+=this.get_field_html(u,a)}n=s.mask_wrapper,c={column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,fields:i,id:this.form_id_prefix+"fields-"+t.id,label:d};return this.comment_html(this.language("comment_fields"))+this.mask_parse(n,c)+this.comment_html(this.language("comment_fields"),!0)},e.WS_Form.prototype.get_summary_html=function(e,t,a){if(void 0===e)return"";void 0===t&&(t=!1),void 0===a&&(a=[]);var r=parseInt(this.get_object_meta_value(t,"summary_heading_level","2"),10);(r<1||r>6)&&(r=2);var i=this.get_summary_html_groups(e.groups,t,r);return i&&(i=this.get_summary_label(i,e,"form",t,r)),i?'<div class="wsf-summary" role="region" '+this.get_summary_label_aria(e,"form",t)+">\n\n"+i+"</div>\n":""},e.WS_Form.prototype.get_summary_html_groups=function(e,t,a){var r="";if(void 0===e)return"";var i=Object.keys(e).length;for(var s in i>1&&a++,e)if(e.hasOwnProperty(s)){var _=e[s];if(void 0!==_.sections){var o=this.get_summary_html_sections(_.sections,t,a+1);o&&(i>1?(o=this.get_summary_label(o,_,"group",t,a),r+='<div class="wsf-summary-group-wrapper" role="group" '+this.get_summary_label_aria(_,"group",t)+">\n\n"+o+"</div>\n\n"):r+=o)}}return i>1?r?'<div class="wsf-summary-groups-wrapper">\n\n'+r+"</div>\n\n":"":r},e.WS_Form.prototype.get_summary_html_sections=function(e,t,a){var r="";if(void 0===e)return"";for(var i in t.class_fields_wrapper=this.get_summary_fields_wrapper_class(t),t.class_field_wrapper=this.get_summary_field_wrapper_class(t),e)if(e.hasOwnProperty(i)){var s=e[i];if(void 0!==s.fields){var _=this.get_summary_html_fields(s.fields,s,t);if(_)_=this.get_summary_label(_,s,"section",t,a),r+='<div class="wsf-summary-section-wrapper'+("on"==this.get_object_meta_value(s,"section_repeatable","on")?" wsf-summary-section-repeatable":"")+'" role="group" '+this.get_summary_label_aria(s,"section",t)+">\n\n"+_+"</div>\n\n"}}return r?'<div class="wsf-summary-sections-wrapper">\n\n'+r+"</div>\n\n":""},e.WS_Form.prototype.get_summary_html_fields=function(t,a,r){var i="";if(void 0===t)return"";var s="on"==this.get_object_meta_value(a,"section_repeatable","on"),_=[],o=[],l=r.id,n="on"==this.get_object_meta_value(r,"summary_field_if","on"),c="on"==this.get_object_meta_value(r,"summary_repeater_table","on"),d="on"==this.get_object_meta_value(r,"summary_repeater_table_row_number","on");if(s&&c&&d)var p="<th>#</th>\n",u="<td>#section_row_number</td>\n";else p="",u="";var f=this.get_object_meta_value(r,"summary_field_ids_include",[]);if(f){_=[];for(var h in f)if(f.hasOwnProperty(h)){var m=f[h];m.ws_form_field&&_.push(parseInt(m.ws_form_field,10))}}0==_.length&&(_=!1);var v=this.get_object_meta_value(r,"summary_field_ids_exclude",[]);if(v){o=[];for(var b in v)if(v.hasOwnProperty(b)){var g=v[b];g.ws_form_field&&o.push(parseInt(g.ws_form_field,10))}}var y=0;for(var w in t)if(t.hasOwnProperty(w)){var k=t[w],x=parseInt(k.id,10);if(x!=l){var j=k.type;if(!["hidden","meter","progress","signature"].includes(j)&&(!1===_||_.includes(x))&&!o.includes(x)){var S=e.WS_Form.field_type_cache[j];if(void 0!==S.text_out&&S.text_out){if(s&&c)p+='<th scope="col">#field_label('+this.esc_attr(x)+")</th>\n",u+="<td>#text(#field("+this.esc_attr(x)+"))</td>\n";else{var F='<dl class="'+this.esc_attr(r.class_field_wrapper)+'">';!1===(void 0!==S.static&&S.static)&&(F+='<dt class="wsf-summary-field-label">#field_label('+this.esc_attr(x)+")</dt>"),F+='<dd class="wsf-summary-field-value">#text(#field('+this.esc_attr(x)+"))</dd>",F+="</dl>",n&&(F="#if(#field("+this.esc_attr(x)+"))"+F+"#endif"),i+=F+="\n\n"}y++}}}}if(y)if(s&&c){p="<tr>\n"+p+"</tr>\n\n",u="<tr>\n"+u+"</tr>",s&&(u="#section_rows_start("+a.id+")\n"+u+"\n#section_rows_end"),u+="\n\n";var W=this.get_summary_label_render(a,"section",r);if(W)var O="wsf-summary-section-label-"+(this.is_admin?"":this.form_instance_id+"-")+a.id;i='<table role="table" '+(W?'aria-labelledby="'+this.esc_attr(O)+'"':'aria-label="'+this.esc_attr(a.label)+'"')+">\n\n<thead>\n\n"+p+"</thead>\n\n<tbody>\n\n"+u+"</tbody>\n\n</table>\n\n"}else i='<div class="'+this.esc_attr(r.class_fields_wrapper)+'">\n\n'+i+"</div>",s&&(i="#section_rows_start("+a.id+")\n"+i+"\n#section_rows_end"),i+="\n\n";return i},e.WS_Form.prototype.get_summary_fields_wrapper_class=function(e){var t=["wsf-summary-fields-wrapper"];switch(this.get_object_meta_value(e,"orientation",!1)){case"grid":var a=this.get_field_value_fallback(e.type,"top","class_orientation_wrapper",[],!1,!0);"object"==typeof a&&(t=t.concat(a))}switch(this.get_object_meta_value(e,"summary_field_orientation","")){case"horizontal":t.push("wsf-summary-field-orientation-horizontal")}return t.join(" ")},e.WS_Form.prototype.get_summary_field_wrapper_class=function(e){var t=["wsf-summary-field-wrapper"];switch(this.get_object_meta_value(e,"orientation","")){case"horizontal":var a=this.get_field_value_fallback(e.type,"top","class_inline",!1,!1,!1);"object"==typeof a&&(t=t.concat(a));break;case"grid":var r=this.get_field_value_fallback(e.type,"top","class_orientation_row",[],!1,!0);"object"==typeof r&&(t=t.concat(r));var i=this.column_class_array(e,"orientation_breakpoint");"object"==typeof i&&(t=t.concat(i))}return t.join(" ")},e.WS_Form.prototype.get_summary_label_render=function(e,t,a){var r=this.get_object_meta_value(a,"summary_label_"+t,"on");return"on"==r||"auto"==r&&"on"==this.get_object_meta_value(e,"label_render","on")&&e.label},e.WS_Form.prototype.get_summary_label=function(e,t,a,r,i){return this.get_summary_label_render(t,a,r)&&(e="<h"+i+' id="'+this.esc_attr(this.get_summary_label_id(t,a))+'" class="wsf-summary-'+a+'-label">'+this.esc_html(t.label)+"</h"+i+">\n\n"+e),e},e.WS_Form.prototype.get_summary_label_aria=function(e,t,a){return this.get_summary_label_render(e,t,a)?'aria-labelledby="'+this.esc_attr(this.get_summary_label_id(e,t))+'"':'aria-label="'+this.esc_attr(e.label)+'"'},e.WS_Form.prototype.get_summary_label_id=function(e,t){return"wsf-summary-"+t+"-label-"+(this.is_admin?"":this.form_instance_id+"-")+e.id},e.WS_Form.prototype.value_populate_process=function(t,a){if(null===t)return"";switch(a.type){case"datetime":return"function"==typeof this.get_date_by_type?this.get_date_by_type(t,a):"";case"select":case"checkbox":case"radio":case"price_select":case"price_checkbox":case"price_radio":return Array.isArray(t)?t.map(function(e){return e?e.toString():""}):t;case"quantity":var r=e.WS_Form.settings_plugin.price_decimal_separator;return"."!==r&&-1!==t.indexOf(r)&&(t=this.get_number(t)),t;default:return this.esc_html(t)}},e.WS_Form.prototype.get_field_html=function(t,a){void 0===a&&(a=!1);var r=[];!1!==a&&r.push('data-repeatable-index="'+this.esc_attr(a)+'"');var i=this.get_framework().fields[this.is_admin?"admin":"public"];this.is_admin||"on"==this.get_object_meta_value(t,"hidden","")&&r.push('style="display: none;" aria-live="polite" aria-hidden="true"');var s=this.column_class_array(t),_=this.get_object_meta_value(t,"sub_type",!1);""==_&&(_=!1);var o=this.get_field_value_fallback(t.type,!1,"class_single",!1,i,_);if(!1!==o&&(s=s.concat(o)),!this.is_admin){var l;""!=(l=this.get_object_meta_value(this.form,"class_field_wrapper",""))&&s.push(l.trim()),""!=(l=this.get_object_meta_value(t,"class_field_wrapper",""))&&s.push(l.trim());var n=this.get_object_meta_value(t,"class_single_vertical_align","");if(n){var c=this.get_field_value_fallback(t.type,!1,"class_single_vertical_align",!1,i,_);void 0!==c[n]&&s.push(c[n])}var d=this.get_object_meta_value(t,"validate_inline","");if(""!=d){var p=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];switch(d){case"on":this.is_iterable(p)?s.push(...p):s.push(p);break;case"change_blur":r.push('data-wsf-field-validated-class="'+p.join(" ")+'"')}}}var u=!1!==a?"_"+a:"",f=ws_form_settings.field_prefix+t.id+u;if("object"==typeof this.submit){if(void 0!==this.submit.meta&&void 0!==this.submit.meta[f]&&void 0!==this.submit.meta[f].value&&null!==this.submit.meta[f].value){var h=this.submit.meta[f].value;h=this.value_populate_process(h,t)}}else if(!1!==this.submit_auto_populate&&void 0!==this.submit_auto_populate.data&&void 0!==this.submit_auto_populate.data[f]&&null!==this.submit_auto_populate.data[f]){h=this.submit_auto_populate.data[f];h=this.value_populate_process(h,t)}var m=this.is_admin?"":this.get_field_html_single(t,h,!1,a),v=this.esc_html(t.label);if(void 0===e.WS_Form.field_type_cache[t.type])return"";var b=e.WS_Form.field_type_cache[t.type];if(void 0!==b.pro_required&&b.pro_required)return"";var g=!this.is_admin&&(void 0!==b.mask_wrappers_drop&&b.mask_wrappers_drop);if("recaptcha"!=t.type||this.is_admin||"invisible"!=this.get_object_meta_value(t,"recaptcha_recaptcha_type","default")||(g=!0),"hcaptcha"!=t.type||this.is_admin||"invisible"!=this.get_object_meta_value(t,"hcaptcha_type","default")||(g=!0),g)var y="#field";else y=this.get_field_value_fallback(t.type,!1,"mask_single",!1,i,_);switch(t.type){case"checkbox":case"price_checkbox":var w=this.get_object_meta_value(t,"checkbox_min",!1),k=this.get_object_meta_value(t,"checkbox_max",!1),x=this.get_object_meta_value(t,"select_all",!1);if(!1===w&&!1===k)break;!1!==w&&(w=parseInt(w,10))>0&&r.push('data-checkbox-min="'+this.esc_attr(w)+'"'),!1===k||x||(k=parseInt(k,10))>=0&&r.push('data-checkbox-max="'+this.esc_attr(k)+'"');break;case"select":case"price_select":var j=this.get_object_meta_value(t,"select_min",!1),S=this.get_object_meta_value(t,"select_max",!1);if(!1===j&&!1===S)break;!1!==j&&(j=parseInt(j,10))>0&&r.push('data-select-min="'+this.esc_attr(j)+'"'),!1!==S&&(S=parseInt(S,10))>=0&&r.push('data-select-max="'+this.esc_attr(S)+'"')}var F={attributes:(r.length>0?" ":"")+r.join(" "),class:s.join(" "),data_id:t.id,field:m,id:this.get_part_id(t.id,a,"field-wrapper"),type:t.type};return this.comment_html(this.language("comment_field")+": "+v)+this.mask_parse(y,F)+this.comment_html(this.language("comment_field")+": "+v,!0)},e.WS_Form.prototype.field_type_cache_build=function(){if(!this.is_admin)return e.WS_Form.field_type_cache=e.WS_Form.field_types,!0;if(Object.keys(e.WS_Form.field_type_cache.length)>0)return!0;for(var t in e.WS_Form.field_types){var a=e.WS_Form.field_types[t].types;for(var r in a)e.WS_Form.field_type_cache[r]=a[r]}},e.WS_Form.prototype.esc_html=function(e,t){if("string"!=typeof e)return e;switch(void 0===t&&(t=!1),typeof e){case"string":e=this.esc_html_do(e,t);break;case"object":for(var a in e)e.hasOwnProperty(a)&&"string"==typeof e[a]&&(e[a]=this.esc_html_do(e[a],t))}return e},e.WS_Form.prototype.esc_html_do=function(e,t){void 0===t&&(t=!1);var a=this.replace_all(e,"&","&#38;");return a=this.replace_all(a,"<","&lt;"),a=this.replace_all(a,">","&gt;"),a=this.replace_all(a,'"',"&quot;"),t&&(a=this.replace_all(a,"\n","&#13;")),a},e.WS_Form.prototype.esc_html_undo=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent},e.WS_Form.prototype.esc_attr=function(e,t){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)return"";var a=e.replace(/[&<>"']/g,function(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&apos;";default:return e}});return t&&(a=a.replace(/\n/g,"&#13;")),a},e.WS_Form.prototype.esc_url=function(e){try{if(e=decodeURIComponent(e),/^#[a-zA-Z0-9\-]+$/.test(e))return e;var t="",a=e.indexOf("#");-1!==a&&(t=e.substring(a),e=e.substring(0,a)),/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)||(e="https://"+e);var r=new URL(e);if(!["http","https","ftp","mailto","tel"].includes(r.protocol.replace(":","")))return"";for(var i of[/javascript:/i,/data:/i,/vbscript:/i,/file:/i,/<.*?>/i,/%00/i,/(\.\.\/|\.\\)/i,/(redirect|url|next)=http/i,/(%25)+/i])if(i.test(e))return"";return r.toString()+t}catch(e){return""}},e.WS_Form.prototype.esc_selector=function(e){if("string"!=typeof e)return e;var t=this.replace_all(e,'"','\\"');return t=this.replace_all(t,"'","\\'"),t=this.replace_all(t,"[","\\["),t=this.replace_all(t,"]","\\]"),t=this.replace_all(t,",","\\,"),t=this.replace_all(t,"=","\\=")},e.WS_Form.prototype.html_strip=function(e){switch(typeof e){case"string":e=this.html_strip_do(e);break;case"object":for(var t in e)e.hasOwnProperty(t)&&"string"==typeof e[t]&&(e[t]=this.html_strip_do(e[t]))}return e},e.WS_Form.prototype.html_strip_do=function(e){return this.esc_html(e.replace(/<[^>]*>/g,""))},e.WS_Form.prototype.js_string_encode=function(e){return"string"!=typeof e?e:this.replace_all(e,"'","\\'")},e.WS_Form.prototype.loader_on=function(){e("#wsf-loader").addClass("wsf-loader-on")},e.WS_Form.prototype.loader_off=function(){e("#wsf-loader").removeClass("wsf-loader-on")},e.WS_Form.prototype.comment_html=function(e,t){return void 0===t&&(t=!1),"\x3c!-- "+(t?"/":"")+e+" --\x3e\n"+(t?"\n":"")},e.WS_Form.prototype.comment_css=function(e){return"\t/* "+e+" */\n"},e.WS_Form.prototype.get_object_value=function(e,t,a){return void 0===a&&(a=!1),void 0===e?a:void 0===e[t]?a:e[t]},e.WS_Form.prototype.get_field_value_fallback=function(e,t,a,r,i,s){if(void 0===r&&(r=!1),i||(i=this.framework_fields),void 0===s&&(s=!1),!1===s)return this.get_field_value_fallback_process(e,t,a,r,i);if((_=this.get_field_value_fallback_process(e,t,a+"_"+s,r,i))===r)var _=this.get_field_value_fallback_process(e,t,a,r,i);return _},e.WS_Form.prototype.get_field_value_fallback_process=function(t,a,r,i,s){var _=s,o=e.WS_Form.field_type_cache[t];if(!1!==a){if(!(void 0===_||void 0===_[a]||void 0===_[a].field_types||void 0===_[a].field_types[t]||void 0===_[a].field_types[t][r]))return _[a].field_types[t][r];if(!(void 0===_||void 0===_[a]||void 0===_[a][r]))return _[a][r]}return void 0===_||void 0===_.field_types||void 0===_.field_types[t]||void 0===_.field_types[t][r]?void 0===_||void 0===_[r]?void 0===o?i:void 0===o[r]?i:o[r]:_[r]:_.field_types[t][r]},e.WS_Form.prototype.get_object_data=function(e,t,a){switch(void 0===a&&(a=!1),e){case"form":return a?this.object_data_scratch:this.form;case"group":return a?this.object_data_scratch:this.group_data_cache[t];case"section":return a?this.object_data_scratch:this.section_data_cache[t];case"field":return a?this.object_data_scratch:this.field_data_cache[t];case"conditional":return this.conditional;case"action":return this.action}return!1},e.WS_Form.prototype.get_object_meta=function(t,a){switch(t){case"form":var r=e.WS_Form.settings_form.sidebars.form.meta;break;case"group":r=e.WS_Form.settings_form.sidebars.group.meta;break;case"section":r=e.WS_Form.settings_form.sidebars.section.meta;break;case"field":var i=this.field_data_cache[a];r=e.WS_Form.field_type_cache[i.type]}return r},e.WS_Form.prototype.get_object_meta_value=function(e,t,a,r,i){if(void 0===a&&(a=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===e)return a;if(void 0===e.meta)return a;if(void 0===e.meta[t]){if(!r)return a;this.set_object_meta_value(e,t,a)}return i&&"string"==typeof e.meta[t]?this.parse_variables_process(e.meta[t]).output:e.meta[t]},e.WS_Form.prototype.has_object_meta_key=function(e,t){return void 0!==e&&void 0!==e.meta&&void 0!==e.meta[t]&&""!=e.meta[t]},e.WS_Form.prototype.parse_variables_process=function(t,a,r,i,s,_,o,l,n,c){var d=this;if("string"!=typeof t)return this.parse_variables_process_error(t);if(-1==t.indexOf("#"))return this.parse_variables_process_error(t);void 0===a&&(a=!1),void 0===r&&(r=!1);var p="calc"===r;void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===_&&(_=!0),void 0===o&&(o=!1),void 0===l&&(l=1),void 0===n&&(n=t),void 0===c&&(c=i);var u={},f={},h=[],m=[],v=[],b=!1,g=function(e){"object"==typeof e.groups&&(h=h.concat(e.groups)),"object"==typeof e.sections&&(m=m.concat(e.sections)),"object"==typeof e.fields&&(v=v.concat(e.fields)),e.dynamic&&(b=!0)};if(l>100)return this.error("error_parse_variable_syntax_error_depth","","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_depth"));for(var y in e.WS_Form.parse_variables)if(e.WS_Form.parse_variables.hasOwnProperty(y)){var w=e.WS_Form.parse_variables[y],k=!1;for(var x in w.var_lookups)if(w.var_lookups.hasOwnProperty(x)&&-1!==t.indexOf(w.var_lookups[x])){k=!0;break}if(k)for(var j in w.variables)if(w.variables.hasOwnProperty(j)&&-1!==t.indexOf("#"+j)){var S=w.variables[j],F=void 0!==S.value&&S.value,W="object"==typeof S.attributes&&S.attributes,O=void 0!==S.single_parse&&S.single_parse;if(O&&(b=!0),!1!==W||!1===F){if(("object"==typeof S.attributes?S.attributes.length:0)>0){var M=0;do{var P=t.indexOf("#"+j,M);if(-1!==P){var I=-1,N=-1,z=t.substring(P+j.length+1);if("("===z.substring(0,1)&&(I=P+j.length+1,-1!==(N=this.get_bracket_finish_index(z))&&(N+=I)),-1===I||-1===N){M+=j.length+1,q="#"+j;var D=[]}else{M=N;var C=t.substring(I+1,N),q=t.substring(P,N+1),T=void 0!==S.attribute_separator?S.attribute_separator:",";D=this.string_to_attributes(C,T)}for(var $ in W)if(W.hasOwnProperty($)){var A=W[$],E=A.id,Y=void 0!==D[$];if((void 0===A.required||A.required)&&!Y)return this.error("error_parse_variable_syntax_error_attribute","#"+j+" (Expected "+E+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_attribute","#"+j+" (Expected "+E+")"));var L=void 0!==A.default&&A.default;if(!1===L||Y||(D[$]=L),void 0===A.trim||A.trim){var U=D[$];"string"==typeof U&&(D[$]=U.trim())}var R=void 0!==A.valid&&A.valid;if(!1!==R&&!R.includes(D[$]))return this.error("error_parse_variable_syntax_error_attribute_invalid","#"+j+" (Expected "+R.join(", ")+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_attribute_invalid","#"+j+" (Expected "+R.join(", ")+")"))}var J="",H=!0;switch(j){case"calc":case"text":switch(H=!1,r=j){case"calc":var Z=(qt=this.parse_variables_process(D[0],a,"calc",i,s,_,o,l+1,n,c)).output;g(qt),J=this.calc_string(Z,n,!1,c,s);break;case"text":Z=(qt=this.parse_variables_process(D[0],a,"text",i,s,_,o,l+1,n,c)).output;g(qt),J=Z}if(void 0===e.WS_Form.field_type_cache[i.type])break;var B=e.WS_Form.field_type_cache[i.type],G=void 0!==B[r+"_in"]&&B[r+"_in"];if(!1!==i&&void 0!==i&&!p&&_&&("field_label"==s||"field_help"==s||G)){var Q=qt.fields,K=[],V=[];for(var X in Q)if(Q.hasOwnProperty(X)){var ee=Q[X];-1===V.indexOf(ee)&&(V.push(ee),K.push(ee))}var te={field:c,field_part:s,type:r,value:n,field_ids_touched:K,section_repeatable_index:a},ae=!1;for(var re in this.calc)if(this.calc.hasOwnProperty(re)){var ie=this.calc[re];ie.field===c&&ie.field_part===s&&ie.value===n&&ie.section_repeatable_index===a&&(this.calc[re].field_ids_touched=this.calc[re].field_ids_touched.concat(K),this.calc[re].field_ids_touched=this.calc[re].field_ids_touched.filter(function(e,t,a){return a.indexOf(e)===t}),1===l&&(this.calc[re].type=r),ae=!0)}ae||(this.calc.push(te),this.calc.sort(function(e,t){var a=["field_placeholder","field_min","field_max","field_ecommerce_price_min","field_ecommerce_price_max"],r=a.indexOf(e.field_part),i=a.indexOf(t.field_part);return r===i?0:r<i?1:-1}),this.calc.sort(function(e,t){return e.section_repeatable_index===t.section_repeatable_index?0:e.section_repeatable_index<t.section_repeatable_index?1:-1}),ws_form_settings.debug&&"field_value"===s&&this.debug_field_id_bypass.push(i.id))}break;case"section_rows_start":if(isNaN(D[0]))break;var se=this.closing_string_index(t,"#section_rows_end","#section_rows_start",N);if((o=parseInt(D[0],10))<=0)break;m.push(o);var _e=t.substring(N+1,N+1+(se-(N+1))),oe="section_"+o.toString(),le=!1!==this.section_repeatable_indexes&&void 0!==this.section_repeatable_indexes[oe]&&this.section_repeatable_indexes[oe],ne="";if(!1===le)continue;for(var ce in le)if(le.hasOwnProperty(ce)){var de=le[ce];ne+=(qt=this.parse_variables_process(_e,de,!1,i,s,!1,o,l)).output,g(qt)}t=t.substring(0,P)+ne+t.substring(se+17),M=0;break;case"if":var pe=this.closing_string_index(t,"#endif","#if",N);if(-1===pe)return this.error("error_parse_variable_syntax_error_endif",C,"parse_variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_endif",C));var ue=["==","!=",">",">=","<=","<","^=","$=","!^=","!$=","*=","!*="],fe=["&&","||"],he=[],me=0,ve=0;for(var be in D)if(D.hasOwnProperty(be)){var ge=D[be];if(0===ve&&(he[me]={value_a:"",operator:"!=",value_b:""}),1!=ve&&3!=ve||(ge=this.replace_all(ge,"&amp;","&"),ge=this.replace_all(ge,"&lt;","<"),ge=this.replace_all(ge,"&gt;",">")),0==ve||2==ve)"string"!=typeof(ge=C=(qt=this.parse_variables_process(ge,a,!1,i,s,_,o,l+1,n,c)).output)||""===ge||isNaN(ge)||(ge=parseFloat(ge));1==ve&&-1!==fe.indexOf(ge)&&(ve=3);var ye=!1;switch(ve){case 0:case 2:ye=0==ve?"value_a":"value_b",he[me][ye]=ge,he[me][ye+"_string"]=C;break;case 1:if(-1===ue.indexOf(ge))return this.error("error_parse_variable_syntax_error_operator",C,"parse_variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_operator",C));he[me].operator=ge;break;case 3:if(-1===fe.indexOf(ge))return this.error("error_parse_variable_syntax_error_logic",C,"parse_variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_logic",C));he[me].logic_next=ge}++ve>3&&(ve=0,me++)}var we=!1,ke="&&";for(var me in he)if(he.hasOwnProperty(me)){var xe=he[me],je=!1;switch(xe.operator){case"==":je=xe.value_a==xe.value_b;break;case"!=":je=xe.value_a!=xe.value_b;break;case"<":je=xe.value_a<xe.value_b;break;case">":je=xe.value_a>xe.value_b;break;case"<=":je=xe.value_a<=xe.value_b;break;case">=":je=xe.value_a>=xe.value_b;break;case"*=":je=""!==xe.value_b_string&&-1!==xe.value_a_string.indexOf(xe.value_b_string);break;case"!*=":je=""!==xe.value_b_string&&-1===xe.value_a_string.indexOf(xe.value_b_string);break;case"^=":je=""!==xe.value_b_string&&0===xe.value_a_string.indexOf(xe.value_b_string);break;case"!^=":je=""!==xe.value_b_string&&xe.value_a_string.indexOf(xe.value_b_string)>0;break;case"$=":je=""!==xe.value_b_string&&xe.value_a_string.indexOf(xe.value_b_string)===xe.value_a_string.length-xe.value_b_string.length;break;case"!$=":je=""!==xe.value_b_string&&xe.value_a_string.indexOf(xe.value_b_string)!==xe.value_a_string.length-xe.value_b_string.length}we=0==me?je:"&&"==ke?we&&je:we||je,ke=void 0!==xe.logic_next?xe.logic_next:"&&"}J=!1,t=we?(t=t.substring(0,pe)+t.substring(pe+6)).substring(0,P)+t.substring(N+1):t.substring(0,P)+t.substring(pe+6),M=0;break;case"tab_label":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_group_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_group_id",D[0]));var Se=parseInt(D[0],10);if(h.push(Se),void 0===this.group_data_cache[Se]||void 0===this.group_data_cache[Se].label)return this.error("error_parse_variable_syntax_error_group_id",Se,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_group_id",Se));J=this.group_data_cache[Se].label;break;case"section_label":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_section_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",D[0]));var Fe=parseInt(D[0],10);if(m.push(Fe),void 0===this.section_data_cache[Fe]||void 0===this.section_data_cache[Fe].label)return this.error("error_parse_variable_syntax_error_section_id",Fe,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",Fe));J=this.section_data_cache[Fe].label;break;case"cookie_get":J=this.cookie_get_raw(D[0]);break;case"session_storage_get":J=this.session_storage_get_raw(D[0]);break;case"local_storage_get":J=this.local_storage_get_raw(D[0]);break;case"field_label":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_field_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",D[0]));var We=parseInt(D[0],10);if(v.push(We),void 0===this.field_data_cache[We]||void 0===this.field_data_cache[We].label)return this.error("error_parse_variable_syntax_error_field_id",We,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",We));J=this.field_data_cache[We].label;break;case"field_min_id":case"field_max_id":case"field_min_value":case"field_max_value":case"field_min_label":case"field_max_label":for(var Oe=0,Me=0,Pe="",Ie=0,Ne=0,ze="",De=0,Ce=0;!isNaN(D[De]);){if(We=parseInt(D[De],10)){if(v.push(We),"object"==typeof this.field_data_cache[We]){var qe=this.field_data_cache[We],Te=this.get_field_value(qe,qe.section_repeatable);"object"==typeof Te&&void 0!==Te[0]||(Te=[0]);var $e=qe.label;for(var Ae of Te)Ae=this.get_number(Ae,0,!0),0==Ce?(Ie=Oe=We,Ne=Me=Ae,ze=Pe=$e):(Ae<Me&&(Oe=We,Me=Ae,Pe=$e),Ae>Ne&&(Ie=We,Ne=Ae,ze=$e)),Ce++;De++}}else De++}switch(j){case"field_min_id":J=Oe;break;case"field_max_id":J=Ie;break;case"field_min_value":J=Me;break;case"field_max_value":J=Ne;break;case"field_min_label":J=Pe;break;case"field_max_label":J=ze}break;case"date_format":var Ee=this.parse_variables_process(D[0],a,r,Ue,s,_,o,l).output,Ye=this.parse_variables_process(D[1],a,r,Ue,s,_,o,l).output,Le=new Date(Ee);if(isNaN(Le.getTime()))return this.error("error_parse_variable_syntax_error_date_format",Ee,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_date_format",Ee));J=this.date_format(Le,Ye);break;case"field":case"field_float":case"field_date_age":case"field_date_format":case"field_date_offset":case"field_count_word":case"field_count_char":case"ecommerce_field_price":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_field_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",D[0]));We=parseInt(D[0],10);if(("field_value"===s||!1===s)&&We===parseInt(c.id,10))return this.error("error_parse_variable_syntax_error_self_ref",q,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_self_ref",q));if(void 0===this.field_data_cache[We])return this.error("error_parse_variable_syntax_error_field_id",We,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",We));i.id===c.id&&v.push(We);var Ue=this.field_data_cache[We];if(void 0===e.WS_Form.field_type_cache[Ue.type])break;var Re=e.WS_Form.field_type_cache[Ue.type];if(!1!==r)if(!(Re[r+"_out"],Re[r+"_out"]))return this.error("error_parse_variable_syntax_error_"+r+"_out",Ue.label+" (ID: "+Ue.id+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_"+r+"_out",Ue.label+" (ID: "+Ue.id+")"));var Je=(Re.static,Re.static);if(Je){if(!0===Je)var He=void 0!==Re.mask_field_static?Re.mask_field_static:"";else{He=this.get_object_meta_value(Ue,Je,"");this.wpautop_parse_variable(Ue,Re)&&(He=this.wpautop(He),H=!1)}g(qt=this.parse_variables_process(He,a,r,Ue,s,_,o,l+1,n,c)),J=[qt.output];break}var Ze=void 0!==Re.submit_array&&Re.submit_array,Be=void 0!==Ue.section_repeatable_section_id&&parseInt(Ue.section_repeatable_section_id,10),Ge=void 0!==i.section_repeatable_section_id&&parseInt(i.section_repeatable_section_id,10),Qe=a,Ke=(J=!1,void 0!==D[1]?D[1]:","),Ve=void 0!==D[2]&&D[2];if(!1!==Qe&&Be===o||!1!==Be&&!1!==Ge)J=this.get_field_value(Ue,Qe,Ze,Ve);if(!1===J&&!1!==Be&&!1===Ge)J=this.get_field_value(Ue,!0,Ze,Ve);if(!1===J&&!1===Be)J=this.get_field_value(Ue,!1,Ze,Ve);if(!1===J)switch(Ue.type){case"price_select":case"price_checkbox":case"price_radio":case"select":case"checkbox":case"radio":var Xe=this.get_data_source(Ue);J=!1!==Xe.default_value?Xe.default_value:[];break;default:var et=this.get_object_meta_value(Ue,"default_value","");g(qt=this.parse_variables_process(et,a,r,Ue,s,_,o,l+1,n,c)),J=[qt.output]}switch(j){case"field":!1!==Ve&&(J=this.get_data_grid_column(J,Ue,Ve));break;case"field_count_char":case"field_count_word":var tt="object"==typeof J?J.join(Ke):"";if(void 0!==D[1]){var at=/\/(.*)\/(.*)/.exec(D[1]);tt=tt.replace(new RegExp(at[1],at[2]),"")}J=["field_count_char"==j?tt.length:this.get_word_count(tt)]}if(p)if(J.length)switch(Ue.type){case"price_select":case"price_checkbox":case"price_radio":case"price":case"price_subtotal":case"cart_price":case"cart_total":var rt=0;for(var it in J)J.hasOwnProperty(it)&&(rt+=this.get_number(J[it],0,!0));var st=parseInt(e.WS_Form.settings_plugin.price_decimals,10);J=this.get_number(rt,0,!1,st);break;case"datetime":if(""===J[0]){J="";break}var _t=this.get_object_meta_value(Ue,"input_type_datetime","date");(pt=this.get_object_meta_value(Ue,"format_date",ws_form_settings.date_format))||(pt=ws_form_settings.date_format);var ot=this.get_object_meta_value(Ue,"format_time",ws_form_settings.time_format);ot||(ot=ws_form_settings.time_format);var lt=this.get_date(J[0],_t,pt,ot);J=this.get_number(lt.getTime())/1e3;break;default:rt=0;for(var it in J)J.hasOwnProperty(it)&&(rt+=d.get_number(J[it],0,!1));J=rt}else J=0;else J=(J=e.map(J,function(e){return d.esc_html(e)})).join(Ke),H=!1;switch(j){case"ecommerce_field_price":J=this.get_price(this.get_number(J));break;case"field_date_age":var nt=new Date("number"==typeof J?1e3*J:J),ct=new Date;isNaN(nt.getTime())&&this.error("error_parse_variable_field_date_age_invalid",J,"error-parse-variables");var dt="string"==typeof D[1]?D[1]:"y";switch(dt=dt.toLowerCase(),["y","m","d","h","n","s","year","month","day","hour","minute","second","years","months","days","hours","minutes","seconds"].includes(dt)||this.error("error_parse_variable_syntax_error_field_date_age_period",dt,"error-parse-variables"),dt){case"s":case"second":case"seconds":J=Math.floor((ct-nt)/1e3);break;case"n":case"minute":case"minutes":J=Math.floor((ct-nt)/6e4);break;case"h":case"hour":case"hours":J=Math.floor((ct-nt)/36e5);break;case"d":case"day":case"days":J=Math.floor((ct-nt)/864e5);break;case"w":case"week":case"weeks":J=Math.floor((ct-nt)/6048e5);break;case"m":case"month":case"months":J=12*(ct.getFullYear()-nt.getFullYear())+(ct.getMonth()-nt.getMonth())-(ct.getDate()<nt.getDate()?1:0);break;default:J=ct.getFullYear()-nt.getFullYear()-(ct.getMonth()<nt.getMonth()||ct.getMonth()===nt.getMonth()&&ct.getDate()<nt.getDate()?1:0)}break;case"field_date_format":if("datetime"!==Ue.type)return this.error("error_parse_variable_syntax_error_field_date_offset",We,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_date_offset",We));Ee=this.parse_variables_process(J,a,r,Ue,s,_,o,l).output;if((ut=this.get_object_meta_value(Ue,"format_date",ws_form_settings.date_format))||(ut=ws_form_settings.date_format),(ft=this.get_object_meta_value(Ue,"format_time",ws_form_settings.time_format))||(ft=ws_form_settings.time_format),this.is_integer(Ee))Le=new Date(1e3*parseInt(Ee,10));else{_t=this.get_object_meta_value(Ue,"input_type_datetime","date");Le=this.get_date(Ee,_t,ut,ft)}if(!1!==Le&&!isNaN(Le.getTime())){if(void 0!==D[1]&&""!=D[1])var pt=D[1];else pt=ut;pt||(pt=ws_form_settings.date_format),J="function"==typeof this.date_format?this.date_format(Le,pt):""}break;case"field_date_offset":if("datetime"!==Ue.type)return this.error("error_parse_variable_syntax_error_field_date_offset",We,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_date_offset",We));var ut,ft;Ee=this.parse_variables_process(J,a,r,Ue,s,_,o,l).output;if((ut=this.get_object_meta_value(Ue,"format_date",ws_form_settings.date_format))||(ut=ws_form_settings.date_format),(ft=this.get_object_meta_value(Ue,"format_time",ws_form_settings.time_format))||(ft=ws_form_settings.time_format),this.is_integer(Ee))Le=new Date(1e3*parseInt(Ee,10));else{_t=this.get_object_meta_value(Ue,"input_type_datetime","date");Le=this.get_date(Ee,_t,ut,ft)}if(!1!==Le&&!isNaN(Le.getTime())){if((Wt=parseInt(this.parse_variables_process(D[1],a,r,i,s,_,o,l).output,10))&&Le.setSeconds(Le.getSeconds()+Wt),void 0!==D[2]&&""!=D[2])pt=D[2];else pt=ut;pt||(pt=ws_form_settings.date_format),J="function"==typeof this.date_format?this.date_format(Le,pt):""}break;case"field_float":J=this.get_number(J)}"field"===j&&this.wpautop_parse_variable(Ue,Re)&&(J=this.wpautop(J),H=!1);break;case"ecommerce_price":g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l));var ht=this.calc_string(qt.output,n,!1,c,s);J=this.get_price(ht);break;case"number_format":g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l));var mt=this.calc_string(qt.output,n,!1,c,s),vt=D[1],bt=D[2],gt=D[3];J=this.number_format(mt,vt,bt,gt);break;case"select_option_text":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_field_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",D[0]));We=parseInt(D[0],10);void 0===(Ke=D[1])&&(Ke=", "),i.id===c.id&&v.push(We);var yt=ws_form_settings.field_prefix+We.toString()+(a?"["+a+"]":"");if((Ft=e('[name="'+this.esc_selector(yt)+'[]"] option:selected',this.form_canvas_obj)).length)J=e.map(Ft,function(t,a){return e(t).text()}).join(Ke);break;case"query_var":J=this.get_query_var(D[0],D[1]);break;case"section_row_count":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_section_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",D[0]));var wt=parseInt(D[0],10);if(m.push(wt),void 0===this.section_data_cache[wt])return this.error("error_parse_variable_syntax_error_section_id",wt,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",wt));var kt=e('[data-repeatable][data-id="'+this.esc_selector(wt)+'"]',this.form_canvas_obj);if(0===(J=kt.length?kt.length:0)&&"function"==typeof this.get_section_repeat_default){var xt=this.section_data_cache[wt];J=this.get_section_repeat_default(xt)}break;case"checkbox_label":case"radio_label":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_field_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",D[0]));We=parseInt(D[0],10);void 0===(Ke=D[1])&&(Ke=", "),i.id===c.id&&v.push(We);yt=ws_form_settings.field_prefix+We.toString()+(a?"["+a+"]":"");if((Ft=e('[name="'+this.esc_selector(yt)+'[]"]:checked',this.form_canvas_obj)).length)J=e.map(Ft,function(t,a){return e('label[for="'+e(t).attr("id")+'"]').text()}).join(Ke);break;case"checkbox_count":case"checkbox_count_total":case"select_count":case"select_count_total":if(isNaN(D[0]))return this.error("error_parse_variable_syntax_error_field_id",D[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",D[0]));We=parseInt(D[0],10);i.id===c.id&&v.push(We);yt=ws_form_settings.field_prefix+We.toString()+(a?"["+a+"]":"");switch(j){case"checkbox_count":case"checkbox_count_total":var jt=D[1]&&this.is_true(D[1]),St=" [data-row-checkbox]"+(jt?"":':not([style*="display: none"])')+" input"+(jt?"":":not([data-hidden])")+("checkbox_count"==j?":checked":""),Ft=e('[data-type="checkbox"][data-id="'+We+'"]'+St+', [data-type="price_checkbox"][data-id="'+We+'"]'+St,this.form_canvas_obj);break;case"select_count":case"select_count_total":Ft=e('select[name="'+this.esc_selector(yt)+'[]"] option:not([data-placeholder])'+("select_count"==j?":selected":""),this.form_canvas_obj)}J=Ft?Ft.length:0;break;case"post_date_custom":case"post_date_modified_custom":case"server_date_custom":case"blog_date_custom":Le=this.get_new_date(F);if(void 0!==D[1])(Wt=parseInt(this.parse_variables_process(D[1],a,r,i,s,_,o,l).output,10))&&Le.setSeconds(Le.getSeconds()+Wt);J="function"==typeof this.date_format?this.date_format(Le,D[0]):"";break;case"client_date_custom":var Wt;Le=new Date;if(void 0!==D[1])(Wt=parseInt(this.parse_variables_process(D[1],a,r,i,s,_,o,l).output,10))&&Le.setSeconds(Le.getSeconds()+Wt);J="function"==typeof this.date_format?this.date_format(Le,D[0]):"";break;case"random_number":var Ot=parseInt(this.get_number(D[0]),10),Mt=parseInt(this.get_number(D[1]),10);J=Math.floor(Math.random()*(Mt-Ot+1))+Ot;break;case"random_string":var Pt=parseInt(this.get_number(D[0]),10),It=D[1],Nt=It.length;J="";for(var zt=0;zt<Pt;zt++)J+=It[Math.floor(Math.random()*Nt)];break;case"abs":case"acos":case"asin":case"atan":case"ceil":case"cos":case"exp":case"floor":case"log":case"negative":case"positive":case"sin":case"sqrt":case"tan":g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l));ht=this.calc_string(qt.output,n,!1,c,s);switch(j){case"abs":J=Math.abs(ht);break;case"acos":J=Math.acos(ht);break;case"asin":J=Math.asin(ht);break;case"atan":J=Math.atan(ht);break;case"ceil":J=Math.ceil(ht);break;case"cos":J=Math.cos(ht);break;case"exp":J=Math.exp(ht);break;case"floor":J=Math.floor(ht);break;case"log":J=Math.log(ht);break;case"negative":case"positive":J="positive"==j?Math.max(0,ht):Math.min(0,ht);break;case"sin":J=Math.sin(ht);break;case"sqrt":J=Math.sqrt(ht);break;case"tan":J=Math.tan(ht)}break;case"lower":case"upper":case"ucwords":case"ucfirst":case"capitalize":case"sentence":case"wpautop":case"trim":case"slug":case"name_prefix":case"name_first":case"name_middle":case"name_last":case"name_suffix":if("string"==typeof D[0])switch(g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l)),J=qt.output,j){case"lower":J=J.toLowerCase();break;case"upper":J=J.toUpperCase();break;case"ucwords":J=this.ucwords(J);break;case"ucfirst":J=this.ucfirst(J);break;case"capitalize":J=this.capitalize(J);break;case"sentence":J=this.sentence(J);break;case"wpautop":J=this.wpautop(J),H=!1;break;case"trim":J=J.trim(),H=!1;break;case"slug":J=this.get_slug(J);break;case"name_prefix":case"name_first":case"name_middle":case"name_last":case"name_suffix":J=this.get_full_name_components(J)[j]}break;case"pow":g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l));var Dt=this.calc_string(qt.output,n,vt,c,s);g(qt=this.parse_variables_process(D[1],a,r,i,s,_,o,l));var Ct=this.calc_string(qt.output,n,vt,c,s);J=Math.pow(Dt,Ct);break;case"round":var qt=this.parse_variables_process(D[1],a,r,i,s,_,o,l);vt=this.get_number(qt.output);g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l)),J=this.calc_string(qt.output,n,vt,c,s);break;case"min":case"max":var Tt=[];if(1===D.length)g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l)),D=this.string_to_attributes(qt.output);for(var De in D)if(D.hasOwnProperty(De)){g(qt=this.parse_variables_process(D[De],a,r,i,s,_,o,l));ht=this.calc_string(qt.output,n,!1,c,s);Tt.push(ht)}J=Tt.length>0?"min"==j?Math.min(...Tt):Math.max(...Tt):0;break;case"avg":rt=0;if(1===D.length)g(qt=this.parse_variables_process(D[0],a,r,i,s,_,o,l)),D=this.string_to_attributes(qt.output);for(var De in D){if(D.hasOwnProperty(De))g(qt=this.parse_variables_process(D[De],a,r,i,s,_,o,l)),rt+=ht=this.calc_string(qt.output,n,!1,c,s)}J=rt/D.length}!1!==J&&(H&&(J=this.esc_html(J)),O?f[q.substring(1)]=J:u[q.substring(1)]=J)}}while(-1!==P);t=this.mask_parse(t,u)}}else u[j]=F}}if(-1!=t.indexOf("form")&&(u.form_id=this.form_id,u.form_instance_id=this.form_instance_id,u.form_obj_id=this.form_obj_id,u.form_label=this.form.label,u.form_checksum=this.form.published_checksum,u.form_framework=this.framework.name),-1!=t.indexOf("section")){u.section_row_index=a;var $t=1;!1===o&&!1!==i&&void 0!==i.section_id&&parseInt(i.section_id,10)>0&&(o=parseInt(i.section_id,10)),"object"==typeof this.section_repeatable_indexes["section_"+o]&&($t=this.section_repeatable_indexes["section_"+o].indexOf(a.toString())+1)<=0&&($t=1),u.section_row_number=$t}if(-1!=t.indexOf("submit")&&(u.submit_hash=this.hash),-1!=t.indexOf("client")){var At=new Date;u.client_time="function"==typeof this.date_format?this.date_format(At,ws_form_settings.time_format):"",u.client_date="function"==typeof this.date_format?this.date_format(At,ws_form_settings.date_format):"";var Et="";"undefined"!=typeof navigator&&"string"==typeof navigator.language&&(Et=navigator.language.trim());var Yt=e.WS_Form.language_tag_to_locale(Et);u.client_locale=Yt,u.client_language=Yt?e.WS_Form.locale_to_language_tag(Yt):"",u.client_locale_language_code=e.WS_Form.get_language_code(Yt),u.client_locale_country_code=e.WS_Form.get_country_code(Yt)}-1!=t.indexOf("seconds_epoch_midnight")&&((Lt=new Date).setHours(0,0,0,0),u.seconds_epoch_midnight=Math.round(Lt.getTime()/1e3));if(-1!=t.indexOf("seconds_epoch")){var Lt=new Date;u.seconds_epoch=Math.round(Lt.getTime()/1e3)}var Ut=this.get_currency();if(-1!=t.indexOf("ecommerce"))for(var Rt in void 0===this.ecommerce_cart_price_type.total&&(this.ecommerce_cart_price_type.total={float:0,string:this.get_price(0,Ut,!1),currency:this.get_price(0,Ut)}),u.ecommerce_cart_total_float=this.ecommerce_cart_price_type.total.float,u.ecommerce_cart_total_currency=this.ecommerce_cart_price_type.total.currency,u.ecommerce_cart_total=this.ecommerce_cart_price_type.total.string,e.WS_Form.ecommerce.cart_price_types)e.WS_Form.ecommerce.cart_price_types.hasOwnProperty(Rt)&&(void 0===this.ecommerce_cart_price_type[Rt]&&(this.ecommerce_cart_price_type[Rt]={float:0,string:this.get_price(0,Ut,!1),currency:this.get_price(0,Ut)}),u["ecommerce_cart_"+Rt+"_float"]=this.ecommerce_cart_price_type[Rt].float,u["ecommerce_cart_"+Rt+"_currency"]=this.ecommerce_cart_price_type[Rt].currency,u["ecommerce_cart_"+Rt]=this.ecommerce_cart_price_type[Rt].string);if(-1!=t.indexOf("tracking")&&"function"==typeof this.form_tracking_get_values){var Jt=this.form_tracking_get_values();for(var Ht in Jt)if(Jt.hasOwnProperty(Ht)){var Zt=Jt[Ht];u[Zt.id]=Zt.value}}var Bt=t;(t=this.mask_parse(t,u),(t=this.mask_parse(t,f,!0))!==Bt&&-1!==t.indexOf("#"))&&(t=(qt=this.parse_variables_process(t,a,r,i,s,_,o,l+1,n,c)).output,g(qt));return{output:t,groups:h.filter(function(e,t,a){return a.indexOf(e)===t}),sections:m.filter(function(e,t,a){return a.indexOf(e)===t}),fields:v.filter(function(e,t,a){return a.indexOf(e)===t}),dynamic:b}},e.WS_Form.prototype.get_data_grid_column=function(t,a,r){if(0===t.length)return t;var i=[];switch(s=a.type){case"select":case"checkbox":case"radio":break;case"price_select":var s="select_price";break;case"price_checkbox":s="checkbox_price";break;case"price_radio":s="radio_price";break;default:return t}var _="data_grid_"+s,o=this.get_object_meta_value(a,s+"_field_value","0"),l=this.get_object_meta_value(a,s+"_field_label","0"),n=this.get_object_meta_value(a,s+"_field_price","0"),c=this.get_object_meta_value(a,s+"_field_parse_variable","0"),d=this.get_object_meta_value(a,s+"_field_wc","0"),p=this.get_object_meta_value(a,_,!1);if(!1===p)return t;if("object"!=typeof p.columns||"object"!=typeof p.groups)return t;var u=0,f=0,h=0,m=0,v=0,b=p.columns,g=parseInt(r,10);for(var y in b)if(b.hasOwnProperty(y)){var w=b[y];void 0!==w.id&&void 0!==w.label&&(w.id==o&&(u=y),w.id==l&&(f=y),w.id==n&&(h=y),w.id==c&&(m=y),w.id==d&&(v=y),w.label===r&&(g=y))}for(var k in t)if(t.hasOwnProperty(k)){var x=t[k],j=p.groups;for(var S in j)if(j.hasOwnProperty(S)){var F=j[S];if(void 0!==F.rows){var W=F.rows;for(var O in W)if(W.hasOwnProperty(O)){var M=W[O];if(null!==M&&"object"==typeof M.data){var P=M.data,I=e.extend(!0,[],P);if(void 0!==I[u]&&void 0!==I[g]){var N={data_grid_row_price:"",data_grid_row_price_currency:"",data_grid_row_woocommerce_cart:"",data_grid_row_value:I[u],data_grid_row_action_variable:"",data_grid_row_label:""};for(var z in!1!==f&&void 0!==I[f]&&(N.data_grid_row_label=I[f]),!1!==h&&void 0!==I[h]&&(N.data_grid_row_price_currency=this.get_price(I[h]),N.data_grid_row_price=this.get_number(I[h])),!1!==m&&void 0!==I[m]&&(N.data_grid_row_action_variable=I[m]),!1!==v&&void 0!==I[v]&&(N.data_grid_row_woocommerce_cart=I[v]),I)I.hasOwnProperty(z)&&("number"==typeof I[z]&&(I[z]=I[z].toString()),I[z]=this.mask_parse(I[z],N));if(x===I[u].toString()){if(void 0===M.data[g])continue;i.push(M.data[g])}}}}}}}return i},e.WS_Form.prototype.wpautop_parse_variable=function(e,t){if("on"==this.get_object_meta_value(e,"wpautop_do_not_process",""))return!1;var a=void 0!==t.wpautop_parse_variable&&t.wpautop_parse_variable;if("object"==typeof a){var r=!1;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];this.get_object_meta_value(e,s.meta_key,"")===s.meta_value&&(r=!0)}a=r}return a},e.WS_Form.prototype.wpautop=function(e,t){if("string"!=typeof e)return"";void 0===t&&(t=!0);var a=new Map;if(""===e.trim())return"";if((e+="\n").indexOf("<pre")>-1){var r=e.split("</pre>"),i=r.pop();e="",r.forEach(function(t,r){var i=t.indexOf("<pre");if(-1!==i){var s="<pre wp-pre-tag-"+r+"></pre>";a[s]=t.slice(i)+"</pre>",e+=t.substring(0,i)+s}else e+=t}),e+=i}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";(e=(e=(e=(e=e.replace(/<br \/>\s*<br \/>/,"\n\n")).replace(new RegExp("(<"+s+"[^>]*>)","gmi"),"\n$1")).replace(new RegExp("(</"+s+">)","gmi"),"$1\n\n")).replace(/\r\n|\r/,"\n")).indexOf("<option")>-1&&(e=(e=e.replace(/\s*<option'/gim,"<option")).replace(/<\/option>\s*/gim,"</option>")),e.indexOf("</object>")>-1&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/gim,"$1")).replace(/\s*<\/object>/gim,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/gim,"$1")),(e.indexOf("<source")>-1||e.indexOf("<track")>-1)&&(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/gim,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/gim,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/gim,"$1"));var _=(e=e.replace(/\n\n+/gim,"\n\n")).split(/\n\s*\n/);return e="",_.forEach(function(t){e+="<p>"+t.replace(/^\s+|\s+$/g,"")+"</p>\n"}),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/gim,"")).replace(/<p>([^<]+)<\/(div|address|form)>/gim,"<p>$1</p></$2>")).replace(new RegExp("<p>s*(</?"+s+"[^>]*>)s*</p>","gmi"),"$1",e)).replace(/<p>(<li.+?)<\/p>/gim,"$1")).replace(/<p><blockquote([^>]*)>/gim,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/gim,"</p></blockquote>")).replace(new RegExp("<p>s*(</?"+s+"[^>]*>)","gmi"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)s*</p>","gmi"),"$1"),t&&(e=(e=(e=e.replace(/<(script|style)(?:.|\n)*?<\/\\1>/gim,function(e){return e[0].replace("\n","<WPPreserveNewline />")})).replace(/(<br \/>)?\s*\n/gim,"<br />\n")).replace("<WPPreserveNewline />","\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)s*<br />","gmi"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/gim,"$1")).replace(/\n<\/p>$/gim,"</p>"),Object.keys(a).length&&(e=e.replace(new RegExp(Object.keys(a).join("|"),"gi"),function(e){return a[e]})),e},e.WS_Form.prototype.calc_string=function(e,t,a,r,i){try{var s=new Function("return "+e)();return s===1/0&&(s=0),this.get_number(s,0,!1,a)}catch(e){return"object"==typeof r&&void 0!==r.id&&void 0!==r.label&&this.error("error_parse_variable_syntax_error_calc",r.id+" | "+this.esc_html(r.label)+(i?" | "+this.esc_html(i):"")+" | "+e.message+": "+this.esc_html(t)),0}},e.WS_Form.prototype.closing_string_index=function(e,t,a,r){for(var i=1;i>0;){var s=e.indexOf(a,r),_=e.indexOf(t,r);if(-1!==s&&-1!==_&&s<_)r=s+a.length,i++;else{if(!(-1!==_&&i>1)){if(-1!==_&&1===i)break;break}r=_+t.length,i--}}return _},e.WS_Form.prototype.string_to_attributes=function(e,t){if("string"!=typeof e||""==e)return[];"string"!=typeof t&&(t=",");var a=1,r=0,i=!1,s="",_=[];e.replace("“",'"'),e.replace("”",'"');for(var o=e.length;r<o;){var l=e[r];if(void 0===l)break;if(l!==t||1!==a||i)if('"'!==l||1!==a){if(!i){switch(l){case"(":a++;break;case")":a--}if(0===a)break}s+=l,r++}else i||(s=""),i=!i,r++;else _.push(s),s="",r++}return _.push(s),_.length&&(_=_.map(function(e){return e=e.replace(/^"(.+(?="$))"$/,"$1")})),_},e.WS_Form.prototype.get_bracket_finish_index=function(e){if(""===e)return-1;e.replace("“",'"'),e.replace("”",'"');for(var t=1,a=1,r=!1;t>0||a<e.length;){var i=e[a];if(void 0===i)break;if('"'!==i){if(!r){switch(i){case"(":t++;break;case")":t--}if(0===t)break}a++}else r=!r,a++}return 0===t?a:(this.error("error_parse_variable_syntax_error_bracket_closing",e,"error-parse-variables"),-1)},e.WS_Form.prototype.parse_variables_process_error=function(e){return{output:e,functions:[],groups:[],sections:[],fields:[],dynamic:!1}},e.WS_Form.prototype.get_field_value=function(t,a,r,i){var s=this;if(void 0===a&&(a=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),!1===a){var _='[name="'+this.esc_selector(ws_form_settings.field_prefix+t.id);r&&(_+="[]")}else if(!0===a)_='[name^="'+this.esc_selector(ws_form_settings.field_prefix+t.id)+"[";else{_='[name="'+this.esc_selector(ws_form_settings.field_prefix+t.id+"["+a+"]");r&&(_+="[]")}if(!e(_+='"]',this.form_canvas_obj).length)return!1;switch(t.type){case"select":case"price_select":_+=" option:selected";break;case"checkbox":case"radio":case"price_checkbox":case"price_radio":_+=":checked"}var o=[];return e(_,this.form_canvas_obj).each(function(){switch(t.type){case"price_select":!1===i?o.push(e(this).attr("data-price")):o.push(e(this).val());break;case"price_checkbox":case"price_radio":!1===i?o.push(e(this).attr("data-price")):o.push(e(this).val());break;case"mediacapture":if(u=e(this).val()){var a=JSON.parse(u);"object"==typeof a&&a.filename&&o.push(a.filename)}break;case"file":var r=[];switch(e(this).attr("data-file-type")){case"dropzonejs":var _=e(this).closest('[data-type="file"]');if(_){var l=e(".dropzone",_)[0].dropzone;if(l&&l.files)r=l.files}break;default:r=e(this)[0].files}var n=[];for(var c in r)if(r.hasOwnProperty(c)){var d=r[c];n.push(d.name)}o.push(n.join(","));break;case"googlemap":var p=e(this).val();if(!p)break;try{var u=JSON.parse(p)}catch(e){break}void 0!==u.lat&&void 0!==u.lng&&o.push(u.lat+","+u.lng);break;default:u=e(this).val();s.is_iterable(u)?o.push(...u):o.push(u)}}),o},e.WS_Form.prototype.get_data_source=function(t){var a={default_value:[]};t=this.field_data_cache[t.id];if(void 0===e.WS_Form.field_type_cache[t.type])return!1;var r=e.WS_Form.field_type_cache[t.type];if(void 0===r.data_source)return!1;var i=r.data_source;if(void 0===i.type)return!1;switch(a.type=i.type,a.type){case"data_grid":if(void 0===i.id)return!1;a.meta_key_data_grid=i.id,a.meta_key_value_column=void 0===r.datagrid_column_value&&r.datagrid_column_value,a.data_grid=this.get_object_meta_value(t,a.meta_key_data_grid,!1),a.value_column_id=this.get_object_meta_value(t,a.meta_key_value_column,!1);var s=(a.data_grid.columns,a.data_grid.columns);for(var _ in a.value_column_index=!1,s)if(s.hasOwnProperty(_)){var o=s[_];if(void 0!==o.id&&o.id==a.value_column_id){a.value_column_index=_;break}}if(!1!==a.value_column_id&&void 0!==a.data_grid.groups){var l=a.data_grid.groups;for(var n in l)if(l.hasOwnProperty(n)){var c=l[n];if(void 0!==c.rows){var d=c.rows;for(var p in d)if(d.hasOwnProperty(p)){var u=d[p];if(null!==u)if(void 0!==u.default&&"on"===u.default){if(void 0===u.data)continue;if(void 0===u.data[a.value_column_index])continue;a.default_value.push(u.data[a.value_column_index])}}}}}}return a},e.WS_Form.prototype.get_query_var=function(e,t){t||(t="");var a=window.location.href;if(!a)return t;try{e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(a);if(!r)return t;if(!r[2])return t;try{return decodeURIComponent(r[2].replace(/\+/g," "))}catch(e){return t}}catch(e){return t}},e.WS_Form.prototype.set_object_meta_value=function(e,t,a){return void 0===e?a:void 0===e.meta?a:void(e.meta[t]=a)},e.WS_Form.prototype.column_class_array=function(t,a){void 0===a&&(a="breakpoint");var r=[],i=this.framework.breakpoints,s=this.framework.columns.column_class,_=this.framework.columns.offset_class,o=0,l=0;for(var n in i)if(i.hasOwnProperty(n)){var c=i[n],d=this.get_object_meta_value(t,a+"_size_"+n,"");if(""==d&&(d="0"),0==(d=parseInt(d,10))){if(void 0!==c.column_size_default)switch(c.column_size_default){case"column_count":d=parseInt(e.WS_Form.settings_plugin.framework_column_count,10);break;default:d=parseInt(c.column_size_default,10)}}else d=parseInt(d,10);if(d>0&&d!=o){var p={id:c.id,size_word:void 0===this.number_to_word[d]?d:this.number_to_word[d],size:d};if(void 0!==c.column_class)var u=c.column_class;else u=s;var f=this.mask_parse(u,p);r.push(f),o=d}var h=this.get_object_meta_value(t,a+"_offset_"+n,""),m=!1;if(""!==h&&h!=l){p={id:c.id,offset_word:void 0===this.number_to_word[h]?h:this.number_to_word[h],offset:h};if(void 0!==c.offset_class)var v=c.offset_class;else v=_;f=this.mask_parse(v,p);r.push(f),l=h,m=!0}m&&r.push("wsf-has-offset")}return r},e.WS_Form.prototype.column_classes_render=function(e,t,a){e.closest(".wsf-sections").css("min-height","auto"),e.closest(".wsf-fields").css("min-height","auto"),void 0===a&&(a=!0);for(var r=this.column_class_array(t),i=0;i<r.length;i++)a?e.addClass(r[i]):e.removeClass(r[i])},e.WS_Form.prototype.mask_parse=function(e,t,a){if("string"!=typeof e)return"";void 0===a&&(a=!1);var r=[],i=Object.keys(t);i.sort(function(e,t){if(e===t)return 0;var a=-1!==e.indexOf("("),r=-1!==t.indexOf("(");return a&&r?e<t?1:-1:!a&&r||a&&!r?a<r?1:-1:e<t?1:-1});for(var s=0;s<i.length;s++)r[i[s]]=t[i[s]];for(var _ in t=r)if(t.hasOwnProperty(_)){var o=t[_];e=a?e.replace("#"+_,o):this.replace_all(e,"#"+_,o)}return e},e.WS_Form.prototype.language=function(t,a,r,i){void 0===a&&(a=!1),void 0===r&&(r=!0),void 0===i&&(i=!1);var s="",_="";if("error_language"===t)s="Language reference not found: %s";else if(null!==e.WS_Form.settings_form&&void 0!==e.WS_Form.settings_form.language&&void 0!==e.WS_Form.settings_form.language[t])s=e.WS_Form.settings_form.language[t];return""==s?"error_language"===t||i||this.error("error_language",t):(!1!==a&&(s=this.replace_all(s,"%s",a)),_=r?this.esc_html(s):s),""==_&&(_=""==a?"[LANGUAGE NOT FOUND: "+t+"]":a),_},e.WS_Form.prototype.cookie_set=function(t,a,r,i){void 0===r&&(r=!0),void 0===i&&(i=!0);var s=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");if(!s)return!1;if(""==a){if(""==this.cookie_get(t,""))return!1;(o=new Date).setTime(o.getTime()-864e5);var _="expires="+o.toUTCString()+";"}else if(r){var o,l=this.get_object_value(e.WS_Form.settings_plugin,"cookie_timeout");if(!l)return!1;(o=new Date).setTime(o.getTime()+1e3*l);_=" expires="+o.toUTCString()+";"}else _="";var n=s+"_"+(i?this.form_id+"_":"")+t+"="+a+";"+_+" path=/; SameSite=Strict; Secure";return document.cookie=n,!0},e.WS_Form.prototype.field_param_language=function(e,t,a){var r=this.get_object_meta_value(e,t,"");return""!==r?r:this.language(a)},e.WS_Form.prototype.cookie_get=function(t,a,r){void 0===r&&(r=!0);var i=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");return i?(t=i+"_"+(r?this.form_id+"_":"")+t,this.cookie_get_raw(t,a)):a},e.WS_Form.prototype.cookie_get_raw=function(e,t){if(void 0===t&&(t=""),""===e||!document.cookie||"string"!=typeof document.cookie)return t;var a=document.cookie.split(";");e+="=";for(var r=0;r<a.length;r++){for(var i=a[r];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(e)){var s=i.substring(e.length,i.length);try{return decodeURIComponent(s)}catch(e){return s}}}return t},e.WS_Form.prototype.cookie_clear=function(t,a){void 0===a&&(a=!0);var r=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");if(!r)return!1;var i=new Date;i.setTime(i.getTime()-36e5);var s=r+"_"+(a?this.form_id+"_":"")+t+"=''; expires="+i.toUTCString()+"; path=/; SameSite=Strict; Secure";return document.cookie=s,!0},e.WS_Form.prototype.session_storage_get_raw=function(e,t){return void 0===t&&(t=""),""===e||"object"!=typeof sessionStorage||null===sessionStorage.getItem(e)?t:sessionStorage.getItem(e)},e.WS_Form.prototype.local_storage_get_raw=function(e,t){return void 0===t&&(t=""),""===e||"object"!=typeof localStorage||null===localStorage.getItem(e)?t:localStorage.getItem(e)},e.WS_Form.prototype.tabs=function(t,a){void 0===a&&(a={});var r=void 0!==a.selector?a.selector:"li",i=void 0!==a.active?parseInt(a.active,10):0;isNaN(i)&&(i=0);var s=void 0!==a.activate&&a.activate,_=this,o=0;t.addClass("wsf-tabs"),e(r,t).each(function(){var t=e(this);t.find('a[href*="#"]:not([href="#"])').each(function(){e(this).attr("data-tab-index",o),e(this).off("click").on("click",function(a){a.preventDefault(),e(this).trigger("wsf-click"),a.stopPropagation(),a.stopImmediatePropagation(),_.tab_show(e(this),t,s)}),o===i&&_.tab_show(e(this),t)}),o++})},e.WS_Form.prototype.tabs_destroy=function(t,a){void 0===a&&(a={});var r=void 0!==a.selector?a.selector:"li";e(r,t).each(function(){e(this).find("a").each(function(){e(this).removeAttr("data-tab-index"),e(this).off("click")})}),t.removeClass("wsf-tabs")},e.WS_Form.prototype.tab_show=function(t,a,r){var i=this;a.siblings().each(function(){var t=e(this).find("a").first();i.tab_hide(t,e(this))}),a.addClass("wsf-tab-active");var s=t.attr("href");(e(s).show(),"function"==typeof r)&&r(t.attr("data-tab-index"));t.trigger("tab_show")},e.WS_Form.prototype.tab_hide=function(t,a){a.removeClass("wsf-tab-active");var r=t.attr("href");e(r).hide()},e.WS_Form.prototype.data_cache_build=function(){if(void 0===this.form)return!1;if(void 0===this.form.groups)return!1;for(var e in this.group_data_cache=[],this.section_data_cache=[],this.field_data_cache=[],this.action_data_cache=[],this.form.groups)if(this.form.groups.hasOwnProperty(e)){var t=this.form.groups[e];this.data_cache_build_group(t)}var a=this.get_object_meta_value(this.form,"action",!1);if(!1!==a&&void 0!==a.groups&&void 0!==a.groups[0]&&"object"==typeof a.groups[0].rows&&0!=a.groups[0].rows.length){var r=a.groups[0].rows;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];null!==s&&"object"==typeof s&&"object"==typeof s.data&&0!=s.data.length&&(this.action_data_cache[s.id]={label:s.data[0]})}}return!0},e.WS_Form.prototype.data_cache_build_group=function(e){for(var t in this.group_data_cache[e.id]=e,e.sections)if(e.sections.hasOwnProperty(t)){var a=e.sections[t];this.data_cache_build_section(a)}return!0},e.WS_Form.prototype.data_cache_build_section=function(t){this.section_data_cache[t.id]=t;var a=void 0!==t.meta&&void 0!==t.meta.section_repeatable&&"on"==t.meta.section_repeatable;for(var r in t.fields)if(t.fields.hasOwnProperty(r)){var i=t.fields[r];a&&(i.section_repeatable_section_id=t.id),void 0!==e.WS_Form.field_type_cache[i.type]&&(this.field_data_cache[i.id]=i)}return!0},e.WS_Form.prototype.array_randomize=function(e){for(var t=e.length-1;t>0;t--){var a=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[a],e[a]=r}return e},e.WS_Form.prototype.get_nice_duration=function(e,t){if(void 0===t&&(t=!0),0==e)return"-";var a=Math.floor(e/3600);if(t)var r=Math.floor(e%3600/60),i=e%60;else r=Math.ceil(e%3600/60);var s=[];return a>0&&s.push(a+" "+(1==a?this.language("hour"):this.language("hours"))),r>0&&s.push(r+" "+(1==r?this.language("minute"):this.language("minutes"))),t&&s.push(i+" "+(1==i?this.language("second"):this.language("seconds"))),s.join(" ")},e.WS_Form.prototype.get_nice_distance=function(e,t){if(0==e)return"-";switch(t){case"IMPERIAL":var a=e/1609;if(a>=1)return Math.floor(a)+" "+(1==a?this.language("mile"):this.language("miles"));var r=3.2808399*e;return Math.floor(r)+" "+(1==r?this.language("feet"):this.language("feets"));default:var i=e/1e3;return i>=1?Math.round(10*i)/10+" "+(1==i?this.language("kilometer"):this.language("kilometers")):Math.round(10*e)/10+" "+(1==e?this.language("meter"):this.language("meters"))}},e.WS_Form.prototype.ucwords=function(e){for(var t=e.split(" "),a=0;a<t.length;a++)t[a]=t[a].charAt(0).toUpperCase()+t[a].slice(1);return t.join(" ")},e.WS_Form.prototype.ucfirst=function(e){var t="";return e.length>0&&(t=e[0].toUpperCase(),e.length>1&&(t+=e.slice(1))),t},e.WS_Form.prototype.capitalize=function(e){return this.ucwords(e.toLowerCase())},e.WS_Form.prototype.sentence=function(e){return this.ucfirst(e.toLowerCase())},e.WS_Form.prototype.get_label_position=function(e){var t=this.get_object_meta_value(e,"sub_type",!1);""==t&&(t=!1);var a=this.get_object_meta_value(e,"label_position","default");return"default"==(a=this.get_field_value_fallback(e.type,!1,"label_position_force",a,!1,t))&&(a=this.get_object_meta_value(this.form,"label_position_form","top")),a},e.WS_Form.prototype.get_help_position=function(e){var t=this.get_object_meta_value(e,"sub_type",!1);""==t&&(t=!1);var a=this.get_object_meta_value(e,"help_position","default");return"default"==(a=this.get_field_value_fallback(e.type,!1,"help_position_force",a,!1,t))&&(a=this.get_object_meta_value(this.form,"help_position_form","bottom")),a},e.WS_Form.prototype.get_form_invalid_feedback_mask=function(){var t=this.get_object_meta_value(this.form,"invalid_feedback_mask","");if(""==t){var a=e.WS_Form.meta_keys.invalid_feedback_mask;return a.p?a.p:a.mask_placeholder}return t},e.WS_Form.prototype.get_invalid_feedback_mask_parsed=function(e,t){return e=this.replace_all(e,"#label_lowercase",t.toLowerCase()),e=this.replace_all(e,"#label",t)},e.WS_Form.prototype.get_field_html_single=function(t,a,r,i){void 0===r&&(r=!1),void 0===i&&(i=!1);var s=[],_=void 0!==a,o=!r,l=!1!==i?"-repeat-"+i:"",n=this.get_part_id(t.id,i),c=this.get_field_name(t.id,i),d=["default","class","input_type_datetime","multiple","min","max","step"],p=["class"];if(void 0===e.WS_Form.field_type_cache[t.type])return"";var u=e.WS_Form.field_type_cache[t.type];if(u.pro_required)return this.language("error_pro_required");if(r)var f=!0;else f=this.get_object_meta_value(t,"label_render",!0);var h=this.get_object_meta_value(t,"sub_type",!1);if(""==h&&(h=!1),this.get_field_value_fallback(t.type,!1,"label_disabled",!1,!1,h)&&(f=!1),void 0!==u.submit_array&&u.submit_array&&(c+="[]"),f&&!r)var m=this.get_label_position(t);else m="top";var v=!1;-1===this.get_framework().label_positions.indexOf(m)&&(m="top");var b=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_field_attributes",[],!1,h)),g=void 0!==u.mask_wrappers_drop&&u.mask_wrappers_drop;"recaptcha"==t.type&&"invisible"==this.get_object_meta_value(t,"recaptcha_recaptcha_type","default")&&(g=!0),"hcaptcha"==t.type&&"invisible"==this.get_object_meta_value(t,"hcaptcha_type","default")&&(g=!0);var y=g?"#field":this.get_field_value_fallback(t.type,m,"mask","#field",!1,h),w=this.get_field_value_fallback(t.type,m,"mask_field","",!1,h);if(r){var k=this.get_field_value_fallback(t.type,m,"mask_field_submit",!1,!1,h);!1!==k&&(w=k)}"left"!=m&&"right"!=m||(w=(w=w.replace("#pre_help","")).replace("#post_help",""));var x=f?this.get_field_value_fallback(t.type,m,"mask_field_label","",!1,h):"",j=this.get_field_value_fallback(t.type,m,"mask_field_label_hide_group",!1,!1,h),S=this.get_field_value_fallback(t.type,m,"mask_help","",!1,h),F=this.get_field_value_fallback(t.type,m,"mask_help_append","",!1,h),W=this.get_field_value_fallback(t.type,m,"mask_help_append_separator","",!1,h),O=this.get_field_value_fallback(t.type,m,"mask_invalid_feedback","",!1,h),M=this.get_object_meta_value(t,"default_value","",!1,!1),P=this.parse_variables_process(M,i,!1,t,"field_value",o).output,I=this.get_object_meta_value(t,"text_editor","",!1,!1),N=this.parse_variables_process(I,i,!1,t,"field_text_editor",o).output,z=this.get_object_meta_value(t,"html_editor","",!1,!1),D=this.parse_variables_process(z,i,!1,t,"field_html",o).output,C=this.get_object_meta_value(t,"ecommerce_calculation_persist","",!1,!0),q=this.get_object_meta_value(t,"dedupe_value_scope","",!1,!0),T=this.get_object_meta_value(t,"hidden_bypass","",!1,!0),$=this.get_object_meta_value(t,"exclude_cart_total","",!1,!0);_||(a="",""!=P&&(a=this.esc_html(P)),""!=N&&(a=N),""!=D&&(a=D));var A=!0,E="";switch(t.type){case"textarea":A=""===this.get_object_meta_value(t,"input_type_textarea","");break;case"select":case"checkbox":case"radio":case"price_select":case"price_checkbox":case"price_radio":a&&(a="string"==typeof a?a.split(",").map(function(e){return e.trim()}):a,_=!0);break;case"file":case"mediacapture":case"signature":case"googlemap":"object"==typeof a&&(a=this.esc_html(JSON.stringify(a)));break;case"price_range":_&&"price_range"==t.type&&(a=this.get_number(a));break;case"password":E="";var Y,L=this.get_object_meta_value(t,"password_generate",""),U=this.get_object_meta_value(t,"password_visibility_toggle",""),R=this.get_object_meta_value(t,"append","");if(L)""==(Y=this.get_object_meta_value(t,"text_password_generate",""))&&(Y=this.language("password_generate")),E+='<div data-wsf-password-generate style="cursor: pointer; user-select: none; outline: 0;'+(U||R?" margin-"+(ws_form_settings.rtl?"left":"right")+": 8px;":"")+'" title="'+this.esc_attr(Y)+'" tabindex="0" role="button" aria-pressed="false"><svg style="display: block;" height="16" width="16" viewBox="0 0 16 16"><path d="M8 0c-3 0-5.6 1.6-6.9 4.1l-1.1-1.1v4h4l-1.5-1.5c1-2 3.1-3.5 5.5-3.5 3.3 0 6 2.7 6 6s-2.7 6-6 6c-1.8 0-3.4-0.8-4.5-2.1l-1.5 1.3c1.4 1.7 3.6 2.8 6 2.8 4.4 0 8-3.6 8-8s-3.6-8-8-8z"/></svg></div>';if(U)""==(Y=this.get_object_meta_value(t,"text_password_visibility_toggle_off",""))&&(Y=this.language("password_visibility_toggle_off")),E+='<div data-wsf-password-visibility-toggle style="cursor: pointer; user-select: none; outline: 0;'+(R?" margin-"+(ws_form_settings.rtl?"left":"right")+": 8px;":"")+';" title="'+this.esc_attr(Y)+'" tabindex="0" role="button" aria-pressed="false"><svg style="display: block;" height="16" width="16" viewBox="0 0 16 16"><g class="wsf-password-visibility-off"><path d="M8 3.9c-6.7 0-8 5.1-8 5.1s2.2 4.1 7.9 4.1 8.1-4 8.1-4-1.3-5.2-8-5.2zM5.3 5.4c0.5-0.3 1.3-0.3 1.3-0.3s-0.5 0.9-0.5 1.6c0 0.7 0.2 1.1 0.2 1.1l-1.1 0.2c0 0-0.3-0.5-0.3-1.2 0-0.8 0.4-1.4 0.4-1.4zM7.9 12.1c-4.1 0-6.2-2.3-6.8-3.2 0.3-0.7 1.1-2.2 3.1-3.2-0.1 0.4-0.2 0.8-0.2 1.3 0 2.2 1.8 4 4 4s4-1.8 4-4c0-0.5-0.1-0.9-0.2-1.3 2 0.9 2.8 2.5 3.1 3.2-0.7 0.9-2.8 3.2-7 3.2z"></path></g><g class="wsf-password-visibility-on" style="display: none;"><path d="M12.9 5.2l-0.8 0.8c1.7 0.9 2.5 2.3 2.8 3-0.7 0.9-2.8 3.1-7 3.1-0.7 0-1.2-0.1-1.8-0.2l-0.8 0.8c0.8 0.3 1.7 0.4 2.6 0.4 5.7 0 8.1-4 8.1-4s-0.6-2.4-3.1-3.9z"></path><path d="M12 7.1c0-0.3 0-0.6-0.1-0.8l-4.8 4.7c0.3 0 0.6 0.1 0.9 0.1 2.2 0 4-1.8 4-4z"></path><path d="M15.3 0l-4.4 4.4c-0.8-0.2-1.8-0.4-2.9-0.4-6.7 0-8 5.1-8 5.1s1 1.8 3.3 3l-3.3 3.2v0.7h0.7l15.3-15.3v-0.7h-0.7zM4 11.3c-1.6-0.7-2.5-1.8-2.9-2.3 0.3-0.7 1.1-2.2 3.1-3.2-0.1 0.4-0.2 0.8-0.2 1.3 0 1.1 0.5 2.2 1.3 2.9l-1.3 1.3zM6.2 7.9l-1 0.2c0 0-0.3-0.5-0.3-1.2 0-0.8 0.4-1.5 0.4-1.5 0.5-0.3 1.3-0.3 1.3-0.3s-0.5 0.9-0.5 1.7c-0.1 0.7 0.1 1.1 0.1 1.1z"></path></g></svg></div>';break;case"summary":var J=this.get_summary_html(this.form,t);a=this.parse_variables_process(J,i,!1,t,"summary",!0).output}var H=A?this.parse_variables_process(this.get_object_meta_value(t,"prepend",""),i,!1,t,"field_prepend",o).output:"";E+=A?this.parse_variables_process(this.get_object_meta_value(t,"append",""),i,!1,t,"field_prepend",o).output:"";var Z="";if(!r){var B=[],G=this.get_object_meta_value(this.form,"class_field","",!1,!0);if(""!=G&&B.push(G),""!=(Z=this.get_object_meta_value(t,"class_field","",!1,!0))&&B.push(Z),!this.get_object_meta_value(t,"class_field_full_button_remove","")){var Q=this.get_field_value_fallback(t.type,m,"class_field_full_button","",!1,h);"object"==typeof Q&&B.push(Q.join(" "))}if(!(K=this.get_object_meta_value(t,"class_field_button_type",!1)))var K=this.get_field_value_fallback(t.type,m,"class_field_button_type_fallback",!1,!1,h);if(K){var V=this.get_field_value_fallback(t.type,m,"class_field_button_type","",!1,h);void 0!==V[K]&&B.push(V[K])}switch(t.type){case"checkbox":case"radio":switch(this.get_object_meta_value(t,t.type+"_style","")){case"button":B.push("wsf-button");break;case"button-full":B.push("wsf-button wsf-button-full");break;case"color":B.push("wsf-color");break;case"color-circle":B.push("wsf-color wsf-circle");break;case"circle":B.push("wsf-circle");break;case"image":B.push("wsf-image");break;case"image-circle":B.push("wsf-image wsf-circle");break;case"image-responsive":B.push("wsf-image wsf-responsive wsf-image-full");break;case"image-circle-responsive":B.push("wsf-image wsf-responsive wsf-image-full wsf-circle");break;case"switch":B.push("wsf-switch")}}var X=this.get_object_meta_value(t,"class_field_message_type",!1);if(X){var ee=this.get_field_value_fallback(t.type,m,"class_field_message_type","",!1,h);void 0!==ee[X]&&B.push(ee[X])}if(""!==H||""!==E){var te=this.get_field_value_fallback(t.type,m,"class_field_input_group","",!1,h);""!==te&&B.push(te)}var ae=void 0!==u.label_inside&&u.label_inside;if(ae&&"inside"===m){switch(t.type){case"textarea":var re=this.get_object_meta_value(t,"input_type_textarea",!1);v=!("tinymce"===re||"html"===re);break;case"select":case"price_select":v=!this.get_object_meta_value(t,"select2",!1);break;default:v=!0}v||(m="top")}ae||"inside"!==m||(m="top"),v&&(t.meta.placeholder=this.parse_variables_process(t.label,i,!1,t,"field_label",o).output),Z=B.join(" ")}var ie=parseInt(e.WS_Form.settings_plugin.framework_column_count,10),se=parseInt(this.get_object_meta_value(this.form,"label_column_width_form",3),10),_e=this.get_object_meta_value(t,"label_column_width","default");switch(_e){case"default":case"":_e=se;break;default:_e=parseInt(_e,10)}_e>=ie&&(_e=ie-1);var oe=ie-_e,le={id:n,form_id_prefix:this.form_id_prefix,form_id:this.form_id,form_instance_id:this.form_instance_id,field_id:t.id,name:c,label:this.parse_variables_process(t.label,i,!1,t,"field_label",o).output,value:a,required:this.get_object_meta_value(this.form,"label_required")?'<span class="wsf-required-wrapper"></span>':"",column_width_label:_e,column_width_field:oe,max_upload_size:ws_form_settings.max_upload_size,locale:ws_form_settings.locale,currency:e.WS_Form.settings_plugin.currency};switch(t.type){case"datetime":"on"==e.WS_Form.settings_plugin.ui_datepicker||"native"==e.WS_Form.settings_plugin.ui_datepicker&&!this.native_date?(le.datetime_type="text",v&&b.push("placeholder")):le.datetime_type=this.get_object_meta_value(t,"input_type_datetime","date");break;case"color":"on"==e.WS_Form.settings_plugin.ui_color||"native"==e.WS_Form.settings_plugin.ui_color&&!this.native_color?le.color_type="text":le.color_type="color";break;case"file":switch(h){case"dropzonejs":var ne=this.get_object_meta_value(t,"placeholder","",!1,!0);""==ne&&(ne=this.language("dropzonejs_default_message")),le.placeholder=ne}}var ce=this.get_field_value_fallback(t.type,m,"meta_key_parse_variables",[],!1,h);for(var de in ce)if(ce.hasOwnProperty(de)){var pe=ce[de],ue=!1!==(vt=void 0!==e.WS_Form.meta_keys[pe]&&e.WS_Form.meta_keys[pe])?void 0===vt.d?"":vt.d:"",fe=this.get_object_meta_value(t,pe,ue);"object"==typeof fe&&(fe=JSON.stringify(fe)),fe=this.replace_all(fe,"'","&#39;"),le[pe]=fe}var he=e.extend(!0,{},le);he.label_id=this.get_part_id(t.id,i,"label");var me=this.get_part_id(t.id,i,"help"),ve=""!==(ge=r?"":this.get_object_meta_value(t,"help","",!1,!1)),be={value:0,character_count:0,character_count_label:"",character_remaining:0,character_remaining_label:"",character_min:0,character_min_label:"",character_max:0,character_max_label:"",word_count:0,word_count_label:"",word_remaining:0,word_remaining_label:"",word_min:0,word_min_label:"",word_max:0,word_max_label:""};ge=this.mask_parse(ge,be);var ge=this.parse_variables_process(ge,i,!1,t,"field_help",o).output;if(r)switch(t.type){case"range":ge="#value"}var ye=this.get_help_position(t),we=this.get_field_value_fallback(t.type,m,"class_help_"+("bottom"==ye?"post":"pre"),[],!1,h);be.id=n,be.help_id=me,be.help_class=we.join(" "),be.help=ge,le.help_class=we.join(" ");var ke=!r&&this.get_object_meta_value(t,"invalid_feedback_render",!1,!1,!0),xe=!1;if(ke){var je=e.extend(!0,{},le),Se=this.form_id_prefix+"invalid-feedback-"+t.id+l,Fe=this.get_field_value_fallback(t.type,m,"class_invalid_feedback",[],!1,h),We=(xe=this.get_field_value_fallback(t.type,m,"invalid_feedback_last_row",!1,!1,h),this.get_object_meta_value(t,"invalid_feedback","",!1,!0));""==We&&(We=this.get_form_invalid_feedback_mask()),We=this.get_invalid_feedback_mask_parsed(We,t.label),je.invalid_feedback_id=Se,je.invalid_feedback_class=Fe.join(" "),je.invalid_feedback=We,je.attributes="";var Oe=this.mask_parse(O,je)}else Se=!1,Oe="";if(le.invalid_feedback=Oe,he.invalid_feedback=Oe,le.attributes="",r)b=d.filter(function(e){return-1!=b.indexOf(e)});if(b.length>0){var Me=this.get_attributes(t,b,!1,i);le.attributes+=" "+Me.attributes,b=Me.mask_attributes,s=Me.attribute_values}!1!==i&&(le.attributes+=' data-repeatable-index="'+this.esc_attr(i)+'"');var Pe="",Ie=!1,Ne=!1;switch(t.type){case"select":case"price_select":case"checkbox":case"price_checkbox":case"radio":case"price_radio":if(Ie=this.get_object_meta_value(t,t.type+"_cascade",!1)){Ne=parseInt(this.get_object_meta_value(t,t.type+"_cascade_field_filter",!1),10);var ze=parseInt(this.get_object_meta_value(t,t.type+"_cascade_field_id",!1),10);if(ze>0){var De=' data-cascade-field-id="'+this.esc_attr(ze)+'"';switch(t.type){case"select":case"price_select":le.attributes+=De;break;case"checkbox":case"price_checkbox":case"radio":case"price_radio":Pe=De}}}var Ce=this.get_object_meta_value(t,"select2_ajax",!1);(Ie||Ce)&&a&&("object"!=typeof a&&(a=[a]),le.attributes+=' data-wsf-populate="'+this.esc_attr(JSON.stringify(a))+'"')}le.attributes=this.custom_attributes(le.attributes,t,"field",i);var qe=this.get_object_meta_value(t,"orientation",!1);if("grid"==qe)var Te=this.get_field_value_fallback(t.type,m,"class_orientation_wrapper",[],!1,h),$e=this.get_field_value_fallback(t.type,m,"class_orientation_row",[],!1,h),Ae=Te.join(" "),Ee=this.column_class_array(t,"orientation_breakpoint"),Ye=(Ee=$e.concat(Ee)).join(" ");he.attributes="";var Le=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_field_label_attributes",[],!1,h));if(r)Le=p.filter(function(e){return-1!=Le.indexOf(e)});if(Le.length>0){Me=this.get_attributes(t,Le,!1,i);he.attributes+=Me.attributes,Le=Me.mask_attributes}var Ue="",Re=this.get_object_value(u,"data_source",!1),Je=0,He=!1!==Re;if(He){if(void 0===Re.type)He=!1;else var Ze=Re.type;if(void 0===Re.id)He=!1;else var Be=Re.id}if(He){switch(Ze){case"data_grid":var Ge=this.get_object_meta_value(t,Be,!1)}if(!1===Ge&&(He=!1),void 0===Ge.columns)He=!1;else var Qe=Ge.columns}if(He){var Ke=this.get_field_value_fallback(t.type,m,"mask_group","",!1,h),Ve=this.get_field_value_fallback(t.type,m,"mask_group_wrapper","",!1,h),Xe=this.get_field_value_fallback(t.type,m,"mask_group_label","",!1,h),et=this.get_field_value_fallback(t.type,m,"mask_group_always",!1,!1,h),tt=this.get_field_value_fallback(t.type,m,"mask_row","",!1,h),at=this.get_field_value_fallback(t.type,m,"mask_row_placeholder","",!1,h),rt=this.get_field_value_fallback(t.type,m,"mask_row_field","",!1,h),it=this.get_field_value_fallback(t.type,m,"mask_row_label","",!1,h),st=this.get_field_value_fallback(t.type,m,"mask_row_lookups",[],!1,h),_t=this.get_field_value_fallback(t.type,m,"datagrid_column_value",!1,!1,h),ot=this.get_field_value_fallback(t.type,m,"mask_row_default","",!1,h),lt=this.get_field_value_fallback(t.type,m,"mask_row_required"," required data-required",!1,h),nt=this.get_field_value_fallback(t.type,m,"mask_row_disabled"," disabled",!1,h),ct=(this.get_field_value_fallback(t.type,m,"mask_row_visible"," visible",!1,h),this.get_object_meta_value(t,"data_grid_rows_randomize","",!1,!0));if(ct)this.get_object_meta_value(t,"data_source_term_hierarchy","",!1,!0)&&(ct=!1);var dt=this.get_object_meta_value(t,"placeholder_row","",!1,!0),pt=this.get_object_meta_value(t,"multiple","",!1,!0);if(""!=dt&&!pt){var ut=e.extend(!0,{},le);ut.value=dt,Ue+=this.mask_parse(at,ut)}_&&"object"!=typeof a&&("string"!=typeof a&&(a=a.toString()),a=[a]);var ft=_&&void 0!==a.indexOf,ht=[];for(var mt in st)if(st.hasOwnProperty(mt)){if(ht[zt=st[mt]]=!1,!1===(Yt=this.get_object_meta_value(t,zt,!1,!1,!0))){if(void 0===e.WS_Form.meta_keys[zt])continue;var vt;(Yt=void 0!==(vt=e.WS_Form.meta_keys[zt]).d?vt.d:0)>Qe.length&&(Yt=0)}var bt=!1;for(var gt in Qe){if(Qe.hasOwnProperty(gt))if(Qe[gt].id==Yt){bt=gt;break}}bt&&(ht[zt]=bt)}var yt=!1;if(!1!==Ne){bt=!1;for(var gt in Qe){if(Qe.hasOwnProperty(gt))if(Qe[gt].id==Ne){yt=gt;break}}}if(void 0===Ge.groups)return this.error("error_data_source_groups"),"";var wt=Ge.groups;Object.keys(wt).length;for(var kt in ct&&(wt=this.array_randomize(wt)),wt)if(wt.hasOwnProperty(kt)){var xt=e.extend(!0,{},le);xt.group_id=this.form_id_prefix+"datagrid-"+t.id+"-group-"+kt+l;var jt=wt[kt];if(null!=jt&&"object"==typeof jt){if(void 0===jt.label)return this.error("error_data_group_label"),"";switch(t.type){case"select":case"price_select":var St=!0;break;default:St=void 0===jt.label_render||jt.label_render}if(St){var Ft=e.extend(!0,{},le);Ft.group_label=jt.label,Ft.label_row_id=this.form_id_prefix+"label-"+t.id+"-group-"+kt+l,xt.group_label=this.parse_variables_process(this.mask_parse(Xe,Ft),i).output}else xt.group_label="";xt.disabled=void 0!==jt.disabled&&"on"==jt.disabled?" disabled":"";var Wt=void 0!==jt.mask_group&&"on"==jt.mask_group||et;Wt&&j&&(x="");var Ot="";if(void 0!==jt.rows){var Mt=JSON.parse(JSON.stringify(jt.rows)),Pt=this.get_object_meta_value(t,"select_all","");if(("checkbox"==t.type||"price_checkbox"==t.type)&&"on"==Pt){var It=!1,Nt=!1;for(var zt in ht)if(ht.hasOwnProperty(zt)){var Dt=ht[zt];"checkbox_field_value"==zt&&(It=Dt),"checkbox_field_label"==zt&&(Nt=Dt),"checkbox_price_field_value"==zt&&(It=Dt),"checkbox_price_field_label"==zt&&(Nt=Dt)}Pt={id:0,default:"",required:"",hidden:"",disabled:"",select_all:!0,data:[]};var Ct=this.get_object_meta_value(t,"select_all_label","");""==Ct&&(Ct=this.language("select_all_label")),Pt.data[It]=Ct,Pt.data[Nt]=Ct,Mt.unshift(Pt)}for(var qt in ct&&(Mt=this.array_randomize(Mt)),Mt)if(Mt.hasOwnProperty(qt)){var Tt=Mt[qt];if(null!==Tt&&"object"==typeof Tt&&"object"==typeof Tt.data){var $t=!1;if(!1!==yt)$t=void 0!==Tt.data[yt]&&Tt.data[yt];var At=!xe||qt==Mt.length-1,Et=e.extend(!0,{},le);for(var zt in Et.data_grid_row_value="",Et.data_grid_row_action_variable="",Et.data_grid_row_label="",Et.data_grid_row_price="",Et.data_grid_row_price_currency="",Et.data_grid_row_woocommerce_cart="",ht){if(ht.hasOwnProperty(zt))if(Et[zt]="",!1!==(bt=ht[zt])&&void 0!==Tt.data[bt]){var Yt;switch(null===(Yt=Tt.data[bt])&&(Yt=""),Yt=this.parse_variables_process(Yt.toString(),i,!1,t,"data_grid_row",o).output,Et[zt+"_html"]=this.esc_html(Yt),t.type){case"range":case"price_range":var Lt=this.get_object_meta_value(t,"min",0);(""==Lt||isNaN(Lt))&&(Lt=0);var Ut=this.get_object_meta_value(t,"max",100);(""==Ut||isNaN(Ut))&&(Ut=100);var Rt=this.get_number(Yt,!0),Jt=parseFloat(Ut)-parseFloat(Lt),Ht=Jt>0?(Rt-Lt)/Jt*100:0;Et[zt+"_percentage"]=Ht,-1!==zt.indexOf("_field_percentage")&&(Et.data_grid_row_value_percentage=Ht)}Et[zt+"_compare"]=this.esc_html(Yt);var Zt=!1;if(void 0!==e.WS_Form.meta_keys[zt]){var Bt=e.WS_Form.meta_keys[zt];void 0!==Bt.h&&Bt.h&&(Yt=this.esc_html(Yt));Zt=void 0!==Bt.pr&&Bt.pr}if(Zt){var Gt=this.get_number(Yt),Qt=zt+"_currency",Kt=this.get_price(Gt);Et[Qt]=Kt,Et[zt]=Gt,-1!==zt.indexOf("_price_field_price")&&(Et.data_grid_row_price=Gt),-1!==Qt.indexOf("_price_field_price_currency")&&(Et.data_grid_row_price_currency=Kt)}else Et[zt]=Yt;-1!==zt.indexOf("_field_value")&&(Et.data_grid_row_value=Yt),-1!==zt.indexOf("_field_parse_variable")&&(Et.data_grid_row_action_variable=Yt),-1!==zt.indexOf("_field_label")&&(Et.data_grid_row_label=Yt),-1!==zt.indexOf("_field_wc")&&(Et.data_grid_row_woocommerce_cart=Yt)}}void 0!==u.mask_row_value&&(Et.row_value=this.mask_parse(u.mask_row_value,Et),Et.row_value.indexOf("#")>-1&&(Et.row_value=this.mask_parse(Et.row_value,Et))),void 0!==u.mask_row_price&&(Et.row_price=this.mask_parse(u.mask_row_price,Et)),Tt.select_all?Et.row_id=this.form_id_prefix+"field-"+t.id+"-group-"+kt+"-row-"+Tt.id+l:Et.row_id=this.form_id_prefix+"field-"+t.id+"-row-"+Tt.id+l,Et.data_id=Tt.id;var Vt=e.extend(!0,{},Et),Xt=e.extend(!0,{},Et);Xt.label_id=this.form_id_prefix+"label-"+t.id+l,Xt.label_row_id=this.form_id_prefix+"label-"+t.id+"-row-"+Tt.id+l;var ea=[];(!_&&Tt.default||_&&!1!==_t&&ft&&a.indexOf(Et[_t+"_compare"])>-1||_&&void 0!==Et.row_value&&ft&&a.indexOf(Et.row_value)>-1)&&(ea.default=ot),Tt.disabled&&(ea.disabled=nt),Tt.required&&(ea.required=lt),ea.dedupe_value_scope=q,ea.hidden_bypass=T,ea.exclude_cart_total=$,ea.ecommerce_calculation_persist=C,Et.attributes=Pe,Xt.attributes="",Vt.attributes="";var ta=e.extend(!0,[],ea);if(!r){var aa="horizontal"==qe&&this.get_field_value_fallback(t.type,m,"class_inline",!1,!1,h);!1!==aa&&(ta.class=aa.join(" "));var ra=this.get_field_value_fallback(t.type,m,"class_row",!1,!1,h);if(!1!==ra&&(ta.class=!1!==aa?ta.class+" "+ra.join(" "):ra.join(" ")),Tt.disabled){var ia=this.get_field_value_fallback(t.type,m,"class_row_disabled",!1,!1,h);!1!==ia&&(ta.class+=" "+ia.join(" "))}}var sa=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_attributes",[],!1,h));if(sa.length>0){Me=this.get_attributes(t,sa,ta,i);Et.attributes+=" "+Me.attributes}if(!1!==$t&&(Et.attributes+=' data-cascade-value="'+this.esc_attr($t)+'"'),void 0!==Tt.hidden&&Tt.hidden&&!r)switch(t.type){case"select":continue;default:Et.attributes+=' style="display: none;"'}"grid"==qe&&""!=Ye&&(Et.attributes=this.attribute_modify(Et.attributes,"class",Ye,!0));ta=e.extend(!0,[],ea);var _a=this.get_field_value_fallback(t.type,m,"class_row_field_label",!1,!1,h);!1!==_a&&(ta.class=_a.join(" "));var oa=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_label_attributes",[],!1,h));if(r)oa=p.filter(function(e){return-1!=oa.indexOf(e)});if(oa.length>0){Me=this.get_attributes(t,oa,ta,i);Xt.attributes+=" "+Me.attributes}ta=e.extend(!0,[],ea);var la=this.get_field_value_fallback(t.type,m,"class_row_field",!1,!1,h);!1!==la&&(ta.class=la.join(" ")),r||""==Z||(ta.class+=" "+Z.trim()),ta.aria_labelledby=Xt.label_row_id,(!_&&Tt.default||_&&!1!==_t&&ft&&a.indexOf(Et[_t+"_compare"])>-1)&&(ta.default=ot),Tt.disabled&&(ta.disabled=nt),Tt.required&&(ta.required=lt),ta.required_row=s.required;var na=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_field_attributes",[],!1,h));if(r)na=d.filter(function(e){return-1!=na.indexOf(e)});if(na.length>0){Me=this.get_attributes(t,na,ta,i);Vt.attributes+=" "+Me.attributes}if(""!=Vt.attributes&&(Vt.attributes=" "+Vt.attributes),void 0!==Tt.select_all&&(Vt.attributes+=" data-wsf-select-all"),void 0!==Tt.hierarchy&&""==qe&&!ct)switch(t.type){case"checkbox":case"price_checkbox":case"radio":case"price_radio":Et.attributes+=' data-wsf-hierarchy="'+this.esc_attr(Tt.hierarchy)+'"';break;case"select":case"price_select":Tt.hierarchy>0&&(Et.select_field_label="&nbsp;&nbsp;&nbsp;".repeat(Tt.hierarchy)+Et.select_field_label)}if(ke&&!xe)if(Se=this.form_id_prefix+"invalid-feedback-"+t.id+"-row-"+Tt.id+l,je.invalid_feedback_id=Se,ke)Oe=this.mask_parse(O,je);else Oe="";Vt.invalid_feedback=At?Oe:"",Xt.invalid_feedback=At?Oe:"";var ca=this.mask_parse(rt,Vt);Xt.row_field=ca,Et.row_field=ca;var da=this.mask_parse(it,Xt);Et.row_label=da,Ot+=this.mask_parse(tt,Et),Je++}}}if(""!=Ve){var pa={group:Ot};"grid"==qe&&""!=Ae&&(pa.attributes=' class="'+this.esc_attr(Ae)+'"'),Ot=this.mask_parse(Ve,pa)}!1!==Ke&&Wt?(xt.group=Ot,Ue+=this.mask_parse(Ke,xt)):Ue+=Ot}}}if(le.datalist=Je>0?Ue:"",b.length>0){ta=[];void 0!==xt&&void 0!==xt.group_id&&Je>0&&(ta.list=xt.group_id),""===this.get_object_meta_value(t,"aria_label",!1,!1,!0)&&(f&&-1!==x.indexOf("#attributes")?ta.aria_labelledby=this.form_id_prefix+"label-"+t.id+l:ta.aria_label=t.label),ve&&(ta.aria_describedby=me),!1!==(B=this.get_field_value_fallback(t.type,m,"class_field",!1,!1,h))&&(ta.class=B.join(" ")),""!=Z&&(ta.class+=" "+Z.trim()),""!=(Me=this.get_attributes(t,b,ta,i)).attributes&&(le.attributes+=" "+Me.attributes)}if(Le.length>0){ta=[];var ua=this.get_field_value_fallback(t.type,m,"class_field_label",!1,!1,h);!1!==ua&&(ta.class=ua.join(" ")),""!=(Me=this.get_attributes(t,Le,ta,i)).attributes&&(he.attributes+=" "+Me.attributes)}if(be.help_append_separator=ve?this.mask_parse(W,be):"",""!=F){be.text_clear=this.get_object_meta_value(t,"text_clear",""),""==be.text_clear&&(be.text_clear=this.language("clear")),be.text_reset=this.get_object_meta_value(t,"text_reset",""),""==be.text_reset&&(be.text_reset=this.language("reset"));var fa=this.mask_parse(F,be)}else fa="";be.help_append=fa,be.attributes="";var ha=ve||""!=fa?this.mask_parse(S,be):"";le.pre_help=he.pre_help="bottom"==ye?"":ha,le.post_help=he.post_help="bottom"==ye?ha:"",le.help=ha,he.help=ha,""!=le.attributes&&(le.attributes=" "+le.attributes.trim()),""!=he.attributes&&(he.attributes=" "+he.attributes.trim());var ma=this.mask_parse(x,he);if(""!=ma&&!g){var va=this.get_field_value_fallback(t.type,m,"mask_field_label_wrapper",!1,!1,h);if(!1!==va){var ba={label:ma};ma=this.mask_parse(va,ba)}}var ga=-1!==x.indexOf("#field");switch(m){case"inside":case"bottom":le.pre_label="",le.post_label=ga?le.label:ma;break;case"top":le.pre_label=ga?le.label:ma,le.post_label="";break;default:le.pre_label="",le.post_label="",he.pre_label="",he.post_label=""}if(""!==H||""!==E){var ya=e.extend(!0,{},le);ya.invalid_feedback=le.invalid_feedback,ya.pre_help=le.pre_help,ya.post_help=le.post_help,ya.pre_label=le.pre_label,ya.post_label=le.post_label,le.invalid_feedback="",le.pre_help="",le.post_help="",le.pre_label="",le.post_label="",ya.help=le.help,le.help=""}var wa=this.mask_parse(w,le);if(""!==H||""!==E){var ka=this.get_field_value_fallback(t.type,m,"col_small_prepend_factor",!1,!1,h),xa=this.get_field_value_fallback(t.type,m,"col_small_append_factor",!1,!1,h);if(!1!==ka&&!1!==xa){var ja=""!==H?Math.round(ie*ka,0):0;ya.col_small_prepend=ja;var Sa=""!==E?Math.round(ie*xa,0):0;ya.col_small_append=Sa,ya.col_small_field=ie-(ja+Sa)}ya.field=wa;var Fa=this.get_field_value_fallback(t.type,m,"mask_field_input_group_field","#field",!1,h);if(""!==Fa&&(wa=this.mask_parse(Fa,ya)),""!==H){ya.prepend=H;var Wa=this.get_field_value_fallback(t.type,m,"mask_field_input_group_prepend","#prepend",!1,h);if(""!==Wa)wa=this.mask_parse(Wa,ya)+wa}if(""!==E){ya.append=E;var Oa=this.get_field_value_fallback(t.type,m,"mask_field_input_group_append","#append",!1,h);if(""!==Oa)wa+=this.mask_parse(Oa,ya)}var Ma=this.get_field_value_fallback(t.type,m,"mask_field_input_group","#field",!1,h),Pa=[];""!==H&&Pa.push("wsf-input-group-has-prepend"),""!==E&&Pa.push("wsf-input-group-has-append");var Ia=Pa.join(" ");Ia&&(Ia=" "+Ia),ya.css_input_group=Ia,ya.field=wa,wa=this.mask_parse(Ma,ya)}if(ga&&(he.field=wa,ma=this.mask_parse(x,he),wa="",he.field=""),-1!==w.indexOf("#label")&&(le.label=ma,wa=this.mask_parse(w,le),ma="",le.label=""),""!=wa&&!g){var Na=this.get_field_value_fallback(t.type,m,"mask_field_wrapper",!1,!1,h);if(!1!==Na){var za={field:wa};wa=this.mask_parse(Na,za)}}switch(m){case"right":wa+=ma;break;case"left":wa=ma+wa;break;default:ga&&(wa=ma)}return le.field=wa,this.mask_parse(y,le)},e.WS_Form.prototype.attribute_modify=function(t,a,r,i){var s=this,_=!1,o="";return e("<div "+t+" />").each(function(){e.each(this.attributes,function(){if(this.specified){var e=this.name,t=this.value;e==a&&(i?t+=" "+r:t=r,t.trim(),_=!0),o+=" "+e,""!==t&&(o+='="'+s.esc_attr(t)+'"')}})}),_||(o+=" "+a,""!==r&&(o+='="'+this.esc_attr(r)+'"')),o},e.WS_Form.prototype.form_help_value=function(t){var a=this;void 0===t&&(t=this.form_canvas_obj),e('input[type="range"]:not([data-init-help-value]),meter:not([data-init-help-value])',t).each(function(){a.form_help_value_render(e(this))&&(e(this).on("change input",function(){a.form_help_value_render(e(this))}),e(this).attr("data-init-help-value",""))})},e.WS_Form.prototype.form_help_value_render=function(t){var a=t.attr("id"),r=t.closest("[data-type]"),i=r.attr("data-id"),s=r.attr("data-repeatable-index"),_=void 0!==s?"-repeat-"+s:"",o=this.field_data_cache[i],l=this.get_object_meta_value(o,"help",""),n=!1;if(void 0!==t.attr("data-fill-lower-track")){var c=parseFloat(t[0].min||"0"),d=parseFloat(t[0].max||"100"),p=parseFloat(t[0].value||c),u=d-c,f=u>0?(p-c)/u*100+"%":"0%";e("#"+a).get(0).style.setProperty("--wsf-fill-lower-track",f),n=!0}if(-1!==l.indexOf("#value")){var h={id:a,value:t.val()},m=this.mask_parse(l,h),v=(m=this.parse_variables_process(m,s,!1,o,"field_help").output,this.form_id_prefix+"help-"+i+_);e("#"+v).html(m),n=!0}return n},e.WS_Form.prototype.get_attributes=function(t,a,r,i){"object"!=typeof r&&(r=!1);var s=[],_=[];if(!1!==a)for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];if(void 0!==e.WS_Form.meta_keys[l]){var n=e.WS_Form.meta_keys[l];if(this.is_admin)var c=void 0!==n.mask?n.mask:"",d=void 0!==n.mask_disregard_on_empty&&n.mask_disregard_on_empty,p=void 0!==n.mask_disregard_on_zero&&n.mask_disregard_on_zero,u=void 0!==n.default?n.default:"";else c=void 0!==n.m?n.m:"",d=void 0!==n.e&&n.e,p=void 0!==n.z&&n.z,u=void 0!==n.d?n.d:"";if(!1!==r)if(void 0!==r[l])var f=r[l].trim();else f="";else{if(this.is_admin)var h=void 0!==n.key?n.key:l;else h=void 0!==n.k?n.k:l;var m=void 0!==n.c&&n.c;if(!1!==m){f=this.get_object_meta_value(t,h,u,!1,!1);f=this.parse_variables_process(f,i,!1,t,m).output}else f=this.get_object_meta_value(t,h,u,!1,!0);if(""==f&&void 0!==n.g){var v=n.g;void 0!==e.WS_Form.settings_plugin[v]&&e.WS_Form.settings_plugin[v]&&(f=e.WS_Form.settings_plugin[v])}_[h]=f}f=this.esc_html(f);var b=this.mask_parse(c,{value:f});(d&&""!=f||!d)&&(p&&0!=parseInt(f,10)||!p)&&(s.push(b),delete a[o])}}return a=this.array_remove_empty(a),{attributes:s.join(" "),mask_attributes:a,attribute_values:_}},e.WS_Form.prototype.get_number=function(t,a,r,i){if(void 0===a&&(a=0),void 0===r&&(r=!0),void 0===i&&(i=!1),"number"==typeof t&&(t=t.toString()),"string"!=typeof t)return 0;(t=t.trim()).includes(ws_form_settings.currency_symbol)&&(r=!0);var s=e.WS_Form.settings_plugin.price_decimal_separator;if(r){var _=e.WS_Form.settings_plugin.price_thousand_separator,o=ws_form_settings.currency_symbol;t.includes("&")&&(t=this.parse_html_entities(t)),t=t.replace(o,"");var l=new RegExp("[^0-9-"+s+"]","g");if(t=t.replace(l,""),""!==s&&""!==_&&s===_){if(t.slice(-3,-2)===s){var n=t.length-3;t=t.substring(0,n)+"[dec]"+t.substring(n+1)}t=(t=t.replace(_,"")).replace("[dec]",".")}else""!==s&&(t=t.replace(s,"."))}else""!==s&&(t=t.replace(s,"."));var c=""===t.trim()?a:isNaN(t)?a:parseFloat(t);return!1!==i&&(c=this.get_number_rounded(parseFloat(c),i)),c},e.WS_Form.prototype.get_number_rounded=function(e,t){return Number(Math.round(e+"e"+t)+"e-"+t)},e.WS_Form.prototype.get_number_to_step=function(e,t){if(isNaN(t))return e;t||(t=1);var a=1/t;return Math.round(e*a)/a},e.WS_Form.prototype.get_float=function(e,t){return void 0===t&&(t=0),"number"==typeof e&&(e=e.toString()),"string"!=typeof e?0:(e=e.trim(),parseFloat(e))},e.WS_Form.prototype.get_currency=function(){var t={},a=parseInt(e.WS_Form.settings_plugin.price_decimals,10);switch(t.prefix=ws_form_settings.currency_symbol,t.suffix="",e.WS_Form.settings_plugin.currency_position){case"right":t.prefix="",t.suffix=ws_form_settings.currency_symbol;break;case"left_space":t.prefix=ws_form_settings.currency_symbol+" ";break;case"right_space":t.prefix="",t.suffix=" "+ws_form_settings.currency_symbol}return t.decimals=a<0?0:a,t.decimal_separator=e.WS_Form.settings_plugin.price_decimal_separator||".",t.thousand_separator=e.WS_Form.settings_plugin.price_thousand_separator,t},e.WS_Form.prototype.get_price=function(e,t,a){return"number"!=typeof e&&(e=parseFloat(e)),void 0===t&&(t=this.get_currency()),void 0===a&&(a=!0),(a?t.prefix:"")+this.replace_all(this.replace_all(e.toFixed(t.decimals).replace(/\B(?=(\d{3})+(?!\d))/g,"[thousand]"),".",t.decimal_separator),"[thousand]",t.thousand_separator)+(a?t.suffix:"")},e.WS_Form.prototype.get_slug=function(e){return(e=this.parse_html_entities(e.toString())).toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")},e.WS_Form.prototype.parse_html_entities=function(e){var t={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",euro:"€",cent:"¢",pound:"£",yen:"¥",hellip:"…"};return e=(e=e.replace(/&#([0-9]{1,5});/g,function(e,t){var a=parseInt(t,10);return String.fromCharCode(a)})).replace(/&([a-z]+);/gi,function(e,a){return t[a.toLowerCase()]||"&"+a+";"})},e.WS_Form.prototype.form_add_hidden_input=function(t,a,r,i,s,_){var o=e('input[name="'+this.esc_selector(t)+'"]',this.form_canvas_obj);o.length&&-1===t.indexOf("[]")?o.val(a):(void 0===a&&(a=""),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===_&&(_="hidden"),this.form_canvas_obj.append('<input type="'+this.esc_attr(_)+'" name="'+this.esc_attr(t)+'" value='+(s?"'":'"')+this.esc_attr(a)+(s?"'":'"')+(!1!==r?' id="'+this.esc_attr(r)+'"':"")+(!1!==i?" "+i:"")+" />"))},e.WS_Form.prototype.get_part_id=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a="field");var r=!1!==t?"-repeat-"+t:"";return this.form_id_prefix+a+"-"+e+r},e.WS_Form.prototype.get_field_name=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a=!1);return this.field_name_prefix+e+(!1!==t?a?"_"+t:"["+t+"]":"")},e.WS_Form.prototype.is_iterable=function(e){return null!=e&&("object"==typeof e&&"function"==typeof e[Symbol.iterator])},e.WS_Form.prototype.is_integer=function(e){return!isNaN(e)&&/^\d+\.?\d*$/.test(e)},e.WS_Form.prototype.is_invalid=function(e){return!e[0]||!e[0].validity||!e[0].validity.valid},e.WS_Form.prototype.is_valid=function(e){return!(!e[0]||!e[0].validity)&&e[0].validity.valid},e.WS_Form.prototype.is_not_number=function(e){return isNaN(e)||"boolean"==typeof e||""===e},e.WS_Form.prototype.is_true=function(e){if("boolean"==typeof e)return e;if("object"==typeof e&&null!==e&&(e=Array.isArray(e)?void 0!==e[0]?e[0]:"":Object.values(e)[0]||""),"number"==typeof e&&(e=String(e)),"string"!=typeof e)return!1;e=e.trim().toLowerCase();return["1","on","yes","true"].includes(e)},e.WS_Form.prototype.replace_all=function(e,t,a){return void 0===a?e.toString():e.split(t).join(a)},e.WS_Form.prototype.array_remove_empty=function(e){if("object"!=typeof e)return e;var t=[];for(var a in e)e.hasOwnProperty(a)&&null!==e[a]&&t.push(e[a]);return t},e.WS_Form.prototype.attribute_add_item=function(e,t,a){var r=e.attr(t);void 0!==r?-1===r.indexOf(a)&&e.attr(t,this.esc_attr(a)+(r?" ":"")+r):e.attr(t,this.esc_attr(a))},e.WS_Form.prototype.attribute_remove_item=function(e,t,a){var r=e.attr(t);if(void 0!==r&&-1!==r.indexOf(a)){var i=r.split(" "),s=this;(r=(i=i.filter(function(e){return e!==s.esc_attr(a)})).join(" "))?e.attr(t,r):e.removeAttr(t)}},e.WS_Form.prototype.get_date=function(e,t,a,r){switch(t||(t="date"),a||(a=ws_form_settings.date_format),r||(r=ws_form_settings.time_format),t){case"time":return new Date("01/01/1970 "+e);case"date":e+=" 00:00:00";break;case"week":case"month":return!1}var i=!1;switch(a){case"d/m/Y":i="/";break;case"d.m.Y":case"j.n.Y":i=".";break;case"d-m-Y":i="-"}if(!1!==i){switch(t){case"datetime-local":var s=e.indexOf(" "),_=e.substring(0,s),o=e.substring(s);break;default:_=e,o=""}var l=_.split(i);if(3===l.length){var n=parseInt(l[0],10);_=parseInt(l[1],10)+"/"+n+"/"+parseInt(l[2],10)}e=_+o}return e=e.replace(/(\d+)(st|nd|rd|th)/g,"$1"),e=this.replace_all(e,"."," "),-1!==r.indexOf(" \\h ")&&(e=e.replace(/\b(\d{1,2})\s*h\s*(\d{1,2})\b/gi,"$1:$2")),e=this.replace_all(e,"  "," "),this.get_new_date(e)},e.WS_Form.prototype.get_new_date=function(e){return"-"!=e.charAt(4)||"-"!=e.charAt(7)||"T"==e.charAt(10)||":"!=e.charAt(13)||this.date_valid(e)||(e=e.replace(/-/g,"/")),"-"!=e.charAt(4)||this.date_valid(e)||-1===e.toLowerCase().indexOf("am")&&-1===e.toLowerCase().indexOf("pm")||(e=e.replace(/-/g,"/")),new Date(e)},e.WS_Form.prototype.date_valid=function(e){return e instanceof Date&&!isNaN(e.valueOf())},e.WS_Form.prototype.get_object_row_id=function(e){var t=e.object_row_id;return void 0!==t&&""!=t&&("object"==typeof t?(t=t.map(function(e){return parseInt(e,10)})).length||(t=!1):t=""!==t&&[parseInt(t,10)],t)},e.WS_Form.prototype.get_date_by_type=function(e,t){if(!e)return"";var a=this.get_object_meta_value(t,"format_date",ws_form_settings.date_format);a||(a=ws_form_settings.date_format);var r=this.get_object_meta_value(t,"format_time",ws_form_settings.time_format);r||(r=ws_form_settings.time_format);var i=this.get_object_meta_value(t,"input_type_datetime","date");switch(i){case"datetime-local":case"date":switch(a){case"d/m/Y":var s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s[0].split("/"))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"");break;case"d-m-Y":s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s.split("-"))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"");break;case"d.m.Y":case"j.n.Y":var _;s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s[0].split("."))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"")}}switch("time"!==i&&4===e.indexOf("-")&&-1===e.indexOf(":")&&(e+=" 00:00:00"),i){case"date":return e=this.get_new_date(e),this.date_format(e,a);case"month":return e=this.get_new_date(e),this.date_format(e,"F Y");case"time":return e=this.get_new_date("1970-01-01 "+e),this.date_format(e,r);case"week":return e=this.get_new_date(e),this.language("week")+" "+this.date_format(e,"W, Y");default:return e=this.get_new_date(e),this.date_format(e,a+" "+r)}},e.WS_Form.prototype.number_format=function(e,t,a,r){if(void 0===e||null==e||!isFinite(e))return 0;if(!t){var i=e.toString().split(".").length;t=i>1?i:0}void 0===a&&(a="."),void 0===r&&(r=","),(t<0||t>100)&&(t=0);var s=(e=(e=parseFloat(e).toFixed(t)).replace(".",a)).split(a);return s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r),e=s.join(a)},e.WS_Form.prototype.get_full_name_components=function(t){if("string"!=typeof t)return{name_prefix:"",first_name:"",name_middle:"",name_last:"",suffix:""};var a=t.trim().split(/\s+/),r="",i="",s="",_="",o="",l=e.WS_Form.settings_form.name.prefixes;"object"!=typeof l&&(l=[]),a.length&&l.includes(a[0].toLowerCase().replace(/\./g,""))&&(r=a.shift());var n=e.WS_Form.settings_form.name.suffixes;return"object"!=typeof n&&(l=[]),a.length>1&&n.includes(a[a.length-1].toLowerCase().replace(/\./g,""))&&(i=a.pop()),1===a.length?s=a[0]:2===a.length?(s=a[0],o=a[1]):a.length>2&&(s=a[0],o=a[a.length-1],_=a.slice(1,-1).join(" ")),{name_prefix:r,name_first:s,name_middle:_,name_last:o,name_suffix:i}},e.WS_Form.prototype.date_format=function(e,t){var a=this,r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={d:function(){var e=this.getDate();return(e<10?"0":"")+e},D:function(){return s[this.getDay()]},j:function(){return this.getDate()},l:function(){return _[this.getDay()]},N:function(){var e=this.getDay();return 0===e?7:e},S:function(){var e=this.getDate();return e%10==1&&11!==e?"st":e%10==2&&12!==e?"nd":e%10==3&&13!==e?"rd":"th"},w:function(){return this.getDay()},z:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)},W:function(){var e=new Date(this.valueOf()),t=(this.getDay()+6)%7;e.setDate(e.getDate()-t+3);var a=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);var r=1+Math.ceil((a-e)/6048e5);return r<10?"0"+r:r},F:function(){return i[this.getMonth()]},m:function(){var e=this.getMonth();return(e<9?"0":"")+(e+1)},M:function(){return r[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var e=this.getFullYear(),t=this.getMonth()+1;return 12===t&&(e=e++,t=0),new Date(e,t,0).getDate()},L:function(){var e=this.getFullYear();return e%400==0||e%100!=0&&e%4==0},o:function(){var e=new Date(this.valueOf());return e.setDate(e.getDate()-(this.getDay()+6)%7+3),e.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).slice(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(1e3*((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){var e=this.getHours();return((e%12||12)<10?"0":"")+(e%12||12)},H:function(){var e=this.getHours();return(e<10?"0":"")+e},i:function(){var e=this.getMinutes();return(e<10?"0":"")+e},s:function(){var e=this.getSeconds();return(e<10?"0":"")+e},v:function(){var e=this.getMilliseconds();return(e<10?"00":e<100?"0":"")+e},e:function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},I:function(){for(var e=null,t=0;t<12;++t){var a=new Date(this.getFullYear(),t,1).getTimezoneOffset();if(null===e)e=a;else{if(a<e){e=a;break}if(a>e)break}}return this.getTimezoneOffset()===e|0},O:function(){var e=this.getTimezoneOffset();return(-e<0?"-":"+")+(Math.abs(e/60)<10?"0":"")+Math.floor(Math.abs(e/60))+(0===Math.abs(e%60)?"00":(Math.abs(e%60)<10?"0":"")+Math.abs(e%60))},P:function(){var e=this.getTimezoneOffset();return(-e<0?"-":"+")+(Math.abs(e/60)<10?"0":"")+Math.floor(Math.abs(e/60))+":"+(0===Math.abs(e%60)?"00":(Math.abs(e%60)<10?"0":"")+Math.abs(e%60))},T:function(){var e=this.toLocaleTimeString(navigator.language,{timeZoneName:"short"}).split(" ");return e[e.length-1]},Z:function(){return 60*-this.getTimezoneOffset()},c:function(){return a.date_format(e,"Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return Math.floor(this.getTime()/1e3)}};return t.replace(/(\\?)(.)/g,function(t,a,r){return""===a&&o[r]?o[r].call(e):r})}}(jQuery);