1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,34271,37147,49897,99127],{53309(P,d,c){var i,f;i=[c(52473),c(49897),c(29930)],f=(function(h,v,y){const u={};let o=[];u.init=function(n){n=n||{},o.length=0,h.get("chat/search").on("keyup",utils.debounce(A,250));const s=$('[component="chat/search/list"]');s.on("click","[data-uid]",function(){n.onSelect&&n.onSelect(o.find(e=>String(e.uid)===String($(this).attr("data-uid")))),g(s)})};function g(n){h.get("chat/search").val(""),m(n),n.find('[component="chat/search/no-users"]').addClass("hidden"),n.find('[component="chat/search/start-typing"]').removeClass("hidden")}function A(){const n=$('[component="chat/search/list"]'),s=h.get("chat/search").val();if(!s)return g(n);n.find('[component="chat/search/start-typing"]').addClass("hidden"),v.get("/api/users",{query:s,searchBy:"username",paginate:!1}).then(D).catch(y.error)}function m(n){o.length=0,n.find("[data-uid]").remove()}async function D(n){const s=$('[component="chat/search/list"]');if(m(s),n.users=n.users.filter(function(r){return parseInt(r.uid,10)!==parseInt(app.user.uid,10)}),o=n.users,!n.users.length)return s.find('[component="chat/search/no-users"]').removeClass("hidden");s.find('[component="chat/search/no-users"]').addClass("hidden");const e=await app.parseAndTranslate("modals/create-room","searchUsers",{searchUsers:n.users});s.append(e),s.parent().toggleClass("show",!0)}return u}).apply(d,i),f!==void 0&&(P.exports=f)},49897(P,d,c){c.r(d),c.d(d,{del:()=>s,get:()=>g,head:()=>A,patch:()=>D,post:()=>m,put:()=>n});var i=c(91749),f=c.n(i),h=c(33530),v=c.n(h);const y=config.relative_path+"/api/v3";async function u(e,r){if(e.url=e.url.startsWith("/api")?config.relative_path+e.url:y+e.url,typeof r=="function"){o(e).then(t=>r(null,t),t=>r(t));return}try{return await o(e)}catch(t){if(t.message==="A valid login session was not found. Please log in and try again."){const{url:l}=await(0,i.fire)("filter:admin.reauth",{url:"login"});return(0,h.confirm)("[[error:api.reauth-required]]",E=>{E&&ajaxify.go(l)})}throw t}}async function o(e){const{url:r}=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,i.fire)("filter:api.options",{options:e}),e.data&&(e.body=e.data,delete e.data);const t=await fetch(r,e),{headers:l}=t;if(l.get("x-redirect"))return o({url:l.get("x-redirect"),...e});const E=l.get("content-type"),p=E&&E.startsWith("application/json");let a;if(e.method!=="HEAD"&&(p?a=await t.json():a=await t.text()),!t.ok){if(a){const C=p&&(a.status?.message||a.error||"");throw new Error(p&&C?C:a)}throw new Error(t.statusText)}return p&&a&&a.hasOwnProperty("status")&&a.hasOwnProperty("response")?a.response:a}function g(e,r,t){return u({url:e+(r&&Object.keys(r).length?"?"+$.param(r):"")},t)}function A(e,r,t){return u({url:e+(r&&Object.keys(r).length?"?"+$.param(r):""),method:"HEAD"},t)}function m(e,r,t){return u({url:e,method:"POST",data:r,headers:{"x-csrf-token":config.csrf_token}},t)}function D(e,r,t){return u({url:e,method:"PATCH",data:r,headers:{"x-csrf-token":config.csrf_token}},t)}function n(e,r,t){return u({url:e,method:"PUT",data:r,headers:{"x-csrf-token":config.csrf_token}},t)}function s(e,r,t){return u({url:e,method:"DELETE",data:r,headers:{"x-csrf-token":config.csrf_token}},t)}}}]);
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.