import c from "./vanilla.es.js";
import { default as b } from "./vanilla.es.js";
import { useDebugValue as u } from "react";
import S from "../../use-sync-external-store/shim/with-selector.es.js";
const { useSyncExternalStoreWithSelector: f } = S;
function l(t, e = t.getState, o) {
  const r = f(
    t.subscribe,
    t.getState,
    t.getServerState || t.getState,
    e,
    o
  );
  return u(r), r;
}
const s = (t) => {
  const e = typeof t == "function" ? c(t) : t, o = (r, n) => l(e, r, n);
  return Object.assign(o, e), o;
}, i = (t) => t ? s(t) : s;
export {
  b as createStore,
  i as default,
  l as useStore
};
//# sourceMappingURL=index.es.js.map
