reactjs-tiptap-editor 1.0.6 → 1.0.8

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