1import{Controller}from"@hotwired/stimulus";const HARD_STOP_SECONDS=320;export default class extends Controller{static values={url:String,interval:Number,frame:String};initialize(){(isNaN(this.intervalValue)||this.intervalValue<3)&&(console.warn("Poll interval must be greater than 3 seconds. Defaulting to 20 seconds."),this.intervalValue=20)}connect(){this.pollInterval=setInterval((()=>this.poll()),1e3*this.intervalValue),this.pollTimeout=setTimeout((()=>this.hardStop()),1e3*HARD_STOP_SECONDS)}hardStop(){this.clearPollInterval(),Turbo.visit(this.urlValue)}async poll(){const l=new URL(this.urlValue);l.searchParams.append("poll",!0),Turbo.visit(l,{frame:this.frameValue})}disconnect(){this.clearPollInterval()}clearPollInterval(){clearInterval(this.pollInterval),clearTimeout(this.pollTimeout)}}
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.