@select-org/select-post-builder 1.2.7 → 1.2.9

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.
@@ -2506,7 +2506,7 @@ function getDefaultSwipeDirections(u) {
2506
2506
  }
2507
2507
  const Toast = (u) => {
2508
2508
  var n, d, p, m, g, y, b, S, E;
2509
- const { invert: T, toast: C, unstyled: A, interacting: k, setHeights: _, visibleToasts: R, heights: I, index: P, toasts: D, expanded: O, removeToast: N, defaultRichColors: F, closeButton: L, style: j, cancelButtonStyle: B, actionButtonStyle: Y, className: te = "", descriptionClassName: ee = "", duration: J, position: se, gap: Z, expandByDefault: re, classNames: V, icons: q, closeButtonAriaLabel: H = "Close toast" } = u, [W, Q] = React__default.useState(null), [ne, le] = React__default.useState(null), [ce, ae] = React__default.useState(!1), [oe, de] = React__default.useState(!1), [fe, he] = React__default.useState(!1), [ge, ve] = React__default.useState(!1), [be, ye] = React__default.useState(!1), [xe, me] = React__default.useState(0), [Ae, _e] = React__default.useState(0), ke = React__default.useRef(C.duration || J || TOAST_LIFETIME), Re = React__default.useRef(null), De = React__default.useRef(null), Be = P === 0, Ne = P + 1 <= R, Fe = C.type, Le = C.dismissible !== !1, Oe = C.className || "", Te = C.descriptionClassName || "", Ie = React__default.useMemo(() => I.findIndex((Pe) => Pe.toastId === C.id) || 0, [
2509
+ const { invert: T, toast: C, unstyled: A, interacting: k, setHeights: _, visibleToasts: R, heights: I, index: P, toasts: D, expanded: O, removeToast: N, defaultRichColors: F, closeButton: L, style: j, cancelButtonStyle: B, actionButtonStyle: Y, className: te = "", descriptionClassName: ee = "", duration: J, position: se, gap: Z, expandByDefault: re, classNames: V, icons: q, closeButtonAriaLabel: H = "Close toast" } = u, [W, Q] = React__default.useState(null), [ne, le] = React__default.useState(null), [ce, ae] = React__default.useState(!1), [oe, de] = React__default.useState(!1), [fe, he] = React__default.useState(!1), [ge, ve] = React__default.useState(!1), [be, ye] = React__default.useState(!1), [xe, me] = React__default.useState(0), [we, _e] = React__default.useState(0), ke = React__default.useRef(C.duration || J || TOAST_LIFETIME), Me = React__default.useRef(null), Ie = React__default.useRef(null), Be = P === 0, Oe = P + 1 <= R, Fe = C.type, Le = C.dismissible !== !1, De = C.className || "", Te = C.descriptionClassName || "", Ne = React__default.useMemo(() => I.findIndex((Pe) => Pe.toastId === C.id) || 0, [
2510
2510
  I,
2511
2511
  C.id
2512
2512
  ]), $e = React__default.useMemo(() => {
@@ -2518,12 +2518,12 @@ const Toast = (u) => {
2518
2518
  ]), Ue = React__default.useMemo(() => C.duration || J || TOAST_LIFETIME, [
2519
2519
  C.duration,
2520
2520
  J
2521
- ]), Ye = React__default.useRef(0), ze = React__default.useRef(0), We = React__default.useRef(0), Ge = React__default.useRef(null), [nt, pe] = se.split("-"), Ee = React__default.useMemo(() => I.reduce((Pe, Ke, Ve) => Ve >= Ie ? Pe : Pe + Ke.height, 0), [
2521
+ ]), Ye = React__default.useRef(0), ze = React__default.useRef(0), We = React__default.useRef(0), Ge = React__default.useRef(null), [nt, pe] = se.split("-"), Ee = React__default.useMemo(() => I.reduce((Pe, Ke, Ve) => Ve >= Ne ? Pe : Pe + Ke.height, 0), [
2522
2522
  I,
2523
- Ie
2524
- ]), we = useIsDocumentHidden(), He = C.invert || T, je = Fe === "loading";
2525
- ze.current = React__default.useMemo(() => Ie * Z + Ee, [
2526
- Ie,
2523
+ Ne
2524
+ ]), Ce = useIsDocumentHidden(), He = C.invert || T, je = Fe === "loading";
2525
+ ze.current = React__default.useMemo(() => Ne * Z + Ee, [
2526
+ Ne,
2527
2527
  Ee
2528
2528
  ]), React__default.useEffect(() => {
2529
2529
  ke.current = Ue;
@@ -2532,7 +2532,7 @@ const Toast = (u) => {
2532
2532
  ]), React__default.useEffect(() => {
2533
2533
  ae(!0);
2534
2534
  }, []), React__default.useEffect(() => {
2535
- const Pe = De.current;
2535
+ const Pe = Ie.current;
2536
2536
  if (Pe) {
2537
2537
  const Ke = Pe.getBoundingClientRect().height;
2538
2538
  return _e(Ke), _((Ve) => [
@@ -2549,7 +2549,7 @@ const Toast = (u) => {
2549
2549
  C.id
2550
2550
  ]), React__default.useLayoutEffect(() => {
2551
2551
  if (!ce) return;
2552
- const Pe = De.current, Ke = Pe.style.height;
2552
+ const Pe = Ie.current, Ke = Pe.style.height;
2553
2553
  Pe.style.height = "auto";
2554
2554
  const Ve = Pe.getBoundingClientRect().height;
2555
2555
  Pe.style.height = Ke, _e(Ve), _((qe) => qe.find((Qe) => Qe.toastId === C.id) ? qe.map((Qe) => Qe.toastId === C.id ? {
@@ -2586,7 +2586,7 @@ const Toast = (u) => {
2586
2586
  React__default.useEffect(() => {
2587
2587
  if (C.promise && Fe === "loading" || C.duration === 1 / 0 || C.type === "loading") return;
2588
2588
  let Pe;
2589
- return O || k || we ? (() => {
2589
+ return O || k || Ce ? (() => {
2590
2590
  if (We.current < Ye.current) {
2591
2591
  const qe = (/* @__PURE__ */ new Date()).getTime() - Ye.current;
2592
2592
  ke.current = ke.current - qe;
@@ -2600,7 +2600,7 @@ const Toast = (u) => {
2600
2600
  k,
2601
2601
  C,
2602
2602
  Fe,
2603
- we,
2603
+ Ce,
2604
2604
  Xe
2605
2605
  ]), React__default.useEffect(() => {
2606
2606
  C.delete && (Xe(), C.onDismiss == null || C.onDismiss.call(C, C));
@@ -2626,8 +2626,8 @@ const Toast = (u) => {
2626
2626
  var ot, Ze;
2627
2627
  return /* @__PURE__ */ React__default.createElement("li", {
2628
2628
  tabIndex: 0,
2629
- ref: De,
2630
- className: cn$1(te, Oe, V?.toast, C == null || (n = C.classNames) == null ? void 0 : n.toast, V?.default, V?.[Fe], C == null || (d = C.classNames) == null ? void 0 : d[Fe]),
2629
+ ref: Ie,
2630
+ className: cn$1(te, De, V?.toast, C == null || (n = C.classNames) == null ? void 0 : n.toast, V?.default, V?.[Fe], C == null || (d = C.classNames) == null ? void 0 : d[Fe]),
2631
2631
  "data-sonner-toast": "",
2632
2632
  "data-rich-colors": (ot = C.richColors) != null ? ot : F,
2633
2633
  "data-styled": !(C.jsx || C.unstyled || A),
@@ -2635,7 +2635,7 @@ const Toast = (u) => {
2635
2635
  "data-promise": !!C.promise,
2636
2636
  "data-swiped": be,
2637
2637
  "data-removed": oe,
2638
- "data-visible": Ne,
2638
+ "data-visible": Oe,
2639
2639
  "data-y-position": nt,
2640
2640
  "data-x-position": pe,
2641
2641
  "data-index": P,
@@ -2653,7 +2653,7 @@ const Toast = (u) => {
2653
2653
  "--toasts-before": P,
2654
2654
  "--z-index": D.length - P,
2655
2655
  "--offset": `${oe ? xe : ze.current}px`,
2656
- "--initial-height": re ? "auto" : `${Ae}px`,
2656
+ "--initial-height": re ? "auto" : `${we}px`,
2657
2657
  ...j,
2658
2658
  ...C.style
2659
2659
  },
@@ -2661,7 +2661,7 @@ const Toast = (u) => {
2661
2661
  he(!1), Q(null), Ge.current = null;
2662
2662
  },
2663
2663
  onPointerDown: (Pe) => {
2664
- Pe.button !== 2 && (je || !Le || (Re.current = /* @__PURE__ */ new Date(), me(ze.current), Pe.target.setPointerCapture(Pe.pointerId), Pe.target.tagName !== "BUTTON" && (he(!0), Ge.current = {
2664
+ Pe.button !== 2 && (je || !Le || (Me.current = /* @__PURE__ */ new Date(), me(ze.current), Pe.target.setPointerCapture(Pe.pointerId), Pe.target.tagName !== "BUTTON" && (he(!0), Ge.current = {
2665
2665
  x: Pe.clientX,
2666
2666
  y: Pe.clientY
2667
2667
  })));
@@ -2670,13 +2670,13 @@ const Toast = (u) => {
2670
2670
  var Pe, Ke, Ve;
2671
2671
  if (ge || !Le) return;
2672
2672
  Ge.current = null;
2673
- const qe = Number(((Pe = De.current) == null ? void 0 : Pe.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), it = Number(((Ke = De.current) == null ? void 0 : Ke.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Qe = (/* @__PURE__ */ new Date()).getTime() - ((Ve = Re.current) == null ? void 0 : Ve.getTime()), at = W === "x" ? qe : it, vt = Math.abs(at) / Qe;
2673
+ const qe = Number(((Pe = Ie.current) == null ? void 0 : Pe.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), it = Number(((Ke = Ie.current) == null ? void 0 : Ke.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Qe = (/* @__PURE__ */ new Date()).getTime() - ((Ve = Me.current) == null ? void 0 : Ve.getTime()), at = W === "x" ? qe : it, vt = Math.abs(at) / Qe;
2674
2674
  if (Math.abs(at) >= SWIPE_THRESHOLD || vt > 0.11) {
2675
2675
  me(ze.current), C.onDismiss == null || C.onDismiss.call(C, C), le(W === "x" ? qe > 0 ? "right" : "left" : it > 0 ? "down" : "up"), Xe(), ve(!0);
2676
2676
  return;
2677
2677
  } else {
2678
2678
  var dt, ht;
2679
- (dt = De.current) == null || dt.style.setProperty("--swipe-amount-x", "0px"), (ht = De.current) == null || ht.style.setProperty("--swipe-amount-y", "0px");
2679
+ (dt = Ie.current) == null || dt.style.setProperty("--swipe-amount-x", "0px"), (ht = Ie.current) == null || ht.style.setProperty("--swipe-amount-y", "0px");
2680
2680
  }
2681
2681
  ye(!1), he(!1), Q(null);
2682
2682
  },
@@ -2707,7 +2707,7 @@ const Toast = (u) => {
2707
2707
  const ut = at * pt(at);
2708
2708
  ht.x = Math.abs(ut) < Math.abs(at) ? ut : at;
2709
2709
  }
2710
- (Math.abs(ht.x) > 0 || Math.abs(ht.y) > 0) && ye(!0), (Ve = De.current) == null || Ve.style.setProperty("--swipe-amount-x", `${ht.x}px`), (qe = De.current) == null || qe.style.setProperty("--swipe-amount-y", `${ht.y}px`);
2710
+ (Math.abs(ht.x) > 0 || Math.abs(ht.y) > 0) && ye(!0), (Ve = Ie.current) == null || Ve.style.setProperty("--swipe-amount-x", `${ht.x}px`), (qe = Ie.current) == null || qe.style.setProperty("--swipe-amount-y", `${ht.y}px`);
2711
2711
  }
2712
2712
  }, $e && !C.jsx && Fe !== "loading" ? /* @__PURE__ */ React__default.createElement("button", {
2713
2713
  "aria-label": H,
@@ -21804,6 +21804,7 @@ const analyticsStore = createStore((u, n) => ({
21804
21804
  enabled: !1,
21805
21805
  debug: !1,
21806
21806
  logEventFn: null,
21807
+ publishCrosspost: /* @__PURE__ */ new Map(),
21807
21808
  initialize: (d, p = {}) => {
21808
21809
  u({
21809
21810
  logEventFn: d,
@@ -21847,32 +21848,35 @@ const analyticsStore = createStore((u, n) => ({
21847
21848
  y(p, C);
21848
21849
  },
21849
21850
  trackPublish: (d, p) => {
21850
- const { trackEvent: m, sessionManager: g } = n(), y = g.getSession(d);
21851
- p.status === "attempted" ? m(d, ANALYTICS_EVENTS.PUBLISH.ATTEMPTED, {
21851
+ const { trackEvent: m, sessionManager: g, publishCrosspost: y } = n(), b = g.getSession(d), S = p.isCrosspost ?? y.get(p.postId) ?? !1;
21852
+ p.status === "attempted" ? (y.set(p.postId, S), m(d, ANALYTICS_EVENTS.PUBLISH.ATTEMPTED, {
21852
21853
  editor_type: p.editorType,
21853
21854
  post_id: p.postId,
21854
21855
  group_id: p.groupId,
21855
21856
  post_type: p.postType,
21857
+ is_crosspost: S,
21856
21858
  word_count: p.wordCount,
21857
21859
  media_count: p.mediaCount,
21858
21860
  link_count: p.linkCount,
21859
21861
  formatting_features: p.formattingFeatures
21860
- }) : p.status === "success" ? m(d, ANALYTICS_EVENTS.PUBLISH.SUCCESS, {
21862
+ })) : p.status === "success" ? (y.delete(p.postId), m(d, ANALYTICS_EVENTS.PUBLISH.SUCCESS, {
21861
21863
  editor_type: p.editorType,
21862
21864
  post_id: p.postId,
21863
21865
  group_id: p.groupId,
21864
21866
  post_type: p.postType,
21867
+ is_crosspost: S,
21865
21868
  word_count: p.wordCount,
21866
21869
  media_count: p.mediaCount,
21867
21870
  link_count: p.linkCount,
21868
21871
  formatting_features: p.formattingFeatures,
21869
21872
  // NEW
21870
- session_duration_ms: y ? Date.now() - y.startTime : void 0
21871
- }) : (g.setLastError(d, p.failureReason || "unknown"), m(d, ANALYTICS_EVENTS.PUBLISH.FAILED, {
21873
+ session_duration_ms: b ? Date.now() - b.startTime : void 0
21874
+ })) : (y.delete(p.postId), g.setLastError(d, p.failureReason || "unknown"), m(d, ANALYTICS_EVENTS.PUBLISH.FAILED, {
21872
21875
  editor_type: p.editorType,
21873
21876
  post_id: p.postId,
21874
21877
  group_id: p.groupId,
21875
21878
  post_type: p.postType,
21879
+ is_crosspost: S,
21876
21880
  error_type: p.failureReason,
21877
21881
  word_count: p.wordCount,
21878
21882
  media_count: p.mediaCount,
@@ -24843,20 +24847,20 @@ var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition", SelectItemAlignedP
24843
24847
  if (g.trigger && g.valueNode && b && E && R && I && P) {
24844
24848
  const j = g.trigger.getBoundingClientRect(), B = E.getBoundingClientRect(), Y = g.valueNode.getBoundingClientRect(), te = P.getBoundingClientRect();
24845
24849
  if (g.dir !== "rtl") {
24846
- const be = te.left - B.left, ye = Y.left - be, xe = j.left - ye, me = j.width + xe, Ae = Math.max(me, B.width), _e = window.innerWidth - CONTENT_MARGIN, ke = clamp$1(ye, [
24850
+ const be = te.left - B.left, ye = Y.left - be, xe = j.left - ye, me = j.width + xe, we = Math.max(me, B.width), _e = window.innerWidth - CONTENT_MARGIN, ke = clamp$1(ye, [
24847
24851
  CONTENT_MARGIN,
24848
24852
  // Prevents the content from going off the starting edge of the
24849
24853
  // viewport. It may still go off the ending edge, but this can be
24850
24854
  // controlled by the user since they may want to manage overflow in a
24851
24855
  // specific way.
24852
24856
  // https://github.com/radix-ui/primitives/issues/2049
24853
- Math.max(CONTENT_MARGIN, _e - Ae)
24857
+ Math.max(CONTENT_MARGIN, _e - we)
24854
24858
  ]);
24855
24859
  b.style.minWidth = me + "px", b.style.left = ke + "px";
24856
24860
  } else {
24857
- const be = B.right - te.right, ye = window.innerWidth - Y.right - be, xe = window.innerWidth - j.right - ye, me = j.width + xe, Ae = Math.max(me, B.width), _e = window.innerWidth - CONTENT_MARGIN, ke = clamp$1(ye, [
24861
+ const be = B.right - te.right, ye = window.innerWidth - Y.right - be, xe = window.innerWidth - j.right - ye, me = j.width + xe, we = Math.max(me, B.width), _e = window.innerWidth - CONTENT_MARGIN, ke = clamp$1(ye, [
24858
24862
  CONTENT_MARGIN,
24859
- Math.max(CONTENT_MARGIN, _e - Ae)
24863
+ Math.max(CONTENT_MARGIN, _e - we)
24860
24864
  ]);
24861
24865
  b.style.minWidth = me + "px", b.style.right = ke + "px";
24862
24866
  }
@@ -30892,8 +30896,8 @@ function requireLottie() {
30892
30896
  var me = this.props;
30893
30897
  if (H === 1 && W === 0 && Q === 0 && ne === 0 && le === 0 && ce === 1 && ae === 0 && oe === 0 && de === 0 && fe === 0 && he === 1 && ge === 0)
30894
30898
  return me[12] = me[12] * H + me[15] * ve, me[13] = me[13] * ce + me[15] * be, me[14] = me[14] * he + me[15] * ye, me[15] *= xe, this._identityCalculated = !1, this;
30895
- var Ae = me[0], _e = me[1], ke = me[2], Re = me[3], De = me[4], Be = me[5], Ne = me[6], Fe = me[7], Le = me[8], Oe = me[9], Te = me[10], Ie = me[11], $e = me[12], Ue = me[13], Ye = me[14], ze = me[15];
30896
- return me[0] = Ae * H + _e * le + ke * de + Re * ve, me[1] = Ae * W + _e * ce + ke * fe + Re * be, me[2] = Ae * Q + _e * ae + ke * he + Re * ye, me[3] = Ae * ne + _e * oe + ke * ge + Re * xe, me[4] = De * H + Be * le + Ne * de + Fe * ve, me[5] = De * W + Be * ce + Ne * fe + Fe * be, me[6] = De * Q + Be * ae + Ne * he + Fe * ye, me[7] = De * ne + Be * oe + Ne * ge + Fe * xe, me[8] = Le * H + Oe * le + Te * de + Ie * ve, me[9] = Le * W + Oe * ce + Te * fe + Ie * be, me[10] = Le * Q + Oe * ae + Te * he + Ie * ye, me[11] = Le * ne + Oe * oe + Te * ge + Ie * xe, me[12] = $e * H + Ue * le + Ye * de + ze * ve, me[13] = $e * W + Ue * ce + Ye * fe + ze * be, me[14] = $e * Q + Ue * ae + Ye * he + ze * ye, me[15] = $e * ne + Ue * oe + Ye * ge + ze * xe, this._identityCalculated = !1, this;
30899
+ var we = me[0], _e = me[1], ke = me[2], Me = me[3], Ie = me[4], Be = me[5], Oe = me[6], Fe = me[7], Le = me[8], De = me[9], Te = me[10], Ne = me[11], $e = me[12], Ue = me[13], Ye = me[14], ze = me[15];
30900
+ return me[0] = we * H + _e * le + ke * de + Me * ve, me[1] = we * W + _e * ce + ke * fe + Me * be, me[2] = we * Q + _e * ae + ke * he + Me * ye, me[3] = we * ne + _e * oe + ke * ge + Me * xe, me[4] = Ie * H + Be * le + Oe * de + Fe * ve, me[5] = Ie * W + Be * ce + Oe * fe + Fe * be, me[6] = Ie * Q + Be * ae + Oe * he + Fe * ye, me[7] = Ie * ne + Be * oe + Oe * ge + Fe * xe, me[8] = Le * H + De * le + Te * de + Ne * ve, me[9] = Le * W + De * ce + Te * fe + Ne * be, me[10] = Le * Q + De * ae + Te * he + Ne * ye, me[11] = Le * ne + De * oe + Te * ge + Ne * xe, me[12] = $e * H + Ue * le + Ye * de + ze * ve, me[13] = $e * W + Ue * ce + Ye * fe + ze * be, me[14] = $e * Q + Ue * ae + Ye * he + ze * ye, me[15] = $e * ne + Ue * oe + Ye * ge + ze * xe, this._identityCalculated = !1, this;
30897
30901
  }
30898
30902
  function I(H) {
30899
30903
  var W = H.props;
@@ -33388,25 +33392,25 @@ function requireLottie() {
33388
33392
  C = A.length, S = 0, E = 0;
33389
33393
  var Z = u.finalSize * 1.2 * 0.714, re = !0, V, q, H, W, Q;
33390
33394
  W = p.length;
33391
- var ne, le = -1, ce, ae, oe, de = _, fe = O, he = D, ge = -1, ve, be, ye, xe, me, Ae, _e, ke, Re = "", De = this.defaultPropsArray, Be;
33395
+ var ne, le = -1, ce, ae, oe, de = _, fe = O, he = D, ge = -1, ve, be, ye, xe, me, we, _e, ke, Me = "", Ie = this.defaultPropsArray, Be;
33392
33396
  if (u.j === 2 || u.j === 1) {
33393
- var Ne = 0, Fe = 0, Le = u.j === 2 ? -0.5 : -1, Oe = 0, Te = !0;
33397
+ var Oe = 0, Fe = 0, Le = u.j === 2 ? -0.5 : -1, De = 0, Te = !0;
33394
33398
  for (T = 0; T < C; T += 1)
33395
33399
  if (A[T].n) {
33396
- for (Ne && (Ne += Fe); Oe < T; )
33397
- A[Oe].animatorJustifyOffset = Ne, Oe += 1;
33398
- Ne = 0, Te = !0;
33400
+ for (Oe && (Oe += Fe); De < T; )
33401
+ A[De].animatorJustifyOffset = Oe, De += 1;
33402
+ Oe = 0, Te = !0;
33399
33403
  } else {
33400
33404
  for (H = 0; H < W; H += 1)
33401
- V = p[H].a, V.t.propType && (Te && u.j === 2 && (Fe += V.t.v * Le), q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), ne.length ? Ne += V.t.v * ne[0] * Le : Ne += V.t.v * ne * Le);
33405
+ V = p[H].a, V.t.propType && (Te && u.j === 2 && (Fe += V.t.v * Le), q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), ne.length ? Oe += V.t.v * ne[0] * Le : Oe += V.t.v * ne * Le);
33402
33406
  Te = !1;
33403
33407
  }
33404
- for (Ne && (Ne += Fe); Oe < T; )
33405
- A[Oe].animatorJustifyOffset = Ne, Oe += 1;
33408
+ for (Oe && (Oe += Fe); De < T; )
33409
+ A[De].animatorJustifyOffset = Oe, De += 1;
33406
33410
  }
33407
33411
  for (T = 0; T < C; T += 1) {
33408
33412
  if (g.reset(), ve = 1, A[T].n)
33409
- S = 0, E += u.yOffset, E += re ? 1 : 0, _ = de, re = !1, this._hasMaskedPath && (O = fe, D = he, F = L[O].points, N = F[D - 1], R = F[D], j = R.partialLength, I = 0), Re = "", ke = "", Ae = "", Be = "", De = this.defaultPropsArray;
33413
+ S = 0, E += u.yOffset, E += re ? 1 : 0, _ = de, re = !1, this._hasMaskedPath && (O = fe, D = he, F = L[O].points, N = F[D - 1], R = F[D], j = R.partialLength, I = 0), Me = "", ke = "", we = "", Be = "", Ie = this.defaultPropsArray;
33410
33414
  else {
33411
33415
  if (this._hasMaskedPath) {
33412
33416
  if (ge !== A[T].line) {
@@ -33421,11 +33425,11 @@ function requireLottie() {
33421
33425
  ge = A[T].line;
33422
33426
  }
33423
33427
  le !== A[T].ind && (A[le] && (_ += A[le].extra), _ += A[T].an / 2, le = A[T].ind), _ += d[0] * A[T].an * 5e-3;
33424
- var Ie = 0;
33428
+ var Ne = 0;
33425
33429
  for (H = 0; H < W; H += 1)
33426
- V = p[H].a, V.p.propType && (q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), ne.length ? Ie += V.p.v[0] * ne[0] : Ie += V.p.v[0] * ne), V.a.propType && (q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), ne.length ? Ie += V.a.v[0] * ne[0] : Ie += V.a.v[0] * ne);
33430
+ V = p[H].a, V.p.propType && (q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), ne.length ? Ne += V.p.v[0] * ne[0] : Ne += V.p.v[0] * ne), V.a.propType && (q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), ne.length ? Ne += V.a.v[0] * ne[0] : Ne += V.a.v[0] * ne);
33427
33431
  for (P = !0, this._pathData.a.v && (_ = A[0].an * 0.5 + (B - this._pathData.f.v - A[0].an * 0.5 - A[A.length - 1].an * 0.5) * le / (C - 1), _ += this._pathData.f.v); P; )
33428
- I + j >= _ + Ie || !F ? (Y = (_ + Ie - I) / R.partialLength, ae = N.point[0] + (R.point[0] - N.point[0]) * Y, oe = N.point[1] + (R.point[1] - N.point[1]) * Y, g.translate(-d[0] * A[T].an * 5e-3, -(d[1] * Z) * 0.01), P = !1) : F && (I += R.partialLength, D += 1, D >= F.length && (D = 0, O += 1, L[O] ? F = L[O].points : ee.v.c ? (D = 0, O = 0, F = L[O].points) : (I -= R.partialLength, F = null)), F && (N = R, R = F[D], j = R.partialLength));
33432
+ I + j >= _ + Ne || !F ? (Y = (_ + Ne - I) / R.partialLength, ae = N.point[0] + (R.point[0] - N.point[0]) * Y, oe = N.point[1] + (R.point[1] - N.point[1]) * Y, g.translate(-d[0] * A[T].an * 5e-3, -(d[1] * Z) * 0.01), P = !1) : F && (I += R.partialLength, D += 1, D >= F.length && (D = 0, O += 1, L[O] ? F = L[O].points : ee.v.c ? (D = 0, O = 0, F = L[O].points) : (I -= R.partialLength, F = null)), F && (N = R, R = F[D], j = R.partialLength));
33429
33433
  ce = A[T].an / 2 - A[T].add, g.translate(-ce, 0, 0);
33430
33434
  } else
33431
33435
  ce = A[T].an / 2 - A[T].add, g.translate(-ce, 0, 0), g.translate(-d[0] * A[T].an * 5e-3, -d[1] * Z * 0.01, 0);
@@ -33448,7 +33452,7 @@ function requireLottie() {
33448
33452
  }
33449
33453
  for (H = 0; H < W; H += 1)
33450
33454
  V = p[H].a, V.p.propType && (q = p[H].s, ne = q.getMult(A[T].anIndexes[H], m.a[H].s.totalChars), this._hasMaskedPath ? ne.length ? g.translate(0, V.p.v[1] * ne[0], -V.p.v[2] * ne[1]) : g.translate(0, V.p.v[1] * ne, -V.p.v[2] * ne) : ne.length ? g.translate(V.p.v[0] * ne[0], V.p.v[1] * ne[1], -V.p.v[2] * ne[2]) : g.translate(V.p.v[0] * ne, V.p.v[1] * ne, -V.p.v[2] * ne));
33451
- if (u.strokeWidthAnim && (Ae = ye < 0 ? 0 : ye), u.strokeColorAnim && (_e = "rgb(" + Math.round(be[0] * 255) + "," + Math.round(be[1] * 255) + "," + Math.round(be[2] * 255) + ")"), u.fillColorAnim && u.fc && (ke = "rgb(" + Math.round(xe[0] * 255) + "," + Math.round(xe[1] * 255) + "," + Math.round(xe[2] * 255) + ")"), this._hasMaskedPath) {
33455
+ if (u.strokeWidthAnim && (we = ye < 0 ? 0 : ye), u.strokeColorAnim && (_e = "rgb(" + Math.round(be[0] * 255) + "," + Math.round(be[1] * 255) + "," + Math.round(be[2] * 255) + ")"), u.fillColorAnim && u.fc && (ke = "rgb(" + Math.round(xe[0] * 255) + "," + Math.round(xe[1] * 255) + "," + Math.round(xe[2] * 255) + ")"), this._hasMaskedPath) {
33452
33456
  if (g.translate(0, -u.ls), g.translate(0, d[1] * Z * 0.01 + E, 0), this._pathData.p.v) {
33453
33457
  te = (R.point[1] - N.point[1]) / (R.point[0] - N.point[0]);
33454
33458
  var $e = Math.atan(te) * 180 / Math.PI;
@@ -33466,9 +33470,9 @@ function requireLottie() {
33466
33470
  }
33467
33471
  g.translate(0, -u.ls), g.translate(ce, 0, 0), g.translate(d[0] * A[T].an * 5e-3, d[1] * Z * 0.01, 0), S += A[T].l + u.tr * 1e-3 * u.finalSize;
33468
33472
  }
33469
- y === "html" ? Re = g.toCSS() : y === "svg" ? Re = g.to2dCSS() : De = [g.props[0], g.props[1], g.props[2], g.props[3], g.props[4], g.props[5], g.props[6], g.props[7], g.props[8], g.props[9], g.props[10], g.props[11], g.props[12], g.props[13], g.props[14], g.props[15]], Be = ve;
33473
+ y === "html" ? Me = g.toCSS() : y === "svg" ? Me = g.to2dCSS() : Ie = [g.props[0], g.props[1], g.props[2], g.props[3], g.props[4], g.props[5], g.props[6], g.props[7], g.props[8], g.props[9], g.props[10], g.props[11], g.props[12], g.props[13], g.props[14], g.props[15]], Be = ve;
33470
33474
  }
33471
- b <= T ? (Q = new LetterProps(Be, Ae, _e, ke, Re, De), this.renderedLetters.push(Q), b += 1, this.lettersChangedFlag = !0) : (Q = this.renderedLetters[T], this.lettersChangedFlag = Q.update(Be, Ae, _e, ke, Re, De) || this.lettersChangedFlag);
33475
+ b <= T ? (Q = new LetterProps(Be, we, _e, ke, Me, Ie), this.renderedLetters.push(Q), b += 1, this.lettersChangedFlag = !0) : (Q = this.renderedLetters[T], this.lettersChangedFlag = Q.update(Be, we, _e, ke, Me, Ie) || this.lettersChangedFlag);
33472
33476
  }
33473
33477
  }
33474
33478
  }, TextAnimatorProperty.prototype.getValue = function() {
@@ -38034,33 +38038,33 @@ const UPNG = (function() {
38034
38038
  const _e = new Uint8Array(B[le]);
38035
38039
  for (var ce = _e.length, ae = 0; ae < ce; ae += 4) ne &= _e[ae + 3];
38036
38040
  }
38037
- const oe = ne != 255, de = (function(ke, Re, De, Be, Ne, Fe) {
38041
+ const oe = ne != 255, de = (function(ke, Me, Ie, Be, Oe, Fe) {
38038
38042
  const Le = [];
38039
- for (var Oe = 0; Oe < ke.length; Oe++) {
38040
- const ze = new Uint8Array(ke[Oe]), We = new Uint32Array(ze.buffer);
38043
+ for (var De = 0; De < ke.length; De++) {
38044
+ const ze = new Uint8Array(ke[De]), We = new Uint32Array(ze.buffer);
38041
38045
  var Te;
38042
- let Ge = 0, nt = 0, pe = Re, Ee = De, we = Be ? 1 : 0;
38043
- if (Oe != 0) {
38044
- const He = Fe || Be || Oe == 1 || Le[Oe - 2].dispose != 0 ? 1 : 2;
38046
+ let Ge = 0, nt = 0, pe = Me, Ee = Ie, Ce = Be ? 1 : 0;
38047
+ if (De != 0) {
38048
+ const He = Fe || Be || De == 1 || Le[De - 2].dispose != 0 ? 1 : 2;
38045
38049
  let je = 0, Xe = 1e9;
38046
38050
  for (let Je = 0; Je < He; Je++) {
38047
- var Ie = new Uint8Array(ke[Oe - 1 - Je]);
38048
- const ct = new Uint32Array(ke[Oe - 1 - Je]);
38049
- let ot = Re, Ze = De, Pe = -1, Ke = -1;
38050
- for (let qe = 0; qe < De; qe++) for (let it = 0; it < Re; it++)
38051
- We[Ue = qe * Re + it] != ct[Ue] && (it < ot && (ot = it), it > Pe && (Pe = it), qe < Ze && (Ze = qe), qe > Ke && (Ke = qe));
38052
- Pe == -1 && (ot = Ze = Pe = Ke = 0), Ne && ((1 & ot) == 1 && ot--, (1 & Ze) == 1 && Ze--);
38051
+ var Ne = new Uint8Array(ke[De - 1 - Je]);
38052
+ const ct = new Uint32Array(ke[De - 1 - Je]);
38053
+ let ot = Me, Ze = Ie, Pe = -1, Ke = -1;
38054
+ for (let qe = 0; qe < Ie; qe++) for (let it = 0; it < Me; it++)
38055
+ We[Ue = qe * Me + it] != ct[Ue] && (it < ot && (ot = it), it > Pe && (Pe = it), qe < Ze && (Ze = qe), qe > Ke && (Ke = qe));
38056
+ Pe == -1 && (ot = Ze = Pe = Ke = 0), Oe && ((1 & ot) == 1 && ot--, (1 & Ze) == 1 && Ze--);
38053
38057
  const Ve = (Pe - ot + 1) * (Ke - Ze + 1);
38054
38058
  Ve < Xe && (Xe = Ve, je = Je, Ge = ot, nt = Ze, pe = Pe - ot + 1, Ee = Ke - Ze + 1);
38055
38059
  }
38056
- Ie = new Uint8Array(ke[Oe - 1 - je]), je == 1 && (Le[Oe - 1].dispose = 2), Te = new Uint8Array(pe * Ee * 4), u(Ie, Re, De, Te, pe, Ee, -Ge, -nt, 0), we = u(ze, Re, De, Te, pe, Ee, -Ge, -nt, 3) ? 1 : 0, we == 1 ? A(ze, Re, De, Te, { x: Ge, y: nt, width: pe, height: Ee }) : u(ze, Re, De, Te, pe, Ee, -Ge, -nt, 0);
38060
+ Ne = new Uint8Array(ke[De - 1 - je]), je == 1 && (Le[De - 1].dispose = 2), Te = new Uint8Array(pe * Ee * 4), u(Ne, Me, Ie, Te, pe, Ee, -Ge, -nt, 0), Ce = u(ze, Me, Ie, Te, pe, Ee, -Ge, -nt, 3) ? 1 : 0, Ce == 1 ? A(ze, Me, Ie, Te, { x: Ge, y: nt, width: pe, height: Ee }) : u(ze, Me, Ie, Te, pe, Ee, -Ge, -nt, 0);
38057
38061
  } else Te = ze.slice(0);
38058
- Le.push({ rect: { x: Ge, y: nt, width: pe, height: Ee }, img: Te, blend: we, dispose: 0 });
38062
+ Le.push({ rect: { x: Ge, y: nt, width: pe, height: Ee }, img: Te, blend: Ce, dispose: 0 });
38059
38063
  }
38060
- if (Be) for (Oe = 0; Oe < Le.length; Oe++) {
38061
- if ((Ye = Le[Oe]).blend == 1) continue;
38062
- const ze = Ye.rect, We = Le[Oe - 1].rect, Ge = Math.min(ze.x, We.x), nt = Math.min(ze.y, We.y), pe = { x: Ge, y: nt, width: Math.max(ze.x + ze.width, We.x + We.width) - Ge, height: Math.max(ze.y + ze.height, We.y + We.height) - nt };
38063
- Le[Oe - 1].dispose = 1, Oe - 1 != 0 && C(ke, Re, De, Le, Oe - 1, pe, Ne), C(ke, Re, De, Le, Oe, pe, Ne);
38064
+ if (Be) for (De = 0; De < Le.length; De++) {
38065
+ if ((Ye = Le[De]).blend == 1) continue;
38066
+ const ze = Ye.rect, We = Le[De - 1].rect, Ge = Math.min(ze.x, We.x), nt = Math.min(ze.y, We.y), pe = { x: Ge, y: nt, width: Math.max(ze.x + ze.width, We.x + We.width) - Ge, height: Math.max(ze.y + ze.height, We.y + We.height) - nt };
38067
+ Le[De - 1].dispose = 1, De - 1 != 0 && C(ke, Me, Ie, Le, De - 1, pe, Oe), C(ke, Me, Ie, Le, De, pe, Oe);
38064
38068
  }
38065
38069
  let $e = 0;
38066
38070
  if (ke.length != 1) for (var Ue = 0; Ue < Le.length; Ue++) {
@@ -38072,30 +38076,30 @@ const UPNG = (function() {
38072
38076
  if (ee != 0) {
38073
38077
  const _e = [];
38074
38078
  for (ae = 0; ae < de.length; ae++) _e.push(de[ae].img.buffer);
38075
- const ke = (function(Ne) {
38079
+ const ke = (function(Oe) {
38076
38080
  let Fe = 0;
38077
- for (var Le = 0; Le < Ne.length; Le++) Fe += Ne[Le].byteLength;
38078
- const Oe = new Uint8Array(Fe);
38081
+ for (var Le = 0; Le < Oe.length; Le++) Fe += Oe[Le].byteLength;
38082
+ const De = new Uint8Array(Fe);
38079
38083
  let Te = 0;
38080
- for (Le = 0; Le < Ne.length; Le++) {
38081
- const Ie = new Uint8Array(Ne[Le]), $e = Ie.length;
38084
+ for (Le = 0; Le < Oe.length; Le++) {
38085
+ const Ne = new Uint8Array(Oe[Le]), $e = Ne.length;
38082
38086
  for (let Ue = 0; Ue < $e; Ue += 4) {
38083
- let Ye = Ie[Ue], ze = Ie[Ue + 1], We = Ie[Ue + 2];
38084
- const Ge = Ie[Ue + 3];
38085
- Ge == 0 && (Ye = ze = We = 0), Oe[Te + Ue] = Ye, Oe[Te + Ue + 1] = ze, Oe[Te + Ue + 2] = We, Oe[Te + Ue + 3] = Ge;
38087
+ let Ye = Ne[Ue], ze = Ne[Ue + 1], We = Ne[Ue + 2];
38088
+ const Ge = Ne[Ue + 3];
38089
+ Ge == 0 && (Ye = ze = We = 0), De[Te + Ue] = Ye, De[Te + Ue + 1] = ze, De[Te + Ue + 2] = We, De[Te + Ue + 3] = Ge;
38086
38090
  }
38087
38091
  Te += $e;
38088
38092
  }
38089
- return Oe.buffer;
38090
- })(_e), Re = R(ke, ee);
38091
- for (ae = 0; ae < Re.plte.length; ae++) he.push(Re.plte[ae].est.rgba);
38092
- let De = 0;
38093
+ return De.buffer;
38094
+ })(_e), Me = R(ke, ee);
38095
+ for (ae = 0; ae < Me.plte.length; ae++) he.push(Me.plte[ae].est.rgba);
38096
+ let Ie = 0;
38093
38097
  for (ae = 0; ae < de.length; ae++) {
38094
38098
  const Be = (be = de[ae]).img.length;
38095
- var ve = new Uint8Array(Re.inds.buffer, De >> 2, Be >> 2);
38099
+ var ve = new Uint8Array(Me.inds.buffer, Ie >> 2, Be >> 2);
38096
38100
  ge.push(ve);
38097
- const Ne = new Uint8Array(Re.abuf, De, Be);
38098
- H && b(be.img, be.rect.width, be.rect.height, he, Ne, ve), be.img.set(Ne), De += Be;
38101
+ const Oe = new Uint8Array(Me.abuf, Ie, Be);
38102
+ H && b(be.img, be.rect.width, be.rect.height, he, Oe, ve), be.img.set(Oe), Ie += Be;
38099
38103
  }
38100
38104
  } else for (le = 0; le < de.length; le++) {
38101
38105
  var be = de[le];
@@ -38106,9 +38110,9 @@ const UPNG = (function() {
38106
38110
  if (ae != 0 && ke == _e[ae - 1]) ve[ae] = ve[ae - 1];
38107
38111
  else if (ae > ye && ke == _e[ae - ye]) ve[ae] = ve[ae - ye];
38108
38112
  else {
38109
- let Re = fe[ke];
38110
- if (Re == null && (fe[ke] = Re = he.length, he.push(ke), he.length >= 300)) break;
38111
- ve[ae] = Re;
38113
+ let Me = fe[ke];
38114
+ if (Me == null && (fe[ke] = Me = he.length, he.push(ke), he.length >= 300)) break;
38115
+ ve[ae] = Me;
38112
38116
  }
38113
38117
  }
38114
38118
  }
@@ -38118,30 +38122,30 @@ const UPNG = (function() {
38118
38122
  const _e = be.rect.height;
38119
38123
  let ke = be.img;
38120
38124
  new Uint32Array(ke.buffer);
38121
- let Re = 4 * ye, De = 4;
38125
+ let Me = 4 * ye, Ie = 4;
38122
38126
  if (xe <= 256 && q == 0) {
38123
- Re = Math.ceil(Q * ye / 8);
38124
- var me = new Uint8Array(Re * _e);
38127
+ Me = Math.ceil(Q * ye / 8);
38128
+ var me = new Uint8Array(Me * _e);
38125
38129
  const Be = ge[le];
38126
- for (let Ne = 0; Ne < _e; Ne++) {
38127
- ae = Ne * Re;
38128
- const Fe = Ne * ye;
38129
- if (Q == 8) for (var Ae = 0; Ae < ye; Ae++) me[ae + Ae] = Be[Fe + Ae];
38130
- else if (Q == 4) for (Ae = 0; Ae < ye; Ae++) me[ae + (Ae >> 1)] |= Be[Fe + Ae] << 4 - 4 * (1 & Ae);
38131
- else if (Q == 2) for (Ae = 0; Ae < ye; Ae++) me[ae + (Ae >> 2)] |= Be[Fe + Ae] << 6 - 2 * (3 & Ae);
38132
- else if (Q == 1) for (Ae = 0; Ae < ye; Ae++) me[ae + (Ae >> 3)] |= Be[Fe + Ae] << 7 - 1 * (7 & Ae);
38133
- }
38134
- ke = me, W = 3, De = 1;
38130
+ for (let Oe = 0; Oe < _e; Oe++) {
38131
+ ae = Oe * Me;
38132
+ const Fe = Oe * ye;
38133
+ if (Q == 8) for (var we = 0; we < ye; we++) me[ae + we] = Be[Fe + we];
38134
+ else if (Q == 4) for (we = 0; we < ye; we++) me[ae + (we >> 1)] |= Be[Fe + we] << 4 - 4 * (1 & we);
38135
+ else if (Q == 2) for (we = 0; we < ye; we++) me[ae + (we >> 2)] |= Be[Fe + we] << 6 - 2 * (3 & we);
38136
+ else if (Q == 1) for (we = 0; we < ye; we++) me[ae + (we >> 3)] |= Be[Fe + we] << 7 - 1 * (7 & we);
38137
+ }
38138
+ ke = me, W = 3, Ie = 1;
38135
38139
  } else if (oe == 0 && de.length == 1) {
38136
38140
  me = new Uint8Array(ye * _e * 3);
38137
38141
  const Be = ye * _e;
38138
38142
  for (ae = 0; ae < Be; ae++) {
38139
- const Ne = 3 * ae, Fe = 4 * ae;
38140
- me[Ne] = ke[Fe], me[Ne + 1] = ke[Fe + 1], me[Ne + 2] = ke[Fe + 2];
38143
+ const Oe = 3 * ae, Fe = 4 * ae;
38144
+ me[Oe] = ke[Fe], me[Oe + 1] = ke[Fe + 1], me[Oe + 2] = ke[Fe + 2];
38141
38145
  }
38142
- ke = me, W = 2, De = 3, Re = 3 * ye;
38146
+ ke = me, W = 2, Ie = 3, Me = 3 * ye;
38143
38147
  }
38144
- be.img = ke, be.bpl = Re, be.bpp = De;
38148
+ be.img = ke, be.bpl = Me, be.bpp = Ie;
38145
38149
  }
38146
38150
  return { ctype: W, depth: Q, plte: he, frames: de };
38147
38151
  }
@@ -38796,14 +38800,14 @@ const ImageSearchModal$1 = lazy(
38796
38800
  }, le = async () => {
38797
38801
  if (ee)
38798
38802
  try {
38799
- const { blob: Te, duration: Ie } = await re();
38803
+ const { blob: Te, duration: Ne } = await re();
38800
38804
  if (B && b) {
38801
- b({ blob: Te, voiceTime: Ie });
38805
+ b({ blob: Te, voiceTime: Ne });
38802
38806
  return;
38803
38807
  }
38804
38808
  H(!0);
38805
38809
  const $e = Te.type.split("/")[1]?.split(";")[0] ?? "webm", Ue = new File([Te], `${v4()}.${$e}`), Ye = await te.uploadVoiceV2(Ue);
38806
- Ye?.url && y?.({ voiceUrl: Ye.url, voiceTime: Ie });
38810
+ Ye?.url && y?.({ voiceUrl: Ye.url, voiceTime: Ne });
38807
38811
  } catch {
38808
38812
  } finally {
38809
38813
  H(!1);
@@ -38812,8 +38816,8 @@ const ImageSearchModal$1 = lazy(
38812
38816
  V();
38813
38817
  }, ae = useRef(null), oe = useRef(!1), de = useRef(!1), [fe, he] = useState(!1), ge = () => {
38814
38818
  if (!O) return !1;
38815
- const Te = O.getJSON(), Ie = findByType(Te, "media"), $e = findByType(Te, "mediaGroup");
38816
- return Ie.length > 0 || $e.length > 0;
38819
+ const Te = O.getJSON(), Ne = findByType(Te, "media"), $e = findByType(Te, "mediaGroup");
38820
+ return Ne.length > 0 || $e.length > 0;
38817
38821
  }, ve = () => !!S && !ee && !!O && O.getText().trim().length > 0 && !ge() && !Y, be = () => {
38818
38822
  ae.current && (clearTimeout(ae.current), ae.current = null);
38819
38823
  }, ye = () => {
@@ -38828,7 +38832,7 @@ const ImageSearchModal$1 = lazy(
38828
38832
  const Te = O?.getText().trim() ?? "";
38829
38833
  Te && S && (de.current = !0, S({ text: Te, sendCrossMention: P }));
38830
38834
  }
38831
- }, Ae = () => {
38835
+ }, we = () => {
38832
38836
  ye();
38833
38837
  };
38834
38838
  if (!O) return null;
@@ -38838,14 +38842,14 @@ const ImageSearchModal$1 = lazy(
38838
38842
  return;
38839
38843
  }
38840
38844
  _(!0);
38841
- }, Re = (Te, Ie, $e, Ue) => {
38842
- const Ye = n === EditorTypes.Blog && Ie || Te;
38845
+ }, Me = (Te, Ne, $e, Ue) => {
38846
+ const Ye = n === EditorTypes.Blog && Ne || Te;
38843
38847
  if ($e) {
38844
38848
  O.commands.updateLink($e, { href: Te, text: Ye, previewPayload: Ue });
38845
38849
  return;
38846
38850
  }
38847
38851
  O.commands.insertLink({ href: Te, text: Ye, previewPayload: Ue });
38848
- }, De = () => {
38852
+ }, Ie = () => {
38849
38853
  const Te = O.getJSON();
38850
38854
  return findByType(Te, "media").length >= 10 ? (toast.error(
38851
38855
  `You can upload up to ${MAX_FILES} files per post. Please remove some files before adding new ones.`
@@ -38855,11 +38859,11 @@ const ImageSearchModal$1 = lazy(
38855
38859
  T?.current?.click();
38856
38860
  return;
38857
38861
  }
38858
- De() || T?.current?.click();
38859
- }, Ne = async (Te) => {
38860
- const Ie = Te.target.files;
38861
- if (!Ie || !C) return;
38862
- let $e = Array.from(Ie);
38862
+ Ie() || T?.current?.click();
38863
+ }, Oe = async (Te) => {
38864
+ const Ne = Te.target.files;
38865
+ if (!Ne || !C) return;
38866
+ let $e = Array.from(Ne);
38863
38867
  $e.length > MAX_FILES && (toast.error(
38864
38868
  `You can upload up to ${MAX_FILES} files per post. Picking the first ${MAX_FILES} files`
38865
38869
  ), $e = $e.slice(0, MAX_FILES));
@@ -38892,19 +38896,19 @@ const ImageSearchModal$1 = lazy(
38892
38896
  });
38893
38897
  }), Te.target.value = "";
38894
38898
  }, Fe = (Te) => {
38895
- if (De()) {
38899
+ if (Ie()) {
38896
38900
  Te.preventDefault();
38897
38901
  return;
38898
38902
  }
38899
38903
  I(!0);
38900
- }, Le = (Te, Ie) => {
38901
- Ie && L(Ie === ImageSearchFrom.Gif ? "gif_search" : "image_search"), O?.commands.insertMediaWithUpload({
38904
+ }, Le = (Te, Ne) => {
38905
+ Ne && L(Ne === ImageSearchFrom.Gif ? "gif_search" : "image_search"), O?.commands.insertMediaWithUpload({
38902
38906
  source: Te,
38903
38907
  type: MediaNodeTypes.Image,
38904
38908
  mediaType: MediaItemType.IMAGE_ITEM,
38905
- searchFrom: Ie
38909
+ searchFrom: Ne
38906
38910
  });
38907
- }, Oe = (Te) => Te?.isHeading1 ? Heading1 : Te?.isHeading2 ? Heading2 : Te?.isHeading3 ? Heading3 : Type;
38911
+ }, De = (Te) => Te?.isHeading1 ? Heading1 : Te?.isHeading2 ? Heading2 : Te?.isHeading3 ? Heading3 : Type;
38908
38912
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col grow overflow-y-auto", children: [
38909
38913
  _e.showFormatting && /* @__PURE__ */ jsxs("div", { className: "shrink-0 flex flex-wrap items-center gap-2 sm:gap-2 p-2", children: [
38910
38914
  /* @__PURE__ */ jsx(
@@ -38932,7 +38936,7 @@ const ImageSearchModal$1 = lazy(
38932
38936
  ToolbarButton,
38933
38937
  {
38934
38938
  tooltip: "headingOptionsKey",
38935
- icon: Oe(N),
38939
+ icon: De(N),
38936
38940
  "aria-label": "More formatting options"
38937
38941
  }
38938
38942
  ) }),
@@ -39197,7 +39201,7 @@ const ImageSearchModal$1 = lazy(
39197
39201
  maxLength: 2,
39198
39202
  accept: `${MEDIA_ACCEPTS[MediaNodeTypes.Image]}, ${MEDIA_ACCEPTS[MediaNodeTypes.Video]}`,
39199
39203
  hidden: !0,
39200
- onChange: Ne
39204
+ onChange: Oe
39201
39205
  }
39202
39206
  ),
39203
39207
  _e.showImage && /* @__PURE__ */ jsx(
@@ -39273,7 +39277,7 @@ const ImageSearchModal$1 = lazy(
39273
39277
  hideTextInput: !0,
39274
39278
  open: k,
39275
39279
  onOpenChange: _,
39276
- onInsertLink: Re
39280
+ onInsertLink: Me
39277
39281
  }
39278
39282
  ) })
39279
39283
  ] }),
@@ -39342,8 +39346,8 @@ const ImageSearchModal$1 = lazy(
39342
39346
  disabled: N?.isEmpty || p || !B && W,
39343
39347
  onPointerDown: xe,
39344
39348
  onPointerUp: me,
39345
- onPointerLeave: Ae,
39346
- onPointerCancel: Ae,
39349
+ onPointerLeave: we,
39350
+ onPointerCancel: we,
39347
39351
  onClick: (Te) => {
39348
39352
  if (de.current) {
39349
39353
  de.current = !1, Te.preventDefault();
@@ -47701,7 +47705,7 @@ const NODE_TYPE = {
47701
47705
  };
47702
47706
  function createDOMPurify() {
47703
47707
  let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
47704
- const n = (Me) => createDOMPurify(Me);
47708
+ const n = (Re) => createDOMPurify(Re);
47705
47709
  if (n.version = "3.3.1", n.removed = [], !u || !u.document || u.document.nodeType !== NODE_TYPE.document || !u.Element)
47706
47710
  return n.isSupported = !1, n;
47707
47711
  let {
@@ -47719,8 +47723,8 @@ function createDOMPurify() {
47719
47723
  trustedTypes: k
47720
47724
  } = u, _ = S.prototype, R = lookupGetter(_, "cloneNode"), I = lookupGetter(_, "remove"), P = lookupGetter(_, "nextSibling"), D = lookupGetter(_, "childNodes"), O = lookupGetter(_, "parentNode");
47721
47725
  if (typeof y == "function") {
47722
- const Me = d.createElement("template");
47723
- Me.content && Me.content.ownerDocument && (d = Me.content.ownerDocument);
47726
+ const Re = d.createElement("template");
47727
+ Re.content && Re.content.ownerDocument && (d = Re.content.ownerDocument);
47724
47728
  }
47725
47729
  let N, F = "";
47726
47730
  const {
@@ -47783,15 +47787,15 @@ function createDOMPurify() {
47783
47787
  value: null
47784
47788
  }
47785
47789
  }));
47786
- let ge = !0, ve = !0, be = !1, ye = !0, xe = !1, me = !0, Ae = !1, _e = !1, ke = !1, Re = !1, De = !1, Be = !1, Ne = !0, Fe = !1;
47790
+ let ge = !0, ve = !0, be = !1, ye = !0, xe = !1, me = !0, we = !1, _e = !1, ke = !1, Me = !1, Ie = !1, Be = !1, Oe = !0, Fe = !1;
47787
47791
  const Le = "user-content-";
47788
- let Oe = !0, Te = !1, Ie = {}, $e = null;
47792
+ let De = !0, Te = !1, Ne = {}, $e = null;
47789
47793
  const Ue = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
47790
47794
  let Ye = null;
47791
47795
  const ze = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
47792
47796
  let We = null;
47793
47797
  const Ge = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), nt = "http://www.w3.org/1998/Math/MathML", pe = "http://www.w3.org/2000/svg", Ee = "http://www.w3.org/1999/xhtml";
47794
- let we = Ee, He = !1, je = null;
47798
+ let Ce = Ee, He = !1, je = null;
47795
47799
  const Xe = addToSet({}, [nt, pe, Ee], stringToString);
47796
47800
  let Je = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]), ct = addToSet({}, ["annotation-xml"]);
47797
47801
  const ot = addToSet({}, ["title", "style", "font", "a", "script"]);
@@ -47804,7 +47808,7 @@ function createDOMPurify() {
47804
47808
  let ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
47805
47809
  if (!(qe && qe === ue)) {
47806
47810
  if ((!ue || typeof ue != "object") && (ue = {}), ue = clone(ue), Ze = // eslint-disable-next-line unicorn/prefer-includes
47807
- Pe.indexOf(ue.PARSER_MEDIA_TYPE) === -1 ? Ke : ue.PARSER_MEDIA_TYPE, Ve = Ze === "application/xhtml+xml" ? stringToString : stringToLowerCase, ne = objectHasOwnProperty(ue, "ALLOWED_TAGS") ? addToSet({}, ue.ALLOWED_TAGS, Ve) : le, ce = objectHasOwnProperty(ue, "ALLOWED_ATTR") ? addToSet({}, ue.ALLOWED_ATTR, Ve) : ae, je = objectHasOwnProperty(ue, "ALLOWED_NAMESPACES") ? addToSet({}, ue.ALLOWED_NAMESPACES, stringToString) : Xe, We = objectHasOwnProperty(ue, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Ge), ue.ADD_URI_SAFE_ATTR, Ve) : Ge, Ye = objectHasOwnProperty(ue, "ADD_DATA_URI_TAGS") ? addToSet(clone(ze), ue.ADD_DATA_URI_TAGS, Ve) : ze, $e = objectHasOwnProperty(ue, "FORBID_CONTENTS") ? addToSet({}, ue.FORBID_CONTENTS, Ve) : Ue, de = objectHasOwnProperty(ue, "FORBID_TAGS") ? addToSet({}, ue.FORBID_TAGS, Ve) : clone({}), fe = objectHasOwnProperty(ue, "FORBID_ATTR") ? addToSet({}, ue.FORBID_ATTR, Ve) : clone({}), Ie = objectHasOwnProperty(ue, "USE_PROFILES") ? ue.USE_PROFILES : !1, ge = ue.ALLOW_ARIA_ATTR !== !1, ve = ue.ALLOW_DATA_ATTR !== !1, be = ue.ALLOW_UNKNOWN_PROTOCOLS || !1, ye = ue.ALLOW_SELF_CLOSE_IN_ATTR !== !1, xe = ue.SAFE_FOR_TEMPLATES || !1, me = ue.SAFE_FOR_XML !== !1, Ae = ue.WHOLE_DOCUMENT || !1, Re = ue.RETURN_DOM || !1, De = ue.RETURN_DOM_FRAGMENT || !1, Be = ue.RETURN_TRUSTED_TYPE || !1, ke = ue.FORCE_BODY || !1, Ne = ue.SANITIZE_DOM !== !1, Fe = ue.SANITIZE_NAMED_PROPS || !1, Oe = ue.KEEP_CONTENT !== !1, Te = ue.IN_PLACE || !1, Q = ue.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, we = ue.NAMESPACE || Ee, Je = ue.MATHML_TEXT_INTEGRATION_POINTS || Je, ct = ue.HTML_INTEGRATION_POINTS || ct, oe = ue.CUSTOM_ELEMENT_HANDLING || {}, ue.CUSTOM_ELEMENT_HANDLING && Qe(ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (oe.tagNameCheck = ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ue.CUSTOM_ELEMENT_HANDLING && Qe(ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (oe.attributeNameCheck = ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ue.CUSTOM_ELEMENT_HANDLING && typeof ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (oe.allowCustomizedBuiltInElements = ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), xe && (ve = !1), De && (Re = !0), Ie && (ne = addToSet({}, text), ce = [], Ie.html === !0 && (addToSet(ne, html$1), addToSet(ce, html)), Ie.svg === !0 && (addToSet(ne, svg$1), addToSet(ce, svg), addToSet(ce, xml)), Ie.svgFilters === !0 && (addToSet(ne, svgFilters), addToSet(ce, svg), addToSet(ce, xml)), Ie.mathMl === !0 && (addToSet(ne, mathMl$1), addToSet(ce, mathMl), addToSet(ce, xml))), ue.ADD_TAGS && (typeof ue.ADD_TAGS == "function" ? he.tagCheck = ue.ADD_TAGS : (ne === le && (ne = clone(ne)), addToSet(ne, ue.ADD_TAGS, Ve))), ue.ADD_ATTR && (typeof ue.ADD_ATTR == "function" ? he.attributeCheck = ue.ADD_ATTR : (ce === ae && (ce = clone(ce)), addToSet(ce, ue.ADD_ATTR, Ve))), ue.ADD_URI_SAFE_ATTR && addToSet(We, ue.ADD_URI_SAFE_ATTR, Ve), ue.FORBID_CONTENTS && ($e === Ue && ($e = clone($e)), addToSet($e, ue.FORBID_CONTENTS, Ve)), ue.ADD_FORBID_CONTENTS && ($e === Ue && ($e = clone($e)), addToSet($e, ue.ADD_FORBID_CONTENTS, Ve)), Oe && (ne["#text"] = !0), Ae && addToSet(ne, ["html", "head", "body"]), ne.table && (addToSet(ne, ["tbody"]), delete de.tbody), ue.TRUSTED_TYPES_POLICY) {
47811
+ Pe.indexOf(ue.PARSER_MEDIA_TYPE) === -1 ? Ke : ue.PARSER_MEDIA_TYPE, Ve = Ze === "application/xhtml+xml" ? stringToString : stringToLowerCase, ne = objectHasOwnProperty(ue, "ALLOWED_TAGS") ? addToSet({}, ue.ALLOWED_TAGS, Ve) : le, ce = objectHasOwnProperty(ue, "ALLOWED_ATTR") ? addToSet({}, ue.ALLOWED_ATTR, Ve) : ae, je = objectHasOwnProperty(ue, "ALLOWED_NAMESPACES") ? addToSet({}, ue.ALLOWED_NAMESPACES, stringToString) : Xe, We = objectHasOwnProperty(ue, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Ge), ue.ADD_URI_SAFE_ATTR, Ve) : Ge, Ye = objectHasOwnProperty(ue, "ADD_DATA_URI_TAGS") ? addToSet(clone(ze), ue.ADD_DATA_URI_TAGS, Ve) : ze, $e = objectHasOwnProperty(ue, "FORBID_CONTENTS") ? addToSet({}, ue.FORBID_CONTENTS, Ve) : Ue, de = objectHasOwnProperty(ue, "FORBID_TAGS") ? addToSet({}, ue.FORBID_TAGS, Ve) : clone({}), fe = objectHasOwnProperty(ue, "FORBID_ATTR") ? addToSet({}, ue.FORBID_ATTR, Ve) : clone({}), Ne = objectHasOwnProperty(ue, "USE_PROFILES") ? ue.USE_PROFILES : !1, ge = ue.ALLOW_ARIA_ATTR !== !1, ve = ue.ALLOW_DATA_ATTR !== !1, be = ue.ALLOW_UNKNOWN_PROTOCOLS || !1, ye = ue.ALLOW_SELF_CLOSE_IN_ATTR !== !1, xe = ue.SAFE_FOR_TEMPLATES || !1, me = ue.SAFE_FOR_XML !== !1, we = ue.WHOLE_DOCUMENT || !1, Me = ue.RETURN_DOM || !1, Ie = ue.RETURN_DOM_FRAGMENT || !1, Be = ue.RETURN_TRUSTED_TYPE || !1, ke = ue.FORCE_BODY || !1, Oe = ue.SANITIZE_DOM !== !1, Fe = ue.SANITIZE_NAMED_PROPS || !1, De = ue.KEEP_CONTENT !== !1, Te = ue.IN_PLACE || !1, Q = ue.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Ce = ue.NAMESPACE || Ee, Je = ue.MATHML_TEXT_INTEGRATION_POINTS || Je, ct = ue.HTML_INTEGRATION_POINTS || ct, oe = ue.CUSTOM_ELEMENT_HANDLING || {}, ue.CUSTOM_ELEMENT_HANDLING && Qe(ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (oe.tagNameCheck = ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ue.CUSTOM_ELEMENT_HANDLING && Qe(ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (oe.attributeNameCheck = ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ue.CUSTOM_ELEMENT_HANDLING && typeof ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (oe.allowCustomizedBuiltInElements = ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), xe && (ve = !1), Ie && (Me = !0), Ne && (ne = addToSet({}, text), ce = [], Ne.html === !0 && (addToSet(ne, html$1), addToSet(ce, html)), Ne.svg === !0 && (addToSet(ne, svg$1), addToSet(ce, svg), addToSet(ce, xml)), Ne.svgFilters === !0 && (addToSet(ne, svgFilters), addToSet(ce, svg), addToSet(ce, xml)), Ne.mathMl === !0 && (addToSet(ne, mathMl$1), addToSet(ce, mathMl), addToSet(ce, xml))), ue.ADD_TAGS && (typeof ue.ADD_TAGS == "function" ? he.tagCheck = ue.ADD_TAGS : (ne === le && (ne = clone(ne)), addToSet(ne, ue.ADD_TAGS, Ve))), ue.ADD_ATTR && (typeof ue.ADD_ATTR == "function" ? he.attributeCheck = ue.ADD_ATTR : (ce === ae && (ce = clone(ce)), addToSet(ce, ue.ADD_ATTR, Ve))), ue.ADD_URI_SAFE_ATTR && addToSet(We, ue.ADD_URI_SAFE_ATTR, Ve), ue.FORBID_CONTENTS && ($e === Ue && ($e = clone($e)), addToSet($e, ue.FORBID_CONTENTS, Ve)), ue.ADD_FORBID_CONTENTS && ($e === Ue && ($e = clone($e)), addToSet($e, ue.ADD_FORBID_CONTENTS, Ve)), De && (ne["#text"] = !0), we && addToSet(ne, ["html", "head", "body"]), ne.table && (addToSet(ne, ["tbody"]), delete de.tbody), ue.TRUSTED_TYPES_POLICY) {
47808
47812
  if (typeof ue.TRUSTED_TYPES_POLICY.createHTML != "function")
47809
47813
  throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
47810
47814
  if (typeof ue.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -47817,11 +47821,11 @@ function createDOMPurify() {
47817
47821
  }, vt = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]), dt = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), ht = function(ue) {
47818
47822
  let Se = O(ue);
47819
47823
  (!Se || !Se.tagName) && (Se = {
47820
- namespaceURI: we,
47824
+ namespaceURI: Ce,
47821
47825
  tagName: "template"
47822
47826
  });
47823
- const Ce = stringToLowerCase(ue.tagName), et = stringToLowerCase(Se.tagName);
47824
- return je[ue.namespaceURI] ? ue.namespaceURI === pe ? Se.namespaceURI === Ee ? Ce === "svg" : Se.namespaceURI === nt ? Ce === "svg" && (et === "annotation-xml" || Je[et]) : !!vt[Ce] : ue.namespaceURI === nt ? Se.namespaceURI === Ee ? Ce === "math" : Se.namespaceURI === pe ? Ce === "math" && ct[et] : !!dt[Ce] : ue.namespaceURI === Ee ? Se.namespaceURI === pe && !ct[et] || Se.namespaceURI === nt && !Je[et] ? !1 : !dt[Ce] && (ot[Ce] || !vt[Ce]) : !!(Ze === "application/xhtml+xml" && je[ue.namespaceURI]) : !1;
47827
+ const Ae = stringToLowerCase(ue.tagName), et = stringToLowerCase(Se.tagName);
47828
+ return je[ue.namespaceURI] ? ue.namespaceURI === pe ? Se.namespaceURI === Ee ? Ae === "svg" : Se.namespaceURI === nt ? Ae === "svg" && (et === "annotation-xml" || Je[et]) : !!vt[Ae] : ue.namespaceURI === nt ? Se.namespaceURI === Ee ? Ae === "math" : Se.namespaceURI === pe ? Ae === "math" && ct[et] : !!dt[Ae] : ue.namespaceURI === Ee ? Se.namespaceURI === pe && !ct[et] || Se.namespaceURI === nt && !Je[et] ? !1 : !dt[Ae] && (ot[Ae] || !vt[Ae]) : !!(Ze === "application/xhtml+xml" && je[ue.namespaceURI]) : !1;
47825
47829
  }, pt = function(ue) {
47826
47830
  arrayPush(n.removed, {
47827
47831
  element: ue
@@ -47844,7 +47848,7 @@ function createDOMPurify() {
47844
47848
  });
47845
47849
  }
47846
47850
  if (Se.removeAttribute(ue), ue === "is")
47847
- if (Re || De)
47851
+ if (Me || Ie)
47848
47852
  try {
47849
47853
  pt(Se);
47850
47854
  } catch {
@@ -47855,29 +47859,29 @@ function createDOMPurify() {
47855
47859
  } catch {
47856
47860
  }
47857
47861
  }, xt = function(ue) {
47858
- let Se = null, Ce = null;
47862
+ let Se = null, Ae = null;
47859
47863
  if (ke)
47860
47864
  ue = "<remove></remove>" + ue;
47861
47865
  else {
47862
47866
  const rt = stringMatch(ue, /^[\r\n\t ]+/);
47863
- Ce = rt && rt[0];
47867
+ Ae = rt && rt[0];
47864
47868
  }
47865
- Ze === "application/xhtml+xml" && we === Ee && (ue = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + ue + "</body></html>");
47869
+ Ze === "application/xhtml+xml" && Ce === Ee && (ue = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + ue + "</body></html>");
47866
47870
  const et = N ? N.createHTML(ue) : ue;
47867
- if (we === Ee)
47871
+ if (Ce === Ee)
47868
47872
  try {
47869
47873
  Se = new A().parseFromString(et, Ze);
47870
47874
  } catch {
47871
47875
  }
47872
47876
  if (!Se || !Se.documentElement) {
47873
- Se = L.createDocument(we, "template", null);
47877
+ Se = L.createDocument(Ce, "template", null);
47874
47878
  try {
47875
47879
  Se.documentElement.innerHTML = He ? F : et;
47876
47880
  } catch {
47877
47881
  }
47878
47882
  }
47879
47883
  const lt = Se.body || Se.documentElement;
47880
- return ue && Ce && lt.insertBefore(d.createTextNode(Ce), lt.childNodes[0] || null), we === Ee ? Y.call(Se, Ae ? "html" : "body")[0] : Ae ? Se.documentElement : lt;
47884
+ return ue && Ae && lt.insertBefore(d.createTextNode(Ae), lt.childNodes[0] || null), Ce === Ee ? Y.call(Se, we ? "html" : "body")[0] : we ? Se.documentElement : lt;
47881
47885
  }, kt = function(ue) {
47882
47886
  return j.call(
47883
47887
  ue.ownerDocument || ue,
@@ -47891,25 +47895,25 @@ function createDOMPurify() {
47891
47895
  }, Rt = function(ue) {
47892
47896
  return typeof b == "function" && ue instanceof b;
47893
47897
  };
47894
- function mt(Me, ue, Se) {
47895
- arrayForEach(Me, (Ce) => {
47896
- Ce.call(n, ue, Se, qe);
47898
+ function mt(Re, ue, Se) {
47899
+ arrayForEach(Re, (Ae) => {
47900
+ Ae.call(n, ue, Se, qe);
47897
47901
  });
47898
47902
  }
47899
47903
  const Mt = function(ue) {
47900
47904
  let Se = null;
47901
47905
  if (mt(ee.beforeSanitizeElements, ue, null), Et(ue))
47902
47906
  return pt(ue), !0;
47903
- const Ce = Ve(ue.nodeName);
47907
+ const Ae = Ve(ue.nodeName);
47904
47908
  if (mt(ee.uponSanitizeElement, ue, {
47905
- tagName: Ce,
47909
+ tagName: Ae,
47906
47910
  allowedTags: ne
47907
47911
  }), me && ue.hasChildNodes() && !Rt(ue.firstElementChild) && regExpTest(/<[/\w!]/g, ue.innerHTML) && regExpTest(/<[/\w!]/g, ue.textContent) || ue.nodeType === NODE_TYPE.progressingInstruction || me && ue.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, ue.data))
47908
47912
  return pt(ue), !0;
47909
- if (!(he.tagCheck instanceof Function && he.tagCheck(Ce)) && (!ne[Ce] || de[Ce])) {
47910
- if (!de[Ce] && It(Ce) && (oe.tagNameCheck instanceof RegExp && regExpTest(oe.tagNameCheck, Ce) || oe.tagNameCheck instanceof Function && oe.tagNameCheck(Ce)))
47913
+ if (!(he.tagCheck instanceof Function && he.tagCheck(Ae)) && (!ne[Ae] || de[Ae])) {
47914
+ if (!de[Ae] && It(Ae) && (oe.tagNameCheck instanceof RegExp && regExpTest(oe.tagNameCheck, Ae) || oe.tagNameCheck instanceof Function && oe.tagNameCheck(Ae)))
47911
47915
  return !1;
47912
- if (Oe && !$e[Ce]) {
47916
+ if (De && !$e[Ae]) {
47913
47917
  const et = O(ue) || ue.parentNode, lt = D(ue) || ue.childNodes;
47914
47918
  if (lt && et) {
47915
47919
  const rt = lt.length;
@@ -47921,13 +47925,13 @@ function createDOMPurify() {
47921
47925
  }
47922
47926
  return pt(ue), !0;
47923
47927
  }
47924
- return ue instanceof S && !ht(ue) || (Ce === "noscript" || Ce === "noembed" || Ce === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, ue.innerHTML) ? (pt(ue), !0) : (xe && ue.nodeType === NODE_TYPE.text && (Se = ue.textContent, arrayForEach([J, se, Z], (et) => {
47928
+ return ue instanceof S && !ht(ue) || (Ae === "noscript" || Ae === "noembed" || Ae === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, ue.innerHTML) ? (pt(ue), !0) : (xe && ue.nodeType === NODE_TYPE.text && (Se = ue.textContent, arrayForEach([J, se, Z], (et) => {
47925
47929
  Se = stringReplace(Se, et, " ");
47926
47930
  }), ue.textContent !== Se && (arrayPush(n.removed, {
47927
47931
  element: ue.cloneNode()
47928
47932
  }), ue.textContent = Se)), mt(ee.afterSanitizeElements, ue, null), !1);
47929
- }, Pt = function(ue, Se, Ce) {
47930
- if (Ne && (Se === "id" || Se === "name") && (Ce in d || Ce in it))
47933
+ }, Pt = function(ue, Se, Ae) {
47934
+ if (Oe && (Se === "id" || Se === "name") && (Ae in d || Ae in it))
47931
47935
  return !1;
47932
47936
  if (!(ve && !fe[Se] && regExpTest(re, Se))) {
47933
47937
  if (!(ge && regExpTest(V, Se))) {
@@ -47939,13 +47943,13 @@ function createDOMPurify() {
47939
47943
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
47940
47944
  !(It(ue) && (oe.tagNameCheck instanceof RegExp && regExpTest(oe.tagNameCheck, ue) || oe.tagNameCheck instanceof Function && oe.tagNameCheck(ue)) && (oe.attributeNameCheck instanceof RegExp && regExpTest(oe.attributeNameCheck, Se) || oe.attributeNameCheck instanceof Function && oe.attributeNameCheck(Se, ue)) || // Alternative, second condition checks if it's an `is`-attribute, AND
47941
47945
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
47942
- Se === "is" && oe.allowCustomizedBuiltInElements && (oe.tagNameCheck instanceof RegExp && regExpTest(oe.tagNameCheck, Ce) || oe.tagNameCheck instanceof Function && oe.tagNameCheck(Ce)))
47946
+ Se === "is" && oe.allowCustomizedBuiltInElements && (oe.tagNameCheck instanceof RegExp && regExpTest(oe.tagNameCheck, Ae) || oe.tagNameCheck instanceof Function && oe.tagNameCheck(Ae)))
47943
47947
  ) return !1;
47944
47948
  } else if (!We[Se]) {
47945
- if (!regExpTest(Q, stringReplace(Ce, H, ""))) {
47946
- if (!((Se === "src" || Se === "xlink:href" || Se === "href") && ue !== "script" && stringIndexOf(Ce, "data:") === 0 && Ye[ue])) {
47947
- if (!(be && !regExpTest(q, stringReplace(Ce, H, "")))) {
47948
- if (Ce)
47949
+ if (!regExpTest(Q, stringReplace(Ae, H, ""))) {
47950
+ if (!((Se === "src" || Se === "xlink:href" || Se === "href") && ue !== "script" && stringIndexOf(Ae, "data:") === 0 && Ye[ue])) {
47951
+ if (!(be && !regExpTest(q, stringReplace(Ae, H, "")))) {
47952
+ if (Ae)
47949
47953
  return !1;
47950
47954
  }
47951
47955
  }
@@ -47964,7 +47968,7 @@ function createDOMPurify() {
47964
47968
  } = ue;
47965
47969
  if (!Se || Et(ue))
47966
47970
  return;
47967
- const Ce = {
47971
+ const Ae = {
47968
47972
  attrName: "",
47969
47973
  attrValue: "",
47970
47974
  keepAttr: !0,
@@ -47979,7 +47983,7 @@ function createDOMPurify() {
47979
47983
  value: gt
47980
47984
  } = lt, bt = Ve(rt), Tt = gt;
47981
47985
  let st = rt === "value" ? Tt : stringTrim(Tt);
47982
- if (Ce.attrName = bt, Ce.attrValue = st, Ce.keepAttr = !0, Ce.forceKeepAttr = void 0, mt(ee.uponSanitizeAttribute, ue, Ce), st = Ce.attrValue, Fe && (bt === "id" || bt === "name") && (ut(rt, ue), st = Le + st), me && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, st)) {
47986
+ if (Ae.attrName = bt, Ae.attrValue = st, Ae.keepAttr = !0, Ae.forceKeepAttr = void 0, mt(ee.uponSanitizeAttribute, ue, Ae), st = Ae.attrValue, Fe && (bt === "id" || bt === "name") && (ut(rt, ue), st = Le + st), me && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, st)) {
47983
47987
  ut(rt, ue);
47984
47988
  continue;
47985
47989
  }
@@ -47987,9 +47991,9 @@ function createDOMPurify() {
47987
47991
  ut(rt, ue);
47988
47992
  continue;
47989
47993
  }
47990
- if (Ce.forceKeepAttr)
47994
+ if (Ae.forceKeepAttr)
47991
47995
  continue;
47992
- if (!Ce.keepAttr) {
47996
+ if (!Ae.keepAttr) {
47993
47997
  ut(rt, ue);
47994
47998
  continue;
47995
47999
  }
@@ -48024,76 +48028,76 @@ function createDOMPurify() {
48024
48028
  }
48025
48029
  }
48026
48030
  mt(ee.afterSanitizeAttributes, ue, null);
48027
- }, Kt = function Me(ue) {
48031
+ }, Kt = function Re(ue) {
48028
48032
  let Se = null;
48029
- const Ce = kt(ue);
48030
- for (mt(ee.beforeSanitizeShadowDOM, ue, null); Se = Ce.nextNode(); )
48031
- mt(ee.uponSanitizeShadowNode, Se, null), Mt(Se), Nt(Se), Se.content instanceof g && Me(Se.content);
48033
+ const Ae = kt(ue);
48034
+ for (mt(ee.beforeSanitizeShadowDOM, ue, null); Se = Ae.nextNode(); )
48035
+ mt(ee.uponSanitizeShadowNode, Se, null), Mt(Se), Nt(Se), Se.content instanceof g && Re(Se.content);
48032
48036
  mt(ee.afterSanitizeShadowDOM, ue, null);
48033
48037
  };
48034
- return n.sanitize = function(Me) {
48035
- let ue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Se = null, Ce = null, et = null, lt = null;
48036
- if (He = !Me, He && (Me = "<!-->"), typeof Me != "string" && !Rt(Me))
48037
- if (typeof Me.toString == "function") {
48038
- if (Me = Me.toString(), typeof Me != "string")
48038
+ return n.sanitize = function(Re) {
48039
+ let ue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Se = null, Ae = null, et = null, lt = null;
48040
+ if (He = !Re, He && (Re = "<!-->"), typeof Re != "string" && !Rt(Re))
48041
+ if (typeof Re.toString == "function") {
48042
+ if (Re = Re.toString(), typeof Re != "string")
48039
48043
  throw typeErrorCreate("dirty is not a string, aborting");
48040
48044
  } else
48041
48045
  throw typeErrorCreate("toString is not a function");
48042
48046
  if (!n.isSupported)
48043
- return Me;
48044
- if (_e || at(ue), n.removed = [], typeof Me == "string" && (Te = !1), Te) {
48045
- if (Me.nodeName) {
48046
- const gt = Ve(Me.nodeName);
48047
+ return Re;
48048
+ if (_e || at(ue), n.removed = [], typeof Re == "string" && (Te = !1), Te) {
48049
+ if (Re.nodeName) {
48050
+ const gt = Ve(Re.nodeName);
48047
48051
  if (!ne[gt] || de[gt])
48048
48052
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
48049
48053
  }
48050
- } else if (Me instanceof b)
48051
- Se = xt("<!---->"), Ce = Se.ownerDocument.importNode(Me, !0), Ce.nodeType === NODE_TYPE.element && Ce.nodeName === "BODY" || Ce.nodeName === "HTML" ? Se = Ce : Se.appendChild(Ce);
48054
+ } else if (Re instanceof b)
48055
+ Se = xt("<!---->"), Ae = Se.ownerDocument.importNode(Re, !0), Ae.nodeType === NODE_TYPE.element && Ae.nodeName === "BODY" || Ae.nodeName === "HTML" ? Se = Ae : Se.appendChild(Ae);
48052
48056
  else {
48053
- if (!Re && !xe && !Ae && // eslint-disable-next-line unicorn/prefer-includes
48054
- Me.indexOf("<") === -1)
48055
- return N && Be ? N.createHTML(Me) : Me;
48056
- if (Se = xt(Me), !Se)
48057
- return Re ? null : Be ? F : "";
48057
+ if (!Me && !xe && !we && // eslint-disable-next-line unicorn/prefer-includes
48058
+ Re.indexOf("<") === -1)
48059
+ return N && Be ? N.createHTML(Re) : Re;
48060
+ if (Se = xt(Re), !Se)
48061
+ return Me ? null : Be ? F : "";
48058
48062
  }
48059
48063
  Se && ke && pt(Se.firstChild);
48060
- const rt = kt(Te ? Me : Se);
48064
+ const rt = kt(Te ? Re : Se);
48061
48065
  for (; et = rt.nextNode(); )
48062
48066
  Mt(et), Nt(et), et.content instanceof g && Kt(et.content);
48063
48067
  if (Te)
48064
- return Me;
48065
- if (Re) {
48066
- if (De)
48068
+ return Re;
48069
+ if (Me) {
48070
+ if (Ie)
48067
48071
  for (lt = B.call(Se.ownerDocument); Se.firstChild; )
48068
48072
  lt.appendChild(Se.firstChild);
48069
48073
  else
48070
48074
  lt = Se;
48071
48075
  return (ce.shadowroot || ce.shadowrootmode) && (lt = te.call(p, lt, !0)), lt;
48072
48076
  }
48073
- let ft = Ae ? Se.outerHTML : Se.innerHTML;
48074
- return Ae && ne["!doctype"] && Se.ownerDocument && Se.ownerDocument.doctype && Se.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, Se.ownerDocument.doctype.name) && (ft = "<!DOCTYPE " + Se.ownerDocument.doctype.name + `>
48077
+ let ft = we ? Se.outerHTML : Se.innerHTML;
48078
+ return we && ne["!doctype"] && Se.ownerDocument && Se.ownerDocument.doctype && Se.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, Se.ownerDocument.doctype.name) && (ft = "<!DOCTYPE " + Se.ownerDocument.doctype.name + `>
48075
48079
  ` + ft), xe && arrayForEach([J, se, Z], (gt) => {
48076
48080
  ft = stringReplace(ft, gt, " ");
48077
48081
  }), N && Be ? N.createHTML(ft) : ft;
48078
48082
  }, n.setConfig = function() {
48079
- let Me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
48080
- at(Me), _e = !0;
48083
+ let Re = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
48084
+ at(Re), _e = !0;
48081
48085
  }, n.clearConfig = function() {
48082
48086
  qe = null, _e = !1;
48083
- }, n.isValidAttribute = function(Me, ue, Se) {
48087
+ }, n.isValidAttribute = function(Re, ue, Se) {
48084
48088
  qe || at({});
48085
- const Ce = Ve(Me), et = Ve(ue);
48086
- return Pt(Ce, et, Se);
48087
- }, n.addHook = function(Me, ue) {
48088
- typeof ue == "function" && arrayPush(ee[Me], ue);
48089
- }, n.removeHook = function(Me, ue) {
48089
+ const Ae = Ve(Re), et = Ve(ue);
48090
+ return Pt(Ae, et, Se);
48091
+ }, n.addHook = function(Re, ue) {
48092
+ typeof ue == "function" && arrayPush(ee[Re], ue);
48093
+ }, n.removeHook = function(Re, ue) {
48090
48094
  if (ue !== void 0) {
48091
- const Se = arrayLastIndexOf(ee[Me], ue);
48092
- return Se === -1 ? void 0 : arraySplice(ee[Me], Se, 1)[0];
48095
+ const Se = arrayLastIndexOf(ee[Re], ue);
48096
+ return Se === -1 ? void 0 : arraySplice(ee[Re], Se, 1)[0];
48093
48097
  }
48094
- return arrayPop(ee[Me]);
48095
- }, n.removeHooks = function(Me) {
48096
- ee[Me] = [];
48098
+ return arrayPop(ee[Re]);
48099
+ }, n.removeHooks = function(Re) {
48100
+ ee[Re] = [];
48097
48101
  }, n.removeAllHooks = function() {
48098
48102
  ee = _createHooksMap();
48099
48103
  }, n;
@@ -49543,11 +49547,11 @@ function preventOverflow(u) {
49543
49547
  var se, Z = N === "y" ? top : left, re = N === "y" ? bottom : right, V = N === "y" ? "height" : "width", q = L[N], H = q + I[Z], W = q - I[re], Q = k ? -B[V] / 2 : 0, ne = D === start ? j[V] : B[V], le = D === start ? -B[V] : -j[V], ce = n.elements.arrow, ae = k && ce ? getLayoutRect(ce) : {
49544
49548
  width: 0,
49545
49549
  height: 0
49546
- }, oe = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject(), de = oe[Z], fe = oe[re], he = within(0, j[V], ae[V]), ge = O ? j[V] / 2 - Q - he - de - te.mainAxis : ne - he - de - te.mainAxis, ve = O ? -j[V] / 2 + Q + he + fe + te.mainAxis : le + he + fe + te.mainAxis, be = n.elements.arrow && getOffsetParent(n.elements.arrow), ye = be ? N === "y" ? be.clientTop || 0 : be.clientLeft || 0 : 0, xe = (se = ee?.[N]) != null ? se : 0, me = q + ge - xe - ye, Ae = q + ve - xe, _e = within(k ? min$1(H, me) : H, q, k ? max$1(W, Ae) : W);
49550
+ }, oe = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject(), de = oe[Z], fe = oe[re], he = within(0, j[V], ae[V]), ge = O ? j[V] / 2 - Q - he - de - te.mainAxis : ne - he - de - te.mainAxis, ve = O ? -j[V] / 2 + Q + he + fe + te.mainAxis : le + he + fe + te.mainAxis, be = n.elements.arrow && getOffsetParent(n.elements.arrow), ye = be ? N === "y" ? be.clientTop || 0 : be.clientLeft || 0 : 0, xe = (se = ee?.[N]) != null ? se : 0, me = q + ge - xe - ye, we = q + ve - xe, _e = within(k ? min$1(H, me) : H, q, k ? max$1(W, we) : W);
49547
49551
  L[N] = _e, J[N] = _e - q;
49548
49552
  }
49549
49553
  if (b) {
49550
- var ke, Re = N === "x" ? top : left, De = N === "x" ? bottom : right, Be = L[F], Ne = F === "y" ? "height" : "width", Fe = Be + I[Re], Le = Be - I[De], Oe = [top, left].indexOf(P) !== -1, Te = (ke = ee?.[F]) != null ? ke : 0, Ie = Oe ? Fe : Be - j[Ne] - B[Ne] - Te + te.altAxis, $e = Oe ? Be + j[Ne] + B[Ne] - Te - te.altAxis : Le, Ue = k && Oe ? withinMaxClamp(Ie, Be, $e) : within(k ? Ie : Fe, Be, k ? $e : Le);
49554
+ var ke, Me = N === "x" ? top : left, Ie = N === "x" ? bottom : right, Be = L[F], Oe = F === "y" ? "height" : "width", Fe = Be + I[Me], Le = Be - I[Ie], De = [top, left].indexOf(P) !== -1, Te = (ke = ee?.[F]) != null ? ke : 0, Ne = De ? Fe : Be - j[Oe] - B[Oe] - Te + te.altAxis, $e = De ? Be + j[Oe] + B[Oe] - Te - te.altAxis : Le, Ue = k && De ? withinMaxClamp(Ne, Be, $e) : within(k ? Ne : Fe, Be, k ? $e : Le);
49551
49555
  L[F] = Ue, J[F] = Ue - Be;
49552
49556
  }
49553
49557
  n.modifiersData[p] = J;
@@ -50136,13 +50140,13 @@ function createTippy(u, n) {
50136
50140
  state: O,
50137
50141
  plugins: D,
50138
50142
  // methods
50139
- clearDelayTimeouts: Ie,
50143
+ clearDelayTimeouts: Ne,
50140
50144
  setProps: $e,
50141
50145
  setContent: Ue,
50142
50146
  show: Ye,
50143
50147
  hide: ze,
50144
50148
  hideWithInteractivity: We,
50145
- enable: Oe,
50149
+ enable: De,
50146
50150
  disable: Te,
50147
50151
  unmount: Ge,
50148
50152
  destroy: nt
@@ -50186,10 +50190,10 @@ function createTippy(u, n) {
50186
50190
  function q(pe) {
50187
50191
  pe === void 0 && (pe = !1), L.style.pointerEvents = N.props.interactive && !pe ? "" : "none", L.style.zIndex = "" + N.props.zIndex;
50188
50192
  }
50189
- function H(pe, Ee, we) {
50190
- if (we === void 0 && (we = !0), B.forEach(function(je) {
50193
+ function H(pe, Ee, Ce) {
50194
+ if (Ce === void 0 && (Ce = !0), B.forEach(function(je) {
50191
50195
  je[pe] && je[pe].apply(je, Ee);
50192
- }), we) {
50196
+ }), Ce) {
50193
50197
  var He;
50194
50198
  (He = N.props)[pe].apply(He, Ee);
50195
50199
  }
@@ -50197,13 +50201,13 @@ function createTippy(u, n) {
50197
50201
  function W() {
50198
50202
  var pe = N.props.aria;
50199
50203
  if (pe.content) {
50200
- var Ee = "aria-" + pe.content, we = L.id, He = normalizeToArray(N.props.triggerTarget || u);
50204
+ var Ee = "aria-" + pe.content, Ce = L.id, He = normalizeToArray(N.props.triggerTarget || u);
50201
50205
  He.forEach(function(je) {
50202
50206
  var Xe = je.getAttribute(Ee);
50203
50207
  if (N.state.isVisible)
50204
- je.setAttribute(Ee, Xe ? Xe + " " + we : we);
50208
+ je.setAttribute(Ee, Xe ? Xe + " " + Ce : Ce);
50205
50209
  else {
50206
- var Je = Xe && Xe.replace(we, "").trim();
50210
+ var Je = Xe && Xe.replace(Ce, "").trim();
50207
50211
  Je ? je.setAttribute(Ee, Je) : je.removeAttribute(Ee);
50208
50212
  }
50209
50213
  });
@@ -50226,8 +50230,8 @@ function createTippy(u, n) {
50226
50230
  if (!(currentInput.isTouch && (S || pe.type === "mousedown"))) {
50227
50231
  var Ee = pe.composedPath && pe.composedPath()[0] || pe.target;
50228
50232
  if (!(N.props.interactive && actualContains(L, Ee))) {
50229
- if (normalizeToArray(N.props.triggerTarget || u).some(function(we) {
50230
- return actualContains(we, Ee);
50233
+ if (normalizeToArray(N.props.triggerTarget || u).some(function(Ce) {
50234
+ return actualContains(Ce, Ee);
50231
50235
  })) {
50232
50236
  if (currentInput.isTouch || N.state.isVisible && N.props.trigger.indexOf("click") >= 0)
50233
50237
  return;
@@ -50262,36 +50266,36 @@ function createTippy(u, n) {
50262
50266
  ge(pe, Ee);
50263
50267
  }
50264
50268
  function ge(pe, Ee) {
50265
- var we = re().box;
50269
+ var Ce = re().box;
50266
50270
  function He(je) {
50267
- je.target === we && (updateTransitionEndListener(we, "remove", He), Ee());
50271
+ je.target === Ce && (updateTransitionEndListener(Ce, "remove", He), Ee());
50268
50272
  }
50269
50273
  if (pe === 0)
50270
50274
  return Ee();
50271
- updateTransitionEndListener(we, "remove", C), updateTransitionEndListener(we, "add", He), C = He;
50275
+ updateTransitionEndListener(Ce, "remove", C), updateTransitionEndListener(Ce, "add", He), C = He;
50272
50276
  }
50273
- function ve(pe, Ee, we) {
50274
- we === void 0 && (we = !1);
50277
+ function ve(pe, Ee, Ce) {
50278
+ Ce === void 0 && (Ce = !1);
50275
50279
  var He = normalizeToArray(N.props.triggerTarget || u);
50276
50280
  He.forEach(function(je) {
50277
- je.addEventListener(pe, Ee, we), k.push({
50281
+ je.addEventListener(pe, Ee, Ce), k.push({
50278
50282
  node: je,
50279
50283
  eventType: pe,
50280
50284
  handler: Ee,
50281
- options: we
50285
+ options: Ce
50282
50286
  });
50283
50287
  });
50284
50288
  }
50285
50289
  function be() {
50286
50290
  ee() && (ve("touchstart", xe, {
50287
50291
  passive: !0
50288
- }), ve("touchend", Ae, {
50292
+ }), ve("touchend", we, {
50289
50293
  passive: !0
50290
50294
  })), splitBySpaces(N.props.trigger).forEach(function(pe) {
50291
50295
  if (pe !== "manual")
50292
50296
  switch (ve(pe, xe), pe) {
50293
50297
  case "mouseenter":
50294
- ve("mouseleave", Ae);
50298
+ ve("mouseleave", we);
50295
50299
  break;
50296
50300
  case "focus":
50297
50301
  ve(isIE11 ? "focusout" : "blur", _e);
@@ -50304,23 +50308,23 @@ function createTippy(u, n) {
50304
50308
  }
50305
50309
  function ye() {
50306
50310
  k.forEach(function(pe) {
50307
- var Ee = pe.node, we = pe.eventType, He = pe.handler, je = pe.options;
50308
- Ee.removeEventListener(we, He, je);
50311
+ var Ee = pe.node, Ce = pe.eventType, He = pe.handler, je = pe.options;
50312
+ Ee.removeEventListener(Ce, He, je);
50309
50313
  }), k = [];
50310
50314
  }
50311
50315
  function xe(pe) {
50312
- var Ee, we = !1;
50316
+ var Ee, Ce = !1;
50313
50317
  if (!(!N.state.isEnabled || ke(pe) || b)) {
50314
50318
  var He = ((Ee = T) == null ? void 0 : Ee.type) === "focus";
50315
50319
  T = pe, R = pe.currentTarget, Q(), !N.state.isVisible && isMouseEvent(pe) && mouseMoveListeners.forEach(function(je) {
50316
50320
  return je(pe);
50317
- }), pe.type === "click" && (N.props.trigger.indexOf("mouseenter") < 0 || y) && N.props.hideOnClick !== !1 && N.state.isVisible ? we = !0 : Fe(pe), pe.type === "click" && (y = !we), we && !He && Le(pe);
50321
+ }), pe.type === "click" && (N.props.trigger.indexOf("mouseenter") < 0 || y) && N.props.hideOnClick !== !1 && N.state.isVisible ? Ce = !0 : Fe(pe), pe.type === "click" && (y = !Ce), Ce && !He && Le(pe);
50318
50322
  }
50319
50323
  }
50320
50324
  function me(pe) {
50321
- var Ee = pe.target, we = se().contains(Ee) || L.contains(Ee);
50322
- if (!(pe.type === "mousemove" && we)) {
50323
- var He = Ne().concat(L).map(function(je) {
50325
+ var Ee = pe.target, Ce = se().contains(Ee) || L.contains(Ee);
50326
+ if (!(pe.type === "mousemove" && Ce)) {
50327
+ var He = Oe().concat(L).map(function(je) {
50324
50328
  var Xe, Je = je._tippy, ct = (Xe = Je.popperInstance) == null ? void 0 : Xe.state;
50325
50329
  return ct ? {
50326
50330
  popperRect: je.getBoundingClientRect(),
@@ -50331,7 +50335,7 @@ function createTippy(u, n) {
50331
50335
  isCursorOutsideInteractiveBorder(He, pe) && (ne(), Le(pe));
50332
50336
  }
50333
50337
  }
50334
- function Ae(pe) {
50338
+ function we(pe) {
50335
50339
  var Ee = ke(pe) || N.props.trigger.indexOf("click") >= 0 && y;
50336
50340
  if (!Ee) {
50337
50341
  if (N.props.interactive) {
@@ -50347,9 +50351,9 @@ function createTippy(u, n) {
50347
50351
  function ke(pe) {
50348
50352
  return currentInput.isTouch ? ee() !== pe.type.indexOf("touch") >= 0 : !1;
50349
50353
  }
50350
- function Re() {
50351
- De();
50352
- var pe = N.props, Ee = pe.popperOptions, we = pe.placement, He = pe.offset, je = pe.getReferenceClientRect, Xe = pe.moveTransition, Je = J() ? getChildren(L).arrow : null, ct = je ? {
50354
+ function Me() {
50355
+ Ie();
50356
+ var pe = N.props, Ee = pe.popperOptions, Ce = pe.placement, He = pe.offset, je = pe.getReferenceClientRect, Xe = pe.moveTransition, Je = J() ? getChildren(L).arrow : null, ct = je ? {
50353
50357
  getBoundingClientRect: je,
50354
50358
  contextElement: je.contextElement || se()
50355
50359
  } : u, ot = {
@@ -50399,17 +50403,17 @@ function createTippy(u, n) {
50399
50403
  padding: 3
50400
50404
  }
50401
50405
  }), Ze.push.apply(Ze, Ee?.modifiers || []), N.popperInstance = createPopper(ct, L, Object.assign({}, Ee, {
50402
- placement: we,
50406
+ placement: Ce,
50403
50407
  onFirstUpdate: A,
50404
50408
  modifiers: Ze
50405
50409
  }));
50406
50410
  }
50407
- function De() {
50411
+ function Ie() {
50408
50412
  N.popperInstance && (N.popperInstance.destroy(), N.popperInstance = null);
50409
50413
  }
50410
50414
  function Be() {
50411
- var pe = N.props.appendTo, Ee, we = se();
50412
- N.props.interactive && pe === TIPPY_DEFAULT_APPEND_TO || pe === "parent" ? Ee = we.parentNode : Ee = invokeWithArgsOrReturn(pe, [we]), Ee.contains(L) || Ee.appendChild(L), N.state.isMounted = !0, Re(), process.env.NODE_ENV !== "production" && warnWhen(N.props.interactive && pe === defaultProps.appendTo && we.nextElementSibling !== L, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
50415
+ var pe = N.props.appendTo, Ee, Ce = se();
50416
+ N.props.interactive && pe === TIPPY_DEFAULT_APPEND_TO || pe === "parent" ? Ee = Ce.parentNode : Ee = invokeWithArgsOrReturn(pe, [Ce]), Ee.contains(L) || Ee.appendChild(L), N.state.isMounted = !0, Me(), process.env.NODE_ENV !== "production" && warnWhen(N.props.interactive && pe === defaultProps.appendTo && Ce.nextElementSibling !== L, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
50413
50417
 
50414
50418
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
50415
50419
 
@@ -50417,12 +50421,12 @@ function createTippy(u, n) {
50417
50421
 
50418
50422
  `, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
50419
50423
  }
50420
- function Ne() {
50424
+ function Oe() {
50421
50425
  return arrayFrom(L.querySelectorAll("[data-tippy-root]"));
50422
50426
  }
50423
50427
  function Fe(pe) {
50424
50428
  N.clearDelayTimeouts(), pe && H("onTrigger", [N, pe]), oe();
50425
- var Ee = V(!0), we = te(), He = we[0], je = we[1];
50429
+ var Ee = V(!0), Ce = te(), He = Ce[0], je = Ce[1];
50426
50430
  currentInput.isTouch && He === "hold" && je && (Ee = je), Ee ? p = setTimeout(function() {
50427
50431
  N.show();
50428
50432
  }, Ee) : N.show();
@@ -50441,24 +50445,24 @@ function createTippy(u, n) {
50441
50445
  });
50442
50446
  }
50443
50447
  }
50444
- function Oe() {
50448
+ function De() {
50445
50449
  N.state.isEnabled = !0;
50446
50450
  }
50447
50451
  function Te() {
50448
50452
  N.hide(), N.state.isEnabled = !1;
50449
50453
  }
50450
- function Ie() {
50454
+ function Ne() {
50451
50455
  clearTimeout(p), clearTimeout(m), cancelAnimationFrame(g);
50452
50456
  }
50453
50457
  function $e(pe) {
50454
50458
  if (process.env.NODE_ENV !== "production" && warnWhen(N.state.isDestroyed, createMemoryLeakWarning("setProps")), !N.state.isDestroyed) {
50455
50459
  H("onBeforeUpdate", [N, pe]), ye();
50456
- var Ee = N.props, we = evaluateProps(u, Object.assign({}, Ee, removeUndefinedProps(pe), {
50460
+ var Ee = N.props, Ce = evaluateProps(u, Object.assign({}, Ee, removeUndefinedProps(pe), {
50457
50461
  ignoreAttributes: !0
50458
50462
  }));
50459
- N.props = we, be(), Ee.interactiveDebounce !== we.interactiveDebounce && (ne(), _ = debounce(me, we.interactiveDebounce)), Ee.triggerTarget && !we.triggerTarget ? normalizeToArray(Ee.triggerTarget).forEach(function(He) {
50463
+ N.props = Ce, be(), Ee.interactiveDebounce !== Ce.interactiveDebounce && (ne(), _ = debounce(me, Ce.interactiveDebounce)), Ee.triggerTarget && !Ce.triggerTarget ? normalizeToArray(Ee.triggerTarget).forEach(function(He) {
50460
50464
  He.removeAttribute("aria-expanded");
50461
- }) : we.triggerTarget && u.removeAttribute("aria-expanded"), Q(), q(), j && j(Ee, we), N.popperInstance && (Re(), Ne().forEach(function(He) {
50465
+ }) : Ce.triggerTarget && u.removeAttribute("aria-expanded"), Q(), q(), j && j(Ee, Ce), N.popperInstance && (Me(), Oe().forEach(function(He) {
50462
50466
  requestAnimationFrame(He._tippy.popperInstance.forceUpdate);
50463
50467
  })), H("onAfterUpdate", [N, pe]);
50464
50468
  }
@@ -50470,8 +50474,8 @@ function createTippy(u, n) {
50470
50474
  }
50471
50475
  function Ye() {
50472
50476
  process.env.NODE_ENV !== "production" && warnWhen(N.state.isDestroyed, createMemoryLeakWarning("show"));
50473
- var pe = N.state.isVisible, Ee = N.state.isDestroyed, we = !N.state.isEnabled, He = currentInput.isTouch && !N.props.touch, je = getValueAtIndexOrReturn(N.props.duration, 0, defaultProps.duration);
50474
- if (!(pe || Ee || we || He) && !se().hasAttribute("disabled") && (H("onShow", [N], !1), N.props.onShow(N) !== !1)) {
50477
+ var pe = N.state.isVisible, Ee = N.state.isDestroyed, Ce = !N.state.isEnabled, He = currentInput.isTouch && !N.props.touch, je = getValueAtIndexOrReturn(N.props.duration, 0, defaultProps.duration);
50478
+ if (!(pe || Ee || Ce || He) && !se().hasAttribute("disabled") && (H("onShow", [N], !1), N.props.onShow(N) !== !1)) {
50475
50479
  if (N.state.isVisible = !0, J() && (L.style.visibility = "visible"), q(), oe(), N.state.isMounted || (L.style.transition = "none"), J()) {
50476
50480
  var Xe = re(), Je = Xe.box, ct = Xe.content;
50477
50481
  setTransitionDuration([Je, ct], 0);
@@ -50492,8 +50496,8 @@ function createTippy(u, n) {
50492
50496
  }
50493
50497
  function ze() {
50494
50498
  process.env.NODE_ENV !== "production" && warnWhen(N.state.isDestroyed, createMemoryLeakWarning("hide"));
50495
- var pe = !N.state.isVisible, Ee = N.state.isDestroyed, we = !N.state.isEnabled, He = getValueAtIndexOrReturn(N.props.duration, 1, defaultProps.duration);
50496
- if (!(pe || Ee || we) && (H("onHide", [N], !1), N.props.onHide(N) !== !1)) {
50499
+ var pe = !N.state.isVisible, Ee = N.state.isDestroyed, Ce = !N.state.isEnabled, He = getValueAtIndexOrReturn(N.props.duration, 1, defaultProps.duration);
50500
+ if (!(pe || Ee || Ce) && (H("onHide", [N], !1), N.props.onHide(N) !== !1)) {
50497
50501
  if (N.state.isVisible = !1, N.state.isShown = !1, E = !1, y = !1, J() && (L.style.visibility = "hidden"), ne(), de(), q(!0), J()) {
50498
50502
  var je = re(), Xe = je.box, Je = je.content;
50499
50503
  N.props.animation && (setTransitionDuration([Xe, Je], He), setVisibilityState([Xe, Je], "hidden"));
@@ -50505,7 +50509,7 @@ function createTippy(u, n) {
50505
50509
  process.env.NODE_ENV !== "production" && warnWhen(N.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), Z().addEventListener("mousemove", _), pushIfUnique(mouseMoveListeners, _), _(pe);
50506
50510
  }
50507
50511
  function Ge() {
50508
- process.env.NODE_ENV !== "production" && warnWhen(N.state.isDestroyed, createMemoryLeakWarning("unmount")), N.state.isVisible && N.hide(), N.state.isMounted && (De(), Ne().forEach(function(pe) {
50512
+ process.env.NODE_ENV !== "production" && warnWhen(N.state.isDestroyed, createMemoryLeakWarning("unmount")), N.state.isVisible && N.hide(), N.state.isMounted && (Ie(), Oe().forEach(function(pe) {
50509
50513
  pe._tippy.unmount();
50510
50514
  }), L.parentNode && L.parentNode.removeChild(L), mountedInstances = mountedInstances.filter(function(pe) {
50511
50515
  return pe !== N;
@@ -60779,28 +60783,34 @@ const PostBuilderEditorInstance = ({
60779
60783
  status: "attempted",
60780
60784
  postId: he?.postId,
60781
60785
  postType: he?.type,
60786
+ // Same flag that just went into the backend payload above, so the row
60787
+ // says what was actually sent, not the checkbox at some earlier moment.
60788
+ isCrosspost: Q,
60782
60789
  ...ve
60783
60790
  });
60784
60791
  let be;
60785
60792
  if (fe) {
60786
- const ye = /* @__PURE__ */ new Map();
60787
- for (const xe of he.items ?? []) {
60788
- if (!("sources" in xe) || !xe.sources?.original?.url?.startsWith("blob:")) continue;
60789
- const me = "option_id" in xe ? u.storage?.poll?.getPendingUpload?.(xe.key) : u.storage?.smartMediaUpload?.getPendingUpload?.(xe.key);
60790
- me && ye.set(xe.key, me);
60793
+ const xe = /* @__PURE__ */ new Map();
60794
+ for (const me of he.items ?? []) {
60795
+ if (!("sources" in me) || !me.sources?.original?.url?.startsWith("blob:")) continue;
60796
+ const we = "option_id" in me ? u.storage?.poll?.getPendingUpload?.(me.key) : u.storage?.smartMediaUpload?.getPendingUpload?.(me.key);
60797
+ we && xe.set(me.key, we);
60791
60798
  }
60792
60799
  if (d !== EditorTypes.Poll) {
60793
- const xe = findByType(le, "media");
60794
- for (const me of xe) {
60795
- const Ae = me?.attrs?.uid, _e = me?.attrs?.src;
60796
- if (typeof Ae != "string" || !(typeof _e == "string" && _e.startsWith("blob:")) && me?.attrs?.deferred !== !0 || ye.has(Ae)) continue;
60797
- const Re = u.storage?.smartMediaUpload?.getPendingUpload?.(Ae);
60798
- Re && ye.set(Ae, Re);
60800
+ const me = findByType(le, "media");
60801
+ for (const we of me) {
60802
+ const _e = we?.attrs?.uid, ke = we?.attrs?.src;
60803
+ if (typeof _e != "string" || !(typeof ke == "string" && ke.startsWith("blob:")) && we?.attrs?.deferred !== !0 || xe.has(_e)) continue;
60804
+ const Ie = u.storage?.smartMediaUpload?.getPendingUpload?.(_e);
60805
+ Ie && xe.set(_e, Ie);
60799
60806
  }
60800
60807
  }
60801
- ye.size > 0 && (be = ye);
60808
+ xe.size > 0 && (be = xe);
60802
60809
  }
60803
- y?.({ payload: he, html: ne, json: le, text: ce, pendingUploads: be }), g && (te(), d === EditorTypes.Poll ? u?.chain()?.focus()?.setContent({ type: "doc", content: [{ type: "paragraph" }, { type: "poll" }] })?.run() : u?.chain()?.focus()?.clearContent()?.run());
60810
+ y?.({ payload: he, html: ne, json: le, text: ce, pendingUploads: be }, { restoreContent: () => {
60811
+ const { editor: xe, editorTab: me } = C.getState();
60812
+ me === d && (!xe || xe.isDestroyed || xe.commands.setContent(le));
60813
+ } }), g && (te(), d === EditorTypes.Poll ? u?.chain()?.focus()?.setContent({ type: "doc", content: [{ type: "paragraph" }, { type: "poll" }] })?.run() : u?.chain()?.focus()?.clearContent()?.run());
60804
60814
  },
60805
60815
  [j, B, te, g, u, d, y, C, F]
60806
60816
  );