import { __exports as s } from "../../../../../../_virtual/use-sync-external-store-shim.development.js";
import h from "react";
/**
 * @license React
 * use-sync-external-store-shim.development.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var l;
function A() {
  return l ? s : (l = 1, process.env.NODE_ENV !== "production" && (function() {
    function d(e, t) {
      return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
    }
    function S(e, t) {
      f || o.startTransition === void 0 || (f = !0, console.error(
        "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
      ));
      var r = t();
      if (!c) {
        var u = t();
        _(r, u) || (console.error(
          "The result of getSnapshot should be cached to avoid an infinite loop"
        ), c = !0);
      }
      u = p({
        inst: { value: r, getSnapshot: t }
      });
      var n = u[0].inst, i = u[1];
      return L(
        function() {
          n.value = r, n.getSnapshot = t, a(n) && i({ inst: n });
        },
        [e, r, t]
      ), E(
        function() {
          return a(n) && i({ inst: n }), e(function() {
            a(n) && i({ inst: n });
          });
        },
        [e]
      ), y(r), r;
    }
    function a(e) {
      var t = e.getSnapshot;
      e = e.value;
      try {
        var r = t();
        return !_(e, r);
      } catch {
        return !0;
      }
    }
    function O(e, t) {
      return t();
    }
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
    var o = h, _ = typeof Object.is == "function" ? Object.is : d, p = o.useState, E = o.useEffect, L = o.useLayoutEffect, y = o.useDebugValue, f = !1, c = !1, v = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? O : S;
    s.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : v, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  })(), s);
}
export {
  A as __require
};
