<NME> jquery.flexdatalist.min.js
<BEF> jQuery.fn.flexdatalist=function(e,t){"use strict";var a,i=$(document),s=$(this),r=this;if(a=function(){var t=$(this),a={},i="",s=null;t.attr("name");t.hasClass("flexdatalist-set")&&r._destroy(t),t._options=function(e,a){var i=t.data("flexdatalist");if(!r._isDefined(e))return t.data("flexdatalist");if(r._isDefined(a))i[e]=a;else{if(!r._isObject(e))return r._isDefined(i,e)?i[e]:null;i=e}return i.searchIn=r._csvToArray(i.searchIn),i.relatives=i.relatives&&$(i.relatives).length>0?$(i.relatives):null,i.textProperty=null===i.textProperty?i.searchIn[0]:i.textProperty,i.visibleProperties=r._csvToArray(i.visibleProperties,i.searchIn),t.data("flexdatalist",i),t},t._options($.extend({url:null,data:[],params:{},relatives:null,chainedRelatives:!1,cache:!0,minLength:2,groupBy:!1,selectionRequired:!1,focusFirstResult:!1,textProperty:null,valueProperty:null,visibleProperties:[],searchIn:["label"],searchContain:!1,searchEqual:!1,searchDisabled:!1,normalizeString:null,multiple:t.attr("multiple"),maxShownResults:100,toggleSelected:!1,_values:[]},e,t.data()));var n=t.clone(!1).attr({list:null,name:null,value:null,id:t.attr("id")?t.attr("id")+"-flexdatalist":null}).val("").addClass("flexdatalist-alias").removeClass("flexdatalist");if(t._options("multiple")){var l=$("<ul>").addClass("flexdatalist-multiple").css({"background-color":t.css("background-color"),"border-color":t.css("border-left-color"),"border-width":t.css("border-left-width"),"border-style":t.css("border-left-style"),"border-radius":t.css("border-top-left-radius")}).insertAfter(t).click(function(){$(this).find("input").focus()});$('<li class="input-container">').addClass("flexdatalist-multiple-value").append(n).appendTo(l)}else n.insertAfter(t);t.addClass("flexdatalist").attr("type","hidden"),t._init=function(){var e=t._options();n.on("input keydown",function(a){var i=t._keyword();188===r._keyNum(a)&&!e.selectionRequired&&e.multiple?(a.preventDefault(),t._value(i),t._removeResults()):9===r._keyNum(a)&&t._removeResults()}).on("input keyup",function(a){if(t._changed()&&13!==r._keyNum(a)){var s=t._keyword();s.length>=e.minLength?t._search(function(e){t._showResults(e)}):t._removeResults(),e.multiple||(e.selectionRequired?(0===s.length||s.length<e.minLength)&&t._value(""):t._value(s))}i=t._keyword()}).focus(function(){var a=t._keyword();0===e.minLength?""===a&&t._tdata(function(e){t._showResults(e)}):a.length>=e.minLength&&!t._selected()&&t._search(function(e){t._showResults(e)})}).attr("autocomplete","off"),n.attr("autofocus")&&n.focus(),window.onresize=function(){t._position()},t.addClass("flexdatalist-set")},t._changed=function(){return i!==t._keyword()},t._chained=function(){var e=t._options();if(e.relatives&&e.chainedRelatives){var i=function(a){e.relatives.each(function(){var i=r._isEmpty($(this).val()),s=r._isEmpty(t.val());n.prop("disabled",i),a||!i&&s||(t._value(""),n.val(""),e.multiple&&l.find("li .remove").click())})};e.relatives.on("change",function(){i(),a={}}),i(!0)}},t._initValue=function(){var e=t.attr("value");r._isEmpty(e)||(t._options("originalValue",t.val()),t.val(""),t._parseValue(e,function(e){r._isEmpty(e)||t._values(e),i=t._keyword()}))},t._parseValue=function(e,a){var i=t._options();if(t._toJSON())try{a(JSON.parse(e))}catch(s){}else if(t._toCSV()||"string"==typeof i.valueProperty){var r=e.split(",");if("string"==typeof i.valueProperty){var n=i.searchIn;i.searchIn=i.valueProperty.split(","),i.searchEqual=!0,t._search(function(e){e.length>0&&a(e),i.searchIn=n,i.searchEqual=!1},r)}else a(r)}else a(e)},t._tdata=function(e){t.trigger("before:flexdatalist.data"),t._url(function(a){t._data(function(i){i=i.concat(a);for(var s=t._options("_values"),r=0;r<i.length;r++){var n=i[r];s&&s.indexOf(t._getText(n))>-1&&delete i[r]}t.trigger("after:flexdatalist.data",[i]),e(i)})})},t._data=function(e){var a=t._options();"string"==typeof a.data?t._remote({url:a.data,success:function(i){var s=t._getRemoteData(i);a.data=s,e(s)}}):e(a.data)},t._url=function(e){var a=t._options(),i=t._keyword(),n=t.val(),l=a.originalValue,o=i;return r._isEmpty(a.url)?e([]):(clearTimeout(s),void(s=setTimeout(function(){a.cache&&2!==a.cache&&(o=i.substring(0,a.minLength>0?a.minLength:1));var s=t._cache(o);return s?void e(s):void t._remote({url:a.url,data:$.extend(t._relativesData(),a.params,{keyword:i,contain:a.searchContain,selected:0===n.length?l:n}),success:function(a){var s=t._getRemoteData(a),r=t._keyword();r.length>i.length?t._search(function(e){t._showResults(e)}):e(s),t._cache(o,s)}})},200)))},t._remote=function(e){t.hasClass("flexdatalist-loading")||(t.addClass("flexdatalist-loading"),e=$.extend({type:"post",dataType:"json",complete:function(){t.removeClass("flexdatalist-loading")}},e),$.ajax(e))},t._getRemoteData=function(e){var t=e.results?e.results:e;return"string"==typeof t&&0===t.indexOf("[{")&&(t=JSON.parse(t)),r._isObject(t)?t:[]},t._relativesData=function(){var e=t._options("relatives"),a={};return e&&(a.relatives={},e.each(function(){var e=$(this);a.relatives[e.attr("name")]=e.val()})),a},t._datalist=function(){var e=t._options(),a=t.attr("list");return r._isEmpty(a)||(e.data=[],$("#"+a).find("option").each(function(){var t=$(this).val();e.data.push({label:t,value:t})})),t},t._cache=function(e,i){if(t._options("cache")){if(e=t._normalizeString(e),!r._isDefined(i))return r._isDefined(a,e)&&(i=a[e]),i;a[e]=i}return null},t._search=function(e,a){t._tdata(function(i){var s=[],n=t._options();if(n.searchDisabled)return e(i);r._isDefined(a)||(a=t._keyword()),"string"==typeof a&&(a=[a]),t.trigger("before:flexdatalist.search",[a,i]);for(var l=0;l<a.length;l++)for(var o=a[l],u=0;u<i.length;u++){var d=t._matches(i[u],o,n.values);d&&s.push(d)}t.trigger("after:flexdatalist.search",[a,i,s]),e(s)})},t._matches=function(e,a){for(var i=!1,s=$.extend({},e),n=t._options(),l=n.searchIn,o=0;o<l.length;o++){var u=l[o];if(r._isDefined(e,u)){var d=e[u].toString();t._find(a,d)&&(s[u+"_highlight"]=t._highlight(a,d),i=!0)}}return i?s:null},t._highlight=function(e,a){return a.replace(new RegExp(e,t._options("searchContain")?"ig":"i"),'<span class="highlight">$&</span>')},t._find=function(e,a){var i=t._options();return a=t._normalizeString(a),e=t._normalizeString(e),i.searchEqual?a==e:i.searchContain?a.indexOf(e)>=0:0===a.indexOf(e)},t._showResults=function(e){t._removeResults();var a=t._getResultsContainer(),i=t._options();if(0!==e.length){i.groupBy?(e=t._groupData(e),Object.keys(e).forEach(function(s){var r=e[s],n=i.groupBy,l=t._getHighlight(r[0],n,s);$("<li>").addClass("group").append($("<span>").addClass("group-name").html(l)).append($("<span>").addClass("group-item-count").text(" "+r.length)).appendTo(a);t._items(r,a)})):t._items(e,a);var s=a.find("li:not(.group)");s.on("click",function(){var e=$(this).data("item");e&&(t._selected(!0)._removeResults()._value(e),t.trigger("select:flexdatalist",[e,i]))}).hover(function(){s.removeClass("active"),$(this).addClass("active")},function(){$(this).removeClass("active")}),i.focusFirstResult&&s.filter(":first").addClass("active"),t._position()}},t._groupData=function(e){for(var a=[],i=t._options("groupBy"),s=0;s<e.length;s++){var n=e[s];if(r._isDefined(n,i)){var l=n[i];r._isDefined(a,l)||(a[l]=[]),a[l].push(n)}}return a},t._items=function(e,a){var i=t._options("maxShownResults");t.trigger("show:flexdatalist.results",[e]);for(var s=0;s<e.length&&!(i>0&&i===s);s++)t._item(e[s]).appendTo(a);t.trigger("shown:flexdatalist.results",[e])},t._item=function(e){for(var a=$("<li>").data("item",e).addClass("item"),i=t._options(),s=i.visibleProperties,n=0;n<s.length;n++){var l=s[n];if((!i.groupBy||i.groupBy!==l)&&r._isDefined(e,l)){var o={};if("thumb"===l)o=$("<img>").addClass("item item-"+l).attr("src",e[l]);else{var u=t._getHighlight(e,l);o=$("<span>").addClass("item item-"+l).html(u+" ")}o.appendTo(a)}}return a},t._getHighlight=function(e,t,a){return r._isDefined(e,t+"_highlight")?e[t+"_highlight"]:r._isDefined(e,t)?e[t]:a},t._getResultsContainer=function(){var e=t;t._options("multiple")&&(e=l);var a=$("ul.flexdatalist-results");return 0===a.length&&(a=$("<ul>").addClass("flexdatalist-results").appendTo("body").css({"border-color":e.css("border-left-color"),"border-width":"1px","border-bottom-left-radius":e.css("border-bottom-left-radius"),"border-bottom-right-radius":e.css("border-bottom-right-radius")}).data("target",n)),a},t._removeResults=function(){return $("ul.flexdatalist-results").remove(),t},t._selected=function(e){var a="flexdatalist-selected";return r._isDefined(e)?(e?t.addClass(a):t.removeClass(a),t):t.hasClass(a)},t._values=function(e){return $.isArray(e)&&!r._isEmpty(e)?void $.each(e,function(e,a){t._value(a)}):void t._value(e)},t._value=function(e){var a=t._options(),s=t._getText(e),r=t._getValue(e);if(s.length>0&&a._values.push(s),a.multiple){if(""===e)return t;n.val("");var o=$("<li>").addClass("value"+(a.toggleSelected?" toggle":"")).append('<span class="text">'+s+"</span>").append('<span class="fdl-remove">&times;</span>').insertBefore(l.find("li.input-container"));o.find("span.fdl-remove").click(function(){var e=$(this).parent(),i=e.index();if(!e.hasClass("disabled")&&(t._toJSON()||t._toCSV())){var s=t._inputValue();console.log(s),s.splice(i,1),a._values.splice(i,1),console.log(i),console.log(s),t._inputValue(s)}e.remove()}),a.toggleSelected&&o.click(function(){var e=$(this),i=t._inputValue(),s=e.index();if(e.hasClass("disabled")){var r=e.data("_value");i.splice(s,0,r),a._values.splice(s,0,t._getText(r)),e.removeClass("disabled")}else{var r=i.splice(s,1);e.data("_value",r[0]),a._values.splice(s,1),e.addClass("disabled")}t._inputValue(i)})}else s&&s!==n.val()&&n.val(s);return t._inputValue(r,s),i=t._keyword(),t},t._inputValue=function(e,a){var i=t._toJSON(),s=t._toCSV();return r._isDefined(e)?(r._isObject(e)&&(i&&!r._isEmpty(e)?e=JSON.stringify(e):s&&(e=e.join(","))),""===e&&t._options("_values",[]),t.val(e),t.trigger("change:flexdatalist",[e,a,t._options()]).trigger("change"),e):(e=t.val(),e?i?e=JSON.parse(e):s&&(e=e.split(",")):(i||s)&&(e=[]),e)},t._getText=function(e){var a=e,i=t._options();return r._isObject(e)&&(a=e[i.searchIn[0]],a=r._isDefined(e,i.textProperty)?e[i.textProperty]:t._replacePlaceholders(e,i.textProperty,a)),$("<div>").html(a).text()},t._getValue=function(e){var a=e,i=t._options();if(r._isObject(e))if(a=e[i.searchIn[0]],"*"===i.valueProperty)a=e;else if(r._isDefined(e,i.valueProperty))a=e[i.valueProperty];else if(t._toJSON()){var a={},s=i.valueProperty,n=i.textProperty;if(n){var l=n;"string"==typeof n&&(l=t._parsePlaceholders(n)),r._isObject(l)&&$.each(l,function(e,t){s.push(t)})}else r._isDefined(e,n)&&s.push(n);$.each(s,function(t,i){r._isDefined(e,i)&&(a[i]=e[i])})}if(i.multiple&&(t._toJSON()||t._toCSV())){var o=t._inputValue();!r._isEmpty(a)&&r._isObject(o)&&(o.push(a),a=o)}return a},t._replacePlaceholders=function(e,a,i){if(r._isObject(e)&&"string"==typeof a){var s=t._parsePlaceholders(a);if(!r._isEmpty(e)&&s)return $.each(s,function(t,i){r._isDefined(e,i)&&(a=a.replace(t,e[i]))}),a}return i},t._parsePlaceholders=function(e){var t=e.match(/\{.+?\}/g);if(t){var a={};return t.map(function(e){a[e]=e.slice(1,-1)}),a}return!1},t._normalizeString=function(e){if("string"==typeof e){var a=t._options("normalizeString");return"function"==typeof a&&(e=a(e)),e.toUpperCase()}return e},t._keyword=function(){return n.val().replace(/^\s+/,"")},t._toJSON=function(){var e=t._options("valueProperty");return r._isObject(e)||"*"===e},t._toCSV=function(){return!t._toJSON()&&t._options("multiple")},t._position=function(){var e=n;t._options("multiple")&&(e=l),$("ul.flexdatalist-results").css({width:e.outerWidth()+"px",top:e.offset().top+e.outerHeight()+"px",left:e.offset().left+"px","z-index":e.css("z-index")+1})},t._datalist(),t._init(),t._initValue(),t._chained(),i=t._keyword()},this._destroy=function(e){e||(e=s),e.each(function(){var e=$(this).data("flexdatalist");$(this).removeClass("flexdatalist-set").off().attr("type","text").val(e&&e.originalValue?e.originalValue:"").data("flexdatalist",null).next(".flexdatalist-alias, ul.flexdatalist-multiple").remove()})},this._reset=function(){this._destroy()},"string"==typeof e)if("function"==typeof this["_"+e]){if(!this["_"+e]())return this}else{if(!t){var n=s.data("flexdatalist");return n[e]}if(t){var n=s.data("flexdatalist");return n[e]=t,s.data("flexdatalist",n),this}}return this._keyNum=function(e){return e.which||e.keyCode},i.data("flexdatalist")||$(document).mouseup(function(e){var t=$(".flexdatalist-results"),a=t.data("target");a&&a.is(":focus")||t.is(e.target)||0!==t.has(e.target).length||t.remove()}).keydown(function(e){var t=$(".flexdatalist-results"),a=t.find("li"),i=a.filter(".active"),s=i.index(),n=a.length,l=r._keyNum(e);if(0!==n)if(13===l)e.preventDefault(),i.click();else if(40===l||38===l){e.preventDefault(),40===l?i=n>s&&i.nextAll(".item").first().length>0?i.removeClass("active").nextAll(".item").first().addClass("active"):a.removeClass("active").filter(".item:first").addClass("active"):38===l&&(i=s>0&&i.prevAll(".item").first().length>0?i.removeClass("active").prevAll(".item").first().addClass("active"):a.removeClass("active").filter(".item:last").addClass("active"));var o=(0===i.prev().length?i:i.prev()).position().top;t.animate({scrollTop:o+t.scrollTop()},100)}}).data("flexdatalist",!0),this._isEmpty=function(e){return r._isDefined(e)?null===e?!0:e===!0?!1:0===this._length(e)?!0:""===$.trim(e):!0},this._isObject=function(e){return e&&"object"==typeof e},this._csvToArray=function(e,t){return 0===e.length?t:"string"==typeof e?e.split(","):e},this._length=function(e){return this._isObject(e)?Object.keys(e).length:"number"==typeof e.length?e.length:0},this._isDefined=function(e,t){var a="undefined"!=typeof e;return a&&"undefined"!=typeof t?"undefined"!=typeof e[t]:a},this.each(a)},$(function(){$("input.flexdatalist:not(.flexdatalist-set)").flexdatalist()});
//# sourceMappingURL=jquery.flexdatalist.min.js.map
<MSG> console.log removed

