(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,872689,(e,t,a)=>{let s="/threadUIView";(window.__NEXT_P=window.__NEXT_P||[]).push([s,()=>e.r(348132)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([s])})},348132,e=>{"use strict";var t=e.i(391398),a=e.i(145246),s=e.i(191788),o=e.i(758568),i=e.i(995545),r=e.i(842633),n=s;e.i(966278);var d=e.i(318398),c=e.i(203828),l=e.i(799523),h=e.i(913083),x=e.i(911055),p=e.i(566573),m=e.i(567166),f=e.i(225499),b=e.i(739659),j=e.i(257378),g=e.i(748667),_=e.i(659497),u=e.i(823889),v=e.i(501584),k=e.i(765986),w=e.i(667803),N=e.i(332017),y=e.i(169545),T=e.i(368721),C=e.i(534358);let S=new String(".featured-threads.jsx-a6224f7e68115e4e{margin-bottom:10px}li.jsx-a6224f7e68115e4e{overflow:hidden}.thread-wrapper.jsx-a6224f7e68115e4e{justify-content:center;align-items:flex-start;margin-bottom:15px;display:flex}.thread-wrapper.jsx-a6224f7e68115e4e .title.jsx-a6224f7e68115e4e{flex:0 0 50%;margin-left:10px;font-size:14px;font-weight:600;line-height:20px}");S.__hash="a6224f7e68115e4e";let P=e=>{let{threads:o=[]}=e;return(0,t.jsxs)("div",{className:"jsx-".concat(S.__hash)+" featured-threads",children:[(0,t.jsx)("ol",{className:"jsx-".concat(S.__hash),children:o&&o.length>0&&o.map(e=>(0,t.jsx)(s.Fragment,{children:(0,t.jsx)("li",{className:"jsx-".concat(S.__hash),children:(0,t.jsx)("a",{href:e.link,className:"jsx-".concat(S.__hash),children:(0,t.jsxs)("div",{className:"jsx-".concat(S.__hash)+" thread-wrapper",children:[(0,t.jsx)(C.f,{ratio:21/13,thread:e,borderRadius:6,src:e.image}),(0,t.jsx)("p",{className:"jsx-".concat(S.__hash)+" title",children:e.title})]})})},e.id)},e.id))}),(0,t.jsx)(a.default,{id:S.__hash,children:S})]})};P.apiFetches={threads:()=>({uri:h.a,success:e=>(0,o.default)(e,"threads",[]).map(h.U).slice(0,5)})};let D=T.f.subscribe(d.f.ApiConsumer(P));var z=e.i(575835),R=e.i(697680);let A=new String(".tags.jsx-90947146c1e49770{flex-wrap:wrap;align-items:flex-start;display:flex}.tag.jsx-90947146c1e49770{color:#fff;white-space:nowrap;background-color:#98c456;border-radius:8px;margin:0 5px 5px 0;padding:6px 12px;font-size:18px;font-weight:700}.tag.jsx-90947146c1e49770:nth-child(2){background-color:#65cecf}.tag.jsx-90947146c1e49770:nth-child(3){background-color:#d25735}.tag.jsx-90947146c1e49770:nth-child(4){background-color:#f3c144}.tag.jsx-90947146c1e49770:nth-child(5){background-color:#9c2e83}");A.__hash="90947146c1e49770";let I=e=>{let{tags:o=[]}=e;return(0,t.jsxs)("div",{className:"jsx-".concat(A.__hash)+" tags",children:[o&&o.length>0&&o.map(e=>(0,t.jsx)(s.Fragment,{children:(0,t.jsx)("div",{className:"jsx-".concat(A.__hash)+" tag",children:(0,t.jsxs)("a",{href:e.link,onClick:()=>{var e;return e=z.f.gaHotTagClick,void ga("send",{hitType:"event",eventCategory:z.f.tinhteSummaryGAEventCategory,eventAction:z.f.gaEventClick,eventLabel:e,transport:"beacon"})},className:"jsx-".concat(A.__hash),children:["#",e.tagText]})},e.id)},e.id)),(0,t.jsx)(a.default,{id:A.__hash,children:A})]})};I.apiFetches={tags:()=>({uri:"/tinhte/hot-tags",success:e=>(0,o.default)(e,"tags",[]).map(R.f).slice(0,5)})};let M=d.f.ApiConsumer(I),B=new String(".threadpage.jsx-5191e8b86136941a{background-color:var(--page-background);border-radius:0;width:100%;margin:0 auto;padding:0 10px}@media (min-width:576px){.threadpage.jsx-5191e8b86136941a{border-radius:8px;max-width:none;margin:24px auto 0;padding:0 20px}}@media (min-width:1200px){.threadpage.jsx-5191e8b86136941a{max-width:1144px}}.deeptalk-thread.jsx-5191e8b86136941a{max-width:100%;margin:40px 0 0;padding:0}@media (min-width:768px){.deeptalk-thread.jsx-5191e8b86136941a{margin:64px 0 0}}.bg-white.jsx-5191e8b86136941a{background-color:var(--page-background)}.block-title.jsx-5191e8b86136941a{margin-bottom:10px;font-size:20px;font-weight:600}.view-all-fact.jsx-5191e8b86136941a{color:var(--text-button-active);font-size:14px;font-weight:600}.hot-tags.jsx-5191e8b86136941a{margin-bottom:10px}@media (max-width:700px){.mobile-hidden.jsx-5191e8b86136941a{display:none}.fst.jsx-5191e8b86136941a{overflow:hidden}}@media (min-width:701px){.desktop-hidden.jsx-5191e8b86136941a{display:none}}@media (max-width:480px){.section.jsx-5191e8b86136941a{margin-top:0}}.section.jsx-5191e8b86136941a{flex-wrap:wrap;margin-left:-10px;margin-right:-10px;display:flex}@media (min-width:576px){.section.jsx-5191e8b86136941a{margin-left:-20px;margin-right:-20px}}.section.deeptalk-section.jsx-5191e8b86136941a{margin-left:0;margin-right:0}.snd.jsx-5191e8b86136941a{width:100%;padding-left:10px;padding-right:10px}@media (min-width:576px){.snd.jsx-5191e8b86136941a{padding-left:20px;padding-right:20px}}@media (min-width:992px){.snd.jsx-5191e8b86136941a{width:340px}}@media (min-width:1500px){.snd.jsx-5191e8b86136941a{width:350px}}.fst.jsx-5191e8b86136941a{flex:auto;padding-left:10px;padding-right:10px}@media (min-width:576px){.fst.jsx-5191e8b86136941a{padding-left:20px;padding-right:20px}}@media (min-width:992px){.fst.jsx-5191e8b86136941a{flex:1 1 0}}.fst.deeptalk-fst.jsx-5191e8b86136941a{padding:0}@media (min-width:1001px){.mt-12.jsx-5191e8b86136941a{margin-top:24px}}");B.__hash="5191e8b86136941a";var E=s,F=e.i(455404);e.i(473981);var L=e.i(48244),U=e.i(113503),O=e.i(363872),H=e.i(565715),V=e.i(574186),q=e.i(456310),W=e.i(298299),G=e.i(693084),X=e.i(149389),Y=e.i(633241),K=e.i(929424),J=e.i(612683),Q=e.i(241427),$=e.i(664346),Z=e.i(310717);e.i(888858);var ee=e.i(19012),et=e.i(148519);e.i(305646),e.i(961827);var ea=e.i(488335),es=e.i(109969),eo=e.i(962525),ei=e.i(799338),er=e.i(802653),en=e.i(535044),ed=e.i(867507),ec=e.i(634529),el=e.i(376422),eh=e.i(618488),ex=e.i(723661),ep=e.i(193618),em=e.i(94432),ef=e.i(6788),eb=e.i(624137),ej=e.i(617881);e.i(733191);var eg=s;let e_=new String(".event-block.jsx-a067741fe3eb4595{border:1px solid var(--color-accent-dark);background-color:var(--light-background);border-radius:4px;margin-bottom:10px;position:relative}.event-block[role=ended].jsx-a067741fe3eb4595{border:1px solid #f79500}.event-content.jsx-a067741fe3eb4595{display:flex}.event-time.jsx-a067741fe3eb4595{background-color:var(--color-accent-dark);color:#fff;text-align:center;border-bottom-right-radius:8px;border-bottom-left-radius:8px;flex:0 0 120px;width:120px;height:90px;margin-left:1rem;margin-right:1rem;padding:1rem}.event-time[role=ended].jsx-a067741fe3eb4595{background-color:var(--thread-event-background)}.event-time.jsx-a067741fe3eb4595 .date.jsx-a067741fe3eb4595{font-size:1.5rem;font-weight:700;font-family:var(--font-main)}.event-time.jsx-a067741fe3eb4595 .day.jsx-a067741fe3eb4595{font-family:var(--font-main)}.event.jsx-a067741fe3eb4595{width:100%;padding:1rem}.event-title.jsx-a067741fe3eb4595{font-size:1.2rem;font-weight:700;line-height:1.5rem;font-family:var(--font-main)}.event-footer.jsx-a067741fe3eb4595{width:100%}.event-info.jsx-a067741fe3eb4595{margin-bottom:.5rem}.event-info.jsx-a067741fe3eb4595 i.jsx-a067741fe3eb4595{margin-right:.5rem}.button-group.jsx-a067741fe3eb4595{text-align:center;margin-bottom:1.5rem}.register-button.jsx-a067741fe3eb4595{background:var(--color-accent-dark);color:var(--color-light-0);-webkit-letter-spacing:.5px;-moz-letter-spacing:.5px;-ms-letter-spacing:.5px;letter-spacing:.5px;border-radius:100px;flex:none;padding:0 24px;font-size:15px;font-weight:700;line-height:42px;box-shadow:0 1px 3px #a3a3a380}.break-line.jsx-a067741fe3eb4595{background-color:#dcdede;width:100%;height:1px;margin:1rem 0}@media (max-width:500px){.event-time.jsx-a067741fe3eb4595{display:none}}");e_.__hash="a067741fe3eb4595";class eu extends eg.default.Component{render(){let{event:e}=this.props,s=(0,l.default)(e.time.start,"X"),o=(0,l.default)(e.time.end,"X");return(0,t.jsxs)("div",{className:"jsx-".concat(e_.__hash),children:[(0,t.jsxs)("div",{role:e.status,className:"jsx-".concat(e_.__hash)+" event-block",children:[(0,t.jsxs)("div",{className:"jsx-".concat(e_.__hash)+" event-content",children:[(0,t.jsxs)("div",{role:e.status,className:"jsx-".concat(e_.__hash)+" event-time",children:[(0,t.jsxs)("p",{className:"jsx-".concat(e_.__hash)+" date",children:[s.format("DD"),"/",s.format("MM")]}),(0,t.jsx)("p",{className:"jsx-".concat(e_.__hash)+" day",children:s.format("dddd")})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e_.__hash)+" event",children:[(0,t.jsx)("p",{className:"jsx-".concat(e_.__hash)+" event-title",children:e.title}),(0,t.jsx)("div",{className:"jsx-".concat(e_.__hash)+" break-line"}),(0,t.jsxs)("div",{className:"jsx-".concat(e_.__hash)+" event-footer",children:[e.time&&e.time.start?(0,t.jsxs)("div",{className:"jsx-".concat(e_.__hash)+" event-info",children:[(0,t.jsx)("i",{className:"jsx-".concat(e_.__hash)+" fas fa-clock"}),(0,t.jsxs)("span",{className:"jsx-".concat(e_.__hash),children:[s.format("HH"),":",s.format("mm")," - ",o.format("HH"),":",o.format("mm"),", ngày ",s.format("dddd")," ",s.format("DD"),"/",s.format("MM"),"/",s.format("YYYY")]})]}):(0,t.jsx)("div",{className:"jsx-".concat(e_.__hash)}),e.location?(0,t.jsxs)("div",{className:"jsx-".concat(e_.__hash)+" event-info",children:[(0,t.jsx)("i",{className:"jsx-".concat(e_.__hash)+" fas fa-map-marker-alt"}),(0,t.jsx)("span",{className:"jsx-".concat(e_.__hash),children:e.location})]}):(0,t.jsx)("div",{className:"jsx-".concat(e_.__hash)})]})]})]}),(0,t.jsx)("div",{className:"jsx-".concat(e_.__hash)+" button-group",children:"register"===e.status?(0,t.jsx)("a",{href:e.attend.link,className:"jsx-".concat(e_.__hash),children:(0,t.jsx)("button",{className:"jsx-".concat(e_.__hash)+" register-button",children:"Đăng ký"})}):(0,t.jsx)("p",{className:"jsx-".concat(e_.__hash),children:"Sự kiện đã hết hạn đăng kí rồi bạn ơi :D"})})]}),(0,t.jsx)(a.default,{id:e_.__hash,children:e_})]})}constructor(e){super(e),this.state={}}}var ev=s,ek=e.i(41158);let ew=new String(".pagination.jsx-73e051160c8b81b3{white-space:nowrap;align-items:center;font-size:.8rem;display:flex;position:relative}.pagination.jsx-73e051160c8b81b3 .pagination--header.jsx-73e051160c8b81b3{margin-right:10px}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3{flex-flow:wrap;display:flex}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3 .page.jsx-73e051160c8b81b3{text-align:center;box-sizing:border-box;border:1px solid var(--border-dark);min-width:26px;height:26px;color:var(--text-dark);opacity:.5;background-color:#0000;border-radius:3px;outline:none;margin:0 3px 3px 0;padding:0 5px;line-height:24px;display:inline-block}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3 .page.jsx-73e051160c8b81b3:hover{background-color:var(--border-dark);border:1px solid var(--border-dark);color:var(--text-light)}.pagination.jsx-73e051160c8b81b3 .pagination--pages.jsx-73e051160c8b81b3 .current.jsx-73e051160c8b81b3{background-color:var(--border-dark);border:1px solid var(--border-dark);color:var(--text-light);opacity:1;border-radius:3px}@media (max-width:500px){.pagination.jsx-73e051160c8b81b3 .pagination--header.jsx-73e051160c8b81b3{display:none}}");ew.__hash="73e051160c8b81b3";class eN extends ev.default.Component{componentDidMount(){let{query:e}=c.default;this.setState({slug:e.threadId})}UNSAFE_componentWillReceiveProps(e){let{current:t,total:a,thread:s}=e;this.setState({...this.state,current:t,total:a,thread:s})}next(e){e.preventDefault();let{window:t}=this.state,{total:a,limit:s}=this.state;t0&&(t-=a),this.setState({window:t})}render(){let{current:e,total:s,window:o,limit:i,slug:r,thread:n}=this.state;return(0,t.jsxs)("div",{className:"jsx-".concat(ew.__hash),children:[s>1?(0,t.jsx)("div",{className:"jsx-".concat(ew.__hash)+" pagination",children:(0,t.jsxs)("div",{className:"jsx-".concat(ew.__hash)+" pagination--pages",children:[(0,t.jsx)(ek.default,{href:n?n.link:"/thread".concat(r),legacyBehavior:!0,children:(0,t.jsx)("a",{className:"jsx-".concat(ew.__hash)+" "+"page ".concat(1===e?"current":""),children:"1"})},1),o>1&&(0,t.jsx)("button",{onClick:e=>this.back(e),className:"jsx-".concat(ew.__hash)+" page",children:"←"},"window-back"),(0,t.jsx)("div",{className:"jsx-".concat(ew.__hash),children:Array.apply(0,{length:i}).map(Number.call,Number).map(a=>a+o+11&&(0,t.jsx)(ek.default,{href:"".concat(n?n.link:"/thread".concat(r,"/"),"page-").concat(a+o+1),legacyBehavior:!0,children:(0,t.jsx)("a",{className:"jsx-".concat(ew.__hash)+" "+"page ".concat(e===a+o+1?"current":""),children:a+o+1})},a+o+1))}),o+ithis.next(e),className:"jsx-".concat(ew.__hash)+" page",children:"→"},"window-next"),(0,t.jsx)(ek.default,{href:"".concat(n?n.link:"/thread".concat(r,"/"),"page-").concat(s),legacyBehavior:!0,children:(0,t.jsx)("a",{className:"jsx-".concat(ew.__hash)+" "+"page ".concat(e===s?"current":""),children:s})},s)]})}):(0,t.jsx)("div",{className:"jsx-".concat(ew.__hash)}),(0,t.jsx)(a.default,{id:ew.__hash,children:ew})]})}constructor(e){super(e),this.state={current:this.props.current,total:this.props.total,slug:"",window:this.props.current-3,limit:5},this.next=this.next.bind(this),this.back=this.back.bind(this)}}var ey=s;let eT=new String('.related-threads.jsx-931e04a0e380a769{padding-top:1rem;padding-bottom:1rem;position:relative}.related-threads__title.jsx-931e04a0e380a769{color:var(--color-profile-sidebar);text-transform:uppercase;padding-bottom:6px;font-size:1.2rem;font-weight:700;position:relative}.related-threads__container.jsx-931e04a0e380a769{-webkit-flex-flow:wrap;flex-direction:row;align-items:stretch;margin:0 -8px;display:flex}.related-threads__container.compactMode.jsx-931e04a0e380a769{display:block}.related-thread.jsx-931e04a0e380a769{width:25%;margin:.75rem 0;position:relative}.related-thread.compactMode.jsx-931e04a0e380a769{width:100%;margin:.4rem 8px}.related-thread.jsx-931e04a0e380a769 .container.jsx-931e04a0e380a769{-webkit-flex-flow:row;flex-direction:row;align-items:stretch;height:100%;padding:0 8px;display:flex;position:relative}.related-thread.jsx-931e04a0e380a769 .container.jsx-931e04a0e380a769 .inner.jsx-931e04a0e380a769{border-radius:8px;-webkit-flex-flow:column;flex-direction:column;align-items:stretch;width:100%;display:flex;box-shadow:0 1px 4px #66626266}.related-thread__thumbnail.jsx-931e04a0e380a769{background-color:#08497e;background-position:50%;background-repeat:no-repeat;background-size:cover;border-top-left-radius:8px;border-top-right-radius:8px;width:100%;padding-bottom:62%;position:relative}.related-thread__info.jsx-931e04a0e380a769{border-bottom-right-radius:8px;border-bottom-left-radius:8px;flex-direction:column;align-items:flex-start;width:100%;height:100%;padding:10px 10px 0;display:flex}.related-thread__info__title.jsx-931e04a0e380a769{margin-top:.25rem;margin-bottom:10px;font-size:14px}.title-compact.jsx-931e04a0e380a769{color:var(--color-link);font-size:16px;display:flex}.title-compact.jsx-931e04a0e380a769:before{content:"• ";margin-right:5px}.title-compact.jsx-931e04a0e380a769:hover{color:var(--color-accent-dark)}.related-thread__info__author.jsx-931e04a0e380a769{color:var(--color-accent-dark);margin-right:.5rem;font-weight:700}@media (max-width:1000px){.related-thread.jsx-931e04a0e380a769{width:50%}}');eT.__hash="931e04a0e380a769";class eC extends ey.default.Component{render(){let{relatedThreads:e,compactMode:s}=this.props;return e?(0,t.jsxs)("div",{className:"jsx-".concat(eT.__hash),children:[e.length>0?(0,t.jsxs)("div",{className:"jsx-".concat(eT.__hash)+" related-threads",children:[(0,t.jsx)("h2",{className:"jsx-".concat(eT.__hash)+" related-threads__title",children:"CHỦ ĐỀ TƯƠNG TỰ"}),(0,t.jsx)("div",{className:"jsx-".concat(eT.__hash)+" "+"related-threads__container ".concat(s?"compactMode":""),children:e.map(e=>(0,t.jsx)("div",{className:"jsx-".concat(eT.__hash)+" "+"related-thread ".concat(s?"compactMode":""),children:s?(0,t.jsx)("div",{className:"jsx-".concat(eT.__hash)+" container-compact",children:(0,t.jsx)("a",{href:e.link,className:"jsx-".concat(eT.__hash)+" title-compact",children:(0,t.jsx)("h3",{className:"jsx-".concat(eT.__hash),children:e.title})})}):(0,t.jsx)("div",{className:"jsx-".concat(eT.__hash)+" container",children:(0,t.jsxs)("a",{href:e.link,className:"jsx-".concat(eT.__hash)+" inner",children:[(0,t.jsx)("div",{style:{backgroundImage:"url(".concat(e.image,")")},className:"jsx-".concat(eT.__hash)+" related-thread__thumbnail"}),(0,t.jsxs)("div",{className:"jsx-".concat(eT.__hash)+" related-thread__info",children:[(0,t.jsx)("div",{className:"jsx-".concat(eT.__hash)+" related-thread__info__author",children:e.author.name}),(0,t.jsx)("h3",{className:"jsx-".concat(eT.__hash)+" "+"related-thread__info__title ".concat(s?"compactMode":""),children:e.title})]})]})})},e.id))})]}):(0,t.jsx)("div",{className:"jsx-".concat(eT.__hash)}),(0,t.jsx)(a.default,{id:eT.__hash,children:eT})]}):null}constructor(e){super(e),this.state={}}}eC.defaultProps={relatedThreads:[]};let eS=d.f.ApiConsumer(eC);var eP=s;let eD=new String('.related-community.jsx-3fb54c596481783d{background-color:var(--post-background);border-radius:8px;width:100%;margin-top:2rem;margin-bottom:1rem;padding:6px;position:relative}.related-community.jsx-3fb54c596481783d .title.jsx-3fb54c596481783d{text-transform:uppercase;padding:1rem 1rem 0;font-weight:700}.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d{flex-flow:row;justify-content:flex-start;align-items:center;height:100%;padding:.8rem;display:flex}.single-community.jsx-3fb54c596481783d{position:relative}.blur-image.jsx-3fb54c596481783d:before{content:"";z-index:2;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);pointer-events:none;border-radius:8px;width:100%;height:100%;position:absolute}.blur-image.jsx-3fb54c596481783d{-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;border-radius:8px;width:100%;height:150px;margin:auto;transform:scaleX(-1)}.community-overlay.jsx-3fb54c596481783d{text-align:center;z-index:10;width:100%;height:150px;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .left-item.jsx-3fb54c596481783d{flex:0 0 32%}@media (max-width:700px){.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .left-item.jsx-3fb54c596481783d{display:none}}.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .right-item.jsx-3fb54c596481783d{flex-direction:column;align-items:flex-start;margin-left:1rem;display:flex}.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .community-cover.jsx-3fb54c596481783d{border-radius:5px;width:100%;box-shadow:0 1px 4px 1px #969696cc}.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .community-title.jsx-3fb54c596481783d{color:var(--text-light);text-transform:uppercase;margin-bottom:.5rem;font-size:1.2rem;font-weight:700}@media (max-width:700px){.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .community-title.jsx-3fb54c596481783d{font-size:1.4rem}}.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .community-description.jsx-3fb54c596481783d{color:#615e5e;font-size:14px;font-weight:200}.community-button.jsx-3fb54c596481783d{background-color:var(--button-dark);color:var(--text-light);text-transform:uppercase;border:none;border-radius:20px;margin-top:1rem;padding:.6rem 1.2rem;font-weight:700}.community-button.jsx-3fb54c596481783d:hover{background-color:var(--color-accent-dark);border:1px solid var(--color-accent-dark);color:var(--color-light-0)}@media (max-width:700px){.related-community.jsx-3fb54c596481783d .community.jsx-3fb54c596481783d .community-button.jsx-3fb54c596481783d{width:100%;padding:.4rem 1rem;font-size:14px}}.related-community.jsx-3fb54c596481783d .communities.jsx-3fb54c596481783d{flex-flow:row;align-items:stretch;margin-top:1rem;padding:0 1rem 1rem;display:flex;overflow-x:auto;overflow-y:hidden}@media (max-width:700px){.related-community.jsx-3fb54c596481783d .communities.jsx-3fb54c596481783d{flex-wrap:wrap;justify-content:center}.related-community.jsx-3fb54c596481783d .communities.jsx-3fb54c596481783d .community-block.jsx-3fb54c596481783d{margin-bottom:1.5rem}}.related-community.jsx-3fb54c596481783d .communities.jsx-3fb54c596481783d .community-block.jsx-3fb54c596481783d{flex-direction:column;align-items:flex-start;margin-right:12px;display:flex;position:relative}.related-community.jsx-3fb54c596481783d .communities.jsx-3fb54c596481783d .community-cover.jsx-3fb54c596481783d{border-radius:5px;width:200px}.related-community.jsx-3fb54c596481783d .communities.jsx-3fb54c596481783d .community-title.jsx-3fb54c596481783d{color:#353535;margin-top:5px;font-size:.8rem;font-weight:700}.community-overlay-button.jsx-3fb54c596481783d{justify-content:center;width:100%;display:flex;position:absolute;bottom:-12%;left:0}.community-overlay-button.jsx-3fb54c596481783d .community-button.jsx-3fb54c596481783d{padding:.4rem .8rem;font-size:12px;font-weight:500}');eD.__hash="3fb54c596481783d";class ez extends eP.default.Component{getColors(e){window.alert("Get colors");let{colors:t}=this.state;this.setState({colors:[...t,...e]})}render(){let{relatedCommunities:e}=this.props;return e&&e[0]?(0,t.jsxs)("div",{className:"jsx-".concat(eD.__hash),children:[e.length>1?(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" related-community",children:(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" communities",children:e.map(e=>(0,t.jsxs)("a",{href:e.links.permalink,className:"jsx-".concat(eD.__hash)+" community-block",children:[(0,t.jsx)("img",{src:e.links.image,alt:e.fullName,className:"jsx-".concat(eD.__hash)+" community-cover"}),(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" community-overlay-button",children:(0,t.jsx)("button",{type:"button",className:"jsx-".concat(eD.__hash)+" community-button",children:"Thảo luận ngay"})},e.tagId)]},e.tagId))})}):(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" related-community",children:(0,t.jsxs)("div",{className:"jsx-".concat(eD.__hash)+" single-community",children:[(0,t.jsx)("div",{style:{background:"\n linear-gradient(\n rgba(100, 100, 100, 0.05), \n rgba(100, 100, 100, 0.05)\n ),\n url(".concat(e[0].links.image,")\n ")},className:"jsx-".concat(eD.__hash)+" blur-image"}),(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" community-overlay",children:(0,t.jsxs)("div",{className:"jsx-".concat(eD.__hash)+" community",children:[(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" left-item",children:(0,t.jsx)("a",{href:e[0].links.permalink,className:"jsx-".concat(eD.__hash),children:(0,t.jsx)("img",{src:e[0].links.image,alt:e[0].fullName,className:"jsx-".concat(eD.__hash)+" community-cover"})})}),(0,t.jsxs)("div",{className:"jsx-".concat(eD.__hash)+" right-item",children:[(0,t.jsx)("a",{href:e[0].links.permalink,className:"jsx-".concat(eD.__hash),children:(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" community-title",children:"Cộng đồng ".concat(e[0].fullName)})}),(0,t.jsx)("div",{className:"jsx-".concat(eD.__hash)+" community-description",children:e[0].description}),(0,t.jsx)("a",{href:e[0].links.permalink,className:"jsx-".concat(eD.__hash),children:(0,t.jsx)("button",{type:"button",className:"jsx-".concat(eD.__hash)+" community-button",children:"Thảo luận ngay"})})]})]})})]})}),(0,t.jsx)(a.default,{id:eD.__hash,children:eD})]}):null}constructor(e){super(e),this.state={colors:[]}}}ez.defaultProps={relatedCommunities:[]},d.f.ApiConsumer(ez);var eR=e.i(704603);let eA=new String(".main.jsx-7174e6baea28d21{justify-content:center;min-width:296px;height:100px;padding-bottom:24px;display:flex}@media (min-width:760px){.main.jsx-7174e6baea28d21{min-width:728px;height:90px}}");eA.__hash="7174e6baea28d21";let eI=e=>{let{path:s}=e;return(0,t.jsxs)("div",{className:"jsx-".concat(eA.__hash)+" main",children:[(0,t.jsx)(eR.f,{path:s,sizes:[{viewport:[0,0],slot:[320,100]},{viewport:[760,0],slot:[728,90]}]}),(0,t.jsx)(a.default,{id:eA.__hash,children:eA})]})},eM=new String(".moderator-action__button.jsx-6ef1d72b436e0f72{color:var(--text-dark);cursor:pointer;background-color:#0000;border-radius:4px;margin-left:6px;padding:7px 12px;font-size:.8rem}.moderator-action__button.active.jsx-6ef1d72b436e0f72,.moderator-action__button.jsx-6ef1d72b436e0f72:hover{background-color:var(--hover-background)}.delete-confirmation-box.jsx-6ef1d72b436e0f72{margin-top:12px}.confirm-delete-text.jsx-6ef1d72b436e0f72{margin-bottom:12px;font-size:16px;font-weight:700}.confirm-button.jsx-6ef1d72b436e0f72{border-radius:4px;margin-right:12px;padding:6px 12px;font-size:14px;font-weight:700}.confirm-button.confirm-delete.jsx-6ef1d72b436e0f72{background-color:var(--active-indicator-red);color:var(--text-light)}.confirm-button.cancel.jsx-6ef1d72b436e0f72{background-color:var(--button-light);color:var(--text-dark)}.confirm-button.review-ui.jsx-6ef1d72b436e0f72{background-color:var(--button-high-contrast);color:var(--button-high-contrast-text)}.modal-title.jsx-6ef1d72b436e0f72{color:var(--text-dark);justify-content:space-between;align-items:center;font-size:18px;font-weight:700;display:flex}.modal-title.jsx-6ef1d72b436e0f72 .close.jsx-6ef1d72b436e0f72 svg path{fill:var(--text-dark)}.modal-description.jsx-6ef1d72b436e0f72{margin-top:12px;margin-bottom:12px}.modal-description.jsx-6ef1d72b436e0f72 p.jsx-6ef1d72b436e0f72{color:var(--text-dark);font-size:14px}.modal-controls.jsx-6ef1d72b436e0f72{margin-top:12px;margin-bottom:12px;display:flex}.modal-button.jsx-6ef1d72b436e0f72{text-align:center;background:var(--button-light);border-radius:4px;width:100%;margin:12px;padding:13px 10px;font-size:16px;font-weight:700}.modal-button.jsx-6ef1d72b436e0f72:first-child{margin-left:0}.modal-button.jsx-6ef1d72b436e0f72:nth-child(2){margin-right:0}.modal-button.jsx-6ef1d72b436e0f72:hover{background-color:var(--hover-background)}.modal-button.yes.jsx-6ef1d72b436e0f72{color:var(--button-high-contrast-text);background-color:var(--button-high-contrast)}.modal-button.yes.jsx-6ef1d72b436e0f72:hover{background-color:var(--button-high-contrast-hover)}");eM.__hash="6ef1d72b436e0f72";let eB=e=>{let{thread:s,threadId:o}=e;return(0,t.jsxs)("div",{className:"jsx-".concat(eM.__hash),children:[s&&s.isReviewArticle&&s.reviewExtraData&&s.reviewExtraData.productName?(0,t.jsx)("a",{href:"/review/edit/".concat(o||s.id,"/"),className:"jsx-".concat(eM.__hash),children:(0,t.jsx)("div",{className:"jsx-".concat(eM.__hash)+" moderator-action",children:(0,t.jsx)("button",{className:"jsx-".concat(eM.__hash)+" moderator-action__button",children:"Sửa bài"})})}):(0,t.jsx)("a",{href:"/editorv2/edit/".concat(o||s.id,"/"),className:"jsx-".concat(eM.__hash),children:(0,t.jsx)("div",{className:"jsx-".concat(eM.__hash)+" moderator-action",children:(0,t.jsx)("button",{className:"jsx-".concat(eM.__hash)+" moderator-action__button",children:"Sửa bài"})})}),(0,t.jsx)(a.default,{id:eM.__hash,children:eM})]})},eE=new String(".main.jsx-980e73d36ee146d1{border:2px solid var(--thread-intro-border);background-color:var(--thread-intro-background);border-radius:4px;align-items:center;padding:16px;font-size:18px;display:flex}@media (max-width:767px){.main.jsx-980e73d36ee146d1{flex-direction:column;justify-content:center;margin:12px}}.logo.jsx-980e73d36ee146d1{width:180px;margin-bottom:12px;margin-right:16px}@media (max-width:767px){.logo.jsx-980e73d36ee146d1{justify-content:center;margin-bottom:16px;display:block}}.intro.jsx-980e73d36ee146d1{color:var(--text-always-black)}.read-more.jsx-980e73d36ee146d1{margin-top:16px}@media (max-width:767px){.read-more.jsx-980e73d36ee146d1{justify-content:center;align-items:center;display:flex}}.read-more.jsx-980e73d36ee146d1 .read-more-button.jsx-980e73d36ee146d1{color:var(--text-always-black);background-color:var(--thread-intro-border);text-align:center;border-radius:6px;width:100%;padding:8px 12px;font-size:16px;font-weight:700}");eE.__hash="980e73d36ee146d1";let eF=()=>(0,t.jsxs)("div",{className:"jsx-".concat(eE.__hash)+" main",children:[(0,t.jsx)("img",{src:"/static/images/deeptalk_logo_color.png",alt:"Deeptalk - các bài viết chất lượng",className:"jsx-".concat(eE.__hash)+" logo"}),(0,t.jsxs)("div",{className:"jsx-".concat(eE.__hash),children:[(0,t.jsxs)("p",{className:"jsx-".concat(eE.__hash)+" intro",children:[(0,t.jsx)("b",{className:"jsx-".concat(eE.__hash),children:"Deeptalk"})," là dạng bài phân tích sâu, nội dung chất lượng với đồ họa đẹp, coi sướng con mắt. Hình ảnh trong bài Deeptalk được mở rộng ra tối đa để bạn có thể chiêm ngưỡng và đón nhận thông tin theo cách hoàn toàn mới. Hãy pha một ly cà phê thật ngon, vừa nhâm nhi vừa đọc bài Deeptalk nhé, sẽ phê lắm đó!"]}),(0,t.jsx)("div",{className:"jsx-".concat(eE.__hash)+" read-more",children:(0,t.jsx)("a",{href:"/deeptalk",target:"_blank",rel:"noreferrer",className:"jsx-".concat(eE.__hash)+" read-more-button",children:"Xem thêm các bài Deeptalk"})})]}),(0,t.jsx)(a.default,{id:eE.__hash,children:eE})]}),eL=new String(".tag-intro-box-wrapper.jsx-d05db5f5da505036{max-width:768px;margin:auto}.main.jsx-d05db5f5da505036{border:2px solid var(--thread-intro-border);background-color:var(--thread-intro-background);border-radius:4px;align-items:center;margin-top:12px;padding:16px;font-size:18px;display:flex}@media (max-width:767px){.main.jsx-d05db5f5da505036{flex-direction:column;justify-content:center;margin:12px}}.main-text.jsx-d05db5f5da505036{color:var(--text-always-black)}.logo.jsx-d05db5f5da505036{width:180px;height:56px;margin-bottom:12px;margin-right:16px}@media (max-width:767px){.logo.jsx-d05db5f5da505036{justify-content:center;display:block}}.read-more.jsx-d05db5f5da505036{margin-top:16px}@media (max-width:767px){.read-more.jsx-d05db5f5da505036{justify-content:center;align-items:center;display:flex}}.read-more.jsx-d05db5f5da505036 .read-more-button.jsx-d05db5f5da505036{background-color:var(--thread-intro-border);color:var(--text-always-black);text-align:center;border-radius:6px;width:100%;padding:8px 12px;font-size:16px;font-weight:700}");eL.__hash="d05db5f5da505036";let eU=(0,v.f)(L.f.subscribe(e=>{let{tagIntroBoxConfig:s,thread:o}=e,i=o.tags;if(!i||i.length<=0)return null;let r=[];return s.forEach(e=>{i.forEach(t=>{if(e.tag===t.tag){let t={...e};t.htmlText=t.text.replace(e.highlight_text,"".concat(e.highlight_text,"")),r.push(t)}})}),(0,t.jsxs)("div",{className:"jsx-".concat(eL.__hash)+" tag-intro-box-wrapper",children:[r.map((e,a)=>(0,t.jsx)("div",{className:"jsx-".concat(eL.__hash)+" main",children:(0,t.jsxs)("div",{className:"jsx-".concat(eL.__hash),children:[(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:"

".concat(e.htmlText,"

")},className:"jsx-".concat(eL.__hash)+" main-text"}),(0,t.jsx)("div",{className:"jsx-".concat(eL.__hash)+" read-more",children:(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eL.__hash)+" read-more-button",children:e.button_text})})]})},"tag-intro-box-".concat(a))),(0,t.jsx)(a.default,{id:eL.__hash,children:eL})]})},e=>{let{tagIntroBox:t}=e;return{tagIntroBoxConfig:t}}),{errorMsg:"Lỗi box :( Anh em báo mod giùm nha"}),eO=new String("");eO.__hash="e43e7f1a484b1acb";let eH=new String(".ttbc23-thankyou-container.jsx-cbdd8ec626dee8da{color:#000;background-color:#fff;width:100%;padding:50px 0 0;position:relative}.logo.jsx-cbdd8ec626dee8da{justify-content:center;align-items:center;margin:20px auto 10px;display:flex}.logo.jsx-cbdd8ec626dee8da .tinhte-logo.jsx-cbdd8ec626dee8da{vertical-align:middle;width:60px;display:inline-block}.logo.jsx-cbdd8ec626dee8da .tinhte-logo.jsx-cbdd8ec626dee8da svg{display:block}.logo.jsx-cbdd8ec626dee8da .tinhte-text.jsx-cbdd8ec626dee8da{vertical-align:middle;color:#fff;margin-left:12px;font-size:32px;font-weight:500;display:inline-block}.ttbc23-sponsor-footer__thankyou.jsx-cbdd8ec626dee8da{text-align:center;color:#000;text-transform:uppercase;width:90%;max-width:680px;margin:0 auto 1rem;font-size:32px;font-weight:700;line-height:1.5}.ttbc23-sponsor-footer-wrapper.jsx-cbdd8ec626dee8da{flex-direction:column;align-items:center;display:flex}.ttbc23-sponsor-footer-wrapper.jsx-cbdd8ec626dee8da:last-child{padding-bottom:50px}.ttbc23-sponsor-footer__line.jsx-cbdd8ec626dee8da{background-image:linear-gradient(270deg,#0000 0%,#0003 51.56%,#0000 100%);width:50%;height:2px}.ttbc23-sponsor-footer__label.jsx-cbdd8ec626dee8da{margin-top:2rem;font-size:24px;font-weight:700}.ttbc23-sponsor-footer__logos.jsx-cbdd8ec626dee8da{flex-flow:wrap;justify-content:center;align-items:center;max-width:1024px;padding:20px 0 30px;display:flex}.ttbc23-sponsor-footer__logo.jsx-cbdd8ec626dee8da{max-width:200px;margin:15px}.ttbc23-sponsor-footer__logo.max-height.jsx-cbdd8ec626dee8da{max-width:none}@media (max-width:600px){.ttbc23-sponsor-footer__thankyou.jsx-cbdd8ec626dee8da{line-height:1.4}.ttbc23-sponsor-footer__logo.small.jsx-cbdd8ec626dee8da{width:80px}.ttbc23-sponsor-footer__logo.small.short.jsx-cbdd8ec626dee8da{width:auto;height:50px}}");eH.__hash="cbdd8ec626dee8da";let eV=d.f.ApiConsumer(e=>{let{sponsors:s}=e;return(0,t.jsxs)("div",{id:"sponsors",className:"jsx-".concat(eH.__hash)+" ttbc23-thankyou-container",children:[(0,t.jsx)("p",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__thankyou",children:s&&s.title}),s&&s.golds&&s.golds.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("p",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__label",children:"Nhà tài trợ Vàng"}),(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__logos",children:s.golds.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eH.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),s&&s.silvers&&s.silvers.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__line"}),(0,t.jsx)("p",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__label",children:"Nhà tài trợ Bạc"}),(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__logos",children:s.silvers.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eH.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),s&&s.bronzes&&s.bronzes.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__line"}),(0,t.jsx)("p",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__label",children:"Nhà tài trợ chính"}),(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__logos",children:s.bronzes.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eH.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),s&&s.partners&&s.partners.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__line"}),(0,t.jsx)("p",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__label",children:"Đơn vị đồng hành"}),(0,t.jsx)("div",{className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__logos",children:s.partners.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eH.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eH.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),(0,t.jsx)(a.default,{id:eH.__hash,children:eH})]})}),eq=d.f.ApiConsumer(e=>{let[o,i]=(0,s.useState)({});return(0,s.useEffect)(()=>{(()=>{let{api:t}=e;t.get({uri:"/threads/".concat(4069501),headers:{"Api-Post-Tree":1}}).then(e=>{e.thread&&i(JSON.parse(e.thread.first_post.post_body_plain_text||"{}").sponsors)}).catch(e=>{let{message:t}=(0,p.f)(e);console.log(t)})})()},[]),(0,t.jsxs)("div",{id:"sponsors",className:"jsx-".concat(eO.__hash)+" ttbc-thankyou-container",children:[(0,t.jsx)(eV,{sponsors:o}),(0,t.jsx)(a.default,{id:eO.__hash,children:eO})]})}),eW=new String("");eW.__hash="2dc03891fcfb6e36";let eG=d.f.ApiConsumer(e=>{let[o,i]=(0,s.useState)(""),[r,n]=(0,s.useState)("");return(0,s.useEffect)(()=>{(()=>{let{api:t}=e;t.get({uri:"/posts/".concat(0x3f45d72)}).then(e=>{let t=JSON.parse(e.post.post_body_plain_text)||{};i(t.sponsorBoxDesktop),n(t.sponsorBoxMobile)}).catch(e=>{let{message:t}=(0,p.f)(e);console.log(t)})})()},[]),(0,t.jsxs)("div",{className:"jsx-".concat(eW.__hash)+" main",children:[(0,t.jsxs)("a",{href:"/ttbc?utm_source=internal&utm_medium=ttbc24_thread_sponsors_box",className:"jsx-".concat(eW.__hash),children:[(0,t.jsx)("img",{alt:"Nhà tài trợ Tinh tế Bình chọn",src:o,className:"jsx-".concat(eW.__hash)+" hidden-xs"}),(0,t.jsx)("img",{alt:"Nhà tài trợ Tinh tế Bình chọn",src:r,className:"jsx-".concat(eW.__hash)+" visible-xs"})]}),(0,t.jsx)(a.default,{id:eW.__hash,children:eW})]})}),eX=new String("");eX.__hash="e43e7f1a484b1acb";let eY=new String(".ttbc23-thankyou-container.jsx-4e8d41dfd97120e8{color:#000;background-color:#fff;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:50px 0 0;display:flex;position:relative}.logo.jsx-4e8d41dfd97120e8{justify-content:center;align-items:center;margin:20px auto 10px;display:flex}.logo.jsx-4e8d41dfd97120e8 .tinhte-logo.jsx-4e8d41dfd97120e8{vertical-align:middle;width:60px;display:inline-block}.logo.jsx-4e8d41dfd97120e8 .tinhte-logo.jsx-4e8d41dfd97120e8 svg{display:block}.logo.jsx-4e8d41dfd97120e8 .tinhte-text.jsx-4e8d41dfd97120e8{vertical-align:middle;color:#fff;margin-left:12px;font-size:32px;font-weight:500;display:inline-block}.ttbc23-sponsor-footer__thankyou.jsx-4e8d41dfd97120e8{text-align:center;color:#000;text-transform:uppercase;width:90%;max-width:680px;margin:0 auto 1rem;font-size:32px;font-weight:700;line-height:1.5}.ttbc23-sponsor-footer-wrapper.jsx-4e8d41dfd97120e8{flex-direction:column;align-items:center;display:flex}.ttbc23-sponsor-footer-wrapper.jsx-4e8d41dfd97120e8:last-child{padding-bottom:50px}.ttbc23-sponsor-footer__line.jsx-4e8d41dfd97120e8{background-image:linear-gradient(270deg,#0000 0%,#0003 51.56%,#0000 100%);width:50%;height:2px}.ttbc23-sponsor-footer__label.jsx-4e8d41dfd97120e8{margin-top:2rem;font-size:24px;font-weight:700}.ttbc23-sponsor-footer__logos.jsx-4e8d41dfd97120e8{flex-flow:wrap;justify-content:center;align-items:center;max-width:1024px;padding:20px 0 30px;display:flex}.ttbc23-sponsor-footer__logo.jsx-4e8d41dfd97120e8{max-width:200px;margin:15px}.ttbc23-sponsor-footer__logo.max-height.jsx-4e8d41dfd97120e8{max-width:none}.ttbc23-sponsor-footer__all-sponsors.jsx-4e8d41dfd97120e8{width:100%;max-width:1024px;margin:0 auto;padding:20px 0 30px}@media (max-width:600px){.ttbc23-sponsor-footer__thankyou.jsx-4e8d41dfd97120e8{line-height:1.4}.ttbc23-sponsor-footer__logo.small.jsx-4e8d41dfd97120e8{width:80px}.ttbc23-sponsor-footer__logo.small.short.jsx-4e8d41dfd97120e8{width:auto;height:50px}}");eY.__hash="4e8d41dfd97120e8";let eK=d.f.ApiConsumer(e=>{let{sponsors:s}=e;return(0,t.jsxs)("div",{id:"sponsors",className:"jsx-".concat(eY.__hash)+" ttbc23-thankyou-container",children:[(0,t.jsx)("p",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__thankyou",children:s&&s.title}),s&&s.allSponsors&&(0,t.jsx)("img",{src:s.allSponsors,alt:"Nhà tài trợ TTBC25",className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__all-sponsors"}),s&&s.golds&&s.golds.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("p",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__label",children:"Nhà tài trợ Vàng"}),(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__logos",children:s.golds.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eY.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),s&&s.silvers&&s.silvers.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__line"}),(0,t.jsx)("p",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__label",children:"Nhà tài trợ Bạc"}),(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__logos",children:s.silvers.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eY.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),s&&s.bronzes&&s.bronzes.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__line"}),(0,t.jsx)("p",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__label",children:"Nhà tài trợ chính"}),(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__logos",children:s.bronzes.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eY.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),s&&s.partners&&s.partners.length>0&&(0,t.jsxs)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer-wrapper",children:[(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__line"}),(0,t.jsx)("p",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__label",children:"Đơn vị đồng hành"}),(0,t.jsx)("div",{className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__logos",children:s.partners.map(e=>(0,t.jsx)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"jsx-".concat(eY.__hash)+" ttbc23-sponsor-footer__link",children:(0,t.jsx)("img",{style:{maxHeight:e.height},alt:"Nhà tài trợ TTBC22",src:e.logo,className:"jsx-".concat(eY.__hash)+" "+"ttbc23-sponsor-footer__logo ".concat(e.height?"max-height":"")})},e.logo))})]}),(0,t.jsx)(a.default,{id:eY.__hash,children:eY})]})}),eJ=d.f.ApiConsumer(e=>{let[o,i]=(0,s.useState)({});return(0,s.useEffect)(()=>{(()=>{let{api:t}=e;t.get({uri:"/threads/".concat(4069501),headers:{"Api-Post-Tree":1}}).then(e=>{e.thread&&i(JSON.parse(e.thread.first_post.post_body_plain_text||"{}").sponsors)}).catch(e=>{let{message:t}=(0,p.f)(e);console.log(t)})})()},[]),(0,t.jsxs)("div",{id:"sponsors",className:"jsx-".concat(eX.__hash)+" ttbc-thankyou-container",children:[(0,t.jsx)(eK,{sponsors:o}),(0,t.jsx)(a.default,{id:eX.__hash,children:eX})]})});var eQ=e.i(770267);function e$(){return(e$=Object.assign.bind()).apply(null,arguments)}let eZ=e=>s.createElement("svg",e$({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 30"},e),s.createElement("path",{d:"M29.5 2.7c.6-.6.6-1.6 0-2.3-.6-.6-1.6-.6-2.3 0L15 12.7 2.7.5C2.1-.1 1.1-.1.4.5s-.6 1.6 0 2.3L12.7 15 .5 27.3c-.6.6-.6 1.6 0 2.3.6.6 1.6.6 2.3 0L15 17.3l12.3 12.3c.6.6 1.6.6 2.3 0 .6-.6.6-1.6 0-2.3L17.3 15z",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#2d3748"}})),e0=new String(".modal.jsx-d18e960f5662a7bf{background:var(--color-light-0);position:relative}.modal-title.jsx-d18e960f5662a7bf{background:var(--page-background);border-bottom:1px solid var(--border-light);flex-direction:row;justify-content:space-between;align-items:center;width:100%;padding:12px 24px;display:flex;position:relative}.title-text.jsx-d18e960f5662a7bf{color:var(--primary-text);font-size:16px;font-weight:600;line-height:2}.modal-button__close.jsx-d18e960f5662a7bf{z-index:2;width:18px;height:18px}.model-content.jsx-d18e960f5662a7bf{color:#000;background:var(--page-background);height:100%;min-height:300px;padding:12px 24px;overflow:auto}.block-title.jsx-d18e960f5662a7bf{color:var(--primary-text);margin-bottom:12px;font-size:16px;font-weight:600}.tag-input.jsx-d18e960f5662a7bf{background-color:var(--dropdown-control-background);border:1px solid var(--dropdown-control-border);width:100%;min-height:100px;color:var(--editor-control-text);resize:none;border-radius:4px;padding:12px;font-size:16px;line-height:24px}.save-button.jsx-d18e960f5662a7bf{background-color:var(--color-accent-dark);color:var(--color-light-0);border-radius:4px;width:100%;margin:24px 0;padding:12px 48px;font-size:18px;font-weight:700}.error.jsx-d18e960f5662a7bf{color:red}");e0.__hash="d18e960f5662a7bf",eQ.default.setAppElement("body");let e3={content:{maxWidth:"680px",width:"90%",top:"50%",left:"50%",maxHeight:"90%",right:"auto",bottom:"auto",marginRight:"-50%",padding:"0 !important",transform:"translate(-50%, -50%)",boxShadow:"-10px 10px #3DE4D1",display:"flex",flexDirection:"column",border:"1px solid var(--border-light)"}},e5=d.f.ApiConsumer(e=>{let{isOpen:o,thread:i,handleCloseModal:r,api:n}=e,[d,c]=(0,s.useState)(o),[l,h]=(0,s.useState)(null),[x,p]=(0,s.useState)(null),[m,f]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{c(o)},[o]),(0,s.useEffect)(()=>{h(i.tagString)},[i]),(0,t.jsxs)("div",{className:"jsx-".concat(e0.__hash)+" modal",children:[(0,t.jsxs)(eQ.default,{isOpen:d,onRequestClose:r,onAfterOpen:()=>void(window.document.body.style.overflow="hidden"),style:e3,shouldCloseOnOverlayClick:!0,children:[(0,t.jsxs)("div",{className:"jsx-".concat(e0.__hash)+" modal-title",children:[(0,t.jsx)("p",{className:"jsx-".concat(e0.__hash)+" title-text",children:"Phân loại bài viết"}),(0,t.jsx)("button",{onClick:()=>r(),className:"jsx-".concat(e0.__hash)+" modal-button__close",children:(0,t.jsx)(eZ,{})})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e0.__hash)+" model-content",children:[(0,t.jsx)(ee.f,{threadId:i.id,forumId:i.forumId,thread:i}),(0,t.jsx)("p",{className:"jsx-".concat(e0.__hash)+" block-title",children:"Thêm tag vào bài viết của bạn"}),(0,t.jsx)("textarea",{type:"text",value:l,onChange:e=>{h(e.target.value)},placeholder:"Bạn có thể thêm nhiều tag bằng việc ngăn cách bằng dấu phẩy. (Ví dụ: điện thoại, iphone14)",className:"jsx-".concat(e0.__hash)+" tag-input"}),(0,t.jsx)("button",{onClick:()=>(f(!0),void n.put({uri:"https://tinhte.vn/appforo/index.php?threads/".concat(i.id),params:{thread_tags:l}}).then(()=>{f(!1),r()}).catch(e=>{f(!1),console.log(e),p(e.toString())})),disabled:m,className:"jsx-".concat(e0.__hash)+" "+"save-button ".concat(m?"isSubmitting":""),children:m?"Đang lưu, chờ xíu nhen...":"Xác nhận"}),(0,t.jsx)("p",{className:"jsx-".concat(e0.__hash)+" error",children:x})]})]}),(0,t.jsx)(a.default,{id:e0.__hash,children:e0})]})});var e1=e.i(210578),e4=e.i(628377),e2=e.i(239423),e6=e.i(313821),e7=e.i(934574),e8=e.i(212005);let e9=new String('.thread-view--container.jsx-5ed43f3a323db305{width:100%;height:100%;position:relative}.thread-view--content-wrapper.jsx-5ed43f3a323db305{position:relative}.thread-view.jsx-5ed43f3a323db305{background-color:var(--page-background);word-wrap:break-word;border:none;border-radius:3px;width:100%;margin-bottom:2rem;font-size:11pt;line-height:1.4;position:relative}.thread-deleted.jsx-5ed43f3a323db305{background-color:var(--active-indicator-red);color:var(--text-light);width:100%;padding:12px;font-weight:700}.thread-is-moderated.jsx-5ed43f3a323db305{color:var(--text-dark);background-color:#f9bc6d;justify-content:space-between;align-items:center;width:100%;padding:6px;font-size:14px;font-weight:700;display:flex}.thread-is-moderated.jsx-5ed43f3a323db305 .icon-info.jsx-5ed43f3a323db305{color:var(--color-alert-badge);padding:4px;font-size:16px}.thread-is-draft.jsx-5ed43f3a323db305{background-color:var(--active-indicator);color:var(--text-dark);align-items:center;width:100%;padding:6px;font-size:14px;font-weight:700;display:flex}.thread-is-draft.jsx-5ed43f3a323db305 .edit.jsx-5ed43f3a323db305{margin-left:12px;text-decoration:underline}.thread-is-draft.jsx-5ed43f3a323db305 .edit.jsx-5ed43f3a323db305 .moderator-action__button{text-decoration:underline}.thread-cover.jsx-5ed43f3a323db305{width:100%;padding:.5rem 0;position:relative}.thread-cover.deeptalk.jsx-5ed43f3a323db305{padding-top:0;padding-bottom:2.5rem}.thread-cover.deeptalk.jsx-5ed43f3a323db305 img.jsx-5ed43f3a323db305{border-radius:0}.thread-cover.jsx-5ed43f3a323db305 .thread-cover__image.jsx-5ed43f3a323db305{cursor:pointer;border-radius:12px;width:100%;height:auto;margin:0;padding:0;display:block}.thread-breadcrumb.jsx-5ed43f3a323db305{flex-wrap:wrap;justify-content:space-between;align-items:center;font-size:.9rem;font-weight:500;display:flex;position:relative}@media (max-width:700px){.thread-breadcrumb.jsx-5ed43f3a323db305 .forum-wrapper.jsx-5ed43f3a323db305{white-space:nowrap;width:100%;margin-bottom:1rem;overflow:auto}}.thread-breadcrumb.jsx-5ed43f3a323db305 .forums.jsx-5ed43f3a323db305{flex-wrap:nowrap;display:flex}.subbrand.jsx-5ed43f3a323db305{margin-top:12px;margin-bottom:12px}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305{align-items:center;display:flex}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-img.jsx-5ed43f3a323db305{width:60px;margin-right:14px}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-name.jsx-5ed43f3a323db305{color:var(--text-dark);font-size:27px;font-weight:700}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-name.jsx-5ed43f3a323db305:hover{color:var(--text-link);cursor:pointer}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-name.jsx-5ed43f3a323db305 .subbrand-main-name.jsx-5ed43f3a323db305{margin-right:6px}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-name.jsx-5ed43f3a323db305 .subbrand-main-name.xe.jsx-5ed43f3a323db305{color:var(--color-accent-dark-xe)}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-name.jsx-5ed43f3a323db305 .subbrand-main-name.audio.jsx-5ed43f3a323db305{color:var(--color-accent-dark-audio)}.subbrand.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305 .subbrand-name.jsx-5ed43f3a323db305 .subbrand-domain.jsx-5ed43f3a323db305{font-size:14px}.notification-action.jsx-5ed43f3a323db305{justify-content:center;align-items:center;margin:0 10px;font-size:18px;display:flex}.notification-action.jsx-5ed43f3a323db305 .notification-action__button.jsx-5ed43f3a323db305{color:var(--text-dark)}.notification-action.jsx-5ed43f3a323db305 .notification-action__button.active.jsx-5ed43f3a323db305{color:var(--button-high-contrast)}.bookmark-button.jsx-5ed43f3a323db305{height:40px}.moderator-action.jsx-5ed43f3a323db305{align-items:center;display:flex}.moderator-action.edit.jsx-5ed43f3a323db305{margin-right:12px}.moderator-action.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305{margin-right:1rem}.moderator-action.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305:last-child{margin-right:0}.moderator-action__button.jsx-5ed43f3a323db305{text-align:left;width:100%;color:var(--text-dark);cursor:pointer;white-space:nowrap;background-color:#0000;border-radius:4px;padding:7px 12px!important}.moderator-action__button.active.jsx-5ed43f3a323db305,.moderator-action__button.jsx-5ed43f3a323db305:hover{background-color:var(--hover-background)}.thread-breadcrumb.jsx-5ed43f3a323db305 .label.jsx-5ed43f3a323db305{align-items:center;margin-right:10px;display:flex;position:relative}.thread-breadcrumb.jsx-5ed43f3a323db305 .label.jsx-5ed43f3a323db305:last-child{font-weight:700}.thread-breadcrumb.jsx-5ed43f3a323db305 .label.jsx-5ed43f3a323db305:after{content:"";border-top:5px solid #0000;border-bottom:5px solid #0000;border-left:5px solid #a8a8a8;width:0;height:0;margin-left:10px;display:flex}.thread-breadcrumb.jsx-5ed43f3a323db305 .label.jsx-5ed43f3a323db305:last-child:after{content:"";display:none}.thread-title__block.jsx-5ed43f3a323db305{flex-direction:row;align-items:center;display:flex}.thread-title__edit.jsx-5ed43f3a323db305,.thread-title__confirm.jsx-5ed43f3a323db305,.thread-title__cancel.jsx-5ed43f3a323db305{color:var(--trending-threads-text-dark);margin-left:1rem;font-size:1.2rem}.thread-tag__edit.jsx-5ed43f3a323db305{margin-left:.5rem;margin-right:.3rem}.thread-title__confirm.jsx-5ed43f3a323db305{color:var(--text-light);background-color:var(--color-accent-dark);text-align:center;border-radius:50%;width:2rem;height:2rem;line-height:2rem}.thread-title__confirm.isUpdating.jsx-5ed43f3a323db305{background-color:var(--color-light-2)}.thread-title__cancel.jsx-5ed43f3a323db305{font-size:1rem}.thread-title__input.jsx-5ed43f3a323db305{border:1px solid #f1f1f1;border-radius:4px;outline:none;width:calc(100% - 6rem);margin:15px 0;padding:3px 5px;font-size:1.5rem}.thread-title__block.small.jsx-5ed43f3a323db305 .thread-title__input.jsx-5ed43f3a323db305{font-size:1rem;line-height:1.5rem}.thread-title.jsx-5ed43f3a323db305{color:var(--text-dark);padding:1rem 0;font-size:32px;font-weight:700;display:flex}@media (max-width:700px){.thread-title.jsx-5ed43f3a323db305{font-size:25px;line-height:1.2}}.title-error.jsx-5ed43f3a323db305{margin-bottom:12px}.title-error-message.jsx-5ed43f3a323db305{color:var(--color-error);font-weight:700}.thread-info.jsx-5ed43f3a323db305{justify-content:space-between;align-items:center;padding-bottom:15px;display:flex;position:relative}.deeptalk-thread-info.jsx-5ed43f3a323db305{padding:12px}.thread-info.jsx-5ed43f3a323db305 .info-block--left.jsx-5ed43f3a323db305,.thread-info.jsx-5ed43f3a323db305 .info-block--right.jsx-5ed43f3a323db305{justify-content:space-between;display:flex}.menu-content-row.jsx-5ed43f3a323db305{margin:0;padding:0 12px 12px}.thread-info.jsx-5ed43f3a323db305 .info-block--right.jsx-5ed43f3a323db305{justify-content:flex-end;align-items:center;column-gap:15px}.thread-info.jsx-5ed43f3a323db305 .avatar.jsx-5ed43f3a323db305{background-position:50%;background-repeat:no-repeat;background-size:cover;background-color:var(--avatar-background-dark);border:2px solid var(--user-color);border-radius:50%;width:40px;height:40px;margin-right:15px;position:relative}.thread-info.jsx-5ed43f3a323db305 .avatar-moderator-content.jsx-5ed43f3a323db305{border:2px solid var(--color-moderator-content)}.info.jsx-5ed43f3a323db305{align-items:center;display:flex}.author-name.jsx-5ed43f3a323db305{text-rendering:optimizelegibility;color:var(--user-color);margin-bottom:6px;font-size:1rem;font-weight:700;display:flex}.author-name.jsx-5ed43f3a323db305 i.jsx-5ed43f3a323db305{color:var(--color-accent-dark);margin-left:7px}.thread-info.jsx-5ed43f3a323db305 .date-comment-view.jsx-5ed43f3a323db305{color:var(--text-grey);flex-flow:wrap;font-size:.8rem;display:flex}.thread-info.jsx-5ed43f3a323db305 .date-comment-view.jsx-5ed43f3a323db305 .comment.jsx-5ed43f3a323db305{margin:0}.thread-info.jsx-5ed43f3a323db305 .date-comment-view.jsx-5ed43f3a323db305 .icon-hot.jsx-5ed43f3a323db305{margin-top:-5px;margin-left:5px}.thread-info.jsx-5ed43f3a323db305 .date-comment-view.jsx-5ed43f3a323db305 .comment.jsx-5ed43f3a323db305:before,.thread-info.jsx-5ed43f3a323db305 .date-comment-view.jsx-5ed43f3a323db305 .view.jsx-5ed43f3a323db305:before{content:"•";margin-left:5px;margin-right:5px;padding-left:0}.thread-view.jsx-5ed43f3a323db305 .pagination.jsx-5ed43f3a323db305{white-space:nowrap;align-items:center;font-size:.8rem;display:flex;position:relative}.thread-view.jsx-5ed43f3a323db305 .pagination.jsx-5ed43f3a323db305 .pagination--header.jsx-5ed43f3a323db305{margin-right:10px}.thread-view.jsx-5ed43f3a323db305 .pagination.jsx-5ed43f3a323db305 .pagination--pages.jsx-5ed43f3a323db305 .page.jsx-5ed43f3a323db305{text-align:center;box-sizing:border-box;border:1px solid var(--border-dark);width:26px;height:26px;color:var(--text-dark);opacity:.5;background-color:#0000;border-radius:3px;margin:0 3px 3px 0;line-height:24px;display:inline-block}.thread-view.jsx-5ed43f3a323db305 .pagination.jsx-5ed43f3a323db305 .pagination--pages.jsx-5ed43f3a323db305 .page.jsx-5ed43f3a323db305:hover{color:var(--text-light);background-color:var(--button-dark);border:1px solid var(--button-dark)}.thread-view.jsx-5ed43f3a323db305 .pagination.jsx-5ed43f3a323db305 .pagination--pages.jsx-5ed43f3a323db305 .current.jsx-5ed43f3a323db305{background-color:var(--button-dark);border:1px solid var(--button-dark);color:var(--text-light);opacity:1;border-radius:3px}.thread-view.jsx-5ed43f3a323db305 .content.jsx-5ed43f3a323db305{margin-top:1rem;font-size:15px;line-height:1.3}.thread-view.jsx-5ed43f3a323db305 .content.deeptalk-content.jsx-5ed43f3a323db305{margin-top:-20px}@media (min-width:768px){.thread-view.jsx-5ed43f3a323db305 .content.deeptalk-content.jsx-5ed43f3a323db305{margin-top:-16px}}.thread-view.jsx-5ed43f3a323db305 .content.jsx-5ed43f3a323db305 .xfBody.jsx-5ed43f3a323db305{font-size:17px}.thread-view.jsx-5ed43f3a323db305 .content.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305{color:#176093;border-radius:0;margin:0 -3px;padding:0 3px;text-decoration:none}.thread-actions.jsx-5ed43f3a323db305{color:var(--text-light-2);flex-flow:wrap;justify-content:space-between;align-items:center;margin-top:10px;display:flex}.thread-actions.border.jsx-5ed43f3a323db305{border-top:1px solid var(--border-light);border-bottom:1px solid var(--border-light);padding:8px 0}.thread-actions__left.jsx-5ed43f3a323db305,.thread-actions__right.jsx-5ed43f3a323db305{flex-direction:row;align-items:center;display:flex}.moderator-tool.jsx-5ed43f3a323db305{display:flex;position:relative}.moderator-tool.jsx-5ed43f3a323db305 .close-moderator-tool.jsx-5ed43f3a323db305{font-size:21px;display:inline-block;position:absolute;top:12px;right:12px}@media (max-width:700px){.thread-actions__left.jsx-5ed43f3a323db305,.thread-actions__right.jsx-5ed43f3a323db305{margin-top:12px}}.thread-actions__right.jsx-5ed43f3a323db305 .moderator-action__button.jsx-5ed43f3a323db305{margin-top:0}.thread-like.jsx-5ed43f3a323db305,.thread-unlike.jsx-5ed43f3a323db305,.thread-comment.jsx-5ed43f3a323db305{border-radius:4px;justify-content:center;align-items:center;width:25%;padding:10px;display:flex;position:relative}.thread-like.jsx-5ed43f3a323db305:hover,.thread-unlike.jsx-5ed43f3a323db305:hover,.thread-comment.jsx-5ed43f3a323db305:hover{background-color:var(--post-background)}.thread-like.jsx-5ed43f3a323db305 svg,.thread-unlike.jsx-5ed43f3a323db305 svg,.thread-comment.jsx-5ed43f3a323db305 svg{display:block}@media (max-width:700px){.thread-like.jsx-5ed43f3a323db305,.thread-unlike.jsx-5ed43f3a323db305,.thread-comment.jsx-5ed43f3a323db305{padding:0}}.thread-comment.jsx-5ed43f3a323db305 svg{margin-right:10px}.thread-like_deco-left.jsx-5ed43f3a323db305{background-color:var(--color-reward-green);border-top-right-radius:100%;border-bottom-right-radius:100%;width:6px;height:36px}.thread-like_deco-right.jsx-5ed43f3a323db305{background-color:var(--color-reward-green);border-top-left-radius:100%;border-bottom-left-radius:100%;width:6px;height:36px}.thread-like__button.jsx-5ed43f3a323db305{background-color:var(--post-background);color:var(--text-dark);border-top:2px solid var(--color-reward-green);border-bottom:2px solid var(--color-reward-green);border-radius:3px;outline:none;justify-content:center;align-items:center;margin-right:10px;font-size:.9rem;font-weight:600;display:flex}.thread-like__button.active.jsx-5ed43f3a323db305{background-color:var(--color-accent-dark)}.thread-like__button.jsx-5ed43f3a323db305 i.jsx-5ed43f3a323db305{margin-right:5px}.thread-like__button.active.jsx-5ed43f3a323db305{background-color:var(--color-accent-dark);color:var(--text-light)}.thread-like_info.jsx-5ed43f3a323db305{justify-content:center;align-items:center;margin-left:24px;margin-right:24px;display:flex}.thread-share-fact.jsx-5ed43f3a323db305{margin-right:12px}.thread-share.jsx-5ed43f3a323db305{width:25%;color:var(--text-light-2);cursor:pointer;border-radius:3px;outline:none;justify-content:center;align-items:center;height:42px;padding:10px;display:flex}.thread-share.jsx-5ed43f3a323db305:hover{background-color:var(--post-background)}.thread-share.jsx-5ed43f3a323db305 .thread-share-button.jsx-5ed43f3a323db305{justify-content:center;align-items:center;width:100%;display:flex;position:relative}.thread-share.jsx-5ed43f3a323db305 .thread-share-button.jsx-5ed43f3a323db305 .icon.jsx-5ed43f3a323db305{margin-top:5px;margin-right:10px}.thread-share.jsx-5ed43f3a323db305 .thread-share-button.jsx-5ed43f3a323db305 .text.jsx-5ed43f3a323db305{white-space:nowrap}@media (max-width:700px){.thread-share.jsx-5ed43f3a323db305{padding:0}}.thread-fb-share.jsx-5ed43f3a323db305{justify-content:center;align-items:center;padding-bottom:10px;display:flex}.thread-fb-share.jsx-5ed43f3a323db305 .icon.jsx-5ed43f3a323db305{margin-right:10px}.thread-share-count.jsx-5ed43f3a323db305{margin-left:6px}.thread-break-line.jsx-5ed43f3a323db305{background-color:var(--border-light);width:100%;height:1px;margin:15px 0;position:relative}.thread-comments.jsx-5ed43f3a323db305{flex-flow:wrap;justify-content:space-between;align-items:center;display:flex}.thread-comments__count.jsx-5ed43f3a323db305{font-weight:700}.bottom-pagination.jsx-5ed43f3a323db305{justify-content:flex-end;align-items:flex-end;display:flex}.thread-tags.jsx-5ed43f3a323db305{flex-wrap:wrap;align-items:center;padding-bottom:1rem;display:flex}.thread-tags-container.jsx-5ed43f3a323db305{margin-top:12px}.thread-tags.jsx-5ed43f3a323db305 .text.jsx-5ed43f3a323db305{margin-right:5px;font-weight:700}.thread-tags.jsx-5ed43f3a323db305 .tag.jsx-5ed43f3a323db305{background-color:var(--button-light);border-radius:15px;margin:3px 5px 3px 0;padding:5px 15px;font-size:13px}.thread-tags.jsx-5ed43f3a323db305 .tag.jsx-5ed43f3a323db305:hover{background-color:var(--color-accent-dark);color:var(--text-light)}button.jsx-5ed43f3a323db305{outline:none}.share-buttons.jsx-5ed43f3a323db305{flex-direction:column;align-items:flex-start;display:flex}.share-buttons.jsx-5ed43f3a323db305 button.jsx-5ed43f3a323db305{column-gap:5px}@media (max-width:1000px){.thread-info.jsx-5ed43f3a323db305{flex-direction:row;padding-bottom:5px}.thread-info.jsx-5ed43f3a323db305 .info-block--left.jsx-5ed43f3a323db305{justify-content:space-between;align-items:center;width:100%;margin-bottom:1rem}.thread-info.jsx-5ed43f3a323db305 .info-block--left.jsx-5ed43f3a323db305 .more-button.jsx-5ed43f3a323db305{display:block}}@media (max-width:700px){.thread-comments__count.jsx-5ed43f3a323db305{margin-bottom:10px}.thread-title__block.editing.jsx-5ed43f3a323db305{flex-direction:column}.thread-title__input.jsx-5ed43f3a323db305{width:100%}.thread-title__button-group.jsx-5ed43f3a323db305{align-self:flex-end;margin-bottom:1.5rem}}.thread-view-promotion.jsx-5ed43f3a323db305{margin-top:12px;margin-bottom:12px}@media (min-width:701px){.thread-view-promotion.jsx-5ed43f3a323db305{margin-top:24px;margin-bottom:12px}}.thread-with-background-container.jsx-5ed43f3a323db305{justify-content:center;align-items:center;display:flex}.thread-tools.jsx-5ed43f3a323db305{border:2px solid var(--color-accent-dark);border-radius:6px;flex-wrap:wrap;margin-top:0;margin-bottom:12px;padding:12px;display:flex}.quick-tool-action.jsx-5ed43f3a323db305{flex:0 0 20px;width:20px;height:100%}.thread-tool-action.jsx-5ed43f3a323db305{border-radius:6px;justify-content:center;align-items:center;margin-top:12px;margin-bottom:12px;padding:6px 12px;display:flex}.thread-tool-action.cancel.jsx-5ed43f3a323db305{background-color:var(--color-light-1)}.switch-to-old-version.jsx-5ed43f3a323db305{font-size:16px}.more-facts.jsx-5ed43f3a323db305{width:100%;max-width:840px;position:relative;overflow:hidden}.create-your-fact.jsx-5ed43f3a323db305{text-align:center;z-index:1;margin-top:12px;position:relative}.thread-view.jsx-5ed43f3a323db305 .content.jsx-5ed43f3a323db305 .create-your-fact.jsx-5ed43f3a323db305 a.jsx-5ed43f3a323db305{color:var(--color-light-2)}.thread-comment__single-attachment-container.jsx-5ed43f3a323db305{margin-top:12px}@media (min-width:768px){.thread-comment__single-attachment-container.jsx-5ed43f3a323db305{place-content:center;align-items:center;display:flex}}.thread-comment__single-attachment-inside.multiple.jsx-5ed43f3a323db305{padding:12px}.thread-comment__single-attachment-container__img.jsx-5ed43f3a323db305{border-radius:6px;max-height:500px}.thread-comment__attachments-container.jsx-5ed43f3a323db305{margin-top:24px}.thread-comment__attachments.jsx-5ed43f3a323db305{flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%;margin:10px 0;display:flex;position:relative}.thread-comment__attachment.jsx-5ed43f3a323db305{border-radius:4px;width:auto;max-width:300px;margin-right:10px}.thread-comment__attachment.jsx-5ed43f3a323db305 img.jsx-5ed43f3a323db305{border:2px solid var(--color-light-border-box);border-radius:4px}.thread-comment__attachment.jsx-5ed43f3a323db305 img.jsx-5ed43f3a323db305:hover{border:2px solid var(--color-accent-dark)}@media (max-width:700px){.thread-comment__attachment.jsx-5ed43f3a323db305{width:45%;max-width:200px}}@media (min-width:701px){.thread-comment__attachment.jsx-5ed43f3a323db305{width:32%;max-width:150px}}@media (min-width:1200px){.thread-comment__attachment.jsx-5ed43f3a323db305{width:32%;max-width:180px}}.thread-rating-section.jsx-5ed43f3a323db305{border-bottom:1px solid var(--border-light);padding:12px 0 11px}.thread-rating-stats.jsx-5ed43f3a323db305{border-bottom:1px solid var(--border-light);justify-content:center;align-items:center;padding:18px 0;display:flex}.thread-rating-wrapper.jsx-5ed43f3a323db305{background-color:var(--role-badge);opacity:.8;border-top-right-radius:24px;border-bottom-right-radius:24px;height:24px;padding-right:12px}.thread-rating-avg.jsx-5ed43f3a323db305{color:--text-light}.thread-rating-avg-number.jsx-5ed43f3a323db305{margin-right:6px}.pre-avg.jsx-5ed43f3a323db305{background-color:var(--role-badge);border-top-left-radius:24px;border-bottom-left-radius:24px;width:14px;height:24px}.rating-message-container.jsx-5ed43f3a323db305{justify-content:center;align-items:center;margin-left:6px;display:flex}.rating-message.jsx-5ed43f3a323db305{color:var(--role-badge);text-transform:uppercase;margin-right:6px;font-weight:700}.rating-count.jsx-5ed43f3a323db305{font-size:12px}.comment-toogle-container.jsx-5ed43f3a323db305{max-width:320px;margin-bottom:24px;display:flex}.comment-toogle.jsx-5ed43f3a323db305{background-color:var(--post-background);height:30px;color:var(--color-dark-1);border-radius:4px;flex:1;margin-right:12px;padding:6px 12px;font-size:12px}.comment-toogle.selected.jsx-5ed43f3a323db305{background-color:var(--button-dark);color:var(--text-light);font-weight:700}.comment-toogle.selected.rating-comment.jsx-5ed43f3a323db305{background-color:var(--role-badge);color:var(--color-light-0);font-weight:700}.livestream-game-container.jsx-5ed43f3a323db305{margin-top:12px;margin-bottom:12px}@media (max-width:700px){.livestream-game-container.jsx-5ed43f3a323db305{margin-top:12px;margin-bottom:12px}}@media (min-width:701px){.livestream-game-container.jsx-5ed43f3a323db305{margin-top:24px;margin-bottom:48px}}.deeptalk-content.jsx-5ed43f3a323db305{justify-content:center;align-items:center;display:flex}.deeptalk.jsx-5ed43f3a323db305{width:100%}.deeptalk-comments.jsx-5ed43f3a323db305{max-width:700px;margin:auto;padding:6px}@media (min-width:768px){.deeptalk-comments.jsx-5ed43f3a323db305{padding:0}}.deeptalk-hidden.jsx-5ed43f3a323db305{display:none}.deeptalk-below-first-post.jsx-5ed43f3a323db305{padding:12px}@media (min-width:768px){.deeptalk-below-first-post.jsx-5ed43f3a323db305{max-width:768px;margin:24px auto auto;padding:0}}.deeptalk-comment-toogle-container.jsx-5ed43f3a323db305{margin:auto auto 24px}@media (min-width:768px){.deeptalk-intro-box.jsx-5ed43f3a323db305{max-width:768px;margin:24px auto auto;padding:0}}.ttbc-intro-box.jsx-5ed43f3a323db305{margin-top:24px}@media (min-width:768px){.mobile-bookmark.jsx-5ed43f3a323db305{display:none}}.table-of-content.jsx-5ed43f3a323db305{background-color:var(--post-background);border-radius:8px;width:100%;margin-bottom:1rem;padding:1rem}.table-of-content.deeptalk.jsx-5ed43f3a323db305{border-radius:0;margin-bottom:0}.table-of-content.jsx-5ed43f3a323db305 .table-header.jsx-5ed43f3a323db305{flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:.5rem;display:flex}.table-of-content.jsx-5ed43f3a323db305 .table-header.jsx-5ed43f3a323db305 .table-header-text.jsx-5ed43f3a323db305{font-size:20px;font-weight:700}.table-of-content.jsx-5ed43f3a323db305 .table-header.jsx-5ed43f3a323db305 .table-header-button.jsx-5ed43f3a323db305{background-color:var(--dark-background);border:none;border-radius:20px;justify-content:center;align-items:center;padding:5px 12px;display:flex}.table-of-content.jsx-5ed43f3a323db305 .table-header.jsx-5ed43f3a323db305 .table-header-button.jsx-5ed43f3a323db305 i.jsx-5ed43f3a323db305{color:var(--text-light-3);margin-left:5px}.table-of-content.jsx-5ed43f3a323db305 .table-header.jsx-5ed43f3a323db305 .table-header-button.jsx-5ed43f3a323db305 .toggle-button.jsx-5ed43f3a323db305{color:var(--text-light-3)}.table-of-content.jsx-5ed43f3a323db305 .anchor.jsx-5ed43f3a323db305{word-break:break-word;margin:10px 0;font-weight:500}.table-of-content.jsx-5ed43f3a323db305 .anchor.jsx-5ed43f3a323db305:hover{color:var(--color-accent-dark)}.table-of-content.jsx-5ed43f3a323db305 .anchor.H3.jsx-5ed43f3a323db305{margin-left:10px;list-style-type:disc;list-style-position:inside;display:list-item}.below-first-post.jsx-5ed43f3a323db305 .total-reactions{margin-right:var(--gap-thread-action)}.below-first-post.jsx-5ed43f3a323db305 .thread-like.jsx-5ed43f3a323db305 .reactions{min-width:180px}@media (max-width:700px){.below-first-post.jsx-5ed43f3a323db305 .thread-like.jsx-5ed43f3a323db305 .reactions{min-width:80px}}.more-button.jsx-5ed43f3a323db305,.margin-right-12px.jsx-5ed43f3a323db305{margin-right:12px}.trending-threads.jsx-5ed43f3a323db305{padding:20px 0 32px}.block-title.jsx-5ed43f3a323db305{color:var(--primary-text);margin:0 0 16px;font-size:18px;font-weight:700}.hide-on-mobile.jsx-5ed43f3a323db305{display:inherit}@media (max-width:1000px){.hide-on-mobile.jsx-5ed43f3a323db305{display:none}}.icon.jsx-5ed43f3a323db305{width:18px}.dark .icon-light-mode.jsx-5ed43f3a323db305{display:none}.dark .icon-dark-mode.jsx-5ed43f3a323db305,.light .icon-light-mode.jsx-5ed43f3a323db305{display:block}.light .icon-dark-mode.jsx-5ed43f3a323db305{display:none}');e9.__hash="5ed43f3a323db305";var te=e.i(734673),tt=e.i(602692);let ta=["Bạn cần đăng nhập và đủ quyền để thực hiện thao tác này. Nếu chưa xác thực tài khoản thì vào https://tinhte.vn/xacthuc để xác thực.","Không thể tìm thấy chủ đề này. "],{SlotName:ts,PageName:to}=m.f;class ti extends E.default.Component{componentDidMount(){window.addEventListener("message",this.receiveMessage,!1),this.getUserProfile()}componentDidUpdate(e,t){if(JSON.stringify(t.posts)!==JSON.stringify(this.state.posts)&&window.location.hash&&"#post"===window.location.hash.split("-")[0]){let e=window.location.hash;(0,ei.f)(e)}this.state.error&&console.log("XXX: ",this.state.error)}onReact(e,t,a){let{totalReaction:s}=this.state,o={...this.state.firstPost};e===em.U.Up&&(s=this.state.totalReaction+1,o.reaction.postReactions[t]=o.reaction.postReactions[t]+1,o.reaction.userReactionId=t),e===em.U.Down&&(s=this.state.totalReaction-1,o.reaction.postReactions[a]=o.reaction.postReactions[a]-1,o.reaction.userReactionId=null),e===em.U.Neutral&&(o.reaction.postReactions[a]=o.reaction.postReactions[a]-1,o.reaction.postReactions[t]=o.reaction.postReactions[t]+1,o.reaction.userReactionId=t),this.setState({totalReaction:s,firstPost:{...o}})}onCoverImageClick(){let{thread:e}=this.state;this.setState({showLightBox:!0,lightBoxImgSrc:e.image})}onShareClick(){let e=document.getElementById("btn-share");e&&e.click()}onReportClick(){this.state.firstPost.id&&(0,te._)(this.props.api,this.state.firstPost.id).then(e=>{e.errors?F.c.error(e.errors):F.c.success("Báo xấu thành công")}).catch(e=>{F.c.error(e)})}getTags(e){return!e||e.length<=0?"":e.map(e=>e.tag).join(", ")}setTags(e){let t=e.target.value;this.setState({newTags:t})}setTitle(e){let{thread:t}=this.state;t.title=e.target.value,this.setState({thread:t})}getUserProfile(){let{api:e,currentPage:t}=this.props;e&&e.onAuthenticated(()=>{e.getUserId()>0?e.get("users/me").then(e=>{let a=(0,H.U)(e.user||{});this.setState({user:a}),a&&a.id&&this.fetchThreads(t)},()=>{}):this.markThreadAsRead()})}editTitle(){let{onEditTitle:e}=this.state;this.setState({onEditTitle:!e})}hideOrShowTOC(){let{showTOC:e}=this.state;this.setState({showTOC:!e})}markThreadAsRead(){let{thread:e,api:t}=this.props;t.post({uri:h.z,params:{thread_id:e.id}}).catch(e=>console.log("Failed to mark thread as read. Error: ".concat(e)))}updateThreadTitle(){let{api:e,threadId:t}=this.props,{thread:a}=this.state,s={thread_title:a.title};e.put({uri:"threads/".concat(a.id||t),params:s}).then(e=>{let{data:t,errors:s}=e;if(s)throw Error(s.toString());this.setState({onEditTitle:!1,thread:a})}).catch(e=>{console.log(e)})}editTags(){this.setState({onEditTags:!this.state.onEditTags,newTags:this.getTags(this.state.thread.tags)})}updateTags(){let{api:e}=this.props,t={thread_tags:this.state.newTags};this.setState({isTagUpdating:!0}),e.put({uri:"https://tinhte.vn/appforo/index.php?threads/".concat(this.state.thread.id),params:t}).then(e=>{let t=(0,h.U)(e.thread);this.setState({onEditTags:!this.state.onEditTags,isTagUpdating:!1,thread:{...this.state.thread,tags:t.tags}})}).catch(e=>{console.log(e)})}postKhaoSatToComment(e,t){let{api:a}=this.props;a.post({uri:"posts",params:{thread_id:t,post_body:e}}).then(e=>{let{post:t,errors:a}=e;if(a&&F.c.error(a),t){let{links:e}=this.state;this.loadNewPage(e.pages)}}).catch(e=>{console.log(e)})}shareFBLink(t){let{api:a}=this.props,{thread:s}=this.state;e.g.FB&&FB.ui({method:"share",display:"popup",href:t},e=>{console.log("share to facebook",e)}),a.onAuthenticated(()=>{let e=new V.U(a),t=[{key:"thread_id",value:s.id}];e.trackEvent(q.f.ThreadView_Share_Facebook_Click,a.getUserId(),t)})}receiveMessage(e){if(e.origin&&"https://khaosat.me"===e.origin){let t=e[e.message?"message":"data"],a=t.content,{threadURL:s}=t,o=s?s.match(/threads\/([^/]+\.)?(\d+)\/$/)||s.match(/thread\/([^/]+\.)?(\d+)\/$/):null,i=o&&o[2]?o[2]:this.state.thread.id;i&&a&&this.postKhaoSatToComment(a,i)}}async toggleLikePost(){let{api:e}=this.props,{firstPost:t,user:a}=this.state;try{let s=await (0,K.f)(e,t),o={user_id:a.id,username:a.name},{likeUsers:i}=t;if(i){let e=i.findIndex(e=>e.user_id===o.user_id);e>-1?s.likeUsers.splice(e,1):s.likeUsers.unshift(o)}else s.likeUsers=[o];this.setState({firstPost:s,isLikePaused:!s.isLiked,isLikeStopped:!s.isLiked})}catch(e){console.error(e)}}addPost(e,t){let{posts:a}=this.state;"top"===t?a.unshift(e):"bottom"===t&&a.push(e),this.setState({posts:a})}openThreadPrefixModal(){this.setState({threadPrefixModalIsOpen:!0})}handleCloseModal(){window.document.body.style.overflow="initial",this.setState({threadPrefixModalIsOpen:!1})}toogleFollowThread(){let{thread:e}=this.state,{api:t}=this.props,a=e.isFollowed;t[a?"del":"post"]({uri:"threads/".concat(e.id,"/followers")}).then(t=>{"ok"===t.status&&(e.isFollowed=!a,this.setState({thread:e}))})}fetchThreads(e){let{api:t,threadId:a}=this.props,{links:s}=this.state;t.onAuthenticated(()=>{let s="",o=e;if(window.location.hash){let e=window.location.hash.split("-")[0];"#post"===e?s=window.location.hash.split("-")[1]:"#page"===e&&(s=null,o=parseInt(window.location.hash.split("-")[1],10))}s?t.get({uri:"/posts",headers:{"Api-Post-Tree":1},params:{page_of_post_id:s,fields_include:"*,review_extra_data"}}).then(e=>{let{thread:t}=e;t.posts=e.posts,t.pagination=e.links;let a=(0,h.U)(t||{}),s=1;void 0!==e.links&&(s=e.links.page&&e.links.page{console.log("Error",e)}):t.get({uri:"/posts",headers:{"Api-Post-Tree":1},params:{thread_id:a,page:o,fields_include:"*,review_extra_data,thread.*,thread.bdContentList_promote_item,user_is_moderator_content,user_is_moderator_honor,user_is_moderator_news"}}).then(e=>{let{thread:t}=e;t.posts=e.posts,t.pagination=e.links;let a=(0,h.U)(t||{});this.setState({thread:a,posts:a.posts,firstPost:a.firstPost,currentPage:o})}).catch(e=>{let t=(0,p.f)(e),a=t&&t.message;ta.includes(a)&&c.default.push("/404"),this.setState({error:t})})})}loadNewPage(e){this.fetchThreads(e)}scrollToComment(){this.commentRef.scrollIntoView()}render(){let{threadId:e,relatedThreads:s,relatedCommunities:o}=this.props,{threadViewPromotion:i,currentPage:r,thread:n,posts:d,links:c,user:l,firstPost:h,event:x,onEditTitle:p,forums:m,onEditTags:f,newTags:j,showOptionMenu:g,isTagUpdating:_,isLikeStopped:u,isLikePaused:v,currentUserDidRate:k,showComment:w,showLightBox:N,showTOC:y,photoIndex:T,error:C,lightBoxImgSrc:S,totalReaction:P,threadPrefixModalIsOpen:D}=this.state;if(C&&C.message&&(!n||n.id<0))return(0,t.jsx)(el.f,{message:C.message});if(!h||!h.author)return(0,t.jsx)("p",{children:"Đang tải..."});let z=!1,R=!1;n.tags&&n.tags.forEach(e=>{"tinhtefact"===e.tag&&(z=!0),"livestreamgame"===e.tag&&(R=!0)}),n.firstPost=h;let A=[];h.attachments&&h.attachments.length>0&&h.attachments.map(e=>A.push(e.links.permalink));let I="";I=window.location.origin+window.location.pathname;let B="var(--primary-text)";return n.author&&(B=(0,tt.f)(n.author)),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-view--container",children:[n&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-view",children:[n.isDeleted&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" thread-deleted",children:(0,t.jsx)("p",{className:"jsx-".concat(e9.__hash),children:"Bài này đã bị xóa"})}),n.isModerated&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-is-moderated",children:[(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash),children:"Bài này đang chờ kiểm duyệt trước khi hiển thị công khai."}),(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" fas fa-info-circle icon-info"})]}),n.isDraft&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-is-draft",children:[(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash),children:"Bài này đang ở chế độ Nháp, người khác sẽ không xem được bài của bạn"}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" edit",children:(0,t.jsx)(eB,{thread:this.state.thread||this.props.thread,threadId:e})})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-view--content-wrapper",children:[(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" "+"thread-breadcrumb ".concat(n.isDeepTalkArticle&&"deeptalk-hidden"),children:[(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" forum-wrapper",children:(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" forums",children:(0,t.jsx)(E.Fragment,{children:m&&m.elements&&m.elements.length>0&&m.elements.map(e=>"category"===e.navigation_type?(0,t.jsx)("a",{href:e.links.permalink,className:"jsx-".concat(e9.__hash)+" label",children:e.category_title},e.navigation_id):(0,t.jsx)("a",{href:e.links.permalink,className:"jsx-".concat(e9.__hash)+" label",children:e.forum_title},e.navigation_id))})})}),c&&(0,t.jsx)(eN,{current:r,total:c.pages,position:"top",thread:n})]}),(0,t.jsxs)("main",{className:"jsx-".concat(e9.__hash),children:[p?(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-title__block editing",children:[(0,t.jsx)("textarea",{type:"text",placeholder:n.title,value:n.title,onChange:this.setTitle,className:"jsx-".concat(e9.__hash)+" thread-title__input"}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-title__button-group",children:[(0,t.jsx)("button",{onClick:this.updateThreadTitle,className:"jsx-".concat(e9.__hash)+" thread-title__confirm",children:(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" fas fa-check"})}),(0,t.jsx)("button",{onClick:this.editTitle,className:"jsx-".concat(e9.__hash)+" thread-title__cancel",children:(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" fas fa-times"})})]})]}):(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" "+"thread-title__block ".concat(n.isDeepTalkArticle&&"deeptalk-hidden"),children:(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-title",children:[(0,t.jsx)("h1",{className:"jsx-".concat(e9.__hash),children:n.title}),h&&h.permissions&&h.permissions.edit&&(0,t.jsx)("button",{onClick:this.editTitle,className:"jsx-".concat(e9.__hash)+" thread-title__edit",children:(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" fas fa-edit"})})]})}),p&&n.title&&n.title.length>100&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" title-error",children:(0,t.jsx)("p",{className:"jsx-".concat(e9.__hash)+" title-error-message",children:"Tiêu đề không được dài hơn 100 kí tự"})}),(!n.isDeepTalkArticle||n.isDeepTalkArticle&&l.isModerator)&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" "+"thread-info ".concat(n.isDeepTalkArticle&&"deeptalk-thread-info"),children:[n.author&&(0,t.jsx)("div",{style:{"--user-color":B},className:"jsx-".concat(e9.__hash)+" info-block--left",children:(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" info",children:[(0,t.jsx)("a",{href:n.author.link,className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("div",{style:{backgroundImage:"url(".concat(n.author.avatar,")")},className:"jsx-".concat(e9.__hash)+" avatar"})}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash),children:(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash),children:[(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" author-name",children:[(0,t.jsxs)("a",{href:n.author.link,className:"jsx-".concat(e9.__hash),children:[n.author.name,n.author.verified_badge?(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" fas fa-check-circle"}):(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)})]}),(0,t.jsx)(ea.f,{userToFollow:n.author}),(0,t.jsx)(es.f,{thread:n})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" date-comment-view",children:[(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash)+" date",children:(0,t.jsx)(X.f,{value:n.since,format:"DD/MM/YYYY HH:MM"})}),l&&(l.id===n.author.id||l.isModerator)&&(0,t.jsxs)("span",{className:"jsx-".concat(e9.__hash)+" view",children:["Lượt xem: ",(0,t.jsx)(J.f,{value:n.stats.view})]}),(0,t.jsxs)("span",{className:"jsx-".concat(e9.__hash)+" comment",children:["Phản hồi: ",(0,t.jsx)(J.f,{value:n.stats.comment})]}),n.stats.comment>=30?(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash)+" icon-hot",children:(0,t.jsx)("img",{width:"21",src:"/static/images/icon-hot.png",alt:"",className:"jsx-".concat(e9.__hash)})}):(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash)})]})]})})]})}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" info-block--right",children:[(0,t.jsxs)("a",{href:"/editorv2/edit/".concat(e||n.id,"/"),className:"jsx-".concat(e9.__hash)+" hide-on-mobile quick-tool-action",children:[(0,t.jsx)("img",{src:e4.default,alt:"Edit",className:"jsx-".concat(e9.__hash)+" icon icon-light-mode"}),(0,t.jsx)("img",{src:e1.default,alt:"Edit",className:"jsx-".concat(e9.__hash)+" icon icon-dark-mode"})]}),(0,t.jsx)(ec.f,{position:"left",title:(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" hide-on-mobile quick-tool-action",children:[(0,t.jsx)("img",{src:e6.default,alt:"Share",className:"jsx-".concat(e9.__hash)+" icon icon-light-mode"}),(0,t.jsx)("img",{src:e2.default,alt:"Share",className:"jsx-".concat(e9.__hash)+" icon icon-dark-mode"})]}),menuItems:(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" share-buttons",children:[(0,t.jsx)(eb.f,{thread:n}),(0,t.jsxs)("button",{onClick:()=>this.shareFBLink(n.link),className:"jsx-".concat(e9.__hash)+" thread-fb-share",children:[(0,t.jsx)(ej.f,{}),(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash),children:"Facebook"})]})]})}),(h.permissions.edit||l.isModerator)&&(0,t.jsxs)(E.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>this.setState({showOptionMenu:!g}),className:"jsx-".concat(e9.__hash)+" quick-tool-action",children:[(0,t.jsx)("img",{src:e8.default,alt:"Menu",className:"jsx-".concat(e9.__hash)+" icon icon-light-mode"}),(0,t.jsx)("img",{src:e7.default,alt:"Menu",className:"jsx-".concat(e9.__hash)+" icon icon-dark-mode"})]}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" moderator-action",children:l&&l.isModerator&&(0,t.jsxs)(E.Fragment,{children:[!1===[215,123].includes(n.forumId)&&n.prefixes&&n.prefixes.length>0&&(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/manage-list"),className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("button",{className:"jsx-".concat(e9.__hash)+" moderator-action__button",children:"Duyệt"})}),(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"?_xfNoRedirect=1"),className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash)+" switch-to-old-version",children:"→"})})]})})]})]})]}),g&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" moderator-tool",children:[(0,t.jsx)("button",{onClick:()=>this.setState({showOptionMenu:!g}),className:"jsx-".concat(e9.__hash)+" close-moderator-tool",children:(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" fas fa-times"})}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash),children:(0,t.jsx)(ee.f,{threadId:n.id,forumId:n.forumId,thread:n,onSelected:()=>this.fetchThreads()})}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-tools",children:[(0,t.jsx)("a",{href:"/editorv2/edit/".concat(e||n.id,"/"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Sửa bài"}),(0,t.jsx)("button",{onClick:this.openThreadPrefixModal,className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Sửa tag"}),(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/move"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Move"}),(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/manage-list"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Duyệt"}),(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/attach-reserve"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Event"}),!n.threadHasPoll&&(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/poll/add"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Poll"}),(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/shareable-link"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Link share"}),(0,t.jsx)("a",{href:"https://tinhte.vn/threads/".concat(n.id,"/livestream"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Livestream"}),(0,t.jsx)("a",{href:"https://tinhte.vn/posts/".concat(h.id,"/delete"),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Xóa"}),(0,t.jsx)("a",{onClick:this.onReportClick,className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Báo xấu"}),(0,t.jsx)("a",{href:"https://tinhte.vn/members/mem.".concat(h.author.id,"/warn-smart?content_type=post&content_id=").concat(h.id),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Cảnh báo"}),l.isAdmin&&(0,t.jsx)("a",{href:"/thread-analytics/".concat(n.id),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"Analytics"}),l.isAdmin&&(0,t.jsx)("a",{href:"/thread-seo/".concat(n.id),className:"jsx-".concat(e9.__hash)+" thread-tool-action",children:"SEO"})]})]}),n&&n.tableOfContent&&!n.isDeepTalkArticle&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" "+"table-of-content ".concat(n.isDeepTalkArticle&&"deeptalk"),children:[(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" table-header",children:[(0,t.jsx)("p",{className:"jsx-".concat(e9.__hash)+" table-header-text",children:"Xem nhanh"}),(0,t.jsxs)("button",{onClick:this.hideOrShowTOC,className:"jsx-".concat(e9.__hash)+" table-header-button",children:[(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash)+" toggle-button",children:y?"Ẩn":"Hiện"}),(0,t.jsx)("i",{className:"jsx-".concat(e9.__hash)+" "+"fas fa-angle-".concat(y?"up":"down")})]})]}),y&&(0,t.jsx)("ol",{className:"jsx-".concat(e9.__hash)+" content-list",children:n.tableOfContent&&n.tableOfContent.length>0&&n.tableOfContent.map(e=>(0,t.jsx)("li",{className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("a",{href:"".concat(I,"#").concat(e.id),className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("p",{className:"jsx-".concat(e9.__hash)+" "+"anchor ".concat(e.type),children:e.heading})},e.id)}))})]}),n.image&&!z&&1===r&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" "+"thread-cover ".concat(n.isDeepTalkArticle&&"deeptalk"),children:(0,t.jsx)("img",{src:n.image,alt:n.title,onClick:()=>this.onCoverImageClick(),className:"jsx-".concat(e9.__hash)+" thread-cover__image"})}),x&&x.id?(0,t.jsx)(eu,{event:x}):(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)}),(0,t.jsx)(ep.f,{threadId:n.id}),n&&1===r&&(0,t.jsxs)(E.Fragment,{children:[(0,t.jsxs)("article",{className:"jsx-".concat(e9.__hash)+" "+"content ".concat(n.isDeepTalkArticle?"deeptalk-content":""),children:[!h.isThreadBackground&&(0,t.jsx)(E.Fragment,{children:z?(0,t.jsx)(Q.f,{thread:n}):(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" "+"".concat(n.isDeepTalkArticle?"deeptalk":""),children:(0,t.jsx)(G.f,{body:h.bodyHtml,author:h.author.name,isFirstPost:!0,isDeepTalkArticle:n.isDeepTalkArticle,noInArticleAds:n.isDeepTalkArticle,thread:n})})}),h.isThreadBackground&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" thread-with-background-container",children:(0,t.jsx)(Z.f,{firstPost:h})})]}),R&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" livestream-game-container",children:(0,t.jsx)(er.f,{threadId:n.id,numberOfQuestion:10})}),n.isDeepTalkArticle&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" deeptalk-intro-box",children:(0,t.jsx)(eF,{})}),(0,t.jsx)(eU,{thread:n}),n.isTTBC&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" ttbc-intro-box",children:(0,t.jsx)(eq,{})}),n.isTTBC24&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" ttbc-intro-box",children:(0,t.jsx)(eG,{})}),n.isTTBC25&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" ttbc-intro-box",children:(0,t.jsx)(eJ,{})}),N&&(0,t.jsx)(U.f,{mainSrc:S||A[T],nextSrc:S?null:A[(T+1)%A.length],prevSrc:S?null:A[(T+A.length-1)%A.length],onCloseRequest:()=>this.setState({showLightBox:!1,lightBoxImgSrc:null}),onMovePrevRequest:()=>this.setState({photoIndex:(T+A.length-1)%A.length}),onMoveNextRequest:()=>this.setState({photoIndex:(T+1)%A.length})})]})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" "+"no-user-select below-first-post ".concat(n.isDeepTalkArticle&&"deeptalk-below-first-post"),children:[(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-actions",children:[(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-actions__left",children:[(0,t.jsx)(ex.f,{commentMode:!1,totalReaction:P,post:h}),n.stats.comment>0&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash),children:[(0,t.jsx)("span",{className:"jsx-".concat(e9.__hash),children:(0,t.jsx)(J.f,{value:n.stats.comment})})," bình luận"]})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-actions__right",children:[h.permissions.edit&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" moderator-action edit",children:(0,t.jsx)(eB,{thread:this.state.thread||this.props.thread,threadId:e})}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" more-button",children:(0,t.jsx)(ec.f,{position:"right",menuItems:(0,t.jsxs)(E.Fragment,{children:[(0,t.jsx)("button",{onClick:this.openThreadPrefixModal,className:"jsx-".concat(e9.__hash)+" moderator-action",children:(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" moderator-action__button",children:"Tag"})}),h.permissions.report&&(0,t.jsx)("a",{onClick:this.onReportClick,className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" moderator-action",children:(0,t.jsx)("button",{className:"jsx-".concat(e9.__hash)+" moderator-action__button",children:"Báo xấu"})})}),l&&l.isModerator&&(0,t.jsx)("a",{href:"https://tinhte.vn/members/mem.".concat(h.author.id,"/warn-smart?content_type=post&content_id=").concat(h.id),className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" moderator-action",children:(0,t.jsx)("button",{className:"jsx-".concat(e9.__hash)+" moderator-action__button",children:"Cảnh báo"})})}),h.permissions.delete&&(0,t.jsx)("a",{href:"https://tinhte.vn/posts/".concat(h.id,"/delete"),className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" moderator-action",children:(0,t.jsx)("button",{className:"jsx-".concat(e9.__hash)+" moderator-action__button",children:"Xóa"})})})]})})})]})]}),(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" thread-actions border",children:[em.q.map(e=>(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" thread-like",children:(0,t.jsx)(eh.f,{commentMode:!1,post:h,onReact:this.onReact,reactionButtonId:e})},"".concat(e))),(0,t.jsx)("button",{onClick:this.scrollToComment,className:"jsx-".concat(e9.__hash)+" thread-comment",children:(0,t.jsx)(ef.f,{})}),(0,t.jsx)("div",{onClick:this.onShareClick,className:"jsx-".concat(e9.__hash)+" thread-share",children:(0,t.jsx)(et.f,{thread:n,icon:(0,t.jsx)(W.f,{})})})]}),i&&i.title&&(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" thread-view-promotion",children:(0,t.jsx)($.f,{threadViewPromotion:i})}),(0,t.jsx)("br",{className:"jsx-".concat(e9.__hash)}),(0,t.jsx)(b.f,{slotName:ts.belowThreadView,mobilePageName:to.threadViewMobileWeb,desktopPageName:to.threadViewDesktopWeb,doNotLazyLoad:!0,showGDN:!0,customGdnComponent:(0,t.jsx)(E.Fragment,{children:(0,t.jsx)("div",{"data-cptid":"1562702_tinhte.vn_728x90",style:{width:728,height:90,display:"block"},className:"jsx-".concat(e9.__hash),children:(0,t.jsx)("script",{dangerouslySetInnerHTML:{__html:'\n window.gnshbrequest.cmd.push(function() {\n window.gnshbrequest.applyPassback("1562702_tinhte.vn_728x90", "[data-cptid=\'1562702_tinhte.vn_728x90\']");\n });\n '},className:"jsx-".concat(e9.__hash)})})}),options:{thread:n},checkShowAdsThreadView:!0}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" trending-threads",children:(0,t.jsx)(eo.f,{})}),!O.isMobile&&(0,t.jsxs)("div",{className:"jsx-".concat(e9.__hash)+" hot-tags visible-sm",children:[(0,t.jsx)("p",{className:"jsx-".concat(e9.__hash)+" block-title",children:"Xu hướng"}),(0,t.jsx)(M,{})]})]}),w&&(0,t.jsxs)("div",{ref:e=>{this.commentRef=e},className:"jsx-".concat(e9.__hash)+" "+((n.isDeepTalkArticle?"deeptalk-comments":"")||""),children:[(0,t.jsx)(ed.f,{ref:e=>{this.postReply=e},api:this.props.api,postToReply:h,user:l,addPost:this.addPost,position:"top",noReply:!0}),d&&d.length>0&&(0,t.jsx)(en.f,{user:l,posts:d}),(0,t.jsx)("div",{className:"jsx-".concat(e9.__hash)+" bottom-pagination",children:c&&(0,t.jsx)(eN,{current:r,total:c.pages,position:"bottom",thread:n})}),d&&d.length>4&&(0,t.jsx)(ed.f,{ref:e=>{this.postReply=e},api:this.props.api,postToReply:h,user:l,addPost:this.addPost,position:"bottom",noReply:!0})]}),!z&&!n.isDeepTalkArticle&&(0,t.jsx)(eS,{relatedThreads:s,threadId:n.id}),d&&d.length>4&&(0,t.jsx)(eI,{path:"Bottom"}),(0,t.jsx)(e5,{isOpen:D,handleCloseModal:this.handleCloseModal,user:l,thread:n})]}),(0,t.jsx)(Y.f,{})]}),(0,t.jsx)(a.default,{id:e9.__hash,children:e9})]})}constructor(e){super(e);let{thread:t}=this.props;this.state={threadViewPromotion:this.props.threadViewPromotion,forums:this.props.forums,currentPage:this.props.currentPage,event:this.props.event,thread:t,firstPost:this.props.posts&&this.props.posts[0]?this.props.posts[0]:{},posts:this.props.posts,links:this.props.links,onEditTitle:!1,newTags:this.getTags(t?t.tags:[]),onEditTags:!1,user:{},isTagUpdating:!1,isLikeStopped:!0,isLikePaused:!0,currentUserDidRate:!0,showComment:!0,showLightBox:!1,showTOC:!0,threadPrefixModalIsOpen:!1,photoIndex:0,error:null,lightBoxImgSrc:null,totalReaction:this.props.posts&&this.props.posts[0]?this.props.posts[0].reaction.total:0},this.setTitle=this.setTitle.bind(this),this.editTitle=this.editTitle.bind(this),this.updateThreadTitle=this.updateThreadTitle.bind(this),this.setTags=this.setTags.bind(this),this.editTags=this.editTags.bind(this),this.updateTags=this.updateTags.bind(this),this.loadNewPage=this.loadNewPage.bind(this),this.addPost=this.addPost.bind(this),this.receiveMessage=this.receiveMessage.bind(this),this.toggleLikePost=this.toggleLikePost.bind(this),this.hideOrShowTOC=this.hideOrShowTOC.bind(this),this.onReact=this.onReact.bind(this),this.scrollToComment=this.scrollToComment.bind(this),this.openThreadPrefixModal=this.openThreadPrefixModal.bind(this),this.onReportClick=this.onReportClick.bind(this),this.handleCloseModal=this.handleCloseModal.bind(this)}}let tr=(0,v.f)(L.f.subscribe(d.f.ApiConsumer(ti),e=>{let{threadUIViewPromotion:t}=e;return{threadViewPromotion:t}}),{errorMsg:"Lỗi Thread trong Thread Theme"});var tn=e.i(585378);let{SlotName:td,PageName:tc}=m.f,tl=(0,v.f)(d.f.ApiConsumer(e=>{let{threadId:o,thread:i,currentAdsBlocks:r,forums:n,currentPage:d,relatedThreads:c,relatedCommunities:l,event:h}=e,[x,p]=(0,s.useState)(i),m=!0;return r&&r.length>0&&r.forEach(e=>{("masthead_hero"===e.slot_name||"masthead_desktop"===e.slot_name)&&(m=!e.options||!0!==e.options.is_display_all_pages)}),(0,s.useEffect)(()=>{p({...i})},[i]),(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(k.f,{blackHeader:x&&x.isDeepTalkArticle,headerSpecialLogo:x&&x.isDeepTalkArticle&&"/static/images/deeptalk_logo_white.png",headerSpecialUrl:x&&x.isDeepTalkArticle&&"/deeptalk",headerSpecialTitle:x&&x.isDeepTalkArticle&&"Deeptalk - Bài hay Tinhte.vn",mobileCompactMode:x&&x.isDeepTalkArticle}),(0,t.jsxs)("div",{className:"jsx-".concat(B.__hash)+" "+"threadpage ".concat(x&&x.isDeepTalkArticle&&"deeptalk-thread"),children:[(0,t.jsxs)("div",{className:"jsx-".concat(B.__hash)+" bg-white",children:[x&&!x.isDeepTalkArticle&&(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),x&&!x.isDeepTalkArticle&&(0,t.jsx)(b.f,{slotName:td.mobileMasthead,pageName:tc.threadViewMobileWeb,doNotLazyLoad:!0,mobileOnly:!0,showGDN:x&&!x.isDeepTalkArticle,showGDNBothSize:!0,customGdnComponent:(0,t.jsx)(y.f,{mobileOnly:!0,adsId:"kmd75j6t",minHeight:"calc(100vw/2)"}),options:{thread:x}}),m&&!x.isDeepTalkArticle&&(0,t.jsx)(y.f,{desktopOnly:!0,adsId:"kmd69fot",minHeight:90}),x&&!x.isDeepTalkArticle&&(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)})]})]}),(0,t.jsxs)("div",{className:"jsx-".concat(B.__hash)+" "+"section bg-white ".concat(x&&x.isDeepTalkArticle&&"deeptalk-section"),children:[(0,t.jsx)("div",{className:"jsx-".concat(B.__hash)+" "+"fst ".concat(x&&x.isDeepTalkArticle&&"deeptalk-fst"),children:(0,t.jsx)(tr,{threadId:o,thread:x,posts:x.posts,links:x.pagination,forums:n,currentPage:d,relatedThreads:c,relatedCommunities:l,event:h})}),x&&!x.isDeepTalkArticle&&(0,t.jsxs)("div",{className:"jsx-".concat(B.__hash)+" snd",children:[(0,t.jsxs)("div",{className:"jsx-".concat(B.__hash)+" hot-tags mobile-hidden",children:[(0,t.jsx)("p",{className:"jsx-".concat(B.__hash)+" block-title",children:"Xu hướng"}),(0,t.jsx)(M,{})]}),(0,t.jsxs)("div",{className:"jsx-".concat(B.__hash)+" recent-threads",children:[(0,t.jsx)("p",{className:"jsx-".concat(B.__hash)+" block-title",children:"Bài mới"}),(0,t.jsx)(D,{})]}),(0,t.jsx)(b.f,{slotName:td.mediumRectangle,mobilePageName:tc.homeMobileWeb,desktopPageName:tc.homeDesktopWeb,desktopOnly:!0,doNotLazyLoad:!0,showGDN:!0,customGdnComponent:(0,t.jsx)(N.f,{path:"Desktop_Forum_Right_1",size:[300,250],thread:x}),options:{thread:x},checkShowAdsThreadView:!0}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)(y.f,{desktopOnly:!0,adsId:"kmd65c33"}),(0,t.jsx)(y.f,{mobileOnly:!0,adsId:"kmd75yxs"}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)(b.f,{slotName:td.halfPage1,mobilePageName:tc.homeMobileWeb,desktopPageName:tc.homeDesktopWeb,desktopOnly:!0,doNotLazyLoad:!0,showGDN:!0,customGdnComponent:(0,t.jsx)(y.f,{adsId:"kmd6509n"}),options:{thread:x}}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)(b.f,{slotName:td.halfPage2,mobilePageName:tc.homeMobileWeb,desktopPageName:tc.homeDesktopWeb,desktopOnly:!0,doNotLazyLoad:!0,showGDN:!0,customGdnComponent:(0,t.jsx)(N.f,{path:"Right_Banner_3",size:[300,600],thread:x}),options:{thread:x},checkShowAdsThreadView:!0}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)("div",{className:"jsx-".concat(B.__hash),children:(0,t.jsx)("div",{"data-cptid":"1562704_tinhte.vn_300x250",style:{width:300,height:250,display:"block",margin:"0 auto"},className:"jsx-".concat(B.__hash),children:(0,t.jsx)("script",{dangerouslySetInnerHTML:{__html:'\n window.gnshbrequest.cmd.push(function() {\n window.gnshbrequest.applyPassback("1562704_tinhte.vn_300x250", "[data-cptid=\'1562704_tinhte.vn_300x250\']");\n });\n '},className:"jsx-".concat(B.__hash)})})}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)(tn.f,{adsId:"pw_50016"}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)(tn.f,{adsId:"pw_50015"})]})]})]}),(0,t.jsx)("br",{className:"jsx-".concat(B.__hash)}),(0,t.jsx)(w.f,{}),(0,t.jsx)(a.default,{id:B.__hash,children:B})]})}),{errorMsg:"Lỗi Thread Theme"});e.i(230184);var th=e.i(937712);e.i(33536),e.i(974968);var tx=e.i(798591),tp=e.i(131254),tm=e.i(328515),tf=e.i(251533);let tb=new String(".display-linebreak.jsx-9ce21aa51612f655{white-space:pre-line;overflow-wrap:break-word}.no-comments.jsx-9ce21aa51612f655{text-align:center;padding:16px}.live-comments.jsx-9ce21aa51612f655{flex-direction:column-reverse;height:150px;padding:16px 16px 0;display:flex;overflow:auto}@media (min-width:992px){.live-comments.jsx-9ce21aa51612f655{height:auto}}.comment-wrapper.jsx-9ce21aa51612f655{margin-bottom:16px;position:relative}.comment-wrapper.jsx-9ce21aa51612f655 .avatar{float:left;margin-right:12px}.comment-wrapper.jsx-9ce21aa51612f655 .comment.jsx-9ce21aa51612f655{margin-left:44px;font-size:15px}.comment-wrapper.jsx-9ce21aa51612f655 .comment.jsx-9ce21aa51612f655 .author.jsx-9ce21aa51612f655{color:var(--secondary-text)}.comment-wrapper.jsx-9ce21aa51612f655 .comment.jsx-9ce21aa51612f655 .author.jsx-9ce21aa51612f655 .name.jsx-9ce21aa51612f655{color:var(--primary-color)}.comment-wrapper.jsx-9ce21aa51612f655 .comment.jsx-9ce21aa51612f655 .content.jsx-9ce21aa51612f655{margin-top:3px}.comment-wrapper.jsx-9ce21aa51612f655:hover .menu-container .menu-trigger{display:block}.comment-wrapper.jsx-9ce21aa51612f655 .menu-container{position:absolute;top:0;right:0}.comment-wrapper.jsx-9ce21aa51612f655 .menu-container .menu-trigger{color:var(--secondary-text);font-size:13px;display:none}.comment-wrapper.jsx-9ce21aa51612f655 .thread-tool-menu__items.jsx-9ce21aa51612f655{text-align:left;width:100%;padding:6px 12px;display:block}");tb.__hash="9ce21aa51612f655";let tj=[].map(tm.o),tg=e=>{let{api:o,commentsFromRedis:i=tj,livestream:r,threadId:n,permissions:d}=e,[c,h]=(0,s.useState)([]),x=(0,s.useRef)(2),p=(0,s.useRef)(null),m=(0,s.useRef)(null),f=e=>Array.isArray(e)?e.sort((e,t)=>e.createDate-t.createDate):[],b=()=>{null!=p&&null!=m&&p.current.scrollTop{if(o&&"number"==typeof x.current&&x.current){let e={thread_id:n,page:x.current};o.get({uri:"/tinhte/threads/posts",params:e}).then(e=>{let t=f((0,tm.Q)(e).posts);t&&t.length>0?(h(e=>[...f([...t,...e.splice(0,10)]),...e]),x.current=x.current+1):x.current=null}).catch(e=>console.log(e))}})()};return(0,s.useEffect)(()=>{h(f(i||[]))},[i]),(0,s.useEffect)(()=>{if(r){let e=(0,tx.io)(r.socketUrl,{transports:["websocket"],reconnectionDelayMax:5e3});e.on("connect",()=>{e.emit("join",r.socketJoinToken)}),e.on("new-message",e=>{let t=(0,tm.o)(e.post);h(e=>{let a=f([...e.splice(e.length-10,10),t]);return[...e,...a]})})}return p.current.addEventListener("scroll",(0,tp.default)(()=>{b()},1e3)),()=>p&&p.current&&p.current.removeEventListener("scroll",b)},[]),(0,t.jsxs)("div",{ref:p,className:"jsx-".concat(tb.__hash)+" live-comments no-custom-scrollbar",children:[c&&c.length<=0?(0,t.jsx)("div",{className:"jsx-".concat(tb.__hash)+" no-comments",children:"Đang tải bình luận"}):(0,t.jsxs)("div",{className:"jsx-".concat(tb.__hash),children:[(0,t.jsx)("div",{ref:m,className:"jsx-".concat(tb.__hash)+" marker"}),c.map(e=>{let a;return(0,t.jsxs)("div",{className:"jsx-".concat(tb.__hash)+" comment-wrapper",children:[(0,t.jsx)(tf.f,{src:e.author.avatar,alt:e.author.name,width:"32px",height:"32px",noBorder:!0}),(0,t.jsxs)("div",{className:"jsx-".concat(tb.__hash)+" comment",children:[(0,t.jsxs)("div",{className:"jsx-".concat(tb.__hash)+" author",children:[(0,t.jsx)("span",{className:"jsx-".concat(tb.__hash)+" name",children:e.author.name})," • ",(0,t.jsx)("span",{className:"jsx-".concat(tb.__hash)+" time",children:(a=new Date(1e3*e.createDate),(0,l.default)(a).calendar(null,{sameDay:"HH:mm",lastDay:"HH:mm [hôm qua]",lastWeek:"HH:mm ddd",sameElse:"HH:mm DD/MM/YYYY"}))})]}),(0,t.jsx)("div",{className:"jsx-".concat(tb.__hash)+" content display-linebreak",children:e.body})]}),d&&d.reply_bans&&(0,t.jsx)(ec.f,{position:"right",menuItems:(0,t.jsx)("div",{className:"jsx-".concat(tb.__hash)+" thread-tool-menu",children:(0,t.jsx)("button",{onClick:()=>{var t,a;return t=e.author.id,a=e.author.name,void(!o||o.post({uri:"/threads/".concat(n,"/reply-bans"),params:{user_id:t}}).then(()=>F.c.success("Đã chặn bình luận của ".concat(a))))},className:"jsx-".concat(tb.__hash)+" thread-tool-menu__items",children:"Chặn bình luận"})})})]},"".concat(e.id,"-").concat(Math.random()))})," "]}),(0,t.jsx)(a.default,{id:tb.__hash,children:tb})]})};tg.apiFetchesWithAuth={commentsFromRedis:(e,t)=>{let{threadId:a}=t;return{uri:"/tinhte/threads/posts",params:{thread_id:a},success:e=>e.posts.map(tm.o)}}};let t_=s.default.memo(d.f.ApiConsumer(tg));var tu=e.i(979021),tv=e.i(827808);let tk=new String('.live-comment-input.jsx-6fbee4b4e4512825{border-top:1px solid var(--primary-border);padding:16px}.live-comment-input.jsx-6fbee4b4e4512825:after{content:"";clear:both;display:block}.live-comment-input.jsx-6fbee4b4e4512825 .flex-wrapper.jsx-6fbee4b4e4512825{display:flex}.live-comment-input.jsx-6fbee4b4e4512825 .flex-wrapper.jsx-6fbee4b4e4512825 .avatar{flex:none;margin-right:12px}.live-comment-input.jsx-6fbee4b4e4512825 .comment-input{resize:none;background-color:var(--input-background);border-radius:8px;outline:none;width:100%;min-height:50px;padding:8px 12px;font-size:15px}.live-comment-input.jsx-6fbee4b4e4512825 .post-button.jsx-6fbee4b4e4512825{float:right;margin-top:12px}');tk.__hash="6fbee4b4e4512825";let tw=d.f.ApiConsumer(e=>{let{api:o,user:i,threadId:r,permissions:n}=e,[d,c]=(0,s.useState)(""),l=(0,tu.default)(async()=>{if(d&&d.trim()){c("");try{await void(o&&o.onAuthenticated(()=>{o.post({uri:"/tinhte/threads/posts",params:{thread_id:r,post_body:d}}).then().catch()}))}catch(e){console.log("Error in submit live comment",e)}}},100);return null==i?null:(0,t.jsxs)("div",{className:"jsx-".concat(tk.__hash)+" live-comment-input",children:[(0,t.jsxs)("div",{className:"jsx-".concat(tk.__hash)+" flex-wrapper",children:[(0,t.jsx)(tf.f,{src:i.avatar,alt:i.name,width:"32px",height:"32px",noBorder:!0}),(0,t.jsx)(tv.f,{className:"comment-input",placeholder:n.post?"Viết bình luận nào bạn ơi...":"Bình luận bị khoá",autoFocus:!0,disabled:!n.post,value:d,onChange:e=>{c(e.target.value)},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e.stopPropagation(),l())}})]}),(0,t.jsx)(a.default,{id:tk.__hash,children:tk})]})}),tN=new String("@media (min-width:992px){.livestream-thread.jsx-2d69564c274b4dbb{height:calc(100vh - 88px);margin:auto;display:flex;overflow:hidden}.left.jsx-2d69564c274b4dbb{flex:1 1 0;overflow:auto}.right.jsx-2d69564c274b4dbb{flex-direction:column;width:280px;display:flex}}@media (min-width:1024px){.right.jsx-2d69564c274b4dbb{width:400px}}.livestream-info.jsx-2d69564c274b4dbb{padding:0 16px 16px}@media (min-width:992px){.livestream-info.jsx-2d69564c274b4dbb{padding:0 60px 30px}}.live-comment-wrapper.jsx-2d69564c274b4dbb{background-color:var(--grey-background);flex-direction:column;height:100%;display:flex}.title-container.jsx-2d69564c274b4dbb{align-items:center;margin-top:24px;margin-bottom:12px;display:flex}.live-onair.jsx-2d69564c274b4dbb{color:#fff;background-color:var(--color-alert-badge);text-transform:uppercase;border-radius:4px;margin-right:12px;padding:1px 12px;font-size:12px;font-weight:700}.title.jsx-2d69564c274b4dbb{font-size:24px;font-weight:700;line-height:32px}.sub-section.jsx-2d69564c274b4dbb{justify-content:space-between;margin-top:24px;margin-bottom:12px;display:flex}.author.jsx-2d69564c274b4dbb{display:flex}.author.jsx-2d69564c274b4dbb .author-name.jsx-2d69564c274b4dbb{color:var(--color-accent-dark);margin-bottom:6px;font-size:18px}.author.jsx-2d69564c274b4dbb .avatar.jsx-2d69564c274b4dbb{border:2px solid var(--color-accent-dark);border-radius:50%;width:40px;height:40px}.author.jsx-2d69564c274b4dbb .info.jsx-2d69564c274b4dbb{margin-left:12px}.stats.jsx-2d69564c274b4dbb{color:var(--text-light-2);align-items:center;margin-top:12px;margin-bottom:12px;display:flex}.stats.jsx-2d69564c274b4dbb .total-reactions{margin-right:0}.thread-actions.jsx-2d69564c274b4dbb{color:var(--text-light-2);flex-flow:wrap;justify-content:space-between;align-items:center;margin-top:24px;display:flex}.thread-actions.border.jsx-2d69564c274b4dbb{border-top:1px solid var(--border-light);border-bottom:1px solid var(--border-light);padding:8px 0}.thread-actions__left.jsx-2d69564c274b4dbb,.thread-actions__right.jsx-2d69564c274b4dbb{flex-direction:row;align-items:center;display:flex}.thread-actions__right.jsx-2d69564c274b4dbb .moderator-action__button.jsx-2d69564c274b4dbb{margin-top:0}.thread-like.jsx-2d69564c274b4dbb,.thread-comment.jsx-2d69564c274b4dbb{background-color:var(--post-background);border-radius:4px;align-items:center;margin-right:12px;padding:10px;display:flex;position:relative}.thread-like.jsx-2d69564c274b4dbb svg,.thread-comment.jsx-2d69564c274b4dbb svg{display:block}.thread-comment.jsx-2d69564c274b4dbb svg{margin-right:10px}.thread-like_deco-left.jsx-2d69564c274b4dbb{background-color:var(--color-reward-green);border-top-right-radius:100%;border-bottom-right-radius:100%;width:6px;height:36px}.thread-like_deco-right.jsx-2d69564c274b4dbb{background-color:var(--color-reward-green);border-top-left-radius:100%;border-bottom-left-radius:100%;width:6px;height:36px}.thread-like__button.jsx-2d69564c274b4dbb{background-color:var(--post-background);color:var(--text-dark);border-top:2px solid var(--color-reward-green);border-bottom:2px solid var(--color-reward-green);border-radius:3px;outline:none;justify-content:center;align-items:center;margin-right:10px;font-size:.9rem;font-weight:600;display:flex}.thread-like__button.active.jsx-2d69564c274b4dbb{background-color:var(--color-accent-dark)}.thread-like__button.jsx-2d69564c274b4dbb i.jsx-2d69564c274b4dbb{margin-right:5px}.thread-like__button.active.jsx-2d69564c274b4dbb{background-color:var(--color-accent-dark);color:var(--text-light)}.thread-like_info.jsx-2d69564c274b4dbb{justify-content:center;align-items:center;margin-left:24px;margin-right:24px;display:flex}.thread-share-fact.jsx-2d69564c274b4dbb{margin-right:12px}.thread-share.jsx-2d69564c274b4dbb{background-color:var(--button-facebook);color:var(--text-light);border-radius:3px;outline:none;padding:10px;font-size:.9rem}.thread-share.jsx-2d69564c274b4dbb .fa.jsx-2d69564c274b4dbb{margin-right:6px}.thread-share-count.jsx-2d69564c274b4dbb{margin-right:6px;font-weight:700}.thread-tool-menu__items.jsx-2d69564c274b4dbb{padding:12px}.thread-tool-menu__items.jsx-2d69564c274b4dbb:hover{background-color:var(--hover-background)}");tN.__hash="2d69564c274b4dbb";let{SlotName:ty,PageName:tT}=m.f,tC=(0,v.f)(d.f.ApiConsumer(i=>{let{api:r,thread:n}=i,[d,c]=(0,s.useState)(null),[h,x]=(0,s.useState)(n.firstPost),[p,m]=(0,s.useState)(n.firstPost.reaction.total||0),[f,b]=(0,s.useState)({}),[j,g]=(0,s.useState)({});(0,s.useEffect)(()=>void(r&&r.onAuthenticated(()=>{r.getUserId()>0&&r.get("users/me").then(e=>{c((0,H.U)(e.user||{}))},()=>{})})),[]),(0,s.useEffect)(()=>{d&&r.onAuthenticated(()=>{r.get("threads/".concat(n.id)).then(e=>{b((0,o.default)(e,"thread.permissions",{})),g((0,o.default)(e,"thread.first_post.permissions",{}))},()=>{})})},[d]);let _=Math.floor(Date.now()/1e3);return(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash),children:[(0,t.jsx)(k.f,{}),(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" livestream-thread",children:[(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" left no-custom-scrollbar",children:[(0,t.jsx)(th.f,{livestream:n.livestream}),(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" livestream-info",children:[(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" title-container",children:[n.livestream.end&&_0&&(0,t.jsxs)("span",{className:"jsx-".concat(tN.__hash),children:[" • ",(0,t.jsx)(J.f,{value:n.stats.comment})," bình luận"]})]})}),(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" thread-actions border",children:[(0,t.jsx)("div",{className:"jsx-".concat(tN.__hash)+" thread-actions__left",children:(0,t.jsx)("div",{className:"jsx-".concat(tN.__hash)+" thread-like",children:(0,t.jsx)(eh.f,{commentMode:!1,post:h,onReact:(e,t,a)=>{let s={...h},o=p;e===em.U.Up&&(o=p+1,s.reaction.postReactions[t]=s.reaction.postReactions[t]+1,s.reaction.userReactionId=t),e===em.U.Down&&(o=p-1,s.reaction.postReactions[a]=s.reaction.postReactions[a]-1,s.reaction.userReactionId=null),e===em.U.Neutral&&(s.reaction.postReactions[a]=s.reaction.postReactions[a]-1,s.reaction.postReactions[t]=s.reaction.postReactions[t]+1,s.reaction.userReactionId=t),x(s),m(o)},noManualWidth:!0})})}),(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" thread-actions__right",children:[(0,t.jsx)("div",{className:"jsx-".concat(tN.__hash)+" thread-share-fact",children:(0,t.jsx)(eb.f,{thread:n})}),(0,t.jsxs)("button",{onClick:()=>{var t;return t=n.link,void(e.g.FB&&FB.ui({method:"share",display:"popup",href:t},e=>{console.log("share to facebook",e)}),r.onAuthenticated(()=>{let e=new V.U(r),t=[{key:"thread_id",value:n.id}];e.trackEvent(q.f.ThreadView_Share_Facebook_Click,r.getUserId(),t)}))},className:"jsx-".concat(tN.__hash)+" thread-share",children:[(0,t.jsx)("i",{className:"jsx-".concat(tN.__hash)+" fa fa-share"}),(0,t.jsx)("span",{className:"jsx-".concat(tN.__hash),children:"Facebook"})]})]})]})]})]}),(0,t.jsx)("div",{className:"jsx-".concat(tN.__hash)+" right no-custom-scrollbar",children:(0,t.jsxs)("div",{className:"jsx-".concat(tN.__hash)+" live-comment-wrapper",children:[(0,t.jsx)(t_,{livestream:n.livestream,threadId:n.id,permissions:f}),(0,t.jsx)(tw,{user:d,threadId:n.id,permissions:f})]})})]}),(0,t.jsx)(a.default,{id:tN.__hash,children:tN})]})}),{errorMsg:"Lỗi livestream"}),tS=new String(".masthead-selector-container.jsx-beae9ddd942f63e2{background-color:var(--light-background-2);justify-content:center;align-items:center;padding:6px;display:flex}@media (max-width:767px){.masthead-selector-container.jsx-beae9ddd942f63e2{display:none}}.masthead-selector.jsx-beae9ddd942f63e2{border:2px solid var(--color-accent-dark);border-radius:4px;margin-left:12px;padding:10px}");tS.__hash="beae9ddd942f63e2";var tP=e.i(519088),tD=e.i(437994);let tz=new String(".thread-view__container.jsx-95164c14d01addb5{background-color:var(--page-background);padding:15px}.thread-view__container.jsx-95164c14d01addb5 .thread-react.jsx-95164c14d01addb5{align-items:center;gap:var(--gap-thread-action);justify-content:space-between;margin-top:12px;display:flex}.thread-view__container.jsx-95164c14d01addb5 .thread-react.jsx-95164c14d01addb5 .react-item.jsx-95164c14d01addb5{align-items:center;gap:4px;font-size:12px;line-height:20px;display:flex}.thread-view__container.jsx-95164c14d01addb5 .thread-react.jsx-95164c14d01addb5 .separate.jsx-95164c14d01addb5{color:var(--secondary-text);font-size:14px}.thread-view__container.jsx-95164c14d01addb5 .thread-react.jsx-95164c14d01addb5 .reacted-text.jsx-95164c14d01addb5{color:var(--primary-color);font-weight:700}.thread-view__container.jsx-95164c14d01addb5 .reactions{width:unset}.thread-view__container.jsx-95164c14d01addb5 .reactions .icon{margin-right:0}.thread-view__container.jsx-95164c14d01addb5 .reactions .reaction-text{display:none}.comment-reply.jsx-95164c14d01addb5{background-color:var(--page-background);z-index:100;flex-direction:column;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.comment-reply.jsx-95164c14d01addb5 .reply-head.jsx-95164c14d01addb5{border-bottom:1px solid var(--light-grey-background);color:var(--text-dark);align-items:center;gap:10px;padding:16px;font-size:20px;font-weight:600;line-height:28px;display:flex}.comment-reply.jsx-95164c14d01addb5 .reply-head.jsx-95164c14d01addb5 .btn-close.jsx-95164c14d01addb5{justify-content:center;align-items:center;width:24px;height:24px;display:flex}.comment-reply.jsx-95164c14d01addb5 .reply-input{resize:none;flex:1;padding-top:4px}.comment-reply.jsx-95164c14d01addb5 .reply-input:focus-visible{outline:none}.comment-reply.jsx-95164c14d01addb5 .btn-submit-reply.jsx-95164c14d01addb5{color:#fff;background-color:#3280f6;border-radius:16px;justify-content:center;align-items:center;height:32px;margin:0 10px 16px;font-size:14px;font-weight:600;line-height:20px;transition:bottom .3s;display:flex;position:absolute;bottom:0;left:0;right:0}");tz.__hash="95164c14d01addb5";var tR=e.i(490839);let tA=new String(".header.jsx-f9974b8048f4ad4c{justify-content:space-between;align-items:center;margin-bottom:11px;display:flex}");tA.__hash="f9974b8048f4ad4c";var tI=e.i(618646);let tM=e=>{let{thread:s,changeTheme:o}=e;return(0,t.jsxs)("div",{className:"jsx-".concat(tA.__hash)+" header",children:[(0,t.jsx)(tR.f,{user:s.author,thread:s,userRank:s.firstPost.posterRank.rankName,postedSince:s.since}),(0,t.jsx)(tI.f,{thread:s,changeTheme:o}),(0,t.jsx)(a.default,{id:tA.__hash,children:tA})]})};var tB=e.i(158586);let tE=new String(".comment-box.jsx-a04700727b0b2445{background-color:var(--page-background);margin:2px 0;padding:16px 10px;display:flex}.comment-box.jsx-a04700727b0b2445 .comment-input-initial{height:unset!important}.comment-box.jsx-a04700727b0b2445 .comment-input{resize:none;flex:1;padding:4px 12px 0}.comment-box.jsx-a04700727b0b2445 .comment-input:focus-visible{outline:none}.comment-box.jsx-a04700727b0b2445 .btn-submit.jsx-a04700727b0b2445{color:#fff;background-color:#3280f6;border-radius:16px;align-items:center;height:32px;padding:0 16px;font-size:14px;font-weight:600;line-height:20px;display:flex}.comment-box.jsx-a04700727b0b2445 .btn-submit-disabled.jsx-a04700727b0b2445{opacity:.5}");tE.__hash="a04700727b0b2445";let tF=e=>{let{onComment:o,user:i,initialText:r,isEdit:n}=e,[d,c]=(0,s.useState)(""),[l,h]=(0,s.useState)(!1),x=(0,s.useMemo)(()=>!d.trim(),[d]),p=(0,s.useCallback)(()=>{x||(o(d),c(""))},[x,d]);return(0,s.useEffect)(()=>{r&&c(r)},[r]),(0,t.jsxs)("div",{className:"jsx-".concat(tE.__hash)+" comment-box",children:[i&&(0,t.jsx)(tf.f,{src:i.avatar,alt:i.name,profile:i.link,noScale:!0}),(0,t.jsx)(tv.f,{className:"comment-input ".concat(l?"":"comment-input-initial"),value:d,minRows:1,maxRows:4,placeholder:"Bạn nghĩ gì về chủ đề này?",onChange:e=>c(e.target.value),onHeightChange:()=>h(!0)}),(0,t.jsx)("button",{onClick:p,className:"jsx-".concat(tE.__hash)+" "+"btn-submit ".concat(x?"btn-submit-disabled":""),children:n?"Lưu":"Gửi"}),(0,t.jsx)(a.default,{id:tE.__hash,children:tE})]})};var tL=e.i(532123),tU=s;let tO=new String(".thread-report.jsx-455cb366028dc040{background-color:var(--thread-report-background);border:1px solid var(--thread-report-border);border-radius:3px;width:100%;margin-top:1rem;padding:1rem;position:relative}.thread-report__title.jsx-455cb366028dc040{color:#f79500;margin:0 1rem 0 0;font-size:14px;font-weight:700}.thread-report__reasons.jsx-455cb366028dc040{align-items:center;margin-top:1rem;display:flex;position:relative}.title.jsx-455cb366028dc040{flex:4rem;margin-right:1rem}.reason.jsx-455cb366028dc040{width:100%;color:var(--text-always-black);background-color:#f5e8d7;border-radius:5px;outline:none;flex-grow:1;padding:5px 1rem}.thread-report__submit.jsx-455cb366028dc040{text-align:right;width:100%}.button.jsx-455cb366028dc040{color:#8e8e8e;background-color:#f5e8d7;border-radius:4px;outline:none;margin-top:1rem;padding:5px 2rem}.button.active.jsx-455cb366028dc040{color:#fff;background-color:#f79500;border-radius:4px;outline:none;margin-top:1rem;padding:5px 2rem}@media (max-width:600px){.thread-report__reasons.jsx-455cb366028dc040{display:inline-block}.thread-report__reasons.jsx-455cb366028dc040 .title.jsx-455cb366028dc040{margin-bottom:5px}}");tO.__hash="455cb366028dc040";class tH extends tU.default.Component{reportMessageComposing(e){this.setState({reportMessage:e.target.value})}async toggleReportPost(){let{api:e,post:t}=this.props,{reportMessage:a}=this.state;try{let s=await (0,te.U)(e,t,a);this.props.reportPost(s)}catch(e){}}render(){let{reportMessage:e}=this.state;return(0,t.jsxs)("div",{className:"jsx-".concat(tO.__hash)+" ",children:[(0,t.jsxs)("div",{className:"jsx-".concat(tO.__hash)+" thread-report",children:[(0,t.jsx)("p",{className:"jsx-".concat(tO.__hash)+" thread-report__title",children:"Thông báo bài xấu"}),(0,t.jsxs)("div",{className:"jsx-".concat(tO.__hash)+" thread-report__reasons",children:[(0,t.jsx)("p",{className:"jsx-".concat(tO.__hash)+" title",children:"Lý do:"}),(0,t.jsxs)("select",{onChange:e=>this.reportMessageComposing(e),className:"jsx-".concat(tO.__hash)+" reason",children:[(0,t.jsx)("option",{value:"",className:"jsx-".concat(tO.__hash),children:"-- Chọn lý do --"}),(0,t.jsx)("option",{value:"Tiếng Việt không dấu",className:"jsx-".concat(tO.__hash),children:"Tiếng Việt không dấu"}),(0,t.jsx)("option",{value:"Nội dung vi phạm nội quy",className:"jsx-".concat(tO.__hash),children:"Nội dung vi phạm nội quy"}),(0,t.jsx)("option",{value:"Cố tình spam, làm loãng hoặc phá hỏng chủ đề của thành viên khác",className:"jsx-".concat(tO.__hash),children:"Cố tình spam, làm loãng hoặc phá hỏng chủ đề của thành viên khác"}),(0,t.jsx)("option",{value:"Từ ngữ không tinh tế hay thô tục",className:"jsx-".concat(tO.__hash),children:"Từ ngữ không tinh tế hay thô tục"}),(0,t.jsx)("option",{value:"Vi phạm bản quyền phần mềm",className:"jsx-".concat(tO.__hash),children:"Vi phạm bản quyền phần mềm"}),(0,t.jsx)("option",{value:"Nôi dung liên quan hay bàn về chính trị",className:"jsx-".concat(tO.__hash),children:"Nôi dung liên quan hay bàn về chính trị"}),(0,t.jsx)("option",{value:"Kích động, cố tình gây cãi nhau",className:"jsx-".concat(tO.__hash),children:"Kích động, cố tình gây cãi nhau"}),(0,t.jsx)("option",{value:"Phá hoại chủ đề",className:"jsx-".concat(tO.__hash),children:"Phá hoại chủ đề"}),(0,t.jsx)("option",{value:"Spam/Quảng cáo",className:"jsx-".concat(tO.__hash),children:"Spam/Quảng cáo"}),(0,t.jsx)("option",{value:"Bóc tem, xé tem",className:"jsx-".concat(tO.__hash),children:"Bóc tem, xé tem"}),(0,t.jsx)("option",{value:"Cố tình chửi nhau, xúc phạm nhau",className:"jsx-".concat(tO.__hash),children:"Cố tình chửi nhau, xúc phạm nhau"})]})]}),(0,t.jsxs)("div",{className:"jsx-".concat(tO.__hash)+" thread-report__reasons",children:[(0,t.jsx)("p",{className:"jsx-".concat(tO.__hash)+" title",children:"Khác:"}),(0,t.jsx)("input",{type:"text",placeholder:"Nhập lý do khác tại đây",onChange:e=>this.reportMessageComposing(e),className:"jsx-".concat(tO.__hash)+" reason"})]}),(0,t.jsx)("div",{className:"jsx-".concat(tO.__hash)+" thread-report__submit",children:e?(0,t.jsx)("button",{onClick:this.toggleReportPost,className:"jsx-".concat(tO.__hash)+" button active",children:"Gửi"}):(0,t.jsx)("button",{disabled:!0,className:"jsx-".concat(tO.__hash)+" button",children:"Gửi"})})]}),(0,t.jsx)(a.default,{id:tO.__hash,children:tO})]})}constructor(e){super(e),this.state={reportMessage:""},this.toggleReportPost=this.toggleReportPost.bind(this),this.reportMessageComposing=this.reportMessageComposing.bind(this)}}var tV=e.i(210147);let tq=new String(".post-item__container.jsx-99835176ff4e17f9{background-color:var(--page-background);padding:15px}.post-item__container.jsx-99835176ff4e17f9+.post-item__container.jsx-99835176ff4e17f9{margin-top:2px}.post-item__container.jsx-99835176ff4e17f9 .post-body.jsx-99835176ff4e17f9{padding-left:40px}.post-item__container.jsx-99835176ff4e17f9 .post-body.jsx-99835176ff4e17f9 .comment-box{border:1px solid var(--border-light);border-radius:10px}.post-item__container.jsx-99835176ff4e17f9 .fact-images{height:192px;padding-left:40px}.post-item__container.jsx-99835176ff4e17f9 .thread-react.jsx-99835176ff4e17f9{align-items:center;gap:var(--gap-thread-action);margin-top:12px;margin-left:40px;display:flex}.post-item__container.jsx-99835176ff4e17f9 .thread-react.jsx-99835176ff4e17f9 .react-item.jsx-99835176ff4e17f9{align-items:center;gap:4px;font-size:12px;line-height:20px;display:flex}.post-item__container.jsx-99835176ff4e17f9 .thread-react.jsx-99835176ff4e17f9 .react-item.jsx-99835176ff4e17f9 .reacted-text.jsx-99835176ff4e17f9{color:var(--primary-color);font-weight:700}.post-item__container.jsx-99835176ff4e17f9 .thread-react.jsx-99835176ff4e17f9 .separate.jsx-99835176ff4e17f9{color:var(--secondary-text);font-size:14px}.post-item__container.jsx-99835176ff4e17f9 .reactions{width:unset}.post-item__container.jsx-99835176ff4e17f9 .reactions .icon{margin-right:0}.post-item__container.jsx-99835176ff4e17f9 .reactions .reaction-text{display:none}.post-item__container.jsx-99835176ff4e17f9 .replies.jsx-99835176ff4e17f9{border-left:1px solid var(--border-light);margin-top:12px;margin-left:40px}.post-item__container.jsx-99835176ff4e17f9 .replies.jsx-99835176ff4e17f9 .post-item__container.jsx-99835176ff4e17f9{padding-right:0}.post-item__container.jsx-99835176ff4e17f9 .replies.jsx-99835176ff4e17f9 .btn-more.jsx-99835176ff4e17f9{color:var(--color-accent-dark);padding:0 15px;font-size:.8rem}");tq.__hash="99835176ff4e17f9";let tW=new String(".header.jsx-d4c7ef87160ef1fa{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}");tW.__hash="d4c7ef87160ef1fa";let tG=e=>{let{post:s,renderMenu:o}=e;return(0,t.jsxs)("div",{className:"jsx-".concat(tW.__hash)+" header",children:[(0,t.jsx)(tR.f,{user:s.author,userRank:s.posterRank.rankName,postedSince:s.since}),o(),(0,t.jsx)(a.default,{id:tW.__hash,children:tW})]})};var tX=e.i(661655),tY=e.i(314390);let tK=e=>{let{post:o,user:i,api:r,onReply:n}=e,[d,c]=(0,s.useState)(!1),[l,h]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[m,f]=(0,s.useState)([]),[b,j]=(0,s.useState)(o),g=(0,s.useCallback)(()=>{n(b)},[b]),_=(e,t,a)=>{j(s=>{let o=s.reaction.total;return e===em.U.Up&&(o+=1,s.reaction.postReactions[t]=s.reaction.postReactions[t]+1,s.reaction.userReactionId=t),e===em.U.Down&&(o-=1,s.reaction.postReactions[a]=s.reaction.postReactions[a]-1,s.reaction.userReactionId=null),e===em.U.Neutral&&(s.reaction.postReactions[a]=s.reaction.postReactions[a]-1,s.reaction.postReactions[t]=s.reaction.postReactions[t]+1,s.reaction.userReactionId=t),s.reaction.total=o,{...s}})},u=(0,s.useCallback)(e=>{e&&fetch(e).then(e=>e.json()).then(t=>{let a=[...m],s=[];t&&t.parent_post&&t.parent_post&&t.parent_post.post_replies&&t.parent_post.post_replies.map((e,i)=>{if(e.post_id){let i=t.replies.find(t=>t.post_id===e.post_id);i&&-1===a.findIndex(e=>e.id===i.post_id)&&s.push((0,tX.U)(i,o.thread))}else if(0===i){let t=a.findIndex(t=>t.id===e.from),o=a.findIndex(t=>t.id===e.to);(-1===t||-1===o)&&s.push(e)}return!0});let i=a.findIndex(t=>t.link===e);i>-1&&a.splice(i,1,...s),f(a)})},[m]),v=(0,s.useCallback)(()=>{h(e=>!e)},[]),k=(0,s.useCallback)(()=>{p(e=>!e)},[]),w=(0,s.useCallback)(()=>{(0,te._)(r,b.id).then(e=>{e.errors?F.c.error(e.errors):F.c.success("Báo xấu thành công")}).catch(e=>{F.c.error(e)})},[]),N=(0,s.useCallback)(()=>(0,t.jsxs)("div",{className:"thread-controls",children:[b&&(b.permissions.edit||b.permissions.delete||b.permissions.report)&&(0,t.jsx)(ec.f,{position:"right",menuItems:(0,t.jsxs)(s.Fragment,{children:[b.permissions.edit&&(0,t.jsx)("button",{onClick:v,children:"Sửa"}),b.permissions.delete&&(0,t.jsx)("button",{onClick:k,children:"Xoá"}),b.permissions.report&&b.reported?(0,t.jsx)("button",{className:"dropdown-action disabled",children:"Đã báo xấu"}):d?(0,t.jsx)("button",{className:"dropdown-action selected",onClick:w,children:(0,t.jsx)("span",{children:"Hủy"})}):(0,t.jsx)("button",{onClick:w,children:"Báo xấu"}),i&&i.id&&(i.isAdmin||i.isModerator)&&(0,t.jsx)("a",{href:"https://tinhte.vn/spam-cleaner/".concat(b.author.id,"/"),children:(0,t.jsx)("span",{children:"Spam"})}),i&&i.id&&(i.isAdmin||i.isModerator)&&(0,t.jsx)("a",{href:"https://tinhte.vn/members/mem.".concat(b.author.id,"/warn-smart?content_type=post&content_id=").concat(b.id),children:(0,t.jsx)("span",{children:"Cảnh báo"})})]})}),b.isDeleted&&(0,t.jsx)(tL.f,{className:"deleted-marker"})]}),[b,w,k,v,d]),y=(0,s.useCallback)(e=>{let t=e,a=(0,tY.E)(o.body);a&&a.length>0&&a.forEach(e=>{t="".concat(e,"\n").concat(t)});let s=new URLSearchParams;s.append("thread_id",o.thread.id),s.append("post_body",t),r.put({uri:"posts/".concat(o.id),body:s}).then(e=>{e.errors&&F.c.error(e.errors);let t=(0,tX.U)(e.post,o.thread);t.postReplyTo=o.postReplyTo,j(t),h(!1)}).catch(e=>{F.c.error(e),h(!1)})},[]);return((0,s.useEffect)(()=>{o.postRepliesDetail&&f(o.postRepliesDetail)},[o.postRepliesDetail]),(0,s.useEffect)(()=>{o&&j(o)},[o]),b.isFirstPost||b.isDeleted)?null:(0,t.jsxs)("div",{className:"jsx-".concat(tq.__hash)+" post-item__container",children:[(0,t.jsx)(tG,{post:b,renderMenu:N}),(0,t.jsx)("div",{className:"jsx-".concat(tq.__hash)+" post-body",children:l?(0,t.jsx)(tF,{isEdit:!0,initialText:b.bodyPlain,onComment:y}):(0,t.jsx)(G.f,{body:b.bodyHtml,author:b.author.name})}),(0,t.jsx)(tB.f,{post:b,noBorderRadius:!0}),(0,t.jsxs)("div",{className:"jsx-".concat(tq.__hash)+" thread-react",children:[em.q.map(e=>{let a=b&&b.reaction&&b.reaction.userReactionId===e,o=b&&b.reaction&&b.reaction.postReactions[e]||0;return(0,t.jsx)(s.Fragment,{children:(0,t.jsxs)("div",{className:"jsx-".concat(tq.__hash)+" react-item",children:[(0,t.jsx)(eh.f,{commentMode:!1,post:b,onReact:_,reactionButtonId:e}),(0,t.jsx)("span",{className:"jsx-".concat(tq.__hash)+" "+"".concat(a?"reacted-text":""),children:o})]})},"".concat(e))}),(0,t.jsx)("button",{onClick:g,className:"jsx-".concat(tq.__hash)+" react-item",children:(0,t.jsx)(ef.f,{})}),(l||x||d)&&(0,t.jsx)(s.Fragment,{children:(0,t.jsx)("button",{onClick:()=>{p(!1),h(!1),c(!1)},className:"jsx-".concat(tq.__hash)+" react-item",children:"Huỷ"})})]}),d&&(0,t.jsx)(tH,{api:r,post:b,user:i,reportPost:j}),x&&(0,t.jsx)(tV.f,{api:r,post:b,user:i,deletePost:j}),m.length>0&&(0,t.jsx)("div",{className:"jsx-".concat(tq.__hash)+" replies",children:m.map(e=>e.id?e.isIgnored?null:(0,t.jsx)(tK,{post:e,user:i,api:r,onReply:n},e.id):(0,t.jsxs)("button",{onClick:()=>u(e.link),className:"jsx-".concat(tq.__hash)+" btn-more",children:["Xem thêm ",e.post_reply_count," trả lời cũ hơn..."]},"".concat(e.from,"-").concat(e.to)))}),(0,t.jsx)(a.default,{id:tq.__hash,children:tq})]})},tJ=d.f.ApiConsumer(o=>{let{thread:i,api:r,changeTheme:n}=o,{isKeyboardVisible:d,keyboardOffset:c}=(()=>{let[e,t]=(0,s.useState)(!1),[a,o]=(0,s.useState)(0);return(0,s.useEffect)(()=>{let e=()=>{if(window.visualViewport){let{height:e,offsetTop:a}=window.visualViewport,s=window.innerHeight;e{window.visualViewport&&(window.visualViewport.removeEventListener("resize",e),window.visualViewport.removeEventListener("scroll",e))}},[]),{isKeyboardVisible:e,keyboardOffset:a}})(),[l,x]=(0,s.useState)(),[p,m]=(0,s.useState)(!1),[f,b]=(0,s.useState)(null),[j,g]=(0,s.useState)(""),[_,u]=(0,s.useState)(i),v=(0,s.useMemo)(()=>!j.trim(),[j]),k=(0,s.useCallback)(e=>{if(!p){m(!0);let t=new window.FormData;t.append("thread_id",i.id),t.append("post_body",e),r.post({uri:"posts",body:t}).then(e=>{let{post:t,errors:a}=e;a&&F.c.error(a),m(!1);let s=(0,tX.U)(t,i);u(e=>({...e,posts:[s,...e.posts]}))}).catch(e=>{m(!1),F.c.error(e)})}console.log(e)},[]),w=(e,t,a)=>{u(s=>{let o=s.firstPost.reaction.total;return e===em.U.Up&&(o+=1,s.firstPost.reaction.postReactions[t]=s.firstPost.reaction.postReactions[t]+1,s.firstPost.reaction.userReactionId=t),e===em.U.Down&&(o-=1,s.firstPost.reaction.postReactions[a]=s.firstPost.reaction.postReactions[a]-1,s.firstPost.reaction.userReactionId=null),e===em.U.Neutral&&(s.firstPost.reaction.postReactions[a]=s.firstPost.reaction.postReactions[a]-1,s.firstPost.reaction.postReactions[t]=s.firstPost.reaction.postReactions[t]+1,s.firstPost.reaction.userReactionId=t),s.firstPost.reaction.total=o,{...s,firstPost:{...s.firstPost}}})},N=(0,s.useCallback)(()=>{_.pagination.next&&r.get({uri:_.pagination.next,headers:{"Api-Post-Tree":1}}).then(e=>{let{posts:t,links:a}=e,s=(0,tX.e)(_,t.map(e=>(0,tX.U)(e,_))).reverse(),o=(0,tD.default)([..._.posts||[],...s],"id"),i={..._};i.posts=o,i.pagination=a,u(i)})},[_]),y=(0,s.useCallback)(e=>{l&&(b(e),g(""))},[l]),T=(0,s.useCallback)(()=>{if(!v){let e={thread_id:_.id,post_body:j,quote_post_id:f.id};r.post({uri:"posts",params:e}).then(e=>{let{post:t,errors:a}=e;a&&F.c.error(a),b(null);let s=(0,tX.U)(t,f.thread);s.postReplyTo=f.id,u(e=>({...e,posts:e.posts.map(e=>{if(e.id===f.id)return e.postRepliesDetail.unshift(s),{...e};let t=!1;return(e.postRepliesDetail.forEach((a,o)=>{s.postReplyTo===a.id&&(t=!0,e.postRepliesDetail.splice(o+1,0,s))}),t)?{...e}:e})}))}).catch(e=>{F.c.error(e)})}},[_.id,f,j,v]);return(0,s.useEffect)(()=>{O.isMobile&&r.onAuthenticated(()=>{if(r&&r.getUserId()&&r.get("users/me").then(e=>{x((0,H.U)(e.user||{}))}).catch(e=>{console.log("#a7148f Fetching user error: ",e)}),i){let e={thread_id:i.id,page:1,fields_include:"*,review_extra_data"};r.get({uri:"/posts",params:e,headers:{"Api-Post-Tree":1}}).then(e=>{var t;let a=e.posts?e.posts:[],s=e.links?e.links:{};t=i.id,r.get({uri:"/threads/".concat(t),params:{fields_include:"*,review_extra_data"}}).then(e=>{let t=e.thread?e.thread:{};t.posts=a,t.pagination=s,u({...(0,h.U)(t)})})})}})},[]),(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)("div",{className:"jsx-".concat(tz.__hash)+" thread-view__container",children:[(0,t.jsx)(tM,{thread:_,changeTheme:n}),(0,t.jsx)(ep.f,{threadId:_.id}),_.firstPost.isThreadBackground&&!_.isEmbedVideo?(0,t.jsx)("div",{className:"jsx-".concat(tz.__hash)+" thread-with-background-container",children:(0,t.jsx)(Z.f,{firstPost:_.firstPost})}):(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(G.f,{body:_.firstPost.bodyHtml,author:_.firstPost.author.name}),(0,t.jsx)(tB.f,{thread:_,post:_.firstPost,noBorderRadius:!0})]}),(0,t.jsxs)("div",{className:"jsx-".concat(tz.__hash)+" thread-react",children:[em.q.map(e=>{let a=_.firstPost&&_.firstPost.reaction&&_.firstPost.reaction.userReactionId===e,o=_.firstPost&&_.firstPost.reaction&&_.firstPost.reaction.postReactions[e]||0;return(0,t.jsx)(s.Fragment,{children:(0,t.jsxs)("div",{className:"jsx-".concat(tz.__hash)+" react-item",children:[(0,t.jsx)(eh.f,{commentMode:!1,post:_.firstPost,onReact:w,reactionButtonId:e}),(0,t.jsx)("span",{className:"jsx-".concat(tz.__hash)+" "+"".concat(a?"reacted-text":""),children:o})]})},"".concat(e))}),(0,t.jsxs)("div",{className:"jsx-".concat(tz.__hash)+" react-item",children:[(0,t.jsx)(ef.f,{}),(0,t.jsx)("span",{className:"jsx-".concat(tz.__hash),children:_.stats.comment})]}),(0,t.jsx)("button",{onClick:()=>{var t;return t=i.link,void(e.g.FB&&FB.ui({method:"share",display:"popup",href:t},e=>{console.log("xxxx",e)}))},className:"jsx-".concat(tz.__hash)+" react-item",children:(0,t.jsx)(W.f,{})})]}),f&&(0,t.jsxs)("div",{className:"jsx-".concat(tz.__hash)+" comment-reply",children:[(0,t.jsxs)("div",{className:"jsx-".concat(tz.__hash)+" reply-head",children:[(0,t.jsx)("button",{onClick:()=>b(null),className:"jsx-".concat(tz.__hash)+" btn-close",children:(0,t.jsx)("i",{className:"jsx-".concat(tz.__hash)+" icon fas fa-times"})}),"Bình luận"]}),(0,t.jsxs)("div",{style:{flex:1,display:"flex",padding:"16px 10px",paddingBottom:64},className:"jsx-".concat(tz.__hash),children:[(0,t.jsx)(tf.f,{src:l.avatar,alt:l.name,profile:l.link,noScale:!0}),(0,t.jsx)(tv.f,{className:"reply-input",value:j,minRows:1,maxRows:4,placeholder:"Đăng trả lời của bạn",onChange:e=>g(e.target.value),autoFocus:!0})]}),(0,t.jsx)("button",{style:{opacity:v?.5:1,bottom:d?c:0},onClick:T,className:"jsx-".concat(tz.__hash)+" btn-submit-reply",children:"Gửi"})]}),(0,t.jsx)(a.default,{id:tz.__hash,children:tz})]}),(0,t.jsx)("div",{id:"comment-box"}),l&&(0,t.jsx)(tF,{onComment:k,user:l}),_.posts&&(0,t.jsxs)(s.Fragment,{children:[_.posts.map(e=>e.isIgnored?null:(0,t.jsx)(tK,{post:e,api:r,onReply:y,user:l},e.id)),(0,t.jsx)(tP.f,{dataLength:_.posts.length,next:N,loader:_.pagination.next?(0,t.jsx)("div",{className:"loader",children:"đang tải ..."},0):(0,t.jsx)("div",{}),hasMore:!0})]})]})}),tQ=d.f.ApiConsumer(e=>{let{thread:a,changeTheme:o}=e;return(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(k.f,{blackHeader:a&&a.isDeepTalkArticle,headerSpecialLogo:a&&a.isDeepTalkArticle&&"/static/images/deeptalk_logo_white.png",headerSpecialUrl:a&&a.isDeepTalkArticle&&"/deeptalk",headerSpecialTitle:a&&a.isDeepTalkArticle&&"Deeptalk - Bài hay Tinhte.vn",mobileCompactMode:a&&a.isDeepTalkArticle}),(0,t.jsx)(tJ,{thread:a,changeTheme:o}),(0,t.jsx)(w.f,{})]})});var t$=e.i(561696);let{SlotName:tZ,PageName:t0}=m.f;class t3 extends n.default.Component{selectDemoMasthead(e){this.setState({selectedDemoMasthead:e})}onAdsLoaded(e){let{currentAdsBlocks:t}=this.state;this.setState({currentAdsBlocks:[...t,e]})}changeTheme(){let{tinhteFactTheme:e}=this.state;this.setState({tinhteFactTheme:!e})}nextItem(){let{facts:e}=this.state,t=this.state.currentFact,a=e.findIndex(e=>e.id===t.id);if(a>-1)if(ae.id===t.id):-1,o=e.findIndex(e=>e.id===a.id);if(o>-1)if(o>0){let t=e[o-1];this.setState({currentFact:t})}else s<0&&this.setState({currentFact:this.props.response?this.props.response.thread:null})}render(){let{selectedDemoMasthead:e,isDemo:s,currentAdsBlocks:o,tinhteFactTheme:r,currentFact:d,facts:c}=this.state,{response:h,threadUrl:x,forums:p,currentPage:m,relatedThreads:v,relatedCommunities:k,event:w,router:N}=this.props,{thread:y,error:T}=h,C=r?c.findIndex(e=>e.id===d.id):-1,S=r?c.findIndex(e=>e.id===y.id):-1,{elements:P}=p,D=null,z=null;if(P)switch(P[0].category_id){case 70:D="UA-2120640-14",z="G-59VY7FE1K6";break;case 585:D="UA-2120640-22",z="G-LSM3JSMKPJ";break;case 737:D="UA-2120640-26",z="G-0V8FQWVGD9";break;default:D="UA-2120640-1",z="G-EHPF9BTE3E"}let R=[];if(y){let e="https://tinhte.vn";p&&p.elements&&p.elements.length>0&&(e=p.elements[0].links.permalink);try{var A;let t,a="Tác giả";y.author&&(a=y.author.name);let s={"@id":"https://tinhte.vn/#Organization","@type":"Organization",name:"Tinhte.vn",logo:{"@type":"ImageObject",url:"https://tinhte.vn/static/images/tinhte_logo_length_black.png",width:289,height:67}},o={"@type":"Person",name:a,url:"https://tinhte.vn/profile/".concat(y.author.id,"/")},i=y.posts.filter(e=>!e.isFirstPost),r=(A=e,t={"@context":"https://schema.org","@type":"DiscussionForumPosting",mainEntityOfPage:y.link,headline:y?y.title:"Tinh tế",image:{url:y.imageDetail.link||y.image,"@type":"ImageObject",width:y.imageDetail.width,height:y.imageDetail.height},url:y.link,datePublished:y?y.sinceDateDb:"",interactionStatistic:{"@type":"InteractionCounter",interactionType:"https://schema.org/LikeAction",userInteractionCount:y.stats.like},dateModified:y?y.updatedDateDb:"",author:o,publisher:s,genre:A,description:y?(0,t$.encode)(y.excerpt):"",comment:[]},i.forEach(e=>{if(!e.isFirstPost){let a={"@type":"Comment",datePublished:(0,l.default)(e.since,"X"),author:{"@type":"Person",name:e.author.name,url:"https://tinhte.vn/profile/".concat(e.author.name,".").concat(e.author.id,"/")},text:(0,t$.encode)(e.bodyPlain)};e.attachments.length>0&&(a.image=e.attachments[0].links.permalink),t.comment.push(a)}}),t);if(R=[{"@context":"https://schema.org","@type":"Organization",url:"https://www.tinhte.vn",logo:"https://photo2.tinhte.vn/data/attachment-files/2021/02/5358457_tinhte_logo.jpg"},{"@type":"WebPage","@context":"https://schema.org","@id":"".concat(y.link,"#WebPage"),url:y.link,inLanguage:["EN","VN"],name:y.title,datePublished:y?y.sinceDateDb:"",dateModified:y?y.updatedDateDb:"",publisher:s,description:y?(0,t$.encode)(y.excerpt):"",isPartOf:e,author:o,commentCount:y.stats.comment,wordCount:y.wordCount},r,{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:p&&p.elements&&p&&p.elements.length>0&&p.elements.map((e,t)=>({"@type":"ListItem",position:t+1,name:e.category_title||e.forum_title,item:e.links.permalink}))}],y&&y.stats&&y.stats.rating&&y.stats.rating.count>=5){let e={"@context":"https://schema.org","@type":"AggregateRating",ratingValue:y.stats.rating.total/y.stats.rating.count,ratingCount:y.stats.rating.count,itemReviewed:{"@type":"CreativeWorkSeries",name:y.title,image:y.imageDetail.link||y.image}};R.push(e)}if(y&&y.tagString&&(y.tagString.indexOf("thủ thuật")>-1||y.tagString.indexOf("hướng dẫn")>-1)){let e=y.tableOfContent&&y.tableOfContent.map((e,t)=>({"@type":"HowToStep",name:"Phần ".concat(t+1,":"),text:e.heading,url:"".concat(y.link,"#").concat(e.id)}))||[],t={"@context":"https://schema.org","@type":"HowTo",image:{"@type":"ImageObject",url:y.imageDetail.link||y.image},name:y.title,step:e};R.push(t)}if(w&&w.id){let e=(0,l.default)(w.time.start,"X"),t=(0,l.default)(w.time.end,"X"),a={"@context":"https://schema.org","@type":"Event",name:y.title,startDate:e,endDate:t,description:w.description,location:{"@type":"Place",name:w.location,address:{"@type":"PostalAddress",streetAddress:w.location}}};R.push(a)}if(y&&y.tagString&&(y.tagString.indexOf("hỏi đáp")>-1||y.tagString.indexOf("hỏi tinh tế")>-1)){let e=y.posts.sort((e,t)=>t.reaction.total-e.reaction.total).slice(1,3),t=y.posts.reduce((e,t)=>t.reaction.total>e.reaction.total?t:e,y.posts[0]),a={"@context":"https://schema.org","@type":"QAPage",mainEntity:{"@type":"Question",name:y.title,text:y.description,answerCount:y.stats.comment,acceptedAnswer:{"@type":"Answer",text:t?t.excerpt:"",upvoteCount:t?t.reaction.total:0,url:t?t.link:""},suggestedAnswer:e.map(e=>({"@type":"Answer",text:e?e.excerpt:"",upvoteCount:e?e.reaction.total:0,url:e?e.link:""}))}};R.push(a)}}catch(e){console.error(e)}}return(0,t.jsxs)(n.Fragment,{children:[y&&(0,t.jsxs)(i.f,{title:y?"".concat(y.title).concat(y.author&&!y.author.verified_badge?" | Viết bởi ".concat(y.author.name):""):"",description:y?y.excerpt:"",ogImageUrl:y?y.image||y.videoThumbnail:"",url:y?y.link:x,error:T,gaId:D,ga4Id:z,structuredSchema:R,wordCount:y?y.wordCount:null,author:y&&y.author?y.author.name:null,threadView:!0,noIndex:y&&y.tinhteseoNoindex,children:[(0,t.jsx)(f.f,{}),s&&(0,t.jsxs)("div",{className:"jsx-".concat(tS.__hash)+" masthead-selector-container",children:[(0,t.jsx)("span",{className:"jsx-".concat(tS.__hash),children:"Chọn kiểu masthead"}),(0,t.jsxs)("select",{type:"select",value:e,onChange:e=>this.selectDemoMasthead(e.target.value),className:"jsx-".concat(tS.__hash)+" masthead-selector",children:[(0,t.jsx)("option",{value:tZ.heroMasthead,className:"jsx-".concat(tS.__hash),children:"Hero Masthead"}),(0,t.jsx)("option",{value:tZ.desktopMasthead,className:"jsx-".concat(tS.__hash),children:"Desktop Masthead"})]})]}),s?(0,t.jsx)(n.Fragment,{children:(0,t.jsx)(b.f,{slotName:e,pageName:t0.homeDesktopWeb,doNotLazyLoad:!0,desktopOnly:!0,options:{thread:y}})}):(0,t.jsx)(n.Fragment,{children:y&&!y.isDeepTalkArticle&&(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(b.f,{slotName:tZ.heroMasthead,pageName:t0.homeDesktopWeb,doNotLazyLoad:!0,desktopOnly:!0,onAdsLoaded:e=>this.onAdsLoaded(e),options:{thread:y},fitSize:!0,threadView:!0}),(0,t.jsx)(b.f,{slotName:tZ.desktopMasthead,pageName:t0.homeDesktopWeb,doNotLazyLoad:!0,desktopOnly:!0,onAdsLoaded:e=>this.onAdsLoaded(e),options:{thread:y}})]})}),(0,t.jsx)(u.f,{pageDesktopName:t0.threadViewDesktopWeb,pageMobileName:t0.threadViewMobileWeb,extraData:y?{thread_id:y.id}:null,taPageName:_.f.ThreadView_Detail,taFromBlock:this.props.taFromBlock,taAttributes:y?[{key:"thread_id",value:y.id},{key:"page_number",value:m||1}]:null}),(0,t.jsx)(g.f,{pageName:_.f.ThreadView_Detail,threadId:y?y.id:null}),y.livestream&&y.livestream.end&&(0,t.jsx)(tC,{thread:y}),!y.livestream&&(0,t.jsx)(n.Fragment,{children:r?(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)("div",{className:"jsx-".concat(tS.__hash)+" visible-xs",children:(0,t.jsx)(tQ,{thread:y,changeTheme:this.changeTheme})}),(0,t.jsx)("div",{className:"jsx-".concat(tS.__hash)+" hidden-xs",children:(0,t.jsx)(j.f,{threadId:d.id,thread:d,page:m,changeTheme:this.changeTheme,nextItem:this.nextItem,previousItem:S<0&&0===C||C>0?this.previousItem:void 0,handleCloseModal:()=>{window.history.back()}})})]}):(0,t.jsx)(tl,{threadId:this.props.threadId,thread:y,currentAdsBlocks:o,forums:p,currentPage:m,relatedThreads:v,relatedCommunities:k,event:w})})]}),(0,t.jsx)(a.default,{id:tS.__hash,children:tS})]})}constructor(e){super(e);let{router:t}=this.props,a=!1;t&&t.asPath&&t.asPath.includes("ads-demo")&&(a=!0),this.state={selectedDemoMasthead:tZ.heroMasthead,tinhteFactTheme:this.props.response&&this.props.response.thread&&this.props.response.thread.isTinhteFact,isDemo:a,currentAdsBlocks:[],facts:this.props.facts||[],currentFact:this.props.response?this.props.response.thread:null},this.changeTheme=this.changeTheme.bind(this),this.nextItem=this.nextItem.bind(this),this.previousItem=this.previousItem.bind(this)}}t3.defaultProps={forums:{},response:{error:null,thread:null,theme:"DEFAULT"},event:{},relatedThreads:[],relatedCommunities:[]},t3.apiFetches={response:(e,t)=>{let{threadId:a,currentPage:s}=t;return{uri:"/posts",headers:{"Api-Post-Tree":1,"Api-Ignore-Log-View":"thread"},params:{thread_id:a,page:s,fields_include:"*,review_extra_data,thread.*,thread.bdContentList_promote_item,thread.tinhte_seo"},success:e=>{let t=e.thread||{};return t.posts=e.posts,t.pagination=e.links,{error:null,thread:(0,h.U)(t||{})}},error:e=>({error:(0,p.f)(e),thread:(0,h.U)({})})}},facts:()=>({uri:"/tinhte-facts",params:{page:1,limit:15,_bdImageApiThreadThumbnailWidth:"200",_bdImageApiThreadThumbnailHeight:"sw",fields_include:(0,h.X)("content.")},success:e=>{let t=(0,o.default)(e,"facts",[]).filter(e=>"thread"===e.content_type).filter(e=>null!==e.image&&""!==e.image).map(h.U);return t&&t.length>0?t:[]},error:()=>[]}),forums:(e,t)=>{let{threadId:a}=t;return{uri:"threads/".concat(a,"/navigation"),success:e=>e}},event:(e,t)=>{let{threadId:a}=t;return{uri:"/events",headers:{"Api-Post-Tree":1},success:e=>{let t={};return e&&e.events&&(t=e.events.find(e=>e.extra_data&&e.extra_data.thread&&e.extra_data.thread.thread_id&&e.extra_data.thread.thread_id.toString()===a.toString()),t=(0,x.f)(t)),t}}},relatedThreads:(e,t)=>{let{threadId:a}=t;return{uri:"/tags/related-threads",headers:{"Api-Post-Tree":1},params:{thread_id:a,limit:12},success:e=>{let t=(e=>{if(!e)return[];let t=Object.keys(e),a=Object.values(e),s=[];return t.map((e,t)=>(s.push(a[t]),null)),s})(e.related_threads);return(t=t.slice(0,4)).map(h.U)}}},relatedCommunities:(e,t)=>{let{threadId:a}=t;return{uri:"/feature-pages/by-thread",headers:{"Api-Post-Tree":1},params:{thread_id:a},success:e=>e.feature_pages}}};let t5=(0,c.withRouter)(d.f.ApiConsumer(t3)),t1=new String(".thread-view.jsx-f770f46d277d8e9d{background:var(--light-grey-background)}");t1.__hash="f770f46d277d8e9d";let t4=(0,r.f)(e=>{let{query:s,error:i}=e,r=(0,o.default)(s,"threadId",""),n=(0,o.default)(s,"threadUrl",""),d=(0,o.default)(s,"taFromBlock",""),c=1,l=(0,o.default)(s,"currentPage","");return l&&(c=parseInt(l.split("-").pop(),10)),(0,t.jsxs)("div",{className:"jsx-".concat(t1.__hash)+" thread-view",children:[(0,t.jsx)(t5,{threadId:r,threadUrl:"https://tinhte.vn/thread/".concat(n),currentPage:c,taFromBlock:d,error:i}),(0,t.jsx)(a.default,{id:t1.__hash,children:t1})]})});e.s(["default",0,t4],348132)}]);