reactjs-tiptap-editor 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/lib/{ActionMenuButton-a8LhmHXe.js → ActionMenuButton-BOjCHFTA.js} +12 -16
  2. package/lib/ActionMenuButton-Df077oOH.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +47 -89
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +11 -14
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +13 -16
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +15 -18
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +113 -113
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +12 -14
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +8 -11
  17. package/lib/CodeBlock.cjs +37 -37
  18. package/lib/CodeBlock.js +1566 -1613
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +9 -11
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +62 -82
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +27 -15
  25. package/lib/Drawer-DwrlY_lY.cjs +1 -0
  26. package/lib/Drawer-DxOoRiGQ.js +1099 -0
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +6 -5
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +71 -97
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +265 -5
  33. package/lib/ExportPdf.cjs +4 -4
  34. package/lib/ExportPdf.js +20 -31
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +11 -11
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +16 -39
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +25 -41
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +51 -65
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +60 -76
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +322 -320
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +8 -11
  49. package/lib/{Iframe-CmjbQQcz.js → Iframe-AhNV5WH5.js} +52 -65
  50. package/lib/Iframe-C6pBw-AF.cjs +1 -0
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +5 -4
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +5 -5
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +148 -181
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +19 -26
  59. package/lib/{Indent-BoG-vpIE.js → Indent-DZ5PcJA4.js} +24 -30
  60. package/lib/Indent-Do-X0AsY.cjs +1 -0
  61. package/lib/Indent.cjs +1 -1
  62. package/lib/Indent.js +2 -2
  63. package/lib/Italic.cjs +1 -1
  64. package/lib/Italic.js +11 -14
  65. package/lib/Katex-CIC9ygbL.cjs +4 -0
  66. package/lib/{Katex-ByL9snce.js → Katex-bIgoenn_.js} +243 -262
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +5 -4
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +23 -34
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/LinkEditBlock-B0ZaACZO.cjs +5 -0
  74. package/lib/{LinkEditBlock-Ckih17pU.js → LinkEditBlock-D_cF9fnc.js} +324 -381
  75. package/lib/MarkdownPaste.cjs +58 -0
  76. package/lib/MarkdownPaste.js +1656 -0
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +22 -17
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +125 -154
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +28 -40
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +13 -16
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +114 -186
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +15 -14
  89. package/lib/SlashCommandNodeView-Ba03hlVZ.cjs +1 -0
  90. package/lib/{SlashCommandNodeView-B2g1MbgN.js → SlashCommandNodeView-cg0x3NRF.js} +72 -79
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +12 -15
  93. package/lib/{Table-BEwrZVup.js → Table-KqLiT5wG.js} +85 -125
  94. package/lib/Table-ddU2LSc6.cjs +9 -0
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +18 -21
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +65 -78
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +51 -77
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +7 -10
  105. package/lib/Twitter-BIiR78Jh.cjs +1 -0
  106. package/lib/{Twitter-4U_ZBhpv.js → Twitter-C1Lzqc7u.js} +567 -599
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +4 -3
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +5 -270
  111. package/lib/bubble.cjs +6 -4
  112. package/lib/bubble.js +3719 -3039
  113. package/lib/clsx-BWE7vnna.cjs +33 -0
  114. package/lib/clsx-eGVyq7ot.js +1062 -0
  115. package/lib/components/ActionButton.d.ts +2 -2
  116. package/lib/components/ActionMenuButton.d.ts +1 -1
  117. package/lib/components/Bubble/formatBubble.d.ts +5 -5
  118. package/lib/components/ReactBus.d.ts +11 -0
  119. package/lib/components/SlashDialogTrigger/RenderDialogUploadImage.d.ts +1 -0
  120. package/lib/components/SlashDialogTrigger/RenderDialogUploadVideo.d.ts +1 -0
  121. package/lib/components/SlashDialogTrigger/SlashDialogTrigger.d.ts +5 -0
  122. package/lib/components/ui/checkbox.d.ts +1 -1
  123. package/lib/components/ui/dialog.d.ts +1 -1
  124. package/lib/components/ui/dropdown-menu.d.ts +1 -1
  125. package/lib/components/ui/emoji-picker.d.ts +1 -1
  126. package/lib/components/ui/label.d.ts +1 -1
  127. package/lib/components/ui/popover.d.ts +1 -1
  128. package/lib/components/ui/select.d.ts +1 -1
  129. package/lib/components/ui/separator.d.ts +1 -1
  130. package/lib/components/ui/switch.d.ts +1 -1
  131. package/lib/components/ui/tabs.d.ts +1 -1
  132. package/lib/components/ui/toast.d.ts +1 -1
  133. package/lib/components/ui/toggle.d.ts +1 -1
  134. package/lib/components/ui/tooltip.d.ts +1 -1
  135. package/lib/{delete-node-IyVmiRbI.js → delete-node-eQHsyyhR.js} +3 -1
  136. package/lib/{dropdown-menu-CW3Kthwy.js → dropdown-menu-CexIkt_V.js} +8 -8
  137. package/lib/{dropdown-menu-eUeBXQeA.cjs → dropdown-menu-oSKIntXM.cjs} +1 -1
  138. package/lib/extensions/Blockquote/Blockquote.d.ts +1 -1
  139. package/lib/extensions/Bold/Bold.d.ts +1 -1
  140. package/lib/extensions/Code/Code.d.ts +1 -1
  141. package/lib/extensions/CodeView/CodeView.d.ts +2 -2
  142. package/lib/extensions/Heading/Heading.d.ts +1 -1
  143. package/lib/extensions/Highlight/Highlight.d.ts +1 -1
  144. package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +1 -1
  145. package/lib/extensions/ImportWord/ImportWord.d.ts +2 -2
  146. package/lib/extensions/Italic/Italic.d.ts +1 -1
  147. package/lib/extensions/Link/Link.d.ts +1 -1
  148. package/lib/extensions/MarkdownPaste/MarkdownPaste.d.ts +5 -0
  149. package/lib/extensions/MarkdownPaste/index.d.ts +1 -0
  150. package/lib/extensions/Mermaid/Mermaid.d.ts +1 -1
  151. package/lib/extensions/MoreMark/MoreMark.d.ts +1 -1
  152. package/lib/extensions/Strike/Strike.d.ts +1 -1
  153. package/lib/extensions/Table/Table.d.ts +1 -1
  154. package/lib/extensions/TextAlign/TextAlign.d.ts +1 -1
  155. package/lib/extensions/TextUnderline/TextUnderline.d.ts +1 -1
  156. package/lib/index-BUTn2LY6.cjs +1 -0
  157. package/lib/{index-C07N8gA1.js → index-BlXGgvT-.js} +21 -18
  158. package/lib/{index-CpTykZBR.js → index-BnW6t8z6.js} +23 -23
  159. package/lib/{index-BsFvo9PG.cjs → index-BqL4vAWE.cjs} +1 -1
  160. package/lib/index-BtxvYLJ1.cjs +12 -0
  161. package/lib/{index-DR5tIdL7.js → index-C6xmkxrQ.js} +232 -217
  162. package/lib/index-CJ9pyCM4.cjs +1 -0
  163. package/lib/{index-neeeY2o7.cjs → index-D0lc95kr.cjs} +3 -3
  164. package/lib/index-DHUN85fV.js +4855 -0
  165. package/lib/index-DUpSE1Gb.cjs +1 -0
  166. package/lib/index-D_8P0LE5.js +1362 -0
  167. package/lib/{index-4bHF5ovf.js → index-RIXs7STX.js} +1 -1
  168. package/lib/index-mfGK4pFo.js +6469 -0
  169. package/lib/index-zig3Dj7A.cjs +22 -0
  170. package/lib/index.cjs +3 -3
  171. package/lib/index.js +60 -72
  172. package/lib/locale-bundle.cjs +1 -1
  173. package/lib/locale-bundle.js +1 -1
  174. package/lib/plugins/image-upload.d.ts +1 -1
  175. package/lib/popover-BYSZ3zBi.js +24 -0
  176. package/lib/popover-BcHDZqBt.cjs +1 -0
  177. package/lib/{renderNodeView-CSazLrKF.js → renderNodeView-BrM5kUj_.js} +2 -2
  178. package/lib/{renderNodeView-DfLmGrgA.cjs → renderNodeView-D1zydtli.cjs} +1 -1
  179. package/lib/{select-F0ZZ3VZB.js → select-C5SHDLFj.js} +8 -5
  180. package/lib/{select-Doa_-jkZ.cjs → select-DHjzKkcu.cjs} +1 -1
  181. package/lib/separator-BmixLrnJ.cjs +1 -0
  182. package/lib/separator-CFKVxAea.js +293 -0
  183. package/lib/store/editor.d.ts +1 -1
  184. package/lib/store/store.d.ts +2 -22
  185. package/lib/style.css +1 -1
  186. package/lib/{textarea-BAolHF_W.cjs → textarea-CasDcv3u.cjs} +1 -1
  187. package/lib/{textarea-tOsPnxHf.js → textarea-DNLrJoRl.js} +1 -1
  188. package/lib/theme.js +1 -1
  189. package/lib/types.d.ts +3 -3
  190. package/lib/updatePosition-CBRjbQMH.js +16 -0
  191. package/lib/updatePosition-CfmY5Trk.cjs +1 -0
  192. package/lib/utils/checkIsVideoUrl.d.ts +1 -0
  193. package/lib/utils/columns.d.ts +1 -1
  194. package/lib/utils/customEvents/events.constant.d.ts +1 -0
  195. package/lib/utils/mitt.d.ts +6 -3
  196. package/lib/utils/pdf.d.ts +1 -1
  197. package/lib/utils/utils.d.ts +1 -1
  198. package/package.json +262 -247
  199. package/lib/ActionMenuButton-BYu0NyVo.cjs +0 -1
  200. package/lib/Drawer-CbOJ1Igo.js +0 -1379
  201. package/lib/Drawer-DNaDMoAk.cjs +0 -1
  202. package/lib/Excalidraw-DnHTVOj8.js +0 -355
  203. package/lib/Excalidraw-DxfO1lQ_.cjs +0 -1
  204. package/lib/Icon-C0TJMAOm.js +0 -12
  205. package/lib/Icon-DzK0_ztP.cjs +0 -1
  206. package/lib/Iframe-BSNCsofW.cjs +0 -1
  207. package/lib/Image-BZEFuS0P.js +0 -925
  208. package/lib/Image-iKsGKjvg.cjs +0 -1
  209. package/lib/Indent-Bou16OcB.cjs +0 -1
  210. package/lib/Katex-BqDocr3a.cjs +0 -4
  211. package/lib/LinkEditBlock-B0I0EUrt.cjs +0 -5
  212. package/lib/SlashCommandNodeView-BEJhEzba.cjs +0 -1
  213. package/lib/Table-BclWwp6P.cjs +0 -9
  214. package/lib/Twitter-Dtq6PEMC.cjs +0 -1
  215. package/lib/button-Bwn6gUuS.js +0 -43
  216. package/lib/button-CqJztfH2.cjs +0 -1
  217. package/lib/checkbox-BAzbZY2Y.cjs +0 -1
  218. package/lib/checkbox-B_rpz5Xq.js +0 -27
  219. package/lib/clsx-CXbNJWDD.cjs +0 -54
  220. package/lib/clsx-DSzxBzvL.js +0 -7391
  221. package/lib/dialog-CJvpoeMm.js +0 -101
  222. package/lib/dialog-CWYTvz5J.cjs +0 -1
  223. package/lib/events.constant-Dq21NPdV.cjs +0 -1
  224. package/lib/events.constant-do95b767.js +0 -21
  225. package/lib/extensions/Image/store.d.ts +0 -4
  226. package/lib/extensions/Video/store.d.ts +0 -4
  227. package/lib/file-BLas99n7.js +0 -43
  228. package/lib/file-i7e4nQY2.cjs +0 -1
  229. package/lib/index-BCzvbrf5.cjs +0 -12
  230. package/lib/index-CL7JP-Xz.js +0 -426
  231. package/lib/index-CjhjjJsN.cjs +0 -1
  232. package/lib/index-Cn-t3Zxw.cjs +0 -1
  233. package/lib/index-Cs6cp0Y6.cjs +0 -1
  234. package/lib/index-D8li6EQ4.js +0 -1351
  235. package/lib/index-DoiuU6VA.js +0 -2315
  236. package/lib/index-VhKd73hZ.cjs +0 -1
  237. package/lib/input-B1egKb-t.js +0 -21
  238. package/lib/input-ZGRt7lWR.cjs +0 -1
  239. package/lib/isNumber-BTYSVlKo.cjs +0 -1
  240. package/lib/isNumber-ClwLypY2.js +0 -15
  241. package/lib/label-Cjrzc5H2.js +0 -19
  242. package/lib/label-tzSPdqui.cjs +0 -1
  243. package/lib/popover-C6Cya3Cz.cjs +0 -1
  244. package/lib/popover-CeY3RbI5.js +0 -24
  245. package/lib/separator-CUh5Y7Rh.cjs +0 -1
  246. package/lib/separator-Cjn4YH8a.js +0 -329
  247. package/lib/store/fast-context.d.ts +0 -7
  248. package/lib/store-BsJz5QRC.js +0 -10
  249. package/lib/store-DjkMIIEN.cjs +0 -1
  250. package/lib/tabs-BP8ypR_m.cjs +0 -1
  251. package/lib/tabs-CBDjOLl_.js +0 -46
  252. package/lib/throttle-D040PfWL.js +0 -249
  253. package/lib/throttle-gTTvqDTW.cjs +0 -1
  254. package/lib/toggle-C_SSvDRy.cjs +0 -1
  255. package/lib/toggle-DEerYRil.js +0 -99
  256. package/lib/tooltip-BJIvosho.js +0 -24
  257. package/lib/tooltip-FS1rsvd3.cjs +0 -1
  258. package/lib/updatePosition-CDK7OR0i.js +0 -16
  259. package/lib/updatePosition-Cjuj2E26.cjs +0 -1
  260. package/lib/useButtonProps-CtZCbMQu.js +0 -136
  261. package/lib/useButtonProps-Cz4W5dC8.cjs +0 -1
  262. package/lib/utils/_event.d.ts +0 -13
  263. package/lib/utils/customEvents/customEvents.d.ts +0 -3
