<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../../assets/layouts.C6WoYv6a.css"])))=&gt;i.map(i=&gt;d[i]);
import{r as j,j as e,i as p,w as de,D as ue,x as me,l as R}from"../../../vendor/vendor/react-core.CEfBmrr6.min.js";import{F as ge,_ as he,Y as _,ct as Z,c8 as ee,aS as P,aT as te,ap as y,t as u,a6 as C,I as D,af as E,ah as L,aO as v,e as S,cu as pe,a7 as k,a8 as F,cv as xe,bF as V,ab as fe,a5 as se,ck as M,ak as je,Q as H,a_ as Ce,b1 as be,J as ye,aU as K,c7 as Ie,ba as Te,bb as Y,cw as U,g as Q,O as De,cx as we,bZ as G,cy as ve,a0 as Le,a1 as oe,M as Re,N as Ne,an as Pe,ao as Me,aj as Se,aq as Ee,ai as Oe,ad as W,as as Be,cz as ke,ci as J,cA as Fe,V as Ue}from"../../../entries/layouts.OQJzg8IO.min.js";import{a as We}from"../../ContributionItem.variables.oa-RFmZ7.min.js";import{P as B}from"../../PageBox.DIZd63BO.min.js";import{s as Ae,u as _e,S as Ve}from"../../SuggestedAnswerItem.BkFenJSu.min.js";import{d as He,x as $e,v as ze}from"../../vendor/lodash.DoK-bgL1.min.js";import{S as qe}from"../../StackedList.C3pZYZtY.min.js";import{s as Xe}from"../../StackedList.variables.C6_0z4Jn.min.js";function Ke(t){const[s,a]=j.useState(!1),n=window.matchMedia("(orientation: portrait)"),r=window.matchMedia("(max-width: 600px)"),o=window.matchMedia("(max-width: 932px)"),l=j.useCallback(He(i=&gt;{i.matches?a(r.matches):a(o.matches)},100),[]),c=()=&gt;{n.matches?a(r.matches):a(o.matches)};return j.useEffect(()=&gt;(n.addEventListener("change",l),c(),()=&gt;{n.removeEventListener("change",l)}),[]),s}const Ye=ge({loadFunction:()=&gt;he(()=&gt;import("../../PostReactionsModal.loadable.3jxordqb.min.js"),__vite__mapDeps([0]),import.meta.url),fallback(){return e.jsx(e.Fragment,{})}}),ht=_(()=&gt;We("reactions"));function Qe(t){const{suggestion:s,className:a,comment:n,commentParent:r,onMutateSuccess:o,commentID:l}=t,c=Ae(),i=_e(r.recordID),d=Z(),m=ee(),{hasPermission:b}=P(),I={mode:te.RESOURCE_IF_JUNCTION,resourceType:"category",resourceID:n.categoryID},g=b("comments.delete",I)||(m==null?void 0:m.userID)===r.insertUserID,h=async()=&gt;{try{await i({suggestion:s.aiSuggestionID,accept:!1,commentID:s.commentID}),await(o==null?void 0:o())}catch(x){d(x)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{...s,className:a}),g&amp;&amp;e.jsxs(y,{buttonType:C.TEXT_PRIMARY,className:c.answerButton,onClick:h,children:[e.jsx(D,{icon:"undo",size:"compact"}),u("Undo Accept Answer")]})]})}const ne=_(()=&gt;{const t=E(),s=p({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",flexWrap:"wrap",gap:t.gutter.quarter},"label:PostReactions-classes-root"),a=p({height:20,display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:0},"label:PostReactions-classes-button"),n=p({background:L.colorOut(t.mainColors.primary),borderColor:L.colorOut(t.mainColors.primary),color:L.colorOut(t.mainColors.primaryContrast),"&amp;:hover, &amp;:active, &amp;:focus":{background:L.colorOut(t.mainColors.statePrimary),borderColor:L.colorOut(t.mainColors.statePrimary),color:L.colorOut(t.mainColors.primaryContrast)}},"label:PostReactions-classes-activeButton"),r=p({...v.margin({right:t.gutter.quarter})},"label:PostReactions-classes-buttonLabel"),o=p({height:16},"label:PostReactions-classes-icon"),l=p({display:"flex",flexDirection:"column",gap:t.gutter.half},"label:PostReactions-classes-tooltip"),c=p({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",fontWeight:"bold",gap:t.gutter.quarter},"label:PostReactions-classes-tooltipTitle"),i=p({width:16,height:16},"label:PostReactions-classes-tooltipIcon"),d=p({...v.margin({all:0}),...v.padding({all:0}),display:"flex",flexDirection:"column",alignItems:"stretch",gap:t.gutter.half,"&amp; &gt; li":{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:t.gutter.half}},"label:PostReactions-classes-tooltipUserList"),m=p({height:"auto",width:"auto","&amp;&amp;&amp;:hover, &amp;&amp;&amp;:focus, &amp;&amp;&amp;.focus-visible, &amp;&amp;&amp;:active":{background:"none"},"&amp;&amp;&amp;.focus-visible":{outlineStyle:"auto",outlineColor:L.colorOut(t.links.colors.default)}},"label:PostReactions-classes-legacyFlagDropdownButton");return{root:s,button:a,activeButton:n,buttonLabel:r,icon:o,tooltip:l,tooltipTitle:c,tooltipIcon:i,tooltipUserList:d,legacyFlagDropdownButton:m}});var A;(function(t){t.PROMOTE="reaction-fire",t.OFF_TOPIC="reaction-off-topic",t.INSIGHTFUL="reaction-insightful",t.DISAGREE="reaction-dislike",t.AGREE="reaction-like",t.DISLIKE="reaction-thumbs-down",t.LIKE="reaction-thumbs-up",t.UP="reaction-arrow-up",t.DOWN="reaction-arrow-down",t.SUPPORT="reaction-support",t.AWESOME="reaction-love",t.LOL="reaction-funny",t.WTF="reaction-wtf"})(A||(A={}));function Ge(t){const{recordType:s,recordID:a}=t,n=ee(),r=`/${s}s/${a}/reactions`,o=ue(),l=Z(),{data:c,mutateAsync:i}=me({mutationKey:["toggle-reaction",s,a],mutationFn:async d=&gt;{const{reaction:m,user:b,deleteOnly:I}=d,g=b??n;if(await S.delete(`${r}/${g==null?void 0:g.userID}`),m&amp;&amp;!m.hasReacted&amp;&amp;!I)return(await S.post(r,{reactionType:m.urlcode})).data.map(({tagID:T,count:w})=&gt;({tagID:T,count:w,hasReacted:T===m.tagID}));const h=await S.get(r);return Object.entries(pe(h.data,"tagID")).map(([x,T])=&gt;{const w=parseInt(x);return{tagID:w,count:T.length,hasReacted:!!h.data.find(f=&gt;f.tagID===w&amp;&amp;f.userID===(n==null?void 0:n.userID))}})},onSettled(){o.invalidateQueries(["reaction-log",s,a])},onError(d){l(d)}});return{toggleResponse:c,toggleReaction:i}}function ae(t){const{recordType:s,recordID:a}=t;return de({queryKey:["reaction-log",s,a],queryFn:async({queryKey:n})=&gt;{const[r,o,l]=n;return(await S.get(`/${o}s/${l}/reactions`)).data},enabled:!1})}const re=j.createContext({});function $(){return j.useContext(re)}function Je(t){const{children:s,...a}=t,n=ae(a),{toggleReaction:r,toggleResponse:o}=Ge(a),l=c=&gt;((n==null?void 0:n.data)??[]).filter(i=&gt;i.tagID===c).map(({user:i})=&gt;i);return e.jsx(re.Provider,{value:{...a,reactionLog:n.data,getUsers:l,toggleReaction:r,counts:o},children:s})}function Ze(t){const{iconType:s,name:a,tagID:n}=t,r=ne(),{getUsers:o}=$(),{hasPermission:l}=P(),c=l("reactions.view"),i=j.useMemo(()=&gt;o&amp;&amp;n?o(n):[],[o,n]);return e.jsxs("div",{className:r.tooltip,children:[e.jsxs("div",{className:r.tooltipTitle,children:[e.jsx(D,{icon:s,className:r.tooltipIcon}),a]}),c&amp;&amp;i.length&gt;0&amp;&amp;e.jsx(e.Fragment,{children:i.length&gt;5?e.jsx(qe,{themingVariables:Xe("reactions"),data:i,maxCount:5,ItemComponent:d=&gt;e.jsx(k,{size:F.MEDIUM,userInfo:d})}):e.jsx("ul",{className:r.tooltipUserList,children:i.map(d=&gt;e.jsxs("li",{children:[e.jsx(k,{size:F.MEDIUM,userInfo:d}),e.jsx("span",{children:d.name})]},d.userID))})})]})}function et(t){const{reactions:s}=t,a=ne(),n=xe(),{toggleReaction:r,counts:o,recordType:l,recordID:c}=$(),{hasPermission:i}=P(),d=ae({recordType:l,recordID:c}),[m,b]=j.useState();if(j.useEffect(()=&gt;{if(s){const g=s.filter(({class:h,urlcode:x})=&gt;i(x==="Promote"?"curation.manage":`reactions.${h==null?void 0:h.toLowerCase()}.add`)&amp;&amp;h!=="Flag");b(g)}},[s,i]),j.useEffect(()=&gt;{if(o&amp;&amp;m){const g=m.map(h=&gt;{const x=o.find(({tagID:T})=&gt;h.tagID===T);return x?{...h,...x??{}}:{...h,count:0,hasReacted:!1}});b(g)}},[o]),!m||m.length===0)return null;const I=()=&gt;{d.isStale&amp;&amp;d.refetch()};return e.jsx("div",{className:a.root,onMouseEnter:()=&gt;I(),onFocus:()=&gt;I(),children:m.map(g=&gt;{const h=A[$e(g.urlcode).toUpperCase()],x=g.count??0;return e.jsx(V,{label:e.jsx(Ze,{iconType:h,name:g.name??ze(g.urlcode),tagID:g.tagID}),children:e.jsxs(y,{ariaLabel:g.name,buttonType:C.CUSTOM,className:R(n.standard(!0),a.button,g.hasReacted&amp;&amp;a.activeButton),onClick:()=&gt;{r&amp;&amp;r({reaction:g})},children:[e.jsx(D,{icon:h,className:a.icon}),x&gt;0&amp;&amp;e.jsx("span",{className:a.buttonLabel,children:x})]})},g.tagID)})})}const ie=_(()=&gt;{const t=E(),s=p({...v.margin({vertical:t.gutter.half}),padding:0,listStyle:"none"},"label:PostReactionsLog-classes-root"),a=p({...v.margin({all:t.gutter.size})},"label:PostReactionsLog-classes-noReactions"),n=p({margin:0,display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:t.gutter.half,...v.border({...t.border,radius:0,width:0}),borderBottomWidth:1,...v.padding({vertical:t.gutter.quarter,left:t.gutter.half,right:t.gutter.quarter}),"&amp;:last-child":{borderWidth:0}},"label:PostReactionsLog-classes-reactionLogItem"),r=p({width:"12ch"},"label:PostReactionsLog-classes-reactionLogDate"),o=p({flex:1,...v.clickable.itemState({default:t.mainColors.primary})},"label:PostReactionsLog-classes-reactionLogUser"),l=p({width:"12ch",textAlign:"center"},"label:PostReactionsLog-classes-reactionLogName"),c=p({},"label:PostReactionsLog-classes-reactionLogDelete"),i=p({display:"flex",flexDirection:"row",alignItems:"center",gap:t.gutter.quarter/2},"label:PostReactionsLog-classes-reactionLogTrigger");return{root:s,noReactions:a,reactionLogItem:n,reactionLogDate:r,reactionLogUser:o,reactionLogName:l,reactionLogDelete:c,reactionLogTrigger:i}});function pt(){const t=ie(),{reactionLog:s,toggleReaction:a}=$();return!s||!s.length?e.jsx("p",{className:t.noReactions,children:u("No Reactions Yet")}):e.jsx("ul",{className:t.root,children:s.map(({reactionType:n,user:r,dateInserted:o})=&gt;e.jsxs("li",{className:t.reactionLogItem,children:[e.jsx(fe,{timestamp:o,className:t.reactionLogDate}),e.jsx(se,{userFragment:r,isUserCard:!0,className:t.reactionLogUser}),e.jsx("span",{className:t.reactionLogName,children:n.name}),e.jsx(V,{label:u("Remove reaction"),children:e.jsx("span",{children:e.jsx(y,{buttonType:C.ICON_COMPACT,className:t.reactionLogDelete,title:u("Remove reaction"),onClick:async()=&gt;{a&amp;&amp;await a({reaction:n,user:r,deleteOnly:!0})},children:e.jsx(D,{icon:"delete"})})})})]},[n.tagID,r.userID].join("-")))})}function tt(t){const s=ie(),[a,n]=j.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsxs(y,{buttonType:C.TEXT,className:R(s.reactionLogTrigger,t.className),title:u("View Reactions Log"),onClick:()=&gt;n(!0),children:[e.jsx(D,{icon:"reaction-log"}),"Log"]}),a&amp;&amp;e.jsx(Ye,{visibility:a,onVisibilityChange:n})]})}function st(){const t=M(),s=je(),{recordType:a,handleCopyUrl:n,handleNativeShare:r,emailUrl:o,shareInMessageUrl:l}=H(),c=u("Share"),i=e.jsxs(e.Fragment,{children:[e.jsx(D,{icon:"share",size:"compact"}),c]}),d=a==="comment"?u("Copy Link to Comment"):u("Copy Link");return r!==void 0?e.jsx(y,{buttonType:C.TEXT,title:c,className:t.actionButton,onClick:async()=&gt;{await r()},children:i}):e.jsxs(Ce,{name:c,flyoutType:be.LIST,buttonClassName:t.actionButton,buttonType:C.TEXT,buttonContents:i,children:[e.jsx(ye,{onClick:async()=&gt;{await n(),s.addToast({body:e.jsx(e.Fragment,{children:u("Link copied to clipboard.")}),autoDismiss:!0})},children:d}),e.jsx(K,{to:o,children:u("Email Link")}),!!l&amp;&amp;e.jsx(K,{to:l,children:u("Share In Message")})]})}function ot(t){const{hasPermission:s}=P(),{recordType:a,recordID:n}=H(),r=Ie(),{categoryID:o,closed:l}=r,c=Ke(),i=M(),d={mode:te.RESOURCE_IF_JUNCTION,resourceType:"category",resourceID:o};let m=s("comments.add",d);l&amp;&amp;(m=s("discussions.close",d));const b=s("community.moderate");return e.jsx(e.Fragment,{children:e.jsxs(Je,{recordID:n,recordType:a,children:[m&amp;&amp;e.jsx("div",{className:i.reactionItemsContainer,children:e.jsx(et,{reactions:t.reactions})}),e.jsxs("div",{className:i.actionItemsContainer,children:[b&amp;&amp;!c&amp;&amp;e.jsx("div",{className:i.actionItem,children:e.jsx(tt,{className:i.actionButton})}),e.jsx("div",{className:i.actionItem,children:e.jsx(st,{})})]})]})})}function nt(t,s){return`${t.charAt(0).toUpperCase()+t.slice(1,t.length).toLowerCase()}_${s}`}function xt(t){var X;const{beforeContent:s,content:a,user:n,userPhotoLocation:r,collapsed:o,suggestionContent:l,showOPTag:c,isHighlighted:i,visibilityHandlerComponent:d,isHidden:m}=t,{recordType:b,recordID:I}=H(),g=nt(b,I),h=Te(),x=[Y.XS,Y.MOBILE].includes(h),T=P(),w=r==="header",f=M(w);let O=l?e.jsx(Qe,{...l,className:f.userContent}):e.jsx(U,{content:a,className:f.userContent});const z=(X=n.signature)==null?void 0:X.body,ce=Q("signatures.hideMobile",!1)&amp;&amp;x,le=Q("signatures.enabled",!1)&amp;&amp;!ce;let q=null;z&amp;&amp;le&amp;&amp;(q=e.jsx("div",{className:f.signature,children:e.jsx(U,{content:z})})),o&amp;&amp;(O=e.jsx(ve,{maxHeight:200,overshoot:250,children:O}));let N=e.jsxs("div",{className:f.threadItemContainer,children:[e.jsx(De,{options:t.options,user:n,excludePhoto:!w,showOPTag:c,categoryID:t.categoryID,isClosed:t.isClosed,readOnly:t.readOnly,additionalAuthorMeta:t.additionalAuthorMeta,checkBox:t.checkBox}),t.editor||e.jsxs(e.Fragment,{children:[s,O,q,t.actions,!t.readOnly&amp;&amp;e.jsxs("div",{className:f.footerWrapper,children:[t.reactions&amp;&amp;e.jsx(ot,{reactions:t.reactions}),e.jsx(we,{actualSpacer:!0}),t.onReply&amp;&amp;T.hasPermission("comments.add")&amp;&amp;e.jsx(y,{className:f.replyButton,onClick:()=&gt;t.onReply&amp;&amp;t.onReply(),buttonType:C.TEXT,children:t.replyLabel??u("Reply")})]}),!!t.attachmentsContent&amp;&amp;e.jsx("div",{className:f.attachmentsContentWrapper,children:t.attachmentsContent})]})]});return w||(N=e.jsxs("div",{className:f.resultWrapper,children:[e.jsx(se,{userFragment:n,children:e.jsx(k,{size:F.MEDIUM,userInfo:n})}),e.jsx(B,{children:N})]})),i&amp;&amp;(N=e.jsx(B,{options:{borderType:G.BORDER,border:{color:E().mainColors.primary},background:{color:E().mixPrimaryAndBg(.1)}},children:N})),e.jsxs(B,{id:g,options:{borderType:G.SEPARATOR_BETWEEN,...t.boxOptions},children:[d,!m&amp;&amp;N]})}function ft(t){var i,d;const{warning:s,recordName:a,recordUrl:n,moderatorNoteVisible:r}=t,o=M(),[l,c]=j.useState(t.forceModalVisibility||!1);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:o.aboveMainContent,children:[e.jsx(Le,{icon:e.jsx(D,{icon:"status-alert"}),stringContents:"",type:"warning",contents:e.jsx("p",{children:e.jsx(oe,{source:"Moderator issued a &lt;0/&gt; to &lt;1/&gt;.",c0:e.jsx(y,{buttonType:C.TEXT_PRIMARY,onClick:()=&gt;c(!l),children:u("warning")}),c1:s.user.name})})}),e.jsx(Re,{isVisible:l,exitHandler:()=&gt;c(!1),size:Ne.MEDIUM,titleID:"post_warning_modal",className:o.postWarningModal,children:e.jsx(Pe,{header:e.jsx(Be,{titleID:"post_warning_modal_title",closeFrame:()=&gt;c(!1),title:u("Warning")}),body:e.jsx(Ee,{className:Oe().root,children:e.jsxs("div",{className:R(o.postWarningTopSpace(16),o.postWarningBottomSpace(16)),children:[e.jsxs("div",{className:o.postWarningBottomSpace(12),children:[e.jsx("div",{className:R(o.postWarningBottomSpace(),o.postWarningBold),children:u("Warning Type")}),e.jsxs("div",{children:[(i=s.warningType)==null?void 0:i.name,((d=s.warningType)==null?void 0:d.description)&amp;&amp;` - ${s.warningType.description}`]})]}),e.jsxs("div",{className:R(o.postWarningBottomSpace(12),o.postWarningBold),children:[e.jsx("div",{className:o.postWarningBottomSpace(),children:u("Moderator Message")}),e.jsx(W,{to:`/messages/${s.conversationID}#latest`,children:u("View Message")})]}),e.jsxs("div",{className:R(o.postWarningBottomSpace(12),o.postWarningBold),children:[e.jsx("div",{className:o.postWarningBottomSpace(),children:u("Warned Post")}),e.jsx(W,{to:n,children:a})]}),e.jsxs("div",{className:o.postWarningBottomSpace(12),children:[e.jsx("div",{className:o.postWarningBold,children:u("Warning Content")}),e.jsx(U,{content:s.body,className:o.postWarningTopSpace(8)})]}),r&amp;&amp;s.moderatorNote&amp;&amp;s.moderatorNote!==""&amp;&amp;e.jsxs("div",{children:[e.jsxs("div",{className:R(o.postWarningBold,o.postWarningFlex),children:[u("Internal Notes"),e.jsx(V,{label:u("This information will only be shown to users with permission to view internal info."),children:e.jsx("span",{children:e.jsx(D,{icon:"visibility-internal"})})})]}),s.moderatorNote]})]})}),footer:e.jsx(Me,{justifyRight:!0,children:e.jsx(e.Fragment,{children:e.jsx(y,{buttonType:C.TEXT,onClick:()=&gt;c(!1),className:Se().actionButton,children:u("Close")})})})})})]})})}function jt(t){const{isPostHidden:s,contentText:a,onVisibilityChange:n}=t;return e.jsxs("div",{className:M().ignoredUserPostHeader(!s),children:[e.jsx(y,{buttonType:C.ICON_COMPACT,onClick:()=&gt;n(!s),children:e.jsx(ke,{rotate:s?0:180})}),e.jsx("span",{children:a}),e.jsx("span",{}),e.jsx(y,{buttonType:C.TEXT_PRIMARY,onClick:()=&gt;n(!s),children:s?u("Show"):u("Hide")})]})}function Ct(t){const{countReports:s,recordType:a,recordID:n}=t;return s==null||s===0?e.jsx(e.Fragment,{}):e.jsx(W,{target:"_blank",className:J().reportsTag,to:`/dashboard/content/reports?statuses=none&amp;recordType=${a}&amp;recordID=${n}`,children:e.jsxs(Fe,{className:J().reportsTag,preset:Ue.COLORED,children:[s&gt;1?e.jsx(oe,{source:"&lt;0/&gt; Reports",c0:s}):e.jsx(e.Fragment,{children:u("1 Report")}),e.jsx(D,{icon:"meta-external-compact"})]})})}export{xt as C,Ye as P,Ct as R,jt as a,ft as b,$ as c,ae as d,pt as e,ht as r,Ke as u};
</pre></body></html>