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