/*! yii2port - v1.0.0 - 2024-10-24 12:24:30 */
var topSearch=function(){var a={topSearchBox:".top-search-box",mainSearch:"form.main-search",searchTags:".tags-left",resizeTimeId:null,orientationchangeResized:!1},b=function(){var b=document.querySelectorAll(a.topSearchBox);HTMLCollection.prototype.forEach=Array.prototype.forEach,NodeList.prototype.forEach=Array.prototype.forEach,b.forEach(function(a,b){a.classList.add("ontouchstart"in window?"touch":"no-touch")},this),"ontouchstart"in window&&"onorientationchange"in window?window.addEventListener("orientationchange",function(){a.orientationchangeResized=!1,window.addEventListener("resize",function(){a.orientationchangeResized?(document.querySelector(".tags.desktop").classList.remove("hide"),document.querySelector(".tags.mobile").classList.add("hide")):(document.querySelector(".tags.desktop").classList.add("hide"),document.querySelector(".tags.mobile").classList.remove("hide")),a.orientationchangeResized||(e(),a.orientationchangeResized=!0)})}):window.addEventListener("resize",e)},c=function(b,c){if(void 0===b)return!1;var d=void 0===c?"add":c;document.querySelectorAll(a.topSearchBox).forEach(function(c,e){if(null===c.offsetParent||void 0===c.querySelectorAll(a.searchTags)[0])return!1;var f=c.querySelectorAll(a.searchTags)[0];"add"===d?f.classList.add(b):f.classList.remove(b)},this)},d=function(){document.querySelectorAll(a.topSearchBox).forEach(function(b,c){if(null===b.offsetParent||void 0===b.querySelectorAll(a.searchTags)[0])return!1;var d=b.querySelectorAll(a.searchTags)[0];window.innerWidth<=480?(document.querySelector(".tags.desktop").classList.add("hide"),document.querySelector(".tags.mobile").classList.remove("hide")):"ontouchstart"in window&&window.innerWidth<=640&&d.classList.contains("expand")?(document.querySelector(".tags.desktop").classList.add("hide"),document.querySelector(".tags.mobile").classList.remove("hide")):window.innerWidth<=736&&d.classList.add("no-fit"),d.classList.add("visible")},this)},e=function(){c("visible","remove"),window.clearTimeout(a.resizeTimeId),a.resizeTimeId=window.setTimeout(function(){c("no-fit","remove"),d(),c("visible","add")},0)};return{init:function(){b(),d()},groupTags:function(){d()}}}();topSearch.init();
//# sourceMappingURL=top-search-box.min.js.map