import {
  useQueryClient
} from "./chunk.22IV34P4.js";
import {
  _extends
} from "./chunk.JNDOIKBN.js";

// node_modules/@twind/typography/module/twind_typography.js
var i = (t) => t.toFixed(7).replace(/(\.\d+?)0+$/, "$1").replace(/\.0$/, "");
var r = (t) => `${i(t / 16)}rem`;
var o = (t, n) => `${i(t / n)}em`;
var h = ({theme: t, tag: n}) => ({DEFAULT: {css: [{color: t("colors", ["gray", "700"]), maxWidth: "65ch", [`[class~="${n("lead")}"]`]: {color: t("colors", ["gray", "600"])}, a: {color: t("colors", ["gray", "900"]), textDecoration: "underline", fontWeight: "500"}, strong: {color: t("colors", ["gray", "900"]), fontWeight: "600"}, ol: {counterReset: "list-counter"}, "ol > li": {position: "relative", counterIncrement: "list-counter"}, "ol > li::before": {content: 'counter(list-counter) "."', position: "absolute", fontWeight: "400", color: t("colors", ["gray", "500"])}, "ul > li": {position: "relative"}, "ul > li::before": {content: '""', position: "absolute", backgroundColor: t("colors", ["gray", "300"]), borderRadius: "50%"}, hr: {borderColor: t("colors", ["gray", "200"]), borderTopWidth: "1"}, blockquote: {fontWeight: "500", fontStyle: "italic", color: t("colors", ["gray", "900"]), borderLeftWidth: "0.25rem", borderLeftColor: t("colors", ["gray", "200"]), quotes: '"\\201C""\\201D""\\2018""\\2019"'}, "blockquote p:first-of-type::before": {content: "open-quote"}, "blockquote p:last-of-type::after": {content: "close-quote"}, h1: {color: t("colors", ["gray", "900"]), fontWeight: "800"}, h2: {color: t("colors", ["gray", "900"]), fontWeight: "700"}, h3: {color: t("colors", ["gray", "900"]), fontWeight: "600"}, h4: {color: t("colors", ["gray", "900"]), fontWeight: "600"}, "figure figcaption": {color: t("colors", ["gray", "500"])}, code: {color: t("colors", ["gray", "900"]), fontWeight: "600"}, "code::before": {content: '"`"'}, "code::after": {content: '"`"'}, "a code": {color: t("colors", ["gray", "900"])}, pre: {color: t("colors", ["gray", "200"]), backgroundColor: t("colors", ["gray", "800"]), overflowX: "auto"}, "pre code": {backgroundColor: "transparent", borderWidth: "0", borderRadius: "0", padding: "0", fontWeight: "400", color: "inherit", fontSize: "inherit", fontFamily: "inherit", lineHeight: "inherit"}, "pre code::before": {content: '""'}, "pre code::after": {content: '""'}, table: {width: "100%", tableLayout: "auto", textAlign: "left", marginTop: o(32, 16), marginBottom: o(32, 16)}, thead: {color: t("colors", ["gray", "900"]), fontWeight: "600", borderBottomWidth: "1px", borderBottomColor: t("colors", ["gray", "300"])}, "thead th": {verticalAlign: "bottom"}, "tbody tr": {borderBottomWidth: "1px", borderBottomColor: t("colors", ["gray", "200"])}, "tbody tr:last-child": {borderBottomWidth: "0"}, "tbody td": {verticalAlign: "top"}}, {fontSize: r(16), lineHeight: i(28 / 16), p: {marginTop: o(20, 16), marginBottom: o(20, 16)}, [`[class~="${n("lead")}"]`]: {fontSize: o(20, 16), lineHeight: i(32 / 20), marginTop: o(24, 20), marginBottom: o(24, 20)}, blockquote: {marginTop: o(32, 20), marginBottom: o(32, 20), paddingLeft: o(20, 20)}, h1: {fontSize: o(36, 16), marginTop: "0", marginBottom: o(32, 36), lineHeight: i(40 / 36)}, h2: {fontSize: o(24, 16), marginTop: o(48, 24), marginBottom: o(24, 24), lineHeight: i(32 / 24)}, h3: {fontSize: o(20, 16), marginTop: o(32, 20), marginBottom: o(12, 20), lineHeight: i(32 / 20)}, h4: {marginTop: o(24, 16), marginBottom: o(8, 16), lineHeight: i(24 / 16)}, img: {marginTop: o(32, 16), marginBottom: o(32, 16)}, video: {marginTop: o(32, 16), marginBottom: o(32, 16)}, figure: {marginTop: o(32, 16), marginBottom: o(32, 16)}, "figure > *": {marginTop: "0", marginBottom: "0"}, "figure figcaption": {fontSize: o(14, 16), lineHeight: i(20 / 14), marginTop: o(12, 14)}, code: {fontSize: o(14, 16)}, "h2 code": {fontSize: o(21, 24)}, "h3 code": {fontSize: o(18, 20)}, pre: {fontSize: o(14, 16), lineHeight: i(24 / 14), marginTop: o(24, 14), marginBottom: o(24, 14), borderRadius: r(6), paddingTop: o(12, 14), paddingRight: o(16, 14), paddingBottom: o(12, 14), paddingLeft: o(16, 14)}, ol: {marginTop: o(20, 16), marginBottom: o(20, 16)}, ul: {marginTop: o(20, 16), marginBottom: o(20, 16)}, li: {marginTop: o(8, 16), marginBottom: o(8, 16)}, "ol > li": {paddingLeft: o(28, 16)}, "ol > li::before": {left: "0"}, "ul > li": {paddingLeft: o(28, 16)}, "ul > li::before": {width: o(6, 16), height: o(6, 16), top: `calc(${o(28 / 2, 16)} - ${o(3, 16)})`, left: o(4, 16)}, "> ul > li p": {marginTop: o(12, 16), marginBottom: o(12, 16)}, "> ul > li > *:first-child": {marginTop: o(20, 16)}, "> ul > li > *:last-child": {marginBottom: o(20, 16)}, "> ol > li > *:first-child": {marginTop: o(20, 16)}, "> ol > li > *:last-child": {marginBottom: o(20, 16)}, "ul ul, ul ol, ol ul, ol ol": {marginTop: o(12, 16), marginBottom: o(12, 16)}, hr: {marginTop: o(48, 16), marginBottom: o(48, 16)}, "hr + *": {marginTop: "0"}, "h2 + *": {marginTop: "0"}, "h3 + *": {marginTop: "0"}, "h4 + *": {marginTop: "0"}, table: {fontSize: o(14, 16), lineHeight: i(24 / 14)}, "thead th": {paddingRight: o(8, 14), paddingBottom: o(8, 14), paddingLeft: o(8, 14)}, "thead th:first-child": {paddingLeft: "0"}, "thead th:last-child": {paddingRight: "0"}, "tbody td": {paddingTop: o(8, 14), paddingRight: o(8, 14), paddingBottom: o(8, 14), paddingLeft: o(8, 14)}, "tbody td:first-child": {paddingLeft: "0"}, "tbody td:last-child": {paddingRight: "0"}}, {"> :first-child": {marginTop: "0"}, "> :last-child": {marginBottom: "0"}}]}, sm: {css: [{fontSize: r(14), lineHeight: i(24 / 14), p: {marginTop: o(16, 14), marginBottom: o(16, 14)}, [`[class~="${n("lead")}"]`]: {fontSize: o(18, 14), lineHeight: i(28 / 18), marginTop: o(16, 18), marginBottom: o(16, 18)}, blockquote: {marginTop: o(24, 18), marginBottom: o(24, 18), paddingLeft: o(20, 18)}, h1: {fontSize: o(30, 14), marginTop: "0", marginBottom: o(24, 30), lineHeight: i(36 / 30)}, h2: {fontSize: o(20, 14), marginTop: o(32, 20), marginBottom: o(16, 20), lineHeight: i(28 / 20)}, h3: {fontSize: o(18, 14), marginTop: o(28, 18), marginBottom: o(8, 18), lineHeight: i(28 / 18)}, h4: {marginTop: o(20, 14), marginBottom: o(8, 14), lineHeight: i(20 / 14)}, img: {marginTop: o(24, 14), marginBottom: o(24, 14)}, video: {marginTop: o(24, 14), marginBottom: o(24, 14)}, figure: {marginTop: o(24, 14), marginBottom: o(24, 14)}, "figure > *": {marginTop: "0", marginBottom: "0"}, "figure figcaption": {fontSize: o(12, 14), lineHeight: i(16 / 12), marginTop: o(8, 12)}, code: {fontSize: o(12, 14)}, "h2 code": {fontSize: o(18, 20)}, "h3 code": {fontSize: o(16, 18)}, pre: {fontSize: o(12, 14), lineHeight: i(20 / 12), marginTop: o(20, 12), marginBottom: o(20, 12), borderRadius: r(4), paddingTop: o(8, 12), paddingRight: o(12, 12), paddingBottom: o(8, 12), paddingLeft: o(12, 12)}, ol: {marginTop: o(16, 14), marginBottom: o(16, 14)}, ul: {marginTop: o(16, 14), marginBottom: o(16, 14)}, li: {marginTop: o(4, 14), marginBottom: o(4, 14)}, "ol > li": {paddingLeft: o(22, 14)}, "ol > li::before": {left: "0"}, "ul > li": {paddingLeft: o(22, 14)}, "ul > li::before": {height: o(5, 14), width: o(5, 14), top: `calc(${o(24 / 2, 14)} - ${o(2.5, 14)})`, left: o(3, 14)}, "> ul > li p": {marginTop: o(8, 14), marginBottom: o(8, 14)}, "> ul > li > *:first-child": {marginTop: o(16, 14)}, "> ul > li > *:last-child": {marginBottom: o(16, 14)}, "> ol > li > *:first-child": {marginTop: o(16, 14)}, "> ol > li > *:last-child": {marginBottom: o(16, 14)}, "ul ul, ul ol, ol ul, ol ol": {marginTop: o(8, 14), marginBottom: o(8, 14)}, hr: {marginTop: o(40, 14), marginBottom: o(40, 14)}, "hr + *": {marginTop: "0"}, "h2 + *": {marginTop: "0"}, "h3 + *": {marginTop: "0"}, "h4 + *": {marginTop: "0"}, table: {fontSize: o(12, 14), lineHeight: i(18 / 12)}, "thead th": {paddingRight: o(12, 12), paddingBottom: o(8, 12), paddingLeft: o(12, 12)}, "thead th:first-child": {paddingLeft: "0"}, "thead th:last-child": {paddingRight: "0"}, "tbody td": {paddingTop: o(8, 12), paddingRight: o(12, 12), paddingBottom: o(8, 12), paddingLeft: o(12, 12)}, "tbody td:first-child": {paddingLeft: "0"}, "tbody td:last-child": {paddingRight: "0"}}, {"> :first-child": {marginTop: "0"}, "> :last-child": {marginBottom: "0"}}]}, lg: {css: [{fontSize: r(18), lineHeight: i(32 / 18), p: {marginTop: o(24, 18), marginBottom: o(24, 18)}, [`[class~="${n("lead")}"]`]: {fontSize: o(22, 18), lineHeight: i(32 / 22), marginTop: o(24, 22), marginBottom: o(24, 22)}, blockquote: {marginTop: o(40, 24), marginBottom: o(40, 24), paddingLeft: o(24, 24)}, h1: {fontSize: o(48, 18), marginTop: "0", marginBottom: o(40, 48), lineHeight: i(48 / 48)}, h2: {fontSize: o(30, 18), marginTop: o(56, 30), marginBottom: o(32, 30), lineHeight: i(40 / 30)}, h3: {fontSize: o(24, 18), marginTop: o(40, 24), marginBottom: o(16, 24), lineHeight: i(36 / 24)}, h4: {marginTop: o(32, 18), marginBottom: o(8, 18), lineHeight: i(28 / 18)}, img: {marginTop: o(32, 18), marginBottom: o(32, 18)}, video: {marginTop: o(32, 18), marginBottom: o(32, 18)}, figure: {marginTop: o(32, 18), marginBottom: o(32, 18)}, "figure > *": {marginTop: "0", marginBottom: "0"}, "figure figcaption": {fontSize: o(16, 18), lineHeight: i(24 / 16), marginTop: o(16, 16)}, code: {fontSize: o(16, 18)}, "h2 code": {fontSize: o(26, 30)}, "h3 code": {fontSize: o(21, 24)}, pre: {fontSize: o(16, 18), lineHeight: i(28 / 16), marginTop: o(32, 16), marginBottom: o(32, 16), borderRadius: r(6), paddingTop: o(16, 16), paddingRight: o(24, 16), paddingBottom: o(16, 16), paddingLeft: o(24, 16)}, ol: {marginTop: o(24, 18), marginBottom: o(24, 18)}, ul: {marginTop: o(24, 18), marginBottom: o(24, 18)}, li: {marginTop: o(12, 18), marginBottom: o(12, 18)}, "ol > li": {paddingLeft: o(30, 18)}, "ol > li::before": {left: "0"}, "ul > li": {paddingLeft: o(30, 18)}, "ul > li::before": {width: o(6, 18), height: o(6, 18), top: `calc(${o(32 / 2, 18)} - ${o(3, 18)})`, left: o(4, 18)}, "> ul > li p": {marginTop: o(16, 18), marginBottom: o(16, 18)}, "> ul > li > *:first-child": {marginTop: o(24, 18)}, "> ul > li > *:last-child": {marginBottom: o(24, 18)}, "> ol > li > *:first-child": {marginTop: o(24, 18)}, "> ol > li > *:last-child": {marginBottom: o(24, 18)}, "ul ul, ul ol, ol ul, ol ol": {marginTop: o(16, 18), marginBottom: o(16, 18)}, hr: {marginTop: o(56, 18), marginBottom: o(56, 18)}, "hr + *": {marginTop: "0"}, "h2 + *": {marginTop: "0"}, "h3 + *": {marginTop: "0"}, "h4 + *": {marginTop: "0"}, table: {fontSize: o(16, 18), lineHeight: i(24 / 16)}, "thead th": {paddingRight: o(12, 16), paddingBottom: o(12, 16), paddingLeft: o(12, 16)}, "thead th:first-child": {paddingLeft: "0"}, "thead th:last-child": {paddingRight: "0"}, "tbody td": {paddingTop: o(12, 16), paddingRight: o(12, 16), paddingBottom: o(12, 16), paddingLeft: o(12, 16)}, "tbody td:first-child": {paddingLeft: "0"}, "tbody td:last-child": {paddingRight: "0"}}, {"> :first-child": {marginTop: "0"}, "> :last-child": {marginBottom: "0"}}]}, xl: {css: [{fontSize: r(20), lineHeight: i(36 / 20), p: {marginTop: o(24, 20), marginBottom: o(24, 20)}, [`[class~="${n("lead")}"]`]: {fontSize: o(24, 20), lineHeight: i(36 / 24), marginTop: o(24, 24), marginBottom: o(24, 24)}, blockquote: {marginTop: o(48, 30), marginBottom: o(48, 30), paddingLeft: o(32, 30)}, h1: {fontSize: o(56, 20), marginTop: "0", marginBottom: o(48, 56), lineHeight: i(56 / 56)}, h2: {fontSize: o(36, 20), marginTop: o(56, 36), marginBottom: o(32, 36), lineHeight: i(40 / 36)}, h3: {fontSize: o(30, 20), marginTop: o(48, 30), marginBottom: o(20, 30), lineHeight: i(40 / 30)}, h4: {marginTop: o(36, 20), marginBottom: o(12, 20), lineHeight: i(32 / 20)}, img: {marginTop: o(40, 20), marginBottom: o(40, 20)}, video: {marginTop: o(40, 20), marginBottom: o(40, 20)}, figure: {marginTop: o(40, 20), marginBottom: o(40, 20)}, "figure > *": {marginTop: "0", marginBottom: "0"}, "figure figcaption": {fontSize: o(18, 20), lineHeight: i(28 / 18), marginTop: o(18, 18)}, code: {fontSize: o(18, 20)}, "h2 code": {fontSize: o(31, 36)}, "h3 code": {fontSize: o(27, 30)}, pre: {fontSize: o(18, 20), lineHeight: i(32 / 18), marginTop: o(36, 18), marginBottom: o(36, 18), borderRadius: r(8), paddingTop: o(20, 18), paddingRight: o(24, 18), paddingBottom: o(20, 18), paddingLeft: o(24, 18)}, ol: {marginTop: o(24, 20), marginBottom: o(24, 20)}, ul: {marginTop: o(24, 20), marginBottom: o(24, 20)}, li: {marginTop: o(12, 20), marginBottom: o(12, 20)}, "ol > li": {paddingLeft: o(36, 20)}, "ol > li::before": {left: "0"}, "ul > li": {paddingLeft: o(36, 20)}, "ul > li::before": {width: o(7, 20), height: o(7, 20), top: `calc(${o(36 / 2, 20)} - ${o(3.5, 20)})`, left: o(5, 20)}, "> ul > li p": {marginTop: o(16, 20), marginBottom: o(16, 20)}, "> ul > li > *:first-child": {marginTop: o(24, 20)}, "> ul > li > *:last-child": {marginBottom: o(24, 20)}, "> ol > li > *:first-child": {marginTop: o(24, 20)}, "> ol > li > *:last-child": {marginBottom: o(24, 20)}, "ul ul, ul ol, ol ul, ol ol": {marginTop: o(16, 20), marginBottom: o(16, 20)}, hr: {marginTop: o(56, 20), marginBottom: o(56, 20)}, "hr + *": {marginTop: "0"}, "h2 + *": {marginTop: "0"}, "h3 + *": {marginTop: "0"}, "h4 + *": {marginTop: "0"}, table: {fontSize: o(18, 20), lineHeight: i(28 / 18)}, "thead th": {paddingRight: o(12, 18), paddingBottom: o(16, 18), paddingLeft: o(12, 18)}, "thead th:first-child": {paddingLeft: "0"}, "thead th:last-child": {paddingRight: "0"}, "tbody td": {paddingTop: o(16, 18), paddingRight: o(12, 18), paddingBottom: o(16, 18), paddingLeft: o(12, 18)}, "tbody td:first-child": {paddingLeft: "0"}, "tbody td:last-child": {paddingRight: "0"}}, {"> :first-child": {marginTop: "0"}, "> :last-child": {marginBottom: "0"}}]}, "2xl": {css: [{fontSize: r(24), lineHeight: i(40 / 24), p: {marginTop: o(32, 24), marginBottom: o(32, 24)}, [`[class~="${n("lead")}"]`]: {fontSize: o(30, 24), lineHeight: i(44 / 30), marginTop: o(32, 30), marginBottom: o(32, 30)}, blockquote: {marginTop: o(64, 36), marginBottom: o(64, 36), paddingLeft: o(40, 36)}, h1: {fontSize: o(64, 24), marginTop: "0", marginBottom: o(56, 64), lineHeight: i(64 / 64)}, h2: {fontSize: o(48, 24), marginTop: o(72, 48), marginBottom: o(40, 48), lineHeight: i(52 / 48)}, h3: {fontSize: o(36, 24), marginTop: o(56, 36), marginBottom: o(24, 36), lineHeight: i(44 / 36)}, h4: {marginTop: o(40, 24), marginBottom: o(16, 24), lineHeight: i(36 / 24)}, img: {marginTop: o(48, 24), marginBottom: o(48, 24)}, video: {marginTop: o(48, 24), marginBottom: o(48, 24)}, figure: {marginTop: o(48, 24), marginBottom: o(48, 24)}, "figure > *": {marginTop: "0", marginBottom: "0"}, "figure figcaption": {fontSize: o(20, 24), lineHeight: i(32 / 20), marginTop: o(20, 20)}, code: {fontSize: o(20, 24)}, "h2 code": {fontSize: o(42, 48)}, "h3 code": {fontSize: o(32, 36)}, pre: {fontSize: o(20, 24), lineHeight: i(36 / 20), marginTop: o(40, 20), marginBottom: o(40, 20), borderRadius: r(8), paddingTop: o(24, 20), paddingRight: o(32, 20), paddingBottom: o(24, 20), paddingLeft: o(32, 20)}, ol: {marginTop: o(32, 24), marginBottom: o(32, 24)}, ul: {marginTop: o(32, 24), marginBottom: o(32, 24)}, li: {marginTop: o(12, 24), marginBottom: o(12, 24)}, "ol > li": {paddingLeft: o(40, 24)}, "ol > li::before": {left: "0"}, "ul > li": {paddingLeft: o(40, 24)}, "ul > li::before": {width: o(8, 24), height: o(8, 24), top: `calc(${o(40 / 2, 24)} - ${o(4, 24)})`, left: o(6, 24)}, "> ul > li p": {marginTop: o(20, 24), marginBottom: o(20, 24)}, "> ul > li > *:first-child": {marginTop: o(32, 24)}, "> ul > li > *:last-child": {marginBottom: o(32, 24)}, "> ol > li > *:first-child": {marginTop: o(32, 24)}, "> ol > li > *:last-child": {marginBottom: o(32, 24)}, "ul ul, ul ol, ol ul, ol ol": {marginTop: o(16, 24), marginBottom: o(16, 24)}, hr: {marginTop: o(72, 24), marginBottom: o(72, 24)}, "hr + *": {marginTop: "0"}, "h2 + *": {marginTop: "0"}, "h3 + *": {marginTop: "0"}, "h4 + *": {marginTop: "0"}, table: {fontSize: o(20, 24), lineHeight: i(28 / 20)}, "thead th": {paddingRight: o(12, 20), paddingBottom: o(16, 20), paddingLeft: o(12, 20)}, "thead th:first-child": {paddingLeft: "0"}, "thead th:last-child": {paddingRight: "0"}, "tbody td": {paddingTop: o(16, 20), paddingRight: o(12, 20), paddingBottom: o(16, 20), paddingLeft: o(12, 20)}, "tbody td:first-child": {paddingLeft: "0"}, "tbody td:last-child": {paddingRight: "0"}}, {"> :first-child": {marginTop: "0"}, "> :last-child": {marginBottom: "0"}}]}});
var s = ({className: t = "prose"} = {}) => ({lead: (n, {tag: g}) => g("lead"), [t]: (n, g) => {
  let e = g.theme("colors", [n[0], "600"], "");
  if (e)
    return {"& a": {color: e}, "& a code": {color: e}};
  let f = h(g), {css: m} = f[n[0] || "DEFAULT"] || {};
  if (m) {
    let d = {};
    return m.forEach((p) => Object.keys(p).forEach((l) => {
      let a = p[l], c = a != null && typeof a == "object" && !Array.isArray(a) ? `& ${l}` : l;
      d[c] = a;
    })), d;
  }
}});
var T = s;

