diff --git a/crates/lazyboy-core/src/browser_client.rs b/crates/lazyboy-core/src/browser_client.rs index 3b9a5b6..1087cfd 100644 --- a/crates/lazyboy-core/src/browser_client.rs +++ b/crates/lazyboy-core/src/browser_client.rs @@ -119,6 +119,12 @@ impl BrowserClient { .await? == 0 { + let status = helper.child.wait().await?; + if status.code() == Some(75) { + return Err(anyhow!( + "browser_busy: another task still owns this desktop browser; do independent work or retry after it releases the browser" + )); + } return Err(anyhow!( "browser helper exited; next request will restart it" )); @@ -150,7 +156,7 @@ async fn spawn(cwd: &Path, profile: Option, seat_id: Option<&str>) -> R hub.ensure_browser_ready().await?; let mut command = tokio::process::Command::new("docker"); command.args(["exec", "-i", "-w", "/workspace", "-e", "LAZYBOY_BROWSER_CDP=http://127.0.0.1:9222", - hub.container(), "flock", "-n", "/home/box/.lazyboy-browser.lock", "node", "/opt/lazyboy/playwright/browser_helper.mjs"]); + hub.container(), "flock", "-E", "75", "-w", "5", "/home/box/.lazyboy-browser.lock", "node", "/opt/lazyboy/playwright/browser_helper.mjs"]); let mut helper = start_helper(command).await?; helper.container = Some(hub.seat_id().to_string()); Ok(helper) @@ -283,4 +289,25 @@ mod tests { client.close().await; std::fs::remove_dir_all(dir).unwrap(); } + + #[tokio::test] + async fn helper_lock_timeout_is_reported_as_browser_busy() { + if std::process::Command::new("node").arg("--version").output().is_err() { + return; + } + let dir = std::env::temp_dir().join(format!("lazyboy-helper-busy-{}", uuid::Uuid::new_v4())); + std::fs::create_dir_all(&dir).unwrap(); + let script = dir.join("busy.cjs"); + std::fs::write(&script, "process.stdin.once('data',()=>process.exit(75))").unwrap(); + let client = BrowserClient { + state: tokio::sync::Mutex::new(Some(spawn_script(&dir, &script, None).await.unwrap())), + timeout: Some(Duration::from_secs(2)), + }; + let error = client + .request_on(&dir, None, json!({"op":"ping"}), None) + .await + .unwrap_err(); + assert!(error.to_string().contains("browser_busy"), "{error:#}"); + std::fs::remove_dir_all(dir).unwrap(); + } } diff --git a/crates/lazyboy-core/src/web_server.rs b/crates/lazyboy-core/src/web_server.rs index fde9c95..f495722 100644 --- a/crates/lazyboy-core/src/web_server.rs +++ b/crates/lazyboy-core/src/web_server.rs @@ -38,6 +38,7 @@ struct App { cwd: PathBuf, box_pool: std::sync::Arc, ca_pem: Option, + vnc_client: reqwest::Client, } #[derive(Clone, Debug)] @@ -81,6 +82,7 @@ pub async fn serve_http(listen: WebListen) -> Result<()> { cwd: std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")), box_pool: BoxPool::global(), ca_pem: tls.as_ref().map(|m| m.ca_pem.clone()), + vnc_client: reqwest::Client::new(), }; let cors = CorsLayer::new() .allow_origin(Any) @@ -687,16 +689,20 @@ async fn novnc_proxy(State(app): State, req: Request) -> Response { Err(err) => err.into_response(), }; } - match proxy_vnc_http(req, &rest, port).await { + match proxy_vnc_http(req, &rest, port, &app.vnc_client).await { Ok(resp) => resp, Err(_) => (StatusCode::BAD_GATEWAY, "computer viewer proxy failed").into_response(), } } -async fn proxy_vnc_http(req: Request, rest: &str, port: u16) -> Result { +async fn proxy_vnc_http( + req: Request, + rest: &str, + port: u16, + client: &reqwest::Client, +) -> Result { let url = format!("http://127.0.0.1:{port}{rest}"); let method = req.method().clone(); - let client = reqwest::Client::new(); let mut builder = client.request(method, &url); builder = builder.header("accept-encoding", "identity"); for (name, value) in req.headers() { diff --git a/node_modules/.vite/deps/@blobatar_react.js b/node_modules/.vite/deps/@blobatar_react.js new file mode 100644 index 0000000..5d9f5ac --- /dev/null +++ b/node_modules/.vite/deps/@blobatar_react.js @@ -0,0 +1,582 @@ +import { + require_react +} from "./chunk-IO7TC67E.js"; +import { + __commonJS, + __toESM +} from "./chunk-DC5AMYBS.js"; + +// node_modules/react/cjs/react-jsx-runtime.development.js +var require_react_jsx_runtime_development = __commonJS({ + "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) { + "use strict"; + (function() { + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ("number" === typeof type.tag && console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), type.$$typeof) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); + return type; + case REACT_MEMO_TYPE: + return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) { + } + } + return null; + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + try { + testStringCoercion(value); + var JSCompiler_inline_result = false; + } catch (e) { + JSCompiler_inline_result = true; + } + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 + ); + return testStringCoercion(value); + } + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) + return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function getOwner() { + var dispatcher = ReactSharedInternals.A; + return null === dispatcher ? null : dispatcher.getOwner(); + } + function UnknownOwner() { + return Error("react-stack-top-frame"); + } + function hasValidKey(config) { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) return false; + } + return void 0 !== config.key; + } + function defineKeyPropWarningGetter(props, displayName) { + function warnAboutAccessingKey() { + specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error( + "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", + displayName + )); + } + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function elementRefGetterWithDeprecationWarning() { + var componentName = getComponentNameFromType(this.type); + didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error( + "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." + )); + componentName = this.props.ref; + return void 0 !== componentName ? componentName : null; + } + function ReactElement(type, key, props, owner, debugStack, debugTask) { + var refProp = props.ref; + type = { + $$typeof: REACT_ELEMENT_TYPE, + type, + key, + props, + _owner: owner + }; + null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", { + enumerable: false, + get: elementRefGetterWithDeprecationWarning + }) : Object.defineProperty(type, "ref", { enumerable: false, value: null }); + type._store = {}; + Object.defineProperty(type._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: 0 + }); + Object.defineProperty(type, "_debugInfo", { + configurable: false, + enumerable: false, + writable: true, + value: null + }); + Object.defineProperty(type, "_debugStack", { + configurable: false, + enumerable: false, + writable: true, + value: debugStack + }); + Object.defineProperty(type, "_debugTask", { + configurable: false, + enumerable: false, + writable: true, + value: debugTask + }); + Object.freeze && (Object.freeze(type.props), Object.freeze(type)); + return type; + } + function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) { + var children = config.children; + if (void 0 !== children) + if (isStaticChildren) + if (isArrayImpl(children)) { + for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) + validateChildKeys(children[isStaticChildren]); + Object.freeze && Object.freeze(children); + } else + console.error( + "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." + ); + else validateChildKeys(children); + if (hasOwnProperty.call(config, "key")) { + children = getComponentNameFromType(type); + var keys = Object.keys(config).filter(function(k2) { + return "key" !== k2; + }); + isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}"; + didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error( + 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', + isStaticChildren, + children, + keys, + children + ), didWarnAboutKeySpread[children + isStaticChildren] = true); + } + children = null; + void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey); + hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key); + if ("key" in config) { + maybeKey = {}; + for (var propName in config) + "key" !== propName && (maybeKey[propName] = config[propName]); + } else maybeKey = config; + children && defineKeyPropWarningGetter( + maybeKey, + "function" === typeof type ? type.displayName || type.name || "Unknown" : type + ); + return ReactElement( + type, + children, + maybeKey, + getOwner(), + debugStack, + debugTask + ); + } + function validateChildKeys(node) { + isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1)); + } + function isValidElement(object) { + return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; + } + var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() { + return null; + }; + React = { + react_stack_bottom_frame: function(callStackForError) { + return callStackForError(); + } + }; + var specialPropKeyWarningShown; + var didWarnAboutElementRef = {}; + var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind( + React, + UnknownOwner + )(); + var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); + var didWarnAboutKeySpread = {}; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.jsx = function(type, config, maybeKey) { + var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; + if (trackActualOwner) { + var previousStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 10; + var debugStackDEV = Error("react-stack-top-frame"); + Error.stackTraceLimit = previousStackTraceLimit; + } else debugStackDEV = unknownOwnerDebugStack; + return jsxDEVImpl( + type, + config, + maybeKey, + false, + debugStackDEV, + trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask + ); + }; + exports.jsxs = function(type, config, maybeKey) { + var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++; + if (trackActualOwner) { + var previousStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 10; + var debugStackDEV = Error("react-stack-top-frame"); + Error.stackTraceLimit = previousStackTraceLimit; + } else debugStackDEV = unknownOwnerDebugStack; + return jsxDEVImpl( + type, + config, + maybeKey, + true, + debugStackDEV, + trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask + ); + }; + })(); + } +}); + +// node_modules/react/jsx-runtime.js +var require_jsx_runtime = __commonJS({ + "node_modules/react/jsx-runtime.js"(exports, module) { + "use strict"; + if (false) { + module.exports = null; + } else { + module.exports = require_react_jsx_runtime_development(); + } + } +}); + +// node_modules/blobatar/dist/react.js +var import_react = __toESM(require_react()); +var import_jsx_runtime = __toESM(require_jsx_runtime()); +var G = (t, e) => `mo-root${t === "always" ? " mo-always" : ""}${e ? " mo-expr" : ""}`; +function It(t) { + let e = Math.round(t.num("motion.blink", 3500, 6500)), n = Math.round(t.num("motion.saccade", 4200, 7600)), a = t.num("motion.lookX", 1, 2.2), o = t.num("motion.lookY", 0.8, 1.7), r2 = (s) => Math.round(s * 100) / 100; + return { phase: Math.round(t.num("motion.phase", 0, 2800)), bob: Math.round(t.num("motion.bob", 0, 3400)), blink: e, blinkPhase: Math.round(t.num("motion.blinkPhase", 0, e)), saccade: n, saccadePhase: Math.round(t.num("motion.saccadePhase", 0, n)), lookX: r2(a) * (t.bool("motion.lookXFlip") ? -1 : 1), lookY: r2(o) * (t.bool("motion.lookYFlip") ? -1 : 1), lookMX: r2(a), lookMY: r2(o) }; +} +function N(t) { + let e = (a) => `${-a}ms`, n = It(t); + return { "--mo-phase": e(n.phase), "--mo-bob-phase": e(n.bob), "--mo-blink": `${n.blink}ms`, "--mo-blink-phase": e(n.blinkPhase), "--mo-look-x": String(n.lookX), "--mo-look-mx": String(n.lookMX), "--mo-look-y": String(n.lookY), "--mo-look-my": String(n.lookMY), "--mo-saccade": `${n.saccade}ms`, "--mo-saccade-phase": e(n.saccadePhase) }; +} +function R({ l: t, c: e, h: n }) { + let a = n * Math.PI / 180, o = e * Math.cos(a), r2 = e * Math.sin(a), s = t + 0.3963377774 * o + 0.2158037573 * r2, c = t - 0.1055613458 * o - 0.0638541728 * r2, i = t - 0.0894841775 * o - 1.291485548 * r2, u = s * s * s, m = c * c * c, l = i * i * i; + return [4.0767416621 * u - 3.3077115913 * m + 0.2309699292 * l, -1.2684380046 * u + 2.6097574011 * m - 0.3413193965 * l, -0.0041960863 * u - 0.7034186147 * m + 1.707614701 * l]; +} +var U = (t) => t.every((e) => e >= -1e-4 && e <= 1.0001); +function Q(t) { + let e = R(t); + if (!U(e)) { + let n = 0, a = t.c; + for (let o = 0; o < 12; o++) { + let r2 = (n + a) / 2; + if (U(R({ ...t, c: r2 }))) n = r2; + else a = r2; + } + e = R({ ...t, c: n }); + } + return e.map((n) => Math.min(1, Math.max(0, n))); +} +function q(t) { + let [e, n, a] = Q(t); + return 0.2126 * e + 0.7152 * n + 0.0722 * a; +} +function B(t, e) { + let n = q(t), a = q(e); + return (Math.max(n, a) + 0.05) / (Math.min(n, a) + 0.05); +} +function v(t, e, n) { + if (B(t, e) >= n) return t; + let a = t.l >= e.l ? 1 : -1; + for (let s of [a, -a]) { + let c = { ...t }; + for (let i = 0; i < 60; i++) { + if (c.l = Math.min(1, Math.max(0, c.l + s * 0.02)), B(c, e) >= n) return c; + if (c.l === 0 || c.l === 1) break; + } + } + let o = { ...t, l: 0, c: 0 }, r2 = { ...t, l: 1, c: 0 }; + return B(o, e) >= B(r2, e) ? o : r2; +} +function T(t) { + return "#" + Q(t).map((e) => { + let n = e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 0.4166666666666667) - 0.055; + return Math.round(n * 255).toString(16).padStart(2, "0"); + }).join(""); +} +var K = [[0.2, { l: 0.86, c: 0.085 }], [0.36, { l: 0.9, c: 0.028 }], [0.62, { l: 0.73, c: 0.135 }], [0.8, { l: 0.62, c: 0.165 }], [0.93, { l: 0.87, c: 0.16 }], [1, { l: 0.34, c: 0.035 }]]; +var At = (t) => { + var _a; + return ((_a = K.find(([e]) => t < e)) == null ? void 0 : _a[1]) ?? K[0][1]; +}; +var J = { l: 0.145, c: 0, h: 0 }; +var W = 1.5; +var Rt = (t, e) => { + let n = At(e), a = v({ l: n.l, c: n.c, h: t }, J, W); + return { bg: { l: 0.965, c: 0.01, h: t }, head: a, eye: a.l >= 0.5 ? { l: 0.17, c: 0.02, h: t } : { l: 0.97, c: 0.012, h: t } }; +}; +var Ht = [["head", "bg", 1.25], ["eye", "head", 4.5]]; +function Ft(t, e = true, n = 0) { + let a = Rt(t, n); + if (e) for (let [o, r2, s] of Ht) a[o] = v(a[o], a[r2], s); + return a; +} +function tt(t, e = true, n = 0) { + let a = Ft(t, e, n), o = {}; + for (let r2 in a) o[r2] = T(a[r2]); + return o; +} +var y = (t) => { + let e = Math.round(t * 100) / 100; + return Object.is(e, -0) ? "0" : String(e); +}; +function P({ cx: t, cy: e, rx: n, ry: a, n: o = 4, rot: r2 = 0 }) { + let s = Math.min(1, (8 * Math.pow(2, -1 / o) - 4) / 3), c = n, i = a, u = c * s, m = i * s, l = [[c, 0], [c, m], [u, i], [0, i], [-u, i], [-c, m], [-c, 0], [-c, -m], [-u, -i], [0, -i], [u, -i], [c, -m], [c, 0]], b = r2 * Math.PI / 180, p = Math.cos(b), d = Math.sin(b), g = (x) => { + let [f, M] = l[x]; + return `${y(t + f * p - M * d)} ${y(e + f * d + M * p)}`; + }, h = `M${g(0)}`; + for (let x = 1; x < 13; x += 3) h += `C${g(x)} ${g(x + 1)} ${g(x + 2)}`; + return h + "Z"; +} +function et(t, e, n, a, o, r2 = 0) { + let s = o.length, c = r2 * Math.PI / 180, i = o.map((l, b) => { + let p = c + 2 * Math.PI * b / s; + return [t + n * l * Math.cos(p), e + a * l * Math.sin(p)]; + }), u = (l) => i[(l % s + s) % s], m = `M${y(u(0)[0])} ${y(u(0)[1])}`; + for (let l = 0; l < s; l++) { + let [b, p] = u(l - 1), [d, g] = u(l), [h, x] = u(l + 1), [f, M] = u(l + 2); + m += `C${y(d + (h - b) / 6)} ${y(g + (x - p) / 6)} ${y(h - (f - d) / 6)} ${y(x - (M - g) / 6)} ${y(h)} ${y(x)}`; + } + return m + "Z"; +} +function nt({ cx: t, cy: e, rx: n, ry: a, sides: o, round: r2 = 0.3, rot: s = 0 }) { + let c = r2 > 0 ? r2 < 1 ? r2 / 2 : 0.5 : 0, i = s * Math.PI / 180 - Math.PI / 2, u = Array.from({ length: o }, (p, d) => { + let g = i + 2 * Math.PI * d / o; + return [t + n * Math.cos(g), e + a * Math.sin(g)]; + }), m = (p) => u[(p % o + o) % o], l = (p, d) => { + let [g, h] = m(p), [x, f] = m(d); + return `${y(g + (x - g) * c)} ${y(h + (f - h) * c)}`; + }, b = `M${l(0, -1)}`; + for (let p = 0; p < o; p++) { + let [d, g] = m(p); + if (b += `Q${y(d)} ${y(g)} ${l(p, p + 1)}`, c < 0.5) b += `L${l(p + 1, p)}`; + } + return b + "Z"; +} +function rt(t, e, n, a) { + let o = y(t - n), r2 = y(t + n); + return `M${o} ${y(e - a)}H${r2}V${y(e + a)}H${o}Z`; +} +function ot(t, e, n, a, o) { + let r2 = Math.max(1.05, o), s = n * Math.sqrt(1 - 1 / (r2 * r2)), c = e - a / r2, i = e - r2 * a, u = s * 0.14, m = c + 0.86 * (i - c); + return `M${y(t - s)} ${y(c)}L${y(t - u)} ${y(m)}Q${y(t)} ${y(i)} ${y(t + u)} ${y(m)}L${y(t + s)} ${y(c)}Z`; +} +function H(t, e) { + for (let n = 0; n < e.length; n++) t = Math.imul(t ^ e[n], 3432918353), t = t << 13 | t >>> 19; + return t; +} +function jt(t) { + return t = Math.imul(t ^ t >>> 16, 2246822507), t = Math.imul(t ^ t >>> 13, 3266489909), (t ^ t >>> 16) >>> 0; +} +var at = new TextEncoder(); +function _t(t) { + return t.normalize("NFC").trim().toLowerCase(); +} +function st(t, e = true) { + let n = e ? _t(t) : t; + return H(1779033703 ^ n.length, at.encode(n)); +} +function F(t, e) { + return jt(H(H(t, Uint8Array.of(255)), at.encode(e))) / 4294967296; +} +function ct(t, e = true, n) { + let a = st(t, e), o = (r2) => { + let s = n == null ? void 0 : n[r2], c = Array.isArray(s) ? s[Math.floor(F(a, r2) * s.length)] : s; + return c === void 0 ? F(a, r2) : c > 0 ? c < 1 ? c : 0.999999 : 0; + }; + return o.num = (r2, s, c) => s + o(r2) * (c - s), o.int = (r2, s, c) => s + Math.floor(o(r2) * (c - s + 1)), o.pick = (r2, s) => s[Math.floor(o(r2) * s.length)], o.bool = (r2, s = 0.5) => o(r2) < s, o.jitter = (r2, s) => (o(r2) * 2 - 1) * s, o; +} +function I(t, e, n) { + let a = e.expression; + if (n || !a) return { l: t, wrap: "" }; + return a.bake(t, a.p); +} +var j = (t, e) => (e == null ? void 0 : e.tint) ? e.tint(t, e.p) : t; +var it = (t, e) => e ? `${t}` : t; +var Ct = (t) => t.replace(/[&<>]/g, (e) => e === "&" ? "&" : e === "<" ? "<" : ">"); +function O(t, e) { + let n = ct(t, e.normalize ?? true, e.traits); + return { t: n, palette: { ...tt(e.hue ?? n.num("hue", 0, 360), e.contrast ?? true, e.tone ?? n("tone")), ...e.palette } }; +} +var Vt = (t) => t.title ? `${Ct(t.title)}` : ""; +function w(t, e, n) { + let a = e.background ?? t.background; + if (a === false) return; + return { d: a === "square" ? "M0 0H100V100H0Z" : P({ cx: 50, cy: 50, rx: 50, ry: 50, n: a === "circle" ? 2 : 6 }), fill: n.bg }; +} +var Xt = (t) => t ? `` : ""; +function lt(t) { + return (e, n = {}) => { + let { t: a, palette: o } = O(e, n), r2 = j(o, n.expression), s = n.size ? ` width="${n.size}" height="${n.size}"` : "", c = I(t.layout(a), n), i = Vt(n) + Xt(w(t, n, r2)) + it(t.render(c.l, r2), c.wrap); + return `${i}`; + }; +} +function ut(t) { + return (e, n = {}, a) => { + let { t: o, palette: r2 } = O(e, n), s = a == null ? void 0 : a(o, r2), c = I(t.layout(o), n, s); + return { cls: s == null ? void 0 : s.cls, bg: w(t, n, r2), inner: it(t.render(c.l, r2, !!s), c.wrap), vars: s == null ? void 0 : s.vars }; + }; +} +var mt = (t, e, n) => { + let a = e.rx, o = t.num("eye.rx", 0.075, 0.105) * a, r2 = t.num("eye.ratio", 1.9, 3.2), s = t.num("eye.scale", 0.78, 1.24), c = t.num("eye.stretch", 0.85, 1.18), i = t.num("eye.gap", 0.1, 0.24) * a, u = o * Math.max(1, s), m = o * r2 * Math.max(1, s * c), l = u + a * 0.03 + i, b = t.jitter("gaze.x", 0.09) * n.rx, p = t.num("gaze.y", -0.2, 0.08) * n.ry, d = t.jitter("eye.dy", 0.04) * n.ry, g = Math.hypot(u, m), h = Math.hypot((Math.abs(b) + l + g) / n.rx, (Math.abs(p) + Math.abs(d) + g) / n.ry), x = h > 0.9 ? 0.9 / h : 1, f = o * x, M = f * r2, L = l * x, A = Math.max(0, Math.min(1, i / m)), Lt = Math.min(12, Math.asin(A) * 180 / Math.PI), X = t.num("eye.lean", -1, 1) * Lt, vt = Math.max(-12, Math.min(12, X + t.jitter("eye.lean2", 3.5))), Y = n.cx + b * x, z = n.cy + p * x; + return [{ cx: Y - L, cy: z, rx: f, ry: M, n: t.num("eye.n", 3.5, 6), rot: X }, { cx: Y + L, cy: z + d * x, rx: f * s, ry: M * s * c, n: t.num("eye.n", 3.5, 6), rot: vt }]; +}; +function pt(t, e) { + let n = (r2) => (t.find(([, s]) => r2 < s) ?? t[t.length - 1])[0]; + function a(r2) { + var _a, _b, _c; + let s = n(r2("shape")), c = r2.num("body.r", 31, 38) * s.core, i = { cx: 50 + r2.jitter("body.x", 1.5), cy: 50 + r2.jitter("body.y", 1.5), rx: c, ry: c * r2.num("body.ratio", 0.92, 1.08), n: r2.num("body.n", 1.9, 2.5), rot: 0, radii: Array.from({ length: r2.int("body.pts", 6, 8) }, (l, b) => 1 + r2.jitter(`body.r${b}`, 0.16)) }; + (_a = s.body) == null ? void 0 : _a.call(s, r2, i); + let u = ((_b = s.face) == null ? void 0 : _b.call(s, i)) ?? i, m = { petals: [], extra: [] }; + return (_c = s.decorate) == null ? void 0 : _c.call(s, r2, i, m), { shape: s.name, draw: s.path, body: i, face: u, petals: m.petals, extra: m.extra, eyes: e(r2, i, u) }; + } + function o(r2, s, c) { + let i = (l) => Math.round(l * 100) / 100, u = (l, b) => { + let p = ``; + return c ? `${p}` : p; + }, m = `` + r2.petals.map((l) => ``).join("") + r2.extra.map((l) => ``).join("") + `` + r2.eyes.map(u).join("") + ""; + return c ? `${m}` : m; + } + return { layout: a, render: o, background: false }; +} +var yt = (t) => nt(t); +var bt = (t) => et(t.cx, t.cy, t.rx, t.ry, t.radii, t.rot); +var C = (t) => (e) => ({ cx: e.cx, cy: e.cy, rx: e.rx * t, ry: e.ry * t }); +var ht = (t) => C(Math.min(...t.radii) * 0.95)(t); +var Yt = (t) => C(0.84)(t); +var xt = { name: "round", core: 1 }; +var dt = { name: "organic", core: 0.98, path: bt, face: ht }; +var gt = { name: "boxy", core: 0.86, body: (t, e) => { + e.n = t.num("body.n", 3.4, 6), e.rot = t.num("body.rot", -20, 20); +} }; +var ft = { name: "capsule", core: 1.02, body: (t, e) => { + e.ry *= t.num("capsule.squat", 0.55, 0.68); +}, face: C(0.94), decorate: (t, e, n) => { + for (let a of [-1, 1]) n.petals.push({ cx: e.cx + a * (e.rx - e.ry), cy: e.cy, r: e.ry }); +}, path: (t) => rt(t.cx, t.cy, t.rx - t.ry, t.ry) }; +var Mt = { name: "nub", core: 0.88, decorate: (t, e, n) => { + let a = t.int("nub.n", 1, 2); + for (let o = 0; o < a; o++) { + let r2 = t.num(`nub.a${o}`, 0, 2 * Math.PI); + n.petals.push({ cx: e.cx + Math.cos(r2) * e.rx * 0.88, cy: e.cy + Math.sin(r2) * e.rx * 0.88, r: e.rx * t.num(`nub.r${o}`, 0.24, 0.4) }); + } +} }; +var kt = { name: "cloud", core: 0.78, face: ht, path: bt, decorate: (t, e, n) => { + let a = t.int("cloud.n", 4, 6); + for (let o = 0; o < a; o++) { + let r2 = Math.PI + Math.PI * (o + 0.5) / a; + n.petals.push({ cx: e.cx + Math.cos(r2) * e.rx * 0.8, cy: e.cy + Math.sin(r2) * e.rx * 0.5, r: e.rx * t.num(`cloud.r${o}`, 0.44, 0.62) }); + } +} }; +var $t = { name: "droplet", core: 0.78, body: (t, e) => { + e.cy += 0.22 * e.ry, e.n = 2; +}, face: (t) => ({ cx: t.cx, cy: t.cy + t.ry * 0.05, rx: t.rx * 0.88, ry: t.ry * 0.88 }), decorate: (t, e, n) => { + n.extra.push(ot(e.cx, e.cy, e.rx, e.ry, t.num("droplet.tip", 1.4, 1.65))); +} }; +var Pt = { name: "hexagon", core: 1.05, path: yt, face: Yt, body: (t, e) => { + e.sides = 6, e.rot = t.num("body.rot", -12, 12), e.round = t.num("poly.round", 0.24, 0.5); +} }; +var St = { name: "sun", core: 0.7, decorate: (t, e, n) => { + let a = t.int("sun.n", 6, 9), o = e.rx * t.num("sun.dist", 1, 1.08), r2 = e.rx * t.num("sun.r", 0.2, 0.26), s = t.num("sun.rot", 0, 2 * Math.PI); + for (let c = 0; c < a; c++) { + let i = s + 2 * Math.PI * c / a; + n.petals.push({ cx: e.cx + Math.cos(i) * o, cy: e.cy + Math.sin(i) * o, r: r2 }); + } +} }; +var Ot = { name: "triangle", core: 1.15, path: yt, body: (t, e) => { + e.sides = 3, e.rot = t.num("body.rot", -5, 5), e.round = t.num("poly.round", 0.24, 0.5); +}, face: (t) => ({ cx: t.cx, cy: t.cy + t.ry * 0.1, rx: t.rx * 0.54, ry: t.ry * 0.36 }) }; +var zt = [[xt, 0.22], [dt, 0.48], [gt, 0.6], [ft, 0.7], [Mt, 0.79], [kt, 0.86], [$t, 0.915], [Pt, 0.95], [St, 0.98], [Ot, 1]]; +var k = pt(zt, mt); +var Bt = lt(k); +var Gt = (t, e) => (n, a) => { + let o = e ? e.vars(e.p) : {}, r2 = (e == null ? void 0 : e.tint) ? e.tint(a, e.p) : a; + return { cls: G(t, !!Object.keys(o).length || !!(e == null ? void 0 : e.tint)), vars: { ...N(n), "--mo-head": r2.head, "--mo-eye": r2.eye, ...o } }; +}; +function Tt(t, e = {}) { + return ut(k)(t, e, e.animate && Gt(e.animate, e.expression)); +} +function wt(t, e) { + return "data:image/svg+xml," + Bt(t, e).replace(/"/g, "'").replace(/[%#<>{}|\\^[\]`]/g, (a) => "%" + a.charCodeAt(0).toString(16).toUpperCase()).replace(/\s+/g, " "); +} +function Le({ name: t, size: e, background: n, palette: a, hue: o, tone: r2, normalize: s, contrast: c, title: i, animate: u, expression: m, traits: l, ...b }) { + let p = { size: e, background: n, palette: a, hue: o, tone: r2, normalize: s, contrast: c, title: i, expression: m, traits: l }, d = JSON.stringify([t, p, u]), g = (0, import_react.useMemo)(() => u ? "" : wt(t, p), [d]), h = (0, import_react.useMemo)(() => u ? Tt(t, { ...p, animate: u }) : null, [d]), x = (0, import_react.useMemo)(() => ({ __html: (h == null ? void 0 : h.inner) ?? "" }), [h == null ? void 0 : h.inner]); + if (h) { + let { style: L, ...A } = b; + return (0, import_jsx_runtime.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", width: e, height: e, role: i ? "img" : void 0, "aria-hidden": i ? void 0 : true, style: { ...h.vars, ...L }, ...A, children: [i ? (0, import_jsx_runtime.jsx)("title", { children: i }) : null, h.bg ? (0, import_jsx_runtime.jsx)("path", { d: h.bg.d, fill: h.bg.fill }) : null, (0, import_jsx_runtime.jsx)("g", { className: h.cls, dangerouslySetInnerHTML: x })] }); + } + let { alt: f, ...M } = b; + return (0, import_jsx_runtime.jsx)("img", { src: g, width: e, height: e, alt: f ?? i ?? "", ...M }); +} + +// node_modules/@blobatar/react/dist/index.js +var r = Le; +export { + r as Blobatar +}; +/*! Bundled license information: + +react/cjs/react-jsx-runtime.development.js: + (** + * @license React + * react-jsx-runtime.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. + *) +*/ +//# sourceMappingURL=@blobatar_react.js.map diff --git a/node_modules/.vite/deps/@blobatar_react.js.map b/node_modules/.vite/deps/@blobatar_react.js.map new file mode 100644 index 0000000..001caab --- /dev/null +++ b/node_modules/.vite/deps/@blobatar_react.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../web/node_modules/react/cjs/react-jsx-runtime.development.js", "../../../web/node_modules/react/jsx-runtime.js", "../../../web/node_modules/blobatar/src/animate.ts", "../../../web/node_modules/blobatar/src/color.ts", "../../../web/node_modules/blobatar/src/shape.ts", "../../../web/node_modules/blobatar/src/hash.ts", "../../../web/node_modules/blobatar/src/traits.ts", "../../../web/node_modules/blobatar/src/render.ts", "../../../web/node_modules/blobatar/src/styles/compose.ts", "../../../web/node_modules/blobatar/src/styles/shapes.ts", "../../../web/node_modules/blobatar/src/styles/blob.ts", "../../../web/node_modules/blobatar/src/blobatar.ts", "../../../web/node_modules/blobatar/src/uri.ts", "../../../web/node_modules/blobatar/src/react.tsx", "../../../web/node_modules/@blobatar/react/src/index.tsx"], + "sourcesContent": ["/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n case REACT_VIEW_TRANSITION_TYPE:\n return \"ViewTransition\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n if (trackActualOwner) {\n var previousStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = 10;\n var debugStackDEV = Error(\"react-stack-top-frame\");\n Error.stackTraceLimit = previousStackTraceLimit;\n } else debugStackDEV = unknownOwnerDebugStack;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n debugStackDEV,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n if (trackActualOwner) {\n var previousStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = 10;\n var debugStackDEV = Error(\"react-stack-top-frame\");\n Error.stackTraceLimit = previousStackTraceLimit;\n } else debugStackDEV = unknownOwnerDebugStack;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n debugStackDEV,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n", "import type { Traits } from \"./traits\";\n\n/**\n * Idle animation for the `blob` variant. See docs/motion-spec.md.\n *\n * `\"hover\"` animates one blobatar at a time, which is both the aesthetic answer\n * (ambient motion seen constantly is motion worth removing) and the performance\n * one. `\"always\"` is the escape hatch for the single-blobatar case — a profile\n * header, an onboarding screen — where that frequency argument does not apply.\n */\nexport type Animate = \"hover\" | \"always\";\n\n/**\n * Root class. Amplitude, and therefore everything else, hangs off this.\n *\n * `mo-expr` marks \"wearing a non-idle expression\" and exists for exactly one\n * reason: a transition takes its duration from the state it is heading *to*, so\n * the class is what lets adopting an expression and returning to idle run on\n * different clocks. It selects no pose of its own — the pose is eight custom\n * properties, and this file never learns which expression is on.\n */\nexport const rootClass = (mode: Animate, expressive?: boolean) =>\n `mo-root${mode === \"always\" ? \" mo-always\" : \"\"}${expressive ? \" mo-expr\" : \"\"}`;\n\n/**\n * The same timings as numbers, which is what a renderer without a stylesheet\n * needs.\n *\n * Extracted from `motionVars` rather than restated beside it, because these are\n * the numbers a blobatar's whole idle layer is built on and two derivations of\n * them would be two crowds moving differently. `motionVars` is now a\n * serializer over this, and `src/idle.ts` evaluates the loops from it directly.\n *\n * **Phases are positive here and negated on the way out.** A CSS\n * `animation-delay` has to be negative to offset a phase rather than postpone a\n * start, which is a property of that property and not of the number: a loop\n * evaluated in JavaScript wants \"how far into the cycle this blobatar begins\",\n * which is what this says. The negation stays where the quirk is.\n *\n * Magnitude and sign of the look vector are drawn separately for the reason\n * `motionVars` gives, and both survive here: the foreshortening layer needs\n * *how far* the eyes travel, which is sign-independent.\n */\nexport interface IdleSeeds {\n /** How far into the breathe cycle this blobatar starts, in ms. */\n phase: number;\n /** The same for the bob, drawn independently so the drift is not shared. */\n bob: number;\n /** Blink period and offset, in ms. */\n blink: number;\n blinkPhase: number;\n /** Saccade period and offset, in ms. */\n saccade: number;\n saccadePhase: number;\n /** Where this blobatar looks when it glances, signed. */\n lookX: number;\n lookY: number;\n /** The same, unsigned, for the foreshortening. */\n lookMX: number;\n lookMY: number;\n}\n\nexport function motionSeeds(t: Traits): IdleSeeds {\n const blink = Math.round(t.num(\"motion.blink\", 3500, 6500));\n const saccade = Math.round(t.num(\"motion.saccade\", 4200, 7600));\n const lookX = t.num(\"motion.lookX\", 1, 2.2);\n const lookY = t.num(\"motion.lookY\", 0.8, 1.7);\n const r2 = (v: number) => Math.round(v * 100) / 100;\n return {\n phase: Math.round(t.num(\"motion.phase\", 0, 2800)),\n bob: Math.round(t.num(\"motion.bob\", 0, 3400)),\n blink,\n blinkPhase: Math.round(t.num(\"motion.blinkPhase\", 0, blink)),\n saccade,\n saccadePhase: Math.round(t.num(\"motion.saccadePhase\", 0, saccade)),\n lookX: r2(lookX) * (t.bool(\"motion.lookXFlip\") ? -1 : 1),\n lookY: r2(lookY) * (t.bool(\"motion.lookYFlip\") ? -1 : 1),\n lookMX: r2(lookX),\n lookMY: r2(lookY),\n };\n}\n\n/**\n * Per-blobatar timing, as custom properties for the stylesheet to read.\n *\n * A grid where every blobatar breathes in unison does not read as a crowd of\n * creatures; it reads as a heartbeat. Seeded offsets are what make it a crowd,\n * and they are the single most load-bearing 40 bytes in the motion layer.\n *\n * Delays are negated **here**, at the source. A positive `animation-delay`\n * postpones the start rather than offsetting the phase, so the whole grid would\n * still open in unison — after an awkward pause. Same keystroke, opposite\n * behavior, and it only shows on first paint.\n *\n * Breathe and bob get independent offsets. Sharing one preserves the drift\n * between their two periods but locks every blobatar into the *same* drift, which\n * is the unison problem again, one level up.\n *\n * These keys cost nothing in compatibility: traits are string-addressed, so\n * adding `motion.*` cannot perturb any existing blobatar.\n */\nexport function motionVars(t: Traits): Record {\n const ms = (v: number) => `${-v}ms`;\n const s = motionSeeds(t);\n return {\n \"--mo-phase\": ms(s.phase),\n \"--mo-bob-phase\": ms(s.bob),\n \"--mo-blink\": `${s.blink}ms`,\n \"--mo-blink-phase\": ms(s.blinkPhase),\n\n // Where this blobatar looks when it glances. One shared `@keyframes` visits\n // the same *sequence* of fixations on every blobatar, so without a per-seed\n // direction the whole grid would look left, then up, then right together —\n // the unison problem again, and more legible than the original because a\n // sequence is easier to spot than a phase.\n //\n // Magnitude and sign are drawn separately so the value cannot land near\n // zero: a seed that draws 0.02 would simply never appear to look anywhere.\n //\n // Magnitude ships as its own variable alongside the signed one. The wrap\n // layer (§4.7) foreshortens by *how far* the eyes travel, which is\n // sign-independent, and CSS has no portable `abs()` to recover it — Safari\n // only got one in 17.2. Emitting both is four bytes against a fallback.\n \"--mo-look-x\": String(s.lookX),\n \"--mo-look-mx\": String(s.lookMX),\n // Still short of horizontal — eyes rove side to side more than up and down\n // — but not by much, because the fixations are now real compass directions\n // rather than scaled copies of one vector, and a squashed vertical range\n // would collapse \"up\" and \"up-left\" into the same look.\n \"--mo-look-y\": String(s.lookY),\n \"--mo-look-my\": String(s.lookMY),\n \"--mo-saccade\": `${s.saccade}ms`,\n \"--mo-saccade-phase\": ms(s.saccadePhase),\n };\n}\n\n/** `--a:1;--b:2` — for the string API, which has no style object to hand. */\nexport const serializeVars = (vars: Record) =>\n Object.entries(vars)\n .map(([k, v]) => `${k}:${v}`)\n .join(\";\");\n", "/**\n * Palette construction.\n *\n * Hue is the only value the seed controls. Lightness and chroma are authored\n * constants, which is what makes every blobatar look like it came from the same\n * designer rather than from a random number generator.\n *\n * Colors are resolved to hex rather than emitted as `oklch()`. Browsers handle\n * `oklch()` in SVG fine, but server-side rasterizers (resvg, librsvg, sharp)\n * largely do not — and blobatars get rasterized server-side constantly. Doing the\n * conversion here also means the contrast guarantee is enforced against real\n * sRGB luminance instead of assumed from OKLab lightness, which drifts by up to\n * ~1.4:1 between hues at equal L.\n */\n\nexport interface Oklch {\n l: number;\n c: number;\n h: number;\n}\n\n/** Every color slot a blobatar has. */\nexport type ColorKey = \"bg\" | \"head\" | \"eye\";\nexport type Palette = Partial>;\n\n/** OKLCh -> linear-light sRGB. Components may fall outside [0,1] (out of gamut). */\nfunction toLinear({ l, c, h }: Oklch): [number, number, number] {\n const r = (h * Math.PI) / 180;\n const a = c * Math.cos(r);\n const b = c * Math.sin(r);\n\n const l_ = l + 0.3963377774 * a + 0.2158037573 * b;\n const m_ = l - 0.1055613458 * a - 0.0638541728 * b;\n const s_ = l - 0.0894841775 * a - 1.291485548 * b;\n\n const L = l_ * l_ * l_;\n const M = m_ * m_ * m_;\n const S = s_ * s_ * s_;\n\n return [\n 4.0767416621 * L - 3.3077115913 * M + 0.2309699292 * S,\n -1.2684380046 * L + 2.6097574011 * M - 0.3413193965 * S,\n -0.0041960863 * L - 0.7034186147 * M + 1.707614701 * S,\n ];\n}\n\nconst inGamut = (rgb: number[]) =>\n rgb.every((v) => v >= -1e-4 && v <= 1 + 1e-4);\n\n/**\n * Resolves to in-gamut linear sRGB, reducing chroma if needed.\n *\n * Chroma is the right axis to give up: lowering it desaturates, while clipping\n * channels shifts hue — a clipped vivid blue turns purple.\n */\nfunction resolve(color: Oklch): [number, number, number] {\n let rgb = toLinear(color);\n if (!inGamut(rgb)) {\n let lo = 0;\n let hi = color.c;\n for (let i = 0; i < 12; i++) {\n const mid = (lo + hi) / 2;\n if (inGamut(toLinear({ ...color, c: mid }))) lo = mid;\n else hi = mid;\n }\n rgb = toLinear({ ...color, c: lo });\n }\n return rgb.map((v) => Math.min(1, Math.max(0, v))) as [\n number,\n number,\n number,\n ];\n}\n\n/**\n * WCAG relative luminance. The values coming out of `resolve` are already\n * linear-light sRGB, which is exactly what WCAG's piecewise transfer function\n * produces — so this needs no further linearization.\n */\nfunction luminance(color: Oklch): number {\n const [r, g, b] = resolve(color);\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n}\n\nexport function contrast(a: Oklch, b: Oklch): number {\n const x = luminance(a);\n const y = luminance(b);\n return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05);\n}\n\n/**\n * Pushes `fg`'s lightness away from `bg` until the pair clears `min`.\n *\n * Walks in the direction it is already leaning first, so a dark ink on a light\n * head gets darker rather than flipping to light. If that direction runs out of\n * range, it tries the other way before giving up at pure black or white.\n */\nexport function ensureContrast(fg: Oklch, bg: Oklch, min: number): Oklch {\n if (contrast(fg, bg) >= min) return fg;\n\n const lean = fg.l >= bg.l ? 1 : -1;\n for (const dir of [lean, -lean]) {\n const probe = { ...fg };\n for (let i = 0; i < 60; i++) {\n probe.l = Math.min(1, Math.max(0, probe.l + dir * 0.02));\n if (contrast(probe, bg) >= min) return probe;\n if (probe.l === 0 || probe.l === 1) break;\n }\n }\n\n // Unreachable for the authored ramps, but a palette override could get here.\n const black = { ...fg, l: 0, c: 0 };\n const white = { ...fg, l: 1, c: 0 };\n return contrast(black, bg) >= contrast(white, bg) ? black : white;\n}\n\nexport function toHex(color: Oklch): string {\n return (\n \"#\" +\n resolve(color)\n .map((v) => {\n const s =\n v <= 0.0031308 ? 12.92 * v : 1.055 * Math.pow(v, 1 / 2.4) - 0.055;\n return Math.round(s * 255)\n .toString(16)\n .padStart(2, \"0\");\n })\n .join(\"\")\n );\n}\n\n/**\n * sRGB hex → OKLCh. The inverse of `toLinear` plus `resolve`'s decode, and the\n * only way back into the color space from a palette that has already been\n * serialized.\n *\n * It exists because the tint (§ `hot` below) has to start from the colors that\n * are actually on screen, not from the ramp that produced them: `BlobatarOptions.palette`\n * lets a consumer override `head` or `eye` outright, and a hot pair derived from\n * the ramp instead would tint toward a color the blobatar never wore.\n */\nexport function fromHex(hex: string): Oklch {\n const n = parseInt(hex.slice(1), 16);\n const [r, g, b] = [(n >> 16) & 255, (n >> 8) & 255, n & 255].map((v) => {\n const s = v / 255;\n return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);\n }) as [number, number, number];\n\n const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);\n const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);\n const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);\n\n const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;\n const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;\n\n return {\n l: 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n c: Math.hypot(A, B),\n h: (Math.atan2(B, A) * 180) / Math.PI,\n };\n}\n\n/**\n * Blend two colors in OKLab — `color-mix(in oklab, a, b t)`, done here.\n *\n * Here rather than in CSS because a hot pose has to resolve to a *finished*\n * color before it reaches the stylesheet: the hot endpoint would otherwise be a\n * custom property that vanishes the instant an expression is cleared, snapping\n * the fill back to base while the rest of the pose eases out over 360ms. See\n * `heatTint` in `src/expression.ts`.\n *\n * Interpolating in OKLab means lerping cartesian `a`/`b`, not the polar `c`/`h`\n * this module otherwise speaks — a hue lerp would swing a desaturated color\n * around the wheel and pick up chroma that is in neither endpoint.\n */\nexport function mix(a: Oklch, b: Oklch, t: number): Oklch {\n const rad = (v: number) => (v * Math.PI) / 180;\n const ax = a.c * Math.cos(rad(a.h));\n const ay = a.c * Math.sin(rad(a.h));\n const bx = b.c * Math.cos(rad(b.h));\n const by = b.c * Math.sin(rad(b.h));\n const x = ax + (bx - ax) * t;\n const y = ay + (by - ay) * t;\n return {\n l: a.l + (b.l - a.l) * t,\n c: Math.hypot(x, y),\n h: (Math.atan2(y, x) * 180) / Math.PI,\n };\n}\n\n/** `mix` between two serialized colors, serialized. */\nexport const mixHex = (a: string, b: string, t: number) =>\n toHex(mix(fromHex(a), fromHex(b), t));\n\n/**\n * The other blend, and it is deliberately not the one above.\n *\n * `mixHex` is where a tinting pose *lands*: `heat` picks a point on the OKLab\n * walk and the result is a finished endpoint. This is how a fill *travels*\n * between two finished colors while a pose morphs, and on the web that travel\n * is not this module's at all. It is `transition: fill`, which CSS runs in\n * sRGB, on the two hex values `--mo-head` and `--mo-eye` already hold.\n *\n * So a substrate with no transitions has to reproduce sRGB, not OKLab. Using\n * `mixHex` here instead would be the better colour space and the wrong answer:\n * it would put a React Native blobatar on a visibly different path between the\n * same two endpoints than a web one, which is the drift every other part of\n * this repo is arranged to prevent. The endpoints agree because `mixHex` sets\n * them; the path between them agrees because of this.\n *\n * Byte-level rather than through `Oklch`, since sRGB is what the channels\n * already are once parsed.\n */\nexport function fadeHex(a: string, b: string, t: number): string {\n let out = \"#\";\n for (let i = 1; i < 7; i += 2) {\n const from = parseInt(a.slice(i, i + 2), 16);\n const to = parseInt(b.slice(i, i + 2), 16);\n const v = Math.round(from + (to - from) * t);\n out += (v < 16 ? \"0\" : \"\") + v.toString(16);\n }\n return out;\n}\n\n/**\n * Where a tinting pose is heading.\n *\n * Four numbers rather than an authored colour, because the endpoint has to be\n * derived per seed — see `tinted` below. A `Tint` says *which way*, and the\n * blobatar's own palette says where that lands.\n *\n * This was three constants and a red until the roster wanted more than anger.\n * Generalising it is what makes a second tinting pose cost its numbers rather\n * than a second copy of the contrast walk — and the walk is the part that is\n * easy to get subtly wrong, so having exactly one of it is the point.\n */\nexport interface Tint {\n /** Hue the body arrives at, in degrees. Reached outright, not approached. */\n h: number;\n /** Lightness it heads toward. */\n l: number;\n /** How far of the way to `l` the body actually travels, 0–1. */\n pull: number;\n /** Chroma floor. The body never desaturates on the way. */\n c: number;\n}\n\n/**\n * Red, because every reference for anger is — and only 60% of the way there in\n * lightness, so the tone set survives the trip.\n */\nexport const HOT: Tint = { h: 27, l: 0.58, pull: 0.6, c: 0.18 };\n\n/**\n * The rest of the targets, kept here beside `HOT` rather than in `expression.ts`\n * so that the module that owns the guarantee owns the full set of endpoints it\n * has to hold for. `test/color.test.ts` iterates this list; a target added over\n * there and not here would be a tint nothing verifies.\n *\n * `pull` is the dial that keeps them apart as much as `h` is. `BLUSH` travels\n * only 0.4 of the way and lands pale — a shy blobatar that goes as red as an\n * angry one is an angry one.\n */\nexport const ROSE: Tint = { h: 358, l: 0.72, pull: 0.55, c: 0.16 };\nexport const BLUSH: Tint = { h: 12, l: 0.84, pull: 0.4, c: 0.1 };\nexport const BILE: Tint = { h: 142, l: 0.66, pull: 0.6, c: 0.13 };\n\n/** Every target the suite has to hold the contrast guarantee across. */\nexport const TINTS: [string, Tint][] = [\n [\"hot\", HOT],\n [\"rose\", ROSE],\n [\"blush\", BLUSH],\n [\"bile\", BILE],\n];\n\n/**\n * A hair over the 4.5:1 the suite asserts.\n *\n * The margin is for 8-bit quantization and nothing else: the pair is authored in\n * OKLCh, serialized to hex, and read back out of that hex by anything checking\n * it — including the browser. Rounding to a byte per channel moves the ratio in\n * the third decimal, so the floor is cleared by more than that rather than sat\n * exactly on.\n */\nconst TINT_FLOOR = 4.55;\n\n/**\n * The palette a tinting pose heads toward, given the one it is tinting from.\n *\n * Derived per seed rather than being a single authored colour, and the reason is\n * polarity: `blob` flips its eye between near-black and near-white depending on\n * the body's lightness, and no fixed red clears 4.5:1 against both.\n *\n * So the tinted body meets its target **partway** rather than landing on it.\n * Holding the body's own lightness was the first attempt and it is too quiet — a\n * pastel goes pink rather than angry, because at L 0.86 there is no red to be\n * had. Travelling the whole way is the opposite failure: every blobatar in the\n * roster converges on one red and the tone set, which is most of what makes a\n * grid look like a crowd, disappears at the exact moment the grid is loudest.\n * `pull` keeps a pale blobatar recognisably pale and an ink one recognisably\n * dark while giving both somewhere to go.\n *\n * The eye endpoint is then pushed until **every point along the mix** clears the\n * floor, not merely both ends. A straight line in OKLab between two passing\n * pairs is not itself a passing pair: the body travels further than the eye, so\n * the two lightnesses can close on each other in the middle of a transition that\n * is legible at both stops. This walks the mix and fixes the worst point.\n *\n * Tree-shaken out of any bundle that imports no tinting expression — it is\n * reached only through `tint` on the expression value, the same indirection that\n * keeps `expression.ts` itself out of the core. One walk serves every target, so\n * a bundle with three tinting poses in it carries this once.\n */\nexport function tinted(\n head: string,\n eye: string,\n t: Tint,\n): [string, string] {\n const base = fromHex(head);\n const baseEye = fromHex(eye);\n\n // Chroma is floored rather than replaced: a body that is already vivid should\n // not *lose* saturation on the way, and the pale neutral swatch has almost\n // none to keep.\n let hotHead: Oklch = {\n l: base.l + (t.l - base.l) * t.pull,\n c: Math.max(base.c, t.c),\n h: t.h,\n };\n // The body still has to be visible on a dark page at full heat, which is the\n // same floor the ramp enforces and for the same reason.\n hotHead = ensureContrast(hotHead, DARK_SURFACE, SURFACE_FLOOR);\n\n let hotEye = ensureContrast(baseEye, hotHead, TINT_FLOOR);\n\n // Walked rather than assumed, in the exact terms that ship — the hexes, mixed\n // the way `mixHex` mixes them — because \"both ends pass\" does not imply \"every\n // point passes\". It very nearly does here: holding the body's lightness makes\n // the body's luminance almost constant along the mix, which leaves contrast\n // monotone in the eye's and puts the minimum at an end. Almost, because\n // reddening moves chroma and chroma moves luminance a little. Eleven samples\n // catch that wobble; the loop normally exits on the first pass and pushes the\n // eye endpoint further from the body when it does not.\n const dir = hotEye.l >= hotHead.l ? 1 : -1;\n const headHex = toHex(hotHead);\n for (let pass = 0; pass < 40; pass++) {\n const eyeHex = toHex(hotEye);\n let worst = Infinity;\n for (let i = 0; i <= 10; i++) {\n const t = i / 10;\n worst = Math.min(\n worst,\n contrast(\n fromHex(mixHex(eye, eyeHex, t)),\n fromHex(mixHex(head, headHex, t)),\n ),\n );\n }\n if (worst >= TINT_FLOOR) return [headHex, eyeHex];\n const l = Math.min(1, Math.max(0, hotEye.l + dir * 0.02));\n if (l === hotEye.l) return [headHex, eyeHex];\n hotEye = { ...hotEye, l };\n }\n\n return [headHex, toHex(hotEye)];\n}\n\n/**\n * The tone set.\n *\n * This is the one place the seed is allowed to move lightness and chroma, not\n * just hue — a body vocabulary this varied looks monotonous in a single tone.\n * Letting the seed roam freely over L and C is what makes generated palettes\n * look generated, so instead it picks from six authored swatches: the same\n * discipline as a designer handing you a set, rather than a slider.\n *\n * Thresholds are cumulative, so pale and mid tones dominate and the near-black\n * body stays a rare find.\n */\nconst TONES: [number, { l: number; c: number }][] = [\n [0.2, { l: 0.86, c: 0.085 }], // pastel\n [0.36, { l: 0.9, c: 0.028 }], // pale neutral\n [0.62, { l: 0.73, c: 0.135 }], // mid\n [0.8, { l: 0.62, c: 0.165 }], // deep\n [0.93, { l: 0.87, c: 0.16 }], // bright\n // Dark, but not darker than a dark host surface. At l 0.17 this swatch scored\n // 1.03:1 against a near-black page and the body simply vanished, leaving two\n // floating eyes. l 0.34 still reads as the ink tone and clears both ends.\n [1.0, { l: 0.34, c: 0.035 }], // ink\n];\n\nconst toneAt = (v: number) =>\n TONES.find(([edge]) => v < edge)?.[1] ?? TONES[0]![1];\n\n/**\n * The darkest host surface a backdrop-less blob is expected to land on, and the\n * ratio it must clear against it.\n *\n * `FLOORS` can only relate colors that are in the palette, and the surface never\n * is: `blob` ships with its backdrop off, so the body sits directly on whatever\n * the page provides. Guaranteeing contrast against the palette's own light `bg`\n * says nothing about that case — which is how the ink tone came to render as a\n * near-invisible silhouette on a dark page.\n */\nconst DARK_SURFACE: Oklch = { l: 0.145, c: 0, h: 0 }; // ≈ #0a0a0b\nconst SURFACE_FLOOR = 1.5;\n\n/** The authored ramp: the seed picks a hue and a tone, and everything follows. */\nconst RAMP = (h: number, tone: number): Record => {\n const t = toneAt(tone);\n const head = ensureContrast({ l: t.l, c: t.c, h }, DARK_SURFACE, SURFACE_FLOOR);\n return {\n bg: { l: 0.965, c: 0.01, h },\n head,\n // Polarity follows the body: dark eyes on a light body, light eyes on a\n // dark one. Without this the ink tone would render an invisible face.\n eye: head.l >= 0.5 ? { l: 0.17, c: 0.02, h } : { l: 0.97, c: 0.012, h },\n };\n};\n\n/**\n * Minimum contrast ratios as [foreground, background, ratio], applied in order.\n * Later pairs resolve against already-final earlier colors, so the chain\n * converges. `4.5` on the eyes is the WCAG text floor: they are small marks\n * that have to read at 24px.\n *\n * The body/backdrop floor is deliberately weak. The backdrop is off by default,\n * and the pale swatches are meant to sit quietly on a light surface — forcing\n * 1.6:1 there would darken exactly the tones the style exists for.\n */\nconst FLOORS: [string, string, number][] = [\n [\"head\", \"bg\", 1.25],\n [\"eye\", \"head\", 4.5],\n];\n\nexport { FLOORS };\n\n/** The palette in OKLCh, before hex encoding. The test suite asserts against this. */\nexport function ramp(\n hue: number,\n enforce = true,\n tone = 0,\n): Record {\n const r = RAMP(hue, tone);\n if (enforce) {\n for (const [fg, bg, min] of FLOORS) {\n r[fg] = ensureContrast(r[fg]!, r[bg]!, min);\n }\n }\n return r;\n}\n\nexport function palette(hue: number, enforce = true, tone = 0): Palette {\n const r = ramp(hue, enforce, tone);\n const out: Palette = {};\n for (const k in r) out[k as ColorKey] = toHex(r[k]!);\n return out;\n}\n", "/**\n * The single primitive.\n *\n * |x/a|^n + |y/b|^n = 1 covers the whole part vocabulary: n=2 is an ellipse\n * (eyes, pupils), n≈4 a squircle (head, background), n→large a rectangle\n * (brows, mouth lines). One shape function, one continuous knob, so \"head\n * shape\" is a numeric trait rather than a set of hand-drawn alternatives.\n */\n\nexport interface Superellipse {\n cx: number;\n cy: number;\n rx: number;\n ry: number;\n /** Squareness. Useful range is roughly 1.6 (soft diamond) to 8 (near-rect). */\n n?: number;\n /** Degrees, clockwise. Baked into the coordinates so the SVG needs no transform. */\n rot?: number;\n}\n\nconst r2 = (v: number) => {\n const s = Math.round(v * 100) / 100;\n return Object.is(s, -0) ? \"0\" : String(s);\n};\n\n/**\n * Approximates each quadrant with one cubic Bézier.\n *\n * The control offset is chosen so the curve passes exactly through the\n * superellipse's 45° point: B(0.5) = a(4+3k)/8 must equal a·2^(-1/n).\n * At n=2 this yields 0.5523 — the standard circle constant — which is a good\n * sign the derivation is right. Four segments instead of a 24-point sampled\n * polyline keeps each shape at ~130 bytes of path data.\n */\nexport function superellipse({ cx, cy, rx, ry, n = 4, rot = 0 }: Superellipse): string {\n // Above n≈5.55 the control offset exceeds the radius, and the curve bulges\n // outside the bounding box instead of squaring off — an inflated-looking\n // corner rather than a sharper one. Clamping k trades exactness at the 45°\n // point for a shape that always stays within its stated bounds; past that\n // point a superellipse is visually a rounded rect anyway.\n const k = Math.min(1, (8 * Math.pow(2, -1 / n) - 4) / 3);\n const a = rx;\n const b = ry;\n const ak = a * k;\n const bk = b * k;\n\n // Anchor, control, control — walking the four quadrants.\n const pts: [number, number][] = [\n [a, 0],\n [a, bk], [ak, b], [0, b],\n [-ak, b], [-a, bk], [-a, 0],\n [-a, -bk], [-ak, -b], [0, -b],\n [ak, -b], [a, -bk], [a, 0],\n ];\n\n const t = (rot * Math.PI) / 180;\n const cos = Math.cos(t);\n const sin = Math.sin(t);\n const at = (i: number) => {\n const [x, y] = pts[i]!;\n return `${r2(cx + x * cos - y * sin)} ${r2(cy + x * sin + y * cos)}`;\n };\n\n let d = `M${at(0)}`;\n for (let i = 1; i < 13; i += 3) d += `C${at(i)} ${at(i + 1)} ${at(i + 2)}`;\n return d + \"Z\";\n}\n\n/**\n * A quadratic arc, stroked — used only for smiles and frowns, where a closed\n * superellipse would need a boolean subtraction to get the same read.\n */\nexport function arc(cx: number, cy: number, w: number, depth: number): string {\n return `M${r2(cx - w)} ${r2(cy)}Q${r2(cx)} ${r2(cy + depth)} ${r2(cx + w)} ${r2(cy)}`;\n}\n\n/**\n * An organic closed curve: radii sampled around a circle, joined by a closed\n * Catmull-Rom spline converted to cubic Béziers.\n *\n * The superellipse handles everything symmetric; this handles everything that\n * needs to look hand-drawn. `radii` are multipliers of the base radius, one per\n * vertex, so a seed perturbing them by ±15% produces the lopsided pebble shapes\n * without any noise function — the vertex count alone controls how lumpy it is.\n *\n * Catmull-Rom rather than a Bézier fit because it interpolates its points\n * exactly, so the radii mean what they say and containment stays predictable.\n */\nexport function blobPath(\n cx: number,\n cy: number,\n rx: number,\n ry: number,\n radii: number[],\n rot = 0,\n): string {\n const n = radii.length;\n const t0 = (rot * Math.PI) / 180;\n const p: [number, number][] = radii.map((m, i) => {\n const a = t0 + (2 * Math.PI * i) / n;\n return [cx + rx * m * Math.cos(a), cy + ry * m * Math.sin(a)];\n });\n\n const at = (i: number) => p[((i % n) + n) % n]!;\n let d = `M${r2(at(0)[0])} ${r2(at(0)[1])}`;\n\n for (let i = 0; i < n; i++) {\n const [x0, y0] = at(i - 1);\n const [x1, y1] = at(i);\n const [x2, y2] = at(i + 1);\n const [x3, y3] = at(i + 2);\n d +=\n `C${r2(x1 + (x2 - x0) / 6)} ${r2(y1 + (y2 - y0) / 6)}` +\n ` ${r2(x2 - (x3 - x1) / 6)} ${r2(y2 - (y3 - y1) / 6)}` +\n ` ${r2(x2)} ${r2(y2)}`;\n }\n\n return d + \"Z\";\n}\n\nexport interface Polygon {\n cx: number;\n cy: number;\n rx: number;\n ry: number;\n /** How many sides. 3 is a triangle, 6 a hexagon. */\n sides: number;\n /**\n * Corner rounding, 0 (sharp) to 1 (every edge cut back to its own midpoint, so\n * the outline is all curve and no straight run).\n */\n round?: number;\n /** Degrees, clockwise. 0 puts a vertex at the top. */\n rot?: number;\n}\n\n/**\n * A regular polygon with rounded corners.\n *\n * The third primitive, and it is here because neither of the other two reaches\n * a flat-sided shape. `superellipse` interpolates between an ellipse and a\n * rectangle and has no odd-sided member at all — its n knob cannot produce a\n * triangle — and `blobPath` is a Catmull-Rom spline, which passes through its\n * vertices smoothly and so rounds a corner away rather than turning it.\n *\n * Corners are cut back along both adjoining edges by `round` and joined with a\n * quadratic through the vertex itself, which puts the whole outline inside the\n * polygon's convex hull for free: a quadratic never leaves the triangle of its\n * three points. At `round: 1` the cuts meet at the edge midpoints, the straight\n * runs vanish, and what is left is a smooth n-lobed shape rather than a polygon\n * — which is the top of the useful range, not a degenerate case.\n *\n * `rx` and `ry` are the circumradius on each axis, so the shape squashes with\n * the body like everything else here rather than staying stubbornly regular.\n */\nexport function polygon({ cx, cy, rx, ry, sides, round = 0.3, rot = 0 }: Polygon): string {\n // Halved because the cut is taken from both ends of every edge: at round = 1\n // each end reaches the midpoint and they meet exactly, so anything above that\n // would have the two cuts cross and the outline fold back on itself.\n const k = round > 0 ? (round < 1 ? round / 2 : 0.5) : 0;\n // −90° so a vertex sits at the top: a triangle points up and rests on a flat\n // edge, which is the orientation anybody who asks for a triangle means.\n const t0 = (rot * Math.PI) / 180 - Math.PI / 2;\n const v: [number, number][] = Array.from({ length: sides }, (_, i) => {\n const a = t0 + (2 * Math.PI * i) / sides;\n return [cx + rx * Math.cos(a), cy + ry * Math.sin(a)];\n });\n\n const at = (i: number) => v[((i % sides) + sides) % sides]!;\n /** The cut point on the edge leaving vertex `i` toward vertex `j`. */\n const cut = (i: number, j: number) => {\n const [x0, y0] = at(i);\n const [x1, y1] = at(j);\n return `${r2(x0 + (x1 - x0) * k)} ${r2(y0 + (y1 - y0) * k)}`;\n };\n\n let d = `M${cut(0, -1)}`;\n for (let i = 0; i < sides; i++) {\n const [x, y] = at(i);\n d += `Q${r2(x)} ${r2(y)} ${cut(i, i + 1)}`;\n // The straight run to the next corner's cut. Omitted when the cuts meet, so\n // a fully rounded polygon does not emit `sides` zero-length lines.\n if (k < 0.5) d += `L${cut(i + 1, i)}`;\n }\n return d + \"Z\";\n}\n\n/**\n * The straight run of a capsule, as a plain box.\n *\n * Drawn with the two cap circles the capsule already decorates with, the union\n * is an exact stadium: the box reaches full height everywhere, so each cap\n * meets it along its own diameter and there is no crease. A superellipse cannot\n * stand in — its corners round by a fraction of the whole radius, so it pinches\n * away from the caps and the join shows.\n */\nexport function box(cx: number, cy: number, rx: number, ry: number): string {\n const l = r2(cx - rx);\n const r = r2(cx + rx);\n return `M${l} ${r2(cy - ry)}H${r}V${r2(cy + ry)}H${l}Z`;\n}\n\n/**\n * The taper of a droplet: the two tangents from an apex to the body ellipse.\n *\n * Drawn with that ellipse, the union is a teardrop. A tangent meets the curve\n * without a corner, so the taper grows out of the head at every `tip` rather\n * than being stuck on — which is the whole reason this takes the body's radii\n * instead of drawing a cone of its own. `tip` is how far the apex sits above\n * the centre in units of `ry`, and so also how far down the sides the flanks\n * take hold: a taller apex has its tangent points further round.\n *\n * The point is eased with a quadratic through the apex, so the drawn tip stops\n * just short of it — no needle at small sizes, and `tip` bounds the silhouette\n * rather than touching it.\n */\nexport function taper(cx: number, cy: number, rx: number, ry: number, tip: number): string {\n // In the circle the ellipse is an affine image of, the tangent points sit at\n // angle acos(1/tip) from the apex direction. Affine maps preserve tangency,\n // so scaling those two points by rx and ry is exact, not an approximation.\n const t = Math.max(1.05, tip);\n const tx = rx * Math.sqrt(1 - 1 / (t * t));\n const ty = cy - ry / t;\n const apex = cy - t * ry;\n // How far up each flank the eased point takes over. Small, so the flanks stay\n // straight enough to read as a taper.\n const px = tx * 0.14;\n const py = ty + 0.86 * (apex - ty);\n return (\n `M${r2(cx - tx)} ${r2(ty)}` +\n `L${r2(cx - px)} ${r2(py)}` +\n `Q${r2(cx)} ${r2(apex)} ${r2(cx + px)} ${r2(py)}` +\n `L${r2(cx + tx)} ${r2(ty)}Z`\n );\n}\n", "/**\n * Seed hashing.\n *\n * Two guarantees this file exists to provide:\n *\n * 1. Avalanche — \"alain\" and \"alaim\" must produce visually unrelated blobatars.\n * Plain FNV-1a does not give you this; the murmur3 finalizer does.\n * 2. Streaming — the seed is hashed once, then each trait key continues from\n * that state. Trait values are therefore independent of one another, so\n * adding a trait in a later version cannot disturb existing blobatars.\n */\n\nconst SEP = 0xff;\n\n/** Mixes bytes into a 32-bit state. */\nfunction feed(h: number, bytes: Uint8Array): number {\n for (let i = 0; i < bytes.length; i++) {\n h = Math.imul(h ^ bytes[i]!, 3432918353);\n h = (h << 13) | (h >>> 19);\n }\n return h;\n}\n\n/** murmur3 fmix32 — a bijection on uint32 with full avalanche. */\nfunction finalize(h: number): number {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^ (h >>> 16)) >>> 0;\n}\n\nconst utf8 = new TextEncoder();\n\n/**\n * Normalizes a seed so that inputs a human considers equal hash equally.\n *\n * NFC first, so precomposed \"é\" and decomposed \"é\" agree; then trim, then\n * lowercase. Without this, `Alain@x.com` and `alain@x.com` produce different\n * blobatars for the same person — which gets reported as a bug, every time.\n */\nexport function normalizeSeed(seed: string): string {\n return seed.normalize(\"NFC\").trim().toLowerCase();\n}\n\n/**\n * Hashes the seed once into a reusable state. Non-ASCII seeds are encoded to\n * UTF-8 bytes first, so hashing is over codepoints rather than UTF-16 units\n * (surrogate pairs would otherwise hash inconsistently across engines).\n */\nexport function seedState(seed: string, normalize = true): number {\n const s = normalize ? normalizeSeed(seed) : seed;\n return feed(1779033703 ^ s.length, utf8.encode(s));\n}\n\n/** Derives one uniform float in [0, 1) for `key`, independent of every other key. */\nexport function stream(state: number, key: string): number {\n return finalize(feed(feed(state, Uint8Array.of(SEP)), utf8.encode(key))) / 4294967296;\n}\n", "import { seedState, stream } from \"./hash\";\n\n/**\n * A trait reader. Every value is addressed by a string key rather than drawn\n * from a sequential stream, so trait keys are an append-only namespace:\n * introducing `t.num(\"freckles.size\", ...)` in a later version leaves every\n * other trait — and therefore every existing blobatar — untouched.\n *\n * The one thing that is NOT free to change is the contents of a `pick` array,\n * since option index is part of the mapping. Those are frozen per major.\n */\nexport interface Traits {\n /** Uniform float in [0, 1). */\n (key: string): number;\n /** Uniform float in [min, max). */\n num(key: string, min: number, max: number): number;\n /** Uniform integer in [min, max]. */\n int(key: string, min: number, max: number): number;\n /** Uniform choice. Appending to `options` remaps existing seeds — frozen per major. */\n pick(key: string, options: readonly T[]): T;\n /** True with probability `p`. */\n bool(key: string, p?: number): boolean;\n /** Symmetric jitter in [-amount, amount). */\n jitter(key: string, amount: number): number;\n}\n\n/**\n * Fixed values for individual traits, keyed exactly as the layout reads them —\n * `{ \"eye.gap\": 0.82 }`.\n *\n * Every value is the position in [0, 1) that the hash would otherwise have\n * produced, which is what makes this a complete configuration surface rather\n * than a set of escape hatches: the ranges, the derived clamps and the\n * categorical thresholds all live in the layout, so an override is read in the\n * same units, in the same place, under the same guarantees as a hashed value.\n * There is nothing a seed can express that an override cannot, and nothing an\n * override can express that a seed could not have.\n *\n * The corollary is that this is the *only* configuration seam. The layout\n * function itself stays private: its return shape, its containment arithmetic\n * and its per-shape decoration would all become public API, and a caller who\n * replaced it would be one arithmetic slip away from eyes outside the body.\n * Overriding the input keeps every invariant in `styles/blob.ts` running.\n *\n * Sparse by design. Keys you omit still come from the seed, so\n * `{ shape: 0.95 }` means \"always a sun, everything else per seed\".\n *\n * An **array** is the third position between those two: `{ shape: [0.11, 0.965] }`\n * means \"round or sun, whichever this name comes out as\". A fixed value narrows\n * a key to one outcome and an omitted key leaves it at all of them; a list\n * narrows it to the ones you name and lets the seed choose among those. That is\n * the case a single number cannot state — \"any of these\" is not a position —\n * and it is the shape of most real requests for one, since a house style is\n * usually a handful of silhouettes rather than exactly one.\n *\n * The choice rides on the key's own hash, so it is per seed, stable, uniform\n * over what is listed, and independent of every other trait — the same\n * guarantees an unconfigured value has, because it *is* the unconfigured value,\n * read against a shorter list. An empty array selects nothing and is therefore\n * the same as omitting the key.\n *\n * Trait keys are an append-only namespace (see `Traits` above), so an override\n * map keeps meaning what it meant. The numeric *ranges* those keys are read\n * into are what a stated position is relative to, which makes them part of the\n * same frozen-per-major contract as a `pick` array's contents — retuning\n * `t.num(\"eye.gap\", 0.1, 0.24)` moves every blobatar, seeded or configured.\n */\nexport type TraitOverrides = Record;\n\n/**\n * Overrides are clamped rather than trusted.\n *\n * `t.pick` and `t.int` index and floor, so a value of exactly 1 selects one\n * past the end of a `pick` array and one past `max` — `undefined` options and\n * out-of-range counts, from an input that looks entirely reasonable to whoever\n * typed it. NaN falls to 0 through the same comparison, so a bad parse renders\n * a blobatar instead of a stack of `NaN`s in the path data.\n */\nexport function traits(\n seed: string,\n normalize = true,\n overrides?: TraitOverrides,\n): Traits {\n const state = seedState(seed, normalize);\n // Checked per read rather than merged up front: the map is usually absent and\n // usually tiny when present, and a lookup miss costs less than materializing\n // 30-odd hashed values a layout may never ask for.\n const t = ((key: string) => {\n const v = overrides?.[key];\n // A list is \"any of these\", and the key's own hash is what picks from it —\n // the same number that would have been the value, spent on the index\n // instead. So a narrowed key keeps every property the open one had: per\n // seed, stable, independent of every other trait.\n //\n // An empty list indexes to `undefined` and falls through to the hash below,\n // which is deliberate rather than incidental: \"nothing selected\" and \"not\n // configured\" are the same request, and a picker with everything\n // deselected should not have to special-case itself into omitting the key.\n const o = Array.isArray(v) ? v[Math.floor(stream(state, key) * v.length)] : v;\n // Not `??` on the whole expression: an override of 0 is a legitimate value\n // — it is the bottom of every range — and must not fall through to the hash.\n // The clamp is inlined rather than named because a helper survives\n // minification as a binding, and this is the one branch every trait read in\n // the library goes through. It runs over a list's chosen element too, so a\n // bad number is clamped wherever it was written.\n return o === undefined ? stream(state, key) : o > 0 ? (o < 1 ? o : 0.999999) : 0;\n }) as Traits;\n\n t.num = (key, min, max) => min + t(key) * (max - min);\n t.int = (key, min, max) => min + Math.floor(t(key) * (max - min + 1));\n t.pick = (key, options) => options[Math.floor(t(key) * options.length)]!;\n t.bool = (key, p = 0.5) => t(key) < p;\n t.jitter = (key, amount) => (t(key) * 2 - 1) * amount;\n\n return t;\n}\n", "import type { Animate } from \"./animate\";\nimport { palette as buildPalette, type Palette } from \"./color\";\nimport type { Expression, Posable } from \"./expression\";\nimport { superellipse } from \"./shape\";\nimport { traits, type TraitOverrides, type Traits } from \"./traits\";\n\nexport interface BlobatarOptions {\n /** Emits width/height attributes. Omit to let CSS size it (the viewBox always scales). */\n size?: number;\n /** Overrides the default backdrop. `false` renders transparent. */\n background?: boolean | \"square\" | \"circle\" | \"squircle\";\n /** Overrides specific palette entries. Overridden colors bypass the contrast guarantee. */\n palette?: Palette;\n /** Locks the hue in degrees, so the name drives shape only. */\n hue?: number;\n /**\n * Locks the tone as a 0–1 position in the swatch set, pale to ink.\n *\n * The swatches are banded with half-open edges, so an exact `1` sits on the\n * top edge rather than under it and falls back to the first swatch: `1`\n * renders what `0` renders. Reach for ink with `0.999`.\n */\n tone?: number;\n /**\n * Pins individual traits, so the name drives only what you leave out.\n *\n * Each value is the 0–1 position the hash would have produced for that key —\n * the same units the layout reads, so `{ \"eye.gap\": 1 }` is the top of\n * whatever range `eye.gap` is declared over rather than a measurement in\n * viewBox units. Values outside [0, 1) are clamped.\n *\n * ```ts\n * // Always a sun, always wide eyes — colour and everything else per name.\n * blobatar(user.email, { traits: { shape: 0.95, \"eye.ratio\": 0 } })\n * ```\n *\n * Pin every trait and the name stops mattering, which is how you build one\n * fixed blobatar: pass any constant string alongside a full map.\n *\n * The layout still runs in full, so the containment guarantees hold under any\n * combination — an eye cluster that would not fit is scaled down by `fit`\n * exactly as a hashed one is. That also means an extreme value can land short\n * of where you asked; `_layout` reports what it resolved to.\n *\n * Overlaps with `hue` and `tone`, which state the same two traits in friendlier\n * units. Those win: `hue` is degrees, `traits.hue` is a 0–1 position.\n */\n traits?: TraitOverrides;\n /** Applies NFC + trim + lowercase to the name. Default true. */\n normalize?: boolean;\n /** Enforces the minimum contrast ratios. Default true. */\n contrast?: boolean;\n /** Adds a for screen readers. */\n title?: string;\n /**\n * Idle animation. Off by default.\n *\n * Requires `import \"blobatar/motion.css\"`, and requires the blobatar to be\n * inline SVG — content inside an `<img>` is an isolated document that hover\n * cannot reach. `@blobatar/react` and `@blobatar/vue` switch rendering mode\n * for you; the string API is already inline.\n *\n * **Honored by the framework adapters (`@blobatar/react`, `@blobatar/vue`)\n * only.** `blobatar()` returns static markup regardless: a branch on\n * `animate` inside it keeps the motion module alive for every caller,\n * animating or not, which measured at ~190 B. An animated string API wants\n * its own entry point, not a branch here.\n */\n animate?: Animate;\n /**\n * Which pose the blobatar holds. Import one from `blobatar/expression`.\n *\n * ```ts\n * import { happy } from \"blobatar/expression\";\n * blobatar(name, { expression: happy });\n * ```\n *\n * Passed as a value rather than named as a string so that the expressions you\n * do not import cost nothing — and so that the core carries no pose code at\n * all. Omitting it is `idle`; `idle` is also exported, for when writing it\n * reads better than `undefined`.\n *\n * Set by you and held until you change it — nothing here returns to idle on\n * its own, and there are no timers. A burst is `setExpression(happy)` followed\n * by your own `setTimeout`, which is four lines in your code and zero bytes in\n * this bundle.\n *\n * Independent of `animate` in both directions. Without `animate` the blobatar\n * renders the pose statically, which is what makes this work in the string API\n * and under `prefers-reduced-motion`; **the morph between poses requires\n * `animate`**, because that is what puts the blobatar in inline SVG where CSS\n * can reach it. Setting `expression` never turns `animate` on for you: that\n * would silently flip a 400-blobatar grid from 400 `<img>`s to 400 SVG trees.\n *\n * `idle` emits byte-identical markup to omitting the option.\n */\n expression?: Expression;\n}\n\nexport interface Style<L> {\n layout(t: Traits): L;\n /**\n * `mo` is set when animating, absent otherwise. It is a flag rather than the\n * root class it used to be: the root `<g>` is the caller's now, because a\n * class inside this string is a class inside `dangerouslySetInnerHTML`. See\n * `makeParts`.\n */\n render(l: L, p: Palette, mo?: boolean): string;\n background: boolean | \"square\" | \"circle\" | \"squircle\";\n}\n\n/**\n * Applies a static pose, if an expression was asked for.\n *\n * The animated path deliberately does not come through here: there, the pose is\n * eight custom properties and the CSS composes it, so baking it into geometry as\n * well would apply it twice.\n */\nexport function posed<L>(l: L, opts: BlobatarOptions, animate?: unknown) {\n const e = opts.expression;\n if (animate || !e) return { l, wrap: \"\" };\n return e.bake(l as L & Posable, e.p);\n}\n\n/**\n * Applies a pose's tint, if it has one.\n *\n * Called on the static path only, for the mirror-image of the reason `posed`\n * skips the animated one: when animating, the fills have to stay off the markup\n * entirely — `parts.inner` may not vary with the expression — so the tinted\n * colors go out as `--mo-head`/`--mo-eye` in `vars` instead and the stylesheet\n * puts them on. Same two colors, resolved once, serialized into whichever half\n * of the split can carry them.\n */\nexport const tinted = (p: Palette, e?: Expression) => (e?.tint ? e.tint(p, e.p) : p);\n\n/** Wraps the body in the pose transform, when there is one. */\nconst wrap = (body: string, t: string) =>\n t ? `<g transform=\"${t}\">${body}</g>` : body;\n\nconst escape = (s: string) =>\n s.replace(/[&<>]/g, (c) =>\n c === \"&\" ? \"&\" : c === \"<\" ? \"<\" : \">\",\n );\n\nexport function resolve(seed: string, opts: BlobatarOptions) {\n const t = traits(seed, opts.normalize ?? true, opts.traits);\n return {\n t,\n palette: {\n ...buildPalette(\n opts.hue ?? t.num(\"hue\", 0, 360),\n opts.contrast ?? true,\n opts.tone ?? t(\"tone\"),\n ),\n ...opts.palette,\n } as Palette,\n };\n}\n\n/** Screen-reader label, if one was asked for. */\nconst label = (opts: BlobatarOptions) =>\n opts.title ? `<title>${escape(opts.title)}` : \"\";\n\n/** The plate behind the figure, as geometry rather than as markup. */\nexport interface Backdrop {\n d: string;\n fill: string;\n}\n\n/**\n * The backdrop is the style's concern to default, not the renderer's.\n *\n * Returns the path rather than a serialized `` because the framework\n * adapters (React, Vue) have to draw it as a real element: it sits *outside*\n * the motion root, so it cannot ride along in the innerHTML string that the\n * root `` now owns.\n */\nexport function backdrop(\n style: Style,\n opts: BlobatarOptions,\n p: Palette,\n): Backdrop | undefined {\n const bg = opts.background ?? style.background;\n if (bg === false) return undefined;\n return {\n d:\n bg === \"square\"\n ? \"M0 0H100V100H0Z\"\n : superellipse({\n cx: 50,\n cy: 50,\n rx: 50,\n ry: 50,\n n: bg === \"circle\" ? 2 : 6,\n }),\n // `Palette` is partial because each style fills only the slots it needs,\n // but every ramp in `color.ts` fills `bg` — and a backdrop with no colour\n // is not a thing this can be asked to draw.\n fill: p.bg!,\n };\n}\n\nconst plate = (b?: Backdrop) => (b ? `` : \"\");\n\n/**\n * What a motion factory hands back: the root class, and the seeded timing to\n * put on the outer element.\n *\n * Passed *in* rather than imported, so `src/animate.ts` never enters a bundle\n * that does not animate. That indirection is the entire reason the static path\n * still costs what it did before the motion layer existed — a plain\n * `if (opts.animate)` here would pull the motion module into every consumer,\n * animating or not.\n */\nexport interface Motion {\n cls: string;\n vars: Record;\n}\n\n/**\n * The palette is handed to the factory because a tinting expression needs it:\n * the hot pair it mixes toward is derived from the colors the blobatar is actually\n * wearing, overrides included. It arrives as an argument rather than being\n * looked up so that `src/color.ts`'s `tinted()` stays reachable only from an\n * expression value — the same indirection that keeps `animate.ts` out of static\n * bundles.\n */\nexport type MotionFactory = (t: Traits, p: Palette) => Motion;\n\n/** Binds one package major's frozen style into `blobatar(name, opts)`. */\nexport function makeBlobatar(style: Style) {\n return (name: string, opts: BlobatarOptions = {}): string => {\n const { t, palette } = resolve(name, opts);\n const p = tinted(palette, opts.expression);\n const dim = opts.size ? ` width=\"${opts.size}\" height=\"${opts.size}\"` : \"\";\n const pose = posed(style.layout(t), opts);\n // The pose wraps the figure but not the backdrop, for the same reason the\n // motion groups sit inside `style.render` — a plate that scales and leans\n // with the creature stops being a plate.\n const body =\n label(opts) +\n plate(backdrop(style, opts, p)) +\n wrap(style.render(pose.l, p), pose.wrap);\n return `${body}`;\n };\n}\n\n/**\n * The blobatar in the pieces a renderer that owns the outer element needs.\n *\n * Split out from `makeBlobatar` because the framework adapters (React, Vue)\n * have to own the `` when animating — they need real element props on it\n * — and recovering the inner markup by regex-stripping a serialized `` is\n * the kind of thing that works until someone passes a `title` containing a `>`.\n *\n * The split runs one level deeper than that, and this is the load-bearing part:\n * **nothing that varies with `expression` may appear in `inner`.** `inner` is\n * handed to `dangerouslySetInnerHTML`/`innerHTML`, so a single byte of drift\n * makes the adapter replace the whole subtree — and a brand-new element has no\n * previous computed value, which is precisely the rule that stops transitions\n * running on first style resolution. The morph would not be slow or wrong; it\n * would not exist, and every idle animation underneath would restart from\n * phase zero on top of it. So the root class lives in `cls` and the pose lives\n * in `vars`, both of which land on real attributes that the adapter can diff\n * in place, and the backdrop comes back as geometry because it belongs outside\n * the root `` — a plate that hover-lifts with the creature stops being a\n * plate.\n *\n * `test/expression.test.ts` pins the invariant directly.\n */\nexport function makeParts(style: Style) {\n return (\n name: string,\n opts: BlobatarOptions = {},\n motion?: MotionFactory,\n ) => {\n const { t, palette: p } = resolve(name, opts);\n const mo = motion?.(t, p);\n const pose = posed(style.layout(t), opts, mo);\n\n return {\n /** Goes on the root ``, which the caller renders. */\n cls: mo?.cls,\n bg: backdrop(style, opts, p),\n /** Everything below the root ``. Free of both of the above. */\n inner: wrap(style.render(pose.l, p, !!mo), pose.wrap),\n vars: mo?.vars,\n };\n };\n}\n", "/**\n * A Blobatar style composed from silhouette definitions.\n *\n * The band table chooses and weights silhouettes. Each silhouette owns its\n * geometry and safe face region; this module owns the shared body, eyes and SVG\n * serialization. The seam is private, so it can deepen when a future shape\n * proves the current definition insufficient without committing consumers to\n * its lifecycle.\n */\nimport type { Palette } from \"../color\";\nimport { superellipse } from \"../shape\";\nimport type { Traits } from \"../traits\";\nimport type { Body, Deco, Ellipse, Shape } from \"./shapes\";\n\nexport interface Eye {\n cx: number; cy: number; rx: number; ry: number; n: number; rot: number;\n}\n\nexport type Fit = (t: Traits, b: Body, face: Ellipse) => Eye[];\n\n/** Fits the eye cluster against the silhouette's face region on both axes. */\nexport const faceFit: Fit = (t, b, face) => {\n const rx = b.rx;\n const er0 = t.num(\"eye.rx\", 0.075, 0.105) * rx;\n const ratio = t.num(\"eye.ratio\", 1.9, 3.2);\n const scale = t.num(\"eye.scale\", 0.78, 1.24);\n const stretch = t.num(\"eye.stretch\", 0.85, 1.18);\n const clearance = t.num(\"eye.gap\", 0.1, 0.24) * rx;\n const wide = er0 * Math.max(1, scale);\n const tall = er0 * ratio * Math.max(1, scale * stretch);\n const gap0 = wide + rx * 0.03 + clearance;\n\n const gx = t.jitter(\"gaze.x\", 0.09) * face.rx;\n const gy = t.num(\"gaze.y\", -0.2, 0.08) * face.ry;\n const dy = t.jitter(\"eye.dy\", 0.04) * face.ry;\n const reach = Math.hypot(wide, tall);\n const need = Math.hypot(\n (Math.abs(gx) + gap0 + reach) / face.rx,\n (Math.abs(gy) + Math.abs(dy) + reach) / face.ry,\n );\n const fit = need > 0.9 ? 0.9 / need : 1;\n\n const er = er0 * fit;\n const eyeRy = er * ratio;\n const gap = gap0 * fit;\n const room = Math.max(0, Math.min(1, clearance / tall));\n const bound = Math.min(12, (Math.asin(room) * 180) / Math.PI);\n const lean = t.num(\"eye.lean\", -1, 1) * bound;\n const lean2 = Math.max(-12, Math.min(12, lean + t.jitter(\"eye.lean2\", 3.5)));\n\n const cx = face.cx + gx * fit;\n const cy = face.cy + gy * fit;\n return [\n { cx: cx - gap, cy, rx: er, ry: eyeRy, n: t.num(\"eye.n\", 3.5, 6), rot: lean },\n {\n cx: cx + gap, cy: cy + dy * fit,\n rx: er * scale, ry: eyeRy * scale * stretch,\n n: t.num(\"eye.n\", 3.5, 6), rot: lean2,\n },\n ];\n};\n\n/** `[shape, upper edge of its band in [0, 1)]`, in order. */\nexport type Band = readonly [Shape, number];\n\nexport function compose(bands: Band[], fit: Fit) {\n const pick = (v: number) => (bands.find(([, upTo]) => v < upTo) ?? bands[bands.length - 1]!)[0];\n\n function layout(t: Traits) {\n const shape = pick(t(\"shape\"));\n const r = t.num(\"body.r\", 31, 38) * shape.core;\n const body: Body = {\n cx: 50 + t.jitter(\"body.x\", 1.5),\n cy: 50 + t.jitter(\"body.y\", 1.5),\n rx: r,\n ry: r * t.num(\"body.ratio\", 0.92, 1.08),\n n: t.num(\"body.n\", 1.9, 2.5),\n rot: 0,\n radii: Array.from({ length: t.int(\"body.pts\", 6, 8) }, (_, i) => 1 + t.jitter(`body.r${i}`, 0.16)),\n };\n shape.body?.(t, body);\n\n // The body itself when the shape names no face, which is what a silhouette\n // convex around its own centre wants — and it already carries the four\n // fields a face is.\n const face = shape.face?.(body) ?? body;\n const deco: Deco = { petals: [], extra: [] };\n shape.decorate?.(t, body, deco);\n\n return {\n shape: shape.name,\n draw: shape.path,\n body, face,\n petals: deco.petals,\n extra: deco.extra,\n eyes: fit(t, body, face),\n };\n }\n\n function render(l: ReturnType, p: Palette, mo?: boolean): string {\n const r2 = (v: number) => Math.round(v * 100) / 100;\n const eye = (e: Eye, i: number) => {\n const path = ``;\n return mo\n ? `${path}`\n : path;\n };\n const body =\n `` +\n l.petals.map(d => ``).join(\"\") +\n l.extra.map(d => ``).join(\"\") +\n `` +\n `` +\n `` +\n l.eyes.map(eye).join(\"\") +\n ``;\n return mo ? `${body}` : body;\n }\n\n return { layout, render, background: false as const };\n}\n\n/**\n * One drawn primitive, as data rather than as markup.\n *\n * This is the other half of `render`, and it exists because `react-native-svg`\n * has no `innerHTML` to hand a string to, so an adapter there builds real\n * elements or it builds nothing. Serializing here and parsing there would put\n * an XML parser between the renderer and the screen, which is a place output\n * can change, and ADR-0009 is explicit that an adapter adds no geometry of its\n * own.\n *\n * The fill rides on every mark rather than on a group. `render` groups by fill\n * because SVG attribute inheritance makes that cheaper on the wire; nothing\n * downstream of this reads a group, so grouping here would only be structure\n * the adapter has to walk back out.\n */\nexport type Mark =\n | { kind: \"path\"; d: string; fill: string }\n | { kind: \"circle\"; cx: number; cy: number; r: number; fill: string };\n\n/**\n * The same figure `render` draws, as marks.\n *\n * **A standalone function, deliberately not a method on the object `compose`\n * returns.** A property of a live object literal can never be dropped by a\n * bundler, so putting it there would charge every web consumer for a seam only\n * React Native reads. That is the same reasoning that keeps `animate.ts` out of static\n * bundles by passing the motion factory in rather than importing it.\n *\n * Kept beside `render` rather than derived from it, or it from this. Both\n * directions were available and both tax the static path everyone is already\n * on: an emitter puts an indirection in it, and making marks primary makes it\n * allocate an array of objects before stringifying. So there are two small\n * traversals of one layout, and the drift that invites is *caught* rather than\n * prevented: `test/marks.test.ts` asserts these serialize to exactly what\n * `render` emits, over the golden corpus, and `packages/harness` compares the\n * React Native adapter against React on every case in its table.\n *\n * No `mo` parameter. React Native never animates (the motion layer is CSS), so\n * there is no motion grouping to emit and no class to carry.\n */\nexport function marks(l: Layout, p: Palette): Mark[] {\n const r2 = (v: number) => Math.round(v * 100) / 100;\n const head = p.head!;\n return [\n ...l.petals.map((d): Mark => ({ kind: \"circle\", cx: r2(d.cx), cy: r2(d.cy), r: r2(d.r), fill: head })),\n ...l.extra.map((d): Mark => ({ kind: \"path\", d, fill: head })),\n { kind: \"path\", d: l.draw ? l.draw(l.body) : superellipse(l.body), fill: head },\n ...l.eyes.map((e): Mark => ({ kind: \"path\", d: superellipse(e), fill: p.eye! })),\n ];\n}\n\n/**\n * What a composed `layout` returns.\n *\n * `shape` is a `string` here rather than a union of names, because which names\n * are possible is a property of the band table and not of the composer. The\n * public `blob` entry narrows this to the package major's known vocabulary.\n */\nexport type Layout = ReturnType[\"layout\"]>;\n", "/**\n * The private silhouette vocabulary.\n *\n * A shape is everything the layout needs to draw one silhouette and nothing\n * about when to draw it: how much of the frame its core body takes, how it\n * patches that body, what room it leaves the eyes, what it decorates with, and\n * which path primitive traces it. What it deliberately does *not* carry is its\n * threshold — how often it comes up is a property of the package major's band\n * table, not of the silhouette itself. See `blob.ts`.\n *\n * Shapes that are parameterizations of another share its implementation rather\n * than restating it: `boxy` is `round` with a squarer `n` and a tilt, `hexagon`\n * is `triangle` with six sides, `cloud` is `organic` with lobes. They share it\n * by naming the same function (`path: spline`), never by spreading the parent\n * value — `{ ...round, core: 0.86 }` reads better and defeats tree-shaking\n * completely, measured at ~920 B for a single shape. See ADR-0007.\n *\n * These are Blobatar 2's ten silhouettes. `test/geometry.test.ts` asserts the\n * eye cluster stays inside the body and the body inside the frame for all of\n * them.\n */\nimport { blobPath, box, polygon, taper } from \"../shape\";\nimport type { Traits } from \"../traits\";\n\nexport interface Body {\n cx: number; cy: number; rx: number; ry: number;\n n: number; rot: number; radii: number[];\n /** Polygon-only, set by the shapes that draw one. */\n sides?: number; round?: number;\n}\nexport interface Ellipse { cx: number; cy: number; rx: number; ry: number }\nexport interface Deco {\n petals: { cx: number; cy: number; r: number }[];\n /** Extra outlines unioned with the core body, already traced. */\n extra: string[];\n}\n\nexport interface Shape {\n name: string;\n /** How much of the frame the core body takes. */\n core: number;\n /** Patches the body before the face is measured. */\n body?(t: Traits, b: Body): void;\n /**\n * The region the eyes must fit inside. Omitted, it is the body itself —\n * which is what every silhouette that is convex around its own centre wants,\n * and half the roster is.\n */\n face?(b: Body): Ellipse;\n decorate?(t: Traits, b: Body, out: Deco): void;\n /**\n * The core path. Omitted, `superellipse` — free to default to, because the\n * eyes are superellipses too, so it is in every bundle already.\n */\n path?(b: Body): string;\n}\n\n// ---------------------------------------------------------------------------\n// The shared implementations. Five path calls serve all ten shapes.\n\nconst poly = (b: Body) => polygon(b as Body & { sides: number; round: number });\nconst spline = (b: Body) => blobPath(b.cx, b.cy, b.rx, b.ry, b.radii, b.rot);\n\nconst shrunk = (k: number) => (b: Body): Ellipse => ({\n cx: b.cx, cy: b.cy, rx: b.rx * k, ry: b.ry * k,\n});\nconst splineFace = (b: Body): Ellipse => shrunk(Math.min(...b.radii) * 0.95)(b);\nconst polyFace = (b: Body): Ellipse => shrunk(0.84)(b);\n\n// ---------------------------------------------------------------------------\n\nexport const round: Shape = { name: \"round\", core: 1 };\n\nexport const organic: Shape = {\n name: \"organic\", core: 0.98, path: spline, face: splineFace,\n};\n\n/** `round`, squared off and tilted. Same path, different parameters. */\nexport const boxy: Shape = {\n name: \"boxy\", core: 0.86,\n body: (t, b) => {\n b.n = t.num(\"body.n\", 3.4, 6);\n b.rot = t.num(\"body.rot\", -20, 20);\n },\n};\n\nexport const capsule: Shape = {\n name: \"capsule\", core: 1.02,\n body: (t, b) => { b.ry *= t.num(\"capsule.squat\", 0.55, 0.68); },\n face: shrunk(0.94),\n decorate: (_t, b, out) => {\n for (const s of [-1, 1]) out.petals.push({ cx: b.cx + s * (b.rx - b.ry), cy: b.cy, r: b.ry });\n },\n path: b => box(b.cx, b.cy, b.rx - b.ry, b.ry),\n};\n\nexport const nub: Shape = {\n name: \"nub\", core: 0.88,\n decorate: (t, b, out) => {\n const count = t.int(\"nub.n\", 1, 2);\n for (let i = 0; i < count; i++) {\n const a = t.num(`nub.a${i}`, 0, 2 * Math.PI);\n out.petals.push({\n cx: b.cx + Math.cos(a) * b.rx * 0.88,\n cy: b.cy + Math.sin(a) * b.rx * 0.88,\n r: b.rx * t.num(`nub.r${i}`, 0.24, 0.4),\n });\n }\n },\n};\n\n/** `organic`, with lobes on the upper half. */\nexport const cloud: Shape = {\n name: \"cloud\", core: 0.78, face: splineFace, path: spline,\n decorate: (t, b, out) => {\n const count = t.int(\"cloud.n\", 4, 6);\n for (let i = 0; i < count; i++) {\n const a = Math.PI + (Math.PI * (i + 0.5)) / count;\n out.petals.push({\n cx: b.cx + Math.cos(a) * b.rx * 0.8,\n cy: b.cy + Math.sin(a) * b.rx * 0.5,\n r: b.rx * t.num(`cloud.r${i}`, 0.44, 0.62),\n });\n }\n },\n};\n\nexport const droplet: Shape = {\n name: \"droplet\", core: 0.78,\n // Shifted down by what the taper adds above, so the whole silhouette — head\n // and point together — sits centred in the frame rather than the head alone.\n // `n` is pinned to a true ellipse, which is the curve the taper is tangent to.\n body: (_t, b) => { b.cy += 0.22 * b.ry; b.n = 2; },\n face: b => ({ cx: b.cx, cy: b.cy + b.ry * 0.05, rx: b.rx * 0.88, ry: b.ry * 0.88 }),\n decorate: (t, b, out) => {\n out.extra.push(taper(b.cx, b.cy, b.rx, b.ry, t.num(\"droplet.tip\", 1.4, 1.65)));\n },\n};\n\nexport const hexagon: Shape = {\n name: \"hexagon\", core: 1.05, path: poly, face: polyFace,\n body: (t, b) => {\n b.sides = 6;\n b.rot = t.num(\"body.rot\", -12, 12);\n b.round = t.num(\"poly.round\", 0.24, 0.5);\n },\n};\n\nexport const sun: Shape = {\n name: \"sun\", core: 0.7,\n decorate: (t, b, out) => {\n const count = t.int(\"sun.n\", 6, 9);\n const dist = b.rx * t.num(\"sun.dist\", 1.0, 1.08);\n const pr = b.rx * t.num(\"sun.r\", 0.2, 0.26);\n const off = t.num(\"sun.rot\", 0, 2 * Math.PI);\n for (let i = 0; i < count; i++) {\n const a = off + (2 * Math.PI * i) / count;\n out.petals.push({ cx: b.cx + Math.cos(a) * dist, cy: b.cy + Math.sin(a) * dist, r: pr });\n }\n },\n};\n\n/** `hexagon` with three sides, and a tighter tilt so it rests on its base. */\nexport const triangle: Shape = {\n name: \"triangle\", core: 1.15, path: poly,\n body: (t, b) => {\n b.sides = 3;\n b.rot = t.num(\"body.rot\", -5, 5);\n b.round = t.num(\"poly.round\", 0.24, 0.5);\n },\n face: b => ({ cx: b.cx, cy: b.cy + b.ry * 0.1, rx: b.rx * 0.54, ry: b.ry * 0.36 }),\n};\n", "import { compose, faceFit, type Band } from \"./compose\";\nimport {\n boxy, capsule, cloud, droplet, hexagon, nub, organic, round, sun, triangle,\n} from \"./shapes\";\n\n/**\n * The ten-shape vocabulary introduced by Blobatar 2.\n *\n * Weighted rather than uniform: round and organic are the everyday shapes,\n * while the louder silhouettes stay finds. These bands, the layout ranges in\n * `compose.ts`, and the tone set together form gen2's frozen seed→look mapping.\n */\nconst BANDS: Band[] = [\n [round, 0.22], [organic, 0.48], [boxy, 0.6], [capsule, 0.7], [nub, 0.79],\n [cloud, 0.86], [droplet, 0.915], [hexagon, 0.95], [sun, 0.98], [triangle, 1],\n];\n\nexport const style = compose(BANDS, faceFit);\n", "import { motionVars, rootClass, type Animate } from \"./animate\";\nimport type { Palette } from \"./color\";\nimport type { Expression } from \"./expression\";\nimport {\n backdrop, makeBlobatar, makeParts, posed, resolve, tinted,\n type BlobatarOptions,\n} from \"./render\";\nimport { style } from \"./styles/blob\";\nimport { marks, type Layout, type Mark } from \"./styles/compose\";\nimport type { Traits } from \"./traits\";\n\nexport type { BlobatarOptions, Animate, Expression, Mark };\n\n/**\n * Renders a deterministic blobatar as SVG markup.\n *\n * The same name always produces the same output within a major version. The\n * numeric ranges in `styles/compose.ts`, the bands in `styles/blob.ts`, and the\n * tone set are all part of that contract. Changing them requires a new major.\n */\nexport const blobatar = makeBlobatar(style);\n\n/**\n * Only constructed when someone actually animates, so it tree-shakes away.\n *\n * The pose rides along here rather than in `makeParts` because this is already\n * the seam that keeps the motion modules out of static bundles — and when\n * animating, the pose is custom properties on the same element the timing goes\n * on, not geometry. `poseVars` returns nothing at all for `\"idle\"`.\n */\nconst motion = (mode: Animate, e?: Expression) => (t: Traits, p: Palette) => {\n // `vars` is also how we know whether to set `mo-expr`: an expression that\n // moves nothing emits nothing, so an empty object *is* idle. That keeps the\n // class in step with the pose without a second notion of \"is this idle\".\n //\n // The palette goes in because a tinting pose emits its colour endpoints from\n // here — see `hotVars`. `poseVars` ignores it, which is what keeps the colour\n // code out of every bundle that imports no hot expression.\n const pose = e ? e.vars(e.p) : {};\n const c = e?.tint ? e.tint(p, e.p) : p;\n return {\n // `vars` is one of the two things that can make a pose non-idle; a tint is\n // the other. Checking only the first would leave a colour-only expression\n // wearing idle's slower return clock while its geometry never moved.\n cls: rootClass(mode, !!Object.keys(pose).length || !!e?.tint),\n vars: {\n ...motionVars(t),\n // The fills, as custom properties, on every animated `blob` — tinted when\n // the pose tints and identical to the markup's own attributes when it does\n // not. Emitted unconditionally rather than only for hot poses, because the\n // stylesheet's `fill` rules have to resolve to *something* correct on an\n // blobatar wearing no expression, and a `var()` that falls back to nothing\n // makes `fill` inherit black.\n //\n // Cost is ~30 B per animated blobatar. It buys the tint being a plain\n // `transition: fill` in both directions instead of a custom property that\n // disappears mid-morph on the way out.\n \"--mo-head\": c.head!,\n \"--mo-eye\": c.eye!,\n ...pose,\n },\n };\n};\n\n/**\n * The `` contents and its motion custom properties, separately.\n *\n * For renderers that own the outer element themselves — `@blobatar/react` when\n * animating. Underscored because the shape of this object is not public API.\n */\nexport function _parts(name: string, opts: BlobatarOptions = {}) {\n return makeParts(style)(\n name,\n opts,\n opts.animate && motion(opts.animate, opts.expression),\n );\n}\n\n/**\n * The figure as drawing primitives, for a renderer with no markup to hand a\n * string to.\n *\n * For `@blobatar/react-native`, where the substrate is `react-native-svg` and\n * there is no `innerHTML`. Underscored on the same terms as `_parts` and\n * `_layout`: reachable through `blobatar/internal`, whose shape changes only on\n * a major together with every adapter.\n *\n * Baked, and that is not a gap in this function. The whole *idle* motion layer\n * is CSS (a stylesheet, custom properties and a class), so there is nothing\n * for `animate` to mean on a substrate that has none of the three, and a mark\n * carries no motion grouping. `expression` *does* work, because a static pose\n * bakes into the geometry before it gets here.\n *\n * A renderer that needs to *morph* between two poses wants the other half of\n * that: `_posed` below, which hands the figure back before the pose touched it\n * and the pose back as numbers.\n *\n * `transform` is the pose's body wrap, and it is load-bearing rather than\n * decorative: `expression.bake` returns a `translate(0 N)` for any pose that\n * shifts the body, and a caller that draws the marks without it puts every\n * posed blobatar in the wrong place. It is the *only* transform: an eye's\n * rotation is baked into the points of its path by `superellipse`, not carried\n * as an attribute. Empty string when there is no pose.\n */\nexport function _marks(name: string, opts: BlobatarOptions = {}): {\n bg: ReturnType;\n transform: string;\n marks: Mark[];\n} {\n const { t, palette } = resolve(name, opts);\n const p = tinted(palette, opts.expression);\n const pose = posed(style.layout(t), opts);\n return {\n // Outside the pose wrap, matching `makeBlobatar`. A plate that leans and\n // scales with the creature stops being a plate.\n bg: backdrop(style, opts, p),\n transform: pose.wrap,\n marks: marks(pose.l as Layout, p),\n };\n}\n\n/**\n * The figure *unbaked*, with the pose left as numbers, for a renderer that has\n * to morph between two poses itself.\n *\n * The sibling of `_marks` rather than a mode on it, and the split is the point.\n * `_marks` welds the pose into the geometry, which is exactly right for drawing\n * one pose and exactly wrong for travelling between two: a morph that re-bakes\n * regenerates every eye path per frame. So this returns the figure as it was\n * drawn, before any pose touched it, and hands the pose back as the thirteen\n * channels `poseTransforms` turns into one transform per eye. What changes\n * during a morph is those strings and nothing else.\n *\n * Static consumers pay nothing for it. They keep calling `_marks`, whose shape\n * and cost are untouched, and this whole function tree-shakes out of a bundle\n * that never mentions it, which a mode with a branch inside `_marks` could not\n * have offered.\n *\n * ## What comes back\n *\n * `marks` and `eyes` are the same list `_marks` returns, split in two, because\n * the eyes are the only marks a pose moves and each needs a group of its own.\n * They are already in draw order: everything in `marks`, then everything in\n * `eyes`, which is where `marks()` puts them.\n *\n * `eyeFrames` is what `poseTransforms` needs, and it is deliberately the *drawn*\n * centres and lean rather than anything posed: the transforms are built against\n * the geometry as emitted, so a caller cannot accidentally compose a pose onto a\n * figure that already wears one.\n *\n * `fill` and `hot` are the two ends of the colour travel. `hot` is `null` on\n * every pose that does not tint, which is most of them, and it is a finished\n * colour rather than a target, the mix at the pose's own `heat`, so a morph\n * fades between two hex values exactly as `transition: fill` does on the web.\n * See `fadeHex`.\n *\n * `pose` is `undefined` for no expression, which `lerpPose` reads as idle.\n *\n * `expr` is the `.mo-expr` predicate, computed here rather than by the caller\n * because there is already a copy of it in `motion` above and two would drift.\n * It answers \"is the blobatar wearing an expression at all\", which is what\n * picks the morph's clock: adopting one is quick and returning to idle is\n * slower, and a renderer with no stylesheet has to make that choice itself. It\n * goes through `e.vars` for the same reason `motion` does, since an expression\n * that moves nothing *is* idle and a tint alone is enough to be non-idle.\n *\n * Underscored on the same terms as `_marks`, `_parts` and `_layout`.\n */\nexport function _posed(name: string, opts: BlobatarOptions = {}) {\n const { t, palette } = resolve(name, opts);\n const l = style.layout(t) as Layout;\n // Drawn with the *base* palette, because these fills are the start of the\n // travel and not its end. A tinting pose's endpoint rides in `hot`, and a\n // renderer that ignores the morph entirely and draws these gets an untinted\n // blobatar wearing no expression, which is the honest static answer for a\n // figure whose pose has not been applied to it.\n const all = marks(l, palette);\n const e = opts.expression;\n const hot = e?.tint ? e.tint(palette, e.p) : null;\n // The eyes are the tail of the list, and `test/morph.test.ts` holds `marks()`\n // to that rather than leaving it as an assumption two files apart.\n const cut = all.length - l.eyes.length;\n return {\n // Outside everything, matching `_marks` and `makeBlobatar`. A tint moves\n // `head` and `eye` and never `bg`, so the base palette is the right one\n // here whether or not the pose is hot.\n bg: backdrop(style, opts, palette),\n marks: all.slice(0, cut),\n // Narrowed rather than left as `Mark`, because every eye in gen2 is a\n // `superellipse` and therefore a path, and a caller that has to re-check\n // that per eye writes a branch with no second arm. The cast is what the\n // test above it asserts: `test/morph.test.ts` holds `marks()` to drawing\n // the eyes last and to drawing them as paths.\n eyes: all.slice(cut) as Extract[],\n eyeFrames: l.eyes.map(({ cx, cy, rx, ry, rot }) => ({ cx, cy, rx, ry, rot })),\n pose: e?.p,\n expr: !!e && (!!Object.keys(e.vars(e.p)).length || !!e.tint),\n fill: { head: palette.head!, eye: palette.eye! },\n hot: hot ? { head: hot.head!, eye: hot.eye! } : null,\n };\n}\n\n/**\n * The numeric layout and resolved palette, before serialization.\n *\n * Kept separate from rendering so geometric invariants — features staying\n * inside the body, the body staying inside the frame — can be asserted directly\n * rather than by parsing path data back out of the markup. Underscored because\n * the shape of this object is not public API.\n */\nexport function _layout(name: string, opts: BlobatarOptions = {}) {\n const { t, palette } = resolve(name, opts);\n // The cast is private and deliberately narrow: the package style has the\n // body/eyes shape the geometry tests inspect, while `Style` itself remains\n // generic for the renderer.\n const l = style.layout(t) as Layout;\n // Posed here rather than by the caller, so the geometry tests assert against\n // the same numbers the static renderer draws. Only the baked half comes back:\n // the body-level `transform` is the renderer's business, and the test that\n // cares about it (frame containment under a pose that scales the body) applies\n // the pose itself rather than parsing a matrix back out.\n const e = opts.expression;\n const posed = e ? e.bake(l as never, e.p).l : l;\n return {\n // Tinted here too, so a colour assertion can read the same numbers the\n // static renderer paints rather than the ramp they came from.\n palette: (e?.tint ? e.tint(palette as Palette, e.p) : palette) as Palette,\n ...posed,\n };\n}\n", "import { blobatar, type BlobatarOptions } from \"./blobatar\";\n\n/**\n * A `data:` URI suitable for `` or `background-image`.\n *\n * Percent-encoded rather than base64: base64 inflates payloads ~33%, while SVG\n * markup is mostly characters that survive percent-encoding untouched. Only the\n * characters that actually break inside an attribute are escaped.\n */\nexport function blobatarUri(name: string, opts?: BlobatarOptions): string {\n const svg = blobatar(name, opts)\n .replace(/\"/g, \"'\")\n .replace(/[%#<>{}|\\\\^[\\]`]/g, c => \"%\" + c.charCodeAt(0).toString(16).toUpperCase());\n return \"data:image/svg+xml,\" + svg.replace(/\\s+/g, \" \");\n}\n", "/**\n * **Deprecated — moved to `@blobatar/react`.**\n *\n * This entry point still works and still renders exactly what it always did.\n * It is frozen, not maintained in parallel: `@blobatar/react` re-exports this\n * component, so the two are the same object and cannot drift.\n *\n * ```sh\n * bunx blobatar-codemod .\n * bun add @blobatar/react\n * ```\n *\n * Removed in v3. Nothing else about the component changes when you move — same\n * props, same output, only the specifier.\n *\n * The reason it is still here rather than deleted: removing it is breaking, and\n * a break costs a major, and a major is how a consumer opts into their users'\n * faces changing (ADR-0008). Spending one on a repackaging would force every\n * consumer to take a new generation to get a new import path. So the two travel\n * separately, and this subpath waits for the major that was going to happen\n * anyway.\n */\n\nimport { useMemo, type ImgHTMLAttributes, type SVGProps } from \"react\";\nimport type { Animate } from \"./animate\";\nimport { _parts, type BlobatarOptions } from \"./blobatar\";\nimport { blobatarUri } from \"./uri\";\n\n/**\n * Two rendering modes, and the props follow the mode.\n *\n * Static blobatars render as an ``: a list of a few hundred is exactly the\n * case where you do not want extra DOM nodes per screen, and nothing here uses\n * `currentColor`, so inline SVG would buy nothing.\n *\n * Animated blobatars cannot. Content inside an `` is an isolated,\n * non-interactive document — `:hover` never fires inside it and host-page CSS\n * cannot reach the shapes — so `animate` switches to inline SVG and costs\n * roughly a dozen nodes per blobatar. That trade is the reason animation is\n * opt-in rather than a default.\n *\n * The union is deliberate: `onLoad` should stop type-checking the moment you\n * turn animation on, because it stops firing.\n */\ntype StaticProps = { animate?: false } & Omit, \"src\">;\n\ntype AnimatedProps = { animate: Animate } & Omit<\n SVGProps,\n \"children\" | \"dangerouslySetInnerHTML\" | \"viewBox\"\n>;\n\nexport type BlobatarProps = {\n /**\n * Who the blobatar is for. A username, a display name, an email, a bot's\n * handle, a user id — any string, and the same string always renders the\n * same blobatar. The only required prop.\n *\n * Named for what the value is rather than for what the library does with it.\n * A blobatar always stands for somebody, and that somebody has a name; `seed`\n * describes the hashing step, which is this module's business and not the\n * call site's. Internally it is still a seed, and the docs that are about\n * derivation still call it one — see `CONTEXT.md`.\n */\n name: string;\n} & BlobatarOptions &\n (StaticProps | AnimatedProps);\n\nexport function Blobatar({\n name: seed,\n size,\n background,\n palette,\n hue,\n tone,\n normalize,\n contrast,\n title,\n animate,\n expression,\n traits,\n ...rest\n}: BlobatarProps) {\n // Pulled out explicitly like every other option, because what is left in\n // `rest` goes straight onto the DOM element — a `traits` object spread onto\n // an `` is a React warning per blobatar.\n const opts = { size, background, palette, hue, tone, normalize, contrast, title, expression, traits };\n\n // Both branches are hooks-stable: `animate` changing swaps the element type,\n // which remounts anyway.\n //\n const dep = JSON.stringify([seed, opts, animate]);\n\n const src = useMemo(\n () => (animate ? \"\" : blobatarUri(seed, opts)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [dep],\n );\n\n const parts = useMemo(\n () => (animate ? _parts(seed, { ...opts, animate }) : null),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [dep],\n );\n\n /**\n * The markup object, kept stable by identity and not just by value.\n *\n * Getting the varying class out of `parts.inner` is only half of what the\n * morph needs. React compares props by reference, and `dangerouslySetInnerHTML`\n * is a fresh `{__html}` literal on every render — so it re-assigns\n * `innerHTML` whenever anything else about the blobatar changes, even when the\n * string is byte-identical. That assignment destroys and rebuilds the whole\n * subtree, which is exactly the thing an expression change must not do: a\n * fresh element has no previous computed value, so no transition runs on it,\n * and every idle animation underneath restarts from phase zero and throws\n * away its seeded offset.\n *\n * Keyed on the string, so the object survives an expression change and\n * changes only when the markup genuinely does.\n */\n const html = useMemo(() => ({ __html: parts?.inner ?? \"\" }), [parts?.inner]);\n\n if (parts) {\n const { style, ...svgRest } = rest as SVGProps;\n return (\n `, so this is a labelled\n // image; without one it is decoration and should be skipped entirely —\n // the same call `alt=\"\"` makes on the `` path. Never both: a\n // `role=\"img\"` that is also `aria-hidden` just contradicts itself.\n role={title ? \"img\" : undefined}\n aria-hidden={title ? undefined : true}\n style={{ ...(parts.vars as React.CSSProperties), ...style }}\n {...svgRest}\n >\n {/*\n Three real children rather than one innerHTML blob, and the reason is\n the morph.\n\n Only the third varies at runtime — its class does, when the expression\n changes — and `dangerouslySetInnerHTML` is all-or-nothing: had the root\n `` stayed inside that string, every expression change would replace\n the entire subtree. A fresh element has no previous computed value, so\n no transition runs on it and every idle animation under it restarts\n from phase zero. Split this way, React writes one attribute and the\n DOM below survives, which is what the transition needs to exist at all.\n\n The first two have to be siblings of the root rather than inside it:\n `` names the element it is the first child of, so nesting it\n would label a `<g>` instead of this `<svg>`, and the backdrop must sit\n outside the hover-lift or the plate scales with the creature.\n */}\n {title ? <title>{title} : null}\n {parts.bg ? : null}\n \n \n );\n }\n\n const { alt, ...imgRest } = rest as ImgHTMLAttributes;\n return {alt;\n}\n", "/**\n * `@blobatar/react` — the React adapter's published name.\n *\n * ## Why this file re-exports instead of holding the component\n *\n * The component still lives in `blobatar/react`, and moving it here is a v3\n * change rather than a v2 one. That is forced by ADR-0008, not by convenience.\n *\n * `blobatar/react` is a published entry point with consumers. Keeping it\n * working while the implementation lives in a separate package would mean core\n * depending on this package, which depends on core — and the alternative,\n * shipping a second copy of the component from core, is two definitions of the\n * same component drifting inside one release. So the implementation cannot\n * leave core until `blobatar/react` is allowed to disappear.\n *\n * That is a major. And under ADR-0008 a major is not free: the package major\n * *is* the generation selector, so `blobatar@3` means gen3. There is no spare\n * major to spend on a repackaging, which means the implementation moves when\n * gen3 ships and not before.\n *\n * What this package does deliver today is the name. A consumer installs\n * `@blobatar/react` now and never edits an import again — and `@blobatar/svelte`,\n * `@blobatar/solid` and `@blobatar/preact` arrive as real implementations\n * alongside it rather than as a second tier beside two privileged subpaths.\n *\n * At v3 this file grows the component, `blobatar/react` is deleted, and core's\n * `peerDependencies` finally empty out. Nothing a consumer wrote has to change.\n */\n\nimport { Blobatar as Component } from \"blobatar/react\";\n\nexport type { BlobatarProps } from \"blobatar/react\";\n\n/**\n * Bound through a `const`, and this is not stylistic.\n *\n * A module whose body is *nothing but* named re-exports is the shape that makes\n * Bun 1.3.14 emit `export{a as Blobatar}` with no `a` anywhere, and Node throws\n * `error: \"a\" is not declared in this file` the moment it links. `VERSION` in\n * core's `src/index.ts` carries the full account of the same bug.\n *\n * Written as plain re-exports first, and `packages/harness` failed on it\n * immediately — which is the reason that package resolves adapters through\n * their published `exports` maps and their built `dist` instead of importing\n * source. Core's note says the bug needs `splitting: true`; it does not. This\n * build never turns splitting on and hit it anyway.\n *\n * The explicit `typeof Component` annotation is load-bearing too. Without it\n * the Vue adapter's declaration emit fails with TS2883, because\n * `defineComponent`'s inferred type cannot be named without reaching into\n * core's internal declaration files. Annotating against the local binding keeps\n * the emitted `.d.ts` portable, and keeps both adapters written the same way.\n */\nexport const Blobatar: typeof Component = Component;\n"], + "mappings": ";;;;;;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,MAAM;AACtC,YAAI,QAAQ,KAAM,QAAO;AACzB,YAAI,eAAe,OAAO;AACxB,iBAAO,KAAK,aAAa,yBACrB,OACA,KAAK,eAAe,KAAK,QAAQ;AACvC,YAAI,aAAa,OAAO,KAAM,QAAO;AACrC,gBAAQ,MAAM;AAAA,UACZ,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,QACX;AACA,YAAI,aAAa,OAAO;AACtB,kBACG,aAAa,OAAO,KAAK,OACxB,QAAQ;AAAA,YACN;AAAA,UACF,GACF,KAAK,UACL;AAAA,YACA,KAAK;AACH,qBAAO;AAAA,YACT,KAAK;AACH,qBAAO,KAAK,eAAe;AAAA,YAC7B,KAAK;AACH,sBAAQ,KAAK,SAAS,eAAe,aAAa;AAAA,YACpD,KAAK;AACH,kBAAI,YAAY,KAAK;AACrB,qBAAO,KAAK;AACZ,uBACI,OAAO,UAAU,eAAe,UAAU,QAAQ,IACnD,OAAO,OAAO,OAAO,gBAAgB,OAAO,MAAM;AACrD,qBAAO;AAAA,YACT,KAAK;AACH,qBACG,YAAY,KAAK,eAAe,MACjC,SAAS,YACL,YACA,yBAAyB,KAAK,IAAI,KAAK;AAAA,YAE/C,KAAK;AACH,0BAAY,KAAK;AACjB,qBAAO,KAAK;AACZ,kBAAI;AACF,uBAAO,yBAAyB,KAAK,SAAS,CAAC;AAAA,cACjD,SAAS,GAAG;AAAA,cAAC;AAAA,UACjB;AACF,eAAO;AAAA,MACT;AACA,eAAS,mBAAmB,OAAO;AACjC,eAAO,KAAK;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gaze.js b/node_modules/.vite/deps/@blobatar_react_gaze.js new file mode 100644 index 0000000..6fd685e --- /dev/null +++ b/node_modules/.vite/deps/@blobatar_react_gaze.js @@ -0,0 +1,170 @@ +import { + require_react +} from "./chunk-IO7TC67E.js"; +import { + __toESM +} from "./chunk-DC5AMYBS.js"; + +// node_modules/@blobatar/react/dist/gaze.js +var import_react = __toESM(require_react()); + +// node_modules/blobatar/dist/gaze.js +var ae = (e) => e * e * (3 - 2 * e); +var ce = (e, n, a) => Math.min(a, Math.max(n, e)); +var ie = (e, n = 110) => n <= 0 ? 1 : 1 - Math.exp(-e / n); +function le(e, n) { + let a = n * (e / 100); + return a > 0 ? ce(0.15 / a, 2e-3, 0.06) : 0.06; +} +var D = 0.97; +var me = 4; +var oe = (e, n, a) => { + let r = e * e + n * n; + if (r < 1e-9) return { sx: 1, sy: 1, sh: 0 }; + let h = Math.max(0, a); + return { sx: (h * e * e + n * n) / r, sy: (h * n * n + e * e) / r, sh: (h - 1) * e * n / r }; +}; +function ue(e, n, a) { + let r = e.x * e.x + e.y * e.y, h = r > 1 ? 1 / Math.sqrt(r) : 1, y = e.x * h, m = e.y * h, E = Math.sqrt(Math.max(0, 1 - y * y - m * m)), g = Math.cos(n), S = Math.sin(n), f = y * g + E * S, P = E * g - y * S, b = Math.cos(a), i2 = Math.sin(a), c = m * b + P * i2, o = P * b - m * i2, s2 = Math.hypot(f, c), l = o <= 0 || s2 > D, M = l ? D / (s2 || 1) : 1, d = f * M, x = c * M, G = l ? Math.sqrt(1 - D * D) : o, u = oe(y, m, E), v = oe(d, x, G); + return { dx: d - e.x, dy: x - e.y, sx: Math.min(1, v.sx / (u.sx || 1)), sy: Math.min(1, v.sy / (u.sy || 1)), t: me * (v.sh - u.sh) }; +} +function he(e) { + let n = Math.hypot(e.dx, e.dy), a = e.radius > 0 ? ae(Math.min(1, n / (e.radius * 0.55))) : 1, r = (e.gain ?? 1) * a, h = n > 0 ? e.dx / n * r : 0, y = n > 0 ? e.dy / n * r : 0, m = Math.hypot(h - e.x, y - e.y) > (e.snap ?? 1.6) ? 1 : e.k; + return { x: e.x + (h - e.x) * m, y: e.y + (y - e.y) * m, tx: h, ty: y, f: m }; +} +function ye(e) { + let n = e.querySelector(".mo-bob > g:not(.mo-eyes)"), a = [...e.querySelectorAll(".mo-eye")]; + if (!n || !a.length) return null; + try { + let r = n.getBBox(), h = [...n.querySelectorAll("path,circle")], y = r.x + r.width / 2, m = r.y + r.height / 2, E = (o, s2, l) => h.some((M) => M.isPointInFill(new DOMPoint(y + o * r.width / 2 * s2, m + o * r.height / 2 * l))), g = 1; + for (let o = 0; o < 16; o++) { + let s2 = o / 16 * Math.PI * 2, l = Math.cos(s2), M = Math.sin(s2); + if (E(1, l, M)) continue; + let d = 0, x = 1; + for (let G = 0; G < 12; G++) { + let u = (d + x) / 2; + if (E(u, l, M)) d = u; + else x = u; + } + g = Math.min(g, d); + } + let S = 0, f = 0, P = a.map((o) => { + let s2 = o.getBBox(); + return S = Math.max(S, s2.width / 2), f = Math.max(f, s2.height / 2), { x: s2.x + s2.width / 2 - y, y: s2.y + s2.height / 2 - m }; + }), b = Math.max(1, r.width / 2 * g - S), i2 = Math.max(1, r.height / 2 * g - f), c = 0; + for (let o of P) c = Math.max(c, Math.hypot(o.x / b, o.y / i2)); + if (c > 0.85) b *= c / 0.85, i2 *= c / 0.85; + return { marks: P.map((o) => ({ x: o.x / b, y: o.y / i2 })), rx: b, ry: i2 }; + } catch { + return null; + } +} +function Me(e, n = {}) { + let a = matchMedia("(hover: hover) and (pointer: fine)"), r = matchMedia("(prefers-reduced-motion: reduce)"), h = n.settle ?? 110, y = n.snap ?? 1.6, m = 0, E = 0, g = 1, S = 1, f = 0, P = -1e6, b = -1e6, i2 = 0, c = 0, o = 0, s2 = 0, l = 0, M = 0, d = 0, x = 0, G = false, u = false, v = null, k = null, N = false, B = 1, p2 = e, R = [], _ = [], X = 50, C = 50, Z = 0, U = 0, Y = () => { + let t = ye(e); + if (!t) return; + _ = t.marks, X = t.rx, C = t.ry; + }, J = () => { + p2 = e.querySelector(".mo-eyes") ?? e, R = [...e.querySelectorAll(".mo-eye")], Y(); + }, K = () => { + if (!k) return; + let t = k.getBoundingClientRect(); + v = { x: t.left + t.width / 2, y: t.top + t.height / 2 }; + }, j = () => { + K(); + let t = e.getBoundingClientRect(); + if (m = t.left + t.width / 2, E = t.top + t.height / 2, g = Math.max(1, Math.min(t.width, t.height) / 2), S = Math.max(1, t.width), f = parseFloat(getComputedStyle(p2).getPropertyValue("--mo-track-travel")) || 0, !_.length) Y(); + Z = f / X, U = f / C; + }, Q = (t) => { + x = 0; + let H = d ? Math.min(t - d, 64) : 16; + if (d = t, !p2.isConnected) J(), j(), o = s2 = 1 / 0; + let re = ie(H, h), L = he({ x: i2, y: c, dx: N ? 0 : (v ? v.x : P) - m, dy: N ? 0 : (v ? v.y : b) - E, radius: g, k: re, snap: y }); + i2 = L.x, c = L.y; + let O = le(S, f), V = false; + if (Math.abs(L.tx - i2) <= O && Math.abs(L.ty - c) <= O) i2 = L.tx, c = L.ty; + else V = true; + if (l += (B - l) * re, Math.abs(B - l) <= 0.01) l = B; + else V = true; + if (Math.abs(l - M) > 0.01) M = l, e.style.setProperty("--mo-track-hold", l.toFixed(3)), V = true; + if (Math.abs(i2 - o) > O || Math.abs(c - s2) > O) { + o = i2, s2 = c, p2.style.setProperty("--mo-track-x", i2.toFixed(3)), p2.style.setProperty("--mo-track-y", c.toFixed(3)); + for (let I = 0; I < _.length && I < R.length; I++) { + let T2 = ue(_[I], i2 * Z, c * U), q = I + 1; + p2.style.setProperty(`--mo-gz-dx${q}`, (T2.dx * X).toFixed(3)), p2.style.setProperty(`--mo-gz-dy${q}`, (T2.dy * C).toFixed(3)), p2.style.setProperty(`--mo-gz-sx${q}`, T2.sx.toFixed(4)), p2.style.setProperty(`--mo-gz-sy${q}`, T2.sy.toFixed(4)), p2.style.setProperty(`--mo-gz-t${q}`, T2.t.toFixed(3)); + } + V = true; + } + if (V || G) G = false, x = requestAnimationFrame(Q); + else d = 0; + }, w = () => { + if (!u) return; + if (G = true, !x) x = requestAnimationFrame(Q); + }, W = (t) => { + P = t.clientX, b = t.clientY, w(); + }, ee = () => { + P = -1e6, b = -1e6, w(); + }, z2 = () => { + j(), w(); + }, A = new ResizeObserver(z2), se = () => { + if (u) return; + if (u = true, J(), j(), A.observe(e), k) A.observe(k); + addEventListener("pointermove", W, { passive: true }), addEventListener("pointerleave", ee, { passive: true }), addEventListener("scroll", z2, { passive: true, capture: true }), addEventListener("resize", z2, { passive: true }), w(); + }, te = () => { + if (!u) return; + if (u = false, A.disconnect(), removeEventListener("pointermove", W), removeEventListener("pointerleave", ee), removeEventListener("scroll", z2, { capture: true }), removeEventListener("resize", z2), x) cancelAnimationFrame(x); + x = 0, d = 0, i2 = c = o = s2 = l = M = 0, p2.style.removeProperty("--mo-track-x"), p2.style.removeProperty("--mo-track-y"); + for (let t = 1; t <= R.length; t++) for (let H of ["dx", "dy", "sx", "sy", "t"]) p2.style.removeProperty(`--mo-gz-${H}${t}`); + e.style.removeProperty("--mo-track-hold"); + }, F = () => a.matches && !r.matches ? se() : te(); + a.addEventListener("change", F), r.addEventListener("change", F), F(); + let ne = (t) => { + if (k && u) A.unobserve(k); + if (k = v = null, N = t === null || t === "rest", B = t === null ? 0 : 1, typeof t !== "object" || !t) return; + if ("getBoundingClientRect" in t) { + if (k = t, u) A.observe(t); + K(); + return; + } + v = { x: t.x, y: t.y }; + }; + return ne(n.target ?? null), { lookAt: (t) => { + ne(t), w(); + }, remeasure: z2, stop: () => { + te(), a.removeEventListener("change", F), r.removeEventListener("change", F); + } }; +} + +// node_modules/@blobatar/react/dist/gaze.js +function T({ settle: a, snap: l, travel: o, lookAt: e } = {}) { + let [t, m] = (0, import_react.useState)(null), r = (0, import_react.useRef)(null), G = (0, import_react.useRef)(null); + (0, import_react.useEffect)(() => { + if (!t || !(t instanceof SVGSVGElement)) return; + let n = Me(t, { settle: a, snap: l, target: G.current }); + return r.current = n, () => { + r.current = null, n.stop(); + }; + }, [t, a, l]), (0, import_react.useEffect)(() => { + var _a; + if (!t || o === void 0) return; + return t.style.setProperty("--mo-track-travel", `${o}px`), (_a = r.current) == null ? void 0 : _a.remeasure(), () => { + t.style.removeProperty("--mo-track-travel"); + }; + }, [t, o]); + let u = (0, import_react.useCallback)((n) => { + var _a; + G.current = n, (_a = r.current) == null ? void 0 : _a.lookAt(n); + }, []), c = e && typeof e === "object" && "x" in e ? `${e.x},${e.y}` : e; + (0, import_react.useEffect)(() => { + if (e !== void 0) u(e); + }, [u, c]); + let f = (0, import_react.useCallback)(() => { + var _a; + (_a = r.current) == null ? void 0 : _a.remeasure(); + }, []); + return { ref: m, lookAt: u, remeasure: f }; +} +export { + T as useGaze +}; +//# sourceMappingURL=@blobatar_react_gaze.js.map diff --git a/node_modules/.vite/deps/@blobatar_react_gaze.js.map b/node_modules/.vite/deps/@blobatar_react_gaze.js.map new file mode 100644 index 0000000..5357f77 --- /dev/null +++ b/node_modules/.vite/deps/@blobatar_react_gaze.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../web/node_modules/@blobatar/react/src/gaze.ts", "../../../web/node_modules/blobatar/src/gaze.ts"], + "sourcesContent": ["/**\n * `useGaze` — the pointer-driven gaze layer (§4.5), as a hook.\n *\n * ## Why this is a subpath and not a prop on ``\n *\n * A prop would put `blobatar/gaze` in this package's import graph for everyone.\n * The adapter is 76 B of its own code and the driver is 1.2 kB, so every\n * consumer rendering static avatars in a list would start paying for a pointer\n * driver they never run. That is the same trade the rest of the library makes\n * everywhere it can: expressions are values you import rather than strings you\n * pass, `motion.css` is a file you choose to load, and `gaze.css` is a second\n * one. `@blobatar/react-native/animated` is this exact shape already.\n *\n * The gate that keeps it honest is `@blobatar/react alone` in\n * `packages/harness/scripts/size.ts`, budgeted at 110 B. Importing this module\n * from `index.tsx` would blow it immediately, which is the point.\n *\n * A prop would also not have saved you anything. Two of the three steps stay\n * whatever the API looks like: `import \"blobatar/gaze.css\"`, and setting\n * `--mo-track-travel` on the blobatars that should follow the pointer, which is\n * what opts them in. A prop would have been the third of three while looking\n * like the only one, and the failure mode of getting it wrong is a face that\n * renders perfectly and never moves.\n *\n * ## What this actually removes\n *\n * The ref, the effect, the teardown, and the handle-in-a-ref that any caller\n * wanting `lookAt` has to keep. That last one is a trap rather than a chore:\n * the driver holds the eyes' current position, so rebuilding it to change where\n * it points snaps them to centre. A component that recreated it on each\n * keystroke would have eyes that jump between every pair of letters.\n *\n * ```tsx\n * import { Blobatar } from \"@blobatar/react\";\n * import { useGaze } from \"@blobatar/react/gaze\";\n * import \"blobatar/motion.css\";\n * import \"blobatar/gaze.css\";\n *\n * const { ref } = useGaze({ travel: 3 });\n * ;\n * ```\n *\n * `travel` is the excursion, and it is what opts a blobatar in. Leave it out\n * and the stylesheet owns it instead, which is the better route for a whole\n * field of blobatars or for anything responsive:\n *\n * ```css\n * .hero .mo-eyes { --mo-track-travel: 3px; }\n * ```\n */\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { gaze, type Gaze, type GazeOptions, type GazeTarget } from \"blobatar/gaze\";\n\nexport type { GazeTarget };\n\n/**\n * The driver's tuning, plus where to look.\n *\n * `GazeOptions.target` is not forwarded under its own name, and the difference\n * is not cosmetic. On the driver it is construction-time sugar: it aims the\n * driver as it is built and is never read again. A construction-time option\n * that looks declarative is the classic React trap — passing `target={point}`\n * and watching it do nothing on the second render — so what this hook takes\n * instead is `lookAt`, which is applied *whenever it changes* and is therefore\n * the declarative thing it looks like.\n */\nexport type UseGazeOptions = Pick & {\n /**\n * Where to look, declaratively. Omit it and the eyes are yours to aim with\n * the returned `lookAt`.\n *\n * This is the whole integration for a page whose answer does not change:\n *\n * ```tsx\n * const { ref } = useGaze({ travel: 3, lookAt: \"pointer\" });\n * ```\n *\n * It takes the same `GazeTarget` union as the function, and it is re-applied\n * whenever it changes rather than only on mount — including on the render\n * where the blobatar first appears, so there is no window in which a\n * declared target has not been asked for yet. A point is compared by its\n * coordinates rather than by identity, so an inline `{ x, y }` re-aims when\n * the numbers move and not merely because the object is new.\n *\n * **Omitted and `null` are different.** Omitted means \"I will aim this\n * myself\", and the hook then never writes over what your `lookAt` calls have\n * asked for. `null` is a target like any other: look at nothing. A component\n * that passes `lookAt={cond ? \"pointer\" : null}` is declaring both, which is\n * the point of the distinction.\n *\n * Do not drive a caret through this. A target that changes on every keystroke\n * is a render per keystroke to say something the driver could have been told\n * directly; the function is the seam for that, and the two mix — the last\n * thing asked for wins, whichever asked.\n */\n lookAt?: GazeTarget;\n /**\n * The excursion, in viewBox units. Omit and the stylesheet owns it.\n *\n * This is what opts a blobatar into the layer at all: `--mo-track-travel` is\n * registered with an initial value of `0px`, so a page that loads\n * `blobatar/gaze.css` and sets it nowhere has a driver running and no eyes\n * moving. That is the layer's likeliest failure, and its cause is a CSS\n * property rather than anything visible from here, which is the argument for\n * the option existing.\n *\n * **A rule on `.mo-eyes` beats this, not the other way round.** The hook\n * writes an inline custom property on the element you attach the ref to,\n * which is the ``, and the property reaches the eyes by inheriting down\n * to the `.mo-eyes` group that `gaze.css` reads it on. A selector matching\n * that group directly — `.something .mo-eyes { --mo-track-travel: … }` — is a\n * declaration on the element itself, and that always wins over an inherited\n * value however the ancestor's was written. Inline only outranks a selector\n * on the *same* element. So do not set both: the rule wins, `travel` does\n * nothing, and the symptom is a face that renders perfectly and never moves.\n * Setting it on an ancestor, or on the host the ref is on, is inheritance\n * against inheritance and the inline value wins there as expected.\n *\n * There is no default for the same reason: leave it out and the two can never\n * collide, because the hook writes nothing.\n *\n * CSS keeps three things this cannot do, so it is the better route whenever\n * one of them applies: setting the excursion on *many* blobatars from one\n * ancestor, since the property inherits; making it responsive through a media\n * or container query; and keeping the geometry beside the rest of a\n * component's geometry. The option is a convenience for the single-blobatar\n * case, not a replacement for the property.\n *\n * The scale: the blobatar is 100 units across, so `3` is 3% of the face, not\n * three screen pixels. The idle glance's widest stop is a median 1.4 units,\n * so the range worth trying is about 1.5 to 4, and the ceiling is the eyes\n * crossing the silhouette — which `motion.css` is explicit is allowed and\n * reads as a face turning on a round head.\n */\n travel?: number;\n};\n\nexport interface UseGazeResult {\n /**\n * Attach to the ``. A callback ref, not an object one.\n *\n * It takes the `` of a static blobatar as well as the `` of an\n * animated one, because `animate` is the caller's to change and a ref that\n * stopped type-checking when it went off would make toggling animation a\n * compile error. The layer is simply inert there: an `` has no eyes.\n *\n * The driver's life then follows the element's exactly, which an object ref\n * cannot express: a blobatar that is conditionally rendered, or swapped for\n * something else, mounts and unmounts without anything in a dependency array\n * changing, so an effect keyed on options alone would hold a driver pointed\n * at a detached node. React calls this with the element and with `null`, so\n * there is nothing to key on and nothing to remember to key on.\n */\n ref: (node: SVGSVGElement | HTMLImageElement | null) => void;\n /**\n * Point the eyes at something: a point in client coordinates, an element,\n * `\"pointer\"`, `\"rest\"`, or `null` for nothing. See `GazeTarget`.\n *\n * **A blobatar looks at nothing until this is called**, `\"pointer\"` included:\n * a driver is armed by mounting and aimed by asking. One line in an effect is\n * the cursor-following blobatar most pages are after:\n *\n * ```tsx\n * const { ref, lookAt } = useGaze({ travel: 3 });\n * useEffect(() => lookAt(\"pointer\"), [lookAt]);\n * ```\n *\n * A ref works wherever an element does — `lookAt(button.current)` — because\n * the union takes the element itself and a ref's `.current` is one. There is\n * deliberately no ref member: a ref is a box React fills in later, and a\n * driver holding the box rather than what came out of it would be reading\n * `null` on the first frame after mount and every frame after a swap.\n *\n * Stable for the life of the component, so it is safe in a dependency array\n * and safe to hand to a child — and the effect above is exactly why it has to\n * be: a `lookAt` that changed identity would re-aim on every render.\n *\n * Calling it before the blobatar has mounted is a queued request rather than\n * a no-op. The target is remembered and handed to the driver the moment there\n * is one, which is what makes the effect above work at all: it runs a render\n * before the driver exists, and it never runs again.\n */\n lookAt: (t: GazeTarget) => void;\n /**\n * Re-measure the box.\n *\n * Scroll, resize and the element's own resizes are already watched. This is\n * for a host that moved it some other way, or that knows the layout settled\n * before any observer will say so.\n */\n remeasure: () => void;\n}\n\nexport function useGaze({\n settle,\n snap,\n travel,\n lookAt: declared,\n}: UseGazeOptions = {}): UseGazeResult {\n /*\n * State rather than a ref, and it is what makes the callback ref above work.\n * A ref assignment does not re-render, so an effect could never see the\n * element arrive; setting state does, and the effect below then runs with a\n * `node` that is either the mounted element or `null`. One extra render on\n * mount, which is the standard cost of measuring a node in React.\n */\n const [node, setNode] = useState(null);\n const driver = useRef(null);\n\n /**\n * The last target asked for, held so that it survives not having a driver\n * yet.\n *\n * A driver is built in an effect, and an effect runs after the ref it depends\n * on has landed — which is one render later, because the callback ref sets\n * state. So a consumer's own `useEffect(() => lookAt(\"pointer\"), [lookAt])`\n * fires on the render *before* the driver exists, and against a bare\n * `driver.current?.lookAt(…)` it does nothing at all. Its dependencies have\n * not changed by the time the driver arrives, so it never fires again either,\n * and the eyes simply never move.\n *\n * That is the trap the driver's `null` default would otherwise set for every\n * consumer at once, since aiming is now something every consumer does. So\n * `lookAt` records the intent whether or not there is anything to carry it\n * out, and the effect below hands it to each driver it builds. Aiming before\n * mount is a queued request rather than a silent no-op.\n *\n * It is also what makes the driver survive being rebuilt. `settle` and `snap`\n * changing constructs a new driver, and a new driver is aimed at `null`:\n * without this, retuning the pursuit would quietly stop the gaze.\n */\n const target = useRef(null);\n\n /*\n * `settle` and `snap` are primitives, so an inline `useGaze({ settle: 90 })`\n * does not rebuild the driver on every render the way an object identity in\n * this list would. Changing either does rebuild it, and that resets the eyes\n * to centre — correct, since a new time constant is a different filter and\n * carrying the old one's state into it would be neither.\n */\n useEffect(() => {\n /*\n * The `instanceof` is not defensive typing. `animate` is the caller's to\n * change, and with it off `` renders an `` — which has no\n * `.mo-eyes`, no stylesheet reaching inside it and no eyes. A driver built\n * on one measures a box, attaches its listeners and runs a frame loop\n * forever for a picture that cannot move, which is invisible in every way\n * except the battery. Caught by `no driver on a static blobatar` in\n * `packages/harness/scripts/probe-gaze.ts`.\n */\n if (!node || !(node instanceof SVGSVGElement)) return;\n const g = gaze(node, { settle, snap, target: target.current });\n driver.current = g;\n return () => {\n driver.current = null;\n g.stop();\n };\n }, [node, settle, snap]);\n\n /*\n * Declared after the driver's effect on purpose. Effects run in declaration\n * order, so on mount the driver exists by the time this writes the property,\n * and the `remeasure` below is what stops the threshold being derived from\n * the `0px` that was there a moment earlier.\n *\n * Separate from that effect rather than folded into it, which would be\n * shorter and wrong: `travel` in the driver's dependency list would rebuild\n * the driver whenever it changed, and a new driver starts with the eyes at\n * centre. Changing how far a blobatar looks should not make it stop looking.\n *\n * The cleanup removes the property rather than restoring a previous value.\n * There is nothing to restore: the hook only ever wrote it if `travel` was\n * given, so removing it hands the element back to whatever the stylesheet\n * says, which is exactly where it would have been.\n */\n useEffect(() => {\n if (!node || travel === undefined) return;\n node.style.setProperty(\"--mo-track-travel\", `${travel}px`);\n /* The excursion itself is pure CSS and applies on the next frame. This is\n for the driver's write threshold, which is derived from the value and\n cached at measure time, so without it a change leaves writes stopping\n slightly early or late until the next scroll or resize. */\n driver.current?.remeasure();\n return () => {\n /* A block, not a concise body: `removeProperty` returns the old value,\n and a cleanup that returns a string is not a `Destructor`. */\n node.style.removeProperty(\"--mo-track-travel\");\n };\n }, [node, travel]);\n\n const lookAt = useCallback((t: GazeTarget) => {\n target.current = t;\n driver.current?.lookAt(t);\n }, []);\n\n /*\n * The declared target, applied on mount and on every change.\n *\n * Keyed on a value rather than on the target itself, because a point is the\n * one member of the union a caller writes inline: `lookAt={{ x, y }}` is a\n * new object on every render, and keying on identity would re-aim the driver\n * every time the component rendered for any reason at all. An element and the\n * two words are already stable by identity, so the key is simply themselves.\n *\n * `undefined` is not a target: it is the caller saying they will aim it, and\n * this stays out of their way entirely rather than aiming at `null` on their\n * behalf.\n */\n const key =\n declared && typeof declared === \"object\" && \"x\" in declared\n ? `${declared.x},${declared.y}`\n : declared;\n\n useEffect(() => {\n if (declared !== undefined) lookAt(declared);\n /* `declared` is deliberately not a dependency: `key` is its value, and the\n object identity it would add is the churn this is built to avoid. */\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lookAt, key]);\n\n const remeasure = useCallback(() => {\n driver.current?.remeasure();\n }, []);\n\n return { ref: setNode, lookAt, remeasure };\n}\n", "/**\n * Gaze follow: the eyes track a point. §4.5 of `docs/motion-spec.md`, and the\n * layer `motion.css` twice reserves `.mo-eyes`'s `transform` for.\n *\n * This is the one motion layer that needs JavaScript. Everything else in the\n * library is a stylesheet the browser runs on its own, because everything else\n * is a function of the clock alone. A gaze is a function of where the pointer\n * is, which no keyframe can know, so it ships as an entry point rather than as\n * more CSS.\n *\n * ## Two layers, and the seam between them is a frame clock\n *\n * `step` is the pursuit as pure arithmetic: no DOM, no time source, no state it\n * owns. `gaze` is the browser driver around it: measure a box, listen to a\n * pointer, park when nothing moves, write two custom properties.\n *\n * The split is not tidiness. The filter is recursive, so frame 200 depends on\n * frame 199, and anything that renders frames out of order cannot run a driver\n * at all. `apps/video` renders a Remotion film across several workers in\n * arbitrary order, and integrating as it went would silently produce a\n * different film per worker. It solves the whole track forwards at module load\n * instead and reads rows back, which it can only do because the arithmetic is\n * separable from the clock. Keeping the two apart here is what lets the film be\n * the shipped behaviour rather than a flattering imitation of it.\n *\n * ## It writes custom properties and nothing else\n *\n * Not a class, and that is a finding rather than a preference. `.mo-root`'s\n * `className` is composed by the adapters from `animate` and the expression, so\n * a framework rewrites that attribute wholesale whenever either changes, taking\n * any imperatively added class with it. The failure is the quiet kind: the\n * driver keeps running and the eyes simply stop moving.\n *\n * So a driver that writes a class into a framework's DOM is racing the\n * framework for that attribute, and it loses without saying so. Custom\n * properties are uncontested, so this only ever sets `--mo-track-x` and\n * `--mo-track-y`, and the host stylesheet decides where the layer applies.\n *\n * ## Why this is smoothed when the saccade is not\n *\n * `motion.css` is emphatic that easing the idle saccade gives floating\n * eyeballs, and it is right: a saccade is ballistic, so anything but a snap\n * between holds reads wrong. This is not a saccade. Eyes following a moving\n * target run *smooth pursuit*, a different oculomotor system that is continuous\n * by construction, so the filter here is the correct shape for the thing being\n * modelled rather than a softened saccade.\n *\n * That only holds while the target moves at pursuit speeds. A pointer that\n * jumps across the screen is not something an eye pursues, it is something an\n * eye saccades to, which is what `SNAP` is.\n */\n\n/**\n * Pursuit time constant in ms: how long the eyes take to cover ~63% of the way\n * to a new target.\n */\nexport const SETTLE = 110;\n\n/**\n * Target movement in one frame, as a fraction of the excursion, past which the\n * eyes stop pursuing and jump.\n *\n * A full reversal is 2, so this is four fifths of one: enough that ordinary\n * sweeping never trips it, and little enough that a teleport always does. Above\n * it the target has not moved, it has been replaced (a scroll, a tab return, a\n * pointer re-entering the window), and an eye answers that with a saccade.\n *\n * **Expressed against the normalised direction, not in CSS pixels.** The\n * excursion is the stylesheet's to set, so a threshold in pixels would be a\n * second place to change whenever `--mo-track-travel` is retuned, and the two\n * would drift apart without either looking wrong on its own. `apps/demo` used\n * to compare in pixels and now does not; this is the form that survived.\n */\nexport const SNAP = 1.6;\n\n/**\n * The near field, as a fraction of the blobatar's own radius: inside this the\n * excursion eases to zero.\n *\n * `dx / d` is a unit vector, so its direction is undefined at the centre and\n * violently sensitive just outside it. A pointer crossing a blobatar's own\n * footprint sweeps that direction through 180 degrees in the handful of frames\n * it takes to get across, at full excursion the whole way: the eyes snap about\n * wildly as the cursor passes over rather than tracking it, and it is worse\n * than it sounds because `SNAP` reads those flips as target jumps and takes the\n * smoothing off exactly when it is most needed.\n *\n * Easing the *amplitude* to zero over the near field kills the singularity at\n * its source. The direction is still noisy in there, but it is multiplied by\n * almost nothing, so nothing moves. Physically it is also the honest answer:\n * there is no direction to look in at something you are already on. Pointing\n * straight at a face makes it look straight back at you.\n *\n * Scaled by the blobatar rather than fixed, because this fraction of a 24px\n * cell and of a 200px hero are different distances and both are \"just about to\n * be on top of it\". It was once filed as the one thing a large blobatar needs\n * that a grid does not, and that was wrong: a grid needs it at any cell size a\n * pointer can get inside, which `apps/demo` reaches by 100px.\n */\nexport const DEADZONE = 0.55;\n\n/**\n * How far the eyes must move, in CSS pixels, for a frame to be worth writing.\n *\n * A flat threshold on the direction is the wrong shape, and expensively so:\n * 0.002 of a unit vector is a different amount of movement on a 24px avatar\n * and on a 200px one, and on the small one it is a fraction of a pixel nobody\n * can resolve. The exponential never actually arrives, so this number is the\n * only thing deciding when the writes stop, and set below what a display can\n * show it keeps handing the style engine work for tens of frames after the\n * motion is over. Measured in `apps/demo`, that tail was most of what the layer\n * cost: a forty-frame convergence per blobatar became three or four writes.\n *\n * A sixth of a pixel is under the threshold on any display. Nothing about the\n * motion changes: the smoothing still runs every frame at full precision, and\n * the last value written is still within one step of the target. Only how often\n * the result is handed on.\n */\nexport const VISIBLE_PX = 0.15;\n\n/**\n * Floor and ceiling on the derived threshold.\n *\n * The ceiling matters more. A 24px cell at a travel of 2.5 puts the whole\n * excursion inside two thirds of a pixel, and a threshold derived honestly from\n * that would quantise the direction into about four positions: correct by the\n * arithmetic and visibly steppy the moment anyone raises the travel. The floor\n * is the sane limit for a blobatar large enough that anything finer is the\n * driver's own noise.\n */\nconst EPS_MIN = 0.002;\nconst EPS_MAX = 0.06;\n\n/**\n * How much the stand-down has to move before it is worth a write.\n *\n * Coarser than the excursion's threshold by an order of magnitude, and\n * deliberately: this scales the idle rove's *seeds*, and a 1% change in the\n * amplitude of a glance nobody is watching for is not a thing anyone can see.\n * It is also the channel that has to be written above `.mo-eyes` to be seen at\n * all, so each write costs a wider invalidation than the excursion's does.\n */\nexport const HOLD_EPS = 0.01;\n\n/** Cubic smoothstep, so every ramp here is flat at both ends. */\nexport const smoothstep = (t: number) => t * t * (3 - 2 * t);\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/**\n * The smoothing factor for one frame.\n *\n * Frame-rate independent, so the pursuit is not visibly quicker on a 120Hz\n * display than on a 60Hz one. That is the bug where an animation \"feels\n * different on my laptop\" and nobody can say why.\n *\n * A `settle` of 0 removes the smoothing entirely, which is worth looking at\n * once to see the floating-eyeball argument from the other side.\n */\nexport const pursuit = (dt: number, settle: number = SETTLE) =>\n settle <= 0 ? 1 : 1 - Math.exp(-dt / settle);\n\n/**\n * `VISIBLE_PX` converted into units of the direction, for a blobatar this wide\n * on screen at this excursion.\n *\n * A viewBox unit is `width / 100` CSS pixels and the direction is scaled by the\n * travel, so this is the only space the comparisons in a driver can be made in.\n * Per blobatar rather than per field, because a field does not have one answer:\n * the same grid at 24px and at 200px wants thresholds an order of magnitude\n * apart.\n */\nexport function threshold(width: number, travel: number): number {\n const perUnit = travel * (width / 100);\n return perUnit > 0 ? clamp(VISIBLE_PX / perUnit, EPS_MIN, EPS_MAX) : EPS_MAX;\n}\n\n/**\n * How near the edge of the disc a mark is allowed to park, 0 to 1.\n *\n * A rotation large enough carries a mark round the back of the head, where\n * there is nothing to draw — which is true of a real head and wrong here. The\n * excursion is a stylesheet's to set and nothing stops it being set to more\n * head than there is: `triangle`'s fitted head is 9 units tall, so an excursion\n * of 24 is a pitch of 159°, and the eyes do not turn away, they *vanish*. A\n * face that blinks out of existence because someone typed a large number is not\n * a failure anyone can read.\n *\n * So the mark stops at the edge instead of passing it. At 0.97 the depth is\n * still 0.24, which is an eye down to about a quarter of its width: thin enough\n * to read as turned almost fully away, wide enough to be a face. Raising this\n * toward 1 buys a little more turn and takes away the guarantee that there is\n * always something on screen.\n */\nexport const LIMB = 0.97;\n\n/**\n * The convergence tilt at the corners, in degrees.\n *\n * Under §4.7 this was a tuned coefficient per saccade stop, and the\n * differential between the eyes had to be asserted by a test. Here it is the\n * shear the projection already produces, so the opposite signs per eye and the\n * vanishing on the pure axes fall out rather than being arranged.\n *\n * 4° against the static per-blobatar lean capped at 12° in `layout()`, and\n * against §4.7's own 2.4° peak. `test/gaze.test.ts` pins the measured peak, so\n * retuning this fails there and has to be written down rather than drifting.\n */\nexport const TILT = 4;\n\n/** One eye's rest position, as a fraction of the face's radius on each axis. */\nexport interface Mark {\n x: number;\n y: number;\n}\n\n/** Where a mark has gone, and what shape it is when it gets there. */\nexport interface Projection {\n /** Offset from rest, in the same fractions the mark came in as. */\n dx: number;\n dy: number;\n /** Foreshortening, 0 to 1, relative to the mark's own resting width. */\n sx: number;\n sy: number;\n /** Convergence tilt, in degrees. */\n t: number;\n}\n\n/**\n * How a small patch of the sphere's surface at `(x, y, z)` projects.\n *\n * Orthographic projection compresses a patch purely *radially* — by the depth\n * `z`, toward the middle of the disc — and leaves it alone tangentially. That\n * single fact is all three of §4.7's cues. Resolving the radial compression\n * onto the x and y axes gives the two scales, and what is left over is a shear,\n * which is the convergence: a mark off both centre lines has its frame rotated,\n * and one on either axis does not.\n */\nconst patch = (x: number, y: number, z: number) => {\n const r2 = x * x + y * y;\n /* Dead centre has no radial direction to compress along, and no tilt. */\n if (r2 < 1e-9) return { sx: 1, sy: 1, sh: 0 };\n const d = Math.max(0, z);\n return {\n sx: (d * x * x + y * y) / r2,\n sy: (d * y * y + x * x) / r2,\n sh: ((d - 1) * x * y) / r2,\n };\n};\n\n/**\n * A mark on a sphere, turned and projected — the gaze's answer to §4.7's wrap.\n *\n * ## Why this is a projection and not the idle wrap with a different clock\n *\n * §4.7 is six tuned stops of `@keyframes mo-wrap`, locked frame-for-frame to\n * the saccade's six fixations. It cannot be pointed at an arbitrary direction,\n * because it has no arbitrary direction to be pointed at: its input is which\n * stop the saccade is in. The gaze's input is a continuous unit vector, so the\n * cues have to be a continuous function of it, and once they are a function\n * there is no reason for it to be a fitted one. This is the sphere.\n *\n * ## Why it is a rotation and not two angles\n *\n * It was two angles, one per axis, each clamped at the limb — and that is not a\n * sphere, it is a square. A diagonal aim drove both to their limits at once and\n * put the mark at the *corner*, which is `√2` from the centre of a disc of\n * radius 1, so the eye left the head on every diagonal while behaving perfectly\n * on the axes. That is the failure this shape cannot have: the mark is lifted\n * onto the unit sphere, rotated as a vector, and projected, so `x² + y² ≤ 1`\n * holds by construction in every direction rather than on two of them.\n *\n * A mark carried onto the far side is hidden rather than drawn, which is what\n * \"the eye went round the back of the head\" has to mean.\n *\n * ## Why the excursion stops being a translation\n *\n * A translation is what lets an eye leave the head. `travel` is still a\n * distance in viewBox units and still means what the README says, but it is\n * read as an arc along the surface rather than a slide across it: the turn is\n * `travel / radius` radians, and the mark lands where the rotation puts it. For\n * a small turn `sin θ ≈ θ`, so a face at the documented 1.5 to 4 units moves\n * exactly as far as it did when this was a translate, which is the whole reason\n * the excursion did not have to become an angle to get this.\n *\n * For a large one the two part company, and that is the point. The projection\n * saturates: a mark cannot pass the limb, and it arrives there at no width. So\n * an eye asked for more excursion than the head has goes to the edge and\n * vanishes, where the translate sent it out over the page. Nothing clips it.\n * There is no `clipPath`, no id, and the guarantee in `test/blobatar.test.ts`\n * that many blobatars on one page cannot collide is untouched.\n *\n * `m` is the mark's rest position as a fraction of the face's radius *on each\n * axis*, and `yaw`/`pitch` are the turn in radians. Per axis, because the face\n * is not round: `capsule` is 37 units wide and 20 tall, and one mean radius put\n * its limb 44% below the eyes it was supposed to contain, which is an eye\n * sitting well under the chin. Normalising each axis by its own radius makes\n * the head an ellipsoid, and the ellipse inscribed in a superellipse is inside\n * it everywhere.\n */\nexport function project(m: Mark, yaw: number, pitch: number): Projection {\n /* Lifted onto the sphere. A mark drawn outside the disc — a decoration that\n widened the body's box without widening the face — is pulled back to the\n limb rather than producing an imaginary depth. */\n const r2 = m.x * m.x + m.y * m.y;\n const k = r2 > 1 ? 1 / Math.sqrt(r2) : 1;\n const x0 = m.x * k;\n const y0 = m.y * k;\n const z0 = Math.sqrt(Math.max(0, 1 - x0 * x0 - y0 * y0));\n\n /* Yaw about the vertical, then pitch about the horizontal. */\n const cy = Math.cos(yaw);\n const sy = Math.sin(yaw);\n const x1 = x0 * cy + z0 * sy;\n const z1 = z0 * cy - x0 * sy;\n\n /* Pitch's sign is against the screen's y, not against a right-handed frame:\n SVG's y grows downward, so a positive aim is a look *down* and has to move\n the mark down. Written the textbook way round it inverts the vertical: a\n pointer below the face makes it look up. */\n const cp = Math.cos(pitch);\n const sp = Math.sin(pitch);\n const y1 = y0 * cp + z1 * sp;\n const z2 = z1 * cp - y0 * sp;\n\n /* Parked at the edge rather than carried over it. See `LIMB`: past this the\n mark is either round the back or so near the limb that it has no width\n left, and both of those are an eye that has disappeared. */\n const rho = Math.hypot(x1, y1);\n const over = z2 <= 0 || rho > LIMB;\n const back = over ? LIMB / (rho || 1) : 1;\n const px = x1 * back;\n const py = y1 * back;\n const pz = over ? Math.sqrt(1 - LIMB * LIMB) : z2;\n\n const rest = patch(x0, y0, z0);\n const now = patch(px, py, pz);\n\n return {\n dx: px - m.x,\n dy: py - m.y,\n /*\n * Relative to the mark's own resting foreshortening, not to 1. An eye off\n * the middle of the face is already turned away from you at rest, and the\n * renderer drew it at the width it has *there*, so dividing that out is\n * what makes a turn of zero the identity on every mark rather than only on\n * one at the centre.\n *\n * Capped at 1, and the cap is not a rounding guard. Un-dividing is\n * symmetric: an eye turning *toward* the middle un-foreshortens, and the\n * geometry says it should widen, by up to 11% on a face with the hero's eye\n * spacing. That is true of a real head and it is the one thing §4.7 says\n * breaks the illusion outright — \"an eye growing on a glance is the tell\n * that kills the sphere read instantly\" — and watching it, §4.7 is right.\n * So the drawn width is taken as the mark's widest and this only ever\n * removes width, the same bargain the idle wrap makes one layer over.\n */\n sx: Math.min(1, now.sx / (rest.sx || 1)),\n sy: Math.min(1, now.sy / (rest.sy || 1)),\n /* As a change from rest, the same shape as the offset and for the same\n reason: a mark off both centre lines has a real shear at rest, and an eye\n that arrives already rotated is the renderer's `lean` being overwritten\n by a layer that is meant to compose with it. */\n t: TILT * (now.sh - rest.sh),\n };\n}\n\n/** One blobatar's smoothed gaze direction, as the caller keeps it. */\nexport interface Aim {\n /** Signed direction, each component in -1..1 and scaled by the excursion. */\n x: number;\n y: number;\n}\n\nexport interface StepInput extends Aim {\n /** Vector from the blobatar's centre to the target, in CSS pixels. */\n dx: number;\n dy: number;\n /** The blobatar's drawn radius in CSS pixels: what `DEADZONE` is a fraction of. */\n radius: number;\n /** This frame's smoothing factor, from `pursuit`. */\n k: number;\n /**\n * External amplitude multiplier, 0 to 1.\n *\n * The seam for anything that decides *whether* this blobatar is looking, as\n * opposed to where: a distance falloff across a field, an engagement ramp at\n * the head of a film. Kept out of the near-field ease below because the two\n * answer different questions, and a host that cross-fades the idle rove\n * against the gaze wants this value rather than the combined amplitude. Feed\n * it the eased one and a blobatar starts roving idly the moment the pointer\n * lands on top of it, which is stranger to watch than the flick it replaced.\n */\n gain?: number;\n /** Saccade threshold in units of the excursion. Defaults to `SNAP`. */\n snap?: number;\n}\n\nexport interface StepResult extends Aim {\n /** Where the eyes are aimed *now*, before smoothing: the pursuit's target. */\n tx: number;\n ty: number;\n /**\n * The interpolation factor this step actually used: `k`, or 1 if the saccade\n * branch fired.\n *\n * Returned because a host cross-fading a second channel on the same clock (a\n * stand-down, a per-blobatar gain) wants that channel to jump when the eyes\n * jump rather than to glide on serenely through a teleport.\n */\n f: number;\n}\n\n/**\n * One pursuit step, with the saccade branch. Pure: no clock, no DOM, no state.\n *\n * The target is returned alongside the new position because arrival has to be\n * decided against it and not inferred from whether a write happened. The write\n * threshold measures distance from the *last written value*, not from the\n * target, so a frame whose increment lands under it is silent while the eyes\n * are still travelling, and one silent frame parks a driver's loop and strands\n * them. The residual that strands is up to `eps / k`, which at a 90ms settle is\n * around six times `eps`: not a rounding error, a visibly wrong direction held\n * until the pointer moves again. A driver snaps to `tx`/`ty` once inside its\n * threshold of them, and convergence then terminates on the value.\n */\nexport function step(i: StepInput): StepResult {\n const d = Math.hypot(i.dx, i.dy);\n const near = i.radius > 0 ? smoothstep(Math.min(1, d / (i.radius * DEADZONE))) : 1;\n const amp = (i.gain ?? 1) * near;\n\n const tx = d > 0 ? (i.dx / d) * amp : 0;\n const ty = d > 0 ? (i.dy / d) * amp : 0;\n\n /* Measured on the target, not on the pointer, so a cursor crossing the page\n fast still pursues while one that is replaced jumps. */\n const f = Math.hypot(tx - i.x, ty - i.y) > (i.snap ?? SNAP) ? 1 : i.k;\n\n return { x: i.x + (tx - i.x) * f, y: i.y + (ty - i.y) * f, tx, ty, f };\n}\n\n/**\n * A blobatar's face, as the projection needs it: where the eyes rest, and how\n * big the head they turn on is.\n *\n * The radii are semi-axes in viewBox units and the marks are fractions of them,\n * so a `Mark` is already normalised for `project` and neither number changes\n * when the page scrolls or the blobatar is drawn at a different size.\n */\nexport interface Face {\n marks: Mark[];\n /** The face's radius on each axis, in viewBox units. */\n rx: number;\n ry: number;\n}\n\n/**\n * Measure one blobatar's face off its own rendered geometry.\n *\n * Exported because the driver is not the only thing that has to know where an\n * eye rests. `apps/video` solves its pursuit forwards at module load and cannot\n * run a driver at all, but it still has to land the same eye in the same place,\n * and the fitted head is the one input it cannot derive from a name. A second\n * copy of the bisection below would keep rendering plausibly while the two\n * quietly disagreed about where the limb is, which is the failure this file\n * spends its whole length trying not to have.\n *\n * `el` is the ``. Returns `null` for a subtree with no layout box: a\n * blobatar that is `display: none` or detached, and so cannot be looked at\n * anyway. A caller holding a previous measurement should keep the one it has.\n *\n * `getBBox` is the element's own geometry and ignores every transform on it and\n * above it, so this is the *rest* position however far the gaze, the saccade or\n * the expression have currently moved things. That is what makes it safe to\n * call at any time rather than only before anything starts.\n */\nexport function survey(el: Element): Face | null {\n const head = el.querySelector(\".mo-bob > g:not(.mo-eyes)\");\n const eyes = [...el.querySelectorAll(\".mo-eye\")];\n if (!head || !eyes.length) return null;\n try {\n const b = head.getBBox();\n /*\n * The largest ellipse of the body's own proportions that fits inside the\n * silhouette, found by bisection along sixteen rays from the centre.\n *\n * The box on its own is not the head. `capsule` is a stadium whose box\n * an ellipse overflows at the ends, `triangle`'s box is mostly not\n * triangle, and `round`'s per-point radii dip 15% below its widest.\n * Fitted rather than assumed because the roster does not agree on one\n * number: it lands at 0.98 on `round` and 0.39 on `triangle`, and a\n * constant safe for the second would have halved the excursion on the\n * first for no reason.\n *\n * Shrinking the head rather than clamping the eye afterwards is what\n * keeps this a projection. The turn is `travel / radius`, so a smaller\n * head turns proportionally further for the same excursion and a small\n * glance moves exactly as far as it did — only the saturation comes\n * sooner, which is correct: there is less head to turn.\n */\n const fill = [...head.querySelectorAll(\"path,circle\")];\n const cx0 = b.x + b.width / 2;\n const cy0 = b.y + b.height / 2;\n const hit = (t: number, c: number, s2: number) =>\n fill.some((f) =>\n f.isPointInFill(\n new DOMPoint(cx0 + ((t * b.width) / 2) * c, cy0 + ((t * b.height) / 2) * s2),\n ),\n );\n let fit = 1;\n for (let a = 0; a < 16; a++) {\n const r = (a / 16) * Math.PI * 2;\n const c = Math.cos(r);\n const s2 = Math.sin(r);\n if (hit(1, c, s2)) continue;\n let lo = 0;\n let hi = 1;\n for (let i = 0; i < 12; i++) {\n const mid = (lo + hi) / 2;\n if (hit(mid, c, s2)) lo = mid;\n else hi = mid;\n }\n fit = Math.min(fit, lo);\n }\n\n /*\n * Inset by the eyes' own half-extent, because a centre inside the\n * silhouette is not an eye inside it. These are capsules up to 22 units\n * tall on a face 77 across, so an eye whose middle sits exactly on the\n * boundary has a third of itself outside.\n */\n let ix = 0;\n let iy = 0;\n const centres = eyes.map((e) => {\n const g = e.getBBox();\n ix = Math.max(ix, g.width / 2);\n iy = Math.max(iy, g.height / 2);\n return { x: g.x + g.width / 2 - cx0, y: g.y + g.height / 2 - cy0 };\n });\n let rx = Math.max(1, (b.width / 2) * fit - ix);\n let ry = Math.max(1, (b.height / 2) * fit - iy);\n\n /*\n * …opened back up if the eyes do not fit in what that leaves, which\n * `triangle` manages: its fitted ellipse is 0.39 of its box and its eyes\n * sit wider than that. A head that does not contain its own eyes starts\n * them at the limb, fully foreshortened and unable to move.\n */\n let need = 0;\n for (const c of centres) need = Math.max(need, Math.hypot(c.x / rx, c.y / ry));\n if (need > 0.85) {\n rx *= need / 0.85;\n ry *= need / 0.85;\n }\n return { marks: centres.map((c) => ({ x: c.x / rx, y: c.y / ry })), rx, ry };\n } catch {\n /* Not laid out yet. */\n return null;\n }\n}\n\n/* ------------------------------------------------------------------ driver */\n\n/**\n * What a pair of eyes can be pointed at.\n *\n * One vocabulary, used by `lookAt` and by `GazeOptions.target` alike, because\n * \"where it starts out looking\" and \"where it looks now\" are the same question\n * asked at two moments and answering them differently is how a caller ends up\n * with two mental models of one driver.\n *\n * The union is four things and they are not four modes. Everything below the\n * aim is arithmetic on a single point: the members differ only in where that\n * point comes from and, for the last two, in whether the idle glance is allowed\n * back afterwards. Nothing here reimplements the pursuit, the near field or the\n * saccade branch, and a target swapped for another is a substitution rather\n * than a switch — the eyes glide from wherever they are, and `SNAP` decides\n * which of those is a glide and which is a jump.\n *\n * - `{ x, y }` — a point in **client** coordinates. A caret, a drop shadow, a\n * spot in the viewport. The caller owns re-aiming it when the page moves,\n * which is the honest split: a point is a point and the driver cannot know\n * what produced it.\n * - `Element` — that element's box centre, re-read whenever the driver\n * re-measures its own, so it survives scrolling and reflow without the caller\n * listening for either. This is the common case and the reason it is not left\n * to `{ x, y }`: a caller doing it by hand writes the two listeners this\n * already runs, and usually forgets the second.\n * - `\"pointer\"` — the cursor. The pointer is one *source* of a target and not\n * the target itself, which is why it is a word here rather than the absence\n * of one.\n * - `\"rest\"` — the blobatar's own centre, held. The near-field ease takes the\n * excursion to zero because there is no direction to look in at something you\n * are already on, so the eyes glide to the middle over the same curve as\n * everything else and stay. The idle glance stays stood down: this is a face\n * deliberately not looking, which is a pose and not an absence.\n * - `null` — nothing. The eyes ease home *and* the idle saccade comes back, so\n * the blobatar goes on living its own life with the driver attached and\n * watching. This is where a driver starts: constructing one arms the layer\n * and aims it at nothing, and it costs nothing until it is aimed — the eyes\n * are already home, the stand-down is already zero, and the loop parks on its\n * first frame. `null` is the empty target and it means the empty thing.\n *\n * `null` and `\"rest\"` are the pair worth reading twice, because \"stop looking\n * at that\" is genuinely two requests. A password field revealing its contents\n * wants `\"rest\"` — the joke is a face pointedly not reading your screen, and a\n * face that went back to glancing idly around the room would be telling the\n * truth about nothing. A tour that has finished pointing at things wants\n * `null`, because the creature should go back to being a creature.\n *\n * Neither is `stop()`, which is teardown: it removes every listener and both\n * properties, and the eyes snap rather than glide.\n */\nexport type GazeTarget =\n | { x: number; y: number }\n | Element\n | \"pointer\"\n | \"rest\"\n | null;\n\nexport interface GazeOptions {\n /** Pursuit time constant in ms. Defaults to `SETTLE`. */\n settle?: number;\n /** Saccade threshold in units of the excursion. Defaults to `SNAP`. */\n snap?: number;\n /**\n * What to watch. Defaults to `null`, which is nothing.\n *\n * Sugar for constructing the driver already aimed, and `lookAt` is the same\n * seam afterwards taking the same union. `gaze(svg, { target: \"pointer\" })`\n * is the cursor-following blobatar most pages want, and it is spelled out\n * rather than assumed: constructing a driver arms the layer, and what it\n * looks at is the caller's to say. A default that started following the\n * pointer would make the one member of the union nobody had to ask for the\n * one that moves the eyes.\n *\n * **The likeliest way to end up with a face that never moves is now two\n * things rather than one.** `--mo-track-travel` is registered at `0px`, so a\n * page that loads `gaze.css` and sets the excursion nowhere has a driver\n * running and no eyes moving; a driver that was never aimed is the same\n * symptom from the other side. Both are visible from the call site, which is\n * the trade: nothing happens implicitly, so nothing happens by accident\n * either.\n */\n target?: GazeTarget;\n}\n\n/** A running gaze. */\nexport interface Gaze {\n /**\n * Point the eyes at something. See `GazeTarget` for the five things that\n * something can be.\n *\n * The pointer is one *source* of a target and not the target itself, which is\n * the whole shape of this seam: it takes a point, an element, or one of the\n * two words, and everything downstream is the same arithmetic either way.\n *\n * It also settles what the pointer leaving the window means while something\n * else is being watched: nothing. A target that is present because the caller\n * says so does not stop being present because the cursor went to another\n * window.\n */\n lookAt: (t: GazeTarget) => void;\n /**\n * Re-measure the box.\n *\n * Scroll, resize and the element's own resizes are already watched. This is\n * for the host that moved it some other way, and for a caller who knows the\n * layout settled before any observer will say so.\n */\n remeasure: () => void;\n /** Teardown. Removes every listener and both properties. */\n stop: () => void;\n}\n\n/**\n * Start the gaze on one blobatar.\n *\n * `el` is the element whose box is measured, normally the ``. The\n * properties are written to `.mo-eyes` inside it when there is one, because\n * that is the element the stylesheet reads them on and writing higher is an\n * invalidation of the blobatar's whole subtree every frame for a value three of\n * its elements use. `apps/demo` measured that at n=200: 31fps writing to\n * `.mo-root`, 40fps writing to the eyes. The JS was never the bill, at 0.2ms\n * against frames of 40ms and up. It is what the writes provoke afterwards.\n */\nexport function gaze(el: SVGSVGElement, opts: GazeOptions = {}): Gaze {\n /*\n * Both guards are the ones `motion.css` already applies to the idle layer,\n * and they are guards rather than degradations because there is nothing to\n * degrade to: gaze with no pointer is not a reduced gaze, it is nothing.\n *\n * `prefers-reduced-motion` is the stronger of the two. Continuous motion that\n * chases the cursor is close to the top of the list of things that setting\n * exists to turn off.\n *\n * Watched rather than sampled once. Reading `.matches` at construction and\n * never again means a person turning the setting on mid-session keeps the\n * motion they just asked to be rid of until they reload, which is not what\n * the setting promises. Both queries are live, so the driver attaches and\n * detaches as they change.\n */\n const fine = matchMedia(\"(hover: hover) and (pointer: fine)\");\n const still = matchMedia(\"(prefers-reduced-motion: reduce)\");\n\n const settle = opts.settle ?? SETTLE;\n const snap = opts.snap ?? SNAP;\n\n let cx = 0;\n let cy = 0;\n let radius = 1;\n /** Rendered width, for turning the threshold into something actually seen. */\n let width = 1;\n /** The excursion, read back off the stylesheet rather than restated here. */\n let travelPx = 0;\n\n let px = -1e6;\n let py = -1e6;\n let x = 0;\n let y = 0;\n let wx = 0;\n let wy = 0;\n /**\n * How far the idle glance has stood down for the gaze, 0 to 1.\n *\n * Two systems aim one pair of eyes at different things: the saccade roves on\n * its own clock and this points at the pointer, and with both live the eyes\n * read as unable to decide. `gaze.css` damps the rove's seeds by this, so it\n * is at full amplitude before the driver attaches and gone once it has, with\n * a cross-fade in between rather than a switch.\n *\n * A single-blobatar driver has no gate, so this is simply \"is the driver\n * running\", ramped on the same exponential the excursion uses because a\n * blobatar handing its eyes over should do it at the speed it takes them. A\n * host driving a field computes its own from its falloff and writes the\n * channel itself.\n */\n let h = 0;\n let wh = 0;\n let last = 0;\n let raf = 0;\n let dirty = false;\n let on = false;\n\n /**\n * What the eyes are pointed at, split into the two questions a frame asks.\n *\n * `at` is a resolved client coordinate or `null` for \"the pointer\", and\n * `resting` overrides both with this blobatar's own centre. Between them that\n * is the only thing the aim arithmetic below needs to know. `hold` carries\n * the rest: whether the idle glance stays stood down, which is the only thing\n * `\"rest\"` and `null` disagree about. Every member of `GazeTarget` is one of\n * those combinations, and holding them as state rather than as a mode enum is\n * what stops the frame loop growing a branch per member.\n *\n * `watched` is the element behind `at` when the target was one, kept because\n * its box has to be read again every time this driver re-reads its own.\n */\n let at: { x: number; y: number } | null = null;\n let watched: Element | null = null;\n /** Whether the target is this blobatar's own centre, which is `\"rest\"` and\n `null` both. Held as a flag rather than as a resolved point, so a resting\n blobatar that scrolls goes on resting instead of drifting off the centre\n it was measured at. */\n let resting = false;\n /** Where the stand-down is heading: 1 while the driver owns the eyes, 0 once\n it has let go. See `h`. */\n let hold = 1;\n\n /**\n * Where the excursion goes. Resolved once rather than per frame: a\n * `querySelector` inside the loop would put a DOM traversal per frame back in\n * exactly the place this is trying to take work out of.\n */\n let target: SVGElement | SVGSVGElement = el;\n\n /**\n * The two eyes, and where they rest on the sphere.\n *\n * Measured off the DOM rather than emitted by the renderer, which is the\n * whole reason this layer costs no markup: `getBBox` on each eye and on the\n * body group is the geometry `layout()` already put there, read back in the\n * one place that needs it. A per-eye custom property in `parts.inner` would\n * be two more declarations on every animated blobatar on the page, gazing or\n * not, to tell the driver something it can see.\n */\n let eyes: SVGGraphicsElement[] = [];\n let marks: Mark[] = [];\n /** The face's radius on each axis, in viewBox units. */\n let frx = 50;\n let fry = 50;\n /** And the turn one unit of aim produces about each, in radians. */\n let yaw = 0;\n let pitch = 0;\n\n /**\n * Where each eye sits on the sphere, and the head they turn on.\n *\n * The measurement is `survey()`, shared with anything else that has to agree\n * with this driver about where an eye rests, so there is one bisection and\n * one answer. A blobatar with no layout box yet leaves the marks as they\n * were, and the next measure picks them up.\n */\n const face = () => {\n const f = survey(el);\n if (!f) return;\n marks = f.marks;\n frx = f.rx;\n fry = f.ry;\n };\n\n const resolve = () => {\n target = el.querySelector(\".mo-eyes\") ?? el;\n eyes = [...el.querySelectorAll(\".mo-eye\")];\n face();\n };\n\n /**\n * Re-read the watched element's centre.\n *\n * Called from `measure`, so it rides on exactly the events that already move\n * this driver's own box: scroll, resize, and the `ResizeObserver` — which\n * `start` points at the watched element too, so an element that changes size\n * without the page moving is caught as well. That is the whole argument for\n * `Element` being in the union: it is this call and one `observe`, against\n * every caller otherwise writing the same two listeners by hand.\n *\n * What it does not catch is an element moved by something none of those fire\n * for, a sibling collapsing above it inside a stable box being the usual one.\n * `remeasure()` is the seam for that, and it is the same seam the driver\n * already documents for its own box.\n */\n const follow = () => {\n if (!watched) return;\n const r = watched.getBoundingClientRect();\n at = { x: r.left + r.width / 2, y: r.top + r.height / 2 };\n };\n\n const measure = () => {\n follow();\n const r = el.getBoundingClientRect();\n cx = r.left + r.width / 2;\n cy = r.top + r.height / 2;\n /* `min`, not the width: a non-square box's near field is set by the\n smaller axis, which is the one the pointer can be inside on. */\n radius = Math.max(1, Math.min(r.width, r.height) / 2);\n width = Math.max(1, r.width);\n travelPx =\n parseFloat(getComputedStyle(target).getPropertyValue(\"--mo-track-travel\")) || 0;\n /* The silhouette is in viewBox units, so it does not move when the page\n does: it is surveyed once, on attach, and this is only the retry for a\n blobatar that had no layout box yet when the driver reached it. */\n if (!marks.length) face();\n /* The excursion as an angle: `travel` is the arc a mark at the centre of\n the face sweeps, so the turn is that arc over the radius — one per axis,\n because the radii differ. An eye off the middle covers less than that,\n which is the differential rather than a shortfall. */\n yaw = travelPx / frx;\n pitch = travelPx / fry;\n };\n\n const frame = (t: number) => {\n raf = 0;\n /* Clamped, so a tab returning from the background resolves in one step\n rather than with a `dt` measured in seconds. */\n const dt = last ? Math.min(t - last, 64) : 16;\n last = t;\n\n /*\n * The subtree may have been replaced since the last frame, and nothing\n * tells the driver so. The adapters hand `parts.inner` to\n * `dangerouslySetInnerHTML`, which React rewrites wholesale whenever it\n * changes — and it changes with the *name*, because the geometry does. The\n * `` survives, so the callback ref never fires, and the driver is left\n * holding `.mo-eyes` and both `.mo-eye`s from the blobatar that used to be\n * there. It goes on writing to them perfectly, into a detached tree nobody\n * is rendering, and the eyes on screen never move again.\n *\n * That is the hero of `blobatar.dev` after one keystroke, which is the\n * whole interaction the page exists for. A boolean read per frame buys\n * back the geometry the moment it is replaced, and the re-survey is paid\n * only on the frames where the blobatar actually changed.\n */\n if (!target.isConnected) {\n resolve();\n measure();\n /*\n * And the write cache has to go with it. `wx`/`wy` are what was last\n * written *to the old element*, so a pointer that has not moved since\n * leaves every difference under the threshold and the new eyes are never\n * written to at all — the same dead face, arrived at one step later.\n */\n wx = wy = Infinity;\n }\n\n const k = pursuit(dt, settle);\n /*\n * The one place the pointer is privileged, and only as a default.\n *\n * `\"rest\"` and `null` are the centre, and they are not a third branch here:\n * aiming at your own centre is `dx = dy = 0`, which the near-field ease\n * already resolves to an excursion of zero because there is no direction to\n * look in at something you are already on. The two words differ in `hold`,\n * below, and in nothing else.\n */\n const s = step({\n x,\n y,\n dx: resting ? 0 : (at ? at.x : px) - cx,\n dy: resting ? 0 : (at ? at.y : py) - cy,\n radius,\n k,\n snap,\n });\n x = s.x;\n y = s.y;\n\n const eps = threshold(width, travelPx);\n\n let moved = false;\n if (Math.abs(s.tx - x) <= eps && Math.abs(s.ty - y) <= eps) {\n x = s.tx;\n y = s.ty;\n } else {\n moved = true;\n }\n\n /* On the same exponential and the same arrival rule. `HOLD_EPS` is coarser\n than `eps` by an order of magnitude and deliberately so: this scales the\n rove's seeds, and a 1% change in the amplitude of a glance nobody is\n watching for is not a thing anyone can see.\n\n It runs toward `hold` rather than toward 1, which is what makes letting\n go a motion instead of an edit: `lookAt(null)` walks this back down the\n same curve it came up, so the idle saccade fades in over the time it\n takes the eyes to reach the middle rather than snapping on the moment\n they are released. */\n h += (hold - h) * k;\n if (Math.abs(hold - h) <= HOLD_EPS) h = hold;\n else moved = true;\n\n if (Math.abs(h - wh) > HOLD_EPS) {\n wh = h;\n /*\n * On `el` and not on `target`, and the nesting is the whole reason.\n * `.mo-eyes` is a descendant of `.mo-root`, custom properties inherit\n * downward only, and the rule this feeds damps `--mo-look-*` on\n * `.mo-root`: written to the eyes it would be invisible to the only\n * element that reads it, and the stand-down would silently never happen.\n * The excursion above has no such constraint because it is read on the\n * eyes themselves.\n *\n * It is also the cheap channel to put higher up. `HOLD_EPS` is an order\n * of magnitude coarser than `eps`, and the ramp runs once when the driver\n * attaches and then never again, so this is a handful of writes in total\n * against the excursion's every frame. The invalidation argument that\n * keeps the excursion off the root is an argument about per-frame writes.\n */\n el.style.setProperty(\"--mo-track-hold\", h.toFixed(3));\n moved = true;\n }\n\n if (Math.abs(x - wx) > eps || Math.abs(y - wy) > eps) {\n wx = x;\n wy = y;\n /* Still written, and still the layer's public channel: a host hanging\n anything of its own on where the eyes are pointing reads these, and\n they are the two the entry point documents. The geometry below is the\n library's own use of them, already projected. */\n target.style.setProperty(\"--mo-track-x\", x.toFixed(3));\n target.style.setProperty(\"--mo-track-y\", y.toFixed(3));\n for (let i = 0; i < marks.length && i < eyes.length; i++) {\n const p = project(marks[i]!, x * yaw, y * pitch);\n const n = i + 1;\n /* Back into viewBox units from fractions of each radius, because that\n is what the stylesheet adds them to. */\n target.style.setProperty(`--mo-gz-dx${n}`, (p.dx * frx).toFixed(3));\n target.style.setProperty(`--mo-gz-dy${n}`, (p.dy * fry).toFixed(3));\n target.style.setProperty(`--mo-gz-sx${n}`, p.sx.toFixed(4));\n target.style.setProperty(`--mo-gz-sy${n}`, p.sy.toFixed(4));\n target.style.setProperty(`--mo-gz-t${n}`, p.t.toFixed(3));\n }\n moved = true;\n }\n\n /*\n * Park once the eyes have settled. A still pointer over a settled blobatar\n * schedules no frames at all, so leaving this on costs nothing while nobody\n * is moving, which is most of the time a page is open.\n */\n if (moved || dirty) {\n dirty = false;\n raf = requestAnimationFrame(frame);\n } else {\n last = 0;\n }\n };\n\n const wake = () => {\n if (!on) return;\n dirty = true;\n if (!raf) raf = requestAnimationFrame(frame);\n };\n\n const onMove = (e: PointerEvent) => {\n px = e.clientX;\n py = e.clientY;\n wake();\n };\n\n /*\n * The pointer leaving the window is a state and not just an absence: the eyes\n * return to centre rather than holding their last glance at an edge. Parking\n * it far outside gives that for free, because the near-field ease is what\n * brings them home and it does not care which direction \"away\" is.\n */\n const onLeave = () => {\n px = -1e6;\n py = -1e6;\n wake();\n };\n\n /*\n * Scroll and resize are most of what moves the face under a still pointer,\n * and they are the reason the centre is cached rather than measured per\n * frame: one `getBoundingClientRect` per scroll event beats one per pointer\n * move, and the pointer moves far more often.\n */\n const onGeom = () => {\n measure();\n wake();\n };\n\n /*\n * The rest of what moves it, and the reason this is not left to those two.\n * Neither fires for a reflow inside a stable window: a webfont swapping in\n * above the blobatar, an image resolving its intrinsic size, a layout\n * settling after hydration. A driver holding a stale centre through one of\n * those aims at where the face used to be. That failure hides at a distance,\n * where the direction to a centre 40px off is nearly the right one, and only\n * shows up close, which is the worst way for it to show up.\n */\n const resized = new ResizeObserver(onGeom);\n\n const start = () => {\n if (on) return;\n on = true;\n resolve();\n measure();\n resized.observe(el);\n if (watched) resized.observe(watched);\n addEventListener(\"pointermove\", onMove, { passive: true });\n addEventListener(\"pointerleave\", onLeave, { passive: true });\n addEventListener(\"scroll\", onGeom, { passive: true, capture: true });\n addEventListener(\"resize\", onGeom, { passive: true });\n wake();\n };\n\n const halt = () => {\n if (!on) return;\n on = false;\n resized.disconnect();\n removeEventListener(\"pointermove\", onMove);\n removeEventListener(\"pointerleave\", onLeave);\n removeEventListener(\"scroll\", onGeom, { capture: true });\n removeEventListener(\"resize\", onGeom);\n if (raf) cancelAnimationFrame(raf);\n raf = 0;\n last = 0;\n /* Released rather than left at the last glance: the initial value is 0, so\n the stylesheet puts the eyes back where it would have without a driver. */\n x = y = wx = wy = h = wh = 0;\n target.style.removeProperty(\"--mo-track-x\");\n target.style.removeProperty(\"--mo-track-y\");\n /* The projection has no registered initial value to fall back to — these\n are substituted, not interpolated — so removing them is what hands the\n eyes back to the fallbacks in `gaze.css`, which are the identity. Left\n behind, a detached driver would freeze a turned, foreshortened pair in\n as a constant offset on a blobatar that is no longer looking at\n anything. */\n for (let i = 1; i <= eyes.length; i++)\n for (const k of [\"dx\", \"dy\", \"sx\", \"sy\", \"t\"])\n target.style.removeProperty(`--mo-gz-${k}${i}`);\n el.style.removeProperty(\"--mo-track-hold\");\n };\n\n /** Whichever way the queries moved, this is the state they imply. */\n const sync = () => (fine.matches && !still.matches ? start() : halt());\n\n fine.addEventListener(\"change\", sync);\n still.addEventListener(\"change\", sync);\n sync();\n\n /**\n * The one place a `GazeTarget` is turned into the state the frame loop reads.\n *\n * A setter rather than a value read per frame. A settled blobatar runs no\n * frames, so a driver that only *read* its target would never notice one\n * being set. The pointer moving is what keeps the loop alive for every other\n * input, and this one is set by code rather than by a hand.\n *\n * The element is duck-typed rather than `instanceof Element`, which is not\n * pedantry: an element from another document — an `
b`). + // Includes `lineEnding`, `htmlTextData`. + htmlText: "htmlText", + htmlTextData: "htmlTextData", + // Whole image (`![alpha](bravo)`, `![alpha][bravo]`, `![alpha][]`, or + // `![alpha]`). + // Includes `label` and an optional `resource` or `reference`. + image: "image", + // Whole link label (`[*alpha*]`). + // Includes `labelLink` or `labelImage`, `labelText`, and `labelEnd`. + label: "label", + // Text in an label (`*alpha*`). + // Includes text. + labelText: "labelText", + // Start a link label (`[`). + // Includes a `labelMarker`. + labelLink: "labelLink", + // Start an image label (`![`). + // Includes `labelImageMarker` and `labelMarker`. + labelImage: "labelImage", + // Marker of a label (`[` or `]`). + labelMarker: "labelMarker", + // Marker to start an image (`!`). + labelImageMarker: "labelImageMarker", + // End a label (`]`). + // Includes `labelMarker`. + labelEnd: "labelEnd", + // Whole link (`[alpha](bravo)`, `[alpha][bravo]`, `[alpha][]`, or `[alpha]`). + // Includes `label` and an optional `resource` or `reference`. + link: "link", + // Whole paragraph: + // + // ```markdown + // alpha + // bravo. + // ``` + // + // Includes text. + paragraph: "paragraph", + // A reference (`[alpha]` or `[]`). + // Includes `referenceMarker` and an optional `referenceString`. + reference: "reference", + // A reference marker (`[` or `]`). + referenceMarker: "referenceMarker", + // Reference text (`alpha`). + // Includes string. + referenceString: "referenceString", + // A resource (`(https://example.com "alpha")`). + // Includes `resourceMarker`, an optional `resourceDestination` with an optional + // `whitespace` and `resourceTitle`. + resource: "resource", + // A resource destination (`https://example.com`). + // Includes `resourceDestinationLiteral` or `resourceDestinationRaw`. + resourceDestination: "resourceDestination", + // A literal resource destination (``). + // Includes `resourceDestinationLiteralMarker` and optionally + // `resourceDestinationString`. + resourceDestinationLiteral: "resourceDestinationLiteral", + // A resource destination marker (`<` or `>`). + resourceDestinationLiteralMarker: "resourceDestinationLiteralMarker", + // A raw resource destination (`https://example.com`). + // Includes `resourceDestinationString`. + resourceDestinationRaw: "resourceDestinationRaw", + // Resource destination text (`https://example.com`). + // Includes string. + resourceDestinationString: "resourceDestinationString", + // A resource marker (`(` or `)`). + resourceMarker: "resourceMarker", + // A resource title (`"alpha"`, `'alpha'`, or `(alpha)`). + // Includes `resourceTitleMarker` and optionally `resourceTitleString`. + resourceTitle: "resourceTitle", + // A resource title marker (`"`, `'`, `(`, or `)`). + resourceTitleMarker: "resourceTitleMarker", + // Resource destination title (`alpha`). + // Includes string. + resourceTitleString: "resourceTitleString", + // Whole setext heading: + // + // ```markdown + // alpha + // bravo + // ===== + // ``` + // + // Includes `setextHeadingText`, `lineEnding`, `linePrefix`, and + // `setextHeadingLine`. + setextHeading: "setextHeading", + // Content in a setext heading (`alpha\nbravo`). + // Includes text. + setextHeadingText: "setextHeadingText", + // Underline in a setext heading, including whitespace suffix (`==`). + // Includes `setextHeadingLineSequence`. + setextHeadingLine: "setextHeadingLine", + // Sequence of equals or dash characters in underline in a setext heading (`-`). + setextHeadingLineSequence: "setextHeadingLineSequence", + // Strong (`**alpha**`). + // Includes `strongSequence` and `strongText`. + strong: "strong", + // Sequence of strong markers (`**` or `__`). + strongSequence: "strongSequence", + // Strong text (`alpha`). + // Includes text. + strongText: "strongText", + // Whole thematic break: + // + // ```markdown + // * * * + // ``` + // + // Includes `thematicBreakSequence` and `whitespace`. + thematicBreak: "thematicBreak", + // A sequence of one or more thematic break markers (`***`). + thematicBreakSequence: "thematicBreakSequence", + // Whole block quote: + // + // ```markdown + // > a + // > + // > b + // ``` + // + // Includes `blockQuotePrefix` and flow. + blockQuote: "blockQuote", + // The `>` or `> ` of a block quote. + blockQuotePrefix: "blockQuotePrefix", + // The `>` of a block quote prefix. + blockQuoteMarker: "blockQuoteMarker", + // The optional ` ` of a block quote prefix. + blockQuotePrefixWhitespace: "blockQuotePrefixWhitespace", + // Whole ordered list: + // + // ```markdown + // 1. a + // b + // ``` + // + // Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further + // lines. + listOrdered: "listOrdered", + // Whole unordered list: + // + // ```markdown + // - a + // b + // ``` + // + // Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further + // lines. + listUnordered: "listUnordered", + // The indent of further list item lines. + listItemIndent: "listItemIndent", + // A marker, as in, `*`, `+`, `-`, `.`, or `)`. + listItemMarker: "listItemMarker", + // The thing that starts a list item, such as `1. `. + // Includes `listItemValue` if ordered, `listItemMarker`, and + // `listItemPrefixWhitespace` (unless followed by a line ending). + listItemPrefix: "listItemPrefix", + // The whitespace after a marker. + listItemPrefixWhitespace: "listItemPrefixWhitespace", + // The numerical value of an ordered item. + listItemValue: "listItemValue", + // Internal types used for subtokenizers, compiled away + chunkDocument: "chunkDocument", + chunkContent: "chunkContent", + chunkFlow: "chunkFlow", + chunkText: "chunkText", + chunkString: "chunkString" + } +); + +// ../node_modules/micromark-util-symbol/lib/values.js +var values = ( + /** @type {const} */ + { + ht: " ", + lf: "\n", + cr: "\r", + space: " ", + exclamationMark: "!", + quotationMark: '"', + numberSign: "#", + dollarSign: "$", + percentSign: "%", + ampersand: "&", + apostrophe: "'", + leftParenthesis: "(", + rightParenthesis: ")", + asterisk: "*", + plusSign: "+", + comma: ",", + dash: "-", + dot: ".", + slash: "/", + digit0: "0", + digit1: "1", + digit2: "2", + digit3: "3", + digit4: "4", + digit5: "5", + digit6: "6", + digit7: "7", + digit8: "8", + digit9: "9", + colon: ":", + semicolon: ";", + lessThan: "<", + equalsTo: "=", + greaterThan: ">", + questionMark: "?", + atSign: "@", + uppercaseA: "A", + uppercaseB: "B", + uppercaseC: "C", + uppercaseD: "D", + uppercaseE: "E", + uppercaseF: "F", + uppercaseG: "G", + uppercaseH: "H", + uppercaseI: "I", + uppercaseJ: "J", + uppercaseK: "K", + uppercaseL: "L", + uppercaseM: "M", + uppercaseN: "N", + uppercaseO: "O", + uppercaseP: "P", + uppercaseQ: "Q", + uppercaseR: "R", + uppercaseS: "S", + uppercaseT: "T", + uppercaseU: "U", + uppercaseV: "V", + uppercaseW: "W", + uppercaseX: "X", + uppercaseY: "Y", + uppercaseZ: "Z", + leftSquareBracket: "[", + backslash: "\\", + rightSquareBracket: "]", + caret: "^", + underscore: "_", + graveAccent: "`", + lowercaseA: "a", + lowercaseB: "b", + lowercaseC: "c", + lowercaseD: "d", + lowercaseE: "e", + lowercaseF: "f", + lowercaseG: "g", + lowercaseH: "h", + lowercaseI: "i", + lowercaseJ: "j", + lowercaseK: "k", + lowercaseL: "l", + lowercaseM: "m", + lowercaseN: "n", + lowercaseO: "o", + lowercaseP: "p", + lowercaseQ: "q", + lowercaseR: "r", + lowercaseS: "s", + lowercaseT: "t", + lowercaseU: "u", + lowercaseV: "v", + lowercaseW: "w", + lowercaseX: "x", + lowercaseY: "y", + lowercaseZ: "z", + leftCurlyBrace: "{", + verticalBar: "|", + rightCurlyBrace: "}", + tilde: "~", + replacementCharacter: "�" + } +); + +// ../node_modules/micromark-util-chunked/dev/index.js +function splice(list2, start, remove, items) { + const end = list2.length; + let chunkStart = 0; + let parameters; + if (start < 0) { + start = -start > end ? 0 : end + start; + } else { + start = start > end ? end : start; + } + remove = remove > 0 ? remove : 0; + if (items.length < constants.v8MaxSafeChunkSize) { + parameters = Array.from(items); + parameters.unshift(start, remove); + list2.splice(...parameters); + } else { + if (remove) list2.splice(start, remove); + while (chunkStart < items.length) { + parameters = items.slice( + chunkStart, + chunkStart + constants.v8MaxSafeChunkSize + ); + parameters.unshift(start, 0); + list2.splice(...parameters); + chunkStart += constants.v8MaxSafeChunkSize; + start += constants.v8MaxSafeChunkSize; + } + } +} +function push(list2, items) { + if (list2.length > 0) { + splice(list2, list2.length, 0, items); + return list2; + } + return items; +} + +// ../node_modules/micromark-util-combine-extensions/index.js +var hasOwnProperty = {}.hasOwnProperty; +function combineExtensions(extensions) { + const all2 = {}; + let index = -1; + while (++index < extensions.length) { + syntaxExtension(all2, extensions[index]); + } + return all2; +} +function syntaxExtension(all2, extension) { + let hook; + for (hook in extension) { + const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0; + const left = maybe || (all2[hook] = {}); + const right = extension[hook]; + let code; + if (right) { + for (code in right) { + if (!hasOwnProperty.call(left, code)) left[code] = []; + const value = right[code]; + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ); + } + } + } +} +function constructs(existing, list2) { + let index = -1; + const before = []; + while (++index < list2.length) { + ; + (list2[index].add === "after" ? existing : before).push(list2[index]); + } + splice(existing, 0, 0, before); +} + +// ../node_modules/mdast-util-to-string/lib/index.js +var emptyOptions = {}; +function toString(value, options) { + const settings = options || emptyOptions; + const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true; + const includeHtml = typeof settings.includeHtml === "boolean" ? settings.includeHtml : true; + return one(value, includeImageAlt, includeHtml); +} +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ("value" in value) { + return value.type === "html" && !includeHtml ? "" : value.value; + } + if (includeImageAlt && "alt" in value && value.alt) { + return value.alt; + } + if ("children" in value) { + return all(value.children, includeImageAlt, includeHtml); + } + } + if (Array.isArray(value)) { + return all(value, includeImageAlt, includeHtml); + } + return ""; +} +function all(values2, includeImageAlt, includeHtml) { + const result = []; + let index = -1; + while (++index < values2.length) { + result[index] = one(values2[index], includeImageAlt, includeHtml); + } + return result.join(""); +} +function node(value) { + return Boolean(value && typeof value === "object"); +} + +// ../node_modules/decode-named-character-reference/index.dom.js +var element = document.createElement("i"); +function decodeNamedCharacterReference(value) { + const characterReference2 = "&" + value + ";"; + element.innerHTML = characterReference2; + const character = element.textContent; + if (character.charCodeAt(character.length - 1) === 59 && value !== "semi") { + return false; + } + return character === characterReference2 ? false : character; +} + +// ../node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base); + if ( + // C0 except for HT, LF, FF, CR, space. + code < codes.ht || code === codes.vt || code > codes.cr && code < codes.space || // Control character (DEL) of C0, and C1 controls. + code > codes.tilde && code < 160 || // Lone high surrogates and low surrogates. + code > 55295 && code < 57344 || // Noncharacters. + code > 64975 && code < 65008 || /* eslint-disable no-bitwise */ + (code & 65535) === 65535 || (code & 65535) === 65534 || /* eslint-enable no-bitwise */ + // Out of range + code > 1114111 + ) { + return values.replacementCharacter; + } + return String.fromCodePoint(code); +} + +// ../node_modules/micromark-util-normalize-identifier/dev/index.js +function normalizeIdentifier(value) { + return value.replace(/[\t\n\r ]+/g, values.space).replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} + +// ../node_modules/micromark-util-character/dev/index.js +var asciiAlpha = regexCheck(/[A-Za-z]/); +var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/); +var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/); +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < codes.space || code === codes.del) + ); +} +var asciiDigit = regexCheck(/\d/); +var asciiHexDigit = regexCheck(/[\dA-Fa-f]/); +var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/); +function markdownLineEnding(code) { + return code !== null && code < codes.horizontalTab; +} +function markdownLineEndingOrSpace(code) { + return code !== null && (code < codes.nul || code === codes.space); +} +function markdownSpace(code) { + return code === codes.horizontalTab || code === codes.virtualSpace || code === codes.space; +} +var unicodePunctuation = regexCheck(new RegExp("\\p{P}|\\p{S}", "u")); +var unicodeWhitespace = regexCheck(/\s/); +function regexCheck(regex) { + return check; + function check(code) { + return code !== null && code > -1 && regex.test(String.fromCharCode(code)); + } +} + +// ../node_modules/micromark-util-sanitize-uri/dev/index.js +function normalizeUri(value) { + const result = []; + let index = -1; + let start = 0; + let skip = 0; + while (++index < value.length) { + const code = value.charCodeAt(index); + let replace = ""; + if (code === codes.percentSign && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) { + skip = 2; + } else if (code < 128) { + if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) { + replace = String.fromCharCode(code); + } + } else if (code > 55295 && code < 57344) { + const next = value.charCodeAt(index + 1); + if (code < 56320 && next > 56319 && next < 57344) { + replace = String.fromCharCode(code, next); + skip = 1; + } else { + replace = values.replacementCharacter; + } + } else { + replace = String.fromCharCode(code); + } + if (replace) { + result.push(value.slice(start, index), encodeURIComponent(replace)); + start = index + skip + 1; + replace = ""; + } + if (skip) { + index += skip; + skip = 0; + } + } + return result.join("") + value.slice(start); +} + +// ../node_modules/micromark-factory-space/dev/index.js +function factorySpace(effects, ok3, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY; + let size = 0; + return start; + function start(code) { + if (markdownSpace(code)) { + effects.enter(type); + return prefix(code); + } + return ok3(code); + } + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code); + return prefix; + } + effects.exit(type); + return ok3(code); + } +} + +// ../node_modules/micromark-util-classify-character/dev/index.js +function classifyCharacter(code) { + if (code === codes.eof || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { + return constants.characterGroupWhitespace; + } + if (unicodePunctuation(code)) { + return constants.characterGroupPunctuation; + } +} + +// ../node_modules/micromark-util-resolve-all/index.js +function resolveAll(constructs2, events, context) { + const called = []; + let index = -1; + while (++index < constructs2.length) { + const resolve = constructs2[index].resolveAll; + if (resolve && !called.includes(resolve)) { + events = resolve(events, context); + called.push(resolve); + } + } + return events; +} + +// ../node_modules/micromark-core-commonmark/dev/lib/blank-line.js +var blankLine = { partial: true, tokenize: tokenizeBlankLine }; +function tokenizeBlankLine(effects, ok3, nok) { + return start; + function start(code) { + return markdownSpace(code) ? factorySpace(effects, after, types.linePrefix)(code) : after(code); + } + function after(code) { + return code === codes.eof || markdownLineEnding(code) ? ok3(code) : nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/attention.js +var attention = { + name: "attention", + resolveAll: resolveAllAttention, + tokenize: tokenizeAttention +}; +function resolveAllAttention(events, context) { + let index = -1; + let open; + let group; + let text; + let openingSequence; + let closingSequence; + let use; + let nextEvents; + let offset; + while (++index < events.length) { + if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) { + open = index; + while (open--) { + if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) { + if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) { + continue; + } + use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1; + const start = { ...events[open][1].end }; + const end = { ...events[index][1].start }; + movePoint(start, -use); + movePoint(end, use); + openingSequence = { + type: use > 1 ? types.strongSequence : types.emphasisSequence, + start, + end: { ...events[open][1].end } + }; + closingSequence = { + type: use > 1 ? types.strongSequence : types.emphasisSequence, + start: { ...events[index][1].start }, + end + }; + text = { + type: use > 1 ? types.strongText : types.emphasisText, + start: { ...events[open][1].end }, + end: { ...events[index][1].start } + }; + group = { + type: use > 1 ? types.strong : types.emphasis, + start: { ...openingSequence.start }, + end: { ...closingSequence.end } + }; + events[open][1].end = { ...openingSequence.start }; + events[index][1].start = { ...closingSequence.end }; + nextEvents = []; + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ["enter", events[open][1], context], + ["exit", events[open][1], context] + ]); + } + nextEvents = push(nextEvents, [ + ["enter", group, context], + ["enter", openingSequence, context], + ["exit", openingSequence, context], + ["enter", text, context] + ]); + ok( + context.parser.constructs.insideSpan.null, + "expected `insideSpan` to be populated" + ); + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ); + nextEvents = push(nextEvents, [ + ["exit", text, context], + ["enter", closingSequence, context], + ["exit", closingSequence, context], + ["exit", group, context] + ]); + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2; + nextEvents = push(nextEvents, [ + ["enter", events[index][1], context], + ["exit", events[index][1], context] + ]); + } else { + offset = 0; + } + splice(events, open - 1, index - open + 3, nextEvents); + index = open + nextEvents.length - offset - 2; + break; + } + } + } + } + index = -1; + while (++index < events.length) { + if (events[index][1].type === "attentionSequence") { + events[index][1].type = "data"; + } + } + return events; +} +function tokenizeAttention(effects, ok3) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null; + const previous2 = this.previous; + const before = classifyCharacter(previous2); + let marker; + return start; + function start(code) { + ok( + code === codes.asterisk || code === codes.underscore, + "expected asterisk or underscore" + ); + marker = code; + effects.enter("attentionSequence"); + return inside(code); + } + function inside(code) { + if (code === marker) { + effects.consume(code); + return inside; + } + const token = effects.exit("attentionSequence"); + const after = classifyCharacter(code); + ok(attentionMarkers, "expected `attentionMarkers` to be populated"); + const open = !after || after === constants.characterGroupPunctuation && before || attentionMarkers.includes(code); + const close = !before || before === constants.characterGroupPunctuation && after || attentionMarkers.includes(previous2); + token._open = Boolean( + marker === codes.asterisk ? open : open && (before || !close) + ); + token._close = Boolean( + marker === codes.asterisk ? close : close && (after || !open) + ); + return ok3(code); + } +} +function movePoint(point, offset) { + point.column += offset; + point.offset += offset; + point._bufferIndex += offset; +} + +// ../node_modules/micromark-core-commonmark/dev/lib/autolink.js +var autolink = { name: "autolink", tokenize: tokenizeAutolink }; +function tokenizeAutolink(effects, ok3, nok) { + let size = 0; + return start; + function start(code) { + ok(code === codes.lessThan, "expected `<`"); + effects.enter(types.autolink); + effects.enter(types.autolinkMarker); + effects.consume(code); + effects.exit(types.autolinkMarker); + effects.enter(types.autolinkProtocol); + return open; + } + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return schemeOrEmailAtext; + } + if (code === codes.atSign) { + return nok(code); + } + return emailAtext(code); + } + function schemeOrEmailAtext(code) { + if (code === codes.plusSign || code === codes.dash || code === codes.dot || asciiAlphanumeric(code)) { + size = 1; + return schemeInsideOrEmailAtext(code); + } + return emailAtext(code); + } + function schemeInsideOrEmailAtext(code) { + if (code === codes.colon) { + effects.consume(code); + size = 0; + return urlInside; + } + if ((code === codes.plusSign || code === codes.dash || code === codes.dot || asciiAlphanumeric(code)) && size++ < constants.autolinkSchemeSizeMax) { + effects.consume(code); + return schemeInsideOrEmailAtext; + } + size = 0; + return emailAtext(code); + } + function urlInside(code) { + if (code === codes.greaterThan) { + effects.exit(types.autolinkProtocol); + effects.enter(types.autolinkMarker); + effects.consume(code); + effects.exit(types.autolinkMarker); + effects.exit(types.autolink); + return ok3; + } + if (code === codes.eof || code === codes.space || code === codes.lessThan || asciiControl(code)) { + return nok(code); + } + effects.consume(code); + return urlInside; + } + function emailAtext(code) { + if (code === codes.atSign) { + effects.consume(code); + return emailAtSignOrDot; + } + if (asciiAtext(code)) { + effects.consume(code); + return emailAtext; + } + return nok(code); + } + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code); + } + function emailLabel(code) { + if (code === codes.dot) { + effects.consume(code); + size = 0; + return emailAtSignOrDot; + } + if (code === codes.greaterThan) { + effects.exit(types.autolinkProtocol).type = types.autolinkEmail; + effects.enter(types.autolinkMarker); + effects.consume(code); + effects.exit(types.autolinkMarker); + effects.exit(types.autolink); + return ok3; + } + return emailValue(code); + } + function emailValue(code) { + if ((code === codes.dash || asciiAlphanumeric(code)) && size++ < constants.autolinkDomainSizeMax) { + const next = code === codes.dash ? emailValue : emailLabel; + effects.consume(code); + return next; + } + return nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/block-quote.js +var blockQuote = { + continuation: { tokenize: tokenizeBlockQuoteContinuation }, + exit, + name: "blockQuote", + tokenize: tokenizeBlockQuoteStart +}; +function tokenizeBlockQuoteStart(effects, ok3, nok) { + const self = this; + return start; + function start(code) { + if (code === codes.greaterThan) { + const state = self.containerState; + ok(state, "expected `containerState` to be defined in container"); + if (!state.open) { + effects.enter(types.blockQuote, { _container: true }); + state.open = true; + } + effects.enter(types.blockQuotePrefix); + effects.enter(types.blockQuoteMarker); + effects.consume(code); + effects.exit(types.blockQuoteMarker); + return after; + } + return nok(code); + } + function after(code) { + if (markdownSpace(code)) { + effects.enter(types.blockQuotePrefixWhitespace); + effects.consume(code); + effects.exit(types.blockQuotePrefixWhitespace); + effects.exit(types.blockQuotePrefix); + return ok3; + } + effects.exit(types.blockQuotePrefix); + return ok3(code); + } +} +function tokenizeBlockQuoteContinuation(effects, ok3, nok) { + const self = this; + return contStart; + function contStart(code) { + if (markdownSpace(code)) { + ok( + self.parser.constructs.disable.null, + "expected `disable.null` to be populated" + ); + return factorySpace( + effects, + contBefore, + types.linePrefix, + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize + )(code); + } + return contBefore(code); + } + function contBefore(code) { + return effects.attempt(blockQuote, ok3, nok)(code); + } +} +function exit(effects) { + effects.exit(types.blockQuote); +} + +// ../node_modules/micromark-core-commonmark/dev/lib/character-escape.js +var characterEscape = { + name: "characterEscape", + tokenize: tokenizeCharacterEscape +}; +function tokenizeCharacterEscape(effects, ok3, nok) { + return start; + function start(code) { + ok(code === codes.backslash, "expected `\\`"); + effects.enter(types.characterEscape); + effects.enter(types.escapeMarker); + effects.consume(code); + effects.exit(types.escapeMarker); + return inside; + } + function inside(code) { + if (asciiPunctuation(code)) { + effects.enter(types.characterEscapeValue); + effects.consume(code); + effects.exit(types.characterEscapeValue); + effects.exit(types.characterEscape); + return ok3; + } + return nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/character-reference.js +var characterReference = { + name: "characterReference", + tokenize: tokenizeCharacterReference +}; +function tokenizeCharacterReference(effects, ok3, nok) { + const self = this; + let size = 0; + let max; + let test; + return start; + function start(code) { + ok(code === codes.ampersand, "expected `&`"); + effects.enter(types.characterReference); + effects.enter(types.characterReferenceMarker); + effects.consume(code); + effects.exit(types.characterReferenceMarker); + return open; + } + function open(code) { + if (code === codes.numberSign) { + effects.enter(types.characterReferenceMarkerNumeric); + effects.consume(code); + effects.exit(types.characterReferenceMarkerNumeric); + return numeric; + } + effects.enter(types.characterReferenceValue); + max = constants.characterReferenceNamedSizeMax; + test = asciiAlphanumeric; + return value(code); + } + function numeric(code) { + if (code === codes.uppercaseX || code === codes.lowercaseX) { + effects.enter(types.characterReferenceMarkerHexadecimal); + effects.consume(code); + effects.exit(types.characterReferenceMarkerHexadecimal); + effects.enter(types.characterReferenceValue); + max = constants.characterReferenceHexadecimalSizeMax; + test = asciiHexDigit; + return value; + } + effects.enter(types.characterReferenceValue); + max = constants.characterReferenceDecimalSizeMax; + test = asciiDigit; + return value(code); + } + function value(code) { + if (code === codes.semicolon && size) { + const token = effects.exit(types.characterReferenceValue); + if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) { + return nok(code); + } + effects.enter(types.characterReferenceMarker); + effects.consume(code); + effects.exit(types.characterReferenceMarker); + effects.exit(types.characterReference); + return ok3; + } + if (test(code) && size++ < max) { + effects.consume(code); + return value; + } + return nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +var nonLazyContinuation = { + partial: true, + tokenize: tokenizeNonLazyContinuation +}; +var codeFenced = { + concrete: true, + name: "codeFenced", + tokenize: tokenizeCodeFenced +}; +function tokenizeCodeFenced(effects, ok3, nok) { + const self = this; + const closeStart = { partial: true, tokenize: tokenizeCloseStart }; + let initialPrefix = 0; + let sizeOpen = 0; + let marker; + return start; + function start(code) { + return beforeSequenceOpen(code); + } + function beforeSequenceOpen(code) { + ok( + code === codes.graveAccent || code === codes.tilde, + "expected `` ` `` or `~`" + ); + const tail = self.events[self.events.length - 1]; + initialPrefix = tail && tail[1].type === types.linePrefix ? tail[2].sliceSerialize(tail[1], true).length : 0; + marker = code; + effects.enter(types.codeFenced); + effects.enter(types.codeFencedFence); + effects.enter(types.codeFencedFenceSequence); + return sequenceOpen(code); + } + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++; + effects.consume(code); + return sequenceOpen; + } + if (sizeOpen < constants.codeFencedSequenceSizeMin) { + return nok(code); + } + effects.exit(types.codeFencedFenceSequence); + return markdownSpace(code) ? factorySpace(effects, infoBefore, types.whitespace)(code) : infoBefore(code); + } + function infoBefore(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.codeFencedFence); + return self.interrupt ? ok3(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code); + } + effects.enter(types.codeFencedFenceInfo); + effects.enter(types.chunkString, { contentType: constants.contentTypeString }); + return info(code); + } + function info(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.chunkString); + effects.exit(types.codeFencedFenceInfo); + return infoBefore(code); + } + if (markdownSpace(code)) { + effects.exit(types.chunkString); + effects.exit(types.codeFencedFenceInfo); + return factorySpace(effects, metaBefore, types.whitespace)(code); + } + if (code === codes.graveAccent && code === marker) { + return nok(code); + } + effects.consume(code); + return info; + } + function metaBefore(code) { + if (code === codes.eof || markdownLineEnding(code)) { + return infoBefore(code); + } + effects.enter(types.codeFencedFenceMeta); + effects.enter(types.chunkString, { contentType: constants.contentTypeString }); + return meta(code); + } + function meta(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.chunkString); + effects.exit(types.codeFencedFenceMeta); + return infoBefore(code); + } + if (code === codes.graveAccent && code === marker) { + return nok(code); + } + effects.consume(code); + return meta; + } + function atNonLazyBreak(code) { + ok(markdownLineEnding(code), "expected eol"); + return effects.attempt(closeStart, after, contentBefore)(code); + } + function contentBefore(code) { + ok(markdownLineEnding(code), "expected eol"); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return contentStart; + } + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) ? factorySpace( + effects, + beforeContentChunk, + types.linePrefix, + initialPrefix + 1 + )(code) : beforeContentChunk(code); + } + function beforeContentChunk(code) { + if (code === codes.eof || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code); + } + effects.enter(types.codeFlowValue); + return contentChunk(code); + } + function contentChunk(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.codeFlowValue); + return beforeContentChunk(code); + } + effects.consume(code); + return contentChunk; + } + function after(code) { + effects.exit(types.codeFenced); + return ok3(code); + } + function tokenizeCloseStart(effects2, ok4, nok2) { + let size = 0; + return startBefore; + function startBefore(code) { + ok(markdownLineEnding(code), "expected eol"); + effects2.enter(types.lineEnding); + effects2.consume(code); + effects2.exit(types.lineEnding); + return start2; + } + function start2(code) { + ok( + self.parser.constructs.disable.null, + "expected `disable.null` to be populated" + ); + effects2.enter(types.codeFencedFence); + return markdownSpace(code) ? factorySpace( + effects2, + beforeSequenceClose, + types.linePrefix, + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize + )(code) : beforeSequenceClose(code); + } + function beforeSequenceClose(code) { + if (code === marker) { + effects2.enter(types.codeFencedFenceSequence); + return sequenceClose(code); + } + return nok2(code); + } + function sequenceClose(code) { + if (code === marker) { + size++; + effects2.consume(code); + return sequenceClose; + } + if (size >= sizeOpen) { + effects2.exit(types.codeFencedFenceSequence); + return markdownSpace(code) ? factorySpace(effects2, sequenceCloseAfter, types.whitespace)(code) : sequenceCloseAfter(code); + } + return nok2(code); + } + function sequenceCloseAfter(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects2.exit(types.codeFencedFence); + return ok4(code); + } + return nok2(code); + } + } +} +function tokenizeNonLazyContinuation(effects, ok3, nok) { + const self = this; + return start; + function start(code) { + if (code === codes.eof) { + return nok(code); + } + ok(markdownLineEnding(code), "expected eol"); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return lineStart; + } + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok3(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/code-indented.js +var codeIndented = { + name: "codeIndented", + tokenize: tokenizeCodeIndented +}; +var furtherStart = { partial: true, tokenize: tokenizeFurtherStart }; +function tokenizeCodeIndented(effects, ok3, nok) { + const self = this; + return start; + function start(code) { + ok(markdownSpace(code)); + effects.enter(types.codeIndented); + return factorySpace( + effects, + afterPrefix, + types.linePrefix, + constants.tabSize + 1 + )(code); + } + function afterPrefix(code) { + const tail = self.events[self.events.length - 1]; + return tail && tail[1].type === types.linePrefix && tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize ? atBreak(code) : nok(code); + } + function atBreak(code) { + if (code === codes.eof) { + return after(code); + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code); + } + effects.enter(types.codeFlowValue); + return inside(code); + } + function inside(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.codeFlowValue); + return atBreak(code); + } + effects.consume(code); + return inside; + } + function after(code) { + effects.exit(types.codeIndented); + return ok3(code); + } +} +function tokenizeFurtherStart(effects, ok3, nok) { + const self = this; + return furtherStart2; + function furtherStart2(code) { + if (self.parser.lazy[self.now().line]) { + return nok(code); + } + if (markdownLineEnding(code)) { + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return furtherStart2; + } + return factorySpace( + effects, + afterPrefix, + types.linePrefix, + constants.tabSize + 1 + )(code); + } + function afterPrefix(code) { + const tail = self.events[self.events.length - 1]; + return tail && tail[1].type === types.linePrefix && tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize ? ok3(code) : markdownLineEnding(code) ? furtherStart2(code) : nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/code-text.js +var codeText = { + name: "codeText", + previous, + resolve: resolveCodeText, + tokenize: tokenizeCodeText +}; +function resolveCodeText(events) { + let tailExitIndex = events.length - 4; + let headEnterIndex = 3; + let index; + let enter; + if ((events[headEnterIndex][1].type === types.lineEnding || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === types.lineEnding || events[tailExitIndex][1].type === "space")) { + index = headEnterIndex; + while (++index < tailExitIndex) { + if (events[index][1].type === types.codeTextData) { + events[headEnterIndex][1].type = types.codeTextPadding; + events[tailExitIndex][1].type = types.codeTextPadding; + headEnterIndex += 2; + tailExitIndex -= 2; + break; + } + } + } + index = headEnterIndex - 1; + tailExitIndex++; + while (++index <= tailExitIndex) { + if (enter === void 0) { + if (index !== tailExitIndex && events[index][1].type !== types.lineEnding) { + enter = index; + } + } else if (index === tailExitIndex || events[index][1].type === types.lineEnding) { + events[enter][1].type = types.codeTextData; + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end; + events.splice(enter + 2, index - enter - 2); + tailExitIndex -= index - enter - 2; + index = enter + 2; + } + enter = void 0; + } + } + return events; +} +function previous(code) { + return code !== codes.graveAccent || this.events[this.events.length - 1][1].type === types.characterEscape; +} +function tokenizeCodeText(effects, ok3, nok) { + const self = this; + let sizeOpen = 0; + let size; + let token; + return start; + function start(code) { + ok(code === codes.graveAccent, "expected `` ` ``"); + ok(previous.call(self, self.previous), "expected correct previous"); + effects.enter(types.codeText); + effects.enter(types.codeTextSequence); + return sequenceOpen(code); + } + function sequenceOpen(code) { + if (code === codes.graveAccent) { + effects.consume(code); + sizeOpen++; + return sequenceOpen; + } + effects.exit(types.codeTextSequence); + return between(code); + } + function between(code) { + if (code === codes.eof) { + return nok(code); + } + if (code === codes.space) { + effects.enter("space"); + effects.consume(code); + effects.exit("space"); + return between; + } + if (code === codes.graveAccent) { + token = effects.enter(types.codeTextSequence); + size = 0; + return sequenceClose(code); + } + if (markdownLineEnding(code)) { + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return between; + } + effects.enter(types.codeTextData); + return data(code); + } + function data(code) { + if (code === codes.eof || code === codes.space || code === codes.graveAccent || markdownLineEnding(code)) { + effects.exit(types.codeTextData); + return between(code); + } + effects.consume(code); + return data; + } + function sequenceClose(code) { + if (code === codes.graveAccent) { + effects.consume(code); + size++; + return sequenceClose; + } + if (size === sizeOpen) { + effects.exit(types.codeTextSequence); + effects.exit(types.codeText); + return ok3(code); + } + token.type = types.codeTextData; + return data(code); + } +} + +// ../node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +var SpliceBuffer = class { + /** + * @param {ReadonlyArray | null | undefined} [initial] + * Initial items (optional). + * @returns + * Splice buffer. + */ + constructor(initial) { + this.left = initial ? [...initial] : []; + this.right = []; + } + /** + * Array access; + * does not move the cursor. + * + * @param {number} index + * Index. + * @return {T} + * Item. + */ + get(index) { + if (index < 0 || index >= this.left.length + this.right.length) { + throw new RangeError( + "Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`" + ); + } + if (index < this.left.length) return this.left[index]; + return this.right[this.right.length - index + this.left.length - 1]; + } + /** + * The length of the splice buffer, one greater than the largest index in the + * array. + */ + get length() { + return this.left.length + this.right.length; + } + /** + * Remove and return `list[0]`; + * moves the cursor to `0`. + * + * @returns {T | undefined} + * Item, optional. + */ + shift() { + this.setCursor(0); + return this.right.pop(); + } + /** + * Slice the buffer to get an array; + * does not move the cursor. + * + * @param {number} start + * Start. + * @param {number | null | undefined} [end] + * End (optional). + * @returns {Array} + * Array of items. + */ + slice(start, end) { + const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end; + if (stop < this.left.length) { + return this.left.slice(start, stop); + } + if (start > this.left.length) { + return this.right.slice( + this.right.length - stop + this.left.length, + this.right.length - start + this.left.length + ).reverse(); + } + return this.left.slice(start).concat( + this.right.slice(this.right.length - stop + this.left.length).reverse() + ); + } + /** + * Mimics the behavior of Array.prototype.splice() except for the change of + * interface necessary to avoid segfaults when patching in very large arrays. + * + * This operation moves cursor is moved to `start` and results in the cursor + * placed after any inserted items. + * + * @param {number} start + * Start; + * zero-based index at which to start changing the array; + * negative numbers count backwards from the end of the array and values + * that are out-of bounds are clamped to the appropriate end of the array. + * @param {number | null | undefined} [deleteCount=0] + * Delete count (default: `0`); + * maximum number of elements to delete, starting from start. + * @param {Array | null | undefined} [items=[]] + * Items to include in place of the deleted items (default: `[]`). + * @return {Array} + * Any removed items. + */ + splice(start, deleteCount, items) { + const count = deleteCount || 0; + this.setCursor(Math.trunc(start)); + const removed = this.right.splice( + this.right.length - count, + Number.POSITIVE_INFINITY + ); + if (items) chunkedPush(this.left, items); + return removed.reverse(); + } + /** + * Remove and return the highest-numbered item in the array, so + * `list[list.length - 1]`; + * Moves the cursor to `length`. + * + * @returns {T | undefined} + * Item, optional. + */ + pop() { + this.setCursor(Number.POSITIVE_INFINITY); + return this.left.pop(); + } + /** + * Inserts a single item to the high-numbered side of the array; + * moves the cursor to `length`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + push(item) { + this.setCursor(Number.POSITIVE_INFINITY); + this.left.push(item); + } + /** + * Inserts many items to the high-numbered side of the array. + * Moves the cursor to `length`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + pushMany(items) { + this.setCursor(Number.POSITIVE_INFINITY); + chunkedPush(this.left, items); + } + /** + * Inserts a single item to the low-numbered side of the array; + * Moves the cursor to `0`. + * + * @param {T} item + * Item. + * @returns {undefined} + * Nothing. + */ + unshift(item) { + this.setCursor(0); + this.right.push(item); + } + /** + * Inserts many items to the low-numbered side of the array; + * moves the cursor to `0`. + * + * @param {Array} items + * Items. + * @returns {undefined} + * Nothing. + */ + unshiftMany(items) { + this.setCursor(0); + chunkedPush(this.right, items.reverse()); + } + /** + * Move the cursor to a specific position in the array. Requires + * time proportional to the distance moved. + * + * If `n < 0`, the cursor will end up at the beginning. + * If `n > length`, the cursor will end up at the end. + * + * @param {number} n + * Position. + * @return {undefined} + * Nothing. + */ + setCursor(n) { + if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) + return; + if (n < this.left.length) { + const removed = this.left.splice(n, Number.POSITIVE_INFINITY); + chunkedPush(this.right, removed.reverse()); + } else { + const removed = this.right.splice( + this.left.length + this.right.length - n, + Number.POSITIVE_INFINITY + ); + chunkedPush(this.left, removed.reverse()); + } + } +}; +function chunkedPush(list2, right) { + let chunkStart = 0; + if (right.length < constants.v8MaxSafeChunkSize) { + list2.push(...right); + } else { + while (chunkStart < right.length) { + list2.push( + ...right.slice(chunkStart, chunkStart + constants.v8MaxSafeChunkSize) + ); + chunkStart += constants.v8MaxSafeChunkSize; + } + } +} + +// ../node_modules/micromark-util-subtokenize/dev/index.js +function subtokenize(eventsArray) { + const jumps = {}; + let index = -1; + let event; + let lineIndex; + let otherIndex; + let otherEvent; + let parameters; + let subevents; + let more; + const events = new SpliceBuffer(eventsArray); + while (++index < events.length) { + while (index in jumps) { + index = jumps[index]; + } + event = events.get(index); + if (index && event[1].type === types.chunkFlow && events.get(index - 1)[1].type === types.listItemPrefix) { + ok(event[1]._tokenizer, "expected `_tokenizer` on subtokens"); + subevents = event[1]._tokenizer.events; + otherIndex = 0; + if (otherIndex < subevents.length && subevents[otherIndex][1].type === types.lineEndingBlank) { + otherIndex += 2; + } + if (otherIndex < subevents.length && subevents[otherIndex][1].type === types.content) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === types.content) { + break; + } + if (subevents[otherIndex][1].type === types.chunkText) { + subevents[otherIndex][1]._isInFirstContentOfListItem = true; + otherIndex++; + } + } + } + } + if (event[0] === "enter") { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)); + index = jumps[index]; + more = true; + } + } else if (event[1]._container) { + otherIndex = index; + lineIndex = void 0; + while (otherIndex--) { + otherEvent = events.get(otherIndex); + if (otherEvent[1].type === types.lineEnding || otherEvent[1].type === types.lineEndingBlank) { + if (otherEvent[0] === "enter") { + if (lineIndex) { + events.get(lineIndex)[1].type = types.lineEndingBlank; + } + otherEvent[1].type = types.lineEnding; + lineIndex = otherIndex; + } + } else if (otherEvent[1].type === types.linePrefix || otherEvent[1].type === types.listItemIndent) { + } else { + break; + } + } + if (lineIndex) { + event[1].end = { ...events.get(lineIndex)[1].start }; + parameters = events.slice(lineIndex, index); + parameters.unshift(event); + events.splice(lineIndex, index - lineIndex + 1, parameters); + } + } + } + splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0)); + return !more; +} +function subcontent(events, eventIndex) { + const token = events.get(eventIndex)[1]; + const context = events.get(eventIndex)[2]; + let startPosition = eventIndex - 1; + const startPositions = []; + ok(token.contentType, "expected `contentType` on subtokens"); + let tokenizer = token._tokenizer; + if (!tokenizer) { + tokenizer = context.parser[token.contentType](token.start); + if (token._contentTypeTextTrailing) { + tokenizer._contentTypeTextTrailing = true; + } + } + const childEvents = tokenizer.events; + const jumps = []; + const gaps = {}; + let stream; + let previous2; + let index = -1; + let current = token; + let adjust = 0; + let start = 0; + const breaks = [start]; + while (current) { + while (events.get(++startPosition)[1] !== current) { + } + ok( + !previous2 || current.previous === previous2, + "expected previous to match" + ); + ok(!previous2 || previous2.next === current, "expected next to match"); + startPositions.push(startPosition); + if (!current._tokenizer) { + stream = context.sliceStream(current); + if (!current.next) { + stream.push(codes.eof); + } + if (previous2) { + tokenizer.defineSkip(current.start); + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true; + } + tokenizer.write(stream); + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = void 0; + } + } + previous2 = current; + current = current.next; + } + current = token; + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + ok(current, "expected a current token"); + start = index + 1; + breaks.push(start); + current._tokenizer = void 0; + current.previous = void 0; + current = current.next; + } + } + tokenizer.events = []; + if (current) { + current._tokenizer = void 0; + current.previous = void 0; + ok(!current.next, "expected no next token"); + } else { + breaks.pop(); + } + index = breaks.length; + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]); + const start2 = startPositions.pop(); + ok(start2 !== void 0, "expected a start position when splicing"); + jumps.push([start2, start2 + slice.length - 1]); + events.splice(start2, 2, slice); + } + jumps.reverse(); + index = -1; + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]; + adjust += jumps[index][1] - jumps[index][0] - 1; + } + return gaps; +} + +// ../node_modules/micromark-core-commonmark/dev/lib/content.js +var content = { resolve: resolveContent, tokenize: tokenizeContent }; +var continuationConstruct = { partial: true, tokenize: tokenizeContinuation }; +function resolveContent(events) { + subtokenize(events); + return events; +} +function tokenizeContent(effects, ok3) { + let previous2; + return chunkStart; + function chunkStart(code) { + ok( + code !== codes.eof && !markdownLineEnding(code), + "expected no eof or eol" + ); + effects.enter(types.content); + previous2 = effects.enter(types.chunkContent, { + contentType: constants.contentTypeContent + }); + return chunkInside(code); + } + function chunkInside(code) { + if (code === codes.eof) { + return contentEnd(code); + } + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code); + } + effects.consume(code); + return chunkInside; + } + function contentEnd(code) { + effects.exit(types.chunkContent); + effects.exit(types.content); + return ok3(code); + } + function contentContinue(code) { + ok(markdownLineEnding(code), "expected eol"); + effects.consume(code); + effects.exit(types.chunkContent); + ok(previous2, "expected previous token"); + previous2.next = effects.enter(types.chunkContent, { + contentType: constants.contentTypeContent, + previous: previous2 + }); + previous2 = previous2.next; + return chunkInside; + } +} +function tokenizeContinuation(effects, ok3, nok) { + const self = this; + return startLookahead; + function startLookahead(code) { + ok(markdownLineEnding(code), "expected a line ending"); + effects.exit(types.chunkContent); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return factorySpace(effects, prefixed, types.linePrefix); + } + function prefixed(code) { + if (code === codes.eof || markdownLineEnding(code)) { + return nok(code); + } + ok( + self.parser.constructs.disable.null, + "expected `disable.null` to be populated" + ); + const tail = self.events[self.events.length - 1]; + if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === types.linePrefix && tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize) { + return ok3(code); + } + return effects.interrupt(self.parser.constructs.flow, nok, ok3)(code); + } +} + +// ../node_modules/micromark-factory-destination/dev/index.js +function factoryDestination(effects, ok3, nok, type, literalType, literalMarkerType, rawType, stringType, max) { + const limit = max || Number.POSITIVE_INFINITY; + let balance = 0; + return start; + function start(code) { + if (code === codes.lessThan) { + effects.enter(type); + effects.enter(literalType); + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + return enclosedBefore; + } + if (code === codes.eof || code === codes.space || code === codes.rightParenthesis || asciiControl(code)) { + return nok(code); + } + effects.enter(type); + effects.enter(rawType); + effects.enter(stringType); + effects.enter(types.chunkString, { contentType: constants.contentTypeString }); + return raw(code); + } + function enclosedBefore(code) { + if (code === codes.greaterThan) { + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + effects.exit(literalType); + effects.exit(type); + return ok3; + } + effects.enter(stringType); + effects.enter(types.chunkString, { contentType: constants.contentTypeString }); + return enclosed(code); + } + function enclosed(code) { + if (code === codes.greaterThan) { + effects.exit(types.chunkString); + effects.exit(stringType); + return enclosedBefore(code); + } + if (code === codes.eof || code === codes.lessThan || markdownLineEnding(code)) { + return nok(code); + } + effects.consume(code); + return code === codes.backslash ? enclosedEscape : enclosed; + } + function enclosedEscape(code) { + if (code === codes.lessThan || code === codes.greaterThan || code === codes.backslash) { + effects.consume(code); + return enclosed; + } + return enclosed(code); + } + function raw(code) { + if (!balance && (code === codes.eof || code === codes.rightParenthesis || markdownLineEndingOrSpace(code))) { + effects.exit(types.chunkString); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type); + return ok3(code); + } + if (balance < limit && code === codes.leftParenthesis) { + effects.consume(code); + balance++; + return raw; + } + if (code === codes.rightParenthesis) { + effects.consume(code); + balance--; + return raw; + } + if (code === codes.eof || code === codes.space || code === codes.leftParenthesis || asciiControl(code)) { + return nok(code); + } + effects.consume(code); + return code === codes.backslash ? rawEscape : raw; + } + function rawEscape(code) { + if (code === codes.leftParenthesis || code === codes.rightParenthesis || code === codes.backslash) { + effects.consume(code); + return raw; + } + return raw(code); + } +} + +// ../node_modules/micromark-factory-label/dev/index.js +function factoryLabel(effects, ok3, nok, type, markerType, stringType) { + const self = this; + let size = 0; + let seen; + return start; + function start(code) { + ok(code === codes.leftSquareBracket, "expected `[`"); + effects.enter(type); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.enter(stringType); + return atBreak; + } + function atBreak(code) { + if (size > constants.linkReferenceSizeMax || code === codes.eof || code === codes.leftSquareBracket || code === codes.rightSquareBracket && !seen || // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + code === codes.caret && !size && "_hiddenFootnoteSupport" in self.parser.constructs) { + return nok(code); + } + if (code === codes.rightSquareBracket) { + effects.exit(stringType); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type); + return ok3; + } + if (markdownLineEnding(code)) { + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return atBreak; + } + effects.enter(types.chunkString, { contentType: constants.contentTypeString }); + return labelInside(code); + } + function labelInside(code) { + if (code === codes.eof || code === codes.leftSquareBracket || code === codes.rightSquareBracket || markdownLineEnding(code) || size++ > constants.linkReferenceSizeMax) { + effects.exit(types.chunkString); + return atBreak(code); + } + effects.consume(code); + if (!seen) seen = !markdownSpace(code); + return code === codes.backslash ? labelEscape : labelInside; + } + function labelEscape(code) { + if (code === codes.leftSquareBracket || code === codes.backslash || code === codes.rightSquareBracket) { + effects.consume(code); + size++; + return labelInside; + } + return labelInside(code); + } +} + +// ../node_modules/micromark-factory-title/dev/index.js +function factoryTitle(effects, ok3, nok, type, markerType, stringType) { + let marker; + return start; + function start(code) { + if (code === codes.quotationMark || code === codes.apostrophe || code === codes.leftParenthesis) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + marker = code === codes.leftParenthesis ? codes.rightParenthesis : code; + return begin; + } + return nok(code); + } + function begin(code) { + if (code === marker) { + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type); + return ok3; + } + effects.enter(stringType); + return atBreak(code); + } + function atBreak(code) { + if (code === marker) { + effects.exit(stringType); + return begin(marker); + } + if (code === codes.eof) { + return nok(code); + } + if (markdownLineEnding(code)) { + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return factorySpace(effects, atBreak, types.linePrefix); + } + effects.enter(types.chunkString, { contentType: constants.contentTypeString }); + return inside(code); + } + function inside(code) { + if (code === marker || code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.chunkString); + return atBreak(code); + } + effects.consume(code); + return code === codes.backslash ? escape : inside; + } + function escape(code) { + if (code === marker || code === codes.backslash) { + effects.consume(code); + return inside; + } + return inside(code); + } +} + +// ../node_modules/micromark-factory-whitespace/dev/index.js +function factoryWhitespace(effects, ok3) { + let seen; + return start; + function start(code) { + if (markdownLineEnding(code)) { + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + seen = true; + return start; + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? types.linePrefix : types.lineSuffix + )(code); + } + return ok3(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/definition.js +var definition = { name: "definition", tokenize: tokenizeDefinition }; +var titleBefore = { partial: true, tokenize: tokenizeTitleBefore }; +function tokenizeDefinition(effects, ok3, nok) { + const self = this; + let identifier; + return start; + function start(code) { + effects.enter(types.definition); + return before(code); + } + function before(code) { + ok(code === codes.leftSquareBracket, "expected `[`"); + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + types.definitionLabel, + types.definitionLabelMarker, + types.definitionLabelString + )(code); + } + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ); + if (code === codes.colon) { + effects.enter(types.definitionMarker); + effects.consume(code); + effects.exit(types.definitionMarker); + return markerAfter; + } + return nok(code); + } + function markerAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code); + } + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + types.definitionDestination, + types.definitionDestinationLiteral, + types.definitionDestinationLiteralMarker, + types.definitionDestinationRaw, + types.definitionDestinationString + )(code); + } + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code); + } + function after(code) { + return markdownSpace(code) ? factorySpace(effects, afterWhitespace, types.whitespace)(code) : afterWhitespace(code); + } + function afterWhitespace(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.definition); + self.parser.defined.push(identifier); + return ok3(code); + } + return nok(code); + } +} +function tokenizeTitleBefore(effects, ok3, nok) { + return titleBefore2; + function titleBefore2(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code); + } + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + types.definitionTitle, + types.definitionTitleMarker, + types.definitionTitleString + )(code); + } + function titleAfter(code) { + return markdownSpace(code) ? factorySpace( + effects, + titleAfterOptionalWhitespace, + types.whitespace + )(code) : titleAfterOptionalWhitespace(code); + } + function titleAfterOptionalWhitespace(code) { + return code === codes.eof || markdownLineEnding(code) ? ok3(code) : nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +var hardBreakEscape = { + name: "hardBreakEscape", + tokenize: tokenizeHardBreakEscape +}; +function tokenizeHardBreakEscape(effects, ok3, nok) { + return start; + function start(code) { + ok(code === codes.backslash, "expected `\\`"); + effects.enter(types.hardBreakEscape); + effects.consume(code); + return after; + } + function after(code) { + if (markdownLineEnding(code)) { + effects.exit(types.hardBreakEscape); + return ok3(code); + } + return nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +var headingAtx = { + name: "headingAtx", + resolve: resolveHeadingAtx, + tokenize: tokenizeHeadingAtx +}; +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2; + let contentStart = 3; + let content2; + let text; + if (events[contentStart][1].type === types.whitespace) { + contentStart += 2; + } + if (contentEnd - 2 > contentStart && events[contentEnd][1].type === types.whitespace) { + contentEnd -= 2; + } + if (events[contentEnd][1].type === types.atxHeadingSequence && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === types.whitespace)) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4; + } + if (contentEnd > contentStart) { + content2 = { + type: types.atxHeadingText, + start: events[contentStart][1].start, + end: events[contentEnd][1].end + }; + text = { + type: types.chunkText, + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: constants.contentTypeText + }; + splice(events, contentStart, contentEnd - contentStart + 1, [ + ["enter", content2, context], + ["enter", text, context], + ["exit", text, context], + ["exit", content2, context] + ]); + } + return events; +} +function tokenizeHeadingAtx(effects, ok3, nok) { + let size = 0; + return start; + function start(code) { + effects.enter(types.atxHeading); + return before(code); + } + function before(code) { + ok(code === codes.numberSign, "expected `#`"); + effects.enter(types.atxHeadingSequence); + return sequenceOpen(code); + } + function sequenceOpen(code) { + if (code === codes.numberSign && size++ < constants.atxHeadingOpeningFenceSizeMax) { + effects.consume(code); + return sequenceOpen; + } + if (code === codes.eof || markdownLineEndingOrSpace(code)) { + effects.exit(types.atxHeadingSequence); + return atBreak(code); + } + return nok(code); + } + function atBreak(code) { + if (code === codes.numberSign) { + effects.enter(types.atxHeadingSequence); + return sequenceFurther(code); + } + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.atxHeading); + return ok3(code); + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, types.whitespace)(code); + } + effects.enter(types.atxHeadingText); + return data(code); + } + function sequenceFurther(code) { + if (code === codes.numberSign) { + effects.consume(code); + return sequenceFurther; + } + effects.exit(types.atxHeadingSequence); + return atBreak(code); + } + function data(code) { + if (code === codes.eof || code === codes.numberSign || markdownLineEndingOrSpace(code)) { + effects.exit(types.atxHeadingText); + return atBreak(code); + } + effects.consume(code); + return data; + } +} + +// ../node_modules/micromark-util-html-tag-name/index.js +var htmlBlockNames = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "search", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +]; +var htmlRawNames = ["pre", "script", "style", "textarea"]; + +// ../node_modules/micromark-core-commonmark/dev/lib/html-flow.js +var htmlFlow = { + concrete: true, + name: "htmlFlow", + resolveTo: resolveToHtmlFlow, + tokenize: tokenizeHtmlFlow +}; +var blankLineBefore = { partial: true, tokenize: tokenizeBlankLineBefore }; +var nonLazyContinuationStart = { + partial: true, + tokenize: tokenizeNonLazyContinuationStart +}; +function resolveToHtmlFlow(events) { + let index = events.length; + while (index--) { + if (events[index][0] === "enter" && events[index][1].type === types.htmlFlow) { + break; + } + } + if (index > 1 && events[index - 2][1].type === types.linePrefix) { + events[index][1].start = events[index - 2][1].start; + events[index + 1][1].start = events[index - 2][1].start; + events.splice(index - 2, 2); + } + return events; +} +function tokenizeHtmlFlow(effects, ok3, nok) { + const self = this; + let marker; + let closingTag; + let buffer; + let index; + let markerB; + return start; + function start(code) { + return before(code); + } + function before(code) { + ok(code === codes.lessThan, "expected `<`"); + effects.enter(types.htmlFlow); + effects.enter(types.htmlFlowData); + effects.consume(code); + return open; + } + function open(code) { + if (code === codes.exclamationMark) { + effects.consume(code); + return declarationOpen; + } + if (code === codes.slash) { + effects.consume(code); + closingTag = true; + return tagCloseStart; + } + if (code === codes.questionMark) { + effects.consume(code); + marker = constants.htmlInstruction; + return self.interrupt ? ok3 : continuationDeclarationInside; + } + if (asciiAlpha(code)) { + ok(code !== null); + effects.consume(code); + buffer = String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function declarationOpen(code) { + if (code === codes.dash) { + effects.consume(code); + marker = constants.htmlComment; + return commentOpenInside; + } + if (code === codes.leftSquareBracket) { + effects.consume(code); + marker = constants.htmlCdata; + index = 0; + return cdataOpenInside; + } + if (asciiAlpha(code)) { + effects.consume(code); + marker = constants.htmlDeclaration; + return self.interrupt ? ok3 : continuationDeclarationInside; + } + return nok(code); + } + function commentOpenInside(code) { + if (code === codes.dash) { + effects.consume(code); + return self.interrupt ? ok3 : continuationDeclarationInside; + } + return nok(code); + } + function cdataOpenInside(code) { + const value = constants.cdataOpeningString; + if (code === value.charCodeAt(index++)) { + effects.consume(code); + if (index === value.length) { + return self.interrupt ? ok3 : continuation; + } + return cdataOpenInside; + } + return nok(code); + } + function tagCloseStart(code) { + if (asciiAlpha(code)) { + ok(code !== null); + effects.consume(code); + buffer = String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function tagName(code) { + if (code === codes.eof || code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) { + const slash = code === codes.slash; + const name = buffer.toLowerCase(); + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = constants.htmlRaw; + return self.interrupt ? ok3(code) : continuation(code); + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = constants.htmlBasic; + if (slash) { + effects.consume(code); + return basicSelfClosing; + } + return self.interrupt ? ok3(code) : continuation(code); + } + marker = constants.htmlComplete; + return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code); + } + if (code === codes.dash || asciiAlphanumeric(code)) { + effects.consume(code); + buffer += String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function basicSelfClosing(code) { + if (code === codes.greaterThan) { + effects.consume(code); + return self.interrupt ? ok3 : continuation; + } + return nok(code); + } + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code); + return completeClosingTagAfter; + } + return completeEnd(code); + } + function completeAttributeNameBefore(code) { + if (code === codes.slash) { + effects.consume(code); + return completeEnd; + } + if (code === codes.colon || code === codes.underscore || asciiAlpha(code)) { + effects.consume(code); + return completeAttributeName; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeNameBefore; + } + return completeEnd(code); + } + function completeAttributeName(code) { + if (code === codes.dash || code === codes.dot || code === codes.colon || code === codes.underscore || asciiAlphanumeric(code)) { + effects.consume(code); + return completeAttributeName; + } + return completeAttributeNameAfter(code); + } + function completeAttributeNameAfter(code) { + if (code === codes.equalsTo) { + effects.consume(code); + return completeAttributeValueBefore; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeNameAfter; + } + return completeAttributeNameBefore(code); + } + function completeAttributeValueBefore(code) { + if (code === codes.eof || code === codes.lessThan || code === codes.equalsTo || code === codes.greaterThan || code === codes.graveAccent) { + return nok(code); + } + if (code === codes.quotationMark || code === codes.apostrophe) { + effects.consume(code); + markerB = code; + return completeAttributeValueQuoted; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeValueBefore; + } + return completeAttributeValueUnquoted(code); + } + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code); + markerB = null; + return completeAttributeValueQuotedAfter; + } + if (code === codes.eof || markdownLineEnding(code)) { + return nok(code); + } + effects.consume(code); + return completeAttributeValueQuoted; + } + function completeAttributeValueUnquoted(code) { + if (code === codes.eof || code === codes.quotationMark || code === codes.apostrophe || code === codes.slash || code === codes.lessThan || code === codes.equalsTo || code === codes.greaterThan || code === codes.graveAccent || markdownLineEndingOrSpace(code)) { + return completeAttributeNameAfter(code); + } + effects.consume(code); + return completeAttributeValueUnquoted; + } + function completeAttributeValueQuotedAfter(code) { + if (code === codes.slash || code === codes.greaterThan || markdownSpace(code)) { + return completeAttributeNameBefore(code); + } + return nok(code); + } + function completeEnd(code) { + if (code === codes.greaterThan) { + effects.consume(code); + return completeAfter; + } + return nok(code); + } + function completeAfter(code) { + if (code === codes.eof || markdownLineEnding(code)) { + return continuation(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAfter; + } + return nok(code); + } + function continuation(code) { + if (code === codes.dash && marker === constants.htmlComment) { + effects.consume(code); + return continuationCommentInside; + } + if (code === codes.lessThan && marker === constants.htmlRaw) { + effects.consume(code); + return continuationRawTagOpen; + } + if (code === codes.greaterThan && marker === constants.htmlDeclaration) { + effects.consume(code); + return continuationClose; + } + if (code === codes.questionMark && marker === constants.htmlInstruction) { + effects.consume(code); + return continuationDeclarationInside; + } + if (code === codes.rightSquareBracket && marker === constants.htmlCdata) { + effects.consume(code); + return continuationCdataInside; + } + if (markdownLineEnding(code) && (marker === constants.htmlBasic || marker === constants.htmlComplete)) { + effects.exit(types.htmlFlowData); + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code); + } + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.htmlFlowData); + return continuationStart(code); + } + effects.consume(code); + return continuation; + } + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code); + } + function continuationStartNonLazy(code) { + ok(markdownLineEnding(code)); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return continuationBefore; + } + function continuationBefore(code) { + if (code === codes.eof || markdownLineEnding(code)) { + return continuationStart(code); + } + effects.enter(types.htmlFlowData); + return continuation(code); + } + function continuationCommentInside(code) { + if (code === codes.dash) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationRawTagOpen(code) { + if (code === codes.slash) { + effects.consume(code); + buffer = ""; + return continuationRawEndTag; + } + return continuation(code); + } + function continuationRawEndTag(code) { + if (code === codes.greaterThan) { + const name = buffer.toLowerCase(); + if (htmlRawNames.includes(name)) { + effects.consume(code); + return continuationClose; + } + return continuation(code); + } + if (asciiAlpha(code) && buffer.length < constants.htmlRawSizeMax) { + ok(code !== null); + effects.consume(code); + buffer += String.fromCharCode(code); + return continuationRawEndTag; + } + return continuation(code); + } + function continuationCdataInside(code) { + if (code === codes.rightSquareBracket) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationDeclarationInside(code) { + if (code === codes.greaterThan) { + effects.consume(code); + return continuationClose; + } + if (code === codes.dash && marker === constants.htmlComment) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationClose(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.htmlFlowData); + return continuationAfter(code); + } + effects.consume(code); + return continuationClose; + } + function continuationAfter(code) { + effects.exit(types.htmlFlow); + return ok3(code); + } +} +function tokenizeNonLazyContinuationStart(effects, ok3, nok) { + const self = this; + return start; + function start(code) { + if (markdownLineEnding(code)) { + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return after; + } + return nok(code); + } + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok3(code); + } +} +function tokenizeBlankLineBefore(effects, ok3, nok) { + return start; + function start(code) { + ok(markdownLineEnding(code), "expected a line ending"); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return effects.attempt(blankLine, ok3, nok); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/html-text.js +var htmlText = { name: "htmlText", tokenize: tokenizeHtmlText }; +function tokenizeHtmlText(effects, ok3, nok) { + const self = this; + let marker; + let index; + let returnState; + return start; + function start(code) { + ok(code === codes.lessThan, "expected `<`"); + effects.enter(types.htmlText); + effects.enter(types.htmlTextData); + effects.consume(code); + return open; + } + function open(code) { + if (code === codes.exclamationMark) { + effects.consume(code); + return declarationOpen; + } + if (code === codes.slash) { + effects.consume(code); + return tagCloseStart; + } + if (code === codes.questionMark) { + effects.consume(code); + return instruction; + } + if (asciiAlpha(code)) { + effects.consume(code); + return tagOpen; + } + return nok(code); + } + function declarationOpen(code) { + if (code === codes.dash) { + effects.consume(code); + return commentOpenInside; + } + if (code === codes.leftSquareBracket) { + effects.consume(code); + index = 0; + return cdataOpenInside; + } + if (asciiAlpha(code)) { + effects.consume(code); + return declaration; + } + return nok(code); + } + function commentOpenInside(code) { + if (code === codes.dash) { + effects.consume(code); + return commentEnd; + } + return nok(code); + } + function comment(code) { + if (code === codes.eof) { + return nok(code); + } + if (code === codes.dash) { + effects.consume(code); + return commentClose; + } + if (markdownLineEnding(code)) { + returnState = comment; + return lineEndingBefore(code); + } + effects.consume(code); + return comment; + } + function commentClose(code) { + if (code === codes.dash) { + effects.consume(code); + return commentEnd; + } + return comment(code); + } + function commentEnd(code) { + return code === codes.greaterThan ? end(code) : code === codes.dash ? commentClose(code) : comment(code); + } + function cdataOpenInside(code) { + const value = constants.cdataOpeningString; + if (code === value.charCodeAt(index++)) { + effects.consume(code); + return index === value.length ? cdata : cdataOpenInside; + } + return nok(code); + } + function cdata(code) { + if (code === codes.eof) { + return nok(code); + } + if (code === codes.rightSquareBracket) { + effects.consume(code); + return cdataClose; + } + if (markdownLineEnding(code)) { + returnState = cdata; + return lineEndingBefore(code); + } + effects.consume(code); + return cdata; + } + function cdataClose(code) { + if (code === codes.rightSquareBracket) { + effects.consume(code); + return cdataEnd; + } + return cdata(code); + } + function cdataEnd(code) { + if (code === codes.greaterThan) { + return end(code); + } + if (code === codes.rightSquareBracket) { + effects.consume(code); + return cdataEnd; + } + return cdata(code); + } + function declaration(code) { + if (code === codes.eof || code === codes.greaterThan) { + return end(code); + } + if (markdownLineEnding(code)) { + returnState = declaration; + return lineEndingBefore(code); + } + effects.consume(code); + return declaration; + } + function instruction(code) { + if (code === codes.eof) { + return nok(code); + } + if (code === codes.questionMark) { + effects.consume(code); + return instructionClose; + } + if (markdownLineEnding(code)) { + returnState = instruction; + return lineEndingBefore(code); + } + effects.consume(code); + return instruction; + } + function instructionClose(code) { + return code === codes.greaterThan ? end(code) : instruction(code); + } + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return tagClose; + } + return nok(code); + } + function tagClose(code) { + if (code === codes.dash || asciiAlphanumeric(code)) { + effects.consume(code); + return tagClose; + } + return tagCloseBetween(code); + } + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween; + return lineEndingBefore(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagCloseBetween; + } + return end(code); + } + function tagOpen(code) { + if (code === codes.dash || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpen; + } + if (code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + return nok(code); + } + function tagOpenBetween(code) { + if (code === codes.slash) { + effects.consume(code); + return end; + } + if (code === codes.colon || code === codes.underscore || asciiAlpha(code)) { + effects.consume(code); + return tagOpenAttributeName; + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween; + return lineEndingBefore(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenBetween; + } + return end(code); + } + function tagOpenAttributeName(code) { + if (code === codes.dash || code === codes.dot || code === codes.colon || code === codes.underscore || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpenAttributeName; + } + return tagOpenAttributeNameAfter(code); + } + function tagOpenAttributeNameAfter(code) { + if (code === codes.equalsTo) { + effects.consume(code); + return tagOpenAttributeValueBefore; + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter; + return lineEndingBefore(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenAttributeNameAfter; + } + return tagOpenBetween(code); + } + function tagOpenAttributeValueBefore(code) { + if (code === codes.eof || code === codes.lessThan || code === codes.equalsTo || code === codes.greaterThan || code === codes.graveAccent) { + return nok(code); + } + if (code === codes.quotationMark || code === codes.apostrophe) { + effects.consume(code); + marker = code; + return tagOpenAttributeValueQuoted; + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore; + return lineEndingBefore(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenAttributeValueBefore; + } + effects.consume(code); + return tagOpenAttributeValueUnquoted; + } + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code); + marker = void 0; + return tagOpenAttributeValueQuotedAfter; + } + if (code === codes.eof) { + return nok(code); + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted; + return lineEndingBefore(code); + } + effects.consume(code); + return tagOpenAttributeValueQuoted; + } + function tagOpenAttributeValueUnquoted(code) { + if (code === codes.eof || code === codes.quotationMark || code === codes.apostrophe || code === codes.lessThan || code === codes.equalsTo || code === codes.graveAccent) { + return nok(code); + } + if (code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + effects.consume(code); + return tagOpenAttributeValueUnquoted; + } + function tagOpenAttributeValueQuotedAfter(code) { + if (code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + return nok(code); + } + function end(code) { + if (code === codes.greaterThan) { + effects.consume(code); + effects.exit(types.htmlTextData); + effects.exit(types.htmlText); + return ok3; + } + return nok(code); + } + function lineEndingBefore(code) { + ok(returnState, "expected return state"); + ok(markdownLineEnding(code), "expected eol"); + effects.exit(types.htmlTextData); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return lineEndingAfter; + } + function lineEndingAfter(code) { + ok( + self.parser.constructs.disable.null, + "expected `disable.null` to be populated" + ); + return markdownSpace(code) ? factorySpace( + effects, + lineEndingAfterPrefix, + types.linePrefix, + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize + )(code) : lineEndingAfterPrefix(code); + } + function lineEndingAfterPrefix(code) { + effects.enter(types.htmlTextData); + return returnState(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/label-end.js +var labelEnd = { + name: "labelEnd", + resolveAll: resolveAllLabelEnd, + resolveTo: resolveToLabelEnd, + tokenize: tokenizeLabelEnd +}; +var resourceConstruct = { tokenize: tokenizeResource }; +var referenceFullConstruct = { tokenize: tokenizeReferenceFull }; +var referenceCollapsedConstruct = { tokenize: tokenizeReferenceCollapsed }; +function resolveAllLabelEnd(events) { + let index = -1; + const newEvents = []; + while (++index < events.length) { + const token = events[index][1]; + newEvents.push(events[index]); + if (token.type === types.labelImage || token.type === types.labelLink || token.type === types.labelEnd) { + const offset = token.type === types.labelImage ? 4 : 2; + token.type = types.data; + index += offset; + } + } + if (events.length !== newEvents.length) { + splice(events, 0, events.length, newEvents); + } + return events; +} +function resolveToLabelEnd(events, context) { + let index = events.length; + let offset = 0; + let token; + let open; + let close; + let media; + while (index--) { + token = events[index][1]; + if (open) { + if (token.type === types.link || token.type === types.labelLink && token._inactive) { + break; + } + if (events[index][0] === "enter" && token.type === types.labelLink) { + token._inactive = true; + } + } else if (close) { + if (events[index][0] === "enter" && (token.type === types.labelImage || token.type === types.labelLink) && !token._balanced) { + open = index; + if (token.type !== types.labelLink) { + offset = 2; + break; + } + } + } else if (token.type === types.labelEnd) { + close = index; + } + } + ok(open !== void 0, "`open` is supposed to be found"); + ok(close !== void 0, "`close` is supposed to be found"); + const group = { + type: events[open][1].type === types.labelLink ? types.link : types.image, + start: { ...events[open][1].start }, + end: { ...events[events.length - 1][1].end } + }; + const label = { + type: types.label, + start: { ...events[open][1].start }, + end: { ...events[close][1].end } + }; + const text = { + type: types.labelText, + start: { ...events[open + offset + 2][1].end }, + end: { ...events[close - 2][1].start } + }; + media = [ + ["enter", group, context], + ["enter", label, context] + ]; + media = push(media, events.slice(open + 1, open + offset + 3)); + media = push(media, [["enter", text, context]]); + ok( + context.parser.constructs.insideSpan.null, + "expected `insideSpan.null` to be populated" + ); + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ); + media = push(media, [ + ["exit", text, context], + events[close - 2], + events[close - 1], + ["exit", label, context] + ]); + media = push(media, events.slice(close + 1)); + media = push(media, [["exit", group, context]]); + splice(events, open, events.length, media); + return events; +} +function tokenizeLabelEnd(effects, ok3, nok) { + const self = this; + let index = self.events.length; + let labelStart; + let defined; + while (index--) { + if ((self.events[index][1].type === types.labelImage || self.events[index][1].type === types.labelLink) && !self.events[index][1]._balanced) { + labelStart = self.events[index][1]; + break; + } + } + return start; + function start(code) { + ok(code === codes.rightSquareBracket, "expected `]`"); + if (!labelStart) { + return nok(code); + } + if (labelStart._inactive) { + return labelEndNok(code); + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ start: labelStart.end, end: self.now() }) + ) + ); + effects.enter(types.labelEnd); + effects.enter(types.labelMarker); + effects.consume(code); + effects.exit(types.labelMarker); + effects.exit(types.labelEnd); + return after; + } + function after(code) { + if (code === codes.leftParenthesis) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code); + } + if (code === codes.leftSquareBracket) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code); + } + return defined ? labelEndOk(code) : labelEndNok(code); + } + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code); + } + function labelEndOk(code) { + return ok3(code); + } + function labelEndNok(code) { + labelStart._balanced = true; + return nok(code); + } +} +function tokenizeResource(effects, ok3, nok) { + return resourceStart; + function resourceStart(code) { + ok(code === codes.leftParenthesis, "expected left paren"); + effects.enter(types.resource); + effects.enter(types.resourceMarker); + effects.consume(code); + effects.exit(types.resourceMarker); + return resourceBefore; + } + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code); + } + function resourceOpen(code) { + if (code === codes.rightParenthesis) { + return resourceEnd(code); + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + types.resourceDestination, + types.resourceDestinationLiteral, + types.resourceDestinationLiteralMarker, + types.resourceDestinationRaw, + types.resourceDestinationString, + constants.linkResourceDestinationBalanceMax + )(code); + } + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code); + } + function resourceDestinationMissing(code) { + return nok(code); + } + function resourceBetween(code) { + if (code === codes.quotationMark || code === codes.apostrophe || code === codes.leftParenthesis) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + types.resourceTitle, + types.resourceTitleMarker, + types.resourceTitleString + )(code); + } + return resourceEnd(code); + } + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code); + } + function resourceEnd(code) { + if (code === codes.rightParenthesis) { + effects.enter(types.resourceMarker); + effects.consume(code); + effects.exit(types.resourceMarker); + effects.exit(types.resource); + return ok3; + } + return nok(code); + } +} +function tokenizeReferenceFull(effects, ok3, nok) { + const self = this; + return referenceFull; + function referenceFull(code) { + ok(code === codes.leftSquareBracket, "expected left bracket"); + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + types.reference, + types.referenceMarker, + types.referenceString + )(code); + } + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) ? ok3(code) : nok(code); + } + function referenceFullMissing(code) { + return nok(code); + } +} +function tokenizeReferenceCollapsed(effects, ok3, nok) { + return referenceCollapsedStart; + function referenceCollapsedStart(code) { + ok(code === codes.leftSquareBracket, "expected left bracket"); + effects.enter(types.reference); + effects.enter(types.referenceMarker); + effects.consume(code); + effects.exit(types.referenceMarker); + return referenceCollapsedOpen; + } + function referenceCollapsedOpen(code) { + if (code === codes.rightSquareBracket) { + effects.enter(types.referenceMarker); + effects.consume(code); + effects.exit(types.referenceMarker); + effects.exit(types.reference); + return ok3; + } + return nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +var labelStartImage = { + name: "labelStartImage", + resolveAll: labelEnd.resolveAll, + tokenize: tokenizeLabelStartImage +}; +function tokenizeLabelStartImage(effects, ok3, nok) { + const self = this; + return start; + function start(code) { + ok(code === codes.exclamationMark, "expected `!`"); + effects.enter(types.labelImage); + effects.enter(types.labelImageMarker); + effects.consume(code); + effects.exit(types.labelImageMarker); + return open; + } + function open(code) { + if (code === codes.leftSquareBracket) { + effects.enter(types.labelMarker); + effects.consume(code); + effects.exit(types.labelMarker); + effects.exit(types.labelImage); + return after; + } + return nok(code); + } + function after(code) { + return code === codes.caret && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok3(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +var labelStartLink = { + name: "labelStartLink", + resolveAll: labelEnd.resolveAll, + tokenize: tokenizeLabelStartLink +}; +function tokenizeLabelStartLink(effects, ok3, nok) { + const self = this; + return start; + function start(code) { + ok(code === codes.leftSquareBracket, "expected `[`"); + effects.enter(types.labelLink); + effects.enter(types.labelMarker); + effects.consume(code); + effects.exit(types.labelMarker); + effects.exit(types.labelLink); + return after; + } + function after(code) { + return code === codes.caret && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok3(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/line-ending.js +var lineEnding = { name: "lineEnding", tokenize: tokenizeLineEnding }; +function tokenizeLineEnding(effects, ok3) { + return start; + function start(code) { + ok(markdownLineEnding(code), "expected eol"); + effects.enter(types.lineEnding); + effects.consume(code); + effects.exit(types.lineEnding); + return factorySpace(effects, ok3, types.linePrefix); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +var thematicBreak = { + name: "thematicBreak", + tokenize: tokenizeThematicBreak +}; +function tokenizeThematicBreak(effects, ok3, nok) { + let size = 0; + let marker; + return start; + function start(code) { + effects.enter(types.thematicBreak); + return before(code); + } + function before(code) { + ok( + code === codes.asterisk || code === codes.dash || code === codes.underscore, + "expected `*`, `-`, or `_`" + ); + marker = code; + return atBreak(code); + } + function atBreak(code) { + if (code === marker) { + effects.enter(types.thematicBreakSequence); + return sequence(code); + } + if (size >= constants.thematicBreakMarkerCountMin && (code === codes.eof || markdownLineEnding(code))) { + effects.exit(types.thematicBreak); + return ok3(code); + } + return nok(code); + } + function sequence(code) { + if (code === marker) { + effects.consume(code); + size++; + return sequence; + } + effects.exit(types.thematicBreakSequence); + return markdownSpace(code) ? factorySpace(effects, atBreak, types.whitespace)(code) : atBreak(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/list.js +var list = { + continuation: { tokenize: tokenizeListContinuation }, + exit: tokenizeListEnd, + name: "list", + tokenize: tokenizeListStart +}; +var listItemPrefixWhitespaceConstruct = { + partial: true, + tokenize: tokenizeListItemPrefixWhitespace +}; +var indentConstruct = { partial: true, tokenize: tokenizeIndent }; +function tokenizeListStart(effects, ok3, nok) { + const self = this; + const tail = self.events[self.events.length - 1]; + let initialSize = tail && tail[1].type === types.linePrefix ? tail[2].sliceSerialize(tail[1], true).length : 0; + let size = 0; + return start; + function start(code) { + ok(self.containerState, "expected state"); + const kind = self.containerState.type || (code === codes.asterisk || code === codes.plusSign || code === codes.dash ? types.listUnordered : types.listOrdered); + if (kind === types.listUnordered ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) { + if (!self.containerState.type) { + self.containerState.type = kind; + effects.enter(kind, { _container: true }); + } + if (kind === types.listUnordered) { + effects.enter(types.listItemPrefix); + return code === codes.asterisk || code === codes.dash ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code); + } + if (!self.interrupt || code === codes.digit1) { + effects.enter(types.listItemPrefix); + effects.enter(types.listItemValue); + return inside(code); + } + } + return nok(code); + } + function inside(code) { + ok(self.containerState, "expected state"); + if (asciiDigit(code) && ++size < constants.listItemValueSizeMax) { + effects.consume(code); + return inside; + } + if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === codes.rightParenthesis || code === codes.dot)) { + effects.exit(types.listItemValue); + return atMarker(code); + } + return nok(code); + } + function atMarker(code) { + ok(self.containerState, "expected state"); + ok(code !== codes.eof, "eof (`null`) is not a marker"); + effects.enter(types.listItemMarker); + effects.consume(code); + effects.exit(types.listItemMarker); + self.containerState.marker = self.containerState.marker || code; + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ); + } + function onBlank(code) { + ok(self.containerState, "expected state"); + self.containerState.initialBlankLine = true; + initialSize++; + return endOfPrefix(code); + } + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter(types.listItemPrefixWhitespace); + effects.consume(code); + effects.exit(types.listItemPrefixWhitespace); + return endOfPrefix; + } + return nok(code); + } + function endOfPrefix(code) { + ok(self.containerState, "expected state"); + self.containerState.size = initialSize + self.sliceSerialize(effects.exit(types.listItemPrefix), true).length; + return ok3(code); + } +} +function tokenizeListContinuation(effects, ok3, nok) { + const self = this; + ok(self.containerState, "expected state"); + self.containerState._closeFlow = void 0; + return effects.check(blankLine, onBlank, notBlank); + function onBlank(code) { + ok(self.containerState, "expected state"); + ok(typeof self.containerState.size === "number", "expected size"); + self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine; + return factorySpace( + effects, + ok3, + types.listItemIndent, + self.containerState.size + 1 + )(code); + } + function notBlank(code) { + ok(self.containerState, "expected state"); + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = void 0; + self.containerState.initialBlankLine = void 0; + return notInCurrentItem(code); + } + self.containerState.furtherBlankLines = void 0; + self.containerState.initialBlankLine = void 0; + return effects.attempt(indentConstruct, ok3, notInCurrentItem)(code); + } + function notInCurrentItem(code) { + ok(self.containerState, "expected state"); + self.containerState._closeFlow = true; + self.interrupt = void 0; + ok( + self.parser.constructs.disable.null, + "expected `disable.null` to be populated" + ); + return factorySpace( + effects, + effects.attempt(list, ok3, nok), + types.linePrefix, + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize + )(code); + } +} +function tokenizeIndent(effects, ok3, nok) { + const self = this; + ok(self.containerState, "expected state"); + ok(typeof self.containerState.size === "number", "expected size"); + return factorySpace( + effects, + afterPrefix, + types.listItemIndent, + self.containerState.size + 1 + ); + function afterPrefix(code) { + ok(self.containerState, "expected state"); + const tail = self.events[self.events.length - 1]; + return tail && tail[1].type === types.listItemIndent && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok3(code) : nok(code); + } +} +function tokenizeListEnd(effects) { + ok(this.containerState, "expected state"); + ok(typeof this.containerState.type === "string", "expected type"); + effects.exit(this.containerState.type); +} +function tokenizeListItemPrefixWhitespace(effects, ok3, nok) { + const self = this; + ok( + self.parser.constructs.disable.null, + "expected `disable.null` to be populated" + ); + return factorySpace( + effects, + afterPrefix, + types.listItemPrefixWhitespace, + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize + 1 + ); + function afterPrefix(code) { + const tail = self.events[self.events.length - 1]; + return !markdownSpace(code) && tail && tail[1].type === types.listItemPrefixWhitespace ? ok3(code) : nok(code); + } +} + +// ../node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +var setextUnderline = { + name: "setextUnderline", + resolveTo: resolveToSetextUnderline, + tokenize: tokenizeSetextUnderline +}; +function resolveToSetextUnderline(events, context) { + let index = events.length; + let content2; + let text; + let definition2; + while (index--) { + if (events[index][0] === "enter") { + if (events[index][1].type === types.content) { + content2 = index; + break; + } + if (events[index][1].type === types.paragraph) { + text = index; + } + } else { + if (events[index][1].type === types.content) { + events.splice(index, 1); + } + if (!definition2 && events[index][1].type === types.definition) { + definition2 = index; + } + } + } + ok(text !== void 0, "expected a `text` index to be found"); + ok(content2 !== void 0, "expected a `text` index to be found"); + ok(events[content2][2] === context, "enter context should be same"); + ok( + events[events.length - 1][2] === context, + "enter context should be same" + ); + const heading = { + type: types.setextHeading, + start: { ...events[content2][1].start }, + end: { ...events[events.length - 1][1].end } + }; + events[text][1].type = types.setextHeadingText; + if (definition2) { + events.splice(text, 0, ["enter", heading, context]); + events.splice(definition2 + 1, 0, ["exit", events[content2][1], context]); + events[content2][1].end = { ...events[definition2][1].end }; + } else { + events[content2][1] = heading; + } + events.push(["exit", heading, context]); + return events; +} +function tokenizeSetextUnderline(effects, ok3, nok) { + const self = this; + let marker; + return start; + function start(code) { + let index = self.events.length; + let paragraph; + ok( + code === codes.dash || code === codes.equalsTo, + "expected `=` or `-`" + ); + while (index--) { + if (self.events[index][1].type !== types.lineEnding && self.events[index][1].type !== types.linePrefix && self.events[index][1].type !== types.content) { + paragraph = self.events[index][1].type === types.paragraph; + break; + } + } + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter(types.setextHeadingLine); + marker = code; + return before(code); + } + return nok(code); + } + function before(code) { + effects.enter(types.setextHeadingLineSequence); + return inside(code); + } + function inside(code) { + if (code === marker) { + effects.consume(code); + return inside; + } + effects.exit(types.setextHeadingLineSequence); + return markdownSpace(code) ? factorySpace(effects, after, types.lineSuffix)(code) : after(code); + } + function after(code) { + if (code === codes.eof || markdownLineEnding(code)) { + effects.exit(types.setextHeadingLine); + return ok3(code); + } + return nok(code); + } +} + +// ../node_modules/micromark-util-decode-string/dev/index.js +var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode); +} +function decode($0, $1, $2) { + if ($1) { + return $1; + } + const head = $2.charCodeAt(0); + if (head === codes.numberSign) { + const head2 = $2.charCodeAt(1); + const hex = head2 === codes.lowercaseX || head2 === codes.uppercaseX; + return decodeNumericCharacterReference( + $2.slice(hex ? 2 : 1), + hex ? constants.numericBaseHexadecimal : constants.numericBaseDecimal + ); + } + return decodeNamedCharacterReference($2) || $0; +} + +export { + ok, + unreachable, + toString, + decodeNamedCharacterReference, + codes, + constants, + types, + values, + splice, + push, + combineExtensions, + decodeNumericCharacterReference, + normalizeIdentifier, + asciiAlpha, + asciiAlphanumeric, + asciiControl, + markdownLineEnding, + markdownLineEndingOrSpace, + markdownSpace, + unicodePunctuation, + unicodeWhitespace, + normalizeUri, + factorySpace, + classifyCharacter, + resolveAll, + attention, + autolink, + blankLine, + blockQuote, + characterEscape, + characterReference, + codeFenced, + codeIndented, + codeText, + subtokenize, + content, + definition, + hardBreakEscape, + headingAtx, + htmlFlow, + htmlText, + labelEnd, + labelStartImage, + labelStartLink, + lineEnding, + thematicBreak, + list, + setextUnderline, + decodeString, + convert, + EXIT, + visitParents, + visit +}; +//# sourceMappingURL=chunk-I425MT2V.js.map diff --git a/node_modules/.vite/deps/chunk-I425MT2V.js.map b/node_modules/.vite/deps/chunk-I425MT2V.js.map new file mode 100644 index 0000000..0efd901 --- /dev/null +++ b/node_modules/.vite/deps/chunk-I425MT2V.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../devlop/lib/development.js", "../../unist-util-is/lib/index.js", "../../unist-util-visit-parents/lib/color.js", "../../unist-util-visit-parents/lib/index.js", "../../unist-util-visit/lib/index.js", "../../micromark-util-symbol/lib/codes.js", "../../micromark-util-symbol/lib/constants.js", "../../micromark-util-symbol/lib/types.js", "../../micromark-util-symbol/lib/values.js", "../../micromark-util-chunked/dev/index.js", "../../micromark-util-combine-extensions/index.js", "../../mdast-util-to-string/lib/index.js", "../../decode-named-character-reference/index.dom.js", "../../micromark-util-decode-numeric-character-reference/dev/index.js", "../../micromark-util-normalize-identifier/dev/index.js", "../../micromark-util-character/dev/index.js", "../../micromark-util-sanitize-uri/dev/index.js", "../../micromark-factory-space/dev/index.js", "../../micromark-util-classify-character/dev/index.js", "../../micromark-util-resolve-all/index.js", "../../micromark-core-commonmark/dev/lib/blank-line.js", "../../micromark-core-commonmark/dev/lib/attention.js", "../../micromark-core-commonmark/dev/lib/autolink.js", "../../micromark-core-commonmark/dev/lib/block-quote.js", "../../micromark-core-commonmark/dev/lib/character-escape.js", "../../micromark-core-commonmark/dev/lib/character-reference.js", "../../micromark-core-commonmark/dev/lib/code-fenced.js", "../../micromark-core-commonmark/dev/lib/code-indented.js", "../../micromark-core-commonmark/dev/lib/code-text.js", "../../micromark-util-subtokenize/dev/lib/splice-buffer.js", "../../micromark-util-subtokenize/dev/index.js", "../../micromark-core-commonmark/dev/lib/content.js", "../../micromark-factory-destination/dev/index.js", "../../micromark-factory-label/dev/index.js", "../../micromark-factory-title/dev/index.js", "../../micromark-factory-whitespace/dev/index.js", "../../micromark-core-commonmark/dev/lib/definition.js", "../../micromark-core-commonmark/dev/lib/hard-break-escape.js", "../../micromark-core-commonmark/dev/lib/heading-atx.js", "../../micromark-util-html-tag-name/index.js", "../../micromark-core-commonmark/dev/lib/html-flow.js", "../../micromark-core-commonmark/dev/lib/html-text.js", "../../micromark-core-commonmark/dev/lib/label-end.js", "../../micromark-core-commonmark/dev/lib/label-start-image.js", "../../micromark-core-commonmark/dev/lib/label-start-link.js", "../../micromark-core-commonmark/dev/lib/line-ending.js", "../../micromark-core-commonmark/dev/lib/thematic-break.js", "../../micromark-core-commonmark/dev/lib/list.js", "../../micromark-core-commonmark/dev/lib/setext-underline.js", "../../micromark-util-decode-string/dev/index.js"], + "sourcesContent": ["import {dequal} from 'dequal'\n\n/**\n * @type {Set}\n */\nconst codesWarned = new Set()\n\nclass AssertionError extends Error {\n name = /** @type {const} */ ('Assertion')\n code = /** @type {const} */ ('ERR_ASSERTION')\n\n /**\n * Create an assertion error.\n *\n * @param {string} message\n * Message explaining error.\n * @param {unknown} actual\n * Value.\n * @param {unknown} expected\n * Baseline.\n * @param {string} operator\n * Name of equality operation.\n * @param {boolean} generated\n * Whether `message` is a custom message or not\n * @returns\n * Instance.\n */\n // eslint-disable-next-line max-params\n constructor(message, actual, expected, operator, generated) {\n super(message)\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor)\n }\n\n /**\n * @type {unknown}\n */\n this.actual = actual\n\n /**\n * @type {unknown}\n */\n this.expected = expected\n\n /**\n * @type {boolean}\n */\n this.generated = generated\n\n /**\n * @type {string}\n */\n this.operator = operator\n }\n}\n\nclass DeprecationError extends Error {\n name = /** @type {const} */ ('DeprecationWarning')\n\n /**\n * Create a deprecation message.\n *\n * @param {string} message\n * Message explaining deprecation.\n * @param {string | undefined} code\n * Deprecation identifier; deprecation messages will be generated only once per code.\n * @returns\n * Instance.\n */\n constructor(message, code) {\n super(message)\n\n /**\n * @type {string | undefined}\n */\n this.code = code\n }\n}\n\n/**\n * Wrap a function or class to show a deprecation message when first called.\n *\n * > 👉 **Important**: only shows a message when the `development` condition is\n * > used, does nothing in production.\n *\n * When the resulting wrapped `fn` is called, emits a warning once to\n * `console.error` (`stderr`).\n * If a code is given, one warning message will be emitted in total per code.\n *\n * @template {Function} T\n * Function or class kind.\n * @param {T} fn\n * Function or class.\n * @param {string} message\n * Message explaining deprecation.\n * @param {string | null | undefined} [code]\n * Deprecation identifier (optional); deprecation messages will be generated\n * only once per code.\n * @returns {T}\n * Wrapped `fn`.\n */\nexport function deprecate(fn, message, code) {\n let warned = false\n\n // The wrapper will keep the same prototype as fn to maintain prototype chain\n Object.setPrototypeOf(deprecated, fn)\n\n // @ts-expect-error: it’s perfect, typescript…\n return deprecated\n\n /**\n * @this {unknown}\n * @param {...Array} args\n * @returns {unknown}\n */\n function deprecated(...args) {\n if (!warned) {\n warned = true\n\n if (typeof code === 'string' && codesWarned.has(code)) {\n // Empty.\n } else {\n console.error(new DeprecationError(message, code || undefined))\n\n if (typeof code === 'string') codesWarned.add(code)\n }\n }\n\n return new.target\n ? Reflect.construct(fn, args, new.target)\n : Reflect.apply(fn, this, args)\n }\n}\n\n/**\n * Assert deep strict equivalence.\n *\n * > 👉 **Important**: only asserts when the `development` condition is used,\n * > does nothing in production.\n *\n * @template {unknown} T\n * Expected kind.\n * @param {unknown} actual\n * Value.\n * @param {T} expected\n * Baseline.\n * @param {Error | string | null | undefined} [message]\n * Message for assertion error (default: `'Expected values to be deeply equal'`).\n * @returns {asserts actual is T}\n * Nothing; throws when `actual` is not deep strict equal to `expected`.\n * @throws {AssertionError}\n * Throws when `actual` is not deep strict equal to `expected`.\n */\nexport function equal(actual, expected, message) {\n assert(\n dequal(actual, expected),\n actual,\n expected,\n 'equal',\n 'Expected values to be deeply equal',\n message\n )\n}\n\n/**\n * Assert if `value` is truthy.\n *\n * > 👉 **Important**: only asserts when the `development` condition is used,\n * > does nothing in production.\n *\n * @param {unknown} value\n * Value to assert.\n * @param {Error | string | null | undefined} [message]\n * Message for assertion error (default: `'Expected value to be truthy'`).\n * @returns {asserts value}\n * Nothing; throws when `value` is falsey.\n * @throws {AssertionError}\n * Throws when `value` is falsey.\n */\nexport function ok(value, message) {\n assert(\n Boolean(value),\n false,\n true,\n 'ok',\n 'Expected value to be truthy',\n message\n )\n}\n\n/**\n * Assert that a code path never happens.\n *\n * > 👉 **Important**: only asserts when the `development` condition is used,\n * > does nothing in production.\n *\n * @param {Error | string | null | undefined} [message]\n * Message for assertion error (default: `'Unreachable'`).\n * @returns {never}\n * Nothing; always throws.\n * @throws {AssertionError}\n * Throws when `value` is falsey.\n */\nexport function unreachable(message) {\n assert(false, false, true, 'ok', 'Unreachable', message)\n}\n\n/**\n * @param {boolean} bool\n * Whether to skip this operation.\n * @param {unknown} actual\n * Actual value.\n * @param {unknown} expected\n * Expected value.\n * @param {string} operator\n * Operator.\n * @param {string} defaultMessage\n * Default message for operation.\n * @param {Error | string | null | undefined} userMessage\n * User-provided message.\n * @returns {asserts bool}\n * Nothing; throws when falsey.\n */\n// eslint-disable-next-line max-params\nfunction assert(bool, actual, expected, operator, defaultMessage, userMessage) {\n if (!bool) {\n throw userMessage instanceof Error\n ? userMessage\n : new AssertionError(\n userMessage || defaultMessage,\n actual,\n expected,\n operator,\n !userMessage\n )\n }\n}\n", "/**\n * @import {Node, Parent} from 'unist'\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is a node.\n * @param {unknown} this\n * The given context.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n *\n * @typedef {Record | Node} Props\n * Object to check for equivalence.\n *\n * Note: `Node` is included as it is common but is not indexable.\n *\n * @typedef {Array | ReadonlyArray | Props | TestFunction | string | null | undefined} Test\n * Check for an arbitrary node.\n *\n * @callback TestFunction\n * Check if a node passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | undefined | void}\n * Whether this node passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param {unknown} node\n * Thing to check, typically `Node`.\n * @param {Test} test\n * A check for a specific node.\n * @param {number | null | undefined} index\n * The node’s position in its parent.\n * @param {Parent | null | undefined} parent\n * The node’s parent.\n * @param {unknown} context\n * Context object (`this`) to pass to `test` functions.\n * @returns {boolean}\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * (>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((node?: null | undefined) => false) &\n * ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return looksLikeANode(node)\n ? check.call(context, node, index, parent)\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param {Test} test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns {Check}\n * An assertion.\n */\nexport const convert =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * ((test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &\n * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return ok\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test)\n ? anyFactory(test)\n : // Cast because `ReadonlyArray` goes into the above but `isArray`\n // narrows to `Array`.\n propertiesFactory(/** @type {Props} */ (test))\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {Check}\n */\nfunction propertiesFactory(check) {\n const checkAsRecord = /** @type {Record} */ (check)\n\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n const nodeAsRecord = /** @type {Record} */ (\n /** @type {unknown} */ (node)\n )\n\n /** @type {string} */\n let key\n\n for (key in check) {\n if (nodeAsRecord[key] !== checkAsRecord[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeANode(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\nfunction ok() {\n return true\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction looksLikeANode(value) {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n", "/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return d\n}\n", "/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray\n * ? MatchesOne\n * : Check extends Array\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {InternalAncestor, Child>} Ancestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {'skip' | boolean} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [VisitedParents=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor, Check>, Ancestor, Check>>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n * @template {UnistNode} [Tree=UnistNode]\n * Tree type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from 'unist-util-visit-parents/do-not-use-color'\n\n/** @type {Readonly} */\nconst empty = []\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} test\n * `unist-util-is`-compatible test\n * @param {Visitor | boolean | null | undefined} [visitor]\n * Handle each node.\n * @param {boolean | null | undefined} [reverse]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visitParents(tree, test, visitor, reverse) {\n /** @type {Test} */\n let check\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n } else {\n // @ts-expect-error visitor given, so `test` isn’t a visitor.\n check = test\n }\n\n const is = convert(check)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {UnistNode} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n const value = /** @type {Record} */ (\n node && typeof node === 'object' ? node : {}\n )\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {Readonly} */\n let result = empty\n /** @type {Readonly} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || undefined)) {\n // @ts-expect-error: `visitor` is now a visitor.\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n if ('children' in node && node.children) {\n const nodeAsParent = /** @type {UnistParent} */ (node)\n\n if (nodeAsParent.children && result[0] !== SKIP) {\n offset = (reverse ? nodeAsParent.children.length : -1) + step\n grandparents = parents.concat(nodeAsParent)\n\n while (offset > -1 && offset < nodeAsParent.children.length) {\n const child = nodeAsParent.children[offset]\n\n subresult = factory(child, offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n }\n\n return result\n }\n }\n}\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {Readonly}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return value === null || value === undefined ? empty : [value]\n}\n", "/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n * @import {VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef {Exclude | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n// To do: use types from `unist-util-visit-parents` when it’s released.\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate extends Value\n * ? Predicate\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray\n * ? MatchesOne\n * : MatchesOne\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent\n * | InternalAncestor, Max, Increment>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends UnistNode ? number | undefined : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [Ancestor=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor>} BuildVisitorFromMatch\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Visited\n * Node type.\n * @template {UnistParent} Ancestor\n * Parent type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromMatch<\n * Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromDescendants<\n * InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} [Tree=UnistNode]\n * Node type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} testOrVisitor\n * `unist-util-is`-compatible test (optional, omit to pass a visitor).\n * @param {Visitor | boolean | null | undefined} [visitorOrReverse]\n * Handle each node (when test is omitted, pass `reverse`).\n * @param {boolean | null | undefined} [maybeReverse=false]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {\n /** @type {boolean | null | undefined} */\n let reverse\n /** @type {Test} */\n let test\n /** @type {Visitor} */\n let visitor\n\n if (\n typeof testOrVisitor === 'function' &&\n typeof visitorOrReverse !== 'function'\n ) {\n test = undefined\n visitor = testOrVisitor\n reverse = visitorOrReverse\n } else {\n // @ts-expect-error: assume the overload with test was given.\n test = testOrVisitor\n // @ts-expect-error: assume the overload with test was given.\n visitor = visitorOrReverse\n reverse = maybeReverse\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {UnistNode} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n const index = parent ? parent.children.indexOf(node) : undefined\n return visitor(node, index, parent)\n }\n}\n", "/**\n * Character codes.\n *\n * This module is compiled away!\n *\n * micromark works based on character codes.\n * This module contains constants for the ASCII block and the replacement\n * character.\n * A couple of them are handled in a special way, such as the line endings\n * (CR, LF, and CR+LF, commonly known as end-of-line: EOLs), the tab (horizontal\n * tab) and its expansion based on what column it’s at (virtual space),\n * and the end-of-file (eof) character.\n * As values are preprocessed before handling them, the actual characters LF,\n * CR, HT, and NUL (which is present as the replacement character), are\n * guaranteed to not exist.\n *\n * Unicode basic latin block.\n */\nexport const codes = /** @type {const} */ ({\n carriageReturn: -5,\n lineFeed: -4,\n carriageReturnLineFeed: -3,\n horizontalTab: -2,\n virtualSpace: -1,\n eof: null,\n nul: 0,\n soh: 1,\n stx: 2,\n etx: 3,\n eot: 4,\n enq: 5,\n ack: 6,\n bel: 7,\n bs: 8,\n ht: 9, // `\\t`\n lf: 10, // `\\n`\n vt: 11, // `\\v`\n ff: 12, // `\\f`\n cr: 13, // `\\r`\n so: 14,\n si: 15,\n dle: 16,\n dc1: 17,\n dc2: 18,\n dc3: 19,\n dc4: 20,\n nak: 21,\n syn: 22,\n etb: 23,\n can: 24,\n em: 25,\n sub: 26,\n esc: 27,\n fs: 28,\n gs: 29,\n rs: 30,\n us: 31,\n space: 32,\n exclamationMark: 33, // `!`\n quotationMark: 34, // `\"`\n numberSign: 35, // `#`\n dollarSign: 36, // `$`\n percentSign: 37, // `%`\n ampersand: 38, // `&`\n apostrophe: 39, // `'`\n leftParenthesis: 40, // `(`\n rightParenthesis: 41, // `)`\n asterisk: 42, // `*`\n plusSign: 43, // `+`\n comma: 44, // `,`\n dash: 45, // `-`\n dot: 46, // `.`\n slash: 47, // `/`\n digit0: 48, // `0`\n digit1: 49, // `1`\n digit2: 50, // `2`\n digit3: 51, // `3`\n digit4: 52, // `4`\n digit5: 53, // `5`\n digit6: 54, // `6`\n digit7: 55, // `7`\n digit8: 56, // `8`\n digit9: 57, // `9`\n colon: 58, // `:`\n semicolon: 59, // `;`\n lessThan: 60, // `<`\n equalsTo: 61, // `=`\n greaterThan: 62, // `>`\n questionMark: 63, // `?`\n atSign: 64, // `@`\n uppercaseA: 65, // `A`\n uppercaseB: 66, // `B`\n uppercaseC: 67, // `C`\n uppercaseD: 68, // `D`\n uppercaseE: 69, // `E`\n uppercaseF: 70, // `F`\n uppercaseG: 71, // `G`\n uppercaseH: 72, // `H`\n uppercaseI: 73, // `I`\n uppercaseJ: 74, // `J`\n uppercaseK: 75, // `K`\n uppercaseL: 76, // `L`\n uppercaseM: 77, // `M`\n uppercaseN: 78, // `N`\n uppercaseO: 79, // `O`\n uppercaseP: 80, // `P`\n uppercaseQ: 81, // `Q`\n uppercaseR: 82, // `R`\n uppercaseS: 83, // `S`\n uppercaseT: 84, // `T`\n uppercaseU: 85, // `U`\n uppercaseV: 86, // `V`\n uppercaseW: 87, // `W`\n uppercaseX: 88, // `X`\n uppercaseY: 89, // `Y`\n uppercaseZ: 90, // `Z`\n leftSquareBracket: 91, // `[`\n backslash: 92, // `\\`\n rightSquareBracket: 93, // `]`\n caret: 94, // `^`\n underscore: 95, // `_`\n graveAccent: 96, // `` ` ``\n lowercaseA: 97, // `a`\n lowercaseB: 98, // `b`\n lowercaseC: 99, // `c`\n lowercaseD: 100, // `d`\n lowercaseE: 101, // `e`\n lowercaseF: 102, // `f`\n lowercaseG: 103, // `g`\n lowercaseH: 104, // `h`\n lowercaseI: 105, // `i`\n lowercaseJ: 106, // `j`\n lowercaseK: 107, // `k`\n lowercaseL: 108, // `l`\n lowercaseM: 109, // `m`\n lowercaseN: 110, // `n`\n lowercaseO: 111, // `o`\n lowercaseP: 112, // `p`\n lowercaseQ: 113, // `q`\n lowercaseR: 114, // `r`\n lowercaseS: 115, // `s`\n lowercaseT: 116, // `t`\n lowercaseU: 117, // `u`\n lowercaseV: 118, // `v`\n lowercaseW: 119, // `w`\n lowercaseX: 120, // `x`\n lowercaseY: 121, // `y`\n lowercaseZ: 122, // `z`\n leftCurlyBrace: 123, // `{`\n verticalBar: 124, // `|`\n rightCurlyBrace: 125, // `}`\n tilde: 126, // `~`\n del: 127,\n // Unicode Specials block.\n byteOrderMarker: 65_279,\n // Unicode Specials block.\n replacementCharacter: 65_533 // `�`\n})\n", "/**\n * This module is compiled away!\n *\n * Parsing markdown comes with a couple of constants, such as minimum or maximum\n * sizes of certain sequences.\n * Additionally, there are a couple symbols used inside micromark.\n * These are all defined here, but compiled away by scripts.\n */\nexport const constants = /** @type {const} */ ({\n attentionSideAfter: 2, // Symbol to mark an attention sequence as after content: `a*`\n attentionSideBefore: 1, // Symbol to mark an attention sequence as before content: `*a`\n atxHeadingOpeningFenceSizeMax: 6, // 6 number signs is fine, 7 isn’t.\n autolinkDomainSizeMax: 63, // 63 characters is fine, 64 is too many.\n autolinkSchemeSizeMax: 32, // 32 characters is fine, 33 is too many.\n cdataOpeningString: 'CDATA[', // And preceded by ``\n htmlComment: 2, // Symbol for ``\n htmlComplete: 7, // Symbol for ``\n htmlDeclaration: 4, // Symbol for ``\n htmlInstruction: 3, // Symbol for ``\n htmlRawSizeMax: 8, // Length of `textarea`.\n htmlRaw: 1, // Symbol for `\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === codes.slash) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === codes.greaterThan) {\n const name = buffer.toLowerCase()\n\n if (htmlRawNames.includes(name)) {\n effects.consume(code)\n return continuationClose\n }\n\n return continuation(code)\n }\n\n if (asciiAlpha(code) && buffer.length < constants.htmlRawSizeMax) {\n assert(code !== null) // Always the case.\n effects.consume(code)\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n\n return continuation(code)\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === codes.rightSquareBracket) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === codes.greaterThan) {\n effects.consume(code)\n return continuationClose\n }\n\n // More dashes.\n if (code === codes.dash && marker === constants.htmlComment) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n\n return continuation(code)\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === codes.eof || markdownLineEnding(code)) {\n effects.exit(types.htmlFlowData)\n return continuationAfter(code)\n }\n\n effects.consume(code)\n return continuationClose\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit(types.htmlFlow)\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this\n\n return start\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter(types.lineEnding)\n effects.consume(code)\n effects.exit(types.lineEnding)\n return after\n }\n\n return nok(code)\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n assert(markdownLineEnding(code), 'expected a line ending')\n effects.enter(types.lineEnding)\n effects.consume(code)\n effects.exit(types.lineEnding)\n return effects.attempt(blankLine, ok, nok)\n }\n}\n", "/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlphanumeric,\n asciiAlpha,\n markdownLineEndingOrSpace,\n markdownLineEnding,\n markdownSpace\n} from 'micromark-util-character'\nimport {codes, constants, types} from 'micromark-util-symbol'\n\n/** @type {Construct} */\nexport const htmlText = {name: 'htmlText', tokenize: tokenizeHtmlText}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable | undefined} */\n let marker\n /** @type {number} */\n let index\n /** @type {State} */\n let returnState\n\n return start\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n assert(code === codes.lessThan, 'expected `<`')\n effects.enter(types.htmlText)\n effects.enter(types.htmlTextData)\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === codes.exclamationMark) {\n effects.consume(code)\n return declarationOpen\n }\n\n if (code === codes.slash) {\n effects.consume(code)\n return tagCloseStart\n }\n\n if (code === codes.questionMark) {\n effects.consume(code)\n return instruction\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === codes.dash) {\n effects.consume(code)\n return commentOpenInside\n }\n\n if (code === codes.leftSquareBracket) {\n effects.consume(code)\n index = 0\n return cdataOpenInside\n }\n\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n\n return nok(code)\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === codes.dash) {\n effects.consume(code)\n return commentEnd\n }\n\n return nok(code)\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === codes.eof) {\n return nok(code)\n }\n\n if (code === codes.dash) {\n effects.consume(code)\n return commentClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = comment\n return lineEndingBefore(code)\n }\n\n effects.consume(code)\n return comment\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === codes.dash) {\n effects.consume(code)\n return commentEnd\n }\n\n return comment(code)\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === codes.greaterThan\n ? end(code)\n : code === codes.dash\n ? commentClose(code)\n : comment(code)\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = constants.cdataOpeningString\n\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n return index === value.length ? cdata : cdataOpenInside\n }\n\n return nok(code)\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === codes.eof) {\n return nok(code)\n }\n\n if (code === codes.rightSquareBracket) {\n effects.consume(code)\n return cdataClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = cdata\n return lineEndingBefore(code)\n }\n\n effects.consume(code)\n return cdata\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === codes.rightSquareBracket) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === codes.greaterThan) {\n return end(code)\n }\n\n if (code === codes.rightSquareBracket) {\n effects.consume(code)\n return cdataEnd\n }\n\n return cdata(code)\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === codes.eof || code === codes.greaterThan) {\n return end(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = declaration\n return lineEndingBefore(code)\n }\n\n effects.consume(code)\n return declaration\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === codes.eof) {\n return nok(code)\n }\n\n if (code === codes.questionMark) {\n effects.consume(code)\n return instructionClose\n }\n\n if (markdownLineEnding(code)) {\n returnState = instruction\n return lineEndingBefore(code)\n }\n\n effects.consume(code)\n return instruction\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === codes.greaterThan ? end(code) : instruction(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === codes.dash || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n\n return tagCloseBetween(code)\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return lineEndingBefore(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n\n return end(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === codes.dash || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n\n if (\n code === codes.slash ||\n code === codes.greaterThan ||\n markdownLineEndingOrSpace(code)\n ) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === codes.slash) {\n effects.consume(code)\n return end\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === codes.colon || code === codes.underscore || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return lineEndingBefore(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n\n return end(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (\n code === codes.dash ||\n code === codes.dot ||\n code === codes.colon ||\n code === codes.underscore ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n\n return tagOpenAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === codes.equalsTo) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return lineEndingBefore(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n\n return tagOpenBetween(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (\n code === codes.eof ||\n code === codes.lessThan ||\n code === codes.equalsTo ||\n code === codes.greaterThan ||\n code === codes.graveAccent\n ) {\n return nok(code)\n }\n\n if (code === codes.quotationMark || code === codes.apostrophe) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return lineEndingBefore(code)\n }\n\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueQuotedAfter\n }\n\n if (code === codes.eof) {\n return nok(code)\n }\n\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return lineEndingBefore(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === codes.eof ||\n code === codes.quotationMark ||\n code === codes.apostrophe ||\n code === codes.lessThan ||\n code === codes.equalsTo ||\n code === codes.graveAccent\n ) {\n return nok(code)\n }\n\n if (\n code === codes.slash ||\n code === codes.greaterThan ||\n markdownLineEndingOrSpace(code)\n ) {\n return tagOpenBetween(code)\n }\n\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (\n code === codes.slash ||\n code === codes.greaterThan ||\n markdownLineEndingOrSpace(code)\n ) {\n return tagOpenBetween(code)\n }\n\n return nok(code)\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === codes.greaterThan) {\n effects.consume(code)\n effects.exit(types.htmlTextData)\n effects.exit(types.htmlText)\n return ok\n }\n\n return nok(code)\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n assert(returnState, 'expected return state')\n assert(markdownLineEnding(code), 'expected eol')\n effects.exit(types.htmlTextData)\n effects.enter(types.lineEnding)\n effects.consume(code)\n effects.exit(types.lineEnding)\n return lineEndingAfter\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n assert(\n self.parser.constructs.disable.null,\n 'expected `disable.null` to be populated'\n )\n return markdownSpace(code)\n ? factorySpace(\n effects,\n lineEndingAfterPrefix,\n types.linePrefix,\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : constants.tabSize\n )(code)\n : lineEndingAfterPrefix(code)\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(types.htmlTextData)\n return returnState(code)\n }\n}\n", "/**\n * @import {\n * Construct,\n * Event,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\nimport {codes, constants, types} from 'micromark-util-symbol'\n\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n resolveAll: resolveAllLabelEnd,\n resolveTo: resolveToLabelEnd,\n tokenize: tokenizeLabelEnd\n}\n\n/** @type {Construct} */\nconst resourceConstruct = {tokenize: tokenizeResource}\n/** @type {Construct} */\nconst referenceFullConstruct = {tokenize: tokenizeReferenceFull}\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {tokenize: tokenizeReferenceCollapsed}\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1\n /** @type {Array} */\n const newEvents = []\n while (++index < events.length) {\n const token = events[index][1]\n newEvents.push(events[index])\n\n if (\n token.type === types.labelImage ||\n token.type === types.labelLink ||\n token.type === types.labelEnd\n ) {\n // Remove the marker.\n const offset = token.type === types.labelImage ? 4 : 2\n token.type = types.data\n index += offset\n }\n }\n\n // If the events are equal, we don't have to copy newEvents to events\n if (events.length !== newEvents.length) {\n splice(events, 0, events.length, newEvents)\n }\n\n return events\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n let token\n /** @type {number | undefined} */\n let open\n /** @type {number | undefined} */\n let close\n /** @type {Array} */\n let media\n\n // Find an opening.\n while (index--) {\n token = events[index][1]\n\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === types.link ||\n (token.type === types.labelLink && token._inactive)\n ) {\n break\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === types.labelLink) {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === types.labelImage || token.type === types.labelLink) &&\n !token._balanced\n ) {\n open = index\n\n if (token.type !== types.labelLink) {\n offset = 2\n break\n }\n }\n } else if (token.type === types.labelEnd) {\n close = index\n }\n }\n\n assert(open !== undefined, '`open` is supposed to be found')\n assert(close !== undefined, '`close` is supposed to be found')\n\n const group = {\n type: events[open][1].type === types.labelLink ? types.link : types.image,\n start: {...events[open][1].start},\n end: {...events[events.length - 1][1].end}\n }\n\n const label = {\n type: types.label,\n start: {...events[open][1].start},\n end: {...events[close][1].end}\n }\n\n const text = {\n type: types.labelText,\n start: {...events[open + offset + 2][1].end},\n end: {...events[close - 2][1].start}\n }\n\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ]\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3))\n\n // Text open.\n media = push(media, [['enter', text, context]])\n\n // Always populated by defaults.\n assert(\n context.parser.constructs.insideSpan.null,\n 'expected `insideSpan.null` to be populated'\n )\n // Between.\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n )\n\n // Text close, marker close, label close.\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ])\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1))\n\n // Media close.\n media = push(media, [['exit', group, context]])\n\n splice(events, open, events.length, media)\n\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n let labelStart\n /** @type {boolean} */\n let defined\n\n // Find an opening.\n while (index--) {\n if (\n (self.events[index][1].type === types.labelImage ||\n self.events[index][1].type === types.labelLink) &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n\n return start\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n assert(code === codes.rightSquareBracket, 'expected `]`')\n\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code)\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code)\n }\n\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({start: labelStart.end, end: self.now()})\n )\n )\n effects.enter(types.labelEnd)\n effects.enter(types.labelMarker)\n effects.consume(code)\n effects.exit(types.labelMarker)\n effects.exit(types.labelEnd)\n return after\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === codes.leftParenthesis) {\n return effects.attempt(\n resourceConstruct,\n labelEndOk,\n defined ? labelEndOk : labelEndNok\n )(code)\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === codes.leftSquareBracket) {\n return effects.attempt(\n referenceFullConstruct,\n labelEndOk,\n defined ? referenceNotFull : labelEndNok\n )(code)\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code)\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(\n referenceCollapsedConstruct,\n labelEndOk,\n labelEndNok\n )(code)\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code)\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n assert(code === codes.leftParenthesis, 'expected left paren')\n effects.enter(types.resource)\n effects.enter(types.resourceMarker)\n effects.consume(code)\n effects.exit(types.resourceMarker)\n return resourceBefore\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceOpen)(code)\n : resourceOpen(code)\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === codes.rightParenthesis) {\n return resourceEnd(code)\n }\n\n return factoryDestination(\n effects,\n resourceDestinationAfter,\n resourceDestinationMissing,\n types.resourceDestination,\n types.resourceDestinationLiteral,\n types.resourceDestinationLiteralMarker,\n types.resourceDestinationRaw,\n types.resourceDestinationString,\n constants.linkResourceDestinationBalanceMax\n )(code)\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceBetween)(code)\n : resourceEnd(code)\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code)\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (\n code === codes.quotationMark ||\n code === codes.apostrophe ||\n code === codes.leftParenthesis\n ) {\n return factoryTitle(\n effects,\n resourceTitleAfter,\n nok,\n types.resourceTitle,\n types.resourceTitleMarker,\n types.resourceTitleString\n )(code)\n }\n\n return resourceEnd(code)\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceEnd)(code)\n : resourceEnd(code)\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === codes.rightParenthesis) {\n effects.enter(types.resourceMarker)\n effects.consume(code)\n effects.exit(types.resourceMarker)\n effects.exit(types.resource)\n return ok\n }\n\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this\n\n return referenceFull\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n assert(code === codes.leftSquareBracket, 'expected left bracket')\n return factoryLabel.call(\n self,\n effects,\n referenceFullAfter,\n referenceFullMissing,\n types.reference,\n types.referenceMarker,\n types.referenceString\n )(code)\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n assert(code === codes.leftSquareBracket, 'expected left bracket')\n effects.enter(types.reference)\n effects.enter(types.referenceMarker)\n effects.consume(code)\n effects.exit(types.referenceMarker)\n return referenceCollapsedOpen\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === codes.rightSquareBracket) {\n effects.enter(types.referenceMarker)\n effects.consume(code)\n effects.exit(types.referenceMarker)\n effects.exit(types.reference)\n return ok\n }\n\n return nok(code)\n }\n}\n", "/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {codes, types} from 'micromark-util-symbol'\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n\n return start\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n assert(code === codes.exclamationMark, 'expected `!`')\n effects.enter(types.labelImage)\n effects.enter(types.labelImageMarker)\n effects.consume(code)\n effects.exit(types.labelImageMarker)\n return open\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === codes.leftSquareBracket) {\n effects.enter(types.labelMarker)\n effects.consume(code)\n effects.exit(types.labelMarker)\n effects.exit(types.labelImage)\n return after\n }\n\n return nok(code)\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === codes.caret &&\n '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n", "/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {codes, types} from 'micromark-util-symbol'\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n\n return start\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n assert(code === codes.leftSquareBracket, 'expected `[`')\n effects.enter(types.labelLink)\n effects.enter(types.labelMarker)\n effects.consume(code)\n effects.exit(types.labelMarker)\n effects.exit(types.labelLink)\n return after\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === codes.caret &&\n '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n", "/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\nimport {types} from 'micromark-util-symbol'\n\n/** @type {Construct} */\nexport const lineEnding = {name: 'lineEnding', tokenize: tokenizeLineEnding}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\n /** @type {State} */\n function start(code) {\n assert(markdownLineEnding(code), 'expected eol')\n effects.enter(types.lineEnding)\n effects.consume(code)\n effects.exit(types.lineEnding)\n return factorySpace(effects, ok, types.linePrefix)\n }\n}\n", "/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\nimport {codes, constants, types} from 'micromark-util-symbol'\n\n/** @type {Construct} */\nexport const thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeThematicBreak(effects, ok, nok) {\n let size = 0\n /** @type {NonNullable} */\n let marker\n\n return start\n\n /**\n * Start of thematic break.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(types.thematicBreak)\n // To do: parse indent like `markdown-rs`.\n return before(code)\n }\n\n /**\n * After optional whitespace, at marker.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n assert(\n code === codes.asterisk ||\n code === codes.dash ||\n code === codes.underscore,\n 'expected `*`, `-`, or `_`'\n )\n marker = code\n return atBreak(code)\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.enter(types.thematicBreakSequence)\n return sequence(code)\n }\n\n if (\n size >= constants.thematicBreakMarkerCountMin &&\n (code === codes.eof || markdownLineEnding(code))\n ) {\n effects.exit(types.thematicBreak)\n return ok(code)\n }\n\n return nok(code)\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return sequence\n }\n\n effects.exit(types.thematicBreakSequence)\n return markdownSpace(code)\n ? factorySpace(effects, atBreak, types.whitespace)(code)\n : atBreak(code)\n }\n}\n", "/**\n * @import {\n * Code,\n * Construct,\n * Exiter,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {factorySpace} from 'micromark-factory-space'\nimport {asciiDigit, markdownSpace} from 'micromark-util-character'\nimport {codes, constants, types} from 'micromark-util-symbol'\nimport {blankLine} from './blank-line.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/** @type {Construct} */\nexport const list = {\n continuation: {tokenize: tokenizeListContinuation},\n exit: tokenizeListEnd,\n name: 'list',\n tokenize: tokenizeListStart\n}\n\n/** @type {Construct} */\nconst listItemPrefixWhitespaceConstruct = {\n partial: true,\n tokenize: tokenizeListItemPrefixWhitespace\n}\n\n/** @type {Construct} */\nconst indentConstruct = {partial: true, tokenize: tokenizeIndent}\n\n// To do: `markdown-rs` parses list items on their own and later stitches them\n// together.\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListStart(effects, ok, nok) {\n const self = this\n const tail = self.events[self.events.length - 1]\n let initialSize =\n tail && tail[1].type === types.linePrefix\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n let size = 0\n\n return start\n\n /** @type {State} */\n function start(code) {\n assert(self.containerState, 'expected state')\n const kind =\n self.containerState.type ||\n (code === codes.asterisk || code === codes.plusSign || code === codes.dash\n ? types.listUnordered\n : types.listOrdered)\n\n if (\n kind === types.listUnordered\n ? !self.containerState.marker || code === self.containerState.marker\n : asciiDigit(code)\n ) {\n if (!self.containerState.type) {\n self.containerState.type = kind\n effects.enter(kind, {_container: true})\n }\n\n if (kind === types.listUnordered) {\n effects.enter(types.listItemPrefix)\n return code === codes.asterisk || code === codes.dash\n ? effects.check(thematicBreak, nok, atMarker)(code)\n : atMarker(code)\n }\n\n if (!self.interrupt || code === codes.digit1) {\n effects.enter(types.listItemPrefix)\n effects.enter(types.listItemValue)\n return inside(code)\n }\n }\n\n return nok(code)\n }\n\n /** @type {State} */\n function inside(code) {\n assert(self.containerState, 'expected state')\n if (asciiDigit(code) && ++size < constants.listItemValueSizeMax) {\n effects.consume(code)\n return inside\n }\n\n if (\n (!self.interrupt || size < 2) &&\n (self.containerState.marker\n ? code === self.containerState.marker\n : code === codes.rightParenthesis || code === codes.dot)\n ) {\n effects.exit(types.listItemValue)\n return atMarker(code)\n }\n\n return nok(code)\n }\n\n /**\n * @type {State}\n **/\n function atMarker(code) {\n assert(self.containerState, 'expected state')\n assert(code !== codes.eof, 'eof (`null`) is not a marker')\n effects.enter(types.listItemMarker)\n effects.consume(code)\n effects.exit(types.listItemMarker)\n self.containerState.marker = self.containerState.marker || code\n return effects.check(\n blankLine,\n // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank,\n effects.attempt(\n listItemPrefixWhitespaceConstruct,\n endOfPrefix,\n otherPrefix\n )\n )\n }\n\n /** @type {State} */\n function onBlank(code) {\n assert(self.containerState, 'expected state')\n self.containerState.initialBlankLine = true\n initialSize++\n return endOfPrefix(code)\n }\n\n /** @type {State} */\n function otherPrefix(code) {\n if (markdownSpace(code)) {\n effects.enter(types.listItemPrefixWhitespace)\n effects.consume(code)\n effects.exit(types.listItemPrefixWhitespace)\n return endOfPrefix\n }\n\n return nok(code)\n }\n\n /** @type {State} */\n function endOfPrefix(code) {\n assert(self.containerState, 'expected state')\n self.containerState.size =\n initialSize +\n self.sliceSerialize(effects.exit(types.listItemPrefix), true).length\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListContinuation(effects, ok, nok) {\n const self = this\n\n assert(self.containerState, 'expected state')\n self.containerState._closeFlow = undefined\n\n return effects.check(blankLine, onBlank, notBlank)\n\n /** @type {State} */\n function onBlank(code) {\n assert(self.containerState, 'expected state')\n assert(typeof self.containerState.size === 'number', 'expected size')\n self.containerState.furtherBlankLines =\n self.containerState.furtherBlankLines ||\n self.containerState.initialBlankLine\n\n // We have a blank line.\n // Still, try to consume at most the items size.\n return factorySpace(\n effects,\n ok,\n types.listItemIndent,\n self.containerState.size + 1\n )(code)\n }\n\n /** @type {State} */\n function notBlank(code) {\n assert(self.containerState, 'expected state')\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = undefined\n self.containerState.initialBlankLine = undefined\n return notInCurrentItem(code)\n }\n\n self.containerState.furtherBlankLines = undefined\n self.containerState.initialBlankLine = undefined\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)\n }\n\n /** @type {State} */\n function notInCurrentItem(code) {\n assert(self.containerState, 'expected state')\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true\n // As we’re closing flow, we’re no longer interrupting.\n self.interrupt = undefined\n // Always populated by defaults.\n assert(\n self.parser.constructs.disable.null,\n 'expected `disable.null` to be populated'\n )\n return factorySpace(\n effects,\n effects.attempt(list, ok, nok),\n types.linePrefix,\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : constants.tabSize\n )(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this\n\n assert(self.containerState, 'expected state')\n assert(typeof self.containerState.size === 'number', 'expected size')\n\n return factorySpace(\n effects,\n afterPrefix,\n types.listItemIndent,\n self.containerState.size + 1\n )\n\n /** @type {State} */\n function afterPrefix(code) {\n assert(self.containerState, 'expected state')\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === types.listItemIndent &&\n tail[2].sliceSerialize(tail[1], true).length === self.containerState.size\n ? ok(code)\n : nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Exiter}\n */\nfunction tokenizeListEnd(effects) {\n assert(this.containerState, 'expected state')\n assert(typeof this.containerState.type === 'string', 'expected type')\n effects.exit(this.containerState.type)\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n const self = this\n\n // Always populated by defaults.\n assert(\n self.parser.constructs.disable.null,\n 'expected `disable.null` to be populated'\n )\n\n return factorySpace(\n effects,\n afterPrefix,\n types.listItemPrefixWhitespace,\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : constants.tabSize + 1\n )\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n\n return !markdownSpace(code) &&\n tail &&\n tail[1].type === types.listItemPrefixWhitespace\n ? ok(code)\n : nok(code)\n }\n}\n", "/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport {ok as assert} from 'devlop'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\nimport {codes, types} from 'micromark-util-symbol'\n\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n resolveTo: resolveToSetextUnderline,\n tokenize: tokenizeSetextUnderline\n}\n\n/** @type {Resolver} */\nfunction resolveToSetextUnderline(events, context) {\n // To do: resolve like `markdown-rs`.\n let index = events.length\n /** @type {number | undefined} */\n let content\n /** @type {number | undefined} */\n let text\n /** @type {number | undefined} */\n let definition\n\n // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === types.content) {\n content = index\n break\n }\n\n if (events[index][1].type === types.paragraph) {\n text = index\n }\n }\n // Exit\n else {\n if (events[index][1].type === types.content) {\n // Remove the content end (if needed we’ll add it later)\n events.splice(index, 1)\n }\n\n if (!definition && events[index][1].type === types.definition) {\n definition = index\n }\n }\n }\n\n assert(text !== undefined, 'expected a `text` index to be found')\n assert(content !== undefined, 'expected a `text` index to be found')\n assert(events[content][2] === context, 'enter context should be same')\n assert(\n events[events.length - 1][2] === context,\n 'enter context should be same'\n )\n const heading = {\n type: types.setextHeading,\n start: {...events[content][1].start},\n end: {...events[events.length - 1][1].end}\n }\n\n // Change the paragraph to setext heading text.\n events[text][1].type = types.setextHeadingText\n\n // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n if (definition) {\n events.splice(text, 0, ['enter', heading, context])\n events.splice(definition + 1, 0, ['exit', events[content][1], context])\n events[content][1].end = {...events[definition][1].end}\n } else {\n events[content][1] = heading\n }\n\n // Add the heading exit at the end.\n events.push(['exit', heading, context])\n\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this\n /** @type {NonNullable} */\n let marker\n\n return start\n\n /**\n * At start of heading (setext) underline.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n let index = self.events.length\n /** @type {boolean | undefined} */\n let paragraph\n\n assert(\n code === codes.dash || code === codes.equalsTo,\n 'expected `=` or `-`'\n )\n\n // Find an opening.\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (\n self.events[index][1].type !== types.lineEnding &&\n self.events[index][1].type !== types.linePrefix &&\n self.events[index][1].type !== types.content\n ) {\n paragraph = self.events[index][1].type === types.paragraph\n break\n }\n }\n\n // To do: handle lazy/pierce like `markdown-rs`.\n // To do: parse indent like `markdown-rs`.\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter(types.setextHeadingLine)\n marker = code\n return before(code)\n }\n\n return nok(code)\n }\n\n /**\n * After optional whitespace, at `-` or `=`.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(types.setextHeadingLineSequence)\n return inside(code)\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n\n effects.exit(types.setextHeadingLineSequence)\n\n return markdownSpace(code)\n ? factorySpace(effects, after, types.lineSuffix)(code)\n : after(code)\n }\n\n /**\n * After sequence, after optional whitespace.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (code === codes.eof || markdownLineEnding(code)) {\n effects.exit(types.setextHeadingLine)\n return ok(code)\n }\n\n return nok(code)\n }\n}\n", "import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {codes, constants} from 'micromark-util-symbol'\n\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode)\n}\n\n/**\n * @param {string} $0\n * Match.\n * @param {string} $1\n * Character escape.\n * @param {string} $2\n * Character reference.\n * @returns {string}\n * Decoded value\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1\n }\n\n // Reference.\n const head = $2.charCodeAt(0)\n\n if (head === codes.numberSign) {\n const head = $2.charCodeAt(1)\n const hex = head === codes.lowercaseX || head === codes.uppercaseX\n return decodeNumericCharacterReference(\n $2.slice(hex ? 2 : 1),\n hex ? constants.numericBaseHexadecimal : constants.numericBaseDecimal\n )\n }\n\n return decodeNamedCharacterReference($2) || $0\n}\n"], + "mappings": ";;;;;AAOA,IAAM,iBAAN,cAA6B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBjC,YAAY,SAAS,QAAQ,UAAU,UAAU,WAAW;AAC1D,UAAM,OAAO;AArBf;AAAA;AAAA;AAAA;AAAA,MAA6B;AAAA;AAC7B;AAAA;AAAA;AAAA;AAAA,MAA6B;AAAA;AAsB3B,QAAI,MAAM,mBAAmB;AAC3B,YAAM,kBAAkB,MAAM,KAAK,WAAW;AAAA,IAChD;A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U,yBAAyB,UAAU;AAAA,IACrD;AAAA,EACF;AAEA,SAAO,8BAA8B,EAAE,KAAK;AAC9C;", + "names": ["ok", "index", "all", "node", "is", "node", "visit", "node", "list", "all", "list", "values", "characterReference", "ok", "constructs", "ok", "ok", "previous", "ok", "ok", "ok", "ok", "ok", "effects", "nok", "start", "ok", "furtherStart", "ok", "list", "previous", "start", "ok", "previous", "ok", "ok", "ok", "ok", "ok", "titleBefore", "ok", "content", "ok", "ok", "ok", "ok", "ok", "ok", "ok", "ok", "ok", "content", "definition", "ok", "head"] +} diff --git a/node_modules/.vite/deps/chunk-IO7TC67E.js b/node_modules/.vite/deps/chunk-IO7TC67E.js new file mode 100644 index 0000000..73967c1 --- /dev/null +++ b/node_modules/.vite/deps/chunk-IO7TC67E.js @@ -0,0 +1,1029 @@ +import { + __commonJS +} from "./chunk-DC5AMYBS.js"; + +// node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports, module) { + "use strict"; + (function() { + function defineDeprecationWarning(methodName, info) { + Object.defineProperty(Component.prototype, methodName, { + get: function() { + console.warn( + "%s(...) is deprecated in plain JavaScript React classes. %s", + info[0], + info[1] + ); + } + }); + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function warnNoop(publicInstance, callerName) { + publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass"; + var warningKey = publicInstance + "." + callerName; + didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error( + "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", + callerName, + publicInstance + ), didWarnStateUpdateForUnmountedComponent[warningKey] = true); + } + function Component(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + function ComponentDummy() { + } + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + function noop() { + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + try { + testStringCoercion(value); + var JSCompiler_inline_result = false; + } catch (e) { + JSCompiler_inline_result = true; + } + if (JSCompiler_inline_result) { + JSCompiler_inline_result = console; + var JSCompiler_temp_const = JSCompiler_inline_result.error; + var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + JSCompiler_temp_const.call( + JSCompiler_inline_result, + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + JSCompiler_inline_result$jscomp$0 + ); + return testStringCoercion(value); + } + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ("number" === typeof type.tag && console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), type.$$typeof) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); + return type; + case REACT_MEMO_TYPE: + return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) { + } + } + return null; + } + function getTaskName(type) { + if (type === REACT_FRAGMENT_TYPE) return "<>"; + if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) + return "<...>"; + try { + var name = getComponentNameFromType(type); + return name ? "<" + name + ">" : "<...>"; + } catch (x) { + return "<...>"; + } + } + function getOwner() { + var dispatcher = ReactSharedInternals.A; + return null === dispatcher ? null : dispatcher.getOwner(); + } + function UnknownOwner() { + return Error("react-stack-top-frame"); + } + function hasValidKey(config) { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) return false; + } + return void 0 !== config.key; + } + function defineKeyPropWarningGetter(props, displayName) { + function warnAboutAccessingKey() { + specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error( + "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", + displayName + )); + } + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function elementRefGetterWithDeprecationWarning() { + var componentName = getComponentNameFromType(this.type); + didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error( + "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." + )); + componentName = this.props.ref; + return void 0 !== componentName ? componentName : null; + } + function ReactElement(type, key, props, owner, debugStack, debugTask) { + var refProp = props.ref; + type = { + $$typeof: REACT_ELEMENT_TYPE, + type, + key, + props, + _owner: owner + }; + null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", { + enumerable: false, + get: elementRefGetterWithDeprecationWarning + }) : Object.defineProperty(type, "ref", { enumerable: false, value: null }); + type._store = {}; + Object.defineProperty(type._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: 0 + }); + Object.defineProperty(type, "_debugInfo", { + configurable: false, + enumerable: false, + writable: true, + value: null + }); + Object.defineProperty(type, "_debugStack", { + configurable: false, + enumerable: false, + writable: true, + value: debugStack + }); + Object.defineProperty(type, "_debugTask", { + configurable: false, + enumerable: false, + writable: true, + value: debugTask + }); + Object.freeze && (Object.freeze(type.props), Object.freeze(type)); + return type; + } + function cloneAndReplaceKey(oldElement, newKey) { + newKey = ReactElement( + oldElement.type, + newKey, + oldElement.props, + oldElement._owner, + oldElement._debugStack, + oldElement._debugTask + ); + oldElement._store && (newKey._store.validated = oldElement._store.validated); + return newKey; + } + function validateChildKeys(node) { + isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1)); + } + function isValidElement(object) { + return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; + } + function escape(key) { + var escaperLookup = { "=": "=0", ":": "=2" }; + return "$" + key.replace(/[=:]/g, function(match) { + return escaperLookup[match]; + }); + } + function getElementKey(element, index) { + return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36); + } + function resolveThenable(thenable) { + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + default: + switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then( + function(fulfilledValue) { + "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue); + }, + function(error) { + "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error); + } + )), thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw thenable.reason; + } + } + throw thenable; + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if ("undefined" === type || "boolean" === type) children = null; + var invokeCallback = false; + if (null === children) invokeCallback = true; + else + switch (type) { + case "bigint": + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + break; + case REACT_LAZY_TYPE: + return invokeCallback = children._init, mapIntoArray( + invokeCallback(children._payload), + array, + escapedPrefix, + nameSoFar, + callback + ); + } + } + if (invokeCallback) { + invokeCallback = children; + callback = callback(invokeCallback); + var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar; + isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { + return c; + })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey( + callback, + escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace( + userProvidedKeyEscapeRegex, + "$&/" + ) + "/") + childKey + ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback)); + return 1; + } + invokeCallback = 0; + childKey = "" === nameSoFar ? "." : nameSoFar + ":"; + if (isArrayImpl(children)) + for (var i = 0; i < children.length; i++) + nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray( + nameSoFar, + array, + escapedPrefix, + type, + callback + ); + else if (i = getIteratorFn(children), "function" === typeof i) + for (i === children.entries && (didWarnAboutMaps || console.warn( + "Using Maps as children is not supported. Use an array of keyed ReactElements instead." + ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) + nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray( + nameSoFar, + array, + escapedPrefix, + type, + callback + ); + else if ("object" === type) { + if ("function" === typeof children.then) + return mapIntoArray( + resolveThenable(children), + array, + escapedPrefix, + nameSoFar, + callback + ); + array = String(children); + throw Error( + "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead." + ); + } + return invokeCallback; + } + function mapChildren(children, func, context) { + if (null == children) return children; + var result = [], count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + function lazyInitializer(payload) { + if (-1 === payload._status) { + var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo; + null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) { + resolveDebugValue = resolve; + rejectDebugValue = reject; + })); + ioInfo = payload._result; + var thenable = ioInfo(); + thenable.then( + function(moduleObject) { + if (0 === payload._status || -1 === payload._status) { + payload._status = 1; + payload._result = moduleObject; + var _ioInfo = payload._ioInfo; + if (null != _ioInfo) { + _ioInfo.end = performance.now(); + var debugValue = null == moduleObject ? void 0 : moduleObject.default; + resolveDebugValue(debugValue); + _ioInfo.value.status = "fulfilled"; + _ioInfo.value.value = debugValue; + } + void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject); + } + }, + function(error) { + if (0 === payload._status || -1 === payload._status) { + payload._status = 2; + payload._result = error; + var _ioInfo2 = payload._ioInfo; + null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error); + void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error); + } + } + ); + ioInfo = payload._ioInfo; + if (null != ioInfo) { + var displayName = thenable.displayName; + "string" === typeof displayName && (ioInfo.name = displayName); + } + -1 === payload._status && (payload._status = 0, payload._result = thenable); + } + if (1 === payload._status) + return ioInfo = payload._result, void 0 === ioInfo && console.error( + "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", + ioInfo + ), "default" in ioInfo || console.error( + "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", + ioInfo + ), ioInfo.default; + throw payload._result; + } + function resolveDispatcher() { + var dispatcher = ReactSharedInternals.H; + null === dispatcher && console.error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." + ); + return dispatcher; + } + function releaseAsyncTransition() { + ReactSharedInternals.asyncTransitions--; + } + function startTransition(scope) { + var prevTransition = ReactSharedInternals.T, currentTransition = {}; + currentTransition.types = null !== prevTransition ? prevTransition.types : null; + currentTransition._updatedFibers = /* @__PURE__ */ new Set(); + ReactSharedInternals.T = currentTransition; + try { + var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); + "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError)); + } catch (error) { + reportGlobalError(error); + } finally { + null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn( + "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table." + )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error( + "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React." + ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition; + } + } + function addTransitionType(type) { + var transition = ReactSharedInternals.T; + if (null !== transition) { + var transitionTypes = transition.types; + null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type); + } else + 0 === ReactSharedInternals.asyncTransitions && console.error( + "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition." + ), startTransition(addTransitionType.bind(null, type)); + } + function enqueueTask(task) { + if (null === enqueueTaskImpl) + try { + var requireString = ("require" + Math.random()).slice(0, 7); + enqueueTaskImpl = (module && module[requireString]).call( + module, + "timers" + ).setImmediate; + } catch (_err) { + enqueueTaskImpl = function(callback) { + false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error( + "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning." + )); + var channel = new MessageChannel(); + channel.port1.onmessage = callback; + channel.port2.postMessage(void 0); + }; + } + return enqueueTaskImpl(task); + } + function aggregateErrors(errors) { + return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0]; + } + function popActScope(prevActQueue, prevActScopeDepth) { + prevActScopeDepth !== actScopeDepth - 1 && console.error( + "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. " + ); + actScopeDepth = prevActScopeDepth; + } + function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { + var queue = ReactSharedInternals.actQueue; + if (null !== queue) + if (0 !== queue.length) + try { + flushActQueue(queue); + enqueueTask(function() { + return recursivelyFlushAsyncActWork(returnValue, resolve, reject); + }); + return; + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); + } + else ReactSharedInternals.actQueue = null; + 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue); + } + function flushActQueue(queue) { + if (!isFlushing) { + isFlushing = true; + var i = 0; + try { + for (; i < queue.length; i++) { + var callback = queue[i]; + do { + ReactSharedInternals.didUsePromise = false; + var continuation = callback(false); + if (null !== continuation) { + if (ReactSharedInternals.didUsePromise) { + queue[i] = callback; + queue.splice(0, i); + return; + } + callback = continuation; + } else break; + } while (1); + } + queue.length = 0; + } catch (error) { + queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); + } finally { + isFlushing = false; + } + } + } + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); + var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { + isMounted: function() { + return false; + }, + enqueueForceUpdate: function(publicInstance) { + warnNoop(publicInstance, "forceUpdate"); + }, + enqueueReplaceState: function(publicInstance) { + warnNoop(publicInstance, "replaceState"); + }, + enqueueSetState: function(publicInstance) { + warnNoop(publicInstance, "setState"); + } + }, assign = Object.assign, emptyObject = {}; + Object.freeze(emptyObject); + Component.prototype.isReactComponent = {}; + Component.prototype.setState = function(partialState, callback) { + if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) + throw Error( + "takes an object of state variables to update or a function which returns an object of state variables." + ); + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + var deprecatedAPIs = { + isMounted: [ + "isMounted", + "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks." + ], + replaceState: [ + "replaceState", + "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)." + ] + }; + for (fnName in deprecatedAPIs) + deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + ComponentDummy.prototype = Component.prototype; + deprecatedAPIs = PureComponent.prototype = new ComponentDummy(); + deprecatedAPIs.constructor = PureComponent; + assign(deprecatedAPIs, Component.prototype); + deprecatedAPIs.isPureReactComponent = true; + var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = { + H: null, + A: null, + T: null, + S: null, + actQueue: null, + asyncTransitions: 0, + isBatchingLegacy: false, + didScheduleLegacyUpdate: false, + didUsePromise: false, + thrownErrors: [], + getCurrentStack: null, + recentlyCreatedOwnerStacks: 0 + }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() { + return null; + }; + deprecatedAPIs = { + react_stack_bottom_frame: function(callStackForError) { + return callStackForError(); + } + }; + var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime; + var didWarnAboutElementRef = {}; + var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind( + deprecatedAPIs, + UnknownOwner + )(); + var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); + var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) { + if ("object" === typeof window && "function" === typeof window.ErrorEvent) { + var event = new window.ErrorEvent("error", { + bubbles: true, + cancelable: true, + message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error), + error + }); + if (!window.dispatchEvent(event)) return; + } else if ("object" === typeof process && "function" === typeof process.emit) { + process.emit("uncaughtException", error); + return; + } + console.error(error); + }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) { + queueMicrotask(function() { + return queueMicrotask(callback); + }); + } : enqueueTask; + deprecatedAPIs = Object.freeze({ + __proto__: null, + c: function(size) { + return resolveDispatcher().useMemoCache(size); + } + }); + var fnName = { + map: mapChildren, + forEach: function(children, forEachFunc, forEachContext) { + mapChildren( + children, + function() { + forEachFunc.apply(this, arguments); + }, + forEachContext + ); + }, + count: function(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + }, + toArray: function(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + }, + only: function(children) { + if (!isValidElement(children)) + throw Error( + "React.Children.only expected to receive a single React element child." + ); + return children; + } + }; + exports.Activity = REACT_ACTIVITY_TYPE; + exports.Children = fnName; + exports.Component = Component; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.Profiler = REACT_PROFILER_TYPE; + exports.PureComponent = PureComponent; + exports.StrictMode = REACT_STRICT_MODE_TYPE; + exports.Suspense = REACT_SUSPENSE_TYPE; + exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE; + exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; + exports.__COMPILER_RUNTIME = deprecatedAPIs; + exports.act = function(callback) { + var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth; + actScopeDepth++; + var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false; + try { + var result = callback(); + } catch (error) { + ReactSharedInternals.thrownErrors.push(error); + } + if (0 < ReactSharedInternals.thrownErrors.length) + throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; + if (null !== result && "object" === typeof result && "function" === typeof result.then) { + var thenable = result; + queueSeveralMicrotasks(function() { + didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error( + "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);" + )); + }); + return { + then: function(resolve, reject) { + didAwaitActCall = true; + thenable.then( + function(returnValue) { + popActScope(prevActQueue, prevActScopeDepth); + if (0 === prevActScopeDepth) { + try { + flushActQueue(queue), enqueueTask(function() { + return recursivelyFlushAsyncActWork( + returnValue, + resolve, + reject + ); + }); + } catch (error$0) { + ReactSharedInternals.thrownErrors.push(error$0); + } + if (0 < ReactSharedInternals.thrownErrors.length) { + var _thrownError = aggregateErrors( + ReactSharedInternals.thrownErrors + ); + ReactSharedInternals.thrownErrors.length = 0; + reject(_thrownError); + } + } else resolve(returnValue); + }, + function(error) { + popActScope(prevActQueue, prevActScopeDepth); + 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors( + ReactSharedInternals.thrownErrors + ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error); + } + ); + } + }; + } + var returnValue$jscomp$0 = result; + popActScope(prevActQueue, prevActScopeDepth); + 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() { + didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error( + "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)" + )); + }), ReactSharedInternals.actQueue = null); + if (0 < ReactSharedInternals.thrownErrors.length) + throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; + return { + then: function(resolve, reject) { + didAwaitActCall = true; + 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() { + return recursivelyFlushAsyncActWork( + returnValue$jscomp$0, + resolve, + reject + ); + })) : resolve(returnValue$jscomp$0); + } + }; + }; + exports.addTransitionType = addTransitionType; + exports.cache = function(fn) { + return function() { + return fn.apply(null, arguments); + }; + }; + exports.cacheSignal = function() { + return null; + }; + exports.captureOwnerStack = function() { + var getCurrentStack = ReactSharedInternals.getCurrentStack; + return null === getCurrentStack ? null : getCurrentStack(); + }; + exports.cloneElement = function(element, config, children) { + if (null === element || void 0 === element) + throw Error( + "The argument must be a React element, but you passed " + element + "." + ); + var props = assign({}, element.props), key = element.key, owner = element._owner; + if (null != config) { + var JSCompiler_inline_result; + a: { + if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor( + config, + "ref" + ).get) && JSCompiler_inline_result.isReactWarning) { + JSCompiler_inline_result = false; + break a; + } + JSCompiler_inline_result = void 0 !== config.ref; + } + JSCompiler_inline_result && (owner = getOwner()); + hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key); + for (propName in config) + !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]); + } + var propName = arguments.length - 2; + if (1 === propName) props.children = children; + else if (1 < propName) { + JSCompiler_inline_result = Array(propName); + for (var i = 0; i < propName; i++) + JSCompiler_inline_result[i] = arguments[i + 2]; + props.children = JSCompiler_inline_result; + } + props = ReactElement( + element.type, + key, + props, + owner, + element._debugStack, + element._debugTask + ); + for (key = 2; key < arguments.length; key++) + validateChildKeys(arguments[key]); + return props; + }; + exports.createContext = function(defaultValue) { + defaultValue = { + $$typeof: REACT_CONTEXT_TYPE, + _currentValue: defaultValue, + _currentValue2: defaultValue, + _threadCount: 0, + Provider: null, + Consumer: null + }; + defaultValue.Provider = defaultValue; + defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + }; + defaultValue._currentRenderer = null; + defaultValue._currentRenderer2 = null; + return defaultValue; + }; + exports.createElement = function(type, config, children) { + for (var i = 2; i < arguments.length; i++) + validateChildKeys(arguments[i]); + var propName; + i = {}; + var key = null; + if (null != config) + for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn( + "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform" + )), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config) + hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]); + var childrenLength = arguments.length - 2; + if (1 === childrenLength) i.children = children; + else if (1 < childrenLength) { + for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++) + childArray[_i] = arguments[_i + 2]; + Object.freeze && Object.freeze(childArray); + i.children = childArray; + } + if (type && type.defaultProps) + for (propName in childrenLength = type.defaultProps, childrenLength) + void 0 === i[propName] && (i[propName] = childrenLength[propName]); + key && defineKeyPropWarningGetter( + i, + "function" === typeof type ? type.displayName || type.name || "Unknown" : type + ); + (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack; + return ReactElement( + type, + key, + i, + getOwner(), + childrenLength, + propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask + ); + }; + exports.createRef = function() { + var refObject = { current: null }; + Object.seal(refObject); + return refObject; + }; + exports.forwardRef = function(render) { + null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error( + "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))." + ) : "function" !== typeof render ? console.error( + "forwardRef requires a render function but was given %s.", + null === render ? "null" : typeof render + ) : 0 !== render.length && 2 !== render.length && console.error( + "forwardRef render functions accept exactly two parameters: props and ref. %s", + 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined." + ); + null != render && null != render.defaultProps && console.error( + "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?" + ); + var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name); + } + }); + return elementType; + }; + exports.isValidElement = isValidElement; + exports.lazy = function(ctor) { + ctor = { _status: -1, _result: ctor }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: ctor, + _init: lazyInitializer + }, ioInfo = { + name: "lazy", + start: -1, + end: -1, + value: null, + owner: null, + debugStack: Error("react-stack-top-frame"), + debugTask: console.createTask ? console.createTask("lazy()") : null + }; + ctor._ioInfo = ioInfo; + lazyType._debugInfo = [{ awaited: ioInfo }]; + return lazyType; + }; + exports.memo = function(type, compare) { + null == type && console.error( + "memo: The first argument must be a component. Instead received: %s", + null === type ? "null" : typeof type + ); + compare = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: void 0 === compare ? null : compare + }; + var ownName; + Object.defineProperty(compare, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name); + } + }); + return compare; + }; + exports.startTransition = startTransition; + exports.unstable_useCacheRefresh = function() { + return resolveDispatcher().useCacheRefresh(); + }; + exports.use = function(usable) { + return resolveDispatcher().use(usable); + }; + exports.useActionState = function(action, initialState, permalink) { + return resolveDispatcher().useActionState( + action, + initialState, + permalink + ); + }; + exports.useCallback = function(callback, deps) { + return resolveDispatcher().useCallback(callback, deps); + }; + exports.useContext = function(Context) { + var dispatcher = resolveDispatcher(); + Context.$$typeof === REACT_CONSUMER_TYPE && console.error( + "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?" + ); + return dispatcher.useContext(Context); + }; + exports.useDebugValue = function(value, formatterFn) { + return resolveDispatcher().useDebugValue(value, formatterFn); + }; + exports.useDeferredValue = function(value, initialValue) { + return resolveDispatcher().useDeferredValue(value, initialValue); + }; + exports.useEffect = function(create, deps) { + null == create && console.warn( + "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?" + ); + return resolveDispatcher().useEffect(create, deps); + }; + exports.useEffectEvent = function(callback) { + return resolveDispatcher().useEffectEvent(callback); + }; + exports.useId = function() { + return resolveDispatcher().useId(); + }; + exports.useImperativeHandle = function(ref, create, deps) { + return resolveDispatcher().useImperativeHandle(ref, create, deps); + }; + exports.useInsertionEffect = function(create, deps) { + null == create && console.warn( + "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?" + ); + return resolveDispatcher().useInsertionEffect(create, deps); + }; + exports.useLayoutEffect = function(create, deps) { + null == create && console.warn( + "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?" + ); + return resolveDispatcher().useLayoutEffect(create, deps); + }; + exports.useMemo = function(create, deps) { + return resolveDispatcher().useMemo(create, deps); + }; + exports.useOptimistic = function(passthrough, reducer) { + return resolveDispatcher().useOptimistic(passthrough, reducer); + }; + exports.useReducer = function(reducer, initialArg, init) { + return resolveDispatcher().useReducer(reducer, initialArg, init); + }; + exports.useRef = function(initialValue) { + return resolveDispatcher().useRef(initialValue); + }; + exports.useState = function(initialState) { + return resolveDispatcher().useState(initialState); + }; + exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) { + return resolveDispatcher().useSyncExternalStore( + subscribe, + getSnapshot, + getServerSnapshot + ); + }; + exports.useTransition = function() { + return resolveDispatcher().useTransition(); + }; + exports.version = "19.3.0"; + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); + })(); + } +}); + +// node_modules/react/index.js +var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module) { + if (false) { + module.exports = null; + } else { + module.exports = require_react_development(); + } + } +}); + +export { + require_react +}; +/*! Bundled license information: + +react/cjs/react.development.js: + (** + * @license React + * react.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. + *) +*/ +//# sourceMappingURL=chunk-IO7TC67E.js.map diff --git a/node_modules/.vite/deps/chunk-IO7TC67E.js.map b/node_modules/.vite/deps/chunk-IO7TC67E.js.map new file mode 100644 index 0000000..7982848 --- /dev/null +++ b/node_modules/.vite/deps/chunk-IO7TC67E.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../web/node_modules/react/cjs/react.development.js", "../../../web/node_modules/react/index.js"], + "sourcesContent": ["/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n case REACT_VIEW_TRANSITION_TYPE:\n return \"ViewTransition\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var resolveDebugValue = null,\n rejectDebugValue = null,\n ioInfo = payload._ioInfo;\n null != ioInfo &&\n ((ioInfo.start = ioInfo.end = performance.now()),\n (ioInfo.value = new Promise(function (resolve, reject) {\n resolveDebugValue = resolve;\n rejectDebugValue = reject;\n })));\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n if (null != _ioInfo) {\n _ioInfo.end = performance.now();\n var debugValue =\n null == moduleObject ? void 0 : moduleObject.default;\n resolveDebugValue(debugValue);\n _ioInfo.value.status = \"fulfilled\";\n _ioInfo.value.value = debugValue;\n }\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 &&\n ((_ioInfo2.end = performance.now()),\n _ioInfo2.value.then(noop, noop),\n rejectDebugValue(error),\n (_ioInfo2.value.status = \"rejected\"),\n (_ioInfo2.value.reason = error));\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function startTransition(scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition.types =\n null !== prevTransition ? prevTransition.types : null;\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n }\n function addTransitionType(type) {\n var transition = ReactSharedInternals.T;\n if (null !== transition) {\n var transitionTypes = transition.types;\n null === transitionTypes\n ? (transition.types = [type])\n : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);\n } else\n 0 === ReactSharedInternals.asyncTransitions &&\n console.error(\n \"addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition.\"\n ),\n startTransition(addTransitionType.bind(null, type));\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.addTransitionType = addTransitionType;\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n var propName;\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)\n ? ((childArray = Error.stackTraceLimit),\n (Error.stackTraceLimit = 10),\n (childrenLength = Error(\"react-stack-top-frame\")),\n (Error.stackTraceLimit = childArray))\n : (childrenLength = unknownOwnerDebugStack);\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n childrenLength,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = startTransition;\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.3.0\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n"], + "mappings": ";;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,YAAY,MAAM;AAClD,eAAO,eAAe,UAAU,WAAW,YAAY;AAAA,UACrD,KAAK,WAAY;AACf,oBAAQ;AAAA,cACN;AAAA,cACA,KAAK,CAAC;AAAA,cACN,KAAK,CAAC;AAAA,YACR;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AACA,eAAS,cAAc,eAAe;AACpC,YAAI,SAAS,iBAAiB,aAAa,OAAO;AAChD,iBAAO;AACT,wBACG,yBAAyB,cAAc,qBAAqB,KAC7D,cAAc,YAAY;AAC5B,eAAO,eAAe,OAAO,gBAAgB,gBAAgB;AAAA,MAC/D;AACA,eAAS,SAAS,gBAAgB,YAAY;AAC5C,0BACI,iBAAiB,eAAe,iBAC/B,eAAe,eAAe,eAAe,SAChD;AACF,YAAI,aAAa,iBAAiB,MAAM;AACxC,gDAAwC,UAAU,MAC/C,QAAQ;AAAA,UACP;AAAA,UACA;AAA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AQ,UAAU,SAAU,QAAQ,MAAM;AACxC,eAAO,kBAAkB,EAAE,QAAQ,QAAQ,IAAI;AAAA,MACjD;AACA,cAAQ,gBAAgB,SAAU,aAAa,SAAS;AACtD,eAAO,kBAAkB,EAAE,cAAc,aAAa,OAAO;AAAA,MAC/D;AACA,cAAQ,aAAa,SAAU,SAAS,YAAY,MAAM;AACxD,eAAO,kBAAkB,EAAE,WAAW,SAAS,YAAY,IAAI;AAAA,MACjE;AACA,cAAQ,SAAS,SAAU,cAAc;AACvC,eAAO,kBAAkB,EAAE,OAAO,YAAY;AAAA,MAChD;AACA,cAAQ,WAAW,SAAU,cAAc;AACzC,eAAO,kBAAkB,EAAE,SAAS,YAAY;AAAA,MAClD;AACA,cAAQ,uBAAuB,SAC7B,WACA,aACA,mBACA;AACA,eAAO,kBAAkB,EAAE;AAAA,UACzB;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AACA,cAAQ,gBAAgB,WAAY;AAClC,eAAO,kBAAkB,EAAE,cAAc;AAAA,MAC3C;AACA,cAAQ,UAAU;AAClB,sBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,8BACxC,+BAA+B,2BAA2B,MAAM,CAAC;AAAA,IACrE,GAAG;AAAA;AAAA;;;ACjzCL;AAAA;AAEA,QAAI,OAAuC;AACzC,aAAO,UAAU;AAAA,IACnB,OAAO;AACL,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;", + "names": [] +} diff --git a/node_modules/.vite/deps/package.json b/node_modules/.vite/deps/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/.vite/deps/react-dom_client.js b/node_modules/.vite/deps/react-dom_client.js new file mode 100644 index 0000000..631fba6 --- /dev/null +++ b/node_modules/.vite/deps/react-dom_client.js @@ -0,0 +1,22555 @@ +import { + require_react +} from "./chunk-IO7TC67E.js"; +import { + __commonJS +} from "./chunk-DC5AMYBS.js"; + +// node_modules/scheduler/cjs/scheduler.development.js +var require_scheduler_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler.development.js"(exports) { + "use strict"; + (function() { + function performWorkUntilDeadline() { + needsPaint = false; + if (isMessageLoopRunning) { + var currentTime = exports.unstable_now(); + startTime = currentTime; + var hasMoreWork = true; + try { + a: { + isHostCallbackScheduled = false; + isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1); + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + try { + b: { + advanceTimers(currentTime); + for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) { + var callback = currentTask.callback; + if ("function" === typeof callback) { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var continuationCallback = callback( + currentTask.expirationTime <= currentTime + ); + currentTime = exports.unstable_now(); + if ("function" === typeof continuationCallback) { + currentTask.callback = continuationCallback; + advanceTimers(currentTime); + hasMoreWork = true; + break b; + } + currentTask === peek(taskQueue) && pop(taskQueue); + advanceTimers(currentTime); + } else pop(taskQueue); + currentTask = peek(taskQueue); + } + if (null !== currentTask) hasMoreWork = true; + else { + var firstTimer = peek(timerQueue); + null !== firstTimer && requestHostTimeout( + handleTimeout, + firstTimer.startTime - currentTime + ); + hasMoreWork = false; + } + } + break a; + } finally { + currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false; + } + hasMoreWork = void 0; + } + } finally { + hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false; + } + } + } + function push(heap, node) { + var index = heap.length; + heap.push(node); + a: for (; 0 < index; ) { + var parentIndex = index - 1 >>> 1, parent = heap[parentIndex]; + if (0 < compare(parent, node)) + heap[parentIndex] = node, heap[index] = parent, index = parentIndex; + else break a; + } + } + function peek(heap) { + return 0 === heap.length ? null : heap[0]; + } + function pop(heap) { + if (0 === heap.length) return null; + var first = heap[0], last = heap.pop(); + if (last !== first) { + heap[0] = last; + a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) { + var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex]; + if (0 > compare(left, last)) + rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex); + else if (rightIndex < length && 0 > compare(right, last)) + heap[index] = right, heap[rightIndex] = last, index = rightIndex; + else break a; + } + } + return first; + } + function compare(a, b) { + var diff = a.sortIndex - b.sortIndex; + return 0 !== diff ? diff : a.id - b.id; + } + function advanceTimers(currentTime) { + for (var timer = peek(timerQueue); null !== timer; ) { + if (null === timer.callback) pop(timerQueue); + else if (timer.startTime <= currentTime) + pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer); + else break; + timer = peek(timerQueue); + } + } + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + if (!isHostCallbackScheduled) + if (null !== peek(taskQueue)) + isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()); + else { + var firstTimer = peek(timerQueue); + null !== firstTimer && requestHostTimeout( + handleTimeout, + firstTimer.startTime - currentTime + ); + } + } + function shouldYieldToHost() { + return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true; + } + function requestHostTimeout(callback, ms) { + taskTimeoutID = localSetTimeout(function() { + callback(exports.unstable_now()); + }, ms); + } + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); + exports.unstable_now = void 0; + if ("object" === typeof performance && "function" === typeof performance.now) { + var localPerformance = performance; + exports.unstable_now = function() { + return localPerformance.now(); + }; + } else { + var localDate = Date, initialTime = localDate.now(); + exports.unstable_now = function() { + return localDate.now() - initialTime; + }; + } + var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1; + if ("function" === typeof localSetImmediate) + var schedulePerformWorkUntilDeadline = function() { + localSetImmediate(performWorkUntilDeadline); + }; + else if ("undefined" !== typeof MessageChannel) { + var channel = new MessageChannel(), port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + schedulePerformWorkUntilDeadline = function() { + port.postMessage(null); + }; + } else + schedulePerformWorkUntilDeadline = function() { + localSetTimeout(performWorkUntilDeadline, 0); + }; + exports.unstable_IdlePriority = 5; + exports.unstable_ImmediatePriority = 1; + exports.unstable_LowPriority = 4; + exports.unstable_NormalPriority = 3; + exports.unstable_Profiling = null; + exports.unstable_UserBlockingPriority = 2; + exports.unstable_cancelCallback = function(task) { + task.callback = null; + }; + exports.unstable_forceFrameRate = function(fps) { + 0 > fps || 125 < fps ? console.error( + "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" + ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5; + }; + exports.unstable_getCurrentPriorityLevel = function() { + return currentPriorityLevel; + }; + exports.unstable_next = function(eventHandler) { + switch (currentPriorityLevel) { + case 1: + case 2: + case 3: + var priorityLevel = 3; + break; + default: + priorityLevel = currentPriorityLevel; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + exports.unstable_requestPaint = function() { + needsPaint = true; + }; + exports.unstable_runWithPriority = function(priorityLevel, eventHandler) { + switch (priorityLevel) { + case 1: + case 2: + case 3: + case 4: + case 5: + break; + default: + priorityLevel = 3; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + exports.unstable_scheduleCallback = function(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime; + switch (priorityLevel) { + case 1: + var timeout = -1; + break; + case 2: + timeout = 250; + break; + case 5: + timeout = 1073741823; + break; + case 4: + timeout = 1e4; + break; + default: + timeout = 5e3; + } + timeout = options + timeout; + priorityLevel = { + id: taskIdCounter++, + callback, + priorityLevel, + startTime: options, + expirationTime: timeout, + sortIndex: -1 + }; + options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline()))); + return priorityLevel; + }; + exports.unstable_shouldYield = shouldYieldToHost; + exports.unstable_wrapCallback = function(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function() { + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + }; + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); + })(); + } +}); + +// node_modules/scheduler/index.js +var require_scheduler = __commonJS({ + "node_modules/scheduler/index.js"(exports, module) { + "use strict"; + if (false) { + module.exports = null; + } else { + module.exports = require_scheduler_development(); + } + } +}); + +// node_modules/react-dom/cjs/react-dom.development.js +var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + (function() { + function noop() { + } + function testStringCoercion(value) { + return "" + value; + } + function createPortal$1(children, containerInfo, implementation) { + var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; + if (null == key) key = null; + else if (key === REACT_OPTIMISTIC_KEY) key = REACT_OPTIMISTIC_KEY; + else { + try { + testStringCoercion(key); + var JSCompiler_inline_result = false; + } catch (e) { + JSCompiler_inline_result = true; + } + JSCompiler_inline_result && (console.error( + "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", + "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object" + ), testStringCoercion(key)); + key = "" + key; + } + return { + $$typeof: REACT_PORTAL_TYPE, + key, + children, + containerInfo, + implementation + }; + } + function getCrossOriginStringAs(as, input) { + if ("font" === as) return ""; + if ("string" === typeof input) + return "use-credentials" === input ? input : ""; + } + function getValueDescriptorExpectingObjectForWarning(thing) { + return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"'; + } + function getValueDescriptorExpectingEnumForWarning(thing) { + return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"'; + } + function resolveDispatcher() { + var dispatcher = ReactSharedInternals.H; + null === dispatcher && console.error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." + ); + return dispatcher; + } + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); + var React = require_react(), Internals = { + d: { + f: noop, + r: function() { + throw Error( + "Invalid form element. requestFormReset must be passed a form that was rendered by React." + ); + }, + D: noop, + C: noop, + L: noop, + m: noop, + X: noop, + S: noop, + M: noop + }, + p: 0, + findDOMNode: null + }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_RECOVERABLE_TYPE = Symbol.for("react.recoverable"), REACT_OPTIMISTIC_KEY = Symbol.for("react.optimistic_key"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error( + "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills" + ); + exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals; + exports.browser = function(reason) { + return { $$typeof: REACT_RECOVERABLE_TYPE, _reason: reason }; + }; + exports.createPortal = function(children, container) { + var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; + if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) + throw Error("Target container is not a DOM element."); + return createPortal$1(children, container, null, key); + }; + exports.flushSync = function(fn) { + var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; + try { + if (ReactSharedInternals.T = null, Internals.p = 2, fn) + return fn(); + } finally { + ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error( + "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." + ); + } + }; + exports.preconnect = function(href, options) { + "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error( + "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", + getValueDescriptorExpectingEnumForWarning(options) + ) : null != options && "string" !== typeof options.crossOrigin && console.error( + "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", + getValueDescriptorExpectingObjectForWarning(options.crossOrigin) + ) : console.error( + "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", + getValueDescriptorExpectingObjectForWarning(href) + ); + "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options)); + }; + exports.prefetchDNS = function(href) { + if ("string" !== typeof href || !href) + console.error( + "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", + getValueDescriptorExpectingObjectForWarning(href) + ); + else if (1 < arguments.length) { + var options = arguments[1]; + "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error( + "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", + getValueDescriptorExpectingEnumForWarning(options) + ) : console.error( + "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", + getValueDescriptorExpectingEnumForWarning(options) + ); + } + "string" === typeof href && Internals.d.D(href); + }; + exports.preinit = function(href, options) { + "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error( + "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", + getValueDescriptorExpectingEnumForWarning(options) + ) : "style" !== options.as && "script" !== options.as && console.error( + 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', + getValueDescriptorExpectingEnumForWarning(options.as) + ) : console.error( + "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", + getValueDescriptorExpectingObjectForWarning(href) + ); + if ("string" === typeof href && options && "string" === typeof options.as) { + var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0; + "style" === as ? Internals.d.S( + href, + "string" === typeof options.precedence ? options.precedence : void 0, + { + crossOrigin, + integrity, + fetchPriority + } + ) : "script" === as && Internals.d.X(href, { + crossOrigin, + integrity, + fetchPriority, + nonce: "string" === typeof options.nonce ? options.nonce : void 0 + }); + } + }; + exports.preinitModule = function(href, options) { + var encountered = ""; + "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); + void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + "."); + if (encountered) + console.error( + "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", + encountered + ); + else + switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) { + case "script": + break; + default: + encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error( + 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)', + encountered, + href + ); + } + if ("string" === typeof href) + if ("object" === typeof options && null !== options) { + if (null == options.as || "script" === options.as) + encountered = getCrossOriginStringAs( + options.as, + options.crossOrigin + ), Internals.d.M(href, { + crossOrigin: encountered, + integrity: "string" === typeof options.integrity ? options.integrity : void 0, + nonce: "string" === typeof options.nonce ? options.nonce : void 0, + fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0 + }); + } else null == options && Internals.d.M(href); + }; + exports.preload = function(href, options) { + var encountered = ""; + "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); + null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."); + encountered && console.error( + 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s', + encountered + ); + if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) { + encountered = options.as; + var crossOrigin = getCrossOriginStringAs( + encountered, + options.crossOrigin + ); + Internals.d.L(href, encountered, { + crossOrigin, + integrity: "string" === typeof options.integrity ? options.integrity : void 0, + nonce: "string" === typeof options.nonce ? options.nonce : void 0, + type: "string" === typeof options.type ? options.type : void 0, + fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0, + referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0, + imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0, + imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0, + media: "string" === typeof options.media ? options.media : void 0 + }); + } + }; + exports.preloadModule = function(href, options) { + var encountered = ""; + "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); + void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."); + encountered && console.error( + 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s', + encountered + ); + "string" === typeof href && (options ? (encountered = getCrossOriginStringAs( + options.as, + options.crossOrigin + ), Internals.d.m(href, { + as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0, + crossOrigin: encountered, + integrity: "string" === typeof options.integrity ? options.integrity : void 0, + nonce: "string" === typeof options.nonce ? options.nonce : void 0, + fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0 + })) : Internals.d.m(href)); + }; + exports.requestFormReset = function(form) { + Internals.d.r(form); + }; + exports.unstable_batchedUpdates = function(fn, a) { + return fn(a); + }; + exports.useFormState = function(action, initialState, permalink) { + return resolveDispatcher().useFormState(action, initialState, permalink); + }; + exports.useFormStatus = function() { + return resolveDispatcher().useHostTransitionStatus(); + }; + exports.version = "19.3.0"; + "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); + })(); + } +}); + +// node_modules/react-dom/index.js +var require_react_dom = __commonJS({ + "node_modules/react-dom/index.js"(exports, module) { + "use strict"; + if (false) { + checkDCE(); + module.exports = null; + } else { + module.exports = require_react_dom_development(); + } + } +}); + +// node_modules/react-dom/cjs/react-dom-client.development.js +var require_react_dom_client_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom-client.development.js"(exports) { + "use strict"; + (function() { + function findHook(fiber, id) { + for (fiber = fiber.memoizedState; null !== fiber && 0 < id; ) + fiber = fiber.next, id--; + return fiber; + } + function copyWithSetImpl(obj, path, index, value) { + if (index >= path.length) return value; + var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); + updated[key] = copyWithSetImpl(obj[key], path, index + 1, value); + return updated; + } + function copyWithRename(obj, oldPath, newPath) { + if (oldPath.length !== newPath.length) + console.warn("copyWithRename() expects paths of the same length"); + else { + for (var i = 0; i < newPath.length - 1; i++) + if (oldPath[i] !== newPath[i]) { + console.warn( + "copyWithRename() expects paths to be the same except for the deepest key" + ); + return; + } + return copyWithRenameImpl(obj, oldPath, newPath, 0); + } + } + function copyWithRenameImpl(obj, oldPath, newPath, index) { + var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); + index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl( + obj[oldKey], + oldPath, + newPath, + index + 1 + ); + return updated; + } + function copyWithDeleteImpl(obj, path, index) { + var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); + if (index + 1 === path.length) + return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated; + updated[key] = copyWithDeleteImpl(obj[key], path, index + 1); + return updated; + } + function shouldSuspendImpl() { + return false; + } + function shouldErrorImpl() { + return null; + } + function warnInvalidHookAccess() { + console.error( + "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks" + ); + } + function warnInvalidContextAccess() { + console.error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + } + function noop() { + } + function warnForMissingKey() { + } + function setToSortedString(set) { + var array = []; + set.forEach(function(value) { + array.push(value); + }); + return array.sort().join(", "); + } + function createFiber(tag, pendingProps, key, mode) { + return new FiberNode(tag, pendingProps, key, mode); + } + function scheduleRoot(root2, element) { + root2.context === emptyContextObject && (updateContainerImpl(root2.current, 2, element, root2, null, null), flushSyncWork$1()); + } + function scheduleRefresh(root2, update) { + if (null !== resolveFamily) { + var staleFamilies = update.staleFamilies; + update = update.updatedFamilies; + flushPendingEffects(); + scheduleFibersWithFamiliesRecursively( + root2.current, + update, + staleFamilies + ); + flushSyncWork$1(); + } + } + function setRefreshHandler(handler) { + resolveFamily = handler; + } + function isValidContainer(node) { + return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType); + } + function getNearestMountedFiber(fiber) { + for (var node = fiber, nextNode = node; nextNode && !nextNode.alternate; ) + node = nextNode, 0 !== (node.flags & 4098) && (fiber = node.return), nextNode = node.return; + for (; node.return; ) node = node.return; + return 3 === node.tag ? fiber : null; + } + function getSuspenseInstanceFromFiber(fiber) { + if (13 === fiber.tag) { + var suspenseState = fiber.memoizedState; + null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState)); + if (null !== suspenseState) return suspenseState.dehydrated; + } + return null; + } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && (fiber = fiber.alternate, null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } + function assertIsMounted(fiber) { + if (getNearestMountedFiber(fiber) !== fiber) + throw Error("Unable to find node on an unmounted component."); + } + function findCurrentFiberUsingSlowPath(fiber) { + var alternate = fiber.alternate; + if (!alternate) { + alternate = getNearestMountedFiber(fiber); + if (null === alternate) + throw Error("Unable to find node on an unmounted component."); + return alternate !== fiber ? null : fiber; + } + for (var a = fiber, b = alternate; ; ) { + var parentA = a.return; + if (null === parentA) break; + var parentB = parentA.alternate; + if (null === parentB) { + b = parentA.return; + if (null !== b) { + a = b; + continue; + } + break; + } + if (parentA.child === parentB.child) { + for (parentB = parentA.child; parentB; ) { + if (parentB === a) return assertIsMounted(parentA), fiber; + if (parentB === b) return assertIsMounted(parentA), alternate; + parentB = parentB.sibling; + } + throw Error("Unable to find node on an unmounted component."); + } + if (a.return !== b.return) a = parentA, b = parentB; + else { + for (var didFindChild = false, _child = parentA.child; _child; ) { + if (_child === a) { + didFindChild = true; + a = parentA; + b = parentB; + break; + } + if (_child === b) { + didFindChild = true; + b = parentA; + a = parentB; + break; + } + _child = _child.sibling; + } + if (!didFindChild) { + for (_child = parentB.child; _child; ) { + if (_child === a) { + didFindChild = true; + a = parentB; + b = parentA; + break; + } + if (_child === b) { + didFindChild = true; + b = parentB; + a = parentA; + break; + } + _child = _child.sibling; + } + if (!didFindChild) + throw Error( + "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." + ); + } + } + if (a.alternate !== b) + throw Error( + "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." + ); + } + if (3 !== a.tag) + throw Error("Unable to find node on an unmounted component."); + return a.stateNode.current === a ? fiber : alternate; + } + function findCurrentHostFiberImpl(node) { + var tag = node.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; + for (node = node.child; null !== node; ) { + tag = findCurrentHostFiberImpl(node); + if (null !== tag) return tag; + node = node.sibling; + } + return null; + } + function traverseFragmentInstancesAndTextInstances(fragmentFiber, fn, a, b, c) { + traverseVisibleInstancesAndTextInstances( + fragmentFiber.child, + false, + fn, + a, + b, + c + ); + } + function traverseVisibleInstancesAndTextInstances(child, searchWithinHosts, fn, a, b, c) { + for (; null !== child; ) { + if ((5 === child.tag || 27 === child.tag || 6 === child.tag) && fn(child, a, b, c) || (22 !== child.tag || null === child.memoizedState) && (searchWithinHosts || 5 !== child.tag && 27 !== child.tag) && traverseVisibleInstancesAndTextInstances( + child.child, + searchWithinHosts, + fn, + a, + b, + c + )) + return true; + child = child.sibling; + } + return false; + } + function getFragmentParentInstanceOrContainerFiber(fiber) { + for (fiber = fiber.return; null !== fiber; ) { + if (3 === fiber.tag || 5 === fiber.tag || 27 === fiber.tag) + return fiber; + fiber = fiber.return; + } + return null; + } + function fiberIsPortaledIntoHost(fiber) { + var foundPortalParent = false; + for (fiber = fiber.return; null !== fiber; ) { + 4 === fiber.tag && (foundPortalParent = true); + if (3 === fiber.tag || 5 === fiber.tag || 27 === fiber.tag) break; + fiber = fiber.return; + } + return foundPortalParent; + } + function getFragmentInstanceOrTextInstanceSiblings(fiber) { + var result = [null, null], parentHostFiber = getFragmentParentInstanceOrContainerFiber(fiber); + if (null === parentHostFiber) return result; + findFragmentInstanceOrTextInstanceSiblings( + result, + fiber, + parentHostFiber.child, + { foundSelf: false } + ); + return result; + } + function findFragmentInstanceOrTextInstanceSiblings(result, self, child, state) { + for (; null !== child; ) { + if (child === self) state.foundSelf = true; + else if (5 === child.tag || 27 === child.tag || 6 === child.tag) { + if (state.foundSelf) return result[1] = child, true; + result[0] = child; + } else if ((22 !== child.tag || null === child.memoizedState) && findFragmentInstanceOrTextInstanceSiblings( + result, + self, + child.child, + state + )) + return true; + child = child.sibling; + } + return false; + } + function getInstanceFromHostFiber(fiber) { + switch (fiber.tag) { + case 5: + case 27: + case 6: + return fiber.stateNode; + case 3: + return fiber.stateNode.containerInfo; + default: + throw Error("Expected to find a host node. This is a bug in React."); + } + } + function isFiberPrecedingCheck(child, target, boundary) { + return child === boundary ? true : child === target ? (searchTarget = child, true) : false; + } + function isFiberFollowingCheck(child, target, boundary) { + return child === boundary ? (searchBoundary = child, false) : child === target ? (null !== searchBoundary && (searchTarget = child), true) : false; + } + function getParentForFragmentAncestors(inst) { + if (null === inst) return null; + do + inst = null === inst ? null : inst.return; + while (inst && 5 !== inst.tag && 27 !== inst.tag && 3 !== inst.tag); + return inst ? inst : null; + } + function getLowestCommonAncestor(instA, instB, getParent2) { + for (var depthA = 0, tempA = instA; tempA; tempA = getParent2(tempA)) + depthA++; + tempA = 0; + for (var tempB = instB; tempB; tempB = getParent2(tempB)) tempA++; + for (; 0 < depthA - tempA; ) instA = getParent2(instA), depthA--; + for (; 0 < tempA - depthA; ) instB = getParent2(instB), tempA--; + for (; depthA--; ) { + if (instA === instB || null !== instB && instA === instB.alternate) + return instA; + instA = getParent2(instA); + instB = getParent2(instB); + } + return null; + } + function getIteratorFn(maybeIterable) { + if (null === maybeIterable || "object" !== typeof maybeIterable) + return null; + maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; + return "function" === typeof maybeIterable ? maybeIterable : null; + } + function getComponentNameFromType(type) { + if (null == type) return null; + if ("function" === typeof type) + return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; + if ("string" === typeof type) return type; + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + case REACT_ACTIVITY_TYPE: + return "Activity"; + case REACT_VIEW_TRANSITION_TYPE: + return "ViewTransition"; + } + if ("object" === typeof type) + switch ("number" === typeof type.tag && console.error( + "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." + ), type.$$typeof) { + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_CONTEXT_TYPE: + return type.displayName || "Context"; + case REACT_CONSUMER_TYPE: + return (type._context.displayName || "Context") + ".Consumer"; + case REACT_FORWARD_REF_TYPE: + var innerType = type.render; + type = type.displayName; + type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); + return type; + case REACT_MEMO_TYPE: + return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: + innerType = type._payload; + type = type._init; + try { + return getComponentNameFromType(type(innerType)); + } catch (x) { + } + } + return null; + } + function getComponentNameFromOwner(owner) { + return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null; + } + function getComponentNameFromFiber(fiber) { + var type = fiber.type; + switch (fiber.tag) { + case 31: + return "Activity"; + case 24: + return "Cache"; + case 9: + return (type._context.displayName || "Context") + ".Consumer"; + case 10: + return type.displayName || "Context"; + case 18: + return "DehydratedFragment"; + case 11: + return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef"); + case 7: + return "Fragment"; + case 26: + case 27: + case 5: + return type; + case 4: + return "Portal"; + case 3: + return "Root"; + case 6: + return "Text"; + case 16: + return getComponentNameFromType(type); + case 8: + return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode"; + case 22: + if (null !== fiber.return) + return getComponentNameFromFiber(fiber.return); + break; + case 12: + return "Profiler"; + case 21: + return "Scope"; + case 13: + return "Suspense"; + case 19: + return "SuspenseList"; + case 25: + return "TracingMarker"; + case 30: + return "ViewTransition"; + case 1: + case 0: + case 14: + case 15: + if ("function" === typeof type) + return type.displayName || type.name || null; + if ("string" === typeof type) return type; + break; + case 29: + type = fiber._debugInfo; + if (null != type) { + for (var i = type.length - 1; 0 <= i; i--) + if ("string" === typeof type[i].name) return type[i].name; + } + if (null !== fiber.return) + return getComponentNameFromFiber(fiber.return); + } + return null; + } + function createCursor(defaultValue) { + return { current: defaultValue }; + } + function pop(cursor, fiber) { + 0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--); + } + function push(cursor, value, fiber) { + index$jscomp$0++; + valueStack[index$jscomp$0] = cursor.current; + fiberStack[index$jscomp$0] = fiber; + cursor.current = value; + } + function requiredContext(c) { + null === c && console.error( + "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." + ); + return c; + } + function pushHostContainer(fiber, nextRootInstance) { + push(rootInstanceStackCursor, nextRootInstance, fiber); + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor, null, fiber); + var nextRootContext = nextRootInstance.nodeType; + switch (nextRootContext) { + case 9: + case 11: + nextRootContext = 9 === nextRootContext ? "#document" : "#fragment"; + nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone; + break; + default: + if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI) + nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd( + nextRootInstance, + nextRootContext + ); + else + switch (nextRootContext) { + case "svg": + nextRootInstance = HostContextNamespaceSvg; + break; + case "math": + nextRootInstance = HostContextNamespaceMath; + break; + default: + nextRootInstance = HostContextNamespaceNone; + } + } + nextRootContext = nextRootContext.toLowerCase(); + nextRootContext = updatedAncestorInfoDev(null, nextRootContext); + nextRootContext = { + context: nextRootInstance, + ancestorInfo: nextRootContext + }; + pop(contextStackCursor, fiber); + push(contextStackCursor, nextRootContext, fiber); + } + function popHostContainer(fiber) { + pop(contextStackCursor, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + function getHostContext() { + return requiredContext(contextStackCursor.current); + } + function pushHostContext(fiber) { + var stateHook = fiber.memoizedState; + null !== stateHook && (HostTransitionContext._currentValue = stateHook.memoizedState, push(hostTransitionProviderCursor, fiber, fiber)); + stateHook = requiredContext(contextStackCursor.current); + var type = fiber.type; + var nextContext = getChildHostContextProd(stateHook.context, type); + type = updatedAncestorInfoDev(stateHook.ancestorInfo, type); + nextContext = { context: nextContext, ancestorInfo: type }; + stateHook !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber)); + } + function popHostContext(fiber) { + contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber)); + hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition); + } + function disabledLog() { + } + function disableLogs() { + if (0 === disabledDepth) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + function reenableLogs() { + disabledDepth--; + if (0 === disabledDepth) { + var props = { configurable: true, enumerable: true, writable: true }; + Object.defineProperties(console, { + log: assign({}, props, { value: prevLog }), + info: assign({}, props, { value: prevInfo }), + warn: assign({}, props, { value: prevWarn }), + error: assign({}, props, { value: prevError }), + group: assign({}, props, { value: prevGroup }), + groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), + groupEnd: assign({}, props, { value: prevGroupEnd }) + }); + } + 0 > disabledDepth && console.error( + "disabledDepth fell below zero. This is a bug in React. Please file an issue." + ); + } + function formatOwnerStack(error) { + var prevPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + error = error.stack; + Error.prepareStackTrace = prevPrepareStackTrace; + error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29)); + prevPrepareStackTrace = error.indexOf("\n"); + -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1)); + prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame"); + -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf( + "\n", + prevPrepareStackTrace + )); + if (-1 !== prevPrepareStackTrace) + error = error.slice(0, prevPrepareStackTrace); + else return ""; + return error; + } + function describeBuiltInComponentFrame(name) { + if (void 0 === prefix) + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + suffix = -1 < x.stack.indexOf("\n at") ? " ()" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : ""; + } + return "\n" + prefix + name + suffix; + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) return ""; + var frame = componentFrameCache.get(fn); + if (void 0 !== frame) return frame; + reentry = true; + frame = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher2 = null; + previousDispatcher2 = ReactSharedInternals.H; + ReactSharedInternals.H = null; + disableLogs(); + try { + var RunInRootFrame = { + DetermineComponentFrameRoot: function() { + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if ("object" === typeof Reflect && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + var control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x$0) { + control = x$0; + } + Fake = false; + try { + var prevProps = Object.getOwnPropertyDescriptor( + fn.prototype, + "props" + ); + Object.defineProperty(fn.prototype, "props", { + configurable: true, + set: function() { + throw Error(); + } + }); + Fake = true; + new fn(); + } finally { + Fake && (void 0 !== prevProps ? Object.defineProperty( + fn.prototype, + "props", + prevProps + ) : delete fn.prototype.props); + } + } + } else { + try { + throw Error(); + } catch (x$1) { + control = x$1; + } + (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() { + }); + } + } catch (sample) { + if (sample && control && "string" === typeof sample.stack) + return [sample.stack, control.stack]; + } + return [null, null]; + } + }; + RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; + var namePropDescriptor = Object.getOwnPropertyDescriptor( + RunInRootFrame.DetermineComponentFrameRoot, + "name" + ); + namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty( + RunInRootFrame.DetermineComponentFrameRoot, + "name", + { value: "DetermineComponentFrameRoot" } + ); + var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1]; + if (sampleStack && controlStack) { + var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n"); + for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes( + "DetermineComponentFrameRoot" + ); ) + namePropDescriptor++; + for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes( + "DetermineComponentFrameRoot" + ); ) + _RunInRootFrame$Deter++; + if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length) + for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; ) + _RunInRootFrame$Deter--; + for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--) + if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) { + if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { + do + if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) { + var _frame = "\n" + sampleLines[namePropDescriptor].replace( + " at new ", + " at " + ); + fn.displayName && _frame.includes("") && (_frame = _frame.replace("", fn.displayName)); + "function" === typeof fn && componentFrameCache.set(fn, _frame); + return _frame; + } + while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); + } + break; + } + } + } finally { + reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame; + } + sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : ""; + "function" === typeof fn && componentFrameCache.set(fn, sampleLines); + return sampleLines; + } + function describeFiber(fiber, childFiber) { + switch (fiber.tag) { + case 26: + case 27: + case 5: + return describeBuiltInComponentFrame(fiber.type); + case 16: + return describeBuiltInComponentFrame("Lazy"); + case 13: + return fiber.child !== childFiber && null !== childFiber ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense"); + case 19: + return describeBuiltInComponentFrame("SuspenseList"); + case 0: + case 15: + return describeNativeComponentFrame(fiber.type, false); + case 11: + return describeNativeComponentFrame(fiber.type.render, false); + case 1: + return describeNativeComponentFrame(fiber.type, true); + case 31: + return describeBuiltInComponentFrame("Activity"); + case 30: + return describeBuiltInComponentFrame("ViewTransition"); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = "", previous = null; + do { + info += describeFiber(workInProgress2, previous); + var debugInfo = workInProgress2._debugInfo; + if (debugInfo) + for (var i = debugInfo.length - 1; 0 <= i; i--) { + var entry = debugInfo[i]; + if ("string" === typeof entry.name) { + var JSCompiler_temp_const = info; + a: { + var name = entry.name, env = entry.env, location = entry.debugLocation; + if (null != location) { + var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf("\n"), lastLine = -1 === idx ? childStack : childStack.slice(idx + 1); + if (-1 !== lastLine.indexOf(name)) { + var JSCompiler_inline_result = "\n" + lastLine; + break a; + } + } + JSCompiler_inline_result = describeBuiltInComponentFrame( + name + (env ? " [" + env + "]" : "") + ); + } + info = JSCompiler_temp_const + JSCompiler_inline_result; + } + } + previous = workInProgress2; + workInProgress2 = workInProgress2.return; + } while (workInProgress2); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + function describeFunctionComponentFrameWithoutLineNumber(fn) { + return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : ""; + } + function getCurrentFiberOwnerNameInDevOrNull() { + if (null === current) return null; + var owner = current._debugOwner; + return null != owner ? getComponentNameFromOwner(owner) : null; + } + function getCurrentFiberStackInDev() { + if (null === current) return ""; + var workInProgress2 = current; + try { + var info = ""; + 6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return); + switch (workInProgress2.tag) { + case 26: + case 27: + case 5: + info += describeBuiltInComponentFrame(workInProgress2.type); + break; + case 13: + info += describeBuiltInComponentFrame("Suspense"); + break; + case 19: + info += describeBuiltInComponentFrame("SuspenseList"); + break; + case 31: + info += describeBuiltInComponentFrame("Activity"); + break; + case 30: + info += describeBuiltInComponentFrame("ViewTransition"); + break; + case 0: + case 15: + case 1: + workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress2.type + )); + break; + case 11: + workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber( + workInProgress2.type.render + )); + } + for (; workInProgress2; ) + if ("number" === typeof workInProgress2.tag) { + var fiber = workInProgress2; + workInProgress2 = fiber._debugOwner; + var debugStack = fiber._debugStack; + if (workInProgress2 && debugStack) { + var formattedStack = formatOwnerStack(debugStack); + "" !== formattedStack && (info += "\n" + formattedStack); + } + } else if (null != workInProgress2.debugStack) { + var ownerStack = workInProgress2.debugStack; + (workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack)); + } else break; + var JSCompiler_inline_result = info; + } catch (x) { + JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack; + } + return JSCompiler_inline_result; + } + function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { + var previousFiber = current; + setCurrentFiber(fiber); + try { + return null !== fiber && fiber._debugTask ? fiber._debugTask.run( + callback.bind(null, arg0, arg1, arg2, arg3, arg4) + ) : callback(arg0, arg1, arg2, arg3, arg4); + } finally { + setCurrentFiber(previousFiber); + } + throw Error( + "runWithFiberInDEV should never be called in production. This is a bug in React." + ); + } + function setCurrentFiber(fiber) { + ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev; + isRendering = false; + current = fiber; + } + function typeName(value) { + return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + } + function willCoercionThrow(value) { + try { + return testStringCoercion(value), false; + } catch (e) { + return true; + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkAttributeStringCoercion(value, attributeName) { + if (willCoercionThrow(value)) + return console.error( + "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ), testStringCoercion(value); + } + function checkCSSPropertyStringCoercion(value, propName) { + if (willCoercionThrow(value)) + return console.error( + "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", + propName, + typeName(value) + ), testStringCoercion(value); + } + function checkFormFieldValueStringCoercion(value) { + if (willCoercionThrow(value)) + return console.error( + "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", + typeName(value) + ), testStringCoercion(value); + } + function injectInternals(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled) return true; + if (!hook.supportsFiber) + return console.error( + "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" + ), true; + try { + rendererID = hook.inject(internals), injectedHook = hook; + } catch (err) { + console.error("React instrumentation encountered an error: %o.", err); + } + return hook.checkDCE ? true : false; + } + function setIsStrictModeForDevtools(newIsStrictMode) { + "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode); + if (injectedHook && "function" === typeof injectedHook.setStrictMode) + try { + injectedHook.setStrictMode(rendererID, newIsStrictMode); + } catch (err) { + hasLoggedError || (hasLoggedError = true, console.error( + "React instrumentation encountered an error: %o", + err + )); + } + } + function clz32Fallback(x) { + x >>>= 0; + return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0; + } + function getHighestPriorityLanes(lanes) { + var pendingSyncLanes = lanes & 42; + if (0 !== pendingSyncLanes) return pendingSyncLanes; + switch (lanes & -lanes) { + case 1: + return 1; + case 2: + return 2; + case 4: + return 4; + case 8: + return 8; + case 16: + return 16; + case 32: + return 32; + case 64: + return 64; + case 128: + return 128; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + return lanes & -lanes; + case 262144: + case 524288: + case 1048576: + case 2097152: + return lanes & 3932160; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return lanes & 62914560; + case 67108864: + return 67108864; + case 134217728: + return 134217728; + case 268435456: + return 268435456; + case 536870912: + return 536870912; + case 1073741824: + return 0; + default: + return console.error( + "Should have found matching lanes. This is a bug in React." + ), lanes; + } + } + function getNextLanes(root2, wipLanes, rootHasPendingCommit) { + var pendingLanes = root2.pendingLanes; + if (0 === pendingLanes) return 0; + var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes; + root2 = root2.warmLanes; + var nonIdlePendingLanes = pendingLanes & 134217727; + 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); + return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes; + } + function checkIfRootIsPrerendering(root2, renderLanes2) { + return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2); + } + function getEntangledLanes(root2, renderLanes2) { + 0 !== (renderLanes2 & 8) && (renderLanes2 |= renderLanes2 & 32); + var allEntangledLanes = root2.entangledLanes; + if (0 !== allEntangledLanes) + for (root2 = root2.entanglements, allEntangledLanes &= renderLanes2; 0 < allEntangledLanes; ) { + var index = 31 - clz32(allEntangledLanes), lane = 1 << index; + renderLanes2 |= root2[index]; + allEntangledLanes &= ~lane; + } + return renderLanes2; + } + function computeExpirationTime(lane, currentTime) { + switch (lane) { + case 1: + case 2: + case 4: + case 8: + case 64: + return currentTime + 250; + case 16: + case 32: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return currentTime + 5e3; + case 4194304: + case 8388608: + case 16777216: + case 33554432: + return -1; + case 67108864: + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1; + default: + return console.error( + "Should have found matching lanes. This is a bug in React." + ), -1; + } + } + function claimNextRetryLane() { + var lane = nextRetryLane; + nextRetryLane <<= 1; + 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); + return lane; + } + function createLaneMap(initial) { + for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); + return laneMap; + } + function markRootUpdated$1(root2, updateLane) { + root2.pendingLanes |= updateLane; + 268435456 !== updateLane && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0); + } + function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) { + var previouslyPendingLanes = root2.pendingLanes; + root2.pendingLanes = remainingLanes; + root2.suspendedLanes = 0; + root2.pingedLanes = 0; + root2.warmLanes = 0; + root2.expiredLanes &= remainingLanes; + root2.entangledLanes &= remainingLanes; + root2.errorRecoveryDisabledLanes &= remainingLanes; + root2.shellSuspendCounter = 0; + var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates; + for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { + var index = 31 - clz32(remainingLanes), lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) + for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) { + var update = hiddenUpdatesForLane[index]; + null !== update && (update.lane &= -536870913); + } + remainingLanes &= ~lane; + } + 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, 0); + 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root2.tag && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); + } + function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) { + root2.pendingLanes |= spawnedLane; + root2.suspendedLanes &= ~spawnedLane; + var spawnedLaneIndex = 31 - clz32(spawnedLane); + root2.entangledLanes |= spawnedLane; + root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930; + } + function markRootEntangled(root2, entangledLanes) { + var rootEntangledLanes = root2.entangledLanes |= entangledLanes; + for (root2 = root2.entanglements; rootEntangledLanes; ) { + var index = 31 - clz32(rootEntangledLanes), lane = 1 << index; + lane & entangledLanes | root2[index] & entangledLanes && (root2[index] |= entangledLanes); + rootEntangledLanes &= ~lane; + } + } + function getBumpedLaneForHydration(root2, renderLanes2) { + var renderLane = renderLanes2 & -renderLanes2; + renderLane = 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root2.suspendedLanes | renderLanes2)) ? 0 : renderLane; + } + function getBumpedLaneForHydrationByLane(lane) { + switch (lane) { + case 2: + lane = 1; + break; + case 8: + lane = 4; + break; + case 32: + lane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + lane = 128; + break; + case 268435456: + lane = 134217728; + break; + default: + lane = 0; + } + return lane; + } + function addFiberToLanesMap(root2, fiber, lanes) { + if (isDevToolsPresent) + for (root2 = root2.pendingUpdatersLaneMap; 0 < lanes; ) { + var index = 31 - clz32(lanes), lane = 1 << index; + root2[index].add(fiber); + lanes &= ~lane; + } + } + function movePendingFibersToMemoized(root2, lanes) { + if (isDevToolsPresent) + for (var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap, memoizedUpdaters = root2.memoizedUpdaters; 0 < lanes; ) { + var index = 31 - clz32(lanes); + root2 = 1 << index; + index = pendingUpdatersLaneMap[index]; + 0 < index.size && (index.forEach(function(fiber) { + var alternate = fiber.alternate; + null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber); + }), index.clear()); + lanes &= ~root2; + } + } + function lanesToEventPriority(lanes) { + lanes &= -lanes; + return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority; + } + function resolveUpdatePriority() { + var updatePriority = ReactDOMSharedInternals.p; + if (0 !== updatePriority) return updatePriority; + updatePriority = window.event; + return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type); + } + function runWithPriority(priority, fn) { + var previousPriority = ReactDOMSharedInternals.p; + try { + return ReactDOMSharedInternals.p = priority, fn(); + } finally { + ReactDOMSharedInternals.p = previousPriority; + } + } + function detachDeletedInstance(node) { + delete node[internalInstanceKey]; + delete node[internalPropsKey]; + delete node[internalEventHandlerListenersKey]; + delete node[internalEventHandlesSetKey]; + } + function getClosestInstanceFromNode(targetNode) { + var targetInst; + if (targetInst = targetNode[internalInstanceKey]) return targetInst; + for (var parentNode = targetNode.parentNode; parentNode; ) { + if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) { + parentNode = targetInst.alternate; + if (null !== targetInst.child || null !== parentNode && null !== parentNode.child) + for (targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) { + if (parentNode = targetNode[internalInstanceKey]) + return parentNode; + targetNode = getParentHydrationBoundary(targetNode); + } + return targetInst; + } + targetNode = parentNode; + parentNode = targetNode.parentNode; + } + return null; + } + function getInstanceFromNode(node) { + if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) { + var tag = node.tag; + if (5 === tag || 6 === tag || 13 === tag || 31 === tag || 26 === tag || 27 === tag || 3 === tag) + return node; + } + return null; + } + function getNodeFromInstance(inst) { + var tag = inst.tag; + if (5 === tag || 26 === tag || 27 === tag || 6 === tag) + return inst.stateNode; + throw Error("getNodeFromInstance: Invalid argument."); + } + function getResourcesFromRoot(root2) { + var resources = root2[internalRootNodeResourcesKey]; + resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }); + return resources; + } + function markNodeAsHoistable(node) { + node[internalHoistableMarker] = true; + } + function clearPendingLoadOnNode(node) { + node[internalLoadPendingKey] = void 0; + } + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + registrationNameDependencies[registrationName] && console.error( + "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", + registrationName + ); + registrationNameDependencies[registrationName] = dependencies; + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName); + for (registrationName = 0; registrationName < dependencies.length; registrationName++) + allNativeEvents.add(dependencies[registrationName]); + } + function checkControlledValueProps(tagName, props) { + hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." + ) : console.error( + "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." + )); + props.onChange || props.readOnly || props.disabled || null == props.checked || console.error( + "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." + ); + } + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) + return true; + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) + return false; + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) + return validatedAttributeNameCache[attributeName] = true; + illegalAttributeNameCache[attributeName] = true; + console.error("Invalid attribute name: `%s`", attributeName); + return false; + } + function pushMutationContext() { + var prev = viewTransitionMutationContext; + viewTransitionMutationContext = false; + return prev; + } + function getValueForAttributeOnCustomComponent(node, name, expected) { + if (isAttributeNameSafe(name)) { + if (!node.hasAttribute(name)) { + switch (typeof expected) { + case "symbol": + case "object": + return expected; + case "function": + return expected; + case "boolean": + if (false === expected) return expected; + } + return void 0 === expected ? void 0 : null; + } + node = "nonce" === name.toLowerCase() ? node.nonce : node.getAttribute(name); + if ("" === node && true === expected) return true; + checkAttributeStringCoercion(expected, name); + return node === "" + expected ? expected : node; + } + } + function setValueForAttribute(node, name, value) { + if (isAttributeNameSafe(name)) + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + node.removeAttribute(name); + return; + case "boolean": + var prefix2 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix2 && "aria-" !== prefix2) { + node.removeAttribute(name); + return; + } + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, value); + } + } + function setValueForKnownAttribute(node, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttribute(name, value); + } + } + function setValueForNamespacedAttribute(node, namespace, name, value) { + if (null === value) node.removeAttribute(name); + else { + switch (typeof value) { + case "undefined": + case "function": + case "symbol": + case "boolean": + node.removeAttribute(name); + return; + } + checkAttributeStringCoercion(value, name); + node.setAttributeNS(namespace, name, value); + } + } + function getToStringValue(value) { + switch (typeof value) { + case "bigint": + case "boolean": + case "number": + case "string": + case "undefined": + return value; + case "object": + return checkFormFieldValueStringCoercion(value), value; + default: + return ""; + } + } + function isCheckable(elem) { + var type = elem.type; + return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type); + } + function trackValueOnNode(node, valueField, currentValue) { + var descriptor = Object.getOwnPropertyDescriptor( + node.constructor.prototype, + valueField + ); + if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) { + var get = descriptor.get, set = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function() { + return get.call(this); + }, + set: function(value) { + checkFormFieldValueStringCoercion(value); + currentValue = "" + value; + set.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + return { + getValue: function() { + return currentValue; + }, + setValue: function(value) { + checkFormFieldValueStringCoercion(value); + currentValue = "" + value; + }, + stopTracking: function() { + node._valueTracker = null; + delete node[valueField]; + } + }; + } + } + function track(node) { + if (!node._valueTracker) { + var valueField = isCheckable(node) ? "checked" : "value"; + node._valueTracker = trackValueOnNode( + node, + valueField, + "" + node[valueField] + ); + } + } + function updateValueIfChanged(node) { + if (!node) return false; + var tracker = node._valueTracker; + if (!tracker) return true; + var lastValue = tracker.getValue(); + var value = ""; + node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value); + node = value; + return node !== lastValue ? (tracker.setValue(node), true) : false; + } + function escapeSelectorAttributeValueInsideDoubleQuotes(value) { + return value.replace( + escapeSelectorAttributeValueInsideDoubleQuotesRegex, + function(ch) { + return "\\" + ch.charCodeAt(0).toString(16) + " "; + } + ); + } + function validateInputProps(element, props) { + void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error( + "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", + getCurrentFiberOwnerNameInDevOrNull() || "A component", + props.type + ), didWarnCheckedDefaultChecked = true); + void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error( + "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", + getCurrentFiberOwnerNameInDevOrNull() || "A component", + props.type + ), didWarnValueDefaultValue$1 = true); + } + function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) { + element.name = ""; + null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type"); + if (null != value) + if ("number" === type) { + if (0 === value && "" === element.value || element.value != value) + element.value = "" + getToStringValue(value); + } else + element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value)); + else + "submit" !== type && "reset" !== type || element.removeAttribute("value"); + null != value ? "number" === type && element.value == value ? setDefaultValue(element, getToStringValue(element.value)) : setDefaultValue(element, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value"); + null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked); + null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked); + null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name"); + } + function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) { + null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type); + if (null != value || null != defaultValue) { + if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value)) { + track(element); + return; + } + defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : ""; + value = null != value ? "" + getToStringValue(value) : defaultValue; + isHydrating2 || value === element.value || (element.value = value); + element.defaultValue = value; + } + checked = null != checked ? checked : defaultChecked; + checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked; + element.checked = isHydrating2 ? element.checked : !!checked; + element.defaultChecked = !!checked; + null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name); + track(element); + } + function setDefaultValue(node, value) { + node.defaultValue !== "" + value && (node.defaultValue = "" + value); + } + function validateOptionProps(element, props) { + null == props.value && ("object" === typeof props.children && null !== props.children ? React.Children.forEach(props.children, function(child) { + null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error( + "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to