1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4884,97082],{67910(f,y,i){"use strict";var b,g;b=[i(36684),i(72254),i(52473),i(17459),i(47283),i(28061),i(7524),i(49897),i(65303),i(29930)],g=(function(h,t,o,n,e,c,a,u,d,r){const s={};let v;s.init=function(){v=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,x(),v&&E(),o.get("account/follow").on("click",()=>w("follow")),o.get("account/unfollow").on("click",()=>w("unfollow")),o.get("account/chat").on("click",async function(){const{roomId:l}=await u.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),m=await app.require("chat");l?m.openChat(l):m.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",D),o.get("account/already-flagged").on("click",k),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,m,p){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:l,position:m},p)},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+")")})},j)}function w(l){if(!app.user.uid){let p;return utils.isNumber(ajaxify.data.uid)?p=config.url+"/user/"+ajaxify.data.uid:p=ajaxify.data.userslug,i.e(91722).then(i.bind(i,91722)).then(({trigger:A})=>{A("follow",{object:p})}),!1}const m=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return u[l==="follow"?"put":"del"]("/users/"+m+"/follow",void 0,function(p){if(p)return r.error(p);o.get("account/follow").toggleClass("hide",l==="follow"),o.get("account/unfollow").toggleClass("hide",l==="unfollow"),r.success("[[global:alert."+l+", "+ajaxify.data.username+"]]")}),!1}function D(){i.e(6574).then(function(){var l=[i(6574)];(function(m){m.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,l)}).catch(i.oe)}function k(){const l=$(this).data("flag-id");i.e(6574).then(function(){var m=[i(6574)];(function(p){d.confirm("[[flags:modal-confirm-rescind]]",function(A){A&&p.rescind(l)})}).apply(null,m)}).catch(i.oe)}function C(l){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:l},function(m,p){if(m)return r.error(m);o.get("account/block").toggleClass("hidden",p),o.get("account/unblock").toggleClass("hidden",!p)}),!1}function j(){d.confirm("[[user:remove-cover-picture-confirm]]",function(l){l&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(m){m?r.error(m):ajaxify.refresh()})})}return s}).apply(y,b),g!==void 0&&(f.exports=g)},47283(f,y,i){"use strict";var b,g;b=[i(49897),i(65303),i(29930)],g=(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,d,r){t.confirm(a,function(s){s&&h.del(`/users/${encodeURIComponent(c)}${u}`,{}).then(()=>
1{if(o.success(d),typeof r=="function")return r()}).catch(o.error)})}return n}).apply(y,b),g!==void 0&&(f.exports=g)},28061(f,y,i){"use strict";var b,g;b=[i(49897),i(65303),i(29930),i(81335)],g=(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(d){h.put("/users/"+encodeURIComponent(a)+"/ban",{until:d.until,reason:d.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(d){h.put("/users/"+a+"/mute",{until:d.until,reason:d.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||""}),d=await n.render(a.tpl,{reasons:u}),r=await t.dialog({title:a.title,message:d,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:a.title,callback:function(){const s=r.find("form").serializeArray().reduce(function(v,x){return v[x.name]=x.value,v},{});if(Object.hasOwn(s,"length")){const x=parseInt(s.unit,10)?24:1;s.until=s.length>0?Date.now()+s.length*36e5*x:0}else s.until=0;a.onSubmit(s)}}}});return r.find("[data-key]").on("click",function(){const s=u.find(v=>String(v.key)===$(this).attr("data-key"));s&&s.body&&r.find('[name="reason"]').val(s.body)}),r}return e.throwModal=c,e}).apply(y,b),g!==void 0&&(f.exports=g)},36684(f,y,i){"use strict";var b,g;b=[i(29930),i(18675)],g=(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(y,b),g!==void 0&&(f.exports=g)},18675(){(function(f){var y=f(window),i=function(t,o,n,e){if(arguments.length===3||e){if(n<t)return t;if(n>o)return o}return n},b=function(t){t.clientX=t.originalEvent.touches[0].clientX,t.clientY=t.originalEvent.touches[0].clientY},g=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,d=e.width/e.height,r=1;d>=u?r=a/e.height:r=c/e.width,n.width=e.width*r,n.height=e.height*r}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=f(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=g(t)),f(window).on("keydown.dbg",c=>{var a=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],u=parseInt(a[1])||0,d=parseInt(a[2])||0;n.units=="percent"&&(u=Math.round(u/-200*e.width),d=Math.round(d/-200*e.height));var r=0,s=0;return c.which===37?r=-5:c.which===39?r=5:c.which===38?s=-5:c.which===40&&(s=5),n.units==="percent"?(u=n.axis==="y"?u:i(-e.width/2,0,u+r,n.bound),d=n.axis==="x"?d:i(-e.height/2,0,d+s,n.bound),t.css("background-position",u/e.width*-200+"% "+d/e.height*-200+"%")):(u=n.axis==="y"?u:i(t.innerWidth()-e.width,0,u+r,n.bound),d=n.axis==="x"?d:i(t.innerHeight()-e.height,0,d+s,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)b(c);else if(c.which!==1)return;var a=c.clientX,u=c.clientY,d=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],r=parseInt(d[1])||0,s=parseInt(d[2])||0;n.units=="percent"&&(r=Math.round(r/-200*e.width),s=Math.round(s/-200*e.height)),y.on("mousemove.dbg touchmove.dbg",function(v){v.preventDefault(),v.originalEvent.touches&&b(v);var x=v.clientX,E=v.clientY;n.units=="percent"?(r=n.axis==="y"?r:i(-e.width/2,0,r+x-a,n.bound),s=n.axis==="x"?s:i(-e.height/2,0,s+E-u,n.bound),t.css("background-position",r/e.width*-200+"% "+s/e.height*-200+"%")):(r=n.axis==="y"?r:i(t.innerWidth()-e.width,0,r+x-a,n.bound),s=n.axis==="x"?s:i(t.innerHeight()-e.height,0,s+E-u,n.bound),t.css("background-position",r+"px "+s+"px")),a=x,u=E}),y.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){n.done&&n.done(),y.off("mousemove.dbg touchmove.dbg"),y.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},h.prototype.disable=function(){var t=f(this.element);t.off("mousedown.dbg touchstart.dbg"),y.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},f.fn.backgroundDraggable=function(t){var o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=f(this),e;typeof t>"u"||typeof t=="object"?(t=f.extend({},f.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))})},f.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.