@instructure/platform-widget-dashboard 6.4.2 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -112,12 +112,12 @@ const Ac = E2({
112
112
  hubBaseUrl: n,
113
113
  accountName: s,
114
114
  accountDashboardUrl: u,
115
- accounts: i,
116
- customWidgets: r,
115
+ accounts: r,
116
+ customWidgets: i,
117
117
  isDark: d,
118
118
  queryPersister: q
119
119
  }) => {
120
- const f = a0(() => i && i.length > 0 ? i : s && u ? [{ id: "default", name: s, dashboardUrl: u }] : [], [i, s, u]), [A, W] = V(() => {
120
+ const f = a0(() => r && r.length > 0 ? r : s && u ? [{ id: "default", name: s, dashboardUrl: u }] : [], [r, s, u]), [A, W] = V(() => {
121
121
  var w;
122
122
  return ((w = (b ?? m1.preferences).widget_dashboard_config) == null ? void 0 : w.filters) ?? {};
123
123
  }), h = Z((T, w) => {
@@ -154,7 +154,7 @@ const Ac = E2({
154
154
  dashboardFeatures: a ?? m1.dashboardFeatures,
155
155
  hubBaseUrl: n,
156
156
  accounts: f,
157
- customWidgets: r ?? m1.customWidgets,
157
+ customWidgets: i ?? m1.customWidgets,
158
158
  isDark: d ?? m1.isDark,
159
159
  queryPersister: q,
160
160
  widgetConfig: A,
@@ -173,7 +173,7 @@ const Ac = E2({
173
173
  a,
174
174
  n,
175
175
  f,
176
- r,
176
+ i,
177
177
  d,
178
178
  q,
179
179
  A,
@@ -337,52 +337,54 @@ const m1 = {
337
337
  }
338
338
  }
339
339
  }
340
- `, fc = E2(null), aq = ({
341
- children: e
342
- }) => {
343
- const { translations: b } = b0(), { executeQuery: M } = h0(), [t, o] = V(!1), [z, c] = V(!1), [p, a] = V(null), n = Z(() => {
344
- o(!0), c(!1), a(null);
345
- }, []), s = Z(() => {
346
- o(!1), c(!1), a(null);
347
- }, []), u = _1({
348
- mutationFn: async (f) => {
349
- var W, h;
350
- const A = await M(Or, {
351
- layout: JSON.stringify(f)
340
+ `, fc = E2(null), aq = ({ children: e, onSave: b }) => {
341
+ const { translations: M } = b0(), { executeQuery: t } = h0(), [o, z] = V(!1), [c, p] = V(!1), [a, n] = V(null), s = Z(() => {
342
+ z(!0), p(!1), n(null);
343
+ }, []), u = Z(() => {
344
+ z(!1), p(!1), n(null);
345
+ }, []), r = _1({
346
+ mutationFn: async (A) => {
347
+ var h, m;
348
+ if (b) {
349
+ await b(A);
350
+ return;
351
+ }
352
+ const W = await t(Or, {
353
+ layout: JSON.stringify(A)
352
354
  });
353
- if ((h = (W = A.updateWidgetDashboardLayout) == null ? void 0 : W.errors) != null && h.length)
354
- throw new Error(A.updateWidgetDashboardLayout.errors[0].message);
355
- return A;
355
+ if ((m = (h = W.updateWidgetDashboardLayout) == null ? void 0 : h.errors) != null && m.length)
356
+ throw new Error(W.updateWidgetDashboardLayout.errors[0].message);
357
+ return W;
356
358
  },
357
- onError: (f) => {
358
- a(f.message || b.failedToSaveWidgetLayout);
359
+ onError: (A) => {
360
+ n(A.message || M.failedToSaveWidgetLayout);
359
361
  }
360
362
  }), i = Z(
361
- async (f) => {
362
- a(null);
363
+ async (A) => {
364
+ n(null);
363
365
  try {
364
- await u.mutateAsync(f), o(!1), c(!1);
365
- } catch (A) {
366
- console.error("Failed to save widget layout:", A);
366
+ await r.mutateAsync(A), z(!1), p(!1);
367
+ } catch (W) {
368
+ console.error("Failed to save widget layout:", W);
367
369
  }
368
370
  },
369
- [u]
370
- ), r = Z(() => {
371
- c(!0);
372
- }, []), d = Z(() => {
373
- a(null);
374
- }, []), q = {
375
- isEditMode: t,
376
- isDirty: z,
377
- isSaving: u.isPending,
378
- saveError: p,
379
- enterEditMode: n,
380
- exitEditMode: s,
371
+ [r]
372
+ ), d = Z(() => {
373
+ p(!0);
374
+ }, []), q = Z(() => {
375
+ n(null);
376
+ }, []), f = {
377
+ isEditMode: o,
378
+ isDirty: c,
379
+ isSaving: r.isPending,
380
+ saveError: a,
381
+ enterEditMode: s,
382
+ exitEditMode: u,
381
383
  saveChanges: i,
382
- markDirty: r,
383
- clearError: d
384
+ markDirty: d,
385
+ clearError: q
384
386
  };
385
- return /* @__PURE__ */ O(fc.Provider, { value: q, children: e });
387
+ return /* @__PURE__ */ O(fc.Provider, { value: f, children: e });
386
388
  };
387
389
  function At() {
388
390
  const e = ze(fc);
@@ -546,7 +548,7 @@ const sr = (e, b) => {
546
548
  }), a();
547
549
  },
548
550
  [a]
549
- ), i = Z(
551
+ ), r = Z(
550
552
  (W, h = M.widget) => {
551
553
  z((m) => {
552
554
  const l = m.widgets.filter((y) => y.id !== W), R = O2(
@@ -557,7 +559,7 @@ const sr = (e, b) => {
557
559
  }), a(), t == null || t(M.widgetRemoved.replace("%{widgetName}", h));
558
560
  },
559
561
  [a, M, t]
560
- ), r = Z(
562
+ ), i = Z(
561
563
  (W, h, m, l) => {
562
564
  z((R) => {
563
565
  var w;
@@ -582,8 +584,8 @@ const sr = (e, b) => {
582
584
  config: o,
583
585
  moveWidget: s,
584
586
  moveWidgetToPosition: u,
585
- removeWidget: i,
586
- addWidget: r,
587
+ removeWidget: r,
588
+ addWidget: i,
587
589
  resetConfig: d,
588
590
  saveLayout: q
589
591
  };
@@ -600,10 +602,10 @@ const l2 = void 0, gr = ({
600
602
  onAccept: b,
601
603
  onReject: M
602
604
  }) => {
603
- var i;
605
+ var r;
604
606
  const { executeQuery: t } = h0(), { translations: o, translate: z } = b0(), c = q1(), p = _1({
605
- mutationFn: async (r) => t(nr, {
606
- enrollmentUuid: r
607
+ mutationFn: async (i) => t(nr, {
608
+ enrollmentUuid: i
607
609
  }),
608
610
  onSuccess: () => {
609
611
  c.invalidateQueries({
@@ -611,8 +613,8 @@ const l2 = void 0, gr = ({
611
613
  });
612
614
  }
613
615
  }), a = _1({
614
- mutationFn: async (r) => t(rr, {
615
- enrollmentUuid: r
616
+ mutationFn: async (i) => t(rr, {
617
+ enrollmentUuid: i
616
618
  }),
617
619
  onSuccess: () => {
618
620
  c.invalidateQueries({
@@ -620,10 +622,10 @@ const l2 = void 0, gr = ({
620
622
  });
621
623
  }
622
624
  }), n = Z(async () => {
623
- var r, d;
625
+ var i, d;
624
626
  try {
625
627
  const q = await p.mutateAsync(e.uuid);
626
- if ((r = q == null ? void 0 : q.acceptEnrollmentInvitation) != null && r.success)
628
+ if ((i = q == null ? void 0 : q.acceptEnrollmentInvitation) != null && i.success)
627
629
  console.log(o.enrollmentAcceptedSuccessfully), b == null || b(e.id), await new Promise((f) => setTimeout(f, 500)), window.location.reload();
628
630
  else {
629
631
  const f = ((d = q == null ? void 0 : q.acceptEnrollmentInvitation) == null ? void 0 : d.errors) || [], A = f.length > 0 ? f[0].message : o.failedToAcceptInvitation;
@@ -641,10 +643,10 @@ const l2 = void 0, gr = ({
641
643
  o.errorAcceptingInvitation,
642
644
  o.failedToAcceptInvitation
643
645
  ]), s = Z(async () => {
644
- var r, d;
646
+ var i, d;
645
647
  try {
646
648
  const q = await a.mutateAsync(e.uuid);
647
- if ((r = q == null ? void 0 : q.rejectEnrollmentInvitation) != null && r.success)
649
+ if ((i = q == null ? void 0 : q.rejectEnrollmentInvitation) != null && i.success)
648
650
  console.log(o.enrollmentDeclined), M == null || M(e.id);
649
651
  else {
650
652
  const f = ((d = q == null ? void 0 : q.rejectEnrollmentInvitation) == null ? void 0 : d.errors) || [], A = f.length > 0 ? f[0].message : o.failedToDeclineInvitation;
@@ -669,7 +671,7 @@ const l2 = void 0, gr = ({
669
671
  /* @__PURE__ */ O(P0, { href: u, children: e.course.name }),
670
672
  " ",
671
673
  z(o.withRoleTemplate, {
672
- role: e.roleLabel || ((i = e.role) == null ? void 0 : i.name)
674
+ role: e.roleLabel || ((r = e.role) == null ? void 0 : r.name)
673
675
  })
674
676
  ] }) }) }) }) }) }),
675
677
  /* @__PURE__ */ O(D, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ X(L, { gap: "small", justifyItems: "start", children: [
@@ -831,14 +833,14 @@ function Ob() {
831
833
  (function(v) {
832
834
  v[v.VALUE_LENGTH = 49152] = "VALUE_LENGTH", v[v.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", v[v.JUMP_TABLE = 127] = "JUMP_TABLE";
833
835
  })(u = e.BinTrieFlags || (e.BinTrieFlags = {}));
834
- function i(v) {
836
+ function r(v) {
835
837
  return v >= n.ZERO && v <= n.NINE;
836
838
  }
837
- function r(v) {
839
+ function i(v) {
838
840
  return v >= n.UPPER_A && v <= n.UPPER_F || v >= n.LOWER_A && v <= n.LOWER_F;
839
841
  }
840
842
  function d(v) {
841
- return v >= n.UPPER_A && v <= n.UPPER_Z || v >= n.LOWER_A && v <= n.LOWER_Z || i(v);
843
+ return v >= n.UPPER_A && v <= n.UPPER_Z || v >= n.LOWER_A && v <= n.LOWER_Z || r(v);
842
844
  }
843
845
  function q(v) {
844
846
  return v === n.EQUALS || d(v);
@@ -882,7 +884,7 @@ function Ob() {
882
884
  }, v.prototype.stateNumericHex = function(T, w) {
883
885
  for (var C = w; w < T.length; ) {
884
886
  var x = T.charCodeAt(w);
885
- if (i(x) || r(x))
887
+ if (r(x) || i(x))
886
888
  w += 1;
887
889
  else
888
890
  return this.addToNumericResult(T, C, w, 16), this.emitNumericEntity(x, 3);
@@ -891,7 +893,7 @@ function Ob() {
891
893
  }, v.prototype.stateNumericDecimal = function(T, w) {
892
894
  for (var C = w; w < T.length; ) {
893
895
  var x = T.charCodeAt(w);
894
- if (i(x))
896
+ if (r(x))
895
897
  w += 1;
896
898
  else
897
899
  return this.addToNumericResult(T, C, w, 10), this.emitNumericEntity(x, 2);
@@ -1011,31 +1013,31 @@ function Rc() {
1011
1013
  return qo || (qo = 1, function(e) {
1012
1014
  Object.defineProperty(e, "__esModule", { value: !0 }), e.QuoteType = void 0;
1013
1015
  var b = /* @__PURE__ */ Ob(), M;
1014
- (function(i) {
1015
- i[i.Tab = 9] = "Tab", i[i.NewLine = 10] = "NewLine", i[i.FormFeed = 12] = "FormFeed", i[i.CarriageReturn = 13] = "CarriageReturn", i[i.Space = 32] = "Space", i[i.ExclamationMark = 33] = "ExclamationMark", i[i.Number = 35] = "Number", i[i.Amp = 38] = "Amp", i[i.SingleQuote = 39] = "SingleQuote", i[i.DoubleQuote = 34] = "DoubleQuote", i[i.Dash = 45] = "Dash", i[i.Slash = 47] = "Slash", i[i.Zero = 48] = "Zero", i[i.Nine = 57] = "Nine", i[i.Semi = 59] = "Semi", i[i.Lt = 60] = "Lt", i[i.Eq = 61] = "Eq", i[i.Gt = 62] = "Gt", i[i.Questionmark = 63] = "Questionmark", i[i.UpperA = 65] = "UpperA", i[i.LowerA = 97] = "LowerA", i[i.UpperF = 70] = "UpperF", i[i.LowerF = 102] = "LowerF", i[i.UpperZ = 90] = "UpperZ", i[i.LowerZ = 122] = "LowerZ", i[i.LowerX = 120] = "LowerX", i[i.OpeningSquareBracket = 91] = "OpeningSquareBracket";
1016
+ (function(r) {
1017
+ r[r.Tab = 9] = "Tab", r[r.NewLine = 10] = "NewLine", r[r.FormFeed = 12] = "FormFeed", r[r.CarriageReturn = 13] = "CarriageReturn", r[r.Space = 32] = "Space", r[r.ExclamationMark = 33] = "ExclamationMark", r[r.Number = 35] = "Number", r[r.Amp = 38] = "Amp", r[r.SingleQuote = 39] = "SingleQuote", r[r.DoubleQuote = 34] = "DoubleQuote", r[r.Dash = 45] = "Dash", r[r.Slash = 47] = "Slash", r[r.Zero = 48] = "Zero", r[r.Nine = 57] = "Nine", r[r.Semi = 59] = "Semi", r[r.Lt = 60] = "Lt", r[r.Eq = 61] = "Eq", r[r.Gt = 62] = "Gt", r[r.Questionmark = 63] = "Questionmark", r[r.UpperA = 65] = "UpperA", r[r.LowerA = 97] = "LowerA", r[r.UpperF = 70] = "UpperF", r[r.LowerF = 102] = "LowerF", r[r.UpperZ = 90] = "UpperZ", r[r.LowerZ = 122] = "LowerZ", r[r.LowerX = 120] = "LowerX", r[r.OpeningSquareBracket = 91] = "OpeningSquareBracket";
1016
1018
  })(M || (M = {}));
1017
1019
  var t;
1018
- (function(i) {
1019
- i[i.Text = 1] = "Text", i[i.BeforeTagName = 2] = "BeforeTagName", i[i.InTagName = 3] = "InTagName", i[i.InSelfClosingTag = 4] = "InSelfClosingTag", i[i.BeforeClosingTagName = 5] = "BeforeClosingTagName", i[i.InClosingTagName = 6] = "InClosingTagName", i[i.AfterClosingTagName = 7] = "AfterClosingTagName", i[i.BeforeAttributeName = 8] = "BeforeAttributeName", i[i.InAttributeName = 9] = "InAttributeName", i[i.AfterAttributeName = 10] = "AfterAttributeName", i[i.BeforeAttributeValue = 11] = "BeforeAttributeValue", i[i.InAttributeValueDq = 12] = "InAttributeValueDq", i[i.InAttributeValueSq = 13] = "InAttributeValueSq", i[i.InAttributeValueNq = 14] = "InAttributeValueNq", i[i.BeforeDeclaration = 15] = "BeforeDeclaration", i[i.InDeclaration = 16] = "InDeclaration", i[i.InProcessingInstruction = 17] = "InProcessingInstruction", i[i.BeforeComment = 18] = "BeforeComment", i[i.CDATASequence = 19] = "CDATASequence", i[i.InSpecialComment = 20] = "InSpecialComment", i[i.InCommentLike = 21] = "InCommentLike", i[i.BeforeSpecialS = 22] = "BeforeSpecialS", i[i.SpecialStartSequence = 23] = "SpecialStartSequence", i[i.InSpecialTag = 24] = "InSpecialTag", i[i.BeforeEntity = 25] = "BeforeEntity", i[i.BeforeNumericEntity = 26] = "BeforeNumericEntity", i[i.InNamedEntity = 27] = "InNamedEntity", i[i.InNumericEntity = 28] = "InNumericEntity", i[i.InHexEntity = 29] = "InHexEntity";
1020
+ (function(r) {
1021
+ r[r.Text = 1] = "Text", r[r.BeforeTagName = 2] = "BeforeTagName", r[r.InTagName = 3] = "InTagName", r[r.InSelfClosingTag = 4] = "InSelfClosingTag", r[r.BeforeClosingTagName = 5] = "BeforeClosingTagName", r[r.InClosingTagName = 6] = "InClosingTagName", r[r.AfterClosingTagName = 7] = "AfterClosingTagName", r[r.BeforeAttributeName = 8] = "BeforeAttributeName", r[r.InAttributeName = 9] = "InAttributeName", r[r.AfterAttributeName = 10] = "AfterAttributeName", r[r.BeforeAttributeValue = 11] = "BeforeAttributeValue", r[r.InAttributeValueDq = 12] = "InAttributeValueDq", r[r.InAttributeValueSq = 13] = "InAttributeValueSq", r[r.InAttributeValueNq = 14] = "InAttributeValueNq", r[r.BeforeDeclaration = 15] = "BeforeDeclaration", r[r.InDeclaration = 16] = "InDeclaration", r[r.InProcessingInstruction = 17] = "InProcessingInstruction", r[r.BeforeComment = 18] = "BeforeComment", r[r.CDATASequence = 19] = "CDATASequence", r[r.InSpecialComment = 20] = "InSpecialComment", r[r.InCommentLike = 21] = "InCommentLike", r[r.BeforeSpecialS = 22] = "BeforeSpecialS", r[r.SpecialStartSequence = 23] = "SpecialStartSequence", r[r.InSpecialTag = 24] = "InSpecialTag", r[r.BeforeEntity = 25] = "BeforeEntity", r[r.BeforeNumericEntity = 26] = "BeforeNumericEntity", r[r.InNamedEntity = 27] = "InNamedEntity", r[r.InNumericEntity = 28] = "InNumericEntity", r[r.InHexEntity = 29] = "InHexEntity";
1020
1022
  })(t || (t = {}));
1021
- function o(i) {
1022
- return i === M.Space || i === M.NewLine || i === M.Tab || i === M.FormFeed || i === M.CarriageReturn;
1023
+ function o(r) {
1024
+ return r === M.Space || r === M.NewLine || r === M.Tab || r === M.FormFeed || r === M.CarriageReturn;
1023
1025
  }
1024
- function z(i) {
1025
- return i === M.Slash || i === M.Gt || o(i);
1026
+ function z(r) {
1027
+ return r === M.Slash || r === M.Gt || o(r);
1026
1028
  }
1027
- function c(i) {
1028
- return i >= M.Zero && i <= M.Nine;
1029
+ function c(r) {
1030
+ return r >= M.Zero && r <= M.Nine;
1029
1031
  }
1030
- function p(i) {
1031
- return i >= M.LowerA && i <= M.LowerZ || i >= M.UpperA && i <= M.UpperZ;
1032
+ function p(r) {
1033
+ return r >= M.LowerA && r <= M.LowerZ || r >= M.UpperA && r <= M.UpperZ;
1032
1034
  }
1033
- function a(i) {
1034
- return i >= M.UpperA && i <= M.UpperF || i >= M.LowerA && i <= M.LowerF;
1035
+ function a(r) {
1036
+ return r >= M.UpperA && r <= M.UpperF || r >= M.LowerA && r <= M.LowerF;
1035
1037
  }
1036
1038
  var n;
1037
- (function(i) {
1038
- i[i.NoValue = 0] = "NoValue", i[i.Unquoted = 1] = "Unquoted", i[i.Single = 2] = "Single", i[i.Double = 3] = "Double";
1039
+ (function(r) {
1040
+ r[r.NoValue = 0] = "NoValue", r[r.Unquoted = 1] = "Unquoted", r[r.Single = 2] = "Single", r[r.Double = 3] = "Double";
1039
1041
  })(n = e.QuoteType || (e.QuoteType = {}));
1040
1042
  var s = {
1041
1043
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
@@ -1048,33 +1050,33 @@ function Rc() {
1048
1050
  }, u = (
1049
1051
  /** @class */
1050
1052
  function() {
1051
- function i(r, d) {
1052
- var q = r.xmlMode, f = q === void 0 ? !1 : q, A = r.decodeEntities, W = A === void 0 ? !0 : A;
1053
+ function r(i, d) {
1054
+ var q = i.xmlMode, f = q === void 0 ? !1 : q, A = i.decodeEntities, W = A === void 0 ? !0 : A;
1053
1055
  this.cbs = d, this.state = t.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = t.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.trieIndex = 0, this.trieCurrent = 0, this.entityResult = 0, this.entityExcess = 0, this.xmlMode = f, this.decodeEntities = W, this.entityTrie = f ? b.xmlDecodeTree : b.htmlDecodeTree;
1054
1056
  }
1055
- return i.prototype.reset = function() {
1057
+ return r.prototype.reset = function() {
1056
1058
  this.state = t.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = t.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
1057
- }, i.prototype.write = function(r) {
1058
- this.offset += this.buffer.length, this.buffer = r, this.parse();
1059
- }, i.prototype.end = function() {
1059
+ }, r.prototype.write = function(i) {
1060
+ this.offset += this.buffer.length, this.buffer = i, this.parse();
1061
+ }, r.prototype.end = function() {
1060
1062
  this.running && this.finish();
1061
- }, i.prototype.pause = function() {
1063
+ }, r.prototype.pause = function() {
1062
1064
  this.running = !1;
1063
- }, i.prototype.resume = function() {
1065
+ }, r.prototype.resume = function() {
1064
1066
  this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
1065
- }, i.prototype.getIndex = function() {
1067
+ }, r.prototype.getIndex = function() {
1066
1068
  return this.index;
1067
- }, i.prototype.getSectionStart = function() {
1069
+ }, r.prototype.getSectionStart = function() {
1068
1070
  return this.sectionStart;
1069
- }, i.prototype.stateText = function(r) {
1070
- r === M.Lt || !this.decodeEntities && this.fastForwardTo(M.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = t.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && r === M.Amp && (this.state = t.BeforeEntity);
1071
- }, i.prototype.stateSpecialStartSequence = function(r) {
1071
+ }, r.prototype.stateText = function(i) {
1072
+ i === M.Lt || !this.decodeEntities && this.fastForwardTo(M.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = t.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && i === M.Amp && (this.state = t.BeforeEntity);
1073
+ }, r.prototype.stateSpecialStartSequence = function(i) {
1072
1074
  var d = this.sequenceIndex === this.currentSequence.length, q = d ? (
1073
1075
  // If we are at the end of the sequence, make sure the tag name has ended
1074
- z(r)
1076
+ z(i)
1075
1077
  ) : (
1076
1078
  // Otherwise, do a case-insensitive comparison
1077
- (r | 32) === this.currentSequence[this.sequenceIndex]
1079
+ (i | 32) === this.currentSequence[this.sequenceIndex]
1078
1080
  );
1079
1081
  if (!q)
1080
1082
  this.isSpecial = !1;
@@ -1082,86 +1084,86 @@ function Rc() {
1082
1084
  this.sequenceIndex++;
1083
1085
  return;
1084
1086
  }
1085
- this.sequenceIndex = 0, this.state = t.InTagName, this.stateInTagName(r);
1086
- }, i.prototype.stateInSpecialTag = function(r) {
1087
+ this.sequenceIndex = 0, this.state = t.InTagName, this.stateInTagName(i);
1088
+ }, r.prototype.stateInSpecialTag = function(i) {
1087
1089
  if (this.sequenceIndex === this.currentSequence.length) {
1088
- if (r === M.Gt || o(r)) {
1090
+ if (i === M.Gt || o(i)) {
1089
1091
  var d = this.index - this.currentSequence.length;
1090
1092
  if (this.sectionStart < d) {
1091
1093
  var q = this.index;
1092
1094
  this.index = d, this.cbs.ontext(this.sectionStart, d), this.index = q;
1093
1095
  }
1094
- this.isSpecial = !1, this.sectionStart = d + 2, this.stateInClosingTagName(r);
1096
+ this.isSpecial = !1, this.sectionStart = d + 2, this.stateInClosingTagName(i);
1095
1097
  return;
1096
1098
  }
1097
1099
  this.sequenceIndex = 0;
1098
1100
  }
1099
- (r | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === s.TitleEnd ? this.decodeEntities && r === M.Amp && (this.state = t.BeforeEntity) : this.fastForwardTo(M.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(r === M.Lt);
1100
- }, i.prototype.stateCDATASequence = function(r) {
1101
- r === s.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === s.Cdata.length && (this.state = t.InCommentLike, this.currentSequence = s.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = t.InDeclaration, this.stateInDeclaration(r));
1102
- }, i.prototype.fastForwardTo = function(r) {
1101
+ (i | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === s.TitleEnd ? this.decodeEntities && i === M.Amp && (this.state = t.BeforeEntity) : this.fastForwardTo(M.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(i === M.Lt);
1102
+ }, r.prototype.stateCDATASequence = function(i) {
1103
+ i === s.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === s.Cdata.length && (this.state = t.InCommentLike, this.currentSequence = s.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = t.InDeclaration, this.stateInDeclaration(i));
1104
+ }, r.prototype.fastForwardTo = function(i) {
1103
1105
  for (; ++this.index < this.buffer.length + this.offset; )
1104
- if (this.buffer.charCodeAt(this.index - this.offset) === r)
1106
+ if (this.buffer.charCodeAt(this.index - this.offset) === i)
1105
1107
  return !0;
1106
1108
  return this.index = this.buffer.length + this.offset - 1, !1;
1107
- }, i.prototype.stateInCommentLike = function(r) {
1108
- r === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === s.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 = t.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : r !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
1109
- }, i.prototype.isTagStartChar = function(r) {
1110
- return this.xmlMode ? !z(r) : p(r);
1111
- }, i.prototype.startSpecial = function(r, d) {
1112
- this.isSpecial = !0, this.currentSequence = r, this.sequenceIndex = d, this.state = t.SpecialStartSequence;
1113
- }, i.prototype.stateBeforeTagName = function(r) {
1114
- if (r === M.ExclamationMark)
1109
+ }, r.prototype.stateInCommentLike = function(i) {
1110
+ i === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === s.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 = t.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : i !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
1111
+ }, r.prototype.isTagStartChar = function(i) {
1112
+ return this.xmlMode ? !z(i) : p(i);
1113
+ }, r.prototype.startSpecial = function(i, d) {
1114
+ this.isSpecial = !0, this.currentSequence = i, this.sequenceIndex = d, this.state = t.SpecialStartSequence;
1115
+ }, r.prototype.stateBeforeTagName = function(i) {
1116
+ if (i === M.ExclamationMark)
1115
1117
  this.state = t.BeforeDeclaration, this.sectionStart = this.index + 1;
1116
- else if (r === M.Questionmark)
1118
+ else if (i === M.Questionmark)
1117
1119
  this.state = t.InProcessingInstruction, this.sectionStart = this.index + 1;
1118
- else if (this.isTagStartChar(r)) {
1119
- var d = r | 32;
1120
+ else if (this.isTagStartChar(i)) {
1121
+ var d = i | 32;
1120
1122
  this.sectionStart = this.index, !this.xmlMode && d === s.TitleEnd[2] ? this.startSpecial(s.TitleEnd, 3) : this.state = !this.xmlMode && d === s.ScriptEnd[2] ? t.BeforeSpecialS : t.InTagName;
1121
- } else r === M.Slash ? this.state = t.BeforeClosingTagName : (this.state = t.Text, this.stateText(r));
1122
- }, i.prototype.stateInTagName = function(r) {
1123
- z(r) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(r));
1124
- }, i.prototype.stateBeforeClosingTagName = function(r) {
1125
- o(r) || (r === M.Gt ? this.state = t.Text : (this.state = this.isTagStartChar(r) ? t.InClosingTagName : t.InSpecialComment, this.sectionStart = this.index));
1126
- }, i.prototype.stateInClosingTagName = function(r) {
1127
- (r === M.Gt || o(r)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = t.AfterClosingTagName, this.stateAfterClosingTagName(r));
1128
- }, i.prototype.stateAfterClosingTagName = function(r) {
1129
- (r === M.Gt || this.fastForwardTo(M.Gt)) && (this.state = t.Text, this.baseState = t.Text, this.sectionStart = this.index + 1);
1130
- }, i.prototype.stateBeforeAttributeName = function(r) {
1131
- r === M.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = t.InSpecialTag, this.sequenceIndex = 0) : this.state = t.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : r === M.Slash ? this.state = t.InSelfClosingTag : o(r) || (this.state = t.InAttributeName, this.sectionStart = this.index);
1132
- }, i.prototype.stateInSelfClosingTag = function(r) {
1133
- r === M.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = t.Text, this.baseState = t.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : o(r) || (this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(r));
1134
- }, i.prototype.stateInAttributeName = function(r) {
1135
- (r === M.Eq || z(r)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = t.AfterAttributeName, this.stateAfterAttributeName(r));
1136
- }, i.prototype.stateAfterAttributeName = function(r) {
1137
- r === M.Eq ? this.state = t.BeforeAttributeValue : r === M.Slash || r === M.Gt ? (this.cbs.onattribend(n.NoValue, this.index), this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(r)) : o(r) || (this.cbs.onattribend(n.NoValue, this.index), this.state = t.InAttributeName, this.sectionStart = this.index);
1138
- }, i.prototype.stateBeforeAttributeValue = function(r) {
1139
- r === M.DoubleQuote ? (this.state = t.InAttributeValueDq, this.sectionStart = this.index + 1) : r === M.SingleQuote ? (this.state = t.InAttributeValueSq, this.sectionStart = this.index + 1) : o(r) || (this.sectionStart = this.index, this.state = t.InAttributeValueNq, this.stateInAttributeValueNoQuotes(r));
1140
- }, i.prototype.handleInAttributeValue = function(r, d) {
1141
- r === d || !this.decodeEntities && this.fastForwardTo(d) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(d === M.DoubleQuote ? n.Double : n.Single, this.index), this.state = t.BeforeAttributeName) : this.decodeEntities && r === M.Amp && (this.baseState = this.state, this.state = t.BeforeEntity);
1142
- }, i.prototype.stateInAttributeValueDoubleQuotes = function(r) {
1143
- this.handleInAttributeValue(r, M.DoubleQuote);
1144
- }, i.prototype.stateInAttributeValueSingleQuotes = function(r) {
1145
- this.handleInAttributeValue(r, M.SingleQuote);
1146
- }, i.prototype.stateInAttributeValueNoQuotes = function(r) {
1147
- o(r) || r === M.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(n.Unquoted, this.index), this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(r)) : this.decodeEntities && r === M.Amp && (this.baseState = this.state, this.state = t.BeforeEntity);
1148
- }, i.prototype.stateBeforeDeclaration = function(r) {
1149
- r === M.OpeningSquareBracket ? (this.state = t.CDATASequence, this.sequenceIndex = 0) : this.state = r === M.Dash ? t.BeforeComment : t.InDeclaration;
1150
- }, i.prototype.stateInDeclaration = function(r) {
1151
- (r === M.Gt || this.fastForwardTo(M.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = t.Text, this.sectionStart = this.index + 1);
1152
- }, i.prototype.stateInProcessingInstruction = function(r) {
1153
- (r === M.Gt || this.fastForwardTo(M.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = t.Text, this.sectionStart = this.index + 1);
1154
- }, i.prototype.stateBeforeComment = function(r) {
1155
- r === M.Dash ? (this.state = t.InCommentLike, this.currentSequence = s.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = t.InDeclaration;
1156
- }, i.prototype.stateInSpecialComment = function(r) {
1157
- (r === M.Gt || this.fastForwardTo(M.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = t.Text, this.sectionStart = this.index + 1);
1158
- }, i.prototype.stateBeforeSpecialS = function(r) {
1159
- var d = r | 32;
1160
- d === s.ScriptEnd[3] ? this.startSpecial(s.ScriptEnd, 4) : d === s.StyleEnd[3] ? this.startSpecial(s.StyleEnd, 4) : (this.state = t.InTagName, this.stateInTagName(r));
1161
- }, i.prototype.stateBeforeEntity = function(r) {
1162
- this.entityExcess = 1, this.entityResult = 0, r === M.Number ? this.state = t.BeforeNumericEntity : r === M.Amp || (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = t.InNamedEntity, this.stateInNamedEntity(r));
1163
- }, i.prototype.stateInNamedEntity = function(r) {
1164
- if (this.entityExcess += 1, this.trieIndex = (0, b.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, r), this.trieIndex < 0) {
1123
+ } else i === M.Slash ? this.state = t.BeforeClosingTagName : (this.state = t.Text, this.stateText(i));
1124
+ }, r.prototype.stateInTagName = function(i) {
1125
+ z(i) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(i));
1126
+ }, r.prototype.stateBeforeClosingTagName = function(i) {
1127
+ o(i) || (i === M.Gt ? this.state = t.Text : (this.state = this.isTagStartChar(i) ? t.InClosingTagName : t.InSpecialComment, this.sectionStart = this.index));
1128
+ }, r.prototype.stateInClosingTagName = function(i) {
1129
+ (i === M.Gt || o(i)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = t.AfterClosingTagName, this.stateAfterClosingTagName(i));
1130
+ }, r.prototype.stateAfterClosingTagName = function(i) {
1131
+ (i === M.Gt || this.fastForwardTo(M.Gt)) && (this.state = t.Text, this.baseState = t.Text, this.sectionStart = this.index + 1);
1132
+ }, r.prototype.stateBeforeAttributeName = function(i) {
1133
+ i === M.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = t.InSpecialTag, this.sequenceIndex = 0) : this.state = t.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : i === M.Slash ? this.state = t.InSelfClosingTag : o(i) || (this.state = t.InAttributeName, this.sectionStart = this.index);
1134
+ }, r.prototype.stateInSelfClosingTag = function(i) {
1135
+ i === M.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = t.Text, this.baseState = t.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : o(i) || (this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(i));
1136
+ }, r.prototype.stateInAttributeName = function(i) {
1137
+ (i === M.Eq || z(i)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = t.AfterAttributeName, this.stateAfterAttributeName(i));
1138
+ }, r.prototype.stateAfterAttributeName = function(i) {
1139
+ i === M.Eq ? this.state = t.BeforeAttributeValue : i === M.Slash || i === M.Gt ? (this.cbs.onattribend(n.NoValue, this.index), this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(i)) : o(i) || (this.cbs.onattribend(n.NoValue, this.index), this.state = t.InAttributeName, this.sectionStart = this.index);
1140
+ }, r.prototype.stateBeforeAttributeValue = function(i) {
1141
+ i === M.DoubleQuote ? (this.state = t.InAttributeValueDq, this.sectionStart = this.index + 1) : i === M.SingleQuote ? (this.state = t.InAttributeValueSq, this.sectionStart = this.index + 1) : o(i) || (this.sectionStart = this.index, this.state = t.InAttributeValueNq, this.stateInAttributeValueNoQuotes(i));
1142
+ }, r.prototype.handleInAttributeValue = function(i, d) {
1143
+ i === d || !this.decodeEntities && this.fastForwardTo(d) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(d === M.DoubleQuote ? n.Double : n.Single, this.index), this.state = t.BeforeAttributeName) : this.decodeEntities && i === M.Amp && (this.baseState = this.state, this.state = t.BeforeEntity);
1144
+ }, r.prototype.stateInAttributeValueDoubleQuotes = function(i) {
1145
+ this.handleInAttributeValue(i, M.DoubleQuote);
1146
+ }, r.prototype.stateInAttributeValueSingleQuotes = function(i) {
1147
+ this.handleInAttributeValue(i, M.SingleQuote);
1148
+ }, r.prototype.stateInAttributeValueNoQuotes = function(i) {
1149
+ o(i) || i === M.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(n.Unquoted, this.index), this.state = t.BeforeAttributeName, this.stateBeforeAttributeName(i)) : this.decodeEntities && i === M.Amp && (this.baseState = this.state, this.state = t.BeforeEntity);
1150
+ }, r.prototype.stateBeforeDeclaration = function(i) {
1151
+ i === M.OpeningSquareBracket ? (this.state = t.CDATASequence, this.sequenceIndex = 0) : this.state = i === M.Dash ? t.BeforeComment : t.InDeclaration;
1152
+ }, r.prototype.stateInDeclaration = function(i) {
1153
+ (i === M.Gt || this.fastForwardTo(M.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = t.Text, this.sectionStart = this.index + 1);
1154
+ }, r.prototype.stateInProcessingInstruction = function(i) {
1155
+ (i === M.Gt || this.fastForwardTo(M.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = t.Text, this.sectionStart = this.index + 1);
1156
+ }, r.prototype.stateBeforeComment = function(i) {
1157
+ i === M.Dash ? (this.state = t.InCommentLike, this.currentSequence = s.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = t.InDeclaration;
1158
+ }, r.prototype.stateInSpecialComment = function(i) {
1159
+ (i === M.Gt || this.fastForwardTo(M.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = t.Text, this.sectionStart = this.index + 1);
1160
+ }, r.prototype.stateBeforeSpecialS = function(i) {
1161
+ var d = i | 32;
1162
+ d === s.ScriptEnd[3] ? this.startSpecial(s.ScriptEnd, 4) : d === s.StyleEnd[3] ? this.startSpecial(s.StyleEnd, 4) : (this.state = t.InTagName, this.stateInTagName(i));
1163
+ }, r.prototype.stateBeforeEntity = function(i) {
1164
+ this.entityExcess = 1, this.entityResult = 0, i === M.Number ? this.state = t.BeforeNumericEntity : i === M.Amp || (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = t.InNamedEntity, this.stateInNamedEntity(i));
1165
+ }, r.prototype.stateInNamedEntity = function(i) {
1166
+ if (this.entityExcess += 1, this.trieIndex = (0, b.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, i), this.trieIndex < 0) {
1165
1167
  this.emitNamedEntity(), this.index--;
1166
1168
  return;
1167
1169
  }
@@ -1169,17 +1171,17 @@ function Rc() {
1169
1171
  var d = this.trieCurrent & b.BinTrieFlags.VALUE_LENGTH;
1170
1172
  if (d) {
1171
1173
  var q = (d >> 14) - 1;
1172
- if (!this.allowLegacyEntity() && r !== M.Semi)
1174
+ if (!this.allowLegacyEntity() && i !== M.Semi)
1173
1175
  this.trieIndex += q;
1174
1176
  else {
1175
1177
  var f = this.index - this.entityExcess + 1;
1176
1178
  f > this.sectionStart && this.emitPartial(this.sectionStart, f), this.entityResult = this.trieIndex, this.trieIndex += q, this.entityExcess = 0, this.sectionStart = this.index + 1, q === 0 && this.emitNamedEntity();
1177
1179
  }
1178
1180
  }
1179
- }, i.prototype.emitNamedEntity = function() {
1181
+ }, r.prototype.emitNamedEntity = function() {
1180
1182
  if (this.state = this.baseState, this.entityResult !== 0) {
1181
- var r = (this.entityTrie[this.entityResult] & b.BinTrieFlags.VALUE_LENGTH) >> 14;
1182
- switch (r) {
1183
+ var i = (this.entityTrie[this.entityResult] & b.BinTrieFlags.VALUE_LENGTH) >> 14;
1184
+ switch (i) {
1183
1185
  case 1: {
1184
1186
  this.emitCodePoint(this.entityTrie[this.entityResult] & ~b.BinTrieFlags.VALUE_LENGTH);
1185
1187
  break;
@@ -1192,153 +1194,153 @@ function Rc() {
1192
1194
  this.emitCodePoint(this.entityTrie[this.entityResult + 1]), this.emitCodePoint(this.entityTrie[this.entityResult + 2]);
1193
1195
  }
1194
1196
  }
1195
- }, i.prototype.stateBeforeNumericEntity = function(r) {
1196
- (r | 32) === M.LowerX ? (this.entityExcess++, this.state = t.InHexEntity) : (this.state = t.InNumericEntity, this.stateInNumericEntity(r));
1197
- }, i.prototype.emitNumericEntity = function(r) {
1197
+ }, r.prototype.stateBeforeNumericEntity = function(i) {
1198
+ (i | 32) === M.LowerX ? (this.entityExcess++, this.state = t.InHexEntity) : (this.state = t.InNumericEntity, this.stateInNumericEntity(i));
1199
+ }, r.prototype.emitNumericEntity = function(i) {
1198
1200
  var d = this.index - this.entityExcess - 1, q = d + 2 + +(this.state === t.InHexEntity);
1199
- q !== this.index && (d > this.sectionStart && this.emitPartial(this.sectionStart, d), this.sectionStart = this.index + Number(r), this.emitCodePoint((0, b.replaceCodePoint)(this.entityResult))), this.state = this.baseState;
1200
- }, i.prototype.stateInNumericEntity = function(r) {
1201
- r === M.Semi ? this.emitNumericEntity(!0) : c(r) ? (this.entityResult = this.entityResult * 10 + (r - M.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
1202
- }, i.prototype.stateInHexEntity = function(r) {
1203
- r === M.Semi ? this.emitNumericEntity(!0) : c(r) ? (this.entityResult = this.entityResult * 16 + (r - M.Zero), this.entityExcess++) : a(r) ? (this.entityResult = this.entityResult * 16 + ((r | 32) - M.LowerA + 10), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
1204
- }, i.prototype.allowLegacyEntity = function() {
1201
+ q !== this.index && (d > this.sectionStart && this.emitPartial(this.sectionStart, d), this.sectionStart = this.index + Number(i), this.emitCodePoint((0, b.replaceCodePoint)(this.entityResult))), this.state = this.baseState;
1202
+ }, r.prototype.stateInNumericEntity = function(i) {
1203
+ i === M.Semi ? this.emitNumericEntity(!0) : c(i) ? (this.entityResult = this.entityResult * 10 + (i - M.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
1204
+ }, r.prototype.stateInHexEntity = function(i) {
1205
+ i === M.Semi ? this.emitNumericEntity(!0) : c(i) ? (this.entityResult = this.entityResult * 16 + (i - M.Zero), this.entityExcess++) : a(i) ? (this.entityResult = this.entityResult * 16 + ((i | 32) - M.LowerA + 10), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--);
1206
+ }, r.prototype.allowLegacyEntity = function() {
1205
1207
  return !this.xmlMode && (this.baseState === t.Text || this.baseState === t.InSpecialTag);
1206
- }, i.prototype.cleanup = function() {
1208
+ }, r.prototype.cleanup = function() {
1207
1209
  this.running && this.sectionStart !== this.index && (this.state === t.Text || this.state === t.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === t.InAttributeValueDq || this.state === t.InAttributeValueSq || this.state === t.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
1208
- }, i.prototype.shouldContinue = function() {
1210
+ }, r.prototype.shouldContinue = function() {
1209
1211
  return this.index < this.buffer.length + this.offset && this.running;
1210
- }, i.prototype.parse = function() {
1212
+ }, r.prototype.parse = function() {
1211
1213
  for (; this.shouldContinue(); ) {
1212
- var r = this.buffer.charCodeAt(this.index - this.offset);
1214
+ var i = this.buffer.charCodeAt(this.index - this.offset);
1213
1215
  switch (this.state) {
1214
1216
  case t.Text: {
1215
- this.stateText(r);
1217
+ this.stateText(i);
1216
1218
  break;
1217
1219
  }
1218
1220
  case t.SpecialStartSequence: {
1219
- this.stateSpecialStartSequence(r);
1221
+ this.stateSpecialStartSequence(i);
1220
1222
  break;
1221
1223
  }
1222
1224
  case t.InSpecialTag: {
1223
- this.stateInSpecialTag(r);
1225
+ this.stateInSpecialTag(i);
1224
1226
  break;
1225
1227
  }
1226
1228
  case t.CDATASequence: {
1227
- this.stateCDATASequence(r);
1229
+ this.stateCDATASequence(i);
1228
1230
  break;
1229
1231
  }
1230
1232
  case t.InAttributeValueDq: {
1231
- this.stateInAttributeValueDoubleQuotes(r);
1233
+ this.stateInAttributeValueDoubleQuotes(i);
1232
1234
  break;
1233
1235
  }
1234
1236
  case t.InAttributeName: {
1235
- this.stateInAttributeName(r);
1237
+ this.stateInAttributeName(i);
1236
1238
  break;
1237
1239
  }
1238
1240
  case t.InCommentLike: {
1239
- this.stateInCommentLike(r);
1241
+ this.stateInCommentLike(i);
1240
1242
  break;
1241
1243
  }
1242
1244
  case t.InSpecialComment: {
1243
- this.stateInSpecialComment(r);
1245
+ this.stateInSpecialComment(i);
1244
1246
  break;
1245
1247
  }
1246
1248
  case t.BeforeAttributeName: {
1247
- this.stateBeforeAttributeName(r);
1249
+ this.stateBeforeAttributeName(i);
1248
1250
  break;
1249
1251
  }
1250
1252
  case t.InTagName: {
1251
- this.stateInTagName(r);
1253
+ this.stateInTagName(i);
1252
1254
  break;
1253
1255
  }
1254
1256
  case t.InClosingTagName: {
1255
- this.stateInClosingTagName(r);
1257
+ this.stateInClosingTagName(i);
1256
1258
  break;
1257
1259
  }
1258
1260
  case t.BeforeTagName: {
1259
- this.stateBeforeTagName(r);
1261
+ this.stateBeforeTagName(i);
1260
1262
  break;
1261
1263
  }
1262
1264
  case t.AfterAttributeName: {
1263
- this.stateAfterAttributeName(r);
1265
+ this.stateAfterAttributeName(i);
1264
1266
  break;
1265
1267
  }
1266
1268
  case t.InAttributeValueSq: {
1267
- this.stateInAttributeValueSingleQuotes(r);
1269
+ this.stateInAttributeValueSingleQuotes(i);
1268
1270
  break;
1269
1271
  }
1270
1272
  case t.BeforeAttributeValue: {
1271
- this.stateBeforeAttributeValue(r);
1273
+ this.stateBeforeAttributeValue(i);
1272
1274
  break;
1273
1275
  }
1274
1276
  case t.BeforeClosingTagName: {
1275
- this.stateBeforeClosingTagName(r);
1277
+ this.stateBeforeClosingTagName(i);
1276
1278
  break;
1277
1279
  }
1278
1280
  case t.AfterClosingTagName: {
1279
- this.stateAfterClosingTagName(r);
1281
+ this.stateAfterClosingTagName(i);
1280
1282
  break;
1281
1283
  }
1282
1284
  case t.BeforeSpecialS: {
1283
- this.stateBeforeSpecialS(r);
1285
+ this.stateBeforeSpecialS(i);
1284
1286
  break;
1285
1287
  }
1286
1288
  case t.InAttributeValueNq: {
1287
- this.stateInAttributeValueNoQuotes(r);
1289
+ this.stateInAttributeValueNoQuotes(i);
1288
1290
  break;
1289
1291
  }
1290
1292
  case t.InSelfClosingTag: {
1291
- this.stateInSelfClosingTag(r);
1293
+ this.stateInSelfClosingTag(i);
1292
1294
  break;
1293
1295
  }
1294
1296
  case t.InDeclaration: {
1295
- this.stateInDeclaration(r);
1297
+ this.stateInDeclaration(i);
1296
1298
  break;
1297
1299
  }
1298
1300
  case t.BeforeDeclaration: {
1299
- this.stateBeforeDeclaration(r);
1301
+ this.stateBeforeDeclaration(i);
1300
1302
  break;
1301
1303
  }
1302
1304
  case t.BeforeComment: {
1303
- this.stateBeforeComment(r);
1305
+ this.stateBeforeComment(i);
1304
1306
  break;
1305
1307
  }
1306
1308
  case t.InProcessingInstruction: {
1307
- this.stateInProcessingInstruction(r);
1309
+ this.stateInProcessingInstruction(i);
1308
1310
  break;
1309
1311
  }
1310
1312
  case t.InNamedEntity: {
1311
- this.stateInNamedEntity(r);
1313
+ this.stateInNamedEntity(i);
1312
1314
  break;
1313
1315
  }
1314
1316
  case t.BeforeEntity: {
1315
- this.stateBeforeEntity(r);
1317
+ this.stateBeforeEntity(i);
1316
1318
  break;
1317
1319
  }
1318
1320
  case t.InHexEntity: {
1319
- this.stateInHexEntity(r);
1321
+ this.stateInHexEntity(i);
1320
1322
  break;
1321
1323
  }
1322
1324
  case t.InNumericEntity: {
1323
- this.stateInNumericEntity(r);
1325
+ this.stateInNumericEntity(i);
1324
1326
  break;
1325
1327
  }
1326
1328
  default:
1327
- this.stateBeforeNumericEntity(r);
1329
+ this.stateBeforeNumericEntity(i);
1328
1330
  }
1329
1331
  this.index++;
1330
1332
  }
1331
1333
  this.cleanup();
1332
- }, i.prototype.finish = function() {
1334
+ }, r.prototype.finish = function() {
1333
1335
  this.state === t.InNamedEntity && this.emitNamedEntity(), this.sectionStart < this.index && this.handleTrailingData(), this.cbs.onend();
1334
- }, i.prototype.handleTrailingData = function() {
1335
- var r = this.buffer.length + this.offset;
1336
- this.state === t.InCommentLike ? this.currentSequence === s.CdataEnd ? this.cbs.oncdata(this.sectionStart, r, 0) : this.cbs.oncomment(this.sectionStart, r, 0) : this.state === t.InNumericEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === t.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === t.InTagName || this.state === t.BeforeAttributeName || this.state === t.BeforeAttributeValue || this.state === t.AfterAttributeName || this.state === t.InAttributeName || this.state === t.InAttributeValueSq || this.state === t.InAttributeValueDq || this.state === t.InAttributeValueNq || this.state === t.InClosingTagName || this.cbs.ontext(this.sectionStart, r);
1337
- }, i.prototype.emitPartial = function(r, d) {
1338
- this.baseState !== t.Text && this.baseState !== t.InSpecialTag ? this.cbs.onattribdata(r, d) : this.cbs.ontext(r, d);
1339
- }, i.prototype.emitCodePoint = function(r) {
1340
- this.baseState !== t.Text && this.baseState !== t.InSpecialTag ? this.cbs.onattribentity(r) : this.cbs.ontextentity(r);
1341
- }, i;
1336
+ }, r.prototype.handleTrailingData = function() {
1337
+ var i = this.buffer.length + this.offset;
1338
+ this.state === t.InCommentLike ? this.currentSequence === s.CdataEnd ? this.cbs.oncdata(this.sectionStart, i, 0) : this.cbs.oncomment(this.sectionStart, i, 0) : this.state === t.InNumericEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === t.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state === t.InTagName || this.state === t.BeforeAttributeName || this.state === t.BeforeAttributeValue || this.state === t.AfterAttributeName || this.state === t.InAttributeName || this.state === t.InAttributeValueSq || this.state === t.InAttributeValueDq || this.state === t.InAttributeValueNq || this.state === t.InClosingTagName || this.cbs.ontext(this.sectionStart, i);
1339
+ }, r.prototype.emitPartial = function(i, d) {
1340
+ this.baseState !== t.Text && this.baseState !== t.InSpecialTag ? this.cbs.onattribdata(i, d) : this.cbs.ontext(i, d);
1341
+ }, r.prototype.emitCodePoint = function(i) {
1342
+ this.baseState !== t.Text && this.baseState !== t.InSpecialTag ? this.cbs.onattribentity(i) : this.cbs.ontextentity(i);
1343
+ }, r;
1342
1344
  }()
1343
1345
  );
1344
1346
  e.default = u;
@@ -1443,7 +1445,7 @@ function Wo() {
1443
1445
  "source",
1444
1446
  "track",
1445
1447
  "wbr"
1446
- ]), i = /* @__PURE__ */ new Set(["math", "svg"]), r = /* @__PURE__ */ new Set([
1448
+ ]), r = /* @__PURE__ */ new Set(["math", "svg"]), i = /* @__PURE__ */ new Set([
1447
1449
  "mi",
1448
1450
  "mo",
1449
1451
  "mn",
@@ -1482,7 +1484,7 @@ function Wo() {
1482
1484
  var g = this.stack.pop();
1483
1485
  (h = (W = this.cbs).onclosetag) === null || h === void 0 || h.call(W, g, !0);
1484
1486
  }
1485
- this.isVoidElement(A) || (this.stack.push(A), i.has(A) ? this.foreignContext.push(!0) : r.has(A) && this.foreignContext.push(!1)), (l = (m = this.cbs).onopentagname) === null || l === void 0 || l.call(m, A), this.cbs.onopentag && (this.attribs = {});
1487
+ this.isVoidElement(A) || (this.stack.push(A), r.has(A) ? this.foreignContext.push(!0) : i.has(A) && this.foreignContext.push(!1)), (l = (m = this.cbs).onopentagname) === null || l === void 0 || l.call(m, A), this.cbs.onopentag && (this.attribs = {});
1486
1488
  }, f.prototype.endOpenTag = function(A) {
1487
1489
  var W, h;
1488
1490
  this.startIndex = this.openTagStart, this.attribs && ((h = (W = this.cbs).onopentag) === null || h === void 0 || h.call(W, this.tagname, this.attribs, A), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = "";
@@ -1492,7 +1494,7 @@ function Wo() {
1492
1494
  var h, m, l, R, g, y;
1493
1495
  this.endIndex = W;
1494
1496
  var B = this.getSlice(A, W);
1495
- if (this.lowerCaseTagNames && (B = B.toLowerCase()), (i.has(B) || r.has(B)) && this.foreignContext.pop(), this.isVoidElement(B))
1497
+ if (this.lowerCaseTagNames && (B = B.toLowerCase()), (r.has(B) || i.has(B)) && this.foreignContext.pop(), this.isVoidElement(B))
1496
1498
  !this.options.xmlMode && B === "br" && ((m = (h = this.cbs).onopentagname) === null || m === void 0 || m.call(h, "br"), (R = (l = this.cbs).onopentag) === null || R === void 0 || R.call(l, "br", {}, !0), (y = (g = this.cbs).onclosetag) === null || y === void 0 || y.call(g, "br", !1));
1497
1499
  else {
1498
1500
  var _ = this.stack.lastIndexOf(B);
@@ -1899,14 +1901,14 @@ function Ro() {
1899
1901
  }(a)
1900
1902
  );
1901
1903
  l0.Element = u;
1902
- function i(l) {
1904
+ function r(l) {
1903
1905
  return (0, M.isTag)(l);
1904
1906
  }
1905
- l0.isTag = i;
1906
- function r(l) {
1907
+ l0.isTag = r;
1908
+ function i(l) {
1907
1909
  return l.type === M.ElementType.CDATA;
1908
1910
  }
1909
- l0.isCDATA = r;
1911
+ l0.isCDATA = i;
1910
1912
  function d(l) {
1911
1913
  return l.type === M.ElementType.Text;
1912
1914
  }
@@ -1934,12 +1936,12 @@ function Ro() {
1934
1936
  g = new z(l.data);
1935
1937
  else if (q(l))
1936
1938
  g = new c(l.data);
1937
- else if (i(l)) {
1939
+ else if (r(l)) {
1938
1940
  var y = R ? m(l.children) : [], B = new u(l.name, b({}, l.attribs), y);
1939
1941
  y.forEach(function(w) {
1940
1942
  return w.parent = B;
1941
1943
  }), l.namespace != null && (B.namespace = l.namespace), l["x-attribsNamespace"] && (B["x-attribsNamespace"] = b({}, l["x-attribsNamespace"])), l["x-attribsPrefix"] && (B["x-attribsPrefix"] = b({}, l["x-attribsPrefix"])), g = B;
1942
- } else if (r(l)) {
1944
+ } else if (i(l)) {
1943
1945
  var y = R ? m(l.children) : [], _ = new n(y);
1944
1946
  y.forEach(function(C) {
1945
1947
  return C.parent = _;
@@ -2124,12 +2126,12 @@ function vo() {
2124
2126
  Y1.encodeNonAsciiHTML = z;
2125
2127
  function c(p, a) {
2126
2128
  for (var n = "", s = 0, u; (u = p.exec(a)) !== null; ) {
2127
- var i = u.index;
2128
- n += a.substring(s, i);
2129
- var r = a.charCodeAt(i), d = b.default.get(r);
2129
+ var r = u.index;
2130
+ n += a.substring(s, r);
2131
+ var i = a.charCodeAt(r), d = b.default.get(i);
2130
2132
  if (typeof d == "object") {
2131
- if (i + 1 < a.length) {
2132
- var q = a.charCodeAt(i + 1), f = typeof d.n == "number" ? d.n === q ? d.o : void 0 : d.n.get(q);
2133
+ if (r + 1 < a.length) {
2134
+ var q = a.charCodeAt(r + 1), f = typeof d.n == "number" ? d.n === q ? d.o : void 0 : d.n.get(q);
2133
2135
  if (f !== void 0) {
2134
2136
  n += f, s = p.lastIndex += 1;
2135
2137
  continue;
@@ -2138,10 +2140,10 @@ function vo() {
2138
2140
  d = d.v;
2139
2141
  }
2140
2142
  if (d !== void 0)
2141
- n += d, s = i + 1;
2143
+ n += d, s = r + 1;
2142
2144
  else {
2143
- var A = (0, M.getCodePoint)(a, i);
2144
- n += "&#x".concat(A.toString(16), ";"), s = p.lastIndex += +(A !== r);
2145
+ var A = (0, M.getCodePoint)(a, r);
2146
+ n += "&#x".concat(A.toString(16), ";"), s = p.lastIndex += +(A !== i);
2145
2147
  }
2146
2148
  }
2147
2149
  return n + a.substr(s);
@@ -2153,34 +2155,34 @@ function vr() {
2153
2155
  return Bo || (Bo = 1, function(e) {
2154
2156
  Object.defineProperty(e, "__esModule", { value: !0 }), e.decodeXMLStrict = e.decodeHTML5Strict = e.decodeHTML4Strict = e.decodeHTML5 = e.decodeHTML4 = e.decodeHTMLAttribute = e.decodeHTMLStrict = e.decodeHTML = e.decodeXML = e.DecodingMode = e.EntityDecoder = e.encodeHTML5 = e.encodeHTML4 = e.encodeNonAsciiHTML = e.encodeHTML = e.escapeText = e.escapeAttribute = e.escapeUTF8 = e.escape = e.encodeXML = e.encode = e.decodeStrict = e.decode = e.EncodingMode = e.EntityLevel = void 0;
2155
2157
  var b = /* @__PURE__ */ Ob(), M = /* @__PURE__ */ vo(), t = /* @__PURE__ */ QM(), o;
2156
- (function(i) {
2157
- i[i.XML = 0] = "XML", i[i.HTML = 1] = "HTML";
2158
+ (function(r) {
2159
+ r[r.XML = 0] = "XML", r[r.HTML = 1] = "HTML";
2158
2160
  })(o = e.EntityLevel || (e.EntityLevel = {}));
2159
2161
  var z;
2160
- (function(i) {
2161
- i[i.UTF8 = 0] = "UTF8", i[i.ASCII = 1] = "ASCII", i[i.Extensive = 2] = "Extensive", i[i.Attribute = 3] = "Attribute", i[i.Text = 4] = "Text";
2162
+ (function(r) {
2163
+ r[r.UTF8 = 0] = "UTF8", r[r.ASCII = 1] = "ASCII", r[r.Extensive = 2] = "Extensive", r[r.Attribute = 3] = "Attribute", r[r.Text = 4] = "Text";
2162
2164
  })(z = e.EncodingMode || (e.EncodingMode = {}));
2163
- function c(i, r) {
2164
- r === void 0 && (r = o.XML);
2165
- var d = typeof r == "number" ? r : r.level;
2165
+ function c(r, i) {
2166
+ i === void 0 && (i = o.XML);
2167
+ var d = typeof i == "number" ? i : i.level;
2166
2168
  if (d === o.HTML) {
2167
- var q = typeof r == "object" ? r.mode : void 0;
2168
- return (0, b.decodeHTML)(i, q);
2169
+ var q = typeof i == "object" ? i.mode : void 0;
2170
+ return (0, b.decodeHTML)(r, q);
2169
2171
  }
2170
- return (0, b.decodeXML)(i);
2172
+ return (0, b.decodeXML)(r);
2171
2173
  }
2172
2174
  e.decode = c;
2173
- function p(i, r) {
2175
+ function p(r, i) {
2174
2176
  var d;
2175
- r === void 0 && (r = o.XML);
2176
- var q = typeof r == "number" ? { level: r } : r;
2177
- return (d = q.mode) !== null && d !== void 0 || (q.mode = b.DecodingMode.Strict), c(i, q);
2177
+ i === void 0 && (i = o.XML);
2178
+ var q = typeof i == "number" ? { level: i } : i;
2179
+ return (d = q.mode) !== null && d !== void 0 || (q.mode = b.DecodingMode.Strict), c(r, q);
2178
2180
  }
2179
2181
  e.decodeStrict = p;
2180
- function a(i, r) {
2181
- r === void 0 && (r = o.XML);
2182
- var d = typeof r == "number" ? { level: r } : r;
2183
- return d.mode === z.UTF8 ? (0, t.escapeUTF8)(i) : d.mode === z.Attribute ? (0, t.escapeAttribute)(i) : d.mode === z.Text ? (0, t.escapeText)(i) : d.level === o.HTML ? d.mode === z.ASCII ? (0, M.encodeNonAsciiHTML)(i) : (0, M.encodeHTML)(i) : (0, t.encodeXML)(i);
2182
+ function a(r, i) {
2183
+ i === void 0 && (i = o.XML);
2184
+ var d = typeof i == "number" ? { level: i } : i;
2185
+ return d.mode === z.UTF8 ? (0, t.escapeUTF8)(r) : d.mode === z.Attribute ? (0, t.escapeAttribute)(r) : d.mode === z.Text ? (0, t.escapeText)(r) : d.level === o.HTML ? d.mode === z.ASCII ? (0, M.encodeNonAsciiHTML)(r) : (0, M.encodeHTML)(r) : (0, t.encodeXML)(r);
2184
2186
  }
2185
2187
  e.encode = a;
2186
2188
  var n = /* @__PURE__ */ QM();
@@ -2415,11 +2417,11 @@ function Tr() {
2415
2417
  function u(m, l) {
2416
2418
  l === void 0 && (l = {});
2417
2419
  for (var R = ("length" in m) ? m : [m], g = "", y = 0; y < R.length; y++)
2418
- g += i(R[y], l);
2420
+ g += r(R[y], l);
2419
2421
  return g;
2420
2422
  }
2421
2423
  r1.render = u, r1.default = u;
2422
- function i(m, l) {
2424
+ function r(m, l) {
2423
2425
  switch (m.type) {
2424
2426
  case o.Root:
2425
2427
  return u(m.children, l);
@@ -2438,7 +2440,7 @@ function Tr() {
2438
2440
  return A(m, l);
2439
2441
  }
2440
2442
  }
2441
- var r = /* @__PURE__ */ new Set([
2443
+ var i = /* @__PURE__ */ new Set([
2442
2444
  "mi",
2443
2445
  "mo",
2444
2446
  "mn",
@@ -2451,7 +2453,7 @@ function Tr() {
2451
2453
  ]), d = /* @__PURE__ */ new Set(["svg", "math"]);
2452
2454
  function q(m, l) {
2453
2455
  var R;
2454
- l.xmlMode === "foreign" && (m.name = (R = c.elementNames.get(m.name)) !== null && R !== void 0 ? R : m.name, m.parent && r.has(m.parent.name) && (l = e(e({}, l), { xmlMode: !1 }))), !l.xmlMode && d.has(m.name) && (l = e(e({}, l), { xmlMode: "foreign" }));
2456
+ l.xmlMode === "foreign" && (m.name = (R = c.elementNames.get(m.name)) !== null && R !== void 0 ? R : m.name, m.parent && i.has(m.parent.name) && (l = e(e({}, l), { xmlMode: !1 }))), !l.xmlMode && d.has(m.name) && (l = e(e({}, l), { xmlMode: "foreign" }));
2455
2457
  var g = "<".concat(m.name), y = n(m.attribs, l);
2456
2458
  return y && (g += " ".concat(y)), m.children.length === 0 && (l.xmlMode ? (
2457
2459
  // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
@@ -2517,14 +2519,14 @@ function _r() {
2517
2519
  return n.parent || null;
2518
2520
  }
2519
2521
  function t(n) {
2520
- var s, u, i = M(n);
2521
- if (i != null)
2522
- return b(i);
2523
- for (var r = [n], d = n.prev, q = n.next; d != null; )
2524
- r.unshift(d), s = d, d = s.prev;
2522
+ var s, u, r = M(n);
2523
+ if (r != null)
2524
+ return b(r);
2525
+ for (var i = [n], d = n.prev, q = n.next; d != null; )
2526
+ i.unshift(d), s = d, d = s.prev;
2525
2527
  for (; q != null; )
2526
- r.push(q), u = q, q = u.next;
2527
- return r;
2528
+ i.push(q), u = q, q = u.next;
2529
+ return i;
2528
2530
  }
2529
2531
  function o(n, s) {
2530
2532
  var u;
@@ -2614,17 +2616,17 @@ function Lc() {
2614
2616
  return n === void 0 && (n = !0), s === void 0 && (s = 1 / 0), M(p, Array.isArray(a) ? a : [a], n, s);
2615
2617
  }
2616
2618
  function M(p, a, n, s) {
2617
- for (var u = [], i = [Array.isArray(a) ? a : [a]], r = [0]; ; ) {
2618
- if (r[0] >= i[0].length) {
2619
- if (r.length === 1)
2619
+ for (var u = [], r = [Array.isArray(a) ? a : [a]], i = [0]; ; ) {
2620
+ if (i[0] >= r[0].length) {
2621
+ if (i.length === 1)
2620
2622
  return u;
2621
- i.shift(), r.shift();
2623
+ r.shift(), i.shift();
2622
2624
  continue;
2623
2625
  }
2624
- var d = i[0][r[0]++];
2626
+ var d = r[0][i[0]++];
2625
2627
  if (p(d) && (u.push(d), --s <= 0))
2626
2628
  return u;
2627
- n && (0, e.hasChildren)(d) && d.children.length > 0 && (r.unshift(0), i.unshift(d.children));
2629
+ n && (0, e.hasChildren)(d) && d.children.length > 0 && (i.unshift(0), r.unshift(d.children));
2628
2630
  }
2629
2631
  }
2630
2632
  function t(p, a) {
@@ -2633,13 +2635,13 @@ function Lc() {
2633
2635
  function o(p, a, n) {
2634
2636
  n === void 0 && (n = !0);
2635
2637
  for (var s = Array.isArray(a) ? a : [a], u = 0; u < s.length; u++) {
2636
- var i = s[u];
2637
- if ((0, e.isTag)(i) && p(i))
2638
- return i;
2639
- if (n && (0, e.hasChildren)(i) && i.children.length > 0) {
2640
- var r = o(p, i.children, !0);
2641
- if (r)
2642
- return r;
2638
+ var r = s[u];
2639
+ if ((0, e.isTag)(r) && p(r))
2640
+ return r;
2641
+ if (n && (0, e.hasChildren)(r) && r.children.length > 0) {
2642
+ var i = o(p, r.children, !0);
2643
+ if (i)
2644
+ return i;
2643
2645
  }
2644
2646
  }
2645
2647
  return null;
@@ -2657,8 +2659,8 @@ function Lc() {
2657
2659
  s.shift(), u.shift();
2658
2660
  continue;
2659
2661
  }
2660
- var i = s[0][u[0]++];
2661
- (0, e.isTag)(i) && p(i) && n.push(i), (0, e.hasChildren)(i) && i.children.length > 0 && (u.unshift(0), s.unshift(i.children));
2662
+ var r = s[0][u[0]++];
2663
+ (0, e.isTag)(r) && p(r) && n.push(r), (0, e.hasChildren)(r) && r.children.length > 0 && (u.unshift(0), s.unshift(r.children));
2662
2664
  }
2663
2665
  }
2664
2666
  return K1;
@@ -2668,67 +2670,67 @@ function Nc() {
2668
2670
  if (Co) return Q1;
2669
2671
  Co = 1, Object.defineProperty(Q1, "__esModule", { value: !0 }), Q1.testElement = c, Q1.getElements = p, Q1.getElementById = a, Q1.getElementsByTagName = n, Q1.getElementsByClassName = s, Q1.getElementsByTagType = u;
2670
2672
  var e = /* @__PURE__ */ q2(), b = /* @__PURE__ */ Lc(), M = {
2671
- tag_name: function(i) {
2672
- return typeof i == "function" ? function(r) {
2673
- return (0, e.isTag)(r) && i(r.name);
2674
- } : i === "*" ? e.isTag : function(r) {
2675
- return (0, e.isTag)(r) && r.name === i;
2673
+ tag_name: function(r) {
2674
+ return typeof r == "function" ? function(i) {
2675
+ return (0, e.isTag)(i) && r(i.name);
2676
+ } : r === "*" ? e.isTag : function(i) {
2677
+ return (0, e.isTag)(i) && i.name === r;
2676
2678
  };
2677
2679
  },
2678
- tag_type: function(i) {
2679
- return typeof i == "function" ? function(r) {
2680
- return i(r.type);
2681
- } : function(r) {
2682
- return r.type === i;
2680
+ tag_type: function(r) {
2681
+ return typeof r == "function" ? function(i) {
2682
+ return r(i.type);
2683
+ } : function(i) {
2684
+ return i.type === r;
2683
2685
  };
2684
2686
  },
2685
- tag_contains: function(i) {
2686
- return typeof i == "function" ? function(r) {
2687
- return (0, e.isText)(r) && i(r.data);
2688
- } : function(r) {
2689
- return (0, e.isText)(r) && r.data === i;
2687
+ tag_contains: function(r) {
2688
+ return typeof r == "function" ? function(i) {
2689
+ return (0, e.isText)(i) && r(i.data);
2690
+ } : function(i) {
2691
+ return (0, e.isText)(i) && i.data === r;
2690
2692
  };
2691
2693
  }
2692
2694
  };
2693
- function t(i, r) {
2694
- return typeof r == "function" ? function(d) {
2695
- return (0, e.isTag)(d) && r(d.attribs[i]);
2695
+ function t(r, i) {
2696
+ return typeof i == "function" ? function(d) {
2697
+ return (0, e.isTag)(d) && i(d.attribs[r]);
2696
2698
  } : function(d) {
2697
- return (0, e.isTag)(d) && d.attribs[i] === r;
2699
+ return (0, e.isTag)(d) && d.attribs[r] === i;
2698
2700
  };
2699
2701
  }
2700
- function o(i, r) {
2702
+ function o(r, i) {
2701
2703
  return function(d) {
2702
- return i(d) || r(d);
2704
+ return r(d) || i(d);
2703
2705
  };
2704
2706
  }
2705
- function z(i) {
2706
- var r = Object.keys(i).map(function(d) {
2707
- var q = i[d];
2707
+ function z(r) {
2708
+ var i = Object.keys(r).map(function(d) {
2709
+ var q = r[d];
2708
2710
  return Object.prototype.hasOwnProperty.call(M, d) ? M[d](q) : t(d, q);
2709
2711
  });
2710
- return r.length === 0 ? null : r.reduce(o);
2712
+ return i.length === 0 ? null : i.reduce(o);
2711
2713
  }
2712
- function c(i, r) {
2713
- var d = z(i);
2714
- return d ? d(r) : !0;
2714
+ function c(r, i) {
2715
+ var d = z(r);
2716
+ return d ? d(i) : !0;
2715
2717
  }
2716
- function p(i, r, d, q) {
2718
+ function p(r, i, d, q) {
2717
2719
  q === void 0 && (q = 1 / 0);
2718
- var f = z(i);
2719
- return f ? (0, b.filter)(f, r, d, q) : [];
2720
+ var f = z(r);
2721
+ return f ? (0, b.filter)(f, i, d, q) : [];
2720
2722
  }
2721
- function a(i, r, d) {
2722
- return d === void 0 && (d = !0), Array.isArray(r) || (r = [r]), (0, b.findOne)(t("id", i), r, d);
2723
+ function a(r, i, d) {
2724
+ return d === void 0 && (d = !0), Array.isArray(i) || (i = [i]), (0, b.findOne)(t("id", r), i, d);
2723
2725
  }
2724
- function n(i, r, d, q) {
2725
- return d === void 0 && (d = !0), q === void 0 && (q = 1 / 0), (0, b.filter)(M.tag_name(i), r, d, q);
2726
+ function n(r, i, d, q) {
2727
+ return d === void 0 && (d = !0), q === void 0 && (q = 1 / 0), (0, b.filter)(M.tag_name(r), i, d, q);
2726
2728
  }
2727
- function s(i, r, d, q) {
2728
- return d === void 0 && (d = !0), q === void 0 && (q = 1 / 0), (0, b.filter)(t("class", i), r, d, q);
2729
+ function s(r, i, d, q) {
2730
+ return d === void 0 && (d = !0), q === void 0 && (q = 1 / 0), (0, b.filter)(t("class", r), i, d, q);
2729
2731
  }
2730
- function u(i, r, d, q) {
2731
- return d === void 0 && (d = !0), q === void 0 && (q = 1 / 0), (0, b.filter)(M.tag_type(i), r, d, q);
2732
+ function u(r, i, d, q) {
2733
+ return d === void 0 && (d = !0), q === void 0 && (q = 1 / 0), (0, b.filter)(M.tag_type(r), i, d, q);
2732
2734
  }
2733
2735
  return Q1;
2734
2736
  }
@@ -2768,8 +2770,8 @@ function wr() {
2768
2770
  u++;
2769
2771
  if (u === 0)
2770
2772
  return M.DISCONNECTED;
2771
- var i = p[u - 1], r = i.children, d = p[u], q = a[u];
2772
- return r.indexOf(d) > r.indexOf(q) ? i === c ? M.FOLLOWING | M.CONTAINED_BY : M.FOLLOWING : i === z ? M.PRECEDING | M.CONTAINS : M.PRECEDING;
2773
+ var r = p[u - 1], i = r.children, d = p[u], q = a[u];
2774
+ return i.indexOf(d) > i.indexOf(q) ? r === c ? M.FOLLOWING | M.CONTAINED_BY : M.FOLLOWING : r === z ? M.PRECEDING | M.CONTAINS : M.PRECEDING;
2773
2775
  }
2774
2776
  function o(z) {
2775
2777
  return z = z.filter(function(c, p, a) {
@@ -2786,12 +2788,12 @@ function Sr() {
2786
2788
  if (Io) return $e;
2787
2789
  Io = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.getFeed = M;
2788
2790
  var e = /* @__PURE__ */ gc(), b = /* @__PURE__ */ Nc();
2789
- function M(i) {
2790
- var r = a(u, i);
2791
- return r ? r.name === "feed" ? t(r) : o(r) : null;
2791
+ function M(r) {
2792
+ var i = a(u, r);
2793
+ return i ? i.name === "feed" ? t(i) : o(i) : null;
2792
2794
  }
2793
- function t(i) {
2794
- var r, d = i.children, q = {
2795
+ function t(r) {
2796
+ var i, d = r.children, q = {
2795
2797
  type: "atom",
2796
2798
  items: (0, b.getElementsByTagName)("entry", d).map(function(W) {
2797
2799
  var h, m = W.children, l = { media: p(m) };
@@ -2805,16 +2807,16 @@ function Sr() {
2805
2807
  })
2806
2808
  };
2807
2809
  s(q, "id", "id", d), s(q, "title", "title", d);
2808
- var f = (r = a("link", d)) === null || r === void 0 ? void 0 : r.attribs.href;
2810
+ var f = (i = a("link", d)) === null || i === void 0 ? void 0 : i.attribs.href;
2809
2811
  f && (q.link = f), s(q, "description", "subtitle", d);
2810
2812
  var A = n("updated", d);
2811
2813
  return A && (q.updated = new Date(A)), s(q, "author", "email", d, !0), q;
2812
2814
  }
2813
- function o(i) {
2814
- var r, d, q = (d = (r = a("channel", i.children)) === null || r === void 0 ? void 0 : r.children) !== null && d !== void 0 ? d : [], f = {
2815
- type: i.name.substr(0, 3),
2815
+ function o(r) {
2816
+ var i, d, q = (d = (i = a("channel", r.children)) === null || i === void 0 ? void 0 : i.children) !== null && d !== void 0 ? d : [], f = {
2817
+ type: r.name.substr(0, 3),
2816
2818
  id: "",
2817
- items: (0, b.getElementsByTagName)("item", i.children).map(function(W) {
2819
+ items: (0, b.getElementsByTagName)("item", r.children).map(function(W) {
2818
2820
  var h = W.children, m = { media: p(h) };
2819
2821
  s(m, "id", "guid", h), s(m, "title", "title", h), s(m, "link", "link", h), s(m, "description", "description", h);
2820
2822
  var l = n("pubDate", h) || n("dc:date", h);
@@ -2835,9 +2837,9 @@ function Sr() {
2835
2837
  "height",
2836
2838
  "width"
2837
2839
  ];
2838
- function p(i) {
2839
- return (0, b.getElementsByTagName)("media:content", i).map(function(r) {
2840
- for (var d = r.attribs, q = {
2840
+ function p(r) {
2841
+ return (0, b.getElementsByTagName)("media:content", r).map(function(i) {
2842
+ for (var d = i.attribs, q = {
2841
2843
  medium: d.medium,
2842
2844
  isDefault: !!d.isDefault
2843
2845
  }, f = 0, A = z; f < A.length; f++) {
@@ -2851,19 +2853,19 @@ function Sr() {
2851
2853
  return d.expression && (q.expression = d.expression), q;
2852
2854
  });
2853
2855
  }
2854
- function a(i, r) {
2855
- return (0, b.getElementsByTagName)(i, r, !0, 1)[0];
2856
+ function a(r, i) {
2857
+ return (0, b.getElementsByTagName)(r, i, !0, 1)[0];
2856
2858
  }
2857
- function n(i, r, d) {
2858
- return d === void 0 && (d = !1), (0, e.textContent)((0, b.getElementsByTagName)(i, r, d, 1)).trim();
2859
+ function n(r, i, d) {
2860
+ return d === void 0 && (d = !1), (0, e.textContent)((0, b.getElementsByTagName)(r, i, d, 1)).trim();
2859
2861
  }
2860
- function s(i, r, d, q, f) {
2862
+ function s(r, i, d, q, f) {
2861
2863
  f === void 0 && (f = !1);
2862
2864
  var A = n(d, q, f);
2863
- A && (i[r] = A);
2865
+ A && (r[i] = A);
2864
2866
  }
2865
- function u(i) {
2866
- return i === "rss" || i === "feed" || i === "rdf:RDF";
2867
+ function u(r) {
2868
+ return r === "rss" || r === "feed" || r === "rdf:RDF";
2867
2869
  }
2868
2870
  return $e;
2869
2871
  }
@@ -2946,17 +2948,17 @@ function xr() {
2946
2948
  return new z.Parser(m, W);
2947
2949
  }
2948
2950
  e.createDomStream = u;
2949
- var i = /* @__PURE__ */ Rc();
2951
+ var r = /* @__PURE__ */ Rc();
2950
2952
  Object.defineProperty(e, "Tokenizer", { enumerable: !0, get: function() {
2951
- return o(i).default;
2953
+ return o(r).default;
2952
2954
  } }), e.ElementType = t(/* @__PURE__ */ Ee());
2953
- var r = /* @__PURE__ */ bM(), d = /* @__PURE__ */ bM();
2955
+ var i = /* @__PURE__ */ bM(), d = /* @__PURE__ */ bM();
2954
2956
  Object.defineProperty(e, "getFeed", { enumerable: !0, get: function() {
2955
2957
  return d.getFeed;
2956
2958
  } });
2957
2959
  var q = { xmlMode: !0 };
2958
2960
  function f(A, W) {
2959
- return W === void 0 && (W = q), (0, r.getFeed)(s(A, W));
2961
+ return W === void 0 && (W = q), (0, i.getFeed)(s(A, W));
2960
2962
  }
2961
2963
  e.parseFeed = f, e.DomUtils = t(/* @__PURE__ */ bM());
2962
2964
  }(R1)), R1;
@@ -3031,22 +3033,22 @@ function Ir() {
3031
3033
  function u(A) {
3032
3034
  return Object.keys(A).concat(s(A));
3033
3035
  }
3034
- function i(A, W) {
3036
+ function r(A, W) {
3035
3037
  try {
3036
3038
  return W in A;
3037
3039
  } catch {
3038
3040
  return !1;
3039
3041
  }
3040
3042
  }
3041
- function r(A, W) {
3042
- return i(A, W) && !(Object.hasOwnProperty.call(A, W) && Object.propertyIsEnumerable.call(A, W));
3043
+ function i(A, W) {
3044
+ return r(A, W) && !(Object.hasOwnProperty.call(A, W) && Object.propertyIsEnumerable.call(A, W));
3043
3045
  }
3044
3046
  function d(A, W, h) {
3045
3047
  var m = {};
3046
3048
  return h.isMergeableObject(A) && u(A).forEach(function(l) {
3047
3049
  m[l] = p(A[l], h);
3048
3050
  }), u(W).forEach(function(l) {
3049
- r(A, l) || (i(A, l) && h.isMergeableObject(W[l]) ? m[l] = n(l, h)(A[l], W[l], h) : m[l] = p(W[l], h));
3051
+ i(A, l) || (r(A, l) && h.isMergeableObject(W[l]) ? m[l] = n(l, h)(A[l], W[l], h) : m[l] = p(W[l], h));
3050
3052
  }), m;
3051
3053
  }
3052
3054
  function q(A, W, h) {
@@ -3084,34 +3086,34 @@ function kr() {
3084
3086
  if (R)
3085
3087
  return l = R[0], f += l.length, l;
3086
3088
  }
3087
- for (var o = b.length, z = /^[ \t\n\r\u000c]+/, c = /^[, \t\n\r\u000c]+/, p = /^[^ \t\n\r\u000c]+/, a = /[,]+$/, n = /^\d+$/, s = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, u, i, r, d, q, f = 0, A = []; ; ) {
3089
+ for (var o = b.length, z = /^[ \t\n\r\u000c]+/, c = /^[, \t\n\r\u000c]+/, p = /^[^ \t\n\r\u000c]+/, a = /[,]+$/, n = /^\d+$/, s = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, u, r, i, d, q, f = 0, A = []; ; ) {
3088
3090
  if (t(c), f >= o)
3089
3091
  return A;
3090
- u = t(p), i = [], u.slice(-1) === "," ? (u = u.replace(a, ""), h()) : W();
3092
+ u = t(p), r = [], u.slice(-1) === "," ? (u = u.replace(a, ""), h()) : W();
3091
3093
  }
3092
3094
  function W() {
3093
- for (t(z), r = "", d = "in descriptor"; ; ) {
3095
+ for (t(z), i = "", d = "in descriptor"; ; ) {
3094
3096
  if (q = b.charAt(f), d === "in descriptor")
3095
3097
  if (M(q))
3096
- r && (i.push(r), r = "", d = "after descriptor");
3098
+ i && (r.push(i), i = "", d = "after descriptor");
3097
3099
  else if (q === ",") {
3098
- f += 1, r && i.push(r), h();
3100
+ f += 1, i && r.push(i), h();
3099
3101
  return;
3100
3102
  } else if (q === "(")
3101
- r = r + q, d = "in parens";
3103
+ i = i + q, d = "in parens";
3102
3104
  else if (q === "") {
3103
- r && i.push(r), h();
3105
+ i && r.push(i), h();
3104
3106
  return;
3105
3107
  } else
3106
- r = r + q;
3108
+ i = i + q;
3107
3109
  else if (d === "in parens")
3108
3110
  if (q === ")")
3109
- r = r + q, d = "in descriptor";
3111
+ i = i + q, d = "in descriptor";
3110
3112
  else if (q === "") {
3111
- i.push(r), h();
3113
+ r.push(i), h();
3112
3114
  return;
3113
3115
  } else
3114
- r = r + q;
3116
+ i = i + q;
3115
3117
  else if (d === "after descriptor" && !M(q))
3116
3118
  if (q === "") {
3117
3119
  h();
@@ -3123,8 +3125,8 @@ function kr() {
3123
3125
  }
3124
3126
  function h() {
3125
3127
  var m = !1, l, R, g, y, B = {}, _, v, T, w, C;
3126
- for (y = 0; y < i.length; y++)
3127
- _ = i[y], v = _[_.length - 1], T = _.substring(0, _.length - 1), w = parseInt(T, 10), C = parseFloat(T), n.test(T) && v === "w" ? ((l || R) && (m = !0), w === 0 ? m = !0 : l = w) : s.test(T) && v === "x" ? ((l || R || g) && (m = !0), C < 0 ? m = !0 : R = C) : n.test(T) && v === "h" ? ((g || R) && (m = !0), w === 0 ? m = !0 : g = w) : m = !0;
3128
+ for (y = 0; y < r.length; y++)
3129
+ _ = r[y], v = _[_.length - 1], T = _.substring(0, _.length - 1), w = parseInt(T, 10), C = parseFloat(T), n.test(T) && v === "w" ? ((l || R) && (m = !0), w === 0 ? m = !0 : l = w) : s.test(T) && v === "x" ? ((l || R || g) && (m = !0), C < 0 ? m = !0 : R = C) : n.test(T) && v === "h" ? ((g || R) && (m = !0), w === 0 ? m = !0 : g = w) : m = !0;
3128
3130
  m ? console && console.log && console.log("Invalid srcset descriptor found in '" + b + "' at '" + _ + "'.") : (B.url = u, l && (B.w = l), R && (B.d = R), g && (B.h = g), A.push(B));
3129
3131
  }
3130
3132
  };
@@ -3160,28 +3162,28 @@ function lt() {
3160
3162
  if (!this.source) return "";
3161
3163
  let z = this.source;
3162
3164
  o == null && (o = e.isColorSupported);
3163
- let c = (r) => r, p = (r) => r, a = (r) => r;
3165
+ let c = (i) => i, p = (i) => i, a = (i) => i;
3164
3166
  if (o) {
3165
- let { bold: r, gray: d, red: q } = e.createColors(!0);
3166
- p = (f) => r(q(f)), c = (f) => d(f), b && (a = (f) => b(f));
3167
+ let { bold: i, gray: d, red: q } = e.createColors(!0);
3168
+ p = (f) => i(q(f)), c = (f) => d(f), b && (a = (f) => b(f));
3167
3169
  }
3168
- let n = z.split(/\r?\n/), s = Math.max(this.line - 3, 0), u = Math.min(this.line + 2, n.length), i = String(u).length;
3169
- return n.slice(s, u).map((r, d) => {
3170
- let q = s + 1 + d, f = " " + (" " + q).slice(-i) + " | ";
3170
+ let n = z.split(/\r?\n/), s = Math.max(this.line - 3, 0), u = Math.min(this.line + 2, n.length), r = String(u).length;
3171
+ return n.slice(s, u).map((i, d) => {
3172
+ let q = s + 1 + d, f = " " + (" " + q).slice(-r) + " | ";
3171
3173
  if (q === this.line) {
3172
- if (r.length > 160) {
3174
+ if (i.length > 160) {
3173
3175
  let W = 20, h = Math.max(0, this.column - W), m = Math.max(
3174
3176
  this.column + W,
3175
3177
  this.endColumn + W
3176
- ), l = r.slice(h, m), R = c(f.replace(/\d/g, " ")) + r.slice(0, Math.min(this.column - 1, W - 1)).replace(/[^\t]/g, " ");
3178
+ ), l = i.slice(h, m), R = c(f.replace(/\d/g, " ")) + i.slice(0, Math.min(this.column - 1, W - 1)).replace(/[^\t]/g, " ");
3177
3179
  return p(">") + c(f) + a(l) + `
3178
3180
  ` + R + p("^");
3179
3181
  }
3180
- let A = c(f.replace(/\d/g, " ")) + r.slice(0, this.column - 1).replace(/[^\t]/g, " ");
3181
- return p(">") + c(f) + a(r) + `
3182
+ let A = c(f.replace(/\d/g, " ")) + i.slice(0, this.column - 1).replace(/[^\t]/g, " ");
3183
+ return p(">") + c(f) + a(i) + `
3182
3184
  ` + A + p("^");
3183
3185
  }
3184
- return " " + c(f) + a(r);
3186
+ return " " + c(f) + a(i);
3185
3187
  }).join(`
3186
3188
  `);
3187
3189
  }
@@ -3234,8 +3236,8 @@ function yc() {
3234
3236
  if (typeof n.afterName < "u" ? s += n.afterName : u && (s += " "), p.nodes)
3235
3237
  this.block(p, s + u);
3236
3238
  else {
3237
- let i = (n.between || "") + (a ? ";" : "");
3238
- this.builder(M(s + u + i), p);
3239
+ let r = (n.between || "") + (a ? ";" : "");
3240
+ this.builder(M(s + u + r), p);
3239
3241
  }
3240
3242
  }
3241
3243
  beforeAfter(p, a) {
@@ -3246,9 +3248,9 @@ function yc() {
3246
3248
  u += 1, s = s.parent;
3247
3249
  if (n.includes(`
3248
3250
  `)) {
3249
- let i = this.raw(p, null, "indent");
3250
- if (i.length)
3251
- for (let r = 0; r < u; r++) n += i;
3251
+ let r = this.raw(p, null, "indent");
3252
+ if (r.length)
3253
+ for (let i = 0; i < u; i++) n += r;
3252
3254
  }
3253
3255
  return n;
3254
3256
  }
@@ -3263,9 +3265,9 @@ function yc() {
3263
3265
  for (; n > 0 && a[n].type === "comment"; )
3264
3266
  n -= 1;
3265
3267
  let s = this.raw(p, "semicolon"), u = p.type === "document";
3266
- for (let i = 0; i < a.length; i++) {
3267
- let r = a[i], d = this.raw(r, "before");
3268
- d && this.builder(u ? d : M(d)), this.stringify(r, n !== i || s);
3268
+ for (let r = 0; r < a.length; r++) {
3269
+ let i = a[r], d = this.raw(i, "before");
3270
+ d && this.builder(u ? d : M(d)), this.stringify(i, n !== r || s);
3269
3271
  }
3270
3272
  }
3271
3273
  comment(p) {
@@ -3287,18 +3289,18 @@ function yc() {
3287
3289
  if (n === "before" && (!u || u.type === "root" && u.first === p || u && u.type === "document"))
3288
3290
  return "";
3289
3291
  if (!u) return t[n];
3290
- let i = p.root(), r = i.rawCache || (i.rawCache = {});
3291
- if (typeof r[n] < "u")
3292
- return r[n];
3292
+ let r = p.root(), i = r.rawCache || (r.rawCache = {});
3293
+ if (typeof i[n] < "u")
3294
+ return i[n];
3293
3295
  if (n === "before" || n === "after")
3294
3296
  return this.beforeAfter(p, n);
3295
3297
  {
3296
3298
  let d = "raw" + o(n);
3297
- this[d] ? s = this[d](i, p) : i.walk((q) => {
3299
+ this[d] ? s = this[d](r, p) : r.walk((q) => {
3298
3300
  if (s = q.raws[a], typeof s < "u") return !1;
3299
3301
  });
3300
3302
  }
3301
- return typeof s > "u" && (s = t[n]), r[n] = s, s;
3303
+ return typeof s > "u" && (s = t[n]), i[n] = s, s;
3302
3304
  }
3303
3305
  rawBeforeClose(p) {
3304
3306
  let a;
@@ -3418,24 +3420,24 @@ function _b() {
3418
3420
  let s = new a.constructor();
3419
3421
  for (let u in a) {
3420
3422
  if (!Object.prototype.hasOwnProperty.call(a, u) || u === "proxyCache") continue;
3421
- let i = a[u], r = typeof i;
3422
- u === "parent" && r === "object" ? n && (s[u] = n) : u === "source" ? s[u] = i : Array.isArray(i) ? s[u] = i.map((d) => z(d, s)) : (r === "object" && i !== null && (i = z(i)), s[u] = i);
3423
+ let r = a[u], i = typeof r;
3424
+ u === "parent" && i === "object" ? n && (s[u] = n) : u === "source" ? s[u] = r : Array.isArray(r) ? s[u] = r.map((d) => z(d, s)) : (i === "object" && r !== null && (r = z(r)), s[u] = r);
3423
3425
  }
3424
3426
  return s;
3425
3427
  }
3426
3428
  function c(a, n) {
3427
3429
  if (n && typeof n.offset < "u")
3428
3430
  return n.offset;
3429
- let s = 1, u = 1, i = 0;
3430
- for (let r = 0; r < a.length; r++) {
3431
+ let s = 1, u = 1, r = 0;
3432
+ for (let i = 0; i < a.length; i++) {
3431
3433
  if (u === n.line && s === n.column) {
3432
- i = r;
3434
+ r = i;
3433
3435
  break;
3434
3436
  }
3435
- a[r] === `
3437
+ a[i] === `
3436
3438
  ` ? (s = 1, u += 1) : s += 1;
3437
3439
  }
3438
- return i;
3440
+ return r;
3439
3441
  }
3440
3442
  class p {
3441
3443
  get proxyOf() {
@@ -3491,10 +3493,10 @@ function _b() {
3491
3493
  }
3492
3494
  error(n, s = {}) {
3493
3495
  if (this.source) {
3494
- let { end: u, start: i } = this.rangeBy(s);
3496
+ let { end: u, start: r } = this.rangeBy(s);
3495
3497
  return this.source.input.error(
3496
3498
  n,
3497
- { column: i.column, line: i.line },
3499
+ { column: r.column, line: r.line },
3498
3500
  { column: u.column, line: u.line },
3499
3501
  s
3500
3502
  );
@@ -3534,18 +3536,18 @@ function _b() {
3534
3536
  if (n.index)
3535
3537
  s = this.positionInside(n.index);
3536
3538
  else if (n.word) {
3537
- let u = "document" in this.source.input ? this.source.input.document : this.source.input.css, r = u.slice(
3539
+ let u = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = u.slice(
3538
3540
  c(u, this.source.start),
3539
3541
  c(u, this.source.end)
3540
3542
  ).indexOf(n.word);
3541
- r !== -1 && (s = this.positionInside(r));
3543
+ i !== -1 && (s = this.positionInside(i));
3542
3544
  }
3543
3545
  return s;
3544
3546
  }
3545
3547
  positionInside(n) {
3546
- let s = this.source.start.column, u = this.source.start.line, i = "document" in this.source.input ? this.source.input.document : this.source.input.css, r = c(i, this.source.start), d = r + n;
3547
- for (let q = r; q < d; q++)
3548
- i[q] === `
3548
+ let s = this.source.start.column, u = this.source.start.line, r = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = c(r, this.source.start), d = i + n;
3549
+ for (let q = i; q < d; q++)
3550
+ r[q] === `
3549
3551
  ` ? (s = 1, u += 1) : s += 1;
3550
3552
  return { column: s, line: u, offset: d };
3551
3553
  }
@@ -3559,7 +3561,7 @@ function _b() {
3559
3561
  column: this.source.start.column,
3560
3562
  line: this.source.start.line,
3561
3563
  offset: c(s, this.source.start)
3562
- }, i = this.source.end ? {
3564
+ }, r = this.source.end ? {
3563
3565
  column: this.source.end.column + 1,
3564
3566
  line: this.source.end.line,
3565
3567
  offset: typeof this.source.end.offset == "number" ? (
@@ -3581,22 +3583,22 @@ function _b() {
3581
3583
  c(s, this.source.start),
3582
3584
  c(s, this.source.end)
3583
3585
  ).indexOf(n.word);
3584
- d !== -1 && (u = this.positionInside(d), i = this.positionInside(d + n.word.length));
3586
+ d !== -1 && (u = this.positionInside(d), r = this.positionInside(d + n.word.length));
3585
3587
  } else
3586
3588
  n.start ? u = {
3587
3589
  column: n.start.column,
3588
3590
  line: n.start.line,
3589
3591
  offset: c(s, n.start)
3590
- } : n.index && (u = this.positionInside(n.index)), n.end ? i = {
3592
+ } : n.index && (u = this.positionInside(n.index)), n.end ? r = {
3591
3593
  column: n.end.column,
3592
3594
  line: n.end.line,
3593
3595
  offset: c(s, n.end)
3594
- } : typeof n.endIndex == "number" ? i = this.positionInside(n.endIndex) : n.index && (i = this.positionInside(n.index + 1));
3595
- return (i.line < u.line || i.line === u.line && i.column <= u.column) && (i = {
3596
+ } : typeof n.endIndex == "number" ? r = this.positionInside(n.endIndex) : n.index && (r = this.positionInside(n.index + 1));
3597
+ return (r.line < u.line || r.line === u.line && r.column <= u.column) && (r = {
3596
3598
  column: u.column + 1,
3597
3599
  line: u.line,
3598
3600
  offset: u.offset + 1
3599
- }), { end: i, start: u };
3601
+ }), { end: r, start: u };
3600
3602
  }
3601
3603
  raw(n, s) {
3602
3604
  return new b().raw(this, n, s);
@@ -3607,8 +3609,8 @@ function _b() {
3607
3609
  replaceWith(...n) {
3608
3610
  if (this.parent) {
3609
3611
  let s = this, u = !1;
3610
- for (let i of n)
3611
- i === this ? u = !0 : u ? (this.parent.insertAfter(s, i), s = i) : this.parent.insertBefore(s, i);
3612
+ for (let r of n)
3613
+ r === this ? u = !0 : u ? (this.parent.insertAfter(s, r), s = r) : this.parent.insertBefore(s, r);
3612
3614
  u || this.remove();
3613
3615
  }
3614
3616
  return this;
@@ -3620,9 +3622,9 @@ function _b() {
3620
3622
  return n;
3621
3623
  }
3622
3624
  toJSON(n, s) {
3623
- let u = {}, i = s == null;
3625
+ let u = {}, r = s == null;
3624
3626
  s = s || /* @__PURE__ */ new Map();
3625
- let r = 0;
3627
+ let i = 0;
3626
3628
  for (let d in this) {
3627
3629
  if (!Object.prototype.hasOwnProperty.call(this, d) || d === "parent" || d === "proxyCache") continue;
3628
3630
  let q = this[d];
@@ -3633,7 +3635,7 @@ function _b() {
3633
3635
  else if (d === "source") {
3634
3636
  if (q == null) continue;
3635
3637
  let f = s.get(q.input);
3636
- f == null && (f = r, s.set(q.input, r), r++), u[d] = {
3638
+ f == null && (f = i, s.set(q.input, i), i++), u[d] = {
3637
3639
  end: q.end,
3638
3640
  inputId: f,
3639
3641
  start: q.start
@@ -3641,7 +3643,7 @@ function _b() {
3641
3643
  } else
3642
3644
  u[d] = q;
3643
3645
  }
3644
- return i && (u.inputs = [...s.keys()].map((d) => d.toJSON())), u;
3646
+ return r && (u.inputs = [...s.keys()].map((d) => d.toJSON())), u;
3645
3647
  }
3646
3648
  toProxy() {
3647
3649
  return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
@@ -3654,9 +3656,9 @@ function _b() {
3654
3656
  }), s;
3655
3657
  }
3656
3658
  warn(n, s, u = {}) {
3657
- let i = { node: this };
3658
- for (let r in u) i[r] = u[r];
3659
- return n.warn(s, i);
3659
+ let r = { node: this };
3660
+ for (let i in u) r[i] = u[i];
3661
+ return n.warn(s, r);
3660
3662
  }
3661
3663
  }
3662
3664
  return pM = p, p.default = p, pM;
@@ -3693,13 +3695,13 @@ function I2() {
3693
3695
  if (Jo) return iM;
3694
3696
  Jo = 1;
3695
3697
  let e = Xb(), b = wb(), M = _b(), { isClean: t, my: o } = qt(), z, c, p, a;
3696
- function n(i) {
3697
- return i.map((r) => (r.nodes && (r.nodes = n(r.nodes)), delete r.source, r));
3698
+ function n(r) {
3699
+ return r.map((i) => (i.nodes && (i.nodes = n(i.nodes)), delete i.source, i));
3698
3700
  }
3699
- function s(i) {
3700
- if (i[t] = !1, i.proxyOf.nodes)
3701
- for (let r of i.proxyOf.nodes)
3702
- s(r);
3701
+ function s(r) {
3702
+ if (r[t] = !1, r.proxyOf.nodes)
3703
+ for (let i of r.proxyOf.nodes)
3704
+ s(i);
3703
3705
  }
3704
3706
  class u extends M {
3705
3707
  get first() {
@@ -3710,103 +3712,103 @@ function I2() {
3710
3712
  if (this.proxyOf.nodes)
3711
3713
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
3712
3714
  }
3713
- append(...r) {
3714
- for (let d of r) {
3715
+ append(...i) {
3716
+ for (let d of i) {
3715
3717
  let q = this.normalize(d, this.last);
3716
3718
  for (let f of q) this.proxyOf.nodes.push(f);
3717
3719
  }
3718
3720
  return this.markDirty(), this;
3719
3721
  }
3720
- cleanRaws(r) {
3721
- if (super.cleanRaws(r), this.nodes)
3722
- for (let d of this.nodes) d.cleanRaws(r);
3722
+ cleanRaws(i) {
3723
+ if (super.cleanRaws(i), this.nodes)
3724
+ for (let d of this.nodes) d.cleanRaws(i);
3723
3725
  }
3724
- each(r) {
3726
+ each(i) {
3725
3727
  if (!this.proxyOf.nodes) return;
3726
3728
  let d = this.getIterator(), q, f;
3727
- for (; this.indexes[d] < this.proxyOf.nodes.length && (q = this.indexes[d], f = r(this.proxyOf.nodes[q], q), f !== !1); )
3729
+ for (; this.indexes[d] < this.proxyOf.nodes.length && (q = this.indexes[d], f = i(this.proxyOf.nodes[q], q), f !== !1); )
3728
3730
  this.indexes[d] += 1;
3729
3731
  return delete this.indexes[d], f;
3730
3732
  }
3731
- every(r) {
3732
- return this.nodes.every(r);
3733
+ every(i) {
3734
+ return this.nodes.every(i);
3733
3735
  }
3734
3736
  getIterator() {
3735
3737
  this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1;
3736
- let r = this.lastEach;
3737
- return this.indexes[r] = 0, r;
3738
+ let i = this.lastEach;
3739
+ return this.indexes[i] = 0, i;
3738
3740
  }
3739
3741
  getProxyProcessor() {
3740
3742
  return {
3741
- get(r, d) {
3742
- return d === "proxyOf" ? r : r[d] ? d === "each" || typeof d == "string" && d.startsWith("walk") ? (...q) => r[d](
3743
+ get(i, d) {
3744
+ return d === "proxyOf" ? i : i[d] ? d === "each" || typeof d == "string" && d.startsWith("walk") ? (...q) => i[d](
3743
3745
  ...q.map((f) => typeof f == "function" ? (A, W) => f(A.toProxy(), W) : f)
3744
- ) : d === "every" || d === "some" ? (q) => r[d](
3746
+ ) : d === "every" || d === "some" ? (q) => i[d](
3745
3747
  (f, ...A) => q(f.toProxy(), ...A)
3746
- ) : d === "root" ? () => r.root().toProxy() : d === "nodes" ? r.nodes.map((q) => q.toProxy()) : d === "first" || d === "last" ? r[d].toProxy() : r[d] : r[d];
3748
+ ) : d === "root" ? () => i.root().toProxy() : d === "nodes" ? i.nodes.map((q) => q.toProxy()) : d === "first" || d === "last" ? i[d].toProxy() : i[d] : i[d];
3747
3749
  },
3748
- set(r, d, q) {
3749
- return r[d] === q || (r[d] = q, (d === "name" || d === "params" || d === "selector") && r.markDirty()), !0;
3750
+ set(i, d, q) {
3751
+ return i[d] === q || (i[d] = q, (d === "name" || d === "params" || d === "selector") && i.markDirty()), !0;
3750
3752
  }
3751
3753
  };
3752
3754
  }
3753
- index(r) {
3754
- return typeof r == "number" ? r : (r.proxyOf && (r = r.proxyOf), this.proxyOf.nodes.indexOf(r));
3755
+ index(i) {
3756
+ return typeof i == "number" ? i : (i.proxyOf && (i = i.proxyOf), this.proxyOf.nodes.indexOf(i));
3755
3757
  }
3756
- insertAfter(r, d) {
3757
- let q = this.index(r), f = this.normalize(d, this.proxyOf.nodes[q]).reverse();
3758
- q = this.index(r);
3758
+ insertAfter(i, d) {
3759
+ let q = this.index(i), f = this.normalize(d, this.proxyOf.nodes[q]).reverse();
3760
+ q = this.index(i);
3759
3761
  for (let W of f) this.proxyOf.nodes.splice(q + 1, 0, W);
3760
3762
  let A;
3761
3763
  for (let W in this.indexes)
3762
3764
  A = this.indexes[W], q < A && (this.indexes[W] = A + f.length);
3763
3765
  return this.markDirty(), this;
3764
3766
  }
3765
- insertBefore(r, d) {
3766
- let q = this.index(r), f = q === 0 ? "prepend" : !1, A = this.normalize(
3767
+ insertBefore(i, d) {
3768
+ let q = this.index(i), f = q === 0 ? "prepend" : !1, A = this.normalize(
3767
3769
  d,
3768
3770
  this.proxyOf.nodes[q],
3769
3771
  f
3770
3772
  ).reverse();
3771
- q = this.index(r);
3773
+ q = this.index(i);
3772
3774
  for (let h of A) this.proxyOf.nodes.splice(q, 0, h);
3773
3775
  let W;
3774
3776
  for (let h in this.indexes)
3775
3777
  W = this.indexes[h], q <= W && (this.indexes[h] = W + A.length);
3776
3778
  return this.markDirty(), this;
3777
3779
  }
3778
- normalize(r, d) {
3779
- if (typeof r == "string")
3780
- r = n(c(r).nodes);
3781
- else if (typeof r > "u")
3782
- r = [];
3783
- else if (Array.isArray(r)) {
3784
- r = r.slice(0);
3785
- for (let f of r)
3780
+ normalize(i, d) {
3781
+ if (typeof i == "string")
3782
+ i = n(c(i).nodes);
3783
+ else if (typeof i > "u")
3784
+ i = [];
3785
+ else if (Array.isArray(i)) {
3786
+ i = i.slice(0);
3787
+ for (let f of i)
3786
3788
  f.parent && f.parent.removeChild(f, "ignore");
3787
- } else if (r.type === "root" && this.type !== "document") {
3788
- r = r.nodes.slice(0);
3789
- for (let f of r)
3789
+ } else if (i.type === "root" && this.type !== "document") {
3790
+ i = i.nodes.slice(0);
3791
+ for (let f of i)
3790
3792
  f.parent && f.parent.removeChild(f, "ignore");
3791
- } else if (r.type)
3792
- r = [r];
3793
- else if (r.prop) {
3794
- if (typeof r.value > "u")
3793
+ } else if (i.type)
3794
+ i = [i];
3795
+ else if (i.prop) {
3796
+ if (typeof i.value > "u")
3795
3797
  throw new Error("Value field is missed in node creation");
3796
- typeof r.value != "string" && (r.value = String(r.value)), r = [new b(r)];
3797
- } else if (r.selector || r.selectors)
3798
- r = [new a(r)];
3799
- else if (r.name)
3800
- r = [new z(r)];
3801
- else if (r.text)
3802
- r = [new e(r)];
3798
+ typeof i.value != "string" && (i.value = String(i.value)), i = [new b(i)];
3799
+ } else if (i.selector || i.selectors)
3800
+ i = [new a(i)];
3801
+ else if (i.name)
3802
+ i = [new z(i)];
3803
+ else if (i.text)
3804
+ i = [new e(i)];
3803
3805
  else
3804
3806
  throw new Error("Unknown node type in node creation");
3805
- return r.map((f) => (f[o] || u.rebuild(f), f = f.proxyOf, f.parent && f.parent.removeChild(f), f[t] && s(f), f.raws || (f.raws = {}), typeof f.raws.before > "u" && d && typeof d.raws.before < "u" && (f.raws.before = d.raws.before.replace(/\S/g, "")), f.parent = this.proxyOf, f));
3807
+ return i.map((f) => (f[o] || u.rebuild(f), f = f.proxyOf, f.parent && f.parent.removeChild(f), f[t] && s(f), f.raws || (f.raws = {}), typeof f.raws.before > "u" && d && typeof d.raws.before < "u" && (f.raws.before = d.raws.before.replace(/\S/g, "")), f.parent = this.proxyOf, f));
3806
3808
  }
3807
- prepend(...r) {
3808
- r = r.reverse();
3809
- for (let d of r) {
3809
+ prepend(...i) {
3810
+ i = i.reverse();
3811
+ for (let d of i) {
3810
3812
  let q = this.normalize(d, this.first, "prepend").reverse();
3811
3813
  for (let f of q) this.proxyOf.nodes.unshift(f);
3812
3814
  for (let f in this.indexes)
@@ -3814,93 +3816,93 @@ function I2() {
3814
3816
  }
3815
3817
  return this.markDirty(), this;
3816
3818
  }
3817
- push(r) {
3818
- return r.parent = this, this.proxyOf.nodes.push(r), this;
3819
+ push(i) {
3820
+ return i.parent = this, this.proxyOf.nodes.push(i), this;
3819
3821
  }
3820
3822
  removeAll() {
3821
- for (let r of this.proxyOf.nodes) r.parent = void 0;
3823
+ for (let i of this.proxyOf.nodes) i.parent = void 0;
3822
3824
  return this.proxyOf.nodes = [], this.markDirty(), this;
3823
3825
  }
3824
- removeChild(r) {
3825
- r = this.index(r), this.proxyOf.nodes[r].parent = void 0, this.proxyOf.nodes.splice(r, 1);
3826
+ removeChild(i) {
3827
+ i = this.index(i), this.proxyOf.nodes[i].parent = void 0, this.proxyOf.nodes.splice(i, 1);
3826
3828
  let d;
3827
3829
  for (let q in this.indexes)
3828
- d = this.indexes[q], d >= r && (this.indexes[q] = d - 1);
3830
+ d = this.indexes[q], d >= i && (this.indexes[q] = d - 1);
3829
3831
  return this.markDirty(), this;
3830
3832
  }
3831
- replaceValues(r, d, q) {
3833
+ replaceValues(i, d, q) {
3832
3834
  return q || (q = d, d = {}), this.walkDecls((f) => {
3833
- d.props && !d.props.includes(f.prop) || d.fast && !f.value.includes(d.fast) || (f.value = f.value.replace(r, q));
3835
+ d.props && !d.props.includes(f.prop) || d.fast && !f.value.includes(d.fast) || (f.value = f.value.replace(i, q));
3834
3836
  }), this.markDirty(), this;
3835
3837
  }
3836
- some(r) {
3837
- return this.nodes.some(r);
3838
+ some(i) {
3839
+ return this.nodes.some(i);
3838
3840
  }
3839
- walk(r) {
3841
+ walk(i) {
3840
3842
  return this.each((d, q) => {
3841
3843
  let f;
3842
3844
  try {
3843
- f = r(d, q);
3845
+ f = i(d, q);
3844
3846
  } catch (A) {
3845
3847
  throw d.addToError(A);
3846
3848
  }
3847
- return f !== !1 && d.walk && (f = d.walk(r)), f;
3849
+ return f !== !1 && d.walk && (f = d.walk(i)), f;
3848
3850
  });
3849
3851
  }
3850
- walkAtRules(r, d) {
3851
- return d ? r instanceof RegExp ? this.walk((q, f) => {
3852
- if (q.type === "atrule" && r.test(q.name))
3852
+ walkAtRules(i, d) {
3853
+ return d ? i instanceof RegExp ? this.walk((q, f) => {
3854
+ if (q.type === "atrule" && i.test(q.name))
3853
3855
  return d(q, f);
3854
3856
  }) : this.walk((q, f) => {
3855
- if (q.type === "atrule" && q.name === r)
3857
+ if (q.type === "atrule" && q.name === i)
3856
3858
  return d(q, f);
3857
- }) : (d = r, this.walk((q, f) => {
3859
+ }) : (d = i, this.walk((q, f) => {
3858
3860
  if (q.type === "atrule")
3859
3861
  return d(q, f);
3860
3862
  }));
3861
3863
  }
3862
- walkComments(r) {
3864
+ walkComments(i) {
3863
3865
  return this.walk((d, q) => {
3864
3866
  if (d.type === "comment")
3865
- return r(d, q);
3867
+ return i(d, q);
3866
3868
  });
3867
3869
  }
3868
- walkDecls(r, d) {
3869
- return d ? r instanceof RegExp ? this.walk((q, f) => {
3870
- if (q.type === "decl" && r.test(q.prop))
3870
+ walkDecls(i, d) {
3871
+ return d ? i instanceof RegExp ? this.walk((q, f) => {
3872
+ if (q.type === "decl" && i.test(q.prop))
3871
3873
  return d(q, f);
3872
3874
  }) : this.walk((q, f) => {
3873
- if (q.type === "decl" && q.prop === r)
3875
+ if (q.type === "decl" && q.prop === i)
3874
3876
  return d(q, f);
3875
- }) : (d = r, this.walk((q, f) => {
3877
+ }) : (d = i, this.walk((q, f) => {
3876
3878
  if (q.type === "decl")
3877
3879
  return d(q, f);
3878
3880
  }));
3879
3881
  }
3880
- walkRules(r, d) {
3881
- return d ? r instanceof RegExp ? this.walk((q, f) => {
3882
- if (q.type === "rule" && r.test(q.selector))
3882
+ walkRules(i, d) {
3883
+ return d ? i instanceof RegExp ? this.walk((q, f) => {
3884
+ if (q.type === "rule" && i.test(q.selector))
3883
3885
  return d(q, f);
3884
3886
  }) : this.walk((q, f) => {
3885
- if (q.type === "rule" && q.selector === r)
3887
+ if (q.type === "rule" && q.selector === i)
3886
3888
  return d(q, f);
3887
- }) : (d = r, this.walk((q, f) => {
3889
+ }) : (d = i, this.walk((q, f) => {
3888
3890
  if (q.type === "rule")
3889
3891
  return d(q, f);
3890
3892
  }));
3891
3893
  }
3892
3894
  }
3893
- return u.registerParse = (i) => {
3894
- c = i;
3895
- }, u.registerRule = (i) => {
3896
- a = i;
3897
- }, u.registerAtRule = (i) => {
3898
- z = i;
3899
- }, u.registerRoot = (i) => {
3900
- p = i;
3901
- }, iM = u, u.default = u, u.rebuild = (i) => {
3902
- i.type === "atrule" ? Object.setPrototypeOf(i, z.prototype) : i.type === "rule" ? Object.setPrototypeOf(i, a.prototype) : i.type === "decl" ? Object.setPrototypeOf(i, b.prototype) : i.type === "comment" ? Object.setPrototypeOf(i, e.prototype) : i.type === "root" && Object.setPrototypeOf(i, p.prototype), i[o] = !0, i.nodes && i.nodes.forEach((r) => {
3903
- u.rebuild(r);
3895
+ return u.registerParse = (r) => {
3896
+ c = r;
3897
+ }, u.registerRule = (r) => {
3898
+ a = r;
3899
+ }, u.registerAtRule = (r) => {
3900
+ z = r;
3901
+ }, u.registerRoot = (r) => {
3902
+ p = r;
3903
+ }, iM = u, u.default = u, u.rebuild = (r) => {
3904
+ r.type === "atrule" ? Object.setPrototypeOf(r, z.prototype) : r.type === "rule" ? Object.setPrototypeOf(r, a.prototype) : r.type === "decl" ? Object.setPrototypeOf(r, b.prototype) : r.type === "comment" ? Object.setPrototypeOf(r, e.prototype) : r.type === "root" && Object.setPrototypeOf(r, p.prototype), r[o] = !0, r.nodes && r.nodes.forEach((i) => {
3905
+ u.rebuild(i);
3904
3906
  });
3905
3907
  }, iM;
3906
3908
  }
@@ -3970,14 +3972,14 @@ function vc() {
3970
3972
  constructor(n, s) {
3971
3973
  if (s.map === !1) return;
3972
3974
  s.unsafeMap && (this.unsafeMap = !0), this.loadAnnotation(n), this.inline = this.startWith(this.annotation, "data:");
3973
- let u = s.map ? s.map.prev : void 0, i = this.loadMap(s.from, u);
3974
- !this.mapFile && s.from && (this.mapFile = s.from), this.mapFile && (this.root = M(this.mapFile)), i && (this.text = i);
3975
+ let u = s.map ? s.map.prev : void 0, r = this.loadMap(s.from, u);
3976
+ !this.mapFile && s.from && (this.mapFile = s.from), this.mapFile && (this.root = M(this.mapFile)), r && (this.text = r);
3975
3977
  }
3976
3978
  consumer() {
3977
3979
  return this.consumerCache || (this.consumerCache = new o(this.json || this.text)), this.consumerCache;
3978
3980
  }
3979
3981
  decodeInline(n) {
3980
- let s = /^data:application\/json;charset=utf-?8;base64,/, u = /^data:application\/json;base64,/, i = /^data:application\/json;charset=utf-?8,/, r = /^data:application\/json,/, d = n.match(i) || n.match(r);
3982
+ let s = /^data:application\/json;charset=utf-?8;base64,/, u = /^data:application\/json;base64,/, r = /^data:application\/json;charset=utf-?8,/, i = /^data:application\/json,/, d = n.match(r) || n.match(i);
3981
3983
  if (d)
3982
3984
  return decodeURIComponent(n.substr(d[0].length));
3983
3985
  let q = n.match(s) || n.match(u);
@@ -3995,8 +3997,8 @@ function vc() {
3995
3997
  loadAnnotation(n) {
3996
3998
  let s = n.match(/\/\*\s*# sourceMappingURL=/g);
3997
3999
  if (!s) return;
3998
- let u = n.lastIndexOf(s.pop()), i = n.indexOf("*/", u);
3999
- u > -1 && i > -1 && (this.annotation = this.getAnnotationURL(n.substring(u, i)));
4000
+ let u = n.lastIndexOf(s.pop()), r = n.indexOf("*/", u);
4001
+ u > -1 && r > -1 && (this.annotation = this.getAnnotationURL(n.substring(u, r)));
4000
4002
  }
4001
4003
  loadFile(n, s, u) {
4002
4004
  if (!(!u && !this.unsafeMap && !/\.map$/i.test(n)) && (this.root = M(n), e(n)))
@@ -4010,12 +4012,12 @@ function vc() {
4010
4012
  if (typeof s == "function") {
4011
4013
  let u = s(n);
4012
4014
  if (u) {
4013
- let i = this.loadFile(u, n, !0);
4014
- if (!i)
4015
+ let r = this.loadFile(u, n, !0);
4016
+ if (!r)
4015
4017
  throw new Error(
4016
4018
  "Unable to load previous source map: " + u.toString()
4017
4019
  );
4018
- return i;
4020
+ return r;
4019
4021
  }
4020
4022
  } else {
4021
4023
  if (s instanceof o)
@@ -4034,14 +4036,14 @@ function vc() {
4034
4036
  if (this.annotation) {
4035
4037
  let u = this.annotation;
4036
4038
  n && (u = t(M(n), u));
4037
- let i = this.loadFile(u, n, !1);
4038
- if (i)
4039
+ let r = this.loadFile(u, n, !1);
4040
+ if (r)
4039
4041
  try {
4040
- this.json = JSON.parse(i.replace(/^\)]}'[^\n]*\n/, ""));
4042
+ this.json = JSON.parse(r.replace(/^\)]}'[^\n]*\n/, ""));
4041
4043
  } catch {
4042
4044
  return;
4043
4045
  }
4044
- return i;
4046
+ return r;
4045
4047
  }
4046
4048
  }
4047
4049
  }
@@ -4058,8 +4060,8 @@ var dM, oz;
4058
4060
  function Sb() {
4059
4061
  if (oz) return dM;
4060
4062
  oz = 1;
4061
- let { nanoid: e } = /* @__PURE__ */ jr(), { isAbsolute: b, resolve: M } = y1, { SourceMapConsumer: t, SourceMapGenerator: o } = y1, { fileURLToPath: z, pathToFileURL: c } = y1, p = lt(), a = vc(), n = y1, s = Symbol("lineToIndexCache"), u = !!(t && o), i = !!(M && b);
4062
- function r(q) {
4063
+ let { nanoid: e } = /* @__PURE__ */ jr(), { isAbsolute: b, resolve: M } = y1, { SourceMapConsumer: t, SourceMapGenerator: o } = y1, { fileURLToPath: z, pathToFileURL: c } = y1, p = lt(), a = vc(), n = y1, s = Symbol("lineToIndexCache"), u = !!(t && o), r = !!(M && b);
4064
+ function i(q) {
4063
4065
  if (q[s]) return q[s];
4064
4066
  let f = q.css.split(`
4065
4067
  `), A = new Array(f.length), W = 0;
@@ -4074,7 +4076,7 @@ function Sb() {
4074
4076
  constructor(f, A = {}) {
4075
4077
  if (f === null || typeof f > "u" || typeof f == "object" && !f.toString)
4076
4078
  throw new Error(`PostCSS received ${f} instead of CSS string`);
4077
- if (this.css = f.toString(), this.css[0] === "\uFEFF" || this.css[0] === "￾" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, this.document = this.css, A.document && (this.document = A.document.toString()), A.from && (!i || /^\w+:\/\//.test(A.from) || b(A.from) ? this.file = A.from : this.file = M(A.from)), i && u) {
4079
+ if (this.css = f.toString(), this.css[0] === "\uFEFF" || this.css[0] === "￾" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, this.document = this.css, A.document && (this.document = A.document.toString()), A.from && (!r || /^\w+:\/\//.test(A.from) || b(A.from) ? this.file = A.from : this.file = M(A.from)), r && u) {
4078
4080
  let W = new a(this.css, A);
4079
4081
  if (W.text) {
4080
4082
  this.map = W;
@@ -4133,10 +4135,10 @@ function Sb() {
4133
4135
  }, this.file && (c && (y.input.url = c(this.file).toString()), y.input.file = this.file), y;
4134
4136
  }
4135
4137
  fromLineAndColumn(f, A) {
4136
- return r(this)[f - 1] + A - 1;
4138
+ return i(this)[f - 1] + A - 1;
4137
4139
  }
4138
4140
  fromOffset(f) {
4139
- let A = r(this), W = A[A.length - 1], h = 0;
4141
+ let A = i(this), W = A[A.length - 1], h = 0;
4140
4142
  if (f >= W)
4141
4143
  h = A.length - 1;
4142
4144
  else {
@@ -4275,21 +4277,21 @@ function Gr() {
4275
4277
  nz = 1;
4276
4278
  let e = ft(), b = Xb(), M = wb(), t = Sb(), o = vc(), z = Ie(), c = ht();
4277
4279
  function p(a, n) {
4278
- if (Array.isArray(a)) return a.map((i) => p(i));
4280
+ if (Array.isArray(a)) return a.map((r) => p(r));
4279
4281
  let { inputs: s, ...u } = a;
4280
4282
  if (s) {
4281
4283
  n = [];
4282
- for (let i of s) {
4283
- let r = { ...i, __proto__: t.prototype };
4284
- r.map && (r.map = {
4285
- ...r.map,
4284
+ for (let r of s) {
4285
+ let i = { ...r, __proto__: t.prototype };
4286
+ i.map && (i.map = {
4287
+ ...i.map,
4286
4288
  __proto__: o.prototype
4287
- }), n.push(r);
4289
+ }), n.push(i);
4288
4290
  }
4289
4291
  }
4290
- if (u.nodes && (u.nodes = a.nodes.map((i) => p(i, n))), u.source) {
4291
- let { inputId: i, ...r } = u.source;
4292
- u.source = r, i != null && (u.source.input = n[i]);
4292
+ if (u.nodes && (u.nodes = a.nodes.map((r) => p(r, n))), u.source) {
4293
+ let { inputId: r, ...i } = u.source;
4294
+ u.source = i, r != null && (u.source.input = n[r]);
4293
4295
  }
4294
4296
  if (u.type === "root")
4295
4297
  return new z(u);
@@ -4311,39 +4313,39 @@ function Tc() {
4311
4313
  rz = 1;
4312
4314
  let { dirname: e, relative: b, resolve: M, sep: t } = y1, { SourceMapConsumer: o, SourceMapGenerator: z } = y1, { pathToFileURL: c } = y1, p = Sb(), a = !!(o && z), n = !!(e && M && b && t);
4313
4315
  class s {
4314
- constructor(i, r, d, q) {
4315
- this.stringify = i, this.mapOpts = d.map || {}, this.root = r, this.opts = d, this.css = q, this.originalCSS = q, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
4316
+ constructor(r, i, d, q) {
4317
+ this.stringify = r, this.mapOpts = d.map || {}, this.root = i, this.opts = d, this.css = q, this.originalCSS = q, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
4316
4318
  }
4317
4319
  addAnnotation() {
4318
- let i;
4319
- this.isInline() ? i = "data:application/json;base64," + this.toBase64(this.map.toString()) : typeof this.mapOpts.annotation == "string" ? i = this.mapOpts.annotation : typeof this.mapOpts.annotation == "function" ? i = this.mapOpts.annotation(this.opts.to, this.root) : i = this.outputFile() + ".map";
4320
- let r = `
4320
+ let r;
4321
+ this.isInline() ? r = "data:application/json;base64," + this.toBase64(this.map.toString()) : typeof this.mapOpts.annotation == "string" ? r = this.mapOpts.annotation : typeof this.mapOpts.annotation == "function" ? r = this.mapOpts.annotation(this.opts.to, this.root) : r = this.outputFile() + ".map";
4322
+ let i = `
4321
4323
  `;
4322
4324
  this.css.includes(`\r
4323
- `) && (r = `\r
4324
- `), this.css += r + "/*# sourceMappingURL=" + i + " */";
4325
+ `) && (i = `\r
4326
+ `), this.css += i + "/*# sourceMappingURL=" + r + " */";
4325
4327
  }
4326
4328
  applyPrevMaps() {
4327
- for (let i of this.previous()) {
4328
- let r = this.toUrl(this.path(i.file)), d = i.root || e(i.file), q;
4329
- this.mapOpts.sourcesContent === !1 ? (q = new o(i.text), q.sourcesContent && (q.sourcesContent = null)) : q = i.consumer(), this.map.applySourceMap(q, r, this.toUrl(this.path(d)));
4329
+ for (let r of this.previous()) {
4330
+ let i = this.toUrl(this.path(r.file)), d = r.root || e(r.file), q;
4331
+ this.mapOpts.sourcesContent === !1 ? (q = new o(r.text), q.sourcesContent && (q.sourcesContent = null)) : q = r.consumer(), this.map.applySourceMap(q, i, this.toUrl(this.path(d)));
4330
4332
  }
4331
4333
  }
4332
4334
  clearAnnotation() {
4333
4335
  if (this.mapOpts.annotation !== !1) {
4334
4336
  if (this.root) {
4335
- let i;
4336
- for (let r = this.root.nodes.length - 1; r >= 0; r--)
4337
- i = this.root.nodes[r], i.type === "comment" && i.text.startsWith("# sourceMappingURL=") && this.root.removeChild(r);
4337
+ let r;
4338
+ for (let i = this.root.nodes.length - 1; i >= 0; i--)
4339
+ r = this.root.nodes[i], r.type === "comment" && r.text.startsWith("# sourceMappingURL=") && this.root.removeChild(i);
4338
4340
  } else if (this.css) {
4339
- let i;
4340
- for (; (i = this.css.lastIndexOf("/*#")) !== -1; ) {
4341
- let r = this.css.indexOf("*/", i + 3);
4342
- if (r === -1) break;
4343
- for (; i > 0 && this.css[i - 1] === `
4341
+ let r;
4342
+ for (; (r = this.css.lastIndexOf("/*#")) !== -1; ) {
4343
+ let i = this.css.indexOf("*/", r + 3);
4344
+ if (i === -1) break;
4345
+ for (; r > 0 && this.css[r - 1] === `
4344
4346
  `; )
4345
- i--;
4346
- this.css = this.css.slice(0, i) + this.css.slice(r + 2);
4347
+ r--;
4348
+ this.css = this.css.slice(0, r) + this.css.slice(i + 2);
4347
4349
  }
4348
4350
  }
4349
4351
  }
@@ -4352,18 +4354,18 @@ function Tc() {
4352
4354
  if (this.clearAnnotation(), n && a && this.isMap())
4353
4355
  return this.generateMap();
4354
4356
  {
4355
- let i = "";
4356
- return this.stringify(this.root, (r) => {
4357
- i += r;
4358
- }), [i];
4357
+ let r = "";
4358
+ return this.stringify(this.root, (i) => {
4359
+ r += i;
4360
+ }), [r];
4359
4361
  }
4360
4362
  }
4361
4363
  generateMap() {
4362
4364
  if (this.root)
4363
4365
  this.generateString();
4364
4366
  else if (this.previous().length === 1) {
4365
- let i = this.previous()[0].consumer();
4366
- i.file = this.outputFile(), this.map = z.fromSourceMap(i, {
4367
+ let r = this.previous()[0].consumer();
4368
+ r.file = this.outputFile(), this.map = z.fromSourceMap(r, {
4367
4369
  ignoreInvalidMapping: !0
4368
4370
  });
4369
4371
  } else
@@ -4382,102 +4384,102 @@ function Tc() {
4382
4384
  file: this.outputFile(),
4383
4385
  ignoreInvalidMapping: !0
4384
4386
  });
4385
- let i = 1, r = 1, d = "<no source>", q = {
4387
+ let r = 1, i = 1, d = "<no source>", q = {
4386
4388
  generated: { column: 0, line: 0 },
4387
4389
  original: { column: 0, line: 0 },
4388
4390
  source: ""
4389
4391
  }, f, A;
4390
4392
  this.stringify(this.root, (W, h, m) => {
4391
- if (this.css += W, h && m !== "end" && (q.generated.line = i, q.generated.column = r - 1, h.source && h.source.start ? (q.source = this.sourcePath(h), q.original.line = h.source.start.line, q.original.column = h.source.start.column - 1, this.map.addMapping(q)) : (q.source = d, q.original.line = 1, q.original.column = 0, this.map.addMapping(q))), A = W.match(/\n/g), A ? (i += A.length, f = W.lastIndexOf(`
4392
- `), r = W.length - f) : r += W.length, h && m !== "start") {
4393
+ if (this.css += W, h && m !== "end" && (q.generated.line = r, q.generated.column = i - 1, h.source && h.source.start ? (q.source = this.sourcePath(h), q.original.line = h.source.start.line, q.original.column = h.source.start.column - 1, this.map.addMapping(q)) : (q.source = d, q.original.line = 1, q.original.column = 0, this.map.addMapping(q))), A = W.match(/\n/g), A ? (r += A.length, f = W.lastIndexOf(`
4394
+ `), i = W.length - f) : i += W.length, h && m !== "start") {
4393
4395
  let l = h.parent || { raws: {} };
4394
- (!(h.type === "decl" || h.type === "atrule" && !h.nodes) || h !== l.last || l.raws.semicolon) && (h.source && h.source.end ? (q.source = this.sourcePath(h), q.original.line = h.source.end.line, q.original.column = h.source.end.column - 1, q.generated.line = i, q.generated.column = r - 2, this.map.addMapping(q)) : (q.source = d, q.original.line = 1, q.original.column = 0, q.generated.line = i, q.generated.column = r - 1, this.map.addMapping(q)));
4396
+ (!(h.type === "decl" || h.type === "atrule" && !h.nodes) || h !== l.last || l.raws.semicolon) && (h.source && h.source.end ? (q.source = this.sourcePath(h), q.original.line = h.source.end.line, q.original.column = h.source.end.column - 1, q.generated.line = r, q.generated.column = i - 2, this.map.addMapping(q)) : (q.source = d, q.original.line = 1, q.original.column = 0, q.generated.line = r, q.generated.column = i - 1, this.map.addMapping(q)));
4395
4397
  }
4396
4398
  });
4397
4399
  }
4398
4400
  isAnnotation() {
4399
- return this.isInline() ? !0 : typeof this.mapOpts.annotation < "u" ? this.mapOpts.annotation : this.previous().length ? this.previous().some((i) => i.annotation) : !0;
4401
+ return this.isInline() ? !0 : typeof this.mapOpts.annotation < "u" ? this.mapOpts.annotation : this.previous().length ? this.previous().some((r) => r.annotation) : !0;
4400
4402
  }
4401
4403
  isInline() {
4402
4404
  if (typeof this.mapOpts.inline < "u")
4403
4405
  return this.mapOpts.inline;
4404
- let i = this.mapOpts.annotation;
4405
- return typeof i < "u" && i !== !0 ? !1 : this.previous().length ? this.previous().some((r) => r.inline) : !0;
4406
+ let r = this.mapOpts.annotation;
4407
+ return typeof r < "u" && r !== !0 ? !1 : this.previous().length ? this.previous().some((i) => i.inline) : !0;
4406
4408
  }
4407
4409
  isMap() {
4408
4410
  return typeof this.opts.map < "u" ? !!this.opts.map : this.previous().length > 0;
4409
4411
  }
4410
4412
  isSourcesContent() {
4411
- return typeof this.mapOpts.sourcesContent < "u" ? this.mapOpts.sourcesContent : this.previous().length ? this.previous().some((i) => i.withContent()) : !0;
4413
+ return typeof this.mapOpts.sourcesContent < "u" ? this.mapOpts.sourcesContent : this.previous().length ? this.previous().some((r) => r.withContent()) : !0;
4412
4414
  }
4413
4415
  outputFile() {
4414
4416
  return this.opts.to ? this.path(this.opts.to) : this.opts.from ? this.path(this.opts.from) : "to.css";
4415
4417
  }
4416
- path(i) {
4417
- if (this.mapOpts.absolute || i.charCodeAt(0) === 60 || /^\w+:\/\//.test(i)) return i;
4418
- let r = this.memoizedPaths.get(i);
4419
- if (r) return r;
4418
+ path(r) {
4419
+ if (this.mapOpts.absolute || r.charCodeAt(0) === 60 || /^\w+:\/\//.test(r)) return r;
4420
+ let i = this.memoizedPaths.get(r);
4421
+ if (i) return i;
4420
4422
  let d = this.opts.to ? e(this.opts.to) : ".";
4421
4423
  typeof this.mapOpts.annotation == "string" && (d = e(M(d, this.mapOpts.annotation)));
4422
- let q = b(d, i);
4423
- return this.memoizedPaths.set(i, q), q;
4424
+ let q = b(d, r);
4425
+ return this.memoizedPaths.set(r, q), q;
4424
4426
  }
4425
4427
  previous() {
4426
4428
  if (!this.previousMaps)
4427
4429
  if (this.previousMaps = [], this.root)
4428
- this.root.walk((i) => {
4429
- if (i.source && i.source.input.map) {
4430
- let r = i.source.input.map;
4431
- this.previousMaps.includes(r) || this.previousMaps.push(r);
4430
+ this.root.walk((r) => {
4431
+ if (r.source && r.source.input.map) {
4432
+ let i = r.source.input.map;
4433
+ this.previousMaps.includes(i) || this.previousMaps.push(i);
4432
4434
  }
4433
4435
  });
4434
4436
  else {
4435
- let i = new p(this.originalCSS, this.opts);
4436
- i.map && this.previousMaps.push(i.map);
4437
+ let r = new p(this.originalCSS, this.opts);
4438
+ r.map && this.previousMaps.push(r.map);
4437
4439
  }
4438
4440
  return this.previousMaps;
4439
4441
  }
4440
4442
  setSourcesContent() {
4441
- let i = {};
4443
+ let r = {};
4442
4444
  if (this.root)
4443
- this.root.walk((r) => {
4444
- if (r.source) {
4445
- let d = r.source.input.from;
4446
- if (d && !i[d]) {
4447
- i[d] = !0;
4445
+ this.root.walk((i) => {
4446
+ if (i.source) {
4447
+ let d = i.source.input.from;
4448
+ if (d && !r[d]) {
4449
+ r[d] = !0;
4448
4450
  let q = this.usesFileUrls ? this.toFileUrl(d) : this.toUrl(this.path(d));
4449
- this.map.setSourceContent(q, r.source.input.css);
4451
+ this.map.setSourceContent(q, i.source.input.css);
4450
4452
  }
4451
4453
  }
4452
4454
  });
4453
4455
  else if (this.css) {
4454
- let r = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
4455
- this.map.setSourceContent(r, this.css);
4456
+ let i = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
4457
+ this.map.setSourceContent(i, this.css);
4456
4458
  }
4457
4459
  }
4458
- sourcePath(i) {
4459
- return this.mapOpts.from ? this.toUrl(this.mapOpts.from) : this.usesFileUrls ? this.toFileUrl(i.source.input.from) : this.toUrl(this.path(i.source.input.from));
4460
+ sourcePath(r) {
4461
+ return this.mapOpts.from ? this.toUrl(this.mapOpts.from) : this.usesFileUrls ? this.toFileUrl(r.source.input.from) : this.toUrl(this.path(r.source.input.from));
4460
4462
  }
4461
- toBase64(i) {
4462
- return Buffer ? Buffer.from(i).toString("base64") : window.btoa(unescape(encodeURIComponent(i)));
4463
+ toBase64(r) {
4464
+ return Buffer ? Buffer.from(r).toString("base64") : window.btoa(unescape(encodeURIComponent(r)));
4463
4465
  }
4464
- toFileUrl(i) {
4465
- let r = this.memoizedFileURLs.get(i);
4466
- if (r) return r;
4466
+ toFileUrl(r) {
4467
+ let i = this.memoizedFileURLs.get(r);
4468
+ if (i) return i;
4467
4469
  if (c) {
4468
- let d = c(i).toString();
4469
- return this.memoizedFileURLs.set(i, d), d;
4470
+ let d = c(r).toString();
4471
+ return this.memoizedFileURLs.set(r, d), d;
4470
4472
  } else
4471
4473
  throw new Error(
4472
4474
  "`map.absolute` option is not available in this PostCSS build"
4473
4475
  );
4474
4476
  }
4475
- toUrl(i) {
4476
- let r = this.memoizedURLs.get(i);
4477
- if (r) return r;
4478
- t === "\\" && (i = i.replace(/\\/g, "/"));
4479
- let d = encodeURI(i).replace(/[#?]/g, encodeURIComponent);
4480
- return this.memoizedURLs.set(i, d), d;
4477
+ toUrl(r) {
4478
+ let i = this.memoizedURLs.get(r);
4479
+ if (i) return i;
4480
+ t === "\\" && (r = r.replace(/\\/g, "/"));
4481
+ let d = encodeURI(r).replace(/[#?]/g, encodeURIComponent);
4482
+ return this.memoizedURLs.set(r, d), d;
4481
4483
  }
4482
4484
  }
4483
4485
  return WM = s, WM;
@@ -4486,7 +4488,7 @@ var hM, iz;
4486
4488
  function Hr() {
4487
4489
  if (iz) return hM;
4488
4490
  iz = 1;
4489
- const e = 39, b = 34, M = 92, t = 47, o = 10, z = 32, c = 12, p = 9, a = 13, n = 91, s = 93, u = 40, i = 41, r = 123, d = 125, q = 59, f = 42, A = 58, W = 64, h = /[\t\n\f\r "#'()/;[\\\]{}]/g, m = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, l = /.[\r\n"'(/\\]/, R = /[\da-f]/i;
4491
+ const e = 39, b = 34, M = 92, t = 47, o = 10, z = 32, c = 12, p = 9, a = 13, n = 91, s = 93, u = 40, r = 41, i = 123, d = 125, q = 59, f = 42, A = 58, W = 64, h = /[\t\n\f\r "#'()/;[\\\]{}]/g, m = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, l = /.[\r\n"'(/\\]/, R = /[\da-f]/i;
4490
4492
  return hM = function(y, B = {}) {
4491
4493
  let _ = y.css.valueOf(), v = B.ignoreErrors, T, w, C, x, $, H, Q, p0, G, d0, Y0 = _.length, c0 = 0, o0 = [], s0 = [], B0 = -1;
4492
4494
  function A0() {
@@ -4517,11 +4519,11 @@ function Hr() {
4517
4519
  }
4518
4520
  case n:
4519
4521
  case s:
4520
- case r:
4522
+ case i:
4521
4523
  case d:
4522
4524
  case A:
4523
4525
  case q:
4524
- case i: {
4526
+ case r: {
4525
4527
  let S = String.fromCharCode(T);
4526
4528
  H = [S, S, c0];
4527
4529
  break;
@@ -4603,8 +4605,8 @@ function Vr() {
4603
4605
  };
4604
4606
  function p(n) {
4605
4607
  for (let s = n.length - 1; s >= 0; s--) {
4606
- let u = n[s], i = u[3] || u[2];
4607
- if (i) return i;
4608
+ let u = n[s], r = u[3] || u[2];
4609
+ if (r) return r;
4608
4610
  }
4609
4611
  }
4610
4612
  class a {
@@ -4614,20 +4616,20 @@ function Vr() {
4614
4616
  atrule(s) {
4615
4617
  let u = new e();
4616
4618
  u.name = s[1].slice(1), u.name === "" && this.unnamedAtrule(u, s), this.init(u, s[2]);
4617
- let i, r, d, q = !1, f = !1, A = [], W = [];
4619
+ let r, i, d, q = !1, f = !1, A = [], W = [];
4618
4620
  for (; !this.tokenizer.endOfFile(); ) {
4619
- if (s = this.tokenizer.nextToken(), i = s[0], i === "(" || i === "[" ? W.push(i === "(" ? ")" : "]") : i === "{" && W.length > 0 ? W.push("}") : i === W[W.length - 1] && W.pop(), W.length === 0)
4620
- if (i === ";") {
4621
+ if (s = this.tokenizer.nextToken(), r = s[0], r === "(" || r === "[" ? W.push(r === "(" ? ")" : "]") : r === "{" && W.length > 0 ? W.push("}") : r === W[W.length - 1] && W.pop(), W.length === 0)
4622
+ if (r === ";") {
4621
4623
  u.source.end = this.getPosition(s[2]), u.source.end.offset++, this.semicolon = !0;
4622
4624
  break;
4623
- } else if (i === "{") {
4625
+ } else if (r === "{") {
4624
4626
  f = !0;
4625
4627
  break;
4626
- } else if (i === "}") {
4628
+ } else if (r === "}") {
4627
4629
  if (A.length > 0) {
4628
- for (d = A.length - 1, r = A[d]; r && r[0] === "space"; )
4629
- r = A[--d];
4630
- r && (u.source.end = this.getPosition(r[3] || r[2]), u.source.end.offset++);
4630
+ for (d = A.length - 1, i = A[d]; i && i[0] === "space"; )
4631
+ i = A[--d];
4632
+ i && (u.source.end = this.getPosition(i[3] || i[2]), u.source.end.offset++);
4631
4633
  }
4632
4634
  this.end(s);
4633
4635
  break;
@@ -4645,75 +4647,75 @@ function Vr() {
4645
4647
  checkMissedSemicolon(s) {
4646
4648
  let u = this.colon(s);
4647
4649
  if (u === !1) return;
4648
- let i = 0, r;
4649
- for (let d = u - 1; d >= 0 && (r = s[d], !(r[0] !== "space" && (i += 1, i === 2))); d--)
4650
+ let r = 0, i;
4651
+ for (let d = u - 1; d >= 0 && (i = s[d], !(i[0] !== "space" && (r += 1, r === 2))); d--)
4650
4652
  ;
4651
4653
  throw this.input.error(
4652
4654
  "Missed semicolon",
4653
- r[0] === "word" ? r[3] + 1 : r[2]
4655
+ i[0] === "word" ? i[3] + 1 : i[2]
4654
4656
  );
4655
4657
  }
4656
4658
  colon(s) {
4657
- let u = 0, i, r, d;
4659
+ let u = 0, r, i, d;
4658
4660
  for (let [q, f] of s.entries()) {
4659
- if (r = f, d = r[0], d === "(" && (u += 1), d === ")" && (u -= 1), u === 0 && d === ":")
4660
- if (!i)
4661
- this.doubleColon(r);
4661
+ if (i = f, d = i[0], d === "(" && (u += 1), d === ")" && (u -= 1), u === 0 && d === ":")
4662
+ if (!r)
4663
+ this.doubleColon(i);
4662
4664
  else {
4663
- if (i[0] === "word" && i[1] === "progid")
4665
+ if (r[0] === "word" && r[1] === "progid")
4664
4666
  continue;
4665
4667
  return q;
4666
4668
  }
4667
- i = r;
4669
+ r = i;
4668
4670
  }
4669
4671
  return !1;
4670
4672
  }
4671
4673
  comment(s) {
4672
4674
  let u = new b();
4673
4675
  this.init(u, s[2]), u.source.end = this.getPosition(s[3] || s[2]), u.source.end.offset++;
4674
- let i = s[1].slice(2, -2);
4675
- if (!i.trim())
4676
- u.text = "", u.raws.left = i, u.raws.right = "";
4676
+ let r = s[1].slice(2, -2);
4677
+ if (!r.trim())
4678
+ u.text = "", u.raws.left = r, u.raws.right = "";
4677
4679
  else {
4678
- let r = i.match(/^(\s*)([^]*\S)(\s*)$/);
4679
- u.text = r[2], u.raws.left = r[1], u.raws.right = r[3];
4680
+ let i = r.match(/^(\s*)([^]*\S)(\s*)$/);
4681
+ u.text = i[2], u.raws.left = i[1], u.raws.right = i[3];
4680
4682
  }
4681
4683
  }
4682
4684
  createTokenizer() {
4683
4685
  this.tokenizer = z(this.input);
4684
4686
  }
4685
4687
  decl(s, u) {
4686
- let i = new M();
4687
- this.init(i, s[0][2]);
4688
- let r = s[s.length - 1];
4689
- for (r[0] === ";" && (this.semicolon = !0, s.pop()), i.source.end = this.getPosition(
4690
- r[3] || r[2] || p(s)
4691
- ), i.source.end.offset++; s[0][0] !== "word"; )
4692
- s.length === 1 && this.unknownWord(s), i.raws.before += s.shift()[1];
4693
- for (i.source.start = this.getPosition(s[0][2]), i.prop = ""; s.length; ) {
4688
+ let r = new M();
4689
+ this.init(r, s[0][2]);
4690
+ let i = s[s.length - 1];
4691
+ for (i[0] === ";" && (this.semicolon = !0, s.pop()), r.source.end = this.getPosition(
4692
+ i[3] || i[2] || p(s)
4693
+ ), r.source.end.offset++; s[0][0] !== "word"; )
4694
+ s.length === 1 && this.unknownWord(s), r.raws.before += s.shift()[1];
4695
+ for (r.source.start = this.getPosition(s[0][2]), r.prop = ""; s.length; ) {
4694
4696
  let W = s[0][0];
4695
4697
  if (W === ":" || W === "space" || W === "comment")
4696
4698
  break;
4697
- i.prop += s.shift()[1];
4699
+ r.prop += s.shift()[1];
4698
4700
  }
4699
- i.raws.between = "";
4701
+ r.raws.between = "";
4700
4702
  let d;
4701
4703
  for (; s.length; )
4702
4704
  if (d = s.shift(), d[0] === ":") {
4703
- i.raws.between += d[1];
4705
+ r.raws.between += d[1];
4704
4706
  break;
4705
4707
  } else
4706
- d[0] === "word" && /\w/.test(d[1]) && this.unknownWord([d]), i.raws.between += d[1];
4707
- (i.prop[0] === "_" || i.prop[0] === "*") && (i.raws.before += i.prop[0], i.prop = i.prop.slice(1));
4708
+ d[0] === "word" && /\w/.test(d[1]) && this.unknownWord([d]), r.raws.between += d[1];
4709
+ (r.prop[0] === "_" || r.prop[0] === "*") && (r.raws.before += r.prop[0], r.prop = r.prop.slice(1));
4708
4710
  let q = [], f;
4709
4711
  for (; s.length && (f = s[0][0], !(f !== "space" && f !== "comment")); )
4710
4712
  q.push(s.shift());
4711
4713
  this.precheckMissedSemicolon(s);
4712
4714
  for (let W = s.length - 1; W >= 0; W--) {
4713
4715
  if (d = s[W], d[1].toLowerCase() === "!important") {
4714
- i.important = !0;
4716
+ r.important = !0;
4715
4717
  let h = this.stringFrom(s, W);
4716
- h = this.spacesFromEnd(s) + h, h !== " !important" && (i.raws.important = h);
4718
+ h = this.spacesFromEnd(s) + h, h !== " !important" && (r.raws.important = h);
4717
4719
  break;
4718
4720
  } else if (d[1].toLowerCase() === "important") {
4719
4721
  let h = s.slice(0), m = "";
@@ -4723,12 +4725,12 @@ function Vr() {
4723
4725
  break;
4724
4726
  m = h.pop()[1] + m;
4725
4727
  }
4726
- m.trim().startsWith("!") && (i.important = !0, i.raws.important = m, s = h);
4728
+ m.trim().startsWith("!") && (r.important = !0, r.raws.important = m, s = h);
4727
4729
  }
4728
4730
  if (d[0] !== "space" && d[0] !== "comment")
4729
4731
  break;
4730
4732
  }
4731
- s.some((W) => W[0] !== "space" && W[0] !== "comment") && (i.raws.between += q.map((W) => W[1]).join(""), q = []), this.raw(i, "value", q.concat(s), u), i.value.includes(":") && !u && this.checkMissedSemicolon(s);
4733
+ s.some((W) => W[0] !== "space" && W[0] !== "comment") && (r.raws.between += q.map((W) => W[1]).join(""), q = []), this.raw(r, "value", q.concat(s), u), r.value.includes(":") && !u && this.checkMissedSemicolon(s);
4732
4734
  }
4733
4735
  doubleColon(s) {
4734
4736
  throw this.input.error(
@@ -4769,30 +4771,30 @@ function Vr() {
4769
4771
  }, s.raws.before = this.spaces, this.spaces = "", s.type !== "comment" && (this.semicolon = !1);
4770
4772
  }
4771
4773
  other(s) {
4772
- let u = !1, i = null, r = !1, d = null, q = [], f = s[1].startsWith("--"), A = [], W = s;
4774
+ let u = !1, r = null, i = !1, d = null, q = [], f = s[1].startsWith("--"), A = [], W = s;
4773
4775
  for (; W; ) {
4774
- if (i = W[0], A.push(W), i === "(" || i === "[")
4775
- d || (d = W), q.push(i === "(" ? ")" : "]");
4776
- else if (f && r && i === "{")
4776
+ if (r = W[0], A.push(W), r === "(" || r === "[")
4777
+ d || (d = W), q.push(r === "(" ? ")" : "]");
4778
+ else if (f && i && r === "{")
4777
4779
  d || (d = W), q.push("}");
4778
4780
  else if (q.length === 0)
4779
- if (i === ";")
4780
- if (r) {
4781
+ if (r === ";")
4782
+ if (i) {
4781
4783
  this.decl(A, f);
4782
4784
  return;
4783
4785
  } else
4784
4786
  break;
4785
- else if (i === "{") {
4787
+ else if (r === "{") {
4786
4788
  this.rule(A);
4787
4789
  return;
4788
- } else if (i === "}") {
4790
+ } else if (r === "}") {
4789
4791
  this.tokenizer.back(A.pop()), u = !0;
4790
4792
  break;
4791
- } else i === ":" && (r = !0);
4792
- else i === q[q.length - 1] && (q.pop(), q.length === 0 && (d = null));
4793
+ } else r === ":" && (i = !0);
4794
+ else r === q[q.length - 1] && (q.pop(), q.length === 0 && (d = null));
4793
4795
  W = this.tokenizer.nextToken();
4794
4796
  }
4795
- if (this.tokenizer.endOfFile() && (u = !0), q.length > 0 && this.unclosedBracket(d), u && r) {
4797
+ if (this.tokenizer.endOfFile() && (u = !0), q.length > 0 && this.unclosedBracket(d), u && i) {
4796
4798
  if (!f)
4797
4799
  for (; A.length && (W = A[A.length - 1][0], !(W !== "space" && W !== "comment")); )
4798
4800
  this.tokenizer.back(A.pop());
@@ -4830,12 +4832,12 @@ function Vr() {
4830
4832
  }
4831
4833
  precheckMissedSemicolon() {
4832
4834
  }
4833
- raw(s, u, i, r) {
4834
- let d, q, f = i.length, A = "", W = !0, h, m;
4835
+ raw(s, u, r, i) {
4836
+ let d, q, f = r.length, A = "", W = !0, h, m;
4835
4837
  for (let l = 0; l < f; l += 1)
4836
- d = i[l], q = d[0], q === "space" && l === f - 1 && !r ? W = !1 : q === "comment" ? (m = i[l - 1] ? i[l - 1][0] : "empty", h = i[l + 1] ? i[l + 1][0] : "empty", !c[m] && !c[h] ? A.slice(-1) === "," ? W = !1 : A += d[1] : W = !1) : A += d[1];
4838
+ d = r[l], q = d[0], q === "space" && l === f - 1 && !i ? W = !1 : q === "comment" ? (m = r[l - 1] ? r[l - 1][0] : "empty", h = r[l + 1] ? r[l + 1][0] : "empty", !c[m] && !c[h] ? A.slice(-1) === "," ? W = !1 : A += d[1] : W = !1) : A += d[1];
4837
4839
  if (!W) {
4838
- let l = i.reduce((R, g) => R + g[1], "");
4840
+ let l = r.reduce((R, g) => R + g[1], "");
4839
4841
  s.raws[u] = { raw: l, value: A };
4840
4842
  }
4841
4843
  s[u] = A;
@@ -4846,29 +4848,29 @@ function Vr() {
4846
4848
  this.init(u, s[0][2]), u.raws.between = this.spacesAndCommentsFromEnd(s), this.raw(u, "selector", s), this.current = u;
4847
4849
  }
4848
4850
  spacesAndCommentsFromEnd(s) {
4849
- let u, i = "";
4851
+ let u, r = "";
4850
4852
  for (; s.length && (u = s[s.length - 1][0], !(u !== "space" && u !== "comment")); )
4851
- i = s.pop()[1] + i;
4852
- return i;
4853
+ r = s.pop()[1] + r;
4854
+ return r;
4853
4855
  }
4854
4856
  // Errors
4855
4857
  spacesAndCommentsFromStart(s) {
4856
- let u, i = "";
4858
+ let u, r = "";
4857
4859
  for (; s.length && (u = s[0][0], !(u !== "space" && u !== "comment")); )
4858
- i += s.shift()[1];
4859
- return i;
4860
+ r += s.shift()[1];
4861
+ return r;
4860
4862
  }
4861
4863
  spacesFromEnd(s) {
4862
- let u, i = "";
4864
+ let u, r = "";
4863
4865
  for (; s.length && (u = s[s.length - 1][0], u === "space"); )
4864
- i = s.pop()[1] + i;
4865
- return i;
4866
+ r = s.pop()[1] + r;
4867
+ return r;
4866
4868
  }
4867
4869
  stringFrom(s, u) {
4868
- let i = "";
4869
- for (let r = u; r < s.length; r++)
4870
- i += s[r][1];
4871
- return s.splice(u, s.length - u), i;
4870
+ let r = "";
4871
+ for (let i = u; i < s.length; i++)
4872
+ r += s[i][1];
4873
+ return s.splice(u, s.length - u), r;
4872
4874
  }
4873
4875
  unclosedBlock() {
4874
4876
  let s = this.current.source.start;
@@ -5010,11 +5012,11 @@ function wc() {
5010
5012
  RootExit: !0,
5011
5013
  Rule: !0,
5012
5014
  RuleExit: !0
5013
- }, i = {
5015
+ }, r = {
5014
5016
  Once: !0,
5015
5017
  postcssPlugin: !0,
5016
5018
  prepare: !0
5017
- }, r = 0;
5019
+ }, i = 0;
5018
5020
  function d(m) {
5019
5021
  return typeof m == "object" && typeof m.then == "function";
5020
5022
  }
@@ -5023,14 +5025,14 @@ function wc() {
5023
5025
  return m.type === "decl" ? l = m.prop.toLowerCase() : m.type === "atrule" && (l = m.name.toLowerCase()), l && m.append ? [
5024
5026
  R,
5025
5027
  R + "-" + l,
5026
- r,
5028
+ i,
5027
5029
  R + "Exit",
5028
5030
  R + "Exit-" + l
5029
- ] : l ? [R, R + "-" + l, R + "Exit", R + "Exit-" + l] : m.append ? [R, r, R + "Exit"] : [R, R + "Exit"];
5031
+ ] : l ? [R, R + "-" + l, R + "Exit", R + "Exit-" + l] : m.append ? [R, i, R + "Exit"] : [R, R + "Exit"];
5030
5032
  }
5031
5033
  function f(m) {
5032
5034
  let l;
5033
- return m.type === "document" ? l = ["Document", r, "DocumentExit"] : m.type === "root" ? l = ["Root", r, "RootExit"] : l = q(m), {
5035
+ return m.type === "document" ? l = ["Document", i, "DocumentExit"] : m.type === "root" ? l = ["Root", i, "RootExit"] : l = q(m), {
5034
5036
  eventIndex: 0,
5035
5037
  events: l,
5036
5038
  iterator: 0,
@@ -5127,7 +5129,7 @@ function wc() {
5127
5129
  throw new Error(
5128
5130
  `Unknown event ${g} in ${R.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`
5129
5131
  );
5130
- if (!i[g])
5132
+ if (!r[g])
5131
5133
  if (typeof R[g] == "object")
5132
5134
  for (let y in R[g])
5133
5135
  y === "*" ? l(R, g, R[g][y]) : l(
@@ -5290,7 +5292,7 @@ function wc() {
5290
5292
  let B = R.events;
5291
5293
  for (; R.eventIndex < B.length; ) {
5292
5294
  let _ = B[R.eventIndex];
5293
- if (R.eventIndex += 1, _ === r) {
5295
+ if (R.eventIndex += 1, _ === i) {
5294
5296
  g.nodes && g.nodes.length && (g[p] = !0, R.iterator = g.getIterator());
5295
5297
  return;
5296
5298
  } else if (this.listeners[_]) {
@@ -5304,7 +5306,7 @@ function wc() {
5304
5306
  l[p] = !0;
5305
5307
  let R = q(l);
5306
5308
  for (let g of R)
5307
- if (g === r)
5309
+ if (g === i)
5308
5310
  l.nodes && l.each((y) => {
5309
5311
  y[p] || this.walkSync(y);
5310
5312
  });
@@ -5372,12 +5374,12 @@ function Yr() {
5372
5374
  return u.root;
5373
5375
  }
5374
5376
  });
5375
- let i = new e(s, void 0, this._opts, a);
5376
- if (i.isMap()) {
5377
- let [r, d] = i.generate();
5378
- r && (this.result.css = r), d && (this.result.map = d);
5377
+ let r = new e(s, void 0, this._opts, a);
5378
+ if (r.isMap()) {
5379
+ let [i, d] = r.generate();
5380
+ i && (this.result.css = i), d && (this.result.map = d);
5379
5381
  } else
5380
- i.clearAnnotation(), this.result.css = i.css;
5382
+ r.clearAnnotation(), this.result.css = r.css;
5381
5383
  }
5382
5384
  async() {
5383
5385
  return this.error ? Promise.reject(this.error) : Promise.resolve(this.result);
@@ -5446,9 +5448,9 @@ var TM, fz;
5446
5448
  function Kr() {
5447
5449
  if (fz) return TM;
5448
5450
  fz = 1;
5449
- let e = ft(), b = Xb(), M = I2(), t = lt(), o = wb(), z = Wt(), c = Gr(), p = Sb(), a = wc(), n = Bc(), s = _b(), u = mt(), i = $r(), r = Rt(), d = Ie(), q = ht(), f = Tb(), A = _c();
5451
+ let e = ft(), b = Xb(), M = I2(), t = lt(), o = wb(), z = Wt(), c = Gr(), p = Sb(), a = wc(), n = Bc(), s = _b(), u = mt(), r = $r(), i = Rt(), d = Ie(), q = ht(), f = Tb(), A = _c();
5450
5452
  function W(...h) {
5451
- return h.length === 1 && Array.isArray(h[0]) && (h = h[0]), new i(h);
5453
+ return h.length === 1 && Array.isArray(h[0]) && (h = h[0]), new r(h);
5452
5454
  }
5453
5455
  return W.plugin = function(m, l) {
5454
5456
  let R = !1;
@@ -5461,7 +5463,7 @@ https://evilmartians.com/chronicles/postcss-8-plugin-migration`
5461
5463
  https://www.w3ctech.com/topic/2226`
5462
5464
  ));
5463
5465
  let _ = l(...B);
5464
- return _.postcssPlugin = m, _.postcssVersion = new i().version, _;
5466
+ return _.postcssPlugin = m, _.postcssVersion = new r().version, _;
5465
5467
  }
5466
5468
  let y;
5467
5469
  return Object.defineProperty(g, "postcss", {
@@ -5471,7 +5473,7 @@ https://www.w3ctech.com/topic/2226`
5471
5473
  }), g.process = function(B, _, v) {
5472
5474
  return W([g(v)]).process(B, _);
5473
5475
  }, g;
5474
- }, W.stringify = f, W.parse = u, W.fromJSON = c, W.list = n, W.comment = (h) => new b(h), W.atRule = (h) => new e(h), W.decl = (h) => new o(h), W.rule = (h) => new q(h), W.root = (h) => new d(h), W.document = (h) => new z(h), W.CssSyntaxError = t, W.Declaration = o, W.Container = M, W.Processor = i, W.Document = z, W.Comment = b, W.Warning = A, W.AtRule = e, W.Result = r, W.Input = p, W.Rule = q, W.Root = d, W.Node = s, a.registerPostcss(W), TM = W, W.default = W, TM;
5476
+ }, W.stringify = f, W.parse = u, W.fromJSON = c, W.list = n, W.comment = (h) => new b(h), W.atRule = (h) => new e(h), W.decl = (h) => new o(h), W.rule = (h) => new q(h), W.root = (h) => new d(h), W.document = (h) => new z(h), W.CssSyntaxError = t, W.Declaration = o, W.Container = M, W.Processor = r, W.Document = z, W.Comment = b, W.Warning = A, W.AtRule = e, W.Result = i, W.Input = p, W.Rule = q, W.Root = d, W.Node = s, a.registerPostcss(W), TM = W, W.default = W, TM;
5475
5477
  }
5476
5478
  var _M, Wz;
5477
5479
  function Qr() {
@@ -5508,7 +5510,7 @@ function Qr() {
5508
5510
  return !1;
5509
5511
  return !0;
5510
5512
  }
5511
- function i(f) {
5513
+ function r(f) {
5512
5514
  return f.map(function(A) {
5513
5515
  if (!A.url)
5514
5516
  throw new Error("URL missing");
@@ -5516,7 +5518,7 @@ function Qr() {
5516
5518
  }).join(", ");
5517
5519
  }
5518
5520
  _M = d;
5519
- const r = /^[^\0\t\n\f\r /<=>]+$/;
5521
+ const i = /^[^\0\t\n\f\r /<=>]+$/;
5520
5522
  function d(f, A, W) {
5521
5523
  if (f == null)
5522
5524
  return "";
@@ -5602,7 +5604,7 @@ and ensure you are accounting for this risk.
5602
5604
  h += "<" + E, E === "script" && (A.allowedScriptHostnames || A.allowedScriptDomains) && (N.innerText = ""), S && (A.disallowedTagsMode === "escape" || A.disallowedTagsMode === "recursiveEscape") && A.preserveEscapedAttributes ? a(k, function(r0, M0) {
5603
5605
  h += " " + M0 + '="' + o0(r0 || "", !0) + '"';
5604
5606
  }) : (!y || n(y, E) || y["*"]) && a(k, function(r0, M0) {
5605
- if (!r.test(M0)) {
5607
+ if (!i.test(M0)) {
5606
5608
  delete N.attribs[M0];
5607
5609
  return;
5608
5610
  }
@@ -5681,7 +5683,7 @@ and ensure you are accounting for this risk.
5681
5683
  }), T0 = s(T0, function(_0) {
5682
5684
  return !_0.evil;
5683
5685
  }), T0.length)
5684
- r0 = i(s(T0, function(_0) {
5686
+ r0 = r(s(T0, function(_0) {
5685
5687
  return !_0.evil;
5686
5688
  })), N.attribs[M0] = r0;
5687
5689
  else {
@@ -6276,29 +6278,29 @@ const Jr = /* @__PURE__ */ hc(Zr), e3 = (e) => {
6276
6278
  }
6277
6279
  }, u = (q) => {
6278
6280
  z((f) => /* @__PURE__ */ new Set([...f, q]));
6279
- }, i = (q) => {
6281
+ }, r = (q) => {
6280
6282
  z((f) => /* @__PURE__ */ new Set([...f, q]));
6281
6283
  };
6282
6284
  if (p)
6283
6285
  return /* @__PURE__ */ O(D, { as: "div", margin: "small", children: /* @__PURE__ */ O(I1, { renderTitle: b.loadingNotifications, size: "x-small" }) });
6284
6286
  if (a || !(c != null && c.accountNotifications) && !(c != null && c.enrollmentInvitations))
6285
6287
  return null;
6286
- const r = ((c == null ? void 0 : c.accountNotifications) || []).filter(
6288
+ const i = ((c == null ? void 0 : c.accountNotifications) || []).filter(
6287
6289
  (q) => !M.has(q.id)
6288
6290
  ), d = ((c == null ? void 0 : c.enrollmentInvitations) || []).filter(
6289
6291
  (q) => !o.has(q.id)
6290
6292
  );
6291
- return r.length === 0 && d.length === 0 ? null : /* @__PURE__ */ X(D, { as: "div", margin: "0 0 medium 0", children: [
6293
+ return i.length === 0 && d.length === 0 ? null : /* @__PURE__ */ X(D, { as: "div", margin: "0 0 medium 0", children: [
6292
6294
  d.map((q) => /* @__PURE__ */ O(
6293
6295
  gr,
6294
6296
  {
6295
6297
  invitation: q,
6296
6298
  onAccept: u,
6297
- onReject: i
6299
+ onReject: r
6298
6300
  },
6299
6301
  q.id
6300
6302
  )),
6301
- r.map((q) => /* @__PURE__ */ O(
6303
+ i.map((q) => /* @__PURE__ */ O(
6302
6304
  M3,
6303
6305
  {
6304
6306
  notification: q,
@@ -6374,49 +6376,49 @@ function i3() {
6374
6376
  }
6375
6377
  function c1(e, b, M, t) {
6376
6378
  const { widgetConfig: o, updateWidgetConfig: z, observedUserId: c } = x0(), { executeQuery: p } = h0(), a = Z(
6377
- (r) => [
6379
+ (i) => [
6378
6380
  "course-work-widget",
6379
6381
  "course-work-combined-widget",
6380
6382
  "course-work-summary-widget"
6381
- ].includes(e) && b === "selectedCourse" && typeof r == "string" && r.startsWith("course_") && r !== "all" ? r.replace("course_", "") : r,
6383
+ ].includes(e) && b === "selectedCourse" && typeof i == "string" && i.startsWith("course_") && i !== "all" ? i.replace("course_", "") : i,
6382
6384
  [e, b]
6383
6385
  ), [n, s] = V(() => {
6384
- const r = o[e];
6385
- if (r && b in r) {
6386
- const d = a(r[b]);
6386
+ const i = o[e];
6387
+ if (i && b in i) {
6388
+ const d = a(i[b]);
6387
6389
  return t && !t(d) ? M : d;
6388
6390
  }
6389
6391
  return M;
6390
6392
  });
6391
6393
  k0(() => {
6392
- const r = o[e];
6393
- if (r && b in r) {
6394
- const d = a(r[b]);
6394
+ const i = o[e];
6395
+ if (i && b in i) {
6396
+ const d = a(i[b]);
6395
6397
  t && !t(d) ? s(M) : s(d);
6396
6398
  }
6397
6399
  }, [o, e, b, a, M, t]);
6398
6400
  const u = _1({
6399
- mutationFn: async (r) => await p(
6401
+ mutationFn: async (i) => await p(
6400
6402
  ar,
6401
6403
  {
6402
6404
  widgetId: e,
6403
- filters: r && typeof r == "object" ? r : {}
6405
+ filters: i && typeof i == "object" ? i : {}
6404
6406
  }
6405
6407
  ),
6406
- onError: (r) => {
6407
- console.error("Failed to save widget config preference:", r);
6408
+ onError: (i) => {
6409
+ console.error("Failed to save widget config preference:", i);
6408
6410
  }
6409
- }), i = Z(
6410
- (r) => {
6411
- s(r);
6411
+ }), r = Z(
6412
+ (i) => {
6413
+ s(i);
6412
6414
  const d = o[e] || {};
6413
- let q = r;
6415
+ let q = i;
6414
6416
  const f = [
6415
6417
  "course-work-widget",
6416
6418
  "course-work-combined-widget",
6417
6419
  "course-work-summary-widget"
6418
6420
  ].includes(e);
6419
- f && b === "selectedCourse" && typeof r == "string" && (q = r === "all" || r.startsWith("course_") ? r : `course_${r}`);
6421
+ f && b === "selectedCourse" && typeof i == "string" && (q = i === "all" || i.startsWith("course_") ? i : `course_${i}`);
6420
6422
  const A = {
6421
6423
  ...d,
6422
6424
  [b]: q
@@ -6429,7 +6431,7 @@ function c1(e, b, M, t) {
6429
6431
  },
6430
6432
  [b, o, e, z, u, c]
6431
6433
  );
6432
- return [n, i];
6434
+ return [n, r];
6433
6435
  }
6434
6436
  const a3 = V0`
6435
6437
  query GetUserCourseStatistics($userId: ID!, $startDate: ISO8601DateTime!, $endDate: ISO8601DateTime!, $observedUserId: ID) {
@@ -6471,8 +6473,8 @@ function O3(e, b, M, t) {
6471
6473
  const n = ((s = p.course.assignmentsConnection) == null ? void 0 : s.nodes) ?? [];
6472
6474
  for (const u of n) {
6473
6475
  if (!u.dueAt) continue;
6474
- const i = new Date(u.dueAt);
6475
- M && t && i >= M && i <= t && c.quizzesDue++;
6476
+ const r = new Date(u.dueAt);
6477
+ M && t && r >= M && r <= t && c.quizzesDue++;
6476
6478
  }
6477
6479
  return c;
6478
6480
  },
@@ -6670,7 +6672,7 @@ function l3(e) {
6670
6672
  missingSubmissionsCount: ((a = z.course.submissionStatistics) == null ? void 0 : a.missingSubmissionsCount) ?? 0,
6671
6673
  submissionsDueCount: ((n = z.course.submissionStatistics) == null ? void 0 : n.submissionsDueCount) ?? 0,
6672
6674
  currentScore: ((s = z.grades) == null ? void 0 : s.currentScore) ?? null,
6673
- hasNewGrade: ((u = z.course.submissionsConnection) == null ? void 0 : u.nodes.some((i) => i.gradedAt ? Date.now() - new Date(i.gradedAt).getTime() < 24 * 60 * 60 * 1e3 : !1)) ?? !1
6675
+ hasNewGrade: ((u = z.course.submissionsConnection) == null ? void 0 : u.nodes.some((r) => r.gradedAt ? Date.now() - new Date(r.gradedAt).getTime() < 24 * 60 * 60 * 1e3 : !1)) ?? !1
6674
6676
  };
6675
6677
  });
6676
6678
  }
@@ -6691,7 +6693,7 @@ function xc() {
6691
6693
  data: n,
6692
6694
  isLoading: s,
6693
6695
  error: u,
6694
- refetch: i
6696
+ refetch: r
6695
6697
  } = p1({
6696
6698
  ...ee(
6697
6699
  [ao, M ?? void 0, c.join(",")],
@@ -6704,7 +6706,7 @@ function xc() {
6704
6706
  persister: l2,
6705
6707
  refetchOnMount: !1
6706
6708
  }), {
6707
- data: r,
6709
+ data: i,
6708
6710
  isLoading: d,
6709
6711
  error: q,
6710
6712
  refetch: f
@@ -6725,7 +6727,7 @@ function xc() {
6725
6727
  retry: a1.RETRY.DISABLED,
6726
6728
  persister: l2,
6727
6729
  refetchOnMount: !1
6728
- }), A = p ? n : r, W = p ? s : d, h = p ? u : q, m = p ? i : f, l = h, R = W && !A, g = (A == null ? void 0 : A.length) ?? null, y = g !== null ? Math.ceil(g / a) : 0, B = a0(() => {
6730
+ }), A = p ? n : i, W = p ? s : d, h = p ? u : q, m = p ? r : f, l = h, R = W && !A, g = (A == null ? void 0 : A.length) ?? null, y = g !== null ? Math.ceil(g / a) : 0, B = a0(() => {
6729
6731
  if (!A) return;
6730
6732
  const w = e * a;
6731
6733
  return A.slice(w, w + a);
@@ -6985,8 +6987,8 @@ const f3 = ({
6985
6987
  loadingText: n,
6986
6988
  pagination: s,
6987
6989
  loadingOverlay: u,
6988
- footerActions: i,
6989
- isEditMode: r = !1,
6990
+ footerActions: r,
6991
+ isEditMode: i = !1,
6990
6992
  dragHandleProps: d
6991
6993
  }) => {
6992
6994
  const { translations: q, translate: f, announceForScreenReader: A } = b0(), { isMobile: W, isDesktop: h } = r2(), { config: m, moveWidget: l, removeWidget: R } = Bb(), g = b || e.title, y = `${e.id}-heading`, B = ab.useRef(null), [_, v] = ab.useState(null);
@@ -7075,11 +7077,11 @@ const f3 = ({
7075
7077
  o && g && (W ? /* @__PURE__ */ X(L, { direction: "column", gap: "x-small", children: [
7076
7078
  /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(s1, { level: "h2", margin: "0", id: y, children: g }) }),
7077
7079
  z && /* @__PURE__ */ O(L.Item, { padding: "x-small 0 x-small x-small", children: z }),
7078
- r && /* @__PURE__ */ O(L.Item, { padding: "x-small 0 x-small x-small", children: C })
7080
+ i && /* @__PURE__ */ O(L.Item, { padding: "x-small 0 x-small x-small", children: C })
7079
7081
  ] }) : /* @__PURE__ */ X(L, { direction: "row", alignItems: "center", justifyItems: "space-between", wrap: "wrap", children: [
7080
7082
  /* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: /* @__PURE__ */ O(s1, { level: "h2", variant: "titleCardSection", margin: "0", id: y, children: g }) }),
7081
7083
  z && /* @__PURE__ */ O(L.Item, { shouldGrow: !1, children: z }),
7082
- r && /* @__PURE__ */ O(L.Item, { margin: "0 0 0 small", shouldGrow: !1, children: C })
7084
+ i && /* @__PURE__ */ O(L.Item, { margin: "0 0 0 small", shouldGrow: !1, children: C })
7083
7085
  ] })),
7084
7086
  /* @__PURE__ */ X(
7085
7087
  D,
@@ -7128,7 +7130,7 @@ const f3 = ({
7128
7130
  }
7129
7131
  )
7130
7132
  ] }) }),
7131
- i && !c && !p && /* @__PURE__ */ O(D, { as: "div", margin: "small 0 0", children: i })
7133
+ r && !c && !p && /* @__PURE__ */ O(D, { as: "div", margin: "small 0 0", children: r })
7132
7134
  ] })
7133
7135
  }
7134
7136
  );
@@ -7182,19 +7184,19 @@ function g3({
7182
7184
  ] });
7183
7185
  }
7184
7186
  const L3 = ({ widget: e, isEditMode: b = !1 }) => {
7185
- const { translations: M, translate: t } = b0(), { accounts: o } = x0(), z = z1(/* @__PURE__ */ new Map()), c = (i) => (z.current.has(i) || z.current.set(i, new Un()), z.current.get(i)), [p, a] = c1(
7187
+ const { translations: M, translate: t } = b0(), { accounts: o } = x0(), z = z1(/* @__PURE__ */ new Map()), c = (r) => (z.current.has(r) || z.current.set(r, new Un()), z.current.get(r)), [p, a] = c1(
7186
7188
  e.id,
7187
7189
  "selectedView",
7188
7190
  "assignmentsAndQuizzes",
7189
7191
  R3
7190
7192
  ), { startDate: n, endDate: s } = a0(() => {
7191
- const i = /* @__PURE__ */ new Date(), r = new Date(i.getFullYear(), i.getMonth(), i.getDate());
7193
+ const r = /* @__PURE__ */ new Date(), i = new Date(r.getFullYear(), r.getMonth(), r.getDate());
7192
7194
  return {
7193
- startDate: r,
7194
- endDate: new Date(r.getTime() + 365 * 24 * 60 * 60 * 1e3)
7195
+ startDate: i,
7196
+ endDate: new Date(i.getTime() + 365 * 24 * 60 * 60 * 1e3)
7195
7197
  };
7196
- }, []), u = (i, r) => {
7197
- r.value && typeof r.value == "string" && a(r.value);
7198
+ }, []), u = (r, i) => {
7199
+ i.value && typeof i.value == "string" && a(i.value);
7198
7200
  };
7199
7201
  return /* @__PURE__ */ O(t1, { widget: e, isEditMode: b, children: /* @__PURE__ */ X(L, { gap: "medium", direction: "column", children: [
7200
7202
  /* @__PURE__ */ O(D, { as: "div", children: /* @__PURE__ */ X(
@@ -7210,27 +7212,27 @@ const L3 = ({ widget: e, isEditMode: b = !1 }) => {
7210
7212
  ]
7211
7213
  }
7212
7214
  ) }),
7213
- o.map((i, r) => {
7215
+ o.map((r, i) => {
7214
7216
  const d = /* @__PURE__ */ X(L, { direction: "column", gap: "small", children: [
7215
- /* @__PURE__ */ O(g3, { account: i, translations: M }),
7217
+ /* @__PURE__ */ O(g3, { account: r, translations: M }),
7216
7218
  p === "assignmentsAndQuizzes" ? /* @__PURE__ */ O(s3, { startDate: n, endDate: s }) : /* @__PURE__ */ O(W3, {}),
7217
7219
  /* @__PURE__ */ O(D, { as: "div", textAlign: "center", children: /* @__PURE__ */ X(
7218
7220
  P0,
7219
7221
  {
7220
- href: `${i.dashboardUrl}/dashboard`,
7222
+ href: `${r.dashboardUrl}/dashboard`,
7221
7223
  isWithinText: !1,
7222
7224
  target: "_blank",
7223
7225
  rel: "noopener noreferrer",
7224
- "data-testid": `account-dashboard-link-${i.id}`,
7226
+ "data-testid": `account-dashboard-link-${r.id}`,
7225
7227
  children: [
7226
- /* @__PURE__ */ O(P, { size: "small", children: t(M.viewAccountDashboard, { accountName: i.name }) }),
7228
+ /* @__PURE__ */ O(P, { size: "small", children: t(M.viewAccountDashboard, { accountName: r.name }) }),
7227
7229
  /* @__PURE__ */ O(k1, { children: M.opensInNewTab })
7228
7230
  ]
7229
7231
  }
7230
7232
  ) })
7231
7233
  ] });
7232
7234
  return /* @__PURE__ */ X(ab.Fragment, { children: [
7233
- r > 0 && /* @__PURE__ */ O(
7235
+ i > 0 && /* @__PURE__ */ O(
7234
7236
  D,
7235
7237
  {
7236
7238
  as: "div",
@@ -7240,16 +7242,16 @@ const L3 = ({ widget: e, isEditMode: b = !1 }) => {
7240
7242
  "aria-hidden": "true"
7241
7243
  }
7242
7244
  ),
7243
- i.executeQuery && i.currentUserId ? /* @__PURE__ */ O(
7245
+ r.executeQuery && r.currentUserId ? /* @__PURE__ */ O(
7244
7246
  Pn,
7245
7247
  {
7246
- executeQuery: i.executeQuery,
7247
- currentUserId: i.currentUserId,
7248
- queryClient: c(i.id),
7248
+ executeQuery: r.executeQuery,
7249
+ currentUserId: r.currentUserId,
7250
+ queryClient: c(r.id),
7249
7251
  children: d
7250
7252
  }
7251
7253
  ) : d
7252
- ] }, i.id);
7254
+ ] }, r.id);
7253
7255
  })
7254
7256
  ] }) });
7255
7257
  }, N3 = V0`
@@ -7342,8 +7344,8 @@ function T3(e = {}) {
7342
7344
  const [b, M] = V(0), [t, o] = V({}), [z, c] = V(null), { observedUserId: p } = x0(), { executeQuery: a, currentUserId: n } = h0(), {
7343
7345
  data: s,
7344
7346
  isFetching: u,
7345
- error: i,
7346
- refetch: r
7347
+ error: r,
7348
+ refetch: i
7347
7349
  } = p1({
7348
7350
  queryKey: [
7349
7351
  le,
@@ -7366,7 +7368,7 @@ function T3(e = {}) {
7366
7368
  refetchOnMount: !1,
7367
7369
  retry: !1,
7368
7370
  placeholderData: ce
7369
- }), d = i, q = u && !s, f = u && !!s;
7371
+ }), d = r, q = u && !s, f = u && !!s;
7370
7372
  k0(() => {
7371
7373
  (s == null ? void 0 : s.pageInfo.totalCount) !== null && (s == null ? void 0 : s.pageInfo.totalCount) !== void 0 && c(s.pageInfo.totalCount);
7372
7374
  }, [s]), k0(() => {
@@ -7378,8 +7380,8 @@ function T3(e = {}) {
7378
7380
  o({}), M(0);
7379
7381
  }, [e.filter]);
7380
7382
  const A = Z(() => {
7381
- o({}), c(null), M(0), r();
7382
- }, [r]), W = e.limit || 3, h = z != null ? Math.ceil(z / W) : 0, m = Z((g) => {
7383
+ o({}), c(null), M(0), i();
7384
+ }, [i]), W = e.limit || 3, h = z != null ? Math.ceil(z / W) : 0, m = Z((g) => {
7383
7385
  const y = g - 1;
7384
7386
  y >= 0 && M(y);
7385
7387
  }, []), l = Z(() => {
@@ -7613,8 +7615,8 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7613
7615
  readOnly: M = !1
7614
7616
  }) => {
7615
7617
  var h, m, l, R;
7616
- const { translations: t, translate: o } = b0(), { notify: z, locale: c, timezone: p } = h0(), { isDark: a } = x0(), n = D3(), [s, u] = V(e), [i, r] = V(!1), d = q1(), q = async () => {
7617
- r(!0);
7618
+ const { translations: t, translate: o } = b0(), { notify: z, locale: c, timezone: p } = h0(), { isDark: a } = x0(), n = D3(), [s, u] = V(e), [r, i] = V(!1), d = q1(), q = async () => {
7619
+ i(!0);
7618
7620
  try {
7619
7621
  const g = !s.isRead;
7620
7622
  await n.mutateAsync({
@@ -7633,7 +7635,7 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7633
7635
  message: o("errorChangingAnnouncementReadState")
7634
7636
  });
7635
7637
  } finally {
7636
- r(!1);
7638
+ i(!1);
7637
7639
  }
7638
7640
  }, f = a0(
7639
7641
  () => P3(s.message.replace(/<[^>]*>/g, "")),
@@ -7650,7 +7652,7 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7650
7652
  }
7651
7653
  g.forEach((y) => sessionStorage.removeItem(y));
7652
7654
  }, W = () => {
7653
- const g = s.isRead, y = i ? t.updating : g ? o("markAnnouncementAsUnread", { title: s.title }) : o("markAnnouncementAsRead", { title: s.title }), B = i ? `updating-${s.id}` : `${g ? "mark-unread" : "mark-read"}-${s.id}`, _ = i ? /* @__PURE__ */ O(I1, { size: "x-small", renderTitle: t.updatingReadStatus }) : g ? /* @__PURE__ */ O(ib, { color: "success", size: "x-small" }) : /* @__PURE__ */ O(Ln, { color: "secondary", size: "x-small" });
7655
+ const g = s.isRead, y = r ? t.updating : g ? o("markAnnouncementAsUnread", { title: s.title }) : o("markAnnouncementAsRead", { title: s.title }), B = r ? `updating-${s.id}` : `${g ? "mark-unread" : "mark-read"}-${s.id}`, _ = r ? /* @__PURE__ */ O(I1, { size: "x-small", renderTitle: t.updatingReadStatus }) : g ? /* @__PURE__ */ O(ib, { color: "success", size: "x-small" }) : /* @__PURE__ */ O(Ln, { color: "secondary", size: "x-small" });
7654
7656
  return /* @__PURE__ */ O(
7655
7657
  C2,
7656
7658
  {
@@ -7658,10 +7660,10 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7658
7660
  withBackground: !1,
7659
7661
  withBorder: !1,
7660
7662
  color: a ? "primary-inverse" : "secondary",
7661
- onClick: i || M ? void 0 : q,
7662
- disabled: i || M,
7663
+ onClick: r || M ? void 0 : q,
7664
+ disabled: r || M,
7663
7665
  screenReaderLabel: y,
7664
- "aria-pressed": i ? void 0 : g,
7666
+ "aria-pressed": r ? void 0 : g,
7665
7667
  "data-testid": B,
7666
7668
  children: _
7667
7669
  }
@@ -7747,8 +7749,8 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7747
7749
  currentPageIndex: n,
7748
7750
  totalPages: s,
7749
7751
  goToPage: u,
7750
- isLoading: i,
7751
- isPaginationLoading: r,
7752
+ isLoading: r,
7753
+ isPaginationLoading: i,
7752
7754
  error: d,
7753
7755
  refetch: q
7754
7756
  } = T3({
@@ -7810,7 +7812,7 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7810
7812
  widget: e,
7811
7813
  isEditMode: b,
7812
7814
  dragHandleProps: M,
7813
- isLoading: i,
7815
+ isLoading: r,
7814
7816
  error: d ? t.failedToLoadAnnouncements : null,
7815
7817
  onRetry: q,
7816
7818
  loadingText: t.loadingAnnouncements,
@@ -7821,7 +7823,7 @@ const Bz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title:
7821
7823
  ariaLabel: t.announcementsPagination
7822
7824
  },
7823
7825
  loadingOverlay: {
7824
- isLoading: r,
7826
+ isLoading: i,
7825
7827
  ariaLabel: t.loadingAnnouncementsAriaLabel
7826
7828
  },
7827
7829
  children: /* @__PURE__ */ X(L, { direction: "column", gap: "small", children: [
@@ -7847,19 +7849,19 @@ function Ic(e = {}) {
7847
7849
  () => o.map(j3),
7848
7850
  [o]
7849
7851
  ), c = a0(() => {
7850
- const i = z.length, r = Math.ceil(i / b), d = [];
7851
- for (let q = 0; q < r; q++) {
7852
+ const r = z.length, i = Math.ceil(r / b), d = [];
7853
+ for (let q = 0; q < i; q++) {
7852
7854
  const f = q * b, A = f + b;
7853
7855
  d.push(z.slice(f, A));
7854
7856
  }
7855
- return { pages: d, totalPages: r };
7857
+ return { pages: d, totalPages: i };
7856
7858
  }, [z, b]), p = c.pages[M] || [], a = c.totalPages, n = () => {
7857
7859
  M < a - 1 && t(M + 1);
7858
7860
  }, s = () => {
7859
7861
  M > 0 && t(M - 1);
7860
- }, u = (i) => {
7861
- const r = i - 1;
7862
- r >= 0 && r < a && t(r);
7862
+ }, u = (r) => {
7863
+ const i = r - 1;
7864
+ i >= 0 && i < a && t(i);
7863
7865
  };
7864
7866
  return {
7865
7867
  data: p,
@@ -7913,8 +7915,8 @@ const Uc = {
7913
7915
  }, K3 = () => Uc, Q3 = (e) => {
7914
7916
  const b = e.replace("#", "").toLowerCase(), M = parseInt(b.substring(0, 2), 16), t = parseInt(b.substring(2, 4), 16), o = parseInt(b.substring(4, 6), 16);
7915
7917
  return 1.05 / (((a, n, s) => {
7916
- const [u, i, r] = [a, n, s].map((d) => (d = d / 255, d <= 0.03928 ? d / 12.92 : ((d + 0.055) / 1.055) ** 2.4));
7917
- return 0.2126 * u + 0.7152 * i + 0.0722 * r;
7918
+ const [u, r, i] = [a, n, s].map((d) => (d = d / 255, d <= 0.03928 ? d / 12.92 : ((d + 0.055) / 1.055) ** 2.4));
7919
+ return 0.2126 * u + 0.7152 * r + 0.0722 * i;
7918
7920
  })(M, t, o) + 0.05) >= 4.5 ? "#FFFFFF" : "#000000";
7919
7921
  }, Lt = ({
7920
7922
  courseId: e,
@@ -7926,7 +7928,7 @@ const Uc = {
7926
7928
  useCustomColors: c = !0,
7927
7929
  maxWidth: p = "15rem"
7928
7930
  }) => {
7929
- const [a, n] = V(!1), { preferences: s, sharedCourseData: u } = x0(), i = u.find((f) => f.courseId === e), r = a0(() => {
7931
+ const [a, n] = V(!1), { preferences: s, sharedCourseData: u } = x0(), r = u.find((f) => f.courseId === e), i = a0(() => {
7930
7932
  if (z)
7931
7933
  return z;
7932
7934
  if (c && (s != null && s.custom_colors)) {
@@ -7940,14 +7942,14 @@ const Uc = {
7940
7942
  }
7941
7943
  }
7942
7944
  return K3();
7943
- }, [z, c, s == null ? void 0 : s.custom_colors, e]), d = o || (i == null ? void 0 : i.courseCode) || "N/A", q = /* @__PURE__ */ X(
7945
+ }, [z, c, s == null ? void 0 : s.custom_colors, e]), d = o || (r == null ? void 0 : r.courseCode) || "N/A", q = /* @__PURE__ */ X(
7944
7946
  vb,
7945
7947
  {
7946
7948
  color: "primary",
7947
7949
  className: `course-code-pill ${t || ""}`,
7948
7950
  themeOverride: {
7949
- background: r.background,
7950
- primaryColor: r.textColor,
7951
+ background: i.background,
7952
+ primaryColor: i.textColor,
7951
7953
  maxWidth: p
7952
7954
  },
7953
7955
  children: [
@@ -7995,7 +7997,7 @@ const Uc = {
7995
7997
  onGradeVisibilityChange: n
7996
7998
  }) => {
7997
7999
  var W;
7998
- const { translations: s, translate: u } = b0(), { ColorPicker: i } = $3(), { sharedCourseData: r, updateCourseColor: d } = x0(), q = a, f = (W = r.find((h) => h.courseId === e)) == null ? void 0 : W.courseColor, A = () => {
8000
+ const { translations: s, translate: u } = b0(), { ColorPicker: r } = $3(), { sharedCourseData: i, updateCourseColor: d } = x0(), q = a, f = (W = i.find((h) => h.courseId === e)) == null ? void 0 : W.courseColor, A = () => {
7999
8001
  const h = !q;
8000
8002
  n == null || n(h);
8001
8003
  };
@@ -8047,8 +8049,8 @@ const Uc = {
8047
8049
  maxWidth: "14rem"
8048
8050
  }
8049
8051
  ) }),
8050
- i && /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(
8051
- i,
8052
+ r && /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(
8053
+ r,
8052
8054
  {
8053
8055
  courseId: e,
8054
8056
  currentColor: f,
@@ -8147,8 +8149,8 @@ const Uc = {
8147
8149
  const { translations: t, translate: o } = b0(), [z, c] = V({}), [p, a] = V(!0), { isMobile: n } = r2(), {
8148
8150
  data: s,
8149
8151
  isLoading: u,
8150
- goToPage: i,
8151
- currentPage: r,
8152
+ goToPage: r,
8153
+ currentPage: i,
8152
8154
  totalPages: d
8153
8155
  } = Ic({
8154
8156
  limit: G2.MAX_GRID_ITEMS
@@ -8168,9 +8170,9 @@ const Uc = {
8168
8170
  l[R.courseId] = m;
8169
8171
  }), c(l);
8170
8172
  }, h = {
8171
- currentPage: r,
8173
+ currentPage: i,
8172
8174
  totalPages: d,
8173
- onPageChange: i,
8175
+ onPageChange: r,
8174
8176
  ariaLabel: t.courseGradesPagination
8175
8177
  };
8176
8178
  return /* @__PURE__ */ O(
@@ -8368,7 +8370,7 @@ async function oi(e, b, M, t) {
8368
8370
  });
8369
8371
  }
8370
8372
  async function zi(e, b, M, t, o, z, c) {
8371
- const { courseFilter: p, startDate: a, endDate: n, includeOverdue: s, includeNoDueDate: u, onlySubmitted: i } = z, r = await Promise.allSettled(
8373
+ const { courseFilter: p, startDate: a, endDate: n, includeOverdue: s, includeNoDueDate: u, onlySubmitted: r } = z, i = await Promise.allSettled(
8372
8374
  t.map(async (W) => {
8373
8375
  const h = o(W);
8374
8376
  return h ? (await oi(
@@ -8381,16 +8383,16 @@ async function zi(e, b, M, t, o, z, c) {
8381
8383
  endDate: n,
8382
8384
  includeOverdue: s,
8383
8385
  includeNoDueDate: u,
8384
- onlySubmitted: i,
8386
+ onlySubmitted: r,
8385
8387
  observedUserId: c
8386
8388
  }
8387
8389
  )).map((l) => ({ ...l, accountName: h.name })) : [];
8388
8390
  })
8389
- ), d = r.filter(
8391
+ ), d = i.filter(
8390
8392
  (W) => W.status === "fulfilled"
8391
8393
  );
8392
- if (d.length < r.length) {
8393
- const W = r.find((h) => h.status === "rejected");
8394
+ if (d.length < i.length) {
8395
+ const W = i.find((h) => h.status === "rejected");
8394
8396
  throw (W == null ? void 0 : W.reason) ?? new Error("One or more accounts failed to load");
8395
8397
  }
8396
8398
  const q = d.flatMap((W) => W.value).sort((W, h) => !W.dueAt && !h.dueAt ? 0 : W.dueAt ? h.dueAt ? new Date(W.dueAt).getTime() - new Date(h.dueAt).getTime() : -1 : 1), f = e * b, A = f + b;
@@ -8413,8 +8415,8 @@ async function ci(e, b = {}, M, t, o, z, c) {
8413
8415
  accountIds: n,
8414
8416
  startDate: s,
8415
8417
  endDate: u,
8416
- includeOverdue: i,
8417
- includeNoDueDate: r,
8418
+ includeOverdue: r,
8419
+ includeNoDueDate: i,
8418
8420
  onlySubmitted: d
8419
8421
  } = b;
8420
8422
  if (n && n.length > 0 && c)
@@ -8434,8 +8436,8 @@ async function ci(e, b = {}, M, t, o, z, c) {
8434
8436
  courseFilter: a,
8435
8437
  startDate: s,
8436
8438
  endDate: u,
8437
- includeOverdue: i,
8438
- includeNoDueDate: r,
8439
+ includeOverdue: r,
8440
+ includeNoDueDate: i,
8439
8441
  onlySubmitted: d,
8440
8442
  observedUserId: t
8441
8443
  });
@@ -8517,8 +8519,8 @@ function Nt(e = {}) {
8517
8519
  JSON.stringify(e.accountIds ?? []),
8518
8520
  b ?? void 0
8519
8521
  ], {
8520
- data: i,
8521
- isLoading: r,
8522
+ data: r,
8523
+ isLoading: i,
8522
8524
  isFetching: d,
8523
8525
  error: q,
8524
8526
  refetch: f
@@ -8540,7 +8542,7 @@ function Nt(e = {}) {
8540
8542
  refetchOnMount: !1,
8541
8543
  retry: !1,
8542
8544
  placeholderData: ce
8543
- }), A = (i == null ? void 0 : i.pageInfo.totalCount) ?? null, W = A != null ? Math.ceil(A / p) : 0, h = Z((_) => {
8545
+ }), A = (r == null ? void 0 : r.pageInfo.totalCount) ?? null, W = A != null ? Math.ceil(A / p) : 0, h = Z((_) => {
8544
8546
  const v = _ - 1;
8545
8547
  v >= 0 && s(v);
8546
8548
  }, []), m = Z(() => {
@@ -8549,15 +8551,15 @@ function Nt(e = {}) {
8549
8551
  queryKey: [no]
8550
8552
  }), f()), [c, f]);
8551
8553
  return {
8552
- currentPage: i,
8554
+ currentPage: r,
8553
8555
  currentPageIndex: n,
8554
8556
  totalPages: W,
8555
8557
  totalCount: A,
8556
8558
  goToPage: h,
8557
8559
  resetPagination: m,
8558
8560
  refetch: l,
8559
- isLoading: r,
8560
- isPaginationLoading: d && !!i,
8561
+ isLoading: i,
8562
+ isPaginationLoading: d && !!r,
8561
8563
  error: q,
8562
8564
  pageSize: p
8563
8565
  };
@@ -8930,7 +8932,7 @@ const Qc = ({
8930
8932
  "selectedDateFilter",
8931
8933
  "not_submitted",
8932
8934
  vt
8933
- ), [i, r] = c1(
8935
+ ), [r, i] = c1(
8934
8936
  e.id,
8935
8937
  "showSummaryCounts",
8936
8938
  !0,
@@ -8962,7 +8964,7 @@ const Qc = ({
8962
8964
  startDate: f.startDate,
8963
8965
  endDate: f.endDate,
8964
8966
  courseId: d,
8965
- enabled: i
8967
+ enabled: r
8966
8968
  }), w = (W == null ? void 0 : W.items) ?? [], C = b || g || v, x = M || (B ? B.message : null) || (T == null ? void 0 : T.message) || null, $ = Z(() => {
8967
8969
  t ? t() : R();
8968
8970
  }, [t, R]), H = Z(
@@ -8977,9 +8979,9 @@ const Qc = ({
8977
8979
  [u]
8978
8980
  ), p0 = Z(
8979
8981
  (G) => {
8980
- r(G.target.checked);
8982
+ i(G.target.checked);
8981
8983
  },
8982
- [r]
8984
+ [i]
8983
8985
  );
8984
8986
  return /* @__PURE__ */ O(
8985
8987
  t1,
@@ -9005,7 +9007,7 @@ const Qc = ({
9005
9007
  {
9006
9008
  variant: "toggle",
9007
9009
  label: c.showSummaryCounts,
9008
- checked: i,
9010
+ checked: r,
9009
9011
  onChange: p0,
9010
9012
  "data-testid": "show-summary-counts-toggle"
9011
9013
  }
@@ -9020,7 +9022,7 @@ const Qc = ({
9020
9022
  onDateFilterChange: Q
9021
9023
  }
9022
9024
  ) }),
9023
- i && _ && /* @__PURE__ */ O(L.Item, { overflowY: "hidden", children: /* @__PURE__ */ O(Qc, { summary: _, margin: "small 0" }) }),
9025
+ r && _ && /* @__PURE__ */ O(L.Item, { overflowY: "hidden", children: /* @__PURE__ */ O(Qc, { summary: _, margin: "small 0" }) }),
9024
9026
  /* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: w.length === 0 ? /* @__PURE__ */ O(L, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ O(P, { color: "secondary", "data-testid": "no-course-work-message", children: a === "all" ? c.noUpcomingCourseWork : c.noUpcomingCourseWorkForSelectedCourse }) }) : /* @__PURE__ */ O(D, { height: "100%", children: /* @__PURE__ */ O(L, { direction: "column", children: /* @__PURE__ */ O(H0, { isUnstyled: !0, margin: "0", children: w.map((G) => /* @__PURE__ */ O(H0.Item, { margin: "0", children: /* @__PURE__ */ O(Kc, { item: G }) }, G.id)) }) }) }) })
9025
9027
  ] })
9026
9028
  }
@@ -9044,12 +9046,12 @@ const Qc = ({
9044
9046
  }, [o]), {
9045
9047
  data: s = { due: 0, missing: 0, submitted: 0 },
9046
9048
  isLoading: u,
9047
- error: i
9049
+ error: r
9048
9050
  } = gt({
9049
9051
  startDate: a.startDate,
9050
9052
  endDate: a.endDate,
9051
9053
  courseId: n
9052
- }), r = (q, f) => {
9054
+ }), i = (q, f) => {
9053
9055
  f.value && typeof f.value == "string" && z(f.value);
9054
9056
  }, d = (q, f) => {
9055
9057
  f.value && typeof f.value == "string" && p(f.value);
@@ -9060,14 +9062,14 @@ const Qc = ({
9060
9062
  widget: e,
9061
9063
  isEditMode: b,
9062
9064
  isLoading: u,
9063
- error: i ? M.failedToLoadCourseWork : null,
9065
+ error: r ? M.failedToLoadCourseWork : null,
9064
9066
  loadingText: M.loadingCourseWorkData,
9065
9067
  headerActions: /* @__PURE__ */ O(
9066
9068
  Bt,
9067
9069
  {
9068
9070
  selectedCourse: o,
9069
9071
  selectedDateFilter: c,
9070
- onCourseChange: r,
9072
+ onCourseChange: i,
9071
9073
  onDateFilterChange: d
9072
9074
  }
9073
9075
  ),
@@ -9093,8 +9095,8 @@ const Qc = ({
9093
9095
  ), s = c === "all" ? void 0 : c, u = a0(
9094
9096
  () => Hc(a),
9095
9097
  [a]
9096
- ), i = pe.COURSE_WORK, {
9097
- currentPage: r,
9098
+ ), r = pe.COURSE_WORK, {
9099
+ currentPage: i,
9098
9100
  currentPageIndex: d,
9099
9101
  totalPages: q,
9100
9102
  goToPage: f,
@@ -9103,10 +9105,10 @@ const Qc = ({
9103
9105
  isPaginationLoading: h,
9104
9106
  error: m
9105
9107
  } = Nt({
9106
- pageSize: i,
9108
+ pageSize: r,
9107
9109
  courseFilter: s,
9108
9110
  ...u
9109
- }), l = (r == null ? void 0 : r.items) || [], R = M || W, g = t || (m == null ? void 0 : m.message) || null, y = o || (() => A()), B = l, _ = Z(
9111
+ }), l = (i == null ? void 0 : i.items) || [], R = M || W, g = t || (m == null ? void 0 : m.message) || null, y = o || (() => A()), B = l, _ = Z(
9110
9112
  (T, w) => {
9111
9113
  w.value && typeof w.value == "string" && p(w.value);
9112
9114
  },
@@ -9263,8 +9265,8 @@ function hi(e = {}) {
9263
9265
  const { courseIds: b = [], limit: M = 5, accountId: t } = e, o = q1(), [z, c] = V(0), [p, a] = V(t), { observedUserId: n } = x0(), {
9264
9266
  executeQuery: s,
9265
9267
  currentUserId: u,
9266
- getAccount: i
9267
- } = h0(), r = t ? i(t) : void 0, d = (r == null ? void 0 : r.executeQuery) ?? s, q = (r == null ? void 0 : r.currentUserId) ?? u, f = M;
9268
+ getAccount: r
9269
+ } = h0(), i = t ? r(t) : void 0, d = (i == null ? void 0 : i.executeQuery) ?? s, q = (i == null ? void 0 : i.currentUserId) ?? u, f = M;
9268
9270
  p !== t && (a(t), c(0));
9269
9271
  const A = [
9270
9272
  io,
@@ -9330,8 +9332,8 @@ function mi({
9330
9332
  }) {
9331
9333
  var R;
9332
9334
  const { translations: c, translate: p } = b0(), { accounts: a, getAccount: n } = h0(), [s, u] = V(((R = a[0]) == null ? void 0 : R.id) ?? ""), {
9333
- currentPage: i,
9334
- currentPageIndex: r,
9335
+ currentPage: r,
9336
+ currentPageIndex: i,
9335
9337
  totalPages: d,
9336
9338
  goToPage: q,
9337
9339
  isLoading: f,
@@ -9339,7 +9341,7 @@ function mi({
9339
9341
  } = hi({
9340
9342
  limit: pe.PEOPLE,
9341
9343
  accountId: a.length > 1 ? s : void 0
9342
- }), W = (i == null ? void 0 : i.data) ?? [], h = t || (A ? c.failedToLoadInstructorData : null), m = !h && (M || f), l = Z(
9344
+ }), W = (r == null ? void 0 : r.data) ?? [], h = t || (A ? c.failedToLoadInstructorData : null), m = !h && (M || f), l = Z(
9343
9345
  (g) => {
9344
9346
  var v, T;
9345
9347
  const y = a.length > 1 ? (v = n(s)) == null ? void 0 : v.canvasBaseUrl : (T = a[0]) == null ? void 0 : T.canvasBaseUrl;
@@ -9368,7 +9370,7 @@ function mi({
9368
9370
  onRetry: o,
9369
9371
  loadingText: c.loadingPeopleData,
9370
9372
  pagination: {
9371
- currentPage: r + 1,
9373
+ currentPage: i + 1,
9372
9374
  totalPages: d,
9373
9375
  onPageChange: q,
9374
9376
  isLoading: f,
@@ -9596,9 +9598,9 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9596
9598
  inputRef: n,
9597
9599
  hideOptionBadges: s = !1,
9598
9600
  showAllOption: u = !1,
9599
- "data-testid": i
9601
+ "data-testid": r
9600
9602
  }) => {
9601
- const { translations: r, translate: d, announceForScreenReader: q } = b0(), [f, A] = V(!1), [W, h] = V(null), [m, l] = V(""), R = z1(void 0), g = a0(() => new Map(e.map((o0) => [o0.id, o0])), [e]), y = a0(
9603
+ const { translations: i, translate: d, announceForScreenReader: q } = b0(), [f, A] = V(!1), [W, h] = V(null), [m, l] = V(""), R = z1(void 0), g = a0(() => new Map(e.map((o0) => [o0.id, o0])), [e]), y = a0(
9602
9604
  () => b.map((o0) => g.get(o0)).filter((o0) => o0 !== void 0),
9603
9605
  [b, g]
9604
9606
  ), B = a0(
@@ -9617,23 +9619,23 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9617
9619
  return clearTimeout(R.current), R.current = setTimeout(() => {
9618
9620
  const o0 = _.length;
9619
9621
  q == null || q(
9620
- o0 === 0 ? r.noResultsAvailable : d(r.resultsAvailable, { count: o0 })
9622
+ o0 === 0 ? i.noResultsAvailable : d(i.resultsAvailable, { count: o0 })
9621
9623
  );
9622
9624
  }, 300), () => clearTimeout(R.current);
9623
9625
  }, [
9624
9626
  _,
9625
9627
  c,
9626
9628
  f,
9627
- r.noResultsAvailable,
9628
- r.resultsAvailable,
9629
+ i.noResultsAvailable,
9630
+ i.resultsAvailable,
9629
9631
  d,
9630
9632
  q
9631
9633
  ]);
9632
9634
  const T = b.includes(o1.all), w = Z(
9633
9635
  (o0) => {
9634
- const s0 = (Z0) => q == null ? void 0 : q(d(r.courseRemoved, { name: Z0 })), B0 = (Z0) => q == null ? void 0 : q(d(r.courseSelected, { courseName: Z0 }));
9636
+ const s0 = (Z0) => q == null ? void 0 : q(d(i.courseRemoved, { name: Z0 })), B0 = (Z0) => q == null ? void 0 : q(d(i.courseSelected, { courseName: Z0 }));
9635
9637
  if (o0 === o1.all) {
9636
- T ? (M([]), s0(r.allCourses)) : (M([o1.all]), B0(r.allCourses));
9638
+ T ? (M([]), s0(i.allCourses)) : (M([o1.all]), B0(i.allCourses));
9637
9639
  return;
9638
9640
  }
9639
9641
  const A0 = g.get(o0);
@@ -9644,7 +9646,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9644
9646
  const D0 = T ? b.filter((Z0) => Z0 !== o1.all) : b;
9645
9647
  if (z && D0.length >= z) {
9646
9648
  q == null || q(
9647
- d(r.maxSelectionsReached, { count: z })
9649
+ d(i.maxSelectionsReached, { count: z })
9648
9650
  );
9649
9651
  return;
9650
9652
  }
@@ -9658,23 +9660,23 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9658
9660
  z,
9659
9661
  q,
9660
9662
  d,
9661
- r.allCourses,
9662
- r.courseRemoved,
9663
- r.courseSelected,
9664
- r.maxSelectionsReached
9663
+ i.allCourses,
9664
+ i.courseRemoved,
9665
+ i.courseSelected,
9666
+ i.maxSelectionsReached
9665
9667
  ]
9666
9668
  ), C = a0(() => {
9667
9669
  const o0 = T ? [
9668
9670
  {
9669
9671
  id: o1.all,
9670
- text: r.allCourses,
9671
- ariaLabel: r.removeAllCourses,
9672
+ text: i.allCourses,
9673
+ ariaLabel: i.removeAllCourses,
9672
9674
  testId: "course-tag-all"
9673
9675
  }
9674
9676
  ] : y.map((s0) => ({
9675
9677
  id: s0.id,
9676
9678
  text: s0.name,
9677
- ariaLabel: d(r.removeCourse, { name: s0.name }),
9679
+ ariaLabel: d(i.removeCourse, { name: s0.name }),
9678
9680
  testId: `course-tag-${s0.id}`
9679
9681
  }));
9680
9682
  return o0.length === 0 ? null : /* @__PURE__ */ O(D, { as: "div", display: "inline-block", padding: "xx-small", children: o0.map((s0) => /* @__PURE__ */ O(
@@ -9697,15 +9699,15 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9697
9699
  y,
9698
9700
  w,
9699
9701
  d,
9700
- r.allCourses,
9701
- r.removeAllCourses,
9702
- r.removeCourse
9702
+ i.allCourses,
9703
+ i.removeAllCourses,
9704
+ i.removeCourse
9703
9705
  ]), x = Z(
9704
9706
  (o0) => {
9705
9707
  var s0;
9706
9708
  if (o0.key === "Backspace" && m === "" && b.length > 0) {
9707
- const B0 = b[b.length - 1], A0 = B0 === o1.all ? r.allCourses : (s0 = g.get(B0)) == null ? void 0 : s0.name;
9708
- M(b.slice(0, -1)), A0 && (q == null || q(d(r.courseRemoved, { name: A0 })));
9709
+ const B0 = b[b.length - 1], A0 = B0 === o1.all ? i.allCourses : (s0 = g.get(B0)) == null ? void 0 : s0.name;
9710
+ M(b.slice(0, -1)), A0 && (q == null || q(d(i.courseRemoved, { name: A0 })));
9709
9711
  }
9710
9712
  },
9711
9713
  [
@@ -9715,14 +9717,14 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9715
9717
  M,
9716
9718
  q,
9717
9719
  d,
9718
- r.allCourses,
9719
- r.courseRemoved
9720
+ i.allCourses,
9721
+ i.courseRemoved
9720
9722
  ]
9721
9723
  ), $ = Z(() => {
9722
9724
  A(!1), l(""), h(null);
9723
9725
  }, []), H = () => /* @__PURE__ */ O(k2.Option, { id: o1.loading, isDisabled: !0, children: /* @__PURE__ */ X(L, { alignItems: "center", gap: "x-small", children: [
9724
- /* @__PURE__ */ O(I1, { size: "x-small", renderTitle: r.loadingCourses }),
9725
- /* @__PURE__ */ O(P, { size: "small", children: r.loadingCourses })
9726
+ /* @__PURE__ */ O(I1, { size: "x-small", renderTitle: i.loadingCourses }),
9727
+ /* @__PURE__ */ O(P, { size: "small", children: i.loadingCourses })
9726
9728
  ] }) }), Q = () => /* @__PURE__ */ O(
9727
9729
  k2.Option,
9728
9730
  {
@@ -9730,10 +9732,10 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9730
9732
  isHighlighted: W === o1.all,
9731
9733
  isSelected: T,
9732
9734
  renderAfterLabel: ({ isSelected: o0 }) => o0 ? /* @__PURE__ */ O(ib, { color: "primary-inverse", size: "x-small" }) : null,
9733
- children: r.allCourses
9735
+ children: i.allCourses
9734
9736
  },
9735
9737
  o1.all
9736
- ), p0 = () => /* @__PURE__ */ O(k2.Option, { id: o1.noResults, isDisabled: !0, children: r.noMatchingCourses }, o1.noResults), G = (o0) => {
9738
+ ), p0 = () => /* @__PURE__ */ O(k2.Option, { id: o1.noResults, isDisabled: !0, children: i.noMatchingCourses }, o1.noResults), G = (o0) => {
9737
9739
  const s0 = s ? [] : [o0.courseCode, o0.term, o0.sisId].filter((B0) => !!B0);
9738
9740
  return /* @__PURE__ */ O(
9739
9741
  k2.Option,
@@ -9749,7 +9751,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9749
9751
  },
9750
9752
  o0.id
9751
9753
  );
9752
- }, d0 = () => /* @__PURE__ */ O(k2.Option, { id: o1.moreHint, isDisabled: !0, children: d(r.moreTypeToFilter, {
9754
+ }, d0 = () => /* @__PURE__ */ O(k2.Option, { id: o1.moreHint, isDisabled: !0, children: d(i.moreTypeToFilter, {
9753
9755
  count: _.length - SM
9754
9756
  }) }, o1.moreHint), Y0 = () => c ? H() : [
9755
9757
  ...u ? [Q()] : [],
@@ -9762,9 +9764,9 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9762
9764
  {
9763
9765
  renderLabel: t,
9764
9766
  isRequired: o,
9765
- assistiveText: r.typeToSearchArrowKeys,
9767
+ assistiveText: i.typeToSearchArrowKeys,
9766
9768
  inputValue: m,
9767
- placeholder: c0 ? void 0 : r.searchByCourseNameOrCode,
9769
+ placeholder: c0 ? void 0 : i.searchByCourseNameOrCode,
9768
9770
  isShowingOptions: f,
9769
9771
  inputRef: n,
9770
9772
  onBlur: () => h(null),
@@ -9783,7 +9785,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9783
9785
  renderBeforeInput: C,
9784
9786
  messages: a,
9785
9787
  interaction: p,
9786
- "data-testid": i,
9788
+ "data-testid": r,
9787
9789
  children: Y0()
9788
9790
  }
9789
9791
  );
@@ -9848,15 +9850,15 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9848
9850
  defaultTime: e
9849
9851
  }) => {
9850
9852
  const [b, M] = V(""), [t, o] = V(""), [z, c] = V(void 0), p = z1(null), a = Z(
9851
- (u, i) => {
9852
- o(u), M(i), i && !z && c(e);
9853
+ (u, r) => {
9854
+ o(u), M(r), r && !z && c(e);
9853
9855
  },
9854
9856
  [z, e]
9855
9857
  ), n = Z(() => {
9856
9858
  M(""), o(""), c(void 0);
9857
9859
  }, []), s = Z(
9858
- (u, i, r, d) => {
9859
- M(u), o(u ? S3(u, r, d) : ""), c(i);
9860
+ (u, r, i, d) => {
9861
+ M(u), o(u ? S3(u, i, d) : ""), c(r);
9860
9862
  },
9861
9863
  []
9862
9864
  );
@@ -9878,16 +9880,16 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9878
9880
  onSubmit: t,
9879
9881
  isCreating: o
9880
9882
  }) => {
9881
- const { translations: z } = b0(), { locale: c, timezone: p } = h0(), [a, n] = V(""), [s, u] = V(""), [i, r] = V([]), d = Cz({ defaultTime: Ti }), q = Cz({ defaultTime: _i }), [f, A] = V(!1), [W, h] = V(!1), [m, l] = V(!1), [R, g] = V(""), [y, B] = V(""), [_, v] = V(""), [T, w] = V(""), C = z1(null), x = z1(null), $ = z1(null);
9883
+ const { translations: z } = b0(), { locale: c, timezone: p } = h0(), [a, n] = V(""), [s, u] = V(""), [r, i] = V([]), d = Cz({ defaultTime: Ti }), q = Cz({ defaultTime: _i }), [f, A] = V(!1), [W, h] = V(!1), [m, l] = V(!1), [R, g] = V(""), [y, B] = V(""), [_, v] = V(""), [T, w] = V(""), C = z1(null), x = z1(null), $ = z1(null);
9882
9884
  k0(() => {
9883
9885
  if (e) {
9884
- if (r(b ?? []), M) {
9886
+ if (i(b ?? []), M) {
9885
9887
  n(M.title), u(M.message);
9886
9888
  const [E, k] = gz(M.startDateTime), [N, S] = gz(M.endDateTime);
9887
9889
  d.initFrom(E, k, c, p), q.initFrom(N, S, c, p), A(M.allowComments), h(M.enablePodcast), l(M.allowLiking);
9888
9890
  }
9889
9891
  return () => {
9890
- r([]), n(""), u(""), d.reset(), q.reset(), A(!1), h(!1), l(!1), g(""), B(""), v(""), w("");
9892
+ i([]), n(""), u(""), d.reset(), q.reset(), A(!1), h(!1), l(!1), g(""), B(""), v(""), w("");
9891
9893
  };
9892
9894
  }
9893
9895
  }, [
@@ -9906,7 +9908,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9906
9908
  }, Q = (E) => {
9907
9909
  u(E), _ && E.trim() && v("");
9908
9910
  }, p0 = (E) => {
9909
- r(E), y && E.length > 0 && B("");
9911
+ i(E), y && E.length > 0 && B("");
9910
9912
  }, G = Z(
9911
9913
  (E, k) => {
9912
9914
  q.onDateChange(E, k), T && w("");
@@ -9928,7 +9930,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9928
9930
  A(E.includes("allowComments")), h(E.includes("enablePodcast")), l(E.includes("allowLiking"));
9929
9931
  }, o0 = () => {
9930
9932
  let E = !1, k = null;
9931
- a.trim() ? a.length > KM ? (g(z.announcementTitleMaxLength), E = !0, k = C) : g("") : (g(z.announcementTitleRequired), E = !0, k = C), s.trim() ? new Blob([s]).size > Xi ? (v(z.announcementContentTooLarge), E = !0, k || (k = $)) : v("") : (v(z.announcementContentRequired), E = !0, k || (k = $)), i.length === 0 ? (B(z.announcementCoursesRequired), E = !0, k || (k = x)) : B(""), d.hasInvalidInput && (E = !0, k || (k = d.inputRef)), q.hasInvalidInput && (E = !0, k || (k = q.inputRef));
9933
+ a.trim() ? a.length > KM ? (g(z.announcementTitleMaxLength), E = !0, k = C) : g("") : (g(z.announcementTitleRequired), E = !0, k = C), s.trim() ? new Blob([s]).size > Xi ? (v(z.announcementContentTooLarge), E = !0, k || (k = $)) : v("") : (v(z.announcementContentRequired), E = !0, k || (k = $)), r.length === 0 ? (B(z.announcementCoursesRequired), E = !0, k || (k = x)) : B(""), d.hasInvalidInput && (E = !0, k || (k = d.inputRef)), q.hasInvalidInput && (E = !0, k || (k = q.inputRef));
9932
9934
  const N = Lz(d.date, d.time), S = Lz(q.date, q.time);
9933
9935
  if (N && S && new Date(S) < new Date(N) ? (w(z.announcementEndDateBeforeStart), E = !0, k || (k = q.inputRef)) : w(""), E) {
9934
9936
  queueMicrotask(() => {
@@ -9938,7 +9940,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9938
9940
  return;
9939
9941
  }
9940
9942
  t({
9941
- courseIds: i,
9943
+ courseIds: r,
9942
9944
  title: a.trim(),
9943
9945
  message: s.trim(),
9944
9946
  startDateTime: N,
@@ -9955,7 +9957,7 @@ const vi = ({ text: e }) => /* @__PURE__ */ O(
9955
9957
  return {
9956
9958
  title: a,
9957
9959
  message: s,
9958
- selectedCourseIds: i,
9960
+ selectedCourseIds: r,
9959
9961
  startField: d,
9960
9962
  endField: Y0,
9961
9963
  interaction: s0,
@@ -10038,7 +10040,7 @@ const Ii = ({
10038
10040
  initialFormState: c,
10039
10041
  renderMessageEditor: p
10040
10042
  }) => {
10041
- const { translations: a } = b0(), n = z1(null), [s, u] = V(0), i = Ei("announcement-editor-");
10043
+ const { translations: a } = b0(), n = z1(null), [s, u] = V(0), r = Ei("announcement-editor-");
10042
10044
  Dn(() => {
10043
10045
  const f = n.current;
10044
10046
  if (!f) return;
@@ -10047,7 +10049,7 @@ const Ii = ({
10047
10049
  const W = f.getBoundingClientRect().top, h = A.getBoundingClientRect();
10048
10050
  u(h.top - W + h.height / 2);
10049
10051
  });
10050
- const r = wi({
10052
+ const i = wi({
10051
10053
  open: e,
10052
10054
  initialCourseIds: z,
10053
10055
  initialFormState: c,
@@ -10055,9 +10057,9 @@ const Ii = ({
10055
10057
  isCreating: t
10056
10058
  }), d = Z(
10057
10059
  (f) => {
10058
- r.messageRef.current = f;
10060
+ i.messageRef.current = f;
10059
10061
  },
10060
- [r.messageRef]
10062
+ [i.messageRef]
10061
10063
  ), q = () => {
10062
10064
  t || b();
10063
10065
  };
@@ -10079,7 +10081,7 @@ const Ii = ({
10079
10081
  offset: "small",
10080
10082
  onClick: q,
10081
10083
  screenReaderLabel: a.close,
10082
- interaction: r.interaction
10084
+ interaction: i.interaction
10083
10085
  }
10084
10086
  ),
10085
10087
  /* @__PURE__ */ O(s1, { children: a.createAnnouncement })
@@ -10091,12 +10093,12 @@ const Ii = ({
10091
10093
  "data-testid": "announcement-title-input",
10092
10094
  renderLabel: a.announcementTitle,
10093
10095
  isRequired: !0,
10094
- value: r.title,
10095
- onChange: r.onTitleChange,
10096
- messages: r.titleMessages,
10097
- interaction: r.interaction,
10096
+ value: i.title,
10097
+ onChange: i.onTitleChange,
10098
+ messages: i.titleMessages,
10099
+ interaction: i.interaction,
10098
10100
  inputRef: (f) => {
10099
- r.titleRef.current = f;
10101
+ i.titleRef.current = f;
10100
10102
  },
10101
10103
  maxLength: KM
10102
10104
  }
@@ -10108,14 +10110,14 @@ const Ii = ({
10108
10110
  a.announcementContent,
10109
10111
  /* @__PURE__ */ O("span", { "aria-hidden": "true", children: " *" })
10110
10112
  ] }),
10111
- id: i,
10113
+ id: r,
10112
10114
  messages: [
10113
- ...r.contentMessages,
10115
+ ...i.contentMessages,
10114
10116
  { text: a.required, type: "screenreader-only" }
10115
10117
  ],
10116
10118
  children: p({
10117
- onChange: r.onMessageChange,
10118
- id: i,
10119
+ onChange: i.onMessageChange,
10120
+ id: r,
10119
10121
  disabled: t,
10120
10122
  elementRef: d
10121
10123
  })
@@ -10126,12 +10128,12 @@ const Ii = ({
10126
10128
  "data-testid": "announcement-content-input",
10127
10129
  label: a.announcementContent,
10128
10130
  required: !0,
10129
- value: r.message,
10130
- onChange: (f) => r.onMessageChange(f.target.value),
10131
+ value: i.message,
10132
+ onChange: (f) => i.onMessageChange(f.target.value),
10131
10133
  textareaRef: (f) => {
10132
- r.messageRef.current = f;
10134
+ i.messageRef.current = f;
10133
10135
  },
10134
- messages: r.contentMessages,
10136
+ messages: i.contentMessages,
10135
10137
  height: "16rem",
10136
10138
  maxHeight: "16rem",
10137
10139
  disabled: t
@@ -10141,15 +10143,15 @@ const Ii = ({
10141
10143
  Zc,
10142
10144
  {
10143
10145
  courses: o,
10144
- selectedCourseIds: r.selectedCourseIds,
10145
- onChange: r.onCourseChange,
10146
+ selectedCourseIds: i.selectedCourseIds,
10147
+ onChange: i.onCourseChange,
10146
10148
  renderLabel: a.coursesPublished,
10147
10149
  isRequired: !0,
10148
10150
  maxSelections: qc,
10149
- interaction: r.interaction,
10150
- messages: r.courseMessages,
10151
+ interaction: i.interaction,
10152
+ messages: i.courseMessages,
10151
10153
  inputRef: (f) => {
10152
- r.courseInputRef.current = f;
10154
+ i.courseInputRef.current = f;
10153
10155
  },
10154
10156
  "data-testid": "announcement-course-select"
10155
10157
  }
@@ -10178,8 +10180,8 @@ const Ii = ({
10178
10180
  legendLabel: a.announcementStartDateAndTime,
10179
10181
  dateLabel: a.announcementStartDate,
10180
10182
  timeLabel: a.announcementStartTime,
10181
- field: r.startField,
10182
- interaction: r.interaction
10183
+ field: i.startField,
10184
+ interaction: i.interaction
10183
10185
  }
10184
10186
  )
10185
10187
  }
@@ -10203,9 +10205,9 @@ const Ii = ({
10203
10205
  legendLabel: a.announcementEndDateAndTime,
10204
10206
  dateLabel: a.announcementEndDate,
10205
10207
  timeLabel: a.announcementEndTime,
10206
- field: r.endField,
10207
- interaction: r.interaction,
10208
- dateMessages: r.endDateMessages
10208
+ field: i.endField,
10209
+ interaction: i.interaction,
10210
+ dateMessages: i.endDateMessages
10209
10211
  }
10210
10212
  )
10211
10213
  }
@@ -10219,8 +10221,8 @@ const Ii = ({
10219
10221
  {
10220
10222
  name: "announcement-options",
10221
10223
  description: a.announcementOptions,
10222
- onChange: r.onCheckboxGroupChange,
10223
- value: r.checkboxValue,
10224
+ onChange: i.onCheckboxGroupChange,
10225
+ value: i.checkboxValue,
10224
10226
  disabled: t,
10225
10227
  children: [
10226
10228
  /* @__PURE__ */ O(
@@ -10254,7 +10256,7 @@ const Ii = ({
10254
10256
  {
10255
10257
  "data-testid": "announcement-cancel-button",
10256
10258
  onClick: q,
10257
- interaction: r.interaction,
10259
+ interaction: i.interaction,
10258
10260
  children: a.cancel
10259
10261
  }
10260
10262
  ) }),
@@ -10262,9 +10264,9 @@ const Ii = ({
10262
10264
  G0,
10263
10265
  {
10264
10266
  "data-testid": "announcement-send-button",
10265
- onClick: r.handleSubmit,
10267
+ onClick: i.handleSubmit,
10266
10268
  color: "primary",
10267
- interaction: r.interaction,
10269
+ interaction: i.interaction,
10268
10270
  children: t ? a.announcementSending : a.announcementSend
10269
10271
  }
10270
10272
  ) })
@@ -10278,7 +10280,7 @@ const Ii = ({
10278
10280
  renderMessageEditor: M,
10279
10281
  ...t
10280
10282
  }) => {
10281
- const { translations: o, translate: z } = b0(), { notify: c } = h0(), [p, a] = V([]), [n, s] = V(!1), { courses: u, isLoading: i, error: r, refetch: d } = yi(), { mutate: q, isPending: f } = Li(), A = Z(
10283
+ const { translations: o, translate: z } = b0(), { notify: c } = h0(), [p, a] = V([]), [n, s] = V(!1), { courses: u, isLoading: r, error: i, refetch: d } = yi(), { mutate: q, isPending: f } = Li(), A = Z(
10282
10284
  (W) => {
10283
10285
  q(W, {
10284
10286
  onSuccess: (h) => {
@@ -10299,7 +10301,7 @@ const Ii = ({
10299
10301
  t1,
10300
10302
  {
10301
10303
  ...t,
10302
- error: r ? o.failedToLoadCourses : null,
10304
+ error: i ? o.failedToLoadCourses : null,
10303
10305
  onRetry: d,
10304
10306
  children: /* @__PURE__ */ X(sc, { theme: Jc, children: [
10305
10307
  /* @__PURE__ */ X(L, { direction: "column", gap: "medium", children: [
@@ -10312,7 +10314,7 @@ const Ii = ({
10312
10314
  renderLabel: o.coursesPublished,
10313
10315
  isRequired: !0,
10314
10316
  maxSelections: qc,
10315
- isLoading: i
10317
+ isLoading: r
10316
10318
  }
10317
10319
  ),
10318
10320
  /* @__PURE__ */ O(
@@ -10674,16 +10676,16 @@ async function g2(e, b) {
10674
10676
  credentials: "same-origin",
10675
10677
  signal: p
10676
10678
  });
10677
- let i;
10678
- const r = u.headers.get("content-type"), d = u.headers.get("content-length");
10679
- if (u.status === 204 || d === "0" ? i = null : r != null && r.includes("application/json") ? i = await u.json() : i = await u.text(), !u.ok)
10680
- throw new ub(`HTTP ${u.status}: ${u.statusText}`, u, i);
10681
- const q = b.safeParse(i);
10679
+ let r;
10680
+ const i = u.headers.get("content-type"), d = u.headers.get("content-length");
10681
+ if (u.status === 204 || d === "0" ? r = null : i != null && i.includes("application/json") ? r = await u.json() : r = await u.text(), !u.ok)
10682
+ throw new ub(`HTTP ${u.status}: ${u.statusText}`, u, r);
10683
+ const q = b.safeParse(r);
10682
10684
  if (!q.success)
10683
10685
  throw new ub(
10684
10686
  `Response validation failed: ${q.error.message}`,
10685
10687
  u,
10686
- i
10688
+ r
10687
10689
  );
10688
10690
  const f = u.headers.get("link"), A = ta(f);
10689
10691
  return {
@@ -12346,10 +12348,10 @@ class I0 extends f0 {
12346
12348
  return o.common.async ? Promise.resolve().then(async () => {
12347
12349
  const n = [];
12348
12350
  for (const s of a) {
12349
- const u = await s.key, i = await s.value;
12351
+ const u = await s.key, r = await s.value;
12350
12352
  n.push({
12351
12353
  key: u,
12352
- value: i,
12354
+ value: r,
12353
12355
  alwaysSet: s.alwaysSet
12354
12356
  });
12355
12357
  }
@@ -13012,11 +13014,11 @@ class K2 extends f0 {
13012
13014
  if (this._def.returns instanceof te) {
13013
13015
  const p = this;
13014
13016
  return n1(async function(...a) {
13015
- const n = new O1([]), s = await p._def.args.parseAsync(a, z).catch((r) => {
13016
- throw n.addIssue(t(a, r)), n;
13017
+ const n = new O1([]), s = await p._def.args.parseAsync(a, z).catch((i) => {
13018
+ throw n.addIssue(t(a, i)), n;
13017
13019
  }), u = await Reflect.apply(c, this, s);
13018
- return await p._def.returns._def.type.parseAsync(u, z).catch((r) => {
13019
- throw n.addIssue(o(u, r)), n;
13020
+ return await p._def.returns._def.type.parseAsync(u, z).catch((i) => {
13021
+ throw n.addIssue(o(u, i)), n;
13020
13022
  });
13021
13023
  });
13022
13024
  } else {
@@ -13724,7 +13726,7 @@ const sO = {
13724
13726
  ontimeAmount: a,
13725
13727
  speedGraderLink: n
13726
13728
  }) => {
13727
- const { translate: s, translations: u } = b0(), i = [
13729
+ const { translate: s, translations: u } = b0(), r = [
13728
13730
  {
13729
13731
  type: "late",
13730
13732
  amount: Number(c)
@@ -13737,10 +13739,10 @@ const sO = {
13737
13739
  type: "ontime",
13738
13740
  amount: Number(a)
13739
13741
  }
13740
- ].filter((d) => d.amount > 0), r = /* @__PURE__ */ O(s1, { level: "h3", variant: "titleCardMini", color: "primary", children: b });
13742
+ ].filter((d) => d.amount > 0), i = /* @__PURE__ */ O(s1, { level: "h3", variant: "titleCardMini", color: "primary", children: b });
13741
13743
  return /* @__PURE__ */ X(L, { as: "div", gap: "small", alignItems: "start", children: [
13742
13744
  /* @__PURE__ */ O(L.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ X(L, { direction: "column", gap: "x-small", children: [
13743
- /* @__PURE__ */ O(L.Item, { overflowX: "visible", overflowY: "visible", children: M ? /* @__PURE__ */ O(P0, { href: M, "data-testid": `educator-todo-link-${e}`, children: r }) : r }),
13745
+ /* @__PURE__ */ O(L.Item, { overflowX: "visible", overflowY: "visible", children: M ? /* @__PURE__ */ O(P0, { href: M, "data-testid": `educator-todo-link-${e}`, children: i }) : i }),
13744
13746
  /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ X(L, { gap: "x-small", alignItems: "center", wrap: "wrap", children: [
13745
13747
  t && /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(
13746
13748
  Lt,
@@ -13751,7 +13753,7 @@ const sO = {
13751
13753
  overrideCode: o
13752
13754
  }
13753
13755
  ) }),
13754
- i.map((d) => /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(uO, { type: d.type, amount: d.amount }) }, `${d.type}-${d.amount}`))
13756
+ r.map((d) => /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(uO, { type: d.type, amount: d.amount }) }, `${d.type}-${d.amount}`))
13755
13757
  ] }) }),
13756
13758
  typeof z == "number" && /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(P, { size: "small", color: "secondary", children: s("educatorTodoListCompletionRate", {
13757
13759
  rate: z
@@ -13989,25 +13991,25 @@ function NO({
13989
13991
  }) {
13990
13992
  const M = q1(), t = z1(!1), o = z1({}), z = Fn(e);
13991
13993
  k0(() => {
13992
- const c = (r) => {
13993
- t.current = !0, r(), t.current = !1;
13994
+ const c = (i) => {
13995
+ t.current = !0, i(), t.current = !1;
13994
13996
  };
13995
13997
  let p = Je.get(b);
13996
13998
  p || (p = { channel: typeof BroadcastChannel < "u" ? new BroadcastChannel(b) : null, count: 0 }, Je.set(b, p)), p.count++;
13997
- const a = p.channel, n = M.getQueryCache(), s = (r, d) => {
13999
+ const a = p.channel, n = M.getQueryCache(), s = (i, d) => {
13998
14000
  const q = Date.now(), f = o.current[z] || 0;
13999
- if (r === "updated" && q - f < 100) return;
14001
+ if (i === "updated" && q - f < 100) return;
14000
14002
  o.current[z] = q;
14001
- const A = r === "updated" && d !== void 0 ? { type: "updated", queryHash: z, state: d } : { type: "removed", queryHash: z };
14003
+ const A = i === "updated" && d !== void 0 ? { type: "updated", queryHash: z, state: d } : { type: "removed", queryHash: z };
14002
14004
  a && a.postMessage(A);
14003
- }, u = n.subscribe((r) => {
14005
+ }, u = n.subscribe((i) => {
14004
14006
  if (t.current) return;
14005
14007
  const {
14006
14008
  query: { queryHash: d, state: q }
14007
- } = r;
14008
- d === z && (r.type === "updated" && r.action.type === "success" && s("updated", structuredClone(q)), r.type === "removed" && s("removed"));
14009
- }), i = (r) => {
14010
- const d = r.data;
14009
+ } = i;
14010
+ d === z && (i.type === "updated" && i.action.type === "success" && s("updated", structuredClone(q)), i.type === "removed" && s("removed"));
14011
+ }), r = (i) => {
14012
+ const d = i.data;
14011
14013
  d.queryHash === z && c(() => {
14012
14014
  const q = n.get(d.queryHash);
14013
14015
  if (q)
@@ -14017,11 +14019,11 @@ function NO({
14017
14019
  } else d.type === "removed" && n.remove(q);
14018
14020
  });
14019
14021
  };
14020
- return a && a.addEventListener("message", i), () => {
14021
- var r;
14022
- u(), a && a.removeEventListener("message", i);
14022
+ return a && a.addEventListener("message", r), () => {
14023
+ var i;
14024
+ u(), a && a.removeEventListener("message", r);
14023
14025
  const d = Je.get(b);
14024
- d.count--, d.count === 0 && ((r = d.channel) == null || r.close(), Je.delete(b));
14026
+ d.count--, d.count === 0 && ((i = d.channel) == null || i.close(), Je.delete(b));
14025
14027
  };
14026
14028
  }, [M, b, z]);
14027
14029
  }
@@ -14083,16 +14085,16 @@ function TO(e, b, M) {
14083
14085
  });
14084
14086
  return (z = p.legacyNode) != null && z.conversationsConnection ? p.legacyNode.conversationsConnection.nodes.map(
14085
14087
  (s) => {
14086
- const u = s.conversation, i = u.conversationMessagesConnection.nodes[0], r = u.conversationParticipantsConnection.nodes.map(
14088
+ const u = s.conversation, r = u.conversationMessagesConnection.nodes[0], i = u.conversationParticipantsConnection.nodes.map(
14087
14089
  (q) => q.user
14088
14090
  ).filter(
14089
14091
  (q) => q !== null && q._id !== b
14090
- ), d = (i == null ? void 0 : i.author) || r[0];
14092
+ ), d = (r == null ? void 0 : r.author) || i[0];
14091
14093
  return {
14092
14094
  id: u._id,
14093
14095
  subject: u.subject || M,
14094
- lastMessageAt: (i == null ? void 0 : i.createdAt) || u.updatedAt,
14095
- messagePreview: i != null && i.body ? BO(i.body, 80) : "",
14096
+ lastMessageAt: (r == null ? void 0 : r.createdAt) || u.updatedAt,
14097
+ messagePreview: r != null && r.body ? BO(r.body, 80) : "",
14096
14098
  workflowState: s.workflowState === "unread" ? "unread" : "read",
14097
14099
  conversationUrl: `/conversations/${u._id}`,
14098
14100
  participants: d ? [
@@ -14115,7 +14117,7 @@ function _O(e = {}) {
14115
14117
  o,
14116
14118
  z,
14117
14119
  t.noSubject
14118
- ), { data: n, isLoading: s, isRefetching: u, error: i, refetch: r } = p1({
14120
+ ), { data: n, isLoading: s, isRefetching: u, error: r, refetch: i } = p1({
14119
14121
  ...ee(p, a1.STALE_TIME.STATISTICS, z),
14120
14122
  queryFn: () => a(b, M),
14121
14123
  retry: a1.RETRY.DISABLED,
@@ -14130,8 +14132,8 @@ function _O(e = {}) {
14130
14132
  data: n,
14131
14133
  isLoading: s,
14132
14134
  isRefetching: u,
14133
- error: i,
14134
- refetch: r
14135
+ error: r,
14136
+ refetch: i
14135
14137
  };
14136
14138
  }
14137
14139
  const XO = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`, Fz = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(P, { title: e.length > b ? e : void 0, wrap: "break-word", size: "x-small", children: XO(e, b) }), wO = ({ message: e }) => {
@@ -14189,7 +14191,7 @@ const XO = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`
14189
14191
  refetch: s
14190
14192
  } = _O({ limit: 5, filter: o }), u = (f) => {
14191
14193
  z(f);
14192
- }, i = () => /* @__PURE__ */ X(
14194
+ }, r = () => /* @__PURE__ */ X(
14193
14195
  N0,
14194
14196
  {
14195
14197
  renderLabel: t.inboxFilterLabel,
@@ -14203,7 +14205,7 @@ const XO = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`
14203
14205
  /* @__PURE__ */ O(N0.Option, { id: "all", value: "all", children: t.all })
14204
14206
  ]
14205
14207
  }
14206
- ), r = () => c.length === 0 ? /* @__PURE__ */ O(D, { as: "div", margin: "large 0", children: /* @__PURE__ */ O(P, { color: "secondary", size: "medium", "data-testid": "no-messages-message", children: t.noMessages }) }) : /* @__PURE__ */ O(D, { as: "div", children: /* @__PURE__ */ O(H0, { isUnstyled: !0, margin: "0", children: c.map((f) => /* @__PURE__ */ O(H0.Item, { margin: "0", children: /* @__PURE__ */ O(wO, { message: f }) }, f.id)) }) }), d = () => /* @__PURE__ */ O(D, { as: "div", textAlign: "center", children: /* @__PURE__ */ O(P0, { href: "/conversations", isWithinText: !1, "data-testid": "show-all-messages-link", children: /* @__PURE__ */ O(P, { size: "small", children: t.showAllMessages }) }) }), q = () => {
14208
+ ), i = () => c.length === 0 ? /* @__PURE__ */ O(D, { as: "div", margin: "large 0", children: /* @__PURE__ */ O(P, { color: "secondary", size: "medium", "data-testid": "no-messages-message", children: t.noMessages }) }) : /* @__PURE__ */ O(D, { as: "div", children: /* @__PURE__ */ O(H0, { isUnstyled: !0, margin: "0", children: c.map((f) => /* @__PURE__ */ O(H0.Item, { margin: "0", children: /* @__PURE__ */ O(wO, { message: f }) }, f.id)) }) }), d = () => /* @__PURE__ */ O(D, { as: "div", textAlign: "center", children: /* @__PURE__ */ O(P0, { href: "/conversations", isWithinText: !1, "data-testid": "show-all-messages-link", children: /* @__PURE__ */ O(P, { size: "small", children: t.showAllMessages }) }) }), q = () => {
14207
14209
  s();
14208
14210
  };
14209
14211
  return /* @__PURE__ */ O(
@@ -14222,8 +14224,8 @@ const XO = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`
14222
14224
  ariaLabel: t.loadingMessagesAriaLabel
14223
14225
  },
14224
14226
  children: /* @__PURE__ */ X(L, { direction: "column", gap: "small", children: [
14225
- /* @__PURE__ */ O(L.Item, { overflowX: "visible", overflowY: "visible", children: i() }),
14226
- /* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: r() })
14227
+ /* @__PURE__ */ O(L.Item, { overflowX: "visible", overflowY: "visible", children: r() }),
14228
+ /* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: i() })
14227
14229
  ] })
14228
14230
  }
14229
14231
  );
@@ -14301,16 +14303,16 @@ const XO = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`
14301
14303
  bio: null,
14302
14304
  course_name: u.course.name,
14303
14305
  course_code: u.course.courseCode,
14304
- enrollments: s.enrollments.map((i) => ({
14305
- id: `${s.user._id}-${i.course._id}`,
14306
+ enrollments: s.enrollments.map((r) => ({
14307
+ id: `${s.user._id}-${r.course._id}`,
14306
14308
  user_id: s.user._id,
14307
- course_id: i.course._id,
14308
- course_name: i.course.name,
14309
- course_code: i.course.courseCode,
14310
- type: i.type,
14311
- role: i.role.name,
14312
- role_id: i.role._id,
14313
- enrollment_state: i.enrollmentState
14309
+ course_id: r.course._id,
14310
+ course_name: r.course.name,
14311
+ course_code: r.course.courseCode,
14312
+ type: r.type,
14313
+ role: r.role.name,
14314
+ role_id: r.role._id,
14315
+ enrollment_state: r.enrollmentState
14314
14316
  }))
14315
14317
  };
14316
14318
  }),
@@ -14352,9 +14354,9 @@ async function IO(e, b, M, t, o, z) {
14352
14354
  function DO(e = {}) {
14353
14355
  const { courseIds: b = [], limit: M = 5, accountId: t, enrollmentTypes: o } = e, z = q1(), [c, p] = V(0), [a, n] = V(t), { observedUserId: s } = x0(), {
14354
14356
  executeQuery: u,
14355
- currentUserId: i,
14356
- getAccount: r
14357
- } = h0(), d = t ? r(t) : void 0, q = (d == null ? void 0 : d.executeQuery) ?? u, f = (d == null ? void 0 : d.currentUserId) ?? i, A = M, W = o == null ? void 0 : o.join(",");
14357
+ currentUserId: r,
14358
+ getAccount: i
14359
+ } = h0(), d = t ? i(t) : void 0, q = (d == null ? void 0 : d.executeQuery) ?? u, f = (d == null ? void 0 : d.currentUserId) ?? r, A = M, W = o == null ? void 0 : o.join(",");
14358
14360
  a !== t && (n(t), p(0));
14359
14361
  const h = [
14360
14362
  ro,
@@ -14457,12 +14459,12 @@ const PO = ({
14457
14459
  e.id,
14458
14460
  "selectedCourse",
14459
14461
  "all"
14460
- ), [u, i] = c1(
14462
+ ), [u, r] = c1(
14461
14463
  e.id,
14462
14464
  "selectedRole",
14463
14465
  "all",
14464
14466
  kO
14465
- ), [r, d] = V(null), [q, f] = V(0), A = a0(() => n === "all" ? [] : [n], [n]), W = a0(() => {
14467
+ ), [i, d] = V(null), [q, f] = V(0), A = a0(() => n === "all" ? [] : [n], [n]), W = a0(() => {
14466
14468
  if (u !== "all")
14467
14469
  return u === "teacher" ? ["TeacherEnrollment"] : ["TaEnrollment"];
14468
14470
  }, [u]), {
@@ -14494,9 +14496,9 @@ const PO = ({
14494
14496
  [s]
14495
14497
  ), $ = Z(
14496
14498
  (H, Q) => {
14497
- Q.value && typeof Q.value == "string" && i(Q.value);
14499
+ Q.value && typeof Q.value == "string" && r(Q.value);
14498
14500
  },
14499
- [i]
14501
+ [r]
14500
14502
  );
14501
14503
  return /* @__PURE__ */ X(
14502
14504
  t1,
@@ -14606,11 +14608,11 @@ const PO = ({
14606
14608
  }
14607
14609
  ) }, H.id)) }) }) }) })
14608
14610
  ] }),
14609
- c && r && c({
14611
+ c && i && c({
14610
14612
  key: q,
14611
- contextCode: r.contextCode,
14612
- recipients: [r],
14613
- title: a("sendMessageToName", { name: r.displayName }),
14613
+ contextCode: i.contextCode,
14614
+ recipients: [i],
14615
+ title: a("sendMessageToName", { name: i.displayName }),
14614
14616
  onRequestClose: C
14615
14617
  })
14616
14618
  ]
@@ -14748,7 +14750,7 @@ const GO = ({
14748
14750
  submittedNotGradedCount: p,
14749
14751
  missingSubmissionsCount: a,
14750
14752
  submissionsDueCount: n
14751
- } = e, s = a + n, u = c + p + s, i = u > 0 ? Math.round((c + p) / u * 100) : 0, r = M("courseProgressCompletion", { percent: i, total: u }), d = ((q = t == null ? void 0 : t.custom_colors) == null ? void 0 : q[`course_${o}`]) ?? Uc.background;
14753
+ } = e, s = a + n, u = c + p + s, r = u > 0 ? Math.round((c + p) / u * 100) : 0, i = M("courseProgressCompletion", { percent: r, total: u }), d = ((q = t == null ? void 0 : t.custom_colors) == null ? void 0 : q[`course_${o}`]) ?? Uc.background;
14752
14754
  return /* @__PURE__ */ O(D, { as: "div", "data-testid": `course-progress-item-${o}`, children: /* @__PURE__ */ O(
14753
14755
  D,
14754
14756
  {
@@ -14812,7 +14814,7 @@ const GO = ({
14812
14814
  size: "small",
14813
14815
  color: "secondary",
14814
14816
  "data-testid": `course-progress-completion-${o}`,
14815
- children: r
14817
+ children: i
14816
14818
  }
14817
14819
  ) })
14818
14820
  ] })
@@ -14851,7 +14853,7 @@ const GO = ({
14851
14853
  },
14852
14854
  children: [
14853
14855
  /* @__PURE__ */ O(D, { as: "div", padding: "small small 0 small", children: /* @__PURE__ */ O(FO, {}) }),
14854
- u ? /* @__PURE__ */ O(D, { as: "div", padding: "medium", textAlign: "center", children: /* @__PURE__ */ O(P, { size: "medium", "data-testid": "no-courses-message", children: t.noCoursesFound }) }) : /* @__PURE__ */ O(D, { as: "div", children: o == null ? void 0 : o.map((i) => /* @__PURE__ */ O(HO, { course: i }, i.courseId)) })
14856
+ u ? /* @__PURE__ */ O(D, { as: "div", padding: "medium", textAlign: "center", children: /* @__PURE__ */ O(P, { size: "medium", "data-testid": "no-courses-message", children: t.noCoursesFound }) }) : /* @__PURE__ */ O(D, { as: "div", children: o == null ? void 0 : o.map((r) => /* @__PURE__ */ O(HO, { course: r }, r.courseId)) })
14855
14857
  ]
14856
14858
  }
14857
14859
  );
@@ -14994,8 +14996,8 @@ function KO(e = {}) {
14994
14996
  }, {
14995
14997
  data: s,
14996
14998
  isLoading: u,
14997
- error: i,
14998
- refetch: r
14999
+ error: r,
15000
+ refetch: i
14999
15001
  } = p1({
15000
15002
  queryKey: a,
15001
15003
  queryFn: n,
@@ -15010,7 +15012,7 @@ function KO(e = {}) {
15010
15012
  p(0);
15011
15013
  }, []), W = Z(async () => (await o.invalidateQueries({
15012
15014
  queryKey: [jz]
15013
- }), r()), [o, r]);
15015
+ }), i()), [o, i]);
15014
15016
  return {
15015
15017
  currentPage: s,
15016
15018
  currentPageIndex: c,
@@ -15020,7 +15022,7 @@ function KO(e = {}) {
15020
15022
  resetPagination: A,
15021
15023
  refetch: W,
15022
15024
  isLoading: u,
15023
- error: i,
15025
+ error: r,
15024
15026
  pageSize: z
15025
15027
  };
15026
15028
  }
@@ -15089,15 +15091,15 @@ const QO = (e, b, M) => {
15089
15091
  currentPage: n,
15090
15092
  currentPageIndex: s,
15091
15093
  totalPages: u,
15092
- goToPage: i,
15093
- isLoading: r,
15094
+ goToPage: r,
15095
+ isLoading: i,
15094
15096
  error: d,
15095
15097
  refetch: q
15096
15098
  } = KO({
15097
15099
  pageSize: JO,
15098
15100
  courseFilter: p === "all" ? void 0 : p
15099
- }), f = M || (d ? d.message : null), A = M ? !1 : b || r, W = (n == null ? void 0 : n.submissions) || [], h = (g) => {
15100
- i(g);
15101
+ }), f = M || (d ? d.message : null), A = M ? !1 : b || i, W = (n == null ? void 0 : n.submissions) || [], h = (g) => {
15102
+ r(g);
15101
15103
  }, m = (g, y) => {
15102
15104
  a(y.value);
15103
15105
  }, l = () => {
@@ -17587,8 +17589,8 @@ function KA(e, b, M, t, o) {
17587
17589
  return o.relativeTime(b || 1, !!M, e, t);
17588
17590
  }
17589
17591
  function QA(e, b, M, t) {
17590
- var o = x1(e).abs(), z = e2(o.as("s")), c = e2(o.as("m")), p = e2(o.as("h")), a = e2(o.as("d")), n = e2(o.as("M")), s = e2(o.as("w")), u = e2(o.as("y")), i = z <= M.ss && ["s", z] || z < M.s && ["ss", z] || c <= 1 && ["m"] || c < M.m && ["mm", c] || p <= 1 && ["h"] || p < M.h && ["hh", p] || a <= 1 && ["d"] || a < M.d && ["dd", a];
17591
- return M.w != null && (i = i || s <= 1 && ["w"] || s < M.w && ["ww", s]), i = i || n <= 1 && ["M"] || n < M.M && ["MM", n] || u <= 1 && ["y"] || ["yy", u], i[2] = b, i[3] = +e > 0, i[4] = t, KA.apply(null, i);
17592
+ var o = x1(e).abs(), z = e2(o.as("s")), c = e2(o.as("m")), p = e2(o.as("h")), a = e2(o.as("d")), n = e2(o.as("M")), s = e2(o.as("w")), u = e2(o.as("y")), r = z <= M.ss && ["s", z] || z < M.s && ["ss", z] || c <= 1 && ["m"] || c < M.m && ["mm", c] || p <= 1 && ["h"] || p < M.h && ["hh", p] || a <= 1 && ["d"] || a < M.d && ["dd", a];
17593
+ return M.w != null && (r = r || s <= 1 && ["w"] || s < M.w && ["ww", s]), r = r || n <= 1 && ["M"] || n < M.M && ["MM", n] || u <= 1 && ["y"] || ["yy", u], r[2] = b, r[3] = +e > 0, r[4] = t, KA.apply(null, r);
17592
17594
  }
17593
17595
  function ZA(e) {
17594
17596
  return e === void 0 ? e2 : typeof e == "function" ? (e2 = e, !0) : !1;
@@ -17730,20 +17732,20 @@ function o4() {
17730
17732
  (!b || typeof b.version != "string") && B0("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
17731
17733
  var n = b.version.split("."), s = +n[0], u = +n[1];
17732
17734
  (s < 2 || s === 2 && u < 6) && B0("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + b.version + ". See momentjs.com");
17733
- function i(N) {
17735
+ function r(N) {
17734
17736
  return N > 96 ? N - 87 : N > 64 ? N - 29 : N - 48;
17735
17737
  }
17736
- function r(N) {
17738
+ function i(N) {
17737
17739
  var S = 0, I = N.split("."), j = I[0], O0 = I[1] || "", L0 = 1, r0, M0 = 0, w0 = 1;
17738
17740
  for (N.charCodeAt(0) === 45 && (S = 1, w0 = -1), S; S < j.length; S++)
17739
- r0 = i(j.charCodeAt(S)), M0 = 60 * M0 + r0;
17741
+ r0 = r(j.charCodeAt(S)), M0 = 60 * M0 + r0;
17740
17742
  for (S = 0; S < O0.length; S++)
17741
- L0 = L0 / 60, r0 = i(O0.charCodeAt(S)), M0 += r0 * L0;
17743
+ L0 = L0 / 60, r0 = r(O0.charCodeAt(S)), M0 += r0 * L0;
17742
17744
  return M0 * w0;
17743
17745
  }
17744
17746
  function d(N) {
17745
17747
  for (var S = 0; S < N.length; S++)
17746
- N[S] = r(N[S]);
17748
+ N[S] = i(N[S]);
17747
17749
  }
17748
17750
  function q(N, S) {
17749
17751
  for (var I = 0; I < S; I++)
@@ -17949,7 +17951,7 @@ function o4() {
17949
17951
  var S = Array.prototype.slice.call(arguments, 0, -1), I = arguments[arguments.length - 1], j = b.utc.apply(null, S), O0;
17950
17952
  return !b.isMoment(N) && s0(j) && (O0 = $(I)) && j.add(O0.parse(j), "minutes"), j.tz(I), j;
17951
17953
  }
17952
- A0.version = M, A0.dataVersion = "", A0._zones = t, A0._links = o, A0._names = c, A0._countries = z, A0.add = x, A0.link = p0, A0.load = c0, A0.zone = $, A0.zoneExists = o0, A0.guess = w, A0.names = H, A0.Zone = W, A0.unpack = A, A0.unpackBase60 = r, A0.needsOffset = s0, A0.moveInvalidForward = !0, A0.moveAmbiguousForward = !1, A0.countries = Q, A0.zonesForCountry = Y0;
17954
+ A0.version = M, A0.dataVersion = "", A0._zones = t, A0._links = o, A0._names = c, A0._countries = z, A0.add = x, A0.link = p0, A0.load = c0, A0.zone = $, A0.zoneExists = o0, A0.guess = w, A0.names = H, A0.Zone = W, A0.unpack = A, A0.unpackBase60 = i, A0.needsOffset = s0, A0.moveInvalidForward = !0, A0.moveAmbiguousForward = !1, A0.countries = Q, A0.zonesForCountry = Y0;
17953
17955
  var D0 = b.fn;
17954
17956
  b.tz = A0, b.defaultZone = null, b.updateOffset = function(N, S) {
17955
17957
  var I = b.defaultZone, j;
@@ -18016,31 +18018,31 @@ const U2 = /* @__PURE__ */ hc(a4), Mb = 255, FM = 1e4, O4 = ({
18016
18018
  mode: p = "create",
18017
18019
  initialValues: a = null
18018
18020
  }) => {
18019
- const { translations: n, translate: s } = b0(), u = p === "edit", [i, r] = V(""), [d, q] = V(U2.tz(c).endOf("day")), [f, A] = V(""), [W, h] = V(void 0), [m, l] = V(""), [R, g] = V(""), [y, B] = V(""), _ = () => {
18021
+ const { translations: n, translate: s } = b0(), u = p === "edit", [r, i] = V(""), [d, q] = V(U2.tz(c).endOf("day")), [f, A] = V(""), [W, h] = V(void 0), [m, l] = V(""), [R, g] = V(""), [y, B] = V(""), _ = () => {
18020
18022
  let G = !1;
18021
- i.trim() ? i.length > Mb ? (l(s("Title must be %{max} characters or less", { max: Mb })), G = !0) : l("") : (l(n.titleIsRequired), G = !0), !d || !d.isValid() ? (g(n.dateIsRequired), G = !0) : g(""), f.length > FM ? (B(
18023
+ r.trim() ? r.length > Mb ? (l(s("Title must be %{max} characters or less", { max: Mb })), G = !0) : l("") : (l(n.titleIsRequired), G = !0), !d || !d.isValid() ? (g(n.dateIsRequired), G = !0) : g(""), f.length > FM ? (B(
18022
18024
  s("Details must be %{max} characters or less", { max: FM })
18023
18025
  ), G = !0) : B(""), !G && (M({
18024
- title: i.trim(),
18026
+ title: r.trim(),
18025
18027
  todo_date: (d == null ? void 0 : d.toISOString()) || (/* @__PURE__ */ new Date()).toISOString(),
18026
18028
  details: f.trim() || void 0,
18027
18029
  course_id: W
18028
18030
  }), u || v());
18029
18031
  }, v = () => {
18030
- r(""), q(U2.tz(c).endOf("day")), A(""), h(void 0), l(""), g(""), B("");
18032
+ i(""), q(U2.tz(c).endOf("day")), A(""), h(void 0), l(""), g(""), B("");
18031
18033
  }, T = () => {
18032
18034
  v(), b();
18033
18035
  };
18034
18036
  k0(() => {
18035
18037
  if (e) {
18036
18038
  if (u && a) {
18037
- r(a.title);
18039
+ i(a.title);
18038
18040
  const G = a.todo_date ? U2.tz(a.todo_date, c) : null;
18039
18041
  q(
18040
18042
  G && G.isValid() ? G : U2.tz(c).endOf("day")
18041
18043
  ), A(a.details || ""), h(a.course_id);
18042
18044
  } else
18043
- r(""), q(U2.tz(c).endOf("day")), A(""), h(void 0);
18045
+ i(""), q(U2.tz(c).endOf("day")), A(""), h(void 0);
18044
18046
  l(""), g(""), B("");
18045
18047
  }
18046
18048
  }, [e, u, a, c]);
@@ -18050,7 +18052,7 @@ const U2 = /* @__PURE__ */ hc(a4), Mb = 255, FM = 1e4, O4 = ({
18050
18052
  }, C = (G, d0) => {
18051
18053
  const Y0 = typeof d0.value == "string" ? d0.value : void 0;
18052
18054
  Y0 && h(Y0 === "none" ? void 0 : Y0);
18053
- }, x = (G, d0) => G ? s("%{date} is not a valid date.", { date: G }) : n.youMustProvideDateTime, $ = i.trim().length > 0 && d && d.isValid(), H = {
18055
+ }, x = (G, d0) => G ? s("%{date} is not a valid date.", { date: G }) : n.youMustProvideDateTime, $ = r.trim().length > 0 && d && d.isValid(), H = {
18054
18056
  value: "none",
18055
18057
  label: n.optionalAddCourse
18056
18058
  }, Q = a0(
@@ -18090,9 +18092,9 @@ const U2 = /* @__PURE__ */ hc(a4), Mb = 255, FM = 1e4, O4 = ({
18090
18092
  "data-testid": "create-todo-title-input",
18091
18093
  renderLabel: n.title,
18092
18094
  isRequired: !0,
18093
- value: i,
18095
+ value: r,
18094
18096
  onChange: (G, d0) => {
18095
- r(d0), m && d0.trim() && d0.length <= Mb && l("");
18097
+ i(d0), m && d0.trim() && d0.length <= Mb && l("");
18096
18098
  },
18097
18099
  messages: m ? [{ type: "error", text: m }] : [],
18098
18100
  interaction: t ? "disabled" : "enabled",
@@ -18311,7 +18313,7 @@ async function h4(e, b) {
18311
18313
  }
18312
18314
  const Vb = "plannerItems";
18313
18315
  function m4(e = {}) {
18314
- const { perPage: b = 5, startDate: M, endDate: t, order: o = "asc", filter: z, observedUserId: c } = e, [p, a] = V(0), [n, s] = V([]), [u, i] = V([]), [r, d] = V(!1), q = z1(null), f = a0(() => {
18316
+ const { perPage: b = 5, startDate: M, endDate: t, order: o = "asc", filter: z, observedUserId: c } = e, [p, a] = V(0), [n, s] = V([]), [u, r] = V([]), [i, d] = V(!1), q = z1(null), f = a0(() => {
18315
18317
  const C = {
18316
18318
  per_page: b,
18317
18319
  order: o
@@ -18333,16 +18335,16 @@ function m4(e = {}) {
18333
18335
  placeholderData: ce
18334
18336
  });
18335
18337
  k0(() => {
18336
- A && (s([A.items]), i([A.nextUrl]));
18338
+ A && (s([A.items]), r([A.nextUrl]));
18337
18339
  }, [A]), k0(() => {
18338
18340
  const C = p, x = C - 1;
18339
18341
  if (C >= n.length && x >= 0 && x < u.length && u[x]) {
18340
18342
  const $ = u[x];
18341
- !r && q.current !== C && (q.current = C, d(!0), Jz(f, $).then((H) => {
18343
+ !i && q.current !== C && (q.current = C, d(!0), Jz(f, $).then((H) => {
18342
18344
  s((Q) => {
18343
18345
  const p0 = [...Q];
18344
18346
  return p0[C] = H.items, p0;
18345
- }), i((Q) => {
18347
+ }), r((Q) => {
18346
18348
  const p0 = [...Q];
18347
18349
  return p0[C] = H.nextUrl, p0;
18348
18350
  });
@@ -18351,13 +18353,13 @@ function m4(e = {}) {
18351
18353
  d(!1), q.current = null;
18352
18354
  }));
18353
18355
  }
18354
- }, [p, n.length, u, r, f]);
18356
+ }, [p, n.length, u, i, f]);
18355
18357
  const R = Z((C) => {
18356
18358
  a(C - 1);
18357
18359
  }, []), g = Z(() => {
18358
18360
  a(0);
18359
18361
  }, []), y = Z(() => {
18360
- s([]), i([]), a(0), q.current = null, l();
18362
+ s([]), r([]), a(0), q.current = null, l();
18361
18363
  }, [l]), B = Z(
18362
18364
  (C, x, $) => {
18363
18365
  s(
@@ -18377,7 +18379,7 @@ function m4(e = {}) {
18377
18379
  goToPage: R,
18378
18380
  resetPagination: g,
18379
18381
  isLoading: W,
18380
- isPaginationLoading: (h || r) && n.length > 0,
18382
+ isPaginationLoading: (h || i) && n.length > 0,
18381
18383
  error: m,
18382
18384
  refetch: y,
18383
18385
  updateItemOverride: B
@@ -18488,7 +18490,7 @@ const _4 = ({
18488
18490
  readOnly: t = !1
18489
18491
  }) => {
18490
18492
  var T, w;
18491
- const { translations: o, translate: z } = b0(), { locale: c, timezone: p } = h0(), a = p || Intl.DateTimeFormat().resolvedOptions().timeZone, n = e.plannable_type === "announcement", s = e.plannable_type === "planner_note", u = n ? y4(e.plannable_date, z, c, a) : N4(e.plannable_date, o, z, c, a), i = !n && B4(e.plannable_date), r = !n && T4(e.plannable.lock_at), d = v4(e.plannable_type, o), { toggleComplete: q, isLoading: f } = L4({
18493
+ const { translations: o, translate: z } = b0(), { locale: c, timezone: p } = h0(), a = p || Intl.DateTimeFormat().resolvedOptions().timeZone, n = e.plannable_type === "announcement", s = e.plannable_type === "planner_note", u = n ? y4(e.plannable_date, z, c, a) : N4(e.plannable_date, o, z, c, a), r = !n && B4(e.plannable_date), i = !n && T4(e.plannable.lock_at), d = v4(e.plannable_type, o), { toggleComplete: q, isLoading: f } = L4({
18492
18494
  onSuccess: (C, { item: x }) => {
18493
18495
  b == null || b(x.plannable_id, x.plannable_type, C);
18494
18496
  }
@@ -18562,8 +18564,8 @@ const _4 = ({
18562
18564
  }
18563
18565
  ) }),
18564
18566
  /* @__PURE__ */ O(L.Item, { overflowY: "visible", children: /* @__PURE__ */ X(P, { size: "small", children: [
18565
- m ? /* @__PURE__ */ O(P, { size: "small", color: "success", children: o.excused }) : r ? /* @__PURE__ */ O(P, { size: "small", color: "secondary", children: o.closed }) : u && /* @__PURE__ */ O(P, { size: "small", color: i ? "danger" : "secondary", children: u }),
18566
- (r || u) && _ && /* @__PURE__ */ O(P, { size: "small", color: "secondary", children: " | " }),
18567
+ m ? /* @__PURE__ */ O(P, { size: "small", color: "success", children: o.excused }) : i ? /* @__PURE__ */ O(P, { size: "small", color: "secondary", children: o.closed }) : u && /* @__PURE__ */ O(P, { size: "small", color: r ? "danger" : "secondary", children: u }),
18568
+ (i || u) && _ && /* @__PURE__ */ O(P, { size: "small", color: "secondary", children: " | " }),
18567
18569
  _ && /* @__PURE__ */ O(P, { size: "small", color: "secondary", children: z("%{points} points", { points: B }) })
18568
18570
  ] }) }),
18569
18571
  /* @__PURE__ */ O(L.Item, { margin: "x-small 0 0 0", overflowY: "visible", overflowX: "visible", children: /* @__PURE__ */ O(L, { gap: "small", alignItems: "center", children: /* @__PURE__ */ O(L.Item, { overflowY: "visible", overflowX: "visible", children: f ? /* @__PURE__ */ O(
@@ -18605,12 +18607,12 @@ const w4 = ({
18605
18607
  isEditMode: b = !1,
18606
18608
  dragHandleProps: M
18607
18609
  }) => {
18608
- const { translations: t } = b0(), { locale: o, timezone: z, notify: c } = h0(), [p, a] = V(!1), [n, s] = V(null), [u, i] = c1(
18610
+ const { translations: t } = b0(), { locale: o, timezone: z, notify: c } = h0(), [p, a] = V(!1), [n, s] = V(null), [u, r] = c1(
18609
18611
  e.id,
18610
18612
  "filter",
18611
18613
  "incomplete_items",
18612
18614
  X4
18613
- ), r = a0(() => {
18615
+ ), i = a0(() => {
18614
18616
  const G = /* @__PURE__ */ new Date();
18615
18617
  G.setDate(G.getDate() - 14);
18616
18618
  const d0 = /* @__PURE__ */ new Date();
@@ -18631,8 +18633,8 @@ const w4 = ({
18631
18633
  updateItemOverride: w
18632
18634
  } = m4({
18633
18635
  perPage: 5,
18634
- startDate: r.startDate,
18635
- endDate: r.endDate,
18636
+ startDate: i.startDate,
18637
+ endDate: i.endDate,
18636
18638
  filter: u === "all" ? void 0 : u,
18637
18639
  observedUserId: h
18638
18640
  });
@@ -18697,7 +18699,7 @@ const w4 = ({
18697
18699
  renderLabel: t.filter,
18698
18700
  value: u,
18699
18701
  onChange: (G, { value: d0 }) => {
18700
- i(d0);
18702
+ r(d0);
18701
18703
  },
18702
18704
  width: "200px",
18703
18705
  "data-testid": "todo-filter-select",
@@ -18913,10 +18915,10 @@ function k4({
18913
18915
  e.id,
18914
18916
  "selectedAccountId",
18915
18917
  "all"
18916
- ), i = a0(() => {
18918
+ ), r = a0(() => {
18917
18919
  if (c.length !== 0)
18918
18920
  return s === "all" ? c.map((w) => w.id) : [s];
18919
- }, [s, c]), r = a0(() => D4(a), [a]), d = pe.COURSE_WORK, {
18921
+ }, [s, c]), i = a0(() => D4(a), [a]), d = pe.COURSE_WORK, {
18920
18922
  currentPage: q,
18921
18923
  currentPageIndex: f,
18922
18924
  totalPages: A,
@@ -18927,8 +18929,8 @@ function k4({
18927
18929
  error: R
18928
18930
  } = Nt({
18929
18931
  pageSize: d,
18930
- accountIds: i,
18931
- ...r
18932
+ accountIds: r,
18933
+ ...i
18932
18934
  }), g = (q == null ? void 0 : q.items) || [], y = M || l, B = t || (R == null ? void 0 : R.message) || null, _ = o || (() => m()), v = Z(
18933
18935
  (w, C) => {
18934
18936
  C.value && typeof C.value == "string" && (n(C.value), h());
@@ -19254,21 +19256,21 @@ function ol({
19254
19256
  k0(() => () => {
19255
19257
  p.current !== null && clearTimeout(p.current);
19256
19258
  }, []);
19257
- const s = (r) => {
19258
- n([{ text: r, type: "error" }]), p.current !== null && clearTimeout(p.current), p.current = setTimeout(() => {
19259
+ const s = (i) => {
19260
+ n([{ text: i, type: "error" }]), p.current !== null && clearTimeout(p.current), p.current = setTimeout(() => {
19259
19261
  n(void 0), p.current = null;
19260
19262
  }, 1e4);
19261
19263
  }, u = () => {
19262
19264
  var d;
19263
- const r = (d = c.current) == null ? void 0 : d.value;
19264
- r ? i(r) : s(o.addStudentModalPairingCodeRequired);
19265
- }, i = async (r) => {
19265
+ const i = (d = c.current) == null ? void 0 : d.value;
19266
+ i ? r(i) : s(o.addStudentModalPairingCodeRequired);
19267
+ }, r = async (i) => {
19266
19268
  try {
19267
19269
  const { data: d } = await g2(
19268
19270
  {
19269
19271
  method: "POST",
19270
19272
  path: `/api/v1/users/${M}/observees`,
19271
- body: { pairing_code: r }
19273
+ body: { pairing_code: i }
19272
19274
  },
19273
19275
  tl
19274
19276
  );
@@ -19306,8 +19308,8 @@ function ol({
19306
19308
  "data-testid": "pairing-code-input",
19307
19309
  messages: a,
19308
19310
  renderLabel: /* @__PURE__ */ O(k1, { children: o.addStudentModalPairingCodeLabel }),
19309
- inputRef: (r) => {
19310
- c.current = r;
19311
+ inputRef: (i) => {
19312
+ c.current = i;
19311
19313
  },
19312
19314
  placeholder: o.addStudentModalPairingCodeLabel,
19313
19315
  onChange: () => {
@@ -19333,7 +19335,7 @@ function zl(e) {
19333
19335
  }));
19334
19336
  }
19335
19337
  function cl() {
19336
- const { observedUsersList: e, canAddObservee: b, currentUser: M, currentUserRoles: t } = x0(), { translations: o, translate: z } = b0(), [c] = V(() => zl(e)), [p, a] = V(""), [n, s] = V(null), [u, i] = V(!1), [r, d] = V(null), q = a0(() => bl(), []), f = Z(
19338
+ const { observedUsersList: e, canAddObservee: b, currentUser: M, currentUserRoles: t } = x0(), { translations: o, translate: z } = b0(), [c] = V(() => zl(e)), [p, a] = V(""), [n, s] = V(null), [u, r] = V(!1), [i, d] = V(null), q = a0(() => bl(), []), f = Z(
19337
19339
  (R) => {
19338
19340
  a(R.name), s(R), M && (q(R.id), bc(M.id, R.id));
19339
19341
  },
@@ -19353,7 +19355,7 @@ function cl() {
19353
19355
  [c, f]
19354
19356
  ), W = Z(
19355
19357
  (R, g) => {
19356
- g === GM ? i(!0) : A(g);
19358
+ g === GM ? r(!0) : A(g);
19357
19359
  },
19358
19360
  [A]
19359
19361
  ), h = Z(
@@ -19386,7 +19388,7 @@ function cl() {
19386
19388
  id: GM,
19387
19389
  value: "new",
19388
19390
  renderBeforeLabel: (g) => /* @__PURE__ */ O(En, { color: g.isHighlighted ? void 0 : "brand" }),
19389
- children: /* @__PURE__ */ O(P, { color: r !== GM ? "brand" : void 0, children: o.observerPickerAddStudent })
19391
+ children: /* @__PURE__ */ O(P, { color: i !== GM ? "brand" : void 0, children: o.observerPickerAddStudent })
19390
19392
  },
19391
19393
  "new"
19392
19394
  )
@@ -19396,7 +19398,7 @@ function cl() {
19396
19398
  p,
19397
19399
  n,
19398
19400
  b,
19399
- r,
19401
+ i,
19400
19402
  o
19401
19403
  ]);
19402
19404
  return M ? c.length > 1 || b ? /* @__PURE__ */ X(D, { as: "div", children: [
@@ -19422,7 +19424,7 @@ function cl() {
19422
19424
  ol,
19423
19425
  {
19424
19426
  open: u,
19425
- handleClose: () => i(!1),
19427
+ handleClose: () => r(!1),
19426
19428
  currentUserId: M.id,
19427
19429
  onStudentPaired: h
19428
19430
  }
@@ -19451,7 +19453,7 @@ const uq = () => {
19451
19453
  exitEditMode: n,
19452
19454
  saveChanges: s,
19453
19455
  clearError: u
19454
- } = At(), { config: i, resetConfig: r } = Bb(), d = b.widget_dashboard_customization;
19456
+ } = At(), { config: r, resetConfig: i } = Bb(), d = b.widget_dashboard_customization;
19455
19457
  k0(() => {
19456
19458
  if (!z) return;
19457
19459
  const A = (W) => {
@@ -19460,9 +19462,9 @@ const uq = () => {
19460
19462
  return window.addEventListener("beforeunload", A), () => window.removeEventListener("beforeunload", A);
19461
19463
  }, [z]);
19462
19464
  const q = () => {
19463
- s(i);
19465
+ s(r);
19464
19466
  }, f = () => {
19465
- r(), n();
19467
+ i(), n();
19466
19468
  };
19467
19469
  return /* @__PURE__ */ X(D, { as: "div", children: [
19468
19470
  /* @__PURE__ */ O(z3, {}),
@@ -19609,12 +19611,12 @@ function dl({
19609
19611
  liveRegionPoliteness: c,
19610
19612
  dismissible: p = !0
19611
19613
  }) {
19612
- const [a, n] = V(!1), [s, u] = V(!0), i = z1(null), r = rc(), d = sn(), q = Z(() => {
19614
+ const [a, n] = V(!1), [s, u] = V(!0), r = z1(null), i = rc(), d = sn(), q = Z(() => {
19613
19615
  u(!1), setTimeout(() => {
19614
- i.current && clearTimeout(i.current), e();
19616
+ r.current && clearTimeout(r.current), e();
19615
19617
  }, 500);
19616
19618
  }, [e]), f = Z(() => {
19617
- n(!0), i.current && clearTimeout(i.current), i.current = setTimeout(q, o);
19619
+ n(!0), r.current && clearTimeout(r.current), r.current = setTimeout(q, o);
19618
19620
  }, [q, o]);
19619
19621
  let A = null;
19620
19622
  if (M && sl(M)) {
@@ -19626,11 +19628,11 @@ function dl({
19626
19628
  isWithinText: !1,
19627
19629
  as: "button",
19628
19630
  onClick: f,
19629
- "aria-describedby": r,
19631
+ "aria-describedby": i,
19630
19632
  children: d.strings.details
19631
19633
  }
19632
19634
  ) }),
19633
- /* @__PURE__ */ O(k1, { id: r, children: /* @__PURE__ */ O(tc, { a: W, b: h }) })
19635
+ /* @__PURE__ */ O(k1, { id: i, children: /* @__PURE__ */ O(tc, { a: W, b: h }) })
19634
19636
  ] }));
19635
19637
  }
19636
19638
  return /* @__PURE__ */ O(Mr, { transitionOnMount: !0, in: s, type: "fade", children: /* @__PURE__ */ O(
@@ -19665,22 +19667,22 @@ function Al(e) {
19665
19667
  if (typeof document > "u")
19666
19668
  return;
19667
19669
  const p = sn();
19668
- function a(i) {
19669
- const r = HM.get(i);
19670
- if (r)
19670
+ function a(r) {
19671
+ const i = HM.get(r);
19672
+ if (i)
19671
19673
  try {
19672
- r.unmount();
19674
+ i.unmount();
19673
19675
  } finally {
19674
- HM.delete(i);
19676
+ HM.delete(r);
19675
19677
  }
19676
- i.remove();
19678
+ r.remove();
19677
19679
  }
19678
19680
  function n() {
19679
- let i = document.getElementById(oc);
19680
- return i || (i = document.createElement("div"), i.id = oc, i.setAttribute(
19681
+ let r = document.getElementById(oc);
19682
+ return r || (r = document.createElement("div"), r.id = oc, r.setAttribute(
19681
19683
  "style",
19682
19684
  "position: fixed; top: 0; left: 0; width: 100%; z-index: 100000; pointer-events: none;"
19683
- ), document.body.appendChild(i)), i;
19685
+ ), document.body.appendChild(r)), r;
19684
19686
  }
19685
19687
  const s = document.createElement("div");
19686
19688
  s.setAttribute("style", "max-width:50em;margin:1rem auto;pointer-events:auto;"), s.setAttribute("class", "flashalert-message"), n().appendChild(s);