@instructure/platform-widget-dashboard 6.6.1 → 6.6.2
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/hooks/useRecentGrades.d.ts.map +1 -1
- package/dist/index.js +1145 -1147
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -118,23 +118,23 @@ const Pz = j2({
|
|
|
118
118
|
isDark: A,
|
|
119
119
|
queryPersister: l
|
|
120
120
|
}) => {
|
|
121
|
-
const
|
|
121
|
+
const q = O0(() => i && i.length > 0 ? i : s && u ? [{ id: "default", name: s, dashboardUrl: u }] : [], [i, s, u]), [d, W] = V(() => {
|
|
122
122
|
var X;
|
|
123
123
|
return ((X = (b ?? N1.preferences).widget_dashboard_config) == null ? void 0 : X.filters) ?? {};
|
|
124
|
-
}), h = Q((
|
|
124
|
+
}), h = Q((B, X) => {
|
|
125
125
|
W((C) => ({
|
|
126
126
|
...C,
|
|
127
|
-
[
|
|
127
|
+
[B]: X
|
|
128
128
|
}));
|
|
129
|
-
}, []), [m,
|
|
130
|
-
|
|
129
|
+
}, []), [m, f] = V({}), [R, g] = V({}), y = Q((B, X) => {
|
|
130
|
+
f((C) => ({
|
|
131
131
|
...C,
|
|
132
|
-
[
|
|
132
|
+
[B]: X
|
|
133
133
|
}));
|
|
134
|
-
}, []),
|
|
134
|
+
}, []), T = Q((B, X) => {
|
|
135
135
|
g((C) => ({
|
|
136
136
|
...C,
|
|
137
|
-
[
|
|
137
|
+
[B]: X
|
|
138
138
|
}));
|
|
139
139
|
}, []), _ = O0(() => (z ?? N1.sharedCourseData).map((X) => {
|
|
140
140
|
const C = R[X.courseId];
|
|
@@ -143,7 +143,7 @@ const Pz = j2({
|
|
|
143
143
|
courseColor: m[X.courseId] ?? X.courseColor,
|
|
144
144
|
courseName: C ?? X.courseName
|
|
145
145
|
};
|
|
146
|
-
}), [z, m, R]),
|
|
146
|
+
}), [z, m, R]), v = O0(
|
|
147
147
|
() => ({
|
|
148
148
|
preferences: b ?? N1.preferences,
|
|
149
149
|
observedUsersList: t ?? N1.observedUsersList,
|
|
@@ -154,14 +154,14 @@ const Pz = j2({
|
|
|
154
154
|
sharedCourseData: _,
|
|
155
155
|
dashboardFeatures: r ?? N1.dashboardFeatures,
|
|
156
156
|
hubBaseUrl: n,
|
|
157
|
-
accounts:
|
|
157
|
+
accounts: q,
|
|
158
158
|
customWidgets: a ?? N1.customWidgets,
|
|
159
159
|
isDark: A ?? N1.isDark,
|
|
160
160
|
queryPersister: l,
|
|
161
161
|
widgetConfig: d,
|
|
162
162
|
updateWidgetConfig: h,
|
|
163
|
-
updateCourseColor:
|
|
164
|
-
updateCourseNickname:
|
|
163
|
+
updateCourseColor: y,
|
|
164
|
+
updateCourseNickname: T
|
|
165
165
|
}),
|
|
166
166
|
[
|
|
167
167
|
b,
|
|
@@ -173,17 +173,17 @@ const Pz = j2({
|
|
|
173
173
|
_,
|
|
174
174
|
r,
|
|
175
175
|
n,
|
|
176
|
-
|
|
176
|
+
q,
|
|
177
177
|
a,
|
|
178
178
|
A,
|
|
179
179
|
l,
|
|
180
180
|
d,
|
|
181
181
|
h,
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
y,
|
|
183
|
+
T
|
|
184
184
|
]
|
|
185
185
|
);
|
|
186
|
-
return /* @__PURE__ */ O(Uz.Provider, { value:
|
|
186
|
+
return /* @__PURE__ */ O(Uz.Provider, { value: v, children: e });
|
|
187
187
|
};
|
|
188
188
|
function S0() {
|
|
189
189
|
return de(Uz);
|
|
@@ -374,7 +374,7 @@ const N1 = {
|
|
|
374
374
|
z(!0);
|
|
375
375
|
}, []), l = Q(() => {
|
|
376
376
|
n(null);
|
|
377
|
-
}, []),
|
|
377
|
+
}, []), q = {
|
|
378
378
|
isEditMode: o,
|
|
379
379
|
isDirty: p,
|
|
380
380
|
isSaving: i.isPending,
|
|
@@ -385,7 +385,7 @@ const N1 = {
|
|
|
385
385
|
markDirty: A,
|
|
386
386
|
clearError: l
|
|
387
387
|
};
|
|
388
|
-
return /* @__PURE__ */ O(jz.Provider, { value:
|
|
388
|
+
return /* @__PURE__ */ O(jz.Provider, { value: q, children: e });
|
|
389
389
|
};
|
|
390
390
|
function SM() {
|
|
391
391
|
const e = de(jz);
|
|
@@ -500,60 +500,60 @@ const Zr = (e, b) => {
|
|
|
500
500
|
const s = Q(
|
|
501
501
|
(W, h) => {
|
|
502
502
|
c((m) => {
|
|
503
|
-
let
|
|
503
|
+
let f = [...m.widgets];
|
|
504
504
|
switch (h) {
|
|
505
505
|
case "move-left":
|
|
506
|
-
|
|
506
|
+
f = Jr(f, W);
|
|
507
507
|
break;
|
|
508
508
|
case "move-right":
|
|
509
|
-
|
|
509
|
+
f = e3(f, W);
|
|
510
510
|
break;
|
|
511
511
|
case "move-left-top":
|
|
512
|
-
|
|
512
|
+
f = b3(f, W);
|
|
513
513
|
break;
|
|
514
514
|
case "move-right-top":
|
|
515
|
-
|
|
515
|
+
f = t3(f, W);
|
|
516
516
|
break;
|
|
517
517
|
case "move-up":
|
|
518
|
-
|
|
518
|
+
f = c3(f, W);
|
|
519
519
|
break;
|
|
520
520
|
case "move-down":
|
|
521
|
-
|
|
521
|
+
f = z3(f, W);
|
|
522
522
|
break;
|
|
523
523
|
case "move-up-cross":
|
|
524
|
-
|
|
524
|
+
f = M3(f, W);
|
|
525
525
|
break;
|
|
526
526
|
case "move-down-cross":
|
|
527
|
-
|
|
527
|
+
f = o3(f, W);
|
|
528
528
|
break;
|
|
529
529
|
case "move-to-top":
|
|
530
|
-
|
|
530
|
+
f = p3(f, W);
|
|
531
531
|
break;
|
|
532
532
|
case "move-to-bottom":
|
|
533
|
-
|
|
533
|
+
f = n3(f, W);
|
|
534
534
|
break;
|
|
535
535
|
}
|
|
536
|
-
return
|
|
536
|
+
return f = l2(f, b1), f = l2(f, e1), f = cb(f), { ...m, widgets: f };
|
|
537
537
|
}), r();
|
|
538
538
|
},
|
|
539
539
|
[r]
|
|
540
540
|
), u = Q(
|
|
541
541
|
(W, h, m) => {
|
|
542
|
-
c((
|
|
543
|
-
if (!
|
|
544
|
-
const g =
|
|
542
|
+
c((f) => {
|
|
543
|
+
if (!f.widgets.find((_) => _.id === W)) return f;
|
|
544
|
+
const g = f.widgets.map((_) => _.id === W ? { ..._, position: { ..._.position, col: h, row: m } } : _.position.col === h && _.position.row >= m && _.id !== W ? { ..._, position: { ..._.position, row: _.position.row + 1 } } : _), y = l2(
|
|
545
545
|
l2(g, b1),
|
|
546
546
|
e1
|
|
547
|
-
),
|
|
548
|
-
return { ...
|
|
547
|
+
), T = cb(y);
|
|
548
|
+
return { ...f, widgets: T };
|
|
549
549
|
}), r();
|
|
550
550
|
},
|
|
551
551
|
[r]
|
|
552
552
|
), i = Q(
|
|
553
553
|
(W, h = t.widget) => {
|
|
554
554
|
c((m) => {
|
|
555
|
-
const
|
|
556
|
-
l2(
|
|
555
|
+
const f = m.widgets.filter((y) => y.id !== W), R = l2(
|
|
556
|
+
l2(f, b1),
|
|
557
557
|
e1
|
|
558
558
|
), g = cb(R);
|
|
559
559
|
return { ...m, widgets: g };
|
|
@@ -561,19 +561,19 @@ const Zr = (e, b) => {
|
|
|
561
561
|
},
|
|
562
562
|
[r, t, M]
|
|
563
563
|
), a = Q(
|
|
564
|
-
(W, h, m,
|
|
564
|
+
(W, h, m, f) => {
|
|
565
565
|
c((R) => {
|
|
566
566
|
var X;
|
|
567
|
-
const g = ((X = crypto == null ? void 0 : crypto.randomUUID) == null ? void 0 : X.call(crypto)) ?? "",
|
|
567
|
+
const g = ((X = crypto == null ? void 0 : crypto.randomUUID) == null ? void 0 : X.call(crypto)) ?? "", y = {
|
|
568
568
|
id: g ? `${W}-widget-${g}` : `${W}-widget`,
|
|
569
569
|
type: W,
|
|
570
|
-
position: { col: m, row:
|
|
570
|
+
position: { col: m, row: f, relative: 0 },
|
|
571
571
|
title: h
|
|
572
|
-
}, _ = [...R.widgets.map((C) => C.position.col === m && C.position.row >=
|
|
572
|
+
}, _ = [...R.widgets.map((C) => C.position.col === m && C.position.row >= f ? { ...C, position: { ...C.position, row: C.position.row + 1 } } : C), y], v = l2(
|
|
573
573
|
l2(_, b1),
|
|
574
574
|
e1
|
|
575
|
-
),
|
|
576
|
-
return { ...R, widgets:
|
|
575
|
+
), B = cb(v);
|
|
576
|
+
return { ...R, widgets: B };
|
|
577
577
|
}), r(), M == null || M(t.widgetAdded.replace("%{widgetName}", h));
|
|
578
578
|
},
|
|
579
579
|
[r, t, M]
|
|
@@ -581,7 +581,7 @@ const Zr = (e, b) => {
|
|
|
581
581
|
c(p);
|
|
582
582
|
}, [p]), l = Q(async () => {
|
|
583
583
|
await n(o), z(o);
|
|
584
|
-
}, [o, n]),
|
|
584
|
+
}, [o, n]), q = {
|
|
585
585
|
config: o,
|
|
586
586
|
moveWidget: s,
|
|
587
587
|
moveWidgetToPosition: u,
|
|
@@ -590,7 +590,7 @@ const Zr = (e, b) => {
|
|
|
590
590
|
resetConfig: A,
|
|
591
591
|
saveLayout: l
|
|
592
592
|
};
|
|
593
|
-
return /* @__PURE__ */ O(Gz.Provider, { value:
|
|
593
|
+
return /* @__PURE__ */ O(Gz.Provider, { value: q, children: e });
|
|
594
594
|
};
|
|
595
595
|
function jb() {
|
|
596
596
|
const e = de(Gz);
|
|
@@ -627,9 +627,9 @@ const m2 = void 0, r3 = ({
|
|
|
627
627
|
try {
|
|
628
628
|
const l = await z.mutateAsync(e.uuid);
|
|
629
629
|
if ((a = l == null ? void 0 : l.acceptEnrollmentInvitation) != null && a.success)
|
|
630
|
-
console.log(o.enrollmentAcceptedSuccessfully), b == null || b(e.id), await new Promise((
|
|
630
|
+
console.log(o.enrollmentAcceptedSuccessfully), b == null || b(e.id), await new Promise((q) => setTimeout(q, 500)), window.location.reload();
|
|
631
631
|
else {
|
|
632
|
-
const
|
|
632
|
+
const q = ((A = l == null ? void 0 : l.acceptEnrollmentInvitation) == null ? void 0 : A.errors) || [], d = q.length > 0 ? q[0].message : o.failedToAcceptInvitation;
|
|
633
633
|
console.error(d);
|
|
634
634
|
}
|
|
635
635
|
} catch (l) {
|
|
@@ -650,7 +650,7 @@ const m2 = void 0, r3 = ({
|
|
|
650
650
|
if ((a = l == null ? void 0 : l.rejectEnrollmentInvitation) != null && a.success)
|
|
651
651
|
console.log(o.enrollmentDeclined), t == null || t(e.id);
|
|
652
652
|
else {
|
|
653
|
-
const
|
|
653
|
+
const q = ((A = l == null ? void 0 : l.rejectEnrollmentInvitation) == null ? void 0 : A.errors) || [], d = q.length > 0 ? q[0].message : o.failedToDeclineInvitation;
|
|
654
654
|
console.error(d);
|
|
655
655
|
}
|
|
656
656
|
} catch (l) {
|
|
@@ -793,25 +793,25 @@ function Eo() {
|
|
|
793
793
|
var Io;
|
|
794
794
|
function yb() {
|
|
795
795
|
return Io || (Io = 1, function(e) {
|
|
796
|
-
var b = B1 && B1.__createBinding || (Object.create ? function(
|
|
796
|
+
var b = B1 && B1.__createBinding || (Object.create ? function(v, B, X, C) {
|
|
797
797
|
C === void 0 && (C = X);
|
|
798
|
-
var x = Object.getOwnPropertyDescriptor(
|
|
799
|
-
(!x || ("get" in x ? !
|
|
800
|
-
return
|
|
801
|
-
} }), Object.defineProperty(
|
|
802
|
-
} : function(
|
|
803
|
-
C === void 0 && (C = X),
|
|
804
|
-
}), t = B1 && B1.__setModuleDefault || (Object.create ? function(
|
|
805
|
-
Object.defineProperty(
|
|
806
|
-
} : function(
|
|
807
|
-
|
|
808
|
-
}), M = B1 && B1.__importStar || function(
|
|
809
|
-
if (
|
|
810
|
-
var
|
|
811
|
-
if (
|
|
812
|
-
return t(
|
|
813
|
-
}, o = B1 && B1.__importDefault || function(
|
|
814
|
-
return
|
|
798
|
+
var x = Object.getOwnPropertyDescriptor(B, X);
|
|
799
|
+
(!x || ("get" in x ? !B.__esModule : x.writable || x.configurable)) && (x = { enumerable: !0, get: function() {
|
|
800
|
+
return B[X];
|
|
801
|
+
} }), Object.defineProperty(v, C, x);
|
|
802
|
+
} : function(v, B, X, C) {
|
|
803
|
+
C === void 0 && (C = X), v[C] = B[X];
|
|
804
|
+
}), t = B1 && B1.__setModuleDefault || (Object.create ? function(v, B) {
|
|
805
|
+
Object.defineProperty(v, "default", { enumerable: !0, value: B });
|
|
806
|
+
} : function(v, B) {
|
|
807
|
+
v.default = B;
|
|
808
|
+
}), M = B1 && B1.__importStar || function(v) {
|
|
809
|
+
if (v && v.__esModule) return v;
|
|
810
|
+
var B = {};
|
|
811
|
+
if (v != null) for (var X in v) X !== "default" && Object.prototype.hasOwnProperty.call(v, X) && b(B, v, X);
|
|
812
|
+
return t(B, v), B;
|
|
813
|
+
}, o = B1 && B1.__importDefault || function(v) {
|
|
814
|
+
return v && v.__esModule ? v : { default: v };
|
|
815
815
|
};
|
|
816
816
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.decodeXML = e.decodeHTMLStrict = e.decodeHTMLAttribute = e.decodeHTML = e.determineBranch = e.EntityDecoder = e.DecodingMode = e.BinTrieFlags = e.fromCodePoint = e.replaceCodePoint = e.decodeCodePoint = e.xmlDecodeTree = e.htmlDecodeTree = void 0;
|
|
817
817
|
var c = o(/* @__PURE__ */ i3());
|
|
@@ -827,91 +827,91 @@ function yb() {
|
|
|
827
827
|
return r.fromCodePoint;
|
|
828
828
|
} });
|
|
829
829
|
var n;
|
|
830
|
-
(function(
|
|
831
|
-
|
|
830
|
+
(function(v) {
|
|
831
|
+
v[v.NUM = 35] = "NUM", v[v.SEMI = 59] = "SEMI", v[v.EQUALS = 61] = "EQUALS", v[v.ZERO = 48] = "ZERO", v[v.NINE = 57] = "NINE", v[v.LOWER_A = 97] = "LOWER_A", v[v.LOWER_F = 102] = "LOWER_F", v[v.LOWER_X = 120] = "LOWER_X", v[v.LOWER_Z = 122] = "LOWER_Z", v[v.UPPER_A = 65] = "UPPER_A", v[v.UPPER_F = 70] = "UPPER_F", v[v.UPPER_Z = 90] = "UPPER_Z";
|
|
832
832
|
})(n || (n = {}));
|
|
833
833
|
var s = 32, u;
|
|
834
|
-
(function(
|
|
835
|
-
|
|
834
|
+
(function(v) {
|
|
835
|
+
v[v.VALUE_LENGTH = 49152] = "VALUE_LENGTH", v[v.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", v[v.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
836
836
|
})(u = e.BinTrieFlags || (e.BinTrieFlags = {}));
|
|
837
|
-
function i(
|
|
838
|
-
return
|
|
837
|
+
function i(v) {
|
|
838
|
+
return v >= n.ZERO && v <= n.NINE;
|
|
839
839
|
}
|
|
840
|
-
function a(
|
|
841
|
-
return
|
|
840
|
+
function a(v) {
|
|
841
|
+
return v >= n.UPPER_A && v <= n.UPPER_F || v >= n.LOWER_A && v <= n.LOWER_F;
|
|
842
842
|
}
|
|
843
|
-
function A(
|
|
844
|
-
return
|
|
843
|
+
function A(v) {
|
|
844
|
+
return v >= n.UPPER_A && v <= n.UPPER_Z || v >= n.LOWER_A && v <= n.LOWER_Z || i(v);
|
|
845
845
|
}
|
|
846
|
-
function l(
|
|
847
|
-
return
|
|
846
|
+
function l(v) {
|
|
847
|
+
return v === n.EQUALS || A(v);
|
|
848
848
|
}
|
|
849
|
-
var
|
|
850
|
-
(function(
|
|
851
|
-
|
|
852
|
-
})(
|
|
849
|
+
var q;
|
|
850
|
+
(function(v) {
|
|
851
|
+
v[v.EntityStart = 0] = "EntityStart", v[v.NumericStart = 1] = "NumericStart", v[v.NumericDecimal = 2] = "NumericDecimal", v[v.NumericHex = 3] = "NumericHex", v[v.NamedEntity = 4] = "NamedEntity";
|
|
852
|
+
})(q || (q = {}));
|
|
853
853
|
var d;
|
|
854
|
-
(function(
|
|
855
|
-
|
|
854
|
+
(function(v) {
|
|
855
|
+
v[v.Legacy = 0] = "Legacy", v[v.Strict = 1] = "Strict", v[v.Attribute = 2] = "Attribute";
|
|
856
856
|
})(d = e.DecodingMode || (e.DecodingMode = {}));
|
|
857
857
|
var W = (
|
|
858
858
|
/** @class */
|
|
859
859
|
function() {
|
|
860
|
-
function
|
|
861
|
-
this.decodeTree =
|
|
860
|
+
function v(B, X, C) {
|
|
861
|
+
this.decodeTree = B, this.emitCodePoint = X, this.errors = C, this.state = q.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = d.Strict;
|
|
862
862
|
}
|
|
863
|
-
return
|
|
864
|
-
this.decodeMode =
|
|
865
|
-
},
|
|
863
|
+
return v.prototype.startEntity = function(B) {
|
|
864
|
+
this.decodeMode = B, this.state = q.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
865
|
+
}, v.prototype.write = function(B, X) {
|
|
866
866
|
switch (this.state) {
|
|
867
|
-
case
|
|
868
|
-
return
|
|
869
|
-
case
|
|
870
|
-
return this.stateNumericStart(
|
|
871
|
-
case
|
|
872
|
-
return this.stateNumericDecimal(
|
|
873
|
-
case
|
|
874
|
-
return this.stateNumericHex(
|
|
875
|
-
case
|
|
876
|
-
return this.stateNamedEntity(
|
|
867
|
+
case q.EntityStart:
|
|
868
|
+
return B.charCodeAt(X) === n.NUM ? (this.state = q.NumericStart, this.consumed += 1, this.stateNumericStart(B, X + 1)) : (this.state = q.NamedEntity, this.stateNamedEntity(B, X));
|
|
869
|
+
case q.NumericStart:
|
|
870
|
+
return this.stateNumericStart(B, X);
|
|
871
|
+
case q.NumericDecimal:
|
|
872
|
+
return this.stateNumericDecimal(B, X);
|
|
873
|
+
case q.NumericHex:
|
|
874
|
+
return this.stateNumericHex(B, X);
|
|
875
|
+
case q.NamedEntity:
|
|
876
|
+
return this.stateNamedEntity(B, X);
|
|
877
877
|
}
|
|
878
|
-
},
|
|
879
|
-
return X >=
|
|
880
|
-
},
|
|
878
|
+
}, v.prototype.stateNumericStart = function(B, X) {
|
|
879
|
+
return X >= B.length ? -1 : (B.charCodeAt(X) | s) === n.LOWER_X ? (this.state = q.NumericHex, this.consumed += 1, this.stateNumericHex(B, X + 1)) : (this.state = q.NumericDecimal, this.stateNumericDecimal(B, X));
|
|
880
|
+
}, v.prototype.addToNumericResult = function(B, X, C, x) {
|
|
881
881
|
if (X !== C) {
|
|
882
882
|
var H = C - X;
|
|
883
|
-
this.result = this.result * Math.pow(x, H) + parseInt(
|
|
883
|
+
this.result = this.result * Math.pow(x, H) + parseInt(B.substr(X, H), x), this.consumed += H;
|
|
884
884
|
}
|
|
885
|
-
},
|
|
886
|
-
for (var C = X; X <
|
|
887
|
-
var x =
|
|
885
|
+
}, v.prototype.stateNumericHex = function(B, X) {
|
|
886
|
+
for (var C = X; X < B.length; ) {
|
|
887
|
+
var x = B.charCodeAt(X);
|
|
888
888
|
if (i(x) || a(x))
|
|
889
889
|
X += 1;
|
|
890
890
|
else
|
|
891
|
-
return this.addToNumericResult(
|
|
891
|
+
return this.addToNumericResult(B, C, X, 16), this.emitNumericEntity(x, 3);
|
|
892
892
|
}
|
|
893
|
-
return this.addToNumericResult(
|
|
894
|
-
},
|
|
895
|
-
for (var C = X; X <
|
|
896
|
-
var x =
|
|
893
|
+
return this.addToNumericResult(B, C, X, 16), -1;
|
|
894
|
+
}, v.prototype.stateNumericDecimal = function(B, X) {
|
|
895
|
+
for (var C = X; X < B.length; ) {
|
|
896
|
+
var x = B.charCodeAt(X);
|
|
897
897
|
if (i(x))
|
|
898
898
|
X += 1;
|
|
899
899
|
else
|
|
900
|
-
return this.addToNumericResult(
|
|
900
|
+
return this.addToNumericResult(B, C, X, 10), this.emitNumericEntity(x, 2);
|
|
901
901
|
}
|
|
902
|
-
return this.addToNumericResult(
|
|
903
|
-
},
|
|
902
|
+
return this.addToNumericResult(B, C, X, 10), -1;
|
|
903
|
+
}, v.prototype.emitNumericEntity = function(B, X) {
|
|
904
904
|
var C;
|
|
905
905
|
if (this.consumed <= X)
|
|
906
906
|
return (C = this.errors) === null || C === void 0 || C.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
907
|
-
if (
|
|
907
|
+
if (B === n.SEMI)
|
|
908
908
|
this.consumed += 1;
|
|
909
909
|
else if (this.decodeMode === d.Strict)
|
|
910
910
|
return 0;
|
|
911
|
-
return this.emitCodePoint((0, z.replaceCodePoint)(this.result), this.consumed), this.errors && (
|
|
912
|
-
},
|
|
913
|
-
for (var C = this.decodeTree, x = C[this.treeIndex], H = (x & u.VALUE_LENGTH) >> 14; X <
|
|
914
|
-
var G =
|
|
911
|
+
return this.emitCodePoint((0, z.replaceCodePoint)(this.result), this.consumed), this.errors && (B !== n.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
912
|
+
}, v.prototype.stateNamedEntity = function(B, X) {
|
|
913
|
+
for (var C = this.decodeTree, x = C[this.treeIndex], H = (x & u.VALUE_LENGTH) >> 14; X < B.length; X++, this.excess++) {
|
|
914
|
+
var G = B.charCodeAt(X);
|
|
915
915
|
if (this.treeIndex = m(C, x, this.treeIndex + Math.max(1, H), G), this.treeIndex < 0)
|
|
916
916
|
return this.result === 0 || // If we are parsing an attribute
|
|
917
917
|
this.decodeMode === d.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
@@ -924,37 +924,37 @@ function yb() {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
return -1;
|
|
927
|
-
},
|
|
928
|
-
var
|
|
929
|
-
return this.emitNamedEntityData(C, H, this.consumed), (
|
|
930
|
-
},
|
|
927
|
+
}, v.prototype.emitNotTerminatedNamedEntity = function() {
|
|
928
|
+
var B, X = this, C = X.result, x = X.decodeTree, H = (x[C] & u.VALUE_LENGTH) >> 14;
|
|
929
|
+
return this.emitNamedEntityData(C, H, this.consumed), (B = this.errors) === null || B === void 0 || B.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
930
|
+
}, v.prototype.emitNamedEntityData = function(B, X, C) {
|
|
931
931
|
var x = this.decodeTree;
|
|
932
|
-
return this.emitCodePoint(X === 1 ? x[
|
|
933
|
-
},
|
|
934
|
-
var
|
|
932
|
+
return this.emitCodePoint(X === 1 ? x[B] & ~u.VALUE_LENGTH : x[B + 1], C), X === 3 && this.emitCodePoint(x[B + 2], C), C;
|
|
933
|
+
}, v.prototype.end = function() {
|
|
934
|
+
var B;
|
|
935
935
|
switch (this.state) {
|
|
936
|
-
case
|
|
936
|
+
case q.NamedEntity:
|
|
937
937
|
return this.result !== 0 && (this.decodeMode !== d.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
938
|
-
case
|
|
938
|
+
case q.NumericDecimal:
|
|
939
939
|
return this.emitNumericEntity(0, 2);
|
|
940
|
-
case
|
|
940
|
+
case q.NumericHex:
|
|
941
941
|
return this.emitNumericEntity(0, 3);
|
|
942
|
-
case
|
|
943
|
-
return (
|
|
944
|
-
case
|
|
942
|
+
case q.NumericStart:
|
|
943
|
+
return (B = this.errors) === null || B === void 0 || B.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
944
|
+
case q.EntityStart:
|
|
945
945
|
return 0;
|
|
946
946
|
}
|
|
947
|
-
},
|
|
947
|
+
}, v;
|
|
948
948
|
}()
|
|
949
949
|
);
|
|
950
950
|
e.EntityDecoder = W;
|
|
951
|
-
function h(
|
|
952
|
-
var
|
|
953
|
-
return
|
|
951
|
+
function h(v) {
|
|
952
|
+
var B = "", X = new W(v, function(C) {
|
|
953
|
+
return B += (0, z.fromCodePoint)(C);
|
|
954
954
|
});
|
|
955
955
|
return function(x, H) {
|
|
956
956
|
for (var G = 0, K = 0; (K = x.indexOf("&", K)) >= 0; ) {
|
|
957
|
-
|
|
957
|
+
B += x.slice(G, K), X.startEntity(H);
|
|
958
958
|
var p0 = X.write(
|
|
959
959
|
x,
|
|
960
960
|
// Skip the "&"
|
|
@@ -966,45 +966,45 @@ function yb() {
|
|
|
966
966
|
}
|
|
967
967
|
G = K + p0, K = p0 === 0 ? G + 1 : G;
|
|
968
968
|
}
|
|
969
|
-
var M0 =
|
|
970
|
-
return
|
|
969
|
+
var M0 = B + x.slice(G);
|
|
970
|
+
return B = "", M0;
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
|
-
function m(
|
|
974
|
-
var x = (
|
|
973
|
+
function m(v, B, X, C) {
|
|
974
|
+
var x = (B & u.BRANCH_LENGTH) >> 7, H = B & u.JUMP_TABLE;
|
|
975
975
|
if (x === 0)
|
|
976
976
|
return H !== 0 && C === H ? X : -1;
|
|
977
977
|
if (H) {
|
|
978
978
|
var G = C - H;
|
|
979
|
-
return G < 0 || G >= x ? -1 :
|
|
979
|
+
return G < 0 || G >= x ? -1 : v[X + G] - 1;
|
|
980
980
|
}
|
|
981
981
|
for (var K = X, p0 = K + x - 1; K <= p0; ) {
|
|
982
|
-
var M0 = K + p0 >>> 1, L0 =
|
|
982
|
+
var M0 = K + p0 >>> 1, L0 = v[M0];
|
|
983
983
|
if (L0 < C)
|
|
984
984
|
K = M0 + 1;
|
|
985
985
|
else if (L0 > C)
|
|
986
986
|
p0 = M0 - 1;
|
|
987
987
|
else
|
|
988
|
-
return
|
|
988
|
+
return v[M0 + x];
|
|
989
989
|
}
|
|
990
990
|
return -1;
|
|
991
991
|
}
|
|
992
992
|
e.determineBranch = m;
|
|
993
|
-
var
|
|
994
|
-
function g(
|
|
995
|
-
return
|
|
993
|
+
var f = h(c.default), R = h(p.default);
|
|
994
|
+
function g(v, B) {
|
|
995
|
+
return B === void 0 && (B = d.Legacy), f(v, B);
|
|
996
996
|
}
|
|
997
997
|
e.decodeHTML = g;
|
|
998
|
-
function v
|
|
999
|
-
return
|
|
998
|
+
function y(v) {
|
|
999
|
+
return f(v, d.Attribute);
|
|
1000
1000
|
}
|
|
1001
|
-
e.decodeHTMLAttribute =
|
|
1002
|
-
function
|
|
1003
|
-
return
|
|
1001
|
+
e.decodeHTMLAttribute = y;
|
|
1002
|
+
function T(v) {
|
|
1003
|
+
return f(v, d.Strict);
|
|
1004
1004
|
}
|
|
1005
|
-
e.decodeHTMLStrict =
|
|
1006
|
-
function _(
|
|
1007
|
-
return R(
|
|
1005
|
+
e.decodeHTMLStrict = T;
|
|
1006
|
+
function _(v) {
|
|
1007
|
+
return R(v, d.Strict);
|
|
1008
1008
|
}
|
|
1009
1009
|
e.decodeXML = _;
|
|
1010
1010
|
}(B1)), B1;
|
|
@@ -1052,8 +1052,8 @@ function Yz() {
|
|
|
1052
1052
|
/** @class */
|
|
1053
1053
|
function() {
|
|
1054
1054
|
function i(a, A) {
|
|
1055
|
-
var l = a.xmlMode,
|
|
1056
|
-
this.cbs = A, this.state = M.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = M.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 =
|
|
1055
|
+
var l = a.xmlMode, q = l === void 0 ? !1 : l, d = a.decodeEntities, W = d === void 0 ? !0 : d;
|
|
1056
|
+
this.cbs = A, this.state = M.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = M.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 = q, this.decodeEntities = W, this.entityTrie = q ? b.xmlDecodeTree : b.htmlDecodeTree;
|
|
1057
1057
|
}
|
|
1058
1058
|
return i.prototype.reset = function() {
|
|
1059
1059
|
this.state = M.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = M.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
|
|
@@ -1175,8 +1175,8 @@ function Yz() {
|
|
|
1175
1175
|
if (!this.allowLegacyEntity() && a !== t.Semi)
|
|
1176
1176
|
this.trieIndex += l;
|
|
1177
1177
|
else {
|
|
1178
|
-
var
|
|
1179
|
-
|
|
1178
|
+
var q = this.index - this.entityExcess + 1;
|
|
1179
|
+
q > this.sectionStart && this.emitPartial(this.sectionStart, q), this.entityResult = this.trieIndex, this.trieIndex += l, this.entityExcess = 0, this.sectionStart = this.index + 1, l === 0 && this.emitNamedEntity();
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
}, i.prototype.emitNamedEntity = function() {
|
|
@@ -1351,23 +1351,23 @@ var Do;
|
|
|
1351
1351
|
function Po() {
|
|
1352
1352
|
if (Do) return v1;
|
|
1353
1353
|
Do = 1;
|
|
1354
|
-
var e = v1 && v1.__createBinding || (Object.create ? function(
|
|
1354
|
+
var e = v1 && v1.__createBinding || (Object.create ? function(q, d, W, h) {
|
|
1355
1355
|
h === void 0 && (h = W);
|
|
1356
1356
|
var m = Object.getOwnPropertyDescriptor(d, W);
|
|
1357
1357
|
(!m || ("get" in m ? !d.__esModule : m.writable || m.configurable)) && (m = { enumerable: !0, get: function() {
|
|
1358
1358
|
return d[W];
|
|
1359
|
-
} }), Object.defineProperty(
|
|
1360
|
-
} : function(
|
|
1361
|
-
h === void 0 && (h = W),
|
|
1362
|
-
}), b = v1 && v1.__setModuleDefault || (Object.create ? function(
|
|
1363
|
-
Object.defineProperty(
|
|
1364
|
-
} : function(
|
|
1365
|
-
|
|
1366
|
-
}), t = v1 && v1.__importStar || function(
|
|
1367
|
-
if (
|
|
1359
|
+
} }), Object.defineProperty(q, h, m);
|
|
1360
|
+
} : function(q, d, W, h) {
|
|
1361
|
+
h === void 0 && (h = W), q[h] = d[W];
|
|
1362
|
+
}), b = v1 && v1.__setModuleDefault || (Object.create ? function(q, d) {
|
|
1363
|
+
Object.defineProperty(q, "default", { enumerable: !0, value: d });
|
|
1364
|
+
} : function(q, d) {
|
|
1365
|
+
q.default = d;
|
|
1366
|
+
}), t = v1 && v1.__importStar || function(q) {
|
|
1367
|
+
if (q && q.__esModule) return q;
|
|
1368
1368
|
var d = {};
|
|
1369
|
-
if (
|
|
1370
|
-
return b(d,
|
|
1369
|
+
if (q != null) for (var W in q) W !== "default" && Object.prototype.hasOwnProperty.call(q, W) && e(d, q, W);
|
|
1370
|
+
return b(d, q), d;
|
|
1371
1371
|
};
|
|
1372
1372
|
Object.defineProperty(v1, "__esModule", { value: !0 }), v1.Parser = void 0;
|
|
1373
1373
|
var M = t(/* @__PURE__ */ Yz()), o = /* @__PURE__ */ yb(), c = /* @__PURE__ */ new Set([
|
|
@@ -1459,25 +1459,25 @@ function Po() {
|
|
|
1459
1459
|
]), A = /\s|\//, l = (
|
|
1460
1460
|
/** @class */
|
|
1461
1461
|
function() {
|
|
1462
|
-
function
|
|
1462
|
+
function q(d, W) {
|
|
1463
1463
|
W === void 0 && (W = {});
|
|
1464
|
-
var h, m,
|
|
1465
|
-
this.options = W, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = d ?? {}, this.lowerCaseTagNames = (h = W.lowerCaseTags) !== null && h !== void 0 ? h : !W.xmlMode, this.lowerCaseAttributeNames = (m = W.lowerCaseAttributeNames) !== null && m !== void 0 ? m : !W.xmlMode, this.tokenizer = new ((
|
|
1464
|
+
var h, m, f, R, g;
|
|
1465
|
+
this.options = W, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = d ?? {}, this.lowerCaseTagNames = (h = W.lowerCaseTags) !== null && h !== void 0 ? h : !W.xmlMode, this.lowerCaseAttributeNames = (m = W.lowerCaseAttributeNames) !== null && m !== void 0 ? m : !W.xmlMode, this.tokenizer = new ((f = W.Tokenizer) !== null && f !== void 0 ? f : M.default)(this.options, this), (g = (R = this.cbs).onparserinit) === null || g === void 0 || g.call(R, this);
|
|
1466
1466
|
}
|
|
1467
|
-
return
|
|
1468
|
-
var h, m,
|
|
1469
|
-
this.endIndex = W - 1, (m = (h = this.cbs).ontext) === null || m === void 0 || m.call(h,
|
|
1470
|
-
},
|
|
1467
|
+
return q.prototype.ontext = function(d, W) {
|
|
1468
|
+
var h, m, f = this.getSlice(d, W);
|
|
1469
|
+
this.endIndex = W - 1, (m = (h = this.cbs).ontext) === null || m === void 0 || m.call(h, f), this.startIndex = W;
|
|
1470
|
+
}, q.prototype.ontextentity = function(d) {
|
|
1471
1471
|
var W, h, m = this.tokenizer.getSectionStart();
|
|
1472
1472
|
this.endIndex = m - 1, (h = (W = this.cbs).ontext) === null || h === void 0 || h.call(W, (0, o.fromCodePoint)(d)), this.startIndex = m;
|
|
1473
|
-
},
|
|
1473
|
+
}, q.prototype.isVoidElement = function(d) {
|
|
1474
1474
|
return !this.options.xmlMode && u.has(d);
|
|
1475
|
-
},
|
|
1475
|
+
}, q.prototype.onopentagname = function(d, W) {
|
|
1476
1476
|
this.endIndex = W;
|
|
1477
1477
|
var h = this.getSlice(d, W);
|
|
1478
1478
|
this.lowerCaseTagNames && (h = h.toLowerCase()), this.emitOpenTag(h);
|
|
1479
|
-
},
|
|
1480
|
-
var W, h, m,
|
|
1479
|
+
}, q.prototype.emitOpenTag = function(d) {
|
|
1480
|
+
var W, h, m, f;
|
|
1481
1481
|
this.openTagStart = this.startIndex, this.tagname = d;
|
|
1482
1482
|
var R = !this.options.xmlMode && s.get(d);
|
|
1483
1483
|
if (R)
|
|
@@ -1485,49 +1485,49 @@ function Po() {
|
|
|
1485
1485
|
var g = this.stack.pop();
|
|
1486
1486
|
(h = (W = this.cbs).onclosetag) === null || h === void 0 || h.call(W, g, !0);
|
|
1487
1487
|
}
|
|
1488
|
-
this.isVoidElement(d) || (this.stack.push(d), i.has(d) ? this.foreignContext.push(!0) : a.has(d) && this.foreignContext.push(!1)), (
|
|
1489
|
-
},
|
|
1488
|
+
this.isVoidElement(d) || (this.stack.push(d), i.has(d) ? this.foreignContext.push(!0) : a.has(d) && this.foreignContext.push(!1)), (f = (m = this.cbs).onopentagname) === null || f === void 0 || f.call(m, d), this.cbs.onopentag && (this.attribs = {});
|
|
1489
|
+
}, q.prototype.endOpenTag = function(d) {
|
|
1490
1490
|
var W, h;
|
|
1491
1491
|
this.startIndex = this.openTagStart, this.attribs && ((h = (W = this.cbs).onopentag) === null || h === void 0 || h.call(W, this.tagname, this.attribs, d), this.attribs = null), this.cbs.onclosetag && this.isVoidElement(this.tagname) && this.cbs.onclosetag(this.tagname, !0), this.tagname = "";
|
|
1492
|
-
},
|
|
1492
|
+
}, q.prototype.onopentagend = function(d) {
|
|
1493
1493
|
this.endIndex = d, this.endOpenTag(!1), this.startIndex = d + 1;
|
|
1494
|
-
},
|
|
1495
|
-
var h, m,
|
|
1494
|
+
}, q.prototype.onclosetag = function(d, W) {
|
|
1495
|
+
var h, m, f, R, g, y;
|
|
1496
1496
|
this.endIndex = W;
|
|
1497
|
-
var
|
|
1498
|
-
if (this.lowerCaseTagNames && (
|
|
1499
|
-
!this.options.xmlMode &&
|
|
1497
|
+
var T = this.getSlice(d, W);
|
|
1498
|
+
if (this.lowerCaseTagNames && (T = T.toLowerCase()), (i.has(T) || a.has(T)) && this.foreignContext.pop(), this.isVoidElement(T))
|
|
1499
|
+
!this.options.xmlMode && T === "br" && ((m = (h = this.cbs).onopentagname) === null || m === void 0 || m.call(h, "br"), (R = (f = this.cbs).onopentag) === null || R === void 0 || R.call(f, "br", {}, !0), (y = (g = this.cbs).onclosetag) === null || y === void 0 || y.call(g, "br", !1));
|
|
1500
1500
|
else {
|
|
1501
|
-
var _ = this.stack.lastIndexOf(
|
|
1501
|
+
var _ = this.stack.lastIndexOf(T);
|
|
1502
1502
|
if (_ !== -1)
|
|
1503
1503
|
if (this.cbs.onclosetag)
|
|
1504
|
-
for (var
|
|
1505
|
-
this.cbs.onclosetag(this.stack.pop(),
|
|
1504
|
+
for (var v = this.stack.length - _; v--; )
|
|
1505
|
+
this.cbs.onclosetag(this.stack.pop(), v !== 0);
|
|
1506
1506
|
else
|
|
1507
1507
|
this.stack.length = _;
|
|
1508
|
-
else !this.options.xmlMode &&
|
|
1508
|
+
else !this.options.xmlMode && T === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
|
|
1509
1509
|
}
|
|
1510
1510
|
this.startIndex = W + 1;
|
|
1511
|
-
},
|
|
1511
|
+
}, q.prototype.onselfclosingtag = function(d) {
|
|
1512
1512
|
this.endIndex = d, this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1] ? (this.closeCurrentTag(!1), this.startIndex = d + 1) : this.onopentagend(d);
|
|
1513
|
-
},
|
|
1513
|
+
}, q.prototype.closeCurrentTag = function(d) {
|
|
1514
1514
|
var W, h, m = this.tagname;
|
|
1515
1515
|
this.endOpenTag(d), this.stack[this.stack.length - 1] === m && ((h = (W = this.cbs).onclosetag) === null || h === void 0 || h.call(W, m, !d), this.stack.pop());
|
|
1516
|
-
},
|
|
1516
|
+
}, q.prototype.onattribname = function(d, W) {
|
|
1517
1517
|
this.startIndex = d;
|
|
1518
1518
|
var h = this.getSlice(d, W);
|
|
1519
1519
|
this.attribname = this.lowerCaseAttributeNames ? h.toLowerCase() : h;
|
|
1520
|
-
},
|
|
1520
|
+
}, q.prototype.onattribdata = function(d, W) {
|
|
1521
1521
|
this.attribvalue += this.getSlice(d, W);
|
|
1522
|
-
},
|
|
1522
|
+
}, q.prototype.onattribentity = function(d) {
|
|
1523
1523
|
this.attribvalue += (0, o.fromCodePoint)(d);
|
|
1524
|
-
},
|
|
1524
|
+
}, q.prototype.onattribend = function(d, W) {
|
|
1525
1525
|
var h, m;
|
|
1526
1526
|
this.endIndex = W, (m = (h = this.cbs).onattribute) === null || m === void 0 || m.call(h, this.attribname, this.attribvalue, d === M.QuoteType.Double ? '"' : d === M.QuoteType.Single ? "'" : d === M.QuoteType.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
|
|
1527
|
-
},
|
|
1527
|
+
}, q.prototype.getInstructionName = function(d) {
|
|
1528
1528
|
var W = d.search(A), h = W < 0 ? d : d.substr(0, W);
|
|
1529
1529
|
return this.lowerCaseTagNames && (h = h.toLowerCase()), h;
|
|
1530
|
-
},
|
|
1530
|
+
}, q.prototype.ondeclaration = function(d, W) {
|
|
1531
1531
|
this.endIndex = W;
|
|
1532
1532
|
var h = this.getSlice(d, W);
|
|
1533
1533
|
if (this.cbs.onprocessinginstruction) {
|
|
@@ -1535,7 +1535,7 @@ function Po() {
|
|
|
1535
1535
|
this.cbs.onprocessinginstruction("!".concat(m), "!".concat(h));
|
|
1536
1536
|
}
|
|
1537
1537
|
this.startIndex = W + 1;
|
|
1538
|
-
},
|
|
1538
|
+
}, q.prototype.onprocessinginstruction = function(d, W) {
|
|
1539
1539
|
this.endIndex = W;
|
|
1540
1540
|
var h = this.getSlice(d, W);
|
|
1541
1541
|
if (this.cbs.onprocessinginstruction) {
|
|
@@ -1543,15 +1543,15 @@ function Po() {
|
|
|
1543
1543
|
this.cbs.onprocessinginstruction("?".concat(m), "?".concat(h));
|
|
1544
1544
|
}
|
|
1545
1545
|
this.startIndex = W + 1;
|
|
1546
|
-
},
|
|
1547
|
-
var m,
|
|
1548
|
-
this.endIndex = W, (
|
|
1549
|
-
},
|
|
1550
|
-
var m,
|
|
1546
|
+
}, q.prototype.oncomment = function(d, W, h) {
|
|
1547
|
+
var m, f, R, g;
|
|
1548
|
+
this.endIndex = W, (f = (m = this.cbs).oncomment) === null || f === void 0 || f.call(m, this.getSlice(d, W - h)), (g = (R = this.cbs).oncommentend) === null || g === void 0 || g.call(R), this.startIndex = W + 1;
|
|
1549
|
+
}, q.prototype.oncdata = function(d, W, h) {
|
|
1550
|
+
var m, f, R, g, y, T, _, v, B, X;
|
|
1551
1551
|
this.endIndex = W;
|
|
1552
1552
|
var C = this.getSlice(d, W - h);
|
|
1553
|
-
this.options.xmlMode || this.options.recognizeCDATA ? ((
|
|
1554
|
-
},
|
|
1553
|
+
this.options.xmlMode || this.options.recognizeCDATA ? ((f = (m = this.cbs).oncdatastart) === null || f === void 0 || f.call(m), (g = (R = this.cbs).ontext) === null || g === void 0 || g.call(R, C), (T = (y = this.cbs).oncdataend) === null || T === void 0 || T.call(y)) : ((v = (_ = this.cbs).oncomment) === null || v === void 0 || v.call(_, "[CDATA[".concat(C, "]]")), (X = (B = this.cbs).oncommentend) === null || X === void 0 || X.call(B)), this.startIndex = W + 1;
|
|
1554
|
+
}, q.prototype.onend = function() {
|
|
1555
1555
|
var d, W;
|
|
1556
1556
|
if (this.cbs.onclosetag) {
|
|
1557
1557
|
this.endIndex = this.startIndex;
|
|
@@ -1559,44 +1559,44 @@ function Po() {
|
|
|
1559
1559
|
;
|
|
1560
1560
|
}
|
|
1561
1561
|
(W = (d = this.cbs).onend) === null || W === void 0 || W.call(d);
|
|
1562
|
-
},
|
|
1562
|
+
}, q.prototype.reset = function() {
|
|
1563
1563
|
var d, W, h, m;
|
|
1564
1564
|
(W = (d = this.cbs).onreset) === null || W === void 0 || W.call(d), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (m = (h = this.cbs).onparserinit) === null || m === void 0 || m.call(h, this), this.buffers.length = 0, this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1;
|
|
1565
|
-
},
|
|
1565
|
+
}, q.prototype.parseComplete = function(d) {
|
|
1566
1566
|
this.reset(), this.end(d);
|
|
1567
|
-
},
|
|
1567
|
+
}, q.prototype.getSlice = function(d, W) {
|
|
1568
1568
|
for (; d - this.bufferOffset >= this.buffers[0].length; )
|
|
1569
1569
|
this.shiftBuffer();
|
|
1570
1570
|
for (var h = this.buffers[0].slice(d - this.bufferOffset, W - this.bufferOffset); W - this.bufferOffset > this.buffers[0].length; )
|
|
1571
1571
|
this.shiftBuffer(), h += this.buffers[0].slice(0, W - this.bufferOffset);
|
|
1572
1572
|
return h;
|
|
1573
|
-
},
|
|
1573
|
+
}, q.prototype.shiftBuffer = function() {
|
|
1574
1574
|
this.bufferOffset += this.buffers[0].length, this.writeIndex--, this.buffers.shift();
|
|
1575
|
-
},
|
|
1575
|
+
}, q.prototype.write = function(d) {
|
|
1576
1576
|
var W, h;
|
|
1577
1577
|
if (this.ended) {
|
|
1578
1578
|
(h = (W = this.cbs).onerror) === null || h === void 0 || h.call(W, new Error(".write() after done!"));
|
|
1579
1579
|
return;
|
|
1580
1580
|
}
|
|
1581
1581
|
this.buffers.push(d), this.tokenizer.running && (this.tokenizer.write(d), this.writeIndex++);
|
|
1582
|
-
},
|
|
1582
|
+
}, q.prototype.end = function(d) {
|
|
1583
1583
|
var W, h;
|
|
1584
1584
|
if (this.ended) {
|
|
1585
1585
|
(h = (W = this.cbs).onerror) === null || h === void 0 || h.call(W, new Error(".end() after done!"));
|
|
1586
1586
|
return;
|
|
1587
1587
|
}
|
|
1588
1588
|
d && this.write(d), this.ended = !0, this.tokenizer.end();
|
|
1589
|
-
},
|
|
1589
|
+
}, q.prototype.pause = function() {
|
|
1590
1590
|
this.tokenizer.pause();
|
|
1591
|
-
},
|
|
1591
|
+
}, q.prototype.resume = function() {
|
|
1592
1592
|
for (this.tokenizer.resume(); this.tokenizer.running && this.writeIndex < this.buffers.length; )
|
|
1593
1593
|
this.tokenizer.write(this.buffers[this.writeIndex++]);
|
|
1594
1594
|
this.ended && this.tokenizer.end();
|
|
1595
|
-
},
|
|
1595
|
+
}, q.prototype.parseChunk = function(d) {
|
|
1596
1596
|
this.write(d);
|
|
1597
|
-
},
|
|
1597
|
+
}, q.prototype.done = function(d) {
|
|
1598
1598
|
this.end(d);
|
|
1599
|
-
},
|
|
1599
|
+
}, q;
|
|
1600
1600
|
}()
|
|
1601
1601
|
);
|
|
1602
1602
|
return v1.Parser = l, v1;
|
|
@@ -1620,39 +1620,39 @@ function jo() {
|
|
|
1620
1620
|
if (Fo) return q0;
|
|
1621
1621
|
Fo = 1;
|
|
1622
1622
|
var e = q0 && q0.__extends || /* @__PURE__ */ function() {
|
|
1623
|
-
var
|
|
1624
|
-
return
|
|
1625
|
-
|
|
1626
|
-
} || function(
|
|
1627
|
-
for (var _ in
|
|
1628
|
-
},
|
|
1623
|
+
var f = function(R, g) {
|
|
1624
|
+
return f = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(y, T) {
|
|
1625
|
+
y.__proto__ = T;
|
|
1626
|
+
} || function(y, T) {
|
|
1627
|
+
for (var _ in T) Object.prototype.hasOwnProperty.call(T, _) && (y[_] = T[_]);
|
|
1628
|
+
}, f(R, g);
|
|
1629
1629
|
};
|
|
1630
1630
|
return function(R, g) {
|
|
1631
1631
|
if (typeof g != "function" && g !== null)
|
|
1632
1632
|
throw new TypeError("Class extends value " + String(g) + " is not a constructor or null");
|
|
1633
|
-
|
|
1634
|
-
function
|
|
1633
|
+
f(R, g);
|
|
1634
|
+
function y() {
|
|
1635
1635
|
this.constructor = R;
|
|
1636
1636
|
}
|
|
1637
|
-
R.prototype = g === null ? Object.create(g) : (
|
|
1637
|
+
R.prototype = g === null ? Object.create(g) : (y.prototype = g.prototype, new y());
|
|
1638
1638
|
};
|
|
1639
1639
|
}(), b = q0 && q0.__assign || function() {
|
|
1640
|
-
return b = Object.assign || function(
|
|
1641
|
-
for (var R, g = 1,
|
|
1640
|
+
return b = Object.assign || function(f) {
|
|
1641
|
+
for (var R, g = 1, y = arguments.length; g < y; g++) {
|
|
1642
1642
|
R = arguments[g];
|
|
1643
|
-
for (var
|
|
1643
|
+
for (var T in R) Object.prototype.hasOwnProperty.call(R, T) && (f[T] = R[T]);
|
|
1644
1644
|
}
|
|
1645
|
-
return
|
|
1645
|
+
return f;
|
|
1646
1646
|
}, b.apply(this, arguments);
|
|
1647
1647
|
};
|
|
1648
1648
|
Object.defineProperty(q0, "__esModule", { value: !0 }), q0.cloneNode = q0.hasChildren = q0.isDocument = q0.isDirective = q0.isComment = q0.isText = q0.isCDATA = q0.isTag = q0.Element = q0.Document = q0.CDATA = q0.NodeWithChildren = q0.ProcessingInstruction = q0.Comment = q0.Text = q0.DataNode = q0.Node = void 0;
|
|
1649
1649
|
var t = /* @__PURE__ */ Ye(), M = (
|
|
1650
1650
|
/** @class */
|
|
1651
1651
|
function() {
|
|
1652
|
-
function
|
|
1652
|
+
function f() {
|
|
1653
1653
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
1654
1654
|
}
|
|
1655
|
-
return Object.defineProperty(
|
|
1655
|
+
return Object.defineProperty(f.prototype, "parentNode", {
|
|
1656
1656
|
// Read-write aliases for properties
|
|
1657
1657
|
/**
|
|
1658
1658
|
* Same as {@link parent}.
|
|
@@ -1666,7 +1666,7 @@ function jo() {
|
|
|
1666
1666
|
},
|
|
1667
1667
|
enumerable: !1,
|
|
1668
1668
|
configurable: !0
|
|
1669
|
-
}), Object.defineProperty(
|
|
1669
|
+
}), Object.defineProperty(f.prototype, "previousSibling", {
|
|
1670
1670
|
/**
|
|
1671
1671
|
* Same as {@link prev}.
|
|
1672
1672
|
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
@@ -1679,7 +1679,7 @@ function jo() {
|
|
|
1679
1679
|
},
|
|
1680
1680
|
enumerable: !1,
|
|
1681
1681
|
configurable: !0
|
|
1682
|
-
}), Object.defineProperty(
|
|
1682
|
+
}), Object.defineProperty(f.prototype, "nextSibling", {
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Same as {@link next}.
|
|
1685
1685
|
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
@@ -1692,19 +1692,19 @@ function jo() {
|
|
|
1692
1692
|
},
|
|
1693
1693
|
enumerable: !1,
|
|
1694
1694
|
configurable: !0
|
|
1695
|
-
}),
|
|
1695
|
+
}), f.prototype.cloneNode = function(R) {
|
|
1696
1696
|
return R === void 0 && (R = !1), h(this, R);
|
|
1697
|
-
},
|
|
1697
|
+
}, f;
|
|
1698
1698
|
}()
|
|
1699
1699
|
);
|
|
1700
1700
|
q0.Node = M;
|
|
1701
1701
|
var o = (
|
|
1702
1702
|
/** @class */
|
|
1703
|
-
function(
|
|
1704
|
-
e(R,
|
|
1703
|
+
function(f) {
|
|
1704
|
+
e(R, f);
|
|
1705
1705
|
function R(g) {
|
|
1706
|
-
var
|
|
1707
|
-
return
|
|
1706
|
+
var y = f.call(this) || this;
|
|
1707
|
+
return y.data = g, y;
|
|
1708
1708
|
}
|
|
1709
1709
|
return Object.defineProperty(R.prototype, "nodeValue", {
|
|
1710
1710
|
/**
|
|
@@ -1725,10 +1725,10 @@ function jo() {
|
|
|
1725
1725
|
q0.DataNode = o;
|
|
1726
1726
|
var c = (
|
|
1727
1727
|
/** @class */
|
|
1728
|
-
function(
|
|
1729
|
-
e(R,
|
|
1728
|
+
function(f) {
|
|
1729
|
+
e(R, f);
|
|
1730
1730
|
function R() {
|
|
1731
|
-
var g =
|
|
1731
|
+
var g = f !== null && f.apply(this, arguments) || this;
|
|
1732
1732
|
return g.type = t.ElementType.Text, g;
|
|
1733
1733
|
}
|
|
1734
1734
|
return Object.defineProperty(R.prototype, "nodeType", {
|
|
@@ -1743,10 +1743,10 @@ function jo() {
|
|
|
1743
1743
|
q0.Text = c;
|
|
1744
1744
|
var p = (
|
|
1745
1745
|
/** @class */
|
|
1746
|
-
function(
|
|
1747
|
-
e(R,
|
|
1746
|
+
function(f) {
|
|
1747
|
+
e(R, f);
|
|
1748
1748
|
function R() {
|
|
1749
|
-
var g =
|
|
1749
|
+
var g = f !== null && f.apply(this, arguments) || this;
|
|
1750
1750
|
return g.type = t.ElementType.Comment, g;
|
|
1751
1751
|
}
|
|
1752
1752
|
return Object.defineProperty(R.prototype, "nodeType", {
|
|
@@ -1761,11 +1761,11 @@ function jo() {
|
|
|
1761
1761
|
q0.Comment = p;
|
|
1762
1762
|
var z = (
|
|
1763
1763
|
/** @class */
|
|
1764
|
-
function(
|
|
1765
|
-
e(R,
|
|
1766
|
-
function R(g,
|
|
1767
|
-
var
|
|
1768
|
-
return
|
|
1764
|
+
function(f) {
|
|
1765
|
+
e(R, f);
|
|
1766
|
+
function R(g, y) {
|
|
1767
|
+
var T = f.call(this, y) || this;
|
|
1768
|
+
return T.name = g, T.type = t.ElementType.Directive, T;
|
|
1769
1769
|
}
|
|
1770
1770
|
return Object.defineProperty(R.prototype, "nodeType", {
|
|
1771
1771
|
get: function() {
|
|
@@ -1779,11 +1779,11 @@ function jo() {
|
|
|
1779
1779
|
q0.ProcessingInstruction = z;
|
|
1780
1780
|
var r = (
|
|
1781
1781
|
/** @class */
|
|
1782
|
-
function(
|
|
1783
|
-
e(R,
|
|
1782
|
+
function(f) {
|
|
1783
|
+
e(R, f);
|
|
1784
1784
|
function R(g) {
|
|
1785
|
-
var
|
|
1786
|
-
return
|
|
1785
|
+
var y = f.call(this) || this;
|
|
1786
|
+
return y.children = g, y;
|
|
1787
1787
|
}
|
|
1788
1788
|
return Object.defineProperty(R.prototype, "firstChild", {
|
|
1789
1789
|
// Aliases
|
|
@@ -1820,10 +1820,10 @@ function jo() {
|
|
|
1820
1820
|
q0.NodeWithChildren = r;
|
|
1821
1821
|
var n = (
|
|
1822
1822
|
/** @class */
|
|
1823
|
-
function(
|
|
1824
|
-
e(R,
|
|
1823
|
+
function(f) {
|
|
1824
|
+
e(R, f);
|
|
1825
1825
|
function R() {
|
|
1826
|
-
var g =
|
|
1826
|
+
var g = f !== null && f.apply(this, arguments) || this;
|
|
1827
1827
|
return g.type = t.ElementType.CDATA, g;
|
|
1828
1828
|
}
|
|
1829
1829
|
return Object.defineProperty(R.prototype, "nodeType", {
|
|
@@ -1838,10 +1838,10 @@ function jo() {
|
|
|
1838
1838
|
q0.CDATA = n;
|
|
1839
1839
|
var s = (
|
|
1840
1840
|
/** @class */
|
|
1841
|
-
function(
|
|
1842
|
-
e(R,
|
|
1841
|
+
function(f) {
|
|
1842
|
+
e(R, f);
|
|
1843
1843
|
function R() {
|
|
1844
|
-
var g =
|
|
1844
|
+
var g = f !== null && f.apply(this, arguments) || this;
|
|
1845
1845
|
return g.type = t.ElementType.Root, g;
|
|
1846
1846
|
}
|
|
1847
1847
|
return Object.defineProperty(R.prototype, "nodeType", {
|
|
@@ -1856,12 +1856,12 @@ function jo() {
|
|
|
1856
1856
|
q0.Document = s;
|
|
1857
1857
|
var u = (
|
|
1858
1858
|
/** @class */
|
|
1859
|
-
function(
|
|
1860
|
-
e(R,
|
|
1861
|
-
function R(g,
|
|
1862
|
-
|
|
1863
|
-
var
|
|
1864
|
-
return
|
|
1859
|
+
function(f) {
|
|
1860
|
+
e(R, f);
|
|
1861
|
+
function R(g, y, T, _) {
|
|
1862
|
+
T === void 0 && (T = []), _ === void 0 && (_ = g === "script" ? t.ElementType.Script : g === "style" ? t.ElementType.Style : t.ElementType.Tag);
|
|
1863
|
+
var v = f.call(this, T) || this;
|
|
1864
|
+
return v.name = g, v.attribs = y, v.type = _, v;
|
|
1865
1865
|
}
|
|
1866
1866
|
return Object.defineProperty(R.prototype, "nodeType", {
|
|
1867
1867
|
get: function() {
|
|
@@ -1886,13 +1886,13 @@ function jo() {
|
|
|
1886
1886
|
}), Object.defineProperty(R.prototype, "attributes", {
|
|
1887
1887
|
get: function() {
|
|
1888
1888
|
var g = this;
|
|
1889
|
-
return Object.keys(this.attribs).map(function(
|
|
1890
|
-
var
|
|
1889
|
+
return Object.keys(this.attribs).map(function(y) {
|
|
1890
|
+
var T, _;
|
|
1891
1891
|
return {
|
|
1892
|
-
name:
|
|
1893
|
-
value: g.attribs[
|
|
1894
|
-
namespace: (
|
|
1895
|
-
prefix: (_ = g["x-attribsPrefix"]) === null || _ === void 0 ? void 0 : _[
|
|
1892
|
+
name: y,
|
|
1893
|
+
value: g.attribs[y],
|
|
1894
|
+
namespace: (T = g["x-attribsNamespace"]) === null || T === void 0 ? void 0 : T[y],
|
|
1895
|
+
prefix: (_ = g["x-attribsPrefix"]) === null || _ === void 0 ? void 0 : _[y]
|
|
1896
1896
|
};
|
|
1897
1897
|
});
|
|
1898
1898
|
},
|
|
@@ -1902,67 +1902,67 @@ function jo() {
|
|
|
1902
1902
|
}(r)
|
|
1903
1903
|
);
|
|
1904
1904
|
q0.Element = u;
|
|
1905
|
-
function i(
|
|
1906
|
-
return (0, t.isTag)(
|
|
1905
|
+
function i(f) {
|
|
1906
|
+
return (0, t.isTag)(f);
|
|
1907
1907
|
}
|
|
1908
1908
|
q0.isTag = i;
|
|
1909
|
-
function a(
|
|
1910
|
-
return
|
|
1909
|
+
function a(f) {
|
|
1910
|
+
return f.type === t.ElementType.CDATA;
|
|
1911
1911
|
}
|
|
1912
1912
|
q0.isCDATA = a;
|
|
1913
|
-
function A(
|
|
1914
|
-
return
|
|
1913
|
+
function A(f) {
|
|
1914
|
+
return f.type === t.ElementType.Text;
|
|
1915
1915
|
}
|
|
1916
1916
|
q0.isText = A;
|
|
1917
|
-
function l(
|
|
1918
|
-
return
|
|
1917
|
+
function l(f) {
|
|
1918
|
+
return f.type === t.ElementType.Comment;
|
|
1919
1919
|
}
|
|
1920
1920
|
q0.isComment = l;
|
|
1921
|
-
function f
|
|
1922
|
-
return
|
|
1921
|
+
function q(f) {
|
|
1922
|
+
return f.type === t.ElementType.Directive;
|
|
1923
1923
|
}
|
|
1924
|
-
q0.isDirective =
|
|
1925
|
-
function d(
|
|
1926
|
-
return
|
|
1924
|
+
q0.isDirective = q;
|
|
1925
|
+
function d(f) {
|
|
1926
|
+
return f.type === t.ElementType.Root;
|
|
1927
1927
|
}
|
|
1928
1928
|
q0.isDocument = d;
|
|
1929
|
-
function W(
|
|
1930
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1929
|
+
function W(f) {
|
|
1930
|
+
return Object.prototype.hasOwnProperty.call(f, "children");
|
|
1931
1931
|
}
|
|
1932
1932
|
q0.hasChildren = W;
|
|
1933
|
-
function h(
|
|
1933
|
+
function h(f, R) {
|
|
1934
1934
|
R === void 0 && (R = !1);
|
|
1935
1935
|
var g;
|
|
1936
|
-
if (A(
|
|
1937
|
-
g = new c(
|
|
1938
|
-
else if (l(
|
|
1939
|
-
g = new p(
|
|
1940
|
-
else if (i(
|
|
1941
|
-
var
|
|
1942
|
-
|
|
1943
|
-
return X.parent =
|
|
1944
|
-
}),
|
|
1945
|
-
} else if (a(
|
|
1946
|
-
var
|
|
1947
|
-
|
|
1936
|
+
if (A(f))
|
|
1937
|
+
g = new c(f.data);
|
|
1938
|
+
else if (l(f))
|
|
1939
|
+
g = new p(f.data);
|
|
1940
|
+
else if (i(f)) {
|
|
1941
|
+
var y = R ? m(f.children) : [], T = new u(f.name, b({}, f.attribs), y);
|
|
1942
|
+
y.forEach(function(X) {
|
|
1943
|
+
return X.parent = T;
|
|
1944
|
+
}), f.namespace != null && (T.namespace = f.namespace), f["x-attribsNamespace"] && (T["x-attribsNamespace"] = b({}, f["x-attribsNamespace"])), f["x-attribsPrefix"] && (T["x-attribsPrefix"] = b({}, f["x-attribsPrefix"])), g = T;
|
|
1945
|
+
} else if (a(f)) {
|
|
1946
|
+
var y = R ? m(f.children) : [], _ = new n(y);
|
|
1947
|
+
y.forEach(function(C) {
|
|
1948
1948
|
return C.parent = _;
|
|
1949
1949
|
}), g = _;
|
|
1950
|
-
} else if (d(
|
|
1951
|
-
var
|
|
1952
|
-
|
|
1953
|
-
return C.parent =
|
|
1954
|
-
}),
|
|
1955
|
-
} else if (f
|
|
1956
|
-
var
|
|
1957
|
-
|
|
1950
|
+
} else if (d(f)) {
|
|
1951
|
+
var y = R ? m(f.children) : [], v = new s(y);
|
|
1952
|
+
y.forEach(function(C) {
|
|
1953
|
+
return C.parent = v;
|
|
1954
|
+
}), f["x-mode"] && (v["x-mode"] = f["x-mode"]), g = v;
|
|
1955
|
+
} else if (q(f)) {
|
|
1956
|
+
var B = new z(f.name, f.data);
|
|
1957
|
+
f["x-name"] != null && (B["x-name"] = f["x-name"], B["x-publicId"] = f["x-publicId"], B["x-systemId"] = f["x-systemId"]), g = B;
|
|
1958
1958
|
} else
|
|
1959
|
-
throw new Error("Not implemented yet: ".concat(
|
|
1960
|
-
return g.startIndex =
|
|
1959
|
+
throw new Error("Not implemented yet: ".concat(f.type));
|
|
1960
|
+
return g.startIndex = f.startIndex, g.endIndex = f.endIndex, f.sourceCodeLocation != null && (g.sourceCodeLocation = f.sourceCodeLocation), g;
|
|
1961
1961
|
}
|
|
1962
1962
|
q0.cloneNode = h;
|
|
1963
|
-
function m(
|
|
1964
|
-
for (var R =
|
|
1965
|
-
return h(
|
|
1963
|
+
function m(f) {
|
|
1964
|
+
for (var R = f.map(function(y) {
|
|
1965
|
+
return h(y, !0);
|
|
1966
1966
|
}), g = 1; g < R.length; g++)
|
|
1967
1967
|
R[g].prev = R[g - 1], R[g - 1].next = R[g];
|
|
1968
1968
|
return R;
|
|
@@ -2132,9 +2132,9 @@ function $o() {
|
|
|
2132
2132
|
var a = r.charCodeAt(i), A = b.default.get(a);
|
|
2133
2133
|
if (typeof A == "object") {
|
|
2134
2134
|
if (i + 1 < r.length) {
|
|
2135
|
-
var l = r.charCodeAt(i + 1),
|
|
2136
|
-
if (
|
|
2137
|
-
n +=
|
|
2135
|
+
var l = r.charCodeAt(i + 1), q = typeof A.n == "number" ? A.n === l ? A.o : void 0 : A.n.get(l);
|
|
2136
|
+
if (q !== void 0) {
|
|
2137
|
+
n += q, s = z.lastIndex += 1;
|
|
2138
2138
|
continue;
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
@@ -2346,29 +2346,29 @@ function d3() {
|
|
|
2346
2346
|
Zo = 1;
|
|
2347
2347
|
var e = O1 && O1.__assign || function() {
|
|
2348
2348
|
return e = Object.assign || function(m) {
|
|
2349
|
-
for (var
|
|
2350
|
-
|
|
2351
|
-
for (var
|
|
2349
|
+
for (var f, R = 1, g = arguments.length; R < g; R++) {
|
|
2350
|
+
f = arguments[R];
|
|
2351
|
+
for (var y in f) Object.prototype.hasOwnProperty.call(f, y) && (m[y] = f[y]);
|
|
2352
2352
|
}
|
|
2353
2353
|
return m;
|
|
2354
2354
|
}, e.apply(this, arguments);
|
|
2355
|
-
}, b = O1 && O1.__createBinding || (Object.create ? function(m,
|
|
2355
|
+
}, b = O1 && O1.__createBinding || (Object.create ? function(m, f, R, g) {
|
|
2356
2356
|
g === void 0 && (g = R);
|
|
2357
|
-
var
|
|
2358
|
-
(!
|
|
2359
|
-
return
|
|
2360
|
-
} }), Object.defineProperty(m, g,
|
|
2361
|
-
} : function(m,
|
|
2362
|
-
g === void 0 && (g = R), m[g] =
|
|
2363
|
-
}), t = O1 && O1.__setModuleDefault || (Object.create ? function(m,
|
|
2364
|
-
Object.defineProperty(m, "default", { enumerable: !0, value:
|
|
2365
|
-
} : function(m,
|
|
2366
|
-
m.default =
|
|
2357
|
+
var y = Object.getOwnPropertyDescriptor(f, R);
|
|
2358
|
+
(!y || ("get" in y ? !f.__esModule : y.writable || y.configurable)) && (y = { enumerable: !0, get: function() {
|
|
2359
|
+
return f[R];
|
|
2360
|
+
} }), Object.defineProperty(m, g, y);
|
|
2361
|
+
} : function(m, f, R, g) {
|
|
2362
|
+
g === void 0 && (g = R), m[g] = f[R];
|
|
2363
|
+
}), t = O1 && O1.__setModuleDefault || (Object.create ? function(m, f) {
|
|
2364
|
+
Object.defineProperty(m, "default", { enumerable: !0, value: f });
|
|
2365
|
+
} : function(m, f) {
|
|
2366
|
+
m.default = f;
|
|
2367
2367
|
}), M = O1 && O1.__importStar || function(m) {
|
|
2368
2368
|
if (m && m.__esModule) return m;
|
|
2369
|
-
var
|
|
2370
|
-
if (m != null) for (var R in m) R !== "default" && Object.prototype.hasOwnProperty.call(m, R) && b(
|
|
2371
|
-
return t(
|
|
2369
|
+
var f = {};
|
|
2370
|
+
if (m != null) for (var R in m) R !== "default" && Object.prototype.hasOwnProperty.call(m, R) && b(f, m, R);
|
|
2371
|
+
return t(f, m), f;
|
|
2372
2372
|
};
|
|
2373
2373
|
Object.defineProperty(O1, "__esModule", { value: !0 }), O1.render = void 0;
|
|
2374
2374
|
var o = M(/* @__PURE__ */ Ye()), c = /* @__PURE__ */ s3(), p = /* @__PURE__ */ u3(), z = /* @__PURE__ */ new Set([
|
|
@@ -2384,13 +2384,13 @@ function d3() {
|
|
|
2384
2384
|
function r(m) {
|
|
2385
2385
|
return m.replace(/"/g, """);
|
|
2386
2386
|
}
|
|
2387
|
-
function n(m,
|
|
2387
|
+
function n(m, f) {
|
|
2388
2388
|
var R;
|
|
2389
2389
|
if (m) {
|
|
2390
|
-
var g = ((R =
|
|
2391
|
-
return Object.keys(m).map(function(
|
|
2392
|
-
var
|
|
2393
|
-
return
|
|
2390
|
+
var g = ((R = f.encodeEntities) !== null && R !== void 0 ? R : f.decodeEntities) === !1 ? r : f.xmlMode || f.encodeEntities !== "utf8" ? c.encodeXML : c.escapeAttribute;
|
|
2391
|
+
return Object.keys(m).map(function(y) {
|
|
2392
|
+
var T, _, v = (T = m[y]) !== null && T !== void 0 ? T : "";
|
|
2393
|
+
return f.xmlMode === "foreign" && (y = (_ = p.attributeNames.get(y)) !== null && _ !== void 0 ? _ : y), !f.emptyAttrs && !f.xmlMode && v === "" ? y : "".concat(y, '="').concat(g(v), '"');
|
|
2394
2394
|
}).join(" ");
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
@@ -2415,20 +2415,20 @@ function d3() {
|
|
|
2415
2415
|
"track",
|
|
2416
2416
|
"wbr"
|
|
2417
2417
|
]);
|
|
2418
|
-
function u(m,
|
|
2419
|
-
|
|
2420
|
-
for (var R = ("length" in m) ? m : [m], g = "",
|
|
2421
|
-
g += i(R[
|
|
2418
|
+
function u(m, f) {
|
|
2419
|
+
f === void 0 && (f = {});
|
|
2420
|
+
for (var R = ("length" in m) ? m : [m], g = "", y = 0; y < R.length; y++)
|
|
2421
|
+
g += i(R[y], f);
|
|
2422
2422
|
return g;
|
|
2423
2423
|
}
|
|
2424
2424
|
O1.render = u, O1.default = u;
|
|
2425
|
-
function i(m,
|
|
2425
|
+
function i(m, f) {
|
|
2426
2426
|
switch (m.type) {
|
|
2427
2427
|
case o.Root:
|
|
2428
|
-
return u(m.children,
|
|
2428
|
+
return u(m.children, f);
|
|
2429
2429
|
case o.Doctype:
|
|
2430
2430
|
case o.Directive:
|
|
2431
|
-
return
|
|
2431
|
+
return q(m);
|
|
2432
2432
|
case o.Comment:
|
|
2433
2433
|
return h(m);
|
|
2434
2434
|
case o.CDATA:
|
|
@@ -2436,9 +2436,9 @@ function d3() {
|
|
|
2436
2436
|
case o.Script:
|
|
2437
2437
|
case o.Style:
|
|
2438
2438
|
case o.Tag:
|
|
2439
|
-
return l(m,
|
|
2439
|
+
return l(m, f);
|
|
2440
2440
|
case o.Text:
|
|
2441
|
-
return d(m,
|
|
2441
|
+
return d(m, f);
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
2444
|
var a = /* @__PURE__ */ new Set([
|
|
@@ -2452,24 +2452,24 @@ function d3() {
|
|
|
2452
2452
|
"desc",
|
|
2453
2453
|
"title"
|
|
2454
2454
|
]), A = /* @__PURE__ */ new Set(["svg", "math"]);
|
|
2455
|
-
function l(m,
|
|
2455
|
+
function l(m, f) {
|
|
2456
2456
|
var R;
|
|
2457
|
-
|
|
2458
|
-
var g = "<".concat(m.name),
|
|
2459
|
-
return
|
|
2457
|
+
f.xmlMode === "foreign" && (m.name = (R = p.elementNames.get(m.name)) !== null && R !== void 0 ? R : m.name, m.parent && a.has(m.parent.name) && (f = e(e({}, f), { xmlMode: !1 }))), !f.xmlMode && A.has(m.name) && (f = e(e({}, f), { xmlMode: "foreign" }));
|
|
2458
|
+
var g = "<".concat(m.name), y = n(m.attribs, f);
|
|
2459
|
+
return y && (g += " ".concat(y)), m.children.length === 0 && (f.xmlMode ? (
|
|
2460
2460
|
// In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
|
|
2461
|
-
|
|
2461
|
+
f.selfClosingTags !== !1
|
|
2462
2462
|
) : (
|
|
2463
2463
|
// User explicitly asked for self-closing tags, even in HTML mode
|
|
2464
|
-
|
|
2465
|
-
)) ? (
|
|
2464
|
+
f.selfClosingTags && s.has(m.name)
|
|
2465
|
+
)) ? (f.xmlMode || (g += " "), g += "/>") : (g += ">", m.children.length > 0 && (g += u(m.children, f)), (f.xmlMode || !s.has(m.name)) && (g += "</".concat(m.name, ">"))), g;
|
|
2466
2466
|
}
|
|
2467
|
-
function
|
|
2467
|
+
function q(m) {
|
|
2468
2468
|
return "<".concat(m.data, ">");
|
|
2469
2469
|
}
|
|
2470
|
-
function d(m,
|
|
2470
|
+
function d(m, f) {
|
|
2471
2471
|
var R, g = m.data || "";
|
|
2472
|
-
return ((R =
|
|
2472
|
+
return ((R = f.encodeEntities) !== null && R !== void 0 ? R : f.decodeEntities) !== !1 && !(!f.xmlMode && m.parent && z.has(m.parent.name)) && (g = f.xmlMode || f.encodeEntities !== "utf8" ? (0, c.encodeXML)(g) : (0, c.escapeText)(g)), g;
|
|
2473
2473
|
}
|
|
2474
2474
|
function W(m) {
|
|
2475
2475
|
return "<![CDATA[".concat(m.children[0].data, "]]>");
|
|
@@ -2718,8 +2718,8 @@ function Qz() {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
function z(i, a, A, l) {
|
|
2720
2720
|
l === void 0 && (l = 1 / 0);
|
|
2721
|
-
var
|
|
2722
|
-
return
|
|
2721
|
+
var q = c(i);
|
|
2722
|
+
return q ? (0, b.filter)(q, a, A, l) : [];
|
|
2723
2723
|
}
|
|
2724
2724
|
function r(i, a, A) {
|
|
2725
2725
|
return A === void 0 && (A = !0), Array.isArray(a) || (a = [a]), (0, b.findOne)(M("id", i), a, A);
|
|
@@ -2797,36 +2797,36 @@ function f3() {
|
|
|
2797
2797
|
var a, A = i.children, l = {
|
|
2798
2798
|
type: "atom",
|
|
2799
2799
|
items: (0, b.getElementsByTagName)("entry", A).map(function(W) {
|
|
2800
|
-
var h, m = W.children,
|
|
2801
|
-
s(
|
|
2800
|
+
var h, m = W.children, f = { media: z(m) };
|
|
2801
|
+
s(f, "id", "id", m), s(f, "title", "title", m);
|
|
2802
2802
|
var R = (h = r("link", m)) === null || h === void 0 ? void 0 : h.attribs.href;
|
|
2803
|
-
R && (
|
|
2803
|
+
R && (f.link = R);
|
|
2804
2804
|
var g = n("summary", m) || n("content", m);
|
|
2805
|
-
g && (
|
|
2806
|
-
var
|
|
2807
|
-
return
|
|
2805
|
+
g && (f.description = g);
|
|
2806
|
+
var y = n("updated", m);
|
|
2807
|
+
return y && (f.pubDate = new Date(y)), f;
|
|
2808
2808
|
})
|
|
2809
2809
|
};
|
|
2810
2810
|
s(l, "id", "id", A), s(l, "title", "title", A);
|
|
2811
|
-
var
|
|
2812
|
-
|
|
2811
|
+
var q = (a = r("link", A)) === null || a === void 0 ? void 0 : a.attribs.href;
|
|
2812
|
+
q && (l.link = q), s(l, "description", "subtitle", A);
|
|
2813
2813
|
var d = n("updated", A);
|
|
2814
2814
|
return d && (l.updated = new Date(d)), s(l, "author", "email", A, !0), l;
|
|
2815
2815
|
}
|
|
2816
2816
|
function o(i) {
|
|
2817
|
-
var a, A, l = (A = (a = r("channel", i.children)) === null || a === void 0 ? void 0 : a.children) !== null && A !== void 0 ? A : [],
|
|
2817
|
+
var a, A, l = (A = (a = r("channel", i.children)) === null || a === void 0 ? void 0 : a.children) !== null && A !== void 0 ? A : [], q = {
|
|
2818
2818
|
type: i.name.substr(0, 3),
|
|
2819
2819
|
id: "",
|
|
2820
2820
|
items: (0, b.getElementsByTagName)("item", i.children).map(function(W) {
|
|
2821
2821
|
var h = W.children, m = { media: z(h) };
|
|
2822
2822
|
s(m, "id", "guid", h), s(m, "title", "title", h), s(m, "link", "link", h), s(m, "description", "description", h);
|
|
2823
|
-
var
|
|
2824
|
-
return
|
|
2823
|
+
var f = n("pubDate", h) || n("dc:date", h);
|
|
2824
|
+
return f && (m.pubDate = new Date(f)), m;
|
|
2825
2825
|
})
|
|
2826
2826
|
};
|
|
2827
|
-
s(
|
|
2827
|
+
s(q, "title", "title", l), s(q, "link", "link", l), s(q, "description", "description", l);
|
|
2828
2828
|
var d = n("lastBuildDate", l);
|
|
2829
|
-
return d && (
|
|
2829
|
+
return d && (q.updated = new Date(d)), s(q, "author", "managingEditor", l, !0), q;
|
|
2830
2830
|
}
|
|
2831
2831
|
var c = ["url", "type", "lang"], p = [
|
|
2832
2832
|
"fileSize",
|
|
@@ -2843,8 +2843,8 @@ function f3() {
|
|
|
2843
2843
|
for (var A = a.attribs, l = {
|
|
2844
2844
|
medium: A.medium,
|
|
2845
2845
|
isDefault: !!A.isDefault
|
|
2846
|
-
},
|
|
2847
|
-
var W = d[
|
|
2846
|
+
}, q = 0, d = c; q < d.length; q++) {
|
|
2847
|
+
var W = d[q];
|
|
2848
2848
|
A[W] && (l[W] = A[W]);
|
|
2849
2849
|
}
|
|
2850
2850
|
for (var h = 0, m = p; h < m.length; h++) {
|
|
@@ -2860,9 +2860,9 @@ function f3() {
|
|
|
2860
2860
|
function n(i, a, A) {
|
|
2861
2861
|
return A === void 0 && (A = !1), (0, e.textContent)((0, b.getElementsByTagName)(i, a, A, 1)).trim();
|
|
2862
2862
|
}
|
|
2863
|
-
function s(i, a, A, l,
|
|
2864
|
-
|
|
2865
|
-
var d = n(A, l,
|
|
2863
|
+
function s(i, a, A, l, q) {
|
|
2864
|
+
q === void 0 && (q = !1);
|
|
2865
|
+
var d = n(A, l, q);
|
|
2866
2866
|
d && (i[a] = d);
|
|
2867
2867
|
}
|
|
2868
2868
|
function u(i) {
|
|
@@ -2906,10 +2906,10 @@ function W3() {
|
|
|
2906
2906
|
return pc || (pc = 1, function(e) {
|
|
2907
2907
|
var b = y1 && y1.__createBinding || (Object.create ? function(d, W, h, m) {
|
|
2908
2908
|
m === void 0 && (m = h);
|
|
2909
|
-
var
|
|
2910
|
-
(!
|
|
2909
|
+
var f = Object.getOwnPropertyDescriptor(W, h);
|
|
2910
|
+
(!f || ("get" in f ? !W.__esModule : f.writable || f.configurable)) && (f = { enumerable: !0, get: function() {
|
|
2911
2911
|
return W[h];
|
|
2912
|
-
} }), Object.defineProperty(d, m,
|
|
2912
|
+
} }), Object.defineProperty(d, m, f);
|
|
2913
2913
|
} : function(d, W, h, m) {
|
|
2914
2914
|
m === void 0 && (m = h), d[m] = W[h];
|
|
2915
2915
|
}), t = y1 && y1.__setModuleDefault || (Object.create ? function(d, W) {
|
|
@@ -2958,10 +2958,10 @@ function W3() {
|
|
|
2958
2958
|
return A.getFeed;
|
|
2959
2959
|
} });
|
|
2960
2960
|
var l = { xmlMode: !0 };
|
|
2961
|
-
function
|
|
2961
|
+
function q(d, W) {
|
|
2962
2962
|
return W === void 0 && (W = l), (0, a.getFeed)(s(d, W));
|
|
2963
2963
|
}
|
|
2964
|
-
e.parseFeed =
|
|
2964
|
+
e.parseFeed = q, e.DomUtils = M(/* @__PURE__ */ qt());
|
|
2965
2965
|
}(y1)), y1;
|
|
2966
2966
|
}
|
|
2967
2967
|
var ft, nc;
|
|
@@ -3046,26 +3046,26 @@ function R3() {
|
|
|
3046
3046
|
}
|
|
3047
3047
|
function A(d, W, h) {
|
|
3048
3048
|
var m = {};
|
|
3049
|
-
return h.isMergeableObject(d) && u(d).forEach(function(
|
|
3050
|
-
m[
|
|
3051
|
-
}), u(W).forEach(function(
|
|
3052
|
-
a(d,
|
|
3049
|
+
return h.isMergeableObject(d) && u(d).forEach(function(f) {
|
|
3050
|
+
m[f] = z(d[f], h);
|
|
3051
|
+
}), u(W).forEach(function(f) {
|
|
3052
|
+
a(d, f) || (i(d, f) && h.isMergeableObject(W[f]) ? m[f] = n(f, h)(d[f], W[f], h) : m[f] = z(W[f], h));
|
|
3053
3053
|
}), m;
|
|
3054
3054
|
}
|
|
3055
3055
|
function l(d, W, h) {
|
|
3056
3056
|
h = h || {}, h.arrayMerge = h.arrayMerge || r, h.isMergeableObject = h.isMergeableObject || e, h.cloneUnlessOtherwiseSpecified = z;
|
|
3057
|
-
var m = Array.isArray(W),
|
|
3057
|
+
var m = Array.isArray(W), f = Array.isArray(d), R = m === f;
|
|
3058
3058
|
return R ? m ? h.arrayMerge(d, W, h) : A(d, W, h) : z(W, h);
|
|
3059
3059
|
}
|
|
3060
3060
|
l.all = function(W, h) {
|
|
3061
3061
|
if (!Array.isArray(W))
|
|
3062
3062
|
throw new Error("first argument should be an array");
|
|
3063
|
-
return W.reduce(function(m,
|
|
3064
|
-
return l(m,
|
|
3063
|
+
return W.reduce(function(m, f) {
|
|
3064
|
+
return l(m, f, h);
|
|
3065
3065
|
}, {});
|
|
3066
3066
|
};
|
|
3067
|
-
var
|
|
3068
|
-
return Wt =
|
|
3067
|
+
var q = l;
|
|
3068
|
+
return Wt = q, Wt;
|
|
3069
3069
|
}
|
|
3070
3070
|
var fb = { exports: {} }, g3 = fb.exports, ac;
|
|
3071
3071
|
function L3() {
|
|
@@ -3083,22 +3083,22 @@ function L3() {
|
|
|
3083
3083
|
m === "\r";
|
|
3084
3084
|
}
|
|
3085
3085
|
function M(m) {
|
|
3086
|
-
var
|
|
3086
|
+
var f, R = m.exec(b.substring(q));
|
|
3087
3087
|
if (R)
|
|
3088
|
-
return
|
|
3088
|
+
return f = R[0], q += f.length, f;
|
|
3089
3089
|
}
|
|
3090
|
-
for (var o = b.length, c = /^[ \t\n\r\u000c]+/, p = /^[, \t\n\r\u000c]+/, z = /^[^ \t\n\r\u000c]+/, r = /[,]+$/, n = /^\d+$/, s = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, u, i, a, A, l,
|
|
3091
|
-
if (M(p),
|
|
3090
|
+
for (var o = b.length, c = /^[ \t\n\r\u000c]+/, p = /^[, \t\n\r\u000c]+/, z = /^[^ \t\n\r\u000c]+/, r = /[,]+$/, n = /^\d+$/, s = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, u, i, a, A, l, q = 0, d = []; ; ) {
|
|
3091
|
+
if (M(p), q >= o)
|
|
3092
3092
|
return d;
|
|
3093
3093
|
u = M(z), i = [], u.slice(-1) === "," ? (u = u.replace(r, ""), h()) : W();
|
|
3094
3094
|
}
|
|
3095
3095
|
function W() {
|
|
3096
3096
|
for (M(c), a = "", A = "in descriptor"; ; ) {
|
|
3097
|
-
if (l = b.charAt(
|
|
3097
|
+
if (l = b.charAt(q), A === "in descriptor")
|
|
3098
3098
|
if (t(l))
|
|
3099
3099
|
a && (i.push(a), a = "", A = "after descriptor");
|
|
3100
3100
|
else if (l === ",") {
|
|
3101
|
-
|
|
3101
|
+
q += 1, a && i.push(a), h();
|
|
3102
3102
|
return;
|
|
3103
3103
|
} else if (l === "(")
|
|
3104
3104
|
a = a + l, A = "in parens";
|
|
@@ -3120,15 +3120,15 @@ function L3() {
|
|
|
3120
3120
|
h();
|
|
3121
3121
|
return;
|
|
3122
3122
|
} else
|
|
3123
|
-
A = "in descriptor",
|
|
3124
|
-
|
|
3123
|
+
A = "in descriptor", q -= 1;
|
|
3124
|
+
q += 1;
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
3127
|
function h() {
|
|
3128
|
-
var m = !1,
|
|
3129
|
-
for (
|
|
3130
|
-
_ = i[
|
|
3131
|
-
m ? console && console.log && console.log("Invalid srcset descriptor found in '" + b + "' at '" + _ + "'.") : (
|
|
3128
|
+
var m = !1, f, R, g, y, T = {}, _, v, B, X, C;
|
|
3129
|
+
for (y = 0; y < i.length; y++)
|
|
3130
|
+
_ = i[y], v = _[_.length - 1], B = _.substring(0, _.length - 1), X = parseInt(B, 10), C = parseFloat(B), n.test(B) && v === "w" ? ((f || R) && (m = !0), X === 0 ? m = !0 : f = X) : s.test(B) && v === "x" ? ((f || R || g) && (m = !0), C < 0 ? m = !0 : R = C) : n.test(B) && v === "h" ? ((g || R) && (m = !0), X === 0 ? m = !0 : g = X) : m = !0;
|
|
3131
|
+
m ? console && console.log && console.log("Invalid srcset descriptor found in '" + b + "' at '" + _ + "'.") : (T.url = u, f && (T.w = f), R && (T.d = R), g && (T.h = g), d.push(T));
|
|
3132
3132
|
}
|
|
3133
3133
|
};
|
|
3134
3134
|
});
|
|
@@ -3166,25 +3166,25 @@ function xM() {
|
|
|
3166
3166
|
let p = (a) => a, z = (a) => a, r = (a) => a;
|
|
3167
3167
|
if (o) {
|
|
3168
3168
|
let { bold: a, gray: A, red: l } = e.createColors(!0);
|
|
3169
|
-
z = (
|
|
3169
|
+
z = (q) => a(l(q)), p = (q) => A(q), b && (r = (q) => b(q));
|
|
3170
3170
|
}
|
|
3171
3171
|
let n = c.split(/\r?\n/), s = Math.max(this.line - 3, 0), u = Math.min(this.line + 2, n.length), i = String(u).length;
|
|
3172
3172
|
return n.slice(s, u).map((a, A) => {
|
|
3173
|
-
let l = s + 1 + A,
|
|
3173
|
+
let l = s + 1 + A, q = " " + (" " + l).slice(-i) + " | ";
|
|
3174
3174
|
if (l === this.line) {
|
|
3175
3175
|
if (a.length > 160) {
|
|
3176
3176
|
let W = 20, h = Math.max(0, this.column - W), m = Math.max(
|
|
3177
3177
|
this.column + W,
|
|
3178
3178
|
this.endColumn + W
|
|
3179
|
-
),
|
|
3180
|
-
return z(">") + p(
|
|
3179
|
+
), f = a.slice(h, m), R = p(q.replace(/\d/g, " ")) + a.slice(0, Math.min(this.column - 1, W - 1)).replace(/[^\t]/g, " ");
|
|
3180
|
+
return z(">") + p(q) + r(f) + `
|
|
3181
3181
|
` + R + z("^");
|
|
3182
3182
|
}
|
|
3183
|
-
let d = p(
|
|
3184
|
-
return z(">") + p(
|
|
3183
|
+
let d = p(q.replace(/\d/g, " ")) + a.slice(0, this.column - 1).replace(/[^\t]/g, " ");
|
|
3184
|
+
return z(">") + p(q) + r(a) + `
|
|
3185
3185
|
` + d + z("^");
|
|
3186
3186
|
}
|
|
3187
|
-
return " " + p(
|
|
3187
|
+
return " " + p(q) + r(a);
|
|
3188
3188
|
}).join(`
|
|
3189
3189
|
`);
|
|
3190
3190
|
}
|
|
@@ -3630,15 +3630,15 @@ function Hb() {
|
|
|
3630
3630
|
if (!Object.prototype.hasOwnProperty.call(this, A) || A === "parent" || A === "proxyCache") continue;
|
|
3631
3631
|
let l = this[A];
|
|
3632
3632
|
if (Array.isArray(l))
|
|
3633
|
-
u[A] = l.map((
|
|
3633
|
+
u[A] = l.map((q) => typeof q == "object" && q.toJSON ? q.toJSON(null, s) : q);
|
|
3634
3634
|
else if (typeof l == "object" && l.toJSON)
|
|
3635
3635
|
u[A] = l.toJSON(null, s);
|
|
3636
3636
|
else if (A === "source") {
|
|
3637
3637
|
if (l == null) continue;
|
|
3638
|
-
let
|
|
3639
|
-
|
|
3638
|
+
let q = s.get(l.input);
|
|
3639
|
+
q == null && (q = a, s.set(l.input, a), a++), u[A] = {
|
|
3640
3640
|
end: l.end,
|
|
3641
|
-
inputId:
|
|
3641
|
+
inputId: q,
|
|
3642
3642
|
start: l.start
|
|
3643
3643
|
};
|
|
3644
3644
|
} else
|
|
@@ -3716,7 +3716,7 @@ function H2() {
|
|
|
3716
3716
|
append(...a) {
|
|
3717
3717
|
for (let A of a) {
|
|
3718
3718
|
let l = this.normalize(A, this.last);
|
|
3719
|
-
for (let
|
|
3719
|
+
for (let q of l) this.proxyOf.nodes.push(q);
|
|
3720
3720
|
}
|
|
3721
3721
|
return this.markDirty(), this;
|
|
3722
3722
|
}
|
|
@@ -3726,10 +3726,10 @@ function H2() {
|
|
|
3726
3726
|
}
|
|
3727
3727
|
each(a) {
|
|
3728
3728
|
if (!this.proxyOf.nodes) return;
|
|
3729
|
-
let A = this.getIterator(), l,
|
|
3730
|
-
for (; this.indexes[A] < this.proxyOf.nodes.length && (l = this.indexes[A],
|
|
3729
|
+
let A = this.getIterator(), l, q;
|
|
3730
|
+
for (; this.indexes[A] < this.proxyOf.nodes.length && (l = this.indexes[A], q = a(this.proxyOf.nodes[l], l), q !== !1); )
|
|
3731
3731
|
this.indexes[A] += 1;
|
|
3732
|
-
return delete this.indexes[A],
|
|
3732
|
+
return delete this.indexes[A], q;
|
|
3733
3733
|
}
|
|
3734
3734
|
every(a) {
|
|
3735
3735
|
return this.nodes.every(a);
|
|
@@ -3743,9 +3743,9 @@ function H2() {
|
|
|
3743
3743
|
return {
|
|
3744
3744
|
get(a, A) {
|
|
3745
3745
|
return A === "proxyOf" ? a : a[A] ? A === "each" || typeof A == "string" && A.startsWith("walk") ? (...l) => a[A](
|
|
3746
|
-
...l.map((
|
|
3746
|
+
...l.map((q) => typeof q == "function" ? (d, W) => q(d.toProxy(), W) : q)
|
|
3747
3747
|
) : A === "every" || A === "some" ? (l) => a[A](
|
|
3748
|
-
(
|
|
3748
|
+
(q, ...d) => l(q.toProxy(), ...d)
|
|
3749
3749
|
) : A === "root" ? () => a.root().toProxy() : A === "nodes" ? a.nodes.map((l) => l.toProxy()) : A === "first" || A === "last" ? a[A].toProxy() : a[A] : a[A];
|
|
3750
3750
|
},
|
|
3751
3751
|
set(a, A, l) {
|
|
@@ -3757,19 +3757,19 @@ function H2() {
|
|
|
3757
3757
|
return typeof a == "number" ? a : (a.proxyOf && (a = a.proxyOf), this.proxyOf.nodes.indexOf(a));
|
|
3758
3758
|
}
|
|
3759
3759
|
insertAfter(a, A) {
|
|
3760
|
-
let l = this.index(a),
|
|
3760
|
+
let l = this.index(a), q = this.normalize(A, this.proxyOf.nodes[l]).reverse();
|
|
3761
3761
|
l = this.index(a);
|
|
3762
|
-
for (let W of
|
|
3762
|
+
for (let W of q) this.proxyOf.nodes.splice(l + 1, 0, W);
|
|
3763
3763
|
let d;
|
|
3764
3764
|
for (let W in this.indexes)
|
|
3765
|
-
d = this.indexes[W], l < d && (this.indexes[W] = d +
|
|
3765
|
+
d = this.indexes[W], l < d && (this.indexes[W] = d + q.length);
|
|
3766
3766
|
return this.markDirty(), this;
|
|
3767
3767
|
}
|
|
3768
3768
|
insertBefore(a, A) {
|
|
3769
|
-
let l = this.index(a),
|
|
3769
|
+
let l = this.index(a), q = l === 0 ? "prepend" : !1, d = this.normalize(
|
|
3770
3770
|
A,
|
|
3771
3771
|
this.proxyOf.nodes[l],
|
|
3772
|
-
|
|
3772
|
+
q
|
|
3773
3773
|
).reverse();
|
|
3774
3774
|
l = this.index(a);
|
|
3775
3775
|
for (let h of d) this.proxyOf.nodes.splice(l, 0, h);
|
|
@@ -3785,12 +3785,12 @@ function H2() {
|
|
|
3785
3785
|
a = [];
|
|
3786
3786
|
else if (Array.isArray(a)) {
|
|
3787
3787
|
a = a.slice(0);
|
|
3788
|
-
for (let
|
|
3789
|
-
|
|
3788
|
+
for (let q of a)
|
|
3789
|
+
q.parent && q.parent.removeChild(q, "ignore");
|
|
3790
3790
|
} else if (a.type === "root" && this.type !== "document") {
|
|
3791
3791
|
a = a.nodes.slice(0);
|
|
3792
|
-
for (let
|
|
3793
|
-
|
|
3792
|
+
for (let q of a)
|
|
3793
|
+
q.parent && q.parent.removeChild(q, "ignore");
|
|
3794
3794
|
} else if (a.type)
|
|
3795
3795
|
a = [a];
|
|
3796
3796
|
else if (a.prop) {
|
|
@@ -3805,15 +3805,15 @@ function H2() {
|
|
|
3805
3805
|
a = [new e(a)];
|
|
3806
3806
|
else
|
|
3807
3807
|
throw new Error("Unknown node type in node creation");
|
|
3808
|
-
return a.map((
|
|
3808
|
+
return a.map((q) => (q[o] || u.rebuild(q), q = q.proxyOf, q.parent && q.parent.removeChild(q), q[M] && s(q), q.raws || (q.raws = {}), typeof q.raws.before > "u" && A && typeof A.raws.before < "u" && (q.raws.before = A.raws.before.replace(/\S/g, "")), q.parent = this.proxyOf, q));
|
|
3809
3809
|
}
|
|
3810
3810
|
prepend(...a) {
|
|
3811
3811
|
a = a.reverse();
|
|
3812
3812
|
for (let A of a) {
|
|
3813
3813
|
let l = this.normalize(A, this.first, "prepend").reverse();
|
|
3814
|
-
for (let
|
|
3815
|
-
for (let
|
|
3816
|
-
this.indexes[
|
|
3814
|
+
for (let q of l) this.proxyOf.nodes.unshift(q);
|
|
3815
|
+
for (let q in this.indexes)
|
|
3816
|
+
this.indexes[q] = this.indexes[q] + l.length;
|
|
3817
3817
|
}
|
|
3818
3818
|
return this.markDirty(), this;
|
|
3819
3819
|
}
|
|
@@ -3832,8 +3832,8 @@ function H2() {
|
|
|
3832
3832
|
return this.markDirty(), this;
|
|
3833
3833
|
}
|
|
3834
3834
|
replaceValues(a, A, l) {
|
|
3835
|
-
return l || (l = A, A = {}), this.walkDecls((
|
|
3836
|
-
A.props && !A.props.includes(
|
|
3835
|
+
return l || (l = A, A = {}), this.walkDecls((q) => {
|
|
3836
|
+
A.props && !A.props.includes(q.prop) || A.fast && !q.value.includes(A.fast) || (q.value = q.value.replace(a, l));
|
|
3837
3837
|
}), this.markDirty(), this;
|
|
3838
3838
|
}
|
|
3839
3839
|
some(a) {
|
|
@@ -3841,25 +3841,25 @@ function H2() {
|
|
|
3841
3841
|
}
|
|
3842
3842
|
walk(a) {
|
|
3843
3843
|
return this.each((A, l) => {
|
|
3844
|
-
let
|
|
3844
|
+
let q;
|
|
3845
3845
|
try {
|
|
3846
|
-
|
|
3846
|
+
q = a(A, l);
|
|
3847
3847
|
} catch (d) {
|
|
3848
3848
|
throw A.addToError(d);
|
|
3849
3849
|
}
|
|
3850
|
-
return
|
|
3850
|
+
return q !== !1 && A.walk && (q = A.walk(a)), q;
|
|
3851
3851
|
});
|
|
3852
3852
|
}
|
|
3853
3853
|
walkAtRules(a, A) {
|
|
3854
|
-
return A ? a instanceof RegExp ? this.walk((l,
|
|
3854
|
+
return A ? a instanceof RegExp ? this.walk((l, q) => {
|
|
3855
3855
|
if (l.type === "atrule" && a.test(l.name))
|
|
3856
|
-
return A(l,
|
|
3857
|
-
}) : this.walk((l,
|
|
3856
|
+
return A(l, q);
|
|
3857
|
+
}) : this.walk((l, q) => {
|
|
3858
3858
|
if (l.type === "atrule" && l.name === a)
|
|
3859
|
-
return A(l,
|
|
3860
|
-
}) : (A = a, this.walk((l,
|
|
3859
|
+
return A(l, q);
|
|
3860
|
+
}) : (A = a, this.walk((l, q) => {
|
|
3861
3861
|
if (l.type === "atrule")
|
|
3862
|
-
return A(l,
|
|
3862
|
+
return A(l, q);
|
|
3863
3863
|
}));
|
|
3864
3864
|
}
|
|
3865
3865
|
walkComments(a) {
|
|
@@ -3869,27 +3869,27 @@ function H2() {
|
|
|
3869
3869
|
});
|
|
3870
3870
|
}
|
|
3871
3871
|
walkDecls(a, A) {
|
|
3872
|
-
return A ? a instanceof RegExp ? this.walk((l,
|
|
3872
|
+
return A ? a instanceof RegExp ? this.walk((l, q) => {
|
|
3873
3873
|
if (l.type === "decl" && a.test(l.prop))
|
|
3874
|
-
return A(l,
|
|
3875
|
-
}) : this.walk((l,
|
|
3874
|
+
return A(l, q);
|
|
3875
|
+
}) : this.walk((l, q) => {
|
|
3876
3876
|
if (l.type === "decl" && l.prop === a)
|
|
3877
|
-
return A(l,
|
|
3878
|
-
}) : (A = a, this.walk((l,
|
|
3877
|
+
return A(l, q);
|
|
3878
|
+
}) : (A = a, this.walk((l, q) => {
|
|
3879
3879
|
if (l.type === "decl")
|
|
3880
|
-
return A(l,
|
|
3880
|
+
return A(l, q);
|
|
3881
3881
|
}));
|
|
3882
3882
|
}
|
|
3883
3883
|
walkRules(a, A) {
|
|
3884
|
-
return A ? a instanceof RegExp ? this.walk((l,
|
|
3884
|
+
return A ? a instanceof RegExp ? this.walk((l, q) => {
|
|
3885
3885
|
if (l.type === "rule" && a.test(l.selector))
|
|
3886
|
-
return A(l,
|
|
3887
|
-
}) : this.walk((l,
|
|
3886
|
+
return A(l, q);
|
|
3887
|
+
}) : this.walk((l, q) => {
|
|
3888
3888
|
if (l.type === "rule" && l.selector === a)
|
|
3889
|
-
return A(l,
|
|
3890
|
-
}) : (A = a, this.walk((l,
|
|
3889
|
+
return A(l, q);
|
|
3890
|
+
}) : (A = a, this.walk((l, q) => {
|
|
3891
3891
|
if (l.type === "rule")
|
|
3892
|
-
return A(l,
|
|
3892
|
+
return A(l, q);
|
|
3893
3893
|
}));
|
|
3894
3894
|
}
|
|
3895
3895
|
}
|
|
@@ -3986,8 +3986,8 @@ function Jz() {
|
|
|
3986
3986
|
let l = n.match(s) || n.match(u);
|
|
3987
3987
|
if (l)
|
|
3988
3988
|
return p(n.substr(l[0].length));
|
|
3989
|
-
let
|
|
3990
|
-
throw
|
|
3989
|
+
let q = n.slice(22);
|
|
3990
|
+
throw q = q.slice(0, q.indexOf(",")), new Error("Unsupported source map encoding " + q);
|
|
3991
3991
|
}
|
|
3992
3992
|
getAnnotationURL(n) {
|
|
3993
3993
|
return n.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
|
|
@@ -4064,20 +4064,20 @@ function $b() {
|
|
|
4064
4064
|
let { nanoid: e } = /* @__PURE__ */ B3(), { isAbsolute: b, resolve: t } = _1, { SourceMapConsumer: M, SourceMapGenerator: o } = _1, { fileURLToPath: c, pathToFileURL: p } = _1, z = xM(), r = Jz(), n = _1, s = Symbol("lineToIndexCache"), u = !!(M && o), i = !!(t && b);
|
|
4065
4065
|
function a(l) {
|
|
4066
4066
|
if (l[s]) return l[s];
|
|
4067
|
-
let
|
|
4068
|
-
`), d = new Array(
|
|
4069
|
-
for (let h = 0, m =
|
|
4070
|
-
d[h] = W, W +=
|
|
4067
|
+
let q = l.css.split(`
|
|
4068
|
+
`), d = new Array(q.length), W = 0;
|
|
4069
|
+
for (let h = 0, m = q.length; h < m; h++)
|
|
4070
|
+
d[h] = W, W += q[h].length + 1;
|
|
4071
4071
|
return l[s] = d, d;
|
|
4072
4072
|
}
|
|
4073
4073
|
class A {
|
|
4074
4074
|
get from() {
|
|
4075
4075
|
return this.file || this.id;
|
|
4076
4076
|
}
|
|
4077
|
-
constructor(
|
|
4078
|
-
if (
|
|
4079
|
-
throw new Error(`PostCSS received ${
|
|
4080
|
-
if (this.css =
|
|
4077
|
+
constructor(q, d = {}) {
|
|
4078
|
+
if (q === null || typeof q > "u" || typeof q == "object" && !q.toString)
|
|
4079
|
+
throw new Error(`PostCSS received ${q} instead of CSS string`);
|
|
4080
|
+
if (this.css = q.toString(), this.css[0] === "\uFEFF" || this.css[0] === "" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, this.document = this.css, d.document && (this.document = d.document.toString()), d.from && (!i || /^\w+:\/\//.test(d.from) || b(d.from) ? this.file = d.from : this.file = t(d.from)), i && u) {
|
|
4081
4081
|
let W = new r(this.css, d);
|
|
4082
4082
|
if (W.text) {
|
|
4083
4083
|
this.map = W;
|
|
@@ -4087,22 +4087,22 @@ function $b() {
|
|
|
4087
4087
|
}
|
|
4088
4088
|
this.file || (this.id = "<input css " + e(6) + ">"), this.map && (this.map.file = this.from);
|
|
4089
4089
|
}
|
|
4090
|
-
error(
|
|
4091
|
-
let m,
|
|
4090
|
+
error(q, d, W, h = {}) {
|
|
4091
|
+
let m, f, R, g, y;
|
|
4092
4092
|
if (d && typeof d == "object") {
|
|
4093
|
-
let _ = d,
|
|
4093
|
+
let _ = d, v = W;
|
|
4094
4094
|
if (typeof _.offset == "number") {
|
|
4095
4095
|
g = _.offset;
|
|
4096
|
-
let
|
|
4097
|
-
d =
|
|
4096
|
+
let B = this.fromOffset(g);
|
|
4097
|
+
d = B.line, W = B.col;
|
|
4098
4098
|
} else
|
|
4099
4099
|
d = _.line, W = _.column, g = this.fromLineAndColumn(d, W);
|
|
4100
|
-
if (typeof
|
|
4101
|
-
R =
|
|
4102
|
-
let
|
|
4103
|
-
|
|
4100
|
+
if (typeof v.offset == "number") {
|
|
4101
|
+
R = v.offset;
|
|
4102
|
+
let B = this.fromOffset(R);
|
|
4103
|
+
f = B.line, m = B.col;
|
|
4104
4104
|
} else
|
|
4105
|
-
|
|
4105
|
+
f = v.line, m = v.column, R = this.fromLineAndColumn(v.line, v.column);
|
|
4106
4106
|
} else if (W)
|
|
4107
4107
|
g = this.fromLineAndColumn(d, W);
|
|
4108
4108
|
else {
|
|
@@ -4110,89 +4110,89 @@ function $b() {
|
|
|
4110
4110
|
let _ = this.fromOffset(g);
|
|
4111
4111
|
d = _.line, W = _.col;
|
|
4112
4112
|
}
|
|
4113
|
-
let
|
|
4114
|
-
return
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4113
|
+
let T = this.origin(d, W, f, m);
|
|
4114
|
+
return T ? y = new z(
|
|
4115
|
+
q,
|
|
4116
|
+
T.endLine === void 0 ? T.line : { column: T.column, line: T.line },
|
|
4117
|
+
T.endLine === void 0 ? T.column : { column: T.endColumn, line: T.endLine },
|
|
4118
|
+
T.source,
|
|
4119
|
+
T.file,
|
|
4120
4120
|
h.plugin
|
|
4121
|
-
) :
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4121
|
+
) : y = new z(
|
|
4122
|
+
q,
|
|
4123
|
+
f === void 0 ? d : { column: W, line: d },
|
|
4124
|
+
f === void 0 ? W : { column: m, line: f },
|
|
4125
4125
|
this.css,
|
|
4126
4126
|
this.file,
|
|
4127
4127
|
h.plugin
|
|
4128
|
-
),
|
|
4128
|
+
), y.input = {
|
|
4129
4129
|
column: W,
|
|
4130
4130
|
endColumn: m,
|
|
4131
|
-
endLine:
|
|
4131
|
+
endLine: f,
|
|
4132
4132
|
endOffset: R,
|
|
4133
4133
|
line: d,
|
|
4134
4134
|
offset: g,
|
|
4135
4135
|
source: this.css
|
|
4136
|
-
}, this.file && (p && (
|
|
4136
|
+
}, this.file && (p && (y.input.url = p(this.file).toString()), y.input.file = this.file), y;
|
|
4137
4137
|
}
|
|
4138
|
-
fromLineAndColumn(
|
|
4139
|
-
return a(this)[
|
|
4138
|
+
fromLineAndColumn(q, d) {
|
|
4139
|
+
return a(this)[q - 1] + d - 1;
|
|
4140
4140
|
}
|
|
4141
|
-
fromOffset(
|
|
4141
|
+
fromOffset(q) {
|
|
4142
4142
|
let d = a(this), W = d[d.length - 1], h = 0;
|
|
4143
|
-
if (
|
|
4143
|
+
if (q >= W)
|
|
4144
4144
|
h = d.length - 1;
|
|
4145
4145
|
else {
|
|
4146
|
-
let m = d.length - 2,
|
|
4146
|
+
let m = d.length - 2, f;
|
|
4147
4147
|
for (; h < m; )
|
|
4148
|
-
if (
|
|
4149
|
-
m =
|
|
4150
|
-
else if (
|
|
4151
|
-
h =
|
|
4148
|
+
if (f = h + (m - h >> 1), q < d[f])
|
|
4149
|
+
m = f - 1;
|
|
4150
|
+
else if (q >= d[f + 1])
|
|
4151
|
+
h = f + 1;
|
|
4152
4152
|
else {
|
|
4153
|
-
h =
|
|
4153
|
+
h = f;
|
|
4154
4154
|
break;
|
|
4155
4155
|
}
|
|
4156
4156
|
}
|
|
4157
4157
|
return {
|
|
4158
|
-
col:
|
|
4158
|
+
col: q - d[h] + 1,
|
|
4159
4159
|
line: h + 1
|
|
4160
4160
|
};
|
|
4161
4161
|
}
|
|
4162
|
-
mapResolve(
|
|
4163
|
-
return /^\w+:\/\//.test(
|
|
4162
|
+
mapResolve(q) {
|
|
4163
|
+
return /^\w+:\/\//.test(q) ? q : t(this.map.consumer().sourceRoot || this.map.root || ".", q);
|
|
4164
4164
|
}
|
|
4165
|
-
origin(
|
|
4165
|
+
origin(q, d, W, h) {
|
|
4166
4166
|
if (!this.map) return !1;
|
|
4167
|
-
let m = this.map.consumer(),
|
|
4168
|
-
if (!
|
|
4167
|
+
let m = this.map.consumer(), f = m.originalPositionFor({ column: d, line: q });
|
|
4168
|
+
if (!f.source) return !1;
|
|
4169
4169
|
let R;
|
|
4170
4170
|
typeof W == "number" && (R = m.originalPositionFor({ column: h, line: W }));
|
|
4171
4171
|
let g;
|
|
4172
|
-
b(
|
|
4173
|
-
|
|
4172
|
+
b(f.source) ? g = p(f.source) : g = new URL(
|
|
4173
|
+
f.source,
|
|
4174
4174
|
this.map.consumer().sourceRoot || p(this.map.mapFile)
|
|
4175
4175
|
);
|
|
4176
|
-
let
|
|
4177
|
-
column:
|
|
4176
|
+
let y = {
|
|
4177
|
+
column: f.column,
|
|
4178
4178
|
endColumn: R && R.column,
|
|
4179
4179
|
endLine: R && R.line,
|
|
4180
|
-
line:
|
|
4180
|
+
line: f.line,
|
|
4181
4181
|
url: g.toString()
|
|
4182
4182
|
};
|
|
4183
4183
|
if (g.protocol === "file:")
|
|
4184
4184
|
if (c)
|
|
4185
|
-
|
|
4185
|
+
y.file = c(g);
|
|
4186
4186
|
else
|
|
4187
4187
|
throw new Error("file: protocol is not available in this PostCSS build");
|
|
4188
|
-
let
|
|
4189
|
-
return
|
|
4188
|
+
let T = m.sourceContentFor(f.source);
|
|
4189
|
+
return T && (y.source = T), y;
|
|
4190
4190
|
}
|
|
4191
4191
|
toJSON() {
|
|
4192
|
-
let
|
|
4192
|
+
let q = {};
|
|
4193
4193
|
for (let d of ["hasBOM", "css", "file", "id"])
|
|
4194
|
-
this[d] != null && (
|
|
4195
|
-
return this.map && (
|
|
4194
|
+
this[d] != null && (q[d] = this[d]);
|
|
4195
|
+
return this.map && (q.map = { ...this.map }, q.map.consumerCache && (q.map.consumerCache = void 0)), q;
|
|
4196
4196
|
}
|
|
4197
4197
|
}
|
|
4198
4198
|
return wt = A, A.default = A, n && n.registerInput && n.registerInput(A), wt;
|
|
@@ -4389,12 +4389,12 @@ function bp() {
|
|
|
4389
4389
|
generated: { column: 0, line: 0 },
|
|
4390
4390
|
original: { column: 0, line: 0 },
|
|
4391
4391
|
source: ""
|
|
4392
|
-
},
|
|
4392
|
+
}, q, d;
|
|
4393
4393
|
this.stringify(this.root, (W, h, m) => {
|
|
4394
|
-
if (this.css += W, h && m !== "end" && (l.generated.line = i, l.generated.column = a - 1, h.source && h.source.start ? (l.source = this.sourcePath(h), l.original.line = h.source.start.line, l.original.column = h.source.start.column - 1, this.map.addMapping(l)) : (l.source = A, l.original.line = 1, l.original.column = 0, this.map.addMapping(l))), d = W.match(/\n/g), d ? (i += d.length,
|
|
4395
|
-
`), a = W.length -
|
|
4396
|
-
let
|
|
4397
|
-
(!(h.type === "decl" || h.type === "atrule" && !h.nodes) || h !==
|
|
4394
|
+
if (this.css += W, h && m !== "end" && (l.generated.line = i, l.generated.column = a - 1, h.source && h.source.start ? (l.source = this.sourcePath(h), l.original.line = h.source.start.line, l.original.column = h.source.start.column - 1, this.map.addMapping(l)) : (l.source = A, l.original.line = 1, l.original.column = 0, this.map.addMapping(l))), d = W.match(/\n/g), d ? (i += d.length, q = W.lastIndexOf(`
|
|
4395
|
+
`), a = W.length - q) : a += W.length, h && m !== "start") {
|
|
4396
|
+
let f = h.parent || { raws: {} };
|
|
4397
|
+
(!(h.type === "decl" || h.type === "atrule" && !h.nodes) || h !== f.last || f.raws.semicolon) && (h.source && h.source.end ? (l.source = this.sourcePath(h), l.original.line = h.source.end.line, l.original.column = h.source.end.column - 1, l.generated.line = i, l.generated.column = a - 2, this.map.addMapping(l)) : (l.source = A, l.original.line = 1, l.original.column = 0, l.generated.line = i, l.generated.column = a - 1, this.map.addMapping(l)));
|
|
4398
4398
|
}
|
|
4399
4399
|
});
|
|
4400
4400
|
}
|
|
@@ -4489,14 +4489,14 @@ var It, _c;
|
|
|
4489
4489
|
function _3() {
|
|
4490
4490
|
if (_c) return It;
|
|
4491
4491
|
_c = 1;
|
|
4492
|
-
const e = 39, b = 34, t = 92, M = 47, o = 10, c = 32, p = 12, z = 9, r = 13, n = 91, s = 93, u = 40, i = 41, a = 123, A = 125, l = 59,
|
|
4493
|
-
return It = function(
|
|
4494
|
-
let _ =
|
|
4492
|
+
const e = 39, b = 34, t = 92, M = 47, o = 10, c = 32, p = 12, z = 9, r = 13, n = 91, s = 93, u = 40, i = 41, a = 123, A = 125, l = 59, q = 42, d = 58, W = 64, h = /[\t\n\f\r "#'()/;[\\\]{}]/g, m = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, f = /.[\r\n"'(/\\]/, R = /[\da-f]/i;
|
|
4493
|
+
return It = function(y, T = {}) {
|
|
4494
|
+
let _ = y.css.valueOf(), v = T.ignoreErrors, B, X, C, x, H, G, K, p0, M0, L0, d0 = _.length, b0 = 0, t0 = [], u0 = [], T0 = -1;
|
|
4495
4495
|
function l0() {
|
|
4496
4496
|
return b0;
|
|
4497
4497
|
}
|
|
4498
4498
|
function G0(P) {
|
|
4499
|
-
throw
|
|
4499
|
+
throw y.error("Unclosed " + P, b0);
|
|
4500
4500
|
}
|
|
4501
4501
|
function t1() {
|
|
4502
4502
|
return u0.length === 0 && b0 >= d0;
|
|
@@ -4505,7 +4505,7 @@ function _3() {
|
|
|
4505
4505
|
if (u0.length) return u0.pop();
|
|
4506
4506
|
if (b0 >= d0) return;
|
|
4507
4507
|
let N = P ? P.ignoreUnclosed : !1;
|
|
4508
|
-
switch (
|
|
4508
|
+
switch (B = _.charCodeAt(b0), B) {
|
|
4509
4509
|
case o:
|
|
4510
4510
|
case c:
|
|
4511
4511
|
case z:
|
|
@@ -4513,8 +4513,8 @@ function _3() {
|
|
|
4513
4513
|
case p: {
|
|
4514
4514
|
x = b0;
|
|
4515
4515
|
do
|
|
4516
|
-
x += 1,
|
|
4517
|
-
while (
|
|
4516
|
+
x += 1, B = _.charCodeAt(x);
|
|
4517
|
+
while (B === c || B === o || B === z || B === r || B === p);
|
|
4518
4518
|
G = ["space", _.slice(b0, x)], b0 = x - 1;
|
|
4519
4519
|
break;
|
|
4520
4520
|
}
|
|
@@ -4525,7 +4525,7 @@ function _3() {
|
|
|
4525
4525
|
case d:
|
|
4526
4526
|
case l:
|
|
4527
4527
|
case i: {
|
|
4528
|
-
let S = String.fromCharCode(
|
|
4528
|
+
let S = String.fromCharCode(B);
|
|
4529
4529
|
G = [S, S, b0];
|
|
4530
4530
|
break;
|
|
4531
4531
|
}
|
|
@@ -4534,7 +4534,7 @@ function _3() {
|
|
|
4534
4534
|
x = b0;
|
|
4535
4535
|
do {
|
|
4536
4536
|
if (K = !1, x = _.indexOf(")", x + 1), x === -1)
|
|
4537
|
-
if (
|
|
4537
|
+
if (v || N) {
|
|
4538
4538
|
x = b0;
|
|
4539
4539
|
break;
|
|
4540
4540
|
} else
|
|
@@ -4543,15 +4543,15 @@ function _3() {
|
|
|
4543
4543
|
p0 -= 1, K = !K;
|
|
4544
4544
|
} while (K);
|
|
4545
4545
|
G = ["brackets", _.slice(b0, x + 1), b0, x], b0 = x;
|
|
4546
|
-
} else b0 <= T0 ? G = ["(", "(", b0] : (x = _.indexOf(")", b0 + 1), X = _.slice(b0, x + 1), x === -1 ||
|
|
4546
|
+
} else b0 <= T0 ? G = ["(", "(", b0] : (x = _.indexOf(")", b0 + 1), X = _.slice(b0, x + 1), x === -1 || f.test(X) ? (T0 = x === -1 ? d0 : x, G = ["(", "(", b0]) : (G = ["brackets", X, b0, x], b0 = x));
|
|
4547
4547
|
break;
|
|
4548
4548
|
}
|
|
4549
4549
|
case e:
|
|
4550
4550
|
case b: {
|
|
4551
|
-
H =
|
|
4551
|
+
H = B === e ? "'" : '"', x = b0;
|
|
4552
4552
|
do {
|
|
4553
4553
|
if (K = !1, x = _.indexOf(H, x + 1), x === -1)
|
|
4554
|
-
if (
|
|
4554
|
+
if (v || N) {
|
|
4555
4555
|
x = b0 + 1;
|
|
4556
4556
|
break;
|
|
4557
4557
|
} else
|
|
@@ -4569,7 +4569,7 @@ function _3() {
|
|
|
4569
4569
|
case t: {
|
|
4570
4570
|
for (x = b0, C = !0; _.charCodeAt(x + 1) === t; )
|
|
4571
4571
|
x += 1, C = !C;
|
|
4572
|
-
if (
|
|
4572
|
+
if (B = _.charCodeAt(x + 1), C && B !== M && B !== c && B !== o && B !== z && B !== r && B !== p && (x += 1, R.test(_.charAt(x)))) {
|
|
4573
4573
|
for (; R.test(_.charAt(x + 1)); )
|
|
4574
4574
|
x += 1;
|
|
4575
4575
|
_.charCodeAt(x + 1) === c && (x += 1);
|
|
@@ -4578,7 +4578,7 @@ function _3() {
|
|
|
4578
4578
|
break;
|
|
4579
4579
|
}
|
|
4580
4580
|
default: {
|
|
4581
|
-
|
|
4581
|
+
B === M && _.charCodeAt(b0 + 1) === q ? (x = _.indexOf("*/", b0 + 2) + 1, x === 0 && (v || N ? x = _.length : G0("comment")), G = ["comment", _.slice(b0, x + 1), b0, x], b0 = x) : (m.lastIndex = b0 + 1, m.test(_), m.lastIndex === 0 ? x = _.length - 1 : x = m.lastIndex - 2, G = ["word", _.slice(b0, x + 1), b0, x], t0.push(G), b0 = x);
|
|
4582
4582
|
break;
|
|
4583
4583
|
}
|
|
4584
4584
|
}
|
|
@@ -4617,14 +4617,14 @@ function w3() {
|
|
|
4617
4617
|
atrule(s) {
|
|
4618
4618
|
let u = new e();
|
|
4619
4619
|
u.name = s[1].slice(1), u.name === "" && this.unnamedAtrule(u, s), this.init(u, s[2]);
|
|
4620
|
-
let i, a, A, l = !1,
|
|
4620
|
+
let i, a, A, l = !1, q = !1, d = [], W = [];
|
|
4621
4621
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
4622
4622
|
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)
|
|
4623
4623
|
if (i === ";") {
|
|
4624
4624
|
u.source.end = this.getPosition(s[2]), u.source.end.offset++, this.semicolon = !0;
|
|
4625
4625
|
break;
|
|
4626
4626
|
} else if (i === "{") {
|
|
4627
|
-
|
|
4627
|
+
q = !0;
|
|
4628
4628
|
break;
|
|
4629
4629
|
} else if (i === "}") {
|
|
4630
4630
|
if (d.length > 0) {
|
|
@@ -4643,7 +4643,7 @@ function w3() {
|
|
|
4643
4643
|
break;
|
|
4644
4644
|
}
|
|
4645
4645
|
}
|
|
4646
|
-
u.raws.between = this.spacesAndCommentsFromEnd(d), d.length ? (u.raws.afterName = this.spacesAndCommentsFromStart(d), this.raw(u, "params", d), l && (s = d[d.length - 1], u.source.end = this.getPosition(s[3] || s[2]), u.source.end.offset++, this.spaces = u.raws.between, u.raws.between = "")) : (u.raws.afterName = "", u.params = ""),
|
|
4646
|
+
u.raws.between = this.spacesAndCommentsFromEnd(d), d.length ? (u.raws.afterName = this.spacesAndCommentsFromStart(d), this.raw(u, "params", d), l && (s = d[d.length - 1], u.source.end = this.getPosition(s[3] || s[2]), u.source.end.offset++, this.spaces = u.raws.between, u.raws.between = "")) : (u.raws.afterName = "", u.params = ""), q && (u.nodes = [], this.current = u);
|
|
4647
4647
|
}
|
|
4648
4648
|
checkMissedSemicolon(s) {
|
|
4649
4649
|
let u = this.colon(s);
|
|
@@ -4658,8 +4658,8 @@ function w3() {
|
|
|
4658
4658
|
}
|
|
4659
4659
|
colon(s) {
|
|
4660
4660
|
let u = 0, i, a, A;
|
|
4661
|
-
for (let [l,
|
|
4662
|
-
if (a =
|
|
4661
|
+
for (let [l, q] of s.entries()) {
|
|
4662
|
+
if (a = q, A = a[0], A === "(" && (u += 1), A === ")" && (u -= 1), u === 0 && A === ":")
|
|
4663
4663
|
if (!i)
|
|
4664
4664
|
this.doubleColon(a);
|
|
4665
4665
|
else {
|
|
@@ -4708,8 +4708,8 @@ function w3() {
|
|
|
4708
4708
|
} else
|
|
4709
4709
|
A[0] === "word" && /\w/.test(A[1]) && this.unknownWord([A]), i.raws.between += A[1];
|
|
4710
4710
|
(i.prop[0] === "_" || i.prop[0] === "*") && (i.raws.before += i.prop[0], i.prop = i.prop.slice(1));
|
|
4711
|
-
let l = [],
|
|
4712
|
-
for (; s.length && (
|
|
4711
|
+
let l = [], q;
|
|
4712
|
+
for (; s.length && (q = s[0][0], !(q !== "space" && q !== "comment")); )
|
|
4713
4713
|
l.push(s.shift());
|
|
4714
4714
|
this.precheckMissedSemicolon(s);
|
|
4715
4715
|
for (let W = s.length - 1; W >= 0; W--) {
|
|
@@ -4720,8 +4720,8 @@ function w3() {
|
|
|
4720
4720
|
break;
|
|
4721
4721
|
} else if (A[1].toLowerCase() === "important") {
|
|
4722
4722
|
let h = s.slice(0), m = "";
|
|
4723
|
-
for (let
|
|
4724
|
-
let R = h[
|
|
4723
|
+
for (let f = W; f > 0; f--) {
|
|
4724
|
+
let R = h[f][0];
|
|
4725
4725
|
if (m.trim().startsWith("!") && R !== "space")
|
|
4726
4726
|
break;
|
|
4727
4727
|
m = h.pop()[1] + m;
|
|
@@ -4772,16 +4772,16 @@ function w3() {
|
|
|
4772
4772
|
}, s.raws.before = this.spaces, this.spaces = "", s.type !== "comment" && (this.semicolon = !1);
|
|
4773
4773
|
}
|
|
4774
4774
|
other(s) {
|
|
4775
|
-
let u = !1, i = null, a = !1, A = null, l = [],
|
|
4775
|
+
let u = !1, i = null, a = !1, A = null, l = [], q = s[1].startsWith("--"), d = [], W = s;
|
|
4776
4776
|
for (; W; ) {
|
|
4777
4777
|
if (i = W[0], d.push(W), i === "(" || i === "[")
|
|
4778
4778
|
A || (A = W), l.push(i === "(" ? ")" : "]");
|
|
4779
|
-
else if (
|
|
4779
|
+
else if (q && a && i === "{")
|
|
4780
4780
|
A || (A = W), l.push("}");
|
|
4781
4781
|
else if (l.length === 0)
|
|
4782
4782
|
if (i === ";")
|
|
4783
4783
|
if (a) {
|
|
4784
|
-
this.decl(d,
|
|
4784
|
+
this.decl(d, q);
|
|
4785
4785
|
return;
|
|
4786
4786
|
} else
|
|
4787
4787
|
break;
|
|
@@ -4796,10 +4796,10 @@ function w3() {
|
|
|
4796
4796
|
W = this.tokenizer.nextToken();
|
|
4797
4797
|
}
|
|
4798
4798
|
if (this.tokenizer.endOfFile() && (u = !0), l.length > 0 && this.unclosedBracket(A), u && a) {
|
|
4799
|
-
if (!
|
|
4799
|
+
if (!q)
|
|
4800
4800
|
for (; d.length && (W = d[d.length - 1][0], !(W !== "space" && W !== "comment")); )
|
|
4801
4801
|
this.tokenizer.back(d.pop());
|
|
4802
|
-
this.decl(d,
|
|
4802
|
+
this.decl(d, q);
|
|
4803
4803
|
} else
|
|
4804
4804
|
this.unknownWord(d);
|
|
4805
4805
|
}
|
|
@@ -4834,12 +4834,12 @@ function w3() {
|
|
|
4834
4834
|
precheckMissedSemicolon() {
|
|
4835
4835
|
}
|
|
4836
4836
|
raw(s, u, i, a) {
|
|
4837
|
-
let A, l,
|
|
4838
|
-
for (let
|
|
4839
|
-
A = i[
|
|
4837
|
+
let A, l, q = i.length, d = "", W = !0, h, m;
|
|
4838
|
+
for (let f = 0; f < q; f += 1)
|
|
4839
|
+
A = i[f], l = A[0], l === "space" && f === q - 1 && !a ? W = !1 : l === "comment" ? (m = i[f - 1] ? i[f - 1][0] : "empty", h = i[f + 1] ? i[f + 1][0] : "empty", !p[m] && !p[h] ? d.slice(-1) === "," ? W = !1 : d += A[1] : W = !1) : d += A[1];
|
|
4840
4840
|
if (!W) {
|
|
4841
|
-
let
|
|
4842
|
-
s.raws[u] = { raw:
|
|
4841
|
+
let f = i.reduce((R, g) => R + g[1], "");
|
|
4842
|
+
s.raws[u] = { raw: f, value: d };
|
|
4843
4843
|
}
|
|
4844
4844
|
s[u] = d;
|
|
4845
4845
|
}
|
|
@@ -5022,20 +5022,20 @@ function op() {
|
|
|
5022
5022
|
return typeof m == "object" && typeof m.then == "function";
|
|
5023
5023
|
}
|
|
5024
5024
|
function l(m) {
|
|
5025
|
-
let
|
|
5026
|
-
return m.type === "decl" ?
|
|
5025
|
+
let f = !1, R = s[m.type];
|
|
5026
|
+
return m.type === "decl" ? f = m.prop.toLowerCase() : m.type === "atrule" && (f = m.name.toLowerCase()), f && m.append ? [
|
|
5027
5027
|
R,
|
|
5028
|
-
R + "-" +
|
|
5028
|
+
R + "-" + f,
|
|
5029
5029
|
a,
|
|
5030
5030
|
R + "Exit",
|
|
5031
|
-
R + "Exit-" +
|
|
5032
|
-
] :
|
|
5031
|
+
R + "Exit-" + f
|
|
5032
|
+
] : f ? [R, R + "-" + f, R + "Exit", R + "Exit-" + f] : m.append ? [R, a, R + "Exit"] : [R, R + "Exit"];
|
|
5033
5033
|
}
|
|
5034
|
-
function
|
|
5035
|
-
let
|
|
5036
|
-
return m.type === "document" ?
|
|
5034
|
+
function q(m) {
|
|
5035
|
+
let f;
|
|
5036
|
+
return m.type === "document" ? f = ["Document", a, "DocumentExit"] : m.type === "root" ? f = ["Root", a, "RootExit"] : f = l(m), {
|
|
5037
5037
|
eventIndex: 0,
|
|
5038
|
-
events:
|
|
5038
|
+
events: f,
|
|
5039
5039
|
iterator: 0,
|
|
5040
5040
|
node: m,
|
|
5041
5041
|
visitorIndex: 0,
|
|
@@ -5043,7 +5043,7 @@ function op() {
|
|
|
5043
5043
|
};
|
|
5044
5044
|
}
|
|
5045
5045
|
function d(m) {
|
|
5046
|
-
return m[z] = !1, m.nodes && m.nodes.forEach((
|
|
5046
|
+
return m[z] = !1, m.nodes && m.nodes.forEach((f) => d(f)), m;
|
|
5047
5047
|
}
|
|
5048
5048
|
let W = {};
|
|
5049
5049
|
class h {
|
|
@@ -5071,57 +5071,57 @@ function op() {
|
|
|
5071
5071
|
get [Symbol.toStringTag]() {
|
|
5072
5072
|
return "LazyResult";
|
|
5073
5073
|
}
|
|
5074
|
-
constructor(
|
|
5074
|
+
constructor(f, R, g) {
|
|
5075
5075
|
this.stringified = !1, this.processed = !1;
|
|
5076
|
-
let
|
|
5076
|
+
let y;
|
|
5077
5077
|
if (typeof R == "object" && R !== null && (R.type === "root" || R.type === "document"))
|
|
5078
|
-
|
|
5078
|
+
y = d(R);
|
|
5079
5079
|
else if (R instanceof h || R instanceof o)
|
|
5080
|
-
|
|
5080
|
+
y = d(R.root), R.map && (typeof g.map > "u" && (g.map = {}), g.map.inline || (g.map.inline = !1), g.map.prev = R.map);
|
|
5081
5081
|
else {
|
|
5082
|
-
let
|
|
5083
|
-
g.syntax && (
|
|
5082
|
+
let T = M;
|
|
5083
|
+
g.syntax && (T = g.syntax.parse), g.parser && (T = g.parser), T.parse && (T = T.parse);
|
|
5084
5084
|
try {
|
|
5085
|
-
|
|
5085
|
+
y = T(R, g);
|
|
5086
5086
|
} catch (_) {
|
|
5087
5087
|
this.processed = !0, this.error = _;
|
|
5088
5088
|
}
|
|
5089
|
-
|
|
5089
|
+
y && !y[r] && e.rebuild(y);
|
|
5090
5090
|
}
|
|
5091
|
-
this.result = new o(
|
|
5091
|
+
this.result = new o(f, y, g), this.helpers = { ...W, postcss: W, result: this.result }, this.plugins = this.processor.plugins.map((T) => typeof T == "object" && T.prepare ? { ...T, ...T.prepare(this.result) } : T);
|
|
5092
5092
|
}
|
|
5093
5093
|
async() {
|
|
5094
5094
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
5095
5095
|
}
|
|
5096
|
-
catch(
|
|
5097
|
-
return this.async().catch(
|
|
5096
|
+
catch(f) {
|
|
5097
|
+
return this.async().catch(f);
|
|
5098
5098
|
}
|
|
5099
|
-
finally(
|
|
5100
|
-
return this.async().then(
|
|
5099
|
+
finally(f) {
|
|
5100
|
+
return this.async().then(f, f);
|
|
5101
5101
|
}
|
|
5102
5102
|
getAsyncError() {
|
|
5103
5103
|
throw new Error("Use process(css).then(cb) to work with async plugins");
|
|
5104
5104
|
}
|
|
5105
|
-
handleError(
|
|
5105
|
+
handleError(f, R) {
|
|
5106
5106
|
let g = this.result.lastPlugin;
|
|
5107
5107
|
try {
|
|
5108
|
-
if (R && R.addToError(
|
|
5109
|
-
|
|
5108
|
+
if (R && R.addToError(f), this.error = f, f.name === "CssSyntaxError" && !f.plugin)
|
|
5109
|
+
f.plugin = g.postcssPlugin, f.setMessage();
|
|
5110
5110
|
else if (g.postcssVersion && process.env.NODE_ENV !== "production") {
|
|
5111
|
-
let
|
|
5112
|
-
(
|
|
5113
|
-
"Unknown error from PostCSS plugin. Your current PostCSS version is " + _ + ", but " +
|
|
5111
|
+
let y = g.postcssPlugin, T = g.postcssVersion, _ = this.result.processor.version, v = T.split("."), B = _.split(".");
|
|
5112
|
+
(v[0] !== B[0] || parseInt(v[1]) > parseInt(B[1])) && console.error(
|
|
5113
|
+
"Unknown error from PostCSS plugin. Your current PostCSS version is " + _ + ", but " + y + " uses " + T + ". Perhaps this is the source of the error below."
|
|
5114
5114
|
);
|
|
5115
5115
|
}
|
|
5116
|
-
} catch (
|
|
5117
|
-
console && console.error && console.error(
|
|
5116
|
+
} catch (y) {
|
|
5117
|
+
console && console.error && console.error(y);
|
|
5118
5118
|
}
|
|
5119
|
-
return
|
|
5119
|
+
return f;
|
|
5120
5120
|
}
|
|
5121
5121
|
prepareVisitors() {
|
|
5122
5122
|
this.listeners = {};
|
|
5123
|
-
let
|
|
5124
|
-
this.listeners[g] || (this.listeners[g] = []), this.listeners[g].push([R,
|
|
5123
|
+
let f = (R, g, y) => {
|
|
5124
|
+
this.listeners[g] || (this.listeners[g] = []), this.listeners[g].push([R, y]);
|
|
5125
5125
|
};
|
|
5126
5126
|
for (let R of this.plugins)
|
|
5127
5127
|
if (typeof R == "object")
|
|
@@ -5132,40 +5132,40 @@ function op() {
|
|
|
5132
5132
|
);
|
|
5133
5133
|
if (!i[g])
|
|
5134
5134
|
if (typeof R[g] == "object")
|
|
5135
|
-
for (let
|
|
5136
|
-
|
|
5135
|
+
for (let y in R[g])
|
|
5136
|
+
y === "*" ? f(R, g, R[g][y]) : f(
|
|
5137
5137
|
R,
|
|
5138
|
-
g + "-" +
|
|
5139
|
-
R[g][
|
|
5138
|
+
g + "-" + y.toLowerCase(),
|
|
5139
|
+
R[g][y]
|
|
5140
5140
|
);
|
|
5141
|
-
else typeof R[g] == "function" &&
|
|
5141
|
+
else typeof R[g] == "function" && f(R, g, R[g]);
|
|
5142
5142
|
}
|
|
5143
5143
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
5144
5144
|
}
|
|
5145
5145
|
async runAsync() {
|
|
5146
5146
|
this.plugin = 0;
|
|
5147
|
-
for (let
|
|
5148
|
-
let R = this.plugins[
|
|
5147
|
+
for (let f = 0; f < this.plugins.length; f++) {
|
|
5148
|
+
let R = this.plugins[f], g = this.runOnRoot(R);
|
|
5149
5149
|
if (A(g))
|
|
5150
5150
|
try {
|
|
5151
5151
|
await g;
|
|
5152
|
-
} catch (
|
|
5153
|
-
throw this.handleError(
|
|
5152
|
+
} catch (y) {
|
|
5153
|
+
throw this.handleError(y);
|
|
5154
5154
|
}
|
|
5155
5155
|
}
|
|
5156
5156
|
if (this.prepareVisitors(), this.hasListener) {
|
|
5157
|
-
let
|
|
5158
|
-
for (; !
|
|
5159
|
-
|
|
5160
|
-
let R = [f
|
|
5157
|
+
let f = this.result.root;
|
|
5158
|
+
for (; !f[z]; ) {
|
|
5159
|
+
f[z] = !0;
|
|
5160
|
+
let R = [q(f)];
|
|
5161
5161
|
for (; R.length > 0; ) {
|
|
5162
5162
|
let g = this.visitTick(R);
|
|
5163
5163
|
if (A(g))
|
|
5164
5164
|
try {
|
|
5165
5165
|
await g;
|
|
5166
|
-
} catch (
|
|
5167
|
-
let
|
|
5168
|
-
throw this.handleError(
|
|
5166
|
+
} catch (y) {
|
|
5167
|
+
let T = R[R.length - 1].node;
|
|
5168
|
+
throw this.handleError(y, T);
|
|
5169
5169
|
}
|
|
5170
5170
|
}
|
|
5171
5171
|
}
|
|
@@ -5173,33 +5173,33 @@ function op() {
|
|
|
5173
5173
|
for (let [R, g] of this.listeners.OnceExit) {
|
|
5174
5174
|
this.result.lastPlugin = R;
|
|
5175
5175
|
try {
|
|
5176
|
-
if (
|
|
5177
|
-
let
|
|
5178
|
-
(
|
|
5176
|
+
if (f.type === "document") {
|
|
5177
|
+
let y = f.nodes.map(
|
|
5178
|
+
(T) => g(T, this.helpers)
|
|
5179
5179
|
);
|
|
5180
|
-
await Promise.all(
|
|
5180
|
+
await Promise.all(y);
|
|
5181
5181
|
} else
|
|
5182
|
-
await g(
|
|
5183
|
-
} catch (
|
|
5184
|
-
throw this.handleError(
|
|
5182
|
+
await g(f, this.helpers);
|
|
5183
|
+
} catch (y) {
|
|
5184
|
+
throw this.handleError(y);
|
|
5185
5185
|
}
|
|
5186
5186
|
}
|
|
5187
5187
|
}
|
|
5188
5188
|
return this.processed = !0, this.stringify();
|
|
5189
5189
|
}
|
|
5190
|
-
runOnRoot(
|
|
5191
|
-
this.result.lastPlugin =
|
|
5190
|
+
runOnRoot(f) {
|
|
5191
|
+
this.result.lastPlugin = f;
|
|
5192
5192
|
try {
|
|
5193
|
-
if (typeof
|
|
5193
|
+
if (typeof f == "object" && f.Once) {
|
|
5194
5194
|
if (this.result.root.type === "document") {
|
|
5195
5195
|
let R = this.result.root.nodes.map(
|
|
5196
|
-
(g) =>
|
|
5196
|
+
(g) => f.Once(g, this.helpers)
|
|
5197
5197
|
);
|
|
5198
5198
|
return A(R[0]) ? Promise.all(R) : R;
|
|
5199
5199
|
}
|
|
5200
|
-
return
|
|
5201
|
-
} else if (typeof
|
|
5202
|
-
return
|
|
5200
|
+
return f.Once(this.result.root, this.helpers);
|
|
5201
|
+
} else if (typeof f == "function")
|
|
5202
|
+
return f(this.result.root, this.result);
|
|
5203
5203
|
} catch (R) {
|
|
5204
5204
|
throw this.handleError(R);
|
|
5205
5205
|
}
|
|
@@ -5208,91 +5208,91 @@ function op() {
|
|
|
5208
5208
|
if (this.error) throw this.error;
|
|
5209
5209
|
if (this.stringified) return this.result;
|
|
5210
5210
|
this.stringified = !0, this.sync();
|
|
5211
|
-
let
|
|
5212
|
-
|
|
5211
|
+
let f = this.result.opts, R = p;
|
|
5212
|
+
f.syntax && (R = f.syntax.stringify), f.stringifier && (R = f.stringifier), R.stringify && (R = R.stringify);
|
|
5213
5213
|
let g = this.result.root.source;
|
|
5214
|
-
if (
|
|
5214
|
+
if (f.map === void 0 && !(g && g.input && g.input.map)) {
|
|
5215
5215
|
let _ = "";
|
|
5216
|
-
return R(this.result.root, (
|
|
5217
|
-
_ +=
|
|
5216
|
+
return R(this.result.root, (v) => {
|
|
5217
|
+
_ += v;
|
|
5218
5218
|
}), this.result.css = _, this.result;
|
|
5219
5219
|
}
|
|
5220
|
-
let
|
|
5221
|
-
return this.result.css =
|
|
5220
|
+
let T = new t(R, this.result.root, this.result.opts).generate();
|
|
5221
|
+
return this.result.css = T[0], this.result.map = T[1], this.result;
|
|
5222
5222
|
}
|
|
5223
5223
|
sync() {
|
|
5224
5224
|
if (this.error) throw this.error;
|
|
5225
5225
|
if (this.processed) return this.result;
|
|
5226
5226
|
if (this.processed = !0, this.processing)
|
|
5227
5227
|
throw this.getAsyncError();
|
|
5228
|
-
for (let
|
|
5229
|
-
let R = this.runOnRoot(
|
|
5228
|
+
for (let f of this.plugins) {
|
|
5229
|
+
let R = this.runOnRoot(f);
|
|
5230
5230
|
if (A(R))
|
|
5231
5231
|
throw this.getAsyncError();
|
|
5232
5232
|
}
|
|
5233
5233
|
if (this.prepareVisitors(), this.hasListener) {
|
|
5234
|
-
let
|
|
5235
|
-
for (; !
|
|
5236
|
-
|
|
5234
|
+
let f = this.result.root;
|
|
5235
|
+
for (; !f[z]; )
|
|
5236
|
+
f[z] = !0, this.walkSync(f);
|
|
5237
5237
|
if (this.listeners.OnceExit)
|
|
5238
|
-
if (
|
|
5239
|
-
for (let R of
|
|
5238
|
+
if (f.type === "document")
|
|
5239
|
+
for (let R of f.nodes)
|
|
5240
5240
|
this.visitSync(this.listeners.OnceExit, R);
|
|
5241
5241
|
else
|
|
5242
|
-
this.visitSync(this.listeners.OnceExit,
|
|
5242
|
+
this.visitSync(this.listeners.OnceExit, f);
|
|
5243
5243
|
}
|
|
5244
5244
|
return this.result;
|
|
5245
5245
|
}
|
|
5246
|
-
then(
|
|
5246
|
+
then(f, R) {
|
|
5247
5247
|
return process.env.NODE_ENV !== "production" && ("from" in this.opts || n(
|
|
5248
5248
|
"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."
|
|
5249
|
-
)), this.async().then(
|
|
5249
|
+
)), this.async().then(f, R);
|
|
5250
5250
|
}
|
|
5251
5251
|
toString() {
|
|
5252
5252
|
return this.css;
|
|
5253
5253
|
}
|
|
5254
|
-
visitSync(
|
|
5255
|
-
for (let [g,
|
|
5254
|
+
visitSync(f, R) {
|
|
5255
|
+
for (let [g, y] of f) {
|
|
5256
5256
|
this.result.lastPlugin = g;
|
|
5257
|
-
let
|
|
5257
|
+
let T;
|
|
5258
5258
|
try {
|
|
5259
|
-
|
|
5259
|
+
T = y(R, this.helpers);
|
|
5260
5260
|
} catch (_) {
|
|
5261
5261
|
throw this.handleError(_, R.proxyOf);
|
|
5262
5262
|
}
|
|
5263
5263
|
if (R.type !== "root" && R.type !== "document" && !R.parent)
|
|
5264
5264
|
return !0;
|
|
5265
|
-
if (A(
|
|
5265
|
+
if (A(T))
|
|
5266
5266
|
throw this.getAsyncError();
|
|
5267
5267
|
}
|
|
5268
5268
|
}
|
|
5269
|
-
visitTick(
|
|
5270
|
-
let R =
|
|
5269
|
+
visitTick(f) {
|
|
5270
|
+
let R = f[f.length - 1], { node: g, visitors: y } = R;
|
|
5271
5271
|
if (g.type !== "root" && g.type !== "document" && !g.parent) {
|
|
5272
|
-
|
|
5272
|
+
f.pop();
|
|
5273
5273
|
return;
|
|
5274
5274
|
}
|
|
5275
|
-
if (
|
|
5276
|
-
let [_,
|
|
5277
|
-
R.visitorIndex += 1, R.visitorIndex ===
|
|
5275
|
+
if (y.length > 0 && R.visitorIndex < y.length) {
|
|
5276
|
+
let [_, v] = y[R.visitorIndex];
|
|
5277
|
+
R.visitorIndex += 1, R.visitorIndex === y.length && (R.visitors = [], R.visitorIndex = 0), this.result.lastPlugin = _;
|
|
5278
5278
|
try {
|
|
5279
|
-
return
|
|
5280
|
-
} catch (
|
|
5281
|
-
throw this.handleError(
|
|
5279
|
+
return v(g.toProxy(), this.helpers);
|
|
5280
|
+
} catch (B) {
|
|
5281
|
+
throw this.handleError(B, g);
|
|
5282
5282
|
}
|
|
5283
5283
|
}
|
|
5284
5284
|
if (R.iterator !== 0) {
|
|
5285
|
-
let _ = R.iterator,
|
|
5286
|
-
for (;
|
|
5287
|
-
if (g.indexes[_] += 1, !
|
|
5288
|
-
|
|
5285
|
+
let _ = R.iterator, v;
|
|
5286
|
+
for (; v = g.nodes[g.indexes[_]]; )
|
|
5287
|
+
if (g.indexes[_] += 1, !v[z]) {
|
|
5288
|
+
v[z] = !0, f.push(q(v));
|
|
5289
5289
|
return;
|
|
5290
5290
|
}
|
|
5291
5291
|
R.iterator = 0, delete g.indexes[_];
|
|
5292
5292
|
}
|
|
5293
|
-
let
|
|
5294
|
-
for (; R.eventIndex <
|
|
5295
|
-
let _ =
|
|
5293
|
+
let T = R.events;
|
|
5294
|
+
for (; R.eventIndex < T.length; ) {
|
|
5295
|
+
let _ = T[R.eventIndex];
|
|
5296
5296
|
if (R.eventIndex += 1, _ === a) {
|
|
5297
5297
|
g.nodes && g.nodes.length && (g[z] = !0, R.iterator = g.getIterator());
|
|
5298
5298
|
return;
|
|
@@ -5301,19 +5301,19 @@ function op() {
|
|
|
5301
5301
|
return;
|
|
5302
5302
|
}
|
|
5303
5303
|
}
|
|
5304
|
-
|
|
5304
|
+
f.pop();
|
|
5305
5305
|
}
|
|
5306
|
-
walkSync(
|
|
5307
|
-
|
|
5308
|
-
let R = l(
|
|
5306
|
+
walkSync(f) {
|
|
5307
|
+
f[z] = !0;
|
|
5308
|
+
let R = l(f);
|
|
5309
5309
|
for (let g of R)
|
|
5310
5310
|
if (g === a)
|
|
5311
|
-
|
|
5312
|
-
|
|
5311
|
+
f.nodes && f.each((y) => {
|
|
5312
|
+
y[z] || this.walkSync(y);
|
|
5313
5313
|
});
|
|
5314
5314
|
else {
|
|
5315
|
-
let
|
|
5316
|
-
if (
|
|
5315
|
+
let y = this.listeners[g];
|
|
5316
|
+
if (y && this.visitSync(y, f.toProxy()))
|
|
5317
5317
|
return;
|
|
5318
5318
|
}
|
|
5319
5319
|
}
|
|
@@ -5449,13 +5449,13 @@ var Vt, Dc;
|
|
|
5449
5449
|
function x3() {
|
|
5450
5450
|
if (Dc) return Vt;
|
|
5451
5451
|
Dc = 1;
|
|
5452
|
-
let e = EM(), b = Vb(), t = H2(), M = xM(), o = Yb(), c = IM(), p = T3(), z = $b(), r = op(), n = ep(), s = Hb(), u = DM(), i = S3(), a = PM(), A = $e(), l = kM(),
|
|
5452
|
+
let e = EM(), b = Vb(), t = H2(), M = xM(), o = Yb(), c = IM(), p = T3(), z = $b(), r = op(), n = ep(), s = Hb(), u = DM(), i = S3(), a = PM(), A = $e(), l = kM(), q = Gb(), d = tp();
|
|
5453
5453
|
function W(...h) {
|
|
5454
5454
|
return h.length === 1 && Array.isArray(h[0]) && (h = h[0]), new i(h);
|
|
5455
5455
|
}
|
|
5456
|
-
return W.plugin = function(m,
|
|
5456
|
+
return W.plugin = function(m, f) {
|
|
5457
5457
|
let R = !1;
|
|
5458
|
-
function g(...
|
|
5458
|
+
function g(...T) {
|
|
5459
5459
|
console && console.warn && !R && (R = !0, console.warn(
|
|
5460
5460
|
m + `: postcss.plugin was deprecated. Migration guide:
|
|
5461
5461
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`
|
|
@@ -5463,18 +5463,18 @@ https://evilmartians.com/chronicles/postcss-8-plugin-migration`
|
|
|
5463
5463
|
m + `: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
5464
5464
|
https://www.w3ctech.com/topic/2226`
|
|
5465
5465
|
));
|
|
5466
|
-
let _ =
|
|
5466
|
+
let _ = f(...T);
|
|
5467
5467
|
return _.postcssPlugin = m, _.postcssVersion = new i().version, _;
|
|
5468
5468
|
}
|
|
5469
|
-
let
|
|
5469
|
+
let y;
|
|
5470
5470
|
return Object.defineProperty(g, "postcss", {
|
|
5471
5471
|
get() {
|
|
5472
|
-
return
|
|
5472
|
+
return y || (y = g()), y;
|
|
5473
5473
|
}
|
|
5474
|
-
}), g.process = function(
|
|
5475
|
-
return W([g(
|
|
5474
|
+
}), g.process = function(T, _, v) {
|
|
5475
|
+
return W([g(v)]).process(T, _);
|
|
5476
5476
|
}, g;
|
|
5477
|
-
}, W.stringify =
|
|
5477
|
+
}, W.stringify = q, W.parse = u, W.fromJSON = p, 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 l(h), W.root = (h) => new A(h), W.document = (h) => new c(h), W.CssSyntaxError = M, W.Declaration = o, W.Container = t, W.Processor = i, W.Document = c, W.Comment = b, W.Warning = d, W.AtRule = e, W.Result = a, W.Input = z, W.Rule = l, W.Root = A, W.Node = s, r.registerPostcss(W), Vt = W, W.default = W, Vt;
|
|
5478
5478
|
}
|
|
5479
5479
|
var Yt, Pc;
|
|
5480
5480
|
function C3() {
|
|
@@ -5491,28 +5491,28 @@ function C3() {
|
|
|
5491
5491
|
"iframe",
|
|
5492
5492
|
"embed"
|
|
5493
5493
|
], z = ["script", "style"];
|
|
5494
|
-
function r(
|
|
5495
|
-
|
|
5496
|
-
d(
|
|
5494
|
+
function r(q, d) {
|
|
5495
|
+
q && Object.keys(q).forEach(function(W) {
|
|
5496
|
+
d(q[W], W);
|
|
5497
5497
|
});
|
|
5498
5498
|
}
|
|
5499
|
-
function n(
|
|
5500
|
-
return {}.hasOwnProperty.call(
|
|
5499
|
+
function n(q, d) {
|
|
5500
|
+
return {}.hasOwnProperty.call(q, d);
|
|
5501
5501
|
}
|
|
5502
|
-
function s(
|
|
5502
|
+
function s(q, d) {
|
|
5503
5503
|
const W = [];
|
|
5504
|
-
return r(
|
|
5504
|
+
return r(q, function(h) {
|
|
5505
5505
|
d(h) && W.push(h);
|
|
5506
5506
|
}), W;
|
|
5507
5507
|
}
|
|
5508
|
-
function u(
|
|
5509
|
-
for (const d in
|
|
5510
|
-
if (n(
|
|
5508
|
+
function u(q) {
|
|
5509
|
+
for (const d in q)
|
|
5510
|
+
if (n(q, d))
|
|
5511
5511
|
return !1;
|
|
5512
5512
|
return !0;
|
|
5513
5513
|
}
|
|
5514
|
-
function i(
|
|
5515
|
-
return
|
|
5514
|
+
function i(q) {
|
|
5515
|
+
return q.map(function(d) {
|
|
5516
5516
|
if (!d.url)
|
|
5517
5517
|
throw new Error("URL missing");
|
|
5518
5518
|
return d.url + (d.w ? ` ${d.w}w` : "") + (d.h ? ` ${d.h}h` : "") + (d.d ? ` ${d.d}x` : "");
|
|
@@ -5520,12 +5520,12 @@ function C3() {
|
|
|
5520
5520
|
}
|
|
5521
5521
|
Yt = A;
|
|
5522
5522
|
const a = /^[^\0\t\n\f\r /<=>]+$/;
|
|
5523
|
-
function A(
|
|
5524
|
-
if (
|
|
5523
|
+
function A(q, d, W) {
|
|
5524
|
+
if (q == null)
|
|
5525
5525
|
return "";
|
|
5526
|
-
typeof
|
|
5526
|
+
typeof q == "number" && (q = q.toString());
|
|
5527
5527
|
let h = "", m = "";
|
|
5528
|
-
function
|
|
5528
|
+
function f(E, P) {
|
|
5529
5529
|
const N = this;
|
|
5530
5530
|
this.tag = E, this.attribs = P || {}, this.tagPosition = h.length, this.text = "", this.openingTagLength = 0, this.mediaChildren = [], this.updateParentNodeText = function() {
|
|
5531
5531
|
if (H.length) {
|
|
@@ -5556,21 +5556,21 @@ and ensure you are accounting for this risk.
|
|
|
5556
5556
|
"textarea",
|
|
5557
5557
|
"option"
|
|
5558
5558
|
];
|
|
5559
|
-
let
|
|
5560
|
-
d.allowedAttributes && (
|
|
5561
|
-
|
|
5559
|
+
let y, T;
|
|
5560
|
+
d.allowedAttributes && (y = {}, T = {}, r(d.allowedAttributes, function(E, P) {
|
|
5561
|
+
y[P] = [];
|
|
5562
5562
|
const N = [];
|
|
5563
5563
|
E.forEach(function(S) {
|
|
5564
|
-
typeof S == "string" && S.indexOf("*") >= 0 ? N.push(b(S).replace(/\\\*/g, ".*")) :
|
|
5565
|
-
}), N.length && (
|
|
5564
|
+
typeof S == "string" && S.indexOf("*") >= 0 ? N.push(b(S).replace(/\\\*/g, ".*")) : y[P].push(S);
|
|
5565
|
+
}), N.length && (T[P] = new RegExp("^(" + N.join("|") + ")$"));
|
|
5566
5566
|
}));
|
|
5567
|
-
const _ = {},
|
|
5567
|
+
const _ = {}, v = {}, B = {};
|
|
5568
5568
|
r(d.allowedClasses, function(E, P) {
|
|
5569
|
-
if (
|
|
5569
|
+
if (y && (n(y, P) || (y[P] = []), y[P].push("class")), _[P] = E, Array.isArray(E)) {
|
|
5570
5570
|
const N = [];
|
|
5571
|
-
_[P] = [],
|
|
5572
|
-
typeof S == "string" && S.indexOf("*") >= 0 ? N.push(b(S).replace(/\\\*/g, ".*")) : S instanceof RegExp ?
|
|
5573
|
-
}), N.length && (
|
|
5571
|
+
_[P] = [], B[P] = [], E.forEach(function(S) {
|
|
5572
|
+
typeof S == "string" && S.indexOf("*") >= 0 ? N.push(b(S).replace(/\\\*/g, ".*")) : S instanceof RegExp ? B[P].push(S) : _[P].push(S);
|
|
5573
|
+
}), N.length && (v[P] = new RegExp("^(" + N.join("|") + ")$"));
|
|
5574
5574
|
}
|
|
5575
5575
|
});
|
|
5576
5576
|
const X = {};
|
|
@@ -5587,7 +5587,7 @@ and ensure you are accounting for this risk.
|
|
|
5587
5587
|
M0++;
|
|
5588
5588
|
return;
|
|
5589
5589
|
}
|
|
5590
|
-
const N = new
|
|
5590
|
+
const N = new f(E, P);
|
|
5591
5591
|
H.push(N);
|
|
5592
5592
|
let S = !1;
|
|
5593
5593
|
const I = !!N.text;
|
|
@@ -5604,7 +5604,7 @@ and ensure you are accounting for this risk.
|
|
|
5604
5604
|
}
|
|
5605
5605
|
h += "<" + E, E === "script" && (d.allowedScriptHostnames || d.allowedScriptDomains) && (N.innerText = ""), S && (d.disallowedTagsMode === "escape" || d.disallowedTagsMode === "recursiveEscape") && d.preserveEscapedAttributes ? r(P, function(r0, o0) {
|
|
5606
5606
|
h += " " + o0 + '="' + t0(r0 || "", !0) + '"';
|
|
5607
|
-
}) : (!
|
|
5607
|
+
}) : (!y || n(y, E) || y["*"]) && r(P, function(r0, o0) {
|
|
5608
5608
|
if (!a.test(o0)) {
|
|
5609
5609
|
delete N.attribs[o0];
|
|
5610
5610
|
return;
|
|
@@ -5614,10 +5614,10 @@ and ensure you are accounting for this risk.
|
|
|
5614
5614
|
return;
|
|
5615
5615
|
}
|
|
5616
5616
|
let C0 = !1;
|
|
5617
|
-
if (!
|
|
5617
|
+
if (!y || n(y, E) && y[E].indexOf(o0) !== -1 || y["*"] && y["*"].indexOf(o0) !== -1 || n(T, E) && T[E].test(o0) || T["*"] && T["*"].test(o0))
|
|
5618
5618
|
C0 = !0;
|
|
5619
|
-
else if (
|
|
5620
|
-
for (const _0 of
|
|
5619
|
+
else if (y && y[E]) {
|
|
5620
|
+
for (const _0 of y[E])
|
|
5621
5621
|
if (t(_0) && _0.name && _0.name === o0) {
|
|
5622
5622
|
C0 = !0;
|
|
5623
5623
|
let w0 = "";
|
|
@@ -5696,7 +5696,7 @@ and ensure you are accounting for this risk.
|
|
|
5696
5696
|
return;
|
|
5697
5697
|
}
|
|
5698
5698
|
if (o0 === "class") {
|
|
5699
|
-
const _0 = _[E], w0 = _["*"], T2 =
|
|
5699
|
+
const _0 = _[E], w0 = _["*"], T2 = v[E], e2 = B[E], L1 = B["*"], Zn = v["*"], go = [
|
|
5700
5700
|
T2,
|
|
5701
5701
|
Zn
|
|
5702
5702
|
].concat(e2, L1).filter(function(Jn) {
|
|
@@ -5786,7 +5786,7 @@ and ensure you are accounting for this risk.
|
|
|
5786
5786
|
h += "</" + E + ">", S && (h = m + t0(h), m = ""), L0 = !1;
|
|
5787
5787
|
}
|
|
5788
5788
|
}, d.parser);
|
|
5789
|
-
return d0.write(
|
|
5789
|
+
return d0.write(q), d0.end(), h;
|
|
5790
5790
|
function b0() {
|
|
5791
5791
|
h = "", x = 0, H = [], G = {}, K = {}, p0 = !1, M0 = 0;
|
|
5792
5792
|
}
|
|
@@ -6150,16 +6150,16 @@ and ensure you are accounting for this risk.
|
|
|
6150
6150
|
enforceHtmlBoundary: !1,
|
|
6151
6151
|
parseStyleAttributes: !0,
|
|
6152
6152
|
preserveEscapedAttributes: !1
|
|
6153
|
-
}, A.simpleTransform = function(
|
|
6153
|
+
}, A.simpleTransform = function(q, d, W) {
|
|
6154
6154
|
return W = W === void 0 ? !0 : W, d = d || {}, function(h, m) {
|
|
6155
|
-
let
|
|
6155
|
+
let f;
|
|
6156
6156
|
if (W)
|
|
6157
|
-
for (
|
|
6158
|
-
m[
|
|
6157
|
+
for (f in d)
|
|
6158
|
+
m[f] = d[f];
|
|
6159
6159
|
else
|
|
6160
6160
|
m = d;
|
|
6161
6161
|
return {
|
|
6162
|
-
tagName:
|
|
6162
|
+
tagName: q,
|
|
6163
6163
|
attribs: m
|
|
6164
6164
|
};
|
|
6165
6165
|
};
|
|
@@ -6270,17 +6270,17 @@ const I3 = /* @__PURE__ */ Hz(E3), k3 = (e) => {
|
|
|
6270
6270
|
notificationId: l
|
|
6271
6271
|
})
|
|
6272
6272
|
}), s = async (l) => {
|
|
6273
|
-
var
|
|
6273
|
+
var q;
|
|
6274
6274
|
try {
|
|
6275
6275
|
const d = await n.mutateAsync(l);
|
|
6276
|
-
(
|
|
6276
|
+
(q = d == null ? void 0 : d.dismissAccountNotification) != null && q.errors || M((W) => /* @__PURE__ */ new Set([...W, l]));
|
|
6277
6277
|
} catch (d) {
|
|
6278
6278
|
console.error("Failed to dismiss notification:", d);
|
|
6279
6279
|
}
|
|
6280
6280
|
}, u = (l) => {
|
|
6281
|
-
c((
|
|
6281
|
+
c((q) => /* @__PURE__ */ new Set([...q, l]));
|
|
6282
6282
|
}, i = (l) => {
|
|
6283
|
-
c((
|
|
6283
|
+
c((q) => /* @__PURE__ */ new Set([...q, l]));
|
|
6284
6284
|
};
|
|
6285
6285
|
if (z)
|
|
6286
6286
|
return /* @__PURE__ */ O(k, { as: "div", margin: "small", children: /* @__PURE__ */ O(S1, { renderTitle: b.loadingNotifications, size: "x-small" }) });
|
|
@@ -6414,17 +6414,17 @@ function i1(e, b, t, M) {
|
|
|
6414
6414
|
s(a);
|
|
6415
6415
|
const A = o[e] || {};
|
|
6416
6416
|
let l = a;
|
|
6417
|
-
const
|
|
6417
|
+
const q = [
|
|
6418
6418
|
"course-work-widget",
|
|
6419
6419
|
"course-work-combined-widget",
|
|
6420
6420
|
"course-work-summary-widget"
|
|
6421
6421
|
].includes(e);
|
|
6422
|
-
|
|
6422
|
+
q && b === "selectedCourse" && typeof a == "string" && (l = a === "all" || a.startsWith("course_") ? a : `course_${a}`);
|
|
6423
6423
|
const d = {
|
|
6424
6424
|
...A,
|
|
6425
6425
|
[b]: l
|
|
6426
6426
|
};
|
|
6427
|
-
if (
|
|
6427
|
+
if (q && "selectedCourse" in d && typeof d.selectedCourse == "string") {
|
|
6428
6428
|
const W = d.selectedCourse;
|
|
6429
6429
|
W !== "all" && !W.startsWith("course_") && (d.selectedCourse = `course_${W}`);
|
|
6430
6430
|
}
|
|
@@ -6710,7 +6710,7 @@ function zp() {
|
|
|
6710
6710
|
data: a,
|
|
6711
6711
|
isLoading: A,
|
|
6712
6712
|
error: l,
|
|
6713
|
-
refetch:
|
|
6713
|
+
refetch: q
|
|
6714
6714
|
} = c1({
|
|
6715
6715
|
...ae(
|
|
6716
6716
|
[Xo, "enrollments", t ?? void 0],
|
|
@@ -6728,28 +6728,28 @@ function zp() {
|
|
|
6728
6728
|
retry: d1.RETRY.DISABLED,
|
|
6729
6729
|
persister: m2,
|
|
6730
6730
|
refetchOnMount: !1
|
|
6731
|
-
}), d = z ? n : a, W = z ? s : A, h = z ? u : l, m = z ? i :
|
|
6731
|
+
}), d = z ? n : a, W = z ? s : A, h = z ? u : l, m = z ? i : q, f = h, R = W && !d, g = (d == null ? void 0 : d.length) ?? null, y = g !== null ? Math.ceil(g / r) : 0, T = O0(() => {
|
|
6732
6732
|
if (!d) return;
|
|
6733
6733
|
const X = e * r;
|
|
6734
6734
|
return d.slice(X, X + r);
|
|
6735
6735
|
}, [d, e, r]), _ = Q((X) => {
|
|
6736
6736
|
const C = X - 1;
|
|
6737
6737
|
C >= 0 && b(C);
|
|
6738
|
-
}, []),
|
|
6738
|
+
}, []), v = Q(() => {
|
|
6739
6739
|
b(0);
|
|
6740
|
-
}, []),
|
|
6740
|
+
}, []), B = Q(() => {
|
|
6741
6741
|
b(0), m();
|
|
6742
6742
|
}, [m]);
|
|
6743
6743
|
return {
|
|
6744
|
-
data:
|
|
6744
|
+
data: T,
|
|
6745
6745
|
currentPageIndex: e,
|
|
6746
|
-
totalPages:
|
|
6746
|
+
totalPages: y,
|
|
6747
6747
|
totalCount: g,
|
|
6748
6748
|
goToPage: _,
|
|
6749
|
-
resetPagination:
|
|
6750
|
-
refetch:
|
|
6749
|
+
resetPagination: v,
|
|
6750
|
+
refetch: B,
|
|
6751
6751
|
isLoading: R,
|
|
6752
|
-
error:
|
|
6752
|
+
error: f,
|
|
6753
6753
|
pageSize: r
|
|
6754
6754
|
};
|
|
6755
6755
|
}
|
|
@@ -6992,21 +6992,21 @@ const oi = ({
|
|
|
6992
6992
|
isEditMode: a = !1,
|
|
6993
6993
|
dragHandleProps: A
|
|
6994
6994
|
}) => {
|
|
6995
|
-
const { translations: l, translate:
|
|
6995
|
+
const { translations: l, translate: q, announceForScreenReader: d } = J(), { isMobile: W, isDesktop: h } = K1(), { config: m, moveWidget: f, removeWidget: R } = jb(), g = b || e.title, y = `${e.id}-heading`, T = Nb.useRef(null), [_, v] = Nb.useState(null);
|
|
6996
6996
|
H0(() => {
|
|
6997
|
-
|
|
6997
|
+
T.current && v(T.current);
|
|
6998
6998
|
}, []);
|
|
6999
|
-
const
|
|
6999
|
+
const B = (H) => {
|
|
7000
7000
|
const G = H;
|
|
7001
7001
|
Xr(() => {
|
|
7002
|
-
|
|
7002
|
+
f(e.id, G);
|
|
7003
7003
|
});
|
|
7004
7004
|
const K = document.querySelector(
|
|
7005
7005
|
`[data-testid="${e.id}-drag-handle"]`
|
|
7006
7006
|
);
|
|
7007
7007
|
if (K) {
|
|
7008
7008
|
K.focus();
|
|
7009
|
-
const p0 = Zr(G, l), M0 =
|
|
7009
|
+
const p0 = Zr(G, l), M0 = q("widgetMovedDirection", {
|
|
7010
7010
|
widgetName: g,
|
|
7011
7011
|
direction: p0
|
|
7012
7012
|
});
|
|
@@ -7035,20 +7035,20 @@ const oi = ({
|
|
|
7035
7035
|
lineHeight: 1
|
|
7036
7036
|
},
|
|
7037
7037
|
type: "button",
|
|
7038
|
-
"aria-label":
|
|
7038
|
+
"aria-label": q("reorderWidgetName", { widgetName: g }),
|
|
7039
7039
|
children: /* @__PURE__ */ O(cr, {})
|
|
7040
7040
|
}
|
|
7041
7041
|
),
|
|
7042
7042
|
widget: e,
|
|
7043
7043
|
config: m,
|
|
7044
7044
|
isStacked: !h,
|
|
7045
|
-
onSelect:
|
|
7045
|
+
onSelect: B
|
|
7046
7046
|
}
|
|
7047
7047
|
),
|
|
7048
7048
|
/* @__PURE__ */ O(
|
|
7049
7049
|
F2,
|
|
7050
7050
|
{
|
|
7051
|
-
screenReaderLabel:
|
|
7051
|
+
screenReaderLabel: q("removeWidgetName", { widgetName: g }),
|
|
7052
7052
|
size: "small",
|
|
7053
7053
|
withBackground: !1,
|
|
7054
7054
|
withBorder: !1,
|
|
@@ -7072,15 +7072,15 @@ const oi = ({
|
|
|
7072
7072
|
borderRadius: "large",
|
|
7073
7073
|
background: "primary",
|
|
7074
7074
|
"data-testid": `widget-${e.id}`,
|
|
7075
|
-
"aria-labelledby": o && g ?
|
|
7075
|
+
"aria-labelledby": o && g ? y : void 0,
|
|
7076
7076
|
role: "region",
|
|
7077
7077
|
children: /* @__PURE__ */ w(L, { direction: "column", gap: "small", children: [
|
|
7078
7078
|
o && g && (W ? /* @__PURE__ */ w(L, { direction: "column", gap: "x-small", children: [
|
|
7079
|
-
/* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(l1, { level: "h2", margin: "0", id:
|
|
7079
|
+
/* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(l1, { level: "h2", margin: "0", id: y, children: g }) }),
|
|
7080
7080
|
c && /* @__PURE__ */ O(L.Item, { padding: "x-small 0 x-small x-small", children: c }),
|
|
7081
7081
|
a && /* @__PURE__ */ O(L.Item, { padding: "x-small 0 x-small x-small", children: C })
|
|
7082
7082
|
] }) : /* @__PURE__ */ w(L, { direction: "row", alignItems: "center", justifyItems: "space-between", wrap: "wrap", children: [
|
|
7083
|
-
/* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: /* @__PURE__ */ O(l1, { level: "h2", variant: "titleCardSection", margin: "0", id:
|
|
7083
|
+
/* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: /* @__PURE__ */ O(l1, { level: "h2", variant: "titleCardSection", margin: "0", id: y, children: g }) }),
|
|
7084
7084
|
c && /* @__PURE__ */ O(L.Item, { shouldGrow: !1, children: c }),
|
|
7085
7085
|
a && /* @__PURE__ */ O(L.Item, { margin: "0 0 0 small", shouldGrow: !1, children: C })
|
|
7086
7086
|
] })),
|
|
@@ -7090,7 +7090,7 @@ const oi = ({
|
|
|
7090
7090
|
as: "div",
|
|
7091
7091
|
position: "relative",
|
|
7092
7092
|
elementRef: (H) => {
|
|
7093
|
-
|
|
7093
|
+
T.current = H;
|
|
7094
7094
|
},
|
|
7095
7095
|
children: [
|
|
7096
7096
|
x(),
|
|
@@ -7369,7 +7369,7 @@ function di(e = {}) {
|
|
|
7369
7369
|
refetchOnMount: !1,
|
|
7370
7370
|
retry: !1,
|
|
7371
7371
|
placeholderData: G2
|
|
7372
|
-
}), A = i, l = u && !s,
|
|
7372
|
+
}), A = i, l = u && !s, q = u && !!s;
|
|
7373
7373
|
H0(() => {
|
|
7374
7374
|
(s == null ? void 0 : s.pageInfo.totalCount) !== null && (s == null ? void 0 : s.pageInfo.totalCount) !== void 0 && p(s.pageInfo.totalCount);
|
|
7375
7375
|
}, [s]), H0(() => {
|
|
@@ -7383,9 +7383,9 @@ function di(e = {}) {
|
|
|
7383
7383
|
const d = Q(() => {
|
|
7384
7384
|
o({}), p(null), t(0), a();
|
|
7385
7385
|
}, [a]), W = e.limit || 3, h = c != null ? Math.ceil(c / W) : 0, m = Q((g) => {
|
|
7386
|
-
const
|
|
7387
|
-
|
|
7388
|
-
}, []),
|
|
7386
|
+
const y = g - 1;
|
|
7387
|
+
y >= 0 && t(y);
|
|
7388
|
+
}, []), f = Q(() => {
|
|
7389
7389
|
t(0);
|
|
7390
7390
|
}, []);
|
|
7391
7391
|
return {
|
|
@@ -7394,10 +7394,10 @@ function di(e = {}) {
|
|
|
7394
7394
|
totalPages: h,
|
|
7395
7395
|
totalCount: c,
|
|
7396
7396
|
goToPage: m,
|
|
7397
|
-
resetPagination:
|
|
7397
|
+
resetPagination: f,
|
|
7398
7398
|
refetch: d,
|
|
7399
7399
|
isLoading: l,
|
|
7400
|
-
isPaginationLoading:
|
|
7400
|
+
isPaginationLoading: q,
|
|
7401
7401
|
error: A,
|
|
7402
7402
|
pageSize: W
|
|
7403
7403
|
};
|
|
@@ -7615,7 +7615,7 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7615
7615
|
filter: b,
|
|
7616
7616
|
readOnly: t = !1
|
|
7617
7617
|
}) => {
|
|
7618
|
-
var h, m,
|
|
7618
|
+
var h, m, f, R;
|
|
7619
7619
|
const { translations: M, translate: o } = J(), { notify: c, locale: p, timezone: z } = h0(), { isDark: r } = S0(), n = gi(), [s, u] = V(e), [i, a] = V(!1), A = m1(), l = async () => {
|
|
7620
7620
|
a(!0);
|
|
7621
7621
|
try {
|
|
@@ -7623,9 +7623,9 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7623
7623
|
await n.mutateAsync({
|
|
7624
7624
|
discussionTopicId: s.id,
|
|
7625
7625
|
read: g
|
|
7626
|
-
}), b === "all" && u((
|
|
7627
|
-
...
|
|
7628
|
-
isRead: !
|
|
7626
|
+
}), b === "all" && u((y) => ({
|
|
7627
|
+
...y,
|
|
7628
|
+
isRead: !y.isRead
|
|
7629
7629
|
})), c({
|
|
7630
7630
|
type: "success",
|
|
7631
7631
|
message: g ? o("announcementMarkedAsRead", { title: s.title }) : o("announcementMarkedAsUnread", { title: s.title })
|
|
@@ -7638,22 +7638,22 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7638
7638
|
} finally {
|
|
7639
7639
|
a(!1);
|
|
7640
7640
|
}
|
|
7641
|
-
},
|
|
7641
|
+
}, q = O0(
|
|
7642
7642
|
() => Ni(s.message.replace(/<[^>]*>/g, "")),
|
|
7643
7643
|
[s.message]
|
|
7644
7644
|
), d = () => {
|
|
7645
7645
|
if (s.isRead) return;
|
|
7646
7646
|
A.removeQueries({
|
|
7647
|
-
predicate: (
|
|
7647
|
+
predicate: (y) => y.queryKey[0] === Ne
|
|
7648
7648
|
});
|
|
7649
7649
|
const g = [];
|
|
7650
|
-
for (let
|
|
7651
|
-
const
|
|
7652
|
-
|
|
7650
|
+
for (let y = 0; y < sessionStorage.length; y++) {
|
|
7651
|
+
const T = sessionStorage.key(y);
|
|
7652
|
+
T != null && T.includes(Ne) && g.push(T);
|
|
7653
7653
|
}
|
|
7654
|
-
g.forEach((
|
|
7654
|
+
g.forEach((y) => sessionStorage.removeItem(y));
|
|
7655
7655
|
}, W = () => {
|
|
7656
|
-
const g = s.isRead,
|
|
7656
|
+
const g = s.isRead, y = i ? M.updating : g ? o("markAnnouncementAsUnread", { title: s.title }) : o("markAnnouncementAsRead", { title: s.title }), T = i ? `updating-${s.id}` : `${g ? "mark-unread" : "mark-read"}-${s.id}`, _ = i ? /* @__PURE__ */ O(S1, { size: "x-small", renderTitle: M.updatingReadStatus }) : g ? /* @__PURE__ */ O(Lb, { color: "success", size: "x-small" }) : /* @__PURE__ */ O(rr, { color: "secondary", size: "x-small" });
|
|
7657
7657
|
return /* @__PURE__ */ O(
|
|
7658
7658
|
F2,
|
|
7659
7659
|
{
|
|
@@ -7663,9 +7663,9 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7663
7663
|
color: r ? "primary-inverse" : "secondary",
|
|
7664
7664
|
onClick: i || t ? void 0 : l,
|
|
7665
7665
|
disabled: i || t,
|
|
7666
|
-
screenReaderLabel:
|
|
7666
|
+
screenReaderLabel: y,
|
|
7667
7667
|
"aria-pressed": i ? void 0 : g,
|
|
7668
|
-
"data-testid":
|
|
7668
|
+
"data-testid": T,
|
|
7669
7669
|
children: _
|
|
7670
7670
|
}
|
|
7671
7671
|
);
|
|
@@ -7705,7 +7705,7 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7705
7705
|
wrap: "break-word",
|
|
7706
7706
|
style: { wordBreak: "break-all" },
|
|
7707
7707
|
children: [
|
|
7708
|
-
((
|
|
7708
|
+
((f = s.author) == null ? void 0 : f.name) && /* @__PURE__ */ w($1, { children: [
|
|
7709
7709
|
o("sentBy", { authorName: s.author.name }),
|
|
7710
7710
|
" | "
|
|
7711
7711
|
] }),
|
|
@@ -7733,7 +7733,7 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7733
7733
|
] }) })
|
|
7734
7734
|
] }) }),
|
|
7735
7735
|
/* @__PURE__ */ O(L.Item, { overflowX: "visible", overflowY: "visible", children: s.message && /* @__PURE__ */ O(k, { children: /* @__PURE__ */ w(D, { size: "x-small", children: [
|
|
7736
|
-
/* @__PURE__ */ O(Kc, { maxLength: 120, children:
|
|
7736
|
+
/* @__PURE__ */ O(Kc, { maxLength: 120, children: q }),
|
|
7737
7737
|
" "
|
|
7738
7738
|
] }) }) }),
|
|
7739
7739
|
/* @__PURE__ */ O(L.Item, { overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ O(E0, { href: s.html_url, isWithinText: !1, onClick: d, children: /* @__PURE__ */ O(D, { size: "small", children: M.readMore }) }) })
|
|
@@ -7757,17 +7757,17 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7757
7757
|
} = di({
|
|
7758
7758
|
limit: 3,
|
|
7759
7759
|
filter: p
|
|
7760
|
-
}),
|
|
7760
|
+
}), q = (m) => {
|
|
7761
7761
|
z(m);
|
|
7762
|
-
}, d = O0(() => ((r == null ? void 0 : r.announcements) || []).map((
|
|
7763
|
-
if (!
|
|
7764
|
-
const R =
|
|
7765
|
-
(
|
|
7762
|
+
}, d = O0(() => ((r == null ? void 0 : r.announcements) || []).map((f) => {
|
|
7763
|
+
if (!f.course) return f;
|
|
7764
|
+
const R = f.course.id, g = o.find(
|
|
7765
|
+
(y) => y.courseId === R || y.courseId === String(R)
|
|
7766
7766
|
);
|
|
7767
7767
|
return {
|
|
7768
|
-
...
|
|
7768
|
+
...f,
|
|
7769
7769
|
course: {
|
|
7770
|
-
...
|
|
7770
|
+
...f.course,
|
|
7771
7771
|
courseCode: (g == null ? void 0 : g.courseCode) || void 0
|
|
7772
7772
|
}
|
|
7773
7773
|
};
|
|
@@ -7776,7 +7776,7 @@ const Kc = ({ children: e, maxLength: b = 80 }) => /* @__PURE__ */ O(D, { title:
|
|
|
7776
7776
|
{
|
|
7777
7777
|
renderLabel: M.readFilter,
|
|
7778
7778
|
value: p,
|
|
7779
|
-
onChange: (m, { value:
|
|
7779
|
+
onChange: (m, { value: f }) => q(f),
|
|
7780
7780
|
size: "small",
|
|
7781
7781
|
width: "7rem",
|
|
7782
7782
|
"data-testid": "announcement-filter-select",
|
|
@@ -7852,8 +7852,8 @@ function rp(e = {}) {
|
|
|
7852
7852
|
), p = O0(() => {
|
|
7853
7853
|
const i = c.length, a = Math.ceil(i / b), A = [];
|
|
7854
7854
|
for (let l = 0; l < a; l++) {
|
|
7855
|
-
const
|
|
7856
|
-
A.push(c.slice(
|
|
7855
|
+
const q = l * b, d = q + b;
|
|
7856
|
+
A.push(c.slice(q, d));
|
|
7857
7857
|
}
|
|
7858
7858
|
return { pages: A, totalPages: a };
|
|
7859
7859
|
}, [c, b]), z = p.pages[t] || [], r = p.totalPages, n = () => {
|
|
@@ -7929,11 +7929,11 @@ const sp = {
|
|
|
7929
7929
|
useCustomColors: p = !0,
|
|
7930
7930
|
maxWidth: z = "15rem"
|
|
7931
7931
|
}) => {
|
|
7932
|
-
const [r, n] = V(!1), { preferences: s, sharedCourseData: u } = S0(), i = u.find((
|
|
7932
|
+
const [r, n] = V(!1), { preferences: s, sharedCourseData: u } = S0(), i = u.find((q) => q.courseId === e), a = O0(() => {
|
|
7933
7933
|
if (c)
|
|
7934
7934
|
return c;
|
|
7935
7935
|
if (p && (s != null && s.custom_colors)) {
|
|
7936
|
-
const
|
|
7936
|
+
const q = `course_${e}`, d = s.custom_colors[q];
|
|
7937
7937
|
if (d) {
|
|
7938
7938
|
const W = Ci(d);
|
|
7939
7939
|
return {
|
|
@@ -7998,7 +7998,7 @@ const sp = {
|
|
|
7998
7998
|
onGradeVisibilityChange: n
|
|
7999
7999
|
}) => {
|
|
8000
8000
|
var W;
|
|
8001
|
-
const { translations: s, translate: u } = J(), { ColorPicker: i } = Si(), { sharedCourseData: a, updateCourseColor: A } = S0(), l = r,
|
|
8001
|
+
const { translations: s, translate: u } = J(), { ColorPicker: i } = Si(), { sharedCourseData: a, updateCourseColor: A } = S0(), l = r, q = (W = a.find((h) => h.courseId === e)) == null ? void 0 : W.courseColor, d = () => {
|
|
8002
8002
|
const h = !l;
|
|
8003
8003
|
n == null || n(h);
|
|
8004
8004
|
};
|
|
@@ -8054,7 +8054,7 @@ const sp = {
|
|
|
8054
8054
|
i,
|
|
8055
8055
|
{
|
|
8056
8056
|
courseId: e,
|
|
8057
|
-
currentColor:
|
|
8057
|
+
currentColor: q,
|
|
8058
8058
|
onColorChange: (h) => A(e, h)
|
|
8059
8059
|
}
|
|
8060
8060
|
) })
|
|
@@ -8158,18 +8158,18 @@ const sp = {
|
|
|
8158
8158
|
}), l = s;
|
|
8159
8159
|
H0(() => {
|
|
8160
8160
|
l.forEach((m) => {
|
|
8161
|
-
m.courseId in c || p((
|
|
8161
|
+
m.courseId in c || p((f) => ({ ...f, [m.courseId]: z }));
|
|
8162
8162
|
});
|
|
8163
8163
|
}, [l, c, z]);
|
|
8164
|
-
const
|
|
8165
|
-
p((R) => ({ ...R, [m]:
|
|
8164
|
+
const q = z, d = (m, f) => {
|
|
8165
|
+
p((R) => ({ ...R, [m]: f }));
|
|
8166
8166
|
}, W = () => {
|
|
8167
8167
|
const m = !z;
|
|
8168
8168
|
r(m);
|
|
8169
|
-
const
|
|
8169
|
+
const f = { ...c };
|
|
8170
8170
|
l.forEach((R) => {
|
|
8171
|
-
|
|
8172
|
-
}), p(
|
|
8171
|
+
f[R.courseId] = m;
|
|
8172
|
+
}), p(f);
|
|
8173
8173
|
}, h = {
|
|
8174
8174
|
currentPage: a,
|
|
8175
8175
|
totalPages: A,
|
|
@@ -8192,9 +8192,9 @@ const sp = {
|
|
|
8192
8192
|
label: M.showAllGrades,
|
|
8193
8193
|
variant: "toggle",
|
|
8194
8194
|
value: "showGrades",
|
|
8195
|
-
checked:
|
|
8195
|
+
checked: q,
|
|
8196
8196
|
onChange: W,
|
|
8197
|
-
"data-testid":
|
|
8197
|
+
"data-testid": q ? "hide-all-grades-checkbox" : "show-all-grades-checkbox"
|
|
8198
8198
|
}
|
|
8199
8199
|
),
|
|
8200
8200
|
children: /* @__PURE__ */ O(L, { direction: "column", height: "100%", children: /* @__PURE__ */ O(L.Item, { shouldGrow: !0, shouldShrink: !0, height: "auto", children: /* @__PURE__ */ O(k, { as: "div", padding: "xx-small", children: /* @__PURE__ */ O(
|
|
@@ -8204,7 +8204,7 @@ const sp = {
|
|
|
8204
8204
|
colSpacing: te.GRID_COL_SPACING,
|
|
8205
8205
|
startAt: "medium",
|
|
8206
8206
|
role: "list",
|
|
8207
|
-
children: n ? /* @__PURE__ */ O(We.Row, { children: l.map((m,
|
|
8207
|
+
children: n ? /* @__PURE__ */ O(We.Row, { children: l.map((m, f) => /* @__PURE__ */ O(
|
|
8208
8208
|
We.Col,
|
|
8209
8209
|
{
|
|
8210
8210
|
width: {
|
|
@@ -8223,33 +8223,33 @@ const sp = {
|
|
|
8223
8223
|
lastUpdated: m.lastUpdated,
|
|
8224
8224
|
image: m.image,
|
|
8225
8225
|
onShowGradebook: Zc(m.courseId),
|
|
8226
|
-
gridIndex:
|
|
8226
|
+
gridIndex: f,
|
|
8227
8227
|
globalGradeVisibility: c[m.courseId] ?? !0,
|
|
8228
8228
|
onGradeVisibilityChange: (R) => d(m.courseId, R)
|
|
8229
8229
|
}
|
|
8230
8230
|
)
|
|
8231
8231
|
},
|
|
8232
8232
|
m.courseId
|
|
8233
|
-
)) }) : Array.from({ length: 3 }, (m,
|
|
8234
|
-
const R =
|
|
8235
|
-
return /* @__PURE__ */ O(We.Row, { children: Array.from({ length: te.GRID_COLUMNS }, (g,
|
|
8236
|
-
const
|
|
8237
|
-
return /* @__PURE__ */ O(We.Col, { width: 6, children:
|
|
8233
|
+
)) }) : Array.from({ length: 3 }, (m, f) => {
|
|
8234
|
+
const R = f;
|
|
8235
|
+
return /* @__PURE__ */ O(We.Row, { children: Array.from({ length: te.GRID_COLUMNS }, (g, y) => {
|
|
8236
|
+
const T = y, _ = R * te.GRID_COLUMNS + T, v = l[_];
|
|
8237
|
+
return /* @__PURE__ */ O(We.Col, { width: 6, children: v && /* @__PURE__ */ O(
|
|
8238
8238
|
ez,
|
|
8239
8239
|
{
|
|
8240
|
-
courseId:
|
|
8241
|
-
courseCode:
|
|
8242
|
-
courseName:
|
|
8243
|
-
currentGrade:
|
|
8244
|
-
gradingScheme:
|
|
8245
|
-
lastUpdated:
|
|
8246
|
-
image:
|
|
8247
|
-
onShowGradebook: Zc(
|
|
8240
|
+
courseId: v.courseId,
|
|
8241
|
+
courseCode: v.courseCode,
|
|
8242
|
+
courseName: v.courseName,
|
|
8243
|
+
currentGrade: v.currentGrade,
|
|
8244
|
+
gradingScheme: v.gradingScheme,
|
|
8245
|
+
lastUpdated: v.lastUpdated,
|
|
8246
|
+
image: v.image,
|
|
8247
|
+
onShowGradebook: Zc(v.courseId),
|
|
8248
8248
|
gridIndex: _,
|
|
8249
|
-
globalGradeVisibility: c[
|
|
8250
|
-
onGradeVisibilityChange: (
|
|
8249
|
+
globalGradeVisibility: c[v.courseId] ?? !0,
|
|
8250
|
+
onGradeVisibilityChange: (B) => d(v.courseId, B)
|
|
8251
8251
|
},
|
|
8252
|
-
|
|
8252
|
+
v.courseId
|
|
8253
8253
|
) }, `grid-cell-${_}`);
|
|
8254
8254
|
}) }, `grid-row-${R}`);
|
|
8255
8255
|
})
|
|
@@ -8387,7 +8387,7 @@ async function Fi(e, b, t, M, o, c, p) {
|
|
|
8387
8387
|
onlySubmitted: i,
|
|
8388
8388
|
observedUserId: p
|
|
8389
8389
|
}
|
|
8390
|
-
)).map((
|
|
8390
|
+
)).map((f) => ({ ...f, accountName: h.name })) : [];
|
|
8391
8391
|
})
|
|
8392
8392
|
), A = a.filter(
|
|
8393
8393
|
(W) => W.status === "fulfilled"
|
|
@@ -8396,9 +8396,9 @@ async function Fi(e, b, t, M, o, c, p) {
|
|
|
8396
8396
|
const W = a.find((h) => h.status === "rejected");
|
|
8397
8397
|
throw (W == null ? void 0 : W.reason) ?? new Error("One or more accounts failed to load");
|
|
8398
8398
|
}
|
|
8399
|
-
const l = A.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),
|
|
8399
|
+
const l = A.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), q = e * b, d = q + b;
|
|
8400
8400
|
return {
|
|
8401
|
-
items: l.slice(
|
|
8401
|
+
items: l.slice(q, d),
|
|
8402
8402
|
pageInfo: {
|
|
8403
8403
|
hasNextPage: d < l.length,
|
|
8404
8404
|
hasPreviousPage: e > 0,
|
|
@@ -8430,7 +8430,7 @@ async function ji(e, b = {}, t, M, o, c, p) {
|
|
|
8430
8430
|
b,
|
|
8431
8431
|
M
|
|
8432
8432
|
);
|
|
8433
|
-
const l = Pi(e, z),
|
|
8433
|
+
const l = Pi(e, z), q = await o(Ap, {
|
|
8434
8434
|
userId: c,
|
|
8435
8435
|
first: z,
|
|
8436
8436
|
after: l,
|
|
@@ -8442,11 +8442,11 @@ async function ji(e, b = {}, t, M, o, c, p) {
|
|
|
8442
8442
|
onlySubmitted: A,
|
|
8443
8443
|
observedUserId: M
|
|
8444
8444
|
});
|
|
8445
|
-
if (
|
|
8445
|
+
if (q.errors)
|
|
8446
8446
|
throw new Error(
|
|
8447
|
-
`GraphQL query failed: ${
|
|
8447
|
+
`GraphQL query failed: ${q.errors.map((f) => f.message).join(", ")}`
|
|
8448
8448
|
);
|
|
8449
|
-
if (!((m =
|
|
8449
|
+
if (!((m = q == null ? void 0 : q.legacyNode) != null && m.courseWorkSubmissionsConnection))
|
|
8450
8450
|
return {
|
|
8451
8451
|
items: [],
|
|
8452
8452
|
pageInfo: {
|
|
@@ -8457,10 +8457,10 @@ async function ji(e, b = {}, t, M, o, c, p) {
|
|
|
8457
8457
|
totalCount: null
|
|
8458
8458
|
}
|
|
8459
8459
|
};
|
|
8460
|
-
const { nodes: d, pageInfo: W } =
|
|
8460
|
+
const { nodes: d, pageInfo: W } = q.legacyNode.courseWorkSubmissionsConnection;
|
|
8461
8461
|
return {
|
|
8462
|
-
items: d.map((
|
|
8463
|
-
const R =
|
|
8462
|
+
items: d.map((f) => {
|
|
8463
|
+
const R = f.assignment, g = f.cachedDueDate || R.dueAt || null;
|
|
8464
8464
|
return {
|
|
8465
8465
|
id: R._id,
|
|
8466
8466
|
title: qp(R),
|
|
@@ -8472,17 +8472,17 @@ async function ji(e, b = {}, t, M, o, c, p) {
|
|
|
8472
8472
|
points: R.pointsPossible || null,
|
|
8473
8473
|
htmlUrl: R.htmlUrl,
|
|
8474
8474
|
type: lp(R),
|
|
8475
|
-
late:
|
|
8476
|
-
missing:
|
|
8477
|
-
excused:
|
|
8478
|
-
state:
|
|
8475
|
+
late: f.late || !1,
|
|
8476
|
+
missing: f.missing || !1,
|
|
8477
|
+
excused: f.excused || !1,
|
|
8478
|
+
state: f.state || "not_submitted"
|
|
8479
8479
|
};
|
|
8480
8480
|
}),
|
|
8481
8481
|
pageInfo: { ...W }
|
|
8482
8482
|
};
|
|
8483
8483
|
}
|
|
8484
8484
|
function FM(e = {}) {
|
|
8485
|
-
var g,
|
|
8485
|
+
var g, y, T;
|
|
8486
8486
|
const { observedUserId: b } = S0(), { executeQuery: t, currentUserId: M, getAccount: o, perAccountLimit: c } = h0(), p = m1(), z = e.pageSize || 4, r = O0(
|
|
8487
8487
|
() => JSON.stringify({
|
|
8488
8488
|
courseFilter: e.courseFilter,
|
|
@@ -8515,8 +8515,8 @@ function FM(e = {}) {
|
|
|
8515
8515
|
e.startDate,
|
|
8516
8516
|
e.endDate,
|
|
8517
8517
|
(g = e.includeOverdue) == null ? void 0 : g.toString(),
|
|
8518
|
-
(
|
|
8519
|
-
(
|
|
8518
|
+
(y = e.includeNoDueDate) == null ? void 0 : y.toString(),
|
|
8519
|
+
(T = e.onlySubmitted) == null ? void 0 : T.toString(),
|
|
8520
8520
|
JSON.stringify(e.accountIds ?? []),
|
|
8521
8521
|
b ?? void 0
|
|
8522
8522
|
], {
|
|
@@ -8524,7 +8524,7 @@ function FM(e = {}) {
|
|
|
8524
8524
|
isLoading: a,
|
|
8525
8525
|
isFetching: A,
|
|
8526
8526
|
error: l,
|
|
8527
|
-
refetch:
|
|
8527
|
+
refetch: q
|
|
8528
8528
|
} = c1({
|
|
8529
8529
|
queryKey: u,
|
|
8530
8530
|
queryFn: () => ji(
|
|
@@ -8544,13 +8544,13 @@ function FM(e = {}) {
|
|
|
8544
8544
|
retry: !1,
|
|
8545
8545
|
placeholderData: G2
|
|
8546
8546
|
}), d = (i == null ? void 0 : i.pageInfo.totalCount) ?? null, W = d != null ? Math.ceil(d / z) : 0, h = Q((_) => {
|
|
8547
|
-
const
|
|
8548
|
-
|
|
8547
|
+
const v = _ - 1;
|
|
8548
|
+
v >= 0 && s(v);
|
|
8549
8549
|
}, []), m = Q(() => {
|
|
8550
8550
|
s(0);
|
|
8551
|
-
}, []),
|
|
8551
|
+
}, []), f = Q(async () => (await p.invalidateQueries({
|
|
8552
8552
|
queryKey: [To]
|
|
8553
|
-
}),
|
|
8553
|
+
}), q()), [p, q]);
|
|
8554
8554
|
return {
|
|
8555
8555
|
currentPage: i,
|
|
8556
8556
|
currentPageIndex: n,
|
|
@@ -8558,7 +8558,7 @@ function FM(e = {}) {
|
|
|
8558
8558
|
totalCount: d,
|
|
8559
8559
|
goToPage: h,
|
|
8560
8560
|
resetPagination: m,
|
|
8561
|
-
refetch:
|
|
8561
|
+
refetch: f,
|
|
8562
8562
|
isLoading: a,
|
|
8563
8563
|
isPaginationLoading: A && !!i,
|
|
8564
8564
|
error: l,
|
|
@@ -8941,32 +8941,32 @@ const gp = ({
|
|
|
8941
8941
|
), A = r === "all" ? void 0 : r, l = O0(
|
|
8942
8942
|
() => fp(s),
|
|
8943
8943
|
[s]
|
|
8944
|
-
),
|
|
8944
|
+
), q = O0(
|
|
8945
8945
|
() => Wp(z),
|
|
8946
8946
|
[z]
|
|
8947
8947
|
), d = Ae.COURSE_WORK_COMBINED, {
|
|
8948
8948
|
currentPage: W,
|
|
8949
8949
|
currentPageIndex: h,
|
|
8950
8950
|
totalPages: m,
|
|
8951
|
-
goToPage:
|
|
8951
|
+
goToPage: f,
|
|
8952
8952
|
refetch: R,
|
|
8953
8953
|
isLoading: g,
|
|
8954
|
-
isPaginationLoading:
|
|
8955
|
-
error:
|
|
8954
|
+
isPaginationLoading: y,
|
|
8955
|
+
error: T
|
|
8956
8956
|
} = FM({
|
|
8957
8957
|
pageSize: d,
|
|
8958
8958
|
courseFilter: A,
|
|
8959
8959
|
...l
|
|
8960
8960
|
}), {
|
|
8961
8961
|
data: _,
|
|
8962
|
-
isLoading:
|
|
8963
|
-
error:
|
|
8962
|
+
isLoading: v,
|
|
8963
|
+
error: B
|
|
8964
8964
|
} = UM({
|
|
8965
|
-
startDate:
|
|
8966
|
-
endDate:
|
|
8965
|
+
startDate: q.startDate,
|
|
8966
|
+
endDate: q.endDate,
|
|
8967
8967
|
courseId: A,
|
|
8968
8968
|
enabled: i
|
|
8969
|
-
}), X = (W == null ? void 0 : W.items) ?? [], C = b || g ||
|
|
8969
|
+
}), X = (W == null ? void 0 : W.items) ?? [], C = b || g || v, x = t || (T ? T.message : null) || (B == null ? void 0 : B.message) || null, H = Q(() => {
|
|
8970
8970
|
M ? M() : R();
|
|
8971
8971
|
}, [M, R]), G = Q(
|
|
8972
8972
|
(M0, L0) => {
|
|
@@ -8996,11 +8996,11 @@ const gp = ({
|
|
|
8996
8996
|
pagination: {
|
|
8997
8997
|
currentPage: h + 1,
|
|
8998
8998
|
totalPages: m,
|
|
8999
|
-
onPageChange:
|
|
8999
|
+
onPageChange: f,
|
|
9000
9000
|
ariaLabel: p.courseWorkPagination
|
|
9001
9001
|
},
|
|
9002
9002
|
loadingOverlay: {
|
|
9003
|
-
isLoading:
|
|
9003
|
+
isLoading: y,
|
|
9004
9004
|
ariaLabel: p.loadingCourseWork
|
|
9005
9005
|
},
|
|
9006
9006
|
headerActions: /* @__PURE__ */ O(
|
|
@@ -9052,10 +9052,10 @@ const gp = ({
|
|
|
9052
9052
|
startDate: r.startDate,
|
|
9053
9053
|
endDate: r.endDate,
|
|
9054
9054
|
courseId: n
|
|
9055
|
-
}), a = (l,
|
|
9056
|
-
|
|
9057
|
-
}, A = (l,
|
|
9058
|
-
|
|
9055
|
+
}), a = (l, q) => {
|
|
9056
|
+
q.value && typeof q.value == "string" && c(q.value);
|
|
9057
|
+
}, A = (l, q) => {
|
|
9058
|
+
q.value && typeof q.value == "string" && z(q.value);
|
|
9059
9059
|
};
|
|
9060
9060
|
return /* @__PURE__ */ O(
|
|
9061
9061
|
p1,
|
|
@@ -9100,7 +9100,7 @@ const gp = ({
|
|
|
9100
9100
|
currentPage: a,
|
|
9101
9101
|
currentPageIndex: A,
|
|
9102
9102
|
totalPages: l,
|
|
9103
|
-
goToPage:
|
|
9103
|
+
goToPage: q,
|
|
9104
9104
|
refetch: d,
|
|
9105
9105
|
isLoading: W,
|
|
9106
9106
|
isPaginationLoading: h,
|
|
@@ -9109,13 +9109,13 @@ const gp = ({
|
|
|
9109
9109
|
pageSize: i,
|
|
9110
9110
|
courseFilter: s,
|
|
9111
9111
|
...u
|
|
9112
|
-
}),
|
|
9113
|
-
(
|
|
9112
|
+
}), f = (a == null ? void 0 : a.items) || [], R = t || W, g = M || (m == null ? void 0 : m.message) || null, y = o || (() => d()), T = f, _ = Q(
|
|
9113
|
+
(B, X) => {
|
|
9114
9114
|
X.value && typeof X.value == "string" && z(X.value);
|
|
9115
9115
|
},
|
|
9116
9116
|
[z]
|
|
9117
|
-
),
|
|
9118
|
-
(
|
|
9117
|
+
), v = Q(
|
|
9118
|
+
(B, X) => {
|
|
9119
9119
|
X.value && typeof X.value == "string" && n(X.value);
|
|
9120
9120
|
},
|
|
9121
9121
|
[n]
|
|
@@ -9127,11 +9127,11 @@ const gp = ({
|
|
|
9127
9127
|
isEditMode: b,
|
|
9128
9128
|
isLoading: R,
|
|
9129
9129
|
error: g ? c.failedToLoadCourseWork : null,
|
|
9130
|
-
onRetry:
|
|
9130
|
+
onRetry: y,
|
|
9131
9131
|
pagination: {
|
|
9132
9132
|
currentPage: A + 1,
|
|
9133
9133
|
totalPages: l,
|
|
9134
|
-
onPageChange:
|
|
9134
|
+
onPageChange: q,
|
|
9135
9135
|
ariaLabel: c.courseWorkPagination
|
|
9136
9136
|
},
|
|
9137
9137
|
loadingOverlay: {
|
|
@@ -9145,10 +9145,10 @@ const gp = ({
|
|
|
9145
9145
|
selectedCourse: p,
|
|
9146
9146
|
selectedDateFilter: r,
|
|
9147
9147
|
onCourseChange: _,
|
|
9148
|
-
onDateFilterChange:
|
|
9148
|
+
onDateFilterChange: v
|
|
9149
9149
|
}
|
|
9150
9150
|
) }),
|
|
9151
|
-
/* @__PURE__ */ O(L.Item, { shouldGrow: !0, children:
|
|
9151
|
+
/* @__PURE__ */ O(L.Item, { shouldGrow: !0, children: T.length === 0 ? /* @__PURE__ */ O(L, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ O(D, { color: "secondary", children: p === "all" ? c.noUpcomingCourseWork : c.noUpcomingCourseWorkForSelectedCourse }) }) : /* @__PURE__ */ O(k, { height: "100%", children: /* @__PURE__ */ O(L, { direction: "column", children: /* @__PURE__ */ O(V0, { isUnstyled: !0, margin: "0", children: T.map((B) => /* @__PURE__ */ O(V0.Item, { margin: "0", children: /* @__PURE__ */ O(Rp, { item: B }) }, B.id)) }) }) }) })
|
|
9152
9152
|
] })
|
|
9153
9153
|
}
|
|
9154
9154
|
);
|
|
@@ -9267,7 +9267,7 @@ function ca(e = {}) {
|
|
|
9267
9267
|
executeQuery: s,
|
|
9268
9268
|
currentUserId: u,
|
|
9269
9269
|
getAccount: i
|
|
9270
|
-
} = h0(), a = M ? i(M) : void 0, A = (a == null ? void 0 : a.executeQuery) ?? s, l = (a == null ? void 0 : a.currentUserId) ?? u,
|
|
9270
|
+
} = h0(), a = M ? i(M) : void 0, A = (a == null ? void 0 : a.executeQuery) ?? s, l = (a == null ? void 0 : a.currentUserId) ?? u, q = t;
|
|
9271
9271
|
z !== M && (r(M), p(0));
|
|
9272
9272
|
const d = [
|
|
9273
9273
|
wo,
|
|
@@ -9282,7 +9282,7 @@ function ca(e = {}) {
|
|
|
9282
9282
|
data: W,
|
|
9283
9283
|
isLoading: h,
|
|
9284
9284
|
error: m,
|
|
9285
|
-
refetch:
|
|
9285
|
+
refetch: f
|
|
9286
9286
|
} = c1({
|
|
9287
9287
|
queryKey: d,
|
|
9288
9288
|
queryFn: () => oa(
|
|
@@ -9296,25 +9296,25 @@ function ca(e = {}) {
|
|
|
9296
9296
|
persister: m2,
|
|
9297
9297
|
refetchOnMount: !1,
|
|
9298
9298
|
retry: !1
|
|
9299
|
-
}), R = (W == null ? void 0 : W.pageInfo.totalCount) ?? null, g = R != null ? Math.ceil(R /
|
|
9300
|
-
const
|
|
9301
|
-
|
|
9302
|
-
}, []),
|
|
9299
|
+
}), R = (W == null ? void 0 : W.pageInfo.totalCount) ?? null, g = R != null ? Math.ceil(R / q) : 0, y = Q((v) => {
|
|
9300
|
+
const B = v - 1;
|
|
9301
|
+
B >= 0 && p(B);
|
|
9302
|
+
}, []), T = Q(() => {
|
|
9303
9303
|
p(0);
|
|
9304
9304
|
}, []), _ = Q(async () => (await o.invalidateQueries({
|
|
9305
9305
|
queryKey: [wo]
|
|
9306
|
-
}),
|
|
9306
|
+
}), f()), [o, f]);
|
|
9307
9307
|
return {
|
|
9308
9308
|
currentPage: W,
|
|
9309
9309
|
currentPageIndex: c,
|
|
9310
9310
|
totalPages: g,
|
|
9311
9311
|
totalCount: R,
|
|
9312
|
-
goToPage:
|
|
9313
|
-
resetPagination:
|
|
9312
|
+
goToPage: y,
|
|
9313
|
+
resetPagination: T,
|
|
9314
9314
|
refetch: _,
|
|
9315
9315
|
isLoading: h,
|
|
9316
9316
|
error: m,
|
|
9317
|
-
pageSize:
|
|
9317
|
+
pageSize: q
|
|
9318
9318
|
};
|
|
9319
9319
|
}
|
|
9320
9320
|
function Kt(e, b) {
|
|
@@ -9337,18 +9337,18 @@ function za({
|
|
|
9337
9337
|
currentPageIndex: a,
|
|
9338
9338
|
totalPages: A,
|
|
9339
9339
|
goToPage: l,
|
|
9340
|
-
isLoading:
|
|
9340
|
+
isLoading: q,
|
|
9341
9341
|
error: d
|
|
9342
9342
|
} = ca({
|
|
9343
9343
|
limit: Ae.PEOPLE,
|
|
9344
9344
|
accountId: r.length > 1 ? s : void 0
|
|
9345
|
-
}), W = (i == null ? void 0 : i.data) ?? [], h = M || (d ? p.failedToLoadInstructorData : null), m = !h && (t ||
|
|
9345
|
+
}), W = (i == null ? void 0 : i.data) ?? [], h = M || (d ? p.failedToLoadInstructorData : null), m = !h && (t || q), f = Q(
|
|
9346
9346
|
(g) => {
|
|
9347
|
-
var
|
|
9348
|
-
const
|
|
9349
|
-
if (!
|
|
9350
|
-
const
|
|
9351
|
-
user_id:
|
|
9347
|
+
var v, B;
|
|
9348
|
+
const y = r.length > 1 ? (v = n(s)) == null ? void 0 : v.canvasBaseUrl : (B = r[0]) == null ? void 0 : B.canvasBaseUrl;
|
|
9349
|
+
if (!y) return;
|
|
9350
|
+
const T = g.enrollments[0].user_id, _ = new URLSearchParams({
|
|
9351
|
+
user_id: T,
|
|
9352
9352
|
user_name: g.name,
|
|
9353
9353
|
compose: "true"
|
|
9354
9354
|
});
|
|
@@ -9356,7 +9356,7 @@ function za({
|
|
|
9356
9356
|
const X = g.enrollments[0].course_id;
|
|
9357
9357
|
X && _.set("context_id", `course_${X}`);
|
|
9358
9358
|
}
|
|
9359
|
-
return `${
|
|
9359
|
+
return `${y}/conversations?${_.toString()}`;
|
|
9360
9360
|
},
|
|
9361
9361
|
[r, n, s]
|
|
9362
9362
|
);
|
|
@@ -9374,7 +9374,7 @@ function za({
|
|
|
9374
9374
|
currentPage: a + 1,
|
|
9375
9375
|
totalPages: A,
|
|
9376
9376
|
onPageChange: l,
|
|
9377
|
-
isLoading:
|
|
9377
|
+
isLoading: q,
|
|
9378
9378
|
ariaLabel: p.instructorsPagination
|
|
9379
9379
|
},
|
|
9380
9380
|
children: /* @__PURE__ */ w(L, { direction: "column", height: "100%", children: [
|
|
@@ -9383,7 +9383,7 @@ function za({
|
|
|
9383
9383
|
{
|
|
9384
9384
|
renderLabel: p.account,
|
|
9385
9385
|
value: s,
|
|
9386
|
-
onChange: (g, { value:
|
|
9386
|
+
onChange: (g, { value: y }) => u(y),
|
|
9387
9387
|
children: r.map((g) => /* @__PURE__ */ O(y0.Option, { id: g.id, value: g.id, children: g.name }, g.id))
|
|
9388
9388
|
}
|
|
9389
9389
|
) }),
|
|
@@ -9423,17 +9423,17 @@ function za({
|
|
|
9423
9423
|
count: g.enrollments.length
|
|
9424
9424
|
}) }),
|
|
9425
9425
|
size: "small",
|
|
9426
|
-
children: /* @__PURE__ */ O(k, { as: "div", borderWidth: "small 0 0 0", padding: "x-small 0 0 0", children: /* @__PURE__ */ O("ul", { style: { listStyleType: "disc", margin: 0, padding: 0 }, children: g.enrollments.map((
|
|
9427
|
-
role: Kt(
|
|
9428
|
-
course:
|
|
9429
|
-
}) }) },
|
|
9426
|
+
children: /* @__PURE__ */ O(k, { as: "div", borderWidth: "small 0 0 0", padding: "x-small 0 0 0", children: /* @__PURE__ */ O("ul", { style: { listStyleType: "disc", margin: 0, padding: 0 }, children: g.enrollments.map((y) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ O(D, { size: "x-small", color: "secondary", wrap: "break-word", children: z(p.roleInCourse, {
|
|
9427
|
+
role: Kt(y.role, p),
|
|
9428
|
+
course: y.course_name ?? y.course_id
|
|
9429
|
+
}) }) }, y.id)) }) })
|
|
9430
9430
|
}
|
|
9431
9431
|
) })
|
|
9432
9432
|
] }) }),
|
|
9433
9433
|
/* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(k, { as: "div", margin: "0 small", children: /* @__PURE__ */ O(
|
|
9434
9434
|
F2,
|
|
9435
9435
|
{
|
|
9436
|
-
href:
|
|
9436
|
+
href: f(g),
|
|
9437
9437
|
target: "_blank",
|
|
9438
9438
|
rel: "noopener noreferrer",
|
|
9439
9439
|
screenReaderLabel: `${p.messageInstructor}: ${g.name}`,
|
|
@@ -9601,22 +9601,22 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9601
9601
|
showAllOption: u = !1,
|
|
9602
9602
|
"data-testid": i
|
|
9603
9603
|
}) => {
|
|
9604
|
-
const { translations: a, translate: A, announceForScreenReader: l } = J(), [
|
|
9604
|
+
const { translations: a, translate: A, announceForScreenReader: l } = J(), [q, d] = V(!1), [W, h] = V(null), [m, f] = V(""), R = r1(void 0), g = O0(() => new Map(e.map((t0) => [t0.id, t0])), [e]), y = O0(
|
|
9605
9605
|
() => b.map((t0) => g.get(t0)).filter((t0) => t0 !== void 0),
|
|
9606
9606
|
[b, g]
|
|
9607
|
-
),
|
|
9607
|
+
), T = O0(
|
|
9608
9608
|
() => [...e].sort((t0, u0) => t0.name.localeCompare(u0.name)),
|
|
9609
9609
|
[e]
|
|
9610
9610
|
), _ = O0(() => {
|
|
9611
|
-
if (!m) return
|
|
9611
|
+
if (!m) return T;
|
|
9612
9612
|
const t0 = m.toLowerCase();
|
|
9613
|
-
return
|
|
9614
|
-
}, [
|
|
9613
|
+
return T.filter((u0) => sa(u0, t0));
|
|
9614
|
+
}, [T, m]), v = O0(
|
|
9615
9615
|
() => _.slice(0, Qt),
|
|
9616
9616
|
[_]
|
|
9617
9617
|
);
|
|
9618
9618
|
H0(() => {
|
|
9619
|
-
if (!(!
|
|
9619
|
+
if (!(!q || p))
|
|
9620
9620
|
return clearTimeout(R.current), R.current = setTimeout(() => {
|
|
9621
9621
|
const t0 = _.length;
|
|
9622
9622
|
l == null || l(
|
|
@@ -9626,17 +9626,17 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9626
9626
|
}, [
|
|
9627
9627
|
_,
|
|
9628
9628
|
p,
|
|
9629
|
-
|
|
9629
|
+
q,
|
|
9630
9630
|
a.noResultsAvailable,
|
|
9631
9631
|
a.resultsAvailable,
|
|
9632
9632
|
A,
|
|
9633
9633
|
l
|
|
9634
9634
|
]);
|
|
9635
|
-
const
|
|
9635
|
+
const B = b.includes(n1.all), X = Q(
|
|
9636
9636
|
(t0) => {
|
|
9637
9637
|
const u0 = (t1) => l == null ? void 0 : l(A(a.courseRemoved, { name: t1 })), T0 = (t1) => l == null ? void 0 : l(A(a.courseSelected, { courseName: t1 }));
|
|
9638
9638
|
if (t0 === n1.all) {
|
|
9639
|
-
|
|
9639
|
+
B ? (t([]), u0(a.allCourses)) : (t([n1.all]), T0(a.allCourses));
|
|
9640
9640
|
return;
|
|
9641
9641
|
}
|
|
9642
9642
|
const l0 = g.get(t0);
|
|
@@ -9644,7 +9644,7 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9644
9644
|
t(b.filter((t1) => t1 !== t0)), l0 && u0(l0.name);
|
|
9645
9645
|
return;
|
|
9646
9646
|
}
|
|
9647
|
-
const G0 =
|
|
9647
|
+
const G0 = B ? b.filter((t1) => t1 !== n1.all) : b;
|
|
9648
9648
|
if (c && G0.length >= c) {
|
|
9649
9649
|
l == null || l(
|
|
9650
9650
|
A(a.maxSelectionsReached, { count: c })
|
|
@@ -9655,7 +9655,7 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9655
9655
|
},
|
|
9656
9656
|
[
|
|
9657
9657
|
b,
|
|
9658
|
-
|
|
9658
|
+
B,
|
|
9659
9659
|
g,
|
|
9660
9660
|
t,
|
|
9661
9661
|
c,
|
|
@@ -9667,14 +9667,14 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9667
9667
|
a.maxSelectionsReached
|
|
9668
9668
|
]
|
|
9669
9669
|
), C = O0(() => {
|
|
9670
|
-
const t0 =
|
|
9670
|
+
const t0 = B ? [
|
|
9671
9671
|
{
|
|
9672
9672
|
id: n1.all,
|
|
9673
9673
|
text: a.allCourses,
|
|
9674
9674
|
ariaLabel: a.removeAllCourses,
|
|
9675
9675
|
testId: "course-tag-all"
|
|
9676
9676
|
}
|
|
9677
|
-
] :
|
|
9677
|
+
] : y.map((u0) => ({
|
|
9678
9678
|
id: u0.id,
|
|
9679
9679
|
text: u0.name,
|
|
9680
9680
|
ariaLabel: A(a.removeCourse, { name: u0.name }),
|
|
@@ -9696,8 +9696,8 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9696
9696
|
u0.id
|
|
9697
9697
|
)) });
|
|
9698
9698
|
}, [
|
|
9699
|
-
|
|
9700
|
-
|
|
9699
|
+
B,
|
|
9700
|
+
y,
|
|
9701
9701
|
X,
|
|
9702
9702
|
A,
|
|
9703
9703
|
a.allCourses,
|
|
@@ -9722,7 +9722,7 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9722
9722
|
a.courseRemoved
|
|
9723
9723
|
]
|
|
9724
9724
|
), H = Q(() => {
|
|
9725
|
-
d(!1),
|
|
9725
|
+
d(!1), f(""), h(null);
|
|
9726
9726
|
}, []), G = () => /* @__PURE__ */ O(Q2.Option, { id: n1.loading, isDisabled: !0, children: /* @__PURE__ */ w(L, { alignItems: "center", gap: "x-small", children: [
|
|
9727
9727
|
/* @__PURE__ */ O(S1, { size: "x-small", renderTitle: a.loadingCourses }),
|
|
9728
9728
|
/* @__PURE__ */ O(D, { size: "small", children: a.loadingCourses })
|
|
@@ -9731,7 +9731,7 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9731
9731
|
{
|
|
9732
9732
|
id: n1.all,
|
|
9733
9733
|
isHighlighted: W === n1.all,
|
|
9734
|
-
isSelected:
|
|
9734
|
+
isSelected: B,
|
|
9735
9735
|
renderAfterLabel: ({ isSelected: t0 }) => t0 ? /* @__PURE__ */ O(Lb, { color: "primary-inverse", size: "x-small" }) : null,
|
|
9736
9736
|
children: a.allCourses
|
|
9737
9737
|
},
|
|
@@ -9756,10 +9756,10 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9756
9756
|
count: _.length - Qt
|
|
9757
9757
|
}) }, n1.moreHint), d0 = () => p ? G() : [
|
|
9758
9758
|
...u ? [K()] : [],
|
|
9759
|
-
...
|
|
9760
|
-
...
|
|
9759
|
+
...v.length === 0 ? [p0()] : [],
|
|
9760
|
+
...v.map(M0),
|
|
9761
9761
|
..._.length > Qt ? [L0()] : []
|
|
9762
|
-
], b0 =
|
|
9762
|
+
], b0 = B || y.length > 0;
|
|
9763
9763
|
return /* @__PURE__ */ O(
|
|
9764
9764
|
Q2,
|
|
9765
9765
|
{
|
|
@@ -9768,7 +9768,7 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9768
9768
|
assistiveText: a.typeToSearchArrowKeys,
|
|
9769
9769
|
inputValue: m,
|
|
9770
9770
|
placeholder: b0 ? void 0 : a.searchByCourseNameOrCode,
|
|
9771
|
-
isShowingOptions:
|
|
9771
|
+
isShowingOptions: q,
|
|
9772
9772
|
inputRef: n,
|
|
9773
9773
|
onBlur: () => h(null),
|
|
9774
9774
|
onRequestShowOptions: () => d(!0),
|
|
@@ -9780,7 +9780,7 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9780
9780
|
u0 && u0 !== n1.moreHint && (X(u0), H());
|
|
9781
9781
|
},
|
|
9782
9782
|
onInputChange: (t0, u0) => {
|
|
9783
|
-
|
|
9783
|
+
f(u0), d(!0);
|
|
9784
9784
|
},
|
|
9785
9785
|
onKeyDown: x,
|
|
9786
9786
|
renderBeforeInput: C,
|
|
@@ -9881,16 +9881,16 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9881
9881
|
onSubmit: M,
|
|
9882
9882
|
isCreating: o
|
|
9883
9883
|
}) => {
|
|
9884
|
-
const { translations: c } = J(), { locale: p, timezone: z } = h0(), [r, n] = V(""), [s, u] = V(""), [i, a] = V([]), A = Mz({ defaultTime: ua }), l = Mz({ defaultTime: da }), [
|
|
9884
|
+
const { translations: c } = J(), { locale: p, timezone: z } = h0(), [r, n] = V(""), [s, u] = V(""), [i, a] = V([]), A = Mz({ defaultTime: ua }), l = Mz({ defaultTime: da }), [q, d] = V(!1), [W, h] = V(!1), [m, f] = V(!1), [R, g] = V(""), [y, T] = V(""), [_, v] = V(""), [B, X] = V(""), C = r1(null), x = r1(null), H = r1(null);
|
|
9885
9885
|
H0(() => {
|
|
9886
9886
|
if (e) {
|
|
9887
9887
|
if (a(b ?? []), t) {
|
|
9888
9888
|
n(t.title), u(t.message);
|
|
9889
9889
|
const [E, P] = Gc(t.startDateTime), [N, S] = Gc(t.endDateTime);
|
|
9890
|
-
A.initFrom(E, P, p, z), l.initFrom(N, S, p, z), d(t.allowComments), h(t.enablePodcast),
|
|
9890
|
+
A.initFrom(E, P, p, z), l.initFrom(N, S, p, z), d(t.allowComments), h(t.enablePodcast), f(t.allowLiking);
|
|
9891
9891
|
}
|
|
9892
9892
|
return () => {
|
|
9893
|
-
a([]), n(""), u(""), A.reset(), l.reset(), d(!1), h(!1),
|
|
9893
|
+
a([]), n(""), u(""), A.reset(), l.reset(), d(!1), h(!1), f(!1), g(""), T(""), v(""), X("");
|
|
9894
9894
|
};
|
|
9895
9895
|
}
|
|
9896
9896
|
}, [
|
|
@@ -9907,19 +9907,19 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9907
9907
|
const G = (E, P) => {
|
|
9908
9908
|
n(P), R && P.trim() && P.length <= uM && g("");
|
|
9909
9909
|
}, K = (E) => {
|
|
9910
|
-
u(E), _ && E.trim() &&
|
|
9910
|
+
u(E), _ && E.trim() && v("");
|
|
9911
9911
|
}, p0 = (E) => {
|
|
9912
|
-
a(E),
|
|
9912
|
+
a(E), y && E.length > 0 && T("");
|
|
9913
9913
|
}, M0 = Q(
|
|
9914
9914
|
(E, P) => {
|
|
9915
|
-
l.onDateChange(E, P),
|
|
9915
|
+
l.onDateChange(E, P), B && X("");
|
|
9916
9916
|
},
|
|
9917
|
-
[l.onDateChange,
|
|
9917
|
+
[l.onDateChange, B]
|
|
9918
9918
|
), L0 = Q(
|
|
9919
9919
|
(E) => {
|
|
9920
|
-
l.setTime(E),
|
|
9920
|
+
l.setTime(E), B && X("");
|
|
9921
9921
|
},
|
|
9922
|
-
[l.setTime,
|
|
9922
|
+
[l.setTime, B]
|
|
9923
9923
|
), d0 = O0(
|
|
9924
9924
|
() => ({
|
|
9925
9925
|
...l,
|
|
@@ -9928,10 +9928,10 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9928
9928
|
}),
|
|
9929
9929
|
[l, M0, L0]
|
|
9930
9930
|
), b0 = (E) => {
|
|
9931
|
-
d(E.includes("allowComments")), h(E.includes("enablePodcast")),
|
|
9931
|
+
d(E.includes("allowComments")), h(E.includes("enablePodcast")), f(E.includes("allowLiking"));
|
|
9932
9932
|
}, t0 = () => {
|
|
9933
9933
|
let E = !1, P = null;
|
|
9934
|
-
r.trim() ? r.length > uM ? (g(c.announcementTitleMaxLength), E = !0, P = C) : g("") : (g(c.announcementTitleRequired), E = !0, P = C), s.trim() ? new Blob([s]).size > Aa ? (
|
|
9934
|
+
r.trim() ? r.length > uM ? (g(c.announcementTitleMaxLength), E = !0, P = C) : g("") : (g(c.announcementTitleRequired), E = !0, P = C), s.trim() ? new Blob([s]).size > Aa ? (v(c.announcementContentTooLarge), E = !0, P || (P = H)) : v("") : (v(c.announcementContentRequired), E = !0, P || (P = H)), i.length === 0 ? (T(c.announcementCoursesRequired), E = !0, P || (P = x)) : T(""), A.hasInvalidInput && (E = !0, P || (P = A.inputRef)), l.hasInvalidInput && (E = !0, P || (P = l.inputRef));
|
|
9935
9935
|
const N = Hc(A.date, A.time), S = Hc(l.date, l.time);
|
|
9936
9936
|
if (N && S && new Date(S) < new Date(N) ? (X(c.announcementEndDateBeforeStart), E = !0, P || (P = l.inputRef)) : X(""), E) {
|
|
9937
9937
|
queueMicrotask(() => {
|
|
@@ -9946,12 +9946,12 @@ const Oa = ({ text: e }) => /* @__PURE__ */ O(
|
|
|
9946
9946
|
message: s.trim(),
|
|
9947
9947
|
startDateTime: N,
|
|
9948
9948
|
endDateTime: S,
|
|
9949
|
-
allowComments:
|
|
9949
|
+
allowComments: q,
|
|
9950
9950
|
enablePodcast: W,
|
|
9951
9951
|
allowLiking: m
|
|
9952
9952
|
});
|
|
9953
|
-
}, u0 = o ? "disabled" : "enabled", T0 = R ? [{ type: "error", text: R }] : [], l0 =
|
|
9954
|
-
|
|
9953
|
+
}, u0 = o ? "disabled" : "enabled", T0 = R ? [{ type: "error", text: R }] : [], l0 = y ? [{ type: "error", text: y }] : [], G0 = _ ? [{ type: "error", text: _ }] : [], t1 = B ? [{ type: "error", text: B }] : [], J1 = [
|
|
9954
|
+
q && "allowComments",
|
|
9955
9955
|
W && "enablePodcast",
|
|
9956
9956
|
m && "allowLiking"
|
|
9957
9957
|
].filter((E) => !!E);
|
|
@@ -10043,11 +10043,11 @@ const ma = ({
|
|
|
10043
10043
|
}) => {
|
|
10044
10044
|
const { translations: r } = J(), n = r1(null), [s, u] = V(0), i = ha("announcement-editor-");
|
|
10045
10045
|
gr(() => {
|
|
10046
|
-
const
|
|
10047
|
-
if (!
|
|
10048
|
-
const d =
|
|
10046
|
+
const q = n.current;
|
|
10047
|
+
if (!q) return;
|
|
10048
|
+
const d = q.querySelector("input");
|
|
10049
10049
|
if (!d) return;
|
|
10050
|
-
const W =
|
|
10050
|
+
const W = q.getBoundingClientRect().top, h = d.getBoundingClientRect();
|
|
10051
10051
|
u(h.top - W + h.height / 2);
|
|
10052
10052
|
});
|
|
10053
10053
|
const a = la({
|
|
@@ -10057,8 +10057,8 @@ const ma = ({
|
|
|
10057
10057
|
onSubmit: t,
|
|
10058
10058
|
isCreating: M
|
|
10059
10059
|
}), A = Q(
|
|
10060
|
-
(
|
|
10061
|
-
a.messageRef.current =
|
|
10060
|
+
(q) => {
|
|
10061
|
+
a.messageRef.current = q;
|
|
10062
10062
|
},
|
|
10063
10063
|
[a.messageRef]
|
|
10064
10064
|
), l = () => {
|
|
@@ -10098,8 +10098,8 @@ const ma = ({
|
|
|
10098
10098
|
onChange: a.onTitleChange,
|
|
10099
10099
|
messages: a.titleMessages,
|
|
10100
10100
|
interaction: a.interaction,
|
|
10101
|
-
inputRef: (
|
|
10102
|
-
a.titleRef.current =
|
|
10101
|
+
inputRef: (q) => {
|
|
10102
|
+
a.titleRef.current = q;
|
|
10103
10103
|
},
|
|
10104
10104
|
maxLength: uM
|
|
10105
10105
|
}
|
|
@@ -10130,9 +10130,9 @@ const ma = ({
|
|
|
10130
10130
|
label: r.announcementContent,
|
|
10131
10131
|
required: !0,
|
|
10132
10132
|
value: a.message,
|
|
10133
|
-
onChange: (
|
|
10134
|
-
textareaRef: (
|
|
10135
|
-
a.messageRef.current =
|
|
10133
|
+
onChange: (q) => a.onMessageChange(q.target.value),
|
|
10134
|
+
textareaRef: (q) => {
|
|
10135
|
+
a.messageRef.current = q;
|
|
10136
10136
|
},
|
|
10137
10137
|
messages: a.contentMessages,
|
|
10138
10138
|
height: "16rem",
|
|
@@ -10151,8 +10151,8 @@ const ma = ({
|
|
|
10151
10151
|
maxSelections: Fz,
|
|
10152
10152
|
interaction: a.interaction,
|
|
10153
10153
|
messages: a.courseMessages,
|
|
10154
|
-
inputRef: (
|
|
10155
|
-
a.courseInputRef.current =
|
|
10154
|
+
inputRef: (q) => {
|
|
10155
|
+
a.courseInputRef.current = q;
|
|
10156
10156
|
},
|
|
10157
10157
|
"data-testid": "announcement-course-select"
|
|
10158
10158
|
}
|
|
@@ -10162,7 +10162,7 @@ const ma = ({
|
|
|
10162
10162
|
{
|
|
10163
10163
|
match: "element",
|
|
10164
10164
|
query: { wide: { minWidth: 600 } },
|
|
10165
|
-
render: (
|
|
10165
|
+
render: (q, d) => {
|
|
10166
10166
|
const W = d == null ? void 0 : d.includes("wide");
|
|
10167
10167
|
return /* @__PURE__ */ w(L, { direction: W ? "row" : "column", gap: "small", alignItems: "start", children: [
|
|
10168
10168
|
/* @__PURE__ */ O(
|
|
@@ -10281,12 +10281,12 @@ const ma = ({
|
|
|
10281
10281
|
renderMessageEditor: t,
|
|
10282
10282
|
...M
|
|
10283
10283
|
}) => {
|
|
10284
|
-
const { translations: o, translate: c } = J(), { notify: p } = h0(), [z, r] = V([]), [n, s] = V(!1), { courses: u, isLoading: i, error: a, refetch: A } = aa(), { mutate: l, isPending:
|
|
10284
|
+
const { translations: o, translate: c } = J(), { notify: p } = h0(), [z, r] = V([]), [n, s] = V(!1), { courses: u, isLoading: i, error: a, refetch: A } = aa(), { mutate: l, isPending: q } = ra(), d = Q(
|
|
10285
10285
|
(W) => {
|
|
10286
10286
|
l(W, {
|
|
10287
10287
|
onSuccess: (h) => {
|
|
10288
|
-
const m = h.succeededCourseIds.length,
|
|
10289
|
-
|
|
10288
|
+
const m = h.succeededCourseIds.length, f = h.failedCourseIds.length, R = m === 1 ? "announcementCreatedOne" : "announcementCreatedMany", g = f === 1 ? "announcementFailedOne" : "announcementFailedMany";
|
|
10289
|
+
f === 0 ? (s(!1), r([]), p({ type: "success", message: c(R, { count: m }) }), e == null || e()) : (m > 0 && p({ type: "success", message: c(R, { count: m }) }), p({ type: "error", message: c(g, { count: f }) }), r(h.failedCourseIds), b == null || b(h.failedCourseIds));
|
|
10290
10290
|
},
|
|
10291
10291
|
// mutationFn uses Promise.allSettled so per-course failures resolve normally;
|
|
10292
10292
|
// this catches unexpected throws (e.g. from queryClient.invalidateQueries)
|
|
@@ -10336,7 +10336,7 @@ const ma = ({
|
|
|
10336
10336
|
open: n,
|
|
10337
10337
|
onDismiss: () => s(!1),
|
|
10338
10338
|
onSubmit: d,
|
|
10339
|
-
isCreating:
|
|
10339
|
+
isCreating: q,
|
|
10340
10340
|
courses: u,
|
|
10341
10341
|
initialCourseIds: z,
|
|
10342
10342
|
renderMessageEditor: t
|
|
@@ -10688,7 +10688,7 @@ async function B2(e, b) {
|
|
|
10688
10688
|
u,
|
|
10689
10689
|
i
|
|
10690
10690
|
);
|
|
10691
|
-
const
|
|
10691
|
+
const q = u.headers.get("link"), d = Pa(q);
|
|
10692
10692
|
return {
|
|
10693
10693
|
data: l.data,
|
|
10694
10694
|
response: u,
|
|
@@ -13998,8 +13998,8 @@ function is({
|
|
|
13998
13998
|
let z = sb.get(b);
|
|
13999
13999
|
z || (z = { channel: typeof BroadcastChannel < "u" ? new BroadcastChannel(b) : null, count: 0 }, sb.set(b, z)), z.count++;
|
|
14000
14000
|
const r = z.channel, n = t.getQueryCache(), s = (a, A) => {
|
|
14001
|
-
const l = Date.now(),
|
|
14002
|
-
if (a === "updated" && l -
|
|
14001
|
+
const l = Date.now(), q = o.current[c] || 0;
|
|
14002
|
+
if (a === "updated" && l - q < 100) return;
|
|
14003
14003
|
o.current[c] = l;
|
|
14004
14004
|
const d = a === "updated" && A !== void 0 ? { type: "updated", queryHash: c, state: A } : { type: "removed", queryHash: c };
|
|
14005
14005
|
r && r.postMessage(d);
|
|
@@ -14015,8 +14015,8 @@ function is({
|
|
|
14015
14015
|
const l = n.get(A.queryHash);
|
|
14016
14016
|
if (l)
|
|
14017
14017
|
if (A.type === "updated") {
|
|
14018
|
-
const
|
|
14019
|
-
|
|
14018
|
+
const q = A.state;
|
|
14019
|
+
q.dataUpdatedAt > l.state.dataUpdatedAt && l.setState(q);
|
|
14020
14020
|
} else A.type === "removed" && n.remove(l);
|
|
14021
14021
|
});
|
|
14022
14022
|
};
|
|
@@ -14190,14 +14190,14 @@ const As = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`
|
|
|
14190
14190
|
isRefetching: r,
|
|
14191
14191
|
error: n,
|
|
14192
14192
|
refetch: s
|
|
14193
|
-
} = ds({ limit: 5, filter: o }), u = (
|
|
14194
|
-
c(
|
|
14193
|
+
} = ds({ limit: 5, filter: o }), u = (q) => {
|
|
14194
|
+
c(q);
|
|
14195
14195
|
}, i = () => /* @__PURE__ */ w(
|
|
14196
14196
|
y0,
|
|
14197
14197
|
{
|
|
14198
14198
|
renderLabel: M.inboxFilterLabel,
|
|
14199
14199
|
value: o,
|
|
14200
|
-
onChange: (
|
|
14200
|
+
onChange: (q, { value: d }) => u(d),
|
|
14201
14201
|
size: "small",
|
|
14202
14202
|
width: "7rem",
|
|
14203
14203
|
"data-testid": "inbox-filter-select",
|
|
@@ -14206,7 +14206,7 @@ const As = (e, b = 80) => !e || e.length <= b ? e : `${e.slice(0, b).trim()}...`
|
|
|
14206
14206
|
/* @__PURE__ */ O(y0.Option, { id: "all", value: "all", children: M.all })
|
|
14207
14207
|
]
|
|
14208
14208
|
}
|
|
14209
|
-
), a = () => p.length === 0 ? /* @__PURE__ */ O(k, { as: "div", margin: "large 0", children: /* @__PURE__ */ O(D, { color: "secondary", size: "medium", "data-testid": "no-messages-message", children: M.noMessages }) }) : /* @__PURE__ */ O(k, { as: "div", children: /* @__PURE__ */ O(V0, { isUnstyled: !0, margin: "0", children: p.map((
|
|
14209
|
+
), a = () => p.length === 0 ? /* @__PURE__ */ O(k, { as: "div", margin: "large 0", children: /* @__PURE__ */ O(D, { color: "secondary", size: "medium", "data-testid": "no-messages-message", children: M.noMessages }) }) : /* @__PURE__ */ O(k, { as: "div", children: /* @__PURE__ */ O(V0, { isUnstyled: !0, margin: "0", children: p.map((q) => /* @__PURE__ */ O(V0.Item, { margin: "0", children: /* @__PURE__ */ O(ls, { message: q }) }, q.id)) }) }), A = () => /* @__PURE__ */ O(k, { as: "div", textAlign: "center", children: /* @__PURE__ */ O(E0, { href: "/conversations", isWithinText: !1, "data-testid": "show-all-messages-link", children: /* @__PURE__ */ O(D, { size: "small", children: M.showAllMessages }) }) }), l = () => {
|
|
14210
14210
|
s();
|
|
14211
14211
|
};
|
|
14212
14212
|
return /* @__PURE__ */ O(
|
|
@@ -14357,7 +14357,7 @@ function Rs(e = {}) {
|
|
|
14357
14357
|
executeQuery: u,
|
|
14358
14358
|
currentUserId: i,
|
|
14359
14359
|
getAccount: a
|
|
14360
|
-
} = h0(), A = M ? a(M) : void 0, l = (A == null ? void 0 : A.executeQuery) ?? u,
|
|
14360
|
+
} = h0(), A = M ? a(M) : void 0, l = (A == null ? void 0 : A.executeQuery) ?? u, q = (A == null ? void 0 : A.currentUserId) ?? i, d = t, W = o == null ? void 0 : o.join(",");
|
|
14361
14361
|
r !== M && (n(M), z(0));
|
|
14362
14362
|
const h = [
|
|
14363
14363
|
_o,
|
|
@@ -14367,14 +14367,14 @@ function Rs(e = {}) {
|
|
|
14367
14367
|
t,
|
|
14368
14368
|
M || "primary",
|
|
14369
14369
|
s ?? void 0,
|
|
14370
|
-
|
|
14370
|
+
q,
|
|
14371
14371
|
W
|
|
14372
14372
|
], {
|
|
14373
14373
|
data: m,
|
|
14374
|
-
isLoading:
|
|
14374
|
+
isLoading: f,
|
|
14375
14375
|
isFetching: R,
|
|
14376
14376
|
error: g,
|
|
14377
|
-
refetch:
|
|
14377
|
+
refetch: y
|
|
14378
14378
|
} = c1({
|
|
14379
14379
|
queryKey: h,
|
|
14380
14380
|
queryFn: () => ms(
|
|
@@ -14391,27 +14391,27 @@ function Rs(e = {}) {
|
|
|
14391
14391
|
refetchOnMount: !1,
|
|
14392
14392
|
retry: !1,
|
|
14393
14393
|
placeholderData: G2
|
|
14394
|
-
}),
|
|
14394
|
+
}), T = b.join(",");
|
|
14395
14395
|
H0(() => {
|
|
14396
14396
|
z(0);
|
|
14397
|
-
}, [
|
|
14398
|
-
const _ = (m == null ? void 0 : m.pageInfo.totalCount) ?? null,
|
|
14397
|
+
}, [T, W]);
|
|
14398
|
+
const _ = (m == null ? void 0 : m.pageInfo.totalCount) ?? null, v = _ != null ? Math.ceil(_ / d) : 0, B = Q((H) => {
|
|
14399
14399
|
const G = H - 1;
|
|
14400
14400
|
G >= 0 && z(G);
|
|
14401
14401
|
}, []), X = Q(() => {
|
|
14402
14402
|
z(0);
|
|
14403
14403
|
}, []), C = Q(async () => (await c.invalidateQueries({
|
|
14404
14404
|
queryKey: [_o]
|
|
14405
|
-
}),
|
|
14405
|
+
}), y()), [c, y]);
|
|
14406
14406
|
return {
|
|
14407
14407
|
currentPage: m,
|
|
14408
14408
|
currentPageIndex: p,
|
|
14409
|
-
totalPages:
|
|
14409
|
+
totalPages: v,
|
|
14410
14410
|
totalCount: _,
|
|
14411
|
-
goToPage:
|
|
14411
|
+
goToPage: B,
|
|
14412
14412
|
resetPagination: X,
|
|
14413
14413
|
refetch: C,
|
|
14414
|
-
isLoading:
|
|
14414
|
+
isLoading: f,
|
|
14415
14415
|
isPaginationLoading: R && !!m,
|
|
14416
14416
|
error: g,
|
|
14417
14417
|
pageSize: d
|
|
@@ -14465,29 +14465,29 @@ const Ls = ({
|
|
|
14465
14465
|
"selectedRole",
|
|
14466
14466
|
"all",
|
|
14467
14467
|
gs
|
|
14468
|
-
), [a, A] = V(null), [l,
|
|
14468
|
+
), [a, A] = V(null), [l, q] = V(0), d = O0(() => n === "all" ? [] : [n], [n]), W = O0(() => {
|
|
14469
14469
|
if (u !== "all")
|
|
14470
14470
|
return u === "teacher" ? ["TeacherEnrollment"] : ["TaEnrollment"];
|
|
14471
14471
|
}, [u]), {
|
|
14472
14472
|
currentPage: h,
|
|
14473
14473
|
currentPageIndex: m,
|
|
14474
|
-
totalPages:
|
|
14474
|
+
totalPages: f,
|
|
14475
14475
|
goToPage: R,
|
|
14476
14476
|
isLoading: g,
|
|
14477
|
-
isPaginationLoading:
|
|
14478
|
-
error:
|
|
14477
|
+
isPaginationLoading: y,
|
|
14478
|
+
error: T
|
|
14479
14479
|
} = Rs({
|
|
14480
14480
|
courseIds: d,
|
|
14481
14481
|
limit: Ae.PEOPLE,
|
|
14482
14482
|
enrollmentTypes: W
|
|
14483
|
-
}), _ = (h == null ? void 0 : h.data) ?? [],
|
|
14483
|
+
}), _ = (h == null ? void 0 : h.data) ?? [], v = M || (T ? z.failedToLoadInstructorData : null), B = !v && (t || g), X = (G) => {
|
|
14484
14484
|
const K = G.enrollments[0];
|
|
14485
14485
|
!(K != null && K.course_id) || !K.user_id || (A({
|
|
14486
14486
|
id: K.user_id,
|
|
14487
14487
|
displayName: G.name,
|
|
14488
14488
|
email: G.email,
|
|
14489
14489
|
contextCode: `course_${K.course_id}`
|
|
14490
|
-
}),
|
|
14490
|
+
}), q((p0) => p0 + 1));
|
|
14491
14491
|
}, C = () => {
|
|
14492
14492
|
A(null);
|
|
14493
14493
|
}, x = Q(
|
|
@@ -14507,18 +14507,18 @@ const Ls = ({
|
|
|
14507
14507
|
widget: e,
|
|
14508
14508
|
isEditMode: b,
|
|
14509
14509
|
dragHandleProps: c,
|
|
14510
|
-
isLoading:
|
|
14511
|
-
error:
|
|
14510
|
+
isLoading: B,
|
|
14511
|
+
error: v,
|
|
14512
14512
|
onRetry: o,
|
|
14513
14513
|
loadingText: z.loadingPeopleData,
|
|
14514
14514
|
pagination: {
|
|
14515
14515
|
currentPage: m + 1,
|
|
14516
|
-
totalPages:
|
|
14516
|
+
totalPages: f,
|
|
14517
14517
|
onPageChange: R,
|
|
14518
14518
|
ariaLabel: z.instructorsPagination
|
|
14519
14519
|
},
|
|
14520
14520
|
loadingOverlay: {
|
|
14521
|
-
isLoading:
|
|
14521
|
+
isLoading: y,
|
|
14522
14522
|
ariaLabel: z.loadingInstructors
|
|
14523
14523
|
},
|
|
14524
14524
|
children: [
|
|
@@ -14924,39 +14924,37 @@ function Xs(e, b) {
|
|
|
14924
14924
|
return btoa(String(t));
|
|
14925
14925
|
}
|
|
14926
14926
|
function Ss(e = {}) {
|
|
14927
|
-
const { executeQuery: b, currentUserId: t } = h0(), { observedUserId: M } = S0(), o = m1(), c = e.pageSize || 5
|
|
14928
|
-
O0(
|
|
14927
|
+
const { executeQuery: b, currentUserId: t } = h0(), { observedUserId: M } = S0(), o = m1(), c = e.pageSize || 5, p = O0(
|
|
14929
14928
|
() => JSON.stringify({
|
|
14930
14929
|
courseFilter: e.courseFilter,
|
|
14931
14930
|
observedUserId: M
|
|
14932
14931
|
}),
|
|
14933
14932
|
[e.courseFilter, M]
|
|
14934
|
-
);
|
|
14935
|
-
const [p, z] = V(0);
|
|
14933
|
+
), [z, r] = V(0);
|
|
14936
14934
|
H0(() => {
|
|
14937
|
-
|
|
14938
|
-
}, []);
|
|
14939
|
-
const
|
|
14935
|
+
r(0);
|
|
14936
|
+
}, [p]);
|
|
14937
|
+
const n = [
|
|
14940
14938
|
Oz,
|
|
14941
14939
|
"page",
|
|
14942
|
-
|
|
14940
|
+
z,
|
|
14943
14941
|
c,
|
|
14944
14942
|
e.courseFilter,
|
|
14945
14943
|
M ?? void 0
|
|
14946
|
-
],
|
|
14947
|
-
var
|
|
14948
|
-
const
|
|
14944
|
+
], s = async () => {
|
|
14945
|
+
var v;
|
|
14946
|
+
const R = Xs(z, c), g = await b(ws, {
|
|
14949
14947
|
userId: t,
|
|
14950
14948
|
first: c,
|
|
14951
|
-
after:
|
|
14949
|
+
after: R,
|
|
14952
14950
|
courseFilter: e.courseFilter,
|
|
14953
14951
|
observedUserId: M
|
|
14954
14952
|
});
|
|
14955
|
-
if (
|
|
14953
|
+
if (g.errors)
|
|
14956
14954
|
throw new Error(
|
|
14957
|
-
`GraphQL query failed: ${
|
|
14955
|
+
`GraphQL query failed: ${g.errors.map((B) => B.message).join(", ")}`
|
|
14958
14956
|
);
|
|
14959
|
-
if (!((
|
|
14957
|
+
if (!((v = g == null ? void 0 : g.legacyNode) != null && v.courseWorkSubmissionsConnection))
|
|
14960
14958
|
return {
|
|
14961
14959
|
submissions: [],
|
|
14962
14960
|
pageInfo: {
|
|
@@ -14967,43 +14965,43 @@ function Ss(e = {}) {
|
|
|
14967
14965
|
totalCount: null
|
|
14968
14966
|
}
|
|
14969
14967
|
};
|
|
14970
|
-
const { nodes:
|
|
14968
|
+
const { nodes: y, pageInfo: T } = g.legacyNode.courseWorkSubmissionsConnection;
|
|
14971
14969
|
return {
|
|
14972
|
-
submissions:
|
|
14973
|
-
_id:
|
|
14974
|
-
submittedAt:
|
|
14975
|
-
gradedAt:
|
|
14976
|
-
score:
|
|
14977
|
-
grade:
|
|
14978
|
-
excused:
|
|
14979
|
-
state:
|
|
14970
|
+
submissions: y.map((B) => ({
|
|
14971
|
+
_id: B._id,
|
|
14972
|
+
submittedAt: B.submittedAt,
|
|
14973
|
+
gradedAt: B.gradedAt,
|
|
14974
|
+
score: B.score,
|
|
14975
|
+
grade: B.grade,
|
|
14976
|
+
excused: B.excused,
|
|
14977
|
+
state: B.state,
|
|
14980
14978
|
assignment: {
|
|
14981
|
-
_id:
|
|
14982
|
-
name:
|
|
14983
|
-
htmlUrl:
|
|
14984
|
-
pointsPossible:
|
|
14985
|
-
gradingType:
|
|
14986
|
-
submissionTypes:
|
|
14987
|
-
quiz:
|
|
14988
|
-
discussion:
|
|
14979
|
+
_id: B.assignment._id,
|
|
14980
|
+
name: B.assignment.name,
|
|
14981
|
+
htmlUrl: B.assignment.htmlUrl,
|
|
14982
|
+
pointsPossible: B.assignment.pointsPossible,
|
|
14983
|
+
gradingType: B.assignment.gradingType,
|
|
14984
|
+
submissionTypes: B.assignment.submissionTypes,
|
|
14985
|
+
quiz: B.assignment.quiz,
|
|
14986
|
+
discussion: B.assignment.discussion,
|
|
14989
14987
|
course: {
|
|
14990
|
-
_id:
|
|
14991
|
-
name:
|
|
14992
|
-
courseCode:
|
|
14988
|
+
_id: B.assignment.course._id,
|
|
14989
|
+
name: B.assignment.course.name,
|
|
14990
|
+
courseCode: B.assignment.course.courseCode
|
|
14993
14991
|
}
|
|
14994
14992
|
}
|
|
14995
14993
|
})),
|
|
14996
|
-
pageInfo: { ...
|
|
14994
|
+
pageInfo: { ...T }
|
|
14997
14995
|
};
|
|
14998
14996
|
}, {
|
|
14999
|
-
data:
|
|
15000
|
-
isLoading:
|
|
15001
|
-
isFetching:
|
|
15002
|
-
error:
|
|
15003
|
-
refetch:
|
|
14997
|
+
data: u,
|
|
14998
|
+
isLoading: i,
|
|
14999
|
+
isFetching: a,
|
|
15000
|
+
error: A,
|
|
15001
|
+
refetch: l
|
|
15004
15002
|
} = c1({
|
|
15005
|
-
queryKey:
|
|
15006
|
-
queryFn:
|
|
15003
|
+
queryKey: n,
|
|
15004
|
+
queryFn: s,
|
|
15007
15005
|
enabled: !!t,
|
|
15008
15006
|
staleTime: 5 * 60 * 1e3,
|
|
15009
15007
|
// 5 minutes
|
|
@@ -15011,25 +15009,25 @@ function Ss(e = {}) {
|
|
|
15011
15009
|
// Keep the previous page's data while a new page loads so the pagination
|
|
15012
15010
|
// overlay (not the full skeleton) shows when navigating to an uncached page.
|
|
15013
15011
|
placeholderData: G2
|
|
15014
|
-
}),
|
|
15015
|
-
const
|
|
15016
|
-
|
|
15017
|
-
}, []),
|
|
15018
|
-
|
|
15019
|
-
}, []),
|
|
15012
|
+
}), q = (u == null ? void 0 : u.pageInfo.totalCount) ?? null, d = q != null ? Math.ceil(q / c) : 0, W = Q((R) => {
|
|
15013
|
+
const g = R - 1;
|
|
15014
|
+
g >= 0 && r(g);
|
|
15015
|
+
}, []), h = Q(() => {
|
|
15016
|
+
r(0);
|
|
15017
|
+
}, []), m = Q(async () => (await o.invalidateQueries({
|
|
15020
15018
|
queryKey: [Oz]
|
|
15021
|
-
}),
|
|
15019
|
+
}), l()), [o, l]);
|
|
15022
15020
|
return {
|
|
15023
|
-
currentPage:
|
|
15024
|
-
currentPageIndex:
|
|
15025
|
-
totalPages:
|
|
15026
|
-
totalCount:
|
|
15027
|
-
goToPage:
|
|
15028
|
-
resetPagination:
|
|
15029
|
-
refetch:
|
|
15030
|
-
isLoading:
|
|
15031
|
-
isPaginationLoading:
|
|
15032
|
-
error:
|
|
15021
|
+
currentPage: u,
|
|
15022
|
+
currentPageIndex: z,
|
|
15023
|
+
totalPages: d,
|
|
15024
|
+
totalCount: q,
|
|
15025
|
+
goToPage: W,
|
|
15026
|
+
resetPagination: h,
|
|
15027
|
+
refetch: m,
|
|
15028
|
+
isLoading: i,
|
|
15029
|
+
isPaginationLoading: a && !!u,
|
|
15030
|
+
error: A,
|
|
15033
15031
|
pageSize: c
|
|
15034
15032
|
};
|
|
15035
15033
|
}
|
|
@@ -15372,12 +15370,12 @@ X0.div = function(e) {
|
|
|
15372
15370
|
throw Error(Gp);
|
|
15373
15371
|
if (!M[0])
|
|
15374
15372
|
return e.s = c, e.c = [e.e = 0], e;
|
|
15375
|
-
var z, r, n, s, u, i = o.slice(), a = z = o.length, A = M.length, l = M.slice(0, z),
|
|
15376
|
-
for (d.s = c, c = m < 0 ? 0 : m, i.unshift(0);
|
|
15373
|
+
var z, r, n, s, u, i = o.slice(), a = z = o.length, A = M.length, l = M.slice(0, z), q = l.length, d = e, W = d.c = [], h = 0, m = p + (d.e = b.e - e.e) + 1;
|
|
15374
|
+
for (d.s = c, c = m < 0 ? 0 : m, i.unshift(0); q++ < z; ) l.push(0);
|
|
15377
15375
|
do {
|
|
15378
15376
|
for (n = 0; n < 10; n++) {
|
|
15379
|
-
if (z != (
|
|
15380
|
-
s = z >
|
|
15377
|
+
if (z != (q = l.length))
|
|
15378
|
+
s = z > q ? 1 : -1;
|
|
15381
15379
|
else
|
|
15382
15380
|
for (u = -1, s = 0; ++u < z; )
|
|
15383
15381
|
if (o[u] != l[u]) {
|
|
@@ -15385,18 +15383,18 @@ X0.div = function(e) {
|
|
|
15385
15383
|
break;
|
|
15386
15384
|
}
|
|
15387
15385
|
if (s < 0) {
|
|
15388
|
-
for (r =
|
|
15389
|
-
if (l[--
|
|
15390
|
-
for (u =
|
|
15391
|
-
--l[u], l[
|
|
15386
|
+
for (r = q == z ? o : i; q; ) {
|
|
15387
|
+
if (l[--q] < r[q]) {
|
|
15388
|
+
for (u = q; u && !l[--u]; ) l[u] = 9;
|
|
15389
|
+
--l[u], l[q] += 10;
|
|
15392
15390
|
}
|
|
15393
|
-
l[
|
|
15391
|
+
l[q] -= r[q];
|
|
15394
15392
|
}
|
|
15395
15393
|
for (; !l[0]; ) l.shift();
|
|
15396
15394
|
} else
|
|
15397
15395
|
break;
|
|
15398
15396
|
}
|
|
15399
|
-
W[h++] = s ? n : ++n, l[0] && s ? l[
|
|
15397
|
+
W[h++] = s ? n : ++n, l[0] && s ? l[q] = M[a] || 0 : l = [M[a]];
|
|
15400
15398
|
} while ((a++ < A || l[0] !== j1) && c--);
|
|
15401
15399
|
return !W[0] && h != 1 && (W.shift(), d.e--, m--), h > m && Y2(d, m, t.RM, l[0] !== j1), d;
|
|
15402
15400
|
};
|
|
@@ -15649,12 +15647,12 @@ I0.div = function(e) {
|
|
|
15649
15647
|
if (p !== ~~p || p < 0 || p > xb) throw Error(JM);
|
|
15650
15648
|
if (!o[0]) throw Error(Vp);
|
|
15651
15649
|
if (!M[0]) return new t(c * 0);
|
|
15652
|
-
var z, r, n, s, u, i = o.slice(), a = z = o.length, A = M.length, l = M.slice(0, z),
|
|
15653
|
-
for (d.s = c, c = m < 0 ? 0 : m, i.unshift(0);
|
|
15650
|
+
var z, r, n, s, u, i = o.slice(), a = z = o.length, A = M.length, l = M.slice(0, z), q = l.length, d = e, W = d.c = [], h = 0, m = p + (d.e = b.e - e.e) + 1;
|
|
15651
|
+
for (d.s = c, c = m < 0 ? 0 : m, i.unshift(0); q++ < z; ) l.push(0);
|
|
15654
15652
|
do {
|
|
15655
15653
|
for (n = 0; n < 10; n++) {
|
|
15656
|
-
if (z != (
|
|
15657
|
-
s = z >
|
|
15654
|
+
if (z != (q = l.length))
|
|
15655
|
+
s = z > q ? 1 : -1;
|
|
15658
15656
|
else
|
|
15659
15657
|
for (u = -1, s = 0; ++u < z; )
|
|
15660
15658
|
if (o[u] != l[u]) {
|
|
@@ -15662,18 +15660,18 @@ I0.div = function(e) {
|
|
|
15662
15660
|
break;
|
|
15663
15661
|
}
|
|
15664
15662
|
if (s < 0) {
|
|
15665
|
-
for (r =
|
|
15666
|
-
if (l[--
|
|
15667
|
-
for (u =
|
|
15668
|
-
--l[u], l[
|
|
15663
|
+
for (r = q == z ? o : i; q; ) {
|
|
15664
|
+
if (l[--q] < r[q]) {
|
|
15665
|
+
for (u = q; u && !l[--u]; ) l[u] = 9;
|
|
15666
|
+
--l[u], l[q] += 10;
|
|
15669
15667
|
}
|
|
15670
|
-
l[
|
|
15668
|
+
l[q] -= r[q];
|
|
15671
15669
|
}
|
|
15672
15670
|
for (; !l[0]; ) l.shift();
|
|
15673
15671
|
} else
|
|
15674
15672
|
break;
|
|
15675
15673
|
}
|
|
15676
|
-
W[h++] = s ? n : ++n, l[0] && s ? l[
|
|
15674
|
+
W[h++] = s ? n : ++n, l[0] && s ? l[q] = M[a] || 0 : l = [M[a]];
|
|
15677
15675
|
} while ((a++ < A || l[0] !== U2) && c--);
|
|
15678
15676
|
return !W[0] && h != 1 && (W.shift(), d.e--), h > m && Zb(d, p, t.RM, l[0] !== U2), d;
|
|
15679
15677
|
};
|
|
@@ -16038,7 +16036,7 @@ const Bu = ({
|
|
|
16038
16036
|
isRightColumn: b = !1
|
|
16039
16037
|
}) => {
|
|
16040
16038
|
var g;
|
|
16041
|
-
const { translations: t, translate: M } = J(), { sharedCourseData: o } = S0(), { isMobile: c } = K1(), p = c || b, z = e.assignment.htmlUrl, r = e.assignment.course._id, n = e.assignment.name, s = e.assignment.course.name, u = o.find((
|
|
16039
|
+
const { translations: t, translate: M } = J(), { sharedCourseData: o } = S0(), { isMobile: c } = K1(), p = c || b, z = e.assignment.htmlUrl, r = e.assignment.course._id, n = e.assignment.name, s = e.assignment.course.name, u = o.find((y) => y.courseId === r), i = (u == null ? void 0 : u.currentGrade) ?? null, a = (u == null ? void 0 : u.gradingScheme) ?? "percentage", A = (u == null ? void 0 : u.restrictQuantitativeData) ?? !1, l = (u == null ? void 0 : u.pointsBasedGradingScheme) ?? !1, q = u == null ? void 0 : u.scalingFactor, { data: d, isLoading: W, error: h } = Cs(e._id), m = ((g = d == null ? void 0 : d.rubricAssessments) == null ? void 0 : g[0]) || null, f = (d == null ? void 0 : d.comments) || [], R = (d == null ? void 0 : d.totalCommentsCount) || 0;
|
|
16042
16040
|
return /* @__PURE__ */ O(
|
|
16043
16041
|
k,
|
|
16044
16042
|
{
|
|
@@ -16059,7 +16057,7 @@ const Bu = ({
|
|
|
16059
16057
|
gradingScheme: a,
|
|
16060
16058
|
restrictQuantitativeData: A,
|
|
16061
16059
|
pointsBasedGradingScheme: l,
|
|
16062
|
-
scalingFactor:
|
|
16060
|
+
scalingFactor: q,
|
|
16063
16061
|
submissionId: e._id
|
|
16064
16062
|
}
|
|
16065
16063
|
) }),
|
|
@@ -16082,7 +16080,7 @@ const Bu = ({
|
|
|
16082
16080
|
/* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(
|
|
16083
16081
|
Es,
|
|
16084
16082
|
{
|
|
16085
|
-
comments:
|
|
16083
|
+
comments: f,
|
|
16086
16084
|
submissionId: e._id,
|
|
16087
16085
|
totalCommentsCount: R,
|
|
16088
16086
|
assignmentUrl: z,
|
|
@@ -16168,7 +16166,7 @@ const Bu = ({
|
|
|
16168
16166
|
renderIcon: r ? /* @__PURE__ */ O(Ar, {}) : void 0,
|
|
16169
16167
|
children: r ? t.graded : t.notGraded
|
|
16170
16168
|
}
|
|
16171
|
-
), l = `expanded-grade-view-${e._id}`,
|
|
16169
|
+
), l = `expanded-grade-view-${e._id}`, q = /* @__PURE__ */ O(
|
|
16172
16170
|
F2,
|
|
16173
16171
|
{
|
|
16174
16172
|
screenReaderLabel: p ? t.collapseGradeDetails : t.expandGradeDetails,
|
|
@@ -16196,7 +16194,7 @@ const Bu = ({
|
|
|
16196
16194
|
/* @__PURE__ */ O(L.Item, { children: a }),
|
|
16197
16195
|
/* @__PURE__ */ O(L.Item, { overflowY: "visible", children: /* @__PURE__ */ w(L, { direction: "row", gap: "x-small", alignItems: "center", children: [
|
|
16198
16196
|
/* @__PURE__ */ O(L.Item, { children: A }),
|
|
16199
|
-
/* @__PURE__ */ O(L.Item, { children:
|
|
16197
|
+
/* @__PURE__ */ O(L.Item, { children: q })
|
|
16200
16198
|
] }) }),
|
|
16201
16199
|
p && /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(Az, { submission: e }) })
|
|
16202
16200
|
] })
|
|
@@ -16217,7 +16215,7 @@ const Bu = ({
|
|
|
16217
16215
|
] }) }),
|
|
16218
16216
|
/* @__PURE__ */ O(L.Item, { align: "center", children: /* @__PURE__ */ w(L, { direction: "row", gap: "x-small", alignItems: "center", children: [
|
|
16219
16217
|
/* @__PURE__ */ O(L.Item, { children: A }),
|
|
16220
|
-
/* @__PURE__ */ O(L.Item, { children:
|
|
16218
|
+
/* @__PURE__ */ O(L.Item, { children: q })
|
|
16221
16219
|
] }) })
|
|
16222
16220
|
] }) }),
|
|
16223
16221
|
p && /* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(Az, { submission: e, isRightColumn: b }) })
|
|
@@ -16239,21 +16237,21 @@ const Bu = ({
|
|
|
16239
16237
|
goToPage: a,
|
|
16240
16238
|
isLoading: A,
|
|
16241
16239
|
isPaginationLoading: l,
|
|
16242
|
-
error:
|
|
16240
|
+
error: q,
|
|
16243
16241
|
refetch: d
|
|
16244
16242
|
} = Ss({
|
|
16245
16243
|
pageSize: Xu,
|
|
16246
16244
|
courseFilter: z === "all" ? void 0 : z
|
|
16247
|
-
}), W = t || (
|
|
16248
|
-
a(
|
|
16249
|
-
}, R = (
|
|
16245
|
+
}), W = t || (q ? q.message : null), h = t ? !1 : b || A, m = (s == null ? void 0 : s.submissions) || [], f = (T) => {
|
|
16246
|
+
a(T);
|
|
16247
|
+
}, R = (T, _) => {
|
|
16250
16248
|
r(_.value);
|
|
16251
16249
|
}, g = () => {
|
|
16252
16250
|
M ? M() : d();
|
|
16253
|
-
},
|
|
16251
|
+
}, y = {
|
|
16254
16252
|
currentPage: u + 1,
|
|
16255
16253
|
totalPages: i,
|
|
16256
|
-
onPageChange:
|
|
16254
|
+
onPageChange: f,
|
|
16257
16255
|
ariaLabel: p.recentGradesPagination
|
|
16258
16256
|
};
|
|
16259
16257
|
return /* @__PURE__ */ w(
|
|
@@ -16266,7 +16264,7 @@ const Bu = ({
|
|
|
16266
16264
|
error: W,
|
|
16267
16265
|
onRetry: g,
|
|
16268
16266
|
loadingText: p.loadingRecentGrades,
|
|
16269
|
-
pagination:
|
|
16267
|
+
pagination: y,
|
|
16270
16268
|
loadingOverlay: {
|
|
16271
16269
|
isLoading: l,
|
|
16272
16270
|
ariaLabel: p.loadingGrades
|
|
@@ -16281,7 +16279,7 @@ const Bu = ({
|
|
|
16281
16279
|
disabled: h
|
|
16282
16280
|
}
|
|
16283
16281
|
) }),
|
|
16284
|
-
/* @__PURE__ */ O(k, { as: "div", "data-testid": "recent-grades-list", children: m.length > 0 ? /* @__PURE__ */ O(V0, { isUnstyled: !0, margin: "0", children: m.map((
|
|
16282
|
+
/* @__PURE__ */ O(k, { as: "div", "data-testid": "recent-grades-list", children: m.length > 0 ? /* @__PURE__ */ O(V0, { isUnstyled: !0, margin: "0", children: m.map((T) => /* @__PURE__ */ O(V0.Item, { margin: "0", children: /* @__PURE__ */ O(wu, { submission: T, isRightColumn: n }) }, T._id)) }) : /* @__PURE__ */ O(k, { as: "div", textAlign: "center", padding: "large", children: p.noRecentGradesAvailable }) })
|
|
16285
16283
|
]
|
|
16286
16284
|
}
|
|
16287
16285
|
);
|
|
@@ -18902,7 +18900,7 @@ function I4() {
|
|
|
18902
18900
|
N[I] = Math.round((N[I - 1] || 0) + N[I] * 6e4);
|
|
18903
18901
|
N[S - 1] = 1 / 0;
|
|
18904
18902
|
}
|
|
18905
|
-
function
|
|
18903
|
+
function q(N, S) {
|
|
18906
18904
|
var I = [], j;
|
|
18907
18905
|
for (j = 0; j < S.length; j++)
|
|
18908
18906
|
I[j] = N[S[j]];
|
|
@@ -18912,8 +18910,8 @@ function I4() {
|
|
|
18912
18910
|
var S = N.split("|"), I = S[2].split(" "), j = S[3].split(""), s0 = S[4].split(" ");
|
|
18913
18911
|
return A(I), A(j), A(s0), l(s0, j.length), {
|
|
18914
18912
|
name: S[0],
|
|
18915
|
-
abbrs:
|
|
18916
|
-
offsets:
|
|
18913
|
+
abbrs: q(S[1].split(" "), j),
|
|
18914
|
+
offsets: q(I, j),
|
|
18917
18915
|
untils: s0,
|
|
18918
18916
|
population: S[5] | 0
|
|
18919
18917
|
};
|
|
@@ -18968,7 +18966,7 @@ function I4() {
|
|
|
18968
18966
|
function m(N, S) {
|
|
18969
18967
|
this.name = N, this.zones = S;
|
|
18970
18968
|
}
|
|
18971
|
-
function
|
|
18969
|
+
function f(N) {
|
|
18972
18970
|
var S = N.toTimeString(), I = S.match(/\([a-z ]+\)/i);
|
|
18973
18971
|
I && I[0] ? (I = I[0].match(/[A-Z]/g), I = I ? I.join("") : void 0) : (I = S.match(/[A-Z]{3,5}/g), I = I ? I[0] : void 0), I === "GMT" && (I = void 0), this.at = +N, this.abbr = I, this.offset = N.getTimezoneOffset();
|
|
18974
18972
|
}
|
|
@@ -18980,18 +18978,18 @@ function I4() {
|
|
|
18980
18978
|
};
|
|
18981
18979
|
function g(N, S) {
|
|
18982
18980
|
for (var I, j; j = ((S.at - N.at) / 12e4 | 0) * 6e4; )
|
|
18983
|
-
I = new
|
|
18981
|
+
I = new f(new Date(N.at + j)), I.offset === N.offset ? N = I : S = I;
|
|
18984
18982
|
return N;
|
|
18985
18983
|
}
|
|
18986
|
-
function
|
|
18987
|
-
var N = (/* @__PURE__ */ new Date()).getFullYear() - 2, S = new
|
|
18984
|
+
function y() {
|
|
18985
|
+
var N = (/* @__PURE__ */ new Date()).getFullYear() - 2, S = new f(new Date(N, 0, 1)), I = S.offset, j = [S], s0, N0, r0, o0;
|
|
18988
18986
|
for (o0 = 1; o0 < 48; o0++)
|
|
18989
|
-
r0 = new Date(N, o0, 1).getTimezoneOffset(), r0 !== I && (N0 = new
|
|
18987
|
+
r0 = new Date(N, o0, 1).getTimezoneOffset(), r0 !== I && (N0 = new f(new Date(N, o0, 1)), s0 = g(S, N0), j.push(s0), j.push(new f(new Date(s0.at + 6e4))), S = N0, I = r0);
|
|
18990
18988
|
for (o0 = 0; o0 < 4; o0++)
|
|
18991
|
-
j.push(new
|
|
18989
|
+
j.push(new f(new Date(N + o0, 0, 1))), j.push(new f(new Date(N + o0, 6, 1)));
|
|
18992
18990
|
return j;
|
|
18993
18991
|
}
|
|
18994
|
-
function
|
|
18992
|
+
function T(N, S) {
|
|
18995
18993
|
return N.offsetScore !== S.offsetScore ? N.offsetScore - S.offsetScore : N.abbrScore !== S.abbrScore ? N.abbrScore - S.abbrScore : N.zone.population !== S.zone.population ? S.zone.population - N.zone.population : S.zone.name.localeCompare(N.zone.name);
|
|
18996
18994
|
}
|
|
18997
18995
|
function _(N, S) {
|
|
@@ -18999,7 +18997,7 @@ function I4() {
|
|
|
18999
18997
|
for (A(S), I = 0; I < S.length; I++)
|
|
19000
18998
|
j = S[I], z[j] = z[j] || {}, z[j][N] = !0;
|
|
19001
18999
|
}
|
|
19002
|
-
function
|
|
19000
|
+
function v(N) {
|
|
19003
19001
|
var S = N.length, I = {}, j = [], s0 = {}, N0, r0, o0, C0;
|
|
19004
19002
|
for (N0 = 0; N0 < S; N0++)
|
|
19005
19003
|
if (o0 = N[N0].offset, !s0.hasOwnProperty(o0)) {
|
|
@@ -19012,7 +19010,7 @@ function I4() {
|
|
|
19012
19010
|
I.hasOwnProperty(N0) && j.push(p[N0]);
|
|
19013
19011
|
return j;
|
|
19014
19012
|
}
|
|
19015
|
-
function
|
|
19013
|
+
function B() {
|
|
19016
19014
|
try {
|
|
19017
19015
|
var N = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
19018
19016
|
if (N && N.length > 3) {
|
|
@@ -19023,16 +19021,16 @@ function I4() {
|
|
|
19023
19021
|
}
|
|
19024
19022
|
} catch {
|
|
19025
19023
|
}
|
|
19026
|
-
var I =
|
|
19024
|
+
var I = y(), j = I.length, s0 = v(I), N0 = [], r0, o0, C0;
|
|
19027
19025
|
for (o0 = 0; o0 < s0.length; o0++) {
|
|
19028
19026
|
for (r0 = new R(H(s0[o0])), C0 = 0; C0 < j; C0++)
|
|
19029
19027
|
r0.scoreOffsetAt(I[C0]);
|
|
19030
19028
|
N0.push(r0);
|
|
19031
19029
|
}
|
|
19032
|
-
return N0.sort(
|
|
19030
|
+
return N0.sort(T), N0.length > 0 ? N0[0].zone.name : void 0;
|
|
19033
19031
|
}
|
|
19034
19032
|
function X(N) {
|
|
19035
|
-
return (!r || N) && (r =
|
|
19033
|
+
return (!r || N) && (r = B()), r;
|
|
19036
19034
|
}
|
|
19037
19035
|
function C(N) {
|
|
19038
19036
|
return (N || "").toLowerCase().replace(/\//g, "_");
|
|
@@ -19262,18 +19260,18 @@ const Y4 = (e) => ({
|
|
|
19262
19260
|
const { translations: n, translate: s } = J(), { isDark: u } = S0(), i = O0(
|
|
19263
19261
|
() => u ? Y4(Yn(u)) : {},
|
|
19264
19262
|
[u]
|
|
19265
|
-
), a = z === "edit", [A, l] = V(""), [
|
|
19263
|
+
), a = z === "edit", [A, l] = V(""), [q, d] = V(J2.tz(p).endOf("day")), [W, h] = V(""), [m, f] = V(void 0), [R, g] = V(""), [y, T] = V(""), [_, v] = V(""), B = () => {
|
|
19266
19264
|
let d0 = !1;
|
|
19267
|
-
A.trim() ? A.length > lb ? (g(s("Title must be %{max} characters or less", { max: lb })), d0 = !0) : g("") : (g(n.titleIsRequired), d0 = !0), !
|
|
19265
|
+
A.trim() ? A.length > lb ? (g(s("Title must be %{max} characters or less", { max: lb })), d0 = !0) : g("") : (g(n.titleIsRequired), d0 = !0), !q || !q.isValid() ? (T(n.dateIsRequired), d0 = !0) : T(""), W.length > pM ? (v(
|
|
19268
19266
|
s("Details must be %{max} characters or less", { max: pM })
|
|
19269
|
-
), d0 = !0) :
|
|
19267
|
+
), d0 = !0) : v(""), !d0 && (t({
|
|
19270
19268
|
title: A.trim(),
|
|
19271
|
-
todo_date: (
|
|
19269
|
+
todo_date: (q == null ? void 0 : q.toISOString()) || (/* @__PURE__ */ new Date()).toISOString(),
|
|
19272
19270
|
details: W.trim() || void 0,
|
|
19273
19271
|
course_id: m
|
|
19274
19272
|
}), a || X());
|
|
19275
19273
|
}, X = () => {
|
|
19276
|
-
l(""), d(J2.tz(p).endOf("day")), h(""),
|
|
19274
|
+
l(""), d(J2.tz(p).endOf("day")), h(""), f(void 0), g(""), T(""), v("");
|
|
19277
19275
|
}, C = () => {
|
|
19278
19276
|
X(), b();
|
|
19279
19277
|
};
|
|
@@ -19284,19 +19282,19 @@ const Y4 = (e) => ({
|
|
|
19284
19282
|
const d0 = r.todo_date ? J2.tz(r.todo_date, p) : null;
|
|
19285
19283
|
d(
|
|
19286
19284
|
d0 && d0.isValid() ? d0 : J2.tz(p).endOf("day")
|
|
19287
|
-
), h(r.details || ""),
|
|
19285
|
+
), h(r.details || ""), f(r.course_id);
|
|
19288
19286
|
} else
|
|
19289
|
-
l(""), d(J2.tz(p).endOf("day")), h(""),
|
|
19290
|
-
g(""),
|
|
19287
|
+
l(""), d(J2.tz(p).endOf("day")), h(""), f(void 0);
|
|
19288
|
+
g(""), T(""), v("");
|
|
19291
19289
|
}
|
|
19292
19290
|
}, [e, a, r, p]);
|
|
19293
19291
|
const x = (d0, b0) => {
|
|
19294
19292
|
const t0 = b0 || "";
|
|
19295
|
-
d(J2.tz(t0, p)),
|
|
19293
|
+
d(J2.tz(t0, p)), y && t0 && T("");
|
|
19296
19294
|
}, H = (d0, b0) => {
|
|
19297
19295
|
const t0 = typeof b0.value == "string" ? b0.value : void 0;
|
|
19298
|
-
t0 &&
|
|
19299
|
-
}, G = (d0, b0) => d0 ? s("%{date} is not a valid date.", { date: d0 }) : n.youMustProvideDateTime, K = A.trim().length > 0 &&
|
|
19296
|
+
t0 && f(t0 === "none" ? void 0 : t0);
|
|
19297
|
+
}, G = (d0, b0) => d0 ? s("%{date} is not a valid date.", { date: d0 }) : n.youMustProvideDateTime, K = A.trim().length > 0 && q && q.isValid(), p0 = {
|
|
19300
19298
|
value: "none",
|
|
19301
19299
|
label: n.optionalAddCourse
|
|
19302
19300
|
}, M0 = O0(
|
|
@@ -19350,7 +19348,7 @@ const Y4 = (e) => ({
|
|
|
19350
19348
|
{
|
|
19351
19349
|
isRequired: !0,
|
|
19352
19350
|
description: /* @__PURE__ */ O(G1, { children: n.dateTimeTodoIsDue }),
|
|
19353
|
-
messages:
|
|
19351
|
+
messages: y ? [{ type: "error", text: y }] : [],
|
|
19354
19352
|
dateRenderLabel: n.date,
|
|
19355
19353
|
nextMonthLabel: n.nextMonth,
|
|
19356
19354
|
prevMonthLabel: n.previousMonth,
|
|
@@ -19358,7 +19356,7 @@ const Y4 = (e) => ({
|
|
|
19358
19356
|
timeStep: 30,
|
|
19359
19357
|
locale: c,
|
|
19360
19358
|
timezone: p,
|
|
19361
|
-
value:
|
|
19359
|
+
value: q != null && q.isValid() ? q.toISOString() : void 0,
|
|
19362
19360
|
layout: "stacked",
|
|
19363
19361
|
onChange: x,
|
|
19364
19362
|
invalidDateTimeMessage: G,
|
|
@@ -19385,7 +19383,7 @@ const Y4 = (e) => ({
|
|
|
19385
19383
|
label: n.details,
|
|
19386
19384
|
value: W,
|
|
19387
19385
|
onChange: (d0) => {
|
|
19388
|
-
h(d0.target.value), _ && d0.target.value.length <= pM &&
|
|
19386
|
+
h(d0.target.value), _ && d0.target.value.length <= pM && v("");
|
|
19389
19387
|
},
|
|
19390
19388
|
messages: _ ? [{ type: "error", text: _ }] : [],
|
|
19391
19389
|
height: "10rem",
|
|
@@ -19408,7 +19406,7 @@ const Y4 = (e) => ({
|
|
|
19408
19406
|
Z0,
|
|
19409
19407
|
{
|
|
19410
19408
|
"data-testid": "create-todo-submit-button",
|
|
19411
|
-
onClick:
|
|
19409
|
+
onClick: B,
|
|
19412
19410
|
color: "primary",
|
|
19413
19411
|
interaction: M || !K ? "disabled" : "enabled",
|
|
19414
19412
|
children: M ? a ? n.saving : n.creating : n.save
|
|
@@ -19557,7 +19555,7 @@ async function oq(e, b) {
|
|
|
19557
19555
|
}
|
|
19558
19556
|
const it = "plannerItems";
|
|
19559
19557
|
function cq(e = {}) {
|
|
19560
|
-
const { perPage: b = 5, startDate: t, endDate: M, order: o = "asc", filter: c, observedUserId: p } = e, [z, r] = V(0), [n, s] = V([]), [u, i] = V([]), [a, A] = V(!1), l = r1(null),
|
|
19558
|
+
const { perPage: b = 5, startDate: t, endDate: M, order: o = "asc", filter: c, observedUserId: p } = e, [z, r] = V(0), [n, s] = V([]), [u, i] = V([]), [a, A] = V(!1), l = r1(null), q = O0(() => {
|
|
19561
19559
|
const C = {
|
|
19562
19560
|
per_page: b,
|
|
19563
19561
|
order: o
|
|
@@ -19568,10 +19566,10 @@ function cq(e = {}) {
|
|
|
19568
19566
|
isLoading: W,
|
|
19569
19567
|
isFetching: h,
|
|
19570
19568
|
error: m,
|
|
19571
|
-
refetch:
|
|
19569
|
+
refetch: f
|
|
19572
19570
|
} = c1({
|
|
19573
|
-
queryKey: [it,
|
|
19574
|
-
queryFn: () => Lz(
|
|
19571
|
+
queryKey: [it, q],
|
|
19572
|
+
queryFn: () => Lz(q),
|
|
19575
19573
|
staleTime: 5 * 60 * 1e3,
|
|
19576
19574
|
retry: 2,
|
|
19577
19575
|
persister: m2,
|
|
@@ -19584,7 +19582,7 @@ function cq(e = {}) {
|
|
|
19584
19582
|
const C = z, x = C - 1;
|
|
19585
19583
|
if (C >= n.length && x >= 0 && x < u.length && u[x]) {
|
|
19586
19584
|
const H = u[x];
|
|
19587
|
-
!a && l.current !== C && (l.current = C, A(!0), Lz(
|
|
19585
|
+
!a && l.current !== C && (l.current = C, A(!0), Lz(q, H).then((G) => {
|
|
19588
19586
|
s((K) => {
|
|
19589
19587
|
const p0 = [...K];
|
|
19590
19588
|
return p0[C] = G.items, p0;
|
|
@@ -19597,14 +19595,14 @@ function cq(e = {}) {
|
|
|
19597
19595
|
A(!1), l.current = null;
|
|
19598
19596
|
}));
|
|
19599
19597
|
}
|
|
19600
|
-
}, [z, n.length, u, a,
|
|
19598
|
+
}, [z, n.length, u, a, q]);
|
|
19601
19599
|
const R = Q((C) => {
|
|
19602
19600
|
r(C - 1);
|
|
19603
19601
|
}, []), g = Q(() => {
|
|
19604
19602
|
r(0);
|
|
19605
|
-
}, []),
|
|
19606
|
-
s([]), i([]), r(0), l.current = null,
|
|
19607
|
-
}, [
|
|
19603
|
+
}, []), y = Q(() => {
|
|
19604
|
+
s([]), i([]), r(0), l.current = null, f();
|
|
19605
|
+
}, [f]), T = Q(
|
|
19608
19606
|
(C, x, H) => {
|
|
19609
19607
|
s(
|
|
19610
19608
|
(G) => G.map(
|
|
@@ -19615,7 +19613,7 @@ function cq(e = {}) {
|
|
|
19615
19613
|
);
|
|
19616
19614
|
},
|
|
19617
19615
|
[]
|
|
19618
|
-
), _ = n[z] || n[n.length - 1] || [],
|
|
19616
|
+
), _ = n[z] || n[n.length - 1] || [], v = n.length - 1, B = v >= 0 && v < u.length && !!u[v], X = n.length + (B ? 1 : 0);
|
|
19619
19617
|
return {
|
|
19620
19618
|
currentPage: _,
|
|
19621
19619
|
currentPageIndex: z,
|
|
@@ -19625,8 +19623,8 @@ function cq(e = {}) {
|
|
|
19625
19623
|
isLoading: W,
|
|
19626
19624
|
isPaginationLoading: (h || a) && n.length > 0,
|
|
19627
19625
|
error: m,
|
|
19628
|
-
refetch:
|
|
19629
|
-
updateItemOverride:
|
|
19626
|
+
refetch: y,
|
|
19627
|
+
updateItemOverride: T
|
|
19630
19628
|
};
|
|
19631
19629
|
}
|
|
19632
19630
|
function zq() {
|
|
@@ -19734,11 +19732,11 @@ const uq = ({
|
|
|
19734
19732
|
readOnly: M = !1
|
|
19735
19733
|
}) => {
|
|
19736
19734
|
var C, x;
|
|
19737
|
-
const { translations: o, translate: c } = J(), { locale: p, timezone: z } = h0(), { isDark: r } = S0(), n = Yn(r), s = z || Intl.DateTimeFormat().resolvedOptions().timeZone, u = e.plannable_type === "announcement", i = e.plannable_type === "planner_note", a = u ? iq(e.plannable_date, c, p, s) : rq(e.plannable_date, o, c, p, s), A = !u && Oq(e.plannable_date), l = !u && sq(e.plannable.lock_at),
|
|
19735
|
+
const { translations: o, translate: c } = J(), { locale: p, timezone: z } = h0(), { isDark: r } = S0(), n = Yn(r), s = z || Intl.DateTimeFormat().resolvedOptions().timeZone, u = e.plannable_type === "announcement", i = e.plannable_type === "planner_note", a = u ? iq(e.plannable_date, c, p, s) : rq(e.plannable_date, o, c, p, s), A = !u && Oq(e.plannable_date), l = !u && sq(e.plannable.lock_at), q = aq(e.plannable_type, o), { toggleComplete: d, isLoading: W } = nq({
|
|
19738
19736
|
onSuccess: (H, { item: G }) => {
|
|
19739
19737
|
b == null || b(G.plannable_id, G.plannable_type, H);
|
|
19740
19738
|
}
|
|
19741
|
-
}), h = r1(null), m = r1(!1),
|
|
19739
|
+
}), h = r1(null), m = r1(!1), f = typeof e.submissions == "object", R = e.submissions && f && e.submissions.excused === !0, g = e.planner_override ? e.planner_override.marked_complete : e.submissions && f && e.submissions.submitted && !e.submissions.redo_request, y = R && ((C = e.planner_override) == null ? void 0 : C.marked_complete) !== !1, T = !!(g || y), _ = e.course_id || e.plannable.course_id, v = e.plannable.points_possible, B = v != null && v > 0;
|
|
19742
19740
|
H0(() => {
|
|
19743
19741
|
var H;
|
|
19744
19742
|
m.current && !W && ((H = h.current) == null || H.focus()), m.current = W;
|
|
@@ -19746,7 +19744,7 @@ const uq = ({
|
|
|
19746
19744
|
const X = () => {
|
|
19747
19745
|
d({
|
|
19748
19746
|
item: e,
|
|
19749
|
-
markedComplete: !
|
|
19747
|
+
markedComplete: !T
|
|
19750
19748
|
});
|
|
19751
19749
|
};
|
|
19752
19750
|
return /* @__PURE__ */ O(
|
|
@@ -19766,7 +19764,7 @@ const uq = ({
|
|
|
19766
19764
|
},
|
|
19767
19765
|
children: /* @__PURE__ */ w(L, { direction: "column", children: [
|
|
19768
19766
|
/* @__PURE__ */ O(L.Item, { overflowY: "visible", overflowX: "visible", children: /* @__PURE__ */ w(L, { justifyItems: "space-between", alignItems: "start", gap: "small", children: [
|
|
19769
|
-
/* @__PURE__ */ O(L.Item, { shouldShrink: !0, children: /* @__PURE__ */ O(D, { size: "small", color: "secondary", children:
|
|
19767
|
+
/* @__PURE__ */ O(L.Item, { shouldShrink: !0, children: /* @__PURE__ */ O(D, { size: "small", color: "secondary", children: q }) }),
|
|
19770
19768
|
i && !M && /* @__PURE__ */ O(L.Item, { overflowY: "visible", overflowX: "visible", children: /* @__PURE__ */ O(
|
|
19771
19769
|
F2,
|
|
19772
19770
|
{
|
|
@@ -19795,7 +19793,7 @@ const uq = ({
|
|
|
19795
19793
|
{
|
|
19796
19794
|
weight: "bold",
|
|
19797
19795
|
wrap: "break-word",
|
|
19798
|
-
color:
|
|
19796
|
+
color: T ? "secondary" : void 0,
|
|
19799
19797
|
children: e.plannable.title
|
|
19800
19798
|
}
|
|
19801
19799
|
)
|
|
@@ -19813,8 +19811,8 @@ const uq = ({
|
|
|
19813
19811
|
) }),
|
|
19814
19812
|
/* @__PURE__ */ O(L.Item, { overflowY: "visible", children: /* @__PURE__ */ w(D, { size: "small", children: [
|
|
19815
19813
|
R ? /* @__PURE__ */ O(D, { size: "small", color: "success", children: o.excused }) : l ? /* @__PURE__ */ O(D, { size: "small", color: "secondary", children: o.closed }) : a && /* @__PURE__ */ O(D, { size: "small", color: A ? "danger" : "secondary", children: a }),
|
|
19816
|
-
(l || a) &&
|
|
19817
|
-
|
|
19814
|
+
(l || a) && B && /* @__PURE__ */ O(D, { size: "small", color: "secondary", children: " | " }),
|
|
19815
|
+
B && /* @__PURE__ */ O(D, { size: "small", color: "secondary", children: c("%{points} points", { points: v }) })
|
|
19818
19816
|
] }) }),
|
|
19819
19817
|
/* @__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: W ? /* @__PURE__ */ O(
|
|
19820
19818
|
S1,
|
|
@@ -19829,12 +19827,12 @@ const uq = ({
|
|
|
19829
19827
|
elementRef: (H) => {
|
|
19830
19828
|
h.current = H;
|
|
19831
19829
|
},
|
|
19832
|
-
color:
|
|
19833
|
-
renderIcon:
|
|
19830
|
+
color: T ? "success" : "secondary",
|
|
19831
|
+
renderIcon: T ? /* @__PURE__ */ O(TM, {}) : /* @__PURE__ */ O(Wr, {}),
|
|
19834
19832
|
onClick: X,
|
|
19835
19833
|
"data-testid": `todo-checkbox-${e.plannable_id}`,
|
|
19836
19834
|
interaction: M ? "disabled" : "enabled",
|
|
19837
|
-
themeOverride: r && !
|
|
19835
|
+
themeOverride: r && !T ? {
|
|
19838
19836
|
secondaryBackground: n.inputBackground,
|
|
19839
19837
|
secondaryBorderColor: n.border,
|
|
19840
19838
|
secondaryColor: n.textPrimary,
|
|
@@ -19844,8 +19842,8 @@ const uq = ({
|
|
|
19844
19842
|
children: /* @__PURE__ */ O(
|
|
19845
19843
|
Cz,
|
|
19846
19844
|
{
|
|
19847
|
-
alt:
|
|
19848
|
-
children:
|
|
19845
|
+
alt: T ? c("Mark %{title} as incomplete", { title: e.plannable.title }) : c("Mark %{title} as complete", { title: e.plannable.title }),
|
|
19846
|
+
children: T ? o.done : o.markAsDone
|
|
19849
19847
|
}
|
|
19850
19848
|
)
|
|
19851
19849
|
}
|
|
@@ -19875,16 +19873,16 @@ const Aq = ({
|
|
|
19875
19873
|
startDate: M0.toISOString(),
|
|
19876
19874
|
endDate: L0.toISOString()
|
|
19877
19875
|
};
|
|
19878
|
-
}, []), { mutate: A, isPending: l } = zq(), { mutate:
|
|
19876
|
+
}, []), { mutate: A, isPending: l } = zq(), { mutate: q, isPending: d } = pq(), { sharedCourseData: W, observedUserId: h } = S0(), {
|
|
19879
19877
|
currentPage: m,
|
|
19880
|
-
currentPageIndex:
|
|
19878
|
+
currentPageIndex: f,
|
|
19881
19879
|
totalPages: R,
|
|
19882
19880
|
goToPage: g,
|
|
19883
|
-
isLoading:
|
|
19884
|
-
isPaginationLoading:
|
|
19881
|
+
isLoading: y,
|
|
19882
|
+
isPaginationLoading: T,
|
|
19885
19883
|
error: _,
|
|
19886
|
-
refetch:
|
|
19887
|
-
resetPagination:
|
|
19884
|
+
refetch: v,
|
|
19885
|
+
resetPagination: B,
|
|
19888
19886
|
updateItemOverride: X
|
|
19889
19887
|
} = cq({
|
|
19890
19888
|
perPage: 5,
|
|
@@ -19894,8 +19892,8 @@ const Aq = ({
|
|
|
19894
19892
|
observedUserId: h
|
|
19895
19893
|
});
|
|
19896
19894
|
Nb.useEffect(() => {
|
|
19897
|
-
|
|
19898
|
-
}, [u,
|
|
19895
|
+
B();
|
|
19896
|
+
}, [u, B]);
|
|
19899
19897
|
const C = (M0) => {
|
|
19900
19898
|
A(M0, {
|
|
19901
19899
|
onSuccess: () => {
|
|
@@ -19912,7 +19910,7 @@ const Aq = ({
|
|
|
19912
19910
|
}
|
|
19913
19911
|
});
|
|
19914
19912
|
}, x = (M0) => {
|
|
19915
|
-
n &&
|
|
19913
|
+
n && q(
|
|
19916
19914
|
{ id: String(n.plannable_id), ...M0 },
|
|
19917
19915
|
{
|
|
19918
19916
|
onSuccess: () => {
|
|
@@ -19982,19 +19980,19 @@ const Aq = ({
|
|
|
19982
19980
|
widget: e,
|
|
19983
19981
|
isEditMode: b,
|
|
19984
19982
|
dragHandleProps: t,
|
|
19985
|
-
isLoading:
|
|
19983
|
+
isLoading: y,
|
|
19986
19984
|
error: _ ? M.failedToLoadTodoItems : null,
|
|
19987
|
-
onRetry:
|
|
19985
|
+
onRetry: v,
|
|
19988
19986
|
loadingText: M.loadingTodoItems,
|
|
19989
19987
|
headerActions: !h && /* @__PURE__ */ O(Z0, { size: "small", onClick: () => r(!0), "data-testid": "new-todo-button", children: M.newTodo }),
|
|
19990
19988
|
pagination: {
|
|
19991
|
-
currentPage:
|
|
19989
|
+
currentPage: f + 1,
|
|
19992
19990
|
totalPages: R,
|
|
19993
19991
|
onPageChange: g,
|
|
19994
19992
|
ariaLabel: M.todoListPagination
|
|
19995
19993
|
},
|
|
19996
19994
|
loadingOverlay: {
|
|
19997
|
-
isLoading:
|
|
19995
|
+
isLoading: T,
|
|
19998
19996
|
ariaLabel: M.loadingTodoItems
|
|
19999
19997
|
},
|
|
20000
19998
|
children: p0()
|
|
@@ -20175,23 +20173,23 @@ function Rq({
|
|
|
20175
20173
|
return s === "all" ? p.map((X) => X.id) : [s];
|
|
20176
20174
|
}, [s, p]), a = O0(() => mq(r), [r]), A = Ae.COURSE_WORK, {
|
|
20177
20175
|
currentPage: l,
|
|
20178
|
-
currentPageIndex:
|
|
20176
|
+
currentPageIndex: q,
|
|
20179
20177
|
totalPages: d,
|
|
20180
20178
|
goToPage: W,
|
|
20181
20179
|
resetPagination: h,
|
|
20182
20180
|
refetch: m,
|
|
20183
|
-
isLoading:
|
|
20181
|
+
isLoading: f,
|
|
20184
20182
|
error: R
|
|
20185
20183
|
} = FM({
|
|
20186
20184
|
pageSize: A,
|
|
20187
20185
|
accountIds: i,
|
|
20188
20186
|
...a
|
|
20189
|
-
}), g = (l == null ? void 0 : l.items) || [],
|
|
20187
|
+
}), g = (l == null ? void 0 : l.items) || [], y = t || f, T = M || (R == null ? void 0 : R.message) || null, _ = o || (() => m()), v = Q(
|
|
20190
20188
|
(X, C) => {
|
|
20191
20189
|
C.value && typeof C.value == "string" && (n(C.value), h());
|
|
20192
20190
|
},
|
|
20193
20191
|
[n, h]
|
|
20194
|
-
),
|
|
20192
|
+
), B = Q(
|
|
20195
20193
|
(X, C) => {
|
|
20196
20194
|
C.value && typeof C.value == "string" && (u(C.value), h());
|
|
20197
20195
|
},
|
|
@@ -20202,14 +20200,14 @@ function Rq({
|
|
|
20202
20200
|
{
|
|
20203
20201
|
widget: e,
|
|
20204
20202
|
isEditMode: b,
|
|
20205
|
-
isLoading:
|
|
20206
|
-
error:
|
|
20203
|
+
isLoading: y,
|
|
20204
|
+
error: T ? c.failedToLoadCourseWork : null,
|
|
20207
20205
|
onRetry: _,
|
|
20208
20206
|
pagination: {
|
|
20209
|
-
currentPage:
|
|
20207
|
+
currentPage: q + 1,
|
|
20210
20208
|
totalPages: d,
|
|
20211
20209
|
onPageChange: W,
|
|
20212
|
-
isLoading:
|
|
20210
|
+
isLoading: f,
|
|
20213
20211
|
ariaLabel: c.courseWorkPagination
|
|
20214
20212
|
},
|
|
20215
20213
|
children: /* @__PURE__ */ w(L, { direction: "column", gap: "0", height: "100%", children: [
|
|
@@ -20218,8 +20216,8 @@ function Rq({
|
|
|
20218
20216
|
{
|
|
20219
20217
|
selectedTimeFilter: r,
|
|
20220
20218
|
selectedAccountId: z ? s : void 0,
|
|
20221
|
-
onTimeFilterChange:
|
|
20222
|
-
onAccountChange: z ?
|
|
20219
|
+
onTimeFilterChange: v,
|
|
20220
|
+
onAccountChange: z ? B : void 0
|
|
20223
20221
|
}
|
|
20224
20222
|
) }),
|
|
20225
20223
|
/* @__PURE__ */ O(L.Item, { shouldGrow: !0, margin: "large 0 0 0", children: g.length === 0 ? /* @__PURE__ */ O(lq, { message: c.noUpcomingCourseWork }) : /* @__PURE__ */ O(k, { height: "100%", children: /* @__PURE__ */ O(L, { direction: "column", children: /* @__PURE__ */ O(V0, { isUnstyled: !0, margin: "0", children: g.map((X) => /* @__PURE__ */ O(V0.Item, { margin: "0", children: /* @__PURE__ */ O(hq, { item: X }) }, X.id)) }) }) }) })
|
|
@@ -20590,7 +20588,7 @@ function Uq(e) {
|
|
|
20590
20588
|
}));
|
|
20591
20589
|
}
|
|
20592
20590
|
function Fq() {
|
|
20593
|
-
const { observedUsersList: e, canAddObservee: b, currentUser: t, currentUserRoles: M } = S0(), { translations: o, translate: c } = J(), [p] = V(() => Uq(e)), [z, r] = V(""), [n, s] = V(null), [u, i] = V(!1), [a, A] = V(null), l = O0(() => Iq(), []),
|
|
20591
|
+
const { observedUsersList: e, canAddObservee: b, currentUser: t, currentUserRoles: M } = S0(), { translations: o, translate: c } = J(), [p] = V(() => Uq(e)), [z, r] = V(""), [n, s] = V(null), [u, i] = V(!1), [a, A] = V(null), l = O0(() => Iq(), []), q = Q(
|
|
20594
20592
|
(R) => {
|
|
20595
20593
|
r(R.name), s(R), t && (l(R.id), yz(t.id, R.id));
|
|
20596
20594
|
},
|
|
@@ -20598,16 +20596,16 @@ function Fq() {
|
|
|
20598
20596
|
);
|
|
20599
20597
|
H0(() => {
|
|
20600
20598
|
if (p.length > 0 && t) {
|
|
20601
|
-
const R = Eq(t.id), g = p.find((
|
|
20602
|
-
|
|
20599
|
+
const R = Eq(t.id), g = p.find((y) => y.id === R);
|
|
20600
|
+
q(g || p[0]);
|
|
20603
20601
|
}
|
|
20604
20602
|
}, []);
|
|
20605
20603
|
const d = Q(
|
|
20606
20604
|
(R) => {
|
|
20607
|
-
const g = p.find((
|
|
20608
|
-
g &&
|
|
20605
|
+
const g = p.find((y) => y.id === R);
|
|
20606
|
+
g && q(g);
|
|
20609
20607
|
},
|
|
20610
|
-
[p,
|
|
20608
|
+
[p, q]
|
|
20611
20609
|
), W = Q(
|
|
20612
20610
|
(R, g) => {
|
|
20613
20611
|
g === rM ? i(!0) : d(g);
|
|
@@ -20622,7 +20620,7 @@ function Fq() {
|
|
|
20622
20620
|
if (!R) return;
|
|
20623
20621
|
const g = R.avatarUrl && !R.avatarUrl.includes("avatar-50.png") ? R.avatarUrl : void 0;
|
|
20624
20622
|
return /* @__PURE__ */ O(Ve, { name: R.name, src: g, size: "xx-small", margin: "auto 0" });
|
|
20625
|
-
},
|
|
20623
|
+
}, f = O0(() => {
|
|
20626
20624
|
if (!(p.length > 1 || b)) return [];
|
|
20627
20625
|
const R = p.filter(
|
|
20628
20626
|
(g) => g.name.toLowerCase().includes(z.toLowerCase()) || (n == null ? void 0 : n.name.toLowerCase()) === z.toLowerCase()
|
|
@@ -20672,7 +20670,7 @@ function Fq() {
|
|
|
20672
20670
|
selectedOptionId: n == null ? void 0 : n.id,
|
|
20673
20671
|
renderBeforeInput: m(n),
|
|
20674
20672
|
shouldNotWrap: !0,
|
|
20675
|
-
children:
|
|
20673
|
+
children: f
|
|
20676
20674
|
}
|
|
20677
20675
|
),
|
|
20678
20676
|
b && /* @__PURE__ */ O(
|
|
@@ -20718,7 +20716,7 @@ const Z5 = () => {
|
|
|
20718
20716
|
}, [c]);
|
|
20719
20717
|
const l = () => {
|
|
20720
20718
|
s(i);
|
|
20721
|
-
},
|
|
20719
|
+
}, q = () => {
|
|
20722
20720
|
a(), n();
|
|
20723
20721
|
};
|
|
20724
20722
|
return /* @__PURE__ */ w(k, { as: "div", children: [
|
|
@@ -20743,7 +20741,7 @@ const Z5 = () => {
|
|
|
20743
20741
|
/* @__PURE__ */ O(L.Item, { children: /* @__PURE__ */ O(
|
|
20744
20742
|
Z0,
|
|
20745
20743
|
{
|
|
20746
|
-
onClick:
|
|
20744
|
+
onClick: q,
|
|
20747
20745
|
margin: "0 small 0 0",
|
|
20748
20746
|
"data-testid": "cancel-customize-button",
|
|
20749
20747
|
children: e.cancel
|
|
@@ -20870,19 +20868,19 @@ function Zq({
|
|
|
20870
20868
|
u(!1), setTimeout(() => {
|
|
20871
20869
|
i.current && clearTimeout(i.current), e();
|
|
20872
20870
|
}, 500);
|
|
20873
|
-
}, [e]),
|
|
20871
|
+
}, [e]), q = Q(() => {
|
|
20874
20872
|
n(!0), i.current && clearTimeout(i.current), i.current = setTimeout(l, o);
|
|
20875
20873
|
}, [l, o]);
|
|
20876
20874
|
let d = null;
|
|
20877
20875
|
if (t && Kq(t)) {
|
|
20878
|
-
const { a: W, b: h } = Qq(t), m = W && !Pb(W),
|
|
20879
|
-
(m ||
|
|
20876
|
+
const { a: W, b: h } = Qq(t), m = W && !Pb(W), f = h && !Pb(h);
|
|
20877
|
+
(m || f) && (r ? d = /* @__PURE__ */ O(Bz, { a: W, b: h }) : d = /* @__PURE__ */ w("span", { children: [
|
|
20880
20878
|
/* @__PURE__ */ O(Br, { children: /* @__PURE__ */ O(
|
|
20881
20879
|
E0,
|
|
20882
20880
|
{
|
|
20883
20881
|
isWithinText: !1,
|
|
20884
20882
|
as: "button",
|
|
20885
|
-
onClick:
|
|
20883
|
+
onClick: q,
|
|
20886
20884
|
"aria-describedby": a,
|
|
20887
20885
|
children: A.strings.details
|
|
20888
20886
|
}
|