@wix/himalaya-cli 0.1520.0 → 0.1522.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -11758,10 +11758,10 @@ function appBindingIssues(root, ctx, appActions, isNavItemHidden = (at2) => /^to
11758
11758
  continue;
11759
11759
  }
11760
11760
  if ((ref.key === "itemsPath" || ref.key === "optionsPath") && ctx?.appState) {
11761
- const bound = initialValue(own3(ctx.appState, parsed.service), parsed.path);
11762
- if (bound !== void 0 && !Array.isArray(bound)) {
11761
+ const bound2 = initialValue(own3(ctx.appState, parsed.service), parsed.path);
11762
+ if (bound2 !== void 0 && !Array.isArray(bound2)) {
11763
11763
  issues.push({
11764
- ...issue2(`${ref.key} "${ref.value}" resolves to ${bound === null ? "null" : typeof bound} in the app service's INITIAL state, not an array \u2014 the list renders no rows`),
11764
+ ...issue2(`${ref.key} "${ref.value}" resolves to ${bound2 === null ? "null" : typeof bound2} in the app service's INITIAL state, not an array \u2014 the list renders no rows`),
11765
11765
  severity: ref.key === "itemsPath" || strict ? "error" : "warning"
11766
11766
  });
11767
11767
  }
@@ -12112,8 +12112,8 @@ function mountable(c2, inTemplate = false) {
12112
12112
  const pages2 = type === "Carousel" ? props.items : props.pages;
12113
12113
  const perPage = Array.isArray(pages2) ? pages2.map((p2) => isComponent(p2) ? mountable(p2) : 0) : [];
12114
12114
  const window2 = typeof props.liveWindow === "number" && props.liveWindow > 0 ? Math.floor(props.liveWindow) : 0;
12115
- const bound = type === "Carousel" && hasItemsPath(props);
12116
- if (bound) {
12115
+ const bound2 = type === "Carousel" && hasItemsPath(props);
12116
+ if (bound2) {
12117
12117
  const template = perPage[0] ?? 0;
12118
12118
  if (template === 0) return 0;
12119
12119
  return repeated(window2 > 0 ? template * (2 * window2 + 1) : Infinity);
@@ -12185,8 +12185,8 @@ function webViewEmbeddedFindings(descriptor) {
12185
12185
  });
12186
12186
  }
12187
12187
  if ((bridged || isPerInstance(props)) && !s2.inTemplate) {
12188
- const explicit = props.instanceId;
12189
- const effective = isLiteral(explicit) ? explicit : explicit === void 0 || explicit === "" ? effectiveWebViewInstanceId(screenId, void 0, s2.id) : null;
12188
+ const explicit2 = props.instanceId;
12189
+ const effective = isLiteral(explicit2) ? explicit2 : explicit2 === void 0 || explicit2 === "" ? effectiveWebViewInstanceId(screenId, void 0, s2.id) : null;
12190
12190
  if (effective !== null) {
12191
12191
  const first = seen.get(effective);
12192
12192
  if (first !== void 0) {
@@ -13300,8 +13300,8 @@ function deviceParityWithheldFrom(root) {
13300
13300
  function setDefaultEvaluator(evaluator) {
13301
13301
  defaultEvaluator = evaluator;
13302
13302
  }
13303
- function resolveEvaluator(explicit) {
13304
- const chosen = explicit ?? defaultEvaluator;
13303
+ function resolveEvaluator(explicit2) {
13304
+ const chosen = explicit2 ?? defaultEvaluator;
13305
13305
  if (!chosen) {
13306
13306
  throw new Error(
13307
13307
  "no RealmEvaluator installed \u2014 import validate-descriptor.js (node) or validate-descriptor.browser.js (browser), or pass `evaluator` explicitly"
@@ -13315,8 +13315,8 @@ function setBootEvaluator(evaluator) {
13315
13315
  function installedBootEvaluator() {
13316
13316
  return bootEvaluator;
13317
13317
  }
13318
- function resolveBootEvaluator(explicit) {
13319
- return explicit ?? bootEvaluator ?? resolveEvaluator();
13318
+ function resolveBootEvaluator(explicit2) {
13319
+ return explicit2 ?? bootEvaluator ?? resolveEvaluator();
13320
13320
  }
13321
13321
  function setActionEvaluator(evaluator) {
13322
13322
  actionEvaluator = evaluator;
@@ -13324,8 +13324,8 @@ function setActionEvaluator(evaluator) {
13324
13324
  function installedActionEvaluator() {
13325
13325
  return actionEvaluator;
13326
13326
  }
13327
- function resolveActionEvaluator(explicit) {
13328
- return explicit ?? actionEvaluator ?? resolveEvaluator();
13327
+ function resolveActionEvaluator(explicit2) {
13328
+ return explicit2 ?? actionEvaluator ?? resolveEvaluator();
13329
13329
  }
13330
13330
  function responseBytes(value) {
13331
13331
  try {
@@ -15129,13 +15129,13 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
15129
15129
  if (k2 === "itemsPath" && typeof val === "string") {
15130
15130
  const m2 = /^\$service:([A-Za-z0-9_-]+)\.([A-Za-z0-9_.[\]]+)/.exec(val);
15131
15131
  if (m2 && m2[1] in services) {
15132
- const bound = pathValue(services[m2[1]], m2[2]);
15133
- if (bound !== void 0 && !Array.isArray(bound)) {
15132
+ const bound2 = pathValue(services[m2[1]], m2[2]);
15133
+ if (bound2 !== void 0 && !Array.isArray(bound2)) {
15134
15134
  issues.push({
15135
15135
  severity: "error",
15136
15136
  pass: "bindings",
15137
15137
  path: here,
15138
- message: `itemsPath must bind to an array \u2014 $service:${m2[1]}.${m2[2]} is ${bound === null ? "null" : typeof bound} in the bundle's initial state; initialize it as [] (see the dynamic-list recipe: himi docs recipe-dynamic-list)`
15138
+ message: `itemsPath must bind to an array \u2014 $service:${m2[1]}.${m2[2]} is ${bound2 === null ? "null" : typeof bound2} in the bundle's initial state; initialize it as [] (see the dynamic-list recipe: himi docs recipe-dynamic-list)`
15139
15139
  });
15140
15140
  }
15141
15141
  }
@@ -15208,13 +15208,13 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
15208
15208
  if (OPTIONS_BINDING_PROPS.has(k2) && typeof val === "string") {
15209
15209
  const mm = /^\$service:([A-Za-z0-9_-]+)\.([A-Za-z0-9_.[\]]+)/.exec(val);
15210
15210
  if (mm && mm[1] in services) {
15211
- const bound = pathValue(services[mm[1]], mm[2]);
15212
- if (bound !== void 0 && !Array.isArray(bound)) {
15211
+ const bound2 = pathValue(services[mm[1]], mm[2]);
15212
+ if (bound2 !== void 0 && !Array.isArray(bound2)) {
15213
15213
  issues.push({
15214
15214
  severity: strict ? "error" : "warning",
15215
15215
  pass: "bindings",
15216
15216
  path: here,
15217
- message: `\`${k2}\` must bind to a list of options \u2014 $service:${mm[1]}.${mm[2]} is ${bound === null ? "null" : typeof bound} in the bundle's initial state, so the component renders no bound options on device (it silently keeps its static list). Initialize it as \`[]\` and populate it in an action (see the dynamic-list recipe: himi docs recipe-dynamic-list).`
15217
+ message: `\`${k2}\` must bind to a list of options \u2014 $service:${mm[1]}.${mm[2]} is ${bound2 === null ? "null" : typeof bound2} in the bundle's initial state, so the component renders no bound options on device (it silently keeps its static list). Initialize it as \`[]\` and populate it in an action (see the dynamic-list recipe: himi docs recipe-dynamic-list).`
15218
15218
  });
15219
15219
  }
15220
15220
  }
@@ -22307,7 +22307,6 @@ function resolveIdiom(tokens2, ctx = {}) {
22307
22307
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
22308
22308
  var init_idiom = __esm({
22309
22309
  "../../core/ts/src/idiom.ts"() {
22310
- "use strict";
22311
22310
  IDIOM_CONTEXTS = {
22312
22311
  ios: { native: ["ios"] },
22313
22312
  android: { native: ["material"] },
@@ -29786,8 +29785,8 @@ function resolveServeBase() {
29786
29785
  return (raw ?? "").replace(/\/$/, "");
29787
29786
  }
29788
29787
  function resolvePlaneControlReadBase() {
29789
- const explicit = process.env.HIMALAYA_PLAYER_CONTROL_URL;
29790
- if (explicit) return explicit.replace(/\/$/, "");
29788
+ const explicit2 = process.env.HIMALAYA_PLAYER_CONTROL_URL;
29789
+ if (explicit2) return explicit2.replace(/\/$/, "");
29791
29790
  const override = process.env.HIMALAYA_PLAYER_SERVE_URL;
29792
29791
  if (override) {
29793
29792
  const base = resolveServeBase();
@@ -31104,10 +31103,10 @@ function servicePath(binding2) {
31104
31103
  }
31105
31104
  function useResolvedScalar(v2, ctx) {
31106
31105
  const isService = typeof v2 === "string" && isBinding(v2) && v2.startsWith("$service:");
31107
- const bound = useBoundValue(ctx, isService ? v2 : "");
31106
+ const bound2 = useBoundValue(ctx, isService ? v2 : "");
31108
31107
  if (!isService) return resolveScalarStatic(v2, ctx);
31109
31108
  if (!ctx.provider) return void 0;
31110
- return bound ?? void 0;
31109
+ return bound2 ?? void 0;
31111
31110
  }
31112
31111
  function useBoundValue(ctx, binding2) {
31113
31112
  const path2 = servicePath(binding2);
@@ -31182,8 +31181,8 @@ var init_bindings2 = __esm({
31182
31181
  };
31183
31182
  BoundList = ({ ctx, itemsPath, template, renderRow }) => {
31184
31183
  const local = itemsPath.startsWith("$item.");
31185
- const bound = useBoundValue(ctx, local ? "" : itemsPath);
31186
- const arr2 = local ? ctx.itemScope?.[itemsPath.slice("$item.".length)] : bound;
31184
+ const bound2 = useBoundValue(ctx, local ? "" : itemsPath);
31185
+ const arr2 = local ? ctx.itemScope?.[itemsPath.slice("$item.".length)] : bound2;
31187
31186
  const items = Array.isArray(arr2) ? arr2 : [];
31188
31187
  return /* @__PURE__ */ jsx3(Fragment, { children: items.map((item, i2) => {
31189
31188
  const scope2 = item && typeof item === "object" ? { ...item, __index: i2 } : { value: item, __index: i2 };
@@ -31348,10 +31347,10 @@ function clampDateFieldValue(encoded2, minUnix, maxUnix, mode) {
31348
31347
  return String(clampDateUnix(Number(encoded2), minUnix, maxUnix, mode));
31349
31348
  }
31350
31349
  function clampDateUnix(unix, minUnix, maxUnix, mode) {
31351
- const onDay = (bound) => {
31352
- if (typeof bound !== "number") return null;
31353
- if (mode !== "time") return bound;
31354
- const b2 = new Date(bound * 1e3);
31350
+ const onDay = (bound2) => {
31351
+ if (typeof bound2 !== "number") return null;
31352
+ if (mode !== "time") return bound2;
31353
+ const b2 = new Date(bound2 * 1e3);
31355
31354
  const d2 = new Date(unix * 1e3);
31356
31355
  d2.setHours(b2.getHours(), b2.getMinutes(), b2.getSeconds(), 0);
31357
31356
  return Math.floor(d2.getTime() / 1e3);
@@ -33069,8 +33068,8 @@ var init_controls = __esm({
33069
33068
  rowShareFloor = (style, rowStretch, floor2) => rowStretch ? { ...style, minWidth: floor2 } : style;
33070
33069
  A11ySwitch = ({ props, ctx, wrap }) => {
33071
33070
  const C2 = ctx.color;
33072
- const bound = useResolvedScalar(props.valuePath, ctx);
33073
- const resolved2 = ctx.empty ? false : props.valuePath != null ? encodeToggleFieldValue(bound) === "true" : encodeToggleFieldValue(props.value, props.on === true) === "true";
33071
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
33072
+ const resolved2 = ctx.empty ? false : props.valuePath != null ? encodeToggleFieldValue(bound2) === "true" : encodeToggleFieldValue(props.value, props.on === true) === "true";
33074
33073
  const bag = React7.useContext(FormValuesContext);
33075
33074
  const fieldId = props.__formFieldId;
33076
33075
  const inForm = Boolean(bag && fieldId);
@@ -33081,7 +33080,7 @@ var init_controls = __esm({
33081
33080
  setFormOn(null);
33082
33081
  }, [resolved2]);
33083
33082
  const toggleServiceBound = typeof props.valuePath === "string" && props.valuePath.startsWith("$service:");
33084
- const toggleReady = !toggleServiceBound || bound !== void 0;
33083
+ const toggleReady = !toggleServiceBound || bound2 !== void 0;
33085
33084
  React7.useEffect(() => {
33086
33085
  if (!bag || !fieldId) return;
33087
33086
  if (!toggleReady && !hasContributed(bag, fieldId)) return;
@@ -33145,18 +33144,18 @@ var init_controls = __esm({
33145
33144
  const min = props.min ?? 0, max = props.max ?? 1;
33146
33145
  const boundValue = useResolvedScalar(props.valuePath, ctx);
33147
33146
  const raw = props.valuePath != null ? boundValue : props.value;
33148
- const bound = typeof raw === "number" ? raw : (min + max) / 2;
33147
+ const bound2 = typeof raw === "number" ? raw : (min + max) / 2;
33149
33148
  const tint = C2(props.tint ?? "accentPrimary", "#116DFF");
33150
33149
  const step = typeof props.step === "number" && props.step > 0 ? props.step : (max - min) / 100 || 0.01;
33151
33150
  const range = props.range === true && typeof props.upperValue === "number";
33152
- const [val, setVal] = React7.useState(bound);
33153
- const latestValue = React7.useRef(bound);
33151
+ const [val, setVal] = React7.useState(bound2);
33152
+ const latestValue = React7.useRef(bound2);
33154
33153
  const dragging = React7.useRef(false);
33155
33154
  React7.useEffect(() => {
33156
33155
  if (dragging.current) return;
33157
- latestValue.current = bound;
33158
- setVal(bound);
33159
- }, [bound]);
33156
+ latestValue.current = bound2;
33157
+ setVal(bound2);
33158
+ }, [bound2]);
33160
33159
  const lastEmit = React7.useRef(void 0);
33161
33160
  const canFire = !!(ctx.onAction && props.onChange && !props.disabled);
33162
33161
  const commit = (nv) => {
@@ -33167,10 +33166,10 @@ var init_controls = __esm({
33167
33166
  ctx.onAction({ ...act, args: { ...act.args ?? {}, value: nv } });
33168
33167
  };
33169
33168
  const clampPct = (n2) => max > min ? Math.max(0, Math.min(1, (n2 - min) / (max - min))) : 0;
33170
- const [pair, setPair] = React7.useState(() => [Math.min(bound, props.upperValue ?? bound), Math.max(bound, props.upperValue ?? bound)]);
33169
+ const [pair, setPair] = React7.useState(() => [Math.min(bound2, props.upperValue ?? bound2), Math.max(bound2, props.upperValue ?? bound2)]);
33171
33170
  React7.useEffect(() => {
33172
- if (range) setPair([Math.min(bound, props.upperValue), Math.max(bound, props.upperValue)]);
33173
- }, [range, bound, props.upperValue]);
33171
+ if (range) setPair([Math.min(bound2, props.upperValue), Math.max(bound2, props.upperValue)]);
33172
+ }, [range, bound2, props.upperValue]);
33174
33173
  if (range) {
33175
33174
  const [lo2, hi2] = pair;
33176
33175
  const thumbKey = (which) => (e2) => {
@@ -33407,8 +33406,8 @@ var init_controls = __esm({
33407
33406
  }
33408
33407
  return value;
33409
33408
  };
33410
- tabsActiveColorName = (raw, bound) => {
33411
- const name = typeof raw === "string" && isBinding(raw) ? bound : raw;
33409
+ tabsActiveColorName = (raw, bound2) => {
33410
+ const name = typeof raw === "string" && isBinding(raw) ? bound2 : raw;
33412
33411
  return typeof name === "string" && name.trim() ? name.trim() : void 0;
33413
33412
  };
33414
33413
  swipeTabPage = (pages2, tabId) => {
@@ -35022,6 +35021,448 @@ var init_pdfFetch = __esm({
35022
35021
  }
35023
35022
  });
35024
35023
 
35024
+ // ../../core/web-renderer/src/webviewBridge.ts
35025
+ function canonicalJson2(value, path2 = /* @__PURE__ */ new Set()) {
35026
+ if (value === null || typeof value === "boolean" || typeof value === "string") return JSON.stringify(value);
35027
+ if (typeof value === "number") {
35028
+ if (!Number.isFinite(value)) throw new TypeError(`canonicalJson: ${value} is not representable in JSON`);
35029
+ return String(value);
35030
+ }
35031
+ if (typeof value !== "object") throw new TypeError(`canonicalJson: a ${typeof value} is not JSON data`);
35032
+ if (path2.has(value)) throw new TypeError("canonicalJson: a cyclic value is not JSON data");
35033
+ path2.add(value);
35034
+ try {
35035
+ if (Array.isArray(value)) {
35036
+ const parts = [];
35037
+ for (let i2 = 0; i2 < value.length; i2++) {
35038
+ if (!(i2 in value) || value[i2] === void 0) throw new TypeError(`canonicalJson: array element ${i2} is not JSON data`);
35039
+ parts.push(canonicalJson2(value[i2], path2));
35040
+ }
35041
+ return `[${parts.join(",")}]`;
35042
+ }
35043
+ const proto = Object.getPrototypeOf(value);
35044
+ if (proto !== Object.prototype && proto !== null) throw new TypeError("canonicalJson: not a plain object");
35045
+ const rec = value;
35046
+ const keys = Object.keys(rec).filter((k2) => rec[k2] !== void 0).sort(byCodeUnit2);
35047
+ return `{${keys.map((k2) => `${JSON.stringify(k2)}:${canonicalJson2(rec[k2], path2)}`).join(",")}}`;
35048
+ } finally {
35049
+ path2.delete(value);
35050
+ }
35051
+ }
35052
+ function canonicalScreenArgs2(args) {
35053
+ if (!args) return "";
35054
+ return Object.keys(args).filter((k2) => args[k2] !== void 0).sort(byCodeUnit2).map((k2) => `${encodeURIComponent(k2)}=${encodeURIComponent(canonicalJson2(args[k2]))}`).join("&");
35055
+ }
35056
+ function effectiveWebViewInstanceId2(screenId, args, componentId, explicitInstanceId) {
35057
+ if (typeof explicitInstanceId === "string" && explicitInstanceId !== "") return explicitInstanceId;
35058
+ return `${screenId}?${canonicalScreenArgs2(args)}/${componentId}`;
35059
+ }
35060
+ function webViewBridgePlan(input) {
35061
+ if (input.inlineHtml != null && input.inlineHtml !== "") return { bridged: false, reason: "web_srcdoc_unbridged" };
35062
+ const pageOrigin = input.pageOrigin === void 0 ? currentOrigin() : input.pageOrigin;
35063
+ const target = input.url ? classifyEmbedUrl(input.url, pageOrigin) : null;
35064
+ if (!target || !target.crossOrigin || target.protocol !== "https:" && target.protocol !== "http:") {
35065
+ return { bridged: false, reason: "web_url_same_origin_unbridged" };
35066
+ }
35067
+ const origin = new URL(target.href).origin;
35068
+ if (input.allowedOrigins.length === 0 || !webViewOriginAllowed(input.url ?? "", input.allowedOrigins)) {
35069
+ return { bridged: false, reason: "web_url_not_app_controlled" };
35070
+ }
35071
+ return { bridged: true, trustOrigin: origin };
35072
+ }
35073
+ function webViewBridgeLimits(security) {
35074
+ const sec = security && typeof security === "object" ? security : {};
35075
+ const base = sec.profile === "app_content" ? APP_CONTENT_LIMITS : FLOOR_LIMITS;
35076
+ return {
35077
+ maxCalls: explicit(sec.rateLimitMaxCalls, base.maxCalls),
35078
+ windowMs: explicit(sec.rateLimitWindowMs, base.windowMs),
35079
+ maxStringLength: explicit(sec.maxArgStringLength, base.maxStringLength),
35080
+ maxDepth: explicit(sec.maxArgDepth, base.maxDepth),
35081
+ maxBytes: explicit(sec.maxMessageBytes, base.maxBytes),
35082
+ allowsLineBreaks: base.allowsLineBreaks
35083
+ };
35084
+ }
35085
+ function admitRaw(raw, limits, callTimes, now) {
35086
+ while (callTimes.length > 0 && callTimes[0] < now - limits.windowMs) callTimes.shift();
35087
+ if (callTimes.length >= limits.maxCalls) return "rate_limit";
35088
+ callTimes.push(now);
35089
+ if (utf83(raw) > limits.maxBytes) return "too_large";
35090
+ return null;
35091
+ }
35092
+ function containsUnsafe(s2, allowsLineBreaks) {
35093
+ const lower = s2.toLowerCase();
35094
+ if (lower.includes("<script") || lower.includes("</script")) return true;
35095
+ for (let i2 = 0; i2 < s2.length; i2++) {
35096
+ const c2 = s2.charCodeAt(i2);
35097
+ if (c2 === 9 || allowsLineBreaks && (c2 === 10 || c2 === 13)) continue;
35098
+ if (c2 < 32 || c2 === 127) return true;
35099
+ if (c2 >= 8234 && c2 <= 8238 || c2 >= 8294 && c2 <= 8297) return true;
35100
+ }
35101
+ return false;
35102
+ }
35103
+ function argsClean(value, depth, limits) {
35104
+ if (depth > limits.maxDepth) return false;
35105
+ if (typeof value === "string") return value.length <= limits.maxStringLength && !containsUnsafe(value, limits.allowsLineBreaks);
35106
+ if (Array.isArray(value)) return value.every((v2) => argsClean(v2, depth + 1, limits));
35107
+ if (value && typeof value === "object") return Object.values(value).every((v2) => argsClean(v2, depth + 1, limits));
35108
+ return true;
35109
+ }
35110
+ function judged(payload) {
35111
+ if (typeof payload !== "string") return payload;
35112
+ try {
35113
+ return JSON.parse(payload);
35114
+ } catch {
35115
+ return payload;
35116
+ }
35117
+ }
35118
+ function pagePayloadJson(payload) {
35119
+ if (payload === void 0 || payload === null) return "null";
35120
+ return typeof payload === "string" ? payload : JSON.stringify(payload);
35121
+ }
35122
+ function scrubKind(kind) {
35123
+ return kind.slice(0, 64).replace(/[\u0000-\u001f\u007f\u202a-\u202e\u2066-\u2069]/g, "");
35124
+ }
35125
+ function isConsoleEnvelope(payload) {
35126
+ const j2 = judged(payload);
35127
+ return !!j2 && typeof j2 === "object" && !Array.isArray(j2) && j2.sys === "console";
35128
+ }
35129
+ function consoleArgLength(limits) {
35130
+ return Math.min(limits.maxStringLength, Math.max(16, Math.floor(limits.maxBytes / (CONSOLE_MAX_ARGS * 6))));
35131
+ }
35132
+ function admitConsole(budget, now) {
35133
+ while (budget.consoleTimes.length > 0 && budget.consoleTimes[0] <= now - 1e3) budget.consoleTimes.shift();
35134
+ if (budget.consoleTimes.length >= CONSOLE_MAX_PER_SECOND) {
35135
+ budget.consoleDropped++;
35136
+ return false;
35137
+ }
35138
+ budget.consoleTimes.push(now);
35139
+ return true;
35140
+ }
35141
+ function lifecycleEnvelope(instanceId, state, detail) {
35142
+ return JSON.stringify(detail === void 0 ? { iid: instanceId, state, sys: "lifecycle", v: 1 } : { detail, iid: instanceId, state, sys: "lifecycle", v: 1 });
35143
+ }
35144
+ var byCodeUnit2, FLOOR_LIMITS, APP_CONTENT_LIMITS, explicit, utf83, CONSOLE_MAX_PER_SECOND, CONSOLE_MAX_ARGS, ANNOUNCE, PORT, HOST_CONTROL, MAX_HELD, MAX_REPORTED, WebViewBridgeSession;
35145
+ var init_webviewBridge = __esm({
35146
+ "../../core/web-renderer/src/webviewBridge.ts"() {
35147
+ init_webviewFrame();
35148
+ byCodeUnit2 = (a2, b2) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0;
35149
+ FLOOR_LIMITS = { maxCalls: 50, windowMs: 1e3, maxStringLength: 2048, maxDepth: 10, maxBytes: 1048576, allowsLineBreaks: false };
35150
+ APP_CONTENT_LIMITS = { maxCalls: 200, windowMs: 1e3, maxStringLength: 262144, maxDepth: 32, maxBytes: 4194304, allowsLineBreaks: true };
35151
+ explicit = (v2, base) => typeof v2 === "number" && Number.isFinite(v2) ? v2 : base;
35152
+ utf83 = (s2) => new TextEncoder().encode(s2).byteLength;
35153
+ CONSOLE_MAX_PER_SECOND = 20;
35154
+ CONSOLE_MAX_ARGS = 16;
35155
+ ANNOUNCE = "webview.announce";
35156
+ PORT = "webview.port";
35157
+ HOST_CONTROL = "webview.host";
35158
+ MAX_HELD = 64;
35159
+ MAX_REPORTED = 32;
35160
+ WebViewBridgeSession = class {
35161
+ constructor(opts) {
35162
+ this.opts = opts;
35163
+ this.active = opts.active !== false;
35164
+ this.muted = opts.muted === true;
35165
+ }
35166
+ registration = null;
35167
+ port = null;
35168
+ boundDoc = null;
35169
+ held = [];
35170
+ loaded = false;
35171
+ active;
35172
+ muted;
35173
+ stopped = false;
35174
+ everBound = false;
35175
+ boundTo = null;
35176
+ reported = /* @__PURE__ */ new Set();
35177
+ onWindowMessage = (event) => this.announce(event);
35178
+ get instanceId() {
35179
+ return this.opts.instanceId;
35180
+ }
35181
+ get bridged() {
35182
+ return this.opts.plan.bridged;
35183
+ }
35184
+ /** Whether a page document ever took a port from this session (it then holds it, and stops announcing). */
35185
+ get hasBoundPage() {
35186
+ return this.everBound;
35187
+ }
35188
+ /** The frame window whose page holds this session's latest port (`null` if none ever bound). */
35189
+ get boundWindow() {
35190
+ return this.boundTo;
35191
+ }
35192
+ /** Mount: register with the worker's hub, tell it `mounted` (with the reason when unbridged), and
35193
+ * start listening for the page's announce. */
35194
+ start() {
35195
+ const { channel: channel3, instanceId, plan } = this.opts;
35196
+ const registration = channel3.register(instanceId, (json8) => this.toPage(json8));
35197
+ this.registration = registration;
35198
+ channel3.deliverLifecycle(instanceId, registration.replacedLive ? lifecycleEnvelope(instanceId, "reloaded") : lifecycleEnvelope(instanceId, "mounted", plan.bridged ? { bridged: true } : { bridged: false, reason: plan.reason }));
35199
+ if (!this.active) channel3.deliverLifecycle(instanceId, lifecycleEnvelope(instanceId, "inactive"));
35200
+ if (plan.bridged) this.opts.win.addEventListener("message", this.onWindowMessage);
35201
+ }
35202
+ /** The iframe's `load`. Only the first one of a document epoch is `loaded`: an in-frame navigation
35203
+ * loads again, and that new document is announced (`reloaded`) when it binds its port. */
35204
+ frameLoaded() {
35205
+ if (this.stopped || this.loaded) return;
35206
+ this.loaded = true;
35207
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "loaded"));
35208
+ }
35209
+ /** `active_path` changed. */
35210
+ setActive(active) {
35211
+ if (this.stopped || active === this.active) return;
35212
+ this.active = active;
35213
+ this.control("active", active);
35214
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, active ? "active" : "inactive"));
35215
+ }
35216
+ /** `muted_path` changed: the page-side muted sweep, best effort. */
35217
+ setMuted(muted) {
35218
+ if (this.stopped || muted === this.muted) return;
35219
+ this.muted = muted;
35220
+ this.control("muted", muted);
35221
+ }
35222
+ /** `reload_key_path` changed: the caller remounts the iframe; this ends the old document. */
35223
+ reloaded() {
35224
+ if (this.stopped) return;
35225
+ this.closePort();
35226
+ this.boundDoc = null;
35227
+ this.held = [];
35228
+ this.loaded = false;
35229
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "reloaded"));
35230
+ }
35231
+ /** Unmount: close the port, unregister (THIS registration only) and tell the worker. */
35232
+ stop() {
35233
+ if (this.stopped) return;
35234
+ this.stopped = true;
35235
+ this.opts.win.removeEventListener("message", this.onWindowMessage);
35236
+ this.closePort();
35237
+ this.held = [];
35238
+ const still = this.registration?.unregister() ?? false;
35239
+ this.registration = null;
35240
+ if (still) this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "unmounted"));
35241
+ }
35242
+ // ── page handshake ──
35243
+ announce(event) {
35244
+ if (this.stopped || !this.opts.plan.bridged) return;
35245
+ const frame = this.opts.frameWindow();
35246
+ if (!frame || event.source !== frame) return;
35247
+ const data = event.data;
35248
+ if (!data || typeof data !== "object" || data.himalaya !== ANNOUNCE || data.v !== 1) return;
35249
+ const doc = typeof data.doc === "string" && data.doc.length > 0 && data.doc.length <= 64 ? data.doc : null;
35250
+ if (!doc) return;
35251
+ if (event.origin !== this.opts.plan.trustOrigin) {
35252
+ this.deny("untrusted_origin", `origin ${event.origin}`, "-");
35253
+ return;
35254
+ }
35255
+ if (doc === this.boundDoc) return;
35256
+ if (this.port) {
35257
+ this.closePort();
35258
+ this.loaded = false;
35259
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "reloaded"));
35260
+ }
35261
+ const channel3 = this.opts.createChannel?.() ?? new MessageChannel();
35262
+ const port = channel3.port1;
35263
+ port.onmessage = (e2) => this.fromPage(e2.data);
35264
+ port.start?.();
35265
+ this.port = port;
35266
+ this.boundDoc = doc;
35267
+ this.everBound = true;
35268
+ this.boundTo = frame;
35269
+ const hello = {
35270
+ himalaya: PORT,
35271
+ v: 1,
35272
+ doc,
35273
+ active: this.active,
35274
+ muted: this.muted,
35275
+ console: this.opts.consoleForwarding ? { maxArgs: CONSOLE_MAX_ARGS, argLength: consoleArgLength(this.opts.limits) } : null
35276
+ };
35277
+ try {
35278
+ frame.postMessage(hello, this.opts.plan.trustOrigin, [channel3.port2]);
35279
+ } catch {
35280
+ this.closePort();
35281
+ this.boundDoc = null;
35282
+ return;
35283
+ }
35284
+ const held = this.held;
35285
+ this.held = [];
35286
+ for (const json8 of held) this.toPage(json8);
35287
+ }
35288
+ // ── page → worker ──
35289
+ fromPage(raw) {
35290
+ if (this.stopped || !this.port) return;
35291
+ const { channel: channel3, instanceId, limits } = this.opts;
35292
+ if (typeof raw !== "string") {
35293
+ this.deny("unsafe_args", "non-string");
35294
+ return;
35295
+ }
35296
+ const budget = channel3.budget(instanceId);
35297
+ const now = this.opts.now?.() ?? Date.now();
35298
+ const rejected = admitRaw(raw, limits, budget.callTimes, now);
35299
+ if (rejected) {
35300
+ this.deny(rejected, rejected);
35301
+ return;
35302
+ }
35303
+ let msg;
35304
+ try {
35305
+ msg = JSON.parse(raw);
35306
+ } catch {
35307
+ this.deny("unsafe_args", "unparsable");
35308
+ return;
35309
+ }
35310
+ if (!msg || typeof msg !== "object" || Array.isArray(msg)) {
35311
+ this.deny("unsafe_args", "not-object");
35312
+ return;
35313
+ }
35314
+ const kind = typeof msg.kind === "string" ? msg.kind : "";
35315
+ if (kind !== "worker.message") {
35316
+ const shown2 = scrubKind(kind);
35317
+ this.deny("bridged_action_path", `kind ${shown2}`, shown2);
35318
+ return;
35319
+ }
35320
+ const payload = msg.payload;
35321
+ const consoleLine = isConsoleEnvelope(payload);
35322
+ if (consoleLine && !this.opts.consoleForwarding) return;
35323
+ if (consoleLine && !admitConsole(budget, now)) return;
35324
+ if (consoleLine) budget.callTimes.pop();
35325
+ const parsed = typeof payload === "string" ? judged(payload) : void 0;
35326
+ if (!argsClean(msg, 0, limits) || parsed !== void 0 && parsed !== payload && !argsClean(parsed, 1, limits)) {
35327
+ this.deny("unsafe_args", "unsafe_args");
35328
+ return;
35329
+ }
35330
+ if (consoleLine) {
35331
+ const env = judged(payload);
35332
+ (this.opts.log ?? ((line) => console.info(line)))(`[himalaya.webview] [${typeof env.level === "string" ? env.level : "log"}] ${JSON.stringify(env.args ?? [])}`);
35333
+ }
35334
+ channel3.deliverMessage(instanceId, pagePayloadJson(payload));
35335
+ }
35336
+ // ── worker → page ──
35337
+ toPage(json8) {
35338
+ if (this.stopped || !this.opts.plan.bridged) return;
35339
+ if (!this.port) {
35340
+ if (this.held.length < MAX_HELD) this.held.push(json8);
35341
+ return;
35342
+ }
35343
+ try {
35344
+ this.port.postMessage(json8);
35345
+ } catch {
35346
+ }
35347
+ }
35348
+ control(op, value) {
35349
+ try {
35350
+ this.port?.postMessage({ himalaya: HOST_CONTROL, v: 1, op, value });
35351
+ } catch {
35352
+ }
35353
+ }
35354
+ closePort() {
35355
+ if (!this.port) return;
35356
+ this.port.onmessage = null;
35357
+ try {
35358
+ this.port.close();
35359
+ } catch {
35360
+ }
35361
+ this.port = null;
35362
+ }
35363
+ /** A refused page message. With `actionId` it is reported as `bridge_call_denied` (native reports the
35364
+ * origin gate and the action-path refusal); the caps (`rate_limit`, `too_large`, `unsafe_args`) are
35365
+ * only logged, as native logs them. Bounded per session either way. */
35366
+ deny(reason, key3, actionId) {
35367
+ const k2 = `${reason}:${key3}`;
35368
+ if (this.reported.size >= MAX_REPORTED || this.reported.has(k2)) return;
35369
+ this.reported.add(k2);
35370
+ if (actionId !== void 0) this.opts.channel.reportDenied(reason, this.opts.instanceId, actionId);
35371
+ else (this.opts.warn ?? ((line) => console.warn(line)))(`[himalaya.webview] message rejected: ${reason} (bridged) iid=${this.opts.instanceId}`);
35372
+ }
35373
+ };
35374
+ }
35375
+ });
35376
+
35377
+ // ../../core/web-renderer/src/webviewBridgeHost.tsx
35378
+ var webviewBridgeHost_exports = {};
35379
+ __export(webviewBridgeHost_exports, {
35380
+ default: () => WebViewBridgeHost
35381
+ });
35382
+ import React10 from "react";
35383
+ function WebViewBridgeHost(p2) {
35384
+ const { channel: channel3, props, ctx } = p2;
35385
+ const explicit2 = useResolvedScalar(props.instanceId, ctx);
35386
+ const explicitId = typeof explicit2 === "string" || typeof explicit2 === "number" ? String(explicit2) : "";
35387
+ const active = useResolvedScalar(bound(props.activePath), ctx) !== false;
35388
+ const muted = useResolvedScalar(bound(props.mutedPath), ctx) === true;
35389
+ const cfg = props.config && typeof props.config === "object" ? props.config : {};
35390
+ const consoleForwarding = cfg.consoleForwarding === true;
35391
+ const security = JSON.stringify(cfg.bridgeSecurity ?? null);
35392
+ const screenArgs = JSON.stringify(ctx.screenArgs ?? null);
35393
+ const source = p2.htmlStr != null ? "\0html" : p2.urlStr ?? "";
35394
+ const origins = p2.allowedOrigins.join("\n");
35395
+ const sessionRef = React10.useRef(null);
35396
+ const live3 = React10.useRef({ active, muted });
35397
+ live3.current = { active, muted };
35398
+ React10.useEffect(() => {
35399
+ if (typeof window === "undefined") return;
35400
+ if (p2.urlStr == null && p2.htmlStr == null) return;
35401
+ let instanceId;
35402
+ try {
35403
+ instanceId = effectiveWebViewInstanceId2(ctx.screenId ?? "", ctx.screenArgs, p2.nodeId ?? "", explicitId || void 0);
35404
+ } catch {
35405
+ return;
35406
+ }
35407
+ const session = new WebViewBridgeSession({
35408
+ instanceId,
35409
+ channel: channel3,
35410
+ plan: webViewBridgePlan({ url: p2.urlStr, inlineHtml: p2.htmlStr, allowedOrigins: p2.allowedOrigins }),
35411
+ limits: webViewBridgeLimits(cfg.bridgeSecurity),
35412
+ consoleForwarding,
35413
+ win: window,
35414
+ frameWindow: () => p2.frameRef.current?.contentWindow ?? null,
35415
+ active: live3.current.active,
35416
+ muted: live3.current.muted
35417
+ });
35418
+ session.start();
35419
+ sessionRef.current = session;
35420
+ p2.load.onLoad = () => session.frameLoaded();
35421
+ const frame = p2.frameRef.current;
35422
+ if (frame && p2.load.boundFrame === frame) {
35423
+ p2.load.boundFrame = null;
35424
+ p2.load.loaded = false;
35425
+ if (frame.getAttribute("src")) frame.setAttribute("src", frame.getAttribute("src"));
35426
+ } else if (p2.load.loaded) {
35427
+ session.frameLoaded();
35428
+ }
35429
+ return () => {
35430
+ const current = p2.frameRef.current;
35431
+ p2.load.boundFrame = session.hasBoundPage && current && current.contentWindow === session.boundWindow ? current : null;
35432
+ session.stop();
35433
+ if (sessionRef.current === session) sessionRef.current = null;
35434
+ p2.load.onLoad = void 0;
35435
+ };
35436
+ }, [channel3, ctx.screenId, screenArgs, p2.nodeId, explicitId, source, origins, security, consoleForwarding]);
35437
+ React10.useEffect(() => {
35438
+ sessionRef.current?.setActive(active);
35439
+ }, [active]);
35440
+ React10.useEffect(() => {
35441
+ sessionRef.current?.setMuted(muted);
35442
+ }, [muted]);
35443
+ const first = React10.useRef(true);
35444
+ useLayoutEffectInBrowser(() => {
35445
+ if (first.current) {
35446
+ first.current = false;
35447
+ return;
35448
+ }
35449
+ p2.load.loaded = false;
35450
+ sessionRef.current?.reloaded();
35451
+ }, [p2.reloadKey, p2.htmlStr]);
35452
+ return null;
35453
+ }
35454
+ var useLayoutEffectInBrowser, bound;
35455
+ var init_webviewBridgeHost = __esm({
35456
+ "../../core/web-renderer/src/webviewBridgeHost.tsx"() {
35457
+ "use strict";
35458
+ init_bindings2();
35459
+ init_helpers();
35460
+ init_webviewBridge();
35461
+ useLayoutEffectInBrowser = typeof globalThis.document === "undefined" ? React10.useEffect : React10.useLayoutEffect;
35462
+ bound = (v2) => typeof v2 === "string" && isBinding(v2) ? v2 : void 0;
35463
+ }
35464
+ });
35465
+
35025
35466
  // ../../core/web-renderer/src/pdfPainter.ts
35026
35467
  async function paintPdfDocument(document2, container, width = container.clientWidth || 600, startPage = 1, zoomPercent = 100, isCurrent = () => true, onPageCount) {
35027
35468
  if (!isCurrent()) return document2.numPages;
@@ -115630,7 +116071,7 @@ __export(pdfDocument_exports, {
115630
116071
  PdfDocument: () => PdfDocument,
115631
116072
  destroyPdfDocumentLoad: () => destroyPdfDocumentLoad
115632
116073
  });
115633
- import React10 from "react";
116074
+ import React11 from "react";
115634
116075
  import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
115635
116076
  async function loadPdfDocument(src, ownerDocument) {
115636
116077
  const [pdfjs, pdfWorkerAsset] = await Promise.all([
@@ -115649,18 +116090,18 @@ async function destroyPdfDocumentLoad(loading) {
115649
116090
  }
115650
116091
  }
115651
116092
  function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, style, onPageCount, onFallback, loadDocument = loadPdfDocument }) {
115652
- const [pages2, setPages] = React10.useState(0);
115653
- const [failedRequest, setFailedRequest] = React10.useState(null);
116093
+ const [pages2, setPages] = React11.useState(0);
116094
+ const [failedRequest, setFailedRequest] = React11.useState(null);
115654
116095
  const request = JSON.stringify([src, zoomPercent]);
115655
116096
  const failed3 = failedRequest === request;
115656
- const containerRef = React10.useRef(null);
115657
- const frameRef = React10.useRef(null);
115658
- const startPageRef = React10.useRef(startPage);
116097
+ const containerRef = React11.useRef(null);
116098
+ const frameRef = React11.useRef(null);
116099
+ const startPageRef = React11.useRef(startPage);
115659
116100
  startPageRef.current = startPage;
115660
- React10.useEffect(() => {
116101
+ React11.useEffect(() => {
115661
116102
  if (failed3) onFallback?.();
115662
116103
  }, [failed3, onFallback]);
115663
- React10.useEffect(() => {
116104
+ React11.useEffect(() => {
115664
116105
  const frame2 = frameRef.current;
115665
116106
  const page = Math.min(pages2, Math.max(1, Math.floor(startPage ?? 1) || 1));
115666
116107
  const canvas = pages2 ? containerRef.current?.querySelector(`[data-pdf-page="${page}"]`) : null;
@@ -115669,7 +116110,7 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
115669
116110
  const scale = frame2.offsetHeight > 0 && box.height > 0 ? box.height / frame2.offsetHeight : 1;
115670
116111
  frame2.scrollTop += (canvas.getBoundingClientRect().top - box.top) / scale;
115671
116112
  }, [startPage, pages2]);
115672
- React10.useEffect(() => {
116113
+ React11.useEffect(() => {
115673
116114
  let live3 = true;
115674
116115
  let loading;
115675
116116
  const container = containerRef.current;
@@ -115731,7 +116172,7 @@ var init_pdfDocument = __esm({
115731
116172
  });
115732
116173
 
115733
116174
  // ../../core/web-renderer/src/renderNode.tsx
115734
- import React11 from "react";
116175
+ import React12 from "react";
115735
116176
  import { createPortal } from "react-dom";
115736
116177
  import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
115737
116178
  function boundTokenName(path2, fallback, ctx) {
@@ -115779,6 +116220,7 @@ function makeCtx(tokens2, scheme = "light", opts = {}) {
115779
116220
  emitTelemetry: opts.emitTelemetry,
115780
116221
  assetBaseUrl: opts.assetBaseUrl,
115781
116222
  runtimeDegraded: opts.runtimeDegraded,
116223
+ screenArgs: opts.screenArgs,
115782
116224
  previewSurface: opts.previewSurface,
115783
116225
  debugUnknownComponents: opts.debugUnknownComponents,
115784
116226
  appId: opts.appId,
@@ -115823,8 +116265,8 @@ function isNumericLike(s2) {
115823
116265
  return NUMERIC_TEXT.test(s2.trim());
115824
116266
  }
115825
116267
  function useValueSwap(value, enabled) {
115826
- const prev = React11.useRef(value);
115827
- const gen = React11.useRef(0);
116268
+ const prev = React12.useRef(value);
116269
+ const gen = React12.useRef(0);
115828
116270
  if (prev.current !== value) {
115829
116271
  if (enabled && prev.current !== void 0 && value !== void 0) gen.current += 1;
115830
116272
  prev.current = value;
@@ -115892,9 +116334,9 @@ function revealOnFocusStyle(C2) {
115892
116334
  };
115893
116335
  }
115894
116336
  function FormFieldLabelIdScope({ render, fieldKey, ...extras }) {
115895
- const id = React11.useId().replace(/[^A-Za-z0-9_-]/g, "");
116337
+ const id = React12.useId().replace(/[^A-Za-z0-9_-]/g, "");
115896
116338
  const el2 = render(`${fieldKey ? `${fieldKey}-` : ""}auto-${id}`);
115897
- return Object.keys(extras).length ? React11.cloneElement(el2, extras) : el2;
116339
+ return Object.keys(extras).length ? React12.cloneElement(el2, extras) : el2;
115898
116340
  }
115899
116341
  function formFieldA11y(props) {
115900
116342
  const labelledBy = props.__labelledBy;
@@ -116629,9 +117071,9 @@ function sectionSlot(raw) {
116629
117071
  }
116630
117072
  }
116631
117073
  function useLoadingTiming(target, graceMs, floorMs) {
116632
- const [shown2, setShown] = React11.useState(() => target === "loading" && graceMs > 0 ? "pending" : target);
116633
- const loadingSince = React11.useRef(shown2 === "loading" ? Date.now() : null);
116634
- React11.useEffect(() => {
117074
+ const [shown2, setShown] = React12.useState(() => target === "loading" && graceMs > 0 ? "pending" : target);
117075
+ const loadingSince = React12.useRef(shown2 === "loading" ? Date.now() : null);
117076
+ React12.useEffect(() => {
116635
117077
  if (target === shown2) return void 0;
116636
117078
  if (target === "loading") {
116637
117079
  if (graceMs <= 0) {
@@ -116670,8 +117112,8 @@ function autoGrowBox(contentHeight, lineHeight, verticalPadding, maxLines) {
116670
117112
  function PreviewMenuOverlay({ label: label3, dialogRef, preview, ctx, onClose, anchorHost, children }) {
116671
117113
  const host = anchorHost?.closest(`[${MODAL_SCOPE_ATTR}]`) ?? (typeof document !== "undefined" ? document.body : null);
116672
117114
  const reduce = ctx.reduceMotion();
116673
- const [shown2, setShown] = React11.useState(reduce);
116674
- React11.useEffect(() => {
117115
+ const [shown2, setShown] = React12.useState(reduce);
117116
+ React12.useEffect(() => {
116675
117117
  if (reduce || typeof requestAnimationFrame !== "function") {
116676
117118
  setShown(true);
116677
117119
  return;
@@ -116680,7 +117122,7 @@ function PreviewMenuOverlay({ label: label3, dialogRef, preview, ctx, onClose, a
116680
117122
  return () => cancelAnimationFrame(raf);
116681
117123
  }, [reduce]);
116682
117124
  const inScope = host != null && host !== host.ownerDocument.body;
116683
- const previewCtx = React11.useMemo(() => ctx.onAction ? { ...ctx, onAction: (a2) => {
117125
+ const previewCtx = React12.useMemo(() => ctx.onAction ? { ...ctx, onAction: (a2) => {
116684
117126
  onClose();
116685
117127
  ctx.onAction(a2);
116686
117128
  } } : ctx, [ctx, onClose]);
@@ -116747,7 +117189,7 @@ function youtubeId(item) {
116747
117189
  }
116748
117190
  }
116749
117191
  function useResolvedMediaItems(items, ctx) {
116750
- const paths = React11.useMemo(() => {
117192
+ const paths = React12.useMemo(() => {
116751
117193
  const set = /* @__PURE__ */ new Set();
116752
117194
  for (const it2 of items) {
116753
117195
  if (!it2 || typeof it2 !== "object") continue;
@@ -116759,17 +117201,17 @@ function useResolvedMediaItems(items, ctx) {
116759
117201
  return [...set];
116760
117202
  }, [items]);
116761
117203
  const key3 = paths.join("\0");
116762
- const [values, setValues] = React11.useState(() => {
117204
+ const [values, setValues] = React12.useState(() => {
116763
117205
  const seed2 = {};
116764
117206
  if (ctx.provider) for (const p2 of paths) seed2[p2] = ctx.provider.value(p2);
116765
117207
  return seed2;
116766
117208
  });
116767
- React11.useEffect(() => {
117209
+ React12.useEffect(() => {
116768
117210
  if (!ctx.provider || paths.length === 0) return;
116769
117211
  const unsubs = paths.map((p2) => ctx.provider.subscribe(p2, (v2) => setValues((prev) => prev[p2] === v2 ? prev : { ...prev, [p2]: v2 })));
116770
117212
  return () => unsubs.forEach((u2) => u2());
116771
117213
  }, [ctx.provider, key3]);
116772
- return React11.useMemo(() => items.map((it2) => {
117214
+ return React12.useMemo(() => items.map((it2) => {
116773
117215
  if (!it2 || typeof it2 !== "object") return it2;
116774
117216
  let out2 = null;
116775
117217
  for (const f2 of MEDIA_ITEM_BINDABLE) {
@@ -116796,9 +117238,24 @@ function sourceZoomPercent(fragment) {
116796
117238
  const zoom = match ? Number(match[1]) : NaN;
116797
117239
  return Number.isFinite(zoom) && zoom > 0 ? zoom : void 0;
116798
117240
  }
117241
+ function webViewChannelOf(provider) {
117242
+ const host = provider;
117243
+ return host && typeof host.webViewChannel === "function" ? host.webViewChannel() : null;
117244
+ }
117245
+ function reloadKeyOf(v2) {
117246
+ if (v2 === void 0 || v2 === null) return null;
117247
+ if (typeof v2 === "object") {
117248
+ try {
117249
+ return JSON.stringify(v2);
117250
+ } catch {
117251
+ return "?";
117252
+ }
117253
+ }
117254
+ return String(v2);
117255
+ }
116799
117256
  function cloneWithKids(el2, props, kids3) {
116800
- if (kids3 === el2.props.children) return React11.cloneElement(el2, props);
116801
- return React11.cloneElement(el2, props, ...Array.isArray(kids3) ? kids3 : [kids3]);
117257
+ if (kids3 === el2.props.children) return React12.cloneElement(el2, props);
117258
+ return React12.cloneElement(el2, props, ...Array.isArray(kids3) ? kids3 : [kids3]);
116802
117259
  }
116803
117260
  function editA11yParts(node, edit) {
116804
117261
  if (Array.isArray(node)) {
@@ -116810,7 +117267,7 @@ function editA11yParts(node, edit) {
116810
117267
  });
116811
117268
  return changed ? out2 : node;
116812
117269
  }
116813
- if (!React11.isValidElement(node) || typeof node.type !== "string") return node;
117270
+ if (!React12.isValidElement(node) || typeof node.type !== "string") return node;
116814
117271
  const own6 = node.props;
116815
117272
  if (own6["data-component-id"] != null) return node;
116816
117273
  const part3 = own6[A11Y_PART];
@@ -116854,8 +117311,8 @@ function isNativeInteractiveElement(el2) {
116854
117311
  return typeof el2.type === "string" && (["button", "input", "select", "textarea"].includes(el2.type) || el2.type === "a" && typeof props.href === "string");
116855
117312
  }
116856
117313
  function hasInteractiveReactDescendant(el2) {
116857
- return React11.Children.toArray(el2.props.children).some((child) => {
116858
- if (!React11.isValidElement(child)) return false;
117314
+ return React12.Children.toArray(el2.props.children).some((child) => {
117315
+ if (!React12.isValidElement(child)) return false;
116859
117316
  if (isNativeInteractiveElement(child)) return true;
116860
117317
  const props = child.props;
116861
117318
  if (typeof child.type === "string" && typeof props.role === "string" && INTERACTIVE_ROLES.has(props.role)) return true;
@@ -116931,8 +117388,8 @@ function trackActivatorName(activator) {
116931
117388
  activatorNameObservers.set(activator, observer);
116932
117389
  }
116933
117390
  function TapActivator({ label: label3, state, tabIndex = 0, role = "button", hint, initialFocus }) {
116934
- const ref = React11.useRef(null);
116935
- const hintId = `hm-tap-hint${React11.useId()}`;
117391
+ const ref = React12.useRef(null);
117392
+ const hintId = `hm-tap-hint${React12.useId()}`;
116936
117393
  useIsomorphicLayoutEffect(() => {
116937
117394
  const el2 = ref.current;
116938
117395
  if (!el2 || label3) return;
@@ -116971,9 +117428,9 @@ function TapActivator({ label: label3, state, tabIndex = 0, role = "button", hin
116971
117428
  function withExtras(name, render) {
116972
117429
  const Wrapped = ({ props, ctx, wrap, nodeId, gap, ...pass }) => {
116973
117430
  const el2 = render({ props, ctx, wrap, nodeId, gap, nodeExtras: pass });
116974
- if (!React11.isValidElement(el2)) return /* @__PURE__ */ jsx11(Fragment4, { children: el2 });
117431
+ if (!React12.isValidElement(el2)) return /* @__PURE__ */ jsx11(Fragment4, { children: el2 });
116975
117432
  if (el2.props[NODE_EXTRAS_TARGET] === "bottom-drawer-panel") {
116976
- return React11.cloneElement(el2, { [NODE_EXTRAS_TARGET]: void 0 });
117433
+ return React12.cloneElement(el2, { [NODE_EXTRAS_TARGET]: void 0 });
116977
117434
  }
116978
117435
  const additive = addIntrinsicPadding(el2.props.style, wrap ?? {});
116979
117436
  const inferredDecorative = el2.props[INFERRED_DECORATIVE] === true;
@@ -116993,7 +117450,7 @@ function withExtras(name, render) {
116993
117450
  }, hasA11yParts ? editA11yParts(kids3, a11yPartEdit({}, false, () => {
116994
117451
  })) : kids3));
116995
117452
  }
116996
- return withCircleClipBorder(additive ? React11.cloneElement(el2, { style: additive }) : el2);
117453
+ return withCircleClipBorder(additive ? React12.cloneElement(el2, { style: additive }) : el2);
116997
117454
  }
116998
117455
  const prev = el2.props;
116999
117456
  const next = { ...pass };
@@ -117094,7 +117551,7 @@ function withExtras(name, render) {
117094
117551
  }
117095
117552
  return withCircleClipBorder(cloneWithKids(el2, next, kids3));
117096
117553
  }
117097
- return withCircleClipBorder(React11.cloneElement(el2, next));
117554
+ return withCircleClipBorder(React12.cloneElement(el2, next));
117098
117555
  };
117099
117556
  Wrapped.displayName = name;
117100
117557
  return Wrapped;
@@ -117202,7 +117659,7 @@ function overlayEdgeStyle(edge, gap) {
117202
117659
  }
117203
117660
  function useFlippedEdge(edge, open, bubbleRef, anchorRef, gap = TOOLTIP_GAP) {
117204
117661
  const initial = { edge, x: 0, y: 0, maxWidth: Infinity };
117205
- const [placed, setPlaced] = React11.useState(initial);
117662
+ const [placed, setPlaced] = React12.useState(initial);
117206
117663
  useIsomorphicLayoutEffect(() => {
117207
117664
  if (!open) {
117208
117665
  setPlaced((previous) => previous.edge === edge && previous.x === 0 && previous.y === 0 && previous.maxWidth === Infinity ? previous : initial);
@@ -117996,7 +118453,7 @@ function renderNodeInner(node, ctx) {
117996
118453
  }
117997
118454
  }
117998
118455
  const el2 = renderInner(node, ctx);
117999
- if (!React11.isValidElement(el2)) return el2;
118456
+ if (!React12.isValidElement(el2)) return el2;
118000
118457
  const extra = {};
118001
118458
  const material = node?.modifiers?.material;
118002
118459
  const materialName = typeof material === "string" ? material : material?.token ?? material?.name;
@@ -118159,10 +118616,10 @@ function renderNodeInner(node, ctx) {
118159
118616
  }
118160
118617
  {
118161
118618
  const mods = node?.modifiers;
118162
- const bound = mods ? boundPaddingInsets(mods, ctx) : {};
118163
- if (mods?.padding != null || bound.paddingTop != null || bound.paddingBottom != null) {
118619
+ const bound2 = mods ? boundPaddingInsets(mods, ctx) : {};
118620
+ if (mods?.padding != null || bound2.paddingTop != null || bound2.paddingBottom != null) {
118164
118621
  const style = extra.style ?? el2.props.style;
118165
- const modPad = { ...ctx.modStyle({ padding: mods?.padding, density: mods?.density }), ...bound };
118622
+ const modPad = { ...ctx.modStyle({ padding: mods?.padding, density: mods?.density }), ...bound2 };
118166
118623
  const composed2 = addIntrinsicPadding(style, modPad);
118167
118624
  if (composed2) extra.style = composed2;
118168
118625
  }
@@ -118175,8 +118632,8 @@ function renderNodeInner(node, ctx) {
118175
118632
  const finalStyle = extra.style ?? el2.props.style;
118176
118633
  if (!finalStyle?.position) extra.style = { ...finalStyle ?? {}, position: "relative" };
118177
118634
  }
118178
- let out2 = tapActivator ? React11.cloneElement(el2, extra, tapActivator, el2.props.children) : Object.keys(extra).length ? React11.cloneElement(el2, extra) : el2;
118179
- if (React11.isValidElement(out2)) out2 = withCircleClipBorder(out2);
118635
+ let out2 = tapActivator ? React12.cloneElement(el2, extra, tapActivator, el2.props.children) : Object.keys(extra).length ? React12.cloneElement(el2, extra) : el2;
118636
+ if (React12.isValidElement(out2)) out2 = withCircleClipBorder(out2);
118180
118637
  if (a11yHint && !tapActivator) {
118181
118638
  out2 = /* @__PURE__ */ jsx11(A11yHintDescription, { hint: a11yHint, idBase: componentId, children: out2 });
118182
118639
  }
@@ -118393,10 +118850,10 @@ function renderInner(node, ctx) {
118393
118850
  template: items[0],
118394
118851
  renderRow: (t2, ic) => {
118395
118852
  let row = renderNode(t2, asItem(ic));
118396
- if (boundStagger > 0 && React11.isValidElement(row)) {
118853
+ if (boundStagger > 0 && React12.isValidElement(row)) {
118397
118854
  const i2 = Number(ic.itemScope?.__index ?? 0);
118398
118855
  const prev = row.props.style ?? {};
118399
- row = React11.cloneElement(row, { style: { ...prev, animationDelay: `${i2 * boundStagger}ms` } });
118856
+ row = React12.cloneElement(row, { style: { ...prev, animationDelay: `${i2 * boundStagger}ms` } });
118400
118857
  }
118401
118858
  if (boundSwipe && ctx.onAction && !props.horizontal) {
118402
118859
  const leading = resolveSwipeActions(boundSwipe.leading, ic);
@@ -118456,7 +118913,7 @@ function renderInner(node, ctx) {
118456
118913
  if (swipe && ctx.onAction && !props.horizontal) {
118457
118914
  const leading = swipe.leading ?? [];
118458
118915
  const trailing = swipe.trailing ?? [];
118459
- const arr2 = React11.Children.toArray(rendered);
118916
+ const arr2 = React12.Children.toArray(rendered);
118460
118917
  body = arr2.map((child, i2) => /* @__PURE__ */ jsx11(
118461
118918
  SwipeRow,
118462
118919
  {
@@ -118514,8 +118971,8 @@ function renderInner(node, ctx) {
118514
118971
  const card2 = ctx.elevation("card");
118515
118972
  const elevation = card2 && ownSurface ? { border: card2.border } : card2;
118516
118973
  const wrapShadow = wrap.boxShadow;
118517
- const explicit = m2?.shadow != null || m2?.boxShadow != null || m2?.box_shadow != null;
118518
- const elevationShadow = !elevation ? wrapShadow : explicit ? elevationBoxShadow({ border: elevation.border, shadow: wrapShadow }) : [elevationBoxShadow(elevation), wrapShadow].filter(Boolean).join(", ") || void 0;
118974
+ const explicit2 = m2?.shadow != null || m2?.boxShadow != null || m2?.box_shadow != null;
118975
+ const elevationShadow = !elevation ? wrapShadow : explicit2 ? elevationBoxShadow({ border: elevation.border, shadow: wrapShadow }) : [elevationBoxShadow(elevation), wrapShadow].filter(Boolean).join(", ") || void 0;
118519
118976
  return /* @__PURE__ */ jsx11("div", { style: { display: "flex", flexDirection: "column", gap: props.spacing == null ? 8 : ctx.sp(props.spacing), padding: props.padding == null ? 12 : ctx.sp(props.padding), background: elevation?.tint ? mixColor(fill, elevation.tint.color, elevation.tint.alpha) : fill, borderRadius: ctx.radius(props.cornerRadius ?? "md", 10), overflow: "hidden", alignSelf: "stretch", ...props.alignment ? { alignItems: props.alignment === "center" ? "center" : props.alignment === "trailing" ? "flex-end" : "flex-start" } : {}, ...wrap, ...elevationShadow ? { boxShadow: elevationShadow } : {} }, children: kids2(props.children, ctx) });
118520
118977
  }
118521
118978
  case "SplitView":
@@ -118945,7 +119402,7 @@ function renderInner(node, ctx) {
118945
119402
  ] });
118946
119403
  // ───────────── embeddable WebView ─────────────
118947
119404
  case "WebView":
118948
- return /* @__PURE__ */ jsx11(WebViewNode, { props, ctx, wrap });
119405
+ return /* @__PURE__ */ jsx11(WebViewNode, { props, ctx, wrap, nodeId: resolvedComponentId(node.id, ctx) ?? "" });
118949
119406
  // ───────────── app intents + unknown ─────────────
118950
119407
  default: {
118951
119408
  const intent = pkg ? ctx.intents?.[`${pkg}.${type}`] : void 0;
@@ -118967,7 +119424,7 @@ function reportUnknownComponent(ctx, pkg, type) {
118967
119424
  function unknownComponentShowsDeveloperLabel(ctx) {
118968
119425
  return ctx.debugUnknownComponents ?? ctx.previewSurface != null;
118969
119426
  }
118970
- var rowValue, loadPdfFetch, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
119427
+ var rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
118971
119428
  var init_renderNode = __esm({
118972
119429
  "../../core/web-renderer/src/renderNode.tsx"() {
118973
119430
  "use strict";
@@ -119016,11 +119473,12 @@ var init_renderNode = __esm({
119016
119473
  init_richContent();
119017
119474
  rowValue = (v2, ctx) => typeof v2 === "string" && v2.startsWith("$item") ? resolveScalarStatic(v2, ctx) : v2;
119018
119475
  loadPdfFetch = () => Promise.resolve().then(() => (init_pdfFetch(), pdfFetch_exports));
119019
- useIsomorphicLayoutEffect = typeof globalThis.document === "undefined" ? React11.useEffect : React11.useLayoutEffect;
119476
+ WebViewBridgeHost2 = React12.lazy(() => Promise.resolve().then(() => (init_webviewBridgeHost(), webviewBridgeHost_exports)));
119477
+ useIsomorphicLayoutEffect = typeof globalThis.document === "undefined" ? React12.useEffect : React12.useLayoutEffect;
119020
119478
  ResponsiveGrid = ({ base, medium, expanded, initialCols, seedWidth, spacing, extra, children }) => {
119021
- const [el2, setEl] = React11.useState(null);
119022
- const [cols, setCols] = React11.useState(initialCols);
119023
- React11.useEffect(() => {
119479
+ const [el2, setEl] = React12.useState(null);
119480
+ const [cols, setCols] = React12.useState(initialCols);
119481
+ React12.useEffect(() => {
119024
119482
  if (!el2) return;
119025
119483
  const measure2 = () => {
119026
119484
  const w2 = seededWidth(el2.clientWidth, seedWidth);
@@ -119046,9 +119504,9 @@ var init_renderNode = __esm({
119046
119504
  SPLIT_EXPANDED_MIN_WIDTH = 840;
119047
119505
  SPLIT_COLUMN_GAP = 16;
119048
119506
  ResponsiveSplitView = ({ primary, detail, primaryMaxWidth, initialWide, seedWidth, extra }) => {
119049
- const ref = React11.useRef(null);
119050
- const [wide, setWide] = React11.useState(initialWide);
119051
- React11.useEffect(() => {
119507
+ const ref = React12.useRef(null);
119508
+ const [wide, setWide] = React12.useState(initialWide);
119509
+ React12.useEffect(() => {
119052
119510
  const el2 = ref.current;
119053
119511
  if (!el2) return;
119054
119512
  const measure2 = () => {
@@ -119094,9 +119552,9 @@ var init_renderNode = __esm({
119094
119552
  revealRuntimeInjected = false;
119095
119553
  AMBIENT_HOST_STYLE = { display: "contents" };
119096
119554
  AmbientMotionBox = ({ spec, kind, children }) => {
119097
- const ref = React11.useRef(null);
119555
+ const ref = React12.useRef(null);
119098
119556
  const { minGapMs, maxGapMs } = spec;
119099
- React11.useEffect(() => {
119557
+ React12.useEffect(() => {
119100
119558
  const el2 = ref.current?.firstElementChild;
119101
119559
  if (!el2 || typeof el2.animate !== "function") return;
119102
119560
  let timer;
@@ -119180,14 +119638,14 @@ var init_renderNode = __esm({
119180
119638
  }
119181
119639
  };
119182
119640
  bodyFont = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
119183
- kids2 = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React11.Fragment, { children: renderNode(n2, ctx) }, n2?.id ?? i2)) : null;
119641
+ kids2 = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React12.Fragment, { children: renderNode(n2, ctx) }, n2?.id ?? i2)) : null;
119184
119642
  rowKidCtx = (n2, ctx) => wantsRowStretch(n2) ? { ...ctx, rowStretch: true } : normalize(n2).type === "Divider" ? { ...ctx, rowDivider: true } : ctx;
119185
- rowKids = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React11.Fragment, { children: renderNode(n2, rowKidCtx(n2, ctx)) }, n2?.id ?? i2)) : null;
119643
+ rowKids = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React12.Fragment, { children: renderNode(n2, rowKidCtx(n2, ctx)) }, n2?.id ?? i2)) : null;
119186
119644
  staggeredKids = (arr2, ctx, staggerMs) => Array.isArray(arr2) ? arr2.map((n2, i2) => {
119187
119645
  const el2 = renderNode(n2, ctx);
119188
- if (!React11.isValidElement(el2)) return /* @__PURE__ */ jsx11(React11.Fragment, { children: el2 }, n2?.id ?? i2);
119646
+ if (!React12.isValidElement(el2)) return /* @__PURE__ */ jsx11(React12.Fragment, { children: el2 }, n2?.id ?? i2);
119189
119647
  const prev = el2.props.style ?? {};
119190
- return React11.cloneElement(el2, { key: n2?.id ?? i2, style: { ...prev, animationDelay: `${i2 * staggerMs}ms` } });
119648
+ return React12.cloneElement(el2, { key: n2?.id ?? i2, style: { ...prev, animationDelay: `${i2 * staggerMs}ms` } });
119191
119649
  }) : null;
119192
119650
  asTextL10n = (v2, ctx) => typeof v2 === "string" && v2.startsWith(TRANSLATION_PREFIX) ? asText2(resolveTranslation(v2, ctx.catalog)) : asText2(v2);
119193
119651
  asFinalTextL10n = (v2, ctx) => typeof v2 === "string" ? v2.startsWith(TRANSLATION_PREFIX) ? asText2(resolveTranslation(v2, ctx.catalog)) : v2 : asText2(v2);
@@ -119197,19 +119655,19 @@ var init_renderNode = __esm({
119197
119655
  return isBinding(v2) ? asTextL10n(resolved2 ?? "", ctx) : asText2(v2);
119198
119656
  };
119199
119657
  InterpolatedTextView = ({ pattern, params, ctx }) => {
119200
- const bound = Object.entries(params).filter(
119658
+ const bound2 = Object.entries(params).filter(
119201
119659
  ([, v2]) => typeof v2 === "string" && v2.startsWith("$service:")
119202
119660
  );
119203
- const [live3, setLive] = React11.useState(() => {
119661
+ const [live3, setLive] = React12.useState(() => {
119204
119662
  const seed2 = {};
119205
- if (ctx.provider) for (const [k2, p2] of bound) seed2[k2] = ctx.provider.value(servicePath(p2));
119663
+ if (ctx.provider) for (const [k2, p2] of bound2) seed2[k2] = ctx.provider.value(servicePath(p2));
119206
119664
  return seed2;
119207
119665
  });
119208
- const subKey = bound.map(([k2, p2]) => `${k2}=${p2}`).join("|");
119209
- React11.useEffect(() => {
119666
+ const subKey = bound2.map(([k2, p2]) => `${k2}=${p2}`).join("|");
119667
+ React12.useEffect(() => {
119210
119668
  const provider = ctx.provider;
119211
119669
  if (!provider) return;
119212
- const unsubs = bound.map(
119670
+ const unsubs = bound2.map(
119213
119671
  ([k2, p2]) => provider.subscribe(servicePath(p2), (v2) => setLive((prev) => prev[k2] === v2 ? prev : { ...prev, [k2]: v2 }))
119214
119672
  );
119215
119673
  return () => unsubs.forEach((u2) => u2());
@@ -119248,11 +119706,11 @@ var init_renderNode = __esm({
119248
119706
  fragmentSlotContent = ({ props, ctx, discriminator, slotId, extra }) => {
119249
119707
  const selected = selectFragmentCase(props, discriminator);
119250
119708
  const selectedId = typeof selected?.id === "string" ? selected.id : "";
119251
- const previousId = React11.useRef(selectedId);
119252
- const reportedUnknown = React11.useRef(/* @__PURE__ */ new Set());
119253
- const reportedInvalid = React11.useRef(/* @__PURE__ */ new Set());
119254
- const [announcement, setAnnouncement] = React11.useState("");
119255
- React11.useEffect(() => {
119709
+ const previousId = React12.useRef(selectedId);
119710
+ const reportedUnknown = React12.useRef(/* @__PURE__ */ new Set());
119711
+ const reportedInvalid = React12.useRef(/* @__PURE__ */ new Set());
119712
+ const [announcement, setAnnouncement] = React12.useState("");
119713
+ React12.useEffect(() => {
119256
119714
  if (typeof discriminator === "string") {
119257
119715
  if (discriminator && !props.cases?.some((candidate) => candidate.id === discriminator) && !reportedUnknown.current.has(discriminator)) {
119258
119716
  reportedUnknown.current.add(discriminator);
@@ -119266,7 +119724,7 @@ var init_renderNode = __esm({
119266
119724
  }
119267
119725
  }
119268
119726
  }, [ctx, discriminator, props.cases, slotId]);
119269
- React11.useEffect(() => {
119727
+ React12.useEffect(() => {
119270
119728
  if (previousId.current !== selectedId) {
119271
119729
  const next = selected?.accessibilityAnnouncement ?? selected?.accessibility_announcement;
119272
119730
  setAnnouncement(typeof next === "string" ? next : "");
@@ -119280,7 +119738,7 @@ var init_renderNode = __esm({
119280
119738
  // and the right edge clips (branded-lite's home is a FragmentSlot → 32px cut in
119281
119739
  // the phone preview). Included before ...extra so a modifier can still override.
119282
119740
  /* @__PURE__ */ jsxs8("div", { "data-fragment-slot": slotId ?? "", "data-fragment-case": selectedId, style: { width: "100%", boxSizing: "border-box", ...extra }, children: [
119283
- selected?.content ? /* @__PURE__ */ jsx11(React11.Fragment, { children: renderNode(selected.content, ctx) }, selectedId) : null,
119741
+ selected?.content ? /* @__PURE__ */ jsx11(React12.Fragment, { children: renderNode(selected.content, ctx) }, selectedId) : null,
119284
119742
  /* @__PURE__ */ jsx11("span", { "aria-live": "polite", style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", border: 0 }, children: announcement })
119285
119743
  ] })
119286
119744
  );
@@ -119288,24 +119746,24 @@ var init_renderNode = __esm({
119288
119746
  FragmentSlotNode = withExtras("FragmentSlotNode", ({ props, ctx, wrap, nodeId }) => {
119289
119747
  const casePath = props.casePath ?? props.case_path;
119290
119748
  const isService = typeof casePath === "string" && casePath.startsWith("$service:");
119291
- const bound = useBoundValue(ctx, isService ? casePath : "");
119292
- const discriminator = isService ? bound : isEnvExpr(casePath) ? evalEnvExpr(casePath, ctxEnv(ctx)) : resolveScalarStatic(casePath, ctx);
119749
+ const bound2 = useBoundValue(ctx, isService ? casePath : "");
119750
+ const discriminator = isService ? bound2 : isEnvExpr(casePath) ? evalEnvExpr(casePath, ctxEnv(ctx)) : resolveScalarStatic(casePath, ctx);
119293
119751
  return fragmentSlotContent({ props, ctx, discriminator, slotId: nodeId, extra: wrap });
119294
119752
  });
119295
119753
  RichContentEditorNode = withExtras("RichContentEditorNode", ({ props, ctx, wrap, nodeId }) => /* @__PURE__ */ jsx11(RichContentEditorView, { props, ctx, wrap, nodeId, renderChild: (n2) => renderNode(n2, ctx) }));
119296
119754
  MediaFieldNode = withExtras("MediaFieldNode", ({ props, ctx, wrap }) => {
119297
119755
  const C2 = ctx.color;
119298
119756
  const servicePathStr = mediaFieldServicePath(props.valuePath);
119299
- const bound = useBoundValue(ctx, servicePathStr ? String(props.valuePath) : "");
119300
- const imageUrl = typeof bound === "string" ? bound : "";
119757
+ const bound2 = useBoundValue(ctx, servicePathStr ? String(props.valuePath) : "");
119758
+ const imageUrl = typeof bound2 === "string" ? bound2 : "";
119301
119759
  const fallbackPathStr = mediaFieldServicePath(props.fallbackTextPath);
119302
119760
  const fallbackBound = useBoundValue(ctx, fallbackPathStr ? String(props.fallbackTextPath) : "");
119303
119761
  const fallbackText = typeof fallbackBound === "string" ? fallbackBound : "";
119304
- const [uploading, setUploading] = React11.useState(false);
119305
- const [failed3, setFailed] = React11.useState(false);
119306
- const fileRef = React11.useRef(null);
119307
- const previewRef = React11.useRef(null);
119308
- const [localPreview, setLocalPreview] = React11.useState("");
119762
+ const [uploading, setUploading] = React12.useState(false);
119763
+ const [failed3, setFailed] = React12.useState(false);
119764
+ const fileRef = React12.useRef(null);
119765
+ const previewRef = React12.useRef(null);
119766
+ const [localPreview, setLocalPreview] = React12.useState("");
119309
119767
  const uploadService = typeof props.uploadService === "string" ? props.uploadService : "";
119310
119768
  const resolvedLabel = asText2(resolveScalarStatic(props.label, ctx));
119311
119769
  const name = mediaFieldName(resolvedLabel);
@@ -119350,7 +119808,7 @@ var init_renderNode = __esm({
119350
119808
  setUploading(false);
119351
119809
  }
119352
119810
  };
119353
- React11.useEffect(() => () => {
119811
+ React12.useEffect(() => () => {
119354
119812
  const previewUrl = previewRef.current;
119355
119813
  if (previewUrl && typeof URL.revokeObjectURL === "function") URL.revokeObjectURL(previewUrl);
119356
119814
  previewRef.current = null;
@@ -119422,7 +119880,7 @@ var init_renderNode = __esm({
119422
119880
  const value = useBoundValue(ctx, typeof path2 === "string" ? path2 : "");
119423
119881
  const policy = props.policy;
119424
119882
  const catalog3 = ctx.provider && typeof ctx.provider.listActions === "function" ? ctx.provider : null;
119425
- const validation = React11.useMemo(() => {
119883
+ const validation = React12.useMemo(() => {
119426
119884
  if (value === void 0 || value === null) return { ok: false, reason: "unresolved" };
119427
119885
  if (typeof value !== "string") return { ok: false, reason: "value_type" };
119428
119886
  if (!policy || typeof policy !== "object") return { ok: false, reason: "typed_decode" };
@@ -119432,8 +119890,8 @@ var init_renderNode = __esm({
119432
119890
  return { ok: false, reason: "typed_decode" };
119433
119891
  }
119434
119892
  }, [catalog3, policy, slotId, value]);
119435
- const reported = React11.useRef(/* @__PURE__ */ new Set());
119436
- React11.useEffect(() => {
119893
+ const reported = React12.useRef(/* @__PURE__ */ new Set());
119894
+ React12.useEffect(() => {
119437
119895
  const key3 = validation.ok ? `ok:${validation.treeHash}` : `bad:${validation.treeHash ?? validation.reason}`;
119438
119896
  if (reported.current.has(key3)) return;
119439
119897
  reported.current.add(key3);
@@ -119460,12 +119918,12 @@ var init_renderNode = __esm({
119460
119918
  const componentId = nodeId ?? "";
119461
119919
  const path2 = props.documentJsonPath ?? props.document_json_path;
119462
119920
  const hasPath = typeof path2 === "string" && path2 !== "";
119463
- const bound = useResolvedScalar(hasPath ? path2 : void 0, ctx);
119464
- const raw = hasPath ? bound : props.documentJson ?? props.document_json;
119465
- const result = React11.useMemo(() => layoutRichContentValue(raw), [raw]);
119921
+ const bound2 = useResolvedScalar(hasPath ? path2 : void 0, ctx);
119922
+ const raw = hasPath ? bound2 : props.documentJson ?? props.document_json;
119923
+ const result = React12.useMemo(() => layoutRichContentValue(raw), [raw]);
119466
119924
  const reason = result && "rejected" in result ? result.rejected : void 0;
119467
- const reported = React11.useRef(/* @__PURE__ */ new Set());
119468
- React11.useEffect(() => {
119925
+ const reported = React12.useRef(/* @__PURE__ */ new Set());
119926
+ React12.useEffect(() => {
119469
119927
  if (!reason) return;
119470
119928
  const key3 = typeof raw === "string" ? `${reason}:${raw.length}:${richContentDocumentHash(raw)}` : `${reason}:non-string`;
119471
119929
  if (reported.current.has(key3)) return;
@@ -119559,17 +120017,17 @@ var init_renderNode = __esm({
119559
120017
  };
119560
120018
  withRootStyle = (content, style) => {
119561
120019
  if (Array.isArray(content)) return content.map((child) => withRootStyle(child, style));
119562
- if (!React11.isValidElement(content)) return content;
119563
- if (content.type === React11.Fragment) {
119564
- return React11.cloneElement(content, {}, React11.Children.map(content.props.children, (child) => withRootStyle(child, style)));
120020
+ if (!React12.isValidElement(content)) return content;
120021
+ if (content.type === React12.Fragment) {
120022
+ return React12.cloneElement(content, {}, React12.Children.map(content.props.children, (child) => withRootStyle(child, style)));
119565
120023
  }
119566
120024
  const element = content;
119567
- return React11.cloneElement(element, { style: { ...element.props.style, ...style } });
120025
+ return React12.cloneElement(element, { style: { ...element.props.style, ...style } });
119568
120026
  };
119569
120027
  ReactiveDirectScalars = ({ node, ctx, bindings, style }) => {
119570
- const [, rerender] = React11.useState(0);
120028
+ const [, rerender] = React12.useState(0);
119571
120029
  const bindingKey = bindings.join("|");
119572
- React11.useEffect(() => {
120030
+ React12.useEffect(() => {
119573
120031
  if (!ctx.provider) return;
119574
120032
  const unsubs = bindings.map((binding2) => ctx.provider.subscribe(servicePath(binding2), () => rerender((n2) => n2 + 1)));
119575
120033
  return () => unsubs.forEach((unsubscribe) => unsubscribe());
@@ -119582,14 +120040,14 @@ var init_renderNode = __esm({
119582
120040
  return /* @__PURE__ */ jsx11(ExitPresence, { hidden: hiddenBool(v2), exit: exit ?? null, children });
119583
120041
  };
119584
120042
  ExitPresence = ({ hidden, exit, children }) => {
119585
- const [prevHidden, setPrevHidden] = React11.useState(hidden);
119586
- const [exiting, setExiting] = React11.useState(false);
120043
+ const [prevHidden, setPrevHidden] = React12.useState(hidden);
120044
+ const [exiting, setExiting] = React12.useState(false);
119587
120045
  if (hidden !== prevHidden) {
119588
120046
  setPrevHidden(hidden);
119589
120047
  setExiting(hidden && exit != null);
119590
120048
  }
119591
- const ref = React11.useRef(null);
119592
- const exitRef = React11.useRef(exit);
120049
+ const ref = React12.useRef(null);
120050
+ const exitRef = React12.useRef(exit);
119593
120051
  exitRef.current = exit;
119594
120052
  useIsomorphicLayoutEffect(() => {
119595
120053
  if (!exiting) return void 0;
@@ -119617,13 +120075,13 @@ var init_renderNode = __esm({
119617
120075
  const C2 = ctx.color;
119618
120076
  const raw = props.state;
119619
120077
  const isBound = typeof raw === "string" && raw.startsWith("$service:");
119620
- const bound = useResolvedScalar(isBound ? raw : void 0, ctx);
120078
+ const bound2 = useResolvedScalar(isBound ? raw : void 0, ctx);
119621
120079
  const legacy = isNodeLike(props.data) ? "data" : isNodeLike(props.loading) ? "loading" : props.state === "error" ? "error" : "empty";
119622
- const target = raw == null || raw === "" || isBound && !ctx.provider ? legacy : sectionSlot(isBound ? bound : raw);
120080
+ const target = raw == null || raw === "" || isBound && !ctx.provider ? legacy : sectionSlot(isBound ? bound2 : raw);
119623
120081
  const { graceMs, floorMs } = loadingTiming(ctx.kit, props.loadingGraceMs ?? props.loading_grace_ms, props.loadingFloorMs ?? props.loading_floor_ms);
119624
120082
  const shown2 = useLoadingTiming(target, graceMs, floorMs);
119625
- const changed = React11.useRef(false);
119626
- const first = React11.useRef(shown2);
120083
+ const changed = React12.useRef(false);
120084
+ const first = React12.useRef(shown2);
119627
120085
  if (shown2 !== first.current) changed.current = true;
119628
120086
  const renderCfg = (cfg) => cfg && typeof cfg === "object" ? /* @__PURE__ */ jsxs8("div", { style: { textAlign: "center", padding: "24px 12px", color: C2("textSecondary", "#9aa2ad") }, children: [
119629
120087
  cfg.title && /* @__PURE__ */ jsx11("div", { style: { fontSize: pxToRem(15), fontWeight: 600, color: C2("textPrimary", "#111") }, children: asText2(cfg.title) }),
@@ -119655,8 +120113,8 @@ var init_renderNode = __esm({
119655
120113
  }
119656
120114
  const animate = motionDefaultsAnimate(ctx);
119657
120115
  const fadeMs = motionDefaultsDuration(ctx.kit, 220);
119658
- const lastShown = React11.useRef(null);
119659
- const [outgoing, setOutgoing] = React11.useState(null);
120116
+ const lastShown = React12.useRef(null);
120117
+ const [outgoing, setOutgoing] = React12.useState(null);
119660
120118
  useIsomorphicLayoutEffect(() => {
119661
120119
  const was = lastShown.current;
119662
120120
  if (!animate || !was || was.slot === shown2 || was.node == null) return void 0;
@@ -119664,7 +120122,7 @@ var init_renderNode = __esm({
119664
120122
  const t2 = setTimeout(() => setOutgoing(null), fadeMs);
119665
120123
  return () => clearTimeout(t2);
119666
120124
  }, [shown2]);
119667
- React11.useEffect(() => {
120125
+ React12.useEffect(() => {
119668
120126
  lastShown.current = { slot: shown2, node: content };
119669
120127
  });
119670
120128
  if (changed.current && animate) {
@@ -119700,7 +120158,7 @@ var init_renderNode = __esm({
119700
120158
  const onChangeAction = resolveRowAction2(props.onChange ?? cfg.onChange, ctx);
119701
120159
  const borderless = props.borderless === true || cfg.borderless === true;
119702
120160
  const secure = props.secure === true || cfg.secure === true;
119703
- const [valueVisible, setValueVisible] = React11.useState(false);
120161
+ const [valueVisible, setValueVisible] = React12.useState(false);
119704
120162
  const visibilityToggle = secure && (props.visibilityToggle === true || cfg.visibilityToggle === true);
119705
120163
  const visibilityLabel = ctx.catalog?.get(valueVisible ? "auth.gate.password.hide" : "auth.gate.password.show") ?? (valueVisible ? "Hide password" : "Show password");
119706
120164
  const erroredProp = props.error === true || cfg.error === true;
@@ -119714,20 +120172,20 @@ var init_renderNode = __esm({
119714
120172
  const boundRawText = typeof boundVal === "string" ? boundVal : typeof boundVal === "number" ? String(boundVal) : void 0;
119715
120173
  const boundText = serializeRichText && boundRawText !== void 0 ? richTextHtmlToPlainText(boundRawText) : boundRawText;
119716
120174
  const literalText = typeof valueBinding === "string" ? serializeRichText ? richTextHtmlToPlainText(valueBinding) : valueBinding : "";
119717
- const [local, setLocal] = React11.useState(
120175
+ const [local, setLocal] = React12.useState(
119718
120176
  isBound ? boundText ?? "" : literalText
119719
120177
  );
119720
- const [edited, setEdited] = React11.useState(false);
119721
- const [pristineRichValue, setPristineRichValue] = React11.useState(
120178
+ const [edited, setEdited] = React12.useState(false);
120179
+ const [pristineRichValue, setPristineRichValue] = React12.useState(
119722
120180
  serializeRichText ? isBound ? boundRawText : typeof valueBinding === "string" ? valueBinding : void 0 : void 0
119723
120181
  );
119724
- const focused = React11.useRef(false);
119725
- const [touched, setTouched] = React11.useState(false);
119726
- const [isFocused, setIsFocused] = React11.useState(false);
119727
- const pendingEdits = React11.useRef([]);
119728
- const previousBoundText = React11.useRef(boundText);
119729
- const previousBoundRawText = React11.useRef(boundRawText);
119730
- React11.useEffect(() => {
120182
+ const focused = React12.useRef(false);
120183
+ const [touched, setTouched] = React12.useState(false);
120184
+ const [isFocused, setIsFocused] = React12.useState(false);
120185
+ const pendingEdits = React12.useRef([]);
120186
+ const previousBoundText = React12.useRef(boundText);
120187
+ const previousBoundRawText = React12.useRef(boundRawText);
120188
+ React12.useEffect(() => {
119731
120189
  if (!isBound || boundText === void 0) return;
119732
120190
  const boundTextChanged = previousBoundText.current !== boundText;
119733
120191
  const boundRawTextChanged = previousBoundRawText.current !== boundRawText;
@@ -119758,23 +120216,23 @@ var init_renderNode = __esm({
119758
120216
  }
119759
120217
  if (!focused.current && boundText !== local) setLocal(boundText);
119760
120218
  }, [boundText, serializeRichText ? boundRawText : void 0, isFocused, serializeRichText ? edited : false]);
119761
- const formBag = React11.useContext(FormValuesContext);
120219
+ const formBag = React12.useContext(FormValuesContext);
119762
120220
  const fieldId = props.__formFieldId;
119763
- const previousBinding = React11.useRef(binding2);
120221
+ const previousBinding = React12.useRef(binding2);
119764
120222
  const rule = props.validation ?? cfg.validation;
119765
120223
  const { "aria-labelledby": labelledBy } = formFieldA11y(props);
119766
120224
  const required3 = rule?.required === true || void 0;
119767
- const ruleKey = React11.useMemo(() => rule ? JSON.stringify(rule) : "", [rule]);
119768
- React11.useEffect(() => {
120225
+ const ruleKey = React12.useMemo(() => rule ? JSON.stringify(rule) : "", [rule]);
120226
+ React12.useEffect(() => {
119769
120227
  if (!formBag || !fieldId) return;
119770
120228
  formBag.register(fieldId, rule);
119771
120229
  return () => formBag.unregister(fieldId);
119772
120230
  }, [fieldId, formBag, ruleKey]);
119773
120231
  const formValue = serializeRichText && !edited && pristineRichValue !== void 0 ? pristineRichValue : serializeRichText ? richTextEditedHtml(pristineRichValue, pristineRichValue === void 0 ? "" : richTextHtmlToPlainText(pristineRichValue), local) : local;
119774
- React11.useEffect(() => {
120232
+ React12.useEffect(() => {
119775
120233
  if (formBag && fieldId) formBag.set(fieldId, formValue);
119776
120234
  }, [formValue, fieldId, formBag, binding2]);
119777
- React11.useEffect(() => {
120235
+ React12.useEffect(() => {
119778
120236
  if (previousBinding.current === binding2) return;
119779
120237
  previousBinding.current = binding2;
119780
120238
  pendingEdits.current = [];
@@ -119793,7 +120251,7 @@ var init_renderNode = __esm({
119793
120251
  const errorTextRaw = props.errorText ?? cfg.errorText;
119794
120252
  const errorTextResolved = useBoundString(errorTextRaw, ctx);
119795
120253
  const workerError = typeof boundError === "string" ? boundError : errorTextRaw == null ? void 0 : errorTextResolved;
119796
- const validationCatalog = React11.useMemo(
120254
+ const validationCatalog = React12.useMemo(
119797
120255
  () => ctx.catalog ? new Proxy({}, { get: (_t2, k2) => typeof k2 === "string" ? ctx.catalog.get(k2) : void 0 }) : void 0,
119798
120256
  [ctx.catalog]
119799
120257
  );
@@ -119808,7 +120266,7 @@ var init_renderNode = __esm({
119808
120266
  const hasWorkerError = Boolean(workerError && workerError.trim());
119809
120267
  const painted2 = rawMessage === null ? "" : translateOnly(rawMessage);
119810
120268
  const message = !painted2.trim() || ruleMessagePending && !hasWorkerError ? null : painted2;
119811
- const [feedbackShown, setFeedbackShown] = React11.useState(false);
120269
+ const [feedbackShown, setFeedbackShown] = React12.useState(false);
119812
120270
  const revealed = message !== null && shouldRevealError({
119813
120271
  rule,
119814
120272
  feedbackShown,
@@ -119817,11 +120275,11 @@ var init_renderNode = __esm({
119817
120275
  focused: isFocused,
119818
120276
  submitAttempted: formBag?.submitAttempted ?? false
119819
120277
  });
119820
- React11.useEffect(() => {
120278
+ React12.useEffect(() => {
119821
120279
  if (revealed) setFeedbackShown(true);
119822
120280
  }, [revealed]);
119823
120281
  const errored = erroredProp || revealed;
119824
- const generatedId = React11.useId();
120282
+ const generatedId = React12.useId();
119825
120283
  const errorId = revealed ? `${componentId ?? generatedId}__error` : void 0;
119826
120284
  const emit = (v2) => {
119827
120285
  if (onChangeAction && ctx.onAction) {
@@ -119833,16 +120291,16 @@ var init_renderNode = __esm({
119833
120291
  });
119834
120292
  }
119835
120293
  };
119836
- const ownsPrivateDraft = React11.useRef(false);
119837
- React11.useEffect(() => {
120294
+ const ownsPrivateDraft = React12.useRef(false);
120295
+ React12.useEffect(() => {
119838
120296
  if (visibilityToggle && !isBound) ownsPrivateDraft.current = true;
119839
120297
  }, [visibilityToggle, isBound]);
119840
- const clearSensitiveDraft = React11.useRef(() => {
120298
+ const clearSensitiveDraft = React12.useRef(() => {
119841
120299
  });
119842
120300
  clearSensitiveDraft.current = () => {
119843
120301
  if (ownsPrivateDraft.current && !isBound) emit("");
119844
120302
  };
119845
- React11.useEffect(() => () => clearSensitiveDraft.current(), []);
120303
+ React12.useEffect(() => () => clearSensitiveDraft.current(), []);
119846
120304
  const onInput = (e2) => {
119847
120305
  const v2 = e2.currentTarget.value;
119848
120306
  setLocal(v2);
@@ -119874,7 +120332,7 @@ var init_renderNode = __esm({
119874
120332
  const submitLabelRaw = props.submitLabel ?? cfg.submitLabel;
119875
120333
  const onSubmitAction = props.onSubmit ?? cfg.onSubmit;
119876
120334
  const enterKeyHint = !multilineBox && ENTER_KEY_HINTS.has(submitLabelRaw) ? submitLabelRaw : !multilineBox && onSubmitAction ? "done" : void 0;
119877
- const inputRef = React11.useRef(null);
120335
+ const inputRef = React12.useRef(null);
119878
120336
  useIsomorphicLayoutEffect(() => {
119879
120337
  const el2 = inputRef.current;
119880
120338
  const view = el2?.ownerDocument?.defaultView;
@@ -119889,8 +120347,8 @@ var init_renderNode = __esm({
119889
120347
  }, [local, multilineBox, maxLines]);
119890
120348
  const focusBinding = (typeof props.focusPath === "string" ? props.focusPath : typeof cfg.focusPath === "string" ? cfg.focusPath : void 0) ?? "";
119891
120349
  const focusTokenVal = useBoundValue(ctx, focusBinding);
119892
- const lastFocusToken = React11.useRef(void 0);
119893
- React11.useEffect(() => {
120350
+ const lastFocusToken = React12.useRef(void 0);
120351
+ React12.useEffect(() => {
119894
120352
  if (!focusBinding) return;
119895
120353
  const next = typeof focusTokenVal === "string" ? focusTokenVal : typeof focusTokenVal === "number" ? String(focusTokenVal) : "";
119896
120354
  if (!next || next === lastFocusToken.current) return;
@@ -119965,8 +120423,8 @@ var init_renderNode = __esm({
119965
120423
  };
119966
120424
  MENU_ANCHOR_CONTROL = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="button"], [role="link"]';
119967
120425
  MenuNode = withExtras("MenuNode", ({ props, ctx, wrap }) => {
119968
- const [open, setOpen] = React11.useState(false);
119969
- const hostRef = React11.useRef(null);
120426
+ const [open, setOpen] = React12.useState(false);
120427
+ const hostRef = React12.useRef(null);
119970
120428
  const context = menuOpensOnLongPress(props.style);
119971
120429
  const itemsPath = typeof props.itemsPath === "string" && props.itemsPath.startsWith("$service:") ? props.itemsPath : "";
119972
120430
  const boundItems = useBoundValue(ctx, itemsPath);
@@ -119974,7 +120432,7 @@ var init_renderNode = __esm({
119974
120432
  const previewMode = context && props.preview != null;
119975
120433
  const items = sourceItems.map((it2) => ({ ...it2, label: typeof it2?.label === "string" && it2.label.startsWith("$item") ? resolveItemDeep2(it2.label, ctx) : it2?.label, disabled: it2?.disabled === true || !it2?.action }));
119976
120434
  const C2 = ctx.color;
119977
- React11.useEffect(() => {
120435
+ React12.useEffect(() => {
119978
120436
  if (!open) return;
119979
120437
  const onTop = () => menuRef.current != null && isWithinTopModal(menuRef.current);
119980
120438
  const onDown = (e2) => {
@@ -120000,11 +120458,11 @@ var init_renderNode = __esm({
120000
120458
  const flexGrow = typeof wrap?.flex === "string" ? parseFloat(wrap.flex) : typeof wrap?.flex === "number" ? wrap.flex : Number(wrap?.flexGrow ?? 0);
120001
120459
  const fill = wrap?.width === "100%" || Number.isFinite(flexGrow) && flexGrow > 0;
120002
120460
  const popupPlacement = fill ? { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 20, marginTop: 4 } : { position: "absolute", top: "100%", right: 0, zIndex: 20, marginTop: 4 };
120003
- const anchorRef = React11.useRef(null);
120004
- const menuRef = React11.useRef(null);
120005
- const dialogRef = React11.useRef(null);
120006
- const [popupAlignLeft, setPopupAlignLeft] = React11.useState(false);
120007
- const [popupAbove, setPopupAbove] = React11.useState(false);
120461
+ const anchorRef = React12.useRef(null);
120462
+ const menuRef = React12.useRef(null);
120463
+ const dialogRef = React12.useRef(null);
120464
+ const [popupAlignLeft, setPopupAlignLeft] = React12.useState(false);
120465
+ const [popupAbove, setPopupAbove] = React12.useState(false);
120008
120466
  useIsomorphicLayoutEffect(() => {
120009
120467
  if (!open || !anchorRef.current || !menuRef.current) return;
120010
120468
  const anchor = anchorRef.current.getBoundingClientRect();
@@ -120026,8 +120484,8 @@ var init_renderNode = __esm({
120026
120484
  setPopupAlignLeft(anchor.right - popup.width < left);
120027
120485
  setPopupAbove(anchor.bottom + popup.height + 4 > bottom && anchor.top - popup.height - 4 >= top);
120028
120486
  });
120029
- const [innerControl, setInnerControl] = React11.useState(null);
120030
- const innerControlRef = React11.useRef(null);
120487
+ const [innerControl, setInnerControl] = React12.useState(null);
120488
+ const innerControlRef = React12.useRef(null);
120031
120489
  useIsomorphicLayoutEffect(() => {
120032
120490
  const anchor = anchorRef.current;
120033
120491
  const refresh = () => {
@@ -120043,7 +120501,7 @@ var init_renderNode = __esm({
120043
120501
  observer.observe(anchor, { childList: true, subtree: true, attributes: true, attributeFilter: ["disabled", "tabindex", "href", "role"] });
120044
120502
  return () => observer.disconnect();
120045
120503
  });
120046
- React11.useEffect(() => {
120504
+ React12.useEffect(() => {
120047
120505
  if (!innerControl) return;
120048
120506
  innerControl.setAttribute("aria-haspopup", "menu");
120049
120507
  innerControl.setAttribute("aria-expanded", String(open));
@@ -120055,13 +120513,13 @@ var init_renderNode = __esm({
120055
120513
  };
120056
120514
  }, [innerControl, open]);
120057
120515
  const itemsKey = items.map((it2, i2) => `${it2?.id ?? i2}:${it2?.disabled ? 0 : 1}`).join("|");
120058
- React11.useEffect(() => {
120516
+ React12.useEffect(() => {
120059
120517
  if (!open || !modal) return;
120060
120518
  const menu = menuRef.current;
120061
120519
  if (!menu || menu.contains(document.activeElement)) return;
120062
120520
  (menu.querySelector('[role="menuitem"][tabindex="0"]') ?? menu).focus();
120063
120521
  }, [open, modal, itemsKey]);
120064
- React11.useEffect(() => {
120522
+ React12.useEffect(() => {
120065
120523
  if (!open || !modal) return;
120066
120524
  const layer = pushModalLayer(() => dialogRef.current);
120067
120525
  return () => {
@@ -120083,11 +120541,11 @@ var init_renderNode = __esm({
120083
120541
  e2.preventDefault();
120084
120542
  items2[next].focus();
120085
120543
  };
120086
- const pressTimer = React11.useRef(null);
120087
- const longPressed = React11.useRef(false);
120088
- const touchOrigin = React11.useRef(null);
120089
- const suppressNextClick = React11.useRef(false);
120090
- const suppressTimer = React11.useRef(null);
120544
+ const pressTimer = React12.useRef(null);
120545
+ const longPressed = React12.useRef(false);
120546
+ const touchOrigin = React12.useRef(null);
120547
+ const suppressNextClick = React12.useRef(false);
120548
+ const suppressTimer = React12.useRef(null);
120091
120549
  const clearSuppress = () => {
120092
120550
  suppressNextClick.current = false;
120093
120551
  if (suppressTimer.current != null) {
@@ -120101,7 +120559,7 @@ var init_renderNode = __esm({
120101
120559
  pressTimer.current = null;
120102
120560
  }
120103
120561
  };
120104
- React11.useEffect(() => () => {
120562
+ React12.useEffect(() => () => {
120105
120563
  cancelPress();
120106
120564
  clearSuppress();
120107
120565
  }, []);
@@ -120265,11 +120723,11 @@ var init_renderNode = __esm({
120265
120723
  LoadMoreSentinel = ({ ctx, pagination, style }) => {
120266
120724
  const raw = pagination?.cursor;
120267
120725
  const isBound = typeof raw === "string" && isBinding(raw);
120268
- const bound = useBoundValue(ctx, isBound ? raw : "");
120269
- const cursor = isBound ? typeof bound === "string" ? bound : "" : String(raw ?? "");
120270
- const ref = React11.useRef(null);
120271
- const fired = React11.useRef("");
120272
- React11.useEffect(() => {
120726
+ const bound2 = useBoundValue(ctx, isBound ? raw : "");
120727
+ const cursor = isBound ? typeof bound2 === "string" ? bound2 : "" : String(raw ?? "");
120728
+ const ref = React12.useRef(null);
120729
+ const fired = React12.useRef("");
120730
+ React12.useEffect(() => {
120273
120731
  fired.current = "";
120274
120732
  const el2 = ref.current;
120275
120733
  if (!cursor || !ctx.onAction || !el2 || typeof IntersectionObserver === "undefined") return;
@@ -120289,8 +120747,8 @@ var init_renderNode = __esm({
120289
120747
  const literalErrorText = useBoundString(props.text ?? props.message, ctx);
120290
120748
  const C2 = ctx.color;
120291
120749
  const isBoundText = typeof props.textPath === "string" && isBinding(props.textPath);
120292
- const bound = useResolvedScalar(isBoundText ? props.textPath : void 0, ctx);
120293
- const text11 = isBoundText ? typeof bound === "string" || typeof bound === "number" ? String(bound) : "" : literalErrorText;
120750
+ const bound2 = useResolvedScalar(isBoundText ? props.textPath : void 0, ctx);
120751
+ const text11 = isBoundText ? typeof bound2 === "string" || typeof bound2 === "number" ? String(bound2) : "" : literalErrorText;
120294
120752
  if (props.visible === false) return null;
120295
120753
  if (isBoundText && !text11) return null;
120296
120754
  const c2 = (props.severity ?? "error") === "warning" ? C2("warning", "#E89F00") : C2("danger", "#E62214");
@@ -120300,11 +120758,11 @@ var init_renderNode = __esm({
120300
120758
  ] });
120301
120759
  });
120302
120760
  FormView = withExtras("FormView", ({ props, ctx, wrap }) => {
120303
- const bagRef = React11.useRef(null);
120761
+ const bagRef = React12.useRef(null);
120304
120762
  if (!bagRef.current) bagRef.current = createFormBag();
120305
120763
  const bag = bagRef.current;
120306
- React11.useSyncExternalStore(
120307
- React11.useCallback((cb) => bag.subscribe(cb), [bag]),
120764
+ React12.useSyncExternalStore(
120765
+ React12.useCallback((cb) => bag.subscribe(cb), [bag]),
120308
120766
  () => bag.version,
120309
120767
  () => bag.version
120310
120768
  );
@@ -120321,7 +120779,7 @@ var init_renderNode = __esm({
120321
120779
  ctx.onAction?.({ ...action, args: merged });
120322
120780
  }
120323
120781
  };
120324
- const submitNode = React11.useMemo(() => {
120782
+ const submitNode = React12.useMemo(() => {
120325
120783
  const node = props.submitButton;
120326
120784
  if (!node || valid) return node;
120327
120785
  if (node.body) return { ...node, body: { ...node.body, props: { ...node.body.props ?? {}, disabled: true } } };
@@ -120371,11 +120829,11 @@ var init_renderNode = __esm({
120371
120829
  const startPositionPath = typeof props.startPositionSeconds === "string" && isBinding(props.startPositionSeconds) ? props.startPositionSeconds : "";
120372
120830
  const boundStartPosition = useResolvedScalar(startPositionPath || void 0, ctx);
120373
120831
  const initialStartPosition = startPositionPath && typeof boundStartPosition === "number" && Number.isFinite(boundStartPosition) ? Math.max(0, boundStartPosition) : Math.max(0, Number.isFinite(Number(props.startPositionSeconds)) ? Number(props.startPositionSeconds) : 0);
120374
- const [index, setIndex] = React11.useState(initialIndex);
120832
+ const [index, setIndex] = React12.useState(initialIndex);
120375
120833
  const queueReady = !itemsPath || Array.isArray(boundQueue);
120376
120834
  const seatKey = `${itemsPath ?? ""}|${startIndex}`;
120377
- const seated = React11.useRef(null);
120378
- React11.useEffect(() => {
120835
+ const seated = React12.useRef(null);
120836
+ React12.useEffect(() => {
120379
120837
  const last = Math.max(0, resolvedItems.length - 1);
120380
120838
  if (resolvedItems.length === 0) return;
120381
120839
  if (queueReady && seated.current !== seatKey) {
@@ -120390,19 +120848,19 @@ var init_renderNode = __esm({
120390
120848
  }
120391
120849
  setIndex((i2) => Math.min(Math.max(0, i2), last));
120392
120850
  }, [resolvedItems.length, startIndex, queueReady, seatKey]);
120393
- const [status, setStatus] = React11.useState("idle");
120394
- const [position, setPosition] = React11.useState(initialStartPosition);
120395
- const [duration2, setDuration] = React11.useState(0);
120396
- const [buffered, setBuffered] = React11.useState(0);
120397
- const [rate, setRateState] = React11.useState(1);
120398
- const [fullscreen, setFullscreen] = React11.useState(false);
120399
- const [error, setError] = React11.useState("");
120400
- const mediaRef = React11.useRef(null);
120401
- const hostRef = React11.useRef(null);
120402
- const autoplayConsumed = React11.useRef(false);
120851
+ const [status, setStatus] = React12.useState("idle");
120852
+ const [position, setPosition] = React12.useState(initialStartPosition);
120853
+ const [duration2, setDuration] = React12.useState(0);
120854
+ const [buffered, setBuffered] = React12.useState(0);
120855
+ const [rate, setRateState] = React12.useState(1);
120856
+ const [fullscreen, setFullscreen] = React12.useState(false);
120857
+ const [error, setError] = React12.useState("");
120858
+ const mediaRef = React12.useRef(null);
120859
+ const hostRef = React12.useRef(null);
120860
+ const autoplayConsumed = React12.useRef(false);
120403
120861
  const item = resolvedItems[index];
120404
120862
  const mediaKey2 = `${index}:${item?.id ?? item?.url ?? ""}`;
120405
- React11.useEffect(() => {
120863
+ React12.useEffect(() => {
120406
120864
  const outgoing = mediaRef.current;
120407
120865
  return () => {
120408
120866
  try {
@@ -120416,7 +120874,7 @@ var init_renderNode = __esm({
120416
120874
  const isYouTube = provider === "youtube";
120417
120875
  const isUnsupportedProvider = provider !== "direct" && !isYouTube;
120418
120876
  const isAudio = ["audio", "podcast", "radio"].includes(String(item?.kind ?? ""));
120419
- const capabilities = React11.useMemo(() => ({
120877
+ const capabilities = React12.useMemo(() => ({
120420
120878
  seek: !isUnsupportedProvider && item?.live !== true,
120421
120879
  rate: !isUnsupportedProvider && item?.live !== true,
120422
120880
  queue: !isUnsupportedProvider && items.length > 1,
@@ -120444,9 +120902,9 @@ var init_renderNode = __esm({
120444
120902
  error,
120445
120903
  capabilities
120446
120904
  };
120447
- const slotProvider = React11.useMemo(() => new MediaSlotProvider(state), []);
120448
- React11.useEffect(() => slotProvider.set(state));
120449
- React11.useEffect(() => {
120905
+ const slotProvider = React12.useMemo(() => new MediaSlotProvider(state), []);
120906
+ React12.useEffect(() => slotProvider.set(state));
120907
+ React12.useEffect(() => {
120450
120908
  if (!startPositionPath || typeof boundStartPosition !== "number" || !Number.isFinite(boundStartPosition) || status !== "idle") return;
120451
120909
  const next = Math.max(0, boundStartPosition);
120452
120910
  setPosition(next);
@@ -120457,7 +120915,7 @@ var init_renderNode = __esm({
120457
120915
  }
120458
120916
  }
120459
120917
  }, [startPositionPath, boundStartPosition, status]);
120460
- const emit = React11.useCallback((action, extra = {}) => {
120918
+ const emit = React12.useCallback((action, extra = {}) => {
120461
120919
  if (!action || !ctx.onAction) return;
120462
120920
  const snapshot2 = {
120463
120921
  sessionId,
@@ -120476,13 +120934,13 @@ var init_renderNode = __esm({
120476
120934
  };
120477
120935
  ctx.onAction({ ...action, args: { ...action.args ?? {}, ...snapshot2, ...extra }, params: { ...action.params ?? {}, sessionId, index: String(index), ...Object.fromEntries(Object.entries(extra).map(([k2, v2]) => [k2, String(v2)])) } });
120478
120936
  }, [ctx.onAction, sessionId, status, index, position, duration2, item, buffered, rate, props.muted, fullscreen, error]);
120479
- React11.useEffect(() => {
120937
+ React12.useEffect(() => {
120480
120938
  if (!isUnsupportedProvider || status === "error") return;
120481
120939
  setStatus("error");
120482
120940
  setError("provider_unsupported");
120483
120941
  emit(props.onError, { state: "error", status: "error", error: "provider_unsupported", code: "provider_unsupported" });
120484
120942
  }, [isUnsupportedProvider, status, emit, props.onError]);
120485
- const play = React11.useCallback(async () => {
120943
+ const play = React12.useCallback(async () => {
120486
120944
  if (isYouTube) return;
120487
120945
  if (isUnsupportedProvider) {
120488
120946
  setStatus("error");
@@ -120504,17 +120962,17 @@ var init_renderNode = __esm({
120504
120962
  emit(props.onError, { state: "blocked", status: "blocked", error: message, code: "playback_blocked" });
120505
120963
  }
120506
120964
  }, [isYouTube, isUnsupportedProvider, emit, props.onError]);
120507
- const pause = React11.useCallback(() => {
120965
+ const pause = React12.useCallback(() => {
120508
120966
  mediaRef.current?.pause();
120509
120967
  setStatus("paused");
120510
120968
  }, []);
120511
- const seek = React11.useCallback((seconds) => {
120969
+ const seek = React12.useCallback((seconds) => {
120512
120970
  const media = mediaRef.current;
120513
120971
  if (!media || !Number.isFinite(seconds)) return;
120514
120972
  media.currentTime = Math.max(0, Math.min(seconds, Number.isFinite(media.duration) ? media.duration : seconds));
120515
120973
  setPosition(media.currentTime);
120516
120974
  }, []);
120517
- const select2 = React11.useCallback((next) => {
120975
+ const select2 = React12.useCallback((next) => {
120518
120976
  if (resolvedItems.length === 0) return;
120519
120977
  const normalized = (next % resolvedItems.length + resolvedItems.length) % resolvedItems.length;
120520
120978
  const nextItem = resolvedItems[normalized];
@@ -120536,7 +120994,7 @@ var init_renderNode = __esm({
120536
120994
  error: ""
120537
120995
  });
120538
120996
  }, [resolvedItems, emit, props.onItemChange]);
120539
- const toggleFullscreen = React11.useCallback(async () => {
120997
+ const toggleFullscreen = React12.useCallback(async () => {
120540
120998
  if (props.fullscreen === "disabled") return;
120541
120999
  const host = hostRef.current;
120542
121000
  try {
@@ -120546,7 +121004,7 @@ var init_renderNode = __esm({
120546
121004
  setFullscreen((value) => !value);
120547
121005
  }
120548
121006
  }, [props.fullscreen]);
120549
- React11.useEffect(() => {
121007
+ React12.useEffect(() => {
120550
121008
  const listener = (event) => {
120551
121009
  const detail = event.detail;
120552
121010
  if (!detail || detail.sessionId !== sessionId) return;
@@ -120594,7 +121052,7 @@ var init_renderNode = __esm({
120594
121052
  window.addEventListener("himalaya-media-command", listener);
120595
121053
  return () => window.removeEventListener("himalaya-media-command", listener);
120596
121054
  }, [sessionId, index, play, pause, seek, select2, toggleFullscreen]);
120597
- React11.useEffect(() => {
121055
+ React12.useEffect(() => {
120598
121056
  const listener = () => {
120599
121057
  const value = document.fullscreenElement === hostRef.current;
120600
121058
  setFullscreen(value);
@@ -120603,14 +121061,14 @@ var init_renderNode = __esm({
120603
121061
  document.addEventListener("fullscreenchange", listener);
120604
121062
  return () => document.removeEventListener("fullscreenchange", listener);
120605
121063
  }, [emit, props.onFullscreenChange]);
120606
- React11.useEffect(() => {
121064
+ React12.useEffect(() => {
120607
121065
  const media = mediaRef.current;
120608
121066
  if (!media || isYouTube || isUnsupportedProvider) return;
120609
121067
  media.muted = props.muted === true;
120610
121068
  media.playbackRate = rate;
120611
121069
  if (position > 0) media.currentTime = position;
120612
121070
  }, [item?.url, isUnsupportedProvider]);
120613
- React11.useEffect(() => {
121071
+ React12.useEffect(() => {
120614
121072
  if (isYouTube || isUnsupportedProvider || props.autoplay === "never" || autoplayConsumed.current) return;
120615
121073
  if (props.autoplay === "once") {
120616
121074
  autoplayConsumed.current = true;
@@ -120812,15 +121270,15 @@ var init_renderNode = __esm({
120812
121270
  }
120813
121271
  );
120814
121272
  });
120815
- PdfDocumentCanvas = React11.lazy(() => Promise.resolve().then(() => (init_pdfDocument(), pdfDocument_exports)).then((module) => ({ default: module.PdfDocument })));
121273
+ PdfDocumentCanvas = React12.lazy(() => Promise.resolve().then(() => (init_pdfDocument(), pdfDocument_exports)).then((module) => ({ default: module.PdfDocument })));
120816
121274
  PdfViewNode = withExtras("PdfViewNode", ({ props, ctx, wrap }) => {
120817
121275
  const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
120818
121276
  const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
120819
121277
  const rawUrl = typeof url === "string" && !isBinding(url) ? url : "";
120820
121278
  const plan = rawUrl ? pdfEmbedPlan(rawUrl, void 0, typeof document !== "undefined" ? document.baseURI : void 0) : null;
120821
121279
  const retypeSrc = plan?.mode === "retype" ? plan.src : null;
120822
- const [retyped, setRetyped] = React11.useState(null);
120823
- React11.useEffect(() => {
121280
+ const [retyped, setRetyped] = React12.useState(null);
121281
+ React12.useEffect(() => {
120824
121282
  if (!retypeSrc) return;
120825
121283
  let live3 = true;
120826
121284
  let made = null;
@@ -120842,11 +121300,11 @@ var init_renderNode = __esm({
120842
121300
  }, [retypeSrc]);
120843
121301
  const settled = retyped && retyped.from === retypeSrc ? retyped : null;
120844
121302
  const wantsShare = props.allowShare === true;
120845
- const [fellBackFrom, setFellBackFrom] = React11.useState(null);
121303
+ const [fellBackFrom, setFellBackFrom] = React12.useState(null);
120846
121304
  const directFellBack = plan?.mode === "direct" && fellBackFrom === plan.src;
120847
121305
  const directSrc = plan?.mode === "direct" && (wantsShare || props.showPageControls !== false && directFellBack) ? plan.src : null;
120848
- const [direct, setDirect] = React11.useState(null);
120849
- React11.useEffect(() => {
121306
+ const [direct, setDirect] = React12.useState(null);
121307
+ React12.useEffect(() => {
120850
121308
  if (!directSrc) return;
120851
121309
  let live3 = true;
120852
121310
  let made = null;
@@ -120863,16 +121321,16 @@ var init_renderNode = __esm({
120863
121321
  }, [directSrc, wantsShare]);
120864
121322
  const directDoc = direct && direct.from === directSrc ? direct : null;
120865
121323
  const fallbackPageCount = plan?.mode === "retype" ? settled?.pageCount ?? null : directDoc?.count ?? null;
120866
- const [nav, setNav] = React11.useState({ from: rawUrl, page: null, zoom: null });
121324
+ const [nav, setNav] = React12.useState({ from: rawUrl, page: null, zoom: null });
120867
121325
  const view = nav.from === rawUrl ? nav : { from: rawUrl, page: null, zoom: null };
120868
121326
  const src = plan?.mode === "direct" ? plan.src : settled?.url ?? null;
120869
- const [canvasCount, setCanvasCount] = React11.useState(null);
120870
- const onPageCount = React11.useCallback((count2) => {
121327
+ const [canvasCount, setCanvasCount] = React12.useState(null);
121328
+ const onPageCount = React12.useCallback((count2) => {
120871
121329
  if (!Number.isInteger(count2) || count2 < 1) return;
120872
121330
  setCanvasCount((cur) => cur?.from === src && cur.count === count2 ? cur : { from: src, count: count2 });
120873
121331
  }, [src]);
120874
121332
  const pageCount = canvasCount?.from === src ? canvasCount.count : fallbackPageCount;
120875
- const onFallback = React11.useCallback(() => setFellBackFrom(src), [src]);
121333
+ const onFallback = React12.useCallback(() => setFellBackFrom(src), [src]);
120876
121334
  const loading = plan?.mode === "retype" && !settled || directSrc != null && wantsShare && !directDoc && typeof window !== "undefined";
120877
121335
  const loadSrc = plan?.mode === "direct" && wantsShare ? directDoc?.blobUrl ?? src : src;
120878
121336
  const ph = typeof props.height === "number" && props.height > 0 ? props.height : void 0;
@@ -120922,7 +121380,7 @@ var init_renderNode = __esm({
120922
121380
  const data = base + pdfOpenFragment(sourceHash, { page, zoom: zoomable ? view.zoom : null, fitWidth: !zoomable });
120923
121381
  const label3 = typeof props.title === "string" && props.title ? props.title : "PDF document";
120924
121382
  const documentStyle = showPageControls || zoomable || allowShare ? { display: "block", width: "100%", flex: "1 1 auto", minHeight: ph ? 0 : 280, border: "none" } : frame;
120925
- const object9 = typeof window === "undefined" ? /* @__PURE__ */ jsx11("object", { "data-himalaya-pdf": "static-fallback", data, type: "application/pdf", "aria-label": label3, style: documentStyle }) : /* @__PURE__ */ jsx11(React11.Suspense, { fallback: /* @__PURE__ */ jsx11("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: documentStyle }), children: /* @__PURE__ */ jsx11(
121383
+ const object9 = typeof window === "undefined" ? /* @__PURE__ */ jsx11("object", { "data-himalaya-pdf": "static-fallback", data, type: "application/pdf", "aria-label": label3, style: documentStyle }) : /* @__PURE__ */ jsx11(React12.Suspense, { fallback: /* @__PURE__ */ jsx11("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: documentStyle }), children: /* @__PURE__ */ jsx11(
120926
121384
  PdfDocumentCanvas,
120927
121385
  {
120928
121386
  src: loadSrc ?? src,
@@ -120986,7 +121444,7 @@ var init_renderNode = __esm({
120986
121444
  )
120987
121445
  ] });
120988
121446
  });
120989
- WebViewNode = withExtras("WebViewNode", ({ props, ctx, wrap }) => {
121447
+ WebViewNode = withExtras("WebViewNode", ({ props, ctx, wrap, nodeId }) => {
120990
121448
  const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
120991
121449
  const boundHtml = useResolvedScalar(props.inlineHtml != null && isBinding(props.inlineHtml) ? props.inlineHtml : void 0, ctx);
120992
121450
  const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
@@ -120998,26 +121456,63 @@ var init_renderNode = __esm({
120998
121456
  const htmlStr = rawHtml != null ? injectIntoInlineHtml(rawHtml, config, scrollEnabled) : void 0;
120999
121457
  const urlAllowed = urlStr != null && (config.allowedOrigins.length === 0 || webViewOriginAllowed(urlStr, config.allowedOrigins));
121000
121458
  const urlFrame = urlStr && urlAllowed ? webviewFrameSandbox(urlStr) : null;
121001
- const h2 = typeof props.height === "number" && props.height > 0 ? props.height : void 0;
121459
+ const boundHeight = useResolvedScalar(props.heightPath != null && isBinding(props.heightPath) ? props.heightPath : void 0, ctx);
121460
+ const fill = props.fill === true;
121461
+ const h2 = typeof boundHeight === "number" && boundHeight > 0 ? boundHeight : typeof props.height === "number" && props.height > 0 ? props.height : void 0;
121002
121462
  const ar2 = typeof props.aspectRatio === "number" && props.aspectRatio > 0 ? props.aspectRatio : void 0;
121003
- const frameStyle = { width: "100%", boxSizing: "border-box", border: "none", borderRadius: ctx.radius("md", 8), background: "#fff", ...scrollEnabled ? {} : { overflow: "hidden" }, ...h2 ? { height: h2 } : ar2 ? { aspectRatio: String(ar2) } : { height: 200 } };
121004
- const frameKey = htmlStr ?? urlFrame?.src ?? null;
121005
- const [loadedKey, setLoadedKey] = React11.useState(null);
121463
+ const frameStyle = { width: "100%", boxSizing: "border-box", border: "none", borderRadius: ctx.radius("md", 8), background: "#fff", ...scrollEnabled ? {} : { overflow: "hidden" }, ...fill ? { flex: "1 1 0", minHeight: 0 } : h2 ? { height: h2 } : ar2 ? { aspectRatio: String(ar2) } : { height: 200 } };
121464
+ const reloadValue = reloadKeyOf(useResolvedScalar(props.reloadKeyPath != null && isBinding(props.reloadKeyPath) ? props.reloadKeyPath : void 0, ctx));
121465
+ const reloadState = React12.useRef({ base: null, epoch: 0 });
121466
+ if (reloadValue !== null && reloadValue !== reloadState.current.base) {
121467
+ if (reloadState.current.base !== null) reloadState.current.epoch++;
121468
+ reloadState.current.base = reloadValue;
121469
+ }
121470
+ const reloadKey = reloadState.current.epoch > 0 ? String(reloadState.current.epoch) : "";
121471
+ const sourceKey = htmlStr ?? urlFrame?.src ?? null;
121472
+ const frameKey = sourceKey == null ? null : reloadKey ? `${sourceKey}\0${reloadKey}` : sourceKey;
121473
+ const [loadedKey, setLoadedKey] = React12.useState(null);
121006
121474
  const loaded = loadedKey === frameKey;
121475
+ const bridgeChannel = props.bridge === "worker" ? webViewChannelOf(ctx.provider) : null;
121476
+ const frameRef = React12.useRef(null);
121477
+ const bridgeLoad = React12.useRef({ loaded: false });
121478
+ if (bridgeLoad.current.key !== frameKey) {
121479
+ bridgeLoad.current.key = frameKey;
121480
+ bridgeLoad.current.loaded = false;
121481
+ }
121007
121482
  const frameProps = {
121483
+ ref: frameRef,
121008
121484
  title: "webview",
121009
121485
  scrolling: scrollEnabled ? void 0 : "no",
121010
121486
  "data-scroll-enabled": scrollEnabled ? "true" : "false",
121011
121487
  allow: config.allow || void 0,
121012
- onLoad: () => setLoadedKey(frameKey),
121488
+ onLoad: () => {
121489
+ setLoadedKey(frameKey);
121490
+ bridgeLoad.current.loaded = true;
121491
+ bridgeLoad.current.onLoad?.();
121492
+ },
121013
121493
  style: frameStyle
121014
121494
  };
121015
121495
  const showLoading = !loaded && (config.loadingText != null || config.showProgressBar) && (htmlStr != null || urlFrame != null);
121016
121496
  const rawBand = config.coverBandColor ?? props.coverBandColor;
121017
121497
  const bandColor = typeof rawBand === "string" && rawBand.length > 0 ? rawBand : void 0;
121018
- return /* @__PURE__ */ jsxs8("div", { style: { width: "100%", position: "relative", ...bandColor ? { background: bandColor, borderRadius: ctx.radius("md", 8), overflow: "hidden" } : {}, ...wrap }, children: [
121498
+ return /* @__PURE__ */ jsxs8("div", { style: { width: "100%", position: "relative", ...fill ? { height: "100%", flex: "1 1 0", minHeight: 0, display: "flex", flexDirection: "column" } : {}, ...bandColor ? { background: bandColor, borderRadius: ctx.radius("md", 8), overflow: "hidden" } : {}, ...wrap }, children: [
121019
121499
  bandColor ? /* @__PURE__ */ jsx11("div", { "data-testid": "webview-cover-band", style: { height: 8, background: bandColor } }) : null,
121020
- htmlStr ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, srcDoc: htmlStr, sandbox: "allow-scripts" }) : urlFrame ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, src: urlFrame.src, sandbox: urlFrame.sandbox }) : /* @__PURE__ */ jsx11("div", { style: { ...frameStyle, display: "grid", placeItems: "center", color: "#999", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), border: "1px dashed #ccc" }, children: urlStr ? "WebView (url not allowed)" : "WebView (no url)" }),
121500
+ htmlStr ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, srcDoc: htmlStr, sandbox: "allow-scripts" }, frameKey ?? void 0) : urlFrame ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, src: urlFrame.src, sandbox: urlFrame.sandbox }, frameKey ?? void 0) : /* @__PURE__ */ jsx11("div", { style: { ...frameStyle, display: "grid", placeItems: "center", color: "#999", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), border: "1px dashed #ccc" }, children: urlStr ? "WebView (url not allowed)" : "WebView (no url)" }),
121501
+ bridgeChannel ? /* @__PURE__ */ jsx11(React12.Suspense, { fallback: null, children: /* @__PURE__ */ jsx11(
121502
+ WebViewBridgeHost2,
121503
+ {
121504
+ channel: bridgeChannel,
121505
+ props,
121506
+ ctx,
121507
+ nodeId,
121508
+ urlStr,
121509
+ htmlStr,
121510
+ allowedOrigins: config.allowedOrigins,
121511
+ reloadKey,
121512
+ frameRef,
121513
+ load: bridgeLoad.current
121514
+ }
121515
+ ) }) : null,
121021
121516
  showLoading ? /* @__PURE__ */ jsxs8("div", { "data-testid": "webview-loading", role: "status", "aria-live": "polite", "aria-label": config.loadingText ? void 0 : "Loading", style: { position: "absolute", left: 0, right: 0, top: bandColor ? 8 : 0, bottom: 0, display: "grid", placeItems: "center", pointerEvents: "none", fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: ctx.color("textSecondary", "#666") }, children: [
121022
121517
  config.showProgressBar ? /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: 0, height: 3, width: "40%", background: ctx.color("accentPrimary", "#116DFF") } }) : null,
121023
121518
  config.loadingText ?? null
@@ -121028,24 +121523,24 @@ var init_renderNode = __esm({
121028
121523
  const placeholderText = useBoundString(props.placeholder, ctx);
121029
121524
  const C2 = ctx.color;
121030
121525
  const optionsPath = props.optionsPath;
121031
- const bound = useBoundValue(ctx, typeof optionsPath === "string" && isBinding(optionsPath) ? optionsPath : "");
121032
- const opts = Array.isArray(bound) && bound.length ? bound : Array.isArray(props.options) ? props.options : [];
121526
+ const bound2 = useBoundValue(ctx, typeof optionsPath === "string" && isBinding(optionsPath) ? optionsPath : "");
121527
+ const opts = Array.isArray(bound2) && bound2.length ? bound2 : Array.isArray(props.options) ? props.options : [];
121033
121528
  const onChange = props.onChange;
121034
121529
  const boundSel = useResolvedScalar(isBinding(props.selectedId) ? props.selectedId : void 0, ctx);
121035
121530
  const selectedId = isBinding(props.selectedId) ? boundSel : props.selectedId;
121036
- const [sel, setSel] = React11.useState(ctx.empty ? "" : String(selectedId ?? ""));
121037
- React11.useEffect(() => {
121531
+ const [sel, setSel] = React12.useState(ctx.empty ? "" : String(selectedId ?? ""));
121532
+ React12.useEffect(() => {
121038
121533
  if (!ctx.empty && selectedId != null) setSel(String(selectedId));
121039
121534
  }, [selectedId, ctx.empty]);
121040
- const pickerBag = React11.useContext(FormValuesContext);
121535
+ const pickerBag = React12.useContext(FormValuesContext);
121041
121536
  const pickerFieldId = props.__formFieldId;
121042
121537
  const pickerRuleKey = props.validation ? JSON.stringify(props.validation) : "";
121043
- React11.useEffect(() => {
121538
+ React12.useEffect(() => {
121044
121539
  if (!pickerBag || !pickerFieldId) return;
121045
121540
  pickerBag.register(pickerFieldId, props.validation);
121046
121541
  return () => pickerBag.unregister(pickerFieldId);
121047
121542
  }, [pickerFieldId, pickerBag, pickerRuleKey]);
121048
- React11.useEffect(() => {
121543
+ React12.useEffect(() => {
121049
121544
  if (pickerBag && pickerFieldId) pickerBag.set(pickerFieldId, sel);
121050
121545
  }, [sel, pickerFieldId, pickerBag]);
121051
121546
  const emitPick = (id) => {
@@ -121161,24 +121656,24 @@ var init_renderNode = __esm({
121161
121656
  const s2 = seedUnix();
121162
121657
  return s2 == null ? null : clampUnix(s2);
121163
121658
  };
121164
- const [val, setVal] = React11.useState(ctx.empty ? "" : toInput(shownSeed()));
121659
+ const [val, setVal] = React12.useState(ctx.empty ? "" : toInput(shownSeed()));
121165
121660
  const dateServiceBound = typeof props.valuePath === "string" && props.valuePath.startsWith("$service:");
121166
121661
  const bagSource = () => dateServiceBound ? boundRaw : boundRaw !== void 0 && boundRaw !== null && boundRaw !== "" ? boundRaw : props.valueUnix;
121167
- const [dateBagVal, setDateBagVal] = React11.useState(ctx.empty ? "" : clampDateFieldValue(encodeDateFieldValue(bagSource()), props.minUnix, props.maxUnix, props.mode));
121168
- React11.useEffect(() => {
121662
+ const [dateBagVal, setDateBagVal] = React12.useState(ctx.empty ? "" : clampDateFieldValue(encodeDateFieldValue(bagSource()), props.minUnix, props.maxUnix, props.mode));
121663
+ React12.useEffect(() => {
121169
121664
  if (ctx.empty) return;
121170
121665
  setVal(toInput(shownSeed()));
121171
121666
  setDateBagVal(clampDateFieldValue(encodeDateFieldValue(bagSource()), props.minUnix, props.maxUnix, props.mode));
121172
121667
  }, [boundRaw, props.valueUnix, props.valuePath, ctx.empty]);
121173
- const dateBag = React11.useContext(FormValuesContext);
121668
+ const dateBag = React12.useContext(FormValuesContext);
121174
121669
  const dateFieldId = props.__formFieldId;
121175
121670
  const dateRuleKey = props.validation ? JSON.stringify(props.validation) : "";
121176
- React11.useEffect(() => {
121671
+ React12.useEffect(() => {
121177
121672
  if (!dateBag || !dateFieldId) return;
121178
121673
  dateBag.register(dateFieldId, props.validation);
121179
121674
  return () => dateBag.unregister(dateFieldId);
121180
121675
  }, [dateFieldId, dateBag, dateRuleKey]);
121181
- React11.useEffect(() => {
121676
+ React12.useEffect(() => {
121182
121677
  if (dateBag && dateFieldId) dateBag.set(dateFieldId, dateBagVal);
121183
121678
  }, [dateBagVal, dateFieldId, dateBag]);
121184
121679
  if (!ctx.onAction) {
@@ -121247,11 +121742,11 @@ var init_renderNode = __esm({
121247
121742
  const valueBinding = isBinding(props.value) ? props.value : void 0;
121248
121743
  const boundValue = useResolvedScalar(valueBinding, ctx);
121249
121744
  const initialValue2 = ctx.empty ? "" : valueBinding ? boundValue == null ? "" : String(boundValue) : String(props.value ?? "");
121250
- const [local, setLocal] = React11.useState(initialValue2);
121251
- React11.useEffect(() => {
121745
+ const [local, setLocal] = React12.useState(initialValue2);
121746
+ React12.useEffect(() => {
121252
121747
  if (!ctx.empty && valueBinding) setLocal(boundValue == null ? "" : String(boundValue));
121253
121748
  }, [boundValue, ctx.empty, valueBinding]);
121254
- const timer = React11.useRef(null);
121749
+ const timer = React12.useRef(null);
121255
121750
  const dispatch = (action, v2) => {
121256
121751
  if (!action || !ctx.onAction) return;
121257
121752
  ctx.onAction({ ...action, params: { ...action.params ?? {}, value: v2 }, args: { ...action.args ?? {}, value: v2 } });
@@ -121293,33 +121788,33 @@ var init_renderNode = __esm({
121293
121788
  const boundValue = useResolvedScalar(props.valuePath, ctx);
121294
121789
  const effectiveValue = props.valuePath != null ? boundValue : props.value;
121295
121790
  const fallbackValue = effectiveValue ?? props.value ?? 0;
121296
- const [value, setValue] = React11.useState(() => {
121791
+ const [value, setValue] = React12.useState(() => {
121297
121792
  const seed2 = Number(fallbackValue);
121298
121793
  return Number.isFinite(seed2) ? Math.min(max, Math.max(min, seed2)) : 0;
121299
121794
  });
121300
- React11.useEffect(() => {
121795
+ React12.useEffect(() => {
121301
121796
  const next = Number(fallbackValue);
121302
121797
  if (Number.isFinite(next)) setValue(Math.min(max, Math.max(min, next)));
121303
121798
  }, [fallbackValue, min, max]);
121304
- const stepperBag = React11.useContext(FormValuesContext);
121799
+ const stepperBag = React12.useContext(FormValuesContext);
121305
121800
  const stepperFieldId = props.__formFieldId;
121306
121801
  const stepperRuleKey = props.validation ? JSON.stringify(props.validation) : "";
121307
- React11.useEffect(() => {
121802
+ React12.useEffect(() => {
121308
121803
  if (!stepperBag || !stepperFieldId) return;
121309
121804
  stepperBag.register(stepperFieldId, props.validation);
121310
121805
  return () => stepperBag.unregister(stepperFieldId);
121311
121806
  }, [stepperFieldId, stepperBag, stepperRuleKey]);
121312
121807
  const serviceBound = typeof props.valuePath === "string" && isBinding(props.valuePath) && props.valuePath.startsWith("$service:");
121313
- const [bagValue, setBagValue] = React11.useState(() => serviceBound ? boundValue != null ? encodeStepperFieldValue(boundValue, { min, max }) : "" : encodeStepperFieldValue(value, { min, max }));
121314
- React11.useEffect(() => {
121808
+ const [bagValue, setBagValue] = React12.useState(() => serviceBound ? boundValue != null ? encodeStepperFieldValue(boundValue, { min, max }) : "" : encodeStepperFieldValue(value, { min, max }));
121809
+ React12.useEffect(() => {
121315
121810
  if (!serviceBound || boundValue == null) return;
121316
121811
  setBagValue(encodeStepperFieldValue(boundValue, { min, max }));
121317
121812
  }, [boundValue, serviceBound, min, max]);
121318
- React11.useEffect(() => {
121813
+ React12.useEffect(() => {
121319
121814
  if (serviceBound) return;
121320
121815
  setBagValue(encodeStepperFieldValue(value, { min, max }));
121321
121816
  }, [value, serviceBound, min, max]);
121322
- React11.useEffect(() => {
121817
+ React12.useEffect(() => {
121323
121818
  if (stepperBag && stepperFieldId) stepperBag.set(stepperFieldId, bagValue);
121324
121819
  }, [bagValue, stepperFieldId, stepperBag]);
121325
121820
  const dispatch = (next) => {
@@ -121334,7 +121829,7 @@ var init_renderNode = __esm({
121334
121829
  dispatch(next);
121335
121830
  return next;
121336
121831
  };
121337
- const [pressed, setPressed] = React11.useState({ text: "", count: 0 });
121832
+ const [pressed, setPressed] = React12.useState({ text: "", count: 0 });
121338
121833
  const bump = (delta) => commit(value + delta);
121339
121834
  const press = (delta) => {
121340
121835
  const next = bump(delta);
@@ -121478,9 +121973,9 @@ var init_renderNode = __esm({
121478
121973
  const items = Array.isArray(props.items) ? props.items : [];
121479
121974
  const gridStagger = ctx.reduceMotion() ? 0 : Number(props.staggerMs ?? props.stagger_ms ?? 0);
121480
121975
  const stagger = (el2, i2) => {
121481
- if (!(gridStagger > 0) || !React11.isValidElement(el2)) return el2;
121976
+ if (!(gridStagger > 0) || !React12.isValidElement(el2)) return el2;
121482
121977
  const prev = el2.props.style ?? {};
121483
- return React11.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
121978
+ return React12.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
121484
121979
  };
121485
121980
  const inner = itemsPath && items[0] && ctx.provider ? /* @__PURE__ */ jsx11(
121486
121981
  BoundList,
@@ -121555,13 +122050,13 @@ var init_renderNode = __esm({
121555
122050
  revealProgress = /* @__PURE__ */ new Map();
121556
122051
  countWords = (s2) => s2.split(/\s+/).filter((t2) => t2 !== "").length;
121557
122052
  RevealText = ({ text: text11, reduce, markdownHtml }) => {
121558
- const tokens2 = React11.useMemo(() => text11.split(/(\s+)/).filter((t2) => t2 !== ""), [text11]);
121559
- const total = React11.useMemo(
122053
+ const tokens2 = React12.useMemo(() => text11.split(/(\s+)/).filter((t2) => t2 !== ""), [text11]);
122054
+ const total = React12.useMemo(
121560
122055
  () => markdownHtml != null ? revealHtml(markdownHtml, 0, void 0).total : countWords(text11),
121561
122056
  [text11, markdownHtml]
121562
122057
  );
121563
- const [shown2, setShown] = React11.useState(total);
121564
- const prevRef = React11.useRef(null);
122058
+ const [shown2, setShown] = React12.useState(total);
122059
+ const prevRef = React12.useRef(null);
121565
122060
  useIsomorphicLayoutEffect(() => {
121566
122061
  const prev = prevRef.current;
121567
122062
  prevRef.current = text11;
@@ -121637,9 +122132,9 @@ var init_renderNode = __esm({
121637
122132
  }
121638
122133
  }
121639
122134
  if (collapse) {
121640
- const bound = isBinding(props.text) && props.text.startsWith("$service:");
121641
- if (!bound || ctx.provider) {
121642
- const eff = bound ? resolvedForCollapse : isBinding(props.text) ? resolveScalarStatic(props.text, ctx) : props.text;
122135
+ const bound2 = isBinding(props.text) && props.text.startsWith("$service:");
122136
+ if (!bound2 || ctx.provider) {
122137
+ const eff = bound2 ? resolvedForCollapse : isBinding(props.text) ? resolveScalarStatic(props.text, ctx) : props.text;
121643
122138
  const s2 = eff == null ? "" : String(eff).trim();
121644
122139
  if (s2 === "" || s2 === "\u2014") return null;
121645
122140
  }
@@ -121684,8 +122179,8 @@ var init_renderNode = __esm({
121684
122179
  const boundInitials = useResolvedScalar(props.initials != null && isBinding(props.initials) ? props.initials : void 0, ctx);
121685
122180
  const boundAlt = useResolvedScalar(contentDescription, ctx);
121686
122181
  const fadeIn = motionDefaultsAnimate(ctx);
121687
- const [shownSrc, setShownSrc] = React11.useState(null);
121688
- const imgRef = React11.useRef(null);
122182
+ const [shownSrc, setShownSrc] = React12.useState(null);
122183
+ const imgRef = React12.useRef(null);
121689
122184
  const hasSource = props.url != null || props.initials != null || props.asset != null || props.icon != null;
121690
122185
  const banner = fillWidth === true || props.width == null && props.height == null && !props.initials;
121691
122186
  const w2 = banner ? "100%" : props.width ?? 40;
@@ -121699,7 +122194,7 @@ var init_renderNode = __esm({
121699
122194
  const ph = props.placeholder ? C2(props.placeholder, "#e6e6e6") : void 0;
121700
122195
  const imgUrl = props.url != null && isBinding(props.url) ? boundUrl : props.url;
121701
122196
  const imgInitials = props.initials != null && isBinding(props.initials) ? boundInitials : props.initials;
121702
- const [failedSrc, setFailedSrc] = React11.useState(null);
122197
+ const [failedSrc, setFailedSrc] = React12.useState(null);
121703
122198
  const resolvedSrc = imgUrl && typeof imgUrl === "string" ? resolveAssetUrl(imgUrl, ctx.assetBaseUrl) : null;
121704
122199
  const imgShown = !fadeIn || resolvedSrc != null && shownSrc === resolvedSrc;
121705
122200
  useIsomorphicLayoutEffect(() => {
@@ -121732,7 +122227,7 @@ var init_renderNode = __esm({
121732
122227
  if (imgInitials && typeof imgInitials === "string") {
121733
122228
  const alt = asText2(boundAlt).trim();
121734
122229
  const circle = avatarCircle(String(imgInitials), typeof w2 === "number" ? w2 : 40, C2, false, bodyFont(ctx));
121735
- return React11.cloneElement(circle, alt ? { role: "img", "aria-label": alt, [SELF_RENDERED_LEAF]: true } : { [ROLE_WHEN_NAMED]: "img", [SELF_RENDERED_LEAF]: true });
122230
+ return React12.cloneElement(circle, alt ? { role: "img", "aria-label": alt, [SELF_RENDERED_LEAF]: true } : { [ROLE_WHEN_NAMED]: "img", [SELF_RENDERED_LEAF]: true });
121736
122231
  }
121737
122232
  if (props.icon != null && props.url == null && props.asset == null && imgInitials == null) {
121738
122233
  const side2 = typeof w2 === "number" ? w2 : 40;
@@ -121747,13 +122242,13 @@ var init_renderNode = __esm({
121747
122242
  const reduce = ctx.reduceMotion();
121748
122243
  const servicePlayPath = typeof props.playPath === "string" && props.playPath.startsWith("$service:") ? props.playPath : void 0;
121749
122244
  const nonce = lottieNonce(useResolvedScalar(servicePlayPath, ctx));
121750
- const [replay, setReplay] = React11.useState({ plays: 0 });
121751
- const [gen, setGen] = React11.useState(0);
121752
- React11.useEffect(() => {
122245
+ const [replay, setReplay] = React12.useState({ plays: 0 });
122246
+ const [gen, setGen] = React12.useState(0);
122247
+ React12.useEffect(() => {
121753
122248
  setReplay((s2) => ({ plays: s2.plays }));
121754
122249
  setGen((g2) => g2 + 1);
121755
122250
  }, [servicePlayPath, ctx.provider, props.source]);
121756
- React11.useEffect(() => {
122251
+ React12.useEffect(() => {
121757
122252
  setReplay((s2) => lottieReplayStep(s2, nonce, reduce));
121758
122253
  }, [nonce, servicePlayPath, ctx.provider, props.source]);
121759
122254
  return /* @__PURE__ */ jsx11(
@@ -121804,14 +122299,14 @@ var init_renderNode = __esm({
121804
122299
  const C2 = ctx.color;
121805
122300
  const effectStyle = useSymbolEffect(props.effect, ctx.reduceMotion);
121806
122301
  const size = props.size ?? 22;
121807
- const bound = useResolvedScalar(isBinding(props.name) ? props.name : void 0, ctx);
121808
- const iconName = isBinding(props.name) ? String(bound ?? "") : props.name;
122302
+ const bound2 = useResolvedScalar(isBinding(props.name) ? props.name : void 0, ctx);
122303
+ const iconName = isBinding(props.name) ? String(bound2 ?? "") : props.name;
121809
122304
  const contentDescription = useResolvedScalar(props.contentDescription, ctx);
121810
122305
  const described = contentDescription != null && String(contentDescription).trim() !== "";
121811
122306
  const a11y = described ? { role: "img", "aria-label": String(contentDescription), [SELF_RENDERED_LEAF]: true } : { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [SELF_RENDERED_LEAF]: true, [ROLE_WHEN_NAMED]: "img" };
121812
122307
  const glyph = iconSvg(iconName, { size, color: C2(resolveScalarStatic(props.tint, ctx) ?? "textPrimary", "#636b78") });
121813
122308
  const swap = useIconSwap(iconName, ctx);
121814
- const animatedGlyph = Object.keys(effectStyle).length || swap.key > 0 ? React11.cloneElement(glyph, { style: { ...glyph.props.style, ...swap.style, ...effectStyle }, key: swap.key }) : glyph;
122309
+ const animatedGlyph = Object.keys(effectStyle).length || swap.key > 0 ? React12.cloneElement(glyph, { style: { ...glyph.props.style, ...swap.style, ...effectStyle }, key: swap.key }) : glyph;
121815
122310
  return /* @__PURE__ */ jsx11("span", { ...a11y, style: { display: "inline-grid", placeItems: "center", width: size + 6, height: size + 6, lineHeight: 1, flex: "none", ...wrap }, children: animatedGlyph });
121816
122311
  });
121817
122312
  EMPTY_STATE_SPACING = {
@@ -121996,14 +122491,14 @@ var init_renderNode = __esm({
121996
122491
  });
121997
122492
  OtpInputNode = withExtras("OtpInputNode", ({ props, ctx, wrap }) => {
121998
122493
  const C2 = ctx.color;
121999
- const bound = useResolvedScalar(props.valuePath, ctx);
122000
- const boundText = props.valuePath != null ? typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : "" : void 0;
122001
- const [typed, setTyped] = React11.useState(void 0);
122002
- React11.useEffect(() => {
122494
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
122495
+ const boundText = props.valuePath != null ? typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) : "" : void 0;
122496
+ const [typed, setTyped] = React12.useState(void 0);
122497
+ React12.useEffect(() => {
122003
122498
  setTyped(void 0);
122004
122499
  }, [boundText, props.value, props.valuePath, typeof props.valuePath === "string" && props.valuePath.startsWith("$service:") ? ctx.provider : null]);
122005
122500
  const otpPath = typeof props.valuePath === "string" && props.valuePath.startsWith("$service:") ? servicePath(props.valuePath) : "";
122006
- React11.useEffect(() => {
122501
+ React12.useEffect(() => {
122007
122502
  if (!ctx.provider || !otpPath) return;
122008
122503
  let subscribing = true;
122009
122504
  let active = true;
@@ -122094,10 +122589,10 @@ var init_renderNode = __esm({
122094
122589
  return /* @__PURE__ */ jsx11("div", { ...a11y, style: { width: "100%", height: 6, borderRadius: 999, background: C2(boundTokenName(props.trackColorPath, props.trackColor, ctx) ?? "surfaceTertiary", "#eee"), overflow: "hidden", ...wrap }, children: /* @__PURE__ */ jsx11("div", { style: { width: `${Math.round((p2 ?? 0.4) * 100)}%`, height: "100%", borderRadius: 999, background: C2(boundTokenName(props.tintPath, props.tint, ctx) ?? "accentPrimary", "#116DFF"), opacity: p2 == null ? 0.45 : 1, ...animatedFill ? { transition: ctx.motionTransition(ctx.kit?.motion) } : {} } }) });
122095
122590
  });
122096
122591
  SnackbarNode = withExtras("SnackbarNode", ({ props, ctx, wrap }) => {
122097
- const [phase, setPhase] = React11.useState("shown");
122592
+ const [phase, setPhase] = React12.useState("shown");
122098
122593
  const hideAfter = ctx.empty ? void 0 : snackbarAutoHideMs(props.durationMs);
122099
122594
  const identity = snackbarIdentity(props);
122100
- React11.useEffect(() => {
122595
+ React12.useEffect(() => {
122101
122596
  setPhase("shown");
122102
122597
  if (hideAfter === void 0) return;
122103
122598
  let fade;
@@ -122126,8 +122621,8 @@ var init_renderNode = __esm({
122126
122621
  const tint = C2(boundTokenName(props.tintPath, props.tint, ctx) ?? "accentPrimary", "#116DFF");
122127
122622
  const track = activityRingTrack(C2, tint, { cssMix: true });
122128
122623
  const thick = Math.max(3, Math.round(size / 8));
122129
- const bound = useResolvedScalar(props.valuePath, ctx);
122130
- const aiRaw = props.valuePath != null ? bound : props.value;
122624
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
122625
+ const aiRaw = props.valuePath != null ? bound2 : props.value;
122131
122626
  const aiNum = typeof aiRaw === "number" ? aiRaw : typeof aiRaw === "string" && aiRaw.trim() !== "" ? Number(aiRaw) : void 0;
122132
122627
  const determinate = !props.indeterminate && aiNum !== void 0 && Number.isFinite(aiNum);
122133
122628
  if (determinate) {
@@ -122149,12 +122644,12 @@ var init_renderNode = __esm({
122149
122644
  ModalBottomSheetNode = withExtras("ModalBottomSheetNode", ({ props, ctx, wrap }) => {
122150
122645
  const sheetTitle = useBoundString(props.title, ctx);
122151
122646
  const C2 = ctx.color;
122152
- const bound = useResolvedScalar(props.presentedPath, ctx);
122647
+ const bound2 = useResolvedScalar(props.presentedPath, ctx);
122153
122648
  const gated2 = props.presentedPath != null || props.presented != null;
122154
- const presented = props.presentedPath != null ? bound : props.presented;
122649
+ const presented = props.presentedPath != null ? bound2 : props.presented;
122155
122650
  const gateOpen = !gated2 || presented === true || presented === "true";
122156
- const [dismissed, setDismissed] = React11.useState(false);
122157
- React11.useEffect(() => {
122651
+ const [dismissed, setDismissed] = React12.useState(false);
122652
+ React12.useEffect(() => {
122158
122653
  if (!gateOpen) setDismissed(false);
122159
122654
  }, [gateOpen]);
122160
122655
  const shown2 = gateOpen && !dismissed;
@@ -122162,26 +122657,26 @@ var init_renderNode = __esm({
122162
122657
  const dismissible = props.dismissible !== false;
122163
122658
  const edge = sheetEdge(props.edge);
122164
122659
  const detents = edge === "bottom" ? sheetDetents(props.detents) : [];
122165
- const [detentIndex, setDetentIndex] = React11.useState(0);
122166
- React11.useEffect(() => {
122660
+ const [detentIndex, setDetentIndex] = React12.useState(0);
122661
+ React12.useEffect(() => {
122167
122662
  if (!shown2) setDetentIndex(0);
122168
122663
  }, [shown2]);
122169
- const dialogRef = React11.useRef(null);
122664
+ const dialogRef = React12.useRef(null);
122170
122665
  const trapTab = useModalOverlay(dialogRef, shown2 && modal);
122171
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
122666
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss });
122172
122667
  latest.current = { ctx, onDismiss: props.onDismiss };
122173
- const closed = React11.useRef(false);
122174
- React11.useEffect(() => {
122668
+ const closed = React12.useRef(false);
122669
+ React12.useEffect(() => {
122175
122670
  if (shown2) closed.current = false;
122176
122671
  }, [shown2]);
122177
- const dismiss = React11.useCallback(() => {
122672
+ const dismiss = React12.useCallback(() => {
122178
122673
  if (closed.current) return;
122179
122674
  closed.current = true;
122180
122675
  setDismissed(true);
122181
122676
  const { ctx: now, onDismiss } = latest.current;
122182
122677
  if (onDismiss != null) now.onAction?.(resolveItemDeep2(onDismiss, now));
122183
122678
  }, []);
122184
- React11.useEffect(() => {
122679
+ React12.useEffect(() => {
122185
122680
  if (!shown2 || !dismissible) return;
122186
122681
  const doc = dialogRef.current?.ownerDocument;
122187
122682
  if (!doc) return;
@@ -122195,11 +122690,11 @@ var init_renderNode = __esm({
122195
122690
  doc.addEventListener("keydown", onKey, true);
122196
122691
  return () => doc.removeEventListener("keydown", onKey, true);
122197
122692
  }, [shown2, dismissible, dismiss]);
122198
- const drag = React11.useRef(null);
122693
+ const drag = React12.useRef(null);
122199
122694
  const reduceMotion = ctx.reduceMotion();
122200
- const [mounted, setMounted] = React11.useState(shown2);
122201
- const [entered, setEntered] = React11.useState(shown2 && ctx.staticRender === true);
122202
- React11.useEffect(() => {
122695
+ const [mounted, setMounted] = React12.useState(shown2);
122696
+ const [entered, setEntered] = React12.useState(shown2 && ctx.staticRender === true);
122697
+ React12.useEffect(() => {
122203
122698
  if (shown2) {
122204
122699
  setMounted(true);
122205
122700
  if (reduceMotion || typeof requestAnimationFrame !== "function") {
@@ -122223,8 +122718,8 @@ var init_renderNode = __esm({
122223
122718
  const t2 = setTimeout(() => setMounted(false), DRAWER_EXIT_MS);
122224
122719
  return () => clearTimeout(t2);
122225
122720
  }, [shown2, reduceMotion]);
122226
- const scrimRef = React11.useRef(null);
122227
- const [rtl, setRtl] = React11.useState(false);
122721
+ const scrimRef = React12.useRef(null);
122722
+ const [rtl, setRtl] = React12.useState(false);
122228
122723
  useIsomorphicLayoutEffect(() => {
122229
122724
  const el2 = scrimRef.current;
122230
122725
  if (el2 && el2.ownerDocument.defaultView) setRtl(el2.ownerDocument.defaultView.getComputedStyle(el2).direction === "rtl");
@@ -122328,12 +122823,12 @@ var init_renderNode = __esm({
122328
122823
  BottomDrawerNode = withExtras("BottomDrawerNode", ({ props, ctx, wrap, nodeId, nodeExtras = {} }) => {
122329
122824
  const C2 = ctx.color;
122330
122825
  const label3 = useBoundString(props.label, ctx);
122331
- const bound = useResolvedScalar(props.presentedPath, ctx);
122826
+ const bound2 = useResolvedScalar(props.presentedPath, ctx);
122332
122827
  const gated2 = props.presentedPath != null || props.presented != null;
122333
- const presented = props.presentedPath != null ? bound : props.presented;
122828
+ const presented = props.presentedPath != null ? bound2 : props.presented;
122334
122829
  const gateOpen = !gated2 || presented === true || presented === "true";
122335
- const [dismissed, setDismissed] = React11.useState(false);
122336
- React11.useEffect(() => {
122830
+ const [dismissed, setDismissed] = React12.useState(false);
122831
+ React12.useEffect(() => {
122337
122832
  if (!gateOpen) setDismissed(false);
122338
122833
  }, [gateOpen]);
122339
122834
  const shown2 = gateOpen && !dismissed;
@@ -122341,18 +122836,18 @@ var init_renderNode = __esm({
122341
122836
  const autoMs = drawerAutoDismissMs(props.autoDismissMs);
122342
122837
  const placement = sheetPlacement(props.placement);
122343
122838
  const detents = sheetDetents(props.detents);
122344
- const [detentIndex, setDetentIndex] = React11.useState(0);
122345
- const [expanded, setExpanded] = React11.useState(false);
122346
- React11.useEffect(() => {
122839
+ const [detentIndex, setDetentIndex] = React12.useState(0);
122840
+ const [expanded, setExpanded] = React12.useState(false);
122841
+ React12.useEffect(() => {
122347
122842
  if (!shown2) {
122348
122843
  setDetentIndex(0);
122349
122844
  setExpanded(false);
122350
122845
  }
122351
122846
  }, [shown2]);
122352
122847
  const reduceMotion = ctx.reduceMotion();
122353
- const [mounted, setMounted] = React11.useState(shown2);
122354
- const [entered, setEntered] = React11.useState(shown2 && ctx.staticRender === true);
122355
- React11.useEffect(() => {
122848
+ const [mounted, setMounted] = React12.useState(shown2);
122849
+ const [entered, setEntered] = React12.useState(shown2 && ctx.staticRender === true);
122850
+ React12.useEffect(() => {
122356
122851
  if (shown2) {
122357
122852
  setMounted(true);
122358
122853
  if (reduceMotion || typeof requestAnimationFrame !== "function") {
@@ -122376,10 +122871,10 @@ var init_renderNode = __esm({
122376
122871
  const t2 = setTimeout(() => setMounted(false), DRAWER_EXIT_MS);
122377
122872
  return () => clearTimeout(t2);
122378
122873
  }, [shown2, reduceMotion]);
122379
- const anchorRef = React11.useRef(null);
122380
- const panelRef = React11.useRef(null);
122381
- const [host, setHost] = React11.useState(null);
122382
- const [hostTop, setHostTop] = React11.useState(true);
122874
+ const anchorRef = React12.useRef(null);
122875
+ const panelRef = React12.useRef(null);
122876
+ const [host, setHost] = React12.useState(null);
122877
+ const [hostTop, setHostTop] = React12.useState(true);
122383
122878
  useIsomorphicLayoutEffect(() => {
122384
122879
  if (!host) {
122385
122880
  setHostTop(true);
@@ -122407,7 +122902,7 @@ var init_renderNode = __esm({
122407
122902
  setHost(overlay ?? own6(DRAWER_HOST_ATTR));
122408
122903
  }, [mounted, placement]);
122409
122904
  const overHost = host?.hasAttribute(SHEET_OVERLAY_HOST_ATTR) ?? false;
122410
- const [regionPx, setRegionPx] = React11.useState(0);
122905
+ const [regionPx, setRegionPx] = React12.useState(0);
122411
122906
  useIsomorphicLayoutEffect(() => {
122412
122907
  if (!detents.length || !mounted) return;
122413
122908
  const region = host ? overHost ? host.parentElement : host.previousElementSibling : null;
@@ -122434,38 +122929,38 @@ var init_renderNode = __esm({
122434
122929
  resizeObserver?.disconnect();
122435
122930
  };
122436
122931
  }, [host, overHost, mounted, detents.length]);
122437
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
122932
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss });
122438
122933
  latest.current = { ctx, onDismiss: props.onDismiss };
122439
- const closed = React11.useRef(false);
122440
- const remaining = React11.useRef(autoMs ?? 0);
122441
- React11.useEffect(() => {
122934
+ const closed = React12.useRef(false);
122935
+ const remaining = React12.useRef(autoMs ?? 0);
122936
+ React12.useEffect(() => {
122442
122937
  if (!shown2) return;
122443
122938
  closed.current = false;
122444
122939
  remaining.current = autoMs ?? 0;
122445
122940
  }, [shown2, autoMs]);
122446
- const close = React11.useCallback(() => {
122941
+ const close = React12.useCallback(() => {
122447
122942
  if (closed.current) return;
122448
122943
  closed.current = true;
122449
122944
  setDismissed(true);
122450
122945
  const { ctx: now, onDismiss } = latest.current;
122451
122946
  if (onDismiss != null) now.onAction?.(resolveItemDeep2(onDismiss, now));
122452
122947
  }, []);
122453
- const toDetent = React11.useCallback((next, from) => {
122948
+ const toDetent = React12.useCallback((next, from) => {
122454
122949
  if (next > from) setExpanded(true);
122455
122950
  setDetentIndex(next);
122456
122951
  }, []);
122457
- const [hover, setHover] = React11.useState(false);
122458
- const [pressed, setPressed] = React11.useState(false);
122459
- const [focusIn, setFocusIn] = React11.useState(false);
122952
+ const [hover, setHover] = React12.useState(false);
122953
+ const [pressed, setPressed] = React12.useState(false);
122954
+ const [focusIn, setFocusIn] = React12.useState(false);
122460
122955
  const paused = hover || pressed || focusIn;
122461
- React11.useEffect(() => {
122956
+ React12.useEffect(() => {
122462
122957
  if (!shown2) {
122463
122958
  setHover(false);
122464
122959
  setPressed(false);
122465
122960
  setFocusIn(false);
122466
122961
  }
122467
122962
  }, [shown2]);
122468
- React11.useEffect(() => {
122963
+ React12.useEffect(() => {
122469
122964
  if (!shown2 || !hostTop || autoMs == null || paused || expanded) return;
122470
122965
  const since = Date.now();
122471
122966
  const t2 = setTimeout(() => {
@@ -122476,7 +122971,7 @@ var init_renderNode = __esm({
122476
122971
  remaining.current = drawerRemainingMs(remaining.current, Date.now() - since);
122477
122972
  };
122478
122973
  }, [shown2, hostTop, autoMs, paused, expanded, close]);
122479
- React11.useEffect(() => {
122974
+ React12.useEffect(() => {
122480
122975
  if (!shown2 || !dismissible) return;
122481
122976
  const doc = panelRef.current?.ownerDocument;
122482
122977
  if (!doc) return;
@@ -122489,13 +122984,13 @@ var init_renderNode = __esm({
122489
122984
  doc.addEventListener("keydown", onKey, true);
122490
122985
  return () => doc.removeEventListener("keydown", onKey, true);
122491
122986
  }, [shown2, dismissible, close, host]);
122492
- const drag = React11.useRef(null);
122493
- const dragged = React11.useRef(false);
122494
- const [dragDy, setDragDy] = React11.useState(0);
122495
- React11.useEffect(() => {
122987
+ const drag = React12.useRef(null);
122988
+ const dragged = React12.useRef(false);
122989
+ const [dragDy, setDragDy] = React12.useState(0);
122990
+ React12.useEffect(() => {
122496
122991
  if (!shown2) setDragDy(0);
122497
122992
  }, [shown2]);
122498
- const dragState = React11.useRef({ index: 0, count: 0, dismissible });
122993
+ const dragState = React12.useRef({ index: 0, count: 0, dismissible });
122499
122994
  if (!shown2 && !mounted) return /* @__PURE__ */ jsx11("span", { ref: anchorRef, "data-bottom-drawer-anchor": "", hidden: true, ...{ [NODE_EXTRAS_TARGET]: "bottom-drawer-panel" } });
122500
122995
  const sheet = idiomControls(ctx.idiom).sheet;
122501
122996
  const r3 = `${sheet.cornerRadius}px`;
@@ -122637,23 +123132,23 @@ var init_renderNode = __esm({
122637
123132
  const rich = title !== "";
122638
123133
  const trigger = resolveTooltipTrigger(props.trigger, "pointer");
122639
123134
  const edge = resolveOverlayEdge("Tooltip", props.edge);
122640
- const [open, setOpen] = React11.useState(false);
122641
- const anchorRef = React11.useRef(null);
122642
- const bubbleRef = React11.useRef(null);
122643
- const pressTimer = React11.useRef(null);
123135
+ const [open, setOpen] = React12.useState(false);
123136
+ const anchorRef = React12.useRef(null);
123137
+ const bubbleRef = React12.useRef(null);
123138
+ const pressTimer = React12.useRef(null);
122644
123139
  const placement = useFlippedEdge(edge, open, bubbleRef, anchorRef);
122645
123140
  const placed = placement.edge;
122646
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss, open });
123141
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss, open });
122647
123142
  latest.current = { ctx, onDismiss: props.onDismiss, open };
122648
- const holding = React11.useRef({ hover: false, focus: false });
122649
- const [needsTabStop, setNeedsTabStop] = React11.useState(false);
123143
+ const holding = React12.useRef({ hover: false, focus: false });
123144
+ const [needsTabStop, setNeedsTabStop] = React12.useState(false);
122650
123145
  useIsomorphicLayoutEffect(() => {
122651
123146
  const el2 = anchorRef.current;
122652
123147
  const want = trigger === "hover" && el2 != null && !hasTabStop(el2);
122653
123148
  if (want !== needsTabStop) setNeedsTabStop(want);
122654
123149
  });
122655
- const show = React11.useCallback(() => setOpen(true), []);
122656
- const dismiss = React11.useCallback(() => {
123150
+ const show = React12.useCallback(() => setOpen(true), []);
123151
+ const dismiss = React12.useCallback(() => {
122657
123152
  holding.current = { hover: false, focus: false };
122658
123153
  const { ctx: now, onDismiss, open: wasOpen } = latest.current;
122659
123154
  if (!wasOpen) return;
@@ -122661,7 +123156,7 @@ var init_renderNode = __esm({
122661
123156
  setOpen(false);
122662
123157
  if (onDismiss != null) now.onAction?.(resolveItemDeep2(onDismiss, now));
122663
123158
  }, []);
122664
- React11.useEffect(() => {
123159
+ React12.useEffect(() => {
122665
123160
  if (!open) return;
122666
123161
  const doc = bubbleRef.current?.ownerDocument;
122667
123162
  if (!doc) return;
@@ -122685,7 +123180,7 @@ var init_renderNode = __esm({
122685
123180
  if (timer) clearTimeout(timer);
122686
123181
  };
122687
123182
  }, [open, trigger, dismiss]);
122688
- React11.useEffect(() => () => {
123183
+ React12.useEffect(() => () => {
122689
123184
  if (pressTimer.current) clearTimeout(pressTimer.current);
122690
123185
  }, []);
122691
123186
  const cancelPress = () => {
@@ -122725,7 +123220,7 @@ var init_renderNode = __esm({
122725
123220
  };
122726
123221
  const hint = [title, text11].filter((s2) => s2 !== "").join(". ");
122727
123222
  const anchor = props.anchor ? renderNode(props.anchor, ctx) : null;
122728
- const wrapperHintId = `hm-tip-hint${React11.useId()}`;
123223
+ const wrapperHintId = `hm-tip-hint${React12.useId()}`;
122729
123224
  useIsomorphicLayoutEffect(() => {
122730
123225
  const wrapper = anchorRef.current;
122731
123226
  if (!wrapper || !hint || needsTabStop) return;
@@ -122747,7 +123242,7 @@ var init_renderNode = __esm({
122747
123242
  /* @__PURE__ */ jsx11(OverlayAnchorClip, { wrap, children: needsTabStop ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
122748
123243
  anchor,
122749
123244
  hint && /* @__PURE__ */ jsx11("span", { id: wrapperHintId, hidden: true, "data-hm-a11y-hint": "", children: hint })
122750
- ] }) : hint && React11.isValidElement(anchor) ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
123245
+ ] }) : hint && React12.isValidElement(anchor) ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
122751
123246
  /* @__PURE__ */ jsx11(A11yHintDescription, { hint, children: anchor }),
122752
123247
  /* @__PURE__ */ jsx11("span", { id: wrapperHintId, hidden: true, "data-hm-a11y-hint": "", children: hint })
122753
123248
  ] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
@@ -122762,30 +123257,30 @@ var init_renderNode = __esm({
122762
123257
  });
122763
123258
  PopoverNode = withExtras("PopoverNode", ({ props, ctx, wrap }) => {
122764
123259
  const C2 = ctx.color;
122765
- const bound = useResolvedScalar(props.presentedPath, ctx);
123260
+ const bound2 = useResolvedScalar(props.presentedPath, ctx);
122766
123261
  const gated2 = props.presentedPath != null || props.presented != null;
122767
- const gate = props.presentedPath != null ? bound : props.presented;
123262
+ const gate = props.presentedPath != null ? bound2 : props.presented;
122768
123263
  const gateOpen = gate === true || gate === "true";
122769
123264
  const literal = props.presentedPath == null && props.presented != null;
122770
123265
  const identity = { path: props.presentedPath, presented: props.presented, provider: ctx.provider };
122771
- const [local, setLocal] = React11.useState({ ...identity, opened: false, dismissed: false });
123266
+ const [local, setLocal] = React12.useState({ ...identity, opened: false, dismissed: false });
122772
123267
  const sameGate = local.path === identity.path && local.presented === identity.presented && local.provider === identity.provider;
122773
123268
  const current = sameGate ? local : { ...identity, opened: false, dismissed: false };
122774
123269
  if (!sameGate) setLocal(current);
122775
- React11.useEffect(() => {
123270
+ React12.useEffect(() => {
122776
123271
  if (!gateOpen) setLocal((previous) => previous.dismissed ? { ...previous, dismissed: false } : previous);
122777
123272
  }, [gateOpen]);
122778
123273
  const shown2 = !gated2 || (gateOpen || current.opened) && !current.dismissed;
122779
123274
  const modal = gated2 && isOverlayModal("Popover", props.modal);
122780
- const dialogRef = React11.useRef(null);
122781
- const anchorRef = React11.useRef(null);
122782
- const boxRef = React11.useRef(null);
123275
+ const dialogRef = React12.useRef(null);
123276
+ const anchorRef = React12.useRef(null);
123277
+ const boxRef = React12.useRef(null);
122783
123278
  const trapTab = useModalOverlay(dialogRef, shown2 && modal);
122784
123279
  const placement = useFlippedEdge(resolveOverlayEdge("Popover", props.edge), gated2 && shown2, dialogRef, boxRef, 6);
122785
123280
  const placed = placement.edge;
122786
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
123281
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss });
122787
123282
  latest.current = { ctx, onDismiss: props.onDismiss };
122788
- React11.useEffect(() => {
123283
+ React12.useEffect(() => {
122789
123284
  if (!gated2 || !shown2) return;
122790
123285
  const doc = dialogRef.current?.ownerDocument;
122791
123286
  if (!doc) return;
@@ -122823,8 +123318,8 @@ var init_renderNode = __esm({
122823
123318
  if (shown2) return;
122824
123319
  setLocal({ ...identity, opened: true, dismissed: false });
122825
123320
  } : void 0;
122826
- const [anchorIsButton, setAnchorIsButton] = React11.useState(false);
122827
- const [needsSeparateOpener, setNeedsSeparateOpener] = React11.useState(false);
123321
+ const [anchorIsButton, setAnchorIsButton] = React12.useState(false);
123322
+ const [needsSeparateOpener, setNeedsSeparateOpener] = React12.useState(false);
122828
123323
  useIsomorphicLayoutEffect(() => {
122829
123324
  const el2 = anchorRef.current;
122830
123325
  const want = literal && el2 != null && !hasTabStop(el2);
@@ -122851,10 +123346,10 @@ var init_renderNode = __esm({
122851
123346
  });
122852
123347
  ChipsInputNode = withExtras("ChipsInputNode", ({ props, ctx, wrap }) => {
122853
123348
  const placeholderText = useBoundString(props.placeholder, ctx);
122854
- const [draft, setDraft] = React11.useState("");
123349
+ const [draft, setDraft] = React12.useState("");
122855
123350
  const C2 = ctx.color;
122856
- const bound = useResolvedScalar(props.valuesPath, ctx);
122857
- const raw = props.valuesPath != null ? bound : props.values;
123351
+ const bound2 = useResolvedScalar(props.valuesPath, ctx);
123352
+ const raw = props.valuesPath != null ? bound2 : props.values;
122858
123353
  const values = Array.isArray(raw) ? raw : [];
122859
123354
  const hasAddField = props.onAdd != null;
122860
123355
  const canAdd = !!ctx.onAction && hasAddField && !props.disabled;
@@ -122943,9 +123438,9 @@ var init_renderNode = __esm({
122943
123438
  });
122944
123439
  TableNode = withExtras("TableNode", ({ props, ctx, wrap }) => {
122945
123440
  const C2 = ctx.color;
122946
- const bound = useResolvedScalar(props.rowsPath, ctx);
123441
+ const bound2 = useResolvedScalar(props.rowsPath, ctx);
122947
123442
  const cols = Array.isArray(props.columns) ? props.columns : [];
122948
- const rawRows = props.rowsPath != null ? bound : props.rows;
123443
+ const rawRows = props.rowsPath != null ? bound2 : props.rows;
122949
123444
  const rows = Array.isArray(rawRows) ? rawRows : [];
122950
123445
  const cellStyle = (head) => ({ padding: "8px 12px", fontFamily: bodyFont(ctx), fontSize: pxToRem(14), textAlign: "left", borderBottom: `1px solid ${C2("border", "#eceef1")}`, color: head ? C2("textSecondary", "#636b78") : C2("textPrimary", "#13171e"), fontWeight: head ? 600 : 400, whiteSpace: "nowrap" });
122951
123446
  return /* @__PURE__ */ jsx11("div", { style: { width: "100%", boxSizing: "border-box", overflowX: "auto", border: `1px solid ${C2("border", "#e8eaed")}`, borderRadius: 10, ...wrap }, children: /* @__PURE__ */ jsxs8("table", { style: { width: "100%", borderCollapse: "collapse" }, children: [
@@ -122957,8 +123452,8 @@ var init_renderNode = __esm({
122957
123452
  ] }) });
122958
123453
  });
122959
123454
  GaugeRing = ({ ring, ctx, index, size, step, thick, track }) => {
122960
- const bound = useResolvedScalar(ring?.valuePath, ctx);
122961
- const rv = ring?.valuePath != null ? bound : ring?.value;
123455
+ const bound2 = useResolvedScalar(ring?.valuePath, ctx);
123456
+ const rv = ring?.valuePath != null ? bound2 : ring?.value;
122962
123457
  const rp = Math.max(0, Math.min(1, typeof rv === "number" && Number.isFinite(rv) ? rv : 0));
122963
123458
  const rt2 = ctx.color(ring?.tint ?? "accentPrimary", "#116DFF");
122964
123459
  const d2 = size - index * step, off = (size - d2) / 2;
@@ -122968,8 +123463,8 @@ var init_renderNode = __esm({
122968
123463
  GaugeNode = withExtras("GaugeNode", ({ props, ctx, wrap }) => {
122969
123464
  const C2 = ctx.color;
122970
123465
  const min = props.min ?? 0, max = props.max ?? 1;
122971
- const bound = useResolvedScalar(props.valuePath, ctx);
122972
- const gSource = props.valuePath != null ? bound : props.value;
123466
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
123467
+ const gSource = props.valuePath != null ? bound2 : props.value;
122973
123468
  const gRaw = typeof gSource === "string" && gSource.trim() !== "" && Number.isFinite(Number(gSource)) ? Number(gSource) : gSource;
122974
123469
  const v2 = typeof gRaw === "number" ? gRaw : (min + max) / 2;
122975
123470
  const pct = max > min ? Math.max(0, Math.min(1, (v2 - min) / (max - min))) : 0;
@@ -123005,8 +123500,8 @@ var init_renderNode = __esm({
123005
123500
  ratingMetrics = (size) => size === "sm" ? RATING_METRICS.sm : RATING_METRICS.md;
123006
123501
  RatingNode = withExtras("RatingNode", ({ props, ctx, wrap }) => {
123007
123502
  const C2 = ctx.color;
123008
- const bound = useResolvedScalar(props.valuePath, ctx);
123009
- const raw = props.valuePath != null ? bound : props.value;
123503
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
123504
+ const raw = props.valuePath != null ? bound2 : props.value;
123010
123505
  const val = typeof raw === "number" ? raw : 0;
123011
123506
  const max = props.max ?? 5;
123012
123507
  const m2 = ratingMetrics(props.size);
@@ -123024,8 +123519,8 @@ var init_renderNode = __esm({
123024
123519
  AvatarStripNode = withExtras("AvatarStripNode", ({ props, ctx, wrap }) => {
123025
123520
  const C2 = ctx.color;
123026
123521
  const path2 = props.avatarsPath ?? props.avatars_path;
123027
- const bound = useResolvedScalar(path2, ctx);
123028
- const raw = path2 != null ? bound : props.avatars;
123522
+ const bound2 = useResolvedScalar(path2, ctx);
123523
+ const raw = path2 != null ? bound2 : props.avatars;
123029
123524
  const avatars = Array.isArray(raw) ? raw : [];
123030
123525
  const size = props.size ?? 36;
123031
123526
  const maxVisible = props.maxVisible ?? 4;
@@ -123044,7 +123539,7 @@ var init_renderNode = __esm({
123044
123539
  const who = asText2(a2.initials).trim();
123045
123540
  const initials = avatarCircle(who || "?", size, C2, true, bodyFont(ctx));
123046
123541
  const photo = typeof a2.imageUrl === "string" && a2.imageUrl && !isBinding(a2.imageUrl) ? a2.imageUrl : "";
123047
- const circle = photo ? React11.cloneElement(
123542
+ const circle = photo ? React12.cloneElement(
123048
123543
  initials,
123049
123544
  { style: { ...initials.props.style, position: "relative", overflow: "hidden" } },
123050
123545
  initials.props.children,
@@ -123052,7 +123547,7 @@ var init_renderNode = __esm({
123052
123547
  e2.currentTarget.style.display = "none";
123053
123548
  }, style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" } })
123054
123549
  ) : initials;
123055
- return who ? /* @__PURE__ */ jsx11("div", { role: "listitem", style: wrapStyle, children: React11.cloneElement(circle, { role: "img", "aria-label": who }) }, i2) : /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: wrapStyle, children: circle }, i2);
123550
+ return who ? /* @__PURE__ */ jsx11("div", { role: "listitem", style: wrapStyle, children: React12.cloneElement(circle, { role: "img", "aria-label": who }) }, i2) : /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: wrapStyle, children: circle }, i2);
123056
123551
  }),
123057
123552
  overflow > 0 && /* @__PURE__ */ jsx11("div", { role: "listitem", style: { marginLeft: -(size - shift), width: size, height: size, borderRadius: "50%", border: `2px solid ${C2("surfacePrimary", "#fff")}`, background: C2("surfaceTertiary", "#e6e6e6"), color: C2("textPrimary", "#111"), display: "grid", placeItems: "center", fontSize: size * 0.32, fontWeight: 700, fontFamily: bodyFont(ctx) }, children: /* @__PURE__ */ jsxs8("span", { role: "img", "aria-label": `${overflow} more`, children: [
123058
123553
  "+",
@@ -123073,7 +123568,7 @@ var init_renderNode = __esm({
123073
123568
  const declared = Array.isArray(props.series) ? props.series : [];
123074
123569
  const multi = declared.length > 0;
123075
123570
  const singleBound = useBoundValue(ctx, typeof props.valuesPath === "string" && !multi ? props.valuesPath : "");
123076
- const seriesBindings = React11.useMemo(
123571
+ const seriesBindings = React12.useMemo(
123077
123572
  () => declared.map((d2) => typeof d2?.valuesPath === "string" ? d2.valuesPath : ""),
123078
123573
  // eslint-disable-next-line react-hooks/exhaustive-deps
123079
123574
  [declared.map((d2) => String(d2?.valuesPath ?? "")).join("\0")]
@@ -123167,8 +123662,8 @@ var init_renderNode = __esm({
123167
123662
  donutSliceOpacity = (i2) => Math.max(1 - i2 * 0.18, 0.25);
123168
123663
  DonutChartNode = withExtras("DonutChartNode", ({ props, ctx, wrap }) => {
123169
123664
  const C2 = ctx.color;
123170
- const bound = useResolvedScalar(props.slicesPath, ctx);
123171
- const slices = donutSlices(props.slicesPath != null ? bound : props.slices);
123665
+ const bound2 = useResolvedScalar(props.slicesPath, ctx);
123666
+ const slices = donutSlices(props.slicesPath != null ? bound2 : props.slices);
123172
123667
  const size = props.size ?? 160;
123173
123668
  const thickness = props.thickness ?? 28;
123174
123669
  const base = C2(String(resolveScalarStatic(props.color, ctx) ?? "accentPrimary"), "#116DFF");
@@ -123219,9 +123714,9 @@ var init_renderNode = __esm({
123219
123714
  ] }) });
123220
123715
  });
123221
123716
  ShapeNode = withExtras("ShapeNode", ({ props, ctx, wrap }) => {
123222
- const ref = React11.useRef(null);
123223
- const [box, setBox] = React11.useState(null);
123224
- React11.useEffect(() => {
123717
+ const ref = React12.useRef(null);
123718
+ const [box, setBox] = React12.useState(null);
123719
+ React12.useEffect(() => {
123225
123720
  const el2 = ref.current;
123226
123721
  if (!el2) return;
123227
123722
  const measure2 = () => {
@@ -123297,8 +123792,8 @@ var init_renderNode = __esm({
123297
123792
  };
123298
123793
  LegendNode = withExtras("LegendNode", ({ props, ctx, wrap }) => {
123299
123794
  const C2 = ctx.color;
123300
- const bound = useResolvedScalar(props.itemsPath, ctx);
123301
- const items = legendItems(props.itemsPath != null ? bound : props.items);
123795
+ const bound2 = useResolvedScalar(props.itemsPath, ctx);
123796
+ const items = legendItems(props.itemsPath != null ? bound2 : props.items);
123302
123797
  if (items.length === 0) return /* @__PURE__ */ jsx11("div", { style: { ...wrap } });
123303
123798
  const vertical = props.orientation === "vertical";
123304
123799
  return /* @__PURE__ */ jsx11("ul", { style: {
@@ -123363,8 +123858,8 @@ var init_renderNode = __esm({
123363
123858
  const boundState = useResolvedScalar(props.statePath, ctx);
123364
123859
  const boundDelivery = useResolvedScalar(props.deliveryPath, ctx);
123365
123860
  const boundRate = useResolvedScalar(props.ratePath, ctx);
123366
- const num4 = (bound, literal, dflt) => {
123367
- const v2 = bound !== void 0 && bound !== null ? bound : literal;
123861
+ const num4 = (bound2, literal, dflt) => {
123862
+ const v2 = bound2 !== void 0 && bound2 !== null ? bound2 : literal;
123368
123863
  const n2 = typeof v2 === "number" ? v2 : typeof v2 === "string" ? Number(v2) : NaN;
123369
123864
  return Number.isFinite(n2) ? n2 : dflt;
123370
123865
  };
@@ -123379,10 +123874,10 @@ var init_renderNode = __esm({
123379
123874
  const isPlayable = !isFailed && !isUploading;
123380
123875
  const isPlaying = state === "playing";
123381
123876
  const isLoading = state === "loading";
123382
- const [scrub, setScrub] = React11.useState(null);
123383
- const [seeked, setSeeked] = React11.useState(null);
123877
+ const [scrub, setScrub] = React12.useState(null);
123878
+ const [seeked, setSeeked] = React12.useState(null);
123384
123879
  const positionMs = Math.max(0, num4(props.positionMsPath != null ? boundPosition : void 0, props.positionMs, 0));
123385
- React11.useEffect(() => {
123880
+ React12.useEffect(() => {
123386
123881
  setSeeked(null);
123387
123882
  }, [positionMs]);
123388
123883
  const effectivePositionMs = seeked ?? positionMs;
@@ -123424,8 +123919,8 @@ var init_renderNode = __esm({
123424
123919
  const barW = Math.max(0.6, slot * 0.58);
123425
123920
  const cut2 = progress * W2;
123426
123921
  const rates = Array.isArray(props.rates) ? props.rates.map(Number).filter((n2) => n2 > 0) : [];
123427
- const [pickedRate, setPickedRate] = React11.useState(null);
123428
- React11.useEffect(() => {
123922
+ const [pickedRate, setPickedRate] = React12.useState(null);
123923
+ React12.useEffect(() => {
123429
123924
  setPickedRate(null);
123430
123925
  }, [rate]);
123431
123926
  const effectiveRate = pickedRate ?? rate;
@@ -123576,8 +124071,8 @@ var init_renderNode = __esm({
123576
124071
  });
123577
124072
  TimelineNode = withExtras("TimelineNode", ({ props, ctx, wrap }) => {
123578
124073
  const C2 = ctx.color;
123579
- const bound = useResolvedScalar(props.entriesPath, ctx);
123580
- const raw = props.entriesPath != null ? bound : props.entries;
124074
+ const bound2 = useResolvedScalar(props.entriesPath, ctx);
124075
+ const raw = props.entriesPath != null ? bound2 : props.entries;
123581
124076
  const entries = Array.isArray(raw) ? raw : [];
123582
124077
  return /* @__PURE__ */ jsx11("div", { style: { display: "flex", flexDirection: "column", width: "100%", ...wrap }, children: entries.map((e2, i2) => {
123583
124078
  const done = e2?.done === true;
@@ -123602,9 +124097,9 @@ var init_renderNode = __esm({
123602
124097
  const items = (props.__pager ? props.pages : props.items) ?? [];
123603
124098
  const pages2 = items.filter((page) => isNodeLike(page) || page?.type);
123604
124099
  const requested = Math.max(0, Math.min(pages2.length - 1, props.currentIndex ?? 0));
123605
- const [current, setCurrent] = React11.useState(requested);
123606
- const rail = React11.useRef(null);
123607
- const currentRef = React11.useRef(current);
124100
+ const [current, setCurrent] = React12.useState(requested);
124101
+ const rail = React12.useRef(null);
124102
+ const currentRef = React12.useRef(current);
123608
124103
  const itemsPath = props.itemsPath ?? props.items_path;
123609
124104
  const boundRail = !!itemsPath && !!items[0] && !!ctx.provider;
123610
124105
  const select2 = (index) => {
@@ -123613,12 +124108,12 @@ var init_renderNode = __esm({
123613
124108
  setCurrent(index);
123614
124109
  if (props.onChange && ctx.onAction) ctx.onAction({ ...props.onChange, args: { ...props.onChange.args ?? {}, index } });
123615
124110
  };
123616
- React11.useEffect(() => {
124111
+ React12.useEffect(() => {
123617
124112
  currentRef.current = requested;
123618
124113
  setCurrent(requested);
123619
124114
  if (rail.current && !boundRail) rail.current.scrollLeft = requested * rail.current.clientWidth;
123620
124115
  }, [requested, boundRail, pages2.length]);
123621
- React11.useEffect(() => {
124116
+ React12.useEffect(() => {
123622
124117
  const interval = props.autoplayIntervalMs;
123623
124118
  if (props.__pager || boundRail || !Number.isFinite(interval) || interval <= 0 || pages2.length < 2 || ctx.reduceMotion()) return;
123624
124119
  const timer = setInterval(() => {
@@ -123661,19 +124156,19 @@ var init_renderNode = __esm({
123661
124156
  const opts = Array.isArray(rawOpts) ? rawOpts : [];
123662
124157
  const selectedId = isBinding(props.selectedId) ? boundSel : props.selectedId;
123663
124158
  const selIdx = Math.max(0, opts.findIndex((o2) => o2?.id === selectedId));
123664
- const viewport = React11.useRef(null);
123665
- const settle = React11.useRef(void 0);
123666
- const pickerId = React11.useId();
124159
+ const viewport = React12.useRef(null);
124160
+ const settle = React12.useRef(void 0);
124161
+ const pickerId = React12.useId();
123667
124162
  const interactive = !!ctx.onAction && !!props.onChange;
123668
124163
  const emit = (index) => {
123669
124164
  const id = opts[index]?.id;
123670
124165
  if (!interactive || id == null || index === selIdx) return;
123671
124166
  ctx.onAction({ ...props.onChange, args: { ...props.onChange.args ?? {}, selectedId: String(id) } });
123672
124167
  };
123673
- React11.useEffect(() => {
124168
+ React12.useEffect(() => {
123674
124169
  if (viewport.current) viewport.current.scrollTop = selIdx * 32;
123675
124170
  }, [selIdx, opts.length]);
123676
- React11.useEffect(() => () => clearTimeout(settle.current), []);
124171
+ React12.useEffect(() => () => clearTimeout(settle.current), []);
123677
124172
  return /* @__PURE__ */ jsxs8("div", { style: { position: "relative", width: "100%", maxWidth: 220, height: 160, overflow: "hidden", background: C2("surfaceSecondary", "#f5f7fa"), borderRadius: 12, ...wrap }, children: [
123678
124173
  /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: { position: "absolute", top: 64, left: 8, right: 8, height: 32, background: C2("surfacePrimary", "#fff"), borderRadius: 8, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.06)" } }),
123679
124174
  /* @__PURE__ */ jsx11(
@@ -123715,8 +124210,8 @@ var init_renderNode = __esm({
123715
124210
  });
123716
124211
  ColorPickerNode = withExtras("ColorPickerNode", ({ props, ctx, wrap }) => {
123717
124212
  const C2 = ctx.color;
123718
- const bound = useResolvedScalar(props.valuePath, ctx);
123719
- const raw = props.valuePath != null ? bound : props.value;
124213
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
124214
+ const raw = props.valuePath != null ? bound2 : props.value;
123720
124215
  const cur = typeof raw === "string" ? raw : "#116DFF";
123721
124216
  const swatches = Array.isArray(props.swatches) ? props.swatches : ["#116DFF", "#23924D", "#E89F00", "#E62214", "#8B5CF6", "#111827"];
123722
124217
  const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, args: { ...props.onChange?.args ?? {}, value: hex2 } }) : void 0;
@@ -123784,23 +124279,23 @@ var init_renderNode = __esm({
123784
124279
  const hasEvents = !!(props.onMapTap || props.onMarkerTap || props.onRegionChange || props.onShapeTap);
123785
124280
  const boundShapes = useResolvedScalar(props.shapesPath, ctx);
123786
124281
  const shapesRaw = Array.isArray(boundShapes) ? boundShapes : Array.isArray(props.shapes) ? props.shapes : [];
123787
- const shapes = React11.useMemo(() => shapesRaw.map((sh) => {
124282
+ const shapes = React12.useMemo(() => shapesRaw.map((sh) => {
123788
124283
  const kind = parseShapeKind(sh?.kind);
123789
124284
  const pts = Array.isArray(sh?.points) ? sh.points.filter((p2) => p2 && typeof p2.latitude === "number" && typeof p2.longitude === "number") : [];
123790
124285
  const ring = kind === "circle" && pts.length ? circleRing(pts[0].latitude, pts[0].longitude, typeof sh.radiusM === "number" ? sh.radiusM : 0) : pts;
123791
124286
  return { ...sh, kind, points: ring };
123792
124287
  }), [JSON.stringify(shapesRaw)]);
123793
124288
  const boundCameraRaw = useResolvedScalar(props.cameraPath, ctx);
123794
- const commandedCamera = React11.useMemo(() => decodeCamera(boundCameraRaw), [boundCameraRaw]);
123795
- const [box, setBox] = React11.useState({ w: 400, h: h2 });
123796
- const [tileStatus, setTileStatus] = React11.useState({});
123797
- const [userCam, setUserCam] = React11.useState(null);
123798
- const dragRef = React11.useRef(null);
123799
- const dragMovedRef = React11.useRef(false);
123800
- const regionReportedRef = React11.useRef(false);
123801
- const [boxEl, setBoxEl] = React11.useState(null);
123802
- const attachBox = React11.useCallback((el2) => setBoxEl(el2), []);
123803
- React11.useEffect(() => {
124289
+ const commandedCamera = React12.useMemo(() => decodeCamera(boundCameraRaw), [boundCameraRaw]);
124290
+ const [box, setBox] = React12.useState({ w: 400, h: h2 });
124291
+ const [tileStatus, setTileStatus] = React12.useState({});
124292
+ const [userCam, setUserCam] = React12.useState(null);
124293
+ const dragRef = React12.useRef(null);
124294
+ const dragMovedRef = React12.useRef(false);
124295
+ const regionReportedRef = React12.useRef(false);
124296
+ const [boxEl, setBoxEl] = React12.useState(null);
124297
+ const attachBox = React12.useCallback((el2) => setBoxEl(el2), []);
124298
+ React12.useEffect(() => {
123804
124299
  const el2 = boxEl;
123805
124300
  if (!el2) return;
123806
124301
  const measure2 = () => {
@@ -123823,12 +124318,12 @@ var init_renderNode = __esm({
123823
124318
  const explicitSchematic = schematic && props.routeMode?.toLowerCase() === "schematic";
123824
124319
  const usesTileArm = !explicitSchematic && (otherTileReason || hasStaticMarkers) && (follow || !schematic);
123825
124320
  const pinsOnly = hasStaticMarkers && !otherTileReason;
123826
- const [userFix, setUserFix] = React11.useState(null);
123827
- const [followBroken, setFollowBroken] = React11.useState(false);
123828
- React11.useEffect(() => {
124321
+ const [userFix, setUserFix] = React12.useState(null);
124322
+ const [followBroken, setFollowBroken] = React12.useState(false);
124323
+ React12.useEffect(() => {
123829
124324
  if (follow) setFollowBroken(false);
123830
124325
  }, [follow]);
123831
- React11.useEffect(() => {
124326
+ React12.useEffect(() => {
123832
124327
  if (!observeUserLocation || !usesTileArm) return;
123833
124328
  const geo = typeof navigator !== "undefined" ? navigator.geolocation : void 0;
123834
124329
  if (!geo || typeof geo.watchPosition !== "function") return;
@@ -123855,7 +124350,7 @@ var init_renderNode = __esm({
123855
124350
  const z4 = userCam?.z ?? fitted;
123856
124351
  const cLat = followActive ? userFix.lat : userCam?.lat ?? baseLat;
123857
124352
  const cLng = followActive ? userFix.lng : userCam?.lng ?? baseLng;
123858
- React11.useEffect(() => {
124353
+ React12.useEffect(() => {
123859
124354
  const resolved2 = resolveCamera(commandedCamera, cLat, cLng, z4);
123860
124355
  if (!resolved2) return;
123861
124356
  setFollowBroken(true);
@@ -123937,7 +124432,7 @@ var init_renderNode = __esm({
123937
124432
  const endDrag = () => {
123938
124433
  dragRef.current = null;
123939
124434
  };
123940
- React11.useEffect(() => {
124435
+ React12.useEffect(() => {
123941
124436
  if (!boxEl || !usesTileArm || !interactive) return;
123942
124437
  const zoomOnWheel = (event) => {
123943
124438
  event.preventDefault();
@@ -123947,7 +124442,7 @@ var init_renderNode = __esm({
123947
124442
  boxEl.addEventListener("wheel", zoomOnWheel, { passive: false });
123948
124443
  return () => boxEl.removeEventListener("wheel", zoomOnWheel);
123949
124444
  }, [boxEl, usesTileArm, interactive, z4, cLat, cLng]);
123950
- React11.useEffect(() => {
124445
+ React12.useEffect(() => {
123951
124446
  const action = props.onRegionChange;
123952
124447
  const fire = ctx.onAction;
123953
124448
  if (!usesTileArm || !action || !fire) return;
@@ -124084,30 +124579,30 @@ var init_renderNode = __esm({
124084
124579
  const items = Array.isArray(props.items) ? props.items : [];
124085
124580
  const pages2 = items.filter((p2) => isNodeLike(p2) || p2?.type);
124086
124581
  const count2 = pages2.length;
124087
- const [index, setIndex] = React11.useState(typeof props.currentIndex === "number" ? props.currentIndex : 0);
124088
- const indexRef = React11.useRef(index);
124089
- const trackRef = React11.useRef(null);
124090
- const [hovered, setHovered] = React11.useState(false);
124091
- const [focused, setFocused] = React11.useState(false);
124582
+ const [index, setIndex] = React12.useState(typeof props.currentIndex === "number" ? props.currentIndex : 0);
124583
+ const indexRef = React12.useRef(index);
124584
+ const trackRef = React12.useRef(null);
124585
+ const [hovered, setHovered] = React12.useState(false);
124586
+ const [focused, setFocused] = React12.useState(false);
124092
124587
  const paused = hovered || focused;
124093
124588
  const interval = typeof props.autoplayIntervalMs === "number" && props.autoplayIntervalMs > 0 ? props.autoplayIntervalMs : 0;
124094
124589
  const autoplay = interval > 0 && count2 > 1 && !ctx.reduceMotion();
124095
124590
  const onChange = props.onChange;
124096
- const onChangeRef = React11.useRef(onChange);
124591
+ const onChangeRef = React12.useRef(onChange);
124097
124592
  onChangeRef.current = onChange;
124098
- const autoScrollRef = React11.useRef(null);
124099
- const endAutoScroll = React11.useCallback(() => {
124593
+ const autoScrollRef = React12.useRef(null);
124594
+ const endAutoScroll = React12.useCallback(() => {
124100
124595
  if (autoScrollRef.current) clearTimeout(autoScrollRef.current.timer);
124101
124596
  autoScrollRef.current = null;
124102
124597
  }, []);
124103
124598
  const requestedIndex = Math.max(0, Math.min(count2 - 1, typeof props.currentIndex === "number" ? props.currentIndex : 0));
124104
- React11.useEffect(() => {
124599
+ React12.useEffect(() => {
124105
124600
  endAutoScroll();
124106
124601
  indexRef.current = requestedIndex;
124107
124602
  setIndex(requestedIndex);
124108
124603
  if (trackRef.current) trackRef.current.scrollLeft = requestedIndex * trackRef.current.clientWidth;
124109
124604
  }, [requestedIndex, count2, endAutoScroll]);
124110
- React11.useEffect(() => {
124605
+ React12.useEffect(() => {
124111
124606
  const el2 = trackRef.current;
124112
124607
  el2?.addEventListener("scrollend", endAutoScroll);
124113
124608
  return () => {
@@ -124115,14 +124610,14 @@ var init_renderNode = __esm({
124115
124610
  endAutoScroll();
124116
124611
  };
124117
124612
  }, [endAutoScroll]);
124118
- const pageTo = React11.useCallback((page) => {
124613
+ const pageTo = React12.useCallback((page) => {
124119
124614
  if (page === indexRef.current) return;
124120
124615
  indexRef.current = page;
124121
124616
  setIndex(page);
124122
124617
  const action = onChangeRef.current;
124123
124618
  if (action && ctx.onAction) ctx.onAction({ ...action, args: { ...action.args ?? {}, index: page } });
124124
124619
  }, [ctx]);
124125
- React11.useEffect(() => {
124620
+ React12.useEffect(() => {
124126
124621
  if (!autoplay || paused) return;
124127
124622
  const id = setInterval(() => {
124128
124623
  const next = (indexRef.current + 1) % count2;
@@ -124187,7 +124682,7 @@ var init_renderNode = __esm({
124187
124682
  });
124188
124683
  BannerNode = withExtras("BannerNode", ({ props, ctx, wrap }) => {
124189
124684
  const C2 = ctx.color;
124190
- const [dismissed, setDismissed] = React11.useState(false);
124685
+ const [dismissed, setDismissed] = React12.useState(false);
124191
124686
  if (dismissed) return null;
124192
124687
  const accent = sevColor(ctx, props.severity ?? "info");
124193
124688
  return /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 11, width: "100%", boxSizing: "border-box", borderRadius: ctx.radius("md", 10), padding: 13, background: `color-mix(in srgb, ${accent} 12%, ${C2("surfacePrimary", "#fff")})`, border: `1px solid color-mix(in srgb, ${accent} 32%, transparent)`, ...wrap }, children: [
@@ -124220,15 +124715,15 @@ var init_renderNode = __esm({
124220
124715
  const rawImageUrl = props.imageUrl != null && isBinding(props.imageUrl) ? boundImageUrl : props.imageUrl;
124221
124716
  const heroSrc = typeof rawImageUrl === "string" && rawImageUrl !== "" ? rawImageUrl : typeof props.imageAsset === "string" && isWebAssetPath(props.imageAsset) ? props.imageAsset : void 0;
124222
124717
  const resolvedHero = heroSrc ? resolveAssetUrl(heroSrc, ctx.assetBaseUrl) : void 0;
124223
- const [failedHero, setFailedHero] = React11.useState(null);
124718
+ const [failedHero, setFailedHero] = React12.useState(null);
124224
124719
  const imageUrl = resolvedHero && resolvedHero !== failedHero ? resolvedHero : void 0;
124225
124720
  const expanded = Math.max(0, typeof props.expandedHeight === "number" && Number.isFinite(props.expandedHeight) ? props.expandedHeight : 280);
124226
124721
  const collapsed = Math.max(0, Math.min(expanded, typeof props.collapsedHeight === "number" && props.collapsedHeight > 0 ? props.collapsedHeight : 64));
124227
124722
  const parallax = typeof props.parallaxFactor === "number" && Number.isFinite(props.parallaxFactor) ? Math.max(0, Math.min(1, props.parallaxFactor)) : 0.5;
124228
124723
  const span = Math.max(1, expanded - collapsed);
124229
- const rootRef = React11.useRef(null);
124230
- const [offset, setOffset] = React11.useState(0);
124231
- React11.useEffect(() => {
124724
+ const rootRef = React12.useRef(null);
124725
+ const [offset, setOffset] = React12.useState(0);
124726
+ React12.useEffect(() => {
124232
124727
  const el2 = rootRef.current;
124233
124728
  const win = el2?.ownerDocument?.defaultView;
124234
124729
  if (!el2 || !win) return;
@@ -124330,22 +124825,22 @@ var init_renderNode = __esm({
124330
124825
  const boundEnd = useResolvedScalar(props.selectedEndDatePath, ctx);
124331
124826
  const seedStart = (props.selectedStartDatePath != null ? typeof boundStart === "string" ? boundStart : "" : typeof props.selectedStartDate === "string" ? props.selectedStartDate : "") || "";
124332
124827
  const seedEnd = (props.selectedEndDatePath != null ? typeof boundEnd === "string" ? boundEnd : "" : typeof props.selectedEndDate === "string" ? props.selectedEndDate : "") || "";
124333
- const [range, setRange] = React11.useState({ start: seedStart, end: seedEnd });
124334
- const lastRangeSeed = React11.useRef(`${seedStart}|${seedEnd}`);
124335
- React11.useEffect(() => {
124828
+ const [range, setRange] = React12.useState({ start: seedStart, end: seedEnd });
124829
+ const lastRangeSeed = React12.useRef(`${seedStart}|${seedEnd}`);
124830
+ React12.useEffect(() => {
124336
124831
  const key3 = `${seedStart}|${seedEnd}`;
124337
124832
  if (lastRangeSeed.current === key3) return;
124338
124833
  lastRangeSeed.current = key3;
124339
124834
  setRange({ start: seedStart, end: seedEnd });
124340
124835
  }, [seedStart, seedEnd]);
124341
- const seed2 = React11.useMemo(
124836
+ const seed2 = React12.useMemo(
124342
124837
  () => monthSeed(drivenYear ?? props.year, drivenMonth ?? props.month, selectedDate),
124343
124838
  [drivenYear, drivenMonth, props.year, props.month, selectedDate]
124344
124839
  );
124345
- const [view, setView] = React11.useState(seed2);
124840
+ const [view, setView] = React12.useState(seed2);
124346
124841
  const seedKey = `${seed2.year}-${seed2.month}`;
124347
- const lastSeed = React11.useRef(seedKey);
124348
- React11.useEffect(() => {
124842
+ const lastSeed = React12.useRef(seedKey);
124843
+ React12.useEffect(() => {
124349
124844
  if (lastSeed.current === seedKey) return;
124350
124845
  lastSeed.current = seedKey;
124351
124846
  setView(seed2);
@@ -124355,18 +124850,18 @@ var init_renderNode = __esm({
124355
124850
  const boundMode = useResolvedScalar(props.displayModePath, ctx);
124356
124851
  const drivenMode = props.displayModePath != null && (boundMode === "week" || boundMode === "month") ? boundMode : void 0;
124357
124852
  const modeSeed = drivenMode ?? (props.displayMode === "week" ? "week" : "month");
124358
- const [mode, setMode] = React11.useState(modeSeed);
124359
- const lastModeSeed = React11.useRef(modeSeed);
124360
- React11.useEffect(() => {
124853
+ const [mode, setMode] = React12.useState(modeSeed);
124854
+ const lastModeSeed = React12.useRef(modeSeed);
124855
+ React12.useEffect(() => {
124361
124856
  if (lastModeSeed.current === modeSeed) return;
124362
124857
  lastModeSeed.current = modeSeed;
124363
124858
  setMode(modeSeed);
124364
124859
  }, [modeSeed]);
124365
124860
  const isWeek = mode === "week";
124366
124861
  const weekSeed = calWeekStart(selectedDate ?? localDayKey(/* @__PURE__ */ new Date()), firstWeekday);
124367
- const [weekStart, setWeekStart] = React11.useState(weekSeed);
124368
- const lastWeekSeed = React11.useRef(weekSeed);
124369
- React11.useEffect(() => {
124862
+ const [weekStart, setWeekStart] = React12.useState(weekSeed);
124863
+ const lastWeekSeed = React12.useRef(weekSeed);
124864
+ React12.useEffect(() => {
124370
124865
  if (lastWeekSeed.current === weekSeed) return;
124371
124866
  lastWeekSeed.current = weekSeed;
124372
124867
  setWeekStart(weekSeed);
@@ -124379,7 +124874,7 @@ var init_renderNode = __esm({
124379
124874
  return { date, day: parseLocalDate(date)?.getDate() ?? 0, inMonth: true, isToday: date === todayKey };
124380
124875
  })] : monthMatrix(year, month, firstWeekday);
124381
124876
  const heads = weekdayLabels(firstWeekday);
124382
- const gridRef = React11.useRef(null);
124877
+ const gridRef = React12.useRef(null);
124383
124878
  const titleMonth = isWeek ? calWeekTitleMonth(weekStart) : { year, month };
124384
124879
  const monthLabel = new Date(titleMonth.year, titleMonth.month - 1, 1).toLocaleDateString(void 0, { month: "long", year: "numeric" });
124385
124880
  const expandable = props.expandable === true;
@@ -124554,7 +125049,7 @@ var init_renderNode = __esm({
124554
125049
  const events = Array.isArray(rawEvents) ? rawEvents : [];
124555
125050
  const boundAnchor = useResolvedScalar(props.anchorDatePath, ctx);
124556
125051
  const anchorRaw = props.anchorDatePath != null ? boundAnchor : props.anchorDate;
124557
- const [pagedAnchor, setPagedAnchor] = React11.useState(null);
125052
+ const [pagedAnchor, setPagedAnchor] = React12.useState(null);
124558
125053
  const localAnchor = pagedAnchor && Object.is(pagedAnchor.raw, anchorRaw) && pagedAnchor.path === props.anchorDatePath && pagedAnchor.mode === props.mode && pagedAnchor.provider === ctx.provider ? pagedAnchor.date : null;
124559
125054
  if (pagedAnchor && !localAnchor) setPagedAnchor(null);
124560
125055
  const anchor = localAnchor ?? (typeof anchorRaw === "string" ? parseLocalDate(anchorRaw) : null) ?? /* @__PURE__ */ new Date();
@@ -124794,7 +125289,7 @@ var init_renderNode = __esm({
124794
125289
  const boundEvents = useResolvedScalar(props.eventsPath, ctx);
124795
125290
  const rawEvents = props.eventsPath != null ? boundEvents : props.events;
124796
125291
  const events = Array.isArray(rawEvents) ? rawEvents : [];
124797
- const groups = React11.useMemo(() => {
125292
+ const groups = React12.useMemo(() => {
124798
125293
  const buckets = /* @__PURE__ */ new Map();
124799
125294
  for (const ev of events) {
124800
125295
  if (!ev) continue;
@@ -124814,19 +125309,19 @@ var init_renderNode = __esm({
124814
125309
  const onSelect = (ev) => dispatchCalendarAction(ctx, ev?.onTap ?? props.onSelectEvent, { eventId: ev?.id });
124815
125310
  const boundScrollTo = useResolvedScalar(props.scrollToDatePath, ctx);
124816
125311
  const scrollTarget = props.scrollToDatePath != null ? typeof boundScrollTo === "string" ? boundScrollTo : void 0 : typeof props.scrollToDate === "string" ? props.scrollToDate : void 0;
124817
- const containerRef = React11.useRef(null);
124818
- const [visibleDays, setVisibleDays] = React11.useState(CAL_AGENDA_INITIAL_DAYS);
125312
+ const containerRef = React12.useRef(null);
125313
+ const [visibleDays, setVisibleDays] = React12.useState(CAL_AGENDA_INITIAL_DAYS);
124819
125314
  const targetIndex = scrollTarget ? groups.findIndex((g2) => g2.key === scrollTarget) : -1;
124820
125315
  const windowEnd = Math.max(visibleDays, targetIndex >= 0 ? targetIndex + 1 : 0);
124821
125316
  const shown2 = groups.length > windowEnd ? groups.slice(0, windowEnd) : groups;
124822
125317
  const hasMore = groups.length > shown2.length;
124823
- React11.useEffect(() => {
125318
+ React12.useEffect(() => {
124824
125319
  if (!scrollTarget) return;
124825
125320
  const block = groups[0]?.key === scrollTarget ? "nearest" : "start";
124826
125321
  containerRef.current?.querySelector(`[data-daygroup="${scrollTarget}"]`)?.scrollIntoView({ block });
124827
125322
  }, [scrollTarget, windowEnd]);
124828
- const sentinelRef = React11.useRef(null);
124829
- React11.useEffect(() => {
125323
+ const sentinelRef = React12.useRef(null);
125324
+ React12.useEffect(() => {
124830
125325
  if (!hasMore) return;
124831
125326
  const el2 = sentinelRef.current;
124832
125327
  if (!el2 || typeof IntersectionObserver === "undefined") return;
@@ -124943,26 +125438,26 @@ var init_renderNode = __esm({
124943
125438
  PRESENTED_SCOPE = '[aria-modal="true"], [role="dialog"], [role="alertdialog"], [role="menu"]';
124944
125439
  focusRoots = /* @__PURE__ */ new WeakMap();
124945
125440
  A11yHintDescription = ({ hint, idBase, children, ...forwarded }) => {
124946
- const descId = `${idBase ?? "hm"}__hint${React11.useId()}`;
125441
+ const descId = `${idBase ?? "hm"}__hint${React12.useId()}`;
124947
125442
  const own6 = children.props;
124948
125443
  const next = { ...forwarded };
124949
125444
  if (forwarded.style) next.style = { ...own6.style ?? {}, ...forwarded.style };
124950
125445
  const ids = [own6["aria-describedby"], forwarded["aria-describedby"], descId].flatMap((v2) => v2 ? String(v2).split(/\s+/) : []).filter(Boolean);
124951
125446
  next["aria-describedby"] = Array.from(new Set(ids)).join(" ");
124952
125447
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
124953
- React11.cloneElement(children, next),
125448
+ React12.cloneElement(children, next),
124954
125449
  /* @__PURE__ */ jsx11("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
124955
125450
  ] });
124956
125451
  };
124957
125452
  reportedUnknownComponents = /* @__PURE__ */ new Set();
124958
125453
  UnknownComponentNode = ({ pkg, type, props, ctx, wrap, ...extras }) => {
124959
125454
  const hasTelemetry = !!ctx.emitTelemetry;
124960
- React11.useEffect(() => {
125455
+ React12.useEffect(() => {
124961
125456
  reportUnknownComponent(ctx, pkg, type);
124962
125457
  }, [ctx.appId, ctx.screenId, hasTelemetry, pkg, type]);
124963
125458
  const { style: extraStyle, children: extraChildren, ...attrs } = extras;
124964
125459
  const nodeProps = (entries) => entries.filter(([, v2]) => isNodeLike(v2) || Array.isArray(v2) && v2.some(isNodeLike));
124965
- const renderProps = (entries) => entries.map(([k2, v2]) => /* @__PURE__ */ jsx11(React11.Fragment, { children: Array.isArray(v2) ? kids2(v2.filter(isNodeLike), ctx) : renderNode(v2, ctx) }, k2));
125460
+ const renderProps = (entries) => entries.map(([k2, v2]) => /* @__PURE__ */ jsx11(React12.Fragment, { children: Array.isArray(v2) ? kids2(v2.filter(isNodeLike), ctx) : renderNode(v2, ctx) }, k2));
124966
125461
  const childKeys = nodeProps(Object.entries(props ?? {}));
124967
125462
  if (!unknownComponentShowsDeveloperLabel(ctx)) {
124968
125463
  const contentKeys = childKeys.filter(([k2]) => k2 === "child" || k2 === "children");
@@ -124986,7 +125481,7 @@ var init_renderNode = __esm({
124986
125481
  });
124987
125482
 
124988
125483
  // ../../core/web-renderer/src/renderToHtml.tsx
124989
- import React12 from "react";
125484
+ import React13 from "react";
124990
125485
  import { renderToStaticMarkup } from "react-dom/server";
124991
125486
  function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = null, width, chrome, opts) {
124992
125487
  const rtl = opts?.isRTL === true;
@@ -125006,7 +125501,7 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
125006
125501
  const withRenderStyles = (markup) => {
125007
125502
  if (!markup) return markup;
125008
125503
  if (!glassPreview) return FOCUS_STYLE_MARKUP + markup;
125009
- const scoped = renderToStaticMarkup(React12.createElement(
125504
+ const scoped = renderToStaticMarkup(React13.createElement(
125010
125505
  "div",
125011
125506
  {
125012
125507
  className: "himi-ios-glass-preview",
@@ -125023,18 +125518,18 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
125023
125518
  const dir = rtl ? { dir: "rtl" } : {};
125024
125519
  if (header || footer) {
125025
125520
  return withRenderStyles(renderToStaticMarkup(
125026
- React12.createElement(
125521
+ React13.createElement(
125027
125522
  "div",
125028
125523
  // F-22 — same footer pin as ScreenHost: a full-height flex column + margin-top:auto
125029
125524
  // keeps the footer at the bottom edge even when the payload is short.
125030
125525
  { "data-testid": "screen-host", ...dir, ...footer ? { style: { display: "flex", flexDirection: "column", minHeight: "100%", flexGrow: 1 } } : {} },
125031
- header ? React12.createElement(
125526
+ header ? React13.createElement(
125032
125527
  "div",
125033
125528
  { "data-testid": "sticky-header", style: { position: "sticky", top: 0, zIndex: 10 } },
125034
125529
  renderNode(header, ctx)
125035
125530
  ) : null,
125036
125531
  renderNode(payload, ctx),
125037
- footer ? React12.createElement(
125532
+ footer ? React13.createElement(
125038
125533
  "div",
125039
125534
  { "data-testid": "sticky-footer", style: { position: "sticky", bottom: 0, zIndex: 10, marginTop: "auto" } },
125040
125535
  renderNode(footer, ctx)
@@ -125044,11 +125539,11 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
125044
125539
  }
125045
125540
  if (rtl) {
125046
125541
  return withRenderStyles(renderToStaticMarkup(
125047
- React12.createElement("div", dir, renderNode(payload, ctx))
125542
+ React13.createElement("div", dir, renderNode(payload, ctx))
125048
125543
  ));
125049
125544
  }
125050
125545
  return withRenderStyles(renderToStaticMarkup(
125051
- React12.createElement(React12.Fragment, null, renderNode(payload, ctx))
125546
+ React13.createElement(React13.Fragment, null, renderNode(payload, ctx))
125052
125547
  ));
125053
125548
  }
125054
125549
  var init_renderToHtml = __esm({
@@ -132509,8 +133004,8 @@ function hasRowBinding(props) {
132509
133004
  }
132510
133005
  function declaredOptionIds(props, resolve81) {
132511
133006
  const literal = props.options ?? props.tabs ?? props.chips;
132512
- const bound = props.optionsPath !== void 0 ? resolved(props.optionsPath, resolve81) : void 0;
132513
- const raw = Array.isArray(bound) ? bound : literal;
133007
+ const bound2 = props.optionsPath !== void 0 ? resolved(props.optionsPath, resolve81) : void 0;
133008
+ const raw = Array.isArray(bound2) ? bound2 : literal;
132514
133009
  if (!Array.isArray(raw)) return [];
132515
133010
  const out2 = [];
132516
133011
  for (const o2 of raw) {
@@ -132577,9 +133072,9 @@ function synthesizeInput(control, resolve81, tokens2) {
132577
133072
  }
132578
133073
  if (!acceptsWords(props) || !acceptsWords(control.wrapper ?? {})) return null;
132579
133074
  const binding2 = typeof props.valuePath === "string" ? props.valuePath : typeof props.value === "string" && props.value.startsWith("$service:") ? props.value : void 0;
132580
- const bound = binding2 === void 0 ? void 0 : resolve81(binding2);
133075
+ const bound2 = binding2 === void 0 ? void 0 : resolve81(binding2);
132581
133076
  const literal = typeof props.value === "string" && !props.value.startsWith("$") ? props.value : void 0;
132582
- const current = typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : literal ?? "";
133077
+ const current = typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) : literal ?? "";
132583
133078
  const max = typeof props.maxLength === "number" && props.maxLength > 0 ? props.maxLength : void 0;
132584
133079
  const pick3 = tokens2().find((t2) => t2 !== current && (max === void 0 || t2.length <= max));
132585
133080
  if (pick3 === void 0) return null;
@@ -133240,12 +133735,12 @@ function collapsesWhenEmpty(n2, path2, ctx) {
133240
133735
  const props = body.props;
133241
133736
  if (!props || props.collapseWhenEmpty !== true) return false;
133242
133737
  const raw = props.text;
133243
- const bound = typeof raw === "string" && (raw.startsWith("$service:") || raw.startsWith("$item"));
133244
- if (bound && raw.startsWith("$item") && !ctx.scope) return false;
133245
- const eff = bound ? resolveNameBinding(raw, ctx) : raw;
133738
+ const bound2 = typeof raw === "string" && (raw.startsWith("$service:") || raw.startsWith("$item"));
133739
+ if (bound2 && raw.startsWith("$item") && !ctx.scope) return false;
133740
+ const eff = bound2 ? resolveNameBinding(raw, ctx) : raw;
133246
133741
  const s2 = eff == null ? "" : String(eff).trim();
133247
133742
  if (s2 !== "" && s2 !== "\u2014") return false;
133248
- if (bound && typeof eff === "string" && s2 === "") {
133743
+ if (bound2 && typeof eff === "string" && s2 === "") {
133249
133744
  ctx.emptied.push({ at: joinPath(path2, wire ? "body.props" : "props"), field: "text", binding: raw });
133250
133745
  }
133251
133746
  return true;
@@ -134016,11 +134511,11 @@ async function crawlScreenInner(opts) {
134016
134511
  for (const site of sites) {
134017
134512
  if (parseWorkerAction(site.actionId)) continue;
134018
134513
  const before = { ...site.params ?? {}, ...site.args ?? {} };
134019
- const bound = Object.entries(before).filter(([, v2]) => typeof v2 === "string" && v2.startsWith("$service:"));
134020
- if (!bound.length) continue;
134514
+ const bound2 = Object.entries(before).filter(([, v2]) => typeof v2 === "string" && v2.startsWith("$service:"));
134515
+ if (!bound2.length) continue;
134021
134516
  const resolved2 = resolveActionServiceParams({ actionId: site.actionId, params: site.params, args: site.args }, provider);
134022
134517
  const after = { ...resolved2.params ?? {}, ...resolved2.args ?? {} };
134023
- for (const [k2, v2] of bound) {
134518
+ for (const [k2, v2] of bound2) {
134024
134519
  if (!(k2 in after)) {
134025
134520
  findings.push({
134026
134521
  screen: screenId,
@@ -134399,11 +134894,11 @@ function unverifiableNodes(screenId, payload) {
134399
134894
  const type = typeof body?.type === "string" ? body.type : void 0;
134400
134895
  if (type && BLANK_WHEN_BOUND[type]) {
134401
134896
  const props = body?.props ?? {};
134402
- const bound = BLANK_WHEN_BOUND[type].some((p2) => {
134897
+ const bound2 = BLANK_WHEN_BOUND[type].some((p2) => {
134403
134898
  const v2 = props[p2];
134404
134899
  return typeof v2 === "string" && (v2.startsWith("$service:") || v2.startsWith("$item"));
134405
134900
  });
134406
- if (bound) {
134901
+ if (bound2) {
134407
134902
  out2.push({
134408
134903
  screen: screenId,
134409
134904
  node: typeof rec.id === "string" ? `${type}#${rec.id}` : type,
@@ -146961,8 +147456,8 @@ function planTrim(src, keepIds, links) {
146961
147456
  validIds: sorted(app.routes.map((r3) => r3.label))
146962
147457
  });
146963
147458
  }
146964
- const explicit = new Set([...kept].filter((r3) => r3 !== app.home || keepIds.includes(app.home.label)));
146965
- const implicit = explicit.has(app.home) ? [] : [app.home];
147459
+ const explicit2 = new Set([...kept].filter((r3) => r3 !== app.home || keepIds.includes(app.home.label)));
147460
+ const implicit = explicit2.has(app.home) ? [] : [app.home];
146966
147461
  for (const id of navPinnedScreens(app.nav.value)) {
146967
147462
  const route = resolveIn(app, id);
146968
147463
  if (!route || kept.has(route)) continue;
@@ -158826,7 +159321,7 @@ function createLocalTestSandbox() {
158826
159321
  if (jsonBytes(input) > limits.maxRequestBytes) {
158827
159322
  throw new SandboxError("execution_failed", "request exceeds maxRequestBytes");
158828
159323
  }
158829
- const { MessageChannel, Worker: Worker2 } = await import("node:worker_threads");
159324
+ const { MessageChannel: MessageChannel2, Worker: Worker2 } = await import("node:worker_threads");
158830
159325
  const started = Date.now();
158831
159326
  const workerSource = `
158832
159327
  import { parentPort, workerData } from "node:worker_threads";
@@ -158901,7 +159396,7 @@ function createLocalTestSandbox() {
158901
159396
  })();
158902
159397
  `;
158903
159398
  return await new Promise((resolve81, reject) => {
158904
- const { port1, port2 } = new MessageChannel();
159399
+ const { port1, port2 } = new MessageChannel2();
158905
159400
  const serializableContext = {
158906
159401
  auth: context.auth,
158907
159402
  identity: context.identity,
@@ -165786,36 +166281,37 @@ var init_preview_assets_generated = __esm({
165786
166281
  "../../packages/serve/src/preview-assets.generated.ts"() {
165787
166282
  init_preview_assets_format();
165788
166283
  PREVIEW_ASSET_MANIFEST = [
165789
- { key: "assets/DashboardHost-pt94_sJ0.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "9ec016c8dd859201dddcd5c4bb9512141dcad5f5779b2e8595ec227dfc3c9928" },
165790
- { key: "assets/DevDrawer-Dru5uwQ1.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "fedcb935aa289bc16141962ca59a9addda9b2182d6cda06f7f293b638abfcd8e" },
165791
- { key: "assets/IdiomCompare-BHh8tYPn.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "4c79da854b06c53b397a34cb96eaa6c5fc9dddd2bd25e6408ac60c9fb756547f" },
165792
- { key: "assets/LightboxViewer-BSqDn-zJ.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "f093543511ed4215ff0396614b4445fd14acf2eeb3fc87a6512c67144dc5f791" },
165793
- { key: "assets/PhonePreviewControl-Bmm8NkvS.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "2ef06e297920432eb2f9132cc6f300c344c9b4d3dd7195fc7d86108b7745dde3" },
165794
- { key: "assets/SchemeCompare-C7y8epkX.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "ef6af36144d34f5b6ef1004987aa80ffb5aad5ef55a9b27e7347b68dd88417ee" },
166284
+ { key: "assets/DashboardHost-ccb_e_DP.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "9183bc77ce886be410e1a6a3d8b811365ba60c82c656f9ed8249c4ba12696620" },
166285
+ { key: "assets/DevDrawer-_P2xA5Uo.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "52a51a9937ae5736e37a2c6b383612dafe49ac82dd49817cecf2b87675470733" },
166286
+ { key: "assets/IdiomCompare-B5rjJbc6.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "c90292bfc15a84b60d4ad1820d79f51647feb45eaf6c5f7020efd5995edca0c2" },
166287
+ { key: "assets/LightboxViewer-B9bXYaNa.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "7dc5209784b7339538bf2e5af88099d94cd4fa4dada0a537025d8ab14b1782f0" },
166288
+ { key: "assets/PhonePreviewControl-BbU25q3T.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "7b5bf7361e18d9fab03c8195337dd7d7dbab40aceb81876363115dfd5b3506ca" },
166289
+ { key: "assets/SchemeCompare-AdWcP5Op.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "eaac412de580143ae5e2e3c75ffb2af3f507d8f39487681f56cdd51a61a3cd2a" },
165795
166290
  { key: "assets/glassPreviewBrowser-Bt5ZFmG4.js", contentType: "application/javascript; charset=utf-8", offset: 69245, length: 342, sha256: "20d73f97d38f6d9a0b79e68e24954cd6bbfe66833a6e6aecae00a9102e64cab3" },
165796
- { key: "assets/index-BBNqc5c4.js", contentType: "application/javascript; charset=utf-8", offset: 69587, length: 1325028, sha256: "f690d573405bb2463d7016a5ec27b573850793a3ccf84ee404c9a63876b16018" },
165797
- { key: "assets/pdf-D2NCB8kl.js", contentType: "application/javascript; charset=utf-8", offset: 1394615, length: 488199, sha256: "a7c9cf8b012ef43073746ec951644d51abad5427e442e6d14de5ec3f8f4b2409" },
165798
- { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1882814, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
165799
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1882887, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
165800
- { key: "assets/pdfDocument--Lyea2Vc.js", contentType: "application/javascript; charset=utf-8", offset: 3199921, length: 3379, sha256: "1caa5dde639cdfa8164a2d5d6fc0d7016368568de98b3b9f0c3bdeee8a7206f7" },
165801
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3203300, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
165802
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3205566, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
165803
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3210176, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
165804
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3698760, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
165805
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3789684, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
165806
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3880668, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
165807
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3971648, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
165808
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4062520, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
165809
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4153500, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
165810
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4262136, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
165811
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4371220, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
165812
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4480268, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
165813
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4587968, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
165814
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4676076, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
165815
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4682824, length: 4947, sha256: "c785a07e7efeec0f1cb1a22975db48cde368e37a64eacb76a9821f2c8d62928b" },
165816
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 4687771, length: 7193, sha256: "a482f4796147c2a3893942e10ab225bd3b6f749f7125fe0330680d4c20ea0212" },
165817
- { key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset: 4694964, length: 423, sha256: "b9cd5989d31464a0422f260a332af6be5add0b04de2148944de35158f3b75efc" },
165818
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4695387, length: 18080, sha256: "937286e50af2fc4e44f7fb35b277f35254e5eb24a3d364a70cfa914d4286d0d9" }
166291
+ { key: "assets/index-vy60YTYP.js", contentType: "application/javascript; charset=utf-8", offset: 69587, length: 1332702, sha256: "8602e03a2d1f869963c76b634787d06e2a4f9ff8449f880a03079f2a98d42881" },
166292
+ { key: "assets/pdf-6zNQxbtC.js", contentType: "application/javascript; charset=utf-8", offset: 1402289, length: 488199, sha256: "c32a381ff3c8da40d4ecc3653dd01e6aa2d2a7273486909aa66d4aa221915ff6" },
166293
+ { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1890488, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
166294
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1890561, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
166295
+ { key: "assets/pdfDocument-CFatnBSm.js", contentType: "application/javascript; charset=utf-8", offset: 3207595, length: 3379, sha256: "50e909061e6bbd49c76392215686898570949f168a40cfc0cf30db5a49560939" },
166296
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3210974, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
166297
+ { key: "assets/webviewBridgeHost-BB3fp3uP.js", contentType: "application/javascript; charset=utf-8", offset: 3213240, length: 9781, sha256: "2f5f3427dffef435ba58ee1b7a47eed601d3aabc66648eda053081eaf99e456a" },
166298
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3223021, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
166299
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3227631, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
166300
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3716215, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
166301
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3807139, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
166302
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3898123, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
166303
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3989103, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
166304
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4079975, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
166305
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4170955, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
166306
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4279591, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
166307
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4388675, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
166308
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4497723, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
166309
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4605423, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
166310
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4693531, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
166311
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4700279, length: 4947, sha256: "dcada8e4b42e9583f4c6ebf2ea3898a3b9b13b53d0174305ca447aaabe18bdb3" },
166312
+ { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 4705226, length: 7193, sha256: "a482f4796147c2a3893942e10ab225bd3b6f749f7125fe0330680d4c20ea0212" },
166313
+ { key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset: 4712419, length: 423, sha256: "b9cd5989d31464a0422f260a332af6be5add0b04de2148944de35158f3b75efc" },
166314
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4712842, length: 18778, sha256: "ba734d58c88281c71c01d9a2842a991d06f3ed91bf03449427ef11c7f6d1605d" }
165819
166315
  ];
165820
166316
  }
165821
166317
  });
@@ -166002,7 +166498,7 @@ async function runPackage(source, opts = {}) {
166002
166498
  const server = nodeAdapter(handler);
166003
166499
  const first = await listen(server, opts.port ?? 0, host);
166004
166500
  const port = first.port;
166005
- const bound = [first.address];
166501
+ const bound2 = [first.address];
166006
166502
  const servers = [server];
166007
166503
  if (lanHost) {
166008
166504
  const lanServer = nodeAdapter(handler);
@@ -166014,7 +166510,7 @@ async function runPackage(source, opts = {}) {
166014
166510
  if (resolved2.temp) rmSync23(resolved2.temp, { recursive: true, force: true });
166015
166511
  throw new Error(`himi run --lan could not listen on ${lanHost}:${port} (${e2.message}); drop --lan, or pass --port for a free one`);
166016
166512
  }
166017
- bound.push(lanBound);
166513
+ bound2.push(lanBound);
166018
166514
  servers.push(lanServer);
166019
166515
  }
166020
166516
  const origin = `http://${host}:${port}`;
@@ -166028,7 +166524,7 @@ async function runPackage(source, opts = {}) {
166028
166524
  url,
166029
166525
  releaseRoot: resolved2.releaseRoot,
166030
166526
  origin,
166031
- bound,
166527
+ bound: bound2,
166032
166528
  ...lanUrl ? { lanUrl } : {},
166033
166529
  warnings: resolved2.warnings,
166034
166530
  close: async () => {
@@ -167520,11 +168016,11 @@ function sortKeys(value) {
167520
168016
  const obj5 = value;
167521
168017
  return Object.fromEntries(Object.keys(obj5).sort().map((key3) => [key3, sortKeys(obj5[key3])]));
167522
168018
  }
167523
- function canonicalJson2(value) {
168019
+ function canonicalJson3(value) {
167524
168020
  return JSON.stringify(sortKeys(value));
167525
168021
  }
167526
168022
  function sha256Digest(value) {
167527
- return `sha256:${createHash43("sha256").update(canonicalJson2(value)).digest("hex")}`;
168023
+ return `sha256:${createHash43("sha256").update(canonicalJson3(value)).digest("hex")}`;
167528
168024
  }
167529
168025
  function manifestDigest(manifest) {
167530
168026
  return sha256Digest(manifest);
@@ -177121,8 +177617,8 @@ function buildVeloChapter(input) {
177121
177617
  if (owner?.git) source.push("git");
177122
177618
  const httpFunctions = dedupeHttp(httpFromFiles);
177123
177619
  const pages2 = veloPagesForBind(input.look);
177124
- const bound = bindVeloFiles(files.slice(0, 80), pages2);
177125
- const coded = new Set(bound.filter((f2) => f2.pageUrl).map((f2) => f2.pageId).filter(Boolean));
177620
+ const bound2 = bindVeloFiles(files.slice(0, 80), pages2);
177621
+ const coded = new Set(bound2.filter((f2) => f2.pageUrl).map((f2) => f2.pageId).filter(Boolean));
177126
177622
  const pagesOut = pages2.map((p2) => ({ ...p2, hasCode: p2.hasCode || !!p2.pageId && coded.has(p2.pageId) }));
177127
177623
  const gridAppId = owner?.gridAppId || hint?.gridAppId;
177128
177624
  const enabled = source.length > 0 || httpFunctions.length > 0;
@@ -177131,7 +177627,7 @@ function buildVeloChapter(input) {
177131
177627
  source,
177132
177628
  httpFunctions,
177133
177629
  pages: pagesOut,
177134
- files: bound
177630
+ files: bound2
177135
177631
  };
177136
177632
  if (gridAppId) chapter.gridAppId = gridAppId;
177137
177633
  if (hint?.wixCodeFeatures.length) chapter.wixCodeFeatures = hint.wixCodeFeatures;
@@ -184969,8 +185465,8 @@ function buildMergedContract(options) {
184969
185465
  if (fonts.length) {
184970
185466
  branding.fonts = fonts;
184971
185467
  const chosen = overlayFontFamily;
184972
- const explicit = typeof chosen === "string" && chosen.trim() !== "";
184973
- if (!explicit) branding.fontFamily = fonts[0].family;
185468
+ const explicit2 = typeof chosen === "string" && chosen.trim() !== "";
185469
+ if (!explicit2) branding.fontFamily = fonts[0].family;
184974
185470
  }
184975
185471
  }
184976
185472
  merged.branding = branding;