lilact 0.31.15 → 0.31.17

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.
Files changed (52) hide show
  1. package/bin/bundle.cjs +1 -1
  2. package/dist/lilact.development.js +406 -391
  3. package/dist/lilact.development.js.map +4 -4
  4. package/dist/lilact.development.min.js +35 -35
  5. package/dist/lilact.development.min.js.map +4 -4
  6. package/dist/lilact.production.min.js +38 -38
  7. package/docs/assets/hierarchy.js +1 -1
  8. package/docs/assets/navigation.js +1 -1
  9. package/docs/assets/search.js +1 -1
  10. package/docs/classes/accessories.ErrorBoundary.html +11 -11
  11. package/docs/classes/accessories.Suspense.html +10 -10
  12. package/docs/classes/components.Component.html +11 -11
  13. package/docs/classes/components.HTMLComponent.html +11 -11
  14. package/docs/classes/components.RootComponent.html +11 -11
  15. package/docs/functions/accessories.DragHandle.html +1 -1
  16. package/docs/functions/accessories.Spinner.html +1 -1
  17. package/docs/functions/components.cloneComponent.html +1 -1
  18. package/docs/functions/components.createComponent.html +1 -1
  19. package/docs/functions/components.createPortal.html +1 -1
  20. package/docs/functions/components.createRoot.html +1 -1
  21. package/docs/functions/components.memo.html +1 -1
  22. package/docs/functions/components.render.html +1 -1
  23. package/docs/functions/hooks.useLocalStorage.html +2 -2
  24. package/docs/functions/run.lazy.html +1 -1
  25. package/docs/functions/run.require.html +1 -1
  26. package/docs/functions/run.run.html +1 -1
  27. package/docs/functions/run.runScripts.html +1 -1
  28. package/docs/hierarchy.html +1 -1
  29. package/docs/modules/components.html +1 -1
  30. package/docs/static/lilact.development.js +406 -391
  31. package/docs/static/lilact.development.js.map +4 -4
  32. package/docs/static/lilact.development.min.js +35 -35
  33. package/docs/static/lilact.development.min.js.map +4 -4
  34. package/docs/static/lilact.production.min.js +38 -38
  35. package/docs/variables/accessories.SplitPane.html +1 -1
  36. package/docs/variables/components.cloneElement.html +1 -1
  37. package/examples/lilact.development.js +406 -391
  38. package/examples/lilact.development.js.map +4 -4
  39. package/examples/lilact.development.min.js +35 -35
  40. package/examples/lilact.development.min.js.map +4 -4
  41. package/examples/lilact.production.min.js +38 -38
  42. package/package.json +1 -1
  43. package/scripts/build.mjs +1 -1
  44. package/src/accessories.jsx +4 -2
  45. package/src/cache.jsx +299 -0
  46. package/src/components.jsx +6 -1042
  47. package/src/core.jsx +799 -0
  48. package/src/hooks.jsx +2 -2
  49. package/src/run.jsx +2 -1
  50. package/src/symbols.jsx +0 -2
  51. package/docs/functions/components.replaceAllComponentInstances.html +0 -1
  52. package/docs/functions/components.replaceComponentEntity.html +0 -1
