gp-designer 1.0.11 → 1.0.12

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Ge, computed as Ke, openBlock as B, createElementBlock as V, normalizeClass as Ci, ref as z, watch as ot, createElementVNode as S, withModifiers as re, Fragment as Ht, renderList as js, createBlock as xt, createCommentVNode as K, mergeProps as zs, toDisplayString as we, resolveComponent as Pu, resolveDynamicComponent as ku, withCtx as Ks, createTextVNode as wu, unref as Ae, createVNode as lt, Transition as Bu, renderSlot as Uu, reactive as Fu, createApp as Hu, h as Ji, withDirectives as st, vModelSelect as Yu, vModelText as pt, normalizeStyle as qu } from "vue";
1
+ import { defineComponent as Ge, computed as Ke, openBlock as B, createElementBlock as V, normalizeClass as Ii, ref as z, watch as ot, createElementVNode as S, withModifiers as ce, Fragment as Ht, renderList as js, createBlock as xt, createCommentVNode as K, mergeProps as zs, toDisplayString as we, resolveComponent as Pu, resolveDynamicComponent as ku, withCtx as Ks, createTextVNode as wu, unref as Ne, createVNode as lt, Transition as Bu, renderSlot as Uu, reactive as Fu, createApp as Hu, h as Ji, withDirectives as st, vModelSelect as Yu, vModelText as pt, normalizeStyle as qu } from "vue";
2
2
  var j;
