Current Path : /var/www/html/soar-backup/wp-content/plugins/gravityforms/js/ |
Current File : /var/www/html/soar-backup/wp-content/plugins/gravityforms/js/form_admin.min.js |
function FormatCurrency(a){if(gf_vars.gf_currency_config){var b=new Currency(gf_vars.gf_currency_config),c=b.toMoney(jQuery(a).val());jQuery(a).val(c)}}function ToggleConditionalLogic(a,b){var c=a?"":"slow";if(jQuery("#"+b+"_conditional_logic").is(":checked")){CreateConditionalLogic(b,GetConditionalObject(b)),SetConditionalProperty(b,"actionType",jQuery("#"+b+"_action_type").val()),SetConditionalProperty(b,"logicType",jQuery("#"+b+"_logic_type").val()),SetRule(b,0),jQuery("#"+b+"_conditional_logic_container").show(c)}else jQuery("#"+b+"_conditional_logic_container").hide(c)}function GetConditionalObject(a){var b=!1;switch(a){case"page":case"field":b=GetSelectedField();break;case"next_button":b=GetSelectedField().nextButton;break;case"confirmation":b=confirmation;break;case"notification":b=current_notification;break;default:b="undefined"!=typeof form&&form.button}return b=gform.applyFilters("gform_conditional_object",b,a)}function CreateConditionalLogic(a,b){b.conditionalLogic||(b.conditionalLogic=new ConditionalLogic);var c,d="hide"==b.conditionalLogic.actionType?"selected='selected'":"",e="show"==b.conditionalLogic.actionType?"selected='selected'":"",f="all"==b.conditionalLogic.logicType?"selected='selected'":"",g="any"==b.conditionalLogic.logicType?"selected='selected'":"";c="section"==b.type?gf_vars.thisSectionIf:"field"==a?gf_vars.thisFieldIf:"page"==a?gf_vars.thisPage:"confirmation"==a?gf_vars.thisConfirmation:"notification"==a?gf_vars.thisNotification:gf_vars.thisFormButton;var h={};h.actionType="<select id='"+a+"_action_type' onchange='SetConditionalProperty(\""+a+"\", \"actionType\", jQuery(this).val());'><option value='show' "+e+">"+gf_vars.show+"</option><option value='hide' "+d+">"+gf_vars.hide+"</option></select>",h.objectDescription=c,h.logicType="<select id='"+a+"_logic_type' onchange='SetConditionalProperty(\""+a+"\", \"logicType\", jQuery(this).val());'><option value='all' "+f+">"+gf_vars.all+"</option><option value='any' "+g+">"+gf_vars.any+"</option></select>",h.ofTheFollowingMatch=gf_vars.ofTheFollowingMatch;var i=makeArray(h),j=i.join(" ");j=gform.applyFilters("gform_conditional_logic_description",j,h,a,b);var k,l;for(k=0;k<b.conditionalLogic.rules.length;k++)l=b.conditionalLogic.rules[k],j+="<div width='100%' class='gf_conditional_logic_rules_container'>",j+=GetRuleFields(a,k,l.fieldId),j+=GetRuleOperators(a,k,l.fieldId,l.operator),j+=GetRuleValues(a,k,l.fieldId,l.value),j+="<a class='add_field_choice' title='add another rule' onclick=\"InsertRule('"+a+"', "+(k+1)+');" onkeypress="InsertRule(\''+a+"', "+(k+1)+");\" ><i class='gficon-add'></i></a>",b.conditionalLogic.rules.length>1&&(j+="<a class='delete_field_choice' title='remove this rule' onclick=\"DeleteRule('"+a+"', "+k+');" onkeypress="DeleteRule(\''+a+"', "+k+");\" ><i class='gficon-subtract'></i></a></li>"),j+="</div>";jQuery("#"+a+"_conditional_logic_container").html(j),Placeholders.enable()}function GetRuleOperators(a,b,c,d){var e,f,g,h;return f={is:"is",isnot:"isNot",">":"greaterThan","<":"lessThan",contains:"contains",starts_with:"startsWith",ends_with:"endsWith"},e="<select id='"+a+"_rule_operator_"+b+"' class='gfield_rule_select' onchange='SetRuleProperty(\""+a+'", '+b+', "operator", jQuery(this).val());var valueSelector="#'+a+"_rule_value_"+b+'"; jQuery(valueSelector).replaceWith(GetRuleValues("'+a+'", '+b+',"'+c+'", ""));jQuery(valueSelector).change();\'>',g=IsEntryMeta(c)?GetOperatorsForMeta(f,c):f,g=gform.applyFilters("gform_conditional_logic_operators",g,a,c),jQuery.each(g,function(a,b){h=d==a?"selected='selected'":"",e+="<option value='"+a+"' "+h+">"+gf_vars[b]+"</option>"}),e+="</select>"}function GetOperatorsForMeta(a,b){var c={};return entry_meta[b]&&entry_meta[b].filter&&entry_meta[b].filter.operators?jQuery.each(a,function(a,d){jQuery.inArray(a,entry_meta[b].filter.operators)>=0&&(c[a]=d)}):c=a,c}function GetRuleFields(a,b,c){for(var d="<select id='"+a+"_rule_field_"+b+"' class='gfield_rule_select' onchange='jQuery(\"#"+a+"_rule_operator_"+b+'").replaceWith(GetRuleOperators("'+a+'", '+b+', jQuery(this).val()));jQuery("#'+a+"_rule_value_"+b+'").replaceWith(GetRuleValues("'+a+'", '+b+', jQuery(this).val())); SetRule("'+a+'", '+b+"); '>",e=[],f=0;f<form.fields.length;f++){var g=form.fields[f];if(IsConditionalLogicField(g))if(g.inputs&&-1==jQuery.inArray(GetInputType(g),["checkbox","email"]))for(var h=0;h<g.inputs.length;h++){var i=g.inputs[h];i.isHidden||e.push({label:GetLabel(g,i.id),value:i.id})}else e.push({label:GetLabel(g),value:g.id})}return jQuery.merge(e,GetEntryMetaFields(c)),e=gform.applyFilters("gform_conditional_logic_fields",e,form,c),d+=GetRuleFieldsOptions(e,c),d+="</select>"}function GetRuleFieldsOptions(a,b){for(var c="",d=0;d<a.length;d++){var e=a[d];if(void 0!==e.options)c+='<optgroup label=" '+e.label+'">',c+=GetRuleFieldsOptions(e.options,b),c+="</optgroup>";else{var f=e.value==b?"selected='selected'":"";c+="<option value='"+e.value+"' "+f+">"+e.label+"</option>"}}return c}function GetEntryMetaFields(a){var b=[];return"undefined"==typeof entry_meta?b:(jQuery.each(entry_meta,function(c,d){void 0!==d.filter&&b.push({label:d.label,value:c,isSelected:a==c?"selected='selected'":""})}),b)}function IsConditionalLogicField(a){var b=a.inputType?a.inputType:a.type,c=GetConditionalLogicFields(),d=jQuery.inArray(b,c),e=d>=0;return e=gform.applyFilters("gform_is_conditional_logic_field",e,a)}function IsEntryMeta(a){return"undefined"!=typeof entry_meta&&void 0!==entry_meta[a]}function GetRuleValues(a,b,c,d,e){e||(e=!1);var f=0==e?a+"_rule_value_"+b:e;if(0==c&&(c=GetFirstRuleField()),0==c)return"";var g=GetFieldById(c),h=IsEntryMeta(c),i=GetConditionalObject(a),j=i.conditionalLogic.rules[b],k=j.operator,l="";if(g&&"post_category"==g.type&&g.displayAllCategories){var m=jQuery("#"+f+".gfield_category_dropdown");if(m.length>0){var n=m.html();n=n.replace(/ selected="selected"/g,""),n=n.replace('value="'+d+'"','value="'+d+'" selected="selected"'),l="<select id='"+f+"' class='gfield_rule_select gfield_rule_value_dropdown gfield_category_dropdown'>"+n+"</select>"}else{var o=0==e?"gfield_ajax_placeholder_"+b:e+"_placeholder";jQuery.post(ajaxurl,{action:"gf_get_post_categories",objectType:a,ruleIndex:b,inputName:e,selectedValue:d},function(c){c&&(jQuery("#"+o).replaceWith(c.trim()),SetRuleProperty(a,b,"value",jQuery("#"+f).val()))}),l="<select id='"+o+"' class='gfield_rule_select'><option>"+gf_vars.loading+"</option></select>"}}else if(g&&g.choices&&jQuery.inArray(k,["is","isnot"])>-1){var p=g.placeholder?[{text:g.placeholder,value:""}].concat(g.choices):g.choices;l=GetRuleValuesDropDown(p,a,b,d,e)}else IsAddressSelect(c,g)?(jQuery.post(ajaxurl,{action:"gf_get_address_rule_values_select",address_type:g.addressType?g.addressType:gf_vars.defaultAddressType,value:d,id:f,form_id:g.formId},function(c){c&&($select=jQuery(c.trim()),$placeholder=jQuery("#"+f),$placeholder.replaceWith($select),SetRuleProperty(a,b,"value",$select.val()))}),l="<select id='"+f+"' class='gfield_rule_select'><option>"+gf_vars.loading+"</option></select>"):h&&entry_meta&&entry_meta[c]&&entry_meta[c].filter&&void 0!==entry_meta[c].filter.choices?l=GetRuleValuesDropDown(entry_meta[c].filter.choices,a,b,d,e):(d=d?d.replace(/'/g,"'"):"",l="<input type='text' placeholder='"+gf_vars.enterValue+"' class='gfield_rule_select gfield_rule_input' id='"+f+"' name='"+f+"' value='"+d.replace(/'/g,"'")+"' onchange='SetRuleProperty(\""+a+'", '+b+', "value", jQuery(this).val());\' onkeyup=\'SetRuleProperty("'+a+'", '+b+', "value", jQuery(this).val());\'>');return l=gform.applyFilters("gform_conditional_logic_values_input",l,a,b,c,d)}function IsAddressSelect(a,b){if(!b||"address"!=GetInputType(b))return!1;var c=b.addressType?b.addressType:gf_vars.defaultAddressType;if(!gf_vars.addressTypes[c])return!1;var d=gf_vars.addressTypes[c],e=a==b.id+".6",f=a==b.id+".4";return e&&"international"==c||f&&"object"==typeof d.states}function GetFirstRuleField(){for(var a=0;a<form.fields.length;a++)if(IsConditionalLogicField(form.fields[a]))return form.fields[a].id;return 0}function GetRuleValuesDropDown(a,b,c,d,e){for(var f=0==e?b+"_rule_value_"+c:e,g="<select class='gfield_rule_select gfield_rule_value_dropdown' id='"+f+"' name='"+f+"'>",h=!1,i=0;i<a.length;i++){var j=void 0===a[i].value||null==a[i].value?a[i].text+"":a[i].value+"",k=j==d,l=k?"selected='selected'":"";k&&(h=!0),j=j.replace(/'/g,"'");var m=""===jQuery.trim(jQuery("<div>"+a[i].text+"</div>").text())?j:a[i].text;g+="<option value='"+j.replace(/'/g,"'")+"' "+l+">"+m+"</option>"}return!h&&d&&""!=d&&(g+="<option value='"+d.replace(/'/g,"'")+"' selected='selected'>"+d+"</option>"),g+="</select>"}function isEmpty(a){}function SetRuleProperty(a,b,c,d){GetConditionalObject(a).conditionalLogic.rules[b][c]=d}function GetFieldById(a){a=parseInt(a);for(var b=0;b<form.fields.length;b++)if(form.fields[b].id==a)return form.fields[b];return null}function SetConditionalProperty(a,b,c){GetConditionalObject(a).conditionalLogic[b]=c}function SetRuleValueDropDown(a){var b=a.attr("id").split("_rule_value_");if(!(b.length<2)){SetRuleProperty(b[0],b[1],"value",a.val())}}function InsertRule(a,b){var c=GetConditionalObject(a);c.conditionalLogic.rules.splice(b,0,new ConditionalRule),CreateConditionalLogic(a,c),SetRule(a,b)}function SetRule(a,b){SetRuleProperty(a,b,"fieldId",jQuery("#"+a+"_rule_field_"+b).val()),SetRuleProperty(a,b,"operator",jQuery("#"+a+"_rule_operator_"+b).val()),SetRuleProperty(a,b,"value",jQuery("#"+a+"_rule_value_"+b).val())}function DeleteRule(a,b){var c=GetConditionalObject(a);c.conditionalLogic.rules.splice(b,1),CreateConditionalLogic(a,c)}function TruncateRuleText(a){return!a||a.length<=18?a:a.substr(0,9)+"..."+a.substr(a.length-8,9)}function gfAjaxSpinner(a,b,c){return b=void 0!==b&&b?b:gf_vars.baseUrl+"/images/spinner.gif",c=void 0!==c?c:"",this.elem=a,this.image='<img class="gfspinner" src="'+b+'" style="'+c+'" />',this.init=function(){return this.spinner=jQuery(this.image),jQuery(this.elem).after(this.spinner),this},this.destroy=function(){jQuery(this.spinner).remove()},this.init()}function InsertVariable(a,b,c){c||(c=jQuery("#"+a+"_variable_select").val());var d=document.getElementById(a),e=jQuery(d);if(document.selection)e[0].focus(),document.selection.createRange().text=c;else if("selectionStart"in d){var f=d.selectionStart;d.value=d.value.substr(0,f)+c+d.value.substr(d.selectionEnd,d.value.length),d.selectionStart=f+d.value.length,d.selectionEnd=f+d.value.length}else e.val(c+messageElement.val());var g=jQuery("#"+a+"_variable_select");g.length>0&&(g[0].selectedIndex=0),b&&window[b]&&window[b].call(null,a,c)}function InsertEditorVariable(a,b){if(!b){var c=jQuery("#"+a+"_variable_select");c[0].selectedIndex=0,b=c.val()}wpActiveEditor=a,window.send_to_editor(b)}function GetInputType(a){return a.inputType?a.inputType:a.type}function HasPostField(){for(var a=0;a<form.fields.length;a++){var b=form.fields[a].type;if("post_title"==b||"post_content"==b||"post_excerpt"==b)return!0}return!1}function GetInput(a,b){if(void 0!==a.inputs&&jQuery.isArray(a.inputs))for(i in a.inputs)if(a.inputs.hasOwnProperty(i)){var c=a.inputs[i];if(c.id==b)return c}return null}function IsPricingField(a){return IsProductField(a)||"donation"==a}function IsProductField(a){return-1!=jQuery.inArray(a,["option","quantity","product","total","shipping","calculation"])}function GetLabel(a,b,c){void 0===b&&(b=0),void 0===c&&(c=!1);var d=GetInput(a,b),e="";return e=void 0!=a.adminLabel&&a.adminLabel.length>0?a.adminLabel:a.label,null!=d?c?d.label:e+" ("+d.label+")":e}function DeleteNotification(a){jQuery("#action_argument").val(a),jQuery("#action").val("delete"),jQuery("#notification_list_form")[0].submit()}function DuplicateNotification(a){jQuery("#action_argument").val(a),jQuery("#action").val("duplicate"),jQuery("#notification_list_form")[0].submit()}function DeleteConfirmation(a){jQuery("#action_argument").val(a),jQuery("#action").val("delete"),jQuery("#confirmation_list_form")[0].submit()}function DuplicateConfirmation(a){jQuery("#action_argument").val(a),jQuery("#action").val("duplicate"),jQuery("#confirmation_list_form")[0].submit()}function SetConfirmationConditionalLogic(){confirmation.conditionalLogic=jQuery("#conditional_logic").val()?jQuery.parseJSON(jQuery("#conditional_logic").val()):new ConditionalLogic}function ToggleConfirmation(){var a,b="",c=jQuery("#form_confirmation_redirect").is(":checked"),d=jQuery("#form_confirmation_show_page").is(":checked");c?(a=".form_confirmation_redirect_container",b="#form_confirmation_message_container, .form_confirmation_page_container",ClearConfirmationSettings(["text","page"])):d?(a=".form_confirmation_page_container",b="#form_confirmation_message_container, .form_confirmation_redirect_container",ClearConfirmationSettings(["text","redirect"])):(a="#form_confirmation_message_container",b=".form_confirmation_page_container, .form_confirmation_redirect_container",ClearConfirmationSettings(["page","redirect"])),ToggleQueryString(),TogglePageQueryString(),jQuery(b).hide(),jQuery(a).show()}function ToggleQueryString(){jQuery("#form_redirect_use_querystring").is(":checked")?jQuery("#form_redirect_querystring_container").show():(jQuery("#form_redirect_querystring_container").hide(),jQuery("#form_redirect_querystring").val(""),jQuery("#form_redirect_use_querystring").val(""))}function TogglePageQueryString(){jQuery("#form_page_use_querystring").is(":checked")?jQuery("#form_page_querystring_container").show():(jQuery("#form_page_querystring_container").hide(),jQuery("#form_page_querystring").val(""),jQuery("#form_page_use_querystring").val(""))}function ClearConfirmationSettings(a){var b=jQuery.isArray(a)?a:[a];for(i in b)if(b.hasOwnProperty(i))switch(b[i]){case"text":jQuery("#form_confirmation_message").val(""),jQuery("#form_disable_autoformatting").prop("checked",!1);break;case"page":jQuery("#form_confirmation_page").val(""),jQuery("#form_page_querystring").val(""),jQuery("#form_page_use_querystring").prop("checked",!1);break;case"redirect":jQuery("#form_confirmation_url").val(""),jQuery("#form_redirect_querystring").val(""),jQuery("#form_redirect_use_querystring").prop("checked",!1)}}function StashConditionalLogic(){var a=JSON.stringify(confirmation.conditionalLogic);jQuery("#conditional_logic").val(a)}function ConfirmationObj(){this.id=!1,this.name=gf_vars.confirmationDefaultName,this.type="message",this.message=gf_vars.confirmationDefaultMessage,this.isDefault=0}function Copy(a){if(!a)return a;if("object"!=typeof a)return a;a=jQuery.isArray(a)?a.slice():jQuery.extend({},a);for(i in a)a[i]=Copy(a[i]);return a}function SimpleConditionObject(a,b){if(b.indexOf("simple_condition")<0)return a;var c=b.substring(17)+"_object";return window[c]}function FeedConditionConditionalObject(a,b){return"feed_condition"!=b?a:feedCondition.logicObject}function FeedConditionConditionalDescription(a,b,c,d){return"feed_condition"!=c?a:(b.actionType=b.actionType.replace("<select",'<select style="display:none;"'),b.objectDescription=feedCondition.strings.objectDescription,makeArray(b).join(" "))}function makeArray(a){var b=[];for(i in a)b.push(a[i]);return b}function isSet(a){return void 0!==a}jQuery(document).ready(function(a){gaddon.init(),a(document).on("change",".gfield_rule_value_dropdown",function(){SetRuleValueDropDown(a(this))}),"undefined"!=typeof form&&jQuery(".merge-tag-support").length>=0&&jQuery(".merge-tag-support").each(function(){new gfMergeTagsObj(form,jQuery(this))}),window.form&&(window.gfMergeTags=new gfMergeTagsObj(form)),a(document).ready(function(){a(".gform_currency").bind("change",function(){FormatCurrency(this)}).each(function(){FormatCurrency(this)})})}),function(a,b,c){function d(a){return void 0!==a}a.init=function(){f=window.form;d(f)&&f.id},a.toggleFeedActive=function(a,b,c){var d=a.src.indexOf("active1.png")>=0?0:1;return a.src=a.src.replace("active1.png","spinner.gif"),a.src=a.src.replace("active0.png","spinner.gif"),jQuery.post(ajaxurl,{action:"gf_feed_is_active_"+b,feed_id:c,is_active:d},function(b){d?(a.src=a.src.replace("spinner.gif","active1.png"),jQuery(a).attr("title",gf_vars.inactive).attr("alt",gf_vars.inactive)):(a.src=a.src.replace("spinner.gif","active0.png"),jQuery(a).attr("title",gf_vars.active).attr("alt",gf_vars.active))}),!0},a.deleteFeed=function(a){b("#single_action").val("delete"),b("#single_action_argument").val(a),b("#gform-settings").submit()},a.duplicateFeed=function(a){b("#single_action").val("duplicate"),b("#single_action_argument").val(a),b("#gform-settings").submit()}}(window.gaddon=window.gaddon||{},jQuery);var gfMergeTagsObj=function(a,b){var c=this;c.form=a,c.elem=b,c.init=function(){c.elem.data("mergeTags")||(c.mergeTagList=jQuery('<ul id="gf_merge_tag_list" class=""></ul>'),c.mergeTagListHover=!1,c.bindKeyDown(),c.initAutocomplete(),c.addMergeTagIcon(),c.mergeTagIcon.find("a.open-list").on("click.gravityforms",function(){var a=jQuery(this),b=c.getTargetElement(a);c.mergeTagList.html(""),c.mergeTagList.append(c.getMergeTagListItems(b)),c.mergeTagList.insertAfter(a).show()}),c.mergeTagList.hover(function(){c.mergeTagListHover=!0},function(){c.mergeTagListHover=!1}),jQuery("body").mouseup(function(){c.mergeTagListHover||c.mergeTagList.hide()}),c.elem.data("mergeTags",c))},c.destroy=function(a){a=c.elem?c.elem:a,a.next(".all-merge-tags").remove(),a.off("keydown.gravityforms"),a.autocomplete("destroy"),a.data("mergeTags",null)},c.bindKeyDown=function(){c.elem.on("keydown.gravityforms",function(a){var b=!(!c.elem.data("autocomplete")||!c.elem.data("autocomplete").menu)&&c.elem.data("autocomplete").menu.active;a.keyCode===jQuery.ui.keyCode.TAB&&b&&a.preventDefault()})},c.initAutocomplete=function(){c.elem.autocomplete({minLength:1,focus:function(){return!1},source:function(a,b){var d=c.extractLast(a.term);if(d.length<c.elem.autocomplete("option","minLength"))return void b([]);b(jQuery.map(c.getAutoCompleteMergeTags(c.elem),function(a){return c.startsWith(a,d)?a:null}))},select:function(a,b){var d=this.value.split(" ");return d.pop(),d.push(b.item.value),this.value=d.join(" "),c.elem.trigger("input").trigger("propertychange"),!1}})},c.addMergeTagIcon=function(){var a=c.elem.is("input")?"input":"textarea",b=c.getClassProperty(c.elem,"position");if(c.mergeTagIcon=jQuery('<span class="all-merge-tags '+b+" "+a+'"><a class="open-list tooltip-merge-tag" title="'+gf_vars.mergeTagsTooltip+'"></a></span>'),c.mergeTagIcon.data("targetElement",c.elem.attr("id")),c.getClassProperty(c.elem,"manual_position")){var d=".mt-"+c.elem.attr("id");jQuery(d).append(c.mergeTagIcon)}else c.elem.after(c.mergeTagIcon);c.mergeTagIcon.find(".tooltip-merge-tag").tooltip({show:{delay:1250},content:function(){return jQuery(this).prop("title")}})},c.bindMergeTagListClick=function(a){c.mergeTagList.hide();var b=jQuery(a.target).data("value"),d=c.getTargetElement(a.target);c.isWpEditor(d)?InsertEditorVariable(d.attr("id"),b):InsertVariable(d.attr("id"),null,b),d.trigger("input").trigger("propertychange"),c.mergeTagList.hide()},this.getMergeTags=function(a,b,c,d,e,f){void 0===a&&(a=[]),void 0===d&&(d=[]);var g=[],h=[],j=[],k=[],l=[],m=[],n=[],o=[],p=[];if(c||k.push({tag:"{all_fields}",label:this.getMergeTagLabel("{all_fields}")}),!e){for(i in a)if(a.hasOwnProperty(i)){var q=a[i];if(!q.displayOnly){var r=GetInputType(q);if(-1==jQuery.inArray(r,d)){if(q.isRequired)switch(r){case"name":var s,t,u,v,w=Copy(q);"extended"==q.nameFormat?(s=GetInput(q,q.id+".2"),u=GetInput(q,q.id+".8"),v=Copy(q),v.inputs=[s,u],h.push(v),delete w.inputs[0],delete w.inputs[3]):"advanced"==q.nameFormat&&(s=GetInput(q,q.id+".2"),t=GetInput(q,q.id+".4"),u=GetInput(q,q.id+".8"),v=Copy(q),v.inputs=[s,t,u],h.push(v),delete w.inputs[0],delete w.inputs[2],delete w.inputs[4]),g.push(w);break;default:g.push(q)}else h.push(q);IsPricingField(q.type)&&j.push(q)}}}if(g.length>0)for(i in g)g.hasOwnProperty(i)&&(l=l.concat(this.getFieldMergeTags(g[i],f)));if(h.length>0)for(i in h)h.hasOwnProperty(i)&&(m=m.concat(this.getFieldMergeTags(h[i],f)));if(j.length>0){c||n.push({tag:"{pricing_fields}",label:this.getMergeTagLabel("{pricing_fields}")});for(i in j)j.hasOwnProperty(i)&&n.concat(this.getFieldMergeTags(j[i],f))}}o.push({tag:"{ip}",label:this.getMergeTagLabel("{ip}")}),o.push({tag:"{date_mdy}",label:this.getMergeTagLabel("{date_mdy}")}),o.push({tag:"{date_dmy}",label:this.getMergeTagLabel("{date_dmy}")}),o.push({tag:"{embed_post:ID}",label:this.getMergeTagLabel("{embed_post:ID}")}),o.push({tag:"{embed_post:post_title}",label:this.getMergeTagLabel("{embed_post:post_title}")}),o.push({tag:"{embed_url}",label:this.getMergeTagLabel("{embed_url}")}),e||(o.push({tag:"{entry_id}",label:this.getMergeTagLabel("{entry_id}")}),o.push({tag:"{entry_url}",label:this.getMergeTagLabel("{entry_url}")}),o.push({tag:"{form_id}",label:this.getMergeTagLabel("{form_id}")}),o.push({tag:"{form_title}",label:this.getMergeTagLabel("{form_title}")})),o.push({tag:"{user_agent}",label:this.getMergeTagLabel("{user_agent}")}),o.push({tag:"{referer}",label:this.getMergeTagLabel("{referer}")}),HasPostField()&&!e&&(o.push({tag:"{post_id}",label:this.getMergeTagLabel("{post_id}")}),o.push({tag:"{post_edit_url}",label:this.getMergeTagLabel("{post_edit_url}")})),o.push({tag:"{user:display_name}",label:this.getMergeTagLabel("{user:display_name}")}),o.push({tag:"{user:user_email}",label:this.getMergeTagLabel("{user:user_email}")}),o.push({tag:"{user:user_login}",label:this.getMergeTagLabel("{user:user_login}")});var x=this.getCustomMergeTags();if(x.tags.length>0)for(i in x.tags)if(x.tags.hasOwnProperty(i)){var y=x.tags[i];p.push({tag:y.tag,label:y.label})}var z={ungrouped:{label:this.getMergeGroupLabel("ungrouped"),tags:k},required:{label:this.getMergeGroupLabel("required"),tags:l},optional:{label:this.getMergeGroupLabel("optional"),tags:m},pricing:{label:this.getMergeGroupLabel("pricing"),tags:n},other:{label:this.getMergeGroupLabel("other"),tags:o},custom:{label:this.getMergeGroupLabel("custom"),tags:p}};return z=gform.applyFilters("gform_merge_tags",z,b,c,d,e,f,this)},this.getMergeTagLabel=function(a){for(groupName in gf_vars.mergeTags)if(gf_vars.mergeTags.hasOwnProperty(groupName)){var b=gf_vars.mergeTags[groupName].tags;for(i in b)if(b.hasOwnProperty(i)&&b[i].tag==a)return b[i].label}return""},this.getMergeGroupLabel=function(a){return gf_vars.mergeTags[a].label},this.getFieldMergeTags=function(a,b){void 0===b&&(b="");var c=[],d=GetInputType(a),e="list"==d?":"+b:"",f="",g="";if(jQuery.inArray(d,["date","email","time","password"])>-1&&(a.inputs=null),void 0!==a.inputs&&jQuery.isArray(a.inputs)){"checkbox"==d&&(g=GetLabel(a,a.id).replace("'","\\'"),f="{"+g+":"+a.id+e+"}",c.push({tag:f,label:g}));for(i in a.inputs)if(a.inputs.hasOwnProperty(i)){var h=a.inputs[i];"creditcard"==d&&jQuery.inArray(parseFloat(h.id),[parseFloat(a.id+".2"),parseFloat(a.id+".3"),parseFloat(a.id+".5")])>-1||(g=GetLabel(a,h.id).replace("'","\\'"),f="{"+g+":"+h.id+e+"}",c.push({tag:f,label:g}))}}else g=GetLabel(a).replace("'","\\'"),f="{"+g+":"+a.id+e+"}",c.push({tag:f,label:g});return c},c.getCustomMergeTags=function(){for(groupName in gf_vars.mergeTags)if(gf_vars.mergeTags.hasOwnProperty(groupName)&&"custom"==groupName)return gf_vars.mergeTags[groupName];return[]},this.getAutoCompleteMergeTags=function(a){var b=this.form.fields,c=a.attr("id"),d=1==this.getClassProperty(a,"hide_all_fields"),e=this.getClassProperty(a,"exclude"),f=this.getClassProperty(a,"option"),g=this.getClassProperty(a,"prepopulate");g&&(d=!0);var h=this.getMergeTags(b,c,d,e,g,f),j=[];for(group in h)if(h.hasOwnProperty(group)){var k=h[group].tags;for(i in k)k.hasOwnProperty(i)&&j.push(k[i].tag)}return j},this.getMergeTagListItems=function(a){var b=this.form.fields,d=a.attr("id"),e=1==this.getClassProperty(a,"hide_all_fields"),f=this.getClassProperty(a,"exclude"),g=this.getClassProperty(a,"prepopulate"),h=this.getClassProperty(a,"option");g&&(e=!0);var j=this.getMergeTags(b,d,e,f,g,h),k=this.hasMultipleGroups(j),l=[];for(group in j)if(j.hasOwnProperty(group)){var m=j[group].label,n=j[group].tags;if(!(n.length<=0)){m&&k&&l.push(jQuery('<li class="group-header">'+m+"</li>"));for(i in n)if(n.hasOwnProperty(i)){var o=n[i],p=jQuery('<a class="" data-value="'+o.tag+'">'+o.label+"</a>");p.on("click.gravityforms",c.bindMergeTagListClick),l.push(jQuery("<li></li>").html(p))}}}return l},this.hasMultipleGroups=function(a){var b=0;for(group in a)a.hasOwnProperty(group)&&a[group].tags.length>0&&b++;return b>1},c.getClassProperty=function(a,b){var a=jQuery(a),c=a.attr("class");if(!c)return"";var d=c.split(" ");for(i in d)if(d.hasOwnProperty(i)){var e=d[i].split("-");if("mt"==e[0]&&e[1]==b)return e.length>3?(delete e[0],delete e[1],e):2==e.length||e[2]}return""},c.getTargetElement=function(a){var a=jQuery(a),b=a.parents("span.all-merge-tags").data("targetElement");return jQuery("#"+b.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g,"\\$&"))},c.isWpEditor=function(a){var a=jQuery(a);return 1==this.getClassProperty(a,"wp_editor")},c.split=function(a){return a.split(" ")},c.extractLast=function(a){return this.split(a).pop()},c.startsWith=function(a,b){return 0===a.indexOf(b)},c.elem&&c.init()},FeedConditionObj=function(a){this.strings=isSet(a.strings)?a.strings:{},this.logicObject=a.logicObject,this.init=function(){var a=this;gform.addFilter("gform_conditional_object","FeedConditionConditionalObject"),gform.addFilter("gform_conditional_logic_description","FeedConditionConditionalDescription"),jQuery(document).ready(function(){ToggleConditionalLogic(!0,"feed_condition")}),jQuery("input#feed_condition_conditional_logic").parents("form").on("submit",function(){jQuery("input#feed_condition_conditional_logic_object").val(JSON.stringify(a.logicObject))})},this.init()};