Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

150 lines
3.8 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: b715dd3a8a120944.5a7f07e15c.js
* Module id: 861571
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, r) => {
"use strict";
Object.defineProperty(r, "__esModule", { value: !0 }),
(r.useRevalidateCookiesState =
r.useReactiveHasCookie =
r.useReactiveDeleteCookie =
r.useReactiveSetCookie =
r.useReactiveGetCookie =
r.useReactiveGetCookies =
r.useReactiveCookiesNext =
r.useCookiesNext =
r.useHasCookie =
r.useDeleteCookie =
r.useSetCookie =
r.useGetCookie =
r.useGetCookies =
r.useCookiesPolling =
void 0);
var i = e.r(705776),
o = e.r(358379),
n = e.r(343554),
a = function (e) {
var t = (0, o.useState)(!1),
r = t[0],
i = t[1];
return (
(0, o.useEffect)(function () {
i(!0);
}, []),
r ? e : function () {}
);
},
s = function () {
var e = (0, o.useContext)(i.CookieContext);
if (!e)
throw Error("useCookieContext must be used within a CookieProvider");
return e;
};
r.useCookiesPolling = function (e, t) {
var r = t || {},
i = r.intervalMs,
a = void 0 === i ? 1e3 : i,
s = r.enabled,
u = void 0 !== s && s;
(0, o.useEffect)(
function () {
if (u) {
var t = (0, n.getCookies)(),
r = setInterval(function () {
(0, n.revalidateCookies)(e, t);
}, a);
return function () {
return clearInterval(r);
};
}
},
[e, a],
);
};
var u = function () {
return a(n.getCookies);
};
r.useGetCookies = u;
var f = function () {
return a(n.getCookie);
};
r.useGetCookie = f;
var c = function () {
return a(n.hasCookie);
};
r.useHasCookie = c;
var l = function () {
return a(n.setCookie);
};
r.useSetCookie = l;
var h = function () {
return a(n.deleteCookie);
};
(r.useDeleteCookie = h),
(r.useCookiesNext = function () {
return {
getCookies: u(),
getCookie: f(),
hasCookie: c(),
setCookie: l(),
deleteCookie: h(),
};
});
var p = function () {
var e = s();
return function () {
return null == e ? void 0 : e.getAll();
};
};
r.useReactiveGetCookies = p;
var d = function () {
var e = s();
return function (t) {
return null == e ? void 0 : e.get(t);
};
};
r.useReactiveGetCookie = d;
var g = function () {
var e = s();
return function (t, r, i) {
return null == e || e.set(t, r), (0, n.setCookie)(t, r, i);
};
};
r.useReactiveSetCookie = g;
var v = function () {
var e = s();
return function (t, r) {
return null == e || e.delete(t), (0, n.deleteCookie)(t, r);
};
};
r.useReactiveDeleteCookie = v;
var y = function () {
var e = s();
return function (t) {
return null == e ? void 0 : e.has(t);
};
};
r.useReactiveHasCookie = y;
var b = function () {
var e = s();
return function () {
null == e || e.revalidateCookiesState();
};
};
(r.useRevalidateCookiesState = b),
(r.useReactiveCookiesNext = function () {
return {
getCookies: p(),
getCookie: d(),
hasCookie: y(),
setCookie: g(),
deleteCookie: v(),
revalidateCookiesState: b(),
};
});
};
export default moduleFactory;