3
3
  (function(e) {
4
4
  e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
@@ -52,7 +52,7 @@ let Zs = class {
52
52
  return zt(this, t);
53
53
  }
54
54
  };
55
- class Ii extends Zs {
55
+ class Ci extends Zs {
56
56
  /**
57
57
  * @param data The content of the data node
58
58
  */
@@ -70,7 +70,7 @@ class Ii extends Zs {
70
70
  this.data = t;
71
71
  }
72
72
  }
73
- class jt extends Ii {
73
+ class jt extends Ci {
74
74
  constructor() {
75
75
  super(...arguments), this.type = j.Text;
76
76
  }
@@ -78,7 +78,7 @@ class jt extends Ii {
78
78
  return 3;
79
79
  }
80
80
  }
81
- class Si extends Ii {
81
+ class Si extends Ci {
82
82
  constructor() {
83
83
  super(...arguments), this.type = j.Comment;
84
84
  }
@@ -86,7 +86,7 @@ class Si extends Ii {
86
86
  return 8;
87
87
  }
88
88
  }
89
- class xi extends Ii {
89
+ class xi extends Ci {
90
90
  constructor(t, a) {
91
91
  super(a), this.name = t, this.type = j.Directive;
92
92
  }
@@ -191,7 +191,7 @@ function ei(e) {
191
191
  function at(e) {
192
192
  return e.type === j.Root;
193
193
  }
194
- function me(e) {
194
+ function Te(e) {
195
195
  return Object.prototype.hasOwnProperty.call(e, "children");
196
196
  }
197
197
  function zt(e, t = !1) {
@@ -350,42 +350,42 @@ function tr(e) {
350
350
  var t;
351
351
  return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = er.get(e)) !== null && t !== void 0 ? t : e;
352
352
  }
353
- var Ee;
353
+ var me;
354
354
  (function(e) {
355
355
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
356
- })(Ee || (Ee = {}));
356
+ })(me || (me = {}));
357
357
  const ar = 32;
358
358
  var Ze;
359
359
  (function(e) {
360
360
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
361
361
  })(Ze || (Ze = {}));
362
362
  function ai(e) {
363
- return e >= Ee.ZERO && e <= Ee.NINE;
363
+ return e >= me.ZERO && e <= me.NINE;
364
364
  }
365
365
  function ir(e) {
366
- return e >= Ee.UPPER_A && e <= Ee.UPPER_F || e >= Ee.LOWER_A && e <= Ee.LOWER_F;
366
+ return e >= me.UPPER_A && e <= me.UPPER_F || e >= me.LOWER_A && e <= me.LOWER_F;
367
367
  }
368
368
  function sr(e) {
369
- return e >= Ee.UPPER_A && e <= Ee.UPPER_Z || e >= Ee.LOWER_A && e <= Ee.LOWER_Z || ai(e);
369
+ return e >= me.UPPER_A && e <= me.UPPER_Z || e >= me.LOWER_A && e <= me.LOWER_Z || ai(e);
370
370
  }
371
371
  function nr(e) {
372
- return e === Ee.EQUALS || sr(e);
372
+ return e === me.EQUALS || sr(e);
373
373
  }
374
- var he;
374
+ var fe;
375
375
  (function(e) {
376
376
  e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
377
- })(he || (he = {}));
377
+ })(fe || (fe = {}));
378
378
  var Pe;
379
379
  (function(e) {
380
380
  e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
381
381
  })(Pe || (Pe = {}));
382
- class Ri {
382
+ class vi {
383
383
  constructor(t, a, i) {
384
- this.decodeTree = t, this.emitCodePoint = a, this.errors = i, this.state = he.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Pe.Strict;
384
+ this.decodeTree = t, this.emitCodePoint = a, this.errors = i, this.state = fe.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Pe.Strict;
385
385
  }
386
386
  /** Resets the instance to make it reusable. */
387
387
  startEntity(t) {
388
- this.decodeMode = t, this.state = he.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
388
+ this.decodeMode = t, this.state = fe.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
389
389
  }
390
390
  /**
391
391
  * Write an entity to the decoder. This can be called multiple times with partial entities.
@@ -400,15 +400,15 @@ class Ri {
400
400
  */
401
401
  write(t, a) {
402
402
  switch (this.state) {
403
- case he.EntityStart:
404
- return t.charCodeAt(a) === Ee.NUM ? (this.state = he.NumericStart, this.consumed += 1, this.stateNumericStart(t, a + 1)) : (this.state = he.NamedEntity, this.stateNamedEntity(t, a));
405
- case he.NumericStart:
403
+ case fe.EntityStart:
404
+ return t.charCodeAt(a) === me.NUM ? (this.state = fe.NumericStart, this.consumed += 1, this.stateNumericStart(t, a + 1)) : (this.state = fe.NamedEntity, this.stateNamedEntity(t, a));
405
+ case fe.NumericStart:
406
406
  return this.stateNumericStart(t, a);
407
- case he.NumericDecimal:
407
+ case fe.NumericDecimal:
408
408
  return this.stateNumericDecimal(t, a);
409
- case he.NumericHex:
409
+ case fe.NumericHex:
410
410
  return this.stateNumericHex(t, a);
411
- case he.NamedEntity:
411
+ case fe.NamedEntity:
412
412
  return this.stateNamedEntity(t, a);
413
413
  }
414
414
  }
@@ -422,7 +422,7 @@ class Ri {
422
422
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
423
423
  */
424
424
  stateNumericStart(t, a) {
425
- return a >= t.length ? -1 : (t.charCodeAt(a) | ar) === Ee.LOWER_X ? (this.state = he.NumericHex, this.consumed += 1, this.stateNumericHex(t, a + 1)) : (this.state = he.NumericDecimal, this.stateNumericDecimal(t, a));
425
+ return a >= t.length ? -1 : (t.charCodeAt(a) | ar) === me.LOWER_X ? (this.state = fe.NumericHex, this.consumed += 1, this.stateNumericHex(t, a + 1)) : (this.state = fe.NumericDecimal, this.stateNumericDecimal(t, a));
426
426
  }
427
427
  addToNumericResult(t, a, i, s) {
428
428
  if (a !== i) {
@@ -487,11 +487,11 @@ class Ri {
487
487
  var i;
488
488
  if (this.consumed <= a)
489
489
  return (i = this.errors) === null || i === void 0 || i.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
490
- if (t === Ee.SEMI)
490
+ if (t === me.SEMI)
491
491
  this.consumed += 1;
492
492
  else if (this.decodeMode === Pe.Strict)
493
493
  return 0;
494
- return this.emitCodePoint(tr(this.result), this.consumed), this.errors && (t !== Ee.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
494
+ return this.emitCodePoint(tr(this.result), this.consumed), this.errors && (t !== me.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
495
495
  }
496
496
  /**
497
497
  * Parses a named entity.
@@ -513,7 +513,7 @@ class Ri {
513
513
  (u === 0 || // And there should be no invalid characters.
514
514
  nr(r)) ? 0 : this.emitNotTerminatedNamedEntity();
515
515
  if (s = i[this.treeIndex], u = (s & Ze.VALUE_LENGTH) >> 14, u !== 0) {
516
- if (r === Ee.SEMI)
516
+ if (r === me.SEMI)
517
517
  return this.emitNamedEntityData(this.treeIndex, u, this.consumed + this.excess);
518
518
  this.decodeMode !== Pe.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
519
519
  }
@@ -553,22 +553,22 @@ class Ri {
553
553
  end() {
554
554
  var t;
555
555
  switch (this.state) {
556
- case he.NamedEntity:
556
+ case fe.NamedEntity:
557
557
  return this.result !== 0 && (this.decodeMode !== Pe.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
558
- case he.NumericDecimal:
558
+ case fe.NumericDecimal:
559
559
  return this.emitNumericEntity(0, 2);
560
- case he.NumericHex:
560
+ case fe.NumericHex:
561
561
  return this.emitNumericEntity(0, 3);
562
- case he.NumericStart:
562
+ case fe.NumericStart:
563
563
  return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
564
- case he.EntityStart:
564
+ case fe.EntityStart:
565
565
  return 0;
566
566
  }
567
567
  }
568
568
  }
569
569
  function tn(e) {
570
570
  let t = "";
571
- const a = new Ri(e, (i) => t += ti(i));
571
+ const a = new vi(e, (i) => t += ti(i));
572
572
  return function(s, u) {
573
573
  let r = 0, o = 0;
574
574
  for (; (o = s.indexOf("&", o)) >= 0; ) {
@@ -791,7 +791,7 @@ const as = /* @__PURE__ */ new Set([
791
791
  "track",
792
792
  "wbr"
793
793
  ]);
794
- function Ra(e, t = {}) {
794
+ function va(e, t = {}) {
795
795
  const a = "length" in e ? e : [e];
796
796
  let i = "";
797
797
  for (let s = 0; s < a.length; s++)
@@ -801,7 +801,7 @@ function Ra(e, t = {}) {
801
801
  function Er(e, t) {
802
802
  switch (e.type) {
803
803
  case Wu:
804
- return Ra(e.children, t);
804
+ return va(e.children, t);
805
805
  case Zu:
806
806
  case Xu:
807
807
  return br(e);
@@ -839,7 +839,7 @@ function pr(e, t) {
839
839
  ) : (
840
840
  // User explicitly asked for self-closing tags, even in HTML mode
841
841
  t.selfClosingTags && as.has(e.name)
842
- )) ? (t.xmlMode || (i += " "), i += "/>") : (i += ">", e.children.length > 0 && (i += Ra(e.children, t)), (t.xmlMode || !as.has(e.name)) && (i += `</${e.name}>`)), i;
842
+ )) ? (t.xmlMode || (i += " "), i += "/>") : (i += ">", e.children.length > 0 && (i += va(e.children, t)), (t.xmlMode || !as.has(e.name)) && (i += `</${e.name}>`)), i;
843
843
  }
844
844
  function br(e) {
845
845
  return `<${e.data}>`;
@@ -856,23 +856,23 @@ function Ar(e) {
856
856
  return `<!--${e.data}-->`;
857
857
  }
858
858
  function rn(e, t) {
859
- return Ra(e, t);
859
+ return va(e, t);
860
860
  }
861
861
  function Nr(e, t) {
862
- return me(e) ? e.children.map((a) => rn(a, t)).join("") : "";
862
+ return Te(e) ? e.children.map((a) => rn(a, t)).join("") : "";
863
863
  }
864
864
  function Ea(e) {
865
865
  return Array.isArray(e) ? e.map(Ea).join("") : k(e) ? e.name === "br" ? `
866
866
  ` : Ea(e.children) : Da(e) ? Ea(e.children) : He(e) ? e.data : "";
867
867
  }
868
868
  function Ot(e) {
869
- return Array.isArray(e) ? e.map(Ot).join("") : me(e) && !La(e) ? Ot(e.children) : He(e) ? e.data : "";
869
+ return Array.isArray(e) ? e.map(Ot).join("") : Te(e) && !La(e) ? Ot(e.children) : He(e) ? e.data : "";
870
870
  }
871
871
  function Ta(e) {
872
- return Array.isArray(e) ? e.map(Ta).join("") : me(e) && (e.type === j.Tag || Da(e)) ? Ta(e.children) : He(e) ? e.data : "";
872
+ return Array.isArray(e) ? e.map(Ta).join("") : Te(e) && (e.type === j.Tag || Da(e)) ? Ta(e.children) : He(e) ? e.data : "";
873
873
  }
874
- function va(e) {
875
- return me(e) ? e.children : [];
874
+ function Ra(e) {
875
+ return Te(e) ? e.children : [];
876
876
  }
877
877
  function on(e) {
878
878
  return e.parent || null;
@@ -880,7 +880,7 @@ function on(e) {
880
880
  function cn(e) {
881
881
  const t = on(e);
882
882
  if (t != null)
883
- return va(t);
883
+ return Ra(t);
884
884
  const a = [e];
885
885
  let { prev: i, next: s } = e;
886
886
  for (; i != null; )
@@ -889,17 +889,17 @@ function cn(e) {
889
889
  a.push(s), { next: s } = s;
890
890
  return a;
891
891
  }
892
- function Cr(e, t) {
892
+ function Ir(e, t) {
893
893
  var a;
894
894
  return (a = e.attribs) === null || a === void 0 ? void 0 : a[t];
895
895
  }
896
- function Ir(e, t) {
896
+ function Cr(e, t) {
897
897
  return e.attribs != null && Object.prototype.hasOwnProperty.call(e.attribs, t) && e.attribs[t] != null;
898
898
  }
899
899
  function Sr(e) {
900
900
  return e.name;
901
901
  }
902
- function vi(e) {
902
+ function Ri(e) {
903
903
  let { next: t } = e;
904
904
  for (; t !== null && !k(t); )
905
905
  ({ next: t } = t);
@@ -953,7 +953,7 @@ function Lr(e, t) {
953
953
  } else
954
954
  t.next = null;
955
955
  }
956
- function Rr(e, t) {
956
+ function vr(e, t) {
957
957
  mt(t);
958
958
  const { parent: a } = e;
959
959
  if (a) {
@@ -977,10 +977,10 @@ function Mi(e, t, a, i) {
977
977
  const o = u[0][r[0]++];
978
978
  if (e(o) && (s.push(o), --i <= 0))
979
979
  return s;
980
- a && me(o) && o.children.length > 0 && (r.unshift(0), u.unshift(o.children));
980
+ a && Te(o) && o.children.length > 0 && (r.unshift(0), u.unshift(o.children));
981
981
  }
982
982
  }
983
- function vr(e, t) {
983
+ function Rr(e, t) {
984
984
  return t.find(e);
985
985
  }
986
986
  function Pi(e, t, a = !0) {
@@ -1074,10 +1074,10 @@ function fn(e, t) {
1074
1074
  const a = [], i = [];
1075
1075
  if (e === t)
1076
1076
  return 0;
1077
- let s = me(e) ? e : e.parent;
1077
+ let s = Te(e) ? e : e.parent;
1078
1078
  for (; s; )
1079
1079
  a.unshift(s), s = s.parent;
1080
- for (s = me(t) ? t : t.parent; s; )
1080
+ for (s = Te(t) ? t : t.parent; s; )
1081
1081
  i.unshift(s), s = s.parent;
1082
1082
  const u = Math.min(a.length, i.length);
1083
1083
  let r = 0;
@@ -1088,7 +1088,7 @@ function fn(e, t) {
1088
1088
  const o = a[r - 1], c = o.children, h = a[r], f = i[r];
1089
1089
  return c.indexOf(h) > c.indexOf(f) ? o === t ? Me.FOLLOWING | Me.CONTAINED_BY : Me.FOLLOWING : o === e ? Me.PRECEDING | Me.CONTAINS : Me.PRECEDING;
1090
1090
  }
1091
- function Rt(e) {
1091
+ function vt(e) {
1092
1092
  return e = e.filter((t, a, i) => !i.includes(t, a + 1)), e.sort((t, a) => {
1093
1093
  const i = fn(t, a);
1094
1094
  return i & Me.PRECEDING ? -1 : i & Me.FOLLOWING ? 1 : 0;
@@ -1105,7 +1105,7 @@ function Hr(e) {
1105
1105
  items: Lt("entry", a).map((r) => {
1106
1106
  var o;
1107
1107
  const { children: c } = r, h = { media: En(c) };
1108
- Se(h, "id", "id", c), Se(h, "title", "title", c);
1108
+ xe(h, "id", "id", c), xe(h, "title", "title", c);
1109
1109
  const f = (o = ba("link", c)) === null || o === void 0 ? void 0 : o.attribs.href;
1110
1110
  f && (h.link = f);
1111
1111
  const m = Je("summary", c) || Je("content", c);
@@ -1114,11 +1114,11 @@ function Hr(e) {
1114
1114
  return T && (h.pubDate = new Date(T)), h;
1115
1115
  })
1116
1116
  };
1117
- Se(i, "id", "id", a), Se(i, "title", "title", a);
1117
+ xe(i, "id", "id", a), xe(i, "title", "title", a);
1118
1118
  const s = (t = ba("link", a)) === null || t === void 0 ? void 0 : t.attribs.href;
1119
- s && (i.link = s), Se(i, "description", "subtitle", a);
1119
+ s && (i.link = s), xe(i, "description", "subtitle", a);
1120
1120
  const u = Je("updated", a);
1121
- return u && (i.updated = new Date(u)), Se(i, "author", "email", a, !0), i;
1121
+ return u && (i.updated = new Date(u)), xe(i, "author", "email", a, !0), i;
1122
1122
  }
1123
1123
  function Yr(e) {
1124
1124
  var t, a;
@@ -1127,14 +1127,14 @@ function Yr(e) {
1127
1127
  id: "",
1128
1128
  items: Lt("item", e.children).map((r) => {
1129
1129
  const { children: o } = r, c = { media: En(o) };
1130
- Se(c, "id", "guid", o), Se(c, "title", "title", o), Se(c, "link", "link", o), Se(c, "description", "description", o);
1130
+ xe(c, "id", "guid", o), xe(c, "title", "title", o), xe(c, "link", "link", o), xe(c, "description", "description", o);
1131
1131
  const h = Je("pubDate", o) || Je("dc:date", o);
1132
1132
  return h && (c.pubDate = new Date(h)), c;
1133
1133
  })
1134
1134
  };
1135
- Se(s, "title", "title", i), Se(s, "link", "link", i), Se(s, "description", "description", i);
1135
+ xe(s, "title", "title", i), xe(s, "link", "link", i), xe(s, "description", "description", i);
1136
1136
  const u = Je("lastBuildDate", i);
1137
- return u && (s.updated = new Date(u)), Se(s, "author", "managingEditor", i, !0), s;
1137
+ return u && (s.updated = new Date(u)), xe(s, "author", "managingEditor", i, !0), s;
1138
1138
  }
1139
1139
  const qr = ["url", "type", "lang"], Vr = [
1140
1140
  "fileSize",
@@ -1165,7 +1165,7 @@ function ba(e, t) {
1165
1165
  function Je(e, t, a = !1) {
1166
1166
  return Ot(Lt(e, t, a, 1)).trim();
1167
1167
  }
1168
- function Se(e, t, a, i, s = !1) {
1168
+ function xe(e, t, a, i, s = !1) {
1169
1169
  const u = Je(a, i, s);
1170
1170
  u && (e[t] = u);
1171
1171
  }
@@ -1185,9 +1185,9 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1185
1185
  find: Mi,
1186
1186
  findAll: yr,
1187
1187
  findOne: Pi,
1188
- findOneChild: vr,
1189
- getAttributeValue: Cr,
1190
- getChildren: va,
1188
+ findOneChild: Rr,
1189
+ getAttributeValue: Ir,
1190
+ getChildren: Ra,
1191
1191
  getElementById: wr,
1192
1192
  getElements: kr,
1193
1193
  getElementsByTagName: Lt,
@@ -1199,16 +1199,16 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1199
1199
  getParent: on,
1200
1200
  getSiblings: cn,
1201
1201
  getText: Ea,
1202
- hasAttrib: Ir,
1203
- hasChildren: me,
1202
+ hasAttrib: Cr,
1203
+ hasChildren: Te,
1204
1204
  innerText: Ta,
1205
1205
  isCDATA: Da,
1206
1206
  isComment: La,
1207
1207
  isDocument: at,
1208
1208
  isTag: k,
1209
1209
  isText: He,
1210
- nextElementSibling: vi,
1211
- prepend: Rr,
1210
+ nextElementSibling: Ri,
1211
+ prepend: vr,
1212
1212
  prependChild: Lr,
1213
1213
  prevElementSibling: yi,
1214
1214
  removeElement: mt,
@@ -1216,7 +1216,7 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1216
1216
  replaceElement: xr,
1217
1217
  testElement: Pr,
1218
1218
  textContent: Ot,
1219
- uniqueSort: Rt
1219
+ uniqueSort: vt
1220
1220
  }, Symbol.toStringTag, { value: "Module" })), $r = {
1221
1221
  _useHtmlParser2: !1
1222
1222
  };
@@ -1315,7 +1315,7 @@ function eo(e) {
1315
1315
  function to(e) {
1316
1316
  return e.replace(/[A-Z]/g, "-$&").toLowerCase();
1317
1317
  }
1318
- function ne(e, t) {
1318
+ function re(e, t) {
1319
1319
  const a = e.length;
1320
1320
  for (let i = 0; i < a; i++)
1321
1321
  t(e[i], i);
@@ -1354,11 +1354,11 @@ function io(e, t) {
1354
1354
  if (typeof t == "function") {
1355
1355
  if (typeof e != "string")
1356
1356
  throw new Error("Bad combination of arguments.");
1357
- return ne(this, (a, i) => {
1357
+ return re(this, (a, i) => {
1358
1358
  k(a) && Nt(a, e, t.call(a, i, a.attribs[e]));
1359
1359
  });
1360
1360
  }
1361
- return ne(this, (a) => {
1361
+ return re(this, (a) => {
1362
1362
  if (k(a))
1363
1363
  if (typeof e == "object")
1364
1364
  for (const i of Object.keys(e)) {
@@ -1417,11 +1417,11 @@ function so(e, t) {
1417
1417
  if (typeof t == "function") {
1418
1418
  if (typeof e == "object")
1419
1419
  throw new TypeError("Bad combination of arguments.");
1420
- return ne(this, (i, s) => {
1420
+ return re(this, (i, s) => {
1421
1421
  k(i) && Va(i, e, t.call(i, s, ss(i, e, this.options.xmlMode)), this.options.xmlMode);
1422
1422
  });
1423
1423
  }
1424
- return ne(this, (i) => {
1424
+ return re(this, (i) => {
1425
1425
  if (k(i))
1426
1426
  if (typeof e == "object")
1427
1427
  for (const s of Object.keys(e)) {
@@ -1476,7 +1476,7 @@ function ro(e, t) {
1476
1476
  if (!i || !k(i))
1477
1477
  return;
1478
1478
  const s = i;
1479
- return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? no(s) : typeof e == "object" || t !== void 0 ? (ne(this, (u) => {
1479
+ return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? no(s) : typeof e == "object" || t !== void 0 ? (re(this, (u) => {
1480
1480
  k(u) && (typeof e == "object" ? ns(u, e) : ns(u, e, t));
1481
1481
  }), this) : uo(s, e);
1482
1482
  }
@@ -1514,7 +1514,7 @@ function _a(e) {
1514
1514
  function co(e) {
1515
1515
  const t = _a(e);
1516
1516
  for (const a of t)
1517
- ne(this, (i) => {
1517
+ re(this, (i) => {
1518
1518
  k(i) && bn(i, a);
1519
1519
  });
1520
1520
  return this;
@@ -1534,7 +1534,7 @@ function lo(e) {
1534
1534
  }
1535
1535
  function gn(e) {
1536
1536
  if (typeof e == "function")
1537
- return ne(this, (i, s) => {
1537
+ return re(this, (i, s) => {
1538
1538
  if (k(i)) {
1539
1539
  const u = i.attribs.class || "";
1540
1540
  gn.call([i], e.call(i, s, u));
@@ -1562,11 +1562,11 @@ function gn(e) {
1562
1562
  }
1563
1563
  function _n(e) {
1564
1564
  if (typeof e == "function")
1565
- return ne(this, (s, u) => {
1565
+ return re(this, (s, u) => {
1566
1566
  k(s) && _n.call([s], e.call(s, u, s.attribs.class || ""));
1567
1567
  });
1568
1568
  const t = _a(e), a = t.length, i = arguments.length === 0;
1569
- return ne(this, (s) => {
1569
+ return re(this, (s) => {
1570
1570
  if (k(s))
1571
1571
  if (i)
1572
1572
  s.attribs.class = "";
@@ -1583,7 +1583,7 @@ function _n(e) {
1583
1583
  }
1584
1584
  function An(e, t) {
1585
1585
  if (typeof e == "function")
1586
- return ne(this, (r, o) => {
1586
+ return re(this, (r, o) => {
1587
1587
  k(r) && An.call([r], e.call(r, o, r.attribs.class || "", t), t);
1588
1588
  });
1589
1589
  if (!e || typeof e != "string")
@@ -1614,21 +1614,21 @@ const ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1614
1614
  toggleClass: An,
1615
1615
  val: oo
1616
1616
  }, Symbol.toStringTag, { value: "Module" }));
1617
- var R;
1617
+ var v;
1618
1618
  (function(e) {
1619
1619
  e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator";
1620
- })(R || (R = {}));
1621
- var le;
1620
+ })(v || (v = {}));
1621
+ var de;
1622
1622
  (function(e) {
1623
1623
  e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start";
1624
- })(le || (le = {}));
1624
+ })(de || (de = {}));
1625
1625
  const us = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, fo = /\\([\da-f]{1,6}\s?|(\s)|.)/gi, Eo = /* @__PURE__ */ new Map([
1626
- [126, le.Element],
1627
- [94, le.Start],
1628
- [36, le.End],
1629
- [42, le.Any],
1630
- [33, le.Not],
1631
- [124, le.Hyphen]
1626
+ [126, de.Element],
1627
+ [94, de.Start],
1628
+ [36, de.End],
1629
+ [42, de.Any],
1630
+ [33, de.Not],
1631
+ [124, de.Hyphen]
1632
1632
  ]), mo = /* @__PURE__ */ new Set([
1633
1633
  "has",
1634
1634
  "not",
@@ -1640,12 +1640,12 @@ const us = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, fo = /\\(
1640
1640
  ]);
1641
1641
  function qt(e) {
1642
1642
  switch (e.type) {
1643
- case R.Adjacent:
1644
- case R.Child:
1645
- case R.Descendant:
1646
- case R.Parent:
1647
- case R.Sibling:
1648
- case R.ColumnCombinator:
1643
+ case v.Adjacent:
1644
+ case v.Child:
1645
+ case v.Descendant:
1646
+ case v.Parent:
1647
+ case v.Sibling:
1648
+ case v.ColumnCombinator:
1649
1649
  return !0;
1650
1650
  default:
1651
1651
  return !1;
@@ -1683,8 +1683,8 @@ function Nn(e, t, a) {
1683
1683
  const A = t.slice(a + T).match(us);
1684
1684
  if (!A)
1685
1685
  throw new Error(`Expected name, found ${t.slice(a)}`);
1686
- const [C] = A;
1687
- return a += T + C.length, Mt(C);
1686
+ const [I] = A;
1687
+ return a += T + I.length, Mt(I);
1688
1688
  }
1689
1689
  function u(T) {
1690
1690
  for (a += T; a < t.length && rs(t.charCodeAt(a)); )
@@ -1711,7 +1711,7 @@ function Nn(e, t, a) {
1711
1711
  throw new Error("Did not expect successive traversals.");
1712
1712
  }
1713
1713
  function h(T) {
1714
- if (i.length > 0 && i[i.length - 1].type === R.Descendant) {
1714
+ if (i.length > 0 && i[i.length - 1].type === v.Descendant) {
1715
1715
  i[i.length - 1].type = T;
1716
1716
  return;
1717
1717
  }
@@ -1719,7 +1719,7 @@ function Nn(e, t, a) {
1719
1719
  }
1720
1720
  function f(T, A) {
1721
1721
  i.push({
1722
- type: R.Attribute,
1722
+ type: v.Attribute,
1723
1723
  name: T,
1724
1724
  action: A,
1725
1725
  value: s(1),
@@ -1728,7 +1728,7 @@ function Nn(e, t, a) {
1728
1728
  });
1729
1729
  }
1730
1730
  function m() {
1731
- if (i.length && i[i.length - 1].type === R.Descendant && i.pop(), i.length === 0)
1731
+ if (i.length && i[i.length - 1].type === v.Descendant && i.pop(), i.length === 0)
1732
1732
  throw new Error("Empty sub-selector");
1733
1733
  e.push(i);
1734
1734
  }
@@ -1742,44 +1742,44 @@ function Nn(e, t, a) {
1742
1742
  case 10:
1743
1743
  case 12:
1744
1744
  case 13: {
1745
- (i.length === 0 || i[0].type !== R.Descendant) && (c(), i.push({ type: R.Descendant })), u(1);
1745
+ (i.length === 0 || i[0].type !== v.Descendant) && (c(), i.push({ type: v.Descendant })), u(1);
1746
1746
  break;
1747
1747
  }
1748
1748
  case 62: {
1749
- h(R.Child), u(1);
1749
+ h(v.Child), u(1);
1750
1750
  break;
1751
1751
  }
1752
1752
  case 60: {
1753
- h(R.Parent), u(1);
1753
+ h(v.Parent), u(1);
1754
1754
  break;
1755
1755
  }
1756
1756
  case 126: {
1757
- h(R.Sibling), u(1);
1757
+ h(v.Sibling), u(1);
1758
1758
  break;
1759
1759
  }
1760
1760
  case 43: {
1761
- h(R.Adjacent), u(1);
1761
+ h(v.Adjacent), u(1);
1762
1762
  break;
1763
1763
  }
1764
1764
  case 46: {
1765
- f("class", le.Element);
1765
+ f("class", de.Element);
1766
1766
  break;
1767
1767
  }
1768
1768
  case 35: {
1769
- f("id", le.Equals);
1769
+ f("id", de.Equals);
1770
1770
  break;
1771
1771
  }
1772
1772
  case 91: {
1773
1773
  u(1);
1774
- let A, C = null;
1775
- t.charCodeAt(a) === 124 ? A = s(1) : t.startsWith("*|", a) ? (C = "*", A = s(2)) : (A = s(0), t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 61 && (C = A, A = s(1))), u(0);
1776
- let L = le.Exists;
1774
+ let A, I = null;
1775
+ t.charCodeAt(a) === 124 ? A = s(1) : t.startsWith("*|", a) ? (I = "*", A = s(2)) : (A = s(0), t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 61 && (I = A, A = s(1))), u(0);
1776
+ let L = de.Exists;
1777
1777
  const M = Eo.get(t.charCodeAt(a));
1778
1778
  if (M) {
1779
1779
  if (L = M, t.charCodeAt(a + 1) !== 61)
1780
1780
  throw new Error("Expected `=`");
1781
1781
  u(2);
1782
- } else t.charCodeAt(a) === 61 && (L = le.Equals, u(1));
1782
+ } else t.charCodeAt(a) === 61 && (L = de.Equals, u(1));
1783
1783
  let X = "", U = null;
1784
1784
  if (L !== "exists") {
1785
1785
  if (Wa(t.charCodeAt(a))) {
@@ -1804,11 +1804,11 @@ function Nn(e, t, a) {
1804
1804
  throw new Error("Attribute selector didn't terminate");
1805
1805
  a += 1;
1806
1806
  const $ = {
1807
- type: R.Attribute,
1807
+ type: v.Attribute,
1808
1808
  name: A,
1809
1809
  action: L,
1810
1810
  value: X,
1811
- namespace: C,
1811
+ namespace: I,
1812
1812
  ignoreCase: U
1813
1813
  };
1814
1814
  i.push($);
@@ -1817,29 +1817,29 @@ function Nn(e, t, a) {
1817
1817
  case 58: {
1818
1818
  if (t.charCodeAt(a + 1) === 58) {
1819
1819
  i.push({
1820
- type: R.PseudoElement,
1820
+ type: v.PseudoElement,
1821
1821
  name: s(2).toLowerCase(),
1822
1822
  data: t.charCodeAt(a) === 40 ? r() : null
1823
1823
  });
1824
1824
  continue;
1825
1825
  }
1826
1826
  const A = s(1).toLowerCase();
1827
- let C = null;
1827
+ let I = null;
1828
1828
  if (t.charCodeAt(a) === 40)
1829
1829
  if (mo.has(A)) {
1830
1830
  if (Wa(t.charCodeAt(a + 1)))
1831
1831
  throw new Error(`Pseudo-selector ${A} cannot be quoted`);
1832
- if (C = [], a = Nn(C, t, a + 1), t.charCodeAt(a) !== 41)
1832
+ if (I = [], a = Nn(I, t, a + 1), t.charCodeAt(a) !== 41)
1833
1833
  throw new Error(`Missing closing parenthesis in :${A} (${t})`);
1834
1834
  a += 1;
1835
1835
  } else {
1836
- if (C = r(), To.has(A)) {
1837
- const L = C.charCodeAt(0);
1838
- L === C.charCodeAt(C.length - 1) && Wa(L) && (C = C.slice(1, -1));
1836
+ if (I = r(), To.has(A)) {
1837
+ const L = I.charCodeAt(0);
1838
+ L === I.charCodeAt(I.length - 1) && Wa(L) && (I = I.slice(1, -1));
1839
1839
  }
1840
- C = Mt(C);
1840
+ I = Mt(I);
1841
1841
  }
1842
- i.push({ type: R.Pseudo, name: A, data: C });
1842
+ i.push({ type: v.Pseudo, name: A, data: I });
1843
1843
  break;
1844
1844
  }
1845
1845
  case 44: {
@@ -1854,19 +1854,19 @@ function Nn(e, t, a) {
1854
1854
  a = L + 2, i.length === 0 && u(0);
1855
1855
  break;
1856
1856
  }
1857
- let A = null, C;
1857
+ let A = null, I;
1858
1858
  if (T === 42)
1859
- a += 1, C = "*";
1859
+ a += 1, I = "*";
1860
1860
  else if (T === 124) {
1861
- if (C = "", t.charCodeAt(a + 1) === 124) {
1862
- h(R.ColumnCombinator), u(2);
1861
+ if (I = "", t.charCodeAt(a + 1) === 124) {
1862
+ h(v.ColumnCombinator), u(2);
1863
1863
  break;
1864
1864
  }
1865
1865
  } else if (us.test(t.slice(a)))
1866
- C = s(0);
1866
+ I = s(0);
1867
1867
  else
1868
1868
  break e;
1869
- t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (A = C, t.charCodeAt(a + 1) === 42 ? (C = "*", a += 2) : C = s(1)), i.push(C === "*" ? { type: R.Universal, namespace: A } : { type: R.Tag, name: C, namespace: A });
1869
+ t.charCodeAt(a) === 124 && t.charCodeAt(a + 1) !== 124 && (A = I, t.charCodeAt(a + 1) === 42 ? (I = "*", a += 2) : I = s(1)), i.push(I === "*" ? { type: v.Universal, namespace: A } : { type: v.Tag, name: I, namespace: A });
1870
1870
  }
1871
1871
  }
1872
1872
  }
@@ -1883,25 +1883,25 @@ var Aa = {
1883
1883
  return !1;
1884
1884
  }
1885
1885
  };
1886
- const Y = /* @__PURE__ */ bo(Aa), Cn = /* @__PURE__ */ new Map([
1887
- [R.Universal, 50],
1888
- [R.Tag, 30],
1889
- [R.Attribute, 1],
1890
- [R.Pseudo, 0]
1886
+ const Y = /* @__PURE__ */ bo(Aa), In = /* @__PURE__ */ new Map([
1887
+ [v.Universal, 50],
1888
+ [v.Tag, 30],
1889
+ [v.Attribute, 1],
1890
+ [v.Pseudo, 0]
1891
1891
  ]);
1892
1892
  function wi(e) {
1893
- return !Cn.has(e.type);
1893
+ return !In.has(e.type);
1894
1894
  }
1895
1895
  const go = /* @__PURE__ */ new Map([
1896
- [le.Exists, 10],
1897
- [le.Equals, 8],
1898
- [le.Not, 7],
1899
- [le.Start, 6],
1900
- [le.End, 6],
1901
- [le.Any, 5]
1896
+ [de.Exists, 10],
1897
+ [de.Equals, 8],
1898
+ [de.Not, 7],
1899
+ [de.Start, 6],
1900
+ [de.End, 6],
1901
+ [de.Any, 5]
1902
1902
  ]);
1903
1903
  function _o(e) {
1904
- const t = e.map(In);
1904
+ const t = e.map(Cn);
1905
1905
  for (let a = 1; a < e.length; a++) {
1906
1906
  const i = t[a];
1907
1907
  if (!(i < 0))
@@ -1911,10 +1911,10 @@ function _o(e) {
1911
1911
  }
1912
1912
  }
1913
1913
  }
1914
- function In(e) {
1914
+ function Cn(e) {
1915
1915
  var t, a;
1916
- let i = (t = Cn.get(e.type)) !== null && t !== void 0 ? t : -1;
1917
- return e.type === R.Attribute ? (i = (a = go.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === le.Equals && e.name === "id" && (i = 9), e.ignoreCase && (i >>= 1)) : e.type === R.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? i = 0 : Array.isArray(e.data) ? (i = Math.min(...e.data.map((s) => Math.min(...s.map(In)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
1916
+ let i = (t = In.get(e.type)) !== null && t !== void 0 ? t : -1;
1917
+ return e.type === v.Attribute ? (i = (a = go.get(e.action)) !== null && a !== void 0 ? a : 4, e.action === de.Equals && e.name === "id" && (i = 9), e.ignoreCase && (i >>= 1)) : e.type === v.Pseudo && (e.data ? e.name === "has" || e.name === "contains" ? i = 0 : Array.isArray(e.data) ? (i = Math.min(...e.data.map((s) => Math.min(...s.map(Cn)))), i < 0 && (i = 0)) : i = 2 : i = 3), i;
1918
1918
  }
1919
1919
  const Ao = /[-[\]{}()*+?.,\\^$|#\s]/g;
1920
1920
  function os(e) {
@@ -1971,7 +1971,7 @@ const No = /* @__PURE__ */ new Set([
1971
1971
  function nt(e, t) {
1972
1972
  return typeof e.ignoreCase == "boolean" ? e.ignoreCase : e.ignoreCase === "quirks" ? !!t.quirksMode : !t.xmlMode && No.has(e.name);
1973
1973
  }
1974
- const Co = {
1974
+ const Io = {
1975
1975
  equals(e, t, a) {
1976
1976
  const { adapter: i } = a, { name: s } = t;
1977
1977
  let { value: u } = t;
@@ -2053,7 +2053,7 @@ const Co = {
2053
2053
  return (o == null || o.length !== u.length || o.toLowerCase() !== u) && e(r);
2054
2054
  }) : (r) => i.getAttributeValue(r, s) !== u && e(r);
2055
2055
  }
2056
- }, Io = /* @__PURE__ */ new Set([9, 10, 12, 13, 32]), cs = 48, So = 57;
2056
+ }, Co = /* @__PURE__ */ new Set([9, 10, 12, 13, 32]), cs = 48, So = 57;
2057
2057
  function xo(e) {
2058
2058
  if (e = e.trim().toLowerCase(), e === "even")
2059
2059
  return [2, 0];
@@ -2074,7 +2074,7 @@ function xo(e) {
2074
2074
  return t === c ? null : h;
2075
2075
  }
2076
2076
  function o() {
2077
- for (; t < e.length && Io.has(e.charCodeAt(t)); )
2077
+ for (; t < e.length && Co.has(e.charCodeAt(t)); )
2078
2078
  t++;
2079
2079
  }
2080
2080
  }
@@ -2334,7 +2334,7 @@ const Xa = (e, t, a, i, s) => {
2334
2334
  return (f) => e(f) && u.existsOne(h, u.getChildren(f));
2335
2335
  }
2336
2336
  };
2337
- function Ro(e, t, a, i, s) {
2337
+ function vo(e, t, a, i, s) {
2338
2338
  var u;
2339
2339
  const { name: r, data: o } = t;
2340
2340
  if (Array.isArray(o)) {
@@ -2363,21 +2363,21 @@ function Qa(e, t) {
2363
2363
  const a = t.getParent(e);
2364
2364
  return a && t.isTag(a) ? a : null;
2365
2365
  }
2366
- function vo(e, t, a, i, s) {
2366
+ function Ro(e, t, a, i, s) {
2367
2367
  const { adapter: u, equals: r } = a;
2368
2368
  switch (t.type) {
2369
- case R.PseudoElement:
2369
+ case v.PseudoElement:
2370
2370
  throw new Error("Pseudo-elements are not supported by css-select");
2371
- case R.ColumnCombinator:
2371
+ case v.ColumnCombinator:
2372
2372
  throw new Error("Column combinators are not yet supported by css-select");
2373
- case R.Attribute: {
2373
+ case v.Attribute: {
2374
2374
  if (t.namespace != null)
2375
2375
  throw new Error("Namespaced attributes are not yet supported by css-select");
2376
- return (!a.xmlMode || a.lowerCaseAttributeNames) && (t.name = t.name.toLowerCase()), Co[t.action](e, t, a);
2376
+ return (!a.xmlMode || a.lowerCaseAttributeNames) && (t.name = t.name.toLowerCase()), Io[t.action](e, t, a);
2377
2377
  }
2378
- case R.Pseudo:
2379
- return Ro(e, t, a, i, s);
2380
- case R.Tag: {
2378
+ case v.Pseudo:
2379
+ return vo(e, t, a, i, s);
2380
+ case v.Tag: {
2381
2381
  if (t.namespace != null)
2382
2382
  throw new Error("Namespaced tag names are not yet supported by css-select");
2383
2383
  let { name: o } = t;
@@ -2385,7 +2385,7 @@ function vo(e, t, a, i, s) {
2385
2385
  return u.getName(h) === o && e(h);
2386
2386
  };
2387
2387
  }
2388
- case R.Descendant: {
2388
+ case v.Descendant: {
2389
2389
  if (a.cacheResults === !1 || typeof WeakSet > "u")
2390
2390
  return function(h) {
2391
2391
  let f = h;
@@ -2415,16 +2415,16 @@ function vo(e, t, a, i, s) {
2415
2415
  while (h = Qa(h, u));
2416
2416
  return !1;
2417
2417
  };
2418
- case R.Parent:
2418
+ case v.Parent:
2419
2419
  return function(c) {
2420
2420
  return u.getChildren(c).some((h) => u.isTag(h) && e(h));
2421
2421
  };
2422
- case R.Child:
2422
+ case v.Child:
2423
2423
  return function(c) {
2424
2424
  const h = u.getParent(c);
2425
2425
  return h != null && u.isTag(h) && e(h);
2426
2426
  };
2427
- case R.Sibling:
2427
+ case v.Sibling:
2428
2428
  return function(c) {
2429
2429
  const h = u.getSiblings(c);
2430
2430
  for (let f = 0; f < h.length; f++) {
@@ -2436,7 +2436,7 @@ function vo(e, t, a, i, s) {
2436
2436
  }
2437
2437
  return !1;
2438
2438
  };
2439
- case R.Adjacent:
2439
+ case v.Adjacent:
2440
2440
  return u.prevElementSibling ? function(c) {
2441
2441
  const h = u.prevElementSibling(c);
2442
2442
  return h != null && e(h);
@@ -2451,7 +2451,7 @@ function vo(e, t, a, i, s) {
2451
2451
  }
2452
2452
  return !!f && e(f);
2453
2453
  };
2454
- case R.Universal: {
2454
+ case v.Universal: {
2455
2455
  if (t.namespace != null && t.namespace !== "*")
2456
2456
  throw new Error("Namespaced universal selectors are not yet supported by css-select");
2457
2457
  return e;
@@ -2459,12 +2459,12 @@ function vo(e, t, a, i, s) {
2459
2459
  }
2460
2460
  }
2461
2461
  function On(e) {
2462
- return e.type === R.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(On)));
2462
+ return e.type === v.Pseudo && (e.name === "scope" || Array.isArray(e.data) && e.data.some((t) => t.some(On)));
2463
2463
  }
2464
- const yo = { type: R.Descendant }, Mo = {
2464
+ const yo = { type: v.Descendant }, Mo = {
2465
2465
  type: "_flexibleDescendant"
2466
2466
  }, Po = {
2467
- type: R.Pseudo,
2467
+ type: v.Pseudo,
2468
2468
  name: "scope",
2469
2469
  data: null
2470
2470
  };
@@ -2474,7 +2474,7 @@ function ko(e, { adapter: t }, a) {
2474
2474
  return s === Sn || u && t.isTag(u);
2475
2475
  }));
2476
2476
  for (const s of e) {
2477
- if (!(s.length > 0 && wi(s[0]) && s[0].type !== R.Descendant)) if (i && !s.some(On))
2477
+ if (!(s.length > 0 && wi(s[0]) && s[0].type !== v.Descendant)) if (i && !s.some(On))
2478
2478
  s.unshift(yo);
2479
2479
  else
2480
2480
  continue;
@@ -2493,7 +2493,7 @@ function Dn(e, t, a) {
2493
2493
  const o = e.map((c) => {
2494
2494
  if (c.length >= 2) {
2495
2495
  const [h, f] = c;
2496
- h.type !== R.Pseudo || h.name !== "scope" || (s && f.type === R.Descendant ? c[1] = Mo : (f.type === R.Adjacent || f.type === R.Sibling) && (r = !0));
2496
+ h.type !== v.Pseudo || h.name !== "scope" || (s && f.type === v.Descendant ? c[1] = Mo : (f.type === v.Adjacent || f.type === v.Sibling) && (r = !0));
2497
2497
  }
2498
2498
  return wo(c, t, u);
2499
2499
  }).reduce(Bo, Y.falseFunc);
@@ -2501,7 +2501,7 @@ function Dn(e, t, a) {
2501
2501
  }
2502
2502
  function wo(e, t, a) {
2503
2503
  var i;
2504
- return e.reduce((s, u) => s === Y.falseFunc ? Y.falseFunc : vo(s, u, t, a, Dn), (i = t.rootFunc) !== null && i !== void 0 ? i : Y.trueFunc);
2504
+ return e.reduce((s, u) => s === Y.falseFunc ? Y.falseFunc : Ro(s, u, t, a, Dn), (i = t.rootFunc) !== null && i !== void 0 ? i : Y.trueFunc);
2505
2505
  }
2506
2506
  function Bo(e, t) {
2507
2507
  return t === Y.falseFunc || e === Y.trueFunc ? e : e === Y.falseFunc || t === Y.trueFunc ? t : function(i) {
@@ -2524,7 +2524,7 @@ function Ho(e) {
2524
2524
  };
2525
2525
  }
2526
2526
  const Bi = Ho(Dn);
2527
- function Rn(e, t, a = !1) {
2527
+ function vn(e, t, a = !1) {
2528
2528
  return a && (e = Yo(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e);
2529
2529
  }
2530
2530
  function Yo(e, t) {
@@ -2581,14 +2581,14 @@ function Ui(e) {
2581
2581
  return [a, t];
2582
2582
  }
2583
2583
  const $o = {
2584
- type: R.Universal,
2584
+ type: v.Universal,
2585
2585
  namespace: null
2586
2586
  }, Xo = {
2587
- type: R.Pseudo,
2587
+ type: v.Pseudo,
2588
2588
  name: "scope",
2589
2589
  data: null
2590
2590
  };
2591
- function vn(e, t, a = {}) {
2591
+ function Rn(e, t, a = {}) {
2592
2592
  return yn([e], t, a);
2593
2593
  }
2594
2594
  function yn(e, t, a = {}) {
@@ -2657,29 +2657,29 @@ function kn(e, t, a) {
2657
2657
  var i;
2658
2658
  if (e.some(qt)) {
2659
2659
  const s = (i = a.root) !== null && i !== void 0 ? i : Wo(t[0]), u = { ...a, context: t, relativeSelector: !1 };
2660
- return e.push(Xo), Ca(s, e, u, !0, t.length);
2660
+ return e.push(Xo), Ia(s, e, u, !0, t.length);
2661
2661
  }
2662
- return Ca(t, e, a, !1, t.length);
2662
+ return Ia(t, e, a, !1, t.length);
2663
2663
  }
2664
2664
  function Qo(e, t, a = {}, i = 1 / 0) {
2665
2665
  if (typeof e == "function")
2666
2666
  return wn(t, e);
2667
- const [s, u] = Ui(Pa(e)), r = u.map((o) => Ca(t, o, a, !0, i));
2668
- return s.length && r.push(oi(t, s, a, i)), r.length === 0 ? [] : r.length === 1 ? r[0] : Rt(r.reduce((o, c) => [...o, ...c]));
2667
+ const [s, u] = Ui(Pa(e)), r = u.map((o) => Ia(t, o, a, !0, i));
2668
+ return s.length && r.push(oi(t, s, a, i)), r.length === 0 ? [] : r.length === 1 ? r[0] : vt(r.reduce((o, c) => [...o, ...c]));
2669
2669
  }
2670
- function Ca(e, t, a, i, s) {
2670
+ function Ia(e, t, a, i, s) {
2671
2671
  const u = t.findIndex(Na), r = t.slice(0, u), o = t[u], c = t.length - 1 === u ? s : 1 / 0, h = Vo(o.name, o.data, c);
2672
2672
  if (h === 0)
2673
2673
  return [];
2674
- const m = (r.length === 0 && !Array.isArray(e) ? va(e).filter(k) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(k) : i || r.some(qt) ? oi(e, [r], a, h) : ci(e, [r], a)).slice(0, h);
2674
+ const m = (r.length === 0 && !Array.isArray(e) ? Ra(e).filter(k) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(k) : i || r.some(qt) ? oi(e, [r], a, h) : ci(e, [r], a)).slice(0, h);
2675
2675
  let T = Go(o.name, m, o.data, a);
2676
2676
  if (T.length === 0 || t.length === u + 1)
2677
2677
  return T;
2678
- const A = t.slice(u + 1), C = A.some(qt);
2679
- if (C) {
2678
+ const A = t.slice(u + 1), I = A.some(qt);
2679
+ if (I) {
2680
2680
  if (qt(A[0])) {
2681
2681
  const { type: L } = A[0];
2682
- (L === R.Sibling || L === R.Adjacent) && (T = Rn(T, Ma, !0)), A.unshift($o);
2682
+ (L === v.Sibling || L === v.Adjacent) && (T = vn(T, Ma, !0)), A.unshift($o);
2683
2683
  }
2684
2684
  a = {
2685
2685
  ...a,
@@ -2692,7 +2692,7 @@ function Ca(e, t, a, i, s) {
2692
2692
  rootFunc: (L) => T.includes(L)
2693
2693
  };
2694
2694
  } else a.rootFunc && a.rootFunc !== Aa.trueFunc && (a = { ...a, rootFunc: Aa.trueFunc });
2695
- return A.some(Na) ? Ca(T, A, a, !1, s) : C ? (
2695
+ return A.some(Na) ? Ia(T, A, a, !1, s) : I ? (
2696
2696
  // Query existing elements to resolve traversal.
2697
2697
  oi(T, [A], a, s)
2698
2698
  ) : (
@@ -2705,7 +2705,7 @@ function oi(e, t, a, i) {
2705
2705
  return wn(e, s, i);
2706
2706
  }
2707
2707
  function wn(e, t, a = 1 / 0) {
2708
- const i = Rn(e, Ma, t.shouldTestNextSiblings);
2708
+ const i = vn(e, Ma, t.shouldTestNextSiblings);
2709
2709
  return Mi((s) => k(s) && t(s), i, !0, a);
2710
2710
  }
2711
2711
  function ci(e, t, a) {
@@ -2770,26 +2770,26 @@ function Yi(e, ...t) {
2770
2770
  let a = null;
2771
2771
  const i = Fi((s, u) => {
2772
2772
  const r = [];
2773
- return ne(u, (o) => {
2773
+ return re(u, (o) => {
2774
2774
  for (let c; (c = s(o)) && !(a != null && a(c, r.length)); o = c)
2775
2775
  r.push(c);
2776
2776
  }), r;
2777
2777
  })(e, ...t);
2778
2778
  return function(s, u) {
2779
- a = typeof s == "string" ? (o) => vn(o, s, this.options) : s ? sa(s) : null;
2779
+ a = typeof s == "string" ? (o) => Rn(o, s, this.options) : s ? sa(s) : null;
2780
2780
  const r = i.call(this, u);
2781
2781
  return a = null, r;
2782
2782
  };
2783
2783
  }
2784
- function vt(e) {
2784
+ function Rt(e) {
2785
2785
  return e.length > 1 ? Array.from(new Set(e)) : e;
2786
2786
  }
2787
- const Zo = Hi(({ parent: e }) => e && !at(e) ? e : null, vt), Jo = ia((e) => {
2787
+ const Zo = Hi(({ parent: e }) => e && !at(e) ? e : null, Rt), Jo = ia((e) => {
2788
2788
  const t = [];
2789
2789
  for (; e.parent && !at(e.parent); )
2790
2790
  t.push(e.parent), e = e.parent;
2791
2791
  return t;
2792
- }, Rt, (e) => e.reverse()), ec = Yi(({ parent: e }) => e && !at(e) ? e : null, Rt, (e) => e.reverse());
2792
+ }, vt, (e) => e.reverse()), ec = Yi(({ parent: e }) => e && !at(e) ? e : null, vt, (e) => e.reverse());
2793
2793
  function tc(e) {
2794
2794
  var t;
2795
2795
  const a = [];
@@ -2798,8 +2798,8 @@ function tc(e) {
2798
2798
  const i = {
2799
2799
  xmlMode: this.options.xmlMode,
2800
2800
  root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
2801
- }, s = typeof e == "string" ? (u) => vn(u, e, i) : sa(e);
2802
- return ne(this, (u) => {
2801
+ }, s = typeof e == "string" ? (u) => Rn(u, e, i) : sa(e);
2802
+ return re(this, (u) => {
2803
2803
  for (u && !at(u) && !k(u) && (u = u.parent); u && k(u); ) {
2804
2804
  if (s(u, 0)) {
2805
2805
  a.includes(u) || a.push(u);
@@ -2809,19 +2809,19 @@ function tc(e) {
2809
2809
  }
2810
2810
  }), this._make(a);
2811
2811
  }
2812
- const ac = Hi((e) => vi(e)), ic = ia((e) => {
2812
+ const ac = Hi((e) => Ri(e)), ic = ia((e) => {
2813
2813
  const t = [];
2814
2814
  for (; e.next; )
2815
2815
  e = e.next, k(e) && t.push(e);
2816
2816
  return t;
2817
- }, vt), sc = Yi((e) => vi(e), vt), nc = Hi((e) => yi(e)), uc = ia((e) => {
2817
+ }, Rt), sc = Yi((e) => Ri(e), Rt), nc = Hi((e) => yi(e)), uc = ia((e) => {
2818
2818
  const t = [];
2819
2819
  for (; e.prev; )
2820
2820
  e = e.prev, k(e) && t.push(e);
2821
2821
  return t;
2822
- }, vt), rc = Yi((e) => yi(e), vt), oc = ia((e) => cn(e).filter((t) => k(t) && t !== e), Rt), cc = ia((e) => va(e).filter(k), vt);
2822
+ }, Rt), rc = Yi((e) => yi(e), Rt), oc = ia((e) => cn(e).filter((t) => k(t) && t !== e), vt), cc = ia((e) => Ra(e).filter(k), Rt);
2823
2823
  function lc() {
2824
- const e = this.toArray().reduce((t, a) => me(a) ? t.concat(a.children) : t, []);
2824
+ const e = this.toArray().reduce((t, a) => Te(a) ? t.concat(a.children) : t, []);
2825
2825
  return this._make(e);
2826
2826
  }
2827
2827
  function hc(e) {
@@ -2892,15 +2892,15 @@ function Nc(e) {
2892
2892
  let t, a;
2893
2893
  return e == null ? (t = this.parent().children(), a = this[0]) : typeof e == "string" ? (t = this._make(e), a = this[0]) : (t = this, a = Xe(e) ? e[0] : e), Array.prototype.indexOf.call(t, a);
2894
2894
  }
2895
- function Cc(e, t) {
2895
+ function Ic(e, t) {
2896
2896
  return this._make(Array.prototype.slice.call(this, e, t));
2897
2897
  }
2898
- function Ic() {
2898
+ function Cc() {
2899
2899
  var e;
2900
2900
  return (e = this.prevObject) !== null && e !== void 0 ? e : this._make([]);
2901
2901
  }
2902
2902
  function Sc(e, t) {
2903
- const a = this._make(e, t), i = Rt([...this.get(), ...a.get()]);
2903
+ const a = this._make(e, t), i = vt([...this.get(), ...a.get()]);
2904
2904
  return this._make(i);
2905
2905
  }
2906
2906
  function xc(e) {
@@ -2915,7 +2915,7 @@ const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2915
2915
  closest: tc,
2916
2916
  contents: lc,
2917
2917
  each: hc,
2918
- end: Ic,
2918
+ end: Cc,
2919
2919
  eq: gc,
2920
2920
  filter: fc,
2921
2921
  filterArray: qi,
@@ -2938,7 +2938,7 @@ const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2938
2938
  prevAll: uc,
2939
2939
  prevUntil: rc,
2940
2940
  siblings: oc,
2941
- slice: Cc,
2941
+ slice: Ic,
2942
2942
  toArray: Ac
2943
2943
  }, Symbol.toStringTag, { value: "Module" }));
2944
2944
  function Dc(e) {
@@ -2989,8 +2989,8 @@ function Lc(e, t) {
2989
2989
  function Bn(e) {
2990
2990
  return function(...t) {
2991
2991
  const a = this.length - 1;
2992
- return ne(this, (i, s) => {
2993
- if (!me(i))
2992
+ return re(this, (i, s) => {
2993
+ if (!Te(i))
2994
2994
  return;
2995
2995
  const u = typeof t[0] == "function" ? t[0].call(i, s, this._render(i.children)) : t, r = this._makeDomArray(u, s < a);
2996
2996
  e(r, i.children, i);
@@ -3007,17 +3007,17 @@ function it(e, t, a, i, s) {
3007
3007
  for (let f = 0; f < i.length; ++f) {
3008
3008
  const m = i[f], T = m.parent;
3009
3009
  if (T) {
3010
- const C = T.children.indexOf(m);
3011
- C > -1 && (T.children.splice(C, 1), s === T && t > C && o[0]--);
3010
+ const I = T.children.indexOf(m);
3011
+ I > -1 && (T.children.splice(I, 1), s === T && t > I && o[0]--);
3012
3012
  }
3013
3013
  m.parent = s, m.prev && (m.prev.next = (u = m.next) !== null && u !== void 0 ? u : null), m.next && (m.next.prev = (r = m.prev) !== null && r !== void 0 ? r : null), m.prev = f === 0 ? c : i[f - 1], m.next = f === i.length - 1 ? h : i[f + 1];
3014
3014
  }
3015
3015
  return c && (c.next = i[0]), h && (h.prev = i[i.length - 1]), e.splice(...o);
3016
3016
  }
3017
- function Rc(e) {
3017
+ function vc(e) {
3018
3018
  return (Xe(e) ? e : this._make(e)).append(this), this;
3019
3019
  }
3020
- function vc(e) {
3020
+ function Rc(e) {
3021
3021
  return (Xe(e) ? e : this._make(e)).prepend(this), this;
3022
3022
  }
3023
3023
  const yc = Bn((e, t, a) => {
@@ -3030,7 +3030,7 @@ function Un(e) {
3030
3030
  const a = this.length - 1, i = this.parents().last();
3031
3031
  for (let s = 0; s < this.length; s++) {
3032
3032
  const u = this[s], r = typeof t == "function" ? t.call(u, s, u) : typeof t == "string" && !si(t) ? i.find(t).clone() : t, [o] = this._makeDomArray(r, s < a);
3033
- if (!o || !me(o))
3033
+ if (!o || !Te(o))
3034
3034
  continue;
3035
3035
  let c = o, h = 0;
3036
3036
  for (; h < c.children.length; ) {
@@ -3049,7 +3049,7 @@ const Pc = Un((e, t, a) => {
3049
3049
  const s = i.children, u = s.indexOf(e);
3050
3050
  ft([e], t), it(s, u, 0, a, i);
3051
3051
  }), kc = Un((e, t, a) => {
3052
- me(e) && (ft(e.children, t), ft(a, e));
3052
+ Te(e) && (ft(e.children, t), ft(a, e));
3053
3053
  });
3054
3054
  function wc(e) {
3055
3055
  return this.parent(e).not("body").each((t, a) => {
@@ -3074,8 +3074,8 @@ function Bc(e) {
3074
3074
  }
3075
3075
  function Uc(...e) {
3076
3076
  const t = this.length - 1;
3077
- return ne(this, (a, i) => {
3078
- if (!me(a) || !a.parent)
3077
+ return re(this, (a, i) => {
3078
+ if (!Te(a) || !a.parent)
3079
3079
  return;
3080
3080
  const s = a.parent.children, u = s.indexOf(a);
3081
3081
  if (u < 0)
@@ -3098,8 +3098,8 @@ function Fc(e) {
3098
3098
  }
3099
3099
  function Hc(...e) {
3100
3100
  const t = this.length - 1;
3101
- return ne(this, (a, i) => {
3102
- if (!me(a) || !a.parent)
3101
+ return re(this, (a, i) => {
3102
+ if (!Te(a) || !a.parent)
3103
3103
  return;
3104
3104
  const s = a.parent.children, u = s.indexOf(a);
3105
3105
  if (u < 0)
@@ -3112,7 +3112,7 @@ function Yc(e) {
3112
3112
  const t = this._make(e);
3113
3113
  this.remove();
3114
3114
  const a = [];
3115
- return ne(t, (i) => {
3115
+ return re(t, (i) => {
3116
3116
  const s = this.clone().toArray(), { parent: u } = i;
3117
3117
  if (!u)
3118
3118
  return;
@@ -3122,12 +3122,12 @@ function Yc(e) {
3122
3122
  }
3123
3123
  function qc(e) {
3124
3124
  const t = e ? this.filter(e) : this;
3125
- return ne(t, (a) => {
3125
+ return re(t, (a) => {
3126
3126
  mt(a), a.prev = a.next = a.parent = null;
3127
3127
  }), this;
3128
3128
  }
3129
3129
  function Vc(e) {
3130
- return ne(this, (t, a) => {
3130
+ return re(this, (t, a) => {
3131
3131
  const { parent: i } = t;
3132
3132
  if (!i)
3133
3133
  return;
@@ -3138,8 +3138,8 @@ function Vc(e) {
3138
3138
  });
3139
3139
  }
3140
3140
  function Wc() {
3141
- return ne(this, (e) => {
3142
- if (me(e)) {
3141
+ return re(this, (e) => {
3142
+ if (Te(e)) {
3143
3143
  for (const t of e.children)
3144
3144
  t.next = t.prev = t.parent = null;
3145
3145
  e.children.length = 0;
@@ -3149,10 +3149,10 @@ function Wc() {
3149
3149
  function $c(e) {
3150
3150
  if (e === void 0) {
3151
3151
  const t = this[0];
3152
- return !t || !me(t) ? null : this._render(t.children);
3152
+ return !t || !Te(t) ? null : this._render(t.children);
3153
3153
  }
3154
- return ne(this, (t) => {
3155
- if (!me(t))
3154
+ return re(this, (t) => {
3155
+ if (!Te(t))
3156
3156
  return;
3157
3157
  for (const i of t.children)
3158
3158
  i.next = i.prev = i.parent = null;
@@ -3164,8 +3164,8 @@ function Xc() {
3164
3164
  return this._render(this);
3165
3165
  }
3166
3166
  function Gc(e) {
3167
- return e === void 0 ? Kt(this) : typeof e == "function" ? ne(this, (t, a) => this._make(t).text(e.call(t, a, Kt([t])))) : ne(this, (t) => {
3168
- if (!me(t))
3167
+ return e === void 0 ? Kt(this) : typeof e == "function" ? re(this, (t, a) => this._make(t).text(e.call(t, a, Kt([t])))) : re(this, (t) => {
3168
+ if (!Te(t))
3169
3169
  return;
3170
3170
  for (const i of t.children)
3171
3171
  i.next = i.prev = i.parent = null;
@@ -3184,7 +3184,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3184
3184
  _makeDomArray: Lc,
3185
3185
  after: Uc,
3186
3186
  append: yc,
3187
- appendTo: Rc,
3187
+ appendTo: vc,
3188
3188
  before: Hc,
3189
3189
  clone: Qc,
3190
3190
  empty: Wc,
@@ -3192,7 +3192,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3192
3192
  insertAfter: Fc,
3193
3193
  insertBefore: Yc,
3194
3194
  prepend: Mc,
3195
- prependTo: vc,
3195
+ prependTo: Rc,
3196
3196
  remove: qc,
3197
3197
  replaceWith: Vc,
3198
3198
  text: Gc,
@@ -3205,7 +3205,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3205
3205
  function zc(e, t) {
3206
3206
  if (e != null && t != null || // When `prop` is a "plain" object
3207
3207
  typeof e == "object" && !Array.isArray(e))
3208
- return ne(this, (a, i) => {
3208
+ return re(this, (a, i) => {
3209
3209
  k(a) && Fn(a, e, t, i);
3210
3210
  });
3211
3211
  if (this.length !== 0)
@@ -3344,8 +3344,8 @@ function rl(e, t) {
3344
3344
  const A = h(m, T);
3345
3345
  return A.prevObject = this, A;
3346
3346
  }
3347
- _parse(m, T, A, C) {
3348
- return e(m, T, A, C);
3347
+ _parse(m, T, A, I) {
3348
+ return e(m, T, A, I);
3349
3349
  }
3350
3350
  _render(m) {
3351
3351
  return t(m, this.options);
@@ -3354,19 +3354,19 @@ function rl(e, t) {
3354
3354
  function h(f, m, T = o, A) {
3355
3355
  if (f && Xe(f))
3356
3356
  return f;
3357
- const C = ii(A, r), L = typeof T == "string" ? [e(T, C, !1, null)] : "length" in T ? T : [T], M = Xe(L) ? L : new c(L, null, C);
3357
+ const I = ii(A, r), L = typeof T == "string" ? [e(T, I, !1, null)] : "length" in T ? T : [T], M = Xe(L) ? L : new c(L, null, I);
3358
3358
  if (M._root = M, !f)
3359
- return new c(void 0, M, C);
3359
+ return new c(void 0, M, I);
3360
3360
  const X = typeof f == "string" && si(f) ? (
3361
3361
  // $(<html>)
3362
- e(f, C, !1, null).children
3362
+ e(f, I, !1, null).children
3363
3363
  ) : ol(f) ? (
3364
3364
  // $(dom)
3365
3365
  [f]
3366
3366
  ) : Array.isArray(f) ? (
3367
3367
  // $([dom])
3368
3368
  f
3369
- ) : void 0, U = new c(X, M, C);
3369
+ ) : void 0, U = new c(X, M, I);
3370
3370
  if (X)
3371
3371
  return U;
3372
3372
  if (typeof f != "string")
@@ -3376,7 +3376,7 @@ function rl(e, t) {
3376
3376
  // If we don't have a context, maybe we have a root, from loading
3377
3377
  typeof m == "string" ? si(m) ? (
3378
3378
  // $('li', '<ul>...</ul>')
3379
- new c([e(m, C, !1, null)], M, C)
3379
+ new c([e(m, I, !1, null)], M, I)
3380
3380
  ) : (
3381
3381
  // $('li', 'ul')
3382
3382
  ($ = `${m} ${$}`, M)
@@ -3385,7 +3385,7 @@ function rl(e, t) {
3385
3385
  m
3386
3386
  ) : (
3387
3387
  // $('li', node), $('li', [nodes])
3388
- new c(Array.isArray(m) ? m : [m], M, C)
3388
+ new c(Array.isArray(m) ? m : [m], M, I)
3389
3389
  )
3390
3390
  ) : M;
3391
3391
  return F ? F.find($) : U;
@@ -3573,10 +3573,10 @@ var ht;
3573
3573
  (function(e) {
3574
3574
  e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
3575
3575
  })(ht || (ht = {}));
3576
- var De;
3576
+ var Le;
3577
3577
  (function(e) {
3578
3578
  e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
3579
- })(De || (De = {}));
3579
+ })(Le || (Le = {}));
3580
3580
  var p;
3581
3581
  (function(e) {
3582
3582
  e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SEARCH = "search", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp";
@@ -3714,96 +3714,96 @@ function ka(e) {
3714
3714
  var t;
3715
3715
  return (t = El.get(e)) !== null && t !== void 0 ? t : n.UNKNOWN;
3716
3716
  }
3717
- const I = n, ml = {
3717
+ const C = n, ml = {
3718
3718
  [_.HTML]: /* @__PURE__ */ new Set([
3719
- I.ADDRESS,
3720
- I.APPLET,
3721
- I.AREA,
3722
- I.ARTICLE,
3723
- I.ASIDE,
3724
- I.BASE,
3725
- I.BASEFONT,
3726
- I.BGSOUND,
3727
- I.BLOCKQUOTE,
3728
- I.BODY,
3729
- I.BR,
3730
- I.BUTTON,
3731
- I.CAPTION,
3732
- I.CENTER,
3733
- I.COL,
3734
- I.COLGROUP,
3735
- I.DD,
3736
- I.DETAILS,
3737
- I.DIR,
3738
- I.DIV,
3739
- I.DL,
3740
- I.DT,
3741
- I.EMBED,
3742
- I.FIELDSET,
3743
- I.FIGCAPTION,
3744
- I.FIGURE,
3745
- I.FOOTER,
3746
- I.FORM,
3747
- I.FRAME,
3748
- I.FRAMESET,
3749
- I.H1,
3750
- I.H2,
3751
- I.H3,
3752
- I.H4,
3753
- I.H5,
3754
- I.H6,
3755
- I.HEAD,
3756
- I.HEADER,
3757
- I.HGROUP,
3758
- I.HR,
3759
- I.HTML,
3760
- I.IFRAME,
3761
- I.IMG,
3762
- I.INPUT,
3763
- I.LI,
3764
- I.LINK,
3765
- I.LISTING,
3766
- I.MAIN,
3767
- I.MARQUEE,
3768
- I.MENU,
3769
- I.META,
3770
- I.NAV,
3771
- I.NOEMBED,
3772
- I.NOFRAMES,
3773
- I.NOSCRIPT,
3774
- I.OBJECT,
3775
- I.OL,
3776
- I.P,
3777
- I.PARAM,
3778
- I.PLAINTEXT,
3779
- I.PRE,
3780
- I.SCRIPT,
3781
- I.SECTION,
3782
- I.SELECT,
3783
- I.SOURCE,
3784
- I.STYLE,
3785
- I.SUMMARY,
3786
- I.TABLE,
3787
- I.TBODY,
3788
- I.TD,
3789
- I.TEMPLATE,
3790
- I.TEXTAREA,
3791
- I.TFOOT,
3792
- I.TH,
3793
- I.THEAD,
3794
- I.TITLE,
3795
- I.TR,
3796
- I.TRACK,
3797
- I.UL,
3798
- I.WBR,
3799
- I.XMP
3719
+ C.ADDRESS,
3720
+ C.APPLET,
3721
+ C.AREA,
3722
+ C.ARTICLE,
3723
+ C.ASIDE,
3724
+ C.BASE,
3725
+ C.BASEFONT,
3726
+ C.BGSOUND,
3727
+ C.BLOCKQUOTE,
3728
+ C.BODY,
3729
+ C.BR,
3730
+ C.BUTTON,
3731
+ C.CAPTION,
3732
+ C.CENTER,
3733
+ C.COL,
3734
+ C.COLGROUP,
3735
+ C.DD,
3736
+ C.DETAILS,
3737
+ C.DIR,
3738
+ C.DIV,
3739
+ C.DL,
3740
+ C.DT,
3741
+ C.EMBED,
3742
+ C.FIELDSET,
3743
+ C.FIGCAPTION,
3744
+ C.FIGURE,
3745
+ C.FOOTER,
3746
+ C.FORM,
3747
+ C.FRAME,
3748
+ C.FRAMESET,
3749
+ C.H1,
3750
+ C.H2,
3751
+ C.H3,
3752
+ C.H4,
3753
+ C.H5,
3754
+ C.H6,
3755
+ C.HEAD,
3756
+ C.HEADER,
3757
+ C.HGROUP,
3758
+ C.HR,
3759
+ C.HTML,
3760
+ C.IFRAME,
3761
+ C.IMG,
3762
+ C.INPUT,
3763
+ C.LI,
3764
+ C.LINK,
3765
+ C.LISTING,
3766
+ C.MAIN,
3767
+ C.MARQUEE,
3768
+ C.MENU,
3769
+ C.META,
3770
+ C.NAV,
3771
+ C.NOEMBED,
3772
+ C.NOFRAMES,
3773
+ C.NOSCRIPT,
3774
+ C.OBJECT,
3775
+ C.OL,
3776
+ C.P,
3777
+ C.PARAM,
3778
+ C.PLAINTEXT,
3779
+ C.PRE,
3780
+ C.SCRIPT,
3781
+ C.SECTION,
3782
+ C.SELECT,
3783
+ C.SOURCE,
3784
+ C.STYLE,
3785
+ C.SUMMARY,
3786
+ C.TABLE,
3787
+ C.TBODY,
3788
+ C.TD,
3789
+ C.TEMPLATE,
3790
+ C.TEXTAREA,
3791
+ C.TFOOT,
3792
+ C.TH,
3793
+ C.THEAD,
3794
+ C.TITLE,
3795
+ C.TR,
3796
+ C.TRACK,
3797
+ C.UL,
3798
+ C.WBR,
3799
+ C.XMP
3800
3800
  ]),
3801
- [_.MATHML]: /* @__PURE__ */ new Set([I.MI, I.MO, I.MN, I.MS, I.MTEXT, I.ANNOTATION_XML]),
3802
- [_.SVG]: /* @__PURE__ */ new Set([I.TITLE, I.FOREIGN_OBJECT, I.DESC]),
3801
+ [_.MATHML]: /* @__PURE__ */ new Set([C.MI, C.MO, C.MN, C.MS, C.MTEXT, C.ANNOTATION_XML]),
3802
+ [_.SVG]: /* @__PURE__ */ new Set([C.TITLE, C.FOREIGN_OBJECT, C.DESC]),
3803
3803
  [_.XLINK]: /* @__PURE__ */ new Set(),
3804
3804
  [_.XML]: /* @__PURE__ */ new Set(),
3805
3805
  [_.XMLNS]: /* @__PURE__ */ new Set()
3806
- }, li = /* @__PURE__ */ new Set([I.H1, I.H2, I.H3, I.H4, I.H5, I.H6]), Tl = /* @__PURE__ */ new Set([
3806
+ }, li = /* @__PURE__ */ new Set([C.H1, C.H2, C.H3, C.H4, C.H5, C.H6]), Tl = /* @__PURE__ */ new Set([
3807
3807
  p.STYLE,
3808
3808
  p.SCRIPT,
3809
3809
  p.XMP,
@@ -3819,7 +3819,7 @@ var d;
3819
3819
  (function(e) {
3820
3820
  e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
3821
3821
  })(d || (d = {}));
3822
- const Oe = {
3822
+ const De = {
3823
3823
  DATA: d.DATA,
3824
3824
  RCDATA: d.RCDATA,
3825
3825
  RAWTEXT: d.RAWTEXT,
@@ -3856,7 +3856,7 @@ function _l(e) {
3856
3856
  }
3857
3857
  let Al = class {
3858
3858
  constructor(t, a) {
3859
- this.options = t, this.handler = a, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = d.DATA, this.returnState = d.DATA, this.entityStartPos = 0, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = { name: "", value: "" }, this.preprocessor = new fl(a), this.currentLocation = this.getCurrentLocation(-1), this.entityDecoder = new Ri(Li, (i, s) => {
3859
+ this.options = t, this.handler = a, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = d.DATA, this.returnState = d.DATA, this.entityStartPos = 0, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = { name: "", value: "" }, this.preprocessor = new fl(a), this.currentLocation = this.getCurrentLocation(-1), this.entityDecoder = new vi(Li, (i, s) => {
3860
3860
  this.preprocessor.pos = this.entityStartPos + s - 1, this._flushCodePointConsumedAsCharacterReference(i);
3861
3861
  }, a.onParseError ? {
3862
3862
  missingSemicolonAfterCharacterReference: () => {
@@ -5754,7 +5754,7 @@ const Xn = /* @__PURE__ */ new Set([n.DD, n.DT, n.LI, n.OPTGROUP, n.OPTION, n.P,
5754
5754
  n.TH,
5755
5755
  n.THEAD,
5756
5756
  n.TR
5757
- ]), Ia = /* @__PURE__ */ new Set([
5757
+ ]), Ca = /* @__PURE__ */ new Set([
5758
5758
  n.APPLET,
5759
5759
  n.CAPTION,
5760
5760
  n.HTML,
@@ -5764,7 +5764,7 @@ const Xn = /* @__PURE__ */ new Set([n.DD, n.DT, n.LI, n.OPTGROUP, n.OPTION, n.P,
5764
5764
  n.TD,
5765
5765
  n.TEMPLATE,
5766
5766
  n.TH
5767
- ]), Nl = /* @__PURE__ */ new Set([...Ia, n.OL, n.UL]), Cl = /* @__PURE__ */ new Set([...Ia, n.BUTTON]), ps = /* @__PURE__ */ new Set([n.ANNOTATION_XML, n.MI, n.MN, n.MO, n.MS, n.MTEXT]), bs = /* @__PURE__ */ new Set([n.DESC, n.FOREIGN_OBJECT, n.TITLE]), Il = /* @__PURE__ */ new Set([n.TR, n.TEMPLATE, n.HTML]), Sl = /* @__PURE__ */ new Set([n.TBODY, n.TFOOT, n.THEAD, n.TEMPLATE, n.HTML]), xl = /* @__PURE__ */ new Set([n.TABLE, n.TEMPLATE, n.HTML]), Ol = /* @__PURE__ */ new Set([n.TD, n.TH]);
5767
+ ]), Nl = /* @__PURE__ */ new Set([...Ca, n.OL, n.UL]), Il = /* @__PURE__ */ new Set([...Ca, n.BUTTON]), ps = /* @__PURE__ */ new Set([n.ANNOTATION_XML, n.MI, n.MN, n.MO, n.MS, n.MTEXT]), bs = /* @__PURE__ */ new Set([n.DESC, n.FOREIGN_OBJECT, n.TITLE]), Cl = /* @__PURE__ */ new Set([n.TR, n.TEMPLATE, n.HTML]), Sl = /* @__PURE__ */ new Set([n.TBODY, n.TFOOT, n.THEAD, n.TEMPLATE, n.HTML]), xl = /* @__PURE__ */ new Set([n.TABLE, n.TEMPLATE, n.HTML]), Ol = /* @__PURE__ */ new Set([n.TD, n.TH]);
5768
5768
  class Dl {
5769
5769
  get currentTmplContentOrNode() {
5770
5770
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
@@ -5846,7 +5846,7 @@ class Dl {
5846
5846
  this.clearBackTo(Sl, _.HTML);
5847
5847
  }
5848
5848
  clearBackToTableRowContext() {
5849
- this.clearBackTo(Il, _.HTML);
5849
+ this.clearBackTo(Cl, _.HTML);
5850
5850
  }
5851
5851
  remove(t) {
5852
5852
  const a = this._indexOf(t);
@@ -5893,13 +5893,13 @@ class Dl {
5893
5893
  return !0;
5894
5894
  }
5895
5895
  hasInScope(t) {
5896
- return this.hasInDynamicScope(t, Ia);
5896
+ return this.hasInDynamicScope(t, Ca);
5897
5897
  }
5898
5898
  hasInListItemScope(t) {
5899
5899
  return this.hasInDynamicScope(t, Nl);
5900
5900
  }
5901
5901
  hasInButtonScope(t) {
5902
- return this.hasInDynamicScope(t, Cl);
5902
+ return this.hasInDynamicScope(t, Il);
5903
5903
  }
5904
5904
  hasNumberedHeaderInScope() {
5905
5905
  for (let t = this.stackTop; t >= 0; t--) {
@@ -5908,7 +5908,7 @@ class Dl {
5908
5908
  case _.HTML: {
5909
5909
  if (li.has(a))
5910
5910
  return !0;
5911
- if (Ia.has(a))
5911
+ if (Ca.has(a))
5912
5912
  return !1;
5913
5913
  break;
5914
5914
  }
@@ -6066,7 +6066,7 @@ const $e = {
6066
6066
  createDocument() {
6067
6067
  return {
6068
6068
  nodeName: "#document",
6069
- mode: De.NO_QUIRKS,
6069
+ mode: Le.NO_QUIRKS,
6070
6070
  childNodes: []
6071
6071
  };
6072
6072
  },
@@ -6218,7 +6218,7 @@ const $e = {
6218
6218
  updateNodeSourceCodeLocation(e, t) {
6219
6219
  e.sourceCodeLocation = { ...e.sourceCodeLocation, ...t };
6220
6220
  }
6221
- }, Gn = "html", Rl = "about:legacy-compat", vl = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", Qn = [
6221
+ }, Gn = "html", vl = "about:legacy-compat", Rl = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", Qn = [
6222
6222
  "+//silmaril//dtd html pro v0r11 19970101//",
6223
6223
  "-//as//dtd html 3.0 aswedit + extensions//",
6224
6224
  "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
@@ -6291,25 +6291,25 @@ function _s(e, t) {
6291
6291
  return t.some((a) => e.startsWith(a));
6292
6292
  }
6293
6293
  function kl(e) {
6294
- return e.name === Gn && e.publicId === null && (e.systemId === null || e.systemId === Rl);
6294
+ return e.name === Gn && e.publicId === null && (e.systemId === null || e.systemId === vl);
6295
6295
  }
6296
6296
  function wl(e) {
6297
6297
  if (e.name !== Gn)
6298
- return De.QUIRKS;
6298
+ return Le.QUIRKS;
6299
6299
  const { systemId: t } = e;
6300
- if (t && t.toLowerCase() === vl)
6301
- return De.QUIRKS;
6300
+ if (t && t.toLowerCase() === Rl)
6301
+ return Le.QUIRKS;
6302
6302
  let { publicId: a } = e;
6303
6303
  if (a !== null) {
6304
6304
  if (a = a.toLowerCase(), Ml.has(a))
6305
- return De.QUIRKS;
6305
+ return Le.QUIRKS;
6306
6306
  let i = t === null ? yl : Qn;
6307
6307
  if (_s(a, i))
6308
- return De.QUIRKS;
6308
+ return Le.QUIRKS;
6309
6309
  if (i = t === null ? jn : Pl, _s(a, i))
6310
- return De.LIMITED_QUIRKS;
6310
+ return Le.LIMITED_QUIRKS;
6311
6311
  }
6312
- return De.NO_QUIRKS;
6312
+ return Le.NO_QUIRKS;
6313
6313
  }
6314
6314
  const As = {
6315
6315
  TEXT_HTML: "text/html",
@@ -6594,7 +6594,7 @@ let Jn = class {
6594
6594
  this._insertElement(t, _.HTML), this.tokenizer.state = a, this.originalInsertionMode = this.insertionMode, this.insertionMode = E.TEXT;
6595
6595
  }
6596
6596
  switchToPlaintextParsing() {
6597
- this.insertionMode = E.TEXT, this.originalInsertionMode = E.IN_BODY, this.tokenizer.state = Oe.PLAINTEXT;
6597
+ this.insertionMode = E.TEXT, this.originalInsertionMode = E.IN_BODY, this.tokenizer.state = De.PLAINTEXT;
6598
6598
  }
6599
6599
  //Fragment parsing
6600
6600
  /** @protected */
@@ -6617,7 +6617,7 @@ let Jn = class {
6617
6617
  switch (this.fragmentContextID) {
6618
6618
  case n.TITLE:
6619
6619
  case n.TEXTAREA: {
6620
- this.tokenizer.state = Oe.RCDATA;
6620
+ this.tokenizer.state = De.RCDATA;
6621
6621
  break;
6622
6622
  }
6623
6623
  case n.STYLE:
@@ -6626,15 +6626,15 @@ let Jn = class {
6626
6626
  case n.NOEMBED:
6627
6627
  case n.NOFRAMES:
6628
6628
  case n.NOSCRIPT: {
6629
- this.tokenizer.state = Oe.RAWTEXT;
6629
+ this.tokenizer.state = De.RAWTEXT;
6630
6630
  break;
6631
6631
  }
6632
6632
  case n.SCRIPT: {
6633
- this.tokenizer.state = Oe.SCRIPT_DATA;
6633
+ this.tokenizer.state = De.SCRIPT_DATA;
6634
6634
  break;
6635
6635
  }
6636
6636
  case n.PLAINTEXT: {
6637
- this.tokenizer.state = Oe.PLAINTEXT;
6637
+ this.tokenizer.state = De.PLAINTEXT;
6638
6638
  break;
6639
6639
  }
6640
6640
  }
@@ -7159,7 +7159,7 @@ let Jn = class {
7159
7159
  break;
7160
7160
  }
7161
7161
  case E.IN_BODY: {
7162
- pe(this, t);
7162
+ be(this, t);
7163
7163
  break;
7164
7164
  }
7165
7165
  case E.IN_TABLE: {
@@ -7215,7 +7215,7 @@ let Jn = class {
7215
7215
  break;
7216
7216
  }
7217
7217
  case E.AFTER_AFTER_BODY: {
7218
- Ih(this, t);
7218
+ Ch(this, t);
7219
7219
  break;
7220
7220
  }
7221
7221
  case E.AFTER_AFTER_FRAMESET: {
@@ -7312,7 +7312,7 @@ let Jn = class {
7312
7312
  break;
7313
7313
  }
7314
7314
  case E.AFTER_FRAMESET: {
7315
- Ch(this, t);
7315
+ Ih(this, t);
7316
7316
  break;
7317
7317
  }
7318
7318
  case E.AFTER_AFTER_BODY: {
@@ -7507,11 +7507,11 @@ function $i(e, t) {
7507
7507
  }
7508
7508
  function u0(e, t) {
7509
7509
  e._setDocumentType(t);
7510
- const a = t.forceQuirks ? De.QUIRKS : wl(t);
7510
+ const a = t.forceQuirks ? Le.QUIRKS : wl(t);
7511
7511
  kl(t) || e._err(t, b.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, a), e.insertionMode = E.BEFORE_HTML;
7512
7512
  }
7513
7513
  function Pt(e, t) {
7514
- e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, De.QUIRKS), e.insertionMode = E.BEFORE_HTML, e._processToken(t);
7514
+ e._err(t, b.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Le.QUIRKS), e.insertionMode = E.BEFORE_HTML, e._processToken(t);
7515
7515
  }
7516
7516
  function r0(e, t) {
7517
7517
  t.tagID === n.HTML ? (e._insertElement(t, _.HTML), e.insertionMode = E.BEFORE_HEAD) : Vt(e, t);
@@ -7526,7 +7526,7 @@ function Vt(e, t) {
7526
7526
  function c0(e, t) {
7527
7527
  switch (t.tagID) {
7528
7528
  case n.HTML: {
7529
- pe(e, t);
7529
+ be(e, t);
7530
7530
  break;
7531
7531
  }
7532
7532
  case n.HEAD: {
@@ -7547,7 +7547,7 @@ function Wt(e, t) {
7547
7547
  function Be(e, t) {
7548
7548
  switch (t.tagID) {
7549
7549
  case n.HTML: {
7550
- pe(e, t);
7550
+ be(e, t);
7551
7551
  break;
7552
7552
  }
7553
7553
  case n.BASE:
@@ -7559,20 +7559,20 @@ function Be(e, t) {
7559
7559
  break;
7560
7560
  }
7561
7561
  case n.TITLE: {
7562
- e._switchToTextParsing(t, Oe.RCDATA);
7562
+ e._switchToTextParsing(t, De.RCDATA);
7563
7563
  break;
7564
7564
  }
7565
7565
  case n.NOSCRIPT: {
7566
- e.options.scriptingEnabled ? e._switchToTextParsing(t, Oe.RAWTEXT) : (e._insertElement(t, _.HTML), e.insertionMode = E.IN_HEAD_NO_SCRIPT);
7566
+ e.options.scriptingEnabled ? e._switchToTextParsing(t, De.RAWTEXT) : (e._insertElement(t, _.HTML), e.insertionMode = E.IN_HEAD_NO_SCRIPT);
7567
7567
  break;
7568
7568
  }
7569
7569
  case n.NOFRAMES:
7570
7570
  case n.STYLE: {
7571
- e._switchToTextParsing(t, Oe.RAWTEXT);
7571
+ e._switchToTextParsing(t, De.RAWTEXT);
7572
7572
  break;
7573
7573
  }
7574
7574
  case n.SCRIPT: {
7575
- e._switchToTextParsing(t, Oe.SCRIPT_DATA);
7575
+ e._switchToTextParsing(t, De.SCRIPT_DATA);
7576
7576
  break;
7577
7577
  }
7578
7578
  case n.TEMPLATE: {
@@ -7616,7 +7616,7 @@ function $t(e, t) {
7616
7616
  function d0(e, t) {
7617
7617
  switch (t.tagID) {
7618
7618
  case n.HTML: {
7619
- pe(e, t);
7619
+ be(e, t);
7620
7620
  break;
7621
7621
  }
7622
7622
  case n.BASEFONT:
@@ -7658,7 +7658,7 @@ function Xt(e, t) {
7658
7658
  function E0(e, t) {
7659
7659
  switch (t.tagID) {
7660
7660
  case n.HTML: {
7661
- pe(e, t);
7661
+ be(e, t);
7662
7662
  break;
7663
7663
  }
7664
7664
  case n.BODY: {
@@ -7724,7 +7724,7 @@ function wa(e, t) {
7724
7724
  break;
7725
7725
  }
7726
7726
  case G.START_TAG: {
7727
- pe(e, t);
7727
+ be(e, t);
7728
7728
  break;
7729
7729
  }
7730
7730
  case G.END_TAG: {
@@ -7767,7 +7767,7 @@ function N0(e, t) {
7767
7767
  const a = e.openElements.tmplCount > 0;
7768
7768
  (!e.formElement || a) && (e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), a || (e.formElement = e.openElements.current));
7769
7769
  }
7770
- function C0(e, t) {
7770
+ function I0(e, t) {
7771
7771
  e.framesetOk = !1;
7772
7772
  const a = t.tagID;
7773
7773
  for (let i = e.openElements.stackTop; i >= 0; i--) {
@@ -7781,8 +7781,8 @@ function C0(e, t) {
7781
7781
  }
7782
7782
  e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML);
7783
7783
  }
7784
- function I0(e, t) {
7785
- e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.tokenizer.state = Oe.PLAINTEXT;
7784
+ function C0(e, t) {
7785
+ e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.tokenizer.state = De.PLAINTEXT;
7786
7786
  }
7787
7787
  function S0(e, t) {
7788
7788
  e.openElements.hasInScope(n.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.framesetOk = !1;
@@ -7800,8 +7800,8 @@ function D0(e, t) {
7800
7800
  function L0(e, t) {
7801
7801
  e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
7802
7802
  }
7803
- function R0(e, t) {
7804
- e.treeAdapter.getDocumentMode(e.document) !== De.QUIRKS && e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = E.IN_TABLE;
7803
+ function v0(e, t) {
7804
+ e.treeAdapter.getDocumentMode(e.document) !== Le.QUIRKS && e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = E.IN_TABLE;
7805
7805
  }
7806
7806
  function au(e, t) {
7807
7807
  e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
@@ -7810,7 +7810,7 @@ function iu(e) {
7810
7810
  const t = Wn(e, ht.TYPE);
7811
7811
  return t != null && t.toLowerCase() === Ql;
7812
7812
  }
7813
- function v0(e, t) {
7813
+ function R0(e, t) {
7814
7814
  e._reconstructActiveFormattingElements(), e._appendElement(t, _.HTML), iu(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
7815
7815
  }
7816
7816
  function y0(e, t) {
@@ -7823,16 +7823,16 @@ function P0(e, t) {
7823
7823
  t.tagName = p.IMG, t.tagID = n.IMG, au(e, t);
7824
7824
  }
7825
7825
  function k0(e, t) {
7826
- e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.tokenizer.state = Oe.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = E.TEXT;
7826
+ e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.tokenizer.state = De.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = E.TEXT;
7827
7827
  }
7828
7828
  function w0(e, t) {
7829
- e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, Oe.RAWTEXT);
7829
+ e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, De.RAWTEXT);
7830
7830
  }
7831
7831
  function B0(e, t) {
7832
- e.framesetOk = !1, e._switchToTextParsing(t, Oe.RAWTEXT);
7832
+ e.framesetOk = !1, e._switchToTextParsing(t, De.RAWTEXT);
7833
7833
  }
7834
- function Cs(e, t) {
7835
- e._switchToTextParsing(t, Oe.RAWTEXT);
7834
+ function Is(e, t) {
7835
+ e._switchToTextParsing(t, De.RAWTEXT);
7836
7836
  }
7837
7837
  function U0(e, t) {
7838
7838
  e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === E.IN_TABLE || e.insertionMode === E.IN_CAPTION || e.insertionMode === E.IN_TABLE_BODY || e.insertionMode === E.IN_ROW || e.insertionMode === E.IN_CELL ? E.IN_SELECT_IN_TABLE : E.IN_SELECT;
@@ -7852,10 +7852,10 @@ function q0(e, t) {
7852
7852
  function V0(e, t) {
7853
7853
  e._reconstructActiveFormattingElements(), Kn(t), Vi(t), t.selfClosing ? e._appendElement(t, _.SVG) : e._insertElement(t, _.SVG), t.ackSelfClosing = !0;
7854
7854
  }
7855
- function Is(e, t) {
7855
+ function Cs(e, t) {
7856
7856
  e._reconstructActiveFormattingElements(), e._insertElement(t, _.HTML);
7857
7857
  }
7858
- function pe(e, t) {
7858
+ function be(e, t) {
7859
7859
  switch (t.tagID) {
7860
7860
  case n.I:
7861
7861
  case n.S:
@@ -7916,7 +7916,7 @@ function pe(e, t) {
7916
7916
  case n.LI:
7917
7917
  case n.DD:
7918
7918
  case n.DT: {
7919
- C0(e, t);
7919
+ I0(e, t);
7920
7920
  break;
7921
7921
  }
7922
7922
  case n.BR:
@@ -7988,11 +7988,11 @@ function pe(e, t) {
7988
7988
  break;
7989
7989
  }
7990
7990
  case n.TABLE: {
7991
- R0(e, t);
7991
+ v0(e, t);
7992
7992
  break;
7993
7993
  }
7994
7994
  case n.INPUT: {
7995
- v0(e, t);
7995
+ R0(e, t);
7996
7996
  break;
7997
7997
  }
7998
7998
  case n.PARAM:
@@ -8030,7 +8030,7 @@ function pe(e, t) {
8030
8030
  }
8031
8031
  case n.NOEMBED:
8032
8032
  case n.NOFRAMES: {
8033
- Cs(e, t);
8033
+ Is(e, t);
8034
8034
  break;
8035
8035
  }
8036
8036
  case n.FRAMESET: {
@@ -8042,11 +8042,11 @@ function pe(e, t) {
8042
8042
  break;
8043
8043
  }
8044
8044
  case n.NOSCRIPT: {
8045
- e.options.scriptingEnabled ? Cs(e, t) : Is(e, t);
8045
+ e.options.scriptingEnabled ? Is(e, t) : Cs(e, t);
8046
8046
  break;
8047
8047
  }
8048
8048
  case n.PLAINTEXT: {
8049
- I0(e, t);
8049
+ C0(e, t);
8050
8050
  break;
8051
8051
  }
8052
8052
  case n.COL:
@@ -8062,7 +8062,7 @@ function pe(e, t) {
8062
8062
  case n.COLGROUP:
8063
8063
  break;
8064
8064
  default:
8065
- Is(e, t);
8065
+ Cs(e, t);
8066
8066
  }
8067
8067
  }
8068
8068
  function W0(e, t) {
@@ -8361,7 +8361,7 @@ function kt(e, t) {
8361
8361
  const ou = /* @__PURE__ */ new Set([n.CAPTION, n.COL, n.COLGROUP, n.TBODY, n.TD, n.TFOOT, n.TH, n.THEAD, n.TR]);
8362
8362
  function lh(e, t) {
8363
8363
  const a = t.tagID;
8364
- ou.has(a) ? e.openElements.hasInTableScope(n.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = E.IN_TABLE, Dt(e, t)) : pe(e, t);
8364
+ ou.has(a) ? e.openElements.hasInTableScope(n.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = E.IN_TABLE, Dt(e, t)) : be(e, t);
8365
8365
  }
8366
8366
  function hh(e, t) {
8367
8367
  const a = t.tagID;
@@ -8389,7 +8389,7 @@ function hh(e, t) {
8389
8389
  function Xi(e, t) {
8390
8390
  switch (t.tagID) {
8391
8391
  case n.HTML: {
8392
- pe(e, t);
8392
+ be(e, t);
8393
8393
  break;
8394
8394
  }
8395
8395
  case n.COL: {
@@ -8524,7 +8524,7 @@ function cu(e, t) {
8524
8524
  }
8525
8525
  function fh(e, t) {
8526
8526
  const a = t.tagID;
8527
- ou.has(a) ? (e.openElements.hasInTableScope(n.TD) || e.openElements.hasInTableScope(n.TH)) && (e._closeTableCell(), Fa(e, t)) : pe(e, t);
8527
+ ou.has(a) ? (e.openElements.hasInTableScope(n.TD) || e.openElements.hasInTableScope(n.TH)) && (e._closeTableCell(), Fa(e, t)) : be(e, t);
8528
8528
  }
8529
8529
  function Eh(e, t) {
8530
8530
  const a = t.tagID;
@@ -8555,7 +8555,7 @@ function Eh(e, t) {
8555
8555
  function lu(e, t) {
8556
8556
  switch (t.tagID) {
8557
8557
  case n.HTML: {
8558
- pe(e, t);
8558
+ be(e, t);
8559
8559
  break;
8560
8560
  }
8561
8561
  case n.OPTION: {
@@ -8649,7 +8649,7 @@ function ph(e, t) {
8649
8649
  break;
8650
8650
  }
8651
8651
  default:
8652
- e.tmplInsertionModeStack[0] = E.IN_BODY, e.insertionMode = E.IN_BODY, pe(e, t);
8652
+ e.tmplInsertionModeStack[0] = E.IN_BODY, e.insertionMode = E.IN_BODY, be(e, t);
8653
8653
  }
8654
8654
  }
8655
8655
  function bh(e, t) {
@@ -8659,7 +8659,7 @@ function du(e, t) {
8659
8659
  e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(n.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : $i(e, t);
8660
8660
  }
8661
8661
  function gh(e, t) {
8662
- t.tagID === n.HTML ? pe(e, t) : xa(e, t);
8662
+ t.tagID === n.HTML ? be(e, t) : xa(e, t);
8663
8663
  }
8664
8664
  function fu(e, t) {
8665
8665
  var a;
@@ -8678,7 +8678,7 @@ function xa(e, t) {
8678
8678
  function _h(e, t) {
8679
8679
  switch (t.tagID) {
8680
8680
  case n.HTML: {
8681
- pe(e, t);
8681
+ be(e, t);
8682
8682
  break;
8683
8683
  }
8684
8684
  case n.FRAMESET: {
@@ -8701,7 +8701,7 @@ function Ah(e, t) {
8701
8701
  function Nh(e, t) {
8702
8702
  switch (t.tagID) {
8703
8703
  case n.HTML: {
8704
- pe(e, t);
8704
+ be(e, t);
8705
8705
  break;
8706
8706
  }
8707
8707
  case n.NOFRAMES: {
@@ -8710,11 +8710,11 @@ function Nh(e, t) {
8710
8710
  }
8711
8711
  }
8712
8712
  }
8713
- function Ch(e, t) {
8713
+ function Ih(e, t) {
8714
8714
  t.tagID === n.HTML && (e.insertionMode = E.AFTER_AFTER_FRAMESET);
8715
8715
  }
8716
- function Ih(e, t) {
8717
- t.tagID === n.HTML ? pe(e, t) : ma(e, t);
8716
+ function Ch(e, t) {
8717
+ t.tagID === n.HTML ? be(e, t) : ma(e, t);
8718
8718
  }
8719
8719
  function ma(e, t) {
8720
8720
  e.insertionMode = E.IN_BODY, wa(e, t);
@@ -8722,7 +8722,7 @@ function ma(e, t) {
8722
8722
  function Sh(e, t) {
8723
8723
  switch (t.tagID) {
8724
8724
  case n.HTML: {
8725
- pe(e, t);
8725
+ be(e, t);
8726
8726
  break;
8727
8727
  }
8728
8728
  case n.NOFRAMES: {
@@ -8767,7 +8767,7 @@ function Lh(e, t) {
8767
8767
  }
8768
8768
  }
8769
8769
  }
8770
- const Rh = /* @__PURE__ */ new Set([
8770
+ const vh = /* @__PURE__ */ new Set([
8771
8771
  p.AREA,
8772
8772
  p.BASE,
8773
8773
  p.BASEFONT,
@@ -8787,8 +8787,8 @@ const Rh = /* @__PURE__ */ new Set([
8787
8787
  p.TRACK,
8788
8788
  p.WBR
8789
8789
  ]);
8790
- function vh(e, t) {
8791
- return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === _.HTML && Rh.has(t.treeAdapter.getTagName(e));
8790
+ function Rh(e, t) {
8791
+ return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === _.HTML && vh.has(t.treeAdapter.getTagName(e));
8792
8792
  }
8793
8793
  const yh = { treeAdapter: $e, scriptingEnabled: !0 };
8794
8794
  function Mh(e, t) {
@@ -8808,7 +8808,7 @@ function mu(e, t) {
8808
8808
  }
8809
8809
  function kh(e, t) {
8810
8810
  const a = t.treeAdapter.getTagName(e);
8811
- return `<${a}${wh(e, t)}>${vh(e, t) ? "" : `${Ph(e, t)}</${a}>`}`;
8811
+ return `<${a}${wh(e, t)}>${Rh(e, t) ? "" : `${Ph(e, t)}</${a}>`}`;
8812
8812
  }
8813
8813
  function wh(e, { treeAdapter: t }) {
8814
8814
  let a = "";
@@ -8870,7 +8870,7 @@ const ze = {
8870
8870
  //Node construction
8871
8871
  createDocument() {
8872
8872
  const e = new dt([]);
8873
- return e["x-mode"] = De.NO_QUIRKS, e;
8873
+ return e["x-mode"] = Le.NO_QUIRKS, e;
8874
8874
  },
8875
8875
  createDocumentFragment() {
8876
8876
  return new dt([]);
@@ -9010,28 +9010,28 @@ function $h(e) {
9010
9010
  }
9011
9011
  return a;
9012
9012
  }
9013
- var v;
9013
+ var R;
9014
9014
  (function(e) {
9015
9015
  e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
9016
- })(v || (v = {}));
9016
+ })(R || (R = {}));
9017
9017
  var N;
9018
9018
  (function(e) {
9019
9019
  e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
9020
9020
  })(N || (N = {}));
9021
9021
  function We(e) {
9022
- return e === v.Space || e === v.NewLine || e === v.Tab || e === v.FormFeed || e === v.CarriageReturn;
9022
+ return e === R.Space || e === R.NewLine || e === R.Tab || e === R.FormFeed || e === R.CarriageReturn;
9023
9023
  }
9024
9024
  function la(e) {
9025
- return e === v.Slash || e === v.Gt || We(e);
9025
+ return e === R.Slash || e === R.Gt || We(e);
9026
9026
  }
9027
9027
  function Xh(e) {
9028
- return e >= v.LowerA && e <= v.LowerZ || e >= v.UpperA && e <= v.UpperZ;
9028
+ return e >= R.LowerA && e <= R.LowerZ || e >= R.UpperA && e <= R.UpperZ;
9029
9029
  }
9030
9030
  var Fe;
9031
9031
  (function(e) {
9032
9032
  e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
9033
9033
  })(Fe || (Fe = {}));
9034
- const Te = {
9034
+ const pe = {
9035
9035
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
9036
9036
  // CDATA[
9037
9037
  CdataEnd: new Uint8Array([93, 93, 62]),
@@ -9060,7 +9060,7 @@ const Te = {
9060
9060
  };
9061
9061
  class Gh {
9062
9062
  constructor({ xmlMode: t = !1, decodeEntities: a = !0 }, i) {
9063
- this.cbs = i, this.state = N.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = N.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = a, this.entityDecoder = new Ri(t ? en : Li, (s, u) => this.emitCodePoint(s, u));
9063
+ this.cbs = i, this.state = N.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = N.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = a, this.entityDecoder = new vi(t ? en : Li, (s, u) => this.emitCodePoint(s, u));
9064
9064
  }
9065
9065
  reset() {
9066
9066
  this.state = N.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = N.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
@@ -9078,7 +9078,7 @@ class Gh {
9078
9078
  this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
9079
9079
  }
9080
9080
  stateText(t) {
9081
- t === v.Lt || !this.decodeEntities && this.fastForwardTo(v.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = N.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === v.Amp && this.startEntity();
9081
+ t === R.Lt || !this.decodeEntities && this.fastForwardTo(R.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = N.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === R.Amp && this.startEntity();
9082
9082
  }
9083
9083
  stateSpecialStartSequence(t) {
9084
9084
  const a = this.sequenceIndex === this.currentSequence.length;
@@ -9099,7 +9099,7 @@ class Gh {
9099
9099
  /** Look for an end tag. For <title> tags, also decode entities. */
9100
9100
  stateInSpecialTag(t) {
9101
9101
  if (this.sequenceIndex === this.currentSequence.length) {
9102
- if (t === v.Gt || We(t)) {
9102
+ if (t === R.Gt || We(t)) {
9103
9103
  const a = this.index - this.currentSequence.length;
9104
9104
  if (this.sectionStart < a) {
9105
9105
  const i = this.index;
@@ -9110,10 +9110,10 @@ class Gh {
9110
9110
  }
9111
9111
  this.sequenceIndex = 0;
9112
9112
  }
9113
- (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === Te.TitleEnd ? this.decodeEntities && t === v.Amp && this.startEntity() : this.fastForwardTo(v.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === v.Lt);
9113
+ (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === pe.TitleEnd ? this.decodeEntities && t === R.Amp && this.startEntity() : this.fastForwardTo(R.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === R.Lt);
9114
9114
  }
9115
9115
  stateCDATASequence(t) {
9116
- t === Te.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === Te.Cdata.length && (this.state = N.InCommentLike, this.currentSequence = Te.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = N.InDeclaration, this.stateInDeclaration(t));
9116
+ t === pe.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === pe.Cdata.length && (this.state = N.InCommentLike, this.currentSequence = pe.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = N.InDeclaration, this.stateInDeclaration(t));
9117
9117
  }
9118
9118
  /**
9119
9119
  * When we wait for one specific character, we can speed things up
@@ -9136,7 +9136,7 @@ class Gh {
9136
9136
  * - All characters but the start character of the sequence can be skipped.
9137
9137
  */
9138
9138
  stateInCommentLike(t) {
9139
- t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === Te.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = N.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
9139
+ t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === pe.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = N.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
9140
9140
  }
9141
9141
  /**
9142
9142
  * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
@@ -9151,76 +9151,76 @@ class Gh {
9151
9151
  this.isSpecial = !0, this.currentSequence = t, this.sequenceIndex = a, this.state = N.SpecialStartSequence;
9152
9152
  }
9153
9153
  stateBeforeTagName(t) {
9154
- if (t === v.ExclamationMark)
9154
+ if (t === R.ExclamationMark)
9155
9155
  this.state = N.BeforeDeclaration, this.sectionStart = this.index + 1;
9156
- else if (t === v.Questionmark)
9156
+ else if (t === R.Questionmark)
9157
9157
  this.state = N.InProcessingInstruction, this.sectionStart = this.index + 1;
9158
9158
  else if (this.isTagStartChar(t)) {
9159
9159
  const a = t | 32;
9160
- this.sectionStart = this.index, this.xmlMode ? this.state = N.InTagName : a === Te.ScriptEnd[2] ? this.state = N.BeforeSpecialS : a === Te.TitleEnd[2] ? this.state = N.BeforeSpecialT : this.state = N.InTagName;
9161
- } else t === v.Slash ? this.state = N.BeforeClosingTagName : (this.state = N.Text, this.stateText(t));
9160
+ this.sectionStart = this.index, this.xmlMode ? this.state = N.InTagName : a === pe.ScriptEnd[2] ? this.state = N.BeforeSpecialS : a === pe.TitleEnd[2] ? this.state = N.BeforeSpecialT : this.state = N.InTagName;
9161
+ } else t === R.Slash ? this.state = N.BeforeClosingTagName : (this.state = N.Text, this.stateText(t));
9162
9162
  }
9163
9163
  stateInTagName(t) {
9164
9164
  la(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t));
9165
9165
  }
9166
9166
  stateBeforeClosingTagName(t) {
9167
- We(t) || (t === v.Gt ? this.state = N.Text : (this.state = this.isTagStartChar(t) ? N.InClosingTagName : N.InSpecialComment, this.sectionStart = this.index));
9167
+ We(t) || (t === R.Gt ? this.state = N.Text : (this.state = this.isTagStartChar(t) ? N.InClosingTagName : N.InSpecialComment, this.sectionStart = this.index));
9168
9168
  }
9169
9169
  stateInClosingTagName(t) {
9170
- (t === v.Gt || We(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = N.AfterClosingTagName, this.stateAfterClosingTagName(t));
9170
+ (t === R.Gt || We(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = N.AfterClosingTagName, this.stateAfterClosingTagName(t));
9171
9171
  }
9172
9172
  stateAfterClosingTagName(t) {
9173
- (t === v.Gt || this.fastForwardTo(v.Gt)) && (this.state = N.Text, this.sectionStart = this.index + 1);
9173
+ (t === R.Gt || this.fastForwardTo(R.Gt)) && (this.state = N.Text, this.sectionStart = this.index + 1);
9174
9174
  }
9175
9175
  stateBeforeAttributeName(t) {
9176
- t === v.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = N.InSpecialTag, this.sequenceIndex = 0) : this.state = N.Text, this.sectionStart = this.index + 1) : t === v.Slash ? this.state = N.InSelfClosingTag : We(t) || (this.state = N.InAttributeName, this.sectionStart = this.index);
9176
+ t === R.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = N.InSpecialTag, this.sequenceIndex = 0) : this.state = N.Text, this.sectionStart = this.index + 1) : t === R.Slash ? this.state = N.InSelfClosingTag : We(t) || (this.state = N.InAttributeName, this.sectionStart = this.index);
9177
9177
  }
9178
9178
  stateInSelfClosingTag(t) {
9179
- t === v.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = N.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : We(t) || (this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t));
9179
+ t === R.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = N.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : We(t) || (this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t));
9180
9180
  }
9181
9181
  stateInAttributeName(t) {
9182
- (t === v.Eq || la(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = N.AfterAttributeName, this.stateAfterAttributeName(t));
9182
+ (t === R.Eq || la(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = N.AfterAttributeName, this.stateAfterAttributeName(t));
9183
9183
  }
9184
9184
  stateAfterAttributeName(t) {
9185
- t === v.Eq ? this.state = N.BeforeAttributeValue : t === v.Slash || t === v.Gt ? (this.cbs.onattribend(Fe.NoValue, this.sectionStart), this.sectionStart = -1, this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t)) : We(t) || (this.cbs.onattribend(Fe.NoValue, this.sectionStart), this.state = N.InAttributeName, this.sectionStart = this.index);
9185
+ t === R.Eq ? this.state = N.BeforeAttributeValue : t === R.Slash || t === R.Gt ? (this.cbs.onattribend(Fe.NoValue, this.sectionStart), this.sectionStart = -1, this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t)) : We(t) || (this.cbs.onattribend(Fe.NoValue, this.sectionStart), this.state = N.InAttributeName, this.sectionStart = this.index);
9186
9186
  }
9187
9187
  stateBeforeAttributeValue(t) {
9188
- t === v.DoubleQuote ? (this.state = N.InAttributeValueDq, this.sectionStart = this.index + 1) : t === v.SingleQuote ? (this.state = N.InAttributeValueSq, this.sectionStart = this.index + 1) : We(t) || (this.sectionStart = this.index, this.state = N.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
9188
+ t === R.DoubleQuote ? (this.state = N.InAttributeValueDq, this.sectionStart = this.index + 1) : t === R.SingleQuote ? (this.state = N.InAttributeValueSq, this.sectionStart = this.index + 1) : We(t) || (this.sectionStart = this.index, this.state = N.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
9189
9189
  }
9190
9190
  handleInAttributeValue(t, a) {
9191
- t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === v.DoubleQuote ? Fe.Double : Fe.Single, this.index + 1), this.state = N.BeforeAttributeName) : this.decodeEntities && t === v.Amp && this.startEntity();
9191
+ t === a || !this.decodeEntities && this.fastForwardTo(a) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(a === R.DoubleQuote ? Fe.Double : Fe.Single, this.index + 1), this.state = N.BeforeAttributeName) : this.decodeEntities && t === R.Amp && this.startEntity();
9192
9192
  }
9193
9193
  stateInAttributeValueDoubleQuotes(t) {
9194
- this.handleInAttributeValue(t, v.DoubleQuote);
9194
+ this.handleInAttributeValue(t, R.DoubleQuote);
9195
9195
  }
9196
9196
  stateInAttributeValueSingleQuotes(t) {
9197
- this.handleInAttributeValue(t, v.SingleQuote);
9197
+ this.handleInAttributeValue(t, R.SingleQuote);
9198
9198
  }
9199
9199
  stateInAttributeValueNoQuotes(t) {
9200
- We(t) || t === v.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Fe.Unquoted, this.index), this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === v.Amp && this.startEntity();
9200
+ We(t) || t === R.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(Fe.Unquoted, this.index), this.state = N.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === R.Amp && this.startEntity();
9201
9201
  }
9202
9202
  stateBeforeDeclaration(t) {
9203
- t === v.OpeningSquareBracket ? (this.state = N.CDATASequence, this.sequenceIndex = 0) : this.state = t === v.Dash ? N.BeforeComment : N.InDeclaration;
9203
+ t === R.OpeningSquareBracket ? (this.state = N.CDATASequence, this.sequenceIndex = 0) : this.state = t === R.Dash ? N.BeforeComment : N.InDeclaration;
9204
9204
  }
9205
9205
  stateInDeclaration(t) {
9206
- (t === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
9206
+ (t === R.Gt || this.fastForwardTo(R.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
9207
9207
  }
9208
9208
  stateInProcessingInstruction(t) {
9209
- (t === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
9209
+ (t === R.Gt || this.fastForwardTo(R.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
9210
9210
  }
9211
9211
  stateBeforeComment(t) {
9212
- t === v.Dash ? (this.state = N.InCommentLike, this.currentSequence = Te.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = N.InDeclaration;
9212
+ t === R.Dash ? (this.state = N.InCommentLike, this.currentSequence = pe.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = N.InDeclaration;
9213
9213
  }
9214
9214
  stateInSpecialComment(t) {
9215
- (t === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = N.Text, this.sectionStart = this.index + 1);
9215
+ (t === R.Gt || this.fastForwardTo(R.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = N.Text, this.sectionStart = this.index + 1);
9216
9216
  }
9217
9217
  stateBeforeSpecialS(t) {
9218
9218
  const a = t | 32;
9219
- a === Te.ScriptEnd[3] ? this.startSpecial(Te.ScriptEnd, 4) : a === Te.StyleEnd[3] ? this.startSpecial(Te.StyleEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9219
+ a === pe.ScriptEnd[3] ? this.startSpecial(pe.ScriptEnd, 4) : a === pe.StyleEnd[3] ? this.startSpecial(pe.StyleEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9220
9220
  }
9221
9221
  stateBeforeSpecialT(t) {
9222
9222
  const a = t | 32;
9223
- a === Te.TitleEnd[3] ? this.startSpecial(Te.TitleEnd, 4) : a === Te.TextareaEnd[3] ? this.startSpecial(Te.TextareaEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9223
+ a === pe.TitleEnd[3] ? this.startSpecial(pe.TitleEnd, 4) : a === pe.TextareaEnd[3] ? this.startSpecial(pe.TextareaEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9224
9224
  }
9225
9225
  startEntity() {
9226
9226
  this.baseState = this.state, this.state = N.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? Pe.Strict : this.baseState === N.Text || this.baseState === N.InSpecialTag ? Pe.Legacy : Pe.Attribute);
@@ -9362,7 +9362,7 @@ class Gh {
9362
9362
  /** Handle any trailing data. */
9363
9363
  handleTrailingData() {
9364
9364
  const t = this.buffer.length + this.offset;
9365
- this.sectionStart >= t || (this.state === N.InCommentLike ? this.currentSequence === Te.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === N.InTagName || this.state === N.BeforeAttributeName || this.state === N.BeforeAttributeValue || this.state === N.AfterAttributeName || this.state === N.InAttributeName || this.state === N.InAttributeValueSq || this.state === N.InAttributeValueDq || this.state === N.InAttributeValueNq || this.state === N.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
9365
+ this.sectionStart >= t || (this.state === N.InCommentLike ? this.currentSequence === pe.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === N.InTagName || this.state === N.BeforeAttributeName || this.state === N.BeforeAttributeValue || this.state === N.AfterAttributeName || this.state === N.InAttributeName || this.state === N.InAttributeValueSq || this.state === N.InAttributeValueDq || this.state === N.InAttributeValueNq || this.state === N.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
9366
9366
  }
9367
9367
  emitCodePoint(t, a) {
9368
9368
  this.baseState !== N.Text && this.baseState !== N.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + a, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + a, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
@@ -9444,7 +9444,7 @@ const bt = /* @__PURE__ */ new Set([
9444
9444
  "source",
9445
9445
  "track",
9446
9446
  "wbr"
9447
- ]), Ls = /* @__PURE__ */ new Set(["math", "svg"]), Rs = /* @__PURE__ */ new Set([
9447
+ ]), Ls = /* @__PURE__ */ new Set(["math", "svg"]), vs = /* @__PURE__ */ new Set([
9448
9448
  "mi",
9449
9449
  "mo",
9450
9450
  "mn",
@@ -9494,7 +9494,7 @@ class Kh {
9494
9494
  const o = this.stack.shift();
9495
9495
  (i = (a = this.cbs).onclosetag) === null || i === void 0 || i.call(a, o, !0);
9496
9496
  }
9497
- this.isVoidElement(t) || (this.stack.unshift(t), this.htmlMode && (Ls.has(t) ? this.foreignContext.unshift(!0) : Rs.has(t) && this.foreignContext.unshift(!1))), (u = (s = this.cbs).onopentagname) === null || u === void 0 || u.call(s, t), this.cbs.onopentag && (this.attribs = {});
9497
+ this.isVoidElement(t) || (this.stack.unshift(t), this.htmlMode && (Ls.has(t) ? this.foreignContext.unshift(!0) : vs.has(t) && this.foreignContext.unshift(!1))), (u = (s = this.cbs).onopentagname) === null || u === void 0 || u.call(s, t), this.cbs.onopentag && (this.attribs = {});
9498
9498
  }
9499
9499
  endOpenTag(t) {
9500
9500
  var a, i;
@@ -9509,14 +9509,14 @@ class Kh {
9509
9509
  var i, s, u, r, o, c, h, f;
9510
9510
  this.endIndex = a;
9511
9511
  let m = this.getSlice(t, a);
9512
- if (this.lowerCaseTagNames && (m = m.toLowerCase()), this.htmlMode && (Ls.has(m) || Rs.has(m)) && this.foreignContext.shift(), this.isVoidElement(m))
9512
+ if (this.lowerCaseTagNames && (m = m.toLowerCase()), this.htmlMode && (Ls.has(m) || vs.has(m)) && this.foreignContext.shift(), this.isVoidElement(m))
9513
9513
  this.htmlMode && m === "br" && ((r = (u = this.cbs).onopentagname) === null || r === void 0 || r.call(u, "br"), (c = (o = this.cbs).onopentag) === null || c === void 0 || c.call(o, "br", {}, !0), (f = (h = this.cbs).onclosetag) === null || f === void 0 || f.call(h, "br", !1));
9514
9514
  else {
9515
9515
  const T = this.stack.indexOf(m);
9516
9516
  if (T !== -1)
9517
9517
  for (let A = 0; A <= T; A++) {
9518
- const C = this.stack.shift();
9519
- (s = (i = this.cbs).onclosetag) === null || s === void 0 || s.call(i, C, A !== T);
9518
+ const I = this.stack.shift();
9519
+ (s = (i = this.cbs).onclosetag) === null || s === void 0 || s.call(i, I, A !== T);
9520
9520
  }
9521
9521
  else this.htmlMode && m === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
9522
9522
  }
@@ -9584,8 +9584,8 @@ class Kh {
9584
9584
  oncdata(t, a, i) {
9585
9585
  var s, u, r, o, c, h, f, m, T, A;
9586
9586
  this.endIndex = a;
9587
- const C = this.getSlice(t, a - i);
9588
- !this.htmlMode || this.options.recognizeCDATA ? ((u = (s = this.cbs).oncdatastart) === null || u === void 0 || u.call(s), (o = (r = this.cbs).ontext) === null || o === void 0 || o.call(r, C), (h = (c = this.cbs).oncdataend) === null || h === void 0 || h.call(c)) : ((m = (f = this.cbs).oncomment) === null || m === void 0 || m.call(f, `[CDATA[${C}]]`), (A = (T = this.cbs).oncommentend) === null || A === void 0 || A.call(T)), this.startIndex = a + 1;
9587
+ const I = this.getSlice(t, a - i);
9588
+ !this.htmlMode || this.options.recognizeCDATA ? ((u = (s = this.cbs).oncdatastart) === null || u === void 0 || u.call(s), (o = (r = this.cbs).ontext) === null || o === void 0 || o.call(r, I), (h = (c = this.cbs).oncdataend) === null || h === void 0 || h.call(c)) : ((m = (f = this.cbs).oncomment) === null || m === void 0 || m.call(f, `[CDATA[${I}]]`), (A = (T = this.cbs).oncommentend) === null || A === void 0 || A.call(T)), this.startIndex = a + 1;
9589
9589
  }
9590
9590
  /** @internal */
9591
9591
  onend() {
@@ -9687,8 +9687,8 @@ function Zh(e, t) {
9687
9687
  const a = new Ju(void 0, t);
9688
9688
  return new Kh(a, t).end(e), a.root;
9689
9689
  }
9690
- const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), vs = rl(Jh, (e, t) => t._useHtmlParser2 ? Ra(e, t) : $h(e));
9691
- var fe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Image = 2] = "Image", e[e.Video = 3] = "Video", e[e.Icon = 4] = "Icon", e[e.Link = 5] = "Link", e[e.Block = 10] = "Block", e))(fe || {});
9690
+ const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), Rs = rl(Jh, (e, t) => t._useHtmlParser2 ? va(e, t) : $h(e));
9691
+ var te = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Image = 2] = "Image", e[e.Video = 3] = "Video", e[e.Icon = 4] = "Icon", e[e.Link = 5] = "Link", e[e.Block = 10] = "Block", e))(te || {});
9692
9692
  const ed = Ge({
9693
9693
  name: "CustomIcon",
9694
9694
  props: {
@@ -9710,13 +9710,13 @@ const ed = Ge({
9710
9710
  };
9711
9711
  function td(e, t, a, i, s, u) {
9712
9712
  return B(), V("span", {
9713
- class: Ci(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
9713
+ class: Ii(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
9714
9714
  }, null, 2);
9715
9715
  }
9716
9716
  const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
9717
9717
  key: 0,
9718
9718
  contenteditable: "false",
9719
- class: /* @__PURE__ */ Ci(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])
9719
+ class: /* @__PURE__ */ Ii(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])
9720
9720
  }, sd = { class: "flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden" }, nd = { class: "flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]" }, ud = { class: "p-8 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, rd = /* @__PURE__ */ Ge({
9721
9721
  __name: "IconModal",
9722
9722
  props: {
@@ -9748,7 +9748,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
9748
9748
  m[1] || (m[1] = S("span", { class: "text-base font-semibold text-[#333]" }, "选择图标", -1)),
9749
9749
  S("span", {
9750
9750
  class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
9751
- onClick: m[0] || (m[0] = re((T) => h(), ["stop"]))
9751
+ onClick: m[0] || (m[0] = ce((T) => h(), ["stop"]))
9752
9752
  })
9753
9753
  ]),
9754
9754
  S("div", ud, [
@@ -9756,7 +9756,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
9756
9756
  key: T,
9757
9757
  class: "w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",
9758
9758
  iconName: T,
9759
- onClick: re((A) => c(T), ["stop"]),
9759
+ onClick: ce((A) => c(T), ["stop"]),
9760
9760
  title: T
9761
9761
  }, null, 8, ["iconName", "onClick", "title"]))), 128))
9762
9762
  ])
@@ -9811,11 +9811,11 @@ const od = /* @__PURE__ */ Ge({
9811
9811
  class: "bg-background-deep box-border cursor-pointer absolute left-0 top-0",
9812
9812
  title: "点击上传"
9813
9813
  }, r.$attrs, {
9814
- onClick: o[2] || (o[2] = re(() => {
9814
+ onClick: o[2] || (o[2] = ce(() => {
9815
9815
  }, ["stop"]))
9816
9816
  }), [
9817
9817
  S("input", {
9818
- onClick: o[0] || (o[0] = re(() => {
9818
+ onClick: o[0] || (o[0] = ce(() => {
9819
9819
  }, ["stop"])),
9820
9820
  contenteditable: "false",
9821
9821
  class: "cursor-pointer w-16 opacity-0",
@@ -9929,7 +9929,7 @@ function Td() {
9929
9929
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
9930
9930
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
9931
9931
  }
9932
- var Ha = typeof window < "u" && typeof window.document < "u", qe = Ha ? window : {}, Gi = Ha && qe.document.documentElement ? "ontouchstart" in qe.document.documentElement : !1, Qi = Ha ? "PointerEvent" in qe : !1, te = "cropper", ji = "all", gu = "crop", _u = "move", Au = "zoom", ut = "e", rt = "w", gt = "s", Qe = "n", wt = "ne", Bt = "nw", Ut = "se", Ft = "sw", mi = "".concat(te, "-crop"), ks = "".concat(te, "-disabled"), xe = "".concat(te, "-hidden"), ws = "".concat(te, "-hide"), pd = "".concat(te, "-invisible"), Oa = "".concat(te, "-modal"), Ti = "".concat(te, "-move"), ta = "".concat(te, "Action"), ha = "".concat(te, "Preview"), zi = "crop", Nu = "move", Cu = "none", pi = "crop", bi = "cropend", gi = "cropmove", _i = "cropstart", Bs = "dblclick", bd = Gi ? "touchstart" : "mousedown", gd = Gi ? "touchmove" : "mousemove", _d = Gi ? "touchend touchcancel" : "mouseup", Us = Qi ? "pointerdown" : bd, Fs = Qi ? "pointermove" : gd, Hs = Qi ? "pointerup pointercancel" : _d, Ys = "ready", qs = "resize", Vs = "wheel", Ai = "zoom", Ws = "image/jpeg", Ad = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Nd = /^data:/, Cd = /^data:image\/jpeg;base64,/, Id = /^img|canvas$/i, Iu = 200, Su = 100, $s = {
9932
+ var Ha = typeof window < "u" && typeof window.document < "u", qe = Ha ? window : {}, Gi = Ha && qe.document.documentElement ? "ontouchstart" in qe.document.documentElement : !1, Qi = Ha ? "PointerEvent" in qe : !1, ae = "cropper", ji = "all", gu = "crop", _u = "move", Au = "zoom", ut = "e", rt = "w", gt = "s", Qe = "n", wt = "ne", Bt = "nw", Ut = "se", Ft = "sw", mi = "".concat(ae, "-crop"), ks = "".concat(ae, "-disabled"), Oe = "".concat(ae, "-hidden"), ws = "".concat(ae, "-hide"), pd = "".concat(ae, "-invisible"), Oa = "".concat(ae, "-modal"), Ti = "".concat(ae, "-move"), ta = "".concat(ae, "Action"), ha = "".concat(ae, "Preview"), zi = "crop", Nu = "move", Iu = "none", pi = "crop", bi = "cropend", gi = "cropmove", _i = "cropstart", Bs = "dblclick", bd = Gi ? "touchstart" : "mousedown", gd = Gi ? "touchmove" : "mousemove", _d = Gi ? "touchend touchcancel" : "mouseup", Us = Qi ? "pointerdown" : bd, Fs = Qi ? "pointermove" : gd, Hs = Qi ? "pointerup pointercancel" : _d, Ys = "ready", qs = "resize", Vs = "wheel", Ai = "zoom", Ws = "image/jpeg", Ad = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Nd = /^data:/, Id = /^data:image\/jpeg;base64,/, Cd = /^img|canvas$/i, Cu = 200, Su = 100, $s = {
9933
9933
  // Define the view mode of the cropper
9934
9934
  viewMode: 0,
9935
9935
  // 0, 1, 2, 3
@@ -9991,7 +9991,7 @@ var Ha = typeof window < "u" && typeof window.document < "u", qe = Ha ? window :
9991
9991
  minCanvasHeight: 0,
9992
9992
  minCropBoxWidth: 0,
9993
9993
  minCropBoxHeight: 0,
9994
- minContainerWidth: Iu,
9994
+ minContainerWidth: Cu,
9995
9995
  minContainerHeight: Su,
9996
9996
  // Shortcuts of events
9997
9997
  ready: null,
@@ -10024,21 +10024,21 @@ function _t(e) {
10024
10024
  return !1;
10025
10025
  }
10026
10026
  }
10027
- function Ie(e) {
10027
+ function Se(e) {
10028
10028
  return typeof e == "function";
10029
10029
  }
10030
10030
  var Dd = Array.prototype.slice;
10031
10031
  function xu(e) {
10032
10032
  return Array.from ? Array.from(e) : Dd.call(e);
10033
10033
  }
10034
- function oe(e, t) {
10035
- return e && Ie(t) && (Array.isArray(e) || W(e.length) ? xu(e).forEach(function(a, i) {
10034
+ function le(e, t) {
10035
+ return e && Se(t) && (Array.isArray(e) || W(e.length) ? xu(e).forEach(function(a, i) {
10036
10036
  t.call(e, a, i, e);
10037
10037
  }) : Et(e) && Object.keys(e).forEach(function(a) {
10038
10038
  t.call(e, e[a], a, e);
10039
10039
  })), e;
10040
10040
  }
10041
- var ae = Object.assign || function(t) {
10041
+ var ie = Object.assign || function(t) {
10042
10042
  for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
10043
10043
  i[s - 1] = arguments[s];
10044
10044
  return Et(t) && i.length > 0 && i.forEach(function(u) {
@@ -10047,25 +10047,25 @@ var ae = Object.assign || function(t) {
10047
10047
  });
10048
10048
  }), t;
10049
10049
  }, Ld = /\.\d*(?:0|9){12}\d*$/;
10050
- function Ct(e) {
10050
+ function It(e) {
10051
10051
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
10052
10052
  return Ld.test(e) ? Math.round(e * t) / t : e;
10053
10053
  }
10054
- var Rd = /^width|height|left|top|marginLeft|marginTop$/;
10054
+ var vd = /^width|height|left|top|marginLeft|marginTop$/;
10055
10055
  function et(e, t) {
10056
10056
  var a = e.style;
10057
- oe(t, function(i, s) {
10058
- Rd.test(s) && W(i) && (i = "".concat(i, "px")), a[s] = i;
10057
+ le(t, function(i, s) {
10058
+ vd.test(s) && W(i) && (i = "".concat(i, "px")), a[s] = i;
10059
10059
  });
10060
10060
  }
10061
- function vd(e, t) {
10061
+ function Rd(e, t) {
10062
10062
  return e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1;
10063
10063
  }
10064
- function de(e, t) {
10064
+ function Ee(e, t) {
10065
10065
  if (t) {
10066
10066
  if (W(e.length)) {
10067
- oe(e, function(i) {
10068
- de(i, t);
10067
+ le(e, function(i) {
10068
+ Ee(i, t);
10069
10069
  });
10070
10070
  return;
10071
10071
  }
@@ -10080,7 +10080,7 @@ function de(e, t) {
10080
10080
  function Ye(e, t) {
10081
10081
  if (t) {
10082
10082
  if (W(e.length)) {
10083
- oe(e, function(a) {
10083
+ le(e, function(a) {
10084
10084
  Ye(a, t);
10085
10085
  });
10086
10086
  return;
@@ -10095,12 +10095,12 @@ function Ye(e, t) {
10095
10095
  function At(e, t, a) {
10096
10096
  if (t) {
10097
10097
  if (W(e.length)) {
10098
- oe(e, function(i) {
10098
+ le(e, function(i) {
10099
10099
  At(i, t, a);
10100
10100
  });
10101
10101
  return;
10102
10102
  }
10103
- a ? de(e, t) : Ye(e, t);
10103
+ a ? Ee(e, t) : Ye(e, t);
10104
10104
  }
10105
10105
  }
10106
10106
  var yd = /([a-z\d])([A-Z])/g;
@@ -10175,9 +10175,9 @@ function ye(e, t, a) {
10175
10175
  e.addEventListener(u, s, i);
10176
10176
  });
10177
10177
  }
10178
- function It(e, t, a) {
10178
+ function Ct(e, t, a) {
10179
10179
  var i;
10180
- return Ie(Event) && Ie(CustomEvent) ? i = new CustomEvent(t, {
10180
+ return Se(Event) && Se(CustomEvent) ? i = new CustomEvent(t, {
10181
10181
  detail: a,
10182
10182
  bubbles: !0,
10183
10183
  cancelable: !0
@@ -10211,8 +10211,8 @@ function Qt(e) {
10211
10211
  }
10212
10212
  function kd(e) {
10213
10213
  var t = Tu({}, e), a = 0;
10214
- return oe(e, function(i, s) {
10215
- delete t[s], oe(t, function(u) {
10214
+ return le(e, function(i, s) {
10215
+ delete t[s], le(t, function(u) {
10216
10216
  var r = Math.abs(i.startX - u.startX), o = Math.abs(i.startY - u.startY), c = Math.abs(i.endX - u.endX), h = Math.abs(i.endY - u.endY), f = Math.sqrt(r * r + o * o), m = Math.sqrt(c * c + h * h), T = (m - f) / f;
10217
10217
  Math.abs(T) > Math.abs(a) && (a = T);
10218
10218
  });
@@ -10230,7 +10230,7 @@ function da(e, t) {
10230
10230
  }
10231
10231
  function wd(e) {
10232
10232
  var t = 0, a = 0, i = 0;
10233
- return oe(e, function(s) {
10233
+ return le(e, function(s) {
10234
10234
  var u = s.startX, r = s.startY;
10235
10235
  t += u, a += r, i += 1;
10236
10236
  }), t /= i, a /= i, {
@@ -10266,45 +10266,45 @@ function Bd(e) {
10266
10266
  };
10267
10267
  }
10268
10268
  function Ud(e, t, a, i) {
10269
- var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = i.imageSmoothingQuality, P = F === void 0 ? "low" : F, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, ce = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Ne = be === void 0 ? 0 : be, Re = i.minHeight, ge = Re === void 0 ? 0 : Re, _e = document.createElement("canvas"), ie = _e.getContext("2d"), ve = tt({
10269
+ var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, I = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = i.imageSmoothingQuality, P = F === void 0 ? "low" : F, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, he = Q === void 0 ? 1 / 0 : Q, ge = i.minWidth, Ie = ge === void 0 ? 0 : ge, ve = i.minHeight, _e = ve === void 0 ? 0 : ve, Ae = document.createElement("canvas"), se = Ae.getContext("2d"), Re = tt({
10270
10270
  aspectRatio: A,
10271
10271
  width: w,
10272
- height: ce
10272
+ height: he
10273
10273
  }), x = tt({
10274
10274
  aspectRatio: A,
10275
- width: Ne,
10276
- height: ge
10277
- }, "cover"), y = Math.min(ve.width, Math.max(x.width, C)), O = Math.min(ve.height, Math.max(x.height, L)), D = tt({
10275
+ width: Ie,
10276
+ height: _e
10277
+ }, "cover"), y = Math.min(Re.width, Math.max(x.width, I)), O = Math.min(Re.height, Math.max(x.height, L)), D = tt({
10278
10278
  aspectRatio: s,
10279
10279
  width: w,
10280
- height: ce
10280
+ height: he
10281
10281
  }), H = tt({
10282
10282
  aspectRatio: s,
10283
- width: Ne,
10284
- height: ge
10285
- }, "cover"), q = Math.min(D.width, Math.max(H.width, u)), J = Math.min(D.height, Math.max(H.height, r)), se = [-q / 2, -J / 2, q, J];
10286
- return _e.width = Ct(y), _e.height = Ct(O), ie.fillStyle = X, ie.fillRect(0, 0, y, O), ie.save(), ie.translate(y / 2, O / 2), ie.rotate(c * Math.PI / 180), ie.scale(f, T), ie.imageSmoothingEnabled = $, ie.imageSmoothingQuality = P, ie.drawImage.apply(ie, [e].concat(bu(se.map(function(ue) {
10287
- return Math.floor(Ct(ue));
10288
- })))), ie.restore(), _e;
10289
- }
10290
- var Ru = String.fromCharCode;
10283
+ width: Ie,
10284
+ height: _e
10285
+ }, "cover"), q = Math.min(D.width, Math.max(H.width, u)), J = Math.min(D.height, Math.max(H.height, r)), ne = [-q / 2, -J / 2, q, J];
10286
+ return Ae.width = It(y), Ae.height = It(O), se.fillStyle = X, se.fillRect(0, 0, y, O), se.save(), se.translate(y / 2, O / 2), se.rotate(c * Math.PI / 180), se.scale(f, T), se.imageSmoothingEnabled = $, se.imageSmoothingQuality = P, se.drawImage.apply(se, [e].concat(bu(ne.map(function(oe) {
10287
+ return Math.floor(It(oe));
10288
+ })))), se.restore(), Ae;
10289
+ }
10290
+ var vu = String.fromCharCode;
10291
10291
  function Fd(e, t, a) {
10292
10292
  var i = "";
10293
10293
  a += t;
10294
10294
  for (var s = t; s < a; s += 1)
10295
- i += Ru(e.getUint8(s));
10295
+ i += vu(e.getUint8(s));
10296
10296
  return i;
10297
10297
  }
10298
10298
  var Hd = /^data:.*,/;
10299
10299
  function Yd(e) {
10300
10300
  var t = e.replace(Hd, ""), a = atob(t), i = new ArrayBuffer(a.length), s = new Uint8Array(i);
10301
- return oe(s, function(u, r) {
10301
+ return le(s, function(u, r) {
10302
10302
  s[r] = a.charCodeAt(r);
10303
10303
  }), i;
10304
10304
  }
10305
10305
  function qd(e, t) {
10306
10306
  for (var a = [], i = 8192, s = new Uint8Array(e); s.length > 0; )
10307
- a.push(Ru.apply(null, xu(s.subarray(0, i)))), s = s.subarray(i);
10307
+ a.push(vu.apply(null, xu(s.subarray(0, i)))), s = s.subarray(i);
10308
10308
  return "data:".concat(t, ";base64,").concat(btoa(a.join("")));
10309
10309
  }
10310
10310
  function Vd(e) {
@@ -10330,9 +10330,9 @@ function Vd(e) {
10330
10330
  }
10331
10331
  }
10332
10332
  if (u) {
10333
- var T = t.getUint16(u, i), A, C;
10334
- for (C = 0; C < T; C += 1)
10335
- if (A = u + C * 12 + 2, t.getUint16(A, i) === 274) {
10333
+ var T = t.getUint16(u, i), A, I;
10334
+ for (I = 0; I < T; I += 1)
10335
+ if (A = u + I * 12 + 2, t.getUint16(A, i) === 274) {
10336
10336
  A += 8, a = t.getUint16(A, i), t.setUint16(A, 1, i);
10337
10337
  break;
10338
10338
  }
@@ -10379,15 +10379,15 @@ var $d = {
10379
10379
  },
10380
10380
  initContainer: function() {
10381
10381
  var t = this.element, a = this.options, i = this.container, s = this.cropper, u = Number(a.minContainerWidth), r = Number(a.minContainerHeight);
10382
- de(s, xe), Ye(t, xe);
10382
+ Ee(s, Oe), Ye(t, Oe);
10383
10383
  var o = {
10384
- width: Math.max(i.offsetWidth, u >= 0 ? u : Iu),
10384
+ width: Math.max(i.offsetWidth, u >= 0 ? u : Cu),
10385
10385
  height: Math.max(i.offsetHeight, r >= 0 ? r : Su)
10386
10386
  };
10387
10387
  this.containerData = o, et(s, {
10388
10388
  width: o.width,
10389
10389
  height: o.height
10390
- }), de(t, xe), Ye(s, xe);
10390
+ }), Ee(t, Oe), Ye(s, Oe);
10391
10391
  },
10392
10392
  // Canvas (image wrapper)
10393
10393
  initCanvas: function() {
@@ -10400,7 +10400,7 @@ var $d = {
10400
10400
  width: c,
10401
10401
  height: h
10402
10402
  };
10403
- this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = ae({}, f);
10403
+ this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = ie({}, f);
10404
10404
  },
10405
10405
  limitCanvas: function(t, a) {
10406
10406
  var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = i.viewMode, c = u.aspectRatio, h = this.cropped && r;
@@ -10416,8 +10416,8 @@ var $d = {
10416
10416
  }
10417
10417
  if (a)
10418
10418
  if (o > (h ? 0 : 1)) {
10419
- var A = s.width - u.width, C = s.height - u.height;
10420
- u.minLeft = Math.min(0, A), u.minTop = Math.min(0, C), u.maxLeft = Math.max(0, A), u.maxTop = Math.max(0, C), h && this.limited && (u.minLeft = Math.min(r.left, r.left + (r.width - u.width)), u.minTop = Math.min(r.top, r.top + (r.height - u.height)), u.maxLeft = r.left, u.maxTop = r.top, o === 2 && (u.width >= s.width && (u.minLeft = Math.min(0, A), u.maxLeft = Math.max(0, A)), u.height >= s.height && (u.minTop = Math.min(0, C), u.maxTop = Math.max(0, C))));
10419
+ var A = s.width - u.width, I = s.height - u.height;
10420
+ u.minLeft = Math.min(0, A), u.minTop = Math.min(0, I), u.maxLeft = Math.max(0, A), u.maxTop = Math.max(0, I), h && this.limited && (u.minLeft = Math.min(r.left, r.left + (r.width - u.width)), u.minTop = Math.min(r.top, r.top + (r.height - u.height)), u.maxLeft = r.left, u.maxTop = r.top, o === 2 && (u.width >= s.width && (u.minLeft = Math.min(0, A), u.maxLeft = Math.max(0, A)), u.height >= s.height && (u.minTop = Math.min(0, I), u.maxTop = Math.max(0, I))));
10421
10421
  } else
10422
10422
  u.minLeft = -u.width, u.minTop = -u.height, u.maxLeft = s.width, u.maxTop = s.height;
10423
10423
  },
@@ -10431,7 +10431,7 @@ var $d = {
10431
10431
  }), r = u.width, o = u.height, c = i.width * (r / i.naturalWidth), h = i.height * (o / i.naturalHeight);
10432
10432
  i.left -= (c - i.width) / 2, i.top -= (h - i.height) / 2, i.width = c, i.height = h, i.aspectRatio = r / o, i.naturalWidth = r, i.naturalHeight = o, this.limitCanvas(!0, !1);
10433
10433
  }
10434
- (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, et(this.canvas, ae({
10434
+ (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, et(this.canvas, ie({
10435
10435
  width: i.width,
10436
10436
  height: i.height
10437
10437
  }, Qt({
@@ -10441,15 +10441,15 @@ var $d = {
10441
10441
  },
10442
10442
  renderImage: function(t) {
10443
10443
  var a = this.canvasData, i = this.imageData, s = i.naturalWidth * (a.width / a.naturalWidth), u = i.naturalHeight * (a.height / a.naturalHeight);
10444
- ae(i, {
10444
+ ie(i, {
10445
10445
  width: s,
10446
10446
  height: u,
10447
10447
  left: (a.width - s) / 2,
10448
10448
  top: (a.height - u) / 2
10449
- }), et(this.image, ae({
10449
+ }), et(this.image, ie({
10450
10450
  width: i.width,
10451
10451
  height: i.height
10452
- }, Qt(ae({
10452
+ }, Qt(ie({
10453
10453
  translateX: i.left,
10454
10454
  translateY: i.top
10455
10455
  }, i)))), t && this.output();
@@ -10459,7 +10459,7 @@ var $d = {
10459
10459
  width: a.width,
10460
10460
  height: a.height
10461
10461
  };
10462
- i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = ae({}, u);
10462
+ i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = ie({}, u);
10463
10463
  },
10464
10464
  limitCropBox: function(t, a) {
10465
10465
  var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = this.limited, c = i.aspectRatio;
@@ -10471,7 +10471,7 @@ var $d = {
10471
10471
  },
10472
10472
  renderCropBox: function() {
10473
10473
  var t = this.options, a = this.containerData, i = this.cropBoxData;
10474
- (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && aa(this.face, ta, i.width >= a.width && i.height >= a.height ? _u : ji), et(this.cropBox, ae({
10474
+ (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && aa(this.face, ta, i.width >= a.width && i.height >= a.height ? _u : ji), et(this.cropBox, ie({
10475
10475
  width: i.width,
10476
10476
  height: i.height
10477
10477
  }, Qt({
@@ -10480,14 +10480,14 @@ var $d = {
10480
10480
  }))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output();
10481
10481
  },
10482
10482
  output: function() {
10483
- this.preview(), It(this.element, pi, this.getData());
10483
+ this.preview(), Ct(this.element, pi, this.getData());
10484
10484
  }
10485
10485
  }, Xd = {
10486
10486
  initPreview: function() {
10487
10487
  var t = this.element, a = this.crossOrigin, i = this.options.preview, s = a ? this.crossOriginUrl : this.url, u = t.alt || "The image to preview", r = document.createElement("img");
10488
10488
  if (a && (r.crossOrigin = a), r.src = s, r.alt = u, this.viewBox.appendChild(r), this.viewBoxImage = r, !!i) {
10489
10489
  var o = i;
10490
- typeof i == "string" ? o = t.ownerDocument.querySelectorAll(i) : i.querySelector && (o = [i]), this.previews = o, oe(o, function(c) {
10490
+ typeof i == "string" ? o = t.ownerDocument.querySelectorAll(i) : i.querySelector && (o = [i]), this.previews = o, le(o, function(c) {
10491
10491
  var h = document.createElement("img");
10492
10492
  aa(c, ha, {
10493
10493
  width: c.offsetWidth,
@@ -10498,7 +10498,7 @@ var $d = {
10498
10498
  }
10499
10499
  },
10500
10500
  resetPreview: function() {
10501
- oe(this.previews, function(t) {
10501
+ le(this.previews, function(t) {
10502
10502
  var a = Ni(t, ha);
10503
10503
  et(t, {
10504
10504
  width: a.width,
@@ -10508,21 +10508,21 @@ var $d = {
10508
10508
  },
10509
10509
  preview: function() {
10510
10510
  var t = this.imageData, a = this.canvasData, i = this.cropBoxData, s = i.width, u = i.height, r = t.width, o = t.height, c = i.left - a.left - t.left, h = i.top - a.top - t.top;
10511
- !this.cropped || this.disabled || (et(this.viewBoxImage, ae({
10511
+ !this.cropped || this.disabled || (et(this.viewBoxImage, ie({
10512
10512
  width: r,
10513
10513
  height: o
10514
- }, Qt(ae({
10514
+ }, Qt(ie({
10515
10515
  translateX: -c,
10516
10516
  translateY: -h
10517
- }, t)))), oe(this.previews, function(f) {
10518
- var m = Ni(f, ha), T = m.width, A = m.height, C = T, L = A, M = 1;
10519
- s && (M = T / s, L = u * M), u && L > A && (M = A / u, C = s * M, L = A), et(f, {
10520
- width: C,
10517
+ }, t)))), le(this.previews, function(f) {
10518
+ var m = Ni(f, ha), T = m.width, A = m.height, I = T, L = A, M = 1;
10519
+ s && (M = T / s, L = u * M), u && L > A && (M = A / u, I = s * M, L = A), et(f, {
10520
+ width: I,
10521
10521
  height: L
10522
- }), et(f.getElementsByTagName("img")[0], ae({
10522
+ }), et(f.getElementsByTagName("img")[0], ie({
10523
10523
  width: r * M,
10524
10524
  height: o * M
10525
- }, Qt(ae({
10525
+ }, Qt(ie({
10526
10526
  translateX: -c * M,
10527
10527
  translateY: -h * M
10528
10528
  }, t))));
@@ -10531,14 +10531,14 @@ var $d = {
10531
10531
  }, Gd = {
10532
10532
  bind: function() {
10533
10533
  var t = this.element, a = this.options, i = this.cropper;
10534
- Ie(a.cropstart) && ye(t, _i, a.cropstart), Ie(a.cropmove) && ye(t, gi, a.cropmove), Ie(a.cropend) && ye(t, bi, a.cropend), Ie(a.crop) && ye(t, pi, a.crop), Ie(a.zoom) && ye(t, Ai, a.zoom), ye(i, Us, this.onCropStart = this.cropStart.bind(this)), a.zoomable && a.zoomOnWheel && ye(i, Vs, this.onWheel = this.wheel.bind(this), {
10534
+ Se(a.cropstart) && ye(t, _i, a.cropstart), Se(a.cropmove) && ye(t, gi, a.cropmove), Se(a.cropend) && ye(t, bi, a.cropend), Se(a.crop) && ye(t, pi, a.crop), Se(a.zoom) && ye(t, Ai, a.zoom), ye(i, Us, this.onCropStart = this.cropStart.bind(this)), a.zoomable && a.zoomOnWheel && ye(i, Vs, this.onWheel = this.wheel.bind(this), {
10535
10535
  passive: !1,
10536
10536
  capture: !0
10537
10537
  }), a.toggleDragModeOnDblclick && ye(i, Bs, this.onDblclick = this.dblclick.bind(this)), ye(t.ownerDocument, Fs, this.onCropMove = this.cropMove.bind(this)), ye(t.ownerDocument, Hs, this.onCropEnd = this.cropEnd.bind(this)), a.responsive && ye(window, qs, this.onResize = this.resize.bind(this));
10538
10538
  },
10539
10539
  unbind: function() {
10540
10540
  var t = this.element, a = this.options, i = this.cropper;
10541
- Ie(a.cropstart) && ke(t, _i, a.cropstart), Ie(a.cropmove) && ke(t, gi, a.cropmove), Ie(a.cropend) && ke(t, bi, a.cropend), Ie(a.crop) && ke(t, pi, a.crop), Ie(a.zoom) && ke(t, Ai, a.zoom), ke(i, Us, this.onCropStart), a.zoomable && a.zoomOnWheel && ke(i, Vs, this.onWheel, {
10541
+ Se(a.cropstart) && ke(t, _i, a.cropstart), Se(a.cropmove) && ke(t, gi, a.cropmove), Se(a.cropend) && ke(t, bi, a.cropend), Se(a.crop) && ke(t, pi, a.crop), Se(a.zoom) && ke(t, Ai, a.zoom), ke(i, Us, this.onCropStart), a.zoomable && a.zoomOnWheel && ke(i, Vs, this.onWheel, {
10542
10542
  passive: !1,
10543
10543
  capture: !0
10544
10544
  }), a.toggleDragModeOnDblclick && ke(i, Bs, this.onDblclick), ke(t.ownerDocument, Fs, this.onCropMove), ke(t.ownerDocument, Hs, this.onCropEnd), a.responsive && ke(window, qs, this.onResize);
@@ -10549,16 +10549,16 @@ var $d = {
10549
10549
  var t = this.options, a = this.container, i = this.containerData, s = a.offsetWidth / i.width, u = a.offsetHeight / i.height, r = Math.abs(s - 1) > Math.abs(u - 1) ? s : u;
10550
10550
  if (r !== 1) {
10551
10551
  var o, c;
10552
- t.restore && (o = this.getCanvasData(), c = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(oe(o, function(h, f) {
10552
+ t.restore && (o = this.getCanvasData(), c = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(le(o, function(h, f) {
10553
10553
  o[f] = h * r;
10554
- })), this.setCropBoxData(oe(c, function(h, f) {
10554
+ })), this.setCropBoxData(le(c, function(h, f) {
10555
10555
  c[f] = h * r;
10556
10556
  })));
10557
10557
  }
10558
10558
  }
10559
10559
  },
10560
10560
  dblclick: function() {
10561
- this.disabled || this.options.dragMode === Cu || this.setDragMode(vd(this.dragBox, mi) ? Nu : zi);
10561
+ this.disabled || this.options.dragMode === Iu || this.setDragMode(Rd(this.dragBox, mi) ? Nu : zi);
10562
10562
  },
10563
10563
  wheel: function(t) {
10564
10564
  var a = this, i = Number(this.options.wheelZoomRatio) || 0.1, s = 1;
@@ -10571,32 +10571,32 @@ var $d = {
10571
10571
  if (!(this.disabled || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
10572
10572
  (W(a) && a !== 1 || W(i) && i !== 0 || t.ctrlKey))) {
10573
10573
  var s = this.options, u = this.pointers, r;
10574
- t.changedTouches ? oe(t.changedTouches, function(o) {
10574
+ t.changedTouches ? le(t.changedTouches, function(o) {
10575
10575
  u[o.identifier] = da(o);
10576
- }) : u[t.pointerId || 0] = da(t), Object.keys(u).length > 1 && s.zoomable && s.zoomOnTouch ? r = Au : r = Ni(t.target, ta), Ad.test(r) && It(this.element, _i, {
10576
+ }) : u[t.pointerId || 0] = da(t), Object.keys(u).length > 1 && s.zoomable && s.zoomOnTouch ? r = Au : r = Ni(t.target, ta), Ad.test(r) && Ct(this.element, _i, {
10577
10577
  originalEvent: t,
10578
10578
  action: r
10579
- }) !== !1 && (t.preventDefault(), this.action = r, this.cropping = !1, r === gu && (this.cropping = !0, de(this.dragBox, Oa)));
10579
+ }) !== !1 && (t.preventDefault(), this.action = r, this.cropping = !1, r === gu && (this.cropping = !0, Ee(this.dragBox, Oa)));
10580
10580
  }
10581
10581
  },
10582
10582
  cropMove: function(t) {
10583
10583
  var a = this.action;
10584
10584
  if (!(this.disabled || !a)) {
10585
10585
  var i = this.pointers;
10586
- t.preventDefault(), It(this.element, gi, {
10586
+ t.preventDefault(), Ct(this.element, gi, {
10587
10587
  originalEvent: t,
10588
10588
  action: a
10589
- }) !== !1 && (t.changedTouches ? oe(t.changedTouches, function(s) {
10590
- ae(i[s.identifier] || {}, da(s, !0));
10591
- }) : ae(i[t.pointerId || 0] || {}, da(t, !0)), this.change(t));
10589
+ }) !== !1 && (t.changedTouches ? le(t.changedTouches, function(s) {
10590
+ ie(i[s.identifier] || {}, da(s, !0));
10591
+ }) : ie(i[t.pointerId || 0] || {}, da(t, !0)), this.change(t));
10592
10592
  }
10593
10593
  },
10594
10594
  cropEnd: function(t) {
10595
10595
  if (!this.disabled) {
10596
10596
  var a = this.action, i = this.pointers;
10597
- t.changedTouches ? oe(t.changedTouches, function(s) {
10597
+ t.changedTouches ? le(t.changedTouches, function(s) {
10598
10598
  delete i[s.identifier];
10599
- }) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, At(this.dragBox, Oa, this.cropped && this.options.modal)), It(this.element, bi, {
10599
+ }) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, At(this.dragBox, Oa, this.cropped && this.options.modal)), Ct(this.element, bi, {
10600
10600
  originalEvent: t,
10601
10601
  action: a
10602
10602
  }));
@@ -10604,13 +10604,13 @@ var $d = {
10604
10604
  }
10605
10605
  }, jd = {
10606
10606
  change: function(t) {
10607
- var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, h = u.left, f = u.top, m = u.width, T = u.height, A = h + m, C = f + T, L = 0, M = 0, X = s.width, U = s.height, $ = !0, F;
10607
+ var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, h = u.left, f = u.top, m = u.width, T = u.height, A = h + m, I = f + T, L = 0, M = 0, X = s.width, U = s.height, $ = !0, F;
10608
10608
  !c && t.shiftKey && (c = m && T ? m / T : 1), this.limited && (L = u.minLeft, M = u.minTop, X = L + Math.min(s.width, i.width, i.left + i.width), U = M + Math.min(s.height, i.height, i.top + i.height));
10609
10609
  var P = r[Object.keys(r)[0]], g = {
10610
10610
  x: P.endX - P.startX,
10611
10611
  y: P.endY - P.startY
10612
- }, w = function(ce) {
10613
- switch (ce) {
10612
+ }, w = function(he) {
10613
+ switch (he) {
10614
10614
  case ut:
10615
10615
  A + g.x > X && (g.x = X - A);
10616
10616
  break;
@@ -10621,7 +10621,7 @@ var $d = {
10621
10621
  f + g.y < M && (g.y = M - f);
10622
10622
  break;
10623
10623
  case gt:
10624
- C + g.y > U && (g.y = U - C);
10624
+ I + g.y > U && (g.y = U - I);
10625
10625
  break;
10626
10626
  }
10627
10627
  };
@@ -10630,7 +10630,7 @@ var $d = {
10630
10630
  h += g.x, f += g.y;
10631
10631
  break;
10632
10632
  case ut:
10633
- if (g.x >= 0 && (A >= X || c && (f <= M || C >= U))) {
10633
+ if (g.x >= 0 && (A >= X || c && (f <= M || I >= U))) {
10634
10634
  $ = !1;
10635
10635
  break;
10636
10636
  }
@@ -10644,14 +10644,14 @@ var $d = {
10644
10644
  w(Qe), T -= g.y, f += g.y, T < 0 && (o = gt, T = -T, f -= T), c && (m = T * c, h += (u.width - m) / 2);
10645
10645
  break;
10646
10646
  case rt:
10647
- if (g.x <= 0 && (h <= L || c && (f <= M || C >= U))) {
10647
+ if (g.x <= 0 && (h <= L || c && (f <= M || I >= U))) {
10648
10648
  $ = !1;
10649
10649
  break;
10650
10650
  }
10651
10651
  w(rt), m -= g.x, h += g.x, m < 0 && (o = ut, m = -m, h -= m), c && (T = m / c, f += (u.height - T) / 2);
10652
10652
  break;
10653
10653
  case gt:
10654
- if (g.y >= 0 && (C >= U || c && (h <= L || A >= X))) {
10654
+ if (g.y >= 0 && (I >= U || c && (h <= L || A >= X))) {
10655
10655
  $ = !1;
10656
10656
  break;
10657
10657
  }
@@ -10681,24 +10681,24 @@ var $d = {
10681
10681
  break;
10682
10682
  case Ft:
10683
10683
  if (c) {
10684
- if (g.x <= 0 && (h <= L || C >= U)) {
10684
+ if (g.x <= 0 && (h <= L || I >= U)) {
10685
10685
  $ = !1;
10686
10686
  break;
10687
10687
  }
10688
10688
  w(rt), m -= g.x, h += g.x, T = m / c;
10689
10689
  } else
10690
- w(gt), w(rt), g.x <= 0 ? h > L ? (m -= g.x, h += g.x) : g.y >= 0 && C >= U && ($ = !1) : (m -= g.x, h += g.x), g.y >= 0 ? C < U && (T += g.y) : T += g.y;
10690
+ w(gt), w(rt), g.x <= 0 ? h > L ? (m -= g.x, h += g.x) : g.y >= 0 && I >= U && ($ = !1) : (m -= g.x, h += g.x), g.y >= 0 ? I < U && (T += g.y) : T += g.y;
10691
10691
  m < 0 && T < 0 ? (o = wt, T = -T, m = -m, f -= T, h -= m) : m < 0 ? (o = Ut, m = -m, h -= m) : T < 0 && (o = Bt, T = -T, f -= T);
10692
10692
  break;
10693
10693
  case Ut:
10694
10694
  if (c) {
10695
- if (g.x >= 0 && (A >= X || C >= U)) {
10695
+ if (g.x >= 0 && (A >= X || I >= U)) {
10696
10696
  $ = !1;
10697
10697
  break;
10698
10698
  }
10699
10699
  w(ut), m += g.x, T = m / c;
10700
10700
  } else
10701
- w(gt), w(ut), g.x >= 0 ? A < X ? m += g.x : g.y >= 0 && C >= U && ($ = !1) : m += g.x, g.y >= 0 ? C < U && (T += g.y) : T += g.y;
10701
+ w(gt), w(ut), g.x >= 0 ? A < X ? m += g.x : g.y >= 0 && I >= U && ($ = !1) : m += g.x, g.y >= 0 ? I < U && (T += g.y) : T += g.y;
10702
10702
  m < 0 && T < 0 ? (o = Bt, T = -T, m = -m, f -= T, h -= m) : m < 0 ? (o = Ft, m = -m, h -= m) : T < 0 && (o = wt, T = -T, f -= T);
10703
10703
  break;
10704
10704
  case _u:
@@ -10712,30 +10712,30 @@ var $d = {
10712
10712
  $ = !1;
10713
10713
  break;
10714
10714
  }
10715
- F = Lu(this.cropper), h = P.startX - F.left, f = P.startY - F.top, m = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Ut : wt : g.x < 0 && (h -= m, o = g.y > 0 ? Ft : Bt), g.y < 0 && (f -= T), this.cropped || (Ye(this.cropBox, xe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
10715
+ F = Lu(this.cropper), h = P.startX - F.left, f = P.startY - F.top, m = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Ut : wt : g.x < 0 && (h -= m, o = g.y > 0 ? Ft : Bt), g.y < 0 && (f -= T), this.cropped || (Ye(this.cropBox, Oe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
10716
10716
  break;
10717
10717
  }
10718
- $ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()), oe(r, function(Q) {
10718
+ $ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()), le(r, function(Q) {
10719
10719
  Q.startX = Q.endX, Q.startY = Q.endY;
10720
10720
  });
10721
10721
  }
10722
10722
  }, zd = {
10723
10723
  // Show the crop box manually
10724
10724
  crop: function() {
10725
- return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && de(this.dragBox, Oa), Ye(this.cropBox, xe), this.setCropBoxData(this.initialCropBoxData)), this;
10725
+ return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && Ee(this.dragBox, Oa), Ye(this.cropBox, Oe), this.setCropBoxData(this.initialCropBoxData)), this;
10726
10726
  },
10727
10727
  // Reset the image and crop box to their initial states
10728
10728
  reset: function() {
10729
- return this.ready && !this.disabled && (this.imageData = ae({}, this.initialImageData), this.canvasData = ae({}, this.initialCanvasData), this.cropBoxData = ae({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
10729
+ return this.ready && !this.disabled && (this.imageData = ie({}, this.initialImageData), this.canvasData = ie({}, this.initialCanvasData), this.cropBoxData = ie({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
10730
10730
  },
10731
10731
  // Clear the crop box
10732
10732
  clear: function() {
10733
- return this.cropped && !this.disabled && (ae(this.cropBoxData, {
10733
+ return this.cropped && !this.disabled && (ie(this.cropBoxData, {
10734
10734
  left: 0,
10735
10735
  top: 0,
10736
10736
  width: 0,
10737
10737
  height: 0
10738
- }), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Ye(this.dragBox, Oa), de(this.cropBox, xe)), this;
10738
+ }), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Ye(this.dragBox, Oa), Ee(this.cropBox, Oe)), this;
10739
10739
  },
10740
10740
  /**
10741
10741
  * Replace the image's src and rebuild the cropper
@@ -10745,7 +10745,7 @@ var $d = {
10745
10745
  */
10746
10746
  replace: function(t) {
10747
10747
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
10748
- return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t, oe(this.previews, function(i) {
10748
+ return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t, le(this.previews, function(i) {
10749
10749
  i.getElementsByTagName("img")[0].src = t;
10750
10750
  }))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(t))), this;
10751
10751
  },
@@ -10755,7 +10755,7 @@ var $d = {
10755
10755
  },
10756
10756
  // Disable (freeze) the cropper
10757
10757
  disable: function() {
10758
- return this.ready && !this.disabled && (this.disabled = !0, de(this.cropper, ks)), this;
10758
+ return this.ready && !this.disabled && (this.disabled = !0, Ee(this.cropper, ks)), this;
10759
10759
  },
10760
10760
  /**
10761
10761
  * Destroy the cropper and remove the instance from the image
@@ -10763,7 +10763,7 @@ var $d = {
10763
10763
  */
10764
10764
  destroy: function() {
10765
10765
  var t = this.element;
10766
- return t[te] ? (t[te] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
10766
+ return t[ae] ? (t[ae] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
10767
10767
  },
10768
10768
  /**
10769
10769
  * Move the canvas with relative offsets
@@ -10806,18 +10806,18 @@ var $d = {
10806
10806
  var s = this.options, u = this.canvasData, r = u.width, o = u.height, c = u.naturalWidth, h = u.naturalHeight;
10807
10807
  if (t = Number(t), t >= 0 && this.ready && !this.disabled && s.zoomable) {
10808
10808
  var f = c * t, m = h * t;
10809
- if (It(this.element, Ai, {
10809
+ if (Ct(this.element, Ai, {
10810
10810
  ratio: t,
10811
10811
  oldRatio: r / c,
10812
10812
  originalEvent: i
10813
10813
  }) === !1)
10814
10814
  return this;
10815
10815
  if (i) {
10816
- var T = this.pointers, A = Lu(this.cropper), C = T && Object.keys(T).length ? wd(T) : {
10816
+ var T = this.pointers, A = Lu(this.cropper), I = T && Object.keys(T).length ? wd(T) : {
10817
10817
  pageX: i.pageX,
10818
10818
  pageY: i.pageY
10819
10819
  };
10820
- u.left -= (f - r) * ((C.pageX - A.left - u.left) / r), u.top -= (m - o) * ((C.pageY - A.top - u.top) / o);
10820
+ u.left -= (f - r) * ((I.pageX - A.left - u.left) / r), u.top -= (m - o) * ((I.pageY - A.top - u.top) / o);
10821
10821
  } else _t(a) && W(a.x) && W(a.y) ? (u.left -= (f - r) * ((a.x - u.left) / r), u.top -= (m - o) * ((a.y - u.top) / o)) : (u.left -= (f - r) / 2, u.top -= (m - o) / 2);
10822
10822
  u.width = f, u.height = m, this.renderCanvas(!0);
10823
10823
  }
@@ -10882,7 +10882,7 @@ var $d = {
10882
10882
  height: u.height
10883
10883
  };
10884
10884
  var o = i.width / i.naturalWidth;
10885
- if (oe(r, function(f, m) {
10885
+ if (le(r, function(f, m) {
10886
10886
  r[m] = f / o;
10887
10887
  }), t) {
10888
10888
  var c = Math.round(r.y + r.height), h = Math.round(r.x + r.width);
@@ -10917,14 +10917,14 @@ var $d = {
10917
10917
  * @returns {Object} The result container data.
10918
10918
  */
10919
10919
  getContainerData: function() {
10920
- return this.ready ? ae({}, this.containerData) : {};
10920
+ return this.ready ? ie({}, this.containerData) : {};
10921
10921
  },
10922
10922
  /**
10923
10923
  * Get the image position and size data.
10924
10924
  * @returns {Object} The result image data.
10925
10925
  */
10926
10926
  getImageData: function() {
10927
- return this.sized ? ae({}, this.imageData) : {};
10927
+ return this.sized ? ie({}, this.imageData) : {};
10928
10928
  },
10929
10929
  /**
10930
10930
  * Get the canvas position and size data.
@@ -10932,7 +10932,7 @@ var $d = {
10932
10932
  */
10933
10933
  getCanvasData: function() {
10934
10934
  var t = this.canvasData, a = {};
10935
- return this.ready && oe(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(i) {
10935
+ return this.ready && le(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(i) {
10936
10936
  a[i] = t[i];
10937
10937
  }), a;
10938
10938
  },
@@ -10993,21 +10993,21 @@ var $d = {
10993
10993
  aspectRatio: f,
10994
10994
  width: t.width || (h !== 1 ? i.width : o),
10995
10995
  height: t.height || (h !== 1 ? i.height : c)
10996
- }), C = A.width, L = A.height;
10997
- C = Math.min(m.width, Math.max(T.width, C)), L = Math.min(m.height, Math.max(T.height, L));
10996
+ }), I = A.width, L = A.height;
10997
+ I = Math.min(m.width, Math.max(T.width, I)), L = Math.min(m.height, Math.max(T.height, L));
10998
10998
  var M = document.createElement("canvas"), X = M.getContext("2d");
10999
- M.width = Ct(C), M.height = Ct(L), X.fillStyle = t.fillColor || "transparent", X.fillRect(0, 0, C, L);
10999
+ M.width = It(I), M.height = It(L), X.fillStyle = t.fillColor || "transparent", X.fillRect(0, 0, I, L);
11000
11000
  var U = t.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = t.imageSmoothingQuality;
11001
11001
  X.imageSmoothingEnabled = $, F && (X.imageSmoothingQuality = F);
11002
- var P = i.width, g = i.height, w = u, Q = r, ce, be, Ne, Re, ge, _e;
11003
- w <= -o || w > P ? (w = 0, ce = 0, Ne = 0, ge = 0) : w <= 0 ? (Ne = -w, w = 0, ce = Math.min(P, o + w), ge = ce) : w <= P && (Ne = 0, ce = Math.min(o, P - w), ge = ce), ce <= 0 || Q <= -c || Q > g ? (Q = 0, be = 0, Re = 0, _e = 0) : Q <= 0 ? (Re = -Q, Q = 0, be = Math.min(g, c + Q), _e = be) : Q <= g && (Re = 0, be = Math.min(c, g - Q), _e = be);
11004
- var ie = [w, Q, ce, be];
11005
- if (ge > 0 && _e > 0) {
11006
- var ve = C / o;
11007
- ie.push(Ne * ve, Re * ve, ge * ve, _e * ve);
11008
- }
11009
- return X.drawImage.apply(X, [i].concat(bu(ie.map(function(x) {
11010
- return Math.floor(Ct(x));
11002
+ var P = i.width, g = i.height, w = u, Q = r, he, ge, Ie, ve, _e, Ae;
11003
+ w <= -o || w > P ? (w = 0, he = 0, Ie = 0, _e = 0) : w <= 0 ? (Ie = -w, w = 0, he = Math.min(P, o + w), _e = he) : w <= P && (Ie = 0, he = Math.min(o, P - w), _e = he), he <= 0 || Q <= -c || Q > g ? (Q = 0, ge = 0, ve = 0, Ae = 0) : Q <= 0 ? (ve = -Q, Q = 0, ge = Math.min(g, c + Q), Ae = ge) : Q <= g && (ve = 0, ge = Math.min(c, g - Q), Ae = ge);
11004
+ var se = [w, Q, he, ge];
11005
+ if (_e > 0 && Ae > 0) {
11006
+ var Re = I / o;
11007
+ se.push(Ie * Re, ve * Re, _e * Re, Ae * Re);
11008
+ }
11009
+ return X.drawImage.apply(X, [i].concat(bu(se.map(function(x) {
11010
+ return Math.floor(It(x));
11011
11011
  })))), M;
11012
11012
  },
11013
11013
  /**
@@ -11028,23 +11028,23 @@ var $d = {
11028
11028
  var a = this.options, i = this.dragBox, s = this.face;
11029
11029
  if (this.ready && !this.disabled) {
11030
11030
  var u = t === zi, r = a.movable && t === Nu;
11031
- t = u || r ? t : Cu, a.dragMode = t, aa(i, ta, t), At(i, mi, u), At(i, Ti, r), a.cropBoxMovable || (aa(s, ta, t), At(s, mi, u), At(s, Ti, r));
11031
+ t = u || r ? t : Iu, a.dragMode = t, aa(i, ta, t), At(i, mi, u), At(i, Ti, r), a.cropBoxMovable || (aa(s, ta, t), At(s, mi, u), At(s, Ti, r));
11032
11032
  }
11033
11033
  return this;
11034
11034
  }
11035
- }, Kd = qe.Cropper, vu = /* @__PURE__ */ function() {
11035
+ }, Kd = qe.Cropper, Ru = /* @__PURE__ */ function() {
11036
11036
  function e(t) {
11037
11037
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
11038
- if (ld(this, e), !t || !Id.test(t.tagName))
11038
+ if (ld(this, e), !t || !Cd.test(t.tagName))
11039
11039
  throw new Error("The first argument is required and must be an <img> or <canvas> element.");
11040
- this.element = t, this.options = ae({}, $s, _t(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
11040
+ this.element = t, this.options = ie({}, $s, _t(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
11041
11041
  }
11042
11042
  return hd(e, [{
11043
11043
  key: "init",
11044
11044
  value: function() {
11045
11045
  var a = this.element, i = a.tagName.toLowerCase(), s;
11046
- if (!a[te]) {
11047
- if (a[te] = this, i === "img") {
11046
+ if (!a[ae]) {
11047
+ if (a[ae] = this, i === "img") {
11048
11048
  if (this.isImg = !0, s = a.getAttribute("src") || "", this.originalUrl = s, !s)
11049
11049
  return;
11050
11050
  s = a.src;
@@ -11064,7 +11064,7 @@ var $d = {
11064
11064
  return;
11065
11065
  }
11066
11066
  if (Nd.test(a)) {
11067
- Cd.test(a) ? this.read(Yd(a)) : this.clone();
11067
+ Id.test(a) ? this.read(Yd(a)) : this.clone();
11068
11068
  return;
11069
11069
  }
11070
11070
  var r = new XMLHttpRequest(), o = this.clone.bind(this);
@@ -11094,7 +11094,7 @@ var $d = {
11094
11094
  var a = this.element, i = this.url, s = a.crossOrigin, u = i;
11095
11095
  this.options.checkCrossOrigin && Gs(i) && (s || (s = "anonymous"), u = Qs(i)), this.crossOrigin = s, this.crossOriginUrl = u;
11096
11096
  var r = document.createElement("img");
11097
- s && (r.crossOrigin = s), r.src = u || i, r.alt = a.alt || "The image to crop", this.image = r, r.onload = this.start.bind(this), r.onerror = this.stop.bind(this), de(r, ws), a.parentNode.insertBefore(r, a.nextSibling);
11097
+ s && (r.crossOrigin = s), r.src = u || i, r.alt = a.alt || "The image to crop", this.image = r, r.onload = this.start.bind(this), r.onerror = this.stop.bind(this), Ee(r, ws), a.parentNode.insertBefore(r, a.nextSibling);
11098
11098
  }
11099
11099
  }, {
11100
11100
  key: "start",
@@ -11102,11 +11102,11 @@ var $d = {
11102
11102
  var a = this, i = this.image;
11103
11103
  i.onload = null, i.onerror = null, this.sizing = !0;
11104
11104
  var s = qe.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(qe.navigator.userAgent), u = function(h, f) {
11105
- ae(a.imageData, {
11105
+ ie(a.imageData, {
11106
11106
  naturalWidth: h,
11107
11107
  naturalHeight: f,
11108
11108
  aspectRatio: h / f
11109
- }), a.initialImageData = ae({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
11109
+ }), a.initialImageData = ie({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
11110
11110
  };
11111
11111
  if (i.naturalWidth && !s) {
11112
11112
  u(i.naturalWidth, i.naturalHeight);
@@ -11129,10 +11129,10 @@ var $d = {
11129
11129
  if (!(!this.sized || this.ready)) {
11130
11130
  var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
11131
11131
  r.innerHTML = Sd;
11132
- var o = r.querySelector(".".concat(te, "-container")), c = o.querySelector(".".concat(te, "-canvas")), h = o.querySelector(".".concat(te, "-drag-box")), f = o.querySelector(".".concat(te, "-crop-box")), m = f.querySelector(".".concat(te, "-face"));
11133
- this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(te, "-view-box")), this.face = m, c.appendChild(s), de(a, xe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, de(f, xe), i.guides || de(f.getElementsByClassName("".concat(te, "-dashed")), xe), i.center || de(f.getElementsByClassName("".concat(te, "-center")), xe), i.background && de(o, "".concat(te, "-bg")), i.highlight || de(m, pd), i.cropBoxMovable && (de(m, Ti), aa(m, ta, ji)), i.cropBoxResizable || (de(f.getElementsByClassName("".concat(te, "-line")), xe), de(f.getElementsByClassName("".concat(te, "-point")), xe)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), Ie(i.ready) && ye(a, Ys, i.ready, {
11132
+ var o = r.querySelector(".".concat(ae, "-container")), c = o.querySelector(".".concat(ae, "-canvas")), h = o.querySelector(".".concat(ae, "-drag-box")), f = o.querySelector(".".concat(ae, "-crop-box")), m = f.querySelector(".".concat(ae, "-face"));
11133
+ this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = m, c.appendChild(s), Ee(a, Oe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, Ee(f, Oe), i.guides || Ee(f.getElementsByClassName("".concat(ae, "-dashed")), Oe), i.center || Ee(f.getElementsByClassName("".concat(ae, "-center")), Oe), i.background && Ee(o, "".concat(ae, "-bg")), i.highlight || Ee(m, pd), i.cropBoxMovable && (Ee(m, Ti), aa(m, ta, ji)), i.cropBoxResizable || (Ee(f.getElementsByClassName("".concat(ae, "-line")), Oe), Ee(f.getElementsByClassName("".concat(ae, "-point")), Oe)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), Se(i.ready) && ye(a, Ys, i.ready, {
11134
11134
  once: !0
11135
- }), It(a, Ys);
11135
+ }), Ct(a, Ys);
11136
11136
  }
11137
11137
  }
11138
11138
  }, {
@@ -11141,7 +11141,7 @@ var $d = {
11141
11141
  if (this.ready) {
11142
11142
  this.ready = !1, this.unbind(), this.resetPreview();
11143
11143
  var a = this.cropper.parentNode;
11144
- a && a.removeChild(this.cropper), Ye(this.element, xe);
11144
+ a && a.removeChild(this.cropper), Ye(this.element, Oe);
11145
11145
  }
11146
11146
  }
11147
11147
  }, {
@@ -11165,11 +11165,11 @@ var $d = {
11165
11165
  }, {
11166
11166
  key: "setDefaults",
11167
11167
  value: function(a) {
11168
- ae($s, _t(a) && a);
11168
+ ie($s, _t(a) && a);
11169
11169
  }
11170
11170
  }]);
11171
11171
  }();
11172
- ae(vu.prototype, $d, Xd, Gd, Qd, jd, zd);
11172
+ ie(Ru.prototype, $d, Xd, Gd, Qd, jd, zd);
11173
11173
  function Zd(e, t) {
11174
11174
  const a = e.split(",") || [], i = a[0].match(/:(.*?);/)[1], s = a[1] && atob(a[1]);
11175
11175
  let u = s && s.length;
@@ -11252,8 +11252,8 @@ const Jd = {
11252
11252
  P.name && (s.value.inputValue = P.name);
11253
11253
  const g = new FileReader();
11254
11254
  g.onload = (w) => {
11255
- var Q, ce;
11256
- console.log("e?.target?.result", (Q = w == null ? void 0 : w.target) == null ? void 0 : Q.result), m((ce = w == null ? void 0 : w.target) == null ? void 0 : ce.result);
11255
+ var Q, he;
11256
+ console.log("e?.target?.result", (Q = w == null ? void 0 : w.target) == null ? void 0 : Q.result), m((he = w == null ? void 0 : w.target) == null ? void 0 : he.result);
11257
11257
  }, g.readAsDataURL(P);
11258
11258
  }
11259
11259
  };
@@ -11267,14 +11267,14 @@ const Jd = {
11267
11267
  function T() {
11268
11268
  const F = document.querySelector("#imgId");
11269
11269
  F && F.addEventListener("load", () => {
11270
- U(), c.value.myCropper = new vu(
11270
+ U(), c.value.myCropper = new Ru(
11271
11271
  F,
11272
11272
  r.value
11273
11273
  );
11274
11274
  });
11275
11275
  }
11276
11276
  const A = z(!1);
11277
- function C(F, P, g) {
11277
+ function I(F, P, g) {
11278
11278
  u.value = F, F && F.aspectRatio && (r.value.aspectRatio = F.aspectRatio), g && (s.value.inputValue = g), A.value = !0, P && m(P);
11279
11279
  }
11280
11280
  function L() {
@@ -11307,7 +11307,7 @@ const Jd = {
11307
11307
  function $() {
11308
11308
  c.value.image = "";
11309
11309
  }
11310
- return t({ handleCloseCropper: L, handleOpenCropper: C }), (F, P) => {
11310
+ return t({ handleCloseCropper: L, handleOpenCropper: I }), (F, P) => {
11311
11311
  var g, w, Q;
11312
11312
  return A.value ? (B(), V("div", Jd, [
11313
11313
  S("div", ef, [
@@ -11315,7 +11315,7 @@ const Jd = {
11315
11315
  P[1] || (P[1] = S("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
11316
11316
  S("span", {
11317
11317
  class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
11318
- onClick: re(X, ["stop"])
11318
+ onClick: ce(X, ["stop"])
11319
11319
  })
11320
11320
  ]),
11321
11321
  S("div", af, [
@@ -11328,7 +11328,7 @@ const Jd = {
11328
11328
  S("input", {
11329
11329
  type: "file",
11330
11330
  accept: "image/*",
11331
- onClick: P[0] || (P[0] = re(() => {
11331
+ onClick: P[0] || (P[0] = ce(() => {
11332
11332
  }, ["stop"])),
11333
11333
  contenteditable: "false",
11334
11334
  ref: "fileInput",
@@ -11384,11 +11384,11 @@ const Jd = {
11384
11384
  "date-action": "1",
11385
11385
  class: "aidition",
11386
11386
  contenteditable: "false"
11387
- }, Af = { class: "aidition_left" }, Nf = { class: "aidition_right" }, Cf = {
11387
+ }, Af = { class: "aidition_left" }, Nf = { class: "aidition_right" }, If = {
11388
11388
  key: 0,
11389
11389
  "date-action": "1",
11390
11390
  class: "text-red-500 text-xs mt-1"
11391
- }, If = /* @__PURE__ */ Ge({
11391
+ }, Cf = /* @__PURE__ */ Ge({
11392
11392
  __name: "ElementRenderer",
11393
11393
  props: {
11394
11394
  element: {
@@ -11407,12 +11407,12 @@ const Jd = {
11407
11407
  setup(e, { emit: t }) {
11408
11408
  const a = e, i = t, s = Ke(() => a.selectedElement === a.element), u = Ke(() => a.hoveredElement === a.element), r = z(!1), o = z(!1), c = z(""), h = Ke(() => a.element.rule.minText || 0), f = Ke(() => a.element.rule.maxText || 1 / 0), m = z();
11409
11409
  function T(O) {
11410
- O.xpath != "/div[1]" && (i("selectElement", O), !O.rule.isReadOnly && O.type === fe.Text && (r.value = !0));
11410
+ O.xpath != "/div[1]" && (i("selectElement", O), !O.rule.isReadOnly && O.type === te.Text && (r.value = !0));
11411
11411
  }
11412
11412
  function A(O) {
11413
11413
  i("selectElement", O);
11414
11414
  }
11415
- function C(O, D) {
11415
+ function I(O, D) {
11416
11416
  i("hoverElement", O, D);
11417
11417
  }
11418
11418
  function L(O) {
@@ -11426,8 +11426,8 @@ const Jd = {
11426
11426
  }
11427
11427
  function U() {
11428
11428
  function O(D) {
11429
- const H = Object.entries(D.attrs || {}).map(([ue, Ve]) => `${ue}="${Ve}"`).join(" "), q = `<${D.tag}${H ? " " + H : ""}>`, J = `</${D.tag}>`, se = (D.children || []).map((ue) => O(ue)).join("");
11430
- return `${q}${D.editText || D.text || ""}${se}${J}`;
11429
+ const H = Object.entries(D.attrs || {}).map(([oe, Ve]) => `${oe}="${Ve}"`).join(" "), q = `<${D.tag}${H ? " " + H : ""}>`, J = `</${D.tag}>`, ne = (D.children || []).map((oe) => O(oe)).join("");
11430
+ return `${q}${D.editText || D.text || ""}${ne}${J}`;
11431
11431
  }
11432
11432
  return O(a.element);
11433
11433
  }
@@ -11461,27 +11461,27 @@ const Jd = {
11461
11461
  function Q() {
11462
11462
  i("blockAction", { action: "delete", element: a.element });
11463
11463
  }
11464
- function ce(O) {
11464
+ function he(O) {
11465
11465
  i("blockAction", O), i("contentUpdated", U());
11466
11466
  }
11467
- function be() {
11467
+ function ge() {
11468
11468
  m.value.openModal();
11469
11469
  }
11470
- function Ne(O) {
11470
+ function Ie(O) {
11471
11471
  i("addIcon", O, a.element), i("contentUpdated", U());
11472
11472
  }
11473
- function Re(O, D) {
11473
+ function ve(O, D) {
11474
11474
  i("addIcon", O, D), i("contentUpdated", U());
11475
11475
  }
11476
- let ge;
11477
- const _e = z(), ie = z({});
11478
- function ve(O, D) {
11479
- if (D.rule.minImageWidth && D.rule.maxImageHeight ? (ie.value.width = D.rule.minImageWidth, ie.value.height = D.rule.maxImageHeight, ie.value.aspectRatio = D.rule.minImageWidth / D.rule.maxImageHeight) : ie.value = {}, O) {
11476
+ let _e;
11477
+ const Ae = z(), se = z({});
11478
+ function Re(O, D) {
11479
+ if (D.rule.minImageWidth && D.rule.maxImageHeight ? (se.value.width = D.rule.minImageWidth, se.value.height = D.rule.maxImageHeight, se.value.aspectRatio = D.rule.minImageWidth / D.rule.maxImageHeight) : se.value = {}, O) {
11480
11480
  O.name;
11481
11481
  const H = new FileReader();
11482
11482
  H.onload = (q) => {
11483
11483
  var J;
11484
- ge = (J = q == null ? void 0 : q.target) == null ? void 0 : J.result, _e.value.handleOpenCropper(ie.value, ge, O.name);
11484
+ _e = (J = q == null ? void 0 : q.target) == null ? void 0 : J.result, Ae.value.handleOpenCropper(se.value, _e, O.name);
11485
11485
  }, H.readAsDataURL(O);
11486
11486
  }
11487
11487
  }
@@ -11491,8 +11491,8 @@ const Jd = {
11491
11491
  D.attrs.alt = O.name;
11492
11492
  const H = new FileReader();
11493
11493
  H.onload = (q) => {
11494
- var se;
11495
- let J = (se = q == null ? void 0 : q.target) == null ? void 0 : se.result;
11494
+ var ne;
11495
+ let J = (ne = q == null ? void 0 : q.target) == null ? void 0 : ne.result;
11496
11496
  D.attrs.src = J, i("upload", J, D), i("contentUpdated", U());
11497
11497
  }, H.readAsDataURL(O);
11498
11498
  } else
@@ -11517,7 +11517,7 @@ const Jd = {
11517
11517
  ]
11518
11518
  }, a.element.attrs, {
11519
11519
  contenteditable: r.value,
11520
- onClick: D[1] || (D[1] = re(() => T(a.element), ["stop"])),
11520
+ onClick: D[1] || (D[1] = ce(() => T(a.element), ["stop"])),
11521
11521
  onMouseenter: D[2] || (D[2] = () => L(a.element)),
11522
11522
  onMouseleave: M,
11523
11523
  onBlur: X,
@@ -11526,17 +11526,17 @@ const Jd = {
11526
11526
  default: Ks(() => [
11527
11527
  wu(we(a.element.editText || a.element.text), 1),
11528
11528
  a.element.children && a.element.children.length ? (B(), V(Ht, { key: 0 }, [
11529
- a.element.type === Ae(fe).Block ? (B(), V("div", _f, [
11529
+ a.element.type === Ne(te).Block ? (B(), V("div", _f, [
11530
11530
  S("span", Af, we(a.element.editText || a.element.text), 1),
11531
11531
  S("div", Nf, [
11532
11532
  S("span", {
11533
- onClick: re(g, ["stop"])
11533
+ onClick: ce(g, ["stop"])
11534
11534
  }, "排前"),
11535
11535
  S("span", {
11536
- onClick: re(w, ["stop"])
11536
+ onClick: ce(w, ["stop"])
11537
11537
  }, "排后"),
11538
11538
  S("span", {
11539
- onClick: re(Q, ["stop"])
11539
+ onClick: ce(Q, ["stop"])
11540
11540
  }, "删除")
11541
11541
  ])
11542
11542
  ])) : K("", !0),
@@ -11547,21 +11547,21 @@ const Jd = {
11547
11547
  selectedElement: a.selectedElement,
11548
11548
  hoveredElement: a.hoveredElement,
11549
11549
  onSelectElement: A,
11550
- onHoverElement: C,
11550
+ onHoverElement: I,
11551
11551
  onUpdateText: F,
11552
- onBlockAction: ce,
11553
- onAddIcon: Re,
11552
+ onBlockAction: he,
11553
+ onAddIcon: ve,
11554
11554
  onUpload: x
11555
11555
  }, null, 8, ["icons", "element", "selectedElement", "hoveredElement"]))), 128)),
11556
- a.element.type === Ae(fe).Block ? (B(), V(Ht, { key: 1 }, [
11556
+ a.element.type === Ne(te).Block ? (B(), V(Ht, { key: 1 }, [
11557
11557
  S("span", {
11558
11558
  class: "iconfont icon-a-tianjiaxian icon_gray_add",
11559
- onClick: re(P, ["stop"]),
11559
+ onClick: ce(P, ["stop"]),
11560
11560
  contenteditable: "false"
11561
11561
  }),
11562
11562
  S("div", {
11563
11563
  class: "add_modules",
11564
- onClick: re(P, ["stop"]),
11564
+ onClick: ce(P, ["stop"]),
11565
11565
  contenteditable: "false"
11566
11566
  }, D[7] || (D[7] = [
11567
11567
  S("span", { class: "iconfont icon-a-tianjiamian" }, null, -1),
@@ -11570,23 +11570,23 @@ const Jd = {
11570
11570
  S("div", {
11571
11571
  class: "cont_aidition",
11572
11572
  contenteditable: "false",
11573
- onClick: D[0] || (D[0] = re(() => {
11573
+ onClick: D[0] || (D[0] = ce(() => {
11574
11574
  }, ["stop"]))
11575
11575
  }, [
11576
11576
  S("span", {
11577
- onClick: re(g, ["stop"]),
11577
+ onClick: ce(g, ["stop"]),
11578
11578
  class: "iconfont icon-paiqian"
11579
11579
  }),
11580
11580
  S("span", {
11581
- onClick: re(w, ["stop"]),
11581
+ onClick: ce(w, ["stop"]),
11582
11582
  class: "iconfont icon-paihou"
11583
11583
  }),
11584
11584
  S("span", {
11585
- onClick: re(Q, ["stop"]),
11585
+ onClick: ce(Q, ["stop"]),
11586
11586
  class: "iconfont icon-shanchu"
11587
11587
  }),
11588
11588
  S("span", {
11589
- onClick: re(P, ["stop"]),
11589
+ onClick: ce(P, ["stop"]),
11590
11590
  class: "iconfont icon-a-tianjiaxian"
11591
11591
  })
11592
11592
  ])
@@ -11595,11 +11595,11 @@ const Jd = {
11595
11595
  ]),
11596
11596
  _: 1
11597
11597
  }, 16, ["class", "contenteditable"])),
11598
- a.element.type == Ae(fe).Text && o.value ? (B(), V("div", Cf, we(c.value), 1)) : K("", !0),
11599
- a.element.type === Ae(fe).Image ? (B(), V("div", {
11598
+ a.element.type == Ne(te).Text && o.value ? (B(), V("div", If, we(c.value), 1)) : K("", !0),
11599
+ a.element.type === Ne(te).Image ? (B(), V("div", {
11600
11600
  key: 1,
11601
11601
  class: "absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",
11602
- onClick: D[3] || (D[3] = re(() => {
11602
+ onClick: D[3] || (D[3] = ce(() => {
11603
11603
  }, ["stop"]))
11604
11604
  }, [
11605
11605
  D[8] || (D[8] = S("span", {
@@ -11607,20 +11607,20 @@ const Jd = {
11607
11607
  class: "cursor-pointer"
11608
11608
  }, "上传图片", -1)),
11609
11609
  lt(od, {
11610
- customUpload: (q) => ve(q, a.element),
11610
+ customUpload: (q) => Re(q, a.element),
11611
11611
  height: a.element.rule.maxImageHeight,
11612
11612
  width: a.element.rule.minImageWidth,
11613
11613
  uploadByImage: y
11614
11614
  }, null, 8, ["customUpload", "height", "width"])
11615
11615
  ])) : K("", !0),
11616
- a.element.type === Ae(fe).Icon ? (B(), V("div", {
11616
+ a.element.type === Ne(te).Icon ? (B(), V("div", {
11617
11617
  key: 2,
11618
11618
  class: "absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",
11619
- onClick: D[5] || (D[5] = re(() => {
11619
+ onClick: D[5] || (D[5] = ce(() => {
11620
11620
  }, ["stop"]))
11621
11621
  }, [
11622
11622
  S("span", {
11623
- onClick: D[4] || (D[4] = re((q) => be(), ["stop"])),
11623
+ onClick: D[4] || (D[4] = ce((q) => ge(), ["stop"])),
11624
11624
  contenteditable: "false",
11625
11625
  class: "cursor-pointer"
11626
11626
  }, "选择图标")
@@ -11629,17 +11629,17 @@ const Jd = {
11629
11629
  icons: e.icons,
11630
11630
  ref_key: "iconRef",
11631
11631
  ref: m,
11632
- onOk: Ne
11632
+ onOk: Ie
11633
11633
  }, null, 8, ["icons"]),
11634
11634
  lt(gf, {
11635
11635
  ref_key: "cropperRef",
11636
- ref: _e,
11636
+ ref: Ae,
11637
11637
  onOk: D[6] || (D[6] = (q) => x(q, a.element))
11638
11638
  }, null, 512)
11639
11639
  ], 64);
11640
11640
  };
11641
11641
  }
11642
- }), Sf = /* @__PURE__ */ yt(If, [["__scopeId", "data-v-45fda71e"]]), xf = Ge({
11642
+ }), Sf = /* @__PURE__ */ yt(Cf, [["__scopeId", "data-v-45fda71e"]]), xf = Ge({
11643
11643
  name: "GpCheckbox",
11644
11644
  props: {
11645
11645
  modelValue: {
@@ -11659,8 +11659,8 @@ const Jd = {
11659
11659
  }
11660
11660
  };
11661
11661
  }
11662
- }), Of = { class: "form-group" }, Df = { class: "flex items-center space-x-2 cursor-pointer" }, Lf = ["checked", "aria-checked"], Rf = { class: "checkbox-label text-sm text-gray-700" };
11663
- function vf(e, t, a, i, s, u) {
11662
+ }), Of = { class: "form-group" }, Df = { class: "flex items-center space-x-2 cursor-pointer" }, Lf = ["checked", "aria-checked"], vf = { class: "checkbox-label text-sm text-gray-700" };
11663
+ function Rf(e, t, a, i, s, u) {
11664
11664
  return B(), V("div", Of, [
11665
11665
  S("label", Df, [
11666
11666
  S("input", {
@@ -11670,11 +11670,11 @@ function vf(e, t, a, i, s, u) {
11670
11670
  class: "custom-checkbox",
11671
11671
  "aria-checked": e.modelValue
11672
11672
  }, null, 40, Lf),
11673
- S("span", Rf, we(e.label), 1)
11673
+ S("span", vf, we(e.label), 1)
11674
11674
  ])
11675
11675
  ]);
11676
11676
  }
11677
- const fa = /* @__PURE__ */ yt(xf, [["render", vf], ["__scopeId", "data-v-68b8f276"]]), yf = Ge({
11677
+ const fa = /* @__PURE__ */ yt(xf, [["render", Rf], ["__scopeId", "data-v-68b8f276"]]), yf = Ge({
11678
11678
  name: "GpMessage",
11679
11679
  props: {
11680
11680
  message: {
@@ -11745,7 +11745,7 @@ function Ff(e, t, a, i, s, u) {
11745
11745
  default: Ks(() => [
11746
11746
  e.visible ? (B(), V("div", Mf, [
11747
11747
  S("div", {
11748
- class: Ci([e.typeClass, "message-content"])
11748
+ class: Ii([e.typeClass, "message-content"])
11749
11749
  }, [
11750
11750
  e.icon ? (B(), V("span", Pf, [
11751
11751
  Uu(e.$slots, "icon", {}, () => [
@@ -11790,7 +11790,7 @@ const Yf = () => {
11790
11790
  "bottom-right": "bottom-4 right-4",
11791
11791
  "top-center": "top-4 left-1/2 transform -translate-x-1/2",
11792
11792
  "bottom-center": "bottom-4 left-1/2 transform -translate-x-1/2"
11793
- }[((i = St[0]) == null ? void 0 : i.options.position) || "top-center"];
11793
+ }[((i = St[0]) == null ? void 0 : i.options.position) || "top-right"];
11794
11794
  });
11795
11795
  return Ji(
11796
11796
  "div",
@@ -11812,7 +11812,7 @@ const Yf = () => {
11812
11812
  t !== -1 && St.splice(t, 1);
11813
11813
  };
11814
11814
  let Vf = 0;
11815
- const Le = (e) => {
11815
+ const ue = (e) => {
11816
11816
  qf();
11817
11817
  const t = Vf++;
11818
11818
  St.push({
@@ -11822,32 +11822,32 @@ const Le = (e) => {
11822
11822
  yu(t);
11823
11823
  }, e.duration || 3e3);
11824
11824
  };
11825
- Le.success = (e, t = 3e3, a = !0) => {
11826
- Le(typeof e == "string" ? {
11825
+ ue.success = (e, t = 3e3, a = !0) => {
11826
+ ue(typeof e == "string" ? {
11827
11827
  message: e,
11828
11828
  type: "success",
11829
11829
  duration: t,
11830
11830
  icon: a
11831
11831
  } : { ...e, type: "success" });
11832
11832
  };
11833
- Le.error = (e, t = 3e3, a = !0) => {
11834
- Le(typeof e == "string" ? {
11833
+ ue.error = (e, t = 3e3, a = !0) => {
11834
+ ue(typeof e == "string" ? {
11835
11835
  message: e,
11836
11836
  type: "error",
11837
11837
  duration: t,
11838
11838
  icon: a
11839
11839
  } : { ...e, type: "error" });
11840
11840
  };
11841
- Le.info = (e, t = 3e3, a = !0) => {
11842
- Le(typeof e == "string" ? {
11841
+ ue.info = (e, t = 3e3, a = !0) => {
11842
+ ue(typeof e == "string" ? {
11843
11843
  message: e,
11844
11844
  type: "info",
11845
11845
  duration: t,
11846
11846
  icon: a
11847
11847
  } : { ...e, type: "info" });
11848
11848
  };
11849
- Le.warning = (e, t = 3e3, a = !0) => {
11850
- Le(typeof e == "string" ? {
11849
+ ue.warning = (e, t = 3e3, a = !0) => {
11850
+ ue(typeof e == "string" ? {
11851
11851
  message: e,
11852
11852
  type: "warning",
11853
11853
  duration: t,
@@ -11870,7 +11870,43 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11870
11870
  { immediate: !0 }
11871
11871
  );
11872
11872
  function u() {
11873
- i("updateElement", s.value), Le.success("保存成功");
11873
+ if (s.value.type === te.Icon && !s.value.attrs.class.includes("iconfont")) {
11874
+ ue.error("Icon 支持 iconfont 图标");
11875
+ return;
11876
+ }
11877
+ if (s.value.type === te.Image && s.value.tag !== "img") {
11878
+ ue.error("节点类型错误");
11879
+ return;
11880
+ }
11881
+ if (s.value.type === te.Video && s.value.tag !== "video") {
11882
+ ue.error("节点类型错误");
11883
+ return;
11884
+ }
11885
+ if (s.value.type === te.Link && s.value.tag !== "a") {
11886
+ ue.error("节点类型错误");
11887
+ return;
11888
+ }
11889
+ if (s.value.type === te.Text) {
11890
+ if (s.value.rule.minText > s.value.rule.maxText) {
11891
+ ue.error("最小文本长度不能大于最大文本长度");
11892
+ return;
11893
+ }
11894
+ if (s.value.tag !== "p" && s.value.tag !== "div" && s.value.tag !== "span" && s.value.tag !== "h1" && s.value.tag !== "h2" && s.value.tag !== "h3" && s.value.tag !== "h4" && s.value.tag !== "h5" && s.value.tag !== "h6") {
11895
+ ue.error("节点类型错误");
11896
+ return;
11897
+ }
11898
+ }
11899
+ if (s.value.type === te.Block) {
11900
+ if (s.value.rule.minBlock > s.value.rule.maxBlock) {
11901
+ ue.error("最小块数量不能大于最大块数量");
11902
+ return;
11903
+ }
11904
+ if (s.value.tag !== "div" && s.value.tag !== "section" && s.value.tag !== "article" && s.value.tag !== "nav" && s.value.tag !== "header" && s.value.tag !== "footer" && s.value.tag !== "span" && s.value.tag !== "p" && s.value.tag !== "img") {
11905
+ ue.error("节点类型错误");
11906
+ return;
11907
+ }
11908
+ }
11909
+ i("updateElement", s.value), ue.success("保存成功");
11874
11910
  }
11875
11911
  return (r, o) => (B(), V("div", null, [
11876
11912
  s.value ? (B(), V("div", Wf, [
@@ -11899,7 +11935,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11899
11935
  [Yu, s.value.type]
11900
11936
  ])
11901
11937
  ]),
11902
- s.value.type == Ae(fe).Text ? (B(), V("div", Qf, [
11938
+ s.value.type == Ne(te).Text ? (B(), V("div", Qf, [
11903
11939
  o[15] || (o[15] = S("label", { class: "block mt-4" }, "最小文本长度", -1)),
11904
11940
  st(S("input", {
11905
11941
  "onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
@@ -11908,7 +11944,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11908
11944
  [pt, s.value.rule.minText]
11909
11945
  ])
11910
11946
  ])) : K("", !0),
11911
- s.value.type == Ae(fe).Text ? (B(), V("div", jf, [
11947
+ s.value.type == Ne(te).Text ? (B(), V("div", jf, [
11912
11948
  o[16] || (o[16] = S("label", { class: "block mt-4" }, "最大文本长度", -1)),
11913
11949
  st(S("input", {
11914
11950
  "onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
@@ -11917,7 +11953,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11917
11953
  [pt, s.value.rule.maxText]
11918
11954
  ])
11919
11955
  ])) : K("", !0),
11920
- s.value.type == Ae(fe).Image ? (B(), V("div", zf, [
11956
+ s.value.type == Ne(te).Image ? (B(), V("div", zf, [
11921
11957
  o[17] || (o[17] = S("label", { class: "block mt-4" }, "是否裁剪", -1)),
11922
11958
  lt(fa, {
11923
11959
  class: "py-2",
@@ -11926,7 +11962,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11926
11962
  label: "是"
11927
11963
  }, null, 8, ["modelValue"])
11928
11964
  ])) : K("", !0),
11929
- s.value.type == Ae(fe).Image ? (B(), V("div", Kf, [
11965
+ s.value.type == Ne(te).Image ? (B(), V("div", Kf, [
11930
11966
  o[18] || (o[18] = S("label", { class: "block mt-4" }, "图片宽度", -1)),
11931
11967
  st(S("input", {
11932
11968
  "onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
@@ -11935,7 +11971,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11935
11971
  [pt, s.value.rule.minImageWidth]
11936
11972
  ])
11937
11973
  ])) : K("", !0),
11938
- s.value.type == Ae(fe).Image ? (B(), V("div", Zf, [
11974
+ s.value.type == Ne(te).Image ? (B(), V("div", Zf, [
11939
11975
  o[19] || (o[19] = S("label", { class: "block mt-4" }, "图片高度", -1)),
11940
11976
  st(S("input", {
11941
11977
  "onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
@@ -11944,7 +11980,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11944
11980
  [pt, s.value.rule.maxImageHeight]
11945
11981
  ])
11946
11982
  ])) : K("", !0),
11947
- s.value.type == Ae(fe).Block ? (B(), V("div", Jf, [
11983
+ s.value.type == Ne(te).Block ? (B(), V("div", Jf, [
11948
11984
  o[20] || (o[20] = S("label", { class: "block mt-4" }, "块最小数量", -1)),
11949
11985
  st(S("input", {
11950
11986
  "onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
@@ -11953,7 +11989,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11953
11989
  [pt, s.value.rule.minBlock]
11954
11990
  ])
11955
11991
  ])) : K("", !0),
11956
- s.value.type == Ae(fe).Block ? (B(), V("div", e1, [
11992
+ s.value.type == Ne(te).Block ? (B(), V("div", e1, [
11957
11993
  o[21] || (o[21] = S("label", { class: "block mt-4" }, "块最大数量", -1)),
11958
11994
  st(S("input", {
11959
11995
  "onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
@@ -11962,7 +11998,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11962
11998
  [pt, s.value.rule.maxBlock]
11963
11999
  ])
11964
12000
  ])) : K("", !0),
11965
- s.value.type == Ae(fe).Text || s.value.type == Ae(fe).Icon ? (B(), V("div", t1, [
12001
+ s.value.type == Ne(te).Text || s.value.type == Ne(te).Icon ? (B(), V("div", t1, [
11966
12002
  o[22] || (o[22] = S("label", { class: "block mt-4" }, "主题色", -1)),
11967
12003
  lt(fa, {
11968
12004
  class: "py-2",
@@ -11992,11 +12028,11 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11992
12028
  ])) : K("", !0),
11993
12029
  S("button", {
11994
12030
  onClick: u,
11995
- class: "mt-4 p-2 bg-blue-500 text-white rounded"
12031
+ class: "mt-4 p-2 bg-green-500 text-white rounded"
11996
12032
  }, " 保存 ")
11997
12033
  ]));
11998
12034
  }
11999
- }), i1 = /* @__PURE__ */ yt(a1, [["__scopeId", "data-v-e53c3800"]]), s1 = { class: "flex h-screen" }, n1 = { class: "goodschool_mobile" }, u1 = ["innerHTML"], r1 = ["innerHTML"], o1 = { class: "flex-1 bg-gray-100 overflow-auto" }, c1 = { class: "p-4" }, l1 = {
12035
+ }), i1 = /* @__PURE__ */ yt(a1, [["__scopeId", "data-v-34a23ef6"]]), s1 = { class: "flex h-screen" }, n1 = { class: "goodschool_mobile" }, u1 = ["innerHTML"], r1 = ["innerHTML"], o1 = { class: "flex-1 bg-gray-100 overflow-auto" }, c1 = { class: "p-4" }, l1 = {
12000
12036
  key: 0,
12001
12037
  class: "text-red-500 text-xs mt-2"
12002
12038
  }, h1 = {
@@ -12033,7 +12069,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12033
12069
  x && i("update:element", x);
12034
12070
  }, { immediate: !0 });
12035
12071
  const o = z("");
12036
- let c = vs("", {}, !1);
12072
+ let c = Rs("", {}, !1);
12037
12073
  ot(() => o.value, (x) => {
12038
12074
  i("update:modelValue", x);
12039
12075
  }, { immediate: !0 });
@@ -12043,17 +12079,17 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12043
12079
  }
12044
12080
  function A(x, y = "") {
12045
12081
  if (y) {
12046
- const O = C(r.value, y);
12082
+ const O = I(r.value, y);
12047
12083
  O ? f.value = O : f.value = x;
12048
12084
  } else
12049
12085
  f.value = x;
12050
12086
  }
12051
- function C(x, y) {
12087
+ function I(x, y) {
12052
12088
  if (x.xpath === y)
12053
12089
  return x;
12054
12090
  if (x.children && x.children.length)
12055
12091
  for (const O of x.children) {
12056
- const D = C(O, y);
12092
+ const D = I(O, y);
12057
12093
  if (D)
12058
12094
  return D;
12059
12095
  }
@@ -12061,11 +12097,11 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12061
12097
  function L(x) {
12062
12098
  var y, O, D, H;
12063
12099
  if (console.log(x, h.value), h.value)
12064
- if (h.value.rule = x.rule, h.value.type = x.type, (y = x.rule) != null && y.isThemeColor ? (x.attrs.class += "theme_color", x.attrs.style && (x.attrs.style = void 0)) : (console.log("e111", (O = x.attrs.class) == null ? void 0 : O.includes("theme_color")), (D = x.attrs.class) != null && D.includes("theme_color") && (x.attrs.class = x.attrs.class.replace("theme_color", " "))), h.value.type === fe.Block) {
12065
- const q = C(r.value, h.value.parentxpath || "");
12100
+ if (h.value.rule = x.rule, h.value.type = x.type, (y = x.rule) != null && y.isThemeColor ? (x.attrs.class += "theme_color", x.attrs.style && (x.attrs.style = void 0)) : (console.log("e111", (O = x.attrs.class) == null ? void 0 : O.includes("theme_color")), (D = x.attrs.class) != null && D.includes("theme_color") && (x.attrs.class = x.attrs.class.replace("theme_color", " "))), h.value.type === te.Block) {
12101
+ const q = I(r.value, h.value.parentxpath || "");
12066
12102
  q && q.children && q.children.forEach((J) => {
12067
- var se;
12068
- J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (se = J.attrs.class) != null && se.includes(" mb40") || (J.attrs.class += " mb40"));
12103
+ var ne;
12104
+ J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (ne = J.attrs.class) != null && ne.includes(" mb40") || (J.attrs.class += " mb40"));
12069
12105
  });
12070
12106
  } else
12071
12107
  (H = h.value.attrs.class) != null && H.includes(" mb40") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40", " "));
@@ -12074,23 +12110,23 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12074
12110
  o.value = x;
12075
12111
  }
12076
12112
  function X(x) {
12077
- c = vs(x);
12113
+ c = Rs(x);
12078
12114
  const y = c("body").children().toArray().map((O) => U(c(O)));
12079
12115
  return o.value = c("body").html() || "", y[0];
12080
12116
  }
12081
12117
  function U(x, y = "") {
12082
12118
  var J;
12083
- function O(se) {
12084
- if (!se || !se[0]) return "";
12085
- const ue = [];
12086
- let Ve = se;
12119
+ function O(ne) {
12120
+ if (!ne || !ne[0]) return "";
12121
+ const oe = [];
12122
+ let Ve = ne;
12087
12123
  for (; Ve.length && Ve[0].tagName !== "html"; ) {
12088
12124
  const Zi = Ve[0].tagName, Mu = Ve.parent().children(Zi).index(Ve) + 1;
12089
- ue.unshift(`${Zi}[${Mu}]`), Ve = Ve.parent();
12125
+ oe.unshift(`${Zi}[${Mu}]`), Ve = Ve.parent();
12090
12126
  }
12091
- return "/html/" + ue.join("/");
12127
+ return "/html/" + oe.join("/");
12092
12128
  }
12093
- const D = O(x).replace("/html/body[1]", ""), H = x.children().toArray().map((se) => U(c(se), D)), q = (J = a.rules) == null ? void 0 : J.find((se) => se.xpath === D);
12129
+ const D = O(x).replace("/html/body[1]", ""), H = x.children().toArray().map((ne) => U(c(ne), D)), q = (J = a.rules) == null ? void 0 : J.find((ne) => ne.xpath === D);
12094
12130
  return {
12095
12131
  tag: x[0].tagName,
12096
12132
  text: x.contents().not(x.children()).text().trim(),
@@ -12098,62 +12134,62 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12098
12134
  children: H,
12099
12135
  xpath: D,
12100
12136
  parentxpath: y,
12101
- type: (q == null ? void 0 : q.type) || fe.None,
12137
+ type: (q == null ? void 0 : q.type) || te.None,
12102
12138
  rule: (q == null ? void 0 : q.rule) || {}
12103
12139
  };
12104
12140
  }
12105
12141
  function $(x) {
12106
12142
  console.log("更新子节点的文本", x);
12107
- const y = C(r.value, x.element.xpath);
12143
+ const y = I(r.value, x.element.xpath);
12108
12144
  y && (y.editText = x.newText);
12109
12145
  }
12110
12146
  function F(x, y = "") {
12111
12147
  function O(D, H) {
12112
- var se;
12113
- const J = (H ? ((se = C(r.value, H)) == null ? void 0 : se.children) || [] : [r.value]).filter((ue) => ue.tag === D.tag).indexOf(D) + 1;
12148
+ var ne;
12149
+ const J = (H ? ((ne = I(r.value, H)) == null ? void 0 : ne.children) || [] : [r.value]).filter((oe) => oe.tag === D.tag).indexOf(D) + 1;
12114
12150
  return `${H}/${D.tag}[${J}]`;
12115
12151
  }
12116
12152
  x.xpath = O(x, y), x.parentxpath = y, (x.children || []).forEach((D) => F(D, x.xpath));
12117
12153
  }
12118
12154
  function P({ action: x, element: y, newBlock: O }) {
12119
12155
  console.log("块操作", x, y, O);
12120
- const D = C(r.value, y.parentxpath || "");
12156
+ const D = I(r.value, y.parentxpath || "");
12121
12157
  if (!D || !D.children) return;
12122
- const H = D.children.findIndex((ue) => ue === y);
12158
+ const H = D.children.findIndex((oe) => oe === y);
12123
12159
  if (H === -1) return;
12124
- const q = D.children.length, { minBlock: J, maxBlock: se } = y.rule;
12125
- if ((x === "add" || x === "copy") && q >= (se || 1 / 0)) {
12126
- m.value = `无法添加更多块。最大块数量为 ${se}`;
12160
+ const q = D.children.length, { minBlock: J, maxBlock: ne } = y.rule;
12161
+ if ((x === "add" || x === "copy") && q >= (ne || 1 / 0)) {
12162
+ m.value = `无法添加更多块。最大块数量为 ${ne}`, ue.error(m.value);
12127
12163
  return;
12128
12164
  }
12129
12165
  switch (x) {
12130
12166
  case "add":
12131
12167
  if (O) {
12132
- const ue = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
12133
- D.children.splice(H + 1, 0, ue);
12168
+ const oe = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
12169
+ D.children.splice(H + 1, 0, oe);
12134
12170
  }
12135
12171
  break;
12136
12172
  case "copy":
12137
12173
  if (O) {
12138
- const ue = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
12139
- D.children.splice(H + 1, 0, ue);
12174
+ const oe = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
12175
+ D.children.splice(H + 1, 0, oe);
12140
12176
  }
12141
12177
  break;
12142
12178
  case "moveUp":
12143
12179
  if (H > 0) {
12144
- const [ue] = D.children.splice(H, 1);
12145
- D.children.splice(H - 1, 0, ue);
12180
+ const [oe] = D.children.splice(H, 1);
12181
+ D.children.splice(H - 1, 0, oe);
12146
12182
  }
12147
12183
  break;
12148
12184
  case "moveDown":
12149
12185
  if (H < D.children.length - 1) {
12150
- const [ue] = D.children.splice(H, 1);
12151
- D.children.splice(H + 1, 0, ue);
12186
+ const [oe] = D.children.splice(H, 1);
12187
+ D.children.splice(H + 1, 0, oe);
12152
12188
  }
12153
12189
  break;
12154
12190
  case "delete":
12155
12191
  if (q <= (J || 0)) {
12156
- m.value = `无法删除更多块。最小块数量为 ${J}`;
12192
+ m.value = `无法删除更多块。最小块数量为 ${J}`, ue.error(m.value);
12157
12193
  return;
12158
12194
  }
12159
12195
  D.children.splice(H, 1);
@@ -12168,18 +12204,18 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12168
12204
  function w(x, y) {
12169
12205
  y.attrs.src = x;
12170
12206
  }
12171
- const Q = z(a.previewWidth), ce = z(375);
12172
- let be = z(!1), Ne = z(""), Re = 0, ge = 0;
12173
- function _e(x) {
12174
- Ne.value = x, be.value = !0, Re = event.clientX, ge = Q.value, window.addEventListener("mousemove", ie), window.addEventListener("mouseup", ve);
12207
+ const Q = z(a.previewWidth), he = z(375);
12208
+ let ge = z(!1), Ie = z(""), ve = 0, _e = 0;
12209
+ function Ae(x) {
12210
+ Ie.value = x, ge.value = !0, ve = event.clientX, _e = Q.value, window.addEventListener("mousemove", se), window.addEventListener("mouseup", Re);
12175
12211
  }
12176
- function ie(x) {
12177
- if (!be.value) return;
12178
- const y = x.clientX - Re;
12179
- Ne.value === "preview" ? Q.value = Math.max(200, ge + y) : Ne.value === "structure" && (ce.value = Math.max(200, ge - y));
12212
+ function se(x) {
12213
+ if (!ge.value) return;
12214
+ const y = x.clientX - ve;
12215
+ Ie.value === "preview" ? Q.value = Math.max(200, _e + y) : Ie.value === "structure" && (he.value = Math.max(200, _e - y));
12180
12216
  }
12181
- function ve() {
12182
- be.value = !1, Ne.value = "", window.removeEventListener("mousemove", ie), window.removeEventListener("mouseup", ve);
12217
+ function Re() {
12218
+ ge.value = !1, Ie.value = "", window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", Re);
12183
12219
  }
12184
12220
  return (x, y) => (B(), V("div", s1, [
12185
12221
  S("div", {
@@ -12193,13 +12229,13 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12193
12229
  innerHTML: o.value
12194
12230
  }, null, 8, u1)) : (B(), V("div", {
12195
12231
  key: 1,
12196
- innerHTML: Ae(c)("body").html()
12232
+ innerHTML: Ne(c)("body").html()
12197
12233
  }, null, 8, r1))
12198
12234
  ])
12199
12235
  ], 4),
12200
12236
  S("div", {
12201
12237
  class: "resizer",
12202
- onMousedown: y[0] || (y[0] = (O) => _e("preview"))
12238
+ onMousedown: y[0] || (y[0] = (O) => Ae("preview"))
12203
12239
  }, null, 32),
12204
12240
  S("div", o1, [
12205
12241
  S("div", c1, [
@@ -12235,7 +12271,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12235
12271
  ])) : K("", !0)
12236
12272
  ]));
12237
12273
  }
12238
- }), E1 = /* @__PURE__ */ yt(f1, [["__scopeId", "data-v-199dde04"]]), _1 = {
12274
+ }), E1 = /* @__PURE__ */ yt(f1, [["__scopeId", "data-v-5a3bb77a"]]), _1 = {
12239
12275
  install(e) {
12240
12276
  e.component("Designer", E1);
12241
12277
  }