@@ -1715,7 +1715,6 @@ __export(symbols_exports, {
1715
1715
  DUE: () => DUE,
1716
1716
  IDX: () => IDX,
1717
1717
  INTERVAL: () => INTERVAL,
1718
- IS_ZOMBIE: () => IS_ZOMBIE,
1719
1718
  LAZY: () => LAZY,
1720
1719
  LOCATION: () => LOCATION,
1721
1720
  MEMOIZED: () => MEMOIZED,
@@ -1727,7 +1726,6 @@ var [
1727
1726
  CORE,
1728
1727
  COMPONENT,
1729
1728
  TEXT2,
1730
- IS_ZOMBIE,
1731
1729
  IDX,
1732
1730
  CHILD_CLASS_ADDENDUM,
1733
1731
  MEMOIZED,
@@ -1744,7 +1742,6 @@ var [
1744
1742
  /* @__PURE__ */ Symbol.for("LILACT:CORE"),
1745
1743
  /* @__PURE__ */ Symbol.for("LILACT:COMPONENT"),
1746
1744
  /* @__PURE__ */ Symbol.for("LILACT:TEXT"),
1747
- /* @__PURE__ */ Symbol.for("LILACT:IS_ZOMBIE"),
1748
1745
  /* @__PURE__ */ Symbol.for("LILACT:IDX"),
1749
1746
  /* @__PURE__ */ Symbol.for("LILACT:CHILD_CLASS_ADDENDUM"),
1750
1747
  /* @__PURE__ */ Symbol.for("LILACT:MEMOIZED"),
@@ -1772,7 +1769,8 @@ var isValidComponent = (value) => {
1772
1769
  };
1773
1770
  var isValidElement = isValidComponent;
1774
1771
  var findDOMNode = (component) => {
1775
- if (!component[CORE]?.element?.parentNode) throw new Error("findDOMNode only works on mounted components.");
1772
+ var _a6, _b;
1773
+ if (!((_b = (_a6 = component[CORE]) == null ? void 0 : _a6.element) == null ? void 0 : _b.parentNode)) throw new Error("findDOMNode only works on mounted components.");
1776
1774
  return component[CORE].element;
1777
1775
  };
1778
1776
  function Fragment2({ children }) {
@@ -2352,8 +2350,6 @@ __export(components_exports, {
2352
2350
  Component: () => Component,
2353
2351
  HTMLComponent: () => HTMLComponent,
2354
2352
  RootComponent: () => RootComponent,
2355
- boolean_html_attributes_set: () => boolean_html_attributes_set,
2356
- capture_events_set: () => capture_events_set,
2357
2353
  cloneComponent: () => cloneComponent,
2358
2354
  cloneElement: () => cloneElement,
2359
2355
  createComponent: () => createComponent2,
@@ -2362,43 +2358,25 @@ __export(components_exports, {
2362
2358
  createRoot: () => createRoot,
2363
2359
  current_component: () => current_component,
2364
2360
  effect_timeout: () => effect_timeout,
2365
- events_set: () => events_set,
2366
2361
  insertion_effects: () => insertion_effects,
2367
2362
  layout_effects: () => layout_effects,
2368
- length_css_attributes_set: () => length_css_attributes_set,
2369
2363
  memo: () => memo,
2370
2364
  passive_effects: () => passive_effects,
2371
2365
  processEffects: () => processEffects,
2372
2366
  render: () => render,
2373
- replaceAllComponentInstances: () => replaceAllComponentInstances,
2374
- replaceComponentEntity: () => replaceComponentEntity,
2375
2367
  roots: () => roots,
2376
- special_attributes: () => special_attributes,
2377
2368
  update_cbs: () => update_cbs,
2378
2369
  update_interval_margin: () => update_interval_margin,
2379
2370
  update_set: () => update_set,
2380
2371
  update_timeout: () => update_timeout
2381
2372
  });
2382
- var SVG_NS = "http://www.w3.org/2000/svg";
2373
+
2374
+ // .tmp/src/cache.jsx
2383
2375
  function getComponentEntity(entity) {
2384
- return entity?.[MEMOIZED] ? entity.component : entity;
2376
+ return (entity == null ? void 0 : entity[MEMOIZED]) ? entity.component : entity;
2385
2377
  }
2386
2378
  var hotEntityAliases = /* @__PURE__ */ new Map();
2387
2379
  var hotEntityCacheTokens = /* @__PURE__ */ new WeakMap();
2388
- function getHotEntityCacheToken(entity) {
2389
- entity = getComponentEntity(entity);
2390
- if (typeof entity !== "function") {
2391
- return entity;
2392
- }
2393
- let token2 = hotEntityCacheTokens.get(entity);
2394
- if (!token2) {
2395
- const resolved = resolveHotEntity(entity);
2396
- token2 = hotEntityCacheTokens.get(resolved) || {};
2397
- hotEntityCacheTokens.set(entity, token2);
2398
- hotEntityCacheTokens.set(resolved, token2);
2399
- }
2400
- return token2;
2401
- }
2402
2380
  function resolveHotEntity(entity) {
2403
2381
  entity = getComponentEntity(entity);
2404
2382
  const visited = /* @__PURE__ */ new Set();
@@ -2513,6 +2491,7 @@ var ComponentCache = class {
2513
2491
  this.owner = owner;
2514
2492
  }
2515
2493
  pick(key, construct_func, nextEntity) {
2494
+ var _a6;
2516
2495
  let componentCore;
2517
2496
  let bucket = this.current_map.get(key);
2518
2497
  if (bucket && bucket.length > bucket[IDX]) {
@@ -2538,17 +2517,19 @@ var ComponentCache = class {
2538
2517
  bucket[IDX] = 0;
2539
2518
  }
2540
2519
  if (componentCore) {
2541
- componentCore.parent ?? (componentCore.parent = this.owner);
2520
+ (_a6 = componentCore.parent) != null ? _a6 : componentCore.parent = this.owner;
2542
2521
  }
2543
2522
  return componentCore;
2544
2523
  }
2545
2524
  commit() {
2546
2525
  this.current_map.forEach((arr) => {
2547
2526
  arr.slice(arr[IDX]).forEach((ex) => {
2527
+ var _a6, _b;
2548
2528
  if (ex.cleanup) {
2549
2529
  ex.cleanup();
2550
- } else if (ex.element && !ex.portal) {
2551
- ex.element.parentElement?.removeChild?.(ex.element);
2530
+ }
2531
+ if (ex.element && !ex.portal) {
2532
+ (_b = (_a6 = ex.element) == null ? void 0 : _a6.remove) == null ? void 0 : _b.call(_a6);
2552
2533
  }
2553
2534
  });
2554
2535
  });
@@ -2556,6 +2537,33 @@ var ComponentCache = class {
2556
2537
  this.new_map = /* @__PURE__ */ new Map();
2557
2538
  }
2558
2539
  };
2540
+
2541
+ // .tmp/src/core.jsx
2542
+ var SVG_NS = "http://www.w3.org/2000/svg";
2543
+ var renderErrorHandler = (c, e) => {
2544
+ var _a6, _b, _c, _d;
2545
+ const value = (e == null ? void 0 : e.error) instanceof Error ? e.error : (e == null ? void 0 : e.reason) !== void 0 ? e.reason : e;
2546
+ const error2 = lilact_default.isThenable(e) ? e : lilact_default.traceError(
2547
+ value,
2548
+ (e == null ? void 0 : e.fileName) || null
2549
+ );
2550
+ const stack = [c];
2551
+ while (c && !((_a6 = c.component) == null ? void 0 : _a6.componentDidCatch)) {
2552
+ c = c.parent;
2553
+ if (c) stack.push(c);
2554
+ }
2555
+ if ((_b = c == null ? void 0 : c.component) == null ? void 0 : _b.componentDidCatch) {
2556
+ if ((_c = c.entity) == null ? void 0 : _c.getDerivedStateFromError) {
2557
+ c.component.setState(c.entity.getDerivedStateFromError.call(c, error2));
2558
+ }
2559
+ }
2560
+ let stack_log = Array.prototype.map.call(stack, (x) => `in ${typeof x.component.displayName === "function" ? x.component.displayName() : x.component.displayName}`).join("\n");
2561
+ error2.componentStack = stack;
2562
+ error2.componentStackLog = stack_log;
2563
+ if ((_d = c == null ? void 0 : c.component) == null ? void 0 : _d.componentDidCatch) {
2564
+ c.component.componentDidCatch(error2, { componentStack: stack, componentStackLog: stack_log });
2565
+ } else throw e;
2566
+ };
2559
2567
  var ComponentCore = class {
2560
2568
  constructor(comp, props) {
2561
2569
  /*
@@ -2592,34 +2600,35 @@ var ComponentCore = class {
2592
2600
  */
2593
2601
  // TODO: should componentDidUpdate be called after arranging/appending the outlet or before?
2594
2602
  apply(next_props = this.props, next_state = this.next_state || this.state) {
2603
+ var _a6, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
2595
2604
  try {
2596
2605
  let do_rerender = true;
2597
- if (this.outlet && this?.[MEMOIZED]) {
2598
- if (shallowEqual(this.props, next_props, "children") && shallowEqual(this.props?.children, next_props?.children)) {
2606
+ if (this.outlet && (this == null ? void 0 : this[MEMOIZED])) {
2607
+ if (shallowEqual(this.props, next_props, "children") && shallowEqual((_a6 = this.props) == null ? void 0 : _a6.children, next_props == null ? void 0 : next_props.children)) {
2599
2608
  do_rerender = false;
2600
2609
  }
2601
2610
  }
2602
2611
  if (do_rerender) {
2603
2612
  if (true) {
2604
- if (this.entity?.propTypes) {
2613
+ if ((_b = this.entity) == null ? void 0 : _b.propTypes) {
2605
2614
  PropTypes.checkPropTypes(this.entity.propTypes, next_props, "prop", this.entity.name);
2606
- } else if (this.component?.propTypes) {
2615
+ } else if ((_c = this.component) == null ? void 0 : _c.propTypes) {
2607
2616
  PropTypes.checkPropTypes(this.component.propTypes, next_props, "prop", this.component.name);
2608
2617
  }
2609
2618
  }
2610
2619
  if (typeof next_state === "function") next_state = next_state(this.state);
2611
- const defaultProps = this.entity?.defaultProps || this.component?.constructor?.defaultProps;
2620
+ const defaultProps = ((_d = this.entity) == null ? void 0 : _d.defaultProps) || ((_f = (_e = this.component) == null ? void 0 : _e.constructor) == null ? void 0 : _f.defaultProps);
2612
2621
  if (defaultProps) {
2613
2622
  next_props = {
2614
2623
  ...defaultProps,
2615
2624
  ...next_props || {}
2616
2625
  };
2617
2626
  }
2618
- if (next_props?.style && typeof next_props.style === "object" && !next_props.style[CLONED_STYLE]) {
2627
+ if ((next_props == null ? void 0 : next_props.style) && typeof next_props.style === "object" && !next_props.style[CLONED_STYLE]) {
2619
2628
  next_props.style = { ...next_props.style, [CLONED_STYLE]: true };
2620
2629
  }
2621
- if (this?.parent?.component?.context || this?.parent?.component?.getChildContext) {
2622
- this.context = { ...this.parent.component.context, ...this.parent.component.getChildContext?.() };
2630
+ if (((_h = (_g = this == null ? void 0 : this.parent) == null ? void 0 : _g.component) == null ? void 0 : _h.context) || ((_j = (_i = this == null ? void 0 : this.parent) == null ? void 0 : _i.component) == null ? void 0 : _j.getChildContext)) {
2631
+ this.context = { ...this.parent.component.context, ...(_l = (_k = this.parent.component).getChildContext) == null ? void 0 : _l.call(_k) };
2623
2632
  if (this.component.constructor.contextTypes) {
2624
2633
  PropTypes.checkPropTypes(this.component.constructor.contextTypes, this.context, "context", this.entity.name);
2625
2634
  }
@@ -2633,8 +2642,8 @@ var ComponentCore = class {
2633
2642
  } else {
2634
2643
  this.element = document.createElement(this.entity);
2635
2644
  }
2636
- if (next_props?.defaultValue) this.element.value = String(next_props.defaultValue).slice(0, next_props?.maxLength);
2637
- if (next_props?.defaultChecked) this.element.checked = next_props.defaultChecked;
2645
+ if (next_props == null ? void 0 : next_props.defaultValue) this.element.value = String(next_props.defaultValue).slice(0, next_props == null ? void 0 : next_props.maxLength);
2646
+ if (next_props == null ? void 0 : next_props.defaultChecked) this.element.checked = next_props.defaultChecked;
2638
2647
  }
2639
2648
  this.element[COMPONENT] = this.component;
2640
2649
  }
@@ -2652,7 +2661,7 @@ var ComponentCore = class {
2652
2661
  this.component.componentWillUpdate(next_props, next_state);
2653
2662
  }
2654
2663
  const prev_state = this.state, prev_props = this.props;
2655
- if (this.element && !(this?.component instanceof RootComponent)) {
2664
+ if (this.element && !((this == null ? void 0 : this.component) instanceof lilact_default.RootComponent)) {
2656
2665
  this.updateElementProps(next_props);
2657
2666
  }
2658
2667
  this.props = next_props;
@@ -2669,10 +2678,10 @@ var ComponentCore = class {
2669
2678
  } else {
2670
2679
  this.outlet = this.component.render({ current: this.element || this.component });
2671
2680
  }
2672
- if (this?.portal) {
2681
+ if (this == null ? void 0 : this.portal) {
2673
2682
  this.element = this.portal;
2674
2683
  }
2675
- if (this.outlet?.constructor?.name !== "Array") {
2684
+ if (((_n = (_m = this.outlet) == null ? void 0 : _m.constructor) == null ? void 0 : _n.name) !== "Array") {
2676
2685
  this.outlet = [this.outlet];
2677
2686
  } else {
2678
2687
  this.outlet = [...this.outlet];
@@ -2698,11 +2707,10 @@ var ComponentCore = class {
2698
2707
  } else {
2699
2708
  if (!core.element) {
2700
2709
  core.element = document.createTextNode(item[TEXT2]);
2701
- core[TEXT2] = item[TEXT2];
2702
2710
  } else if (core[TEXT2] !== item[TEXT2]) {
2703
2711
  core.element.textContent = item[TEXT2];
2704
- core[TEXT2] = item[TEXT2];
2705
2712
  }
2713
+ core[TEXT2] = item[TEXT2];
2706
2714
  }
2707
2715
  }
2708
2716
  }
@@ -2718,10 +2726,11 @@ var ComponentCore = class {
2718
2726
  }
2719
2727
  }
2720
2728
  async cleanup() {
2729
+ var _a6, _b, _c;
2721
2730
  unregisterComponentCore(this);
2722
2731
  try {
2723
2732
  const promises = [];
2724
- if (this.props?.ref) {
2733
+ if ((_a6 = this.props) == null ? void 0 : _a6.ref) {
2725
2734
  if (typeof this.props.ref === "function") {
2726
2735
  this.props.ref(null);
2727
2736
  } else {
@@ -2731,8 +2740,8 @@ var ComponentCore = class {
2731
2740
  if (this.component.componentWillUnmount) {
2732
2741
  this.component.componentWillUnmount();
2733
2742
  }
2734
- if (this?.element?.parentElement && !this.portal) {
2735
- this.element.parentElement.removeChild(this.element);
2743
+ if (((_b = this == null ? void 0 : this.element) == null ? void 0 : _b.parentElement) && !this.portal) {
2744
+ this.element.remove();
2736
2745
  }
2737
2746
  if (this.outlet !== void 0) {
2738
2747
  for (let c of this.outlet) {
@@ -2741,7 +2750,7 @@ var ComponentCore = class {
2741
2750
  }
2742
2751
  }
2743
2752
  }
2744
- if (this.props?.children !== void 0) {
2753
+ if (((_c = this.props) == null ? void 0 : _c.children) !== void 0) {
2745
2754
  for (let c of this.props.children) {
2746
2755
  if (c.cleanup) {
2747
2756
  promises.push(c.cleanup());
@@ -2761,18 +2770,19 @@ var ComponentCore = class {
2761
2770
  }
2762
2771
  }
2763
2772
  updateElementProps(patch, force = false) {
2773
+ var _a6, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
2764
2774
  if (this.entity === "input") {
2765
- if (!patch?.type) patch.type = "text";
2775
+ if (!(patch == null ? void 0 : patch.type)) patch.type = "text";
2766
2776
  if (patch.type !== this.element.type) {
2767
2777
  this.element.type = patch.type;
2768
2778
  }
2769
- if (patch?.value !== void 0 && patch?.value !== this.element.value) {
2779
+ if ((patch == null ? void 0 : patch.value) !== void 0 && (patch == null ? void 0 : patch.value) !== this.element.value) {
2770
2780
  if (patch.value === void 0) patch.value = "";
2771
- this.element.value = String(patch.value).slice(0, patch?.maxLength);
2781
+ this.element.value = String(patch.value).slice(0, patch == null ? void 0 : patch.maxLength);
2772
2782
  }
2773
2783
  } else if (this.entity === "textarea") {
2774
- if (patch?.value !== this.element.value) {
2775
- this.element.value = String(patch.value).slice(0, patch?.maxLength);
2784
+ if ((patch == null ? void 0 : patch.value) !== this.element.value) {
2785
+ this.element.value = String(patch.value).slice(0, patch == null ? void 0 : patch.maxLength);
2776
2786
  }
2777
2787
  } else if (this.entity === "select") {
2778
2788
  if (typeof patch.value === "string") {
@@ -2781,9 +2791,9 @@ var ComponentCore = class {
2781
2791
  }
2782
2792
  }
2783
2793
  } else if (this.entity === "option") {
2784
- if (this.container?.props?.value?.constructor?.name === "Array") {
2794
+ if (((_d = (_c = (_b = (_a6 = this.container) == null ? void 0 : _a6.props) == null ? void 0 : _b.value) == null ? void 0 : _c.constructor) == null ? void 0 : _d.name) === "Array") {
2785
2795
  patch.selected = this.container.props.value.indexOf(patch.value) !== -1;
2786
- } else if (typeof this.container?.props?.value === "string") {
2796
+ } else if (typeof ((_f = (_e = this.container) == null ? void 0 : _e.props) == null ? void 0 : _f.value) === "string") {
2787
2797
  patch.selected = this.container.props.value === patch.value;
2788
2798
  }
2789
2799
  }
@@ -2802,24 +2812,24 @@ var ComponentCore = class {
2802
2812
  if (special_attributes.has(al)) continue;
2803
2813
  if (patch === this.props || !lilact_default.defaultIsEqual(patch[a], this.props[a]) || force) {
2804
2814
  if (events_set.has(al)) {
2805
- this.event_detachers ?? (this.event_detachers = {});
2806
- this.event_detachers[al]?.();
2815
+ (_g = this.event_detachers) != null ? _g : this.event_detachers = {};
2816
+ (_i = (_h = this.event_detachers)[al]) == null ? void 0 : _i.call(_h);
2807
2817
  this.event_detachers[al] = lilact_default.addWrappedEventListener(this.element, al.substring(2), patch[a]);
2808
2818
  } else if (capture_events_set.hasOwnProperty(al)) {
2809
2819
  const alc = capture_events_set[al];
2810
- this.event_detachers ?? (this.event_detachers = {});
2811
- this.event_detachers[al]?.();
2820
+ (_j = this.event_detachers) != null ? _j : this.event_detachers = {};
2821
+ (_l = (_k = this.event_detachers)[al]) == null ? void 0 : _l.call(_k);
2812
2822
  this.event_detachers[al] = lilact_default.addWrappedEventListener(this.element, alc.substring(2), patch[a], { capture: true });
2813
2823
  } else if (a === "style") {
2814
2824
  if (typeof patch.style === "string") {
2815
2825
  this.element.style = patch.style;
2816
2826
  } else {
2817
- if (this.props?.style) {
2827
+ if ((_m = this.props) == null ? void 0 : _m.style) {
2818
2828
  if (typeof this.props.style === "string") {
2819
2829
  this.element.style = "";
2820
2830
  } else {
2821
2831
  for (let p in this.props.style) {
2822
- if (p !== CLONED_STYLE && !patch?.style?.hasOwnProperty?.(p)) {
2832
+ if (p !== CLONED_STYLE && !((_o = (_n = patch == null ? void 0 : patch.style) == null ? void 0 : _n.hasOwnProperty) == null ? void 0 : _o.call(_n, p))) {
2823
2833
  this.element.style[p] = "";
2824
2834
  }
2825
2835
  }
@@ -2848,7 +2858,7 @@ var ComponentCore = class {
2848
2858
  }
2849
2859
  }
2850
2860
  }
2851
- if (patch?.action) {
2861
+ if (patch == null ? void 0 : patch.action) {
2852
2862
  this.element.onsubmit = patch.action;
2853
2863
  } else {
2854
2864
  this.element.onsubmit = void 0;
@@ -2856,8 +2866,9 @@ var ComponentCore = class {
2856
2866
  this.updateElementClass(patch);
2857
2867
  }
2858
2868
  updateElementClass(patch = this.props) {
2859
- let cn = patch?.className ?? patch?.class ?? "";
2860
- if (this?.parent?.[CHILD_CLASS_ADDENDUM]) {
2869
+ var _a6, _b, _c;
2870
+ let cn = (_b = (_a6 = patch == null ? void 0 : patch.className) != null ? _a6 : patch == null ? void 0 : patch.class) != null ? _b : "";
2871
+ if ((_c = this == null ? void 0 : this.parent) == null ? void 0 : _c[CHILD_CLASS_ADDENDUM]) {
2861
2872
  cn += " " + this.parent[CHILD_CLASS_ADDENDUM];
2862
2873
  }
2863
2874
  cn = cn.trim();
@@ -2875,21 +2886,15 @@ var ComponentCore = class {
2875
2886
  }
2876
2887
  }
2877
2888
  }
2878
- scanZombies(container2, next_element) {
2879
- const chs = container2.element.childNodes;
2880
- while (chs[container2.insert_index] && chs[container2.insert_index][IS_ZOMBIE] && chs[container2.insert_index] !== next_element) {
2881
- container2.insert_index++;
2882
- }
2883
- }
2884
2889
  appendElement(core) {
2890
+ var _a6;
2885
2891
  if (core.portal) return;
2886
- this.scanZombies(core.container, core.element);
2887
- if (core?.element.parentNode === null) {
2892
+ if ((core == null ? void 0 : core.element.parentNode) === null) {
2888
2893
  core.container.element.insertBefore(
2889
2894
  core.element,
2890
2895
  core.container.element.childNodes[core.container.insert_index] || null
2891
2896
  );
2892
- if (core?.component?.componentDidMount) {
2897
+ if ((_a6 = core == null ? void 0 : core.component) == null ? void 0 : _a6.componentDidMount) {
2893
2898
  core.component.componentDidMount();
2894
2899
  }
2895
2900
  } else {
@@ -2903,6 +2908,7 @@ var ComponentCore = class {
2903
2908
  core.container.insert_index++;
2904
2909
  }
2905
2910
  arrangeOutlet() {
2911
+ var _a6;
2906
2912
  this.insert_index = 0;
2907
2913
  for (const core of this.outlet) {
2908
2914
  if (core) {
@@ -2911,9 +2917,9 @@ var ComponentCore = class {
2911
2917
  core.container.appendElement(core);
2912
2918
  } else {
2913
2919
  if (core.arrangeOutlet && core.outlet) core.arrangeOutlet();
2914
- if (!core?.mounted) {
2920
+ if (!(core == null ? void 0 : core.mounted)) {
2915
2921
  core.mounted = true;
2916
- if (core?.component?.componentDidMount) {
2922
+ if ((_a6 = core == null ? void 0 : core.component) == null ? void 0 : _a6.componentDidMount) {
2917
2923
  core.component.componentDidMount();
2918
2924
  }
2919
2925
  }
@@ -2926,35 +2932,44 @@ var ComponentCore = class {
2926
2932
  return func(this.state);
2927
2933
  }
2928
2934
  };
2929
- var renderErrorHandler = (c, e) => {
2930
- const value = e?.error instanceof Error ? e.error : e?.reason !== void 0 ? e.reason : e;
2931
- const error2 = lilact_default.isThenable(e) ? e : lilact_default.traceError(
2932
- value,
2933
- e?.fileName || null
2934
- );
2935
- const stack = [c];
2936
- while (c && !c.component?.componentDidCatch) {
2937
- c = c.parent;
2938
- if (c) stack.push(c);
2939
- }
2940
- if (c?.component?.componentDidCatch) {
2941
- if (c.entity?.getDerivedStateFromError) {
2942
- c.component.setState(c.entity.getDerivedStateFromError.call(c, error2));
2935
+ function prepareCore(parent, core) {
2936
+ var _a6, _b;
2937
+ try {
2938
+ (_a6 = parent.cache) != null ? _a6 : parent.cache = new ComponentCache(parent);
2939
+ const isText = core[TEXT2] !== void 0;
2940
+ const isExistingCore = core instanceof ComponentCore;
2941
+ const entity = isText || isExistingCore ? void 0 : resolveHotEntity(core.entity);
2942
+ const hasExplicitKey = !isText && core.props && core.props.key !== void 0 && core.props.key !== null;
2943
+ let key;
2944
+ if (isText) {
2945
+ key = ":text:";
2946
+ } else if (hasExplicitKey) {
2947
+ key = core.props.key;
2948
+ } else if (typeof entity === "function") {
2949
+ key = getHotEntityCacheToken(entity);
2950
+ } else {
2951
+ key = entity;
2952
+ }
2953
+ return parent.cache.pick(
2954
+ key,
2955
+ () => isText || isExistingCore ? core : constructFunc(core, parent)[CORE],
2956
+ entity
2957
+ );
2958
+ } catch (e) {
2959
+ if ((_b = core == null ? void 0 : core.component) == null ? void 0 : _b.componentDidCatch) {
2960
+ core.component.componentDidCatch(e);
2961
+ } else {
2962
+ throw e;
2943
2963
  }
2944
2964
  }
2945
- let stack_log = Array.prototype.map.call(stack, (x) => `in ${typeof x.component.displayName === "function" ? x.component.displayName() : x.component.displayName}`).join("\n");
2946
- error2.componentStack = stack;
2947
- error2.componentStackLog = stack_log;
2948
- if (c?.component?.componentDidCatch) {
2949
- c.component.componentDidCatch(error2, { componentStack: stack, componentStackLog: stack_log });
2950
- } else throw e;
2951
- };
2965
+ }
2952
2966
  function constructFunc(core, parent) {
2967
+ var _a6;
2953
2968
  let comp = core;
2954
2969
  if (core[TEXT2] === void 0) {
2955
2970
  let entity = core.entity;
2956
2971
  let memoized = false;
2957
- const loc = core.props[LOCATION];
2972
+ const loc = (_a6 = core == null ? void 0 : core.props) == null ? void 0 : _a6[LOCATION];
2958
2973
  if (loc) delete core.props[LOCATION];
2959
2974
  if (typeof entity === "object") {
2960
2975
  if (entity[MEMOIZED]) {
@@ -2968,7 +2983,7 @@ function constructFunc(core, parent) {
2968
2983
  if (typeof entity === "string") {
2969
2984
  comp = new HTMLComponent(entity, core.props);
2970
2985
  } else if (isClass(entity)) {
2971
- if (entity?.defaultProps) {
2986
+ if (entity == null ? void 0 : entity.defaultProps) {
2972
2987
  core.props = {
2973
2988
  ...entity.defaultProps,
2974
2989
  ...core.props
@@ -2996,7 +3011,7 @@ function constructFunc(core, parent) {
2996
3011
  }
2997
3012
  }
2998
3013
  } else if (typeof entity === "function") {
2999
- if (entity?.defaultProps) {
3014
+ if (entity == null ? void 0 : entity.defaultProps) {
3000
3015
  core.props = {
3001
3016
  ...entity.defaultProps,
3002
3017
  ...core.props
@@ -3007,7 +3022,7 @@ function constructFunc(core, parent) {
3007
3022
  comp[CORE].hooks = [];
3008
3023
  comp[CORE].hook_index = 0;
3009
3024
  } else {
3010
- throw new Error("Error in constructing component.");
3025
+ throw new Error(`Error in constructing component (${String(core.entity)}).`);
3011
3026
  }
3012
3027
  if (loc) comp[CORE].location = loc;
3013
3028
  comp[CORE].entity = entity;
@@ -3024,36 +3039,161 @@ function constructFunc(core, parent) {
3024
3039
  }
3025
3040
  return comp;
3026
3041
  }
3027
- function prepareCore(parent, core) {
3028
- try {
3029
- parent.cache ?? (parent.cache = new ComponentCache(parent));
3030
- const isText = core[TEXT2] !== void 0;
3031
- const isExistingCore = core instanceof ComponentCore;
3032
- const entity = isText || isExistingCore ? void 0 : resolveHotEntity(core.entity);
3033
- const hasExplicitKey = !isText && core.props && core.props.key !== void 0 && core.props.key !== null;
3034
- let key;
3035
- if (isText) {
3036
- key = ":text:";
3037
- } else if (hasExplicitKey) {
3038
- key = core.props.key;
3039
- } else if (typeof entity === "function") {
3040
- key = getHotEntityCacheToken(entity);
3041
- } else {
3042
- key = entity;
3043
- }
3044
- return parent.cache.pick(
3045
- key,
3046
- () => isText || isExistingCore ? core : constructFunc(core, parent)[CORE],
3047
- entity
3048
- );
3049
- } catch (e) {
3050
- if (core?.component?.componentDidCatch) {
3051
- core.component.componentDidCatch(e);
3052
- } else {
3053
- throw e;
3054
- }
3055
- }
3042
+ var special_attributes = /* @__PURE__ */ new Set([
3043
+ "classname",
3044
+ "ref",
3045
+ "action",
3046
+ "lilact_jsx_loc",
3047
+ "children",
3048
+ "key",
3049
+ "defaultvalue",
3050
+ "defaultchecked"
3051
+ ]);
3052
+ var events_set = /* @__PURE__ */ new Set([
3053
+ "onafterprint",
3054
+ "onbeforeprint",
3055
+ "onbeforeunload",
3056
+ "onerror",
3057
+ "onhashchange",
3058
+ "onload",
3059
+ "onmessage",
3060
+ "onoffline",
3061
+ "ononline",
3062
+ "onpagehide",
3063
+ "onpageshow",
3064
+ "onpopstate",
3065
+ "onresize",
3066
+ "onstorage",
3067
+ "onunload",
3068
+ "onblur",
3069
+ "onchange",
3070
+ "oncontextmenu",
3071
+ "onfocus",
3072
+ "oninput",
3073
+ "oninvalid",
3074
+ "onreset",
3075
+ "onsearch",
3076
+ "onselect",
3077
+ "onsubmit",
3078
+ "oncancel",
3079
+ "onkeydown",
3080
+ "onkeypress",
3081
+ "onkeyup",
3082
+ "onclick",
3083
+ "ondblclick",
3084
+ "onmousedown",
3085
+ "onmousemove",
3086
+ "onmouseout",
3087
+ "onmouseover",
3088
+ "onmouseup",
3089
+ "onmousewheel",
3090
+ "onwheel",
3091
+ "ondrag",
3092
+ "ondragend",
3093
+ "ondragenter",
3094
+ "ondragleave",
3095
+ "ondragover",
3096
+ "ondragstart",
3097
+ "ondrop",
3098
+ "onscroll",
3099
+ "oncopy",
3100
+ "oncut",
3101
+ "onpaste",
3102
+ "onabort",
3103
+ "oncanplay",
3104
+ "oncanplaythrough",
3105
+ "oncuechange",
3106
+ "ondurationchange",
3107
+ "onemptied",
3108
+ "onended",
3109
+ "onerror",
3110
+ "onloadeddata",
3111
+ "onloadedmetadata",
3112
+ "onloadstart",
3113
+ "onpause",
3114
+ "onplay",
3115
+ "onplaying",
3116
+ "onprogress",
3117
+ "onratechange",
3118
+ "onseeked",
3119
+ "onseeking",
3120
+ "onstalled",
3121
+ "onsuspend",
3122
+ "ontimeupdate",
3123
+ "onvolumechange",
3124
+ "onwaiting",
3125
+ "ontoggle",
3126
+ "onpointerdown",
3127
+ "onpointerup",
3128
+ "onpointermove",
3129
+ "onpointercancel",
3130
+ "onpointerover",
3131
+ "onpointerout",
3132
+ "onpointerenter",
3133
+ "onpointerleave"
3134
+ ]);
3135
+ var capture_events_set = {};
3136
+ for (const x of events_set) {
3137
+ capture_events_set[x + "capture"] = x;
3056
3138
  }
3139
+ var length_css_attributes_set = /* @__PURE__ */ new Set([
3140
+ "width",
3141
+ "height",
3142
+ "minWidth",
3143
+ "minHeight",
3144
+ "maxWidth",
3145
+ "maxHeight",
3146
+ "top",
3147
+ "right",
3148
+ "bottom",
3149
+ "left",
3150
+ "margin",
3151
+ "marginTop",
3152
+ "marginRight",
3153
+ "marginBottom",
3154
+ "marginLeft",
3155
+ "padding",
3156
+ "paddingTop",
3157
+ "paddingRight",
3158
+ "paddingBottom",
3159
+ "paddingLeft",
3160
+ "borderWidth",
3161
+ "borderTopWidth",
3162
+ "borderRightWidth",
3163
+ "borderBottomWidth",
3164
+ "borderLeftWidth",
3165
+ "outlineWidth",
3166
+ "fontSize",
3167
+ "lineHeight",
3168
+ "letterSpacing",
3169
+ "wordSpacing",
3170
+ "textIndent",
3171
+ "borderRadius",
3172
+ "borderTopLeftRadius",
3173
+ "borderTopRightRadius",
3174
+ "borderBottomLeftRadius",
3175
+ "borderBottomRightRadius",
3176
+ "columnGap",
3177
+ "rowGap",
3178
+ "gap"
3179
+ ]);
3180
+ var boolean_html_attributes_set = /* @__PURE__ */ new Set([
3181
+ "disabled",
3182
+ "readOnly",
3183
+ "required",
3184
+ "checked",
3185
+ "multiple",
3186
+ "selected",
3187
+ "hidden",
3188
+ "open",
3189
+ "loop",
3190
+ "muted",
3191
+ "controls",
3192
+ "playsInline",
3193
+ "allowFullScreen"
3194
+ ]);
3195
+
3196
+ // .tmp/src/components.jsx
3057
3197
  function doUpdates() {
3058
3198
  clearTimeout(lilact_default.effect_timeout);
3059
3199
  const _update_set = lilact_default.update_set;
@@ -3091,7 +3231,7 @@ var generateComponentKey = (entity, props) => {
3091
3231
  } else {
3092
3232
  if (typeof entity === "string") {
3093
3233
  key = ":t:" + entity;
3094
- } else if (entity?.name) {
3234
+ } else if (entity == null ? void 0 : entity.name) {
3095
3235
  key = entity.name;
3096
3236
  } else {
3097
3237
  key = "::";
@@ -3182,7 +3322,7 @@ var Component = class {
3182
3322
  */
3183
3323
  get displayName() {
3184
3324
  const entity = this[CORE].entity;
3185
- if (entity?.displayName) {
3325
+ if (entity == null ? void 0 : entity.displayName) {
3186
3326
  return entity.displayName;
3187
3327
  }
3188
3328
  if (typeof entity === "string") {
@@ -3261,6 +3401,7 @@ var RootComponent = class extends HTMLComponent {
3261
3401
  if (typeof this.element === "string") {
3262
3402
  element = document.querySelector(element);
3263
3403
  }
3404
+ element.innerHTML = "";
3264
3405
  this[CORE].element = element;
3265
3406
  for (const ch2 of props.children) {
3266
3407
  if (ch2[CORE]) ch2[CORE].container = this[CORE];
@@ -3309,7 +3450,7 @@ function createRoot(element) {
3309
3450
  },
3310
3451
  unmount() {
3311
3452
  if (root) {
3312
- root.cleanup();
3453
+ root[CORE].cleanup();
3313
3454
  element.innerHTML = "";
3314
3455
  }
3315
3456
  },
@@ -3323,7 +3464,7 @@ function createPortal(children, element) {
3323
3464
  }
3324
3465
  function cloneComponent(component, propsPatch, ...children) {
3325
3466
  const cc = { entity: component.entity, props: { ...component.props, ...propsPatch }, [CORE]: null };
3326
- if (children?.length) {
3467
+ if (children == null ? void 0 : children.length) {
3327
3468
  cc.props.children = children;
3328
3469
  }
3329
3470
  return cc;
@@ -3354,159 +3495,6 @@ var passive_effects = /* @__PURE__ */ new Set();
3354
3495
  var update_timeout = void 0;
3355
3496
  var effect_timeout = void 0;
3356
3497
  var update_interval_margin = 0;
3357
- var special_attributes = /* @__PURE__ */ new Set([
3358
- "classname",
3359
- "ref",
3360
- "action",
3361
- "lilact_jsx_loc",
3362
- "children",
3363
- "key",
3364
- "defaultvalue",
3365
- "defaultchecked"
3366
- ]);
3367
- var events_set = /* @__PURE__ */ new Set([
3368
- "onafterprint",
3369
- "onbeforeprint",
3370
- "onbeforeunload",
3371
- "onerror",
3372
- "onhashchange",
3373
- "onload",
3374
- "onmessage",
3375
- "onoffline",
3376
- "ononline",
3377
- "onpagehide",
3378
- "onpageshow",
3379
- "onpopstate",
3380
- "onresize",
3381
- "onstorage",
3382
- "onunload",
3383
- "onblur",
3384
- "onchange",
3385
- "oncontextmenu",
3386
- "onfocus",
3387
- "oninput",
3388
- "oninvalid",
3389
- "onreset",
3390
- "onsearch",
3391
- "onselect",
3392
- "onsubmit",
3393
- "oncancel",
3394
- "onkeydown",
3395
- "onkeypress",
3396
- "onkeyup",
3397
- "onclick",
3398
- "ondblclick",
3399
- "onmousedown",
3400
- "onmousemove",
3401
- "onmouseout",
3402
- "onmouseover",
3403
- "onmouseup",
3404
- "onmousewheel",
3405
- "onwheel",
3406
- "ondrag",
3407
- "ondragend",
3408
- "ondragenter",
3409
- "ondragleave",
3410
- "ondragover",
3411
- "ondragstart",
3412
- "ondrop",
3413
- "onscroll",
3414
- "oncopy",
3415
- "oncut",
3416
- "onpaste",
3417
- "onabort",
3418
- "oncanplay",
3419
- "oncanplaythrough",
3420
- "oncuechange",
3421
- "ondurationchange",
3422
- "onemptied",
3423
- "onended",
3424
- "onerror",
3425
- "onloadeddata",
3426
- "onloadedmetadata",
3427
- "onloadstart",
3428
- "onpause",
3429
- "onplay",
3430
- "onplaying",
3431
- "onprogress",
3432
- "onratechange",
3433
- "onseeked",
3434
- "onseeking",
3435
- "onstalled",
3436
- "onsuspend",
3437
- "ontimeupdate",
3438
- "onvolumechange",
3439
- "onwaiting",
3440
- "ontoggle",
3441
- "onpointerdown",
3442
- "onpointerup",
3443
- "onpointermove",
3444
- "onpointercancel",
3445
- "onpointerover",
3446
- "onpointerout",
3447
- "onpointerenter",
3448
- "onpointerleave"
3449
- ]);
3450
- var capture_events_set = {};
3451
- for (const x of events_set) {
3452
- capture_events_set[x + "capture"] = x;
3453
- }
3454
- var length_css_attributes_set = /* @__PURE__ */ new Set([
3455
- "width",
3456
- "height",
3457
- "minWidth",
3458
- "minHeight",
3459
- "maxWidth",
3460
- "maxHeight",
3461
- "top",
3462
- "right",
3463
- "bottom",
3464
- "left",
3465
- "margin",
3466
- "marginTop",
3467
- "marginRight",
3468
- "marginBottom",
3469
- "marginLeft",
3470
- "padding",
3471
- "paddingTop",
3472
- "paddingRight",
3473
- "paddingBottom",
3474
- "paddingLeft",
3475
- "borderWidth",
3476
- "borderTopWidth",
3477
- "borderRightWidth",
3478
- "borderBottomWidth",
3479
- "borderLeftWidth",
3480
- "outlineWidth",
3481
- "fontSize",
3482
- "lineHeight",
3483
- "letterSpacing",
3484
- "wordSpacing",
3485
- "textIndent",
3486
- "borderRadius",
3487
- "borderTopLeftRadius",
3488
- "borderTopRightRadius",
3489
- "borderBottomLeftRadius",
3490
- "borderBottomRightRadius",
3491
- "columnGap",
3492
- "rowGap",
3493
- "gap"
3494
- ]);
3495
- var boolean_html_attributes_set = /* @__PURE__ */ new Set([
3496
- "disabled",
3497
- "readOnly",
3498
- "required",
3499
- "checked",
3500
- "multiple",
3501
- "selected",
3502
- "hidden",
3503
- "open",
3504
- "loop",
3505
- "muted",
3506
- "controls",
3507
- "playsInline",
3508
- "allowFullScreen"
3509
- ]);
3510
3498
 
3511
3499
  // .tmp/src/hooks.jsx
3512
3500
  var hooks_exports = {};
@@ -3557,11 +3545,11 @@ function useCallback(callback, deps) {
3557
3545
  }
3558
3546
  const hk = useHook();
3559
3547
  if (!isEmpty(hk)) {
3560
- if (deps !== void 0 && hk?.deps !== void 0 && shallowEqual(deps, hk.deps)) {
3548
+ if (deps !== void 0 && (hk == null ? void 0 : hk.deps) !== void 0 && shallowEqual(deps, hk.deps)) {
3561
3549
  return hk.callback;
3562
3550
  }
3563
3551
  }
3564
- if (hk?.cleanup) {
3552
+ if (hk == null ? void 0 : hk.cleanup) {
3565
3553
  hk.cleanup();
3566
3554
  }
3567
3555
  hk.deps = deps;
@@ -3578,11 +3566,12 @@ function createContext(defaultValue) {
3578
3566
  };
3579
3567
  }
3580
3568
  function useContext(context2) {
3581
- let core = lilact_default.current_component[0]?.parent;
3569
+ var _a6, _b, _c;
3570
+ let core = (_a6 = lilact_default.current_component[0]) == null ? void 0 : _a6.parent;
3582
3571
  while (core && core.entity !== context2.Provider) {
3583
3572
  core = core.parent;
3584
3573
  }
3585
- return core ? core.props?.value ?? context2.default : context2.default;
3574
+ return core ? (_c = (_b = core.props) == null ? void 0 : _b.value) != null ? _c : context2.default : context2.default;
3586
3575
  }
3587
3576
  function useId(prefix2 = "N") {
3588
3577
  const hk = useHook();
@@ -3613,6 +3602,7 @@ function useTransition() {
3613
3602
  return [hk.count != 0, hk.func];
3614
3603
  }
3615
3604
  function useLocalStorage(key, initialValue) {
3605
+ if (Array.isArray(key)) key = key.join(":");
3616
3606
  const hk = useHook();
3617
3607
  let val;
3618
3608
  try {
@@ -3649,9 +3639,9 @@ async function useLayoutEffect(effect, deps) {
3649
3639
  }
3650
3640
  const hk = useHook();
3651
3641
  if (!isEmpty(hk)) {
3652
- if (deps !== void 0 && hk?.deps !== void 0 && shallowEqual(deps, hk.deps)) return;
3642
+ if (deps !== void 0 && (hk == null ? void 0 : hk.deps) !== void 0 && shallowEqual(deps, hk.deps)) return;
3653
3643
  }
3654
- if (hk?.cleanup) {
3644
+ if (hk == null ? void 0 : hk.cleanup) {
3655
3645
  await hk.cleanup();
3656
3646
  hk.cleanup = void 0;
3657
3647
  }
@@ -3668,9 +3658,9 @@ async function useEffect(effect, deps) {
3668
3658
  }
3669
3659
  const hk = useHook();
3670
3660
  if (!isEmpty(hk)) {
3671
- if (deps !== void 0 && hk?.deps !== void 0 && shallowEqual(deps, hk.deps)) return;
3661
+ if (deps !== void 0 && (hk == null ? void 0 : hk.deps) !== void 0 && shallowEqual(deps, hk.deps)) return;
3672
3662
  }
3673
- if (hk?.cleanup) {
3663
+ if (hk == null ? void 0 : hk.cleanup) {
3674
3664
  await hk.cleanup();
3675
3665
  hk.cleanup = void 0;
3676
3666
  }
@@ -3687,9 +3677,9 @@ async function useInsertionEffect(effect, deps) {
3687
3677
  }
3688
3678
  const hk = useHook();
3689
3679
  if (!isEmpty(hk)) {
3690
- if (deps !== void 0 && hk?.deps !== void 0 && shallowEqual(deps, hk.deps)) return;
3680
+ if (deps !== void 0 && (hk == null ? void 0 : hk.deps) !== void 0 && shallowEqual(deps, hk.deps)) return;
3691
3681
  }
3692
- if (hk?.cleanup) {
3682
+ if (hk == null ? void 0 : hk.cleanup) {
3693
3683
  await hk.cleanup();
3694
3684
  hk.cleanup = void 0;
3695
3685
  }
@@ -3706,7 +3696,7 @@ function useMemo(factory, deps) {
3706
3696
  }
3707
3697
  const hk = useHook();
3708
3698
  if (!isEmpty(hk)) {
3709
- if (deps !== void 0 && hk?.deps !== void 0 && shallowEqual(deps, hk.deps)) {
3699
+ if (deps !== void 0 && (hk == null ? void 0 : hk.deps) !== void 0 && shallowEqual(deps, hk.deps)) {
3710
3700
  return hk.value;
3711
3701
  }
3712
3702
  }
@@ -3778,9 +3768,9 @@ function useDeferredValue(value, initialValue) {
3778
3768
  return deferred;
3779
3769
  }
3780
3770
  function useImperativeHandle(ref, factory, deps) {
3781
- if (deps !== void 0 && ref?.deps !== void 0 && shallowEqual(deps, ref.deps)) return;
3771
+ if (deps !== void 0 && (ref == null ? void 0 : ref.deps) !== void 0 && shallowEqual(deps, ref.deps)) return;
3782
3772
  ref.deps = deps;
3783
- if (typeof ref?.current !== "object") {
3773
+ if (typeof (ref == null ? void 0 : ref.current) !== "object") {
3784
3774
  ref.current = {};
3785
3775
  }
3786
3776
  Object.assign(ref.current, factory());
@@ -3821,9 +3811,9 @@ function joinPaths(basePath, relativePath) {
3821
3811
  }
3822
3812
  function asError(value, fallback = "Unknown error") {
3823
3813
  if (value instanceof Error) return value;
3824
- if (value?.error instanceof Error) return value.error;
3814
+ if ((value == null ? void 0 : value.error) instanceof Error) return value.error;
3825
3815
  const error2 = new Error(
3826
- value?.message == null ? fallback : String(value.message)
3816
+ (value == null ? void 0 : value.message) == null ? fallback : String(value.message)
3827
3817
  );
3828
3818
  if (value && typeof value === "object") {
3829
3819
  if (value.name) error2.name = value.name;
@@ -3872,10 +3862,11 @@ function createModule(path2, {
3872
3862
  return module2;
3873
3863
  }
3874
3864
  function loadModule(path2, options2 = {}) {
3875
- if (lilact_default.importObjectPaths?.[path2]) {
3865
+ var _a6, _b, _c, _d;
3866
+ if ((_a6 = lilact_default.importObjectPaths) == null ? void 0 : _a6[path2]) {
3876
3867
  return lilact_default.importObjectPaths[path2];
3877
3868
  }
3878
- if (options2.requirer?.path) {
3869
+ if ((_b = options2.requirer) == null ? void 0 : _b.path) {
3879
3870
  path2 = joinPaths(options2.requirer.path, path2);
3880
3871
  }
3881
3872
  const loadAsync = Boolean(lilact_default[LAZY]) || Boolean(options2.isLazy);
@@ -3904,7 +3895,7 @@ function loadModule(path2, options2 = {}) {
3904
3895
  }
3905
3896
  return loadAsyncResource(path2, module2, options2);
3906
3897
  }
3907
- const resolved = lilact_default.resolver?.(path2);
3898
+ const resolved = (_d = (_c = lilact_default).resolver) == null ? void 0 : _d.call(_c, path2);
3908
3899
  if (resolved != null) {
3909
3900
  if (path2.endsWith(".css")) {
3910
3901
  injectGlobal(String(resolved));
@@ -3953,7 +3944,8 @@ function require2(path2) {
3953
3944
  return loadModule(path2, options2);
3954
3945
  }
3955
3946
  function makeImportsObject(mod, options2 = {}) {
3956
- mod.importsObject ?? (mod.importsObject = {});
3947
+ var _a6;
3948
+ (_a6 = mod.importsObject) != null ? _a6 : mod.importsObject = {};
3957
3949
  for (const key of Object.keys(mod.importsObject)) {
3958
3950
  delete mod.importsObject[key];
3959
3951
  }
@@ -3998,13 +3990,14 @@ function replaceReloadedExports(previousExports2, nextExports2) {
3998
3990
  const oldExport = oldExports[name];
3999
3991
  const newExport = newExports[name];
4000
3992
  if (typeof oldExport === "function" && typeof newExport === "function") {
4001
- lilact_default.replaceAllComponentInstances(oldExport, newExport);
3993
+ replaceAllComponentInstances(oldExport, newExport);
4002
3994
  }
4003
3995
  }
4004
3996
  }
4005
3997
  function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, options = {}) {
3998
+ var _a6, _b, _c;
4006
3999
  let module = required_scripts[path];
4007
- const previousExports = module?.loaded ? module.exports : void 0;
4000
+ const previousExports = (module == null ? void 0 : module.loaded) ? module.exports : void 0;
4008
4001
  if (!module) {
4009
4002
  module = createModule(path, {
4010
4003
  code: jsx
@@ -4033,8 +4026,8 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, options = {})
4033
4026
  });
4034
4027
  } catch (value) {
4035
4028
  const error2 = asError(value);
4036
- error2.fileName ?? (error2.fileName = path);
4037
- error2.lilact_source ?? (error2.lilact_source = { path });
4029
+ (_a6 = error2.fileName) != null ? _a6 : error2.fileName = path;
4030
+ (_b = error2.lilact_source) != null ? _b : error2.lilact_source = { path };
4038
4031
  error2.sourcePhase = "transpile";
4039
4032
  module.error = error2;
4040
4033
  lilact_default.error = error2;
@@ -4054,7 +4047,7 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, options = {})
4054
4047
  return nextExports;
4055
4048
  } catch (value) {
4056
4049
  const error2 = report(value, path);
4057
- error2.sourcePhase ?? (error2.sourcePhase = "runtime");
4050
+ (_c = error2.sourcePhase) != null ? _c : error2.sourcePhase = "runtime";
4058
4051
  module.error = error2;
4059
4052
  throw error2;
4060
4053
  }
@@ -4063,9 +4056,10 @@ function getOrCreateModule(path2, options2 = {}) {
4063
4056
  return required_scripts[path2] || createModule(path2, options2);
4064
4057
  }
4065
4058
  function loadAsyncResource(path2, module2, options2 = {}) {
4059
+ var _a6, _b;
4066
4060
  let source;
4067
4061
  try {
4068
- const resolved = lilact_default.resolver?.(path2);
4062
+ const resolved = (_b = (_a6 = lilact_default).resolver) == null ? void 0 : _b.call(_a6, path2);
4069
4063
  if (resolved == null) {
4070
4064
  if (module2.code && !module2.loaded) {
4071
4065
  source = Promise.resolve(module2.code);
@@ -4097,7 +4091,10 @@ function loadAsyncResource(path2, module2, options2 = {}) {
4097
4091
  return void 0;
4098
4092
  }
4099
4093
  return run(module2.code, path2, options2);
4100
- }).then((result2) => result2?.default ?? result2).catch((error2) => {
4094
+ }).then((result2) => {
4095
+ var _a7;
4096
+ return (_a7 = result2 == null ? void 0 : result2.default) != null ? _a7 : result2;
4097
+ }).catch((error2) => {
4101
4098
  module2.error = report(error2, path2);
4102
4099
  throw module2.error;
4103
4100
  }).finally(() => {
@@ -4135,10 +4132,11 @@ function lazy(factory) {
4135
4132
  status = "success";
4136
4133
  }
4137
4134
  function LazyComponent(props) {
4135
+ var _a6;
4138
4136
  if (status === "pending" || status === "error") {
4139
4137
  throw result2;
4140
4138
  }
4141
- const Component2 = result2?.default ?? result2;
4139
+ const Component2 = (_a6 = result2 == null ? void 0 : result2.default) != null ? _a6 : result2;
4142
4140
  return createComponent(Component2, { ...props });
4143
4141
  }
4144
4142
  return LazyComponent;
@@ -4192,10 +4190,10 @@ function Transition({
4192
4190
  // but the user should use CSSTransition itself.
4193
4191
  _classNames: classNames
4194
4192
  }) {
4195
- var _a, _b, _c;
4196
- (_a = this[CORE]).is_mounted ?? (_a.is_mounted = !mountOnEnter || inProp || appear);
4197
- (_b = this[CORE]).is_appeared ?? (_b.is_appeared = inProp);
4198
- (_c = this[CORE]).timer ?? (_c.timer = null);
4193
+ var _a6, _b, _c, _d, _e, _f;
4194
+ (_b = (_a6 = this[CORE]).is_mounted) != null ? _b : _a6.is_mounted = !mountOnEnter || inProp || appear;
4195
+ (_d = (_c = this[CORE]).is_appeared) != null ? _d : _c.is_appeared = inProp;
4196
+ (_f = (_e = this[CORE]).timer) != null ? _f : _e.timer = null;
4199
4197
  this[CORE].childFunctionHandler = (func) => {
4200
4198
  return func(this[CORE].mount_state);
4201
4199
  };
@@ -4210,15 +4208,15 @@ function Transition({
4210
4208
  }, []);
4211
4209
  useEffect(() => {
4212
4210
  if (!this[CORE].is_appeared && appear && this[CORE].mount_state === ENTERING && inProp) {
4213
- onEnter?.();
4211
+ onEnter == null ? void 0 : onEnter();
4214
4212
  requestAnimationFrame(() => {
4215
- onEntering?.(!this[CORE].is_appeared);
4213
+ onEntering == null ? void 0 : onEntering(!this[CORE].is_appeared);
4216
4214
  clearTimeout(this[CORE].timer);
4217
4215
  this[CORE].timer = setTimeout(() => {
4218
4216
  this[CORE].mount_state = ENTERED;
4219
4217
  this.forceUpdate();
4220
4218
  this[CORE].is_appeared = true;
4221
- onEntered?.(!this[CORE].is_appeared);
4219
+ onEntered == null ? void 0 : onEntered(!this[CORE].is_appeared);
4222
4220
  }, timeout);
4223
4221
  });
4224
4222
  }
@@ -4227,29 +4225,29 @@ function Transition({
4227
4225
  if (inProp) {
4228
4226
  this[CORE].is_mounted = true;
4229
4227
  if (this[CORE].mount_state === ENTERING || this[CORE].mount_state === ENTERED) return;
4230
- onEnter?.(!this[CORE].is_appeared);
4228
+ onEnter == null ? void 0 : onEnter(!this[CORE].is_appeared);
4231
4229
  this[CORE].mount_state = ENTERING;
4232
4230
  this.forceUpdate(() => {
4233
- onEntering?.(!this[CORE].is_appeared);
4231
+ onEntering == null ? void 0 : onEntering(!this[CORE].is_appeared);
4234
4232
  clearTimeout(this[CORE].timer);
4235
4233
  this[CORE].timer = setTimeout(() => {
4236
4234
  this[CORE].mount_state = ENTERED;
4237
4235
  this.forceUpdate();
4238
4236
  this[CORE].is_appeared = true;
4239
- onEntered?.();
4237
+ onEntered == null ? void 0 : onEntered();
4240
4238
  }, timeout);
4241
4239
  });
4242
4240
  } else {
4243
4241
  if (this[CORE].mount_state === UNMOUNTED || this[CORE].mount_state === EXITING || this[CORE].mount_state === EXITED) return;
4244
- onExit?.();
4242
+ onExit == null ? void 0 : onExit();
4245
4243
  this[CORE].mount_state = EXITING;
4246
4244
  this.forceUpdate(() => {
4247
- onExiting?.();
4245
+ onExiting == null ? void 0 : onExiting();
4248
4246
  clearTimeout(this[CORE].timer);
4249
4247
  this[CORE].timer = setTimeout(() => {
4250
4248
  this[CORE].mount_state = EXITED;
4251
4249
  this.forceUpdate();
4252
- onExited?.();
4250
+ onExited == null ? void 0 : onExited();
4253
4251
  if (unmountOnExit) {
4254
4252
  this[CORE].is_mounted = false;
4255
4253
  this[CORE].mount_state = UNMOUNTED;
@@ -4371,7 +4369,8 @@ function SwitchTransition({
4371
4369
  }
4372
4370
  };
4373
4371
  return createComponent("div", { "style": { position: "relative" } }, childArray.map((child, index2) => {
4374
- const key = child?.props?.key || index2;
4372
+ var _a6;
4373
+ const key = ((_a6 = child == null ? void 0 : child.props) == null ? void 0 : _a6.key) || index2;
4375
4374
  const isIncoming = key === activeKey;
4376
4375
  const isOutgoing = key === exitingKey;
4377
4376
  const inProp = isIncoming ? enterAllowed : isOutgoing ? !exitStarted : false;
@@ -4393,21 +4392,24 @@ __export(events_exports, {
4393
4392
  });
4394
4393
  var SyntheticEvent = class {
4395
4394
  constructor(nativeEvent, currentTarget) {
4395
+ var _a6;
4396
4396
  this.nativeEvent = nativeEvent;
4397
4397
  this.type = nativeEvent.type;
4398
4398
  this.target = nativeEvent.target || nativeEvent.srcElement || null;
4399
4399
  this.currentTarget = currentTarget || nativeEvent.currentTarget || null;
4400
- this.timeStamp = nativeEvent.timeStamp ?? Date.now();
4400
+ this.timeStamp = (_a6 = nativeEvent.timeStamp) != null ? _a6 : Date.now();
4401
4401
  this.defaultPrevented = !!nativeEvent.defaultPrevented;
4402
4402
  let propagationStopped = false;
4403
4403
  this.isDefaultPrevented = () => this.defaultPrevented;
4404
4404
  this.isPropagationStopped = () => propagationStopped;
4405
4405
  this.preventDefault = () => {
4406
- nativeEvent.preventDefault?.();
4406
+ var _a7;
4407
+ (_a7 = nativeEvent.preventDefault) == null ? void 0 : _a7.call(nativeEvent);
4407
4408
  this.defaultPrevented = true;
4408
4409
  };
4409
4410
  this.stopPropagation = () => {
4410
- nativeEvent.stopPropagation?.();
4411
+ var _a7;
4412
+ (_a7 = nativeEvent.stopPropagation) == null ? void 0 : _a7.call(nativeEvent);
4411
4413
  propagationStopped = true;
4412
4414
  };
4413
4415
  this.persist = () => {
@@ -4469,7 +4471,7 @@ __export(redux_exports2, {
4469
4471
  });
4470
4472
  var ReduxContext;
4471
4473
  function Provider({ store, children }) {
4472
- ReduxContext ?? (ReduxContext = createContext(null));
4474
+ ReduxContext != null ? ReduxContext : ReduxContext = createContext(null);
4473
4475
  return createComponent(ReduxContext.Provider, { "value": store }, children);
4474
4476
  }
4475
4477
  function useStore() {
@@ -4571,11 +4573,16 @@ var timer_pause_time;
4571
4573
  var current_timer_idx = 0;
4572
4574
  var timer_list = [];
4573
4575
  var timer_timeout = 0;
4574
- globalThis.NATIVE_TIMERS ?? (globalThis.NATIVE_TIMERS = {});
4575
- NATIVE_TIMERS.setTimeout ?? (NATIVE_TIMERS.setTimeout = globalThis.setTimeout.bind(globalThis));
4576
- NATIVE_TIMERS.setInterval ?? (NATIVE_TIMERS.setInterval = globalThis.setInterval.bind(globalThis));
4577
- NATIVE_TIMERS.clearTimeout ?? (NATIVE_TIMERS.clearTimeout = globalThis.clearTimeout.bind(globalThis));
4578
- NATIVE_TIMERS.clearInterval ?? (NATIVE_TIMERS.clearInterval = globalThis.clearInterval.bind(globalThis));
4576
+ var _a;
4577
+ (_a = globalThis.NATIVE_TIMERS) != null ? _a : globalThis.NATIVE_TIMERS = {};
4578
+ var _a2;
4579
+ (_a2 = NATIVE_TIMERS.setTimeout) != null ? _a2 : NATIVE_TIMERS.setTimeout = globalThis.setTimeout.bind(globalThis);
4580
+ var _a3;
4581
+ (_a3 = NATIVE_TIMERS.setInterval) != null ? _a3 : NATIVE_TIMERS.setInterval = globalThis.setInterval.bind(globalThis);
4582
+ var _a4;
4583
+ (_a4 = NATIVE_TIMERS.clearTimeout) != null ? _a4 : NATIVE_TIMERS.clearTimeout = globalThis.clearTimeout.bind(globalThis);
4584
+ var _a5;
4585
+ (_a5 = NATIVE_TIMERS.clearInterval) != null ? _a5 : NATIVE_TIMERS.clearInterval = globalThis.clearInterval.bind(globalThis);
4579
4586
  var all_timers = /* @__PURE__ */ new Map();
4580
4587
  function get_bucket(target) {
4581
4588
  let left = 0;
@@ -4643,7 +4650,7 @@ function run_timer() {
4643
4650
  try {
4644
4651
  timer[CALLBACK](...timer[ARGS]);
4645
4652
  } catch (error2) {
4646
- first_error ?? (first_error = error2);
4653
+ first_error != null ? first_error : first_error = error2;
4647
4654
  }
4648
4655
  if (timer[CLEARED]) {
4649
4656
  all_timers.delete(timer[IDX]);
@@ -4795,9 +4802,9 @@ function number(value) {
4795
4802
  }
4796
4803
  function asError2(value) {
4797
4804
  if (value instanceof Error) return value;
4798
- if (value?.error instanceof Error) return value.error;
4805
+ if ((value == null ? void 0 : value.error) instanceof Error) return value.error;
4799
4806
  const error2 = new Error(
4800
- value?.message == null ? String(value) : String(value.message)
4807
+ (value == null ? void 0 : value.message) == null ? String(value) : String(value.message)
4801
4808
  );
4802
4809
  if (value && typeof value === "object") {
4803
4810
  if (value.name) error2.name = value.name;
@@ -4809,7 +4816,7 @@ function asError2(value) {
4809
4816
  return error2;
4810
4817
  }
4811
4818
  function isParserError(error2) {
4812
- return error2?.name === "JSXParserError";
4819
+ return (error2 == null ? void 0 : error2.name) === "JSXParserError";
4813
4820
  }
4814
4821
  function stackLocation(stack) {
4815
4822
  if (typeof stack !== "string") return null;
@@ -4825,11 +4832,12 @@ function stackLocation(stack) {
4825
4832
  return null;
4826
4833
  }
4827
4834
  function browserLocation(error2) {
4835
+ var _a6, _b, _c, _d;
4828
4836
  const line2 = number(
4829
- error2?.lineNumber ?? error2?.lineno ?? error2?.line
4837
+ (_b = (_a6 = error2 == null ? void 0 : error2.lineNumber) != null ? _a6 : error2 == null ? void 0 : error2.lineno) != null ? _b : error2 == null ? void 0 : error2.line
4830
4838
  );
4831
4839
  const column2 = number(
4832
- error2?.columnNumber ?? error2?.colno ?? error2?.column
4840
+ (_d = (_c = error2 == null ? void 0 : error2.columnNumber) != null ? _c : error2 == null ? void 0 : error2.colno) != null ? _d : error2 == null ? void 0 : error2.column
4833
4841
  );
4834
4842
  const lineOffset = isSafari() ? 0 : 1;
4835
4843
  return {
@@ -4838,12 +4846,13 @@ function browserLocation(error2) {
4838
4846
  };
4839
4847
  }
4840
4848
  function traceBlock(error2) {
4841
- const trace = error2?.lilact_trace;
4849
+ const trace = error2 == null ? void 0 : error2.lilact_trace;
4842
4850
  return Array.isArray(trace) ? trace[0] : trace;
4843
4851
  }
4844
4852
  function blockInfo(error2) {
4853
+ var _a6, _b;
4845
4854
  const trace = traceBlock(error2);
4846
- return trace == null ? null : lilact_default.blocksInfo?.labels?.[trace];
4855
+ return trace == null ? null : (_b = (_a6 = lilact_default.blocksInfo) == null ? void 0 : _a6.labels) == null ? void 0 : _b[trace];
4847
4856
  }
4848
4857
  function mapLocation(mappings, line2, column2) {
4849
4858
  if (!Array.isArray(mappings) || !mappings.length || !Number.isFinite(line2) || !Number.isFinite(column2)) {
@@ -4875,7 +4884,8 @@ function mapLocation(mappings, line2, column2) {
4875
4884
  };
4876
4885
  }
4877
4886
  function traceError(value, runPath) {
4878
- if (value?.isTraced) return value;
4887
+ var _a6, _b, _c, _d, _e, _f, _g, _h;
4888
+ if (value == null ? void 0 : value.isTraced) return value;
4879
4889
  const error2 = asError2(value);
4880
4890
  const source = error2.lilact_source;
4881
4891
  const stack = isParserError(error2) ? null : stackLocation(error2.stack);
@@ -4883,10 +4893,10 @@ function traceError(value, runPath) {
4883
4893
  line: number(error2.lineNumber),
4884
4894
  column: number(error2.columnNumber)
4885
4895
  } : browserLocation(error2);
4886
- const fileName = source?.path || stack?.path || error2.fileName || runPath || null;
4887
- const sameSource = !source?.path || !stack?.path || source.path === stack.path;
4888
- let line2 = sameSource ? stack?.line ?? browser.line ?? null : browser.line ?? null;
4889
- let column2 = sameSource ? stack?.column ?? browser.column ?? null : browser.column ?? null;
4896
+ const fileName = (source == null ? void 0 : source.path) || (stack == null ? void 0 : stack.path) || error2.fileName || runPath || null;
4897
+ const sameSource = !(source == null ? void 0 : source.path) || !(stack == null ? void 0 : stack.path) || source.path === stack.path;
4898
+ let line2 = sameSource ? (_b = (_a6 = stack == null ? void 0 : stack.line) != null ? _a6 : browser.line) != null ? _b : null : (_c = browser.line) != null ? _c : null;
4899
+ let column2 = sameSource ? (_e = (_d = stack == null ? void 0 : stack.column) != null ? _d : browser.column) != null ? _e : null : (_f = browser.column) != null ? _f : null;
4890
4900
  const result2 = {
4891
4901
  fileName,
4892
4902
  lineNumber: line2,
@@ -4911,30 +4921,32 @@ function traceError(value, runPath) {
4911
4921
  const block = blockInfo(error2);
4912
4922
  if (block && (result2.lineNumber == null || result2.columnNumber == null || !result2.fileName)) {
4913
4923
  result2.fileName || (result2.fileName = block.path || runPath || null);
4914
- result2.lineNumber ?? (result2.lineNumber = block.line);
4915
- result2.columnNumber ?? (result2.columnNumber = block.column);
4924
+ (_g = result2.lineNumber) != null ? _g : result2.lineNumber = block.line;
4925
+ (_h = result2.columnNumber) != null ? _h : result2.columnNumber = block.column;
4916
4926
  result2.label = block.desc;
4917
4927
  }
4918
4928
  lilact_default.error = result2;
4919
4929
  return result2;
4920
4930
  }
4921
4931
  function escapeHtml(value) {
4922
- return String(value ?? "").replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4932
+ return String(value != null ? value : "").replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4923
4933
  }
4924
4934
  function sourceExcerpt(module2, line2) {
4935
+ var _a6, _b, _c, _d;
4925
4936
  if (!module2 || !Number.isFinite(line2)) return null;
4926
- const lines = String(module2.code ?? "").split(/\r?\n/);
4937
+ const lines = String((_a6 = module2.code) != null ? _a6 : "").split(/\r?\n/);
4927
4938
  return {
4928
- before: lines[line2 - 1] ?? "",
4929
- current: lines[line2] ?? "",
4930
- after: lines[line2 + 1] ?? ""
4939
+ before: (_b = lines[line2 - 1]) != null ? _b : "",
4940
+ current: (_c = lines[line2]) != null ? _c : "",
4941
+ after: (_d = lines[line2 + 1]) != null ? _d : ""
4931
4942
  };
4932
4943
  }
4933
4944
  function globalErrorHandler(eventOrError) {
4934
- const value = eventOrError?.error instanceof Error ? eventOrError.error : eventOrError?.reason !== void 0 ? eventOrError.reason : eventOrError;
4945
+ var _a6, _b;
4946
+ const value = (eventOrError == null ? void 0 : eventOrError.error) instanceof Error ? eventOrError.error : (eventOrError == null ? void 0 : eventOrError.reason) !== void 0 ? eventOrError.reason : eventOrError;
4935
4947
  const error2 = traceError(
4936
4948
  value,
4937
- eventOrError?.fileName || null
4949
+ (eventOrError == null ? void 0 : eventOrError.fileName) || null
4938
4950
  );
4939
4951
  const excerpt = sourceExcerpt(
4940
4952
  required_scripts[error2.fileName],
@@ -4967,7 +4979,7 @@ function globalErrorHandler(eventOrError) {
4967
4979
  dialog.className = className;
4968
4980
  const location = error2.fileName ? `At ${escapeHtml(error2.fileName)}` : "";
4969
4981
  const line2 = Number.isFinite(error2.lineNumber) ? `: Line ${error2.lineNumber + 1}` : "";
4970
- const componentStack = error2._error?.componentStackLog || error2._error?.componentStack || "";
4982
+ const componentStack = ((_a6 = error2._error) == null ? void 0 : _a6.componentStackLog) || ((_b = error2._error) == null ? void 0 : _b.componentStack) || "";
4971
4983
  dialog.innerHTML = `
4972
4984
  <h3><red>Error!</red></h3>
4973
4985
  <b>${location}${line2}</b><br><br>
@@ -5033,6 +5045,7 @@ var createURL = (to) => typeof to === "string" ? to : (to.pathname || "") + (to.
5033
5045
  var escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5034
5046
  function HashRouter({ children, basename = "" }) {
5035
5047
  const readLocation = () => {
5048
+ var _a6;
5036
5049
  const raw = window.location.hash || "#/";
5037
5050
  const full = raw.slice(1);
5038
5051
  const baseRe = new RegExp("^" + escapeRegExp(basename));
@@ -5043,7 +5056,7 @@ function HashRouter({ children, basename = "" }) {
5043
5056
  pathname: path2 || "/",
5044
5057
  search: search ? "?" + search : "",
5045
5058
  hash: hashPart ? "#" + hashPart : "",
5046
- state: history.state?.__state
5059
+ state: (_a6 = history.state) == null ? void 0 : _a6.__state
5047
5060
  };
5048
5061
  };
5049
5062
  const [location, setLocation] = useState(readLocation);
@@ -5066,7 +5079,7 @@ function HashRouter({ children, basename = "" }) {
5066
5079
  done = true;
5067
5080
  window.removeEventListener("popstate", onPop);
5068
5081
  window.removeEventListener("hashchange", onHash);
5069
- fn?.();
5082
+ fn == null ? void 0 : fn();
5070
5083
  resolve();
5071
5084
  };
5072
5085
  const onPop = () => cleanup(() => setLocation(readLocation()));
@@ -5172,13 +5185,14 @@ function Route({ path: path2, element = null, children }) {
5172
5185
  return null;
5173
5186
  }
5174
5187
  function Routes({ children }) {
5188
+ var _a6;
5175
5189
  const location = useLocation();
5176
5190
  const pathname = location.pathname || "/";
5177
5191
  const routes = Children.toArray(children);
5178
5192
  for (let i2 = 0; i2 < routes.length; i2++) {
5179
5193
  const route = routes[i2];
5180
5194
  const path2 = route.props.path === void 0 ? null : route.props.path;
5181
- const element = route.props.element ?? null;
5195
+ const element = (_a6 = route.props.element) != null ? _a6 : null;
5182
5196
  const childRoutes = route.props.children;
5183
5197
  const { matched, params } = matchPath(path2, pathname);
5184
5198
  if (matched) {
@@ -5378,7 +5392,7 @@ function DragHandle({
5378
5392
  }, []);
5379
5393
  const endDrag = useCallback((reason = "up") => {
5380
5394
  if (!draggingRef.current) return;
5381
- onEnd?.(reason);
5395
+ onEnd == null ? void 0 : onEnd(reason);
5382
5396
  resetDrag();
5383
5397
  }, [onEnd, resetDrag]);
5384
5398
  const onPointerDown = useCallback((e) => {
@@ -5390,17 +5404,17 @@ function DragHandle({
5390
5404
  lastClientXRef.current = e.clientX;
5391
5405
  lastClientYRef.current = e.clientY;
5392
5406
  setIsDragging(true);
5393
- onStart?.(data);
5407
+ onStart == null ? void 0 : onStart(data);
5394
5408
  try {
5395
5409
  e.currentTarget.setPointerCapture(e.pointerId);
5396
- } catch {
5410
+ } catch (e2) {
5397
5411
  }
5398
5412
  }, [onStart]);
5399
5413
  const onPointerMove = useCallback((e) => {
5400
5414
  if (!draggingRef.current) return;
5401
5415
  if (activePointerIdRef.current !== e.pointerId) return;
5402
5416
  const { dx, dy } = computeDeltaFromStart(e.clientX, e.clientY);
5403
- onDelta?.(dx, dy, data);
5417
+ onDelta == null ? void 0 : onDelta(dx, dy, data);
5404
5418
  lastClientXRef.current = e.clientX;
5405
5419
  lastClientYRef.current = e.clientY;
5406
5420
  }, [computeDeltaFromStart, onDelta]);
@@ -5468,18 +5482,21 @@ var SplitPane = forwardRef(function SplitPane2({
5468
5482
  const { w: w2, h: h2 } = sizeRef.current;
5469
5483
  if (modeNow === "vertical" ? h2 <= 0 : w2 <= 0) {
5470
5484
  if (position2 == null) setInternalPos(next2);
5471
- onSizeChange?.(next2);
5485
+ onSizeChange == null ? void 0 : onSizeChange(next2);
5472
5486
  return;
5473
5487
  }
5474
5488
  const clamped = clampWithSize(next2, modeNow, w2, h2);
5475
5489
  if (position2 == null) setInternalPos(clamped);
5476
5490
  effectivePosRef.current = clamped;
5477
- onSizeChange?.(clamped);
5491
+ onSizeChange == null ? void 0 : onSizeChange(clamped);
5478
5492
  };
5479
5493
  useImperativeHandle(ref, () => ({
5480
5494
  setPosition,
5481
5495
  setMode: (nextMode) => setInternalMode(nextMode === "vertical" ? "vertical" : "horizontal"),
5482
- getPosition: () => effectivePosRef.current ?? posResolved,
5496
+ getPosition: () => {
5497
+ var _a6;
5498
+ return (_a6 = effectivePosRef.current) != null ? _a6 : posResolved;
5499
+ },
5483
5500
  getMode: () => internalModeRef.current
5484
5501
  }));
5485
5502
  const didInitRef = useRef(false);
@@ -5487,6 +5504,7 @@ var SplitPane = forwardRef(function SplitPane2({
5487
5504
  const el = containerRef.current;
5488
5505
  if (!el) return;
5489
5506
  const ro = new ResizeObserver((entries) => {
5507
+ var _a6;
5490
5508
  const rect = el.getBoundingClientRect();
5491
5509
  const prev2 = sizeRef.current;
5492
5510
  const nextSize = { w: rect.width, h: rect.height };
@@ -5500,11 +5518,11 @@ var SplitPane = forwardRef(function SplitPane2({
5500
5518
  const clamped = clampWithSize(raw, modeNow, nextSize.w, nextSize.h);
5501
5519
  if (position2 == null) setInternalPos(clamped);
5502
5520
  effectivePosRef.current = clamped;
5503
- onSizeChange?.(clamped);
5521
+ onSizeChange == null ? void 0 : onSizeChange(clamped);
5504
5522
  return;
5505
5523
  }
5506
5524
  if (!hadSize || !hasSizeNow) return;
5507
- const p2 = effectivePosRef.current ?? posResolved;
5525
+ const p2 = (_a6 = effectivePosRef.current) != null ? _a6 : posResolved;
5508
5526
  const rp = resizePolicyRef.current;
5509
5527
  const s = splitterSize;
5510
5528
  if (rp === "fixFirst") {
@@ -5554,8 +5572,9 @@ var SplitPane = forwardRef(function SplitPane2({
5554
5572
  if (!dragging) startPosRef.current = posResolved;
5555
5573
  }, [posResolved, dragging]);
5556
5574
  const handleStart = () => {
5575
+ var _a6;
5557
5576
  setDragging(true);
5558
- startPosRef.current = effectivePosRef.current ?? posResolved;
5577
+ startPosRef.current = (_a6 = effectivePosRef.current) != null ? _a6 : posResolved;
5559
5578
  };
5560
5579
  const handleDelta = (x, y) => {
5561
5580
  const modeNow = internalModeRef.current;
@@ -5669,7 +5688,7 @@ var SplitPane = forwardRef(function SplitPane2({
5669
5688
  });
5670
5689
  }
5671
5690
  }
5672
- return createComponent("div", { "ref": containerRef, "className": className, "style": {
5691
+ return createComponent("div", { "ref": containerRef, "className": cx(className, dragging && "dragging"), "style": {
5673
5692
  position: "relative",
5674
5693
  width: "100%",
5675
5694
  height: "100%",
@@ -5888,6 +5907,7 @@ function generateSequence(arr, labeler2 = labeler2.bind(null, null)) {
5888
5907
  var import_export_regexp = /(?:i[C \n]*(?:(?:I|J|(?:\*[C \n]*a[C \n]*I))[C \n]*,[C \n]*)*(?:(?:(?:I(?:[C \n]*a[C \n]*I)?)|J|(?:\*[C \n]*a[C \n]*I))[C \n]*f[C \n]*)?S)|(?:e[C \n]*(?:(?:[*J][C \n]*f[C \n]*S)|(?:d[C \n]*[IFJ])|J|(?:[VF][c \n]*I)|I))|(?:r[c \n]*P)/mg;
5889
5908
  var props_regexp = /O[C \n]*(?:[Id](?:[C \n]*a[C \n]*I)?[C \n]*,[C \n]*)*(?:I(?:[C \n]*a[C \n]*I)?)[C \n]*O/mg;
5890
5909
  function processImportExports(node3, jsx2, meta) {
5910
+ var _a6;
5891
5911
  const s = generateSequence(
5892
5912
  node3.out,
5893
5913
  labeler.bind(
@@ -5932,7 +5952,7 @@ function processImportExports(node3, jsx2, meta) {
5932
5952
  }
5933
5953
  }
5934
5954
  begins.push(node3.end);
5935
- meta.imports ?? (meta.imports = {});
5955
+ (_a6 = meta.imports) != null ? _a6 : meta.imports = {};
5936
5956
  const imported_names = /* @__PURE__ */ new Set();
5937
5957
  for (const m of s.matchAll(import_export_regexp)) {
5938
5958
  if (m[0].startsWith("r")) {
@@ -6300,14 +6320,14 @@ function preprocessPragmas(node, context) {
6300
6320
  var scope_stack = [];
6301
6321
  var last_block = null;
6302
6322
  const clone_block = (i2, val) => {
6303
- var _a;
6323
+ var _a6, _b;
6304
6324
  last_block = typeof all_nodes[i2] === "object" ? structuredClone(
6305
6325
  { ...all_nodes[i2], children: void 0, attributes: {} }
6306
6326
  ) : all_nodes[i2];
6307
6327
  if (last_block.type === "directive") {
6308
6328
  last_block.value = val;
6309
6329
  }
6310
- (_a = scope_stack[0]).out ?? (_a.out = []);
6330
+ (_b = (_a6 = scope_stack[0]).out) != null ? _b : _a6.out = [];
6311
6331
  scope_stack[0].out.push(last_block);
6312
6332
  return last_block;
6313
6333
  };
@@ -6838,12 +6858,13 @@ function generateSourceMap(json, path2, jsx_eols, out_eols, mappings = []) {
6838
6858
  "mappings": ""
6839
6859
  };
6840
6860
  const scan_leaves = (node3) => {
6841
- if (node3?.out?.length > 0) {
6861
+ var _a6;
6862
+ if (((_a6 = node3 == null ? void 0 : node3.out) == null ? void 0 : _a6.length) > 0) {
6842
6863
  for (const ch2 of node3.out) {
6843
6864
  scan_leaves(ch2);
6844
6865
  }
6845
6866
  }
6846
- if (node3?.begin !== void 0 && node3?.out_index !== void 0) {
6867
+ if ((node3 == null ? void 0 : node3.begin) !== void 0 && (node3 == null ? void 0 : node3.out_index) !== void 0) {
6847
6868
  mpps.push([...getRowCol(out_eols, node3.out_index), ...getRowCol(jsx_eols, node3.begin), node3]);
6848
6869
  }
6849
6870
  };
@@ -6897,8 +6918,9 @@ function transpileJSX(jsx2, {
6897
6918
  counter: 0
6898
6919
  }
6899
6920
  } = {}) {
6900
- transpilerConfig.preprocessorDelimiter ?? (transpilerConfig.preprocessorDelimiter = "\u0294");
6901
- transpilerConfig.injectTraceLabels ?? (transpilerConfig.injectTraceLabels = injectTraceLabels);
6921
+ var _a6, _b;
6922
+ (_a6 = transpilerConfig.preprocessorDelimiter) != null ? _a6 : transpilerConfig.preprocessorDelimiter = "\u0294";
6923
+ (_b = transpilerConfig.injectTraceLabels) != null ? _b : transpilerConfig.injectTraceLabels = injectTraceLabels;
6902
6924
  jsx2 += "\n";
6903
6925
  const eols = scanEOLs(jsx2);
6904
6926
  raiseError = ((eols2, msg, index2) => {
@@ -7002,7 +7024,7 @@ function transpileJSX(jsx2, {
7002
7024
  if (is_attr) {
7003
7025
  return out2.substring(1, out2.length - 1);
7004
7026
  }
7005
- if (node3?.is_xml_js) {
7027
+ if (node3 == null ? void 0 : node3.is_xml_js) {
7006
7028
  return jsx2.substring(node3.begin + 1, node3.end - 1);
7007
7029
  }
7008
7030
  return out2;
@@ -7105,7 +7127,8 @@ globalThis.require = Lilact2.require;
7105
7127
  document.addEventListener("DOMContentLoaded", () => {
7106
7128
  Lilact2.grabTimers();
7107
7129
  Lilact2.runScripts().catch((error2) => {
7108
- Lilact2.globalErrorHandler?.(error2);
7130
+ var _a6;
7131
+ (_a6 = Lilact2.globalErrorHandler) == null ? void 0 : _a6.call(Lilact2, error2);
7109
7132
  });
7110
7133
  });
7111
7134
  if (true) {
@@ -7139,7 +7162,6 @@ export {
7139
7162
  HashRouter,
7140
7163
  IDX,
7141
7164
  INTERVAL,
7142
- IS_ZOMBIE,
7143
7165
  LAZY,
7144
7166
  LOCATION,
7145
7167
  Lilact2 as Lilact,
@@ -7165,8 +7187,6 @@ export {
7165
7187
  animationFramePromise,
7166
7188
  asError2 as asError,
7167
7189
  blocksInfo,
7168
- boolean_html_attributes_set,
7169
- capture_events_set,
7170
7190
  clearInterval,
7171
7191
  clearTimeout2 as clearTimeout,
7172
7192
  cloneComponent,
@@ -7186,7 +7206,6 @@ export {
7186
7206
  emotion_css_esm_exports as emotion,
7187
7207
  error,
7188
7208
  eval_num,
7189
- events_set,
7190
7209
  findDOMNode,
7191
7210
  forwardRef,
7192
7211
  getComponentUnderPointer,
@@ -7203,7 +7222,6 @@ export {
7203
7222
  isValidElement,
7204
7223
  layout_effects,
7205
7224
  lazy,
7206
- length_css_attributes_set,
7207
7225
  memo,
7208
7226
  passive_effects,
7209
7227
  pauseTimers,
@@ -7212,8 +7230,6 @@ export {
7212
7230
  releaseSyntheticEvent,
7213
7231
  releaseTimers,
7214
7232
  render,
7215
- replaceAllComponentInstances,
7216
- replaceComponentEntity,
7217
7233
  require2 as require,
7218
7234
  required_scripts,
7219
7235
  resetTimers,
@@ -7225,7 +7241,6 @@ export {
7225
7241
  setInterval,
7226
7242
  setTimeout2 as setTimeout,
7227
7243
  shallowEqual,
7228
- special_attributes,
7229
7244
  startTransition,
7230
7245
  timeoutPromise,
7231
7246
  toBool,