<DFF> @@ -1,1 +1,1 @@
-jQuery.fn.flexdatalist=function(e,t){"use strict";var a,i=$(document),s=$(this),r=this;if(a=function(){var t=$(this),a={},i="",s=null;t.attr("name");t.hasClass("flexdatalist-set")&&r._destroy(t),t._options=function(e,a){var i=t.data("flexdatalist");if(!r._isDefined(e))return t.data("flexdatalist");if(r._isDefined(a))i[e]=a;else{if(!r._isObject(e))return r._isDefined(i,e)?i[e]:null;i=e}return i.searchIn=r._csvToArray(i.searchIn),i.relatives=i.relatives&&$(i.relatives).length>0?$(i.relatives):null,i.textProperty=null===i.textProperty?i.searchIn[0]:i.textProperty,i.visibleProperties=r._csvToArray(i.visibleProperties,i.searchIn),t.data("flexdatalist",i),t},t._options($.extend({url:null,data:[],params:{},relatives:null,chainedRelatives:!1,cache:!0,minLength:2,groupBy:!1,selectionRequired:!1,focusFirstResult:!1,textProperty:null,valueProperty:null,visibleProperties:[],searchIn:["label"],searchContain:!1,searchEqual:!1,searchDisabled:!1,normalizeString:null,multiple:t.attr("multiple"),maxShownResults:100,toggleSelected:!1,_values:[]},e,t.data()));var n=t.clone(!1).attr({list:null,name:null,value:null,id:t.attr("id")?t.attr("id")+"-flexdatalist":null}).val("").addClass("flexdatalist-alias").removeClass("flexdatalist");if(t._options("multiple")){var l=$("<ul>").addClass("flexdatalist-multiple").css({"background-color":t.css("background-color"),"border-color":t.css("border-left-color"),"border-width":t.css("border-left-width"),"border-style":t.css("border-left-style"),"border-radius":t.css("border-top-left-radius")}).insertAfter(t).click(function(){$(this).find("input").focus()});$('<li class="input-container">').addClass("flexdatalist-multiple-value").append(n).appendTo(l)}else n.insertAfter(t);t.addClass("flexdatalist").attr("type","hidden"),t._init=function(){var e=t._options();n.on("input keydown",function(a){var i=t._keyword();188===r._keyNum(a)&&!e.selectionRequired&&e.multiple?(a.preventDefault(),t._value(i),t._removeResults()):9===r._keyNum(a)&&t._removeResults()}).on("input keyup",function(a){if(t._changed()&&13!==r._keyNum(a)){var s=t._keyword();s.length>=e.minLength?t._search(function(e){t._showResults(e)}):t._removeResults(),e.multiple||(e.selectionRequired?(0===s.length||s.length<e.minLength)&&t._value(""):t._value(s))}i=t._keyword()}).focus(function(){var a=t._keyword();0===e.minLength?""===a&&t._tdata(function(e){t._showResults(e)}):a.length>=e.minLength&&!t._selected()&&t._search(function(e){t._showResults(e)})}).attr("autocomplete","off"),n.attr("autofocus")&&n.focus(),window.onresize=function(){t._position()},t.addClass("flexdatalist-set")},t._changed=function(){return i!==t._keyword()},t._chained=function(){var e=t._options();if(e.relatives&&e.chainedRelatives){var i=function(a){e.relatives.each(function(){var i=r._isEmpty($(this).val()),s=r._isEmpty(t.val());n.prop("disabled",i),a||!i&&s||(t._value(""),n.val(""),e.multiple&&l.find("li .remove").click())})};e.relatives.on("change",function(){i(),a={}}),i(!0)}},t._initValue=function(){var e=t.attr("value");r._isEmpty(e)||(t._options("originalValue",t.val()),t.val(""),t._parseValue(e,function(e){r._isEmpty(e)||t._values(e),i=t._keyword()}))},t._parseValue=function(e,a){var i=t._options();if(t._toJSON())try{a(JSON.parse(e))}catch(s){}else if(t._toCSV()||"string"==typeof i.valueProperty){var r=e.split(",");if("string"==typeof i.valueProperty){var n=i.searchIn;i.searchIn=i.valueProperty.split(","),i.searchEqual=!0,t._search(function(e){e.length>0&&a(e),i.searchIn=n,i.searchEqual=!1},r)}else a(r)}else a(e)},t._tdata=function(e){t.trigger("before:flexdatalist.data"),t._url(function(a){t._data(function(i){i=i.concat(a);for(var s=t._options("_values"),r=0;r<i.length;r++){var n=i[r];s&&s.indexOf(t._getText(n))>-1&&delete i[r]}t.trigger("after:flexdatalist.data",[i]),e(i)})})},t._data=function(e){var a=t._options();"string"==typeof a.data?t._remote({url:a.data,success:function(i){var s=t._getRemoteData(i);a.data=s,e(s)}}):e(a.data)},t._url=function(e){var a=t._options(),i=t._keyword(),n=t.val(),l=a.originalValue,o=i;return r._isEmpty(a.url)?e([]):(clearTimeout(s),void(s=setTimeout(function(){a.cache&&2!==a.cache&&(o=i.substring(0,a.minLength>0?a.minLength:1));var s=t._cache(o);return s?void e(s):void t._remote({url:a.url,data:$.extend(t._relativesData(),a.params,{keyword:i,contain:a.searchContain,selected:0===n.length?l:n}),success:function(a){var s=t._getRemoteData(a),r=t._keyword();r.length>i.length?t._search(function(e){t._showResults(e)}):e(s),t._cache(o,s)}})},200)))},t._remote=function(e){t.hasClass("flexdatalist-loading")||(t.addClass("flexdatalist-loading"),e=$.extend({type:"post",dataType:"json",complete:function(){t.removeClass("flexdatalist-loading")}},e),$.ajax(e))},t._getRemoteData=function(e){var t=e.results?e.results:e;return"string"==typeof t&&0===t.indexOf("[{")&&(t=JSON.parse(t)),r._isObject(t)?t:[]},t._relativesData=function(){var e=t._options("relatives"),a={};return e&&(a.relatives={},e.each(function(){var e=$(this);a.relatives[e.attr("name")]=e.val()})),a},t._datalist=function(){var e=t._options(),a=t.attr("list");return r._isEmpty(a)||(e.data=[],$("#"+a).find("option").each(function(){var t=$(this).val();e.data.push({label:t,value:t})})),t},t._cache=function(e,i){if(t._options("cache")){if(e=t._normalizeString(e),!r._isDefined(i))return r._isDefined(a,e)&&(i=a[e]),i;a[e]=i}return null},t._search=function(e,a){t._tdata(function(i){var s=[],n=t._options();if(n.searchDisabled)return e(i);r._isDefined(a)||(a=t._keyword()),"string"==typeof a&&(a=[a]),t.trigger("before:flexdatalist.search",[a,i]);for(var l=0;l<a.length;l++)for(var o=a[l],u=0;u<i.length;u++){var d=t._matches(i[u],o,n.values);d&&s.push(d)}t.trigger("after:flexdatalist.search",[a,i,s]),e(s)})},t._matches=function(e,a){for(var i=!1,s=$.extend({},e),n=t._options(),l=n.searchIn,o=0;o<l.length;o++){var u=l[o];if(r._isDefined(e,u)){var d=e[u].toString();t._find(a,d)&&(s[u+"_highlight"]=t._highlight(a,d),i=!0)}}return i?s:null},t._highlight=function(e,a){return a.replace(new RegExp(e,t._options("searchContain")?"ig":"i"),'<span class="highlight">$&</span>')},t._find=function(e,a){var i=t._options();return a=t._normalizeString(a),e=t._normalizeString(e),i.searchEqual?a==e:i.searchContain?a.indexOf(e)>=0:0===a.indexOf(e)},t._showResults=function(e){t._removeResults();var a=t._getResultsContainer(),i=t._options();if(0!==e.length){i.groupBy?(e=t._groupData(e),Object.keys(e).forEach(function(s){var r=e[s],n=i.groupBy,l=t._getHighlight(r[0],n,s);$("<li>").addClass("group").append($("<span>").addClass("group-name").html(l)).append($("<span>").addClass("group-item-count").text(" "+r.length)).appendTo(a);t._items(r,a)})):t._items(e,a);var s=a.find("li:not(.group)");s.on("click",function(){var e=$(this).data("item");e&&(t._selected(!0)._removeResults()._value(e),t.trigger("select:flexdatalist",[e,i]))}).hover(function(){s.removeClass("active"),$(this).addClass("active")},function(){$(this).removeClass("active")}),i.focusFirstResult&&s.filter(":first").addClass("active"),t._position()}},t._groupData=function(e){for(var a=[],i=t._options("groupBy"),s=0;s<e.length;s++){var n=e[s];if(r._isDefined(n,i)){var l=n[i];r._isDefined(a,l)||(a[l]=[]),a[l].push(n)}}return a},t._items=function(e,a){var i=t._options("maxShownResults");t.trigger("show:flexdatalist.results",[e]);for(var s=0;s<e.length&&!(i>0&&i===s);s++)t._item(e[s]).appendTo(a);t.trigger("shown:flexdatalist.results",[e])},t._item=function(e){for(var a=$("<li>").data("item",e).addClass("item"),i=t._options(),s=i.visibleProperties,n=0;n<s.length;n++){var l=s[n];if((!i.groupBy||i.groupBy!==l)&&r._isDefined(e,l)){var o={};if("thumb"===l)o=$("<img>").addClass("item item-"+l).attr("src",e[l]);else{var u=t._getHighlight(e,l);o=$("<span>").addClass("item item-"+l).html(u+" ")}o.appendTo(a)}}return a},t._getHighlight=function(e,t,a){return r._isDefined(e,t+"_highlight")?e[t+"_highlight"]:r._isDefined(e,t)?e[t]:a},t._getResultsContainer=function(){var e=t;t._options("multiple")&&(e=l);var a=$("ul.flexdatalist-results");return 0===a.length&&(a=$("<ul>").addClass("flexdatalist-results").appendTo("body").css({"border-color":e.css("border-left-color"),"border-width":"1px","border-bottom-left-radius":e.css("border-bottom-left-radius"),"border-bottom-right-radius":e.css("border-bottom-right-radius")}).data("target",n)),a},t._removeResults=function(){return $("ul.flexdatalist-results").remove(),t},t._selected=function(e){var a="flexdatalist-selected";return r._isDefined(e)?(e?t.addClass(a):t.removeClass(a),t):t.hasClass(a)},t._values=function(e){return $.isArray(e)&&!r._isEmpty(e)?void $.each(e,function(e,a){t._value(a)}):void t._value(e)},t._value=function(e){var a=t._options(),s=t._getText(e),r=t._getValue(e);if(s.length>0&&a._values.push(s),a.multiple){if(""===e)return t;n.val("");var o=$("<li>").addClass("value"+(a.toggleSelected?" toggle":"")).append('<span class="text">'+s+"</span>").append('<span class="fdl-remove">&times;</span>').insertBefore(l.find("li.input-container"));o.find("span.fdl-remove").click(function(){var e=$(this).parent(),i=e.index();if(!e.hasClass("disabled")&&(t._toJSON()||t._toCSV())){var s=t._inputValue();console.log(s),s.splice(i,1),a._values.splice(i,1),console.log(i),console.log(s),t._inputValue(s)}e.remove()}),a.toggleSelected&&o.click(function(){var e=$(this),i=t._inputValue(),s=e.index();if(e.hasClass("disabled")){var r=e.data("_value");i.splice(s,0,r),a._values.splice(s,0,t._getText(r)),e.removeClass("disabled")}else{var r=i.splice(s,1);e.data("_value",r[0]),a._values.splice(s,1),e.addClass("disabled")}t._inputValue(i)})}else s&&s!==n.val()&&n.val(s);return t._inputValue(r,s),i=t._keyword(),t},t._inputValue=function(e,a){var i=t._toJSON(),s=t._toCSV();return r._isDefined(e)?(r._isObject(e)&&(i&&!r._isEmpty(e)?e=JSON.stringify(e):s&&(e=e.join(","))),""===e&&t._options("_values",[]),t.val(e),t.trigger("change:flexdatalist",[e,a,t._options()]).trigger("change"),e):(e=t.val(),e?i?e=JSON.parse(e):s&&(e=e.split(",")):(i||s)&&(e=[]),e)},t._getText=function(e){var a=e,i=t._options();return r._isObject(e)&&(a=e[i.searchIn[0]],a=r._isDefined(e,i.textProperty)?e[i.textProperty]:t._replacePlaceholders(e,i.textProperty,a)),$("<div>").html(a).text()},t._getValue=function(e){var a=e,i=t._options();if(r._isObject(e))if(a=e[i.searchIn[0]],"*"===i.valueProperty)a=e;else if(r._isDefined(e,i.valueProperty))a=e[i.valueProperty];else if(t._toJSON()){var a={},s=i.valueProperty,n=i.textProperty;if(n){var l=n;"string"==typeof n&&(l=t._parsePlaceholders(n)),r._isObject(l)&&$.each(l,function(e,t){s.push(t)})}else r._isDefined(e,n)&&s.push(n);$.each(s,function(t,i){r._isDefined(e,i)&&(a[i]=e[i])})}if(i.multiple&&(t._toJSON()||t._toCSV())){var o=t._inputValue();!r._isEmpty(a)&&r._isObject(o)&&(o.push(a),a=o)}return a},t._replacePlaceholders=function(e,a,i){if(r._isObject(e)&&"string"==typeof a){var s=t._parsePlaceholders(a);if(!r._isEmpty(e)&&s)return $.each(s,function(t,i){r._isDefined(e,i)&&(a=a.replace(t,e[i]))}),a}return i},t._parsePlaceholders=function(e){var t=e.match(/\{.+?\}/g);if(t){var a={};return t.map(function(e){a[e]=e.slice(1,-1)}),a}return!1},t._normalizeString=function(e){if("string"==typeof e){var a=t._options("normalizeString");return"function"==typeof a&&(e=a(e)),e.toUpperCase()}return e},t._keyword=function(){return n.val().replace(/^\s+/,"")},t._toJSON=function(){var e=t._options("valueProperty");return r._isObject(e)||"*"===e},t._toCSV=function(){return!t._toJSON()&&t._options("multiple")},t._position=function(){var e=n;t._options("multiple")&&(e=l),$("ul.flexdatalist-results").css({width:e.outerWidth()+"px",top:e.offset().top+e.outerHeight()+"px",left:e.offset().left+"px","z-index":e.css("z-index")+1})},t._datalist(),t._init(),t._initValue(),t._chained(),i=t._keyword()},this._destroy=function(e){e||(e=s),e.each(function(){var e=$(this).data("flexdatalist");$(this).removeClass("flexdatalist-set").off().attr("type","text").val(e&&e.originalValue?e.originalValue:"").data("flexdatalist",null).next(".flexdatalist-alias, ul.flexdatalist-multiple").remove()})},this._reset=function(){this._destroy()},"string"==typeof e)if("function"==typeof this["_"+e]){if(!this["_"+e]())return this}else{if(!t){var n=s.data("flexdatalist");return n[e]}if(t){var n=s.data("flexdatalist");return n[e]=t,s.data("flexdatalist",n),this}}return this._keyNum=function(e){return e.which||e.keyCode},i.data("flexdatalist")||$(document).mouseup(function(e){var t=$(".flexdatalist-results"),a=t.data("target");a&&a.is(":focus")||t.is(e.target)||0!==t.has(e.target).length||t.remove()}).keydown(function(e){var t=$(".flexdatalist-results"),a=t.find("li"),i=a.filter(".active"),s=i.index(),n=a.length,l=r._keyNum(e);if(0!==n)if(13===l)e.preventDefault(),i.click();else if(40===l||38===l){e.preventDefault(),40===l?i=n>s&&i.nextAll(".item").first().length>0?i.removeClass("active").nextAll(".item").first().addClass("active"):a.removeClass("active").filter(".item:first").addClass("active"):38===l&&(i=s>0&&i.prevAll(".item").first().length>0?i.removeClass("active").prevAll(".item").first().addClass("active"):a.removeClass("active").filter(".item:last").addClass("active"));var o=(0===i.prev().length?i:i.prev()).position().top;t.animate({scrollTop:o+t.scrollTop()},100)}}).data("flexdatalist",!0),this._isEmpty=function(e){return r._isDefined(e)?null===e?!0:e===!0?!1:0===this._length(e)?!0:""===$.trim(e):!0},this._isObject=function(e){return e&&"object"==typeof e},this._csvToArray=function(e,t){return 0===e.length?t:"string"==typeof e?e.split(","):e},this._length=function(e){return this._isObject(e)?Object.keys(e).length:"number"==typeof e.length?e.length:0},this._isDefined=function(e,t){var a="undefined"!=typeof e;return a&&"undefined"!=typeof t?"undefined"!=typeof e[t]:a},this.each(a)},$(function(){$("input.flexdatalist:not(.flexdatalist-set)").flexdatalist()});
\ No newline at end of file
+jQuery.fn.flexdatalist=function(e,t){"use strict";var a,i=$(document),s=$(this),r=this;if(a=function(){var t=$(this),a={},i="",s=null;t.attr("name");t.hasClass("flexdatalist-set")&&r._destroy(t),t._options=function(e,a){var i=t.data("flexdatalist");if(!r._isDefined(e))return t.data("flexdatalist");if(r._isDefined(a))i[e]=a;else{if(!r._isObject(e))return r._isDefined(i,e)?i[e]:null;i=e}return i.searchIn=r._csvToArray(i.searchIn),i.relatives=i.relatives&&$(i.relatives).length>0?$(i.relatives):null,i.textProperty=null===i.textProperty?i.searchIn[0]:i.textProperty,i.visibleProperties=r._csvToArray(i.visibleProperties,i.searchIn),t.data("flexdatalist",i),t},t._options($.extend({url:null,data:[],params:{},relatives:null,chainedRelatives:!1,cache:!0,minLength:2,groupBy:!1,selectionRequired:!1,focusFirstResult:!1,textProperty:null,valueProperty:null,visibleProperties:[],searchIn:["label"],searchContain:!1,searchEqual:!1,searchDisabled:!1,normalizeString:null,multiple:t.attr("multiple"),maxShownResults:100,toggleSelected:!1,_values:[]},e,t.data()));var n=t.clone(!1).attr({list:null,name:null,value:null,id:t.attr("id")?t.attr("id")+"-flexdatalist":null}).val("").addClass("flexdatalist-alias").removeClass("flexdatalist");if(t._options("multiple")){var l=$("<ul>").addClass("flexdatalist-multiple").css({"background-color":t.css("background-color"),"border-color":t.css("border-left-color"),"border-width":t.css("border-left-width"),"border-style":t.css("border-left-style"),"border-radius":t.css("border-top-left-radius")}).insertAfter(t).click(function(){$(this).find("input").focus()});$('<li class="input-container">').addClass("flexdatalist-multiple-value").append(n).appendTo(l)}else n.insertAfter(t);t.addClass("flexdatalist").attr("type","hidden"),t._init=function(){var e=t._options();n.on("input keydown",function(a){var i=t._keyword();188===r._keyNum(a)&&!e.selectionRequired&&e.multiple?(a.preventDefault(),t._value(i),t._removeResults()):9===r._keyNum(a)&&t._removeResults()}).on("input keyup",function(a){if(t._changed()&&13!==r._keyNum(a)){var s=t._keyword();s.length>=e.minLength?t._search(function(e){t._showResults(e)}):t._removeResults(),e.multiple||(e.selectionRequired?(0===s.length||s.length<e.minLength)&&t._value(""):t._value(s))}i=t._keyword()}).focus(function(){var a=t._keyword();0===e.minLength?""===a&&t._tdata(function(e){t._showResults(e)}):a.length>=e.minLength&&!t._selected()&&t._search(function(e){t._showResults(e)})}).attr("autocomplete","off"),n.attr("autofocus")&&n.focus(),window.onresize=function(){t._position()},t.addClass("flexdatalist-set")},t._changed=function(){return i!==t._keyword()},t._chained=function(){var e=t._options();if(e.relatives&&e.chainedRelatives){var i=function(a){e.relatives.each(function(){var i=r._isEmpty($(this).val()),s=r._isEmpty(t.val());n.prop("disabled",i),a||!i&&s||(t._value(""),n.val(""),e.multiple&&l.find("li .remove").click())})};e.relatives.on("change",function(){i(),a={}}),i(!0)}},t._initValue=function(){var e=t.attr("value");r._isEmpty(e)||(t._options("originalValue",t.val()),t.val(""),t._parseValue(e,function(e){r._isEmpty(e)||t._values(e),i=t._keyword()}))},t._parseValue=function(e,a){var i=t._options();if(t._toJSON())try{a(JSON.parse(e))}catch(s){}else if(t._toCSV()||"string"==typeof i.valueProperty){var r=e.split(",");if("string"==typeof i.valueProperty){var n=i.searchIn;i.searchIn=i.valueProperty.split(","),i.searchEqual=!0,t._search(function(e){e.length>0&&a(e),i.searchIn=n,i.searchEqual=!1},r)}else a(r)}else a(e)},t._tdata=function(e){t.trigger("before:flexdatalist.data"),t._url(function(a){t._data(function(i){i=i.concat(a);for(var s=t._options("_values"),r=0;r<i.length;r++){var n=i[r];s&&s.indexOf(t._getText(n))>-1&&delete i[r]}t.trigger("after:flexdatalist.data",[i]),e(i)})})},t._data=function(e){var a=t._options();"string"==typeof a.data?t._remote({url:a.data,success:function(i){var s=t._getRemoteData(i);a.data=s,e(s)}}):e(a.data)},t._url=function(e){var a=t._options(),i=t._keyword(),n=t.val(),l=a.originalValue,o=i;return r._isEmpty(a.url)?e([]):(clearTimeout(s),void(s=setTimeout(function(){a.cache&&2!==a.cache&&(o=i.substring(0,a.minLength>0?a.minLength:1));var s=t._cache(o);return s?void e(s):void t._remote({url:a.url,data:$.extend(t._relativesData(),a.params,{keyword:i,contain:a.searchContain,selected:0===n.length?l:n}),success:function(a){var s=t._getRemoteData(a),r=t._keyword();r.length>i.length?t._search(function(e){t._showResults(e)}):e(s),t._cache(o,s)}})},200)))},t._remote=function(e){t.hasClass("flexdatalist-loading")||(t.addClass("flexdatalist-loading"),e=$.extend({type:"post",dataType:"json",complete:function(){t.removeClass("flexdatalist-loading")}},e),$.ajax(e))},t._getRemoteData=function(e){var t=e.results?e.results:e;return"string"==typeof t&&0===t.indexOf("[{")&&(t=JSON.parse(t)),r._isObject(t)?t:[]},t._relativesData=function(){var e=t._options("relatives"),a={};return e&&(a.relatives={},e.each(function(){var e=$(this);a.relatives[e.attr("name")]=e.val()})),a},t._datalist=function(){var e=t._options(),a=t.attr("list");return r._isEmpty(a)||(e.data=[],$("#"+a).find("option").each(function(){var t=$(this).val();e.data.push({label:t,value:t})})),t},t._cache=function(e,i){if(t._options("cache")){if(e=t._normalizeString(e),!r._isDefined(i))return r._isDefined(a,e)&&(i=a[e]),i;a[e]=i}return null},t._search=function(e,a){t._tdata(function(i){var s=[],n=t._options();if(n.searchDisabled)return e(i);r._isDefined(a)||(a=t._keyword()),"string"==typeof a&&(a=[a]),t.trigger("before:flexdatalist.search",[a,i]);for(var l=0;l<a.length;l++)for(var o=a[l],u=0;u<i.length;u++){var d=t._matches(i[u],o,n.values);d&&s.push(d)}t.trigger("after:flexdatalist.search",[a,i,s]),e(s)})},t._matches=function(e,a){for(var i=!1,s=$.extend({},e),n=t._options(),l=n.searchIn,o=0;o<l.length;o++){var u=l[o];if(r._isDefined(e,u)){var d=e[u].toString();t._find(a,d)&&(s[u+"_highlight"]=t._highlight(a,d),i=!0)}}return i?s:null},t._highlight=function(e,a){return a.replace(new RegExp(e,t._options("searchContain")?"ig":"i"),'<span class="highlight">$&</span>')},t._find=function(e,a){var i=t._options();return a=t._normalizeString(a),e=t._normalizeString(e),i.searchEqual?a==e:i.searchContain?a.indexOf(e)>=0:0===a.indexOf(e)},t._showResults=function(e){t._removeResults();var a=t._getResultsContainer(),i=t._options();if(0!==e.length){i.groupBy?(e=t._groupData(e),Object.keys(e).forEach(function(s){var r=e[s],n=i.groupBy,l=t._getHighlight(r[0],n,s);$("<li>").addClass("group").append($("<span>").addClass("group-name").html(l)).append($("<span>").addClass("group-item-count").text(" "+r.length)).appendTo(a);t._items(r,a)})):t._items(e,a);var s=a.find("li:not(.group)");s.on("click",function(){var e=$(this).data("item");e&&(t._selected(!0)._removeResults()._value(e),t.trigger("select:flexdatalist",[e,i]))}).hover(function(){s.removeClass("active"),$(this).addClass("active")},function(){$(this).removeClass("active")}),i.focusFirstResult&&s.filter(":first").addClass("active"),t._position()}},t._groupData=function(e){for(var a=[],i=t._options("groupBy"),s=0;s<e.length;s++){var n=e[s];if(r._isDefined(n,i)){var l=n[i];r._isDefined(a,l)||(a[l]=[]),a[l].push(n)}}return a},t._items=function(e,a){var i=t._options("maxShownResults");t.trigger("show:flexdatalist.results",[e]);for(var s=0;s<e.length&&!(i>0&&i===s);s++)t._item(e[s]).appendTo(a);t.trigger("shown:flexdatalist.results",[e])},t._item=function(e){for(var a=$("<li>").data("item",e).addClass("item"),i=t._options(),s=i.visibleProperties,n=0;n<s.length;n++){var l=s[n];if((!i.groupBy||i.groupBy!==l)&&r._isDefined(e,l)){var o={};if("thumb"===l)o=$("<img>").addClass("item item-"+l).attr("src",e[l]);else{var u=t._getHighlight(e,l);o=$("<span>").addClass("item item-"+l).html(u+" ")}o.appendTo(a)}}return a},t._getHighlight=function(e,t,a){return r._isDefined(e,t+"_highlight")?e[t+"_highlight"]:r._isDefined(e,t)?e[t]:a},t._getResultsContainer=function(){var e=t;t._options("multiple")&&(e=l);var a=$("ul.flexdatalist-results");return 0===a.length&&(a=$("<ul>").addClass("flexdatalist-results").appendTo("body").css({"border-color":e.css("border-left-color"),"border-width":"1px","border-bottom-left-radius":e.css("border-bottom-left-radius"),"border-bottom-right-radius":e.css("border-bottom-right-radius")}).data("target",n)),a},t._removeResults=function(){return $("ul.flexdatalist-results").remove(),t},t._selected=function(e){var a="flexdatalist-selected";return r._isDefined(e)?(e?t.addClass(a):t.removeClass(a),t):t.hasClass(a)},t._values=function(e){return $.isArray(e)&&!r._isEmpty(e)?void $.each(e,function(e,a){t._value(a)}):void t._value(e)},t._value=function(e){var a=t._options(),s=t._getText(e),r=t._getValue(e);if(s.length>0&&a._values.push(s),a.multiple){if(""===e)return t;n.val("");var o=$("<li>").addClass("value"+(a.toggleSelected?" toggle":"")).append('<span class="text">'+s+"</span>").append('<span class="fdl-remove">&times;</span>').insertBefore(l.find("li.input-container"));o.find("span.fdl-remove").click(function(){var e=$(this).parent(),i=e.index();if(!e.hasClass("disabled")&&(t._toJSON()||t._toCSV())){var s=t._inputValue();s.splice(i,1),a._values.splice(i,1),t._inputValue(s)}e.remove()}),a.toggleSelected&&o.click(function(){var e=$(this),i=t._inputValue(),s=e.index();if(e.hasClass("disabled")){var r=e.data("_value");i.splice(s,0,r),a._values.splice(s,0,t._getText(r)),e.removeClass("disabled")}else{var r=i.splice(s,1);e.data("_value",r[0]),a._values.splice(s,1),e.addClass("disabled")}t._inputValue(i)})}else s&&s!==n.val()&&n.val(s);return t._inputValue(r,s),i=t._keyword(),t},t._inputValue=function(e,a){var i=t._toJSON(),s=t._toCSV();return r._isDefined(e)?(r._isObject(e)&&(i&&!r._isEmpty(e)?e=JSON.stringify(e):s&&(e=e.join(","))),""===e&&t._options("_values",[]),t.val(e),t.trigger("change:flexdatalist",[e,a,t._options()]).trigger("change"),e):(e=t.val(),e?i?e=JSON.parse(e):s&&(e=e.split(",")):(i||s)&&(e=[]),e)},t._getText=function(e){var a=e,i=t._options();return r._isObject(e)&&(a=e[i.searchIn[0]],a=r._isDefined(e,i.textProperty)?e[i.textProperty]:t._replacePlaceholders(e,i.textProperty,a)),$("<div>").html(a).text()},t._getValue=function(e){var a=e,i=t._options();if(r._isObject(e))if(a=e[i.searchIn[0]],"*"===i.valueProperty)a=e;else if(r._isDefined(e,i.valueProperty))a=e[i.valueProperty];else if(t._toJSON()){var a={},s=i.valueProperty,n=i.textProperty;if(n){var l=n;"string"==typeof n&&(l=t._parsePlaceholders(n)),r._isObject(l)&&$.each(l,function(e,t){s.push(t)})}else r._isDefined(e,n)&&s.push(n);$.each(s,function(t,i){r._isDefined(e,i)&&(a[i]=e[i])})}if(i.multiple&&(t._toJSON()||t._toCSV())){var o=t._inputValue();!r._isEmpty(a)&&r._isObject(o)&&(o.push(a),a=o)}return a},t._replacePlaceholders=function(e,a,i){if(r._isObject(e)&&"string"==typeof a){var s=t._parsePlaceholders(a);if(!r._isEmpty(e)&&s)return $.each(s,function(t,i){r._isDefined(e,i)&&(a=a.replace(t,e[i]))}),a}return i},t._parsePlaceholders=function(e){var t=e.match(/\{.+?\}/g);if(t){var a={};return t.map(function(e){a[e]=e.slice(1,-1)}),a}return!1},t._normalizeString=function(e){if("string"==typeof e){var a=t._options("normalizeString");return"function"==typeof a&&(e=a(e)),e.toUpperCase()}return e},t._keyword=function(){return n.val().replace(/^\s+/,"")},t._toJSON=function(){var e=t._options("valueProperty");return r._isObject(e)||"*"===e},t._toCSV=function(){return!t._toJSON()&&t._options("multiple")},t._position=function(){var e=n;t._options("multiple")&&(e=l),$("ul.flexdatalist-results").css({width:e.outerWidth()+"px",top:e.offset().top+e.outerHeight()+"px",left:e.offset().left+"px","z-index":e.css("z-index")+1})},t._datalist(),t._init(),t._initValue(),t._chained(),i=t._keyword()},this._destroy=function(e){e||(e=s),e.each(function(){var e=$(this).data("flexdatalist");$(this).removeClass("flexdatalist-set").off().attr("type","text").val(e&&e.originalValue?e.originalValue:"").data("flexdatalist",null).next(".flexdatalist-alias, ul.flexdatalist-multiple").remove()})},this._reset=function(){this._destroy()},"string"==typeof e)if("function"==typeof this["_"+e]){if(!this["_"+e]())return this}else{if(!t){var n=s.data("flexdatalist");return n[e]}if(t){var n=s.data("flexdatalist");return n[e]=t,s.data("flexdatalist",n),this}}return this._keyNum=function(e){return e.which||e.keyCode},i.data("flexdatalist")||$(document).mouseup(function(e){var t=$(".flexdatalist-results"),a=t.data("target");a&&a.is(":focus")||t.is(e.target)||0!==t.has(e.target).length||t.remove()}).keydown(function(e){var t=$(".flexdatalist-results"),a=t.find("li"),i=a.filter(".active"),s=i.index(),n=a.length,l=r._keyNum(e);if(0!==n)if(13===l)e.preventDefault(),i.click();else if(40===l||38===l){e.preventDefault(),40===l?i=n>s&&i.nextAll(".item").first().length>0?i.removeClass("active").nextAll(".item").first().addClass("active"):a.removeClass("active").filter(".item:first").addClass("active"):38===l&&(i=s>0&&i.prevAll(".item").first().length>0?i.removeClass("active").prevAll(".item").first().addClass("active"):a.removeClass("active").filter(".item:last").addClass("active"));var o=(0===i.prev().length?i:i.prev()).position().top;t.animate({scrollTop:o+t.scrollTop()},100)}}).data("flexdatalist",!0),this._isEmpty=function(e){return r._isDefined(e)?null===e?!0:e===!0?!1:0===this._length(e)?!0:""===$.trim(e):!0},this._isObject=function(e){return e&&"object"==typeof e},this._csvToArray=function(e,t){return 0===e.length?t:"string"==typeof e?e.split(","):e},this._length=function(e){return this._isObject(e)?Object.keys(e).length:"number"==typeof e.length?e.length:0},this._isDefined=function(e,t){var a="undefined"!=typeof e;return a&&"undefined"!=typeof t?"undefined"!=typeof e[t]:a},this.each(a)},$(function(){$("input.flexdatalist:not(.flexdatalist-set)").flexdatalist()});
\ No newline at end of file

console.log removed