Files
create-better-t-stack/apps/web/.open-next/assets/_next/static/chunks/125-f3e9471f280f4da9.js
2025-07-13 14:09:49 +05:30

1 line
37 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[125],{5616:e=>{e.exports={root:"tweet-info-created-at_root__Obj_h"}},7798:e=>{e.exports={verified:"icons_verified__CfY5Y"}},9091:e=>{e.exports={root:"tweet-body_root__NEuOx"}},9215:e=>{e.exports={root:"quoted-tweet-body_root__LYupi"}},15597:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},16239:(e,t,r)=>{"use strict";var a=r(7620),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=a.useState,s=a.useEffect,l=a.useLayoutEffect,o=a.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),a=i({inst:{value:r,getSnapshot:t}}),n=a[0].inst,d=a[1];return l(function(){n.value=r,n.getSnapshot=t,c(n)&&d({inst:n})},[e,r,t]),s(function(){return c(n)&&d({inst:n}),e(function(){c(n)&&d({inst:n})})},[e]),o(r),r};t.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:d},24414:e=>{e.exports={header:"quoted-tweet-header_header__6tK8Q",avatar:"quoted-tweet-header_avatar__klvRR",avatarSquare:"quoted-tweet-header_avatarSquare___UVXG",author:"quoted-tweet-header_author__AHSzv",authorText:"quoted-tweet-header_authorText__2Majx",username:"quoted-tweet-header_username__A9gFU"}},25433:e=>{e.exports={verifiedOld:"verified-badge_verifiedOld__mErH8",verifiedBlue:"verified-badge_verifiedBlue__fbSq6",verifiedGovernment:"verified-badge_verifiedGovernment__BHT3z"}},28855:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},33986:(e,t,r)=>{"use strict";r.d(t,{N:()=>v});var a=r(54568),n=r(7620),i=r(17938),s=r(43406),l=r(4239),o=r(81460),c=r(37936),d=r(10821);class u extends n.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,r=(0,c.s)(e)&&e.offsetWidth||0,a=this.props.sizeRef.current;a.height=t.offsetHeight||0,a.width=t.offsetWidth||0,a.top=t.offsetTop,a.left=t.offsetLeft,a.right=r-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}}function h(e){let{children:t,isPresent:r,anchorX:i,root:s}=e,l=(0,n.useId)(),o=(0,n.useRef)(null),c=(0,n.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:h}=(0,n.useContext)(d.Q);return(0,n.useInsertionEffect)(()=>{let{width:e,height:t,top:a,left:n,right:d}=c.current;if(r||!o.current||!e||!t)return;o.current.dataset.motionPopId=l;let u=document.createElement("style");h&&(u.nonce=h);let _=null!=s?s:document.head;return _.appendChild(u),u.sheet&&u.sheet.insertRule('\n [data-motion-pop-id="'.concat(l,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;\n ").concat("left"===i?"left: ".concat(n):"right: ".concat(d),"px !important;\n top: ").concat(a,"px !important;\n }\n ")),()=>{_.removeChild(u),_.contains(u)&&_.removeChild(u)}},[r]),(0,a.jsx)(u,{isPresent:r,childRef:o,sizeRef:c,children:n.cloneElement(t,{ref:o})})}let _=e=>{let{children:t,initial:r,isPresent:i,onExitComplete:l,custom:c,presenceAffectsLayout:d,mode:u,anchorX:_,root:f}=e,m=(0,s.M)(p),x=(0,n.useId)(),v=!0,w=(0,n.useMemo)(()=>(v=!1,{id:x,initial:r,isPresent:i,custom:c,onExitComplete:e=>{for(let t of(m.set(e,!0),m.values()))if(!t)return;l&&l()},register:e=>(m.set(e,!1),()=>m.delete(e))}),[i,m,l]);return d&&v&&(w={...w}),(0,n.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[i]),n.useEffect(()=>{i||m.size||!l||l()},[i]),"popLayout"===u&&(t=(0,a.jsx)(h,{isPresent:i,anchorX:_,root:f,children:t})),(0,a.jsx)(o.t.Provider,{value:w,children:t})};function p(){return new Map}var f=r(56643);let m=e=>e.key||"";function x(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}let v=e=>{let{children:t,custom:r,initial:o=!0,onExitComplete:c,presenceAffectsLayout:d=!0,mode:u="sync",propagate:h=!1,anchorX:p="left",root:v}=e,[w,g]=(0,f.xQ)(h),y=(0,n.useMemo)(()=>x(t),[t]),j=h&&!w?[]:y.map(m),b=(0,n.useRef)(!0),k=(0,n.useRef)(y),N=(0,s.M)(()=>new Map),[S,T]=(0,n.useState)(y),[L,O]=(0,n.useState)(y);(0,l.E)(()=>{b.current=!1,k.current=y;for(let e=0;e<L.length;e++){let t=m(L[e]);j.includes(t)?N.delete(t):!0!==N.get(t)&&N.set(t,!1)}},[L,j.length,j.join("-")]);let I=[];if(y!==S){let e=[...y];for(let t=0;t<L.length;t++){let r=L[t],a=m(r);j.includes(a)||(e.splice(t,0,r),I.push(r))}return"wait"===u&&I.length&&(e=I),O(x(e)),T(y),null}let{forceRender:R}=(0,n.useContext)(i.L);return(0,a.jsx)(a.Fragment,{children:L.map(e=>{let t=m(e),n=(!h||!!w)&&(y===L||j.includes(t));return(0,a.jsx)(_,{isPresent:n,initial:(!b.current||!!o)&&void 0,custom:r,presenceAffectsLayout:d,mode:u,root:v,onExitComplete:n?void 0:()=>{if(!N.has(t))return;N.set(t,!0);let e=!0;N.forEach(t=>{t||(e=!1)}),e&&(null==R||R(),O(k.current),h&&(null==g||g()),c&&c())},anchorX:p,children:e},t)})})}},35589:e=>{e.exports={root:"tweet-in-reply-to_root__YQ5z4"}},36143:e=>{e.exports={root:"tweet-link_root__AKuKj"}},37268:e=>{e.exports={root:"tweet-skeleton_root__y4yAT"}},38831:e=>{e.exports={info:"tweet-info_info__AiKtR",infoLink:"tweet-info_infoLink__Ty7pE",infoIcon:"tweet-info_infoIcon__qNVaY"}},41398:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},42739:e=>{e.exports={anchor:"tweet-media-video_anchor__CXDym",videoButton:"tweet-media-video_videoButton__sSBO6",videoButtonIcon:"tweet-media-video_videoButtonIcon__rZkry",watchOnTwitter:"tweet-media-video_watchOnTwitter__Zz50f",viewReplies:"tweet-media-video_viewReplies__U9br6"}},43404:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},43808:e=>{e.exports={skeleton:"skeleton_skeleton__u0Z23",loading:"skeleton_loading__NOfnf"}},46682:e=>{e.exports={header:"tweet-header_header__ZbZwA",avatar:"tweet-header_avatar__NGTFf",avatarOverflow:"tweet-header_avatarOverflow__qr0Z2",avatarSquare:"tweet-header_avatarSquare__ttGex",avatarShadow:"tweet-header_avatarShadow__9oGQr",author:"tweet-header_author__vXsch",authorLink:"tweet-header_authorLink__khFUU",authorVerified:"tweet-header_authorVerified__IKR_y",authorLinkText:"tweet-header_authorLinkText__m3aeF",authorMeta:"tweet-header_authorMeta__DOwN4",authorFollow:"tweet-header_authorFollow__dExbC",username:"tweet-header_username__xqA4f",follow:"tweet-header_follow__L7l42",separator:"tweet-header_separator__NII5G",brand:"tweet-header_brand__5tdnX",twitterIcon:"tweet-header_twitterIcon__IFEPu"}},46846:e=>{e.exports={actions:"tweet-actions_actions__NR2hO",like:"tweet-actions_like__DgC87",reply:"tweet-actions_reply__5f0Na",copy:"tweet-actions_copy__RSkHw",likeIconWrapper:"tweet-actions_likeIconWrapper__t8GHU",likeCount:"tweet-actions_likeCount__h03yG",replyIconWrapper:"tweet-actions_replyIconWrapper__ZbPqU",copyIconWrapper:"tweet-actions_copyIconWrapper__9_YfP",likeIcon:"tweet-actions_likeIcon__HxQ4b",replyIcon:"tweet-actions_replyIcon__ouTrj",copyIcon:"tweet-actions_copyIcon__yZJU7",replyText:"tweet-actions_replyText__HHqRG",copyText:"tweet-actions_copyText__TCfoP"}},49355:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},49788:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},52997:e=>{e.exports={root:"quoted-tweet-container_root__i3qme",article:"quoted-tweet-container_article__d6Fju"}},63393:e=>{e.exports={replies:"tweet-replies_replies__1DEIU",link:"tweet-replies_link__bBB0L",text:"tweet-replies_text__Ap4WV"}},63499:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]])},66190:()=>{},69115:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},70406:e=>{e.exports={root:"tweet-container_root__wzLwj",article:"tweet-container_article__jIFmm"}},78040:(e,t,r)=>{"use strict";e.exports=r(16239)},83870:(e,t,r)=>{"use strict";let a;r.d(t,{Y:()=>th});var n=r(54568),i=r(5435),s=r(70406);r(66190);let l=({className:e,children:t})=>(0,n.jsx)("div",{className:(0,i.A)("react-tweet-theme",s.root,e),children:(0,n.jsx)("article",{className:s.article,children:t})});var o=r(43808);let c=({style:e})=>(0,n.jsx)("span",{className:o.skeleton,style:e});var d=r(37268);let u=()=>(0,n.jsxs)(l,{className:d.root,children:[(0,n.jsx)(c,{style:{height:"3rem",marginBottom:"0.75rem"}}),(0,n.jsx)(c,{style:{height:"6rem",margin:"0.5rem 0"}}),(0,n.jsx)("div",{style:{borderTop:"var(--tweet-border)",margin:"0.5rem 0"}}),(0,n.jsx)(c,{style:{height:"2rem"}}),(0,n.jsx)(c,{style:{height:"2rem",borderRadius:"9999px",marginTop:"0.5rem"}})]});var h=r(84085);let _=e=>(0,n.jsx)(l,{children:(0,n.jsxs)("div",{className:h.root,children:[(0,n.jsx)("h3",{children:"Tweet not found"}),(0,n.jsx)("p",{children:"The embedded tweet could not be found…"})]})}),p=e=>(0,n.jsx)("img",{...e});var f=r(46682),m=r(7798);let x=()=>(0,n.jsx)("svg",{viewBox:"0 0 24 24","aria-label":"Verified account",role:"img",className:m.verified,children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.33 2.19c-1.4-.46-2.91-.2-3.92.81s-1.26 2.52-.8 3.91c-1.31.67-2.2 1.91-2.2 3.34s.89 2.67 2.2 3.34c-.46 1.39-.21 2.9.8 3.91s2.52 1.26 3.91.81c.67 1.31 1.91 2.19 3.34 2.19s2.68-.88 3.34-2.19c1.39.45 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z"})})}),v=()=>(0,n.jsx)("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img",className:m.verified,children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M12.05 2.056c-.568-.608-1.532-.608-2.1 0l-1.393 1.49c-.284.303-.685.47-1.1.455L5.42 3.932c-.832-.028-1.514.654-1.486 1.486l.069 2.039c.014.415-.152.816-.456 1.1l-1.49 1.392c-.608.568-.608 1.533 0 2.101l1.49 1.393c.304.284.47.684.456 1.1l-.07 2.038c-.027.832.655 1.514 1.487 1.486l2.038-.069c.415-.014.816.152 1.1.455l1.392 1.49c.569.609 1.533.609 2.102 0l1.393-1.49c.283-.303.684-.47 1.099-.455l2.038.069c.832.028 1.515-.654 1.486-1.486L18 14.542c-.015-.415.152-.815.455-1.099l1.49-1.393c.608-.568.608-1.533 0-2.101l-1.49-1.393c-.303-.283-.47-.684-.455-1.1l.068-2.038c.029-.832-.654-1.514-1.486-1.486l-2.038.07c-.415.013-.816-.153-1.1-.456zm-5.817 9.367l3.429 3.428 5.683-6.206-1.347-1.247-4.4 4.795-2.072-2.072z",fillRule:"evenodd"})})}),w=()=>(0,n.jsx)("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img",className:m.verified,children:(0,n.jsxs)("g",{children:[(0,n.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"0-a",x1:"4.411",x2:"18.083",y1:"2.495",y2:"21.508",children:[(0,n.jsx)("stop",{offset:"0",stopColor:"#f4e72a"}),(0,n.jsx)("stop",{offset:".539",stopColor:"#cd8105"}),(0,n.jsx)("stop",{offset:".68",stopColor:"#cb7b00"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#f4ec26"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#f4e72a"})]}),(0,n.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"0-b",x1:"5.355",x2:"16.361",y1:"3.395",y2:"19.133",children:[(0,n.jsx)("stop",{offset:"0",stopColor:"#f9e87f"}),(0,n.jsx)("stop",{offset:".406",stopColor:"#e2b719"}),(0,n.jsx)("stop",{offset:".989",stopColor:"#e2b719"})]}),(0,n.jsxs)("g",{clipRule:"evenodd",fillRule:"evenodd",children:[(0,n.jsx)("path",{d:"M13.324 3.848L11 1.6 8.676 3.848l-3.201-.453-.559 3.184L2.06 8.095 3.48 11l-1.42 2.904 2.856 1.516.559 3.184 3.201-.452L11 20.4l2.324-2.248 3.201.452.559-3.184 2.856-1.516L18.52 11l1.42-2.905-2.856-1.516-.559-3.184zm-7.09 7.575l3.428 3.428 5.683-6.206-1.347-1.247-4.4 4.795-2.072-2.072z",fill:"url(#0-a)"}),(0,n.jsx)("path",{d:"M13.101 4.533L11 2.5 8.899 4.533l-2.895-.41-.505 2.88-2.583 1.37L4.2 11l-1.284 2.627 2.583 1.37.505 2.88 2.895-.41L11 19.5l2.101-2.033 2.895.41.505-2.88 2.583-1.37L17.8 11l1.284-2.627-2.583-1.37-.505-2.88zm-6.868 6.89l3.429 3.428 5.683-6.206-1.347-1.247-4.4 4.795-2.072-2.072z",fill:"url(#0-b)"}),(0,n.jsx)("path",{d:"M6.233 11.423l3.429 3.428 5.65-6.17.038-.033-.005 1.398-5.683 6.206-3.429-3.429-.003-1.405.005.003z",fill:"#d18800"})]})]})});var g=r(25433);let y=({user:e,className:t})=>{let r=e.verified||e.is_blue_verified||e.verified_type,a=(0,n.jsx)(x,{}),s=g.verifiedBlue;if(r)switch(!e.is_blue_verified&&(s=g.verifiedOld),e.verified_type){case"Government":a=(0,n.jsx)(v,{}),s=g.verifiedGovernment;break;case"Business":a=(0,n.jsx)(w,{}),s=null}return r?(0,n.jsx)("div",{className:(0,i.A)(t,s),children:a}):null},j=({tweet:e,components:t})=>{var r;let a=null!=(r=null==t?void 0:t.AvatarImg)?r:p,{user:s}=e;return(0,n.jsxs)("div",{className:f.header,children:[(0,n.jsxs)("a",{href:e.url,className:f.avatar,target:"_blank",rel:"noopener noreferrer",children:[(0,n.jsx)("div",{className:(0,i.A)(f.avatarOverflow,"Square"===s.profile_image_shape&&f.avatarSquare),children:(0,n.jsx)(a,{src:s.profile_image_url_https,alt:s.name,width:48,height:48})}),(0,n.jsx)("div",{className:f.avatarOverflow,children:(0,n.jsx)("div",{className:f.avatarShadow})})]}),(0,n.jsxs)("div",{className:f.author,children:[(0,n.jsxs)("a",{href:e.url,className:f.authorLink,target:"_blank",rel:"noopener noreferrer",children:[(0,n.jsx)("div",{className:f.authorLinkText,children:(0,n.jsx)("span",{title:s.name,children:s.name})}),(0,n.jsx)(y,{user:s,className:f.authorVerified})]}),(0,n.jsxs)("div",{className:f.authorMeta,children:[(0,n.jsx)("a",{href:e.url,className:f.username,target:"_blank",rel:"noopener noreferrer",children:(0,n.jsxs)("span",{title:`@${s.screen_name}`,children:["@",s.screen_name]})}),(0,n.jsxs)("div",{className:f.authorFollow,children:[(0,n.jsx)("span",{className:f.separator,children:"\xb7"}),(0,n.jsx)("a",{href:s.follow_url,className:f.follow,target:"_blank",rel:"noopener noreferrer",children:"Follow"})]})]})]}),(0,n.jsx)("a",{href:e.url,className:f.brand,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Twitter",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:f.twitterIcon,children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})})})]})};var b=r(35589);let k=({tweet:e})=>(0,n.jsxs)("a",{href:e.in_reply_to_url,className:b.root,target:"_blank",rel:"noopener noreferrer",children:["Replying to @",e.in_reply_to_screen_name]});var N=r(36143);let S=({href:e,children:t})=>(0,n.jsx)("a",{href:e,className:N.root,target:"_blank",rel:"noopener noreferrer nofollow",children:t});var T=r(9091);let L=({tweet:e})=>(0,n.jsx)("p",{className:T.root,lang:e.lang,dir:"auto",children:e.entities.map((e,t)=>{switch(e.type){case"hashtag":case"mention":case"url":case"symbol":return(0,n.jsx)(S,{href:e.href,children:e.text},t);case"media":return;default:return(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:e.text}},t)}})});var O=r(7620);let I=e=>`https://x.com/${e.user.screen_name}/status/${e.id_str}`,R=e=>`https://x.com/${"string"==typeof e?e:e.user.screen_name}`,E=e=>`https://x.com/intent/like?tweet_id=${e.id_str}`,C=e=>`https://x.com/intent/tweet?in_reply_to=${e.id_str}`,M=e=>`https://x.com/intent/follow?screen_name=${e.user.screen_name}`,A=e=>`https://x.com/hashtag/${e.text}`,q=e=>`https://x.com/search?q=%24${e.text}`,V=e=>`https://x.com/${e.in_reply_to_screen_name}/status/${e.in_reply_to_status_id_str}`,z=(e,t)=>{let r=new URL(e.media_url_https),a=r.pathname.split(".").pop();return a?(r.pathname=r.pathname.replace(`.${a}`,""),r.searchParams.set("format",a),r.searchParams.set("name",t),r.toString()):e.media_url_https},$=e=>{let{variants:t}=e.video_info;return t.filter(e=>"video/mp4"===e.content_type).sort((e,t)=>{var r,a;return(null!=(r=t.bitrate)?r:0)-(null!=(a=e.bitrate)?a:0)})},F=e=>{let t=$(e);return t.length>1?t[1]:t[0]},P=e=>e>999999?`${(e/1e6).toFixed(1)}M`:e>999?`${(e/1e3).toFixed(1)}K`:e.toString();function D(e){let t=Array.from(e.text),r=[{indices:e.display_text_range,type:"text"}];return B(r,"hashtag",e.entities.hashtags),B(r,"mention",e.entities.user_mentions),B(r,"url",e.entities.urls),B(r,"symbol",e.entities.symbols),e.entities.media&&B(r,"media",e.entities.media),function(e,t){e.entities.media&&e.entities.media[0].indices[0]<e.display_text_range[1]&&(e.display_text_range[1]=e.entities.media[0].indices[0]);let r=t.at(-1);r&&r.indices[1]>e.display_text_range[1]&&(r.indices[1]=e.display_text_range[1])}(e,r),r.map(e=>{let r=t.slice(e.indices[0],e.indices[1]).join("");switch(e.type){case"hashtag":return Object.assign(e,{href:A(e),text:r});case"mention":return Object.assign(e,{href:R(e.screen_name),text:r});case"url":case"media":return Object.assign(e,{href:e.expanded_url,text:e.display_url});case"symbol":return Object.assign(e,{href:q(e),text:r});default:return Object.assign(e,{text:r})}})}function B(e,t,r){for(let a of r)for(let[r,n]of e.entries()){if(n.indices[0]>a.indices[0]||n.indices[1]<a.indices[1])continue;let i=[{...a,type:t}];n.indices[0]<a.indices[0]&&i.unshift({indices:[n.indices[0],a.indices[0]],type:"text"}),n.indices[1]>a.indices[1]&&i.push({indices:[a.indices[1],n.indices[1]],type:"text"}),e.splice(r,1,...i);break}}let W=e=>({...e,url:I(e),user:{...e.user,url:R(e),follow_url:M(e)},like_url:E(e),reply_url:C(e),in_reply_to_url:e.in_reply_to_screen_name?V(e):void 0,entities:D(e),quoted_tweet:e.quoted_tweet?{...e.quoted_tweet,url:I(e.quoted_tweet),entities:D(e.quoted_tweet)}:void 0});var U=r(93597),H=r(42739);let G=e=>{let{tweet:t,media:r}=e,[a,s]=(0,O.useState)(!0),[l,o]=(0,O.useState)(!1),[c,d]=(0,O.useState)(!1),u=F(r),h=0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("video",{className:U.image,poster:z(r,"small"),controls:!a,playsInline:!0,preload:"none",tabIndex:a?-1:0,onPlay:()=>{h&&window.clearTimeout(h),l||o(!0),c&&d(!1)},onPause:()=>{h&&window.clearTimeout(h),h=window.setTimeout(()=>{l&&o(!1),h=0},100)},onEnded:()=>{d(!0)},children:(0,n.jsx)("source",{src:u.url,type:u.content_type})}),a&&(0,n.jsx)("button",{type:"button",className:H.videoButton,"aria-label":"View video on X",onClick:e=>{let t=e.currentTarget.previousSibling;e.preventDefault(),s(!1),t.load(),t.play().then(()=>{o(!0),t.focus()}).catch(e=>{console.error("Error playing video:",e),s(!0),o(!1)})},children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",className:H.videoButtonIcon,"aria-hidden":"true",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M21 12L4 2v20l17-10z"})})})}),!l&&!c&&(0,n.jsx)("div",{className:H.watchOnTwitter,children:(0,n.jsx)("a",{href:t.url,className:H.anchor,target:"_blank",rel:"noopener noreferrer",children:a?"Watch on X":"Continue watching on X"})}),c&&(0,n.jsx)("a",{href:t.url,className:(0,i.A)(H.anchor,H.viewReplies),target:"_blank",rel:"noopener noreferrer",children:"View replies"})]})},X=e=>(0,n.jsx)("img",{...e}),Z=(e,t)=>{let r=56.25;return 1===t&&(r=100/e.original_info.width*e.original_info.height),2===t&&(r*=2),{width:"photo"===e.type?void 0:"unset",paddingBottom:`${r}%`}},Q=({tweet:e,components:t,quoted:r})=>{var a,s,l,o;let c=null!=(l=null==(a=e.mediaDetails)?void 0:a.length)?l:0,d=null!=(o=null==t?void 0:t.MediaImg)?o:X;return(0,n.jsx)("div",{className:(0,i.A)(U.root,!r&&U.rounded),children:(0,n.jsx)("div",{className:(0,i.A)(U.mediaWrapper,c>1&&U.grid2Columns,3===c&&U.grid3,c>4&&U.grid2x2),children:null==(s=e.mediaDetails)?void 0:s.map(t=>(0,n.jsx)(O.Fragment,{children:"photo"===t.type?(0,n.jsxs)("a",{href:e.url,className:(0,i.A)(U.mediaContainer,U.mediaLink),target:"_blank",rel:"noopener noreferrer",children:[(0,n.jsx)("div",{className:U.skeleton,style:Z(t,c)}),(0,n.jsx)(d,{src:z(t,"small"),alt:t.ext_alt_text||"Image",className:U.image,draggable:!0})]},t.media_url_https):(0,n.jsxs)("div",{className:U.mediaContainer,children:[(0,n.jsx)("div",{className:U.skeleton,style:Z(t,c)}),(0,n.jsx)(G,{tweet:e,media:t})]},t.media_url_https)},t.media_url_https))})})},K=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,weekday:"short",month:"short",day:"numeric",year:"numeric"}),Y=e=>{let t={};for(let r of e)t[r.type]=r.value;return t},J=e=>{let t=Y(K.formatToParts(e)),r=`${t.hour}:${t.minute} ${t.dayPeriod}`,a=`${t.month} ${t.day}, ${t.year}`;return`${r} \xb7 ${a}`};var ee=r(5616);let et=({tweet:e})=>{let t=new Date(e.created_at),r=J(t);return(0,n.jsx)("a",{className:ee.root,href:e.url,target:"_blank",rel:"noopener noreferrer","aria-label":r,children:(0,n.jsx)("time",{dateTime:t.toISOString(),children:r})})};var er=r(38831);let ea=({tweet:e})=>(0,n.jsxs)("div",{className:er.info,children:[(0,n.jsx)(et,{tweet:e}),(0,n.jsx)("a",{className:er.infoLink,href:"https://help.x.com/en/x-for-websites-ads-info-and-privacy",target:"_blank",rel:"noopener noreferrer","aria-label":"Twitter for Websites, Ads Information and Privacy",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:er.infoIcon,children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M13.5 8.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5S11.17 7 12 7s1.5.67 1.5 1.5zM13 17v-5h-2v5h2zm-1 5.25c5.66 0 10.25-4.59 10.25-10.25S17.66 1.75 12 1.75 1.75 6.34 1.75 12 6.34 22.25 12 22.25zM20.25 12c0 4.56-3.69 8.25-8.25 8.25S3.75 16.56 3.75 12 7.44 3.75 12 3.75s8.25 3.69 8.25 8.25z"})})})})]});var en=r(46846);let ei=e=>{let{tweet:t}=e,[r,a]=(0,O.useState)(!1);return(0,O.useEffect)(()=>{if(r){let e=setTimeout(()=>{a(!1)},6e3);return()=>clearTimeout(e)}},[r]),(0,n.jsxs)("button",{type:"button",className:en.copy,"aria-label":"Copy link",onClick:()=>{navigator.clipboard.writeText(t.url),a(!0)},children:[(0,n.jsx)("div",{className:en.copyIconWrapper,children:r?(0,n.jsx)("svg",{viewBox:"0 0 24 24",className:en.copyIcon,"aria-hidden":"true",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M9.64 18.952l-5.55-4.861 1.317-1.504 3.951 3.459 8.459-10.948L19.4 6.32 9.64 18.952z"})})}):(0,n.jsx)("svg",{viewBox:"0 0 24 24",className:en.copyIcon,"aria-hidden":"true",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M18.36 5.64c-1.95-1.96-5.11-1.96-7.07 0L9.88 7.05 8.46 5.64l1.42-1.42c2.73-2.73 7.16-2.73 9.9 0 2.73 2.74 2.73 7.17 0 9.9l-1.42 1.42-1.41-1.42 1.41-1.41c1.96-1.96 1.96-5.12 0-7.07zm-2.12 3.53l-7.07 7.07-1.41-1.41 7.07-7.07 1.41 1.41zm-12.02.71l1.42-1.42 1.41 1.42-1.41 1.41c-1.96 1.96-1.96 5.12 0 7.07 1.95 1.96 5.11 1.96 7.07 0l1.41-1.41 1.42 1.41-1.42 1.42c-2.73 2.73-7.16 2.73-9.9 0-2.73-2.74-2.73-7.17 0-9.9z"})})})}),(0,n.jsx)("span",{className:en.copyText,children:r?"Copied!":"Copy link"})]})},es=({tweet:e})=>{let t=P(e.favorite_count);return(0,n.jsxs)("div",{className:en.actions,children:[(0,n.jsxs)("a",{className:en.like,href:e.like_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Like. This Tweet has ${t} likes`,children:[(0,n.jsx)("div",{className:en.likeIconWrapper,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",className:en.likeIcon,"aria-hidden":"true",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M20.884 13.19c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})})})}),(0,n.jsx)("span",{className:en.likeCount,children:t})]}),(0,n.jsxs)("a",{className:en.reply,href:e.reply_url,target:"_blank",rel:"noopener noreferrer","aria-label":"Reply to this Tweet on Twitter",children:[(0,n.jsx)("div",{className:en.replyIconWrapper,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",className:en.replyIcon,"aria-hidden":"true",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01z"})})})}),(0,n.jsx)("span",{className:en.replyText,children:"Reply"})]}),(0,n.jsx)(ei,{tweet:e})]})};var el=r(63393);let eo=({tweet:e})=>(0,n.jsx)("div",{className:el.replies,children:(0,n.jsx)("a",{className:el.link,href:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,n.jsx)("span",{className:el.text,children:0===e.conversation_count?"Read more on X":1===e.conversation_count?`Read ${P(e.conversation_count)} reply`:`Read ${P(e.conversation_count)} replies`})})});var ec=r(52997);let ed=e=>{let{tweet:t,children:r}=e;return(0,n.jsx)("div",{className:ec.root,onClick:e=>{e.preventDefault(),window.open(t.url,"_blank")},children:(0,n.jsx)("article",{className:ec.article,children:r})})};var eu=r(24414);let eh=({tweet:e})=>{let{user:t}=e;return(0,n.jsxs)("div",{className:eu.header,children:[(0,n.jsx)("a",{href:e.url,className:eu.avatar,target:"_blank",rel:"noopener noreferrer",children:(0,n.jsx)("div",{className:(0,i.A)(eu.avatarOverflow,"Square"===t.profile_image_shape&&eu.avatarSquare),children:(0,n.jsx)(p,{src:t.profile_image_url_https,alt:t.name,width:20,height:20})})}),(0,n.jsxs)("div",{className:eu.author,children:[(0,n.jsx)("div",{className:eu.authorText,children:(0,n.jsx)("span",{title:t.name,children:t.name})}),(0,n.jsx)(y,{user:t}),(0,n.jsx)("div",{className:eu.username,children:(0,n.jsxs)("span",{title:`@${t.screen_name}`,children:["@",t.screen_name]})})]})]})};var e_=r(9215);let ep=({tweet:e})=>(0,n.jsx)("p",{className:e_.root,lang:e.lang,dir:"auto",children:e.entities.map((e,t)=>(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:e.text}},t))}),ef=({tweet:e})=>{var t;return(0,n.jsxs)(ed,{tweet:e,children:[(0,n.jsx)(eh,{tweet:e}),(0,n.jsx)(ep,{tweet:e}),(null==(t=e.mediaDetails)?void 0:t.length)?(0,n.jsx)(Q,{quoted:!0,tweet:e}):null]})},em=({tweet:e,components:t})=>{var r;let a=(0,O.useMemo)(()=>W(e),[e]);return(0,n.jsxs)(l,{children:[(0,n.jsx)(j,{tweet:a,components:t}),a.in_reply_to_status_id_str&&(0,n.jsx)(k,{tweet:a}),(0,n.jsx)(L,{tweet:a}),(null==(r=a.mediaDetails)?void 0:r.length)?(0,n.jsx)(Q,{tweet:a,components:t}):null,a.quoted_tweet&&(0,n.jsx)(ef,{tweet:a.quoted_tweet}),(0,n.jsx)(ea,{tweet:a}),(0,n.jsx)(es,{tweet:a}),(0,n.jsx)(eo,{tweet:a})]})};var ex=r(78040),ev=Object.prototype.hasOwnProperty;let ew=new WeakMap,eg=()=>{},ey=eg(),ej=Object,eb=e=>e===ey,ek=e=>"function"==typeof e,eN=(e,t)=>({...e,...t}),eS=e=>ek(e.then),eT={},eL={},eO="undefined",eI=typeof window!=eO,eR=typeof document!=eO,eE=eI&&"Deno"in window,eC=()=>eI&&typeof window.requestAnimationFrame!=eO,eM=(e,t)=>{let r=ew.get(e);return[()=>!eb(t)&&e.get(t)||eT,a=>{if(!eb(t)){let n=e.get(t);t in eL||(eL[t]=n),r[5](t,eN(n,a),n||eT)}},r[6],()=>!eb(t)&&t in eL?eL[t]:!eb(t)&&e.get(t)||eT]},eA=!0,[eq,eV]=eI&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[eg,eg],ez={initFocus:e=>(eR&&document.addEventListener("visibilitychange",e),eq("focus",e),()=>{eR&&document.removeEventListener("visibilitychange",e),eV("focus",e)}),initReconnect:e=>{let t=()=>{eA=!0,e()},r=()=>{eA=!1};return eq("online",t),eq("offline",r),()=>{eV("online",t),eV("offline",r)}}},e$=!O.useId,eF=!eI||eE,eP=e=>eC()?window.requestAnimationFrame(e):setTimeout(e,1),eD=eF?O.useEffect:O.useLayoutEffect,eB="undefined"!=typeof navigator&&navigator.connection,eW=!eF&&eB&&(["slow-2g","2g"].includes(eB.effectiveType)||eB.saveData),eU=new WeakMap,eH=e=>ej.prototype.toString.call(e),eG=(e,t)=>e==="[object ".concat(t,"]"),eX=0,eZ=e=>{let t,r,a=typeof e,n=eH(e),i=eG(n,"Date"),s=eG(n,"RegExp"),l=eG(n,"Object");if(ej(e)!==e||i||s)t=i?e.toJSON():"symbol"==a?e.toString():"string"==a?JSON.stringify(e):""+e;else{if(t=eU.get(e))return t;if(t=++eX+"~",eU.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=eZ(e[r])+",";eU.set(e,t)}if(l){t="#";let a=ej.keys(e).sort();for(;!eb(r=a.pop());)eb(e[r])||(t+=r+":"+eZ(e[r])+",");eU.set(e,t)}}return t},eQ=e=>{if(ek(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?eZ(e):"",t]},eK=0,eY=()=>++eK;async function eJ(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[a,n,i,s]=t,l=eN({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),o=l.populateCache,c=l.rollbackOnError,d=l.optimisticData,u=e=>"function"==typeof c?c(e):!1!==c,h=l.throwOnError;if(ek(n)){let e=[];for(let t of a.keys())!/^\$(inf|sub)\$/.test(t)&&n(a.get(t)._k)&&e.push(t);return Promise.all(e.map(_))}return _(n);async function _(e){let r,[n]=eQ(e);if(!n)return;let[s,c]=eM(a,n),[_,p,f,m]=ew.get(a),x=()=>{let t=_[n];return(ek(l.revalidate)?l.revalidate(s().data,e):!1!==l.revalidate)&&(delete f[n],delete m[n],t&&t[0])?t[0](2).then(()=>s().data):s().data};if(t.length<3)return x();let v=i,w=!1,g=eY();p[n]=[g,0];let y=!eb(d),j=s(),b=j.data,k=j._c,N=eb(k)?b:k;if(y&&c({data:d=ek(d)?d(N,b):d,_c:N}),ek(v))try{v=v(N)}catch(e){r=e,w=!0}if(v&&eS(v)){if(v=await v.catch(e=>{r=e,w=!0}),g!==p[n][0]){if(w)throw r;return v}w&&y&&u(r)&&(o=!0,c({data:N,_c:ey}))}if(o&&!w&&(ek(o)?c({data:o(v,N),error:ey,_c:ey}):c({data:v,error:ey,_c:ey})),p[n][1]=eY(),Promise.resolve(x()).then(()=>{c({_c:ey})}),w){if(h)throw r;return}return v}}let e0=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},e1=(e,t)=>{if(!ew.has(e)){let r=eN(ez,t),a=Object.create(null),n=eJ.bind(ey,e),i=eg,s=Object.create(null),l=(e,t)=>{let r=s[e]||[];return s[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},o=(t,r,a)=>{e.set(t,r);let n=s[t];if(n)for(let e of n)e(r,a)},c=()=>{if(!ew.has(e)&&(ew.set(e,[a,Object.create(null),Object.create(null),Object.create(null),n,o,l]),!eF)){let t=r.initFocus(setTimeout.bind(ey,e0.bind(ey,a,0))),n=r.initReconnect(setTimeout.bind(ey,e0.bind(ey,a,1)));i=()=>{t&&t(),n&&n(),ew.delete(e)}}};return c(),[e,n,c,i]}return[e,ew.get(e)[4]]},[e2,e5]=e1(new Map),e4=eN({onLoadingSlow:eg,onSuccess:eg,onError:eg,onErrorRetry:(e,t,r,a,n)=>{let i=r.errorRetryCount,s=n.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*r.errorRetryInterval;(eb(i)||!(s>i))&&setTimeout(a,l,n)},onDiscarded:eg,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:eW?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:eW?5e3:3e3,compare:function e(t,r){var a,n;if(t===r)return!0;if(t&&r&&(a=t.constructor)===r.constructor){if(a===Date)return t.getTime()===r.getTime();if(a===RegExp)return t.toString()===r.toString();if(a===Array){if((n=t.length)===r.length)for(;n--&&e(t[n],r[n]););return -1===n}if(!a||"object"==typeof t){for(a in n=0,t)if(ev.call(t,a)&&++n&&!ev.call(r,a)||!(a in r)||!e(t[a],r[a]))return!1;return Object.keys(r).length===n}}return t!=t&&r!=r},isPaused:()=>!1,cache:e2,mutate:e5,fallback:{}},{isOnline:()=>eA,isVisible:()=>{let e=eR&&document.visibilityState;return eb(e)||"hidden"!==e}}),e3=(e,t)=>{let r=eN(e,t);if(t){let{use:a,fallback:n}=e,{use:i,fallback:s}=t;a&&i&&(r.use=a.concat(i)),n&&s&&(r.fallback=eN(n,s))}return r},e6=(0,O.createContext)({}),e8=eI&&window.__SWR_DEVTOOLS_USE__,e9=e8?window.__SWR_DEVTOOLS_USE__:[],e7=e=>ek(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],te=()=>eN(e4,(0,O.useContext)(e6)),tt=e9.concat(e=>(t,r,a)=>{let n=r&&((...e)=>{let[a]=eQ(t),[,,,n]=ew.get(e2);if(a.startsWith("$inf$"))return r(...e);let i=n[a];return eb(i)?r(...e):(delete n[a],i)});return e(t,n,a)}),tr=(e,t,r)=>{let a=t[e]||(t[e]=[]);return a.push(r),()=>{let e=a.indexOf(r);e>=0&&(a[e]=a[a.length-1],a.pop())}};e8&&(window.__SWR_DEVTOOLS_REACT__=O);let ta=()=>{},tn=ta();new WeakMap;let ti=O.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),ts={dedupe:!0};ej.defineProperty(e=>{let{value:t}=e,r=(0,O.useContext)(e6),a=ek(t),n=(0,O.useMemo)(()=>a?t(r):t,[a,r,t]),i=(0,O.useMemo)(()=>a?n:e3(r,n),[a,r,n]),s=n&&n.provider,l=(0,O.useRef)(ey);s&&!l.current&&(l.current=e1(s(i.cache||e2),n));let o=l.current;return o&&(i.cache=o[0],i.mutate=o[1]),eD(()=>{if(o)return o[2]&&o[2](),o[3]},[]),(0,O.createElement)(e6.Provider,eN(e,{value:i}))},"defaultValue",{value:e4});let tl=(a=(e,t,r)=>{let{cache:a,compare:n,suspense:i,fallbackData:s,revalidateOnMount:l,revalidateIfStale:o,refreshInterval:c,refreshWhenHidden:d,refreshWhenOffline:u,keepPreviousData:h}=r,[_,p,f,m]=ew.get(a),[x,v]=eQ(e),w=(0,O.useRef)(!1),g=(0,O.useRef)(!1),y=(0,O.useRef)(x),j=(0,O.useRef)(t),b=(0,O.useRef)(r),k=()=>b.current,N=()=>k().isVisible()&&k().isOnline(),[S,T,L,I]=eM(a,x),R=(0,O.useRef)({}).current,E=eb(s)?eb(r.fallback)?ey:r.fallback[x]:s,C=(e,t)=>{for(let r in R)if("data"===r){if(!n(e[r],t[r])&&(!eb(e[r])||!n(D,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},M=(0,O.useMemo)(()=>{let e=!!x&&!!t&&(eb(l)?!k().isPaused()&&!i&&!1!==o:l),r=t=>{let r=eN(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},a=S(),n=I(),s=r(a),c=a===n?s:r(n),d=s;return[()=>{let e=r(S());return C(e,d)?(d.data=e.data,d.isLoading=e.isLoading,d.isValidating=e.isValidating,d.error=e.error,d):(d=e,e)},()=>c]},[a,x]),A=(0,ex.useSyncExternalStore)((0,O.useCallback)(e=>L(x,(t,r)=>{C(r,t)||e()}),[a,x]),M[0],M[1]),q=!w.current,V=_[x]&&_[x].length>0,z=A.data,$=eb(z)?E&&eS(E)?ti(E):E:z,F=A.error,P=(0,O.useRef)($),D=h?eb(z)?eb(P.current)?$:P.current:z:$,B=(!V||!!eb(F))&&(q&&!eb(l)?l:!k().isPaused()&&(i?!eb($)&&o:eb($)||o)),W=!!(x&&t&&q&&B),U=eb(A.isValidating)?W:A.isValidating,H=eb(A.isLoading)?W:A.isLoading,G=(0,O.useCallback)(async e=>{let t,a,i=j.current;if(!x||!i||g.current||k().isPaused())return!1;let s=!0,l=e||{},o=!f[x]||!l.dedupe,c=()=>e$?!g.current&&x===y.current&&w.current:x===y.current,d={isValidating:!1,isLoading:!1},u=()=>{T(d)},h=()=>{let e=f[x];e&&e[1]===a&&delete f[x]},m={isValidating:!0};eb(S().data)&&(m.isLoading=!0);try{if(o&&(T(m),r.loadingTimeout&&eb(S().data)&&setTimeout(()=>{s&&c()&&k().onLoadingSlow(x,r)},r.loadingTimeout),f[x]=[i(v),eY()]),[t,a]=f[x],t=await t,o&&setTimeout(h,r.dedupingInterval),!f[x]||f[x][1]!==a)return o&&c()&&k().onDiscarded(x),!1;d.error=ey;let e=p[x];if(!eb(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return u(),o&&c()&&k().onDiscarded(x),!1;let l=S().data;d.data=n(l,t)?l:t,o&&c()&&k().onSuccess(t,x,r)}catch(r){h();let e=k(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,o&&c()&&(e.onError(r,x,e),(!0===t||ek(t)&&t(r))&&(!k().revalidateOnFocus||!k().revalidateOnReconnect||N())&&e.onErrorRetry(r,x,e,e=>{let t=_[x];t&&t[0]&&t[0](3,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return s=!1,u(),!0},[x,a]),X=(0,O.useCallback)((...e)=>eJ(a,y.current,...e),[]);if(eD(()=>{j.current=t,b.current=r,eb(z)||(P.current=z)}),eD(()=>{if(!x)return;let e=G.bind(ey,ts),t=0;k().revalidateOnFocus&&(t=Date.now()+k().focusThrottleInterval);let r=tr(x,_,(r,a={})=>{if(0==r){let r=Date.now();k().revalidateOnFocus&&r>t&&N()&&(t=r+k().focusThrottleInterval,e())}else if(1==r)k().revalidateOnReconnect&&N()&&e();else if(2==r)return G();else if(3==r)return G(a)});return g.current=!1,y.current=x,w.current=!0,T({_k:v}),B&&!f[x]&&(eb($)||eF?e():eP(e)),()=>{g.current=!0,r()}},[x]),eD(()=>{let e;function t(){let t=ek(c)?c(S().data):c;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!S().error&&(d||k().isVisible())&&(u||k().isOnline())?G(ts).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[c,d,u,x]),(0,O.useDebugValue)(D),i&&eb($)&&x){if(!e$&&eF)throw Error("Fallback data is required when using Suspense in SSR.");j.current=t,b.current=r,g.current=!1;let e=m[x];if(eb(e)||ti(X(e)),eb(F)){let e=G(ts);eb(D)||(e.status="fulfilled",e.value=!0),ti(e)}else throw F}return{mutate:X,get data(){return R.data=!0,D},get error(){return R.error=!0,F},get isValidating(){return R.isValidating=!0,U},get isLoading(){return R.isLoading=!0,H}}},function(...e){let t=te(),[r,n,i]=e7(e),s=e3(t,i),l=a,{use:o}=s,c=(o||[]).concat(tt);for(let e=c.length;e--;)l=c[e](l);return l(r,n||s.fetcher||null,s)});class to extends Error{constructor({message:e,status:t,data:r}){super(e),this.name="TwitterApiError",this.status=t,this.data=r}}let tc=tl.default||tl;async function td(e){let[t,r]=e,a=await fetch(t,r),n=await a.json();if(a.ok)return n.data||null;throw new to({message:'Failed to fetch tweet at "'.concat(t,'" with "').concat(a.status,'".'),data:n,status:a.status})}let tu=(e,t,r)=>{let{isLoading:a,data:n,error:i}=tc(()=>t||e?[t||e&&"".concat("https://react-tweet.vercel.app","/api/tweet/").concat(e),r]:null,td,{revalidateIfStale:!1,revalidateOnFocus:!1,shouldRetryOnError:!1});return{isLoading:!!(a||void 0===n&&!i),data:n,error:i}},th=e=>{let{id:t,apiUrl:r,fallback:a=(0,n.jsx)(u,{}),components:i,fetchOptions:s,onError:l}=e,{data:o,error:c,isLoading:d}=tu(t,r,s);if(d)return a;if(c||!o){let e=(null==i?void 0:i.TweetNotFound)||_;return(0,n.jsx)(e,{error:l?l(c):c})}return(0,n.jsx)(em,{tweet:o,components:i})}},84085:e=>{e.exports={root:"tweet-not-found_root____QM1"}},85850:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(98516).A)("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]])},93597:e=>{e.exports={root:"tweet-media_root__Sc0aR",rounded:"tweet-media_rounded__VnikK",mediaWrapper:"tweet-media_mediaWrapper__4ZTZM",grid2Columns:"tweet-media_grid2Columns__5lrUG",grid3:"tweet-media_grid3__hdQVC",grid2x2:"tweet-media_grid2x2__Xc5VT",mediaContainer:"tweet-media_mediaContainer__mJMbk",mediaLink:"tweet-media_mediaLink__VH3os",skeleton:"tweet-media_skeleton__sIv3t",image:"tweet-media_image__m3qiQ"}}}]);