text: /*!
   * stack-admin-theme (https://pixinvent.com/bootstrap-admin-template/stack)
   * Copyright 2018 PIXINVENT
   * Licensed under the Themeforest Standard Licenses
   */
  !function(window,document,$){"use strict";function escape(string){return string?String(string).replace(/[&<>"']/g,function(match){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[match]}):""}function queryFunction(query){var results,selectivity=query.selectivity,term=query.term,offset=query.offset||0;if("single-input-with-submenus"===selectivity.$el.attr("id")){if(!selectivity.dropdown)return void query.callback({more:!1,results:[]});var timezone=selectivity.dropdown.highlightedResult.id;results=citiesWithTimezone.filter(function(city){return transformText(city.id).indexOf(transformText(term))>-1&&city.timezone===timezone}).map(function(city){return city.id})}else results=cities.filter(function(city){return transformText(city).indexOf(transformText(term))>-1});results.sort(function(a,b){a=transformText(a),b=transformText(b);var startA=a.slice(0,term.length)===term,startB=b.slice(0,term.length)===term;return startA?startB&&a>b?1:-1:startB?1:a>b?1:-1}),setTimeout(function(){query.callback({more:results.length>offset+10,results:results.slice(offset,offset+10)})},500)}var cities=$("#single-select-box").find("option").map(function(){return this.textContent}).get(),citiesByCountry=$("#multiple-select-box").find("optgroup").map(function(){return{text:this.getAttribute("label"),children:$(this).find("option").map(function(){return{id:parseInt(this.getAttribute("value"),10),text:this.textContent}}).get()}}).get(),citiesWithTimezone=$("#multiple-select-box").find("option").map(function(){return{id:this.textContent,timezone:this.getAttribute("data-timezone")}}).get(),transformText=$.fn.selectivity.transformText;$(".single-input").selectivity({allowClear:!0,placeholder:"No city selected",query:queryFunction,searchInputPlaceholder:"Type to search a city"}),$(".single-input-without-search").selectivity({allowClear:!0,items:cities,placeholder:"No city selected"}),$(".single-input-with-labels").selectivity({allowClear:!0,items:citiesByCountry,placeholder:"No city selected",searchInputPlaceholder:"Type to search a city"});var submenu={query:queryFunction,showSearchInput:!0};$(".single-input-with-submenus").selectivity({allowClear:!0,items:[{text:"Western European Time Zone",id:"+00:00",submenu:submenu},{text:"Central European Time Zone",id:"+01:00",submenu:submenu},{text:"Eastern European Time Zone",id:"+02:00",submenu:submenu}],placeholder:"No city selected",showSearchInputInDropdown:!1}),$(".multiple-input").selectivity({multiple:!0,placeholder:"Type to search cities",query:queryFunction}),$(".tags-input").selectivity({items:["red","green","blue"],multiple:!0,tokenSeparators:[" "],value:["brown","red","green"]}),$(".emails-input").selectivity({inputType:"Email",placeholder:"Type or paste email addresses"}),$(".single-select-box").selectivity(),$(".without-search-box").selectivity({showSearchInputInDropdown:!1}),$(".multiple-select-box").selectivity(),$(".repository-input").selectivity({ajax:{url:"https://api.github.com/search/repositories",dataType:"json",minimumInputLength:3,quietMillis:250,params:function(term,offset){var page=1+Math.floor(offset/30);return{q:term,page:page}},processItem:function(item){return{id:item.id,text:item.name,description:item.description}},results:function(data,offset){return{results:data.items,more:data.total_count>offset+data.items.length}}},placeholder:"Search for a repository",templates:{resultItem:function(item){return'<div class="selectivity-result-item" data-item-id="'+item.id+'"><b>'+escape(item.text)+"</b><br>"+escape(item.description)+"</div>"}}})}(window,document,jQuery);