{"version":3,"file":"react-tweet-B7YExCjB.js","sources":["../../node_modules/react-tweet/dist/twitter-theme/icons/verified.js","../../node_modules/react-tweet/dist/twitter-theme/icons/verified-business.js","../../node_modules/react-tweet/dist/twitter-theme/icons/verified-government.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-container.js","../../node_modules/react-tweet/dist/twitter-theme/avatar-img.js","../../node_modules/react-tweet/dist/twitter-theme/verified-badge.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-header.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-in-reply-to.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-link.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-body.js","../../node_modules/react-tweet/dist/utils.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-media-video.js","../../node_modules/react-tweet/dist/twitter-theme/media-img.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-media.js","../../node_modules/react-tweet/dist/date-utils.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-info-created-at.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-info.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-actions-copy.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-actions.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-replies.js","../../node_modules/react-tweet/dist/twitter-theme/quoted-tweet/quoted-tweet-container.js","../../node_modules/react-tweet/dist/twitter-theme/quoted-tweet/quoted-tweet-header.js","../../node_modules/react-tweet/dist/twitter-theme/quoted-tweet/quoted-tweet-body.js","../../node_modules/react-tweet/dist/twitter-theme/quoted-tweet/quoted-tweet.js","../../node_modules/react-tweet/dist/twitter-theme/embedded-tweet.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-not-found.js","../../node_modules/react-tweet/dist/twitter-theme/skeleton.js","../../node_modules/react-tweet/dist/twitter-theme/tweet-skeleton.js","../../node_modules/react-tweet/dist/api/fetch-tweet.js","../../node_modules/react-tweet/dist/hooks.js","../../node_modules/react-tweet/dist/swr.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport s from './icons.module.css';\nexport const Verified = ()=>/*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n \"aria-label\": \"Verified account\",\n role: \"img\",\n className: s.verified,\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n });\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport s from './icons.module.css';\nexport const VerifiedBusiness = ()=>/*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 22 22\",\n \"aria-label\": \"Verified account\",\n role: \"img\",\n className: s.verified,\n children: /*#__PURE__*/ _jsxs(\"g\", {\n children: [\n /*#__PURE__*/ _jsxs(\"linearGradient\", {\n gradientUnits: \"userSpaceOnUse\",\n id: \"0-a\",\n x1: \"4.411\",\n x2: \"18.083\",\n y1: \"2.495\",\n y2: \"21.508\",\n children: [\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \"0\",\n stopColor: \"#f4e72a\"\n }),\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \".539\",\n stopColor: \"#cd8105\"\n }),\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \".68\",\n stopColor: \"#cb7b00\"\n }),\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \"1\",\n stopColor: \"#f4ec26\"\n }),\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \"1\",\n stopColor: \"#f4e72a\"\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"linearGradient\", {\n gradientUnits: \"userSpaceOnUse\",\n id: \"0-b\",\n x1: \"5.355\",\n x2: \"16.361\",\n y1: \"3.395\",\n y2: \"19.133\",\n children: [\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \"0\",\n stopColor: \"#f9e87f\"\n }),\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \".406\",\n stopColor: \"#e2b719\"\n }),\n /*#__PURE__*/ _jsx(\"stop\", {\n offset: \".989\",\n stopColor: \"#e2b719\"\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"g\", {\n clipRule: \"evenodd\",\n fillRule: \"evenodd\",\n children: [\n /*#__PURE__*/ _jsx(\"path\", {\n 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\",\n fill: \"url(#0-a)\"\n }),\n /*#__PURE__*/ _jsx(\"path\", {\n 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\",\n fill: \"url(#0-b)\"\n }),\n /*#__PURE__*/ _jsx(\"path\", {\n 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\",\n fill: \"#d18800\"\n })\n ]\n })\n ]\n })\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport s from './icons.module.css';\nexport const VerifiedGovernment = ()=>/*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 22 22\",\n \"aria-label\": \"Verified account\",\n role: \"img\",\n className: s.verified,\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n clipRule: \"evenodd\",\n 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\",\n fillRule: \"evenodd\"\n })\n })\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport s from './tweet-container.module.css';\nimport './theme.css';\nexport const TweetContainer = ({ className, children })=>/*#__PURE__*/ _jsx(\"div\", {\n className: clsx('react-tweet-theme', s.root, className),\n children: /*#__PURE__*/ _jsx(\"article\", {\n className: s.article,\n children: children\n })\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n// eslint-disable-next-line jsx-a11y/alt-text -- The alt text is part of `...props`\nexport const AvatarImg = (props)=>/*#__PURE__*/ _jsx(\"img\", {\n ...props\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { Verified, VerifiedBusiness, VerifiedGovernment } from './icons/index.js';\nimport s from './verified-badge.module.css';\nexport const VerifiedBadge = ({ user, className })=>{\n const verified = user.verified || user.is_blue_verified || user.verified_type;\n let icon = /*#__PURE__*/ _jsx(Verified, {});\n let iconClassName = s.verifiedBlue;\n if (verified) {\n if (!user.is_blue_verified) {\n iconClassName = s.verifiedOld;\n }\n switch(user.verified_type){\n case 'Government':\n icon = /*#__PURE__*/ _jsx(VerifiedGovernment, {});\n iconClassName = s.verifiedGovernment;\n break;\n case 'Business':\n icon = /*#__PURE__*/ _jsx(VerifiedBusiness, {});\n iconClassName = null;\n break;\n }\n }\n return verified ? /*#__PURE__*/ _jsx(\"div\", {\n className: clsx(className, iconClassName),\n children: icon\n }) : null;\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { AvatarImg } from './avatar-img.js';\nimport s from './tweet-header.module.css';\nimport { VerifiedBadge } from './verified-badge.js';\nexport const TweetHeader = ({ tweet, components })=>{\n var _components_AvatarImg;\n const Img = (_components_AvatarImg = components == null ? void 0 : components.AvatarImg) != null ? _components_AvatarImg : AvatarImg;\n const { user } = tweet;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: s.header,\n children: [\n /*#__PURE__*/ _jsxs(\"a\", {\n href: tweet.url,\n className: s.avatar,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: clsx(s.avatarOverflow, user.profile_image_shape === 'Square' && s.avatarSquare),\n children: /*#__PURE__*/ _jsx(Img, {\n src: user.profile_image_url_https,\n alt: user.name,\n width: 48,\n height: 48\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.avatarOverflow,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: s.avatarShadow\n })\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: s.author,\n children: [\n /*#__PURE__*/ _jsxs(\"a\", {\n href: tweet.url,\n className: s.authorLink,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.authorLinkText,\n children: /*#__PURE__*/ _jsx(\"span\", {\n title: user.name,\n children: user.name\n })\n }),\n /*#__PURE__*/ _jsx(VerifiedBadge, {\n user: user,\n className: s.authorVerified\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: s.authorMeta,\n children: [\n /*#__PURE__*/ _jsx(\"a\", {\n href: tweet.url,\n className: s.username,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: /*#__PURE__*/ _jsxs(\"span\", {\n title: `@${user.screen_name}`,\n children: [\n \"@\",\n user.screen_name\n ]\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: s.authorFollow,\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: s.separator,\n children: \"·\"\n }),\n /*#__PURE__*/ _jsx(\"a\", {\n href: user.follow_url,\n className: s.follow,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: \"Follow\"\n })\n ]\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"a\", {\n href: tweet.url,\n className: s.brand,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n \"aria-label\": \"View on Twitter\",\n children: /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n className: s.twitterIcon,\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n })\n })\n ]\n });\n};\n","import { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport s from './tweet-in-reply-to.module.css';\nexport const TweetInReplyTo = ({ tweet })=>/*#__PURE__*/ _jsxs(\"a\", {\n href: tweet.in_reply_to_url,\n className: s.root,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: [\n \"Replying to @\",\n tweet.in_reply_to_screen_name\n ]\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport s from './tweet-link.module.css';\nexport const TweetLink = ({ href, children })=>/*#__PURE__*/ _jsx(\"a\", {\n href: href,\n className: s.root,\n target: \"_blank\",\n rel: \"noopener noreferrer nofollow\",\n children: children\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { TweetLink } from './tweet-link.js';\nimport s from './tweet-body.module.css';\nexport const TweetBody = ({ tweet })=>/*#__PURE__*/ _jsx(\"p\", {\n className: s.root,\n children: tweet.entities.map((item, i)=>{\n switch(item.type){\n case 'hashtag':\n case 'mention':\n case 'url':\n case 'symbol':\n return /*#__PURE__*/ _jsx(TweetLink, {\n href: item.href,\n children: item.text\n }, i);\n case 'media':\n // Media text is currently never displayed, some tweets however might have indices\n // that do match `display_text_range` so for those cases we ignore the content.\n return;\n default:\n // We use `dangerouslySetInnerHTML` to preserve the text encoding.\n // https://github.com/vercel-labs/react-tweet/issues/29\n return /*#__PURE__*/ _jsx(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.text\n }\n }, i);\n }\n })\n });\n","const getTweetUrl = (tweet)=>`https://twitter.com/${tweet.user.screen_name}/status/${tweet.id_str}`;\nconst getUserUrl = (usernameOrTweet)=>`https://twitter.com/${typeof usernameOrTweet === 'string' ? usernameOrTweet : usernameOrTweet.user.screen_name}`;\nconst getLikeUrl = (tweet)=>`https://twitter.com/intent/like?tweet_id=${tweet.id_str}`;\nconst getReplyUrl = (tweet)=>`https://twitter.com/intent/tweet?in_reply_to=${tweet.id_str}`;\nconst getFollowUrl = (tweet)=>`https://twitter.com/intent/follow?screen_name=${tweet.user.screen_name}`;\nconst getHashtagUrl = (hashtag)=>`https://twitter.com/hashtag/${hashtag.text}`;\nconst getSymbolUrl = (symbol)=>`https://twitter.com/search?q=%24${symbol.text}`;\nconst getInReplyToUrl = (tweet)=>`https://twitter.com/${tweet.in_reply_to_screen_name}/status/${tweet.in_reply_to_status_id_str}`;\nexport const getMediaUrl = (media, size)=>{\n const url = new URL(media.media_url_https);\n const extension = url.pathname.split('.').pop();\n if (!extension) return media.media_url_https;\n url.pathname = url.pathname.replace(`.${extension}`, '');\n url.searchParams.set('format', extension);\n url.searchParams.set('name', size);\n return url.toString();\n};\nexport const getMp4Videos = (media)=>{\n const { variants } = media.video_info;\n const sortedMp4Videos = variants.filter((vid)=>vid.content_type === 'video/mp4').sort((a, b)=>{\n var _b_bitrate, _a_bitrate;\n return ((_b_bitrate = b.bitrate) != null ? _b_bitrate : 0) - ((_a_bitrate = a.bitrate) != null ? _a_bitrate : 0);\n });\n return sortedMp4Videos;\n};\nexport const getMp4Video = (media)=>{\n const mp4Videos = getMp4Videos(media);\n // Skip the highest quality video and use the next quality\n return mp4Videos.length > 1 ? mp4Videos[1] : mp4Videos[0];\n};\nexport const formatNumber = (n)=>{\n if (n > 999999) return `${(n / 1000000).toFixed(1)}M`;\n if (n > 999) return `${(n / 1000).toFixed(1)}K`;\n return n.toString();\n};\nfunction getEntities(tweet) {\n const textMap = Array.from(tweet.text);\n const result = [\n {\n indices: tweet.display_text_range,\n type: 'text'\n }\n ];\n addEntities(result, 'hashtag', tweet.entities.hashtags);\n addEntities(result, 'mention', tweet.entities.user_mentions);\n addEntities(result, 'url', tweet.entities.urls);\n addEntities(result, 'symbol', tweet.entities.symbols);\n if (tweet.entities.media) {\n addEntities(result, 'media', tweet.entities.media);\n }\n fixRange(tweet, result);\n return result.map((entity)=>{\n const text = textMap.slice(entity.indices[0], entity.indices[1]).join('');\n switch(entity.type){\n case 'hashtag':\n return Object.assign(entity, {\n href: getHashtagUrl(entity),\n text\n });\n case 'mention':\n return Object.assign(entity, {\n href: getUserUrl(entity.screen_name),\n text\n });\n case 'url':\n case 'media':\n return Object.assign(entity, {\n href: entity.expanded_url,\n text: entity.display_url\n });\n case 'symbol':\n return Object.assign(entity, {\n href: getSymbolUrl(entity),\n text\n });\n default:\n return Object.assign(entity, {\n text\n });\n }\n });\n}\nfunction addEntities(result, type, entities) {\n for (const entity of entities){\n for (const [i, item] of result.entries()){\n if (item.indices[0] > entity.indices[0] || item.indices[1] < entity.indices[1]) {\n continue;\n }\n const items = [\n {\n ...entity,\n type\n }\n ];\n if (item.indices[0] < entity.indices[0]) {\n items.unshift({\n indices: [\n item.indices[0],\n entity.indices[0]\n ],\n type: 'text'\n });\n }\n if (item.indices[1] > entity.indices[1]) {\n items.push({\n indices: [\n entity.indices[1],\n item.indices[1]\n ],\n type: 'text'\n });\n }\n result.splice(i, 1, ...items);\n break; // Break out of the loop to avoid iterating over the new items\n }\n }\n}\n/**\n * Update display_text_range to work w/ Array.from\n * Array.from is unicode aware, unlike string.slice()\n */ function fixRange(tweet, entities) {\n if (tweet.entities.media && tweet.entities.media[0].indices[0] < tweet.display_text_range[1]) {\n tweet.display_text_range[1] = tweet.entities.media[0].indices[0];\n }\n const lastEntity = entities.at(-1);\n if (lastEntity && lastEntity.indices[1] > tweet.display_text_range[1]) {\n lastEntity.indices[1] = tweet.display_text_range[1];\n }\n}\n/**\n * Enriches a tweet with additional data used to more easily use the tweet in a UI.\n */ export const enrichTweet = (tweet)=>({\n ...tweet,\n url: getTweetUrl(tweet),\n user: {\n ...tweet.user,\n url: getUserUrl(tweet),\n follow_url: getFollowUrl(tweet)\n },\n like_url: getLikeUrl(tweet),\n reply_url: getReplyUrl(tweet),\n in_reply_to_url: tweet.in_reply_to_screen_name ? getInReplyToUrl(tweet) : undefined,\n entities: getEntities(tweet),\n quoted_tweet: tweet.quoted_tweet ? {\n ...tweet.quoted_tweet,\n url: getTweetUrl(tweet.quoted_tweet),\n entities: getEntities(tweet.quoted_tweet)\n } : undefined\n });\n","'use client';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useState } from 'react';\nimport clsx from 'clsx';\nimport { getMediaUrl, getMp4Video } from '../utils.js';\nimport mediaStyles from './tweet-media.module.css';\nimport s from './tweet-media-video.module.css';\nexport const TweetMediaVideo = ({ tweet, media })=>{\n const [playButton, setPlayButton] = useState(true);\n const [isPlaying, setIsPlaying] = useState(false);\n const [ended, setEnded] = useState(false);\n const mp4Video = getMp4Video(media);\n let timeout = 0;\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(\"video\", {\n className: mediaStyles.image,\n poster: getMediaUrl(media, 'small'),\n controls: !playButton,\n muted: true,\n preload: \"none\",\n tabIndex: playButton ? -1 : 0,\n onPlay: ()=>{\n if (timeout) window.clearTimeout(timeout);\n if (!isPlaying) setIsPlaying(true);\n if (ended) setEnded(false);\n },\n onPause: ()=>{\n // When the video is seeked (moved to a different timestamp), it will pause for a moment\n // before resuming. We don't want to show the message in that case so we wait a bit.\n if (timeout) window.clearTimeout(timeout);\n timeout = window.setTimeout(()=>{\n if (isPlaying) setIsPlaying(false);\n timeout = 0;\n }, 100);\n },\n onEnded: ()=>{\n setEnded(true);\n },\n children: /*#__PURE__*/ _jsx(\"source\", {\n src: mp4Video.url,\n type: mp4Video.content_type\n })\n }),\n playButton && /*#__PURE__*/ _jsx(\"button\", {\n type: \"button\",\n className: s.videoButton,\n \"aria-label\": \"View video on X\",\n onClick: (e)=>{\n const video = e.currentTarget.previousSibling;\n e.preventDefault();\n setPlayButton(false);\n setIsPlaying(true);\n video.play();\n video.focus();\n },\n children: /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n className: s.videoButtonIcon,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n d: \"M21 12L4 2v20l17-10z\"\n })\n })\n })\n }),\n !isPlaying && !ended && /*#__PURE__*/ _jsx(\"div\", {\n className: s.watchOnTwitter,\n children: /*#__PURE__*/ _jsx(\"a\", {\n href: tweet.url,\n className: s.anchor,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: playButton ? 'Watch on X' : 'Continue watching on X'\n })\n }),\n ended && /*#__PURE__*/ _jsx(\"a\", {\n href: tweet.url,\n className: clsx(s.anchor, s.viewReplies),\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: \"View replies\"\n })\n ]\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n// eslint-disable-next-line jsx-a11y/alt-text -- The alt text is part of `...props`\nexport const MediaImg = (props)=>/*#__PURE__*/ _jsx(\"img\", {\n ...props\n });\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Fragment } from 'react';\nimport clsx from 'clsx';\nimport { getMediaUrl } from '../utils.js';\nimport { TweetMediaVideo } from './tweet-media-video.js';\nimport { MediaImg } from './media-img.js';\nimport s from './tweet-media.module.css';\nconst getSkeletonStyle = (media, itemCount)=>{\n let paddingBottom = 56.25 // default of 16x9\n ;\n // if we only have 1 item, show at original ratio\n if (itemCount === 1) paddingBottom = 100 / media.original_info.width * media.original_info.height;\n // if we have 2 items, double the default to be 16x9 total\n if (itemCount === 2) paddingBottom = paddingBottom * 2;\n return {\n width: media.type === 'photo' ? undefined : 'unset',\n paddingBottom: `${paddingBottom}%`\n };\n};\nexport const TweetMedia = ({ tweet, components, quoted })=>{\n var _tweet_mediaDetails, _tweet_mediaDetails1;\n var _tweet_mediaDetails_length;\n const length = (_tweet_mediaDetails_length = (_tweet_mediaDetails = tweet.mediaDetails) == null ? void 0 : _tweet_mediaDetails.length) != null ? _tweet_mediaDetails_length : 0;\n var _components_MediaImg;\n const Img = (_components_MediaImg = components == null ? void 0 : components.MediaImg) != null ? _components_MediaImg : MediaImg;\n return /*#__PURE__*/ _jsx(\"div\", {\n className: clsx(s.root, !quoted && s.rounded),\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: clsx(s.mediaWrapper, length > 1 && s.grid2Columns, length === 3 && s.grid3, length > 4 && s.grid2x2),\n children: (_tweet_mediaDetails1 = tweet.mediaDetails) == null ? void 0 : _tweet_mediaDetails1.map((media)=>/*#__PURE__*/ _jsx(Fragment, {\n children: media.type === 'photo' ? /*#__PURE__*/ _jsxs(\"a\", {\n href: tweet.url,\n className: clsx(s.mediaContainer, s.mediaLink),\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.skeleton,\n style: getSkeletonStyle(media, length)\n }),\n /*#__PURE__*/ _jsx(Img, {\n src: getMediaUrl(media, 'small'),\n alt: media.ext_alt_text || 'Image',\n className: s.image,\n draggable: true\n })\n ]\n }, media.media_url_https) : /*#__PURE__*/ _jsxs(\"div\", {\n className: s.mediaContainer,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.skeleton,\n style: getSkeletonStyle(media, length)\n }),\n /*#__PURE__*/ _jsx(TweetMediaVideo, {\n tweet: tweet,\n media: media\n })\n ]\n }, media.media_url_https)\n }, media.media_url_https))\n })\n });\n};\n","const options = {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric'\n};\nconst formatter = new Intl.DateTimeFormat('en-US', options);\nconst partsArrayToObject = (parts)=>{\n const result = {};\n for (const part of parts){\n result[part.type] = part.value;\n }\n return result;\n};\nexport const formatDate = (date)=>{\n const parts = partsArrayToObject(formatter.formatToParts(date));\n const formattedTime = `${parts.hour}:${parts.minute} ${parts.dayPeriod}`;\n const formattedDate = `${parts.month} ${parts.day}, ${parts.year}`;\n return `${formattedTime} · ${formattedDate}`;\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { formatDate } from '../date-utils.js';\nimport s from './tweet-info-created-at.module.css';\nexport const TweetInfoCreatedAt = ({ tweet })=>{\n const createdAt = new Date(tweet.created_at);\n const formattedCreatedAtDate = formatDate(createdAt);\n return /*#__PURE__*/ _jsx(\"a\", {\n className: s.root,\n href: tweet.url,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n \"aria-label\": formattedCreatedAtDate,\n children: /*#__PURE__*/ _jsx(\"time\", {\n dateTime: createdAt.toISOString(),\n children: formattedCreatedAtDate\n })\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { TweetInfoCreatedAt } from './tweet-info-created-at.js';\nimport s from './tweet-info.module.css';\nexport const TweetInfo = ({ tweet })=>/*#__PURE__*/ _jsxs(\"div\", {\n className: s.info,\n children: [\n /*#__PURE__*/ _jsx(TweetInfoCreatedAt, {\n tweet: tweet\n }),\n /*#__PURE__*/ _jsx(\"a\", {\n className: s.infoLink,\n href: \"https://help.twitter.com/en/twitter-for-websites-ads-info-and-privacy\",\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n \"aria-label\": \"Twitter for Websites, Ads Information and Privacy\",\n children: /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n \"aria-hidden\": \"true\",\n className: s.infoIcon,\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n })\n })\n ]\n });\n","'use client';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState, useEffect } from 'react';\nimport s from './tweet-actions.module.css';\nexport const TweetActionsCopy = ({ tweet })=>{\n const [copied, setCopied] = useState(false);\n const [copyAllText, setCopyAltText] = useState(false);\n const handleCopy = ()=>{\n navigator.clipboard.writeText(tweet.url);\n setCopied(true);\n };\n useEffect(()=>{\n if (copied) {\n const timeout = setTimeout(()=>{\n setCopied(false);\n setCopyAltText(true);\n }, 6000);\n return ()=>clearTimeout(timeout);\n }\n }, [\n copied\n ]);\n return /*#__PURE__*/ _jsxs(\"button\", {\n type: \"button\",\n className: s.copy,\n \"aria-label\": \"Copy link\",\n onClick: handleCopy,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.copyIconWrapper,\n children: copied ? /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n className: s.copyIcon,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n }) : /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n className: s.copyIcon,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: s.copyText,\n children: copied ? 'Copied!' : copyAllText ? 'Copy link to Tweet' : 'Copy link'\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { formatNumber } from '../utils.js';\nimport { TweetActionsCopy } from './tweet-actions-copy.js';\nimport s from './tweet-actions.module.css';\nexport const TweetActions = ({ tweet })=>{\n const favoriteCount = formatNumber(tweet.favorite_count);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: s.actions,\n children: [\n /*#__PURE__*/ _jsxs(\"a\", {\n className: s.like,\n href: tweet.like_url,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n \"aria-label\": `Like. This Tweet has ${favoriteCount} likes`,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.likeIconWrapper,\n children: /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n className: s.likeIcon,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: s.likeCount,\n children: favoriteCount\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"a\", {\n className: s.reply,\n href: tweet.reply_url,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n \"aria-label\": \"Reply to this Tweet on Twitter\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.replyIconWrapper,\n children: /*#__PURE__*/ _jsx(\"svg\", {\n viewBox: \"0 0 24 24\",\n className: s.replyIcon,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/ _jsx(\"g\", {\n children: /*#__PURE__*/ _jsx(\"path\", {\n 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\"\n })\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: s.replyText,\n children: \"Reply\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(TweetActionsCopy, {\n tweet: tweet\n })\n ]\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { formatNumber } from '../utils.js';\nimport s from './tweet-replies.module.css';\nexport const TweetReplies = ({ tweet })=>/*#__PURE__*/ _jsx(\"div\", {\n className: s.replies,\n children: /*#__PURE__*/ _jsx(\"a\", {\n className: s.link,\n href: tweet.url,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: s.text,\n children: tweet.conversation_count === 0 ? 'Read more on X' : tweet.conversation_count === 1 ? `Read ${formatNumber(tweet.conversation_count)} reply` : `Read ${formatNumber(tweet.conversation_count)} replies`\n })\n })\n });\n","'use client';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport s from './quoted-tweet-container.module.css';\nexport const QuotedTweetContainer = ({ tweet, children })=>/*#__PURE__*/ _jsx(\"div\", {\n className: s.root,\n onClick: (e)=>{\n e.preventDefault();\n window.open(tweet.url, '_blank');\n },\n children: /*#__PURE__*/ _jsx(\"article\", {\n className: s.article,\n children: children\n })\n });\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { AvatarImg } from '../avatar-img.js';\nimport s from './quoted-tweet-header.module.css';\nimport { VerifiedBadge } from '../verified-badge.js';\nexport const QuotedTweetHeader = ({ tweet })=>{\n const { user } = tweet;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: s.header,\n children: [\n /*#__PURE__*/ _jsx(\"a\", {\n href: tweet.url,\n className: s.avatar,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: clsx(s.avatarOverflow, user.profile_image_shape === 'Square' && s.avatarSquare),\n children: /*#__PURE__*/ _jsx(AvatarImg, {\n src: user.profile_image_url_https,\n alt: user.name,\n width: 20,\n height: 20\n })\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: s.author,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.authorText,\n children: /*#__PURE__*/ _jsx(\"span\", {\n title: user.name,\n children: user.name\n })\n }),\n /*#__PURE__*/ _jsx(VerifiedBadge, {\n user: user\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: s.username,\n children: /*#__PURE__*/ _jsxs(\"span\", {\n title: `@${user.screen_name}`,\n children: [\n \"@\",\n user.screen_name\n ]\n })\n })\n ]\n })\n ]\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport s from './quoted-tweet-body.module.css';\nexport const QuotedTweetBody = ({ tweet })=>/*#__PURE__*/ _jsx(\"p\", {\n className: s.root,\n children: tweet.entities.map((item, i)=>/*#__PURE__*/ _jsx(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.text\n }\n }, i))\n });\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { QuotedTweetContainer } from './quoted-tweet-container.js';\nimport { QuotedTweetHeader } from './quoted-tweet-header.js';\nimport { QuotedTweetBody } from './quoted-tweet-body.js';\nimport { TweetMedia } from '../tweet-media.js';\nexport const QuotedTweet = ({ tweet })=>{\n var _tweet_mediaDetails;\n return /*#__PURE__*/ _jsxs(QuotedTweetContainer, {\n tweet: tweet,\n children: [\n /*#__PURE__*/ _jsx(QuotedTweetHeader, {\n tweet: tweet\n }),\n /*#__PURE__*/ _jsx(QuotedTweetBody, {\n tweet: tweet\n }),\n ((_tweet_mediaDetails = tweet.mediaDetails) == null ? void 0 : _tweet_mediaDetails.length) ? /*#__PURE__*/ _jsx(TweetMedia, {\n quoted: true,\n tweet: tweet\n }) : null\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { TweetContainer } from './tweet-container.js';\nimport { TweetHeader } from './tweet-header.js';\nimport { TweetInReplyTo } from './tweet-in-reply-to.js';\nimport { TweetBody } from './tweet-body.js';\nimport { TweetMedia } from './tweet-media.js';\nimport { TweetInfo } from './tweet-info.js';\nimport { TweetActions } from './tweet-actions.js';\nimport { TweetReplies } from './tweet-replies.js';\nimport { QuotedTweet } from './quoted-tweet/index.js';\nimport { enrichTweet } from '../utils.js';\nimport { useMemo } from 'react';\nexport const EmbeddedTweet = ({ tweet: t, components })=>{\n var _tweet_mediaDetails;\n // useMemo does nothing for RSC but it helps when the component is used in the client (e.g by SWR)\n const tweet = useMemo(()=>enrichTweet(t), [\n t\n ]);\n return /*#__PURE__*/ _jsxs(TweetContainer, {\n children: [\n /*#__PURE__*/ _jsx(TweetHeader, {\n tweet: tweet,\n components: components\n }),\n tweet.in_reply_to_status_id_str && /*#__PURE__*/ _jsx(TweetInReplyTo, {\n tweet: tweet\n }),\n /*#__PURE__*/ _jsx(TweetBody, {\n tweet: tweet\n }),\n ((_tweet_mediaDetails = tweet.mediaDetails) == null ? void 0 : _tweet_mediaDetails.length) ? /*#__PURE__*/ _jsx(TweetMedia, {\n tweet: tweet,\n components: components\n }) : null,\n tweet.quoted_tweet && /*#__PURE__*/ _jsx(QuotedTweet, {\n tweet: tweet.quoted_tweet\n }),\n /*#__PURE__*/ _jsx(TweetInfo, {\n tweet: tweet\n }),\n /*#__PURE__*/ _jsx(TweetActions, {\n tweet: tweet\n }),\n /*#__PURE__*/ _jsx(TweetReplies, {\n tweet: tweet\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { TweetContainer } from './tweet-container.js';\nimport styles from './tweet-not-found.module.css';\nexport const TweetNotFound = (_props)=>/*#__PURE__*/ _jsx(TweetContainer, {\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: styles.root,\n children: [\n /*#__PURE__*/ _jsx(\"h3\", {\n children: \"Tweet not found\"\n }),\n /*#__PURE__*/ _jsx(\"p\", {\n children: \"The embedded tweet could not be found…\"\n })\n ]\n })\n });\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport styles from './skeleton.module.css';\nexport const Skeleton = ({ style })=>/*#__PURE__*/ _jsx(\"span\", {\n className: styles.skeleton,\n style: style\n });\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { TweetContainer } from './tweet-container.js';\nimport { Skeleton } from './skeleton.js';\nimport styles from './tweet-skeleton.module.css';\nexport const TweetSkeleton = ()=>/*#__PURE__*/ _jsxs(TweetContainer, {\n className: styles.root,\n children: [\n /*#__PURE__*/ _jsx(Skeleton, {\n style: {\n height: '3rem',\n marginBottom: '0.75rem'\n }\n }),\n /*#__PURE__*/ _jsx(Skeleton, {\n style: {\n height: '6rem',\n margin: '0.5rem 0'\n }\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n style: {\n borderTop: 'var(--tweet-border)',\n margin: '0.5rem 0'\n }\n }),\n /*#__PURE__*/ _jsx(Skeleton, {\n style: {\n height: '2rem'\n }\n }),\n /*#__PURE__*/ _jsx(Skeleton, {\n style: {\n height: '2rem',\n borderRadius: '9999px',\n marginTop: '0.5rem'\n }\n })\n ]\n });\n","const SYNDICATION_URL = 'https://cdn.syndication.twimg.com';\nexport class TwitterApiError extends Error {\n constructor({ message, status, data }){\n super(message);\n this.name = 'TwitterApiError';\n this.status = status;\n this.data = data;\n }\n}\nconst TWEET_ID = /^[0-9]+$/;\nfunction getToken(id) {\n return (Number(id) / 1e15 * Math.PI).toString(6 ** 2).replace(/(0+|\\.)/g, '');\n}\n/**\n * Fetches a tweet from the Twitter syndication API.\n */ export async function fetchTweet(id, fetchOptions) {\n var _res_headers_get;\n if (id.length > 40 || !TWEET_ID.test(id)) {\n throw new Error(`Invalid tweet id: ${id}`);\n }\n const url = new URL(`${SYNDICATION_URL}/tweet-result`);\n url.searchParams.set('id', id);\n url.searchParams.set('lang', 'en');\n url.searchParams.set('features', [\n 'tfw_timeline_list:',\n 'tfw_follower_count_sunset:true',\n 'tfw_tweet_edit_backend:on',\n 'tfw_refsrc_session:on',\n 'tfw_fosnr_soft_interventions_enabled:on',\n 'tfw_show_birdwatch_pivots_enabled:on',\n 'tfw_show_business_verified_badge:on',\n 'tfw_duplicate_scribes_to_settings:on',\n 'tfw_use_profile_image_shape_enabled:on',\n 'tfw_show_blue_verified_badge:on',\n 'tfw_legacy_timeline_sunset:true',\n 'tfw_show_gov_verified_badge:on',\n 'tfw_show_business_affiliate_badge:on',\n 'tfw_tweet_edit_frontend:on'\n ].join(';'));\n url.searchParams.set('token', getToken(id));\n const res = await fetch(url.toString(), fetchOptions);\n const isJson = (_res_headers_get = res.headers.get('content-type')) == null ? void 0 : _res_headers_get.includes('application/json');\n const data = isJson ? await res.json() : undefined;\n if (res.ok) {\n if ((data == null ? void 0 : data.__typename) === 'TweetTombstone') {\n return {\n tombstone: true\n };\n }\n return {\n data\n };\n }\n if (res.status === 404) {\n return {\n notFound: true\n };\n }\n throw new TwitterApiError({\n message: typeof data.error === 'string' ? data.error : `Failed to fetch tweet at \"${url}\" with \"${res.status}\".`,\n status: res.status,\n data\n });\n}\n","'use client';\nimport { useEffect, useState } from 'react';\nimport swr from 'swr';\nimport { TwitterApiError } from './api/index.js';\n// Avoids an error when used in the pages directory where useSWR might be in `default`.\nconst useSWR = swr.default || swr;\nconst host = 'https://react-tweet.vercel.app';\nasync function fetcher([url, fetchOptions]) {\n const res = await fetch(url, fetchOptions);\n const json = await res.json();\n // We return null in case `json.data` is undefined, that way we can check for \"loading\" by\n // checking if data is `undefined`. `null` means it was fetched.\n if (res.ok) return json.data || null;\n throw new TwitterApiError({\n message: `Failed to fetch tweet at \"${url}\" with \"${res.status}\".`,\n data: json,\n status: res.status\n });\n}\n/**\n * SWR hook for fetching a tweet in the browser.\n */ export const useTweet = (id, apiUrl, fetchOptions)=>{\n const { isLoading, data, error } = useSWR(()=>apiUrl || id ? [\n apiUrl || id && `${host}/api/tweet/${id}`,\n fetchOptions\n ] : null, fetcher, {\n revalidateIfStale: false,\n revalidateOnFocus: false,\n shouldRetryOnError: false\n });\n return {\n // If data is `undefined` then it might be the first render where SWR hasn't started doing\n // any work, so we set `isLoading` to `true`.\n isLoading: Boolean(isLoading || data === undefined && !error),\n data,\n error\n };\n};\nexport const useMounted = ()=>{\n const [mounted, setMounted] = useState(false);\n useEffect(()=>setMounted(true), []);\n return mounted;\n};\n","'use client';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { EmbeddedTweet, TweetNotFound, TweetSkeleton } from './twitter-theme/components.js';\nimport { useTweet } from './hooks.js';\nexport const Tweet = ({ id, apiUrl, fallback = /*#__PURE__*/ _jsx(TweetSkeleton, {}), components, fetchOptions, onError })=>{\n const { data, error, isLoading } = useTweet(id, apiUrl, fetchOptions);\n if (isLoading) return fallback;\n if (error || !data) {\n const NotFound = (components == null ? void 0 : components.TweetNotFound) || TweetNotFound;\n return /*#__PURE__*/ _jsx(NotFound, {\n error: onError ? onError(error) : error\n });\n }\n return /*#__PURE__*/ _jsx(EmbeddedTweet, {\n tweet: data,\n components: components\n });\n};\n"],"names":["Verified","jsxRuntimeExports","jsx","viewBox","role","className","s","children","d","VerifiedBusiness","jsxs","_jsxs","gradientUnits","id","x1","x2","y1","y2","_jsx","offset","stopColor","clipRule","fillRule","fill","VerifiedGovernment","TweetContainer","clsx","AvatarImg","props","VerifiedBadge","user","verified","is_blue_verified","verified_type","icon","iconClassName","TweetHeader","tweet","components","_components_AvatarImg","Img","href","url","target","rel","profile_image_shape","src","profile_image_url_https","alt","name","width","height","title","screen_name","follow_url","TweetInReplyTo","in_reply_to_url","in_reply_to_screen_name","TweetLink","TweetBody","entities","map","item","i","type","text","dangerouslySetInnerHTML","__html","getTweetUrl","id_str","getUserUrl","usernameOrTweet","getLikeUrl","getReplyUrl","getFollowUrl","getInReplyToUrl","in_reply_to_status_id_str","getMediaUrl","media","size","URL","media_url_https","extension","pathname","split","pop","replace","searchParams","set","toString","formatNumber","n","toFixed","getEntities","textMap","Array","from","result","indices","display_text_range","addEntities","hashtags","user_mentions","urls","symbols","lastEntity","at","fixRange","entity","slice","join","Object","assign","hashtag","expanded_url","display_url","symbol","entries","items","unshift","push","splice","TweetMediaVideo","playButton","setPlayButton","useState","isPlaying","setIsPlaying","ended","setEnded","mp4Video","mp4Videos","variants","video_info","filter","vid","content_type","sort","a","b","_b_bitrate","_a_bitrate","bitrate","getMp4Videos","length","getMp4Video","timeout","_Fragment","mediaStyles","poster","controls","muted","preload","tabIndex","onPlay","window","clearTimeout","onPause","setTimeout","onEnded","onClick","e","video","currentTarget","previousSibling","preventDefault","play","focus","MediaImg","getSkeletonStyle","itemCount","paddingBottom","original_info","TweetMedia","quoted","_tweet_mediaDetails","_tweet_mediaDetails1","_tweet_mediaDetails_length","mediaDetails","_components_MediaImg","Fragment","style","ext_alt_text","draggable","formatter","Intl","DateTimeFormat","hour","minute","hour12","weekday","month","day","year","TweetInfoCreatedAt","createdAt","Date","created_at","formattedCreatedAtDate","date","parts","part","value","partsArrayToObject","formatToParts","dayPeriod","formatDate","dateTime","toISOString","TweetInfo","TweetActionsCopy","copied","setCopied","copyAllText","setCopyAltText","useEffect","navigator","clipboard","writeText","TweetActions","favoriteCount","favorite_count","like_url","reply_url","TweetReplies","conversation_count","QuotedTweetContainer","open","QuotedTweetHeader","header","avatar","avatarOverflow","avatarSquare","author","authorText","username","QuotedTweetBody","QuotedTweet","EmbeddedTweet","t","useMemo","quoted_tweet","enrichTweet","TweetNotFound","_props","styles","Skeleton","TweetSkeleton","marginBottom","margin","borderTop","borderRadius","marginTop","TwitterApiError","Error","constructor","message","status","data","super","this","useSWR","swr","default","async","fetcher","fetchOptions","res","fetch","json","ok","Tweet","apiUrl","fallback","onError","error","isLoading","revalidateIfStale","revalid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