@pygmalionjs/pygmalion 0.2.22 → 0.2.23

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.
@@ -81,7 +81,7 @@ var $h = {
81
81
  38: "'ownKeys()' can only be used on observable objects",
82
82
  39: "'defineProperty()' can only be used on observable objects"
83
83
  }, kh = process.env.NODE_ENV !== "production" ? $h : {};
84
- function z(t) {
84
+ function F(t) {
85
85
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
86
86
  n[r - 1] = arguments[r];
87
87
  if (process.env.NODE_ENV !== "production") {
@@ -99,11 +99,11 @@ Object.freeze(Oo);
99
99
  var Ka = {};
100
100
  Object.freeze(Ka);
101
101
  var Dh = typeof Proxy < "u", Rh = /* @__PURE__ */ Object.toString();
102
- function zd() {
103
- Dh || z(process.env.NODE_ENV !== "production" ? "`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`" : "Proxy not available");
102
+ function Fd() {
103
+ Dh || F(process.env.NODE_ENV !== "production" ? "`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`" : "Proxy not available");
104
104
  }
105
105
  function Gr(t) {
106
- process.env.NODE_ENV !== "production" && k.verifyProxies && z("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to " + t);
106
+ process.env.NODE_ENV !== "production" && k.verifyProxies && F("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to " + t);
107
107
  }
108
108
  function Ht() {
109
109
  return ++k.mobxGuid;
@@ -142,7 +142,7 @@ function mt(t) {
142
142
  var n = Object.hasOwnProperty.call(e, "constructor") && e.constructor;
143
143
  return typeof n == "function" && n.toString() === Rh;
144
144
  }
145
- function Fd(t) {
145
+ function zd(t) {
146
146
  var e = t == null ? void 0 : t.constructor;
147
147
  return e ? e.name === "GeneratorFunction" || e.displayName === "GeneratorFunction" : !1;
148
148
  }
@@ -171,7 +171,7 @@ function lr(t, e) {
171
171
  function Rr(t) {
172
172
  return t != null && Object.prototype.toString.call(t) === "[object Map]";
173
173
  }
174
- function zh(t) {
174
+ function Fh(t) {
175
175
  var e = Object.getPrototypeOf(t), n = Object.getPrototypeOf(e), r = Object.getPrototypeOf(n);
176
176
  return r === null;
177
177
  }
@@ -179,7 +179,7 @@ function dn(t) {
179
179
  return t != null && Object.prototype.toString.call(t) === "[object Set]";
180
180
  }
181
181
  var jd = typeof Object.getOwnPropertySymbols < "u";
182
- function Fh(t) {
182
+ function zh(t) {
183
183
  var e = Object.keys(t);
184
184
  if (!jd)
185
185
  return e;
@@ -233,7 +233,7 @@ function Vh(t, e) {
233
233
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, Wh(r.key), r);
234
234
  }
235
235
  }
236
- function zr(t, e, n) {
236
+ function Fr(t, e, n) {
237
237
  return e && Vh(t.prototype, e), Object.defineProperty(t, "prototype", {
238
238
  writable: !1
239
239
  }), t;
@@ -350,14 +350,14 @@ function nn(t) {
350
350
  function Pi(t, e, n) {
351
351
  if (Lt(t, ht) || Mi(t, ht, bn({}, t[ht])), process.env.NODE_ENV !== "production" && Mo(n) && !Lt(t[ht], e)) {
352
352
  var r = t.constructor.name + ".prototype." + e.toString();
353
- z("'" + r + "' is decorated with 'override', but no such decorated member was found on prototype.");
353
+ F("'" + r + "' is decorated with 'override', but no such decorated member was found on prototype.");
354
354
  }
355
355
  Uh(t, n, e), Mo(n) || (t[ht][e] = n);
356
356
  }
357
357
  function Uh(t, e, n) {
358
358
  if (process.env.NODE_ENV !== "production" && !Mo(e) && Lt(t[ht], n)) {
359
359
  var r = t.constructor.name + ".prototype." + n.toString(), i = t[ht][n].annotationType_, o = e.annotationType_;
360
- z("Cannot apply '@" + o + "' to '" + r + "':" + (`
360
+ F("Cannot apply '@" + o + "' to '" + r + "':" + (`
361
361
  The field is already decorated with '@` + i + "'.") + `
362
362
  Re-decorating fields is not allowed.
363
363
  Use '@override' decorator for methods overridden by subclass.`);
@@ -370,7 +370,7 @@ function Ii(t) {
370
370
  return typeof t == "object" && typeof t.kind == "string";
371
371
  }
372
372
  function Jo(t, e) {
373
- process.env.NODE_ENV !== "production" && !e.includes(t.kind) && z("The decorator applied to '" + String(t.name) + "' cannot be used on a " + t.kind + " element");
373
+ process.env.NODE_ENV !== "production" && !e.includes(t.kind) && F("The decorator applied to '" + String(t.name) + "' cannot be used on a " + t.kind + " element");
374
374
  }
375
375
  var ee = /* @__PURE__ */ Symbol("mobx administration"), Tn = /* @__PURE__ */ (function() {
376
376
  function t(n) {
@@ -388,10 +388,10 @@ var ee = /* @__PURE__ */ Symbol("mobx administration"), Tn = /* @__PURE__ */ (fu
388
388
  }, e.reportObserved = function() {
389
389
  return iu(this);
390
390
  }, e.reportChanged = function() {
391
- Rt(), ou(this), zt();
391
+ Rt(), ou(this), Ft();
392
392
  }, e.toString = function() {
393
393
  return this.name_;
394
- }, zr(t, [{
394
+ }, Fr(t, [{
395
395
  key: "isBeingObserved",
396
396
  get: function() {
397
397
  return _t(this.flags_, t.isBeingObservedMask_);
@@ -445,7 +445,7 @@ function rr(t, e, n) {
445
445
  name: n
446
446
  }) : dn(t) ? Ge.set(t, {
447
447
  name: n
448
- }) : typeof t == "function" && !sr(t) && !vi(t) ? Fd(t) ? Tr(t) : bi(n, t) : t;
448
+ }) : typeof t == "function" && !sr(t) && !vi(t) ? zd(t) ? Tr(t) : bi(n, t) : t;
449
449
  }
450
450
  function Xh(t, e, n) {
451
451
  if (t == null || ar(t) || Di(t) || xn(t) || Qt(t))
@@ -470,13 +470,13 @@ function Xh(t, e, n) {
470
470
  name: n,
471
471
  deep: !1
472
472
  });
473
- process.env.NODE_ENV !== "production" && z("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets");
473
+ process.env.NODE_ENV !== "production" && F("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets");
474
474
  }
475
475
  function Zo(t) {
476
476
  return t;
477
477
  }
478
478
  function Jh(t, e) {
479
- return process.env.NODE_ENV !== "production" && xi(t) && z("observable.struct should not be used with observable values"), Au(t, e) ? e : t;
479
+ return process.env.NODE_ENV !== "production" && xi(t) && F("observable.struct should not be used with observable values"), Au(t, e) ? e : t;
480
480
  }
481
481
  var Zh = "override";
482
482
  function Mo(t) {
@@ -524,12 +524,12 @@ function tp(t, e) {
524
524
  d.isMobxAction = !0, l[r] = d;
525
525
  }), t;
526
526
  }
527
- z("Cannot apply '" + o.annotationType_ + "' to '" + String(r) + "' (kind: " + n + "):" + (`
527
+ F("Cannot apply '" + o.annotationType_ + "' to '" + String(r) + "' (kind: " + n + "):" + (`
528
528
  '` + o.annotationType_ + "' can only be used on properties with a function value."));
529
529
  }
530
530
  function np(t, e, n, r) {
531
531
  var i = e.annotationType_, o = r.value;
532
- process.env.NODE_ENV !== "production" && !Te(o) && z("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
532
+ process.env.NODE_ENV !== "production" && !Te(o) && F("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
533
533
  '` + i + "' can only be used on properties with a function value."));
534
534
  }
535
535
  function Wd(t, e, n, r, i) {
@@ -593,7 +593,7 @@ function op(t, e) {
593
593
  }
594
594
  function sp(t, e, n, r) {
595
595
  var i = e.annotationType_, o = r.value;
596
- process.env.NODE_ENV !== "production" && !Te(o) && z("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
596
+ process.env.NODE_ENV !== "production" && !Te(o) && F("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
597
597
  '` + i + "' can only be used on properties with a generator function value."));
598
598
  }
599
599
  function Ud(t, e, n, r, i, o) {
@@ -663,7 +663,7 @@ function lp(t, e) {
663
663
  }
664
664
  function dp(t, e, n, r) {
665
665
  var i = e.annotationType_, o = r.get;
666
- process.env.NODE_ENV !== "production" && !o && z("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
666
+ process.env.NODE_ENV !== "production" && !o && F("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
667
667
  '` + i + "' can only be used on getter(+setter) properties."));
668
668
  }
669
669
  function Qo(t, e) {
@@ -685,7 +685,7 @@ function fp(t, e, n, r) {
685
685
  function hp(t, e) {
686
686
  if (process.env.NODE_ENV !== "production") {
687
687
  if (e.kind === "field")
688
- throw z("Please use `@observable accessor " + String(e.name) + "` instead of `@observable " + String(e.name) + "`");
688
+ throw F("Please use `@observable accessor " + String(e.name) + "` instead of `@observable " + String(e.name) + "`");
689
689
  Jo(e, ["accessor"]);
690
690
  }
691
691
  var n = this, r = e.kind, i = e.name;
@@ -714,7 +714,7 @@ function hp(t, e) {
714
714
  }
715
715
  function pp(t, e, n, r) {
716
716
  var i = e.annotationType_;
717
- process.env.NODE_ENV !== "production" && !("value" in r) && z("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
717
+ process.env.NODE_ENV !== "production" && !("value" in r) && F("Cannot apply '" + i + "' to '" + t.name_ + "." + n.toString() + "':" + (`
718
718
  '` + i + "' cannot be used on getter/setter properties"));
719
719
  }
720
720
  var mp = "true", gp = /* @__PURE__ */ qd();
@@ -743,7 +743,7 @@ function bp(t, e, n, r) {
743
743
  }
744
744
  if (r !== t.target_ && typeof n.value == "function") {
745
745
  var a;
746
- if (Fd(n.value)) {
746
+ if (zd(n.value)) {
747
747
  var l, d = (l = this.options_) != null && l.autoBind ? Tr.bound : Tr;
748
748
  return d.make_(t, e, n, r);
749
749
  }
@@ -774,7 +774,7 @@ function vp(t, e, n, r) {
774
774
  return a.extend_(t, e, n, r);
775
775
  }
776
776
  function xp(t, e) {
777
- z("'" + this.annotationType_ + "' cannot be used as a decorator");
777
+ F("'" + this.annotationType_ + "' cannot be used as a decorator");
778
778
  }
779
779
  var yp = "observable", wp = "observable.ref", Sp = "observable.shallow", _p = "observable.struct", Yd = {
780
780
  deep: !0,
@@ -849,7 +849,7 @@ var Mp = {
849
849
  return Pi(e, n, la);
850
850
  if (mt(e))
851
851
  return nn(Ga(Jd, e));
852
- process.env.NODE_ENV !== "production" && (Te(e) || z("First argument to `computed` should be an expression."), Te(n) && z("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));
852
+ process.env.NODE_ENV !== "production" && (Te(e) || F("First argument to `computed` should be an expression."), Te(n) && F("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));
853
853
  var r = mt(n) ? n : {};
854
854
  return r.get = e, r.name || (r.name = e.name || ""), new gt(r);
855
855
  };
@@ -863,7 +863,7 @@ var nl, rl, Po = 0, $p = 1, kp = (nl = (rl = /* @__PURE__ */ Ao(function() {
863
863
  enumerable: !1
864
864
  };
865
865
  function ir(t, e, n, r) {
866
- n === void 0 && (n = !1), process.env.NODE_ENV !== "production" && (Te(e) || z("`action` can only be invoked on functions"), (typeof t != "string" || !t) && z("actions should have valid names, got: '" + t + "'"));
866
+ n === void 0 && (n = !1), process.env.NODE_ENV !== "production" && (Te(e) || F("`action` can only be invoked on functions"), (typeof t != "string" || !t) && F("actions should have valid names, got: '" + t + "'"));
867
867
  function i() {
868
868
  return Tp(t, n, e, r || this, arguments);
869
869
  }
@@ -910,11 +910,11 @@ function Dp(t, e, n, r) {
910
910
  return Po = h.actionId_, h;
911
911
  }
912
912
  function Rp(t) {
913
- Po !== t.actionId_ && z(30), Po = t.parentActionId_, t.error_ !== void 0 && (k.suppressReactionErrors = !0), ns(t.prevAllowStateChanges_), di(t.prevAllowStateReads_), zt(), t.runAsAction_ && pn(t.prevDerivation_), process.env.NODE_ENV !== "production" && t.notifySpy_ && Et({
913
+ Po !== t.actionId_ && F(30), Po = t.parentActionId_, t.error_ !== void 0 && (k.suppressReactionErrors = !0), ns(t.prevAllowStateChanges_), di(t.prevAllowStateReads_), Ft(), t.runAsAction_ && pn(t.prevDerivation_), process.env.NODE_ENV !== "production" && t.notifySpy_ && Et({
914
914
  time: Date.now() - t.startTime_
915
915
  }), k.suppressReactionErrors = !1;
916
916
  }
917
- function zp(t, e) {
917
+ function Fp(t, e) {
918
918
  var n = ts(t);
919
919
  try {
920
920
  return e();
@@ -929,13 +929,13 @@ function ts(t) {
929
929
  function ns(t) {
930
930
  k.allowStateChanges = t;
931
931
  }
932
- var Fp = "create", Zn = /* @__PURE__ */ (function(t) {
932
+ var zp = "create", Zn = /* @__PURE__ */ (function(t) {
933
933
  function e(r, i, o, s, a) {
934
934
  var l;
935
935
  if (o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableValue@" + Ht() : "ObservableValue"), s === void 0 && (s = !0), a === void 0 && (a = $n.default), l = t.call(this, o) || this, l.enhancer = void 0, l.name_ = void 0, l.equals = void 0, l.hasUnreportedChange_ = !1, l.interceptors_ = void 0, l.changeListeners_ = void 0, l.value_ = void 0, l.dehancer = void 0, l.enhancer = i, l.name_ = o, l.equals = a, l.value_ = i(r, void 0, o), process.env.NODE_ENV !== "production" && s && Xe()) {
936
936
  var d;
937
937
  or({
938
- type: Fp,
938
+ type: zp,
939
939
  object: l,
940
940
  observableKind: "value",
941
941
  debugObjectName: l.name_,
@@ -1007,7 +1007,7 @@ var Fp = "create", Zn = /* @__PURE__ */ (function(t) {
1007
1007
  }, e;
1008
1008
  })(Tn), gt = /* @__PURE__ */ (function() {
1009
1009
  function t(n) {
1010
- this.dependenciesState_ = ue.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = ue.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new Io(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = jt.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || z(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + Ht() : "ComputedValue"), n.set && (this.setter_ = ir(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? $n.structural : $n.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive;
1010
+ this.dependenciesState_ = ue.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = ue.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new Io(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = jt.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || F(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + Ht() : "ComputedValue"), n.set && (this.setter_ = ir(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? $n.structural : $n.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive;
1011
1011
  }
1012
1012
  var e = t.prototype;
1013
1013
  return e.onBecomeStale_ = function() {
@@ -1021,9 +1021,9 @@ var Fp = "create", Zn = /* @__PURE__ */ (function(t) {
1021
1021
  return r();
1022
1022
  });
1023
1023
  }, e.get = function() {
1024
- if (this.isComputing && z(32, this.name_, this.derivation), k.inBatch === 0 && // !globalState.trackingDerivatpion &&
1024
+ if (this.isComputing && F(32, this.name_, this.derivation), k.inBatch === 0 && // !globalState.trackingDerivatpion &&
1025
1025
  this.observers_.size === 0 && !this.keepAlive_)
1026
- da(this) && (this.warnAboutUntrackedRead_(), Rt(), this.value_ = this.computeValue_(!1), zt());
1026
+ da(this) && (this.warnAboutUntrackedRead_(), Rt(), this.value_ = this.computeValue_(!1), Ft());
1027
1027
  else if (iu(this), da(this)) {
1028
1028
  var r = k.trackingContext;
1029
1029
  this.keepAlive_ && !r && (k.trackingContext = this), this.trackAndCompute() && Up(this), k.trackingContext = r;
@@ -1034,14 +1034,14 @@ var Fp = "create", Zn = /* @__PURE__ */ (function(t) {
1034
1034
  return i;
1035
1035
  }, e.set = function(r) {
1036
1036
  if (this.setter_) {
1037
- this.isRunningSetter && z(33, this.name_), this.isRunningSetter = !0;
1037
+ this.isRunningSetter && F(33, this.name_), this.isRunningSetter = !0;
1038
1038
  try {
1039
1039
  this.setter_.call(this.scope_, r);
1040
1040
  } finally {
1041
1041
  this.isRunningSetter = !1;
1042
1042
  }
1043
1043
  } else
1044
- z(34, this.name_);
1044
+ F(34, this.name_);
1045
1045
  }, e.trackAndCompute = function() {
1046
1046
  var r = this.value_, i = (
1047
1047
  /* see #1208 */
@@ -1096,7 +1096,7 @@ var Fp = "create", Zn = /* @__PURE__ */ (function(t) {
1096
1096
  return Vd(this.get());
1097
1097
  }, e[Symbol.toPrimitive] = function() {
1098
1098
  return this.valueOf();
1099
- }, zr(t, [{
1099
+ }, Fr(t, [{
1100
1100
  key: "isComputing",
1101
1101
  get: function() {
1102
1102
  return _t(this.flags_, t.isComputingMask_);
@@ -1272,11 +1272,11 @@ var bo = function() {
1272
1272
  }, vo = !0, tu = !1, k = /* @__PURE__ */ (function() {
1273
1273
  var t = /* @__PURE__ */ Yo();
1274
1274
  return t.__mobxInstanceCount > 0 && !t.__mobxGlobals && (vo = !1), t.__mobxGlobals && t.__mobxGlobals.version !== new bo().version && (vo = !1), vo ? t.__mobxGlobals ? (t.__mobxInstanceCount += 1, t.__mobxGlobals.UNCHANGED || (t.__mobxGlobals.UNCHANGED = {}), t.__mobxGlobals) : (t.__mobxInstanceCount = 1, t.__mobxGlobals = /* @__PURE__ */ new bo()) : (setTimeout(function() {
1275
- tu || z(35);
1275
+ tu || F(35);
1276
1276
  }, 1), new bo());
1277
1277
  })();
1278
1278
  function Bp() {
1279
- if ((k.pendingReactions.length || k.inBatch || k.isRunningReactions) && z(36), tu = !0, vo) {
1279
+ if ((k.pendingReactions.length || k.inBatch || k.isRunningReactions) && F(36), tu = !0, vo) {
1280
1280
  var t = Yo();
1281
1281
  --t.__mobxInstanceCount === 0 && (t.__mobxGlobals = void 0), k = new bo();
1282
1282
  }
@@ -1299,7 +1299,7 @@ function ru(t) {
1299
1299
  function Rt() {
1300
1300
  k.inBatch++;
1301
1301
  }
1302
- function zt() {
1302
+ function Ft() {
1303
1303
  if (--k.inBatch === 0) {
1304
1304
  cu();
1305
1305
  for (var t = k.pendingUnobservations, e = 0; e < t.length; e++) {
@@ -1383,7 +1383,7 @@ var Bt = /* @__PURE__ */ (function() {
1383
1383
  this.reportExceptionInDerivation_(i);
1384
1384
  }
1385
1385
  }
1386
- k.trackingContext = r, zt();
1386
+ k.trackingContext = r, Ft();
1387
1387
  }
1388
1388
  }, e.track = function(r) {
1389
1389
  if (!this.isDisposed) {
@@ -1398,7 +1398,7 @@ var Bt = /* @__PURE__ */ (function() {
1398
1398
  var a = Zd(this, r, void 0);
1399
1399
  k.trackingContext = s, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && ua(this), go(a) && this.reportExceptionInDerivation_(a.cause), process.env.NODE_ENV !== "production" && i && Et({
1400
1400
  time: Date.now() - o
1401
- }), zt();
1401
+ }), Ft();
1402
1402
  }
1403
1403
  }, e.reportExceptionInDerivation_ = function(r) {
1404
1404
  var i = this;
@@ -1418,7 +1418,7 @@ var Bt = /* @__PURE__ */ (function() {
1418
1418
  return s(r, i);
1419
1419
  });
1420
1420
  }, e.dispose = function() {
1421
- this.isDisposed || (this.isDisposed = !0, this.isRunning || (Rt(), ua(this), zt()));
1421
+ this.isDisposed || (this.isDisposed = !0, this.isRunning || (Rt(), ua(this), Ft()));
1422
1422
  }, e.getDisposer_ = function(r) {
1423
1423
  var i = this, o = function s() {
1424
1424
  i.dispose(), r == null || r.removeEventListener == null || r.removeEventListener("abort", s);
@@ -1428,7 +1428,7 @@ var Bt = /* @__PURE__ */ (function() {
1428
1428
  return "Reaction[" + this.name_ + "]";
1429
1429
  }, e.trace = function(r) {
1430
1430
  r === void 0 && (r = !1), gm(this, r);
1431
- }, zr(t, [{
1431
+ }, Fr(t, [{
1432
1432
  key: "isDisposed",
1433
1433
  get: function() {
1434
1434
  return _t(this.flags_, t.isDisposedMask_);
@@ -1556,7 +1556,7 @@ function du(t) {
1556
1556
  name: r,
1557
1557
  autoAction: t
1558
1558
  }));
1559
- process.env.NODE_ENV !== "production" && z("Invalid arguments for `action`");
1559
+ process.env.NODE_ENV !== "production" && F("Invalid arguments for `action`");
1560
1560
  };
1561
1561
  return e;
1562
1562
  }
@@ -1571,7 +1571,7 @@ function sr(t) {
1571
1571
  }
1572
1572
  function rm(t, e) {
1573
1573
  var n, r, i, o;
1574
- e === void 0 && (e = Ka), process.env.NODE_ENV !== "production" && (Te(t) || z("Autorun expects a function as first argument"), sr(t) && z("Autorun does not accept actions since actions are untrackable"));
1574
+ e === void 0 && (e = Ka), process.env.NODE_ENV !== "production" && (Te(t) || F("Autorun expects a function as first argument"), sr(t) && F("Autorun does not accept actions since actions are untrackable"));
1575
1575
  var s = (n = (r = e) == null ? void 0 : r.name) != null ? n : process.env.NODE_ENV !== "production" ? t.name || "Autorun@" + Ht() : "Autorun", a = !e.scheduler && !e.delay, l;
1576
1576
  if (a)
1577
1577
  l = new Bt(s, function() {
@@ -1600,7 +1600,7 @@ function uu(t) {
1600
1600
  }
1601
1601
  function fu(t, e, n) {
1602
1602
  var r, i, o;
1603
- n === void 0 && (n = Ka), process.env.NODE_ENV !== "production" && ((!Te(t) || !Te(e)) && z("First and second argument to reaction should be functions"), mt(n) || z("Third argument of reactions should be an object"));
1603
+ n === void 0 && (n = Ka), process.env.NODE_ENV !== "production" && ((!Te(t) || !Te(e)) && F("First and second argument to reaction should be functions"), mt(n) || F("Third argument of reactions should be an object"));
1604
1604
  var s = (r = n.name) != null ? r : process.env.NODE_ENV !== "production" ? "Reaction@" + Ht() : "Reaction", a = Xn(s, n.onError ? om(n.onError, e) : e), l = !n.scheduler && !n.delay, d = uu(n), u = !0, h = !1, m, x = n.compareStructural ? $n.structural : n.equals || $n.default, b = new Bt(s, function() {
1605
1605
  u || l ? w() : h || (h = !0, d(w));
1606
1606
  }, n.onError, n.requiresObservable);
@@ -1608,7 +1608,7 @@ function fu(t, e, n) {
1608
1608
  if (h = !1, !b.isDisposed) {
1609
1609
  var S = !1, N = m;
1610
1610
  b.track(function() {
1611
- var y = zp(!1, function() {
1611
+ var y = Fp(!1, function() {
1612
1612
  return t(b);
1613
1613
  });
1614
1614
  S = u || !x(m, y), m = y;
@@ -1653,7 +1653,7 @@ function um(t) {
1653
1653
  }), k.allowStateReads = !k.observableRequiresReaction, process.env.NODE_ENV !== "production" && k.disableErrorBoundaries === !0 && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."), t.reactionScheduler && Gp(t.reactionScheduler);
1654
1654
  }
1655
1655
  function mu(t, e, n, r) {
1656
- process.env.NODE_ENV !== "production" && (arguments.length > 4 && z("'extendObservable' expected 2-4 arguments"), typeof t != "object" && z("'extendObservable' expects an object as first argument"), xn(t) && z("'extendObservable' should not be used on maps, use map.merge instead"), mt(e) || z("'extendObservable' only accepts plain objects as second argument"), (xi(e) || xi(n)) && z("Extending an object with another observable (object) is not supported"));
1656
+ process.env.NODE_ENV !== "production" && (arguments.length > 4 && F("'extendObservable' expected 2-4 arguments"), typeof t != "object" && F("'extendObservable' expects an object as first argument"), xn(t) && F("'extendObservable' should not be used on maps, use map.merge instead"), mt(e) || F("'extendObservable' only accepts plain objects as second argument"), (xi(e) || xi(n)) && F("Extending an object with another observable (object) is not supported"));
1657
1657
  var i = Lh(e);
1658
1658
  return Dn(function() {
1659
1659
  var o = ur(t, r)[ee];
@@ -1705,7 +1705,7 @@ var hm = 0, pm = /* @__PURE__ */ (function(t) {
1705
1705
  return Cs.decorate_20223_(e, n);
1706
1706
  if (In(n))
1707
1707
  return Pi(e, n, Cs);
1708
- process.env.NODE_ENV !== "production" && arguments.length !== 1 && z("Flow expects single argument with generator function");
1708
+ process.env.NODE_ENV !== "production" && arguments.length !== 1 && F("Flow expects single argument with generator function");
1709
1709
  var r = e, i = r.name || "<unnamed flow>", o = function() {
1710
1710
  var a = this, l = arguments, d = ++hm, u = Xn(i + " - runid: " + d + " - init", r).apply(a, l), h, m = void 0, x = new Promise(function(b, w) {
1711
1711
  var S = 0;
@@ -1763,7 +1763,7 @@ function xu(t, e) {
1763
1763
  return !1;
1764
1764
  if (e !== void 0) {
1765
1765
  if (process.env.NODE_ENV !== "production" && (xn(t) || Di(t)))
1766
- return z("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");
1766
+ return F("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");
1767
1767
  if (ar(t)) {
1768
1768
  var n, r, i = t[ee];
1769
1769
  return i.values_.has(e) || !!((n = i.lazyComputedKeys_) != null && n.has(e)) || !!((r = i.lazyObservableKeys_) != null && r.has(e));
@@ -1773,10 +1773,10 @@ function xu(t, e) {
1773
1773
  return ar(t) || !!t[ee] || Ya(t) || $o(t) || rs(t);
1774
1774
  }
1775
1775
  function xi(t) {
1776
- return process.env.NODE_ENV !== "production" && arguments.length !== 1 && z("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"), xu(t);
1776
+ return process.env.NODE_ENV !== "production" && arguments.length !== 1 && F("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"), xu(t);
1777
1777
  }
1778
1778
  function Hy(t, e) {
1779
- return process.env.NODE_ENV !== "production" && !In(e) ? z("expected a property name as second argument") : xu(t, e);
1779
+ return process.env.NODE_ENV !== "production" && !In(e) ? F("expected a property name as second argument") : xu(t, e);
1780
1780
  }
1781
1781
  function gm() {
1782
1782
  if (process.env.NODE_ENV !== "production") {
@@ -1785,7 +1785,7 @@ function gm() {
1785
1785
  typeof n[n.length - 1] == "boolean" && (t = n.pop());
1786
1786
  var i = bm(n);
1787
1787
  if (!i)
1788
- return z("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");
1788
+ return F("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");
1789
1789
  i.isTracing_ === jt.NONE && console.log("[mobx.trace] '" + i.name_ + "' tracing enabled"), i.isTracing_ = t ? jt.BREAK : jt.LOG;
1790
1790
  }
1791
1791
  }
@@ -1804,7 +1804,7 @@ function un(t, e) {
1804
1804
  try {
1805
1805
  return t.apply(e);
1806
1806
  } finally {
1807
- zt();
1807
+ Ft();
1808
1808
  }
1809
1809
  }
1810
1810
  function Vn(t) {
@@ -1833,12 +1833,12 @@ var vm = {
1833
1833
  return process.env.NODE_ENV !== "production" && k.trackingDerivation && Gr("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."), Vn(e).ownKeys_();
1834
1834
  },
1835
1835
  preventExtensions: function(e) {
1836
- z(13);
1836
+ F(13);
1837
1837
  }
1838
1838
  };
1839
1839
  function xm(t, e) {
1840
1840
  var n, r;
1841
- return zd(), t = ur(t, e), (r = (n = t[ee]).proxy_) != null ? r : n.proxy_ = new Proxy(t, vm);
1841
+ return Fd(), t = ur(t, e), (r = (n = t[ee]).proxy_) != null ? r : n.proxy_ = new Proxy(t, vm);
1842
1842
  }
1843
1843
  function Tt(t) {
1844
1844
  return t.interceptors_ !== void 0 && t.interceptors_.length > 0;
@@ -1853,7 +1853,7 @@ function ki(t, e) {
1853
1853
  function Dt(t, e) {
1854
1854
  var n = dr();
1855
1855
  try {
1856
- for (var r = [].concat(t.interceptors_ || []), i = 0, o = r.length; i < o && (e = r[i](e), e && !e.type && z(14), !!e); i++)
1856
+ for (var r = [].concat(t.interceptors_ || []), i = 0, o = r.length; i < o && (e = r[i](e), e && !e.type && F(14), !!e); i++)
1857
1857
  ;
1858
1858
  return e;
1859
1859
  } finally {
@@ -1882,14 +1882,14 @@ function Yt(t, e) {
1882
1882
  function ym(t, e, n) {
1883
1883
  return Dn(function() {
1884
1884
  var r, i = ur(t, n)[ee];
1885
- process.env.NODE_ENV !== "production" && e && t[ht] && z("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."), (r = e) != null || (e = qh(t)), kr(e).forEach(function(o) {
1885
+ process.env.NODE_ENV !== "production" && e && t[ht] && F("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."), (r = e) != null || (e = qh(t)), kr(e).forEach(function(o) {
1886
1886
  return i.make_(o, e[o]);
1887
1887
  });
1888
1888
  }), t;
1889
1889
  }
1890
1890
  var Es = /* @__PURE__ */ Symbol("mobx-keys");
1891
1891
  function Za(t, e, n) {
1892
- return process.env.NODE_ENV !== "production" && (!mt(t) && !mt(Object.getPrototypeOf(t)) && z("'makeAutoObservable' can only be used for classes that don't have a superclass"), ar(t) && z("makeAutoObservable can only be used on objects not already made observable")), mt(t) ? mu(t, t, e, n) : (Dn(function() {
1892
+ return process.env.NODE_ENV !== "production" && (!mt(t) && !mt(Object.getPrototypeOf(t)) && F("'makeAutoObservable' can only be used for classes that don't have a superclass"), ar(t) && F("makeAutoObservable can only be used on objects not already made observable")), mt(t) ? mu(t, t, e, n) : (Dn(function() {
1893
1893
  var r = ur(t, n)[ee];
1894
1894
  if (!t[Es]) {
1895
1895
  var i = Object.getPrototypeOf(t), o = new Set([].concat(kr(t), kr(i)));
@@ -1914,7 +1914,7 @@ var al = "splice", Ut = "update", wm = 1e4, Sm = {
1914
1914
  return n === "length" && i.setArrayLength_(r), typeof n == "symbol" || isNaN(n) ? e[n] = r : i.set_(parseInt(n), r), !0;
1915
1915
  },
1916
1916
  preventExtensions: function() {
1917
- z(15);
1917
+ F(15);
1918
1918
  }
1919
1919
  }, Qa = /* @__PURE__ */ (function() {
1920
1920
  function t(n, r, i, o) {
@@ -1944,7 +1944,7 @@ var al = "splice", Ut = "update", wm = 1e4, Sm = {
1944
1944
  }, e.getArrayLength_ = function() {
1945
1945
  return this.atom_.reportObserved(), this.values_.length;
1946
1946
  }, e.setArrayLength_ = function(r) {
1947
- (typeof r != "number" || isNaN(r) || r < 0) && z("Out of range: " + r);
1947
+ (typeof r != "number" || isNaN(r) || r < 0) && F("Out of range: " + r);
1948
1948
  var i = this.values_.length;
1949
1949
  if (r !== i)
1950
1950
  if (r > i) {
@@ -1954,7 +1954,7 @@ var al = "splice", Ut = "update", wm = 1e4, Sm = {
1954
1954
  } else
1955
1955
  this.spliceWithArray_(r, i - r);
1956
1956
  }, e.updateArrayLength_ = function(r, i) {
1957
- r !== this.lastKnownLength_ && z(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && Cu(r + i + 1);
1957
+ r !== this.lastKnownLength_ && F(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && Cu(r + i + 1);
1958
1958
  }, e.spliceWithArray_ = function(r, i, o) {
1959
1959
  var s = this;
1960
1960
  en(this.atom_);
@@ -2024,7 +2024,7 @@ var al = "splice", Ut = "update", wm = 1e4, Sm = {
2024
2024
  return this.atom_.reportObserved(), this.dehanceValue_(this.values_[r]);
2025
2025
  }, e.set_ = function(r, i) {
2026
2026
  var o = this.values_;
2027
- if (this.legacyMode_ && r > o.length && z(17, r, o.length), r < o.length) {
2027
+ if (this.legacyMode_ && r > o.length && F(17, r, o.length), r < o.length) {
2028
2028
  en(this.atom_);
2029
2029
  var s = o[r];
2030
2030
  if (Tt(this)) {
@@ -2050,7 +2050,7 @@ var al = "splice", Ut = "update", wm = 1e4, Sm = {
2050
2050
  }, t;
2051
2051
  })();
2052
2052
  function _m(t, e, n, r) {
2053
- return n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + Ht() : "ObservableArray"), r === void 0 && (r = !1), zd(), Dn(function() {
2053
+ return n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + Ht() : "ObservableArray"), r === void 0 && (r = !1), Fd(), Dn(function() {
2054
2054
  var i = new Qa(n, e, r, !1);
2055
2055
  Ld(i.values_, ee, i);
2056
2056
  var o = new Proxy(i.values_, Sm);
@@ -2109,10 +2109,10 @@ var ko = {
2109
2109
  return e.spliceWithArray_(0, 0, r), e.values_.length;
2110
2110
  },
2111
2111
  reverse: function() {
2112
- return k.trackingDerivation && z(37, "reverse"), this.replace(this.slice().reverse()), this;
2112
+ return k.trackingDerivation && F(37, "reverse"), this.replace(this.slice().reverse()), this;
2113
2113
  },
2114
2114
  sort: function() {
2115
- k.trackingDerivation && z(37, "sort");
2115
+ k.trackingDerivation && F(37, "sort");
2116
2116
  var e = this.slice();
2117
2117
  return e.sort.apply(e, arguments), this.replace(e), this;
2118
2118
  },
@@ -2185,7 +2185,7 @@ function Di(t) {
2185
2185
  var Cm = {}, On = "add", To = "delete", wu = /* @__PURE__ */ (function() {
2186
2186
  function t(n, r, i) {
2187
2187
  var o = this;
2188
- r === void 0 && (r = rr), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + Ht() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[ee] = Cm, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = i, Te(Map) || z(18), Dn(function() {
2188
+ r === void 0 && (r = rr), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + Ht() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[ee] = Cm, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = i, Te(Map) || F(18), Dn(function() {
2189
2189
  o.keysAtom_ = Hd(process.env.NODE_ENV !== "production" ? o.name_ + ".keys()" : "ObservableMap.keys()"), o.data_ = /* @__PURE__ */ new Map(), o.hasMap_ = /* @__PURE__ */ new Map(), n && o.merge(n);
2190
2190
  });
2191
2191
  }
@@ -2317,14 +2317,14 @@ var Cm = {}, On = "add", To = "delete", wu = /* @__PURE__ */ (function() {
2317
2317
  }, e.merge = function(r) {
2318
2318
  var i = this;
2319
2319
  return xn(r) && (r = new Map(r)), un(function() {
2320
- mt(r) ? Fh(r).forEach(function(o) {
2320
+ mt(r) ? zh(r).forEach(function(o) {
2321
2321
  return i.set(o, r[o]);
2322
2322
  }) : Array.isArray(r) ? r.forEach(function(o) {
2323
2323
  var s = o[0], a = o[1];
2324
2324
  return i.set(s, a);
2325
- }) : Rr(r) ? (zh(r) || z(19, r), r.forEach(function(o, s) {
2325
+ }) : Rr(r) ? (Fh(r) || F(19, r), r.forEach(function(o, s) {
2326
2326
  return i.set(s, o);
2327
- })) : r != null && z(20, r);
2327
+ })) : r != null && F(20, r);
2328
2328
  }), this;
2329
2329
  }, e.clear = function() {
2330
2330
  var r = this;
@@ -2376,10 +2376,10 @@ var Cm = {}, On = "add", To = "delete", wu = /* @__PURE__ */ (function() {
2376
2376
  }, e.toJSON = function() {
2377
2377
  return Array.from(this);
2378
2378
  }, e.observe_ = function(r, i) {
2379
- return process.env.NODE_ENV !== "production" && i === !0 && z("`observe` doesn't support fireImmediately=true in combination with maps."), Ti(this, r);
2379
+ return process.env.NODE_ENV !== "production" && i === !0 && F("`observe` doesn't support fireImmediately=true in combination with maps."), Ti(this, r);
2380
2380
  }, e.intercept_ = function(r) {
2381
2381
  return ki(this, r);
2382
- }, zr(t, [{
2382
+ }, Fr(t, [{
2383
2383
  key: "size",
2384
2384
  get: function() {
2385
2385
  return this.keysAtom_.reportObserved(), this.data_.size;
@@ -2405,12 +2405,12 @@ function Em(t) {
2405
2405
  e.set(n, t[n]);
2406
2406
  return e;
2407
2407
  } else
2408
- return z(21, t);
2408
+ return F(21, t);
2409
2409
  }
2410
2410
  var Am = {}, Su = /* @__PURE__ */ (function() {
2411
2411
  function t(n, r, i) {
2412
2412
  var o = this;
2413
- r === void 0 && (r = rr), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableSet@" + Ht() : "ObservableSet"), this.name_ = void 0, this[ee] = Am, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, Te(Set) || z(22), this.enhancer_ = function(s, a) {
2413
+ r === void 0 && (r = rr), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableSet@" + Ht() : "ObservableSet"), this.name_ = void 0, this[ee] = Am, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, Te(Set) || F(22), this.enhancer_ = function(s, a) {
2414
2414
  return r(s, a, i);
2415
2415
  }, Dn(function() {
2416
2416
  o.atom_ = Hd(o.name_), n && o.replace(n);
@@ -2550,10 +2550,10 @@ var Am = {}, Su = /* @__PURE__ */ (function() {
2550
2550
  return i.add(o);
2551
2551
  })) : dn(r) ? (i.clear(), r.forEach(function(o) {
2552
2552
  return i.add(o);
2553
- })) : r != null && z("Cannot initialize set from " + r);
2553
+ })) : r != null && F("Cannot initialize set from " + r);
2554
2554
  }), this;
2555
2555
  }, e.observe_ = function(r, i) {
2556
- return process.env.NODE_ENV !== "production" && i === !0 && z("`observe` doesn't support fireImmediately=true in combination with sets."), Ti(this, r);
2556
+ return process.env.NODE_ENV !== "production" && i === !0 && F("`observe` doesn't support fireImmediately=true in combination with sets."), Ti(this, r);
2557
2557
  }, e.intercept_ = function(r) {
2558
2558
  return ki(this, r);
2559
2559
  }, e.toJSON = function() {
@@ -2562,7 +2562,7 @@ var Am = {}, Su = /* @__PURE__ */ (function() {
2562
2562
  return "[object ObservableSet]";
2563
2563
  }, e[Symbol.iterator] = function() {
2564
2564
  return this.values();
2565
- }, zr(t, [{
2565
+ }, Fr(t, [{
2566
2566
  key: "size",
2567
2567
  get: function() {
2568
2568
  return this.atom_.reportObserved(), this.data_.size;
@@ -2579,7 +2579,7 @@ function ll(t) {
2579
2579
  }
2580
2580
  var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ */ (function() {
2581
2581
  function t(n, r, i, o) {
2582
- r === void 0 && (r = /* @__PURE__ */ new Map()), o === void 0 && (o = gp), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.lazyComputedKeys_ = void 0, this.lazyObservableKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = o, this.keysAtom_ = new Tn(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = mt(this.target_), process.env.NODE_ENV !== "production" && !Ou(this.defaultAnnotation_) && z("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {});
2582
+ r === void 0 && (r = /* @__PURE__ */ new Map()), o === void 0 && (o = gp), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.lazyComputedKeys_ = void 0, this.lazyObservableKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = o, this.keysAtom_ = new Tn(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = mt(this.target_), process.env.NODE_ENV !== "production" && !Ou(this.defaultAnnotation_) && F("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {});
2583
2583
  }
2584
2584
  var e = t.prototype;
2585
2585
  return e.getObservablePropValue_ = function(r) {
@@ -2648,7 +2648,7 @@ var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ *
2648
2648
  var o;
2649
2649
  if ((o = this.target_[ht]) != null && o[r])
2650
2650
  return;
2651
- z(1, i.annotationType_, this.name_ + "." + r.toString());
2651
+ F(1, i.annotationType_, this.name_ + "." + r.toString());
2652
2652
  }
2653
2653
  for (var s = this.target_; s && s !== Go; ) {
2654
2654
  var a = Ao(s, r);
@@ -2697,7 +2697,7 @@ var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ *
2697
2697
  tn(this.target_, r, i);
2698
2698
  this.notifyPropertyAddition_(r, i.value);
2699
2699
  } finally {
2700
- zt();
2700
+ Ft();
2701
2701
  }
2702
2702
  return !0;
2703
2703
  }, e.defineObservableProperty_ = function(r, i, o, s) {
@@ -2732,7 +2732,7 @@ var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ *
2732
2732
  var h = new Zn(i, o, process.env.NODE_ENV !== "production" ? this.name_ + "." + r.toString() : "ObservableObject.key", !1);
2733
2733
  this.values_.set(r, h), this.notifyPropertyAddition_(r, h.value_);
2734
2734
  } finally {
2735
- zt();
2735
+ Ft();
2736
2736
  }
2737
2737
  return !0;
2738
2738
  }, e.defineComputedProperty_ = function(r, i, o) {
@@ -2766,7 +2766,7 @@ var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ *
2766
2766
  tn(this.target_, r, d);
2767
2767
  this.values_.set(r, new gt(i)), this.notifyPropertyAddition_(r, void 0);
2768
2768
  } finally {
2769
- zt();
2769
+ Ft();
2770
2770
  }
2771
2771
  return !0;
2772
2772
  }, e.delete_ = function(r, i) {
@@ -2806,11 +2806,11 @@ var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ *
2806
2806
  process.env.NODE_ENV !== "production" && l && Ct(m), a && Yt(this, m), process.env.NODE_ENV !== "production" && l && Et();
2807
2807
  }
2808
2808
  } finally {
2809
- zt();
2809
+ Ft();
2810
2810
  }
2811
2811
  return !0;
2812
2812
  }, e.observe_ = function(r, i) {
2813
- return process.env.NODE_ENV !== "production" && i === !0 && z("`observe` doesn't support the fire immediately property for observable objects."), Ti(this, r);
2813
+ return process.env.NODE_ENV !== "production" && i === !0 && F("`observe` doesn't support the fire immediately property for observable objects."), Ti(this, r);
2814
2814
  }, e.intercept_ = function(r) {
2815
2815
  return ki(this, r);
2816
2816
  }, e.notifyPropertyAddition_ = function(r, i) {
@@ -2835,11 +2835,11 @@ var dl = /* @__PURE__ */ Object.create(null), ul = "remove", ma = /* @__PURE__ *
2835
2835
  })();
2836
2836
  function ur(t, e) {
2837
2837
  var n;
2838
- if (process.env.NODE_ENV !== "production" && e && ar(t) && z("Options can't be provided for already observable objects."), Lt(t, ee))
2839
- return process.env.NODE_ENV !== "production" && !(Eu(t) instanceof ma) && z("Cannot convert '" + Do(t) + `' into observable object:
2838
+ if (process.env.NODE_ENV !== "production" && e && ar(t) && F("Options can't be provided for already observable objects."), Lt(t, ee))
2839
+ return process.env.NODE_ENV !== "production" && !(Eu(t) instanceof ma) && F("Cannot convert '" + Do(t) + `' into observable object:
2840
2840
  The target is already observable of different type.
2841
2841
  Extending builtins is not supported.`), t;
2842
- process.env.NODE_ENV !== "production" && !Object.isExtensible(t) && z("Cannot make the designated object observable; it is not extensible");
2842
+ process.env.NODE_ENV !== "production" && !Object.isExtensible(t) && F("Cannot make the designated object observable; it is not extensible");
2843
2843
  var r = (n = e == null ? void 0 : e.name) != null ? n : process.env.NODE_ENV !== "production" ? (mt(t) ? "ObservableObject" : t.constructor.name) + "@" + Ht() : "ObservableObject", i = new ma(t, /* @__PURE__ */ new Map(), String(r), Ap(e));
2844
2844
  return Mi(t, ee, i), t;
2845
2845
  }
@@ -2862,9 +2862,9 @@ function hl(t, e, n) {
2862
2862
  process.env.NODE_ENV !== "production" && (t.appliedAnnotations_[n] = e), (r = t.target_[ht]) == null || delete r[n];
2863
2863
  }
2864
2864
  function pl(t, e, n) {
2865
- if (process.env.NODE_ENV !== "production" && !Ou(e) && z("Cannot annotate '" + t.name_ + "." + n.toString() + "': Invalid annotation."), process.env.NODE_ENV !== "production" && !Mo(e) && Lt(t.appliedAnnotations_, n)) {
2865
+ if (process.env.NODE_ENV !== "production" && !Ou(e) && F("Cannot annotate '" + t.name_ + "." + n.toString() + "': Invalid annotation."), process.env.NODE_ENV !== "production" && !Mo(e) && Lt(t.appliedAnnotations_, n)) {
2866
2866
  var r = t.name_ + "." + n.toString(), i = t.appliedAnnotations_[n].annotationType_, o = e.annotationType_;
2867
- z("Cannot apply '" + o + "' to '" + r + "':" + (`
2867
+ F("Cannot apply '" + o + "' to '" + r + "':" + (`
2868
2868
  The field is already annotated with '` + i + "'.") + `
2869
2869
  Re-annotating fields is not allowed.
2870
2870
  Use 'override' annotation for methods overridden by subclass.`);
@@ -2917,7 +2917,7 @@ var ec = /* @__PURE__ */ (function(t) {
2917
2917
  };
2918
2918
  }
2919
2919
  });
2920
- }, zr(e, [{
2920
+ }, Fr(e, [{
2921
2921
  key: "length",
2922
2922
  get: function() {
2923
2923
  return this[ee].getArrayLength_();
@@ -2965,34 +2965,34 @@ function km(t, e, n) {
2965
2965
  function cr(t, e) {
2966
2966
  if (typeof t == "object" && t !== null) {
2967
2967
  if (Di(t))
2968
- return e !== void 0 && z(23), t[ee].atom_;
2968
+ return e !== void 0 && F(23), t[ee].atom_;
2969
2969
  if (Qt(t))
2970
2970
  return t.atom_;
2971
2971
  if (xn(t)) {
2972
2972
  if (e === void 0)
2973
2973
  return t.keysAtom_;
2974
2974
  var n = t.data_.get(e) || t.hasMap_.get(e);
2975
- return n || z(25, e, Do(t)), n;
2975
+ return n || F(25, e, Do(t)), n;
2976
2976
  }
2977
2977
  if (ar(t)) {
2978
2978
  var r, i;
2979
2979
  if (!e)
2980
- return z(26);
2980
+ return F(26);
2981
2981
  var o = t[ee], s = (r = (i = o.values_.get(e)) != null ? i : o.materializeLazyComputed_(e)) != null ? r : o.materializeLazyObservable_(e);
2982
- return s || z(27, e, Do(t)), s;
2982
+ return s || F(27, e, Do(t)), s;
2983
2983
  }
2984
2984
  if (Ya(t) || rs(t) || $o(t))
2985
2985
  return t;
2986
2986
  } else if (Te(t) && $o(t[ee]))
2987
2987
  return t[ee];
2988
- z(28);
2988
+ F(28);
2989
2989
  }
2990
2990
  function Eu(t, e) {
2991
- if (t || z(29), Ya(t) || rs(t) || $o(t) || xn(t) || Qt(t))
2991
+ if (t || F(29), Ya(t) || rs(t) || $o(t) || xn(t) || Qt(t))
2992
2992
  return t;
2993
2993
  if (t[ee])
2994
2994
  return t[ee];
2995
- z(24, t);
2995
+ F(24, t);
2996
2996
  }
2997
2997
  function Do(t, e) {
2998
2998
  var n;
@@ -3011,7 +3011,7 @@ function Dn(t) {
3011
3011
  try {
3012
3012
  return t();
3013
3013
  } finally {
3014
- zt(), ns(n), pn(e);
3014
+ Ft(), ns(n), pn(e);
3015
3015
  }
3016
3016
  }
3017
3017
  var ml = Go.toString;
@@ -3100,7 +3100,7 @@ function Ou(t) {
3100
3100
  }
3101
3101
  ["Symbol", "Map", "Set"].forEach(function(t) {
3102
3102
  var e = Yo();
3103
- typeof e[t] > "u" && z("MobX requires global '" + t + "' to be available or polyfilled");
3103
+ typeof e[t] > "u" && F("MobX requires global '" + t + "' to be available or polyfilled");
3104
3104
  });
3105
3105
  typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
3106
3106
  spy: Jp,
@@ -3113,11 +3113,11 @@ if (!W)
3113
3113
  throw new Error("mobx-react-lite requires React with Hooks support");
3114
3114
  if (!ym)
3115
3115
  throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");
3116
- function zm(t) {
3116
+ function Fm(t) {
3117
3117
  t();
3118
3118
  }
3119
- function Fm(t) {
3120
- t || (t = zm, process.env.NODE_ENV !== "production" && console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")), um({ reactionScheduler: t });
3119
+ function zm(t) {
3120
+ t || (t = Fm, process.env.NODE_ENV !== "production" && console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")), um({ reactionScheduler: t });
3121
3121
  }
3122
3122
  function Lm(t) {
3123
3123
  return gu(t);
@@ -3400,7 +3400,7 @@ function Zm(t, e) {
3400
3400
  }
3401
3401
  process.env.NODE_ENV;
3402
3402
  var $s;
3403
- Fm(Mh);
3403
+ zm(Mh);
3404
3404
  $s = ba.finalizeAllImmediately;
3405
3405
  let Pu = {};
3406
3406
  function Wy(t) {
@@ -4231,7 +4231,7 @@ function gg(t) {
4231
4231
  };
4232
4232
  return e[t.toLowerCase()] ? e[t.toLowerCase()] : t.startsWith("aria-") || t.startsWith("data-") ? t : t.replace(/-([a-z])/g, (n, r) => r.toUpperCase());
4233
4233
  }
4234
- function zs(t) {
4234
+ function Fs(t) {
4235
4235
  const e = {};
4236
4236
  for (const n of Array.from(t.attributes)) {
4237
4237
  if (n.name === "style" || n.name.startsWith("on")) continue;
@@ -4335,7 +4335,7 @@ const bg = [
4335
4335
  function vg(t) {
4336
4336
  return t.replace(/-([a-z])/g, (e, n) => n.toUpperCase());
4337
4337
  }
4338
- function Fs(t) {
4338
+ function zs(t) {
4339
4339
  const e = {};
4340
4340
  for (const n of bg) {
4341
4341
  const r = t.getPropertyValue(n);
@@ -4380,8 +4380,8 @@ function ku(t, e, n, r, i, o) {
4380
4380
  componentProps: b.props,
4381
4381
  childrenText: b.childrenText,
4382
4382
  domTag: l.toLowerCase(),
4383
- domAttributes: zs(t),
4384
- domStyle: Fs(d),
4383
+ domAttributes: Fs(t),
4384
+ domStyle: zs(d),
4385
4385
  ...S,
4386
4386
  ...kl(h, e, d.display, m)
4387
4387
  });
@@ -4397,8 +4397,8 @@ function ku(t, e, n, r, i, o) {
4397
4397
  radius: cn(d.borderTopLeftRadius),
4398
4398
  hidden: u,
4399
4399
  domTag: l.toLowerCase(),
4400
- domAttributes: zs(t),
4401
- domStyle: Fs(d),
4400
+ domAttributes: Fs(t),
4401
+ domStyle: zs(d),
4402
4402
  ...S
4403
4403
  });
4404
4404
  const y = d.display === "flex" || d.display === "inline-flex", A = y && d.flexDirection.startsWith("row") ? "columns" : "rows", E = cn(A === "columns" ? d.columnGap : d.rowGap), B = Math.round(
@@ -4417,8 +4417,8 @@ function ku(t, e, n, r, i, o) {
4417
4417
  opacity: Math.max(0, Math.min(1, parseFloat(d.opacity) || 1)),
4418
4418
  hidden: u,
4419
4419
  domTag: l.toLowerCase(),
4420
- domAttributes: zs(t),
4421
- domStyle: Fs(d),
4420
+ domAttributes: Fs(t),
4421
+ domStyle: zs(d),
4422
4422
  ...S
4423
4423
  });
4424
4424
  if (n >= a)
@@ -4612,7 +4612,7 @@ function Cg(t) {
4612
4612
  function Eg(t, e) {
4613
4613
  return e === "focus" ? ic(t) && Rl(t) && "focus" in t : !(!oc(t) || !Rl(t) || !Cg(t) || e === "fill" && "readOnly" in t && t.readOnly);
4614
4614
  }
4615
- async function zl(t, e, n) {
4615
+ async function Fl(t, e, n) {
4616
4616
  const r = Date.now(), i = e.timeoutMs ?? 5e3;
4617
4617
  do {
4618
4618
  let o = null;
@@ -4630,11 +4630,11 @@ async function zl(t, e, n) {
4630
4630
  } while (!0);
4631
4631
  return null;
4632
4632
  }
4633
- async function Fl(t, e) {
4633
+ async function zl(t, e) {
4634
4634
  let n = 0;
4635
4635
  for (const r of e) {
4636
4636
  if (r.action === "wait") {
4637
- if ((r.selector || r.text) && !await zl(
4637
+ if ((r.selector || r.text) && !await Fl(
4638
4638
  t,
4639
4639
  r,
4640
4640
  r.waitState ?? "visible"
@@ -4669,7 +4669,7 @@ async function Fl(t, e) {
4669
4669
  n += 1, await ui(t, r.settleMs ?? 50);
4670
4670
  continue;
4671
4671
  }
4672
- const i = await zl(t, r, "actionable");
4672
+ const i = await Fl(t, r, "actionable");
4673
4673
  if (!i) {
4674
4674
  if (r.optional) continue;
4675
4675
  return {
@@ -4952,12 +4952,12 @@ function qy({
4952
4952
  function wa(t) {
4953
4953
  return (t ?? "").replace(/\s+/g, " ").trim();
4954
4954
  }
4955
- function zo(t, e = /* @__PURE__ */ new Set()) {
4955
+ function Fo(t, e = /* @__PURE__ */ new Set()) {
4956
4956
  if (t === null || typeof t == "string" || typeof t == "boolean") return !0;
4957
4957
  if (typeof t == "number") return Number.isFinite(t);
4958
4958
  if (typeof t != "object" || e.has(t)) return !1;
4959
4959
  e.add(t);
4960
- const n = Array.isArray(t) ? t.every((r) => zo(r, e)) : (Object.getPrototypeOf(t) === Object.prototype || Object.getPrototypeOf(t) === null) && Object.values(t).every((r) => zo(r, e));
4960
+ const n = Array.isArray(t) ? t.every((r) => Fo(r, e)) : (Object.getPrototypeOf(t) === Object.prototype || Object.getPrototypeOf(t) === null) && Object.values(t).every((r) => Fo(r, e));
4961
4961
  return e.delete(t), n;
4962
4962
  }
4963
4963
  function yi(t) {
@@ -5128,7 +5128,7 @@ function Yy(t, e = {}) {
5128
5128
  for (const N of w.assets)
5129
5129
  S.has(N.pageId) || l.push(`${b}:${N.id}: unknown pageId ${N.pageId}`);
5130
5130
  for (const N of w.pages) {
5131
- b === "screens" && ((h = N.interactions) != null && h.length || (m = N.assertions) != null && m.length || N.preset) && !N.route && l.push(`${b}:${N.id}: capture contract requires a route preview`), N.preset && !zo(N.preset) && l.push(`${b}:${N.id}: preset must contain only finite JSON-serializable data`), N.environment && !zo(N.environment) && l.push(`${b}:${N.id}: environment must contain only finite JSON-serializable data`);
5131
+ b === "screens" && ((h = N.interactions) != null && h.length || (m = N.assertions) != null && m.length || N.preset) && !N.route && l.push(`${b}:${N.id}: capture contract requires a route preview`), N.preset && !Fo(N.preset) && l.push(`${b}:${N.id}: preset must contain only finite JSON-serializable data`), N.environment && !Fo(N.environment) && l.push(`${b}:${N.id}: environment must contain only finite JSON-serializable data`);
5132
5132
  for (const y of N.assertions ?? [])
5133
5133
  y.selector.trim() || l.push(`${b}:${N.id}: assertion selector is required`), y.label.trim() || l.push(`${b}:${N.id}: assertion label is required`), y.attribute && !y.attribute.name.trim() && l.push(`${b}:${N.id}: assertion attribute name is required`);
5134
5134
  !N.route && !N.componentName && !((x = N.gallery) != null && x.length) && l.push(`${b}:${N.id}: componentName, gallery, or route is required`), N.frameSizeMode != null && N.frameSizeMode !== "fixed" && N.frameSizeMode !== "content" && l.push(`${b}:${N.id}: frameSizeMode must be fixed or content`), N.heightMode != null && N.heightMode !== "fixed" && N.heightMode !== "document" && l.push(`${b}:${N.id}: heightMode must be fixed or document`), N.maxHeight != null && (!Number.isFinite(N.maxHeight) || N.maxHeight <= 0) && l.push(`${b}:${N.id}: maxHeight must be a positive finite number`), N.componentName && !n[N.componentName] && l.push(`${b}:${N.id}: missing registry component ${N.componentName}`);
@@ -5236,7 +5236,7 @@ ${l.join(`
5236
5236
  ...x
5237
5237
  });
5238
5238
  },
5239
- runScreenInteractions: Fl,
5239
+ runScreenInteractions: zl,
5240
5240
  prepareScreenCapture: async (l, d) => {
5241
5241
  var w, S;
5242
5242
  const u = [];
@@ -5271,7 +5271,7 @@ ${l.join(`
5271
5271
  });
5272
5272
  }
5273
5273
  let m = Ig(((w = d.interactions) == null ? void 0 : w.length) ?? 0), x = $g(((S = d.assertions) == null ? void 0 : S.length) ?? 0);
5274
- u.length === 0 && (m = await Fl(l, d.interactions ?? []), m.complete || u.push({
5274
+ u.length === 0 && (m = await zl(l, d.interactions ?? []), m.complete || u.push({
5275
5275
  stage: "interaction",
5276
5276
  code: "interaction_failed",
5277
5277
  label: m.failedLabel,
@@ -5301,7 +5301,7 @@ let Sa = "";
5301
5301
  const _a = /* @__PURE__ */ new Set();
5302
5302
  let Na = "";
5303
5303
  const Ca = /* @__PURE__ */ new Set();
5304
- let zu = null, Fu = null, Lu = null, ju = null, Vu = null, Bu = null;
5304
+ let Fu = null, zu = null, Lu = null, ju = null, Vu = null, Bu = null;
5305
5305
  function Xy(t) {
5306
5306
  if (Sa !== t) {
5307
5307
  Sa = t;
@@ -5334,16 +5334,16 @@ function Ea() {
5334
5334
  return Ku;
5335
5335
  }
5336
5336
  function Qy(t) {
5337
- zu = t;
5337
+ Fu = t;
5338
5338
  }
5339
5339
  function Rg() {
5340
- return zu;
5340
+ return Fu;
5341
5341
  }
5342
5342
  function ew(t) {
5343
- Fu = t;
5343
+ zu = t;
5344
5344
  }
5345
5345
  function Uu() {
5346
- return Fu;
5346
+ return zu;
5347
5347
  }
5348
5348
  function tw(t) {
5349
5349
  Lu = t;
@@ -5354,13 +5354,13 @@ function xo() {
5354
5354
  function nw(t) {
5355
5355
  ju = t;
5356
5356
  }
5357
- function zg() {
5357
+ function Fg() {
5358
5358
  return ju;
5359
5359
  }
5360
5360
  function rw(t) {
5361
5361
  Vu = t;
5362
5362
  }
5363
- function Fg() {
5363
+ function zg() {
5364
5364
  return Vu;
5365
5365
  }
5366
5366
  function iw(t) {
@@ -5373,11 +5373,11 @@ const Lg = 12e3, jg = 32e3;
5373
5373
  function Vg(t) {
5374
5374
  return typeof t == "number" && Number.isFinite(t) && t > 0;
5375
5375
  }
5376
- function Fo(t, e) {
5376
+ function zo(t, e) {
5377
5377
  return Vg(t) ? Math.max(1, Math.round(t)) : e;
5378
5378
  }
5379
5379
  function Bg(t, e) {
5380
- const n = Fo(t, 600), r = Fo(
5380
+ const n = zo(t, 600), r = zo(
5381
5381
  e,
5382
5382
  Lg
5383
5383
  );
@@ -5387,9 +5387,9 @@ function Bg(t, e) {
5387
5387
  );
5388
5388
  }
5389
5389
  function wt(t) {
5390
- const e = Fo(t.height, 600);
5390
+ const e = zo(t.height, 600);
5391
5391
  if (t.heightMode !== "document") return e;
5392
- const n = Fo(t.resolvedDocumentHeight, e);
5392
+ const n = zo(t.resolvedDocumentHeight, e);
5393
5393
  return Math.min(
5394
5394
  Bg(e, t.maxHeight),
5395
5395
  Math.max(e, n)
@@ -8009,7 +8009,7 @@ async function Qu() {
8009
8009
  for (; er.size > 0; ) {
8010
8010
  const t = [...er.values()];
8011
8011
  er = /* @__PURE__ */ new Map(), pc();
8012
- const e = Fg();
8012
+ const e = zg();
8013
8013
  if (!e) {
8014
8014
  Ql(t), St.setStatus("idle", "");
8015
8015
  return;
@@ -8125,7 +8125,7 @@ const kb = [
8125
8125
  spacing: /-spacing-/,
8126
8126
  radius: /-radius-/,
8127
8127
  "font-size": /-font-size-/
8128
- }, Rb = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA", "SVG", "IMG", "VIDEO", "CANVAS"]), zb = 360, Fb = 248, Lb = "pygmalion:inspect-panel-position";
8128
+ }, Rb = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA", "SVG", "IMG", "VIDEO", "CANVAS"]), Fb = 360, zb = 248, Lb = "pygmalion:inspect-panel-position";
8129
8129
  function jb(t) {
8130
8130
  return [
8131
8131
  ...new Set([
@@ -8554,7 +8554,7 @@ function od({
8554
8554
  affectedFrames: n = []
8555
8555
  }) {
8556
8556
  var Xc, Jc, Zc, Qc, el;
8557
- const r = ce(null), [i, o] = W(null), [s, a] = W(null), [l, d] = W(null), [u, h] = W("cases"), [m, x] = W(!1), [b, w] = W(Hb), [S, N] = W(null), [y, A] = W("original"), [E, B] = W("default"), [C, R] = W("item"), [V, te] = W("base"), [L, de] = W({ minWidth: 768 }), [Ne, ne] = W(null), [G, fe] = W(!0), [Q, ve] = W(!1), [re, Fe] = W(!1), [Oe, se] = W(null), [De, Re] = W(""), [M, oe] = W(!1), [J, me] = W(""), [T, he] = W(!1), [ae, H] = W(""), [ie, ge] = W(null), [be, Ue] = W(""), [nt, Ce] = W(""), [Wt, bt] = W(0), [fr, qe] = Td((f) => f + 1, 0), hr = ce(""), vt = ce(null), Lr = ce(null);
8557
+ const r = ce(null), [i, o] = W(null), [s, a] = W(null), [l, d] = W(null), [u, h] = W("cases"), [m, x] = W(!1), [b, w] = W(Hb), [S, N] = W(null), [y, A] = W("original"), [E, B] = W("default"), [C, R] = W("item"), [V, te] = W("base"), [L, de] = W({ minWidth: 768 }), [Ne, ne] = W(null), [G, fe] = W(!0), [Q, ve] = W(!1), [re, ze] = W(!1), [Oe, se] = W(null), [De, Re] = W(""), [M, oe] = W(!1), [J, me] = W(""), [T, he] = W(!1), [ae, H] = W(""), [ie, ge] = W(null), [be, Ue] = W(""), [nt, Ce] = W(""), [Wt, bt] = W(0), [fr, qe] = Td((f) => f + 1, 0), hr = ce(""), vt = ce(null), Lr = ce(null);
8558
8558
  Lr.current = s;
8559
8559
  const Ri = ce(null);
8560
8560
  Ri.current = l;
@@ -8593,7 +8593,7 @@ function od({
8593
8593
  }),
8594
8594
  []
8595
8595
  ), le(() => {
8596
- const f = zg();
8596
+ const f = Fg();
8597
8597
  if (!f || mr.length === 0) {
8598
8598
  he(!1), H("");
8599
8599
  return;
@@ -8673,8 +8673,8 @@ function od({
8673
8673
  };
8674
8674
  }, [l]), le(() => {
8675
8675
  if (j.toastSeq === 0) return;
8676
- Fe(!0);
8677
- const f = window.setTimeout(() => Fe(!1), 1800);
8676
+ ze(!0);
8677
+ const f = window.setTimeout(() => ze(!1), 1800);
8678
8678
  return () => window.clearTimeout(f);
8679
8679
  }, [j.toastSeq]), !U || !q)
8680
8680
  return /* @__PURE__ */ c("div", { ref: r, className: "absolute inset-0 flex items-start justify-center pt-10", children: D && /* @__PURE__ */ c("span", { className: "rounded bg-black/70 px-3 py-1.5 text-[12px] text-white", children: "Cross-origin applications cannot be inspected." }) });
@@ -8768,12 +8768,12 @@ function od({
8768
8768
  } catch (O) {
8769
8769
  j.toast(`Apply failed:${String(O).slice(0, 80)}`);
8770
8770
  }
8771
- }, P = s != null && s.isConnected ? s : null, wn = i != null && i.isConnected ? i : null, Z = P != null && P.parentElement && P.parentElement !== Ee ? P.parentElement : null, rt = C === "container" && Z ? Z : P, K = P ? $e(P.getBoundingClientRect()) : null, F = Z ? $e(Z.getBoundingClientRect()) : null, zi = C === "container" && rt && rt !== P ? $e(rt.getBoundingClientRect()) : null, Ac = wn && wn !== P ? $e(wn.getBoundingClientRect()) : null, it = P ? q.getComputedStyle(P) : null, Ae = Z ? q.getComputedStyle(Z) : null, Oc = rt ? q.getComputedStyle(rt) : null, Mt = P ? He(P) : "", ot = P ? Se(P) : null, Sn = P ? It(P) : null, vr = P ? j.structuralEditKind(P) : null, Qf = P ? j.hasPendingValueEdit(P) : !1, Mc = P ? j.structuralBlockReason(P, "insert") : "No elements are selected.", eh = P ? j.structuralBlockReason(P, "remove") : "No elements are selected.", Pc = P ? j.structuralBlockReason(P, "move") : "No elements are selected.", us = P && P.parentElement ? Array.from(P.parentElement.children).indexOf(P) : -1, th = ((Zc = P == null ? void 0 : P.parentElement) == null ? void 0 : Zc.children.length) ?? 0, Ic = ot ? we()[ot.name] ?? null : null, $c = Sn && /^[A-Z]/.test(Sn.elementName) ? (ot == null ? void 0 : ot.name) ?? null : null, kc = P ? j.componentInsertBlockReason(P, $c) : "No elements are selected.", fs = be.trim().toLocaleLowerCase(), Fi = xe.filter(
8771
+ }, P = s != null && s.isConnected ? s : null, wn = i != null && i.isConnected ? i : null, Z = P != null && P.parentElement && P.parentElement !== Ee ? P.parentElement : null, rt = C === "container" && Z ? Z : P, K = P ? $e(P.getBoundingClientRect()) : null, z = Z ? $e(Z.getBoundingClientRect()) : null, Fi = C === "container" && rt && rt !== P ? $e(rt.getBoundingClientRect()) : null, Ac = wn && wn !== P ? $e(wn.getBoundingClientRect()) : null, it = P ? q.getComputedStyle(P) : null, Ae = Z ? q.getComputedStyle(Z) : null, Oc = rt ? q.getComputedStyle(rt) : null, Mt = P ? He(P) : "", ot = P ? Se(P) : null, Sn = P ? It(P) : null, vr = P ? j.structuralEditKind(P) : null, Qf = P ? j.hasPendingValueEdit(P) : !1, Mc = P ? j.structuralBlockReason(P, "insert") : "No elements are selected.", eh = P ? j.structuralBlockReason(P, "remove") : "No elements are selected.", Pc = P ? j.structuralBlockReason(P, "move") : "No elements are selected.", us = P && P.parentElement ? Array.from(P.parentElement.children).indexOf(P) : -1, th = ((Zc = P == null ? void 0 : P.parentElement) == null ? void 0 : Zc.children.length) ?? 0, Ic = ot ? we()[ot.name] ?? null : null, $c = Sn && /^[A-Z]/.test(Sn.elementName) ? (ot == null ? void 0 : ot.name) ?? null : null, kc = P ? j.componentInsertBlockReason(P, $c) : "No elements are selected.", fs = be.trim().toLocaleLowerCase(), zi = xe.filter(
8772
8772
  ([f, v]) => !fs || f.toLocaleLowerCase().includes(fs) || v.importPath.toLocaleLowerCase().includes(fs)
8773
- ), xt = Fi.find(([f]) => f === nt) ?? Fi[0] ?? null, Tc = (xt == null ? void 0 : xt[1]) ?? null, Li = xt ? xa(xt[0]) : null, Vr = (P ? Ro(P) : null) ?? 0, Dc = P ? Ub(P, (ot == null ? void 0 : ot.props) ?? null, Ic) : !1, hs = P ? qb(P, (ot == null ? void 0 : ot.props) ?? null, Ic) : [], Rc = P ? of(P) : [], zn = { count: Rc.length }, ps = Q && P && wn && wn !== P ? [P, wn] : null, zc = j.entries, Fc = Object.entries((ot == null ? void 0 : ot.primitiveProps) ?? {}), Fn = Rn, on = zc.reduce((f, v) => {
8773
+ ), xt = zi.find(([f]) => f === nt) ?? zi[0] ?? null, Tc = (xt == null ? void 0 : xt[1]) ?? null, Li = xt ? xa(xt[0]) : null, Vr = (P ? Ro(P) : null) ?? 0, Dc = P ? Ub(P, (ot == null ? void 0 : ot.props) ?? null, Ic) : !1, hs = P ? qb(P, (ot == null ? void 0 : ot.props) ?? null, Ic) : [], Rc = P ? of(P) : [], Fn = { count: Rc.length }, ps = Q && P && wn && wn !== P ? [P, wn] : null, Fc = j.entries, zc = Object.entries((ot == null ? void 0 : ot.primitiveProps) ?? {}), zn = Rn, on = Fc.reduce((f, v) => {
8774
8774
  const _ = f.find(($) => $.el === v.el);
8775
8775
  return _ ? (_.label = v.label, _.items.push(v)) : f.push({ id: v.id, el: v.el, label: v.label, items: [v] }), f;
8776
- }, []), ji = Fn.styles.length + Fn.texts.length + Fn.operations.length, Vi = xo() != null, ms = Vi && De !== pr, nh = on.filter(
8776
+ }, []), ji = zn.styles.length + zn.texts.length + zn.operations.length, Vi = xo() != null, ms = Vi && De !== pr, nh = on.filter(
8777
8777
  (f) => f.items.some((v) => !Zt(v))
8778
8778
  ).length, gs = S != null || y !== "original" || E !== "default", Br = gs && P ? Zb(P, q) : null, Me = Xb(Ae), xr = Me != null, lt = Jb(Z), sn = V === "custom" ? L.minWidth != null || L.maxWidth != null ? {
8779
8779
  ...L.minWidth != null ? { minWidth: Math.max(0, Math.round(L.minWidth)) } : {},
@@ -8807,14 +8807,14 @@ function od({
8807
8807
  bottom: Math.max(0, yt(Ae, "padding-bottom")),
8808
8808
  left: Math.max(0, yt(Ae, "padding-left"))
8809
8809
  }, oh = dt.left, sh = dt.top, Wr = (Ae == null ? void 0 : Ae.getPropertyValue("justify-content")) || "normal", Lc = (Ae == null ? void 0 : Ae.getPropertyValue("align-items")) || "normal", xs = (Ae == null ? void 0 : Ae.getPropertyValue("flex-direction")) || "row", ah = id(xs.includes("column") ? Lc : Wr), ch = id(xs.includes("column") ? Wr : Lc), lh = io(
8810
- (Z == null ? void 0 : Z.style.getPropertyValue("width")) || (F && F.width >= window.innerWidth * 0.8 ? "100%" : ""),
8811
- (F == null ? void 0 : F.width) ?? 0
8810
+ (Z == null ? void 0 : Z.style.getPropertyValue("width")) || (z && z.width >= window.innerWidth * 0.8 ? "100%" : ""),
8811
+ (z == null ? void 0 : z.width) ?? 0
8812
8812
  ), dh = io(
8813
8813
  (Z == null ? void 0 : Z.style.getPropertyValue("height")) || "",
8814
- (F == null ? void 0 : F.height) ?? 0
8815
- ), uh = io((P == null ? void 0 : P.style.getPropertyValue("width")) || "", (K == null ? void 0 : K.width) ?? 0), fh = io((P == null ? void 0 : P.style.getPropertyValue("height")) || "", (K == null ? void 0 : K.height) ?? 0), jc = (it == null ? void 0 : it.getPropertyValue("align-self")) || "auto", hh = yt(it, "order"), Kr = (P == null ? void 0 : P.style.getPropertyValue("grid-column")) || (it == null ? void 0 : it.getPropertyValue("grid-column")) || "auto", Vc = Number(((el = /span\s+(\d+)/.exec(Kr)) == null ? void 0 : el[1]) ?? 1), ys = (it == null ? void 0 : it.getPropertyValue("position")) === "absolute", yr = Us(Z, (K == null ? void 0 : K.width) ?? 240), st = S ?? Math.max(1, zn.count), Bi = Math.max(
8814
+ (z == null ? void 0 : z.height) ?? 0
8815
+ ), uh = io((P == null ? void 0 : P.style.getPropertyValue("width")) || "", (K == null ? void 0 : K.width) ?? 0), fh = io((P == null ? void 0 : P.style.getPropertyValue("height")) || "", (K == null ? void 0 : K.height) ?? 0), jc = (it == null ? void 0 : it.getPropertyValue("align-self")) || "auto", hh = yt(it, "order"), Kr = (P == null ? void 0 : P.style.getPropertyValue("grid-column")) || (it == null ? void 0 : it.getPropertyValue("grid-column")) || "auto", Vc = Number(((el = /span\s+(\d+)/.exec(Kr)) == null ? void 0 : el[1]) ?? 1), ys = (it == null ? void 0 : it.getPropertyValue("position")) === "absolute", yr = Us(Z, (K == null ? void 0 : K.width) ?? 240), st = S ?? Math.max(1, Fn.count), Bi = Math.max(
8816
8816
  0,
8817
- ((F == null ? void 0 : F.width) ?? 0) - dt.left - dt.right
8817
+ ((z == null ? void 0 : z.width) ?? 0) - dt.left - dt.right
8818
8818
  ), ph = Math.max(
8819
8819
  1,
8820
8820
  Math.min(
@@ -8827,7 +8827,7 @@ function od({
8827
8827
  ), ws = Math.max(
8828
8828
  0,
8829
8829
  (Bi - an * Math.max(0, st - 1)) / st
8830
- ), Hc = Math.max(80, Math.floor(ws)), gh = ws < 160, Wc = Me === "grid" && lt === st, bh = Me === "scroll" ? `${st} items · horizontal scroll · ${Math.round(Bc)}px cards` : `${st} items · ${mh} rows × ${Hi} columns · about ${Math.round(Bc)}px each`, vh = u === "cases" && !m && !!Z && !!F && !!K, Ln = !!Z && Z.scrollWidth > Z.clientWidth + 1 && !["auto", "scroll"].includes((Ae == null ? void 0 : Ae.getPropertyValue("overflow-x")) ?? ""), Kc = [
8830
+ ), Hc = Math.max(80, Math.floor(ws)), gh = ws < 160, Wc = Me === "grid" && lt === st, bh = Me === "scroll" ? `${st} items · horizontal scroll · ${Math.round(Bc)}px cards` : `${st} items · ${mh} rows × ${Hi} columns · about ${Math.round(Bc)}px each`, vh = u === "cases" && !m && !!Z && !!z && !!K, Ln = !!Z && Z.scrollWidth > Z.clientWidth + 1 && !["auto", "scroll"].includes((Ae == null ? void 0 : Ae.getPropertyValue("overflow-x")) ?? ""), Kc = [
8831
8831
  S != null ? `${S} items` : null,
8832
8832
  y === "long" ? "long text" : y === "extreme" ? "extreme text" : null,
8833
8833
  E === "selected" ? "selection status" : E === "disabled" ? "inactive" : E === "loading" ? "loading status" : null
@@ -8853,7 +8853,7 @@ function od({
8853
8853
  sn,
8854
8854
  Le.current
8855
8855
  );
8856
- }, ze = (f, v) => {
8856
+ }, Fe = (f, v) => {
8857
8857
  var _;
8858
8858
  P && (j.recordStyle(
8859
8859
  P,
@@ -8870,11 +8870,11 @@ function od({
8870
8870
  for (const [_, $] of Object.entries(v.declarations)) Pe(_, $);
8871
8871
  if (P)
8872
8872
  for (const [_, $] of Object.entries(v.itemDeclarations))
8873
- ze(_, $);
8873
+ Fe(_, $);
8874
8874
  R("container"), j.toast(`${v.label}change to batch`);
8875
8875
  }
8876
8876
  }, Ur = (f) => {
8877
- !Z || !P || (Pe("display", "grid"), Pe("grid-template-columns", `repeat(${f}, minmax(0, 1fr))`), ze("width", "auto"), ze("min-width", "0"), j.toast(`Maximum ${f} per row · ${Bn(sn)}`));
8877
+ !Z || !P || (Pe("display", "grid"), Pe("grid-template-columns", `repeat(${f}, minmax(0, 1fr))`), Fe("width", "auto"), Fe("min-width", "0"), j.toast(`Maximum ${f} per row · ${Bn(sn)}`));
8878
8878
  }, Ui = (f) => {
8879
8879
  if (!Z || !P) return;
8880
8880
  const v = Math.max(
@@ -8886,7 +8886,7 @@ function od({
8886
8886
  )
8887
8887
  )
8888
8888
  );
8889
- Pe("display", "grid"), Pe("grid-template-columns", `repeat(auto-fit, minmax(min(${v}px, 100%), 1fr))`), ze("width", "auto"), ze("min-width", "0"), j.toast(`Automatic columns · minimum ${v}px · ${Bn(sn)}`);
8889
+ Pe("display", "grid"), Pe("grid-template-columns", `repeat(auto-fit, minmax(min(${v}px, 100%), 1fr))`), Fe("width", "auto"), Fe("min-width", "0"), j.toast(`Automatic columns · minimum ${v}px · ${Bn(sn)}`);
8890
8890
  }, _s = (f, v) => {
8891
8891
  if (!Z) return;
8892
8892
  const _ = Z.style.getPropertyValue(f), $ = f === "column-gap" ? an : f === "row-gap" ? Hr : dt[f.replace("padding-", "")];
@@ -8905,14 +8905,14 @@ function od({
8905
8905
  }
8906
8906
  );
8907
8907
  }, qi = (f, v) => {
8908
- if (!Z || !F) return;
8908
+ if (!Z || !z) return;
8909
8909
  const _ = Z.style.getPropertyValue("width"), $ = Z.style.getPropertyValue("height");
8910
- let O = Math.round(F.width), Y = Math.round(F.height);
8910
+ let O = Math.round(z.width), Y = Math.round(z.height);
8911
8911
  Ki(
8912
8912
  v,
8913
8913
  f === "width" ? "ew-resize" : f === "height" ? "ns-resize" : "nwse-resize",
8914
8914
  (X, pe) => {
8915
- f !== "height" && (O = Math.max(200, Math.min(1920, Math.round(F.width + X))), Z.style.setProperty("width", `${O}px`)), f !== "width" && (Y = Math.max(80, Math.min(1600, Math.round(F.height + pe))), Z.style.setProperty("height", `${Y}px`));
8915
+ f !== "height" && (O = Math.max(200, Math.min(1920, Math.round(z.width + X))), Z.style.setProperty("width", `${O}px`)), f !== "width" && (Y = Math.max(80, Math.min(1600, Math.round(z.height + pe))), Z.style.setProperty("height", `${Y}px`));
8916
8916
  },
8917
8917
  () => {
8918
8918
  jn(Z, "width", _), jn(Z, "height", $), f !== "height" && Pe("width", `${O}px`), f !== "width" && Pe("height", `${Y}px`), j.toast(`container${O} × ${Y}px`);
@@ -8933,7 +8933,7 @@ function od({
8933
8933
  ), P.style.setProperty("min-width", "0"), (pe = vt.current) == null || pe.mirrorStyle(P, "min-width", "0");
8934
8934
  },
8935
8935
  () => {
8936
- jn(Z, "display", v), jn(Z, "grid-template-columns", _), jn(P, "min-width", $), Pe("display", "grid"), Pe("grid-template-columns", `repeat(auto-fit, minmax(min(${Y}px, 100%), 1fr))`), ze("min-width", "0"), j.toast(`item minimum width${Y}px`);
8936
+ jn(Z, "display", v), jn(Z, "grid-template-columns", _), jn(P, "min-width", $), Pe("display", "grid"), Pe("grid-template-columns", `repeat(auto-fit, minmax(min(${Y}px, 100%), 1fr))`), Fe("min-width", "0"), j.toast(`item minimum width${Y}px`);
8937
8937
  }
8938
8938
  );
8939
8939
  }, yh = (f) => {
@@ -8948,14 +8948,14 @@ function od({
8948
8948
  $ = Math.max(40, Math.min(1200, Math.round(_ + Y))), P.style.setProperty("height", `${$}px`), (X = vt.current) == null || X.mirrorStyle(P, "height", `${$}px`);
8949
8949
  },
8950
8950
  () => {
8951
- jn(P, "height", v), ze("height", `${$}px`), j.toast(`item height${$}px`);
8951
+ jn(P, "height", v), Fe("height", `${$}px`), j.toast(`item height${$}px`);
8952
8952
  }
8953
8953
  );
8954
8954
  }, Yi = (f, v, _) => {
8955
- const $ = f === "container" ? F : K;
8955
+ const $ = f === "container" ? z : K;
8956
8956
  if (!$) return;
8957
8957
  const O = _ === "fill" ? "100%" : _ === "hug" ? v === "width" ? "fit-content" : "auto" : `${Math.round($[v])}px`;
8958
- f === "container" ? Pe(v, O) : (ze(v, O), v === "width" && ze("flex", _ === "fill" ? "1 1 0" : "0 0 auto")), j.toast(`${f === "container" ? "container" : "item"} ${v === "width" ? "width" : "height"} ${_}`);
8958
+ f === "container" ? Pe(v, O) : (Fe(v, O), v === "width" && Fe("flex", _ === "fill" ? "1 1 0" : "0 0 auto")), j.toast(`${f === "container" ? "container" : "item"} ${v === "width" ? "width" : "height"} ${_}`);
8959
8959
  }, Ns = (f, v) => {
8960
8960
  const _ = G ? f === "left" || f === "right" ? ["left", "right"] : ["top", "bottom"] : [f];
8961
8961
  for (const $ of _) Pe(`padding-${$}`, `${Math.max(0, v)}px`);
@@ -8990,7 +8990,7 @@ function od({
8990
8990
  Le.current
8991
8991
  ), ($ = vt.current) == null || $.mirrorStyle(v, O, Y);
8992
8992
  j.toast(f === "wrap" ? "Change to multi-line content" : "Change to one line abbreviation");
8993
- }, qr = m ? Fb : zb, Sh = u === "cases" && F && F.left + F.width > window.innerWidth - qr - 32 || K && K.left + K.width / 2 > window.innerWidth / 2 ? 16 : Math.max(16, window.innerWidth - qr - 16), _h = D ? 54 : 64, Yc = Math.max(8, Math.min((b == null ? void 0 : b.x) ?? Sh, window.innerWidth - qr - 8)), Gc = Math.max(8, Math.min((b == null ? void 0 : b.y) ?? _h, window.innerHeight - 80)), Nh = (f) => {
8993
+ }, qr = m ? zb : Fb, Sh = u === "cases" && z && z.left + z.width > window.innerWidth - qr - 32 || K && K.left + K.width / 2 > window.innerWidth / 2 ? 16 : Math.max(16, window.innerWidth - qr - 16), _h = D ? 54 : 64, Yc = Math.max(8, Math.min((b == null ? void 0 : b.x) ?? Sh, window.innerWidth - qr - 8)), Gc = Math.max(8, Math.min((b == null ? void 0 : b.y) ?? _h, window.innerHeight - 80)), Nh = (f) => {
8994
8994
  if (f.button !== 0) return;
8995
8995
  f.preventDefault();
8996
8996
  const v = { x: f.clientX, y: f.clientY, left: Yc, top: Gc };
@@ -9055,12 +9055,12 @@ function od({
9055
9055
  }
9056
9056
  ),
9057
9057
  Ac && !l && /* @__PURE__ */ c("div", { style: Gi(Ac, "#7cc4f8", !0) }),
9058
- zi && rt && /* @__PURE__ */ g(Ke, { children: [
9059
- /* @__PURE__ */ c("div", { style: Gi(zi, "#9747ff", !0) }),
9058
+ Fi && rt && /* @__PURE__ */ g(Ke, { children: [
9059
+ /* @__PURE__ */ c("div", { style: Gi(Fi, "#9747ff", !0) }),
9060
9060
  /* @__PURE__ */ g(
9061
9061
  "div",
9062
9062
  {
9063
- style: { position: "absolute", left: zi.left, top: zi.top - 20, pointerEvents: "none" },
9063
+ style: { position: "absolute", left: Fi.left, top: Fi.top - 20, pointerEvents: "none" },
9064
9064
  className: "max-w-60 truncate rounded bg-[#9747ff] px-1.5 py-0.5 text-[10px] font-semibold text-white",
9065
9065
  children: [
9066
9066
  "Layout · ",
@@ -9109,15 +9109,15 @@ function od({
9109
9109
  _
9110
9110
  ))
9111
9111
  ] }),
9112
- vh && F && /* @__PURE__ */ g(Ke, { children: [
9113
- /* @__PURE__ */ c("div", { style: Gi(F, Ln ? "#f24822" : "#9747ff", !0) }),
9112
+ vh && z && /* @__PURE__ */ g(Ke, { children: [
9113
+ /* @__PURE__ */ c("div", { style: Gi(z, Ln ? "#f24822" : "#9747ff", !0) }),
9114
9114
  /* @__PURE__ */ g(
9115
9115
  "div",
9116
9116
  {
9117
9117
  style: {
9118
9118
  position: "absolute",
9119
- left: F.left,
9120
- top: F.top - 22,
9119
+ left: z.left,
9120
+ top: z.top - 22,
9121
9121
  pointerEvents: "none",
9122
9122
  zIndex: 11
9123
9123
  },
@@ -9231,56 +9231,56 @@ function od({
9231
9231
  {
9232
9232
  side: "top",
9233
9233
  value: dt.top,
9234
- left: F.left + F.width / 2,
9235
- top: F.top + Math.max(dt.top / 2, 16),
9234
+ left: z.left + z.width / 2,
9235
+ top: z.top + Math.max(dt.top / 2, 16),
9236
9236
  cursor: "ns-resize",
9237
9237
  className: "h-[18px] min-w-[26px] -translate-x-1/2 -translate-y-1/2"
9238
9238
  },
9239
9239
  {
9240
9240
  side: "right",
9241
9241
  value: dt.right,
9242
- left: F.left + F.width - Math.max(dt.right / 2, 24),
9243
- top: F.top + F.height / 2,
9242
+ left: z.left + z.width - Math.max(dt.right / 2, 24),
9243
+ top: z.top + z.height / 2,
9244
9244
  cursor: "ew-resize",
9245
9245
  className: "h-[26px] min-w-[20px] -translate-x-1/2 -translate-y-1/2"
9246
9246
  },
9247
9247
  {
9248
9248
  side: "bottom",
9249
9249
  value: dt.bottom,
9250
- left: F.left + F.width / 2,
9251
- top: F.top + F.height - Math.max(dt.bottom / 2, 16),
9250
+ left: z.left + z.width / 2,
9251
+ top: z.top + z.height - Math.max(dt.bottom / 2, 16),
9252
9252
  cursor: "ns-resize",
9253
9253
  className: "h-[18px] min-w-[26px] -translate-x-1/2 -translate-y-1/2"
9254
9254
  },
9255
9255
  {
9256
9256
  side: "left",
9257
9257
  value: dt.left,
9258
- left: F.left + Math.max(dt.left / 2, 24),
9259
- top: F.top + F.height / 2,
9258
+ left: z.left + Math.max(dt.left / 2, 24),
9259
+ top: z.top + z.height / 2,
9260
9260
  cursor: "ew-resize",
9261
9261
  className: "h-[26px] min-w-[20px] -translate-x-1/2 -translate-y-1/2"
9262
9262
  }
9263
9263
  ].map((f) => {
9264
9264
  const v = `padding-${f.side}`, _ = f.side === "top" ? {
9265
- left: F.left,
9266
- top: F.top,
9267
- width: F.width,
9265
+ left: z.left,
9266
+ top: z.top,
9267
+ width: z.width,
9268
9268
  height: Math.max(1, f.value)
9269
9269
  } : f.side === "right" ? {
9270
- left: F.left + F.width - f.value,
9271
- top: F.top,
9270
+ left: z.left + z.width - f.value,
9271
+ top: z.top,
9272
9272
  width: Math.max(1, f.value),
9273
- height: F.height
9273
+ height: z.height
9274
9274
  } : f.side === "bottom" ? {
9275
- left: F.left,
9276
- top: F.top + F.height - f.value,
9277
- width: F.width,
9275
+ left: z.left,
9276
+ top: z.top + z.height - f.value,
9277
+ width: z.width,
9278
9278
  height: Math.max(1, f.value)
9279
9279
  } : {
9280
- left: F.left,
9281
- top: F.top,
9280
+ left: z.left,
9281
+ top: z.top,
9282
9282
  width: Math.max(1, f.value),
9283
- height: F.height
9283
+ height: z.height
9284
9284
  };
9285
9285
  return /* @__PURE__ */ g("div", { children: [
9286
9286
  Ne === v && /* @__PURE__ */ c(
@@ -9364,11 +9364,11 @@ function od({
9364
9364
  type: "button",
9365
9365
  "data-case-container-width-handle": !0,
9366
9366
  "aria-label": "Container width adjustment",
9367
- title: `container width${Math.round(F.width)}px · Drag to adjust`,
9367
+ title: `container width${Math.round(z.width)}px · Drag to adjust`,
9368
9368
  style: {
9369
9369
  position: "absolute",
9370
- left: F.left + F.width - 7,
9371
- top: F.top + F.height / 2 - 22,
9370
+ left: z.left + z.width - 7,
9371
+ top: z.top + z.height / 2 - 22,
9372
9372
  zIndex: 12,
9373
9373
  cursor: "ew-resize"
9374
9374
  },
@@ -9383,11 +9383,11 @@ function od({
9383
9383
  type: "button",
9384
9384
  "data-case-container-height-handle": !0,
9385
9385
  "aria-label": "Container height adjustment",
9386
- title: `container height${Math.round(F.height)}px`,
9386
+ title: `container height${Math.round(z.height)}px`,
9387
9387
  style: {
9388
9388
  position: "absolute",
9389
- left: F.left + F.width / 2 - 22,
9390
- top: F.top + F.height - 7,
9389
+ left: z.left + z.width / 2 - 22,
9390
+ top: z.top + z.height - 7,
9391
9391
  zIndex: 12,
9392
9392
  cursor: "ns-resize"
9393
9393
  },
@@ -9402,11 +9402,11 @@ function od({
9402
9402
  type: "button",
9403
9403
  "data-case-container-corner-handle": !0,
9404
9404
  "aria-label": "Container width and height adjustment",
9405
- title: `${Math.round(F.width)} × ${Math.round(F.height)}px`,
9405
+ title: `${Math.round(z.width)} × ${Math.round(z.height)}px`,
9406
9406
  style: {
9407
9407
  position: "absolute",
9408
- left: F.left + F.width - 7,
9409
- top: F.top + F.height - 7,
9408
+ left: z.left + z.width - 7,
9409
+ top: z.top + z.height - 7,
9410
9410
  zIndex: 15,
9411
9411
  cursor: "nwse-resize"
9412
9412
  },
@@ -9440,7 +9440,7 @@ function od({
9440
9440
  /* @__PURE__ */ c("span", { className: `h-2 w-2 rounded-full ${gs ? "bg-[#0d99ff]" : "bg-[#d4d4d8]"}` })
9441
9441
  ] }),
9442
9442
  /* @__PURE__ */ c("h2", { className: "truncate text-[14px] font-semibold", children: P ? Mt : "Select a DOM element" }),
9443
- /* @__PURE__ */ c("p", { className: "mt-0.5 truncate text-[10px] text-[#71717a]", children: P ? `${zn.count || 1} matching elements · Test realistic content states` : "Click an element on the canvas to inspect it" })
9443
+ /* @__PURE__ */ c("p", { className: "mt-0.5 truncate text-[10px] text-[#71717a]", children: P ? `${Fn.count || 1} matching elements · Test realistic content states` : "Click an element on the canvas to inspect it" })
9444
9444
  ] }),
9445
9445
  /* @__PURE__ */ g("div", { className: "flex shrink-0 items-center gap-1", onMouseDown: (f) => f.stopPropagation(), children: [
9446
9446
  /* @__PURE__ */ c(
@@ -9544,7 +9544,7 @@ function od({
9544
9544
  title: "Item count",
9545
9545
  action: /* @__PURE__ */ g("span", { className: "text-[10px] text-[#71717a]", children: [
9546
9546
  "Current: ",
9547
- zn.count || 1
9547
+ Fn.count || 1
9548
9548
  ] }),
9549
9549
  children: [
9550
9550
  /* @__PURE__ */ g("div", { className: "grid grid-cols-[32px_minmax(0,1fr)_32px] gap-1", children: [
@@ -9554,8 +9554,8 @@ function od({
9554
9554
  type: "button",
9555
9555
  "aria-label": "Decrease item count",
9556
9556
  className: "h-8 rounded-md bg-[#f4f4f5] text-[16px] text-[#52525b] hover:bg-[#e9e9ee] disabled:text-[#c4c4c8]",
9557
- disabled: (S ?? (zn.count || 1)) <= 1,
9558
- onClick: () => Wi((S ?? (zn.count || 1)) - 1),
9557
+ disabled: (S ?? (Fn.count || 1)) <= 1,
9558
+ onClick: () => Wi((S ?? (Fn.count || 1)) - 1),
9559
9559
  children: "−"
9560
9560
  }
9561
9561
  ),
@@ -9569,7 +9569,7 @@ function od({
9569
9569
  inputMode: "numeric",
9570
9570
  "aria-label": "Enter item count",
9571
9571
  value: S ?? "",
9572
- placeholder: String(zn.count || 1),
9572
+ placeholder: String(Fn.count || 1),
9573
9573
  className: "h-8 w-full rounded-md bg-[#f4f4f5] px-2 pr-8 text-center text-[12px] font-semibold tabular-nums text-[#18181b] outline-none focus:ring-1 focus:ring-inset focus:ring-[#0d99ff]",
9574
9574
  onChange: (f) => Wi(f.currentTarget.value === "" ? null : Number(f.currentTarget.value))
9575
9575
  }
@@ -9582,7 +9582,7 @@ function od({
9582
9582
  type: "button",
9583
9583
  "aria-label": "Increase item count",
9584
9584
  className: "h-8 rounded-md bg-[#f4f4f5] text-[16px] text-[#52525b] hover:bg-[#e9e9ee]",
9585
- onClick: () => Wi((S ?? (zn.count || 1)) + 1),
9585
+ onClick: () => Wi((S ?? (Fn.count || 1)) + 1),
9586
9586
  children: "+"
9587
9587
  }
9588
9588
  )
@@ -9752,7 +9752,7 @@ function od({
9752
9752
  children: xr ? "Applied" : "+ add"
9753
9753
  }
9754
9754
  ) : null,
9755
- children: Z && F ? /* @__PURE__ */ g(Ke, { children: [
9755
+ children: Z && z ? /* @__PURE__ */ g(Ke, { children: [
9756
9756
  /* @__PURE__ */ g(
9757
9757
  "button",
9758
9758
  {
@@ -9851,7 +9851,7 @@ function od({
9851
9851
  so,
9852
9852
  {
9853
9853
  label: "W",
9854
- value: F.width,
9854
+ value: z.width,
9855
9855
  intent: lh,
9856
9856
  onCommit: (f) => Pe("width", `${Math.max(40, f)}px`),
9857
9857
  onIntent: (f) => Yi("container", "width", f)
@@ -9861,7 +9861,7 @@ function od({
9861
9861
  so,
9862
9862
  {
9863
9863
  label: "H",
9864
- value: F.height,
9864
+ value: z.height,
9865
9865
  intent: dh,
9866
9866
  onCommit: (f) => Pe("height", `${Math.max(40, f)}px`),
9867
9867
  onIntent: (f) => Yi("container", "height", f)
@@ -10052,7 +10052,7 @@ function od({
10052
10052
  type: "button",
10053
10053
  "aria-pressed": jc === f,
10054
10054
  className: `h-7 rounded-md text-[9px] font-semibold ${jc === f ? "bg-[#18181b] text-white" : "bg-[#f4f4f5] text-[#52525b]"}`,
10055
- onClick: () => ze("align-self", f),
10055
+ onClick: () => Fe("align-self", f),
10056
10056
  children: v
10057
10057
  },
10058
10058
  f
@@ -10064,7 +10064,7 @@ function od({
10064
10064
  label: "W",
10065
10065
  value: (K == null ? void 0 : K.width) ?? 0,
10066
10066
  intent: uh,
10067
- onCommit: (f) => ze("width", `${Math.max(1, f)}px`),
10067
+ onCommit: (f) => Fe("width", `${Math.max(1, f)}px`),
10068
10068
  onIntent: (f) => Yi("item", "width", f)
10069
10069
  }
10070
10070
  ),
@@ -10074,7 +10074,7 @@ function od({
10074
10074
  label: "H",
10075
10075
  value: (K == null ? void 0 : K.height) ?? 0,
10076
10076
  intent: fh,
10077
- onCommit: (f) => ze("height", `${Math.max(1, f)}px`),
10077
+ onCommit: (f) => Fe("height", `${Math.max(1, f)}px`),
10078
10078
  onIntent: (f) => Yi("item", "height", f)
10079
10079
  }
10080
10080
  )
@@ -10085,7 +10085,7 @@ function od({
10085
10085
  {
10086
10086
  label: "Minimum W",
10087
10087
  value: yt(it, "min-width"),
10088
- onCommit: (f) => ze("min-width", `${f}px`)
10088
+ onCommit: (f) => Fe("min-width", `${f}px`)
10089
10089
  }
10090
10090
  ),
10091
10091
  /* @__PURE__ */ c(
@@ -10093,7 +10093,7 @@ function od({
10093
10093
  {
10094
10094
  label: "Max W",
10095
10095
  value: yt(it, "max-width"),
10096
- onCommit: (f) => ze("max-width", f > 0 ? `${f}px` : "none")
10096
+ onCommit: (f) => Fe("max-width", f > 0 ? `${f}px` : "none")
10097
10097
  }
10098
10098
  ),
10099
10099
  /* @__PURE__ */ c(
@@ -10101,7 +10101,7 @@ function od({
10101
10101
  {
10102
10102
  label: "Minimum H",
10103
10103
  value: yt(it, "min-height"),
10104
- onCommit: (f) => ze("min-height", `${f}px`)
10104
+ onCommit: (f) => Fe("min-height", `${f}px`)
10105
10105
  }
10106
10106
  ),
10107
10107
  /* @__PURE__ */ c(
@@ -10109,12 +10109,12 @@ function od({
10109
10109
  {
10110
10110
  label: "max H",
10111
10111
  value: yt(it, "max-height"),
10112
- onCommit: (f) => ze("max-height", f > 0 ? `${f}px` : "none")
10112
+ onCommit: (f) => Fe("max-height", f > 0 ? `${f}px` : "none")
10113
10113
  }
10114
10114
  )
10115
10115
  ] }),
10116
10116
  /* @__PURE__ */ g("div", { className: `mt-1.5 grid gap-1 ${Me === "grid" ? "grid-cols-[1fr_2fr]" : "grid-cols-1"}`, children: [
10117
- /* @__PURE__ */ c(ut, { label: "order", value: hh, min: -999, onCommit: (f) => ze("order", `${f}`) }),
10117
+ /* @__PURE__ */ c(ut, { label: "order", value: hh, min: -999, onCommit: (f) => Fe("order", `${f}`) }),
10118
10118
  Me === "grid" && /* @__PURE__ */ g("div", { className: "grid grid-cols-5 gap-1", children: [
10119
10119
  [1, 2, 3, 4].map((f) => /* @__PURE__ */ c(
10120
10120
  "button",
@@ -10123,7 +10123,7 @@ function od({
10123
10123
  "aria-label": `Span ${f} columns`,
10124
10124
  "aria-pressed": Vc === f && Kr !== "1 / -1",
10125
10125
  className: `h-7 rounded-md text-[9px] font-semibold ${Vc === f && Kr !== "1 / -1" ? "bg-[#9747ff] text-white" : "bg-[#f4f4f5] text-[#52525b]"}`,
10126
- onClick: () => ze("grid-column", `span ${f}`),
10126
+ onClick: () => Fe("grid-column", `span ${f}`),
10127
10127
  children: f
10128
10128
  },
10129
10129
  f
@@ -10135,7 +10135,7 @@ function od({
10135
10135
  "aria-label": "Span all columns",
10136
10136
  "aria-pressed": Kr === "1 / -1",
10137
10137
  className: `h-7 rounded-md text-[9px] font-semibold ${Kr === "1 / -1" ? "bg-[#9747ff] text-white" : "bg-[#f4f4f5] text-[#52525b]"}`,
10138
- onClick: () => ze("grid-column", "1 / -1"),
10138
+ onClick: () => Fe("grid-column", "1 / -1"),
10139
10139
  children: "All"
10140
10140
  }
10141
10141
  )
@@ -10147,7 +10147,7 @@ function od({
10147
10147
  type: "button",
10148
10148
  "aria-pressed": ys,
10149
10149
  className: `mt-1.5 h-7 w-full rounded-md text-[10px] font-semibold ${ys ? "bg-[#e5f4ff] text-[#007be5]" : "bg-[#f4f4f5] text-[#52525b]"}`,
10150
- onClick: () => ze("position", ys ? "relative" : "absolute"),
10150
+ onClick: () => Fe("position", ys ? "relative" : "absolute"),
10151
10151
  children: "Detach from auto layout"
10152
10152
  }
10153
10153
  )
@@ -10313,7 +10313,7 @@ function od({
10313
10313
  }
10314
10314
  ),
10315
10315
  /* @__PURE__ */ g("div", { className: "mt-1.5 max-h-28 space-y-1 overflow-auto", children: [
10316
- Fi.map(([f, v]) => {
10316
+ zi.map(([f, v]) => {
10317
10317
  const _ = (xt == null ? void 0 : xt[0]) === f;
10318
10318
  return /* @__PURE__ */ g(
10319
10319
  "button",
@@ -10330,7 +10330,7 @@ function od({
10330
10330
  `${v.importPath}:${f}`
10331
10331
  );
10332
10332
  }),
10333
- Fi.length === 0 && /* @__PURE__ */ c("div", { className: "rounded-md bg-[#fafafa] px-2 py-3 text-center text-[9px] text-[#a1a1aa]", children: "There are no safe named imports and no registered components with default values." })
10333
+ zi.length === 0 && /* @__PURE__ */ c("div", { className: "rounded-md bg-[#fafafa] px-2 py-3 text-center text-[9px] text-[#a1a1aa]", children: "There are no safe named imports and no registered components with default values." })
10334
10334
  ] }),
10335
10335
  xt && Tc && Li && /* @__PURE__ */ g("div", { className: "mt-2 space-y-1 rounded-md bg-[#f8f8fa] p-2 font-mono text-[8px] leading-relaxed text-[#52525b]", children: [
10336
10336
  /* @__PURE__ */ g("div", { className: "break-all", children: [
@@ -10440,7 +10440,7 @@ function od({
10440
10440
  }) })
10441
10441
  }
10442
10442
  ),
10443
- C === "item" && P && Sn && Fc.length > 0 && /* @__PURE__ */ g(Ie, { title: "Component props", children: [
10443
+ C === "item" && P && Sn && zc.length > 0 && /* @__PURE__ */ g(Ie, { title: "Component props", children: [
10444
10444
  /* @__PURE__ */ g("div", { className: "mb-2 rounded-md bg-[#f4f4f5] px-2 py-1.5 text-[9px] leading-relaxed text-[#71717a]", children: [
10445
10445
  /* @__PURE__ */ g("div", { className: "truncate font-mono text-[#52525b]", children: [
10446
10446
  Sn.elementName,
@@ -10451,8 +10451,8 @@ function od({
10451
10451
  ] }),
10452
10452
  "DOM properties are previewed immediately. Component-specific props, such as variant, are confirmed in HMR after changes are applied."
10453
10453
  ] }),
10454
- /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5", children: Fc.map(([f, v]) => {
10455
- const _ = zc.find(
10454
+ /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5", children: zc.map(([f, v]) => {
10455
+ const _ = Fc.find(
10456
10456
  (X) => X.kind === "prop" && X.el === P && X.prop === f
10457
10457
  ), $ = _ ? typeof v == "boolean" ? _.to === "true" : typeof v == "number" ? Number(_.to) : _.to : v, O = nc(P, f), Y = (X) => {
10458
10458
  const pe = typeof v == "number" ? Number(X) : X;
@@ -10751,7 +10751,7 @@ function od({
10751
10751
  }
10752
10752
  ),
10753
10753
  /* @__PURE__ */ c(Ie, { title: "Saveable changes", children: ji > 0 ? /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
10754
- Fn.styles.map((f) => {
10754
+ zn.styles.map((f) => {
10755
10755
  var v, _;
10756
10756
  return /* @__PURE__ */ g(
10757
10757
  "div",
@@ -10778,7 +10778,7 @@ function od({
10778
10778
  `${f.file}-${f.className}-${((v = f.media) == null ? void 0 : v.minWidth) ?? ""}-${((_ = f.media) == null ? void 0 : _.maxWidth) ?? ""}`
10779
10779
  );
10780
10780
  }),
10781
- Fn.texts.map((f) => /* @__PURE__ */ g("div", { className: "rounded-md border border-[#e4e4e7] bg-[#fafafa] px-2.5 py-2", children: [
10781
+ zn.texts.map((f) => /* @__PURE__ */ g("div", { className: "rounded-md border border-[#e4e4e7] bg-[#fafafa] px-2.5 py-2", children: [
10782
10782
  /* @__PURE__ */ c("div", { className: "truncate text-[10px] font-semibold text-[#27272a]", children: f.componentFile }),
10783
10783
  /* @__PURE__ */ g("div", { className: "mt-1 truncate text-[10px] text-[#52525b]", children: [
10784
10784
  '"',
@@ -10793,7 +10793,7 @@ function od({
10793
10793
  ] })
10794
10794
  ] })
10795
10795
  ] }, `${f.componentFile}-${f.oldText}`)),
10796
- Fn.operations.map((f) => {
10796
+ zn.operations.map((f) => {
10797
10797
  const v = Bb(f), _ = f.scope === "instance" ? "This screen" : "Shared source", $ = f.affectedFrames.length > 0 ? f.affectedFrames.map((O) => O.name).join(", ") : "current element";
10798
10798
  return /* @__PURE__ */ g(
10799
10799
  "div",
@@ -10829,7 +10829,7 @@ function od({
10829
10829
  `${f.kind}-${f.identity.componentFile}-${f.identity.sourceStart}-${v.prop}`
10830
10830
  );
10831
10831
  }),
10832
- Fn.operations.some((f) => f.scope === "shared-source") && /* @__PURE__ */ c("p", { className: "text-[9px] leading-relaxed text-[#71717a]", children: T ? "Calculating every screen affected by the shared source." : "Affected screens are derived from the source dependency graph." })
10832
+ zn.operations.some((f) => f.scope === "shared-source") && /* @__PURE__ */ c("p", { className: "text-[9px] leading-relaxed text-[#71717a]", children: T ? "Calculating every screen affected by the shared source." : "Affected screens are derived from the source dependency graph." })
10833
10833
  ] }) : /* @__PURE__ */ c("div", { className: "text-[11px] leading-relaxed text-[#a1a1aa]", children: "No changes can be saved yet. Items that only changed the screen are identified in the final changes below." }) }),
10834
10834
  /* @__PURE__ */ c(Ie, { title: "Recent changes", children: on.length > 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5", children: [...on].reverse().map((f) => {
10835
10835
  const v = f.items.some(Zt), _ = f.items.some(($) => !Zt($));
@@ -13031,7 +13031,7 @@ function xd({
13031
13031
  )) });
13032
13032
  }
13033
13033
  const yd = ["start", "center", "end"];
13034
- function zv({ node: t }) {
13034
+ function Fv({ node: t }) {
13035
13035
  const e = t.type === "rows", n = (i, o) => p.patch(
13036
13036
  t,
13037
13037
  e ? { justify: i, alignItems: o } : { justify: o, alignItems: i }
@@ -13067,7 +13067,7 @@ function zv({ node: t }) {
13067
13067
  )
13068
13068
  ] });
13069
13069
  }
13070
- function Fv(t) {
13070
+ function zv(t) {
13071
13071
  const e = t.root.domStyle.display;
13072
13072
  if (e === "grid" || e === "inline-grid") return "grid";
13073
13073
  if (e === "block" || e === "contents") return "free";
@@ -13086,7 +13086,7 @@ function Lv({ mode: t }) {
13086
13086
  ] });
13087
13087
  }
13088
13088
  const jv = at(function({ page: e }) {
13089
- const n = e.route == null, r = (m) => p.patchPage(e.id, m), i = Fv(e), o = (m) => {
13089
+ const n = e.route == null, r = (m) => p.patchPage(e.id, m), i = zv(e), o = (m) => {
13090
13090
  const x = { ...e.root.domStyle };
13091
13091
  m === "free" ? (x.display = "block", x.position = "relative", delete x.flexDirection, delete x.gridTemplateColumns) : m === "grid" ? (x.display = "grid", x.gridTemplateColumns || (x.gridTemplateColumns = "repeat(2, minmax(0, 1fr))"), x.gap || (x.gap = `${e.root.gap}px`), delete x.flexDirection) : (x.display = "flex", x.flexDirection = m === "horizontal" ? "row" : "column", delete x.gridTemplateColumns), p.patch(e.root, {
13092
13092
  type: m === "horizontal" ? "columns" : "rows",
@@ -13482,7 +13482,7 @@ const jv = at(function({ page: e }) {
13482
13482
  onChange: (u) => n({ type: u })
13483
13483
  }
13484
13484
  ),
13485
- /* @__PURE__ */ c(zv, { node: e }),
13485
+ /* @__PURE__ */ c(Fv, { node: e }),
13486
13486
  /* @__PURE__ */ g("div", { className: "flex gap-1.5", children: [
13487
13487
  /* @__PURE__ */ c(Ve, { label: "Gap", value: e.gap, onChange: (u) => n({ gap: u }) }),
13488
13488
  /* @__PURE__ */ c(Ve, { label: "Padding", value: e.padding, onChange: (u) => n({ padding: u }) })
@@ -14017,7 +14017,7 @@ function bx(t) {
14017
14017
  );
14018
14018
  return e;
14019
14019
  }
14020
- function za(t, e = /* @__PURE__ */ new Set()) {
14020
+ function Fa(t, e = /* @__PURE__ */ new Set()) {
14021
14021
  if (t == null || typeof t == "string" || typeof t == "boolean" || typeof t == "number" && Number.isFinite(t))
14022
14022
  return t;
14023
14023
  if (typeof t != "object") return null;
@@ -14026,13 +14026,13 @@ function za(t, e = /* @__PURE__ */ new Set()) {
14026
14026
  "Preview recipe identity cannot contain circular values."
14027
14027
  );
14028
14028
  if (e.add(t), Array.isArray(t)) {
14029
- const r = t.map((i) => za(i, e));
14029
+ const r = t.map((i) => Fa(i, e));
14030
14030
  return e.delete(t), r;
14031
14031
  }
14032
14032
  const n = {};
14033
14033
  for (const r of Object.keys(t).sort()) {
14034
14034
  const i = t[r];
14035
- i !== void 0 && (n[r] = za(i, e));
14035
+ i !== void 0 && (n[r] = Fa(i, e));
14036
14036
  }
14037
14037
  return e.delete(t), n;
14038
14038
  }
@@ -14053,7 +14053,7 @@ function Mf(t) {
14053
14053
  throw new TypeError(`Duplicate preview recipe identity: ${o}`);
14054
14054
  return e.add(o), {
14055
14055
  id: o,
14056
- recipe: za(i)
14056
+ recipe: Fa(i)
14057
14057
  };
14058
14058
  });
14059
14059
  return vx(JSON.stringify(n));
@@ -14212,35 +14212,38 @@ function Nx(t) {
14212
14212
  errors: e
14213
14213
  };
14214
14214
  }
14215
- function Cx(t, e) {
14216
- const n = Ei(t) && t.version === 3 ? (() => {
14217
- const r = cs(t);
14215
+ function Cx(t, e, n = {}) {
14216
+ const r = Ei(t) && t.version === 3 ? (() => {
14217
+ const i = cs(t);
14218
14218
  return {
14219
- valid: r.valid,
14220
- artifact: r.valid ? t : null,
14221
- errors: r.errors
14219
+ valid: i.valid,
14220
+ artifact: i.valid ? t : null,
14221
+ errors: i.errors
14222
14222
  };
14223
14223
  })() : Ei(t) && t.version === 2 ? (() => {
14224
- const r = as(t);
14224
+ const i = as(t);
14225
14225
  return {
14226
- valid: r.valid,
14227
- artifact: r.valid ? t : null,
14228
- errors: r.errors
14226
+ valid: i.valid,
14227
+ artifact: i.valid ? t : null,
14228
+ errors: i.errors
14229
14229
  };
14230
14230
  })() : Nx(t);
14231
- return !n.valid || !n.artifact ? {
14231
+ return !r.valid || !r.artifact ? {
14232
14232
  valid: !1,
14233
14233
  artifact: null,
14234
14234
  reason: "invalid-bundle",
14235
- errors: n.errors
14236
- } : e && n.artifact.namespace !== vn(e.namespace) ? {
14235
+ errors: r.errors
14236
+ } : e && r.artifact.namespace !== vn(e.namespace) ? {
14237
14237
  valid: !1,
14238
14238
  artifact: null,
14239
14239
  reason: "namespace-mismatch",
14240
14240
  errors: [
14241
14241
  "Preview artifact namespace does not match the runtime namespace."
14242
14242
  ]
14243
- } : e && n.artifact.sourceRevision !== vn(e.sourceRevision) ? {
14243
+ } : e && // A per-frame answer is judged frame by frame: the bundle names the last
14244
+ // publish, not the revision every frame in it came from. Rejecting on that
14245
+ // value would undo the point of asking per frame.
14246
+ !n.perFrameIdentity && r.artifact.sourceRevision !== vn(e.sourceRevision) ? {
14244
14247
  valid: !1,
14245
14248
  artifact: null,
14246
14249
  reason: "revision-mismatch",
@@ -14249,7 +14252,7 @@ function Cx(t, e) {
14249
14252
  ]
14250
14253
  } : {
14251
14254
  valid: !0,
14252
- artifact: n.artifact,
14255
+ artifact: r.artifact,
14253
14256
  errors: []
14254
14257
  };
14255
14258
  }
@@ -14257,27 +14260,36 @@ async function gw({
14257
14260
  namespace: t,
14258
14261
  sourceRevision: e,
14259
14262
  transport: n,
14260
- signal: r
14263
+ signal: r,
14264
+ frames: i,
14265
+ generate: o
14261
14266
  }) {
14262
- const i = {
14267
+ const s = {
14263
14268
  namespace: vn(t),
14264
14269
  sourceRevision: vn(e)
14265
14270
  };
14266
- let o;
14271
+ let a;
14267
14272
  try {
14268
- o = await n({ ...i, signal: r });
14269
- } catch (a) {
14270
- if (r != null && r.aborted) throw a;
14271
- return { status: "unavailable", artifact: null, error: a };
14273
+ a = await n({
14274
+ ...s,
14275
+ signal: r,
14276
+ ...i ? { frames: i } : {},
14277
+ ...o === void 0 ? {} : { generate: o }
14278
+ });
14279
+ } catch (d) {
14280
+ if (r != null && r.aborted) throw d;
14281
+ return { status: "unavailable", artifact: null, error: d };
14272
14282
  }
14273
- if (o == null)
14283
+ if (a == null)
14274
14284
  return { status: "unavailable", artifact: null };
14275
- const s = Cx(o, i);
14276
- return s.valid ? { status: "accepted", artifact: s.artifact } : {
14285
+ const l = Cx(a, s, {
14286
+ perFrameIdentity: i != null
14287
+ });
14288
+ return l.valid ? { status: "accepted", artifact: l.artifact } : {
14277
14289
  status: "rejected",
14278
14290
  artifact: null,
14279
- reason: s.reason,
14280
- errors: s.errors
14291
+ reason: l.reason,
14292
+ errors: l.errors
14281
14293
  };
14282
14294
  }
14283
14295
  const _d = 12, If = 32, Ex = 8, Ax = 80, vc = 8 * 1024 * 1024, Ox = 64 * 1024 * 1024, Mx = 256, Px = 256 * 1024 * 1024, Ix = 2, Zs = 32, $x = 2, Ai = 2, kx = "pygmalion-instant-canvas", Ze = "route-previews", $f = "pygmalion-default";
@@ -14303,9 +14315,9 @@ let Tf = kf(), ci = 0, Nd = 0, _o = 0, Qs = !1;
14303
14315
  const kt = [], Qe = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Mn = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map(), Df = /* @__PURE__ */ new Map(), xc = /* @__PURE__ */ new Map(), Cd = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new Map(), co = /* @__PURE__ */ new Map();
14304
14316
  let lo = 0, Rx = 0, ea = !1;
14305
14317
  const No = [], Ko = /* @__PURE__ */ new Map();
14306
- let Ft = 0, rn = 0, Ir = $f, uo = null;
14307
- const fo = /* @__PURE__ */ new Map(), et = /* @__PURE__ */ new Set(), Fa = /* @__PURE__ */ new Set();
14308
- let Rf = 0, hi = 0, La = !1, zf = 0;
14318
+ let zt = 0, rn = 0, Ir = $f, uo = null;
14319
+ const fo = /* @__PURE__ */ new Map(), et = /* @__PURE__ */ new Set(), za = /* @__PURE__ */ new Set();
14320
+ let Rf = 0, hi = 0, La = !1, Ff = 0;
14309
14321
  const ja = /* @__PURE__ */ new Set();
14310
14322
  function gn() {
14311
14323
  if (hi > 0) {
@@ -14313,19 +14325,19 @@ function gn() {
14313
14325
  return;
14314
14326
  }
14315
14327
  Rf += 1;
14316
- for (const t of Fa) t();
14328
+ for (const t of za) t();
14317
14329
  }
14318
- function zx() {
14330
+ function Fx() {
14319
14331
  hi += 1;
14320
14332
  }
14321
- function Fx() {
14333
+ function zx() {
14322
14334
  hi = Math.max(
14323
14335
  0,
14324
14336
  hi - 1
14325
14337
  ), !(hi > 0 || !La) && (La = !1, gn());
14326
14338
  }
14327
14339
  function Lx(t) {
14328
- return Fa.add(t), () => Fa.delete(t);
14340
+ return za.add(t), () => za.delete(t);
14329
14341
  }
14330
14342
  function Ed() {
14331
14343
  return Rf;
@@ -14333,26 +14345,26 @@ function Ed() {
14333
14345
  function jx() {
14334
14346
  return ci;
14335
14347
  }
14336
- function Ff(t) {
14348
+ function zf(t) {
14337
14349
  return Qe.has(t) || tt.has(t) || Vt.has(t);
14338
14350
  }
14339
14351
  function Vx(t) {
14340
14352
  return Mn.get(t) ?? null;
14341
14353
  }
14342
14354
  function Ad() {
14343
- return zf;
14355
+ return Ff;
14344
14356
  }
14345
14357
  function Bx(t) {
14346
14358
  return ja.add(t), () => ja.delete(t);
14347
14359
  }
14348
14360
  function Lf() {
14349
- zf += 1;
14361
+ Ff += 1;
14350
14362
  for (const t of ja) t();
14351
14363
  }
14352
14364
  function Od(t) {
14353
14365
  return Qe.has(t) || tt.has(t) || Vt.has(t) || et.has(t);
14354
14366
  }
14355
- function Fr(t) {
14367
+ function zr(t) {
14356
14368
  const e = t == null ? void 0 : t.trim();
14357
14369
  return e && e.length <= 512 ? e : $f;
14358
14370
  }
@@ -14384,7 +14396,7 @@ function Hx(t, e) {
14384
14396
  ]));
14385
14397
  }
14386
14398
  function jf(t) {
14387
- const e = Fr(t.namespace ?? Ir), n = Va({
14399
+ const e = zr(t.namespace ?? Ir), n = Va({
14388
14400
  version: Ai,
14389
14401
  previewRevision: t.previewRevision ?? "",
14390
14402
  route: t.route,
@@ -14488,10 +14500,10 @@ function wc(t) {
14488
14500
  function Uo(t) {
14489
14501
  const e = tt.get(t);
14490
14502
  if (!e) return !1;
14491
- tt.delete(t), Ft = Math.max(0, Ft - e.ownBytes);
14503
+ tt.delete(t), zt = Math.max(0, zt - e.ownBytes);
14492
14504
  for (const n of e.head) {
14493
14505
  const r = wc(n.kind), i = r.get(n.key);
14494
- i && (i.references -= 1, !(i.references > 0) && (r.delete(n.key), Ft = Math.max(0, Ft - i.bytes)));
14506
+ i && (i.references -= 1, !(i.references > 0) && (r.delete(n.key), zt = Math.max(0, zt - i.bytes)));
14495
14507
  }
14496
14508
  return !0;
14497
14509
  }
@@ -14537,7 +14549,7 @@ function Gx(t, e, n, r) {
14537
14549
  h.references += 1;
14538
14550
  else {
14539
14551
  const m = l.length * 2;
14540
- d.set(u, { content: l, bytes: m, references: 1 }), Ft += m;
14552
+ d.set(u, { content: l, bytes: m, references: 1 }), zt += m;
14541
14553
  }
14542
14554
  return { kind: a, key: u };
14543
14555
  }), s = (i.body.length + i.document.doctype.length + i.document.htmlAttributes.length + i.document.headAttributes.length + i.document.bodyAttributes.length + o.reduce((a, l) => a + l.key.length, 0)) * 2;
@@ -14549,7 +14561,7 @@ function Gx(t, e, n, r) {
14549
14561
  head: o,
14550
14562
  body: i.body,
14551
14563
  shadow: null
14552
- }), Ft += s, !0;
14564
+ }), zt += s, !0;
14553
14565
  }
14554
14566
  function Xx(t, e) {
14555
14567
  let n = Cd.get(t);
@@ -14624,7 +14636,7 @@ function Zx(t) {
14624
14636
  }
14625
14637
  function vw(t, e) {
14626
14638
  var m;
14627
- const n = Fr(e.namespace), r = (t == null ? void 0 : t.version) === 2 ? as(t) : null, i = (t == null ? void 0 : t.version) === 3 ? cs(t) : null;
14639
+ const n = zr(e.namespace), r = (t == null ? void 0 : t.version) === 2 ? as(t) : null, i = (t == null ? void 0 : t.version) === 3 ? cs(t) : null;
14628
14640
  if (!t || t.version !== 1 && t.version !== 2 && t.version !== 3 || typeof t.namespace != "string" || !t.namespace.trim() || t.namespace !== t.namespace.trim() || t.sourceRevision != null && (typeof t.sourceRevision != "string" || !t.sourceRevision.trim() || t.sourceRevision !== t.sourceRevision.trim()) || t.version === 1 && (!t.snapshots || typeof t.snapshots != "object" || Array.isArray(t.snapshots)) || t.version === 2 && !(r != null && r.valid) || t.version === 3 && !(i != null && i.valid))
14629
14641
  return { accepted: 0, rejected: 0, reason: "invalid-bundle" };
14630
14642
  const o = t.namespace !== n;
@@ -14695,7 +14707,7 @@ function vw(t, e) {
14695
14707
  d += 1;
14696
14708
  continue;
14697
14709
  }
14698
- if (Ff(w) && ((m = Mn.get(w)) == null ? void 0 : m.stale) !== !0) continue;
14710
+ if (zf(w) && ((m = Mn.get(w)) == null ? void 0 : m.stale) !== !0) continue;
14699
14711
  if (t.version === 2) {
14700
14712
  if (!t.frames[b]) continue;
14701
14713
  const A = ta(e.appOrigin, x.route);
@@ -14742,13 +14754,13 @@ function $r(t) {
14742
14754
  const n = t.indexOf(":", e.length);
14743
14755
  if (n < 0) return Ir;
14744
14756
  try {
14745
- return Fr(decodeURIComponent(t.slice(e.length, n)));
14757
+ return zr(decodeURIComponent(t.slice(e.length, n)));
14746
14758
  } catch {
14747
14759
  return Ir;
14748
14760
  }
14749
14761
  }
14750
14762
  function xw(t) {
14751
- Ir = Fr(t);
14763
+ Ir = zr(t);
14752
14764
  }
14753
14765
  function Bf() {
14754
14766
  return Ir;
@@ -14988,18 +15000,18 @@ function Sc(t, e, n = $r(t), r = Date.now()) {
14988
15000
  return !1;
14989
15001
  Vt.delete(t), Uo(t);
14990
15002
  const o = Qe.get(t);
14991
- o && (Ft -= o.bytes, Qe.delete(t));
14992
- const s = Fr(n);
15003
+ o && (zt -= o.bytes, Qe.delete(t));
15004
+ const s = zr(n);
14993
15005
  for (Gx(t, e, s, r) || (Qe.set(t, {
14994
15006
  bytes: i,
14995
15007
  value: e,
14996
15008
  namespace: s,
14997
15009
  lastAccess: r
14998
- }), Ft += i); Qe.size + tt.size > Ax || Ft > Ox; ) {
15010
+ }), zt += i); Qe.size + tt.size > Ax || zt > Ox; ) {
14999
15011
  const d = Qe.keys().next().value, u = tt.keys().next().value, h = d ? ((a = Qe.get(d)) == null ? void 0 : a.lastAccess) ?? Number.POSITIVE_INFINITY : Number.POSITIVE_INFINITY, m = u ? ((l = tt.get(u)) == null ? void 0 : l.lastAccess) ?? Number.POSITIVE_INFINITY : Number.POSITIVE_INFINITY, x = h <= m ? d : u;
15000
15012
  if (!x) break;
15001
15013
  const b = Qe.get(x);
15002
- b ? (Ft -= b.bytes, Qe.delete(x)) : Uo(x), et.delete(x);
15014
+ b ? (zt -= b.bytes, Qe.delete(x)) : Uo(x), et.delete(x);
15003
15015
  }
15004
15016
  return gn(), et.add(t), !0;
15005
15017
  }
@@ -15129,7 +15141,7 @@ async function cy(t) {
15129
15141
  ), m && gn();
15130
15142
  }
15131
15143
  }
15132
- zx();
15144
+ Fx();
15133
15145
  try {
15134
15146
  await Promise.all(
15135
15147
  Array.from(
@@ -15138,17 +15150,17 @@ async function cy(t) {
15138
15150
  )
15139
15151
  );
15140
15152
  } finally {
15141
- Fx();
15153
+ zx();
15142
15154
  }
15143
15155
  return n;
15144
15156
  }
15145
15157
  function ww(t) {
15146
- const e = t ? Fr(t) : null;
15158
+ const e = t ? zr(t) : null;
15147
15159
  if (!e)
15148
- Qe.clear(), tt.clear(), Df.clear(), xc.clear(), Vt.clear(), Mn.clear(), Ft = 0;
15160
+ Qe.clear(), tt.clear(), Df.clear(), xc.clear(), Vt.clear(), Mn.clear(), zt = 0;
15149
15161
  else {
15150
15162
  for (const [r, i] of Qe)
15151
- i.namespace === e && (Qe.delete(r), Ft -= i.bytes);
15163
+ i.namespace === e && (Qe.delete(r), zt -= i.bytes);
15152
15164
  for (const [r, i] of [...tt])
15153
15165
  i.namespace === e && Uo(r);
15154
15166
  for (const r of Vt.keys())
@@ -16295,16 +16307,16 @@ function Iy({
16295
16307
  });
16296
16308
  continue;
16297
16309
  }
16298
- const ve = ((ne = E.defaultView) == null ? void 0 : ne.Node.TEXT_NODE) ?? 3, Fe = [...Q.childNodes].filter(
16310
+ const ve = ((ne = E.defaultView) == null ? void 0 : ne.Node.TEXT_NODE) ?? 3, ze = [...Q.childNodes].filter(
16299
16311
  (se) => {
16300
16312
  var De;
16301
16313
  return se.nodeType === ve && !!((De = se.textContent) != null && De.trim());
16302
16314
  }
16303
16315
  )[G.textNodeOrdinal];
16304
- if (!Fe) continue;
16305
- const Oe = Fe.textContent;
16306
- Fe.textContent = G.text, V.push(() => {
16307
- Fe.textContent = Oe;
16316
+ if (!ze) continue;
16317
+ const Oe = ze.textContent;
16318
+ ze.textContent = G.text, V.push(() => {
16319
+ ze.textContent = Oe;
16308
16320
  });
16309
16321
  }
16310
16322
  }
@@ -16498,16 +16510,16 @@ const Ty = at(function({
16498
16510
  for (const ve of Q)
16499
16511
  if (ve)
16500
16512
  for (const re of ve.elements) {
16501
- const Fe = de.createElement("pygmalion-static-component");
16502
- Fe.setAttribute(
16513
+ const ze = de.createElement("pygmalion-static-component");
16514
+ ze.setAttribute(
16503
16515
  "data-pygmalion-shadow-component",
16504
16516
  ve.mutation.key
16505
- ), Fe.style.display = "contents";
16517
+ ), ze.style.display = "contents";
16506
16518
  const Oe = de.createElement("template");
16507
- Oe.innerHTML = ve.markup, Fe.append(Oe.content.cloneNode(!0));
16519
+ Oe.innerHTML = ve.markup, ze.append(Oe.content.cloneNode(!0));
16508
16520
  const se = re.hasAttribute("hidden");
16509
- re.before(Fe), re.setAttribute("hidden", ""), te.push(() => {
16510
- Fe.remove(), re.toggleAttribute("hidden", se);
16521
+ re.before(ze), re.setAttribute("hidden", ""), te.push(() => {
16522
+ ze.remove(), re.toggleAttribute("hidden", se);
16511
16523
  });
16512
16524
  }
16513
16525
  Ne();
@@ -16622,9 +16634,9 @@ const Ty = at(function({
16622
16634
  Ad,
16623
16635
  Ad
16624
16636
  );
16625
- const ve = oi(ne), re = Vx(ne), [Fe, Oe] = W(
16637
+ const ve = oi(ne), re = Vx(ne), [ze, Oe] = W(
16626
16638
  () => ve ? null : hn(ne)
16627
- ), [se, De] = W(!1), [Re, M] = W(!1), [oe, J] = W(null), [me, T] = W(0), [he, ae] = W([]), H = Fe ?? (o && !ve ? hn(ne) : null), ie = ve != null || H != null || (re == null ? void 0 : re.screenshot) != null, ge = n, be = mo(() => !r || e.route == null || !e.layersImported ? null : G === ne && H != null ? H : hn(G) ?? H, [
16639
+ ), [se, De] = W(!1), [Re, M] = W(!1), [oe, J] = W(null), [me, T] = W(0), [he, ae] = W([]), H = ze ?? (o && !ve ? hn(ne) : null), ie = ve != null || H != null || (re == null ? void 0 : re.screenshot) != null, ge = n, be = mo(() => !r || e.route == null || !e.layersImported ? null : G === ne && H != null ? H : hn(G) ?? H, [
16628
16640
  G,
16629
16641
  o,
16630
16642
  H,
@@ -17315,10 +17327,10 @@ const Ty = at(function({
17315
17327
  };
17316
17328
  }, [d]);
17317
17329
  const m = u === d, x = a.filter(
17318
- (M) => Ff(M)
17330
+ (M) => zf(M)
17319
17331
  ).length, b = a.length, w = m && x === b, [S, N] = W(!1), [y, A] = W(null), [E, B] = W("layers"), [C, R] = W("story"), [V, te] = W(null), L = Object.keys(we()), de = p.canAddFrame, Ne = (M) => {
17320
17332
  p.setTool(M), te(null);
17321
- }, [ne, G] = W(!0), [fe, Q] = W(!0), [ve, re] = W(240), [Fe, Oe] = W(240), se = ce(!1), De = (M) => {
17333
+ }, [ne, G] = W(!0), [fe, Q] = W(!0), [ve, re] = W(240), [ze, Oe] = W(240), se = ce(!1), De = (M) => {
17322
17334
  const oe = p.pages.find((T) => T.id === M), J = e.current;
17323
17335
  if (!oe || !J) {
17324
17336
  p.selectFrame(M);
@@ -17335,7 +17347,7 @@ const Ty = at(function({
17335
17347
  width: J.clientWidth,
17336
17348
  height: J.clientHeight,
17337
17349
  insetLeft: ne ? ve + 24 : 12,
17338
- insetRight: fe ? Fe + 24 : 12,
17350
+ insetRight: fe ? ze + 24 : 12,
17339
17351
  insetTop: 12,
17340
17352
  insetBottom: 64
17341
17353
  }
@@ -17550,7 +17562,7 @@ const Ty = at(function({
17550
17562
  }, [fe]);
17551
17563
  const Re = (M) => (oe) => {
17552
17564
  oe.preventDefault();
17553
- const J = oe.clientX, me = M === "left" ? ve : Fe, T = (ae) => {
17565
+ const J = oe.clientX, me = M === "left" ? ve : ze, T = (ae) => {
17554
17566
  const H = M === "left" ? ae.clientX - J : J - ae.clientX, ie = Math.max(180, Math.min(480, me + H));
17555
17567
  M === "left" ? re(ie) : Oe(ie);
17556
17568
  }, he = () => {
@@ -17810,7 +17822,7 @@ const Ty = at(function({
17810
17822
  ]
17811
17823
  }
17812
17824
  ),
17813
- fe ? /* @__PURE__ */ g("aside", { className: `${kd} bottom-3 right-3 top-3`, style: { width: Fe }, children: [
17825
+ fe ? /* @__PURE__ */ g("aside", { className: `${kd} bottom-3 right-3 top-3`, style: { width: ze }, children: [
17814
17826
  /* @__PURE__ */ g("div", { className: "flex h-11 items-center border-b border-[#e6e6e6] px-2", children: [
17815
17827
  /* @__PURE__ */ c(
17816
17828
  "button",