1import{Controller}from"@hotwired/stimulus";export default class extends Controller{static targets=["audio","btn","time"];toggle(){this.audioTarget.paused?(this.audioTarget.play(),this.btnTarget.textContent="â¸"):(this.audioTarget.pause(),this.btnTarget.textContent="â¶")}audioTargetConnected(){const e=this.audioTarget;e.addEventListener("ended",()=>{this.btnTarget.textContent="â¶",this.timeTarget.textContent=this.format(e.duration)}),e.addEventListener("loadedmetadata",()=>{this.timeTarget.textContent=this.format(e.duration)}),e.addEventListener("timeupdate",()=>{this.timeTarget.textContent=this.format(e.currentTime)})}format(e){if(!isFinite(e))return"0:00";const t=Math.floor(e/60);return`${t}:${Math.floor(e%60).toString().padStart(2,"0")}`}}
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.