// node_modules/react-query/es/hydration/hydration.js
function hydrate(client, dehydratedState, options) {
  if (typeof dehydratedState !== "object" || dehydratedState === null) {
    return;
  }
  var mutationCache = client.getMutationCache();
  var queryCache = client.getQueryCache();
  var mutations = dehydratedState.mutations || [];
  var queries = dehydratedState.queries || [];
  mutations.forEach(function(dehydratedMutation) {
    var _options$defaultOptio;
    mutationCache.build(client, _extends({}, options == null ? void 0 : (_options$defaultOptio = options.defaultOptions) == null ? void 0 : _options$defaultOptio.mutations, {
      mutationKey: dehydratedMutation.mutationKey
    }), dehydratedMutation.state);
  });
  queries.forEach(function(dehydratedQuery) {
    var _options$defaultOptio2;
    var query = queryCache.get(dehydratedQuery.queryHash);
    if (query) {
      if (query.state.dataUpdatedAt < dehydratedQuery.state.dataUpdatedAt) {
        query.setState(dehydratedQuery.state);
      }
      return;
    }
    queryCache.build(client, _extends({}, options == null ? void 0 : (_options$defaultOptio2 = options.defaultOptions) == null ? void 0 : _options$defaultOptio2.queries, {
      queryKey: dehydratedQuery.queryKey,
      queryHash: dehydratedQuery.queryHash
    }), dehydratedQuery.state);
  });
}

// node_modules/react-query/es/hydration/react.js
import React from "react";
function useHydrate(state, options) {
  var queryClient = useQueryClient();
  var optionsRef = React.useRef(options);
  optionsRef.current = options;
  React.useMemo(function() {
    if (state) {
      hydrate(queryClient, state, optionsRef.current);
    }
  }, [queryClient, state]);
}
var Hydrate = function Hydrate2(_ref) {
  var children = _ref.children, options = _ref.options, state = _ref.state;
  useHydrate(state, options);
  return children;
};

export {
  Hydrate,
  T
};
