{"version":3,"file":"conversations_controller-CbeSH-Iy.js","sources":["../../../app/javascript/controllers/conversations/conversations_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\nimport { Turbo } from \"@hotwired/turbo-rails\"\n\nexport default class extends Controller {\n static targets = [\"next\"]\n\n connect() {\n this.element.addEventListener(\"scroll\", this.scroll.bind(this))\n }\n\n scroll() {\n if (\n this.element.scrollTop < this.element.scrollHeight - 50 &&\n this.hasNextTarget\n ) {\n this.nextTarget.click()\n }\n }\n}\n"],"names":["conversations_controller","Controller","__publicField"],"mappings":"mPAGe,MAAKA,UAASC,CAAW,CAGtC,SAAU,CACR,KAAK,QAAQ,iBAAiB,SAAU,KAAK,OAAO,KAAK,IAAI,CAAC,CAClE,CAEE,QAAS,CAEL,KAAK,QAAQ,UAAY,KAAK,QAAQ,aAAe,IACrD,KAAK,eAEL,KAAK,WAAW,MAAK,CAE3B,CACA,CAdEC,EADkBF,EACX,UAAU,CAAC,MAAM"}