1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,26832,34271,43602,49897,56418,61462,87212,99127],{26832(D,p,a){var u,g;u=[a(29930),a(49897),a(92619)],g=(function(s,d,o){const E={};E.init=function(){Promise.all([a.e(20056),a.e(6411),a.e(60419),a.e(38636)]).then(function(){var h=[a(38636)];(function(c){$('[component="chat/nav-wrapper"]').on("click",'[component="chat/recent/room"], [component="chat/public/room"]',function(t){t.stopPropagation(),t.preventDefault();const e=this.getAttribute("data-roomid");c.switchChat(e)}).on("click",".mark-read",function(t){t.stopPropagation();const e=this.closest("[data-roomid]");o.toggleReadState(e)});let m=$('[component="chat/recent"]').scrollTop();$('[component="chat/recent"]').on("scroll",utils.debounce(function(){const t=$(this),e=t.scrollTop(),i=e>m?1:-1;m=e;const y=100*(e/(t[0].scrollHeight-t.height()));(i===1&&y>85||i===-1&&y<15)&&w(i)},100))}).apply(null,h)}).catch(a.oe)};async function w(h){const c=$('[component="chat/recent"]');if(c.attr("loading"))return;const m=parseInt(c.attr("data-prevstart"),10)||0;if(h<0&&m<=0)return;const t={uid:ajaxify.data.uid};h>0?t.start=c.attr("data-nextstart"):(t.start=Math.max(0,m-30),t.perPage=m-t.start),c.attr("loading",1);try{const{rooms:e,nextStart:i}=await d.get("/chats",t);e.length&&(await v({rooms:e,nextStart:i},h),h>0?c.attr("data-nextstart",i):c.attr("data-prevstart",t.start))}catch(e){s.error(e)}finally{c.removeAttr("loading")}}async function v(h,c){if(!h.rooms.length)return;c>0?h.loadingMore=!0:h.showBottomHr=!0;const m=await app.parseAndTranslate("chats","rooms",h),t=$('[component="chat/recent"]');if(c>0)t.append(m);else{const e=t.get(0),i=e.scrollHeight;t.prepend(m),e.scrollTop+=e.scrollHeight-i}m.find(".timeago").timeago()}return E}).apply(p,u),g!==void 0&&(D.exports=g)},49897(D,p,a){a.r(p),a.d(p,{del:()=>I,get:()=>m,head:()=>t,patch:()=>i,post:()=>e,put:()=>y});var u=a(91749),g=a.n(u),s=a(65303),d=a(17459),o=a.n(d),E=a(68636),w=a.n(E);const v=config.relative_path+"/api/v3";async function h(n,l){if(n.url=n.url.startsWith("/api")?config.relative_path+n.url:v+n.url,n.headers=n.headers||{},n.headers["x-return-to"]||(n.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof l=="function"){c(n).then(r=>l(null,r),r=>l(r));return}try{return await c(n)}catch(r){if(r.status===401){const{url:f}=await(0,u.fire)("filter:admin.reauth",{url:"login"}),O=await d.translate("[[error:api.reauth-required]]",config.userLang);(0,s.confirm)(O,M=>{M&&(E.setItem("location-hash",window.location.hash),ajaxify.go(f))})}throw r}}async function c(n){const{url:l}=n;delete n.url,n.data&&!(n.data instanceof FormData)&&(n.data=JSON.stringify(n.data||{}),n.headers["content-type"]="application/json; charset=utf-8"),{options:n}=await(0,u.fire)("filter:api.options",{options:n}),n.data&&(n.body=n.data,delete n.data);const r=await fetch(l,n),{headers:f}=r;if(f.get("x-redirect"))return c({url:f.get("x-redirect"),...n});const O=f.get("content-type"),M=O&&O.startsWith("application/json");let P;if(n.method!=="HEAD"&&(M?P=await r.json():P=await r.text()),!r.ok){let T=r.statusText;if(P){const x=M&&(P.status?.message||P.error||""),R=typeof P=="string"?P:r.statusText||`[[error:api.${r.status}]]`;T=M&&x?x:R}const C=new Error(T);throw C.status=r.status,C}return M&&P&&P.hasOwnProperty("status")&&P.hasOwnProperty("response")?P.response:P}function m(n,l,r){return h({url:n+(l&&Object.keys(l).length?"?"+$.param(l):"")},r)}function t(n,l,r){return h({url:n+(l&&Object.keys(l).length?"?"+$.param(l):""),method:"HEAD"},r)}function e(n,l,r,f){return A("POST",n,l,r,f)}function i(n,l,r,f){return A("PATCH",n,l,r,f)}function y(n,l,r,f){return A("PUT",n,l,r,f)}function I(n,l,r,f){return A("DELETE",n,l,r,f)}function A(n,l,r,f,O){return typeof f=="function"&&(O=f,f={}),h({url:l,method:n,data:r,headers:{"x-csrf-token":config.csrf_token,...f}},O)}},65303(D,p,a){a.r(p),a.d(p,{alert:()=>E,confirm:()=>w,dialog:()=>o,prompt:()=>v,promptPassword:()=>h});var u=a(33530),g=a.n(u),s=a(17459),d=a.n(s);u.setDefaults({locale:config.userLang}),s.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{u.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}),u.setLocale(config.userLang)});async function o(t){const[e,i,y]=await Promise.all([s.translate(t.title||""),c(t)||"",m(t.buttons)]);return u.dialog({...t,title:e,message:i,buttons:y})}async function E(t,e){const[i,y]=await Promise.all([t&&t.title?s.translate(t.title):null,c(t)]);return e=typeof e=="function"?e:t.callback,u.alert({...t,title:i,message:y,callback:e})}async function w(t,e){const[i,y]=await Promise.all([t&&t.title?s.translate(t.title):null,c(t)]);return e=typeof e=="function"?e:t.callback,u.confirm({...t,title:i,message:y,callback:e})}async function v(t,e){const[i,y]=await Promise.all([s.translate(typeof t=="string"?t:t.title),t&&t.message?c(t):null]);return e=typeof e=="function"?e:t.callback,u.prompt({...t,title:i,message:y,callback:e})}async function h(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(e=>{v({...t,inputType:"password",required:!0,value:"",callback:e})})}function c(t){const e=t&&t.message?t.message:t;return e instanceof jQuery?e:s.translate(e||"")}async function m(t){if(!Object.keys(t||{}).length)return;const e=Object.values(t);return await Promise.all(e.map(async i=>({...i,label:await s.translateKey(i.label)})))}},68636(D,p,a){var u;u=(function(){function g(){this._store={},this._keys=[]}g.prototype.isMock=!0,g.prototype.setItem=function(o,E){o=String(o),this._keys.indexOf(o)===-1&&this._keys.push(o),this._store[o]=E},g.prototype.getItem=function(o){return o=String(o),this._keys.indexOf(o)===-1?null:this._store[o]},g.prototype.removeItem=function(o){o=String(o),this._keys=this._keys.filter(function(E){return E!==o}),this._store[o]=null},g.prototype.clear=function(){this._keys=[],this._store={}},g.prototype.key=function(o){return o=parseInt(o,10)||0,this._keys[o]},Object.defineProperty&&Object.defineProperty(g.prototype,"length",{get:function(){return this._keys.length}});let s;const d=Date.now().toString();try{if(s=window.localStorage,s.setItem(d,d),s.getItem(d)!==d)throw Error("localStorage behaved unexpectedly");return s.removeItem(d),s}catch(o){console.warn(o),console.warn("localStorage failed, falling back on sessionStorage");try{if(s=window.sessionStorage,s.setItem(d,d),s.getItem(d)!==d)throw Error("sessionStorage behaved unexpectedly");return s.removeItem(d),s}catch(E){return console.warn(E),console.warn("sessionStorage failed, falling back on memory storage"),new g}}}).call(p,a,p,D),u!==void 0&&(D.exports=u)}}]);
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.