1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4884,62648,97082],{67910(g,p,i){"use strict";var m,f;m=[i(36684),i(72254),i(52473),i(17459),i(47283),i(28061),i(7524),i(49897),i(65303),i(29930)],f=(function(h,t,o,n,e,c,a,u,r,s){const d={};let b;d.init=function(){b=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,x(),b&&E(),o.get("account/follow").on("click",()=>D("follow")),o.get("account/unfollow").on("click",()=>D("unfollow")),o.get("account/chat").on("click",async function(){const{roomId:l}=await u.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),v=await app.require("chat");l?v.openChat(l):v.newChat(ajaxify.data.uid)}),o.get("account/new-chat").on("click",async function(){(await app.require("chat")).newChat(ajaxify.data.uid,function(){o.get("account/chat").parent().removeClass("hidden")})}),o.get("account/ban").on("click",()=>c.banAccount(ajaxify.data.theirid)),o.get("account/mute").on("click",()=>c.muteAccount(ajaxify.data.theirid)),o.get("account/unban").on("click",()=>c.unbanAccount(ajaxify.data.theirid)),o.get("account/unmute").on("click",()=>c.unmuteAccount(ajaxify.data.theirid)),o.get("account/delete-account").on("click",()=>e.account(ajaxify.data.theirid)),o.get("account/delete-content").on("click",()=>e.content(ajaxify.data.theirid)),o.get("account/delete-all").on("click",()=>e.purge(ajaxify.data.theirid)),o.get("account/flag").on("click",w),o.get("account/already-flagged").on("click",j),o.get("account/block").on("click",()=>C("block")),o.get("account/unblock").on("click",()=>C("unblock"))};function x(){$('[component="profile/change/picture"]').on("click",function(){return a.openChangeModal(),!1})}function E(){h.init(o.get("account/cover"),function(l,v,y){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:l,position:v},y)},function(){t.show({title:"[[user:upload-cover-picture]]",socketMethod:"user.updateCover",aspectRatio:NaN,allowSkippingCrop:!0,restrictImageDimension:!1,paramName:"uid",paramValue:ajaxify.data.theirid,accept:".png,.jpg,.bmp"},function(l){l=(l.startsWith("http")?"":config.relative_path)+l+"?"+Date.now(),o.get("account/cover").css("background-image","url("+l+")")})},k)}function D(l){if(!app.user.uid){let y;return utils.isNumber(ajaxify.data.uid)?y=config.url+"/user/"+ajaxify.data.uid:y=ajaxify.data.userslug,i.e(91722).then(i.bind(i,91722)).then(({trigger:A})=>{A("follow",{object:y})}),!1}const v=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return u[l==="follow"?"put":"del"]("/users/"+v+"/follow",void 0,function(y){if(y)return s.error(y);o.get("account/follow").toggleClass("hide",l==="follow"),o.get("account/unfollow").toggleClass("hide",l==="unfollow"),s.success("[[global:alert."+l+", "+ajaxify.data.username+"]]")}),!1}function w(){i.e(6574).then(function(){var l=[i(6574)];(function(v){v.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,l)}).catch(i.oe)}function j(){const l=$(this).data("flag-id");i.e(6574).then(function(){var v=[i(6574)];(function(y){r.confirm("[[flags:modal-confirm-rescind]]",function(A){A&&y.rescind(l)})}).apply(null,v)}).catch(i.oe)}function C(l){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:l},function(v,y){if(v)return s.error(v);o.get("account/block").toggleClass("hidden",y),o.get("account/unblock").toggleClass("hidden",!y)}),!1}function k(){r.confirm("[[user:remove-cover-picture-confirm]]",function(l){l&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(v){v?s.error(v):ajaxify.refresh()})})}return d}).apply(p,m),f!==void 0&&(g.exports=f)},41326(g,p,i){"use strict";var m,f;m=[i(67910),i(52473),i(49897),i(29930)],f=(function(h,t,o,n){const e={};return e.init=function(){h.init(),e.prepareSessionRevocation()},e.prepareSessionRevocation=function(){t.get("user/sessions").on("click","[data-action]",function(){const c=$(this).parents("[data-uuid]"),a=c.attr("data-uuid");a&&o.del(`/users/${ajaxify.data.uid}/sessions/${a}`,{}).then(()=>{c.remove()}).catch(u=>{try{const r=JSON.parse(u.responseText);r.loggedIn===!1&&(window.location.href=config.relative_path+"/login?error="+r.title),n.error(r.title)}catch(r){console.error(r),n.error("[[error:invalid-data]]")}})})},e}
1).apply(p,m),f!==void 0&&(g.exports=f)},47283(g,p,i){"use strict";var m,f;m=[i(49897),i(65303),i(29930)],f=(function(h,t,o){const n={};n.account=function(c,a){e(c,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",a)},n.content=function(c,a){e(c,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",a)},n.purge=function(c,a){e(c,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",a)};function e(c,a,u,r,s){t.confirm(a,function(d){d&&h.del(`/users/${encodeURIComponent(c)}${u}`,{}).then(()=>{if(o.success(r),typeof s=="function")return s()}).catch(o.error)})}return n}).apply(p,m),f!==void 0&&(g.exports=f)},28061(g,p,i){"use strict";var m,f;m=[i(49897),i(65303),i(29930),i(81335)],f=(function(h,t,o,n){const e={};e.banAccount=function(a,u){a=a||ajaxify.data.theirid,c({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(r){h.put("/users/"+encodeURIComponent(a)+"/ban",{until:r.until,reason:r.reason||""}).then(()=>{if(typeof u=="function")return u();ajaxify.refresh()}).catch(o.error)}})},e.unbanAccount=function(a){c({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(u){h.del("/users/"+encodeURIComponent(a)+"/ban",{reason:u.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})},e.muteAccount=function(a,u){a=a||ajaxify.data.theirid,c({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(r){h.put("/users/"+a+"/mute",{until:r.until,reason:r.reason||""}).then(()=>{if(typeof u=="function")return u();ajaxify.refresh()}).catch(o.error)}})},e.unmuteAccount=function(a){c({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(u){h.del("/users/"+a+"/mute",{reason:u.reason||""}).then(()=>{ajaxify.refresh()}).catch(o.error)}})};async function c(a){const u=await socket.emit("user.getCustomReasons",{type:a.type||""}),r=await n.render(a.tpl,{reasons:u}),s=await t.dialog({title:a.title,message:r,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:a.title,callback:function(){const d=s.find("form").serializeArray().reduce(function(b,x){return b[x.name]=x.value,b},{});if(Object.hasOwn(d,"length")){const x=parseInt(d.unit,10)?24:1;d.until=d.length>0?Date.now()+d.length*36e5*x:0}else d.until=0;a.onSubmit(d)}}}});return s.find("[data-key]").on("click",function(){const d=u.find(b=>String(b.key)===$(this).attr("data-key"));d&&d.body&&s.find('[name="reason"]').val(d.body)}),s}return e.throwModal=c,e}).apply(p,m),f!==void 0&&(g.exports=f)},36684(g,p,i){"use strict";var m,f;m=[i(29930),i(18675)],f=(function(h){const t={coverEl:null,saveFn:null};t.init=function(n,e,c,a){t.coverEl=n,t.saveFn=e,n.find(".upload").on("click",c),n.find(".resize").on("click",function(){o(n)}),n.find(".remove").on("click",a),n.on("dragover",t.onDragOver).on("drop",t.onDrop),n.find(".save").on("click",t.save),n.addClass("initialised")},t.onDragOver=function(n){n.stopPropagation(),n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="copy"},t.onDrop=function(n){n.stopPropagation(),n.preventDefault();const e=n.originalEvent.dataTransfer.files,c=new FileReader;e.length&&e[0].type.match("image.*")&&(c.onload=function(a){t.coverEl.css("background-image","url("+a.target.result+")"),t.newCover=a.target.result},c.readAsDataURL(e[0]),o(t.coverEl))};function o(n){n.toggleClass("active",1).backgroundDraggable({axis:"y",units:"percent"}),h.alert({alert_id:"drag_start",title:"[[modules:cover.dragging-title]]",message:"[[modules:cover.dragging-message]]",timeout:5e3})}return t.save=function(){t.coverEl.addClass("saving"),t.saveFn(t.newCover||void 0,t.coverEl.css("background-position"),function(n){n?h.error(n):(t.coverEl.toggleClass("active",0),t.coverEl.backgroundDraggable("disable"),t.coverEl.off("dragover",t.onDragOver),t.coverEl.off("drop",t.onDrop),h.success("[[modules:cover.saved]]")),t.coverEl.removeClass("saving")})},t}).apply(p,m),f!==void 0&&(g.exports=f)},18675(){(function(g){var p=g(window),i=function(t,o,n,e){if(arguments.length===3||e){if(n<t)return t;if(n>o)return o}return n},m=function(t){t.clientX=t.originalEvent.touches[0].clientX,t.clientY=t.originalEvent.touches[0].clientY},f=function(t){var o=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1];if(o){var n={width:0,height:0},e=new Image;return e.onload=function(){if(t.css("background-size")=="cover"){var c=t.innerWidth(),a=t.innerHe
1ight(),u=c/a,r=e.width/e.height,s=1;r>=u?s=a/e.height:s=c/e.width,n.width=e.width*s,n.height=e.height*s}else n.width=e.width,n.height=e.height},e.src=o,n}};function h(t,o){this.element=t,this.options=o,this.init()}h.prototype.init=function(){var t=g(this.element),o=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1],n=this.options;if(o){var e={width:0,height:0};(n.bound||n.units=="percent")&&(e=f(t)),g(window).on("keydown.dbg",c=>{var a=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],u=parseInt(a[1])||0,r=parseInt(a[2])||0;n.units=="percent"&&(u=Math.round(u/-200*e.width),r=Math.round(r/-200*e.height));var s=0,d=0;return c.which===37?s=-5:c.which===39?s=5:c.which===38?d=-5:c.which===40&&(d=5),n.units==="percent"?(u=n.axis==="y"?u:i(-e.width/2,0,u+s,n.bound),r=n.axis==="x"?r:i(-e.height/2,0,r+d,n.bound),t.css("background-position",u/e.width*-200+"% "+r/e.height*-200+"%")):(u=n.axis==="y"?u:i(t.innerWidth()-e.width,0,u+s,n.bound),r=n.axis==="x"?r:i(t.innerHeight()-e.height,0,r+d,n.bound)),[37,38,39,40].includes(c.which)?!1:void 0}),t.on("mousedown.dbg touchstart.dbg",function(c){if(c.target===t[0]){if(c.preventDefault(),c.originalEvent.touches)m(c);else if(c.which!==1)return;var a=c.clientX,u=c.clientY,r=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],s=parseInt(r[1])||0,d=parseInt(r[2])||0;n.units=="percent"&&(s=Math.round(s/-200*e.width),d=Math.round(d/-200*e.height)),p.on("mousemove.dbg touchmove.dbg",function(b){b.preventDefault(),b.originalEvent.touches&&m(b);var x=b.clientX,E=b.clientY;n.units=="percent"?(s=n.axis==="y"?s:i(-e.width/2,0,s+x-a,n.bound),d=n.axis==="x"?d:i(-e.height/2,0,d+E-u,n.bound),t.css("background-position",s/e.width*-200+"% "+d/e.height*-200+"%")):(s=n.axis==="y"?s:i(t.innerWidth()-e.width,0,s+x-a,n.bound),d=n.axis==="x"?d:i(t.innerHeight()-e.height,0,d+E-u,n.bound),t.css("background-position",s+"px "+d+"px")),a=x,u=E}),p.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){n.done&&n.done(),p.off("mousemove.dbg touchmove.dbg"),p.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},h.prototype.disable=function(){var t=g(this.element);t.off("mousedown.dbg touchstart.dbg"),p.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},g.fn.backgroundDraggable=function(t){var o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=g(this),e;typeof t>"u"||typeof t=="object"?(t=g.extend({},g.fn.backgroundDraggable.defaults,t),e=new h(this,t),n.data("dbg",e)):typeof t=="string"&&n.data("dbg")&&(e=n.data("dbg"),h.prototype[t].apply(e,o))})},g.fn.backgroundDraggable.defaults={bound:!0,axis:void 0,units:"pixels"}})(jQuery)}}]);
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.