1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,42289,43602,49897,87212,99127],{28061(D,w,s){var c,h;c=[s(49897),s(65303),s(29930),s(81335)],h=(function(o,m,r,y){const _={};_.banAccount=function(i,l){i=i||ajaxify.data.theirid,O({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(P){o.put("/users/"+encodeURIComponent(i)+"/ban",{until:P.until,reason:P.reason||""}).then(()=>{if(typeof l=="function")return l();ajaxify.refresh()}).catch(r.error)}})},_.unbanAccount=function(i){O({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(l){o.del("/users/"+encodeURIComponent(i)+"/ban",{reason:l.reason||""}).then(()=>{ajaxify.refresh()}).catch(r.error)}})},_.muteAccount=function(i,l){i=i||ajaxify.data.theirid,O({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(P){o.put("/users/"+i+"/mute",{until:P.until,reason:P.reason||""}).then(()=>{if(typeof l=="function")return l();ajaxify.refresh()}).catch(r.error)}})},_.unmuteAccount=function(i){O({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(l){o.del("/users/"+i+"/mute",{reason:l.reason||""}).then(()=>{ajaxify.refresh()}).catch(r.error)}})};async function O(i){const l=await socket.emit("user.getCustomReasons",{type:i.type||""}),P=await y.render(i.tpl,{reasons:l}),t=await m.dialog({title:i.title,message:P,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:i.title,callback:function(){const n=t.find("form").serializeArray().reduce(function(f,g){return f[g.name]=g.value,f},{});if(Object.hasOwn(n,"length")){const g=parseInt(n.unit,10)?24:1;n.until=n.length>0?Date.now()+n.length*36e5*g:0}else n.until=0;i.onSubmit(n)}}}});return t.find("[data-key]").on("click",function(){const n=l.find(f=>String(f.key)===$(this).attr("data-key"));n&&n.body&&t.find('[name="reason"]').val(n.body)}),t}return _.throwModal=O,_}).apply(w,c),h!==void 0&&(D.exports=h)},49897(D,w,s){s.r(w),s.d(w,{del:()=>A,get:()=>P,head:()=>t,patch:()=>f,post:()=>n,put:()=>g});var c=s(91749),h=s.n(c),o=s(65303),m=s(17459),r=s.n(m),y=s(68636),_=s.n(y);const O=config.relative_path+"/api/v3";async function i(e,u){if(e.url=e.url.startsWith("/api")?config.relative_path+e.url:O+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 u=="function"){l(e).then(a=>u(null,a),a=>u(a));return}try{return await l(e)}catch(a){if(a.message===await m.translate("[[error:api.401]]",config.userLang)){const{url:d}=await(0,c.fire)("filter:admin.reauth",{url:"login"}),b=await m.translate("[[error:api.reauth-required]]",config.userLang);(0,o.confirm)(b,M=>{M&&(y.setItem("location-hash",window.location.hash),ajaxify.go(d))})}throw a}}async function l(e){const{url:u}=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,c.fire)("filter:api.options",{options:e}),e.data&&(e.body=e.data,delete e.data);const a=await fetch(u,e),{headers:d}=a;if(d.get("x-redirect"))return l({url:d.get("x-redirect"),...e});const b=d.get("content-type"),M=b&&b.startsWith("application/json");let E;if(e.method!=="HEAD"&&(M?E=await a.json():E=await a.text()),!a.ok){if(E){const v=M&&(E.status?.message||E.error||""),p=typeof E=="string"?E:a.statusText||`[[error:api.${a.status}]]`;throw new Error(M&&v?v:p)}throw new Error(a.statusText)}return M&&E&&E.hasOwnProperty("status")&&E.hasOwnProperty("response")?E.response:E}function P(e,u,a){return i({url:e+(u&&Object.keys(u).length?"?"+$.param(u):"")},a)}function t(e,u,a){return i({url:e+(u&&Object.keys(u).length?"?"+$.param(u):""),method:"HEAD"},a)}function n(e,u,a,d){return I("POST",e,u,a,d)}function f(e,u,a,d){return I("PATCH",e,u,a,d)}function g(e,u,a,d){return I("PUT",e,u,a,d)}function A(e,u,a,d){return I("DELETE",e,u,a,d)}function I(e,u,a,d,b){return typeof d=="function"&&(b=d,d={}),i({url:u,method:e,data:a,headers:{"x-csrf-token":config.csrf_token,...d}},b)}},65303(D,w,s){s.r(w),s.d(w,{alert:()=>y,confirm:()=>_,dialog:()=>r,prompt:()=>O,promptPassword:()=>i});var c=s(33530),h=s.n(c),o=s(17459),m=s.n(o);c.setDefaults({locale:config.userLang}),o.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(t=>{c.addLocale(config.userLang,{OK:t[0],CANCEL:t[1],CONFIRM:t[2]}
1),c.setLocale(config.userLang)});async function r(t){const[n,f,g]=await Promise.all([o.translate(t.title||""),l(t)||"",P(t.buttons)]);return c.dialog({...t,title:n,message:f,buttons:g})}async function y(t,n){const[f,g]=await Promise.all([t&&t.title?o.translate(t.title):null,l(t)]);return n=typeof n=="function"?n:t.callback,c.alert({...t,title:f,message:g,callback:n})}async function _(t,n){const[f,g]=await Promise.all([t&&t.title?o.translate(t.title):null,l(t)]);return n=typeof n=="function"?n:t.callback,c.confirm({...t,title:f,message:g,callback:n})}async function O(t,n){const[f,g]=await Promise.all([o.translate(typeof t=="string"?t:t.title),t&&t.message?l(t):null]);return n=typeof n=="function"?n:t.callback,c.prompt({...t,title:f,message:g,callback:n})}async function i(t){return typeof t=="string"&&(t={title:t}),t=t||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(n=>{O({...t,inputType:"password",required:!0,value:"",callback:n})})}function l(t){const n=t&&t.message?t.message:t;return n instanceof jQuery?n:o.translate(n||"")}async function P(t){if(!Object.keys(t||{}).length)return;const n=Object.values(t);return await Promise.all(n.map(async f=>({...f,label:await o.translateKey(f.label)})))}},68636(D,w,s){var c;c=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(r,y){r=String(r),this._keys.indexOf(r)===-1&&this._keys.push(r),this._store[r]=y},h.prototype.getItem=function(r){return r=String(r),this._keys.indexOf(r)===-1?null:this._store[r]},h.prototype.removeItem=function(r){r=String(r),this._keys=this._keys.filter(function(y){return y!==r}),this._store[r]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(r){return r=parseInt(r,10)||0,this._keys[r]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let o;const m=Date.now().toString();try{if(o=window.localStorage,o.setItem(m,m),o.getItem(m)!==m)throw Error("localStorage behaved unexpectedly");return o.removeItem(m),o}catch(r){console.warn(r),console.warn("localStorage failed, falling back on sessionStorage");try{if(o=window.sessionStorage,o.setItem(m,m),o.getItem(m)!==m)throw Error("sessionStorage behaved unexpectedly");return o.removeItem(m),o}catch(y){return console.warn(y),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(w,s,w,D),c!==void 0&&(D.exports=c)}}]);
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.