text: var CastleCSS_Forms_State=webpackJsonpCastleCSS_Forms__name_([1],[,function(s,e,t){"use strict";function a(s){null!=s.val()&&(s.val().length>0?s.closest("[data-castlecss-field]").addClass("has-value"):0===s.val().length?s.closest("[data-castlecss-field]").removeClass("has-value"):s[0].tagName.match("select")&&s.find("option:selected").val()?s.closest("[data-castlecss-field]").addClass("has-value"):s.closest("[data-castlecss-field]").removeClass("has-value"))}var l=t(0),c=function(s){var e=s||"[data-castlecss-field]";l("input, textarea, select",e).each(function(){a(l(this))}),l(e).on("focus","input, textarea, select",function(){l(this).closest(e).addClass("has-focus")}).on("focusout","input, textarea, select",function(){l(this).closest(e).removeClass("has-focus")}).on("input keypress","input, textarea, select",function(){a(l(this))})};s.exports=c}],[1]);