@@ -1,33 +1,28 @@
1
- import { j as U, aa as rt, h as Mt, N as jt, m as Wt, ab as Bt, k as Ft } from "./clsx-DSzxBzvL.js";
2
- import { jsx as r, jsxs as h, Fragment as Pt } from "react/jsx-runtime";
3
- import Be, { useState as se, Fragment as Ut, useEffect as Fe, useMemo as Pe, createContext as zt, useLayoutEffect as Ht, useContext as Gt, useRef as K, useCallback as Te, useDebugValue as Xt } from "react";
4
- import { A as Kt } from "./toggle-DEerYRil.js";
5
- import "./index-DoiuU6VA.js";
1
+ import { N as jt, m as Wt, a5 as Bt } from "./index-mfGK4pFo.js";
2
+ import { c as U, s as ot, N as Ft, a as Pt } from "./clsx-eGVyq7ot.js";
3
+ import { jsx as r, jsxs as h, Fragment as Ut } from "react/jsx-runtime";
4
+ import Ue, { useState as se, Fragment as zt, useEffect as ze, useMemo as He, createContext as Ht, useLayoutEffect as Gt, useContext as Xt, useRef as z, useCallback as Re, useDebugValue as Kt } from "react";
5
+ import { L as Qt, j as Jt, B as Yt, h as Zt, u as en, d as tn, A as nn, I as rn } from "./index-DHUN85fV.js";
6
6
  import "./theme.js";
