(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[886328,(e,t,n)=>{n.__esModule=!0,n.default=void 0;var s,r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};s.get||s.set?Object.defineProperty(t,n,s):t[n]=e[n]}}return t.default=e,t}(e.r(191788)),i=e.r(730943),o=(s=e.r(684774))&&s.__esModule?s:{default:s};function a(){return(a=Object.assign||function(e){for(var t=1;ttypeof window&&e.r(986911),n.default=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={disconnectOnLeave:!1});class s extends r.Component{constructor(e){super(e),this.observer=null,this.node=null,this.state={inViewport:!1,enterCount:0,leaveCount:0},this.intersected=!1,this.handleIntersection=this.handleIntersection.bind(this),this.initIntersectionObserver=this.initIntersectionObserver.bind(this),this.setInnerRef=this.setInnerRef.bind(this),this.setRef=this.setRef.bind(this)}componentDidMount(){this.initIntersectionObserver(),this.startObserver(this.node,this.observer)}componentDidUpdate(e,t){!this.intersected&&!t.inViewport&&this.observer&&this.node&&(this.observer.unobserve(this.node),this.observer.observe(this.node))}initIntersectionObserver(){this.observer||(this.observer=new IntersectionObserver(this.handleIntersection,t))}componentWillUnmount(){this.stopObserver(this.node,this.observer)}startObserver(e,t){e&&t&&t.observe(e)}stopObserver(e,t){e&&t&&(t.unobserve(e),t.disconnect(),this.observer=null)}handleIntersection(e){let t=this.props,s=t.onEnterViewport,r=t.onLeaveViewport,i=e[0]||{},o=i.isIntersecting,a=i.intersectionRatio,c=void 0!==o?o:a>0;if(!this.intersected&&c){this.intersected=!0,s&&s(),this.setState({inViewport:c,enterCount:this.state.enterCount+1});return}this.intersected&&!c&&(this.intersected=!1,r&&r(),n.disconnectOnLeave&&this.observer&&this.observer.disconnect(),this.setState({inViewport:c,leaveCount:this.state.leaveCount+1}))}setRef(e){this.node=(0,i.findDOMNode)(e)}setInnerRef(e){e&&!this.node&&(this.node=e)}render(){let t=this.props,n=(t.onEnterViewport,t.onLeaveViewport,function(e,t){if(null==e)return{};var n,s,r={},i=Object.keys(e);for(s=0;s=0||(r[n]=e[n]);return r}(t,["onEnterViewport","onLeaveViewport"])),s=this.state,i=s.inViewport,o=s.enterCount,c=s.leaveCount,d="function"!=typeof e||e.prototype&&e.prototype.isReactComponent?{ref:this.setRef}:{innerRef:this.setInnerRef};return r.default.createElement(e,a({},n,{inViewport:i,enterCount:o,leaveCount:c},d))}}return(0,o.default)(s,e)}},684774,(e,t,n)=>{var s=e.r(767875),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return s.isMemo(e)?o:a[e.$$typeof]||r}a[s.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[s.Memo]=o;var d=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;t.exports=function e(t,n,s){if("string"!=typeof n){if(m){var r=p(n);r&&r!==m&&e(t,r,s)}var o=l(n);h&&(o=o.concat(h(n)));for(var a=c(t),f=c(n),b=0;b{var s="function"==typeof Symbol&&Symbol.for,r=s?Symbol.for("react.element"):60103,i=s?Symbol.for("react.portal"):60106,o=s?Symbol.for("react.fragment"):60107,a=s?Symbol.for("react.strict_mode"):60108,c=s?Symbol.for("react.profiler"):60114,d=s?Symbol.for("react.provider"):60109,l=s?Symbol.for("react.context"):60110,h=s?Symbol.for("react.async_mode"):60111,u=s?Symbol.for("react.concurrent_mode"):60111,p=s?Symbol.for("react.forward_ref"):60112,m=s?Symbol.for("react.suspense"):60113,f=s?Symbol.for("react.suspense_list"):60120,b=s?Symbol.for("react.memo"):60115,x=s?Symbol.for("react.lazy"):60116,g=s?Symbol.for("react.block"):60121,_=s?Symbol.for("react.fundamental"):60117,j=s?Symbol.for("react.responder"):60118,v=s?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case h:case u:case o:case c:case a:case m:return e;default:switch(e=e&&e.$$typeof){case l:case p:case x:case b:case d:return e;default:return t}}case i:return t}}}function w(e){return y(e)===u}n.AsyncMode=h,n.ConcurrentMode=u,n.ContextConsumer=l,n.ContextProvider=d,n.Element=r,n.ForwardRef=p,n.Fragment=o,n.Lazy=x,n.Memo=b,n.Portal=i,n.Profiler=c,n.StrictMode=a,n.Suspense=m,n.isAsyncMode=function(e){return w(e)||y(e)===h},n.isConcurrentMode=w,n.isContextConsumer=function(e){return y(e)===l},n.isContextProvider=function(e){return y(e)===d},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return y(e)===p},n.isFragment=function(e){return y(e)===o},n.isLazy=function(e){return y(e)===x},n.isMemo=function(e){return y(e)===b},n.isPortal=function(e){return y(e)===i},n.isProfiler=function(e){return y(e)===c},n.isStrictMode=function(e){return y(e)===a},n.isSuspense=function(e){return y(e)===m},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===c||e===a||e===m||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===x||e.$$typeof===b||e.$$typeof===d||e.$$typeof===l||e.$$typeof===p||e.$$typeof===_||e.$$typeof===j||e.$$typeof===v||e.$$typeof===g)},n.typeOf=y},767875,(e,t,n)=>{e.i(350461),t.exports=e.r(807705)},724383,959677,240692,e=>{var t=e.i(391398),n=e.i(145246),s=e.i(191788);e.i(966278);var r=e.i(318398),i=e.i(758568),o=e.i(368721),a=e.i(501584),c=e.i(604782),d=e.i(567166),l=e.i(363872),h=e.i(865780);let u=new String("");u.__hash="3a28fab2c71b5470";let p=r.f.ApiConsumer(({api:e,children:r,pageName:i,blockId:o})=>{let{TrackingUri:a}=d.f,[c,p]=(0,h.E)({threshold:0}),[m,f]=(0,s.useState)(!1),b=(t,n)=>{let{referrer:s}=window.document;t&&e.onAuthenticated(()=>{let r=l.isMobile?i.MOBILE:i.DESKTOP;e.post({uri:t,params:{block_id:o,page:r,referrer:s}}).then(()=>{"function"==typeof n&&n()}).catch(e=>console.log(e))})},x=()=>{b(a.CLICK)};return(0,s.useEffect)(()=>{p&&!m&&b(a.VIEW,()=>f(!0))},[p]),(0,s.useEffect)(()=>{b(a.IMPRESSION)},[]),(0,t.jsxs)("div",{ref:c,onClick:x,onKeyDown:x,className:`jsx-${u.__hash} ads-tracking-container`,children:[r,(0,t.jsx)(n.default,{id:u.__hash,children:u})]})});e.s(["f",0,p],959677);var m=e.i(750840);let f=new String(".image-loader.jsx-8a52d709136353ac{display:block;position:relative;overflow:hidden}.image-loader.jsx-8a52d709136353ac .spacer.jsx-8a52d709136353ac{background-color:var(--header-menu-button);padding-bottom:100%;display:block}.image-loader.jsx-8a52d709136353ac>img.jsx-8a52d709136353ac{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}");f.__hash="8a52d709136353ac";let b=({src:e,alt:s="Tinhte.vn",height:r="100%",radius:i=0})=>(0,t.jsxs)("span",{className:`jsx-${f.__hash} image-loader`,children:[(0,t.jsx)("span",{style:{paddingBottom:r,borderRadius:i},className:`jsx-${f.__hash} spacer`}),(0,t.jsx)("img",{src:e,alt:s,style:{borderRadius:i},className:`jsx-${f.__hash}`}),(0,t.jsx)(n.default,{id:f.__hash,children:f})]});e.s(["f",0,b],240692);let x=new String(".main.jsx-c472807b3f0303a9{border-radius:4px}.info-wrapper.jsx-c472807b3f0303a9{overflow:hidden}.title.jsx-c472807b3f0303a9{margin-top:4px;font-size:14px;font-weight:600}");x.__hash="c472807b3f0303a9";let g=({page:e,taFromBlock:s})=>{let r=s?`${e.link}?ta_from_block=${s}`:e.link;return(0,t.jsxs)("a",{href:(0,m.f)(r,"internal","TinhteHome_Pages"),className:`jsx-${x.__hash} main`,children:[(0,t.jsx)("div",{className:`jsx-${x.__hash} thumb-wrapper`,children:(0,t.jsx)(b,{src:e.thumb,alt:`Cộng đồng Tinhte - ${e.title}`,height:"56.25%",radius:"4px"})}),(0,t.jsx)("div",{className:`jsx-${x.__hash} info-wrapper`,children:(0,t.jsx)("p",{title:e.title,className:`jsx-${x.__hash} title`,children:e.title})}),(0,t.jsx)(n.default,{id:x.__hash,children:x})]})},_=new String(".main.jsx-692e3358c65ccb0a{background-color:var(--page-background);border:1px solid var(--primary-border);border-radius:8px;margin-bottom:16px;padding:16px;position:relative}.main.pinned.jsx-692e3358c65ccb0a{margin-bottom:16px}.item-container.jsx-692e3358c65ccb0a{flex-wrap:wrap;margin-left:-4px;margin-right:-4px;display:flex;overflow:auto}.item.jsx-692e3358c65ccb0a{flex:0 0 50%;padding:0 4px 8px;overflow:hidden}.button.jsx-692e3358c65ccb0a{width:100%;color:var(--primary-text);background-color:var(--secondary-button);text-align:center;border-radius:4px;padding:7px 16px;font-size:12px;font-weight:700;position:relative}");_.__hash="692e3358c65ccb0a";let{ContentSolutionSlot:j,PageName:v}=d.f,y=e=>{let{pagesToShow:r}=e.pages,{totalPages:i}=e.pages,{pinnedPages:o,taFromBlock:a}=e;return o&&o.length>0&&(r=r.filter(e=>o.some(t=>t.fpId!==e.fpId))),(0,t.jsxs)(s.Fragment,{children:[r&&r.length>0&&(0,t.jsxs)("div",{className:`jsx-${_.__hash} main`,children:[(0,t.jsx)("h3",{className:`jsx-${_.__hash} section-heading`,children:"Cộng đồng"}),(0,t.jsx)("div",{className:`jsx-${_.__hash} item-container`,children:r.slice(0,4).map(e=>(0,t.jsx)("div",{id:e.id,className:`jsx-${_.__hash} item`,children:e.isAds?(0,t.jsx)(p,{blockId:e.blockId,pageName:v.WEB_HOME,children:(0,t.jsx)(g,{page:e,taFromBlock:a})}):(0,t.jsx)(g,{page:e,taFromBlock:a})},e.id))}),(0,t.jsx)("button",{className:`jsx-${_.__hash} button`,children:(0,t.jsxs)("a",{href:"/community",className:`jsx-${_.__hash}`,children:["Xem tất cả (",i,")"]})})]}),(0,t.jsx)(n.default,{id:_.__hash,children:_})]})};y.defaultProps={pages:{pagesToShow:[],totalPages:0},pinnedPages:[]},y.apiFetches={pages:(e,{blocks:t})=>({uri:"feature-pages",params:{_bdImageApiFeaturePageThumbnailSize:"144",_bdImageApiFeaturePageThumbnailMode:"sw",order:"promoted",limit:6},success:e=>{let n=(0,i.default)(e,"pages",[]),s=j.SPONSORED_COMMUNITY.key;return t&&t.forEach(e=>{e.slot_name===s&&console.log({fullName:e.title,tagText:e.promote_target_id,links:{permalink:`https://tinhte.vn/${e.promote_target_id}/`,image:e.image_url,thumbnail:e.image_url},isAds:!0,blockId:e.block_id})}),{pagesToShow:n.map(c.f),totalPages:n.length}}})};let w=(0,a.f)(o.f.subscribe(r.f.ApiConsumer(y)),{errorMsg:"Lỗi tải danh sách cộng đồng"});e.s(["f",0,w],724383)},566709,e=>{e.s(["U",()=>F,"x",()=>M],566709);var t=e.i(391398),n=e.i(145246),s=e.i(191788),r=e.i(865780),i=e.i(94432),o=e.i(765986),a=e.i(94764);let c=new String(".fact-mobile-item-container.jsx-20b9e24a355410eb{scroll-snap-align:start;background-color:var(--thread-background);flex-direction:column;flex-shrink:0;height:80vh;display:flex;position:relative}@media (height<=700px){.fact-mobile-item-container.jsx-20b9e24a355410eb{height:85vh}}");c.__hash="20b9e24a355410eb";var d=e.i(230184),l=e.i(612683);let h=new String('.author.jsx-c4b46f47a3a89a11{justify-content:space-between;align-items:center;padding:8px 5px;display:flex}.avatar.jsx-c4b46f47a3a89a11{border:2px solid var(--border-light);border-radius:50%;width:40px;height:40px}.info.jsx-c4b46f47a3a89a11{flex-direction:column;flex:1;align-items:flex-start;margin-left:.5rem;display:flex}.author-name.jsx-c4b46f47a3a89a11{color:var(--color-accent-dark);font-size:16px;font-weight:700;line-height:20px}.thread-info.jsx-c4b46f47a3a89a11{color:var(--text-dark);font-size:14px;line-height:20px}.since.jsx-c4b46f47a3a89a11{color:var(--primary-text);margin-right:10px}.view.jsx-c4b46f47a3a89a11{color:var(--primary-text)}.view.jsx-c4b46f47a3a89a11 .icon.jsx-c4b46f47a3a89a11{color:var(--primary-text);margin-right:5px}.view.jsx-c4b46f47a3a89a11:before{content:"●";color:#f1f1f1;margin-right:10px;display:inline-block}');h.__hash="c4b46f47a3a89a11";var u=e.i(618646);let p=()=>{let{thread:e}=M();return(0,t.jsxs)("div",{className:`jsx-${h.__hash} author`,children:[(0,t.jsx)("a",{href:e.author.link,style:{display:"flex"},className:`jsx-${h.__hash}`,children:(0,t.jsx)("img",{src:e.author.avatar,alt:e.author.name,className:`jsx-${h.__hash} avatar`})}),(0,t.jsxs)("div",{className:`jsx-${h.__hash} info`,children:[(0,t.jsx)("a",{href:e.author.link,className:`jsx-${h.__hash} author-name`,children:e.author.name}),(0,t.jsxs)("div",{className:`jsx-${h.__hash} thread-info`,children:[(0,t.jsx)("span",{className:`jsx-${h.__hash} since`,children:(0,t.jsx)(d.f,{value:e.since})}),(0,t.jsxs)("span",{className:`jsx-${h.__hash} view`,children:[(0,t.jsx)("i",{className:`jsx-${h.__hash} icon fas fa-user-friends`}),(0,t.jsx)(l.f,{value:e.stats.view})," lượt xem"]})]})]}),(0,t.jsx)(u.f,{thread:e}),(0,t.jsx)(n.default,{id:h.__hash,children:h})]})};var m=e.i(693084),f=e.i(310717);let b=new String(".attachment-container.jsx-8c911dd2b20c3ac6{flex:1;position:relative}.attachment-container.jsx-8c911dd2b20c3ac6 .image-background.jsx-8c911dd2b20c3ac6{filter:blur(8px);z-index:1;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6{z-index:2;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .xfBodyContainer{color:var(--primary-text)}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .video-container{width:100%}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .fact-images,.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .fact-images .image-item{padding:6px}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .fact-images .image-item .image{border-radius:12px}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6{z-index:2;padding:6px;display:flex;position:absolute}.attachment-container.jsx-8c911dd2b20c3ac6 .image-container.jsx-8c911dd2b20c3ac6 .image.jsx-8c911dd2b20c3ac6{object-fit:contain;border-radius:12px;flex:1;min-height:0;max-height:100%;padding:6px;display:block}");b.__hash="8c911dd2b20c3ac6";var x=e.i(713955),g=e.i(158586);let _=({showHeader:e})=>{let{observerOptions:s,thread:r}=M(),i=r.firstPost?r.firstPost.attachments:[],o=!!r.firstPost&&r.firstPost.isThreadBackground,a=r.firstPost?r.firstPost.videoAttachment:null,{isEmbedVideo:c}=r,d=a?"":r.image||r.background.url||x.f.DEFAULT_IMAGE_BACKGROUND;return(0,t.jsxs)("div",{className:`jsx-${b.__hash} attachment-container`,children:[(0,t.jsx)("div",{style:{backgroundImage:`var(--background-fact-overlay), url(${d})`},className:`jsx-${b.__hash} image-background`}),(0,t.jsx)("div",{className:`jsx-${b.__hash} image-container`,children:0===i.length?c?(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},className:`jsx-${b.__hash}`,children:(0,t.jsx)("div",{style:{width:"100%",color:"white"},dangerouslySetInnerHTML:{__html:r.firstPost.bodyHtml},className:`jsx-${b.__hash}`})}):o||!a?(0,t.jsx)(f.f,{firstPost:{...r.firstPost,threadBackgroundUrl:d}}):(0,t.jsx)(m.f,{body:r.firstPost.bodyHtml,author:r.firstPost.author.name}):(0,t.jsx)(g.f,{thread:r,post:r.firstPost,horizontal:!0,showMore:!1,rootContainer:s.root,showHeader:e})}),(0,t.jsx)(n.default,{id:b.__hash,children:b})]})};e.i(966278);var j=e.i(318398);let v=new String(".content-container.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-wrapper.jsx-e039bdbde978cd1a{flex-direction:column;display:flex}.content-container.jsx-e039bdbde978cd1a .body-wrapper.jsx-e039bdbde978cd1a{word-break:break-word;-webkit-line-clamp:7;-webkit-box-orient:vertical;margin:8px 12px 0;display:-webkit-box;overflow:hidden}.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-1.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-2.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-3.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-4.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-5.jsx-e039bdbde978cd1a{-webkit-line-clamp:3}@media (height<=700px){.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-1.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-2.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-3.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-4.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .content-with-header.jsx-e039bdbde978cd1a .attachment-5.jsx-e039bdbde978cd1a{-webkit-line-clamp:2}}.content-container.jsx-e039bdbde978cd1a .attachment-5.jsx-e039bdbde978cd1a,.content-container.jsx-e039bdbde978cd1a .attachment-2.jsx-e039bdbde978cd1a{-webkit-line-clamp:3}.content-container.jsx-e039bdbde978cd1a .post-body.jsx-e039bdbde978cd1a{color:var(--primary-text);font-size:16px}.content-container.jsx-e039bdbde978cd1a .view-more.jsx-e039bdbde978cd1a{color:var(--color-accent-dark);align-self:flex-end;margin-right:12px;font-size:16px;font-style:italic;font-weight:700}");v.__hash="e039bdbde978cd1a";var y=e.i(770267),w=e.i(535044),I=e.i(867507);let k=new String(".ReactModal__Content{scrollbar-width:none}.ReactModal__Content::-webkit-scrollbar{display:none}.modal.jsx-b90756c9109a53ca{position:relative}.author{z-index:2;background-color:var(--thread-background);padding:8px 8px 8px 12px;position:fixed;top:0;left:0;right:0}.thread-body-container.jsx-b90756c9109a53ca{flex-direction:column;height:100vh;padding-top:56px;display:flex}.thread-body-container.jsx-b90756c9109a53ca .thread-body.jsx-b90756c9109a53ca{flex-direction:column;flex:1;justify-content:flex-end;padding:12px;display:flex;position:relative}.thread-body-container.jsx-b90756c9109a53ca .thread-body.jsx-b90756c9109a53ca .background-image.jsx-b90756c9109a53ca{opacity:.15;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:10px;position:absolute;inset:12px}.thread-body-container.jsx-b90756c9109a53ca .thread-body.jsx-b90756c9109a53ca .full-content.jsx-b90756c9109a53ca{color:var(--primary-text);padding:6px}.icon-close.jsx-b90756c9109a53ca{color:var(--primary-text);padding:5px 8px;font-size:18px}.comment-container.jsx-b90756c9109a53ca,.comment-box.jsx-b90756c9109a53ca{padding:0 12px}");k.__hash="b90756c9109a53ca";var $=e.i(618488),T=e.i(6788),R=e.i(298299);let O=new String(".thread-actions.jsx-86e7d6e37829e126{color:#bab9b9;flex-flow:wrap;justify-content:space-between;align-items:center;margin:8px 5px;padding:10px 5px;display:flex}.thread-actions.border.jsx-86e7d6e37829e126{border-top:1px solid var(--border-light-1);border-bottom:1px solid var(--border-light-1)}.thread-actions.jsx-86e7d6e37829e126 .thread-comment-count.jsx-86e7d6e37829e126{color:var(--color-accent-dark)}.thread-actions.jsx-86e7d6e37829e126 .reacted-text.jsx-86e7d6e37829e126{color:var(--primary-color);font-weight:700}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126{color:var(--primary-text);align-items:center;gap:4px;font-size:12px;line-height:20px;display:flex}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126 .reactions{width:unset;min-width:unset}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126 .reactions .icon{margin-right:0}.thread-actions.jsx-86e7d6e37829e126 .react-item.jsx-86e7d6e37829e126 .reactions .reaction-text{display:none}");O.__hash="86e7d6e37829e126";let P=()=>{let{thread:e,firstPost:r,onReact:o,commentCount:a}=M();return(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)("div",{className:`jsx-${O.__hash} thread-actions border`,children:[i.q.map(e=>{let n=r&&r.reaction&&r.reaction.userReactionId===e,s=r&&r.reaction&&r.reaction.postReactions[e]||0;return(0,t.jsxs)("div",{className:`jsx-${O.__hash} react-item`,children:[(0,t.jsx)($.f,{commentMode:!1,post:r,onReact:o,reactionButtonId:e}),(0,t.jsx)("span",{className:`jsx-${O.__hash} ${n?"reacted-text":""}`,children:s})]},`${e}`)}),(0,t.jsxs)("a",{href:`${e.link.replace("https://tinhte.vn","")}#comment-box`,className:`jsx-${O.__hash} react-item`,children:[(0,t.jsx)(T.f,{}),(0,t.jsx)("span",{className:`jsx-${O.__hash}`,children:a})]}),(0,t.jsx)("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${e.link}`,rel:"noopener noreferrer",target:"_blank",className:`jsx-${O.__hash} react-item`,children:(0,t.jsx)(R.f,{})})]}),(0,t.jsx)(n.default,{id:O.__hash,children:O})]})},N={content:{width:"100%",top:"0",left:"0",height:"100%",right:"auto",bottom:"auto",borderRadius:"0px",marginRight:"0",padding:"0px",border:"none",backgroundColor:"var(--thread-background)"},overlay:{zIndex:999}},E=j.f.ApiConsumer(({onModalClose:e,isShow:r,api:i})=>{let{thread:o,posts:a,addPost:c,scrollToId:d,setScrollToId:l}=M(),h=(0,s.useCallback)(()=>(0,t.jsxs)("div",{onClick:e,className:`jsx-${k.__hash}`,children:[(0,t.jsx)("i",{className:`jsx-${k.__hash} icon-close fas fa-times`}),(0,t.jsx)(n.default,{id:k.__hash,children:k})]}),[]);return(0,s.useEffect)(()=>{let e=setTimeout(()=>{if(r&&d&&"u">typeof document){let e=document.getElementById(d);e&&e.scrollIntoView({block:"start",behavior:"smooth"}),l(null)}},500);return()=>{clearTimeout(e)}},[d,r]),(0,t.jsxs)("div",{className:`jsx-${k.__hash} modal`,children:[(0,t.jsxs)(y.default,{isOpen:r,onRequestClose:e,style:N,shouldCloseOnOverlayClick:!0,children:[(0,t.jsx)(p,{thread:o,renderRight:h}),(0,t.jsxs)("div",{className:`jsx-${k.__hash} thread-body-container`,children:[(0,t.jsxs)("div",{className:`jsx-${k.__hash} thread-body`,children:[(0,t.jsx)("div",{style:{backgroundImage:`url(${o.firstPost.videoAttachment?"":o.image||o.background.url||x.f.DEFAULT_IMAGE_BACKGROUND})`},className:`jsx-${k.__hash} background-image`}),(0,t.jsx)("div",{className:`jsx-${k.__hash} full-content`,children:(0,t.jsx)(m.f,{body:o.firstPost.bodyHtml,author:o.firstPost.author.name})})]}),(0,t.jsx)(P,{})]}),(0,t.jsx)("div",{id:"comment",className:`jsx-${k.__hash} comment-container`,children:(0,t.jsx)(w.f,{enterToSubmit:!0,posts:a,tinhteFact:!0})}),(0,t.jsx)("div",{id:"commentBox01",className:`jsx-${k.__hash} comment-box`,children:(0,t.jsx)(I.f,{api:i,postToReply:o.firstPost,enterToSubmit:!0,addPost:c,position:"bottom"})})]}),(0,t.jsx)(n.default,{id:k.__hash,children:k})]})}),C=j.f.ApiConsumer(({showHeader:e})=>{let{thread:r,showFullBody:i,setShowFullBody:o}=M(),{isEmbedVideo:a}=r,c=(0,s.useRef)(null),[d,l]=(0,s.useState)(!1),h=(0,s.useMemo)(()=>r.firstPost?r.firstPost.attachments:[],[]),u=(0,s.useMemo)(()=>!!r.firstPost&&r.firstPost.isThreadBackground,[]),p=(0,s.useMemo)(()=>{if(!r.firstPost||!r.firstPost.videoAttachment)return!1;let{videoAttachment:e}=r.firstPost;return e.video_ratio<1},[]);(0,s.useEffect)(()=>{let e=c.current;e&&l(e.scrollHeight>e.clientHeight+1)},[]);let m=(0,s.useCallback)(()=>{o(e=>!e)},[]);return r.firstPost&&r.firstPost.bodyPlain?(0,t.jsxs)("div",{className:`jsx-${v.__hash} content-container`,children:[h.length>0&&!u&&!a&&(0,t.jsxs)("a",{href:r.link.replace("https://tinhte.vn",""),className:`jsx-${v.__hash} content-wrapper ${e?"content-with-header":""}`,children:[(0,t.jsx)("div",{ref:c,className:`jsx-${v.__hash} body-wrapper attachment-${p?5:h.slice(0,5).length}`,children:(0,t.jsx)("span",{className:`jsx-${v.__hash} post-body`,children:r.firstPost&&r.firstPost.bodyPlain})}),d&&(0,t.jsx)("span",{className:`jsx-${v.__hash} view-more`,children:"...Xem thêm"})]}),(0,t.jsx)(P,{}),i&&(0,t.jsx)(E,{isShow:i,onModalClose:m}),(0,t.jsx)(n.default,{id:v.__hash,children:v})]}):(0,t.jsxs)("div",{className:`jsx-${v.__hash} content-container`,children:[(0,t.jsx)(P,{}),(0,t.jsx)(n.default,{id:v.__hash,children:v})]})}),S=(0,s.createContext)({});function M(){return(0,s.useContext)(S)}let F=({thread:e,observerOptions:d,onInView:l,showHeader:h,onNewThread:u})=>{let[m,f]=(0,s.useState)(e.firstPost?e.firstPost.reaction.total:0),[b,x]=(0,s.useState)(e.firstPost),[g,j]=(0,s.useState)(e.stats.comment),[v,y]=(0,s.useState)(!1),[w,I]=(0,s.useState)(null),[k,$]=(0,s.useState)([]),T=(0,s.useRef)(null),[R,O]=(0,r.E)({threshold:.5,...d}),P=(0,s.useCallback)(()=>{y(!0),I("commentBox01")},[]),N=(0,s.useCallback)(()=>{y(!0),I("comment")},[]),E=(0,s.useCallback)((e,t)=>{"top"===t?$(t=>[e,...t]):"bottom"===t&&$(t=>[...t,e]),j(e=>e+1)},[]),M=(0,s.useCallback)((e,t,n)=>{let s=m;e===i.U.Up&&(s+=1,b.reaction.postReactions[t]=b.reaction.postReactions[t]+1,b.reaction.userReactionId=t),e===i.U.Down&&(s-=1,b.reaction.postReactions[n]=b.reaction.postReactions[n]-1,b.reaction.userReactionId=null),e===i.U.Neutral&&(b.reaction.postReactions[n]=b.reaction.postReactions[n]-1,b.reaction.postReactions[t]=b.reaction.postReactions[t]+1,b.reaction.userReactionId=t),x({...b}),f(s)},[m,b]);return(0,s.useEffect)(()=>(O&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{l(e)},200)),()=>{T.current&&clearTimeout(T.current)}),[O,e]),(0,t.jsx)(S.Provider,{value:{thread:e,observerOptions:d,posts:k,firstPost:b,totalReaction:m,commentCount:g,showFullBody:v,scrollToId:w,setPosts:$,onReact:M,addPost:E,setShowFullBody:y,onCommentClick:P,setScrollToId:I,onCommentCountClick:N},children:(0,t.jsxs)("div",{id:e.id,ref:R,className:`jsx-${c.__hash} fact-mobile-item-container`,children:[h&&(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(o.f,{}),(0,t.jsx)("div",{style:{padding:"5px 8px"},className:`jsx-${c.__hash}`,children:(0,t.jsx)(a.f,{createTinhteFact:!0,miniMode:!0,inlineMode:!0,newThread:u,titleTTF:!0})})]}),(0,t.jsx)(p,{}),(0,t.jsx)(_,{showHeader:h}),(0,t.jsx)(C,{showHeader:h}),(0,t.jsx)(n.default,{id:c.__hash,children:c})]})})}},604782,e=>{var t=e.i(33989);let n={fullName:"Không tìm thấy",fpId:null,tagId:null,tagText:"",forumId:null,links:{permalink:"",image:""},values:{"7_days_thread_count":0,follower_count:0,tag_use_count:0,news_count:0},is_followed:!1,permissions:{follow:!0,manage_cover:!1,update_widgets:!1,update_post_info:!1},config:{commentForumID:null,infoPostID:null,resourceID:null,homeTab:"discussion",tabLabels:{info:"Hướng dẫn",news:"Mẹo & Tin",discussion:"Thảo luận"},widgets:[],bannerLink:""},assets:{og:"https://photo2.tinhte.vn/data/attachment-files/2020/07/5075745_OG_newHome_2020_2.jpg",banner:null,bannerMb:null},isAds:!1,blockId:null};e.s(["f",0,(e,s)=>{let r=(0,t.default)(e,n),i=r.links.permalink.match(/\/([\w-]+)\/$/);return{id:i&&i.length>=2?i[1]:-1*s,isAds:r.isAds,blockId:r.blockId,title:r.fullName,image:r.links.image,thumb:r.links.thumbnail||r.links.image,isFollowed:r.is_followed,permission:{canFollow:r.permissions.follow,manageCover:r.permissions.manage_cover,updateWidgets:r.permissions.update_widgets,updatePostInfo:r.permissions.update_post_info},stats:{thread7d:r.values["7_days_thread_count"],followersCount:r.values.follower_count,tagUsedCount:r.values.tag_use_count,newsCount:r.values.news_count},fpId:r.fpId,tagId:r.tagId,tagText:r.tagText,link:r.links.permalink,tinhteDashboards:r.links.tinhte_dashboards||"",config:{commentForumID:r.config.commentForumID,infoPostID:r.config.infoPostID,resourceID:r.config.resourceID,homeTab:r.config.homeTab,tabLabels:{info:r.config.tabLabels.info,news:r.config.tabLabels.news,discussion:r.config.tabLabels.discussion},widgets:r.config.widgets,bannerLink:r.config.bannerLink},assets:{og:r.assets.og,banner:r.assets.banner,bannerMb:r.assets.bannerMb},secondaryTags:r.secondaryTags}}])},750840,e=>{e.s(["f",0,(e,t,n,s,r)=>{if(!e)return null;let i=e;return i=e.includes("?")?`${e}&utm_source=${t}&utm_medium=${n}`:`${e}?utm_source=${t}&utm_medium=${n}`,s&&(i=`${i}&utm_content=${s}`),r&&(i=`${i}&utm_campaign=${r}`),i=e}])}],986911,(e,t,n)=>{!function(e,t){"use strict";if("IntersectionObserver"in e&&"IntersectionObserverEntry"in e&&"intersectionRatio"in e.IntersectionObserverEntry.prototype){"isIntersecting"in e.IntersectionObserverEntry.prototype||Object.defineProperty(e.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var n=[];function s(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||c(),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,s=this.intersectionRect,r=s.width*s.height;n?this.intersectionRatio=Number((r/n).toFixed(4)):this.intersectionRatio=+!!this.isIntersecting}function r(e,t){var n,s,r,i=t||{};if("function"!=typeof e)throw Error("callback must be a function");if(i.root&&1!=i.root.nodeType)throw Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),s=this.THROTTLE_TIMEOUT,r=null,function(){r||(r=setTimeout(function(){n(),r=null},s))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function i(e,t,n,s){"function"==typeof e.addEventListener?e.addEventListener(t,n,s||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function o(e,t,n,s){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,s||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function a(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):c()}function c(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e,t){for(var n=t;n;){if(n==e)return!0;n=l(n)}return!1}function l(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t}r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!(e&&1==e.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},r.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},r.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},r.prototype._monitorIntersections=function(){!this._monitoringIntersections&&(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(i(e,"resize",this._checkForIntersections,!0),i(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in e&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,o(e,"resize",this._checkForIntersections,!0),o(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),n=t?this._getRootRect():c();this._observationTargets.forEach(function(r){var i=r.element,o=a(i),c=this._rootContainsTarget(i),d=r.entry,l=t&&c&&this._computeTargetAndRootIntersection(i,n),h=r.entry=new s({time:e.performance&&performance.now&&performance.now(),target:i,boundingClientRect:o,rootBounds:n,intersectionRect:l});d?t&&c?this._hasCrossedThreshold(d,h)&&this._queuedEntries.push(h):d&&d.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(n,s){if("none"!=e.getComputedStyle(n).display){for(var r=a(n),i=l(n),o=!1;!o;){var c=null,d=1==i.nodeType?e.getComputedStyle(i):{};if("none"==d.display)return;if(i==this.root||i==t?(o=!0,c=s):i!=t.body&&i!=t.documentElement&&"visible"!=d.overflow&&(c=a(i)),c&&!(r=function(e,t){var n=Math.max(e.top,t.top),s=Math.min(e.bottom,t.bottom),r=Math.max(e.left,t.left),i=Math.min(e.right,t.right),o=i-r,a=s-n;return o>=0&&a>=0&&{top:n,bottom:s,left:r,right:i,width:o,height:a}}(c,r)))break;i=l(i)}return r}},r.prototype._getRootRect=function(){var e;if(this.root)e=a(this.root);else{var n=t.documentElement,s=t.body;e={top:0,left:0,right:n.clientWidth||s.clientWidth,width:n.clientWidth||s.clientWidth,bottom:n.clientHeight||s.clientHeight,height:n.clientHeight||s.clientHeight}}return this._expandRectByRootMargin(e)},r.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,s=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==s)for(var r=0;rn.indexOf(this)&&n.push(this)},r.prototype._unregisterInstance=function(){var e=n.indexOf(this);-1!=e&&n.splice(e,1)},e.IntersectionObserver=r,e.IntersectionObserverEntry=s}(window,document)}]);