PageSourceSearch

https://www.bscotch.net/js/FeedbagEntry-CL6pCi7A.js

js bscotch.net collected 2026-09-24 09:03:43 UTC 14,100 bytes, 3 lines download raw bytes

1const __vite__fileDeps=["js/UserSupportWidget-ComcyvAt.js","js/index-kY4EFsKJ.js","css/index-BuRDkfm_.css","js/ConfirmationLink-DojKIMzt.js","css/UserSupportWidget-o7wvBda4.css","js/TicketMaker-CScEIXLN.js","css/TicketMaker-BBL9FAv-.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2import{d as k,_ as w,a as c,o as t,c as o,f as m,g as p,t as u,q as a,K as R,r as b,n as f,b as d,w as h,z as j,C as F,P as A,Q as D,I as z,a8 as O,M as r,F as g,e as S,a9 as B}from"./index-kY4EFsKJ.js";import{m as V}from"./md2html-DV_Sq4v2.js";import{F as q,u as H}from"./FeedbagForm-BWHq9Ha5.js";import{c as P}from"./currentUser-CpDsBtqW.js";import{f as N,a as Y}from"./feedbag-D4jpdawA.js";import{p as _}from"./people-DEnJhOI8.js";import{C as G}from"./ConfirmationLink-DojKIMzt.js";import"./marked.esm-gV2jD0VQ.js";import"./pixelRatio-BxNCYp4s.js";import"./valid-Dr2s-XAU.js";import"./MarkdownEditor-DJGVwK_y.js";import"./prism-g2CvQ9jZ.js";const K=k({props:["url","downloadText"],computed:{filename(){const e=(this.url||"").toLowerCase().replace(/\?.*$/,"").replace(/[/]+$/,"").match(/([^/]+)$/);return e?e[1]:""},isRedacted(){return this.url==="[REDACTED]"},ext(){const e=this.filename.split(".");return e[e.length-1]},isImage(){return["jpg","jpeg","png","gif","bmp"].includes(this.ext)},isVideo(){return["webm","mp4","wav"].includes(this.ext)},isDownload(){return!this.isImage&&!this.isVideo}}}),Q={key:0,class:"red"},W={key:1,class:"preview-or-download"},X=["download","title","href"],J=["src"],Z=["src"];function x(e,n,I,v,$,C){const i=c("icon");return e.isRedacted?(t(),o("div",Q,[m(i,{icon:["fa","eye-slash"]}),p(" Attachment redacted. Only visible to staff and the author. ")])):e.url?(t(),o("div",W,[e.isDownload?(t(),o("a",{key:0,download:e.filename,class:"download-link",title:`Download ${e.filename}`,href:e.url},[m(i,{icon:["fas","file-download"]}),p(" "+u(e.downloadText),1)],8,X)):e.isImage?(t(),o("img",{key:1,loading:"lazy",src:e.url},null,8,J)):e.isVideo?(t(),o("video",{key:2,src:e.url,controls:""}," Your browser does not support HTML5 video. ",8,Z)):a("",!0)])):a("",!0)}const ee=w(K,[["render",x]]),te=k({mixins:[P,R],props:["crateItem","sendReportFunction","title","data","subtle"],emits:["submitted","failed"],data(){return{isOpen:!1,reason:"",submitted:!1,submitting:!1}},methods:{async submit(){this.submitting=!0;try{if(!this.sendReportFunction&&!this.crateItem)throw new Error("No reporting function defined");if(this.crateItem)if(this.crateItem.crateId){if(this.crateItem.itemId&&this.crateItem.name)throw new Error("Use itemId XOR name (not both)");if(!(this.crateItem.itemId||this.crateItem.name))throw new Error("Either itemId or name required")}else throw new Error("CrateID required!");if(this.sendReportFunction&&await this.sendReportFunction(this.reason,this.data),this.crateItem){const e=this.crateItem.itemId||`*${this.crateItem.name}`;await b({method:"post",url:`/api/storage/crates/${this.crateItem.crateId}/items/${e}/reports`,data:{reason:this.reason}})}this.$emit("submitted",this.reason,this.data)}catch(e){console.log(e),this.showErrorMessage(e.message),this.$emit("failed",e)}this.submitted=!0}}}),se=["title"],ne={key:0,class:"title"},re={key:1,class:"report-container"},oe={key:0,class:"report-form"},ie={key:1,class:"report-complete"};function ae(e,n,I,v,$,C){const i=c("icon"),y=c("router-link");return t(),o("div",{class:f(["reporter",{isOpen:e.isOpen,subtle:e.subtle}])},[e.isOpen?(t(),o("div",re,[d("a",{role:"button",title:"Cancel",class:"pull-right close-button",onClick:n[1]||(n[1]=l=>e.isOpen=!1)},[m(i,{icon:"times-circle"})]),e.submitted?(t(),o("h3",ie," Thanks for helping us keep things clean and safe! ")):(t(),o("div",oe,[p(" Does this content violate our "),m(y,{to:"/conduct"},{default:h(()=>[p(" Code of Conduct")]),_:1}),p("? "),j(d("input",{"onUpdate:modelValue":n[2]||(n[2]=l=>e.reason=l),type:"text",class:"form-control",placeholder:"(optional) explanation"},null,512),[[F,e.reason]]),d("button",{class:"submit-button btn rumpus-button-small",onClick:n[3]||(n[3]=(...l)=>e.submit&&e.submit(...l))}," Yes, it is inappropriate. ")]))])):(t(),o("div",{key:0,class:f(["collapsed",{subtle:e.subtle}]),role:"button",title:e.title||"Report content",onClick:n[0]||(n[0]=l=>e.isOpen=!0)},[m(i,{icon:["far","flag"]}),e.subtle?a("",!0):(t(),o("span",ne,u(e.title||"Report"),1))],10,se))],2)}const de=w(te,[["render",ae],["__scopeId","data-v-c32b6131"]]),ue=k({components:{FeedbagForm:q,ReportContent:de,PreviewOrDownload:ee,ConfirmationLink:G,UserSupportWidget:A(()=>D(()=>
2import("./UserSupportWidget-ComcyvAt.js"),__vite__mapDeps([0,1,2,3,4]))),TicketMaker:A(()=>D(()=>import("./TicketMaker-CScEIXLN.js"),__vite__mapDeps([5,1,2,6])))},mixins:[N,z],data(){return{strings:{...Y},comments:[],showCommentForm:!1,mutedUserIds:[],submitterInfo:null,showSubmitterInfo:!1,showingCommenterInfo:{}}},computed:{isAdmin(){return this.currentUser&&this.currentUser.isAdmin},isStaff(){return this.currentUser&&this.currentUser.isStaff},submitterBsids(){return this.submitterInfo&&this.submitterInfo.bsidLink?this.submitterInfo.bsidLink:[]},ignoreStateIcon(){return this.entry.ignored?"eye-slash":"eye"},userIds(){if(!this.entry)return[];const e=[this.entry.userId];for(const n of this.comments.map(I=>I.userId))e.includes(n)||e.push(n);return e},postCommentRequest(){return{url:`${this.entryUrl}/comments`,method:"post"}}},watch:{async userIds(){if(!this.isAdmin)return!1;this.mutedUserIds=[],this.userIds.length&&(this.mutedUserIds=await this.mutedUsers(this.userIds))}},async created(){await this.updateProjects(),await this.getEntry(),this.entry||(console.log("Entry does not exist"),this.goBack()),O({title:`${this.project.name} Feedbag: ${this.entryId}`,description:"A piece of feedback."}),this.entry.commentCount&&await this.fetchComments()},methods:{showingCommenterInfoIcon(e){return this.showingCommenterInfo[e._id]?"angle-down":"angle-right"},showingSubmitterInfoIcon(){return this.showSubmitterInfo?"angle-down":"angle-right"},entryIsMutedIcon(){return this.entryIsMuted()?"hammer-war":"check-circle"},userIsMutedIcon(e){const n=e?e.userId:this.entry.userId;return this.userIsMuted(n||this.entry.userId)?"hammer-war":"check-circle"},commentIsMutedIcon(e){return this.commentIsMuted(e)?"hammer-war":"check-circle"},toggleShowingCommenterInfo(e){this.showingCommenterInfo[e]=!this.showingCommenterInfo[e]},userIsMuted(e){return this.mutedUserIds.includes(e)},sendEntryReport(e){return this.reportEntry(this.entry._id,e)},sendCommentReport(e,n){return this.reportComment(this.entry._id,n.commentId,e)},isDev(e){return _.find(n=>n.userId==e)},localTime(e){return new Date(e).toLocaleString()},unique(e){return H(e)},md2html(e){return V(e,!0,!1,{imagesAsLinks:!0,catchExternalLinks:!0})},async fetchComments(){const e=await b(`${this.entryUrl}/comments`);this.comments=e.data||[],this.updateUsernames(this.comments.map(n=>n.userId))},commentSubmitted(){this.fetchComments()},goBack(){this.$router.replace({name:"feedbagEntries",params:{projectId:this.projectId}})},async deleteComment(e){try{await b({url:`${this.entryUrl}/comments/${e}`,method:"delete"}),this.comments=this.comments.filter(n=>n._id!=e)}catch{console.log("Failed to delete Entry")}}}}),le={class:"content-panel"},me={key:1,class:"actions"},ce=["title"],he=["innerHTML"],pe={class:"summary"},fe=["title"],Ie={class:"alias"},ye={class:"userId"},ge={class:"time","aria-label":"Time submitted"},be={class:"tags"},ke={class:"comments-section"},we={key:0},ve={class:"comments"},$e=["innerHTML"],Ce={class:"summary"},Me=["onClick"],Ue=["title"],Ee={class:"alias"},Ae={class:"userId"},De={class:"time","aria-label":"Time submitted"},Se={key:1},Te={href:"#login"};function Le(e,n,I,v,$,C){const i=c("icon"),y=c("router-link"),l=c("confirmation-link"),M=c("user-support-widget"),U=c("preview-or-download"),E=c("report-content"),T=c("ticket-maker"),L=c("feedbag-form");return t(),o("div",le,[e.project?(t(),r(y,{key:0,to:`/feedbag/${e.project.projectId}`,title:`Go to the ${e.project.name} Feedbag`,class:"project-header"},{default:h(()=>[m(i,{icon:"flask"}),p(" "+u(e.t("feedbag-project-header",e.strings,{project:e.project.name})),1)]),_:1},8,["to","title"])):a("",!0),e.entry?(t(),o("div",me,[e.isAdmin?(t(),o("a",{key:0,role:"button",class:"action",title:e.entry.ignored?"unignore entry":"ignore entry (will not be visible to staff)",onClick:n[0]||(n[0]=s=>e.ignoreEntry(e.entry._id,e.getEntry,e.entry.ignored))},[(t(),r(i,{key:e.ignoreStateIcon,icon:["fas",e.ignoreStateIcon],size:"sm"},null,8,["icon"]))],8,ce)):a("",!0),e.isAdmin||e.currentUser.userId==e.entry.userId?(t(),r(l,{key:1,class:"action","hover-text":"Delete this entry and all associated data",action:e.deleteEntry,"action-params":[e.entryId,e.goBack]},{default:h(()=>[m(i,{icon:["fas","trash"],size:"sm"})]),_:1},8,["action","action-params"])):a("",!0),e.isAdmin?(t(),r(l,{key:2,class:"action","hover-text":e.entryIsMuted()?"Unmute entry":"Mute this entry (only the author can see it without the direct link)",action:e.muteEntry,"action-params":[e.entryId,e.getEntry,e.entryIsMuted()]},{default:h(()=>[(t(),r(i,{key:e.entryIsMutedIcon(),icon:["fas",e.entryIsMutedIcon()],size:"sm"},null,8,["icon"]))]),_:1},8,["hover-text","action","action-params"])):a("",!0)])):a("",!0),e.entry?(t(),o(g,{key:2},[d("div",{class:"text","aria-label":"Text of the feedbag entry",innerHTML:e.md2html(e.entry.text)},null,8,he),d("div",pe,[e.isAdmin?(t(),o("a",{key:0,role:"button",class:"show-user-info-button",onClick:n[1]||(n[1]=s=>e.showSubmitterInfo=!e.showSubmitterInfo)},[(t(),r(i,{key:e.showingSubmitterInfoIcon(),icon:e.showingSubmitterInfoIcon()},null,8,["icon"]))])):a("",!0),d("span",{class:f(["user",{me:e.entry.userId==e.currentUser.userId,dev:e.isDev(e.entry.userId)}]),"aria-label":"Entry Author",title:e.isDev(e.entry.userId)?"Bscotch Dev":""},[e.isDev(e.entry.userId)?(t(),r(i,{key:0,icon:["fab","dev"],size:"lg"})):(t(),r(i,{key:1,icon:"user-circle"})),d("span",Ie,u(e.aliases[e.entry.userId]),1),d("span",ye,"@"+u(e.entry.userId),1)],10,fe),e.isAdmin?(t(),r(l,{key:1,class:"action","hover-text":e.userIsMuted(e.entry.userId)?"Unmute user (past posts remain muted)":"Mute user (also mutes ALL past and future posts)",action:e.muteUser,"action-params":[e.entry.userId,e.getEntry,e.userIsMuted(e.entry.userId)]},{default:h(()=>[(t(),r(i,{key:e.userIsMutedIcon(),icon:["fas",e.userIsMutedIcon()],size:"sm"},null,8,["icon"]))]),_:1},8,["hover-text","action","action-params"])):a("",!0),d("span",ge,[m(i,{icon:["far","clock"]}),p(" "+u(e.localTime(e.entry.createdAt)),1)]),e.showSubmitterInfo?(t(),r(M,{key:2,"user-id":e.entry.userId},null,8,["user-id"])):a("",!0),d("span",be,[(t(!0),o(g,null,S(e.unique(e.entry.tags),s=>(t(),o("span",{key:s,class:"tag"}," #"+u(s),1))),128))])]),m(U,{url:e.entry.attachment,"download-text":"download attachment"},null,8,["url"]),e.currentUser&&e.entry.userId!=e.currentUser.userId?(t(),r(E,{key:0,class:"report-entry",t
2itle:"Report this entry","send-report-function":e.sendEntryReport},null,8,["send-report-function"])):a("",!0),e.currentUser.isAdmin&&e.entry?(t(),r(T,{key:1,project:e.project,"feedbag-entry":e.entry},null,8,["project","feedbag-entry"])):a("",!0),d("div",ke,[d("h3",null,u(e.t("feedbag-comments-header")),1),e.comments.length?a("",!0):(t(),o("p",we,u(e.t("feedbag-comments-none")),1)),d("div",ve,[(t(!0),o(g,null,S(e.comments,s=>(t(),o("div",{key:s._id,class:f(["comment clearfix",{mine:s.userId==e.currentUser.userId}]),"aria-label":"User comment"},[d("div",{class:"text","aria-label":"Comment text",innerHTML:e.md2html(s.text)},null,8,$e),d("div",Ce,[e.isAdmin?(t(),o("a",{key:0,role:"button",class:"show-user-info-button",onClick:Re=>e.toggleShowingCommenterInfo(s._id)},[(t(),r(i,{key:e.showingCommenterInfoIcon(s),icon:e.showingCommenterInfoIcon(s)},null,8,["icon"]))],8,Me)):a("",!0),d("span",{class:f(["user",{me:s.userId==e.currentUser.userId,dev:e.isDev(s.userId)}]),title:e.isDev(s.userId)?"Bscotch Dev":"","aria-label":"Comment Author"},[e.isDev(s.userId)?(t(),r(i,{key:0,icon:["fab","dev"],size:"lg"})):(t(),r(i,{key:1,icon:"user-circle"})),d("span",Ee,u(e.aliases[s.userId]),1),d("span",Ae,"@"+u(s.userId),1)],10,Ue),e.isAdmin?(t(),r(l,{key:1,class:"action","hover-text":e.userIsMuted(s.userId)?"Unmute user (past posts remain muted)":"Mute user (also mutes ALL past and future posts)",action:e.muteUser,"action-params":[s.userId,e.getEntry,e.userIsMuted(s.userId)]},{default:h(()=>[(t(),r(i,{key:e.userIsMutedIcon(s),icon:["fas",e.userIsMutedIcon(s)],size:"sm"},null,8,["icon"]))]),_:2},1032,["hover-text","action","action-params"])):a("",!0),d("span",De,[m(i,{icon:["far","clock"]}),p(" "+u(e.localTime(s.createdAt)),1)]),e.currentUser&&s.userId!=e.currentUser.userId?(t(),r(E,{key:2,subtle:!0,data:{commentId:s._id},"send-report-function":e.sendCommentReport},null,8,["data","send-report-function"])):a("",!0),e.isAdmin?(t(),r(l,{key:3,class:"delete-button","hover-text":e.commentIsMuted(s)?"Unmute comment":"Mute this comment (only the author can see it)",action:e.muteComment,"action-params":[e.entryId,s._id,e.fetchComments,e.commentIsMuted(s)]},{default:h(()=>[(t(),r(i,{key:e.commentIsMutedIcon(s),icon:["fas",e.commentIsMutedIcon(s)],size:"sm"},null,8,["icon"]))]),_:2},1032,["hover-text","action","action-params"])):a("",!0),e.isAdmin||e.currentUser.userId==s.userId?(t(),r(l,{key:4,class:"delete-button","hover-text":"Delete this comment and its attachments",action:e.deleteComment,"action-params":[s._id]},{default:h(()=>[m(i,{icon:["fas","trash"],size:"sm"})]),_:2},1032,["action","action-params"])):a("",!0)]),m(U,{url:s.attachment,"download-text":"download attachment"},null,8,["url"]),e.showingCommenterInfo[s._id]?(t(),r(M,{key:0,"user-id":s.userId},null,8,["user-id"])):a("",!0)],2))),128)),(t(),r(B,null,{default:h(()=>[e.currentUser?(t(),r(L,{key:0,type:"comment",onSubmitted:e.commentSubmitted},null,8,["onSubmitted"])):(t(),o("p",Se,[d("a",Te,u(e.t("feedbag-login-required")),1)]))]),_:1}))])])],64)):a("",!0)])}const Ge=w(ue,[["render",Le],["__scopeId","data-v-6f0fc560"]]);export{Ge as default};
3//# sourceMappingURL=FeedbagEntry-CL6pCi7A.js.map

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.