7
- import { u as Qt } from "./index-C07N8gA1.js";
8
- import { L as Jt } from "./label-Cjrzc5H2.js";
9
- import { I as Yt } from "./input-B1egKb-t.js";
10
- import { B as Zt } from "./button-Bwn6gUuS.js";
11
- import { c as en, u as tn, a as nn } from "./useButtonProps-CtZCbMQu.js";
12
- import { P as rn, a as on, b as an } from "./popover-CeY3RbI5.js";
13
- import { I as sn } from "./Icon-C0TJMAOm.js";
14
- const cn = "_verified_lvyh0_1", Ue = {
15
- verified: cn
16
- }, ln = () => /* @__PURE__ */ r("svg", {
7
+ import { u as on } from "./index-BlXGgvT-.js";
8
+ import { P as an, a as sn, b as cn } from "./popover-BYSZ3zBi.js";
9
+ const ln = "_verified_lvyh0_1", Ge = {
10
+ verified: ln
11
+ }, dn = () => /* @__PURE__ */ r("svg", {
17
12
  viewBox: "0 0 24 24",
18
13
  "aria-label": "Verified account",
19
14
  role: "img",
20
- className: Ue.verified,
15
+ className: Ge.verified,
21
16
  children: /* @__PURE__ */ r("g", {
22
17
  children: /* @__PURE__ */ r("path", {
23
18
  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"
24
19
  })
25
20
  })
26
- }), dn = () => /* @__PURE__ */ r("svg", {
21
+ }), un = () => /* @__PURE__ */ r("svg", {
27
22
  viewBox: "0 0 22 22",
28
23
  "aria-label": "Verified account",
29
24
  role: "img",
30
- className: Ue.verified,
25
+ className: Ge.verified,
31
26
  children: /* @__PURE__ */ h("g", {
32
27
  children: [
33
28
  /* @__PURE__ */ h("linearGradient", {
@@ -102,11 +97,11 @@ const cn = "_verified_lvyh0_1", Ue = {
102
97
  })
103
98
  ]
104
99
  })
105
- }), un = () => /* @__PURE__ */ r("svg", {
100
+ }), fn = () => /* @__PURE__ */ r("svg", {
106
101
  viewBox: "0 0 22 22",
107
102
  "aria-label": "Verified account",
108
103
  role: "img",
109
- className: Ue.verified,
104
+ className: Ge.verified,
110
105
  children: /* @__PURE__ */ r("g", {
111
106
  children: /* @__PURE__ */ r("path", {
112
107
  clipRule: "evenodd",
@@ -114,71 +109,71 @@ const cn = "_verified_lvyh0_1", Ue = {
114
109
  fillRule: "evenodd"
115
110
  })
116
111
  })
117
- }), fn = "_root_98iqw_1", hn = "_article_98iqw_21", ot = {
118
- root: fn,
119
- article: hn
120
- }, ze = ({ className: e, children: t }) => /* @__PURE__ */ r("div", {
121
- className: U("react-tweet-theme", ot.root, e),
112
+ }), hn = "_root_98iqw_1", _n = "_article_98iqw_21", at = {
113
+ root: hn,
114
+ article: _n
115
+ }, Xe = ({ className: e, children: t }) => /* @__PURE__ */ r("div", {
116
+ className: U("react-tweet-theme", at.root, e),
122
117
  children: /* @__PURE__ */ r("article", {
123
- className: ot.article,
118
+ className: at.article,
124
119
  children: t
125
120
  })
126
- }), vt = (e) => /* @__PURE__ */ r("img", {
121
+ }), gt = (e) => /* @__PURE__ */ r("img", {
127
122
  ...e
128
- }), _n = "_verifiedOld_lcna5_1", mn = "_verifiedBlue_lcna5_4", pn = "_verifiedGovernment_lcna5_7", xe = {
129
- verifiedOld: _n,
130
- verifiedBlue: mn,
131
- verifiedGovernment: pn
132
- }, gt = ({ user: e, className: t }) => {
123
+ }), mn = "_verifiedOld_lcna5_1", pn = "_verifiedBlue_lcna5_4", vn = "_verifiedGovernment_lcna5_7", Ie = {
124
+ verifiedOld: mn,
125
+ verifiedBlue: pn,
126
+ verifiedGovernment: vn
127
+ }, wt = ({ user: e, className: t }) => {
133
128
  const n = e.verified || e.is_blue_verified || e.verified_type;
134
- let o = /* @__PURE__ */ r(ln, {}), a = xe.verifiedBlue;
129
+ let o = /* @__PURE__ */ r(dn, {}), a = Ie.verifiedBlue;
135
130
  if (n)
136
- switch (e.is_blue_verified || (a = xe.verifiedOld), e.verified_type) {
131
+ switch (e.is_blue_verified || (a = Ie.verifiedOld), e.verified_type) {
137
132
  case "Government":
138
- o = /* @__PURE__ */ r(un, {}), a = xe.verifiedGovernment;
133
+ o = /* @__PURE__ */ r(fn, {}), a = Ie.verifiedGovernment;
139
134
  break;
140
135
  case "Business":
141
- o = /* @__PURE__ */ r(dn, {}), a = null;
136
+ o = /* @__PURE__ */ r(un, {}), a = null;
142
137
  break;
143
138
  }
144
139
  return n ? /* @__PURE__ */ r("div", {
145
140
  className: U(t, a),
146
141
  children: o
147
142
  }) : null;
148
- }, vn = "_label_36ucz_1", gn = {
149
- label: vn
150
- }, wt = ({ user: e, className: t }) => {
143
+ }, gn = "_label_36ucz_1", wn = {
144
+ label: gn
145
+ }, yt = ({ user: e, className: t }) => {
151
146
  var n;
152
147
  const o = e.highlighted_label;
153
148
  if (!o) return null;
154
149
  const a = (n = o.badge) == null ? void 0 : n.url;
155
150
  return a ? /* @__PURE__ */ r("div", {
156
- className: U(gn.label, t),
151
+ className: U(wn.label, t),
157
152
  children: /* @__PURE__ */ r("img", {
158
153
  src: a,
159
154
  alt: o.description
160
155
  })
161
156
  }) : null;
162
- }, wn = "_header_nqq4j_1", yn = "_avatar_nqq4j_11", bn = "_avatarOverflow_nqq4j_16", Tn = "_avatarSquare_nqq4j_23", xn = "_avatarShadow_nqq4j_26", Nn = "_author_nqq4j_37", In = "_authorLink_nqq4j_44", Rn = "_authorVerified_nqq4j_53", Sn = "_authorLinkText_nqq4j_56", kn = "_authorMeta_nqq4j_63", En = "_authorFollow_nqq4j_66", Cn = "_username_nqq4j_69", On = "_follow_nqq4j_74", Ln = "_separator_nqq4j_82", $n = "_brand_nqq4j_86", qn = "_twitterIcon_nqq4j_90", N = {
163
- header: wn,
164
- avatar: yn,
165
- avatarOverflow: bn,
166
- avatarSquare: Tn,
167
- avatarShadow: xn,
168
- author: Nn,
157
+ }, yn = "_header_nqq4j_1", bn = "_avatar_nqq4j_11", Tn = "_avatarOverflow_nqq4j_16", xn = "_avatarSquare_nqq4j_23", Nn = "_avatarShadow_nqq4j_26", Rn = "_author_nqq4j_37", In = "_authorLink_nqq4j_44", Sn = "_authorVerified_nqq4j_53", kn = "_authorLinkText_nqq4j_56", En = "_authorMeta_nqq4j_63", Cn = "_authorFollow_nqq4j_66", On = "_username_nqq4j_69", Ln = "_follow_nqq4j_74", qn = "_separator_nqq4j_82", $n = "_brand_nqq4j_86", Dn = "_twitterIcon_nqq4j_90", N = {
158
+ header: yn,
159
+ avatar: bn,
160
+ avatarOverflow: Tn,
161
+ avatarSquare: xn,
162
+ avatarShadow: Nn,
163
+ author: Rn,
169
164
  authorLink: In,
170
- authorVerified: Rn,
171
- authorLinkText: Sn,
172
- authorMeta: kn,
173
- authorFollow: En,
174
- username: Cn,
175
- follow: On,
176
- separator: Ln,
165
+ authorVerified: Sn,
166
+ authorLinkText: kn,
167
+ authorMeta: En,
168
+ authorFollow: Cn,
169
+ username: On,
170
+ follow: Ln,
171
+ separator: qn,
177
172
  brand: $n,
178
- twitterIcon: qn
179
- }, Dn = ({ tweet: e, components: t }) => {
173
+ twitterIcon: Dn
174
+ }, An = ({ tweet: e, components: t }) => {
180
175
  var n;
181
- const o = (n = t == null ? void 0 : t.AvatarImg) != null ? n : vt, { user: a } = e;
176
+ const o = (n = t == null ? void 0 : t.AvatarImg) != null ? n : gt, { user: a } = e;
182
177
  return /* @__PURE__ */ h("div", {
183
178
  className: N.header,
184
179
  children: [
@@ -221,11 +216,11 @@ const cn = "_verified_lvyh0_1", Ue = {
221
216
  children: a.name
222
217
  })
223
218
  }),
224
- /* @__PURE__ */ r(gt, {
219
+ /* @__PURE__ */ r(wt, {
225
220
  user: a,
226
221
  className: N.authorVerified
227
222
  }),
228
- /* @__PURE__ */ r(wt, {
223
+ /* @__PURE__ */ r(yt, {
229
224
  user: a
230
225
  })
231
226
  ]
@@ -285,29 +280,29 @@ const cn = "_verified_lvyh0_1", Ue = {
285
280
  })
286
281
  ]
287
282
  });
288
- }, An = "_root_1ec15_1", Vn = {
289
- root: An
290
- }, Mn = ({ tweet: e }) => /* @__PURE__ */ h("a", {
283
+ }, Vn = "_root_1ec15_1", Mn = {
284
+ root: Vn
285
+ }, jn = ({ tweet: e }) => /* @__PURE__ */ h("a", {
291
286
  href: e.in_reply_to_url,
292
- className: Vn.root,
287
+ className: Mn.root,
293
288
  target: "_blank",
294
289
  rel: "noopener noreferrer",
295
290
  children: [
296
291
  "Replying to @",
297
292
  e.in_reply_to_screen_name
298
293
  ]
299
- }), jn = "_root_eihfa_1", Wn = {
300
- root: jn
301
- }, yt = ({ href: e, children: t }) => /* @__PURE__ */ r("a", {
294
+ }), Wn = "_root_eihfa_1", Bn = {
295
+ root: Wn
296
+ }, bt = ({ href: e, children: t }) => /* @__PURE__ */ r("a", {
302
297
  href: e,
303
- className: Wn.root,
298
+ className: Bn.root,
304
299
  target: "_blank",
305
300
  rel: "noopener noreferrer nofollow",
306
301
  children: t
307
- }), Bn = "_root_1xq52_1", Fn = {
308
- root: Bn
309
- }, Pn = ({ tweet: e }) => /* @__PURE__ */ h("p", {
310
- className: Fn.root,
302
+ }), Fn = "_root_1xq52_1", Pn = {
303
+ root: Fn
304
+ }, Un = ({ tweet: e }) => /* @__PURE__ */ h("p", {
305
+ className: Pn.root,
311
306
  lang: e.lang,
312
307
  dir: "auto",
313
308
  children: [
@@ -317,7 +312,7 @@ const cn = "_verified_lvyh0_1", Ue = {
317
312
  case "mention":
318
313
  case "url":
319
314
  case "symbol":
320
- return /* @__PURE__ */ r(yt, {
315
+ return /* @__PURE__ */ r(bt, {
321
316
  href: t.href,
322
317
  children: t.text
323
318
  }, n);
@@ -331,13 +326,13 @@ const cn = "_verified_lvyh0_1", Ue = {
331
326
  }, n);
332
327
  }
333
328
  }),
334
- e.note_tweet ? /* @__PURE__ */ r(Un, {
329
+ e.note_tweet ? /* @__PURE__ */ r(zn, {
335
330
  tweet: e
336
331
  }) : null
337
332
  ]
338
333
  });
339
- function Un({ tweet: e }) {
340
- return /* @__PURE__ */ h(yt, {
334
+ function zn({ tweet: e }) {
335
+ return /* @__PURE__ */ h(bt, {
341
336
  href: e.url,
342
337
  children: [
343
338
  /* @__PURE__ */ r("span", {
@@ -347,7 +342,7 @@ function Un({ tweet: e }) {
347
342
  ]
348
343
  });
349
344
  }
350
- const zn = {
345
+ const Hn = {
351
346
  hour: "numeric",
352
347
  minute: "2-digit",
353
348
  hour12: !0,
@@ -355,45 +350,45 @@ const zn = {
355
350
  month: "short",
356
351
  day: "numeric",
357
352
  year: "numeric"
358
- }, Hn = new Intl.DateTimeFormat("en-US", zn), Gn = (e) => {
353
+ }, Gn = new Intl.DateTimeFormat("en-US", Hn), Xn = (e) => {
359
354
  const t = {};
360
355
  for (const n of e)
361
356
  t[n.type] = n.value;
362
357
  return t;
363
- }, Xn = (e) => {
364
- const t = Gn(Hn.formatToParts(e)), n = `${t.hour}:${t.minute} ${t.dayPeriod}`, o = `${t.month} ${t.day}, ${t.year}`;
358
+ }, Kn = (e) => {
359
+ const t = Xn(Gn.formatToParts(e)), n = `${t.hour}:${t.minute} ${t.dayPeriod}`, o = `${t.month} ${t.day}, ${t.year}`;
365
360
  return `${n} · ${o}`;
366
- }, at = (e) => `https://x.com/${e.user.screen_name}/status/${e.id_str}`, bt = (e) => `https://x.com/${typeof e == "string" ? e : e.user.screen_name}`, Kn = (e) => `https://x.com/intent/like?tweet_id=${e.id_str}`, Qn = (e) => `https://x.com/intent/tweet?in_reply_to=${e.id_str}`, Jn = (e) => `https://x.com/intent/follow?screen_name=${e.user.screen_name}`, Yn = (e) => `https://x.com/hashtag/${e.text}`, Zn = (e) => `https://x.com/search?q=%24${e.text}`, er = (e) => `https://x.com/${e.in_reply_to_screen_name}/status/${e.in_reply_to_status_id_str}`, Tt = (e, t) => {
361
+ }, st = (e) => `https://x.com/${e.user.screen_name}/status/${e.id_str}`, Tt = (e) => `https://x.com/${typeof e == "string" ? e : e.user.screen_name}`, Qn = (e) => `https://x.com/intent/like?tweet_id=${e.id_str}`, Jn = (e) => `https://x.com/intent/tweet?in_reply_to=${e.id_str}`, Yn = (e) => `https://x.com/intent/follow?screen_name=${e.user.screen_name}`, Zn = (e) => `https://x.com/hashtag/${e.text}`, er = (e) => `https://x.com/search?q=%24${e.text}`, tr = (e) => `https://x.com/${e.in_reply_to_screen_name}/status/${e.in_reply_to_status_id_str}`, xt = (e, t) => {
367
362
  const n = new URL(e.media_url_https), o = n.pathname.split(".").pop();
368
363
  return o ? (n.pathname = n.pathname.replace(`.${o}`, ""), n.searchParams.set("format", o), n.searchParams.set("name", t), n.toString()) : e.media_url_https;
369
- }, tr = (e) => {
364
+ }, nr = (e) => {
370
365
  const { variants: t } = e.video_info;
371
366
  return t.filter((o) => o.content_type === "video/mp4").sort((o, a) => {
372
367
  var i, s;
373
368
  return ((i = a.bitrate) != null ? i : 0) - ((s = o.bitrate) != null ? s : 0);
374
369
  });
375
- }, nr = (e) => {
376
- const t = tr(e);
370
+ }, rr = (e) => {
371
+ const t = nr(e);
377
372
  return t.length > 1 ? t[1] : t[0];
378
- }, Le = (e) => e > 999999 ? `${(e / 1e6).toFixed(1)}M` : e > 999 ? `${(e / 1e3).toFixed(1)}K` : e.toString();
379
- function st(e) {
373
+ }, De = (e) => e > 999999 ? `${(e / 1e6).toFixed(1)}M` : e > 999 ? `${(e / 1e3).toFixed(1)}K` : e.toString();
374
+ function it(e) {
380
375
  const t = Array.from(e.text), n = [
381
376
  {
382
377
  indices: e.display_text_range,
383
378
  type: "text"
384
379
  }
385
380
  ];
386
- return de(n, "hashtag", e.entities.hashtags), de(n, "mention", e.entities.user_mentions), de(n, "url", e.entities.urls), de(n, "symbol", e.entities.symbols), e.entities.media && de(n, "media", e.entities.media), rr(e, n), n.map((o) => {
381
+ return he(n, "hashtag", e.entities.hashtags), he(n, "mention", e.entities.user_mentions), he(n, "url", e.entities.urls), he(n, "symbol", e.entities.symbols), e.entities.media && he(n, "media", e.entities.media), or(e, n), n.map((o) => {
387
382
  const a = t.slice(o.indices[0], o.indices[1]).join("");
388
383
  switch (o.type) {
389
384
  case "hashtag":
390
385
  return Object.assign(o, {
391
- href: Yn(o),
386
+ href: Zn(o),
392
387
  text: a
393
388
  });
394
389
  case "mention":
395
390
  return Object.assign(o, {
396
- href: bt(o.screen_name),
391
+ href: Tt(o.screen_name),
397
392
  text: a
398
393
  });
399
394
  case "url":
@@ -404,7 +399,7 @@ function st(e) {
404
399
  });
405
400
  case "symbol":
406
401
  return Object.assign(o, {
407
- href: Zn(o),
402
+ href: er(o),
408
403
  text: a
409
404
  });
410
405
  default:
@@ -414,7 +409,7 @@ function st(e) {
414
409
  }
415
410
  });
416
411
  }
417
- function de(e, t, n) {
412
+ function he(e, t, n) {
418
413
  for (const o of n)
419
414
  for (const [a, i] of e.entries()) {
420
415
  if (i.indices[0] > o.indices[0] || i.indices[1] < o.indices[1])
@@ -441,63 +436,63 @@ function de(e, t, n) {
441
436
  break;
442
437
  }
443
438
  }
444
- function rr(e, t) {
439
+ function or(e, t) {
445
440
  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]);
446
441
  const n = t.at(-1);
447
442
  n && n.indices[1] > e.display_text_range[1] && (n.indices[1] = e.display_text_range[1]);
448
443
  }
449
- const or = (e) => ({
444
+ const ar = (e) => ({
450
445
  ...e,
451
- url: at(e),
446
+ url: st(e),
452
447
  user: {
453
448
  ...e.user,
454
- url: bt(e),
455
- follow_url: Jn(e)
449
+ url: Tt(e),
450
+ follow_url: Yn(e)
456
451
  },
457
- like_url: Kn(e),
458
- reply_url: Qn(e),
459
- in_reply_to_url: e.in_reply_to_screen_name ? er(e) : void 0,
460
- entities: st(e),
452
+ like_url: Qn(e),
453
+ reply_url: Jn(e),
454
+ in_reply_to_url: e.in_reply_to_screen_name ? tr(e) : void 0,
455
+ entities: it(e),
461
456
  quoted_tweet: e.quoted_tweet ? {
462
457
  ...e.quoted_tweet,
463
- url: at(e.quoted_tweet),
464
- entities: st(e.quoted_tweet)
458
+ url: st(e.quoted_tweet),
459
+ entities: it(e.quoted_tweet)
465
460
  } : void 0
466
- }), ar = "_root_g9tkv_1", sr = "_rounded_g9tkv_6", ir = "_mediaWrapper_g9tkv_10", cr = "_grid2Columns_g9tkv_17", lr = "_grid3_g9tkv_20", dr = "_grid2x2_g9tkv_23", ur = "_mediaContainer_g9tkv_26", fr = "_mediaLink_g9tkv_34", hr = "_skeleton_g9tkv_38", _r = "_image_g9tkv_43", C = {
467
- root: ar,
468
- rounded: sr,
469
- mediaWrapper: ir,
470
- grid2Columns: cr,
471
- grid3: lr,
472
- grid2x2: dr,
473
- mediaContainer: ur,
474
- mediaLink: fr,
475
- skeleton: hr,
476
- image: _r
477
- }, mr = "_anchor_fp31d_1", pr = "_videoButton_fp31d_17", vr = "_videoButtonIcon_fp31d_35", gr = "_watchOnTwitter_fp31d_44", wr = "_viewReplies_fp31d_60", ae = {
478
- anchor: mr,
479
- videoButton: pr,
480
- videoButtonIcon: vr,
481
- watchOnTwitter: gr,
482
- viewReplies: wr
483
- }, yr = ({ tweet: e, media: t }) => {
484
- const [n, o] = se(!0), [a, i] = se(!1), [s, c] = se(!1), f = nr(t);
485
- let d = 0;
486
- return /* @__PURE__ */ h(Pt, {
461
+ }), sr = "_root_g9tkv_1", ir = "_rounded_g9tkv_6", cr = "_mediaWrapper_g9tkv_10", lr = "_grid2Columns_g9tkv_17", dr = "_grid3_g9tkv_20", ur = "_grid2x2_g9tkv_23", fr = "_mediaContainer_g9tkv_26", hr = "_mediaLink_g9tkv_34", _r = "_skeleton_g9tkv_38", mr = "_image_g9tkv_43", E = {
462
+ root: sr,
463
+ rounded: ir,
464
+ mediaWrapper: cr,
465
+ grid2Columns: lr,
466
+ grid3: dr,
467
+ grid2x2: ur,
468
+ mediaContainer: fr,
469
+ mediaLink: hr,
470
+ skeleton: _r,
471
+ image: mr
472
+ }, pr = "_anchor_fp31d_1", vr = "_videoButton_fp31d_17", gr = "_videoButtonIcon_fp31d_35", wr = "_watchOnTwitter_fp31d_44", yr = "_viewReplies_fp31d_60", ae = {
473
+ anchor: pr,
474
+ videoButton: vr,
475
+ videoButtonIcon: gr,
476
+ watchOnTwitter: wr,
477
+ viewReplies: yr
478
+ }, br = ({ tweet: e, media: t }) => {
479
+ const [n, o] = se(!0), [a, i] = se(!1), [s, c] = se(!1), f = rr(t);
480
+ let u = 0;
481
+ return /* @__PURE__ */ h(Ut, {
487
482
  children: [
488
483
  /* @__PURE__ */ r("video", {
489
- className: C.image,
490
- poster: Tt(t, "small"),
484
+ className: E.image,
485
+ poster: xt(t, "small"),
491
486
  controls: !n,
492
487
  playsInline: !0,
493
488
  preload: "none",
494
489
  tabIndex: n ? -1 : 0,
495
490
  onPlay: () => {
496
- d && window.clearTimeout(d), a || i(!0), s && c(!1);
491
+ u && window.clearTimeout(u), a || i(!0), s && c(!1);
497
492
  },
498
493
  onPause: () => {
499
- d && window.clearTimeout(d), d = window.setTimeout(() => {
500
- a && i(!1), d = 0;
494
+ u && window.clearTimeout(u), u = window.setTimeout(() => {
495
+ a && i(!1), u = 0;
501
496
  }, 100);
502
497
  },
503
498
  onEnded: () => {
@@ -512,12 +507,12 @@ const or = (e) => ({
512
507
  type: "button",
513
508
  className: ae.videoButton,
514
509
  "aria-label": "View video on X",
515
- onClick: (g) => {
516
- const m = g.currentTarget.previousSibling;
517
- g.preventDefault(), o(!1), m.load(), m.play().then(() => {
510
+ onClick: (v) => {
511
+ const m = v.currentTarget.previousSibling;
512
+ v.preventDefault(), o(!1), m.load(), m.play().then(() => {
518
513
  i(!0), m.focus();
519
- }).catch((b) => {
520
- console.error("Error playing video:", b), o(!0), i(!1);
514
+ }).catch((T) => {
515
+ console.error("Error playing video:", T), o(!0), i(!1);
521
516
  });
522
517
  },
523
518
  children: /* @__PURE__ */ r("svg", {
@@ -550,63 +545,63 @@ const or = (e) => ({
550
545
  })
551
546
  ]
552
547
  });
553
- }, br = (e) => /* @__PURE__ */ r("img", {
548
+ }, Tr = (e) => /* @__PURE__ */ r("img", {
554
549
  ...e
555
- }), it = (e, t) => {
550
+ }), ct = (e, t) => {
556
551
  let n = 56.25;
557
552
  return t === 1 && (n = 100 / e.original_info.width * e.original_info.height), t === 2 && (n = n * 2), {
558
553
  width: e.type === "photo" ? void 0 : "unset",
559
554
  paddingBottom: `${n}%`
560
555
  };
561
- }, xt = ({ tweet: e, components: t, quoted: n }) => {
556
+ }, Nt = ({ tweet: e, components: t, quoted: n }) => {
562
557
  var o, a, i;
563
558
  const s = (i = (o = e.mediaDetails) == null ? void 0 : o.length) != null ? i : 0;
564
559
  var c;
565
- const f = (c = t == null ? void 0 : t.MediaImg) != null ? c : br;
560
+ const f = (c = t == null ? void 0 : t.MediaImg) != null ? c : Tr;
566
561
  return /* @__PURE__ */ r("div", {
567
- className: U(C.root, !n && C.rounded),
562
+ className: U(E.root, !n && E.rounded),
568
563
  children: /* @__PURE__ */ r("div", {
569
- className: U(C.mediaWrapper, s > 1 && C.grid2Columns, s === 3 && C.grid3, s > 4 && C.grid2x2),
570
- children: (a = e.mediaDetails) == null ? void 0 : a.map((d) => /* @__PURE__ */ r(Ut, {
571
- children: d.type === "photo" ? /* @__PURE__ */ h("a", {
564
+ className: U(E.mediaWrapper, s > 1 && E.grid2Columns, s === 3 && E.grid3, s > 4 && E.grid2x2),
565
+ children: (a = e.mediaDetails) == null ? void 0 : a.map((u) => /* @__PURE__ */ r(zt, {
566
+ children: u.type === "photo" ? /* @__PURE__ */ h("a", {
572
567
  href: e.url,
573
- className: U(C.mediaContainer, C.mediaLink),
568
+ className: U(E.mediaContainer, E.mediaLink),
574
569
  target: "_blank",
575
570
  rel: "noopener noreferrer",
576
571
  children: [
577
572
  /* @__PURE__ */ r("div", {
578
- className: C.skeleton,
579
- style: it(d, s)
573
+ className: E.skeleton,
574
+ style: ct(u, s)
580
575
  }),
581
576
  /* @__PURE__ */ r(f, {
582
- src: Tt(d, "small"),
583
- alt: d.ext_alt_text || "Image",
584
- className: C.image,
577
+ src: xt(u, "small"),
578
+ alt: u.ext_alt_text || "Image",
579
+ className: E.image,
585
580
  draggable: !0
586
581
  })
587
582
  ]
588
- }, d.media_url_https) : /* @__PURE__ */ h("div", {
589
- className: C.mediaContainer,
583
+ }, u.media_url_https) : /* @__PURE__ */ h("div", {
584
+ className: E.mediaContainer,
590
585
  children: [
591
586
  /* @__PURE__ */ r("div", {
592
- className: C.skeleton,
593
- style: it(d, s)
587
+ className: E.skeleton,
588
+ style: ct(u, s)
594
589
  }),
595
- /* @__PURE__ */ r(yr, {
590
+ /* @__PURE__ */ r(br, {
596
591
  tweet: e,
597
- media: d
592
+ media: u
598
593
  })
599
594
  ]
600
- }, d.media_url_https)
601
- }, d.media_url_https))
595
+ }, u.media_url_https)
596
+ }, u.media_url_https))
602
597
  })
603
598
  });
604
- }, Tr = "_root_i24yn_1", xr = {
605
- root: Tr
606
- }, Nr = ({ tweet: e }) => {
607
- const t = new Date(e.created_at), n = Xn(t);
599
+ }, xr = "_root_i24yn_1", Nr = {
600
+ root: xr
601
+ }, Rr = ({ tweet: e }) => {
602
+ const t = new Date(e.created_at), n = Kn(t);
608
603
  return /* @__PURE__ */ r("a", {
609
- className: xr.root,
604
+ className: Nr.root,
610
605
  href: e.url,
611
606
  target: "_blank",
612
607
  rel: "noopener noreferrer",
@@ -616,18 +611,18 @@ const or = (e) => ({
616
611
  children: n
617
612
  })
618
613
  });
619
- }, Ir = "_info_19qcj_1", Rr = "_infoLink_19qcj_10", Sr = "_infoIcon_19qcj_30", Ne = {
614
+ }, Ir = "_info_19qcj_1", Sr = "_infoLink_19qcj_10", kr = "_infoIcon_19qcj_30", Se = {
620
615
  info: Ir,
621
- infoLink: Rr,
622
- infoIcon: Sr
623
- }, kr = ({ tweet: e }) => /* @__PURE__ */ h("div", {
624
- className: Ne.info,
616
+ infoLink: Sr,
617
+ infoIcon: kr
618
+ }, Er = ({ tweet: e }) => /* @__PURE__ */ h("div", {
619
+ className: Se.info,
625
620
  children: [
626
- /* @__PURE__ */ r(Nr, {
621
+ /* @__PURE__ */ r(Rr, {
627
622
  tweet: e
628
623
  }),
629
624
  /* @__PURE__ */ r("a", {
630
- className: Ne.infoLink,
625
+ className: Se.infoLink,
631
626
  href: "https://help.x.com/en/x-for-websites-ads-info-and-privacy",
632
627
  target: "_blank",
633
628
  rel: "noopener noreferrer",
@@ -635,7 +630,7 @@ const or = (e) => ({
635
630
  children: /* @__PURE__ */ r("svg", {
636
631
  viewBox: "0 0 24 24",
637
632
  "aria-hidden": "true",
638
- className: Ne.infoIcon,
633
+ className: Se.infoIcon,
639
634
  children: /* @__PURE__ */ r("g", {
640
635
  children: /* @__PURE__ */ r("path", {
641
636
  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"
@@ -644,25 +639,25 @@ const or = (e) => ({
644
639
  })
645
640
  })
646
641
  ]
647
- }), Er = "_actions_n2anf_1", Cr = "_like_n2anf_13", Or = "_reply_n2anf_14", Lr = "_copy_n2anf_15", $r = "_likeIconWrapper_n2anf_27", qr = "_likeCount_n2anf_30", Dr = "_replyIconWrapper_n2anf_35", Ar = "_copyIconWrapper_n2anf_36", Vr = "_likeIcon_n2anf_27", Mr = "_replyIcon_n2anf_35", jr = "_copyIcon_n2anf_36", Wr = "_replyText_n2anf_56", Br = "_copyText_n2anf_57", k = {
648
- actions: Er,
649
- like: Cr,
650
- reply: Or,
651
- copy: Lr,
642
+ }), Cr = "_actions_n2anf_1", Or = "_like_n2anf_13", Lr = "_reply_n2anf_14", qr = "_copy_n2anf_15", $r = "_likeIconWrapper_n2anf_27", Dr = "_likeCount_n2anf_30", Ar = "_replyIconWrapper_n2anf_35", Vr = "_copyIconWrapper_n2anf_36", Mr = "_likeIcon_n2anf_27", jr = "_replyIcon_n2anf_35", Wr = "_copyIcon_n2anf_36", Br = "_replyText_n2anf_56", Fr = "_copyText_n2anf_57", S = {
643
+ actions: Cr,
644
+ like: Or,
645
+ reply: Lr,
646
+ copy: qr,
652
647
  likeIconWrapper: $r,
653
- likeCount: qr,
654
- replyIconWrapper: Dr,
655
- copyIconWrapper: Ar,
656
- likeIcon: Vr,
657
- replyIcon: Mr,
658
- copyIcon: jr,
659
- replyText: Wr,
660
- copyText: Br
661
- }, Fr = ({ tweet: e }) => {
648
+ likeCount: Dr,
649
+ replyIconWrapper: Ar,
650
+ copyIconWrapper: Vr,
651
+ likeIcon: Mr,
652
+ replyIcon: jr,
653
+ copyIcon: Wr,
654
+ replyText: Br,
655
+ copyText: Fr
656
+ }, Pr = ({ tweet: e }) => {
662
657
  const [t, n] = se(!1), o = () => {
663
658
  navigator.clipboard.writeText(e.url), n(!0);
664
659
  };
665
- return Fe(() => {
660
+ return ze(() => {
666
661
  if (t) {
667
662
  const a = setTimeout(() => {
668
663
  n(!1);
@@ -673,15 +668,15 @@ const or = (e) => ({
673
668
  t
674
669
  ]), /* @__PURE__ */ h("button", {
675
670
  type: "button",
676
- className: k.copy,
671
+ className: S.copy,
677
672
  "aria-label": "Copy link",
678
673
  onClick: o,
679
674
  children: [
680
675
  /* @__PURE__ */ r("div", {
681
- className: k.copyIconWrapper,
676
+ className: S.copyIconWrapper,
682
677
  children: t ? /* @__PURE__ */ r("svg", {
683
678
  viewBox: "0 0 24 24",
684
- className: k.copyIcon,
679
+ className: S.copyIcon,
685
680
  "aria-hidden": "true",
686
681
  children: /* @__PURE__ */ r("g", {
687
682
  children: /* @__PURE__ */ r("path", {
@@ -690,7 +685,7 @@ const or = (e) => ({
690
685
  })
691
686
  }) : /* @__PURE__ */ r("svg", {
692
687
  viewBox: "0 0 24 24",
693
- className: k.copyIcon,
688
+ className: S.copyIcon,
694
689
  "aria-hidden": "true",
695
690
  children: /* @__PURE__ */ r("g", {
696
691
  children: /* @__PURE__ */ r("path", {
@@ -700,28 +695,28 @@ const or = (e) => ({
700
695
  })
701
696
  }),
702
697
  /* @__PURE__ */ r("span", {
703
- className: k.copyText,
698
+ className: S.copyText,
704
699
  children: t ? "Copied!" : "Copy link"
705
700
  })
706
701
  ]
707
702
  });
708
- }, Pr = ({ tweet: e }) => {
709
- const t = Le(e.favorite_count);
703
+ }, Ur = ({ tweet: e }) => {
704
+ const t = De(e.favorite_count);
710
705
  return /* @__PURE__ */ h("div", {
711
- className: k.actions,
706
+ className: S.actions,
712
707
  children: [
713
708
  /* @__PURE__ */ h("a", {
714
- className: k.like,
709
+ className: S.like,
715
710
  href: e.like_url,
716
711
  target: "_blank",
717
712
  rel: "noopener noreferrer",
718
713
  "aria-label": `Like. This Tweet has ${t} likes`,
719
714
  children: [
720
715
  /* @__PURE__ */ r("div", {
721
- className: k.likeIconWrapper,
716
+ className: S.likeIconWrapper,
722
717
  children: /* @__PURE__ */ r("svg", {
723
718
  viewBox: "0 0 24 24",
724
- className: k.likeIcon,
719
+ className: S.likeIcon,
725
720
  "aria-hidden": "true",
726
721
  children: /* @__PURE__ */ r("g", {
727
722
  children: /* @__PURE__ */ r("path", {
@@ -731,23 +726,23 @@ const or = (e) => ({
731
726
  })
732
727
  }),
733
728
  /* @__PURE__ */ r("span", {
734
- className: k.likeCount,
729
+ className: S.likeCount,
735
730
  children: t
736
731
  })
737
732
  ]
738
733
  }),
739
734
  /* @__PURE__ */ h("a", {
740
- className: k.reply,
735
+ className: S.reply,
741
736
  href: e.reply_url,
742
737
  target: "_blank",
743
738
  rel: "noopener noreferrer",
744
739
  "aria-label": "Reply to this Tweet on Twitter",
745
740
  children: [
746
741
  /* @__PURE__ */ r("div", {
747
- className: k.replyIconWrapper,
742
+ className: S.replyIconWrapper,
748
743
  children: /* @__PURE__ */ r("svg", {
749
744
  viewBox: "0 0 24 24",
750
- className: k.replyIcon,
745
+ className: S.replyIcon,
751
746
  "aria-hidden": "true",
752
747
  children: /* @__PURE__ */ r("g", {
753
748
  children: /* @__PURE__ */ r("path", {
@@ -757,56 +752,56 @@ const or = (e) => ({
757
752
  })
758
753
  }),
759
754
  /* @__PURE__ */ r("span", {
760
- className: k.replyText,
755
+ className: S.replyText,
761
756
  children: "Reply"
762
757
  })
763
758
  ]
764
759
  }),
765
- /* @__PURE__ */ r(Fr, {
760
+ /* @__PURE__ */ r(Pr, {
766
761
  tweet: e
767
762
  })
768
763
  ]
769
764
  });
770
- }, Ur = "_replies_1cutb_1", zr = "_link_1cutb_4", Hr = "_text_1cutb_23", Ie = {
771
- replies: Ur,
772
- link: zr,
773
- text: Hr
774
- }, Gr = ({ tweet: e }) => /* @__PURE__ */ r("div", {
775
- className: Ie.replies,
765
+ }, zr = "_replies_1cutb_1", Hr = "_link_1cutb_4", Gr = "_text_1cutb_23", ke = {
766
+ replies: zr,
767
+ link: Hr,
768
+ text: Gr
769
+ }, Xr = ({ tweet: e }) => /* @__PURE__ */ r("div", {
770
+ className: ke.replies,
776
771
  children: /* @__PURE__ */ r("a", {
777
- className: Ie.link,
772
+ className: ke.link,
778
773
  href: e.url,
779
774
  target: "_blank",
780
775
  rel: "noopener noreferrer",
781
776
  children: /* @__PURE__ */ r("span", {
782
- className: Ie.text,
783
- children: e.conversation_count === 0 ? "Read more on X" : e.conversation_count === 1 ? `Read ${Le(e.conversation_count)} reply` : `Read ${Le(e.conversation_count)} replies`
777
+ className: ke.text,
778
+ children: e.conversation_count === 0 ? "Read more on X" : e.conversation_count === 1 ? `Read ${De(e.conversation_count)} reply` : `Read ${De(e.conversation_count)} replies`
784
779
  })
785
780
  })
786
- }), Xr = "_root_q5799_1", Kr = "_article_q5799_16", ct = {
787
- root: Xr,
788
- article: Kr
789
- }, Qr = ({ tweet: e, children: t }) => /* @__PURE__ */ r("div", {
790
- className: ct.root,
781
+ }), Kr = "_root_q5799_1", Qr = "_article_q5799_16", lt = {
782
+ root: Kr,
783
+ article: Qr
784
+ }, Jr = ({ tweet: e, children: t }) => /* @__PURE__ */ r("div", {
785
+ className: lt.root,
791
786
  onClick: (n) => {
792
787
  n.preventDefault(), window.open(e.url, "_blank");
793
788
  },
794
789
  children: /* @__PURE__ */ r("article", {
795
- className: ct.article,
790
+ className: lt.article,
796
791
  children: t
797
792
  })
798
- }), Jr = "_header_f00ab_1", Yr = "_avatar_f00ab_11", Zr = "_avatarOverflow_f00ab_16", eo = "_avatarSquare_f00ab_23", to = "_author_f00ab_27", no = "_authorText_f00ab_33", ro = "_username_f00ab_40", Q = {
799
- header: Jr,
800
- avatar: Yr,
801
- avatarOverflow: Zr,
802
- avatarSquare: eo,
803
- author: to,
804
- authorText: no,
805
- username: ro
806
- }, oo = ({ tweet: e, components: t }) => {
793
+ }), Yr = "_header_f00ab_1", Zr = "_avatar_f00ab_11", eo = "_avatarOverflow_f00ab_16", to = "_avatarSquare_f00ab_23", no = "_author_f00ab_27", ro = "_authorText_f00ab_33", oo = "_username_f00ab_40", Q = {
794
+ header: Yr,
795
+ avatar: Zr,
796
+ avatarOverflow: eo,
797
+ avatarSquare: to,
798
+ author: no,
799
+ authorText: ro,
800
+ username: oo
801
+ }, ao = ({ tweet: e, components: t }) => {
807
802
  const { user: n } = e;
808
803
  var o;
809
- const a = (o = t == null ? void 0 : t.AvatarImg) != null ? o : vt;
804
+ const a = (o = t == null ? void 0 : t.AvatarImg) != null ? o : gt;
810
805
  return /* @__PURE__ */ h("div", {
811
806
  className: Q.header,
812
807
  children: [
@@ -835,10 +830,10 @@ const or = (e) => ({
835
830
  children: n.name
836
831
  })
837
832
  }),
838
- /* @__PURE__ */ r(gt, {
833
+ /* @__PURE__ */ r(wt, {
839
834
  user: n
840
835
  }),
841
- /* @__PURE__ */ r(wt, {
836
+ /* @__PURE__ */ r(yt, {
842
837
  user: n
843
838
  }),
844
839
  /* @__PURE__ */ r("div", {
@@ -855,10 +850,10 @@ const or = (e) => ({
855
850
  })
856
851
  ]
857
852
  });
858
- }, ao = "_root_175ot_1", so = {
859
- root: ao
860
- }, io = ({ tweet: e }) => /* @__PURE__ */ r("p", {
861
- className: so.root,
853
+ }, so = "_root_175ot_1", io = {
854
+ root: so
855
+ }, co = ({ tweet: e }) => /* @__PURE__ */ r("p", {
856
+ className: io.root,
862
857
  lang: e.lang,
863
858
  dir: "auto",
864
859
  children: e.entities.map((t, n) => /* @__PURE__ */ r("span", {
@@ -866,65 +861,65 @@ const or = (e) => ({
866
861
  __html: t.text
867
862
  }
868
863
  }, n))
869
- }), co = ({ tweet: e, components: t }) => {
864
+ }), lo = ({ tweet: e, components: t }) => {
870
865
  var n;
871
- return /* @__PURE__ */ h(Qr, {
866
+ return /* @__PURE__ */ h(Jr, {
872
867
  tweet: e,
873
868
  children: [
874
- /* @__PURE__ */ r(oo, {
869
+ /* @__PURE__ */ r(ao, {
875
870
  tweet: e,
876
871
  components: t
877
872
  }),
878
- /* @__PURE__ */ r(io, {
873
+ /* @__PURE__ */ r(co, {
879
874
  tweet: e
880
875
  }),
881
- (n = e.mediaDetails) != null && n.length ? /* @__PURE__ */ r(xt, {
876
+ (n = e.mediaDetails) != null && n.length ? /* @__PURE__ */ r(Nt, {
882
877
  quoted: !0,
883
878
  tweet: e
884
879
  }) : null
885
880
  ]
886
881
  });
887
- }, lo = ({ tweet: e, components: t }) => {
882
+ }, uo = ({ tweet: e, components: t }) => {
888
883
  var n;
889
- const o = Pe(() => or(e), [
884
+ const o = He(() => ar(e), [
890
885
  e
891
886
  ]);
892
- return /* @__PURE__ */ h(ze, {
887
+ return /* @__PURE__ */ h(Xe, {
893
888
  children: [
894
- /* @__PURE__ */ r(Dn, {
889
+ /* @__PURE__ */ r(An, {
895
890
  tweet: o,
896
891
  components: t
897
892
  }),
898
- o.in_reply_to_status_id_str && /* @__PURE__ */ r(Mn, {
893
+ o.in_reply_to_status_id_str && /* @__PURE__ */ r(jn, {
899
894
  tweet: o
900
895
  }),
901
- /* @__PURE__ */ r(Pn, {
896
+ /* @__PURE__ */ r(Un, {
902
897
  tweet: o
903
898
  }),
904
- (n = o.mediaDetails) != null && n.length ? /* @__PURE__ */ r(xt, {
899
+ (n = o.mediaDetails) != null && n.length ? /* @__PURE__ */ r(Nt, {
905
900
  tweet: o,
906
901
  components: t
907
902
  }) : null,
908
- o.quoted_tweet && /* @__PURE__ */ r(co, {
903
+ o.quoted_tweet && /* @__PURE__ */ r(lo, {
909
904
  tweet: o.quoted_tweet,
910
905
  components: t
911
906
  }),
912
- /* @__PURE__ */ r(kr, {
907
+ /* @__PURE__ */ r(Er, {
913
908
  tweet: o
914
909
  }),
915
- /* @__PURE__ */ r(Pr, {
910
+ /* @__PURE__ */ r(Ur, {
916
911
  tweet: o
917
912
  }),
918
- /* @__PURE__ */ r(Gr, {
913
+ /* @__PURE__ */ r(Xr, {
919
914
  tweet: o
920
915
  })
921
916
  ]
922
917
  });
923
- }, uo = "_root_16yxa_1", fo = {
924
- root: uo
925
- }, ho = (e) => /* @__PURE__ */ r(ze, {
918
+ }, fo = "_root_16yxa_1", ho = {
919
+ root: fo
920
+ }, _o = (e) => /* @__PURE__ */ r(Xe, {
926
921
  children: /* @__PURE__ */ h("div", {
927
- className: fo.root,
922
+ className: ho.root,
928
923
  children: [
929
924
  /* @__PURE__ */ r("h3", {
930
925
  children: "Tweet not found"
@@ -934,23 +929,23 @@ const or = (e) => ({
934
929
  })
935
930
  ]
936
931
  })
937
- }), _o = "_skeleton_oi7hr_1", mo = {
938
- skeleton: _o
939
- }, pe = ({ style: e }) => /* @__PURE__ */ r("span", {
940
- className: mo.skeleton,
932
+ }), mo = "_skeleton_oi7hr_1", po = {
933
+ skeleton: mo
934
+ }, ge = ({ style: e }) => /* @__PURE__ */ r("span", {
935
+ className: po.skeleton,
941
936
  style: e
942
- }), po = "_root_17qqv_1", vo = {
943
- root: po
944
- }, go = () => /* @__PURE__ */ h(ze, {
945
- className: vo.root,
937
+ }), vo = "_root_17qqv_1", go = {
938
+ root: vo
939
+ }, wo = () => /* @__PURE__ */ h(Xe, {
940
+ className: go.root,
946
941
  children: [
947
- /* @__PURE__ */ r(pe, {
942
+ /* @__PURE__ */ r(ge, {
948
943
  style: {
949
944
  height: "3rem",
950
945
  marginBottom: "0.75rem"
951
946
  }
952
947
  }),
953
- /* @__PURE__ */ r(pe, {
948
+ /* @__PURE__ */ r(ge, {
954
949
  style: {
955
950
  height: "6rem",
956
951
  margin: "0.5rem 0"
@@ -962,12 +957,12 @@ const or = (e) => ({
962
957
  margin: "0.5rem 0"
963
958
  }
964
959
  }),
965
- /* @__PURE__ */ r(pe, {
960
+ /* @__PURE__ */ r(ge, {
966
961
  style: {
967
962
  height: "2rem"
968
963
  }
969
964
  }),
970
- /* @__PURE__ */ r(pe, {
965
+ /* @__PURE__ */ r(ge, {
971
966
  style: {
972
967
  height: "2rem",
973
968
  borderRadius: "9999px",
@@ -975,9 +970,9 @@ const or = (e) => ({
975
970
  }
976
971
  })
977
972
  ]
978
- }), Nt = 0, It = 1, Rt = 2, lt = 3;
979
- var dt = Object.prototype.hasOwnProperty;
980
- function $e(e, t) {
973
+ }), Rt = 0, It = 1, St = 2, dt = 3;
974
+ var ut = Object.prototype.hasOwnProperty;
975
+ function Ae(e, t) {
981
976
  var n, o;
982
977
  if (e === t) return !0;
983
978
  if (e && t && (n = e.constructor) === t.constructor) {
@@ -985,112 +980,112 @@ function $e(e, t) {
985
980
  if (n === RegExp) return e.toString() === t.toString();
986
981
  if (n === Array) {
987
982
  if ((o = e.length) === t.length)
988
- for (; o-- && $e(e[o], t[o]); ) ;
983
+ for (; o-- && Ae(e[o], t[o]); ) ;
989
984
  return o === -1;
990
985
  }
991
986
  if (!n || typeof e == "object") {
992
987
  o = 0;
993
988
  for (n in e)
994
- if (dt.call(e, n) && ++o && !dt.call(t, n) || !(n in t) || !$e(e[n], t[n])) return !1;
989
+ if (ut.call(e, n) && ++o && !ut.call(t, n) || !(n in t) || !Ae(e[n], t[n])) return !1;
995
990
  return Object.keys(t).length === o;
996
991
  }
997
992
  }
998
993
  return e !== e && t !== t;
999
994
  }
1000
995
  const F = /* @__PURE__ */ new WeakMap(), P = () => {
1001
- }, R = (
996
+ }, I = (
1002
997
  /*#__NOINLINE__*/
1003
998
  P()
1004
- ), qe = Object, u = (e) => e === R, j = (e) => typeof e == "function", z = (e, t) => ({
999
+ ), Ve = Object, d = (e) => e === I, W = (e) => typeof e == "function", H = (e, t) => ({
1005
1000
  ...e,
1006
1001
  ...t
1007
- }), St = (e) => j(e.then), Re = {}, ve = {}, He = "undefined", ue = typeof window != He, De = typeof document != He, wo = ue && "Deno" in window, yo = () => ue && typeof window.requestAnimationFrame != He, kt = (e, t) => {
1002
+ }), kt = (e) => W(e.then), Ee = {}, we = {}, Ke = "undefined", _e = typeof window != Ke, Me = typeof document != Ke, yo = _e && "Deno" in window, bo = () => _e && typeof window.requestAnimationFrame != Ke, Et = (e, t) => {
1008
1003
  const n = F.get(e);
1009
1004
  return [
1010
1005
  // Getter
1011
- () => !u(t) && e.get(t) || Re,
1006
+ () => !d(t) && e.get(t) || Ee,
1012
1007
  // Setter
1013
1008
  (o) => {
1014
- if (!u(t)) {
1009
+ if (!d(t)) {
1015
1010
  const a = e.get(t);
1016
- t in ve || (ve[t] = a), n[5](t, z(a, o), a || Re);
1011
+ t in we || (we[t] = a), n[5](t, H(a, o), a || Ee);
1017
1012
  }
1018
1013
  },
1019
1014
  // Subscriber
1020
1015
  n[6],
1021
1016
  // Get server cache snapshot
1022
- () => !u(t) && t in ve ? ve[t] : !u(t) && e.get(t) || Re
1017
+ () => !d(t) && t in we ? we[t] : !d(t) && e.get(t) || Ee
1023
1018
  ];
1024
1019
  };
1025
- let Ae = !0;
1026
- const bo = () => Ae, [Ve, Me] = ue && window.addEventListener ? [
1020
+ let je = !0;
1021
+ const To = () => je, [We, Be] = _e && window.addEventListener ? [
1027
1022
  window.addEventListener.bind(window),
1028
1023
  window.removeEventListener.bind(window)
1029
1024
  ] : [
1030
1025
  P,
1031
1026
  P
1032
- ], To = () => {
1033
- const e = De && document.visibilityState;
1034
- return u(e) || e !== "hidden";
1035
- }, xo = (e) => (De && document.addEventListener("visibilitychange", e), Ve("focus", e), () => {
1036
- De && document.removeEventListener("visibilitychange", e), Me("focus", e);
1037
- }), No = (e) => {
1027
+ ], xo = () => {
1028
+ const e = Me && document.visibilityState;
1029
+ return d(e) || e !== "hidden";
1030
+ }, No = (e) => (Me && document.addEventListener("visibilitychange", e), We("focus", e), () => {
1031
+ Me && document.removeEventListener("visibilitychange", e), Be("focus", e);
1032
+ }), Ro = (e) => {
1038
1033
  const t = () => {
1039
- Ae = !0, e();
1034
+ je = !0, e();
1040
1035
  }, n = () => {
1041
- Ae = !1;
1036
+ je = !1;
1042
1037
  };
1043
- return Ve("online", t), Ve("offline", n), () => {
1044
- Me("online", t), Me("offline", n);
1038
+ return We("online", t), We("offline", n), () => {
1039
+ Be("online", t), Be("offline", n);
1045
1040
  };
1046
1041
  }, Io = {
1047
- isOnline: bo,
1048
- isVisible: To
1049
- }, Ro = {
1050
- initFocus: xo,
1051
- initReconnect: No
1052
- }, ut = !Be.useId, ie = !ue || wo, So = (e) => yo() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Se = ie ? Fe : Ht, ke = typeof navigator < "u" && navigator.connection, ft = !ie && ke && ([
1042
+ isOnline: To,
1043
+ isVisible: xo
1044
+ }, So = {
1045
+ initFocus: No,
1046
+ initReconnect: Ro
1047
+ }, ft = !Ue.useId, ie = !_e || yo, ko = (e) => bo() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Ce = ie ? ze : Gt, Oe = typeof navigator < "u" && navigator.connection, ht = !ie && Oe && ([
1053
1048
  "slow-2g",
1054
1049
  "2g"
1055
- ].includes(ke.effectiveType) || ke.saveData), ge = /* @__PURE__ */ new WeakMap(), ko = (e) => qe.prototype.toString.call(e), Ee = (e, t) => e === `[object ${t}]`;
1056
- let Eo = 0;
1057
- const je = (e) => {
1058
- const t = typeof e, n = ko(e), o = Ee(n, "Date"), a = Ee(n, "RegExp"), i = Ee(n, "Object");
1050
+ ].includes(Oe.effectiveType) || Oe.saveData), ye = /* @__PURE__ */ new WeakMap(), Eo = (e) => Ve.prototype.toString.call(e), Le = (e, t) => e === `[object ${t}]`;
1051
+ let Co = 0;
1052
+ const Fe = (e) => {
1053
+ const t = typeof e, n = Eo(e), o = Le(n, "Date"), a = Le(n, "RegExp"), i = Le(n, "Object");
1059
1054
  let s, c;
1060
- if (qe(e) === e && !o && !a) {
1061
- if (s = ge.get(e), s) return s;
1062
- if (s = ++Eo + "~", ge.set(e, s), Array.isArray(e)) {
1055
+ if (Ve(e) === e && !o && !a) {
1056
+ if (s = ye.get(e), s) return s;
1057
+ if (s = ++Co + "~", ye.set(e, s), Array.isArray(e)) {
1063
1058
  for (s = "@", c = 0; c < e.length; c++)
1064
- s += je(e[c]) + ",";
1065
- ge.set(e, s);
1059
+ s += Fe(e[c]) + ",";
1060
+ ye.set(e, s);
1066
1061
  }
1067
1062
  if (i) {
1068
1063
  s = "#";
1069
- const f = qe.keys(e).sort();
1070
- for (; !u(c = f.pop()); )
1071
- u(e[c]) || (s += c + ":" + je(e[c]) + ",");
1072
- ge.set(e, s);
1064
+ const f = Ve.keys(e).sort();
1065
+ for (; !d(c = f.pop()); )
1066
+ d(e[c]) || (s += c + ":" + Fe(e[c]) + ",");
1067
+ ye.set(e, s);
1073
1068
  }
1074
1069
  } else
1075
1070
  s = o ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
1076
1071
  return s;
1077
- }, Ge = (e) => {
1078
- if (j(e))
1072
+ }, Qe = (e) => {
1073
+ if (W(e))
1079
1074
  try {
1080
1075
  e = e();
1081
1076
  } catch {
1082
1077
  e = "";
1083
1078
  }
1084
1079
  const t = e;
1085
- return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? je(e) : "", [
1080
+ return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? Fe(e) : "", [
1086
1081
  e,
1087
1082
  t
1088
1083
  ];
1089
1084
  };
1090
- let Co = 0;
1091
- const We = () => ++Co;
1092
- async function Et(...e) {
1093
- const [t, n, o, a] = e, i = z({
1085
+ let Oo = 0;
1086
+ const Pe = () => ++Oo;
1087
+ async function Ct(...e) {
1088
+ const [t, n, o, a] = e, i = H({
1094
1089
  populateCache: !0,
1095
1090
  throwOnError: !0
1096
1091
  }, typeof a == "boolean" ? {
@@ -1099,92 +1094,92 @@ async function Et(...e) {
1099
1094
  let s = i.populateCache;
1100
1095
  const c = i.rollbackOnError;
1101
1096
  let f = i.optimisticData;
1102
- const d = (b) => typeof c == "function" ? c(b) : c !== !1, g = i.throwOnError;
1103
- if (j(n)) {
1104
- const b = n, I = [], E = t.keys();
1105
- for (const L of E)
1097
+ const u = (T) => typeof c == "function" ? c(T) : c !== !1, v = i.throwOnError;
1098
+ if (W(n)) {
1099
+ const T = n, R = [], k = t.keys();
1100
+ for (const L of k)
1106
1101
  // Skip the special useSWRInfinite and useSWRSubscription keys.
1107
- !/^\$(inf|sub)\$/.test(L) && b(t.get(L)._k) && I.push(L);
1108
- return Promise.all(I.map(m));
1102
+ !/^\$(inf|sub)\$/.test(L) && T(t.get(L)._k) && R.push(L);
1103
+ return Promise.all(R.map(m));
1109
1104
  }
1110
1105
  return m(n);
1111
- async function m(b) {
1112
- const [I] = Ge(b);
1113
- if (!I) return;
1114
- const [E, L] = kt(t, I), [D, ce, l, fe] = F.get(t), J = () => {
1115
- const $ = D[I];
1116
- return (j(i.revalidate) ? i.revalidate(E().data, b) : i.revalidate !== !1) && (delete l[I], delete fe[I], $ && $[0]) ? $[0](Rt).then(() => E().data) : E().data;
1106
+ async function m(T) {
1107
+ const [R] = Qe(T);
1108
+ if (!R) return;
1109
+ const [k, L] = Et(t, R), [D, ce, l, me] = F.get(t), J = () => {
1110
+ const q = D[R];
1111
+ return (W(i.revalidate) ? i.revalidate(k().data, T) : i.revalidate !== !1) && (delete l[R], delete me[R], q && q[0]) ? q[0](St).then(() => k().data) : k().data;
1117
1112
  };
1118
1113
  if (e.length < 3)
1119
1114
  return J();
1120
- let T = o, A, V = !1;
1121
- const Y = We();
1122
- ce[I] = [
1115
+ let x = o, A, V = !1;
1116
+ const Y = Pe();
1117
+ ce[R] = [
1123
1118
  Y,
1124
1119
  0
1125
1120
  ];
1126
- const p = !u(f), Z = E(), M = Z.data, ee = Z._c, H = u(ee) ? M : ee;
1127
- if (p && (f = j(f) ? f(H, M) : f, L({
1121
+ const p = !d(f), Z = k(), M = Z.data, ee = Z._c, G = d(ee) ? M : ee;
1122
+ if (p && (f = W(f) ? f(G, M) : f, L({
1128
1123
  data: f,
1129
- _c: H
1130
- })), j(T))
1124
+ _c: G
1125
+ })), W(x))
1131
1126
  try {
1132
- T = T(H);
1133
- } catch ($) {
1134
- A = $, V = !0;
1127
+ x = x(G);
1128
+ } catch (q) {
1129
+ A = q, V = !0;
1135
1130
  }
1136
- if (T && St(T))
1137
- if (T = await T.catch(($) => {
1138
- A = $, V = !0;
1139
- }), Y !== ce[I][0]) {
1131
+ if (x && kt(x))
1132
+ if (x = await x.catch((q) => {
1133
+ A = q, V = !0;
1134
+ }), Y !== ce[R][0]) {
1140
1135
  if (V) throw A;
1141
- return T;
1142
- } else V && p && d(A) && (s = !0, L({
1143
- data: H,
1144
- _c: R
1136
+ return x;
1137
+ } else V && p && u(A) && (s = !0, L({
1138
+ data: G,
1139
+ _c: I
1145
1140
  }));
1146
1141
  if (s && !V)
1147
- if (j(s)) {
1148
- const $ = s(T, H);
1142
+ if (W(s)) {
1143
+ const q = s(x, G);
1149
1144
  L({
1150
- data: $,
1151
- error: R,
1152
- _c: R
1145
+ data: q,
1146
+ error: I,
1147
+ _c: I
1153
1148
  });
1154
1149
  } else
1155
1150
  L({
1156
- data: T,
1157
- error: R,
1158
- _c: R
1151
+ data: x,
1152
+ error: I,
1153
+ _c: I
1159
1154
  });
1160
- if (ce[I][1] = We(), Promise.resolve(J()).then(() => {
1155
+ if (ce[R][1] = Pe(), Promise.resolve(J()).then(() => {
1161
1156
  L({
1162
- _c: R
1157
+ _c: I
1163
1158
  });
1164
1159
  }), V) {
1165
- if (g) throw A;
1160
+ if (v) throw A;
1166
1161
  return;
1167
1162
  }
1168
- return T;
1163
+ return x;
1169
1164
  }
1170
1165
  }
1171
- const ht = (e, t) => {
1166
+ const _t = (e, t) => {
1172
1167
  for (const n in e)
1173
1168
  e[n][0] && e[n][0](t);
1174
- }, Oo = (e, t) => {
1169
+ }, Lo = (e, t) => {
1175
1170
  if (!F.has(e)) {
1176
- const n = z(Ro, t), o = /* @__PURE__ */ Object.create(null), a = Et.bind(R, e);
1171
+ const n = H(So, t), o = /* @__PURE__ */ Object.create(null), a = Ct.bind(I, e);
1177
1172
  let i = P;
1178
- const s = /* @__PURE__ */ Object.create(null), c = (g, m) => {
1179
- const b = s[g] || [];
1180
- return s[g] = b, b.push(m), () => b.splice(b.indexOf(m), 1);
1181
- }, f = (g, m, b) => {
1182
- e.set(g, m);
1183
- const I = s[g];
1184
- if (I)
1185
- for (const E of I)
1186
- E(m, b);
1187
- }, d = () => {
1173
+ const s = /* @__PURE__ */ Object.create(null), c = (v, m) => {
1174
+ const T = s[v] || [];
1175
+ return s[v] = T, T.push(m), () => T.splice(T.indexOf(m), 1);
1176
+ }, f = (v, m, T) => {
1177
+ e.set(v, m);
1178
+ const R = s[v];
1179
+ if (R)
1180
+ for (const k of R)
1181
+ k(m, T);
1182
+ }, u = () => {
1188
1183
  if (!F.has(e) && (F.set(e, [
1189
1184
  o,
1190
1185
  /* @__PURE__ */ Object.create(null),
@@ -1194,16 +1189,16 @@ const ht = (e, t) => {
1194
1189
  f,
1195
1190
  c
1196
1191
  ]), !ie)) {
1197
- const g = n.initFocus(setTimeout.bind(R, ht.bind(R, o, Nt))), m = n.initReconnect(setTimeout.bind(R, ht.bind(R, o, It)));
1192
+ const v = n.initFocus(setTimeout.bind(I, _t.bind(I, o, Rt))), m = n.initReconnect(setTimeout.bind(I, _t.bind(I, o, It)));
1198
1193
  i = () => {
1199
- g && g(), m && m(), F.delete(e);
1194
+ v && v(), m && m(), F.delete(e);
1200
1195
  };
1201
1196
  }
1202
1197
  };
1203
- return d(), [
1198
+ return u(), [
1204
1199
  e,
1205
1200
  a,
1206
- d,
1201
+ u,
1207
1202
  i
1208
1203
  ];
1209
1204
  }
@@ -1211,16 +1206,16 @@ const ht = (e, t) => {
1211
1206
  e,
1212
1207
  F.get(e)[4]
1213
1208
  ];
1214
- }, Lo = (e, t, n, o, a) => {
1209
+ }, qo = (e, t, n, o, a) => {
1215
1210
  const i = n.errorRetryCount, s = a.retryCount, c = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * n.errorRetryInterval;
1216
- !u(i) && s > i || setTimeout(o, c, a);
1217
- }, $o = $e, [Ct, qo] = Oo(/* @__PURE__ */ new Map()), Do = z(
1211
+ !d(i) && s > i || setTimeout(o, c, a);
1212
+ }, $o = Ae, [Ot, Do] = Lo(/* @__PURE__ */ new Map()), Ao = H(
1218
1213
  {
1219
1214
  // events
1220
1215
  onLoadingSlow: P,
1221
1216
  onSuccess: P,
1222
1217
  onError: P,
1223
- onErrorRetry: Lo,
1218
+ onErrorRetry: qo,
1224
1219
  onDiscarded: P,
1225
1220
  // switches
1226
1221
  revalidateOnFocus: !0,
@@ -1228,29 +1223,29 @@ const ht = (e, t) => {
1228
1223
  revalidateIfStale: !0,
1229
1224
  shouldRetryOnError: !0,
1230
1225
  // timeouts
1231
- errorRetryInterval: ft ? 1e4 : 5e3,
1226
+ errorRetryInterval: ht ? 1e4 : 5e3,
1232
1227
  focusThrottleInterval: 5 * 1e3,
1233
1228
  dedupingInterval: 2 * 1e3,
1234
- loadingTimeout: ft ? 5e3 : 3e3,
1229
+ loadingTimeout: ht ? 5e3 : 3e3,
1235
1230
  // providers
1236
1231
  compare: $o,
1237
1232
  isPaused: () => !1,
1238
- cache: Ct,
1239
- mutate: qo,
1233
+ cache: Ot,
1234
+ mutate: Do,
1240
1235
  fallback: {}
1241
1236
  },
1242
1237
  // use web preset by default
1243
1238
  Io
1244
- ), Ao = (e, t) => {
1245
- const n = z(e, t);
1239
+ ), Vo = (e, t) => {
1240
+ const n = H(e, t);
1246
1241
  if (t) {
1247
1242
  const { use: o, fallback: a } = e, { use: i, fallback: s } = t;
1248
- o && i && (n.use = o.concat(i)), a && s && (n.fallback = z(a, s));
1243
+ o && i && (n.use = o.concat(i)), a && s && (n.fallback = H(a, s));
1249
1244
  }
1250
1245
  return n;
1251
- }, Vo = zt({}), Mo = "$inf$", Ot = ue && window.__SWR_DEVTOOLS_USE__, jo = Ot ? window.__SWR_DEVTOOLS_USE__ : [], Wo = () => {
1252
- Ot && (window.__SWR_DEVTOOLS_REACT__ = Be);
1253
- }, Bo = (e) => j(e[1]) ? [
1246
+ }, Mo = Ht({}), jo = "$inf$", Lt = _e && window.__SWR_DEVTOOLS_USE__, Wo = Lt ? window.__SWR_DEVTOOLS_USE__ : [], Bo = () => {
1247
+ Lt && (window.__SWR_DEVTOOLS_REACT__ = Ue);
1248
+ }, Fo = (e) => W(e[1]) ? [
1254
1249
  e[0],
1255
1250
  e[1],
1256
1251
  e[2] || {}
@@ -1258,33 +1253,33 @@ const ht = (e, t) => {
1258
1253
  e[0],
1259
1254
  null,
1260
1255
  (e[1] === null ? e[2] : e[1]) || {}
1261
- ], Fo = () => {
1262
- const e = Gt(Vo);
1263
- return Pe(() => z(Do, e), [
1256
+ ], Po = () => {
1257
+ const e = Xt(Mo);
1258
+ return He(() => H(Ao, e), [
1264
1259
  e
1265
1260
  ]);
1266
- }, Po = (e) => (t, n, o) => e(t, n && ((...i) => {
1267
- const [s] = Ge(t), [, , , c] = F.get(Ct);
1268
- if (s.startsWith(Mo))
1261
+ }, Uo = (e) => (t, n, o) => e(t, n && ((...i) => {
1262
+ const [s] = Qe(t), [, , , c] = F.get(Ot);
1263
+ if (s.startsWith(jo))
1269
1264
  return n(...i);
1270
1265
  const f = c[s];
1271
- return u(f) ? n(...i) : (delete c[s], f);
1272
- }), o), Uo = jo.concat(Po), zo = (e) => function(...n) {
1273
- const o = Fo(), [a, i, s] = Bo(n), c = Ao(o, s);
1266
+ return d(f) ? n(...i) : (delete c[s], f);
1267
+ }), o), zo = Wo.concat(Uo), Ho = (e) => function(...n) {
1268
+ const o = Po(), [a, i, s] = Fo(n), c = Vo(o, s);
1274
1269
  let f = e;
1275
- const { use: d } = c, g = (d || []).concat(Uo);
1276
- for (let m = g.length; m--; )
1277
- f = g[m](f);
1270
+ const { use: u } = c, v = (u || []).concat(zo);
1271
+ for (let m = v.length; m--; )
1272
+ f = v[m](f);
1278
1273
  return f(a, i || c.fetcher || null, c);
1279
- }, Ho = (e, t, n) => {
1274
+ }, Go = (e, t, n) => {
1280
1275
  const o = t[e] || (t[e] = []);
1281
1276
  return o.push(n), () => {
1282
1277
  const a = o.indexOf(n);
1283
1278
  a >= 0 && (o[a] = o[o.length - 1], o.pop());
1284
1279
  };
1285
1280
  };
1286
- Wo();
1287
- const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
1281
+ Bo();
1282
+ const qe = Ue.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
1288
1283
  // and emitting an error.
1289
1284
  // We assume that this is only for the `use(thenable)` case, not `use(context)`.
1290
1285
  // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
@@ -1303,98 +1298,106 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1303
1298
  e.status = "rejected", e.reason = t;
1304
1299
  }), e;
1305
1300
  }
1306
- }), Oe = {
1301
+ }), $e = {
1307
1302
  dedupe: !0
1308
- }, _t = Promise.resolve(R), Go = (e, t, n) => {
1309
- const { cache: o, compare: a, suspense: i, fallbackData: s, revalidateOnMount: c, revalidateIfStale: f, refreshInterval: d, refreshWhenHidden: g, refreshWhenOffline: m, keepPreviousData: b, strictServerPrefetchWarning: I } = n, [E, L, D, ce] = F.get(o), [l, fe] = Ge(e), J = K(!1), T = K(!1), A = K(l), V = K(t), Y = K(n), p = () => Y.current, Z = () => p().isVisible() && p().isOnline(), [M, ee, H, $] = kt(o, l), te = K({}).current, he = u(s) ? u(n.fallback) ? R : n.fallback[l] : s, Xe = (_, v) => {
1310
- for (const y in te) {
1311
- const w = y;
1312
- if (w === "data") {
1313
- if (!a(_[w], v[w]) && (!u(_[w]) || !a(me, v[w])))
1303
+ }, mt = Promise.resolve(I), Xo = () => P, Ko = (e, t, n) => {
1304
+ const { cache: o, compare: a, suspense: i, fallbackData: s, revalidateOnMount: c, revalidateIfStale: f, refreshInterval: u, refreshWhenHidden: v, refreshWhenOffline: m, keepPreviousData: T, strictServerPrefetchWarning: R } = n, [k, L, D, ce] = F.get(o), [l, me] = Qe(e), J = z(!1), x = z(!1), A = z(l), V = z(t), Y = z(n), p = () => Y.current, Z = () => p().isVisible() && p().isOnline(), [M, ee, G, q] = Et(o, l), te = z({}).current, ne = d(s) ? d(n.fallback) ? I : n.fallback[l] : s, Je = (_, g) => {
1305
+ for (const w in te) {
1306
+ const y = w;
1307
+ if (y === "data") {
1308
+ if (!a(_[y], g[y]) && (!d(_[y]) || !a(ve, g[y])))
1314
1309
  return !1;
1315
- } else if (v[w] !== _[w])
1310
+ } else if (g[y] !== _[y])
1316
1311
  return !1;
1317
1312
  }
1318
1313
  return !0;
1319
- }, Ke = Pe(() => {
1320
- const _ = !l || !t ? !1 : u(c) ? p().isPaused() || i ? !1 : f !== !1 : c, v = (S) => {
1321
- const W = z(S);
1322
- return delete W._k, _ ? {
1314
+ }, be = !J.current, Ye = He(() => {
1315
+ const _ = M(), g = q(), w = (b) => {
1316
+ const $ = H(b);
1317
+ return delete $._k, (() => {
1318
+ if (!l || !t || p().isPaused()) return !1;
1319
+ if (be && !d(c)) return c;
1320
+ const fe = d(ne) ? $.data : ne;
1321
+ return d(fe) || f;
1322
+ })() ? {
1323
1323
  isValidating: !0,
1324
1324
  isLoading: !0,
1325
- ...W
1326
- } : W;
1327
- }, y = M(), w = $(), q = v(y), oe = y === w ? q : v(w);
1328
- let x = q;
1325
+ ...$
1326
+ } : $;
1327
+ }, y = w(_), j = _ === g ? y : w(g);
1328
+ let C = y;
1329
1329
  return [
1330
1330
  () => {
1331
- const S = v(M());
1332
- return Xe(S, x) ? (x.data = S.data, x.isLoading = S.isLoading, x.isValidating = S.isValidating, x.error = S.error, x) : (x = S, S);
1331
+ const b = w(M());
1332
+ return Je(b, C) ? (C.data = b.data, C.isLoading = b.isLoading, C.isValidating = b.isValidating, C.error = b.error, C) : (C = b, b);
1333
1333
  },
1334
- () => oe
1334
+ () => j
1335
1335
  ];
1336
1336
  }, [
1337
1337
  o,
1338
1338
  l
1339
- ]), ne = rt.useSyncExternalStore(Te(
1340
- (_) => H(l, (v, y) => {
1341
- Xe(y, v) || _();
1339
+ ]), re = ot.useSyncExternalStore(Re(
1340
+ (_) => G(l, (g, w) => {
1341
+ Je(w, g) || _();
1342
1342
  }),
1343
1343
  // eslint-disable-next-line react-hooks/exhaustive-deps
1344
1344
  [
1345
1345
  o,
1346
1346
  l
1347
1347
  ]
1348
- ), Ke[0], Ke[1]), Qe = !J.current, $t = E[l] && E[l].length > 0, re = ne.data, G = u(re) ? he && St(he) ? Ce(he) : he : re, _e = ne.error, we = K(G), me = b ? u(re) ? u(we.current) ? G : we.current : re : G, X = l && u(G), qt = !ie && // eslint-disable-next-line react-hooks/rules-of-hooks
1349
- rt.useSyncExternalStore(() => P, () => !1, () => !0);
1350
- I && qt && !i && X && console.warn(`Missing pre-initiated data for serialized key "${l}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);
1351
- const Je = $t && !u(_e) ? !1 : Qe && !u(c) ? c : p().isPaused() ? !1 : i ? u(G) ? !1 : f : u(G) || f, Ye = !!(l && t && Qe && Je), Dt = u(ne.isValidating) ? Ye : ne.isValidating, At = u(ne.isLoading) ? Ye : ne.isLoading, le = Te(
1348
+ ), Ye[0], Ye[1]), $t = k[l] && k[l].length > 0, oe = re.data, X = d(oe) ? ne && kt(ne) ? qe(ne) : ne : oe, pe = re.error, Te = z(X), ve = T ? d(oe) ? d(Te.current) ? X : Te.current : oe : X, K = l && d(X), le = z(null);
1349
+ !ie && // getServerSnapshot is only called during hydration
1350
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1351
+ ot.useSyncExternalStore(Xo, () => (le.current = !1, le), () => (le.current = !0, le));
1352
+ const Dt = le.current;
1353
+ R && Dt && !i && K && console.warn(`Missing pre-initiated data for serialized key "${l}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);
1354
+ const Ze = !l || !t || p().isPaused() || $t && !d(pe) ? !1 : be && !d(c) ? c : i ? d(X) ? !1 : f : d(X) || f, et = be && Ze, At = d(re.isValidating) ? et : re.isValidating, Vt = d(re.isLoading) ? et : re.isLoading, de = Re(
1352
1355
  async (_) => {
1353
- const v = V.current;
1354
- if (!l || !v || T.current || p().isPaused())
1356
+ const g = V.current;
1357
+ if (!l || !g || x.current || p().isPaused())
1355
1358
  return !1;
1356
- let y, w, q = !0;
1357
- const oe = _ || {}, x = !D[l] || !oe.dedupe, S = () => ut ? !T.current && l === A.current && J.current : l === A.current, W = {
1359
+ let w, y, j = !0;
1360
+ const C = _ || {}, b = !D[l] || !C.dedupe, $ = () => ft ? !x.current && l === A.current && J.current : l === A.current, ue = {
1358
1361
  isValidating: !1,
1359
1362
  isLoading: !1
1360
- }, et = () => {
1361
- ee(W);
1362
- }, tt = () => {
1363
+ }, fe = () => {
1364
+ ee(ue);
1365
+ }, nt = () => {
1363
1366
  const O = D[l];
1364
- O && O[1] === w && delete D[l];
1365
- }, nt = {
1367
+ O && O[1] === y && delete D[l];
1368
+ }, rt = {
1366
1369
  isValidating: !0
1367
1370
  };
1368
- u(M().data) && (nt.isLoading = !0);
1371
+ d(M().data) && (rt.isLoading = !0);
1369
1372
  try {
1370
- if (x && (ee(nt), n.loadingTimeout && u(M().data) && setTimeout(() => {
1371
- q && S() && p().onLoadingSlow(l, n);
1373
+ if (b && (ee(rt), n.loadingTimeout && d(M().data) && setTimeout(() => {
1374
+ j && $() && p().onLoadingSlow(l, n);
1372
1375
  }, n.loadingTimeout), D[l] = [
1373
- v(fe),
1374
- We()
1375
- ]), [y, w] = D[l], y = await y, x && setTimeout(tt, n.dedupingInterval), !D[l] || D[l][1] !== w)
1376
- return x && S() && p().onDiscarded(l), !1;
1377
- W.error = R;
1376
+ g(me),
1377
+ Pe()
1378
+ ]), [w, y] = D[l], w = await w, b && setTimeout(nt, n.dedupingInterval), !D[l] || D[l][1] !== y)
1379
+ return b && $() && p().onDiscarded(l), !1;
1380
+ ue.error = I;
1378
1381
  const O = L[l];
1379
- if (!u(O) && // case 1
1380
- (w <= O[0] || // case 2
1381
- w <= O[1] || // case 3
1382
+ if (!d(O) && // case 1
1383
+ (y <= O[0] || // case 2
1384
+ y <= O[1] || // case 3
1382
1385
  O[1] === 0))
1383
- return et(), x && S() && p().onDiscarded(l), !1;
1386
+ return fe(), b && $() && p().onDiscarded(l), !1;
1384
1387
  const B = M().data;
1385
- W.data = a(B, y) ? B : y, x && S() && p().onSuccess(y, l, n);
1388
+ ue.data = a(B, w) ? B : w, b && $() && p().onSuccess(w, l, n);
1386
1389
  } catch (O) {
1387
- tt();
1388
- const B = p(), { shouldRetryOnError: ye } = B;
1389
- B.isPaused() || (W.error = O, x && S() && (B.onError(O, l, B), (ye === !0 || j(ye) && ye(O)) && (!p().revalidateOnFocus || !p().revalidateOnReconnect || Z()) && B.onErrorRetry(O, l, B, (Vt) => {
1390
- const be = E[l];
1391
- be && be[0] && be[0](lt, Vt);
1390
+ nt();
1391
+ const B = p(), { shouldRetryOnError: xe } = B;
1392
+ B.isPaused() || (ue.error = O, b && $() && (B.onError(O, l, B), (xe === !0 || W(xe) && xe(O)) && (!p().revalidateOnFocus || !p().revalidateOnReconnect || Z()) && B.onErrorRetry(O, l, B, (Mt) => {
1393
+ const Ne = k[l];
1394
+ Ne && Ne[0] && Ne[0](dt, Mt);
1392
1395
  }, {
1393
- retryCount: (oe.retryCount || 0) + 1,
1396
+ retryCount: (C.retryCount || 0) + 1,
1394
1397
  dedupe: !0
1395
1398
  })));
1396
1399
  }
1397
- return q = !1, et(), !0;
1400
+ return j = !1, fe(), !0;
1398
1401
  },
1399
1402
  // `setState` is immutable, and `eventsCallback`, `fnArg`, and
1400
1403
  // `keyValidating` are depending on `key`, so we can exclude them from
@@ -1411,102 +1414,102 @@ const Ce = Be.use || // This extra generic is to avoid TypeScript mixing up the
1411
1414
  l,
1412
1415
  o
1413
1416
  ]
1414
- ), Ze = Te(
1417
+ ), tt = Re(
1415
1418
  // Use callback to make sure `keyRef.current` returns latest result every time
1416
- (..._) => Et(o, A.current, ..._),
1419
+ (..._) => Ct(o, A.current, ..._),
1417
1420
  // eslint-disable-next-line react-hooks/exhaustive-deps
1418
1421
  []
1419
1422
  );
1420
- if (Se(() => {
1421
- V.current = t, Y.current = n, u(re) || (we.current = re);
1422
- }), Se(() => {
1423
+ if (Ce(() => {
1424
+ V.current = t, Y.current = n, d(oe) || (Te.current = oe);
1425
+ }), Ce(() => {
1423
1426
  if (!l) return;
1424
- const _ = le.bind(R, Oe);
1425
- let v = 0;
1426
- p().revalidateOnFocus && (v = Date.now() + p().focusThrottleInterval);
1427
- const w = Ho(l, E, (q, oe = {}) => {
1428
- if (q == Nt) {
1429
- const x = Date.now();
1430
- p().revalidateOnFocus && x > v && Z() && (v = x + p().focusThrottleInterval, _());
1431
- } else if (q == It)
1427
+ const _ = de.bind(I, $e);
1428
+ let g = 0;
1429
+ p().revalidateOnFocus && (g = Date.now() + p().focusThrottleInterval);
1430
+ const y = Go(l, k, (j, C = {}) => {
1431
+ if (j == Rt) {
1432
+ const b = Date.now();
1433
+ p().revalidateOnFocus && b > g && Z() && (g = b + p().focusThrottleInterval, _());
1434
+ } else if (j == It)
1432
1435
  p().revalidateOnReconnect && Z() && _();
1433
1436
  else {
1434
- if (q == Rt)
1435
- return le();
1436
- if (q == lt)
1437
- return le(oe);
1437
+ if (j == St)
1438
+ return de();
1439
+ if (j == dt)
1440
+ return de(C);
1438
1441
  }
1439
1442
  });
1440
- return T.current = !1, A.current = l, J.current = !0, ee({
1441
- _k: fe
1442
- }), Je && (D[l] || (u(G) || ie ? _() : So(_))), () => {
1443
- T.current = !0, w();
1443
+ return x.current = !1, A.current = l, J.current = !0, ee({
1444
+ _k: me
1445
+ }), Ze && (D[l] || (d(X) || ie ? _() : ko(_))), () => {
1446
+ x.current = !0, y();
1444
1447
  };
1445
1448
  }, [
1446
1449
  l
1447
- ]), Se(() => {
1450
+ ]), Ce(() => {
1448
1451
  let _;
1449
- function v() {
1450
- const w = j(d) ? d(M().data) : d;
1451
- w && _ !== -1 && (_ = setTimeout(y, w));
1452
+ function g() {
1453
+ const y = W(u) ? u(M().data) : u;
1454
+ y && _ !== -1 && (_ = setTimeout(w, y));
1452
1455
  }
1453
- function y() {
1454
- !M().error && (g || p().isVisible()) && (m || p().isOnline()) ? le(Oe).then(v) : v();
1456
+ function w() {
1457
+ !M().error && (v || p().isVisible()) && (m || p().isOnline()) ? de($e).then(g) : g();
1455
1458
  }
1456
- return v(), () => {
1459
+ return g(), () => {
1457
1460
  _ && (clearTimeout(_), _ = -1);
1458
1461
  };
1459
1462
  }, [
1460
- d,
1461
- g,
1463
+ u,
1464
+ v,
1462
1465
  m,
1463
1466
  l
1464
- ]), Xt(me), i) {
1465
- if (!ut && ie && X)
1467
+ ]), Kt(ve), i) {
1468
+ if (!ft && ie && K)
1466
1469
  throw new Error("Fallback data is required when using Suspense in SSR.");
1467
- X && (V.current = t, Y.current = n, T.current = !1);
1468
- const _ = ce[l], v = !u(_) && X ? Ze(_) : _t;
1469
- if (Ce(v), !u(_e) && X)
1470
- throw _e;
1471
- const y = X ? le(Oe) : _t;
1472
- !u(me) && X && (y.status = "fulfilled", y.value = !0), Ce(y);
1470
+ K && (V.current = t, Y.current = n, x.current = !1);
1471
+ const _ = ce[l], g = !d(_) && K ? tt(_) : mt;
1472
+ if (qe(g), !d(pe) && K)
1473
+ throw pe;
1474
+ const w = K ? de($e) : mt;
1475
+ !d(ve) && K && (w.status = "fulfilled", w.value = !0), qe(w);
1473
1476
  }
1474
1477
  return {
1475
- mutate: Ze,
1478
+ mutate: tt,
1476
1479
  get data() {
1477
- return te.data = !0, me;
1480
+ return te.data = !0, ve;
1478
1481
  },
1479
1482
  get error() {
1480
- return te.error = !0, _e;
1483
+ return te.error = !0, pe;
1481
1484
  },
1482
1485
  get isValidating() {
1483
- return te.isValidating = !0, Dt;
1486
+ return te.isValidating = !0, At;
1484
1487
  },
1485
1488
  get isLoading() {
1486
- return te.isLoading = !0, At;
1489
+ return te.isLoading = !0, Vt;
1487
1490
  }
1488
1491
  };
1489
- }, mt = zo(Go);
1490
- class Xo extends Error {
1492
+ }, pt = Ho(Ko);
1493
+ class Qo extends Error {
1491
1494
  constructor({ message: t, status: n, data: o }) {
1492
1495
  super(t), this.name = "TwitterApiError", this.status = n, this.data = o;
1493
1496
  }
1494
1497
  }
1495
- const Ko = mt.default || mt, Qo = "https://react-tweet.vercel.app";
1496
- async function Jo([e, t]) {
1498
+ const Jo = pt.default || pt, Yo = "https://react-tweet.vercel.app";
1499
+ async function Zo([e, t]) {
1497
1500
  const n = await fetch(e, t), o = await n.json();
1498
1501
  if (n.ok) return o.data || null;
1499
- throw new Xo({
1502
+ throw new Qo({
1500
1503
  message: `Failed to fetch tweet at "${e}" with "${n.status}".`,
1501
1504
  data: o,
1502
1505
  status: n.status
1503
1506
  });
1504
1507
  }
1505
- const Yo = (e, t, n) => {
1506
- const { isLoading: o, data: a, error: i } = Ko(() => t || e ? [
1507
- t || e && `${Qo}/api/tweet/${e}`,
1508
+ const ea = (e, t, n) => {
1509
+ const { isLoading: o, data: a, error: i } = Jo(() => t || e ? [
1510
+ t || e && `${Yo}/api/tweet/${e}`,
1508
1511
  n
1509
- ] : null, Jo, {
1512
+ ] : null, Zo, {
1510
1513
  revalidateIfStale: !1,
1511
1514
  revalidateOnFocus: !1,
1512
1515
  shouldRetryOnError: !1
@@ -1518,120 +1521,83 @@ const Yo = (e, t, n) => {
1518
1521
  data: a,
1519
1522
  error: i
1520
1523
  };
1521
- }, Zo = ({ id: e, apiUrl: t, fallback: n = /* @__PURE__ */ r(go, {}), components: o, fetchOptions: a, onError: i }) => {
1522
- const { data: s, error: c, isLoading: f } = Yo(e, t, a);
1524
+ }, ta = ({ id: e, apiUrl: t, fallback: n = /* @__PURE__ */ r(wo, {}), components: o, fetchOptions: a, onError: i }) => {
1525
+ const { data: s, error: c, isLoading: f } = ea(e, t, a);
1523
1526
  if (f) return n;
1524
1527
  if (c || !s) {
1525
- const d = (o == null ? void 0 : o.TweetNotFound) || ho;
1526
- return /* @__PURE__ */ r(d, {
1528
+ const u = (o == null ? void 0 : o.TweetNotFound) || _o;
1529
+ return /* @__PURE__ */ r(u, {
1527
1530
  error: i ? i(c) : c
1528
1531
  });
1529
1532
  }
1530
- return /* @__PURE__ */ r(lo, {
1533
+ return /* @__PURE__ */ r(uo, {
1531
1534
  tweet: s,
1532
1535
  components: o
1533
1536
  });
1534
1537
  };
1535
- function ea({ node: e }) {
1538
+ function na({ node: e }) {
1536
1539
  var o;
1537
1540
  const t = ((o = e == null ? void 0 : e.attrs) == null ? void 0 : o.src) || "", n = t == null ? void 0 : t.split("/").pop();
1538
- return n ? /* @__PURE__ */ r(Mt, { children: /* @__PURE__ */ r("div", { "data-twitter": "", children: /* @__PURE__ */ r(Zo, { id: n }) }) }) : null;
1541
+ return n ? /* @__PURE__ */ r(Ft, { children: /* @__PURE__ */ r("div", { "data-twitter": "", children: /* @__PURE__ */ r(ta, { id: n }) }) }) : null;
1539
1542
  }
1540
- function ta(e) {
1541
- const { t } = Qt(), [n, o] = se("");
1542
- Fe(() => {
1543
+ function ra(e) {
1544
+ const { t } = on(), [n, o] = se("");
1545
+ ze(() => {
1543
1546
  var i;
1544
1547
  if (e != null && e.editor) {
1545
- const { src: s } = (i = e.editor) == null ? void 0 : i.getAttributes(Lt.name);
1548
+ const { src: s } = (i = e.editor) == null ? void 0 : i.getAttributes(qt.name);
1546
1549
  s && o(s);
1547
1550
  }
1548
1551
  }, [e == null ? void 0 : e.editor]);
1549
1552
  function a(i) {
1550
1553
  i.preventDefault(), i.stopPropagation(), e == null || e.onSetLink(n);
1551
1554
  }
1552
- return /* @__PURE__ */ h(
1553
- "form",
1554
- {
1555
- className: "richtext-flex richtext-flex-col richtext-gap-2",
1556
- onSubmit: a,
1557
- children: [
1558
- /* @__PURE__ */ r(Jt, { className: "mb-[6px]", children: t("editor.link.dialog.text") }),
1559
- /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: /* @__PURE__ */ r(
1560
- Yt,
1561
- {
1562
- className: "richtext-w-80",
1563
- onChange: (i) => o(i.target.value),
1564
- placeholder: "Text",
1565
- required: !0,
1566
- type: "text",
1567
- value: n
1568
- }
1569
- ) }) }),
1570
- /* @__PURE__ */ r(
1571
- Zt,
1572
- {
1573
- className: "richtext-mt-2 richtext-self-end",
1574
- type: "submit",
1575
- children: t("editor.link.dialog.button.apply")
1576
- }
1577
- )
1578
- ]
1579
- }
1580
- );
1555
+ return /* @__PURE__ */ h("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: a, children: [
1556
+ /* @__PURE__ */ r(Qt, { className: "mb-[6px]", children: t("editor.link.dialog.text") }),
1557
+ /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: /* @__PURE__ */ r(
1558
+ Jt,
1559
+ {
1560
+ className: "richtext-w-80",
1561
+ onChange: (i) => o(i.target.value),
1562
+ placeholder: "Text",
1563
+ required: !0,
1564
+ type: "text",
1565
+ value: n
1566
+ }
1567
+ ) }) }),
1568
+ /* @__PURE__ */ r(Yt, { className: "richtext-mt-2 richtext-self-end", type: "submit", children: t("editor.link.dialog.button.apply") })
1569
+ ] });
1581
1570
  }
1582
- function ga() {
1583
- const [e, t] = se(!1), n = en(), o = tn(Lt.name), {
1571
+ function ma() {
1572
+ const [e, t] = se(!1), n = Zt(), o = en(qt.name), {
1584
1573
  icon: a = void 0,
1585
1574
  tooltip: i = void 0,
1586
1575
  tooltipOptions: s = {},
1587
1576
  action: c = void 0,
1588
1577
  isActive: f = void 0
1589
- } = (o == null ? void 0 : o.componentProps) ?? {}, { editorDisabled: d } = nn(f);
1590
- function g(m) {
1591
- d || c && (c(m), t(!1));
1578
+ } = (o == null ? void 0 : o.componentProps) ?? {}, { editorDisabled: u } = tn(f);
1579
+ function v(m) {
1580
+ u || c && (c(m), t(!1));
1592
1581
  }
1593
- return /* @__PURE__ */ h(
1594
- rn,
1595
- {
1596
- modal: !0,
1597
- onOpenChange: t,
1598
- open: e,
1599
- children: [
1600
- /* @__PURE__ */ r(on, { asChild: !0, children: /* @__PURE__ */ r(
1601
- Kt,
1602
- {
1603
- disabled: d,
1604
- isActive: f,
1605
- tooltip: i,
1606
- tooltipOptions: s,
1607
- children: /* @__PURE__ */ r(sn, { name: a })
1608
- }
1609
- ) }),
1610
- /* @__PURE__ */ r(
1611
- an,
1612
- {
1613
- align: "start",
1614
- className: "richtext-w-full",
1615
- hideWhenDetached: !0,
1616
- side: "bottom",
1617
- children: /* @__PURE__ */ r(
1618
- ta,
1619
- {
1620
- editor: n,
1621
- onSetLink: g
1622
- }
1623
- )
1624
- }
1625
- )
1626
- ]
1627
- }
1628
- );
1582
+ return /* @__PURE__ */ h(an, { modal: !0, onOpenChange: t, open: e, children: [
1583
+ /* @__PURE__ */ r(sn, { asChild: !0, children: /* @__PURE__ */ r(
1584
+ nn,
1585
+ {
1586
+ disabled: u,
1587
+ isActive: f,
1588
+ tooltip: i,
1589
+ tooltipOptions: s,
1590
+ children: /* @__PURE__ */ r(rn, { name: a })
1591
+ }
1592
+ ) }),
1593
+ /* @__PURE__ */ r(cn, { align: "start", className: "richtext-w-full", hideWhenDetached: !0, side: "bottom", children: /* @__PURE__ */ r(ra, { editor: n, onSetLink: v }) })
1594
+ ] });
1629
1595
  }
1630
- const na = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, ra = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
1631
- function pt(e) {
1632
- return e.match(ra);
1596
+ const oa = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, aa = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
1597
+ function vt(e) {
1598
+ return e.match(aa);
1633
1599
  }
1634
- const Lt = /* @__PURE__ */ jt.create({
1600
+ const qt = /* @__PURE__ */ jt.create({
1635
1601
  name: "twitter",
1636
1602
  draggable: !0,
1637
1603
  selectable: !0,
@@ -1656,7 +1622,9 @@ const Lt = /* @__PURE__ */ jt.create({
1656
1622
  };
1657
1623
  },
1658
1624
  addNodeView() {
1659
- return Ft(ea, { attrs: this.options.HTMLAttributes });
1625
+ return Pt(na, {
1626
+ attrs: this.options.HTMLAttributes
1627
+ });
1660
1628
  },
1661
1629
  inline() {
1662
1630
  return this.options.inline;
@@ -1680,17 +1648,17 @@ const Lt = /* @__PURE__ */ jt.create({
1680
1648
  },
1681
1649
  addCommands() {
1682
1650
  return {
1683
- setTweet: (e) => ({ commands: t }) => pt(e.src) ? t.insertContent({
1651
+ setTweet: (e) => ({ commands: t }) => vt(e.src) ? t.insertContent({
1684
1652
  type: this.name,
1685
1653
  attrs: e
1686
1654
  }) : !1,
1687
- updateTweet: (e) => ({ commands: t }) => pt(e.src) ? t.updateAttributes(this.name, { src: e.src }) : !1
1655
+ updateTweet: (e) => ({ commands: t }) => vt(e.src) ? t.updateAttributes(this.name, { src: e.src }) : !1
1688
1656
  };
1689
1657
  },
1690
1658
  addPasteRules() {
1691
1659
  return this.options.addPasteHandler ? [
1692
1660
  Bt({
1693
- find: na,
1661
+ find: oa,
1694
1662
  type: this.type,
1695
1663
  getAttributes: (e) => ({ src: e.input })
1696
1664
  })
@@ -1701,7 +1669,7 @@ const Lt = /* @__PURE__ */ jt.create({
1701
1669
  }
1702
1670
  });
1703
1671
  export {
1704
- ta as F,
1705
- ga as R,
1706
- Lt as T
1672
+ ra as F,
1673
+ ma as R,
1674
+ qt as T
1707
1675
  };