PageSourceSearch

https://www.tires-easy-truck.com/_ui/versioned/d95925b249f703e4cdc…/dist/js/chunk-CzqEXzUs.js

js tires-easy-truck.com collected 2026-10-04 04:54:59 UTC 3,191 bytes, 1 lines download raw bytes

1import{K as i}from"./chunk-Dy1_dM2R.js";class c{constructor(e){this.$multiSelect=e,this.elements=this.getElements(),this.state={isOpen:!1,selection:[],focusedIndex:-1},this.bindEvents()}getElements(){return{$button:this.$multiSelect.find(".j-multi-select-button"),$dropdown:this.$multiSelect.find(".j-multi-select-dropdown"),$list:this.$multiSelect.find(".j-multi-select-list"),$input:this.$multiSelect.find(".j-multi-select-input"),$items:this.$multiSelect.find(".j-multi-select-item"),$checkboxes:this.$multiSelect.find(".j-multi-select-checkbox"),$selectedContainer:this.$multiSelect.find(".j-multi-select-selected"),$placeholder:this.$multiSelect.find(".j-multi-select-placeholder")}}bindEvents(){this.elements.$button.on("click",()=>this.toggleDropdown()),this.elements.$items.on("click",e=>this.handleItemClick(e)),this.$multiSelect.on("keydown",e=>this.handleKeyDown(e)),$(document).on("click",e=>{this.$multiSelect.has(e.target).length||this.closeDropdown()})}toggleDropdown(){this.state.isOpen?this.closeDropdown():this.openDropdown()}openDropdown(){this.state.isOpen=!0,this.elements.$dropdown.addClass("show"),this.elements.$button.addClass("open")}closeDropdown(){this.state.isOpen=!1,this.elements.$dropdown.removeClass("show"),this.elements.$button.removeClass("open"),this.state.focusedIndex=-1}handleItemClick(e){e.preventDefault(),e.stopPropagation();const t=$(e.currentTarget),s=t.find(".j-multi-select-checkbox"),l=t.data("value"),o=t.data("label");this.state.focusedIndex=this.elements.$items.index(t),this.updateFocus(),s.prop("checked",!s.prop("checked")),this.updateSelection(l,o,s.prop("checked"))}handleKeyDown(e){if(!this.state.isOpen&&e.keyCode===i.DOWN){e.preventDefault(),this.openDropdown(),this.state.focusedIndex=0,this.updateFocus();return}switch(e.keyCode){case i.UP:e.preventDefault(),this.moveFocus(-1);break;case i.DOWN:e.preventDefault(),this.moveFocus(1);break;case i.ENTER:case i.SPACE:e.preventDefault(),this.state.focusedIndex>=0&&this.elements.$items.eq(this.state.focusedIndex).trigger("click");break;case i.ESC:e.preventDefault(),this.closeDropdown();break}}moveFocus(e){const t=this.elements.$items.length;this.state.focusedIndex=(this.state.focusedIndex+e+t)%t,this.updateFocus()}updateFocus(){this.elements.$items.removeClass("focused"),this.state.focusedIndex>=0&&(this.elements.$items.eq(this.state.focusedIndex).addClass("focused"),this.elements.$items[this.state.focusedIndex].scrollIntoView({block:"nearest"}))}updateSelection(e,t,s){s?this.state.selection.push({value:e,label:t}):this.state.selection=this.state.selection.filter(l=>l.value!==e),this.updateSelectedDisplay()}updateSelectedDisplay(){if(this.state.selection.length===0)this.elements.$selectedContainer.empty(),this.$multiSelect.removeClass("multi-select--populated");else{this.$multiSelect.addClass("multi-select--populated");const t=this.state.selection.map(s=>s.label).join(", ");this.elements.$selectedContainer.html(t)}const e=this.state.selection.map(t=>t.value).join(",");this.elements.$input.val(e),this.$multiSelect.trigger("multiSelect.change",{selectedItems:this.state.selection})}}const h=()=>{$(".j-multi-select").each((n,e)=>{new c($(e))})};export{h as init};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.