igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
1,261 lines (1,260 loc) • 2.7 MB
JavaScript
// dist/igniteui-angular-elements/browser/polyfills.js
var ce = globalThis;
function ne(n40) {
return (ce.__Zone_symbol_prefix || "__zone_symbol__") + n40;
}
function Gt() {
let n40 = ce.performance;
function e(A10) {
n40 && n40.mark && n40.mark(A10);
}
function s(A10, m10) {
n40 && n40.measure && n40.measure(A10, m10);
}
e("Zone");
let t = /* @__PURE__ */ (() => {
class A10 {
static __symbol__ = ne;
static assertZonePatched() {
if (ce.Promise !== L10.ZoneAwarePromise) throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)");
}
static get root() {
let r = A10.current;
for (; r.parent; ) r = r.parent;
return r;
}
static get current() {
return w3.zone;
}
static get currentTask() {
return N10;
}
static __load_patch(r, o, v3 = false) {
if (L10.hasOwnProperty(r)) {
let R = ce[ne("forceDuplicateZoneCheck")] === true;
if (!v3 && R) throw Error("Already loaded patch: " + r);
} else if (!ce["__Zone_disable_" + r]) {
let R = "Zone:" + r;
e(R), L10[r] = o(ce, A10, S), s(R, R);
}
}
get parent() {
return this._parent;
}
get name() {
return this._name;
}
_parent;
_name;
_properties;
_zoneDelegate;
constructor(r, o) {
this._parent = r, this._name = o ? o.name || "unnamed" : "<root>", this._properties = o && o.properties || {}, this._zoneDelegate = new l(this, this._parent && this._parent._zoneDelegate, o);
}
get(r) {
let o = this.getZoneWith(r);
if (o) return o._properties[r];
}
getZoneWith(r) {
let o = this;
for (; o; ) {
if (o._properties.hasOwnProperty(r)) return o;
o = o._parent;
}
return null;
}
fork(r) {
if (!r) throw new Error("ZoneSpec required!");
return this._zoneDelegate.fork(this, r);
}
wrap(r, o) {
if (typeof r != "function") throw new Error("Expecting function got: " + r);
let v3 = this._zoneDelegate.intercept(this, r, o), R = this;
return function() {
return R.runGuarded(v3, this, arguments, o);
};
}
run(r, o, v3, R) {
w3 = { parent: w3, zone: this };
try {
return this._zoneDelegate.invoke(this, r, o, v3, R);
} finally {
w3 = w3.parent;
}
}
runGuarded(r, o = null, v3, R) {
w3 = { parent: w3, zone: this };
try {
try {
return this._zoneDelegate.invoke(this, r, o, v3, R);
} catch (Y4) {
if (this._zoneDelegate.handleError(this, Y4)) throw Y4;
}
} finally {
w3 = w3.parent;
}
}
runTask(r, o, v3) {
if (r.zone != this) throw new Error("A task can only be run in the zone of creation! (Creation: " + (r.zone || K9).name + "; Execution: " + this.name + ")");
let R = r, { type: Y4, data: { isPeriodic: x4 = false, isRefreshable: Te2 = false } = {} } = r;
if (r.state === O10 && (Y4 === q10 || Y4 === g)) return;
let he2 = r.state != j;
he2 && R._transitionTo(j, f3);
let fe2 = N10;
N10 = R, w3 = { parent: w3, zone: this };
try {
Y4 == g && r.data && !x4 && !Te2 && (r.cancelFn = void 0);
try {
return this._zoneDelegate.invokeTask(this, R, o, v3);
} catch (se) {
if (this._zoneDelegate.handleError(this, se)) throw se;
}
} finally {
let se = r.state;
if (se !== O10 && se !== $) if (Y4 == q10 || x4 || Te2 && se === p10) he2 && R._transitionTo(f3, j, p10);
else {
let h = R._zoneDelegates;
this._updateTaskCount(R, -1), he2 && R._transitionTo(O10, j, O10), Te2 && (R._zoneDelegates = h);
}
w3 = w3.parent, N10 = fe2;
}
}
scheduleTask(r) {
if (r.zone && r.zone !== this) {
let v3 = this;
for (; v3; ) {
if (v3 === r.zone) throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${r.zone.name}`);
v3 = v3.parent;
}
}
r._transitionTo(p10, O10);
let o = [];
r._zoneDelegates = o, r._zone = this;
try {
r = this._zoneDelegate.scheduleTask(this, r);
} catch (v3) {
throw r._transitionTo($, p10, O10), this._zoneDelegate.handleError(this, v3), v3;
}
return r._zoneDelegates === o && this._updateTaskCount(r, 1), r.state == p10 && r._transitionTo(f3, p10), r;
}
scheduleMicroTask(r, o, v3, R) {
return this.scheduleTask(new d(W10, r, o, v3, R, void 0));
}
scheduleMacroTask(r, o, v3, R, Y4) {
return this.scheduleTask(new d(g, r, o, v3, R, Y4));
}
scheduleEventTask(r, o, v3, R, Y4) {
return this.scheduleTask(new d(q10, r, o, v3, R, Y4));
}
cancelTask(r) {
if (r.zone != this) throw new Error("A task can only be cancelled in the zone of creation! (Creation: " + (r.zone || K9).name + "; Execution: " + this.name + ")");
if (!(r.state !== f3 && r.state !== j)) {
r._transitionTo(V10, f3, j);
try {
this._zoneDelegate.cancelTask(this, r);
} catch (o) {
throw r._transitionTo($, V10), this._zoneDelegate.handleError(this, o), o;
}
return this._updateTaskCount(r, -1), r._transitionTo(O10, V10), r.runCount = -1, r;
}
}
_updateTaskCount(r, o) {
let v3 = r._zoneDelegates;
o == -1 && (r._zoneDelegates = null);
for (let R = 0; R < v3.length; R++) v3[R]._updateTaskCount(r.type, o);
}
}
return A10;
})(), i = { name: "", onHasTask: (A10, m10, r, o) => A10.hasTask(r, o), onScheduleTask: (A10, m10, r, o) => A10.scheduleTask(r, o), onInvokeTask: (A10, m10, r, o, v3, R) => A10.invokeTask(r, o, v3, R), onCancelTask: (A10, m10, r, o) => A10.cancelTask(r, o) };
class l {
get zone() {
return this._zone;
}
_zone;
_taskCounts = { microTask: 0, macroTask: 0, eventTask: 0 };
_parentDelegate;
_forkDlgt;
_forkZS;
_forkCurrZone;
_interceptDlgt;
_interceptZS;
_interceptCurrZone;
_invokeDlgt;
_invokeZS;
_invokeCurrZone;
_handleErrorDlgt;
_handleErrorZS;
_handleErrorCurrZone;
_scheduleTaskDlgt;
_scheduleTaskZS;
_scheduleTaskCurrZone;
_invokeTaskDlgt;
_invokeTaskZS;
_invokeTaskCurrZone;
_cancelTaskDlgt;
_cancelTaskZS;
_cancelTaskCurrZone;
_hasTaskDlgt;
_hasTaskDlgtOwner;
_hasTaskZS;
_hasTaskCurrZone;
constructor(m10, r, o) {
this._zone = m10, this._parentDelegate = r, this._forkZS = o && (o && o.onFork ? o : r._forkZS), this._forkDlgt = o && (o.onFork ? r : r._forkDlgt), this._forkCurrZone = o && (o.onFork ? this._zone : r._forkCurrZone), this._interceptZS = o && (o.onIntercept ? o : r._interceptZS), this._interceptDlgt = o && (o.onIntercept ? r : r._interceptDlgt), this._interceptCurrZone = o && (o.onIntercept ? this._zone : r._interceptCurrZone), this._invokeZS = o && (o.onInvoke ? o : r._invokeZS), this._invokeDlgt = o && (o.onInvoke ? r : r._invokeDlgt), this._invokeCurrZone = o && (o.onInvoke ? this._zone : r._invokeCurrZone), this._handleErrorZS = o && (o.onHandleError ? o : r._handleErrorZS), this._handleErrorDlgt = o && (o.onHandleError ? r : r._handleErrorDlgt), this._handleErrorCurrZone = o && (o.onHandleError ? this._zone : r._handleErrorCurrZone), this._scheduleTaskZS = o && (o.onScheduleTask ? o : r._scheduleTaskZS), this._scheduleTaskDlgt = o && (o.onScheduleTask ? r : r._scheduleTaskDlgt), this._scheduleTaskCurrZone = o && (o.onScheduleTask ? this._zone : r._scheduleTaskCurrZone), this._invokeTaskZS = o && (o.onInvokeTask ? o : r._invokeTaskZS), this._invokeTaskDlgt = o && (o.onInvokeTask ? r : r._invokeTaskDlgt), this._invokeTaskCurrZone = o && (o.onInvokeTask ? this._zone : r._invokeTaskCurrZone), this._cancelTaskZS = o && (o.onCancelTask ? o : r._cancelTaskZS), this._cancelTaskDlgt = o && (o.onCancelTask ? r : r._cancelTaskDlgt), this._cancelTaskCurrZone = o && (o.onCancelTask ? this._zone : r._cancelTaskCurrZone), this._hasTaskZS = null, this._hasTaskDlgt = null, this._hasTaskDlgtOwner = null, this._hasTaskCurrZone = null;
let v3 = o && o.onHasTask, R = r && r._hasTaskZS;
(v3 || R) && (this._hasTaskZS = v3 ? o : i, this._hasTaskDlgt = r, this._hasTaskDlgtOwner = this, this._hasTaskCurrZone = this._zone, o.onScheduleTask || (this._scheduleTaskZS = i, this._scheduleTaskDlgt = r, this._scheduleTaskCurrZone = this._zone), o.onInvokeTask || (this._invokeTaskZS = i, this._invokeTaskDlgt = r, this._invokeTaskCurrZone = this._zone), o.onCancelTask || (this._cancelTaskZS = i, this._cancelTaskDlgt = r, this._cancelTaskCurrZone = this._zone));
}
fork(m10, r) {
return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, m10, r) : new t(m10, r);
}
intercept(m10, r, o) {
return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, m10, r, o) : r;
}
invoke(m10, r, o, v3, R) {
return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, m10, r, o, v3, R) : r.apply(o, v3);
}
handleError(m10, r) {
return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, m10, r) : true;
}
scheduleTask(m10, r) {
let o = r;
if (this._scheduleTaskZS) this._hasTaskZS && o._zoneDelegates.push(this._hasTaskDlgtOwner), o = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, m10, r), o || (o = r);
else if (r.scheduleFn) r.scheduleFn(r);
else if (r.type == W10) G7(r);
else throw new Error("Task is missing scheduleFn.");
return o;
}
invokeTask(m10, r, o, v3) {
return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, m10, r, o, v3) : r.callback.apply(o, v3);
}
cancelTask(m10, r) {
let o;
if (this._cancelTaskZS) o = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, m10, r);
else {
if (!r.cancelFn) throw Error("Task is not cancelable");
o = r.cancelFn(r);
}
return o;
}
hasTask(m10, r) {
try {
this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, m10, r);
} catch (o) {
this.handleError(m10, o);
}
}
_updateTaskCount(m10, r) {
let o = this._taskCounts, v3 = o[m10], R = o[m10] = v3 + r;
if (R < 0) throw new Error("More tasks executed then were scheduled.");
if (v3 == 0 || R == 0) {
let Y4 = { microTask: o.microTask > 0, macroTask: o.macroTask > 0, eventTask: o.eventTask > 0, change: m10 };
this.hasTask(this._zone, Y4);
}
}
}
class d {
type;
source;
invoke;
callback;
data;
scheduleFn;
cancelFn;
_zone = null;
runCount = 0;
_zoneDelegates = null;
_state = "notScheduled";
constructor(m10, r, o, v3, R, Y4) {
if (this.type = m10, this.source = r, this.data = v3, this.scheduleFn = R, this.cancelFn = Y4, !o) throw new Error("callback is not defined");
this.callback = o;
let x4 = this;
m10 === q10 && v3 && v3.useG ? this.invoke = d.invokeTask : this.invoke = function() {
return d.invokeTask.call(ce, x4, this, arguments);
};
}
static invokeTask(m10, r, o) {
m10 || (m10 = this), te2++;
try {
return m10.runCount++, m10.zone.runTask(m10, r, o);
} finally {
te2 == 1 && J(), te2--;
}
}
get zone() {
return this._zone;
}
get state() {
return this._state;
}
cancelScheduleRequest() {
this._transitionTo(O10, p10);
}
_transitionTo(m10, r, o) {
if (this._state === r || this._state === o) this._state = m10, m10 == O10 && (this._zoneDelegates = null);
else throw new Error(`${this.type} '${this.source}': can not transition to '${m10}', expecting state '${r}'${o ? " or '" + o + "'" : ""}, was '${this._state}'.`);
}
toString() {
return this.data && typeof this.data.handleId < "u" ? this.data.handleId.toString() : Object.prototype.toString.call(this);
}
toJSON() {
return { type: this.type, state: this.state, source: this.source, zone: this.zone.name, runCount: this.runCount };
}
}
let E10 = ne("setTimeout"), _10 = ne("Promise"), b10 = ne("then"), T10 = [], P10 = false, D10;
function H3(A10) {
if (D10 || ce[_10] && (D10 = ce[_10].resolve(0)), D10) {
let m10 = D10[b10];
m10 || (m10 = D10.then), m10.call(D10, A10);
} else ce[E10](A10, 0);
}
function G7(A10) {
te2 === 0 && T10.length === 0 && H3(J), A10 && T10.push(A10);
}
function J() {
if (!P10) {
for (P10 = true; T10.length; ) {
let A10 = T10;
T10 = [];
for (let m10 = 0; m10 < A10.length; m10++) {
let r = A10[m10];
try {
r.zone.runTask(r, null, null);
} catch (o) {
S.onUnhandledError(o);
}
}
}
S.microtaskDrainDone(), P10 = false;
}
}
let K9 = { name: "NO ZONE" }, O10 = "notScheduled", p10 = "scheduling", f3 = "scheduled", j = "running", V10 = "canceling", $ = "unknown", W10 = "microTask", g = "macroTask", q10 = "eventTask", L10 = {}, S = { symbol: ne, currentZoneFrame: () => w3, onUnhandledError: X9, microtaskDrainDone: X9, scheduleMicroTask: G7, showUncaughtError: () => !t[ne("ignoreConsoleErrorUncaughtError")], patchEventTarget: () => [], patchOnProperties: X9, patchMethod: () => X9, bindArguments: () => [], patchThen: () => X9, patchMacroTask: () => X9, patchEventPrototype: () => X9, isIEOrEdge: () => false, getGlobalObjects: () => {
}, ObjectDefineProperty: () => X9, ObjectGetOwnPropertyDescriptor: () => {
}, ObjectCreate: () => {
}, ArraySlice: () => [], patchClass: () => X9, wrapWithCurrentZone: () => X9, filterProperties: () => [], attachOriginToPatched: () => X9, _redefineProperty: () => X9, patchCallbacks: () => X9, nativeScheduleMicroTask: H3 }, w3 = { parent: null, zone: new t(null, null) }, N10 = null, te2 = 0;
function X9() {
}
return s("Zone", "Zone"), t;
}
function Vt() {
let n40 = globalThis, e = n40[ne("forceDuplicateZoneCheck")] === true;
if (n40.Zone && (e || typeof n40.Zone.__symbol__ != "function")) throw new Error("Zone already loaded.");
return n40.Zone ??= Gt(), n40.Zone;
}
var Se = Object.getOwnPropertyDescriptor;
var Ye = Object.defineProperty;
var $e = Object.getPrototypeOf;
var Ft = Object.create;
var Wt = Array.prototype.slice;
var Ke = "addEventListener";
var Je = "removeEventListener";
var Ue = ne(Ke);
var ze = ne(Je);
var de = "true";
var _e = "false";
var Ce = ne("");
function Qe(n40, e) {
return Zone.current.wrap(n40, e);
}
function et(n40, e, s, t, i) {
return Zone.current.scheduleMacroTask(n40, e, s, t, i);
}
var B = ne;
var He = typeof window < "u";
var Ne = He ? window : void 0;
var Q = He && Ne || globalThis;
var Ut = "removeAttribute";
function tt(n40, e) {
for (let s = n40.length - 1; s >= 0; s--) typeof n40[s] == "function" && (n40[s] = Qe(n40[s], e + "_" + s));
return n40;
}
function zt(n40, e) {
let s = n40.constructor.name;
for (let t = 0; t < e.length; t++) {
let i = e[t], l = n40[i];
if (l) {
let d = Se(n40, i);
if (!vt(d)) continue;
n40[i] = ((E10) => {
let _10 = function() {
return E10.apply(this, tt(arguments, s + "." + i));
};
return pe(_10, E10), _10;
})(l);
}
}
}
function vt(n40) {
return n40 ? n40.writable === false ? false : !(typeof n40.get == "function" && typeof n40.set > "u") : true;
}
var kt = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope;
var je = !("nw" in Q) && typeof Q.process < "u" && Q.process.toString() === "[object process]";
var nt = !je && !kt && !!(He && Ne.HTMLElement);
var bt = typeof Q.process < "u" && Q.process.toString() === "[object process]" && !kt && !!(He && Ne.HTMLElement);
var Ze = {};
var qt = B("enable_beforeunload");
var Et = function(n40) {
if (n40 = n40 || Q.event, !n40) return;
let e = Ze[n40.type];
e || (e = Ze[n40.type] = B("ON_PROPERTY" + n40.type));
let s = this || n40.target || Q, t = s[e], i;
if (nt && s === Ne && n40.type === "error") {
let l = n40;
i = t && t.call(this, l.message, l.filename, l.lineno, l.colno, l.error), i === true && n40.preventDefault();
} else i = t && t.apply(this, arguments), n40.type === "beforeunload" && Q[qt] && typeof i == "string" ? n40.returnValue = i : i != null && !i && n40.preventDefault();
return i;
};
function pt(n40, e, s) {
let t = Se(n40, e);
if (!t && s && Se(s, e) && (t = { enumerable: true, configurable: true }), !t || !t.configurable) return;
let i = B("on" + e + "patched");
if (n40.hasOwnProperty(i) && n40[i]) return;
delete t.writable, delete t.value;
let l = t.get, d = t.set, E10 = e.slice(2), _10 = Ze[E10];
_10 || (_10 = Ze[E10] = B("ON_PROPERTY" + E10)), t.set = function(b10) {
let T10 = this;
if (!T10 && n40 === Q && (T10 = Q), !T10) return;
typeof T10[_10] == "function" && T10.removeEventListener(E10, Et), d?.call(T10, null), T10[_10] = b10, typeof b10 == "function" && T10.addEventListener(E10, Et, false);
}, t.get = function() {
let b10 = this;
if (!b10 && n40 === Q && (b10 = Q), !b10) return null;
let T10 = b10[_10];
if (T10) return T10;
if (l) {
let P10 = l.call(this);
if (P10) return t.set.call(this, P10), typeof b10[Ut] == "function" && b10.removeAttribute(e), P10;
}
return null;
}, Ye(n40, e, t), n40[i] = true;
}
function wt(n40, e, s) {
if (e) for (let t = 0; t < e.length; t++) pt(n40, "on" + e[t], s);
else {
let t = [];
for (let i in n40) i.slice(0, 2) == "on" && t.push(i);
for (let i = 0; i < t.length; i++) pt(n40, t[i], s);
}
}
var ie = B("originalInstance");
function Re(n40) {
let e = Q[n40];
if (!e) return;
Q[B(n40)] = e, Q[n40] = function() {
let i = tt(arguments, n40);
switch (i.length) {
case 0:
this[ie] = new e();
break;
case 1:
this[ie] = new e(i[0]);
break;
case 2:
this[ie] = new e(i[0], i[1]);
break;
case 3:
this[ie] = new e(i[0], i[1], i[2]);
break;
case 4:
this[ie] = new e(i[0], i[1], i[2], i[3]);
break;
default:
throw new Error("Arg list too long.");
}
}, pe(Q[n40], e);
let s = new e(function() {
}), t;
for (t in s) n40 === "XMLHttpRequest" && t === "responseBlob" || (function(i) {
typeof s[i] == "function" ? Q[n40].prototype[i] = function() {
return this[ie][i].apply(this[ie], arguments);
} : Ye(Q[n40].prototype, i, { set: function(l) {
typeof l == "function" ? (this[ie][i] = Qe(l, n40 + "." + i), pe(this[ie][i], l)) : this[ie][i] = l;
}, get: function() {
return this[ie][i];
} });
})(t);
for (t in e) t !== "prototype" && e.hasOwnProperty(t) && (Q[n40][t] = e[t]);
}
function Ee(n40, e, s) {
let t = n40;
for (; t && !t.hasOwnProperty(e); ) t = $e(t);
!t && n40[e] && (t = n40);
let i = B(e), l = null;
if (t && (!(l = t[i]) || !t.hasOwnProperty(i))) {
l = t[i] = t[e];
let d = t && Se(t, e);
if (vt(d)) {
let E10 = s(l, i, e);
t[e] = function() {
return E10(this, arguments);
}, pe(t[e], l);
}
}
return l;
}
function Xt(n40, e, s) {
let t = null;
function i(l) {
let d = l.data;
return d.args[d.cbIdx] = function() {
l.invoke.apply(this, arguments);
}, t.apply(d.target, d.args), l;
}
t = Ee(n40, e, (l) => function(d, E10) {
let _10 = s(d, E10);
return _10.cbIdx >= 0 && typeof E10[_10.cbIdx] == "function" ? et(_10.name, E10[_10.cbIdx], _10, i) : l.apply(d, E10);
});
}
function pe(n40, e) {
n40[B("OriginalDelegate")] = e;
}
var Tt = false;
var qe = false;
function Yt() {
if (Tt) return qe;
Tt = true;
try {
let n40 = Ne.navigator.userAgent;
(n40.indexOf("MSIE ") !== -1 || n40.indexOf("Trident/") !== -1 || n40.indexOf("Edge/") !== -1) && (qe = true);
} catch {
}
return qe;
}
function mt(n40) {
return typeof n40 == "function";
}
function gt(n40) {
return typeof n40 == "number";
}
var $t = { useG: true };
var re = {};
var Pt = {};
var Rt = new RegExp("^" + Ce + "(\\w+)(true|false)$");
var St = B("propagationStopped");
function Ct(n40, e) {
let s = (e ? e(n40) : n40) + _e, t = (e ? e(n40) : n40) + de, i = Ce + s, l = Ce + t;
re[n40] = {}, re[n40][_e] = i, re[n40][de] = l;
}
function Kt(n40, e, s, t) {
let i = t && t.add || Ke, l = t && t.rm || Je, d = t && t.listeners || "eventListeners", E10 = t && t.rmAll || "removeAllListeners", _10 = B(i), b10 = "." + i + ":", T10 = "prependListener", P10 = "." + T10 + ":", D10 = function(p10, f3, j) {
if (p10.isRemoved) return;
let V10 = p10.callback;
typeof V10 == "object" && V10.handleEvent && (p10.callback = (g) => V10.handleEvent(g), p10.originalDelegate = V10);
let $;
try {
p10.invoke(p10, f3, [j]);
} catch (g) {
$ = g;
}
let W10 = p10.options;
if (W10 && typeof W10 == "object" && W10.once) {
let g = p10.originalDelegate ? p10.originalDelegate : p10.callback;
f3[l].call(f3, j.type, g, W10);
}
return $;
};
function H3(p10, f3, j) {
if (f3 = f3 || n40.event, !f3) return;
let V10 = p10 || f3.target || n40, $ = V10[re[f3.type][j ? de : _e]];
if ($) {
let W10 = [];
if ($.length === 1) {
let g = D10($[0], V10, f3);
g && W10.push(g);
} else {
let g = $.slice();
for (let q10 = 0; q10 < g.length && !(f3 && f3[St] === true); q10++) {
let L10 = D10(g[q10], V10, f3);
L10 && W10.push(L10);
}
}
if (W10.length === 1) throw W10[0];
for (let g = 0; g < W10.length; g++) {
let q10 = W10[g];
e.nativeScheduleMicroTask(() => {
throw q10;
});
}
}
}
let G7 = function(p10) {
return H3(this, p10, false);
}, J = function(p10) {
return H3(this, p10, true);
};
function K9(p10, f3) {
if (!p10) return false;
let j = true;
f3 && f3.useG !== void 0 && (j = f3.useG);
let V10 = f3 && f3.vh, $ = true;
f3 && f3.chkDup !== void 0 && ($ = f3.chkDup);
let W10 = false;
f3 && f3.rt !== void 0 && (W10 = f3.rt);
let g = p10;
for (; g && !g.hasOwnProperty(i); ) g = $e(g);
if (!g && p10[i] && (g = p10), !g || g[_10]) return false;
let q10 = f3 && f3.eventNameToString, L10 = {}, S = g[_10] = g[i], w3 = g[B(l)] = g[l], N10 = g[B(d)] = g[d], te2 = g[B(E10)] = g[E10], X9;
f3 && f3.prepend && (X9 = g[B(f3.prepend)] = g[f3.prepend]);
function A10(a, u10) {
return u10 ? typeof a == "boolean" ? { capture: a, passive: true } : a ? typeof a == "object" && a.passive !== false ? { ...a, passive: true } : a : { passive: true } : a;
}
let m10 = function(a) {
if (!L10.isExisting) return S.call(L10.target, L10.eventName, L10.capture ? J : G7, L10.options);
}, r = function(a) {
if (!a.isRemoved) {
let u10 = re[a.eventName], k;
u10 && (k = u10[a.capture ? de : _e]);
let C10 = k && a.target[k];
if (C10) {
for (let y = 0; y < C10.length; y++) if (C10[y] === a) {
C10.splice(y, 1), a.isRemoved = true, a.removeAbortListener && (a.removeAbortListener(), a.removeAbortListener = null), C10.length === 0 && (a.allRemoved = true, a.target[k] = null);
break;
}
}
}
if (a.allRemoved) return w3.call(a.target, a.eventName, a.capture ? J : G7, a.options);
}, o = function(a) {
return S.call(L10.target, L10.eventName, a.invoke, L10.options);
}, v3 = function(a) {
return X9.call(L10.target, L10.eventName, a.invoke, L10.options);
}, R = function(a) {
return w3.call(a.target, a.eventName, a.invoke, a.options);
}, Y4 = j ? m10 : o, x4 = j ? r : R, Te2 = function(a, u10) {
let k = typeof u10;
return k === "function" && a.callback === u10 || k === "object" && a.originalDelegate === u10;
}, he2 = f3?.diff || Te2, fe2 = Zone[B("UNPATCHED_EVENTS")], se = n40[B("PASSIVE_EVENTS")];
function h(a) {
if (typeof a == "object" && a !== null) {
let u10 = { ...a };
return a.signal && (u10.signal = a.signal), u10;
}
return a;
}
let c = function(a, u10, k, C10, y = false, I10 = false) {
return function() {
let M10 = this || n40, Z4 = arguments[0];
f3 && f3.transferEventName && (Z4 = f3.transferEventName(Z4));
let U10 = arguments[1];
if (!U10) return a.apply(this, arguments);
if (je && Z4 === "uncaughtException") return a.apply(this, arguments);
let z10 = false;
if (typeof U10 != "function") {
if (!U10.handleEvent) return a.apply(this, arguments);
z10 = true;
}
if (V10 && !V10(a, U10, M10, arguments)) return;
let me2 = !!se && se.indexOf(Z4) !== -1, ae2 = h(A10(arguments[2], me2)), ve2 = ae2?.signal;
if (ve2?.aborted) return;
if (fe2) {
for (let le2 = 0; le2 < fe2.length; le2++) if (Z4 === fe2[le2]) return me2 ? a.call(M10, Z4, U10, ae2) : a.apply(this, arguments);
}
let Fe = ae2 ? typeof ae2 == "boolean" ? true : ae2.capture : false, ut2 = ae2 && typeof ae2 == "object" ? ae2.once : false, Bt2 = Zone.current, We2 = re[Z4];
We2 || (Ct(Z4, q10), We2 = re[Z4]);
let ht2 = We2[Fe ? de : _e], ke2 = M10[ht2], ft2 = false;
if (ke2) {
if (ft2 = true, $) {
for (let le2 = 0; le2 < ke2.length; le2++) if (he2(ke2[le2], U10)) return;
}
} else ke2 = M10[ht2] = [];
let Ie2, dt2 = M10.constructor.name, _t2 = Pt[dt2];
_t2 && (Ie2 = _t2[Z4]), Ie2 || (Ie2 = dt2 + u10 + (q10 ? q10(Z4) : Z4)), L10.options = ae2, ut2 && (L10.options.once = false), L10.target = M10, L10.capture = Fe, L10.eventName = Z4, L10.isExisting = ft2;
let Pe2 = j ? $t : void 0;
Pe2 && (Pe2.taskData = L10), ve2 && (L10.options.signal = void 0);
let oe2 = Bt2.scheduleEventTask(Ie2, U10, Pe2, k, C10);
if (ve2) {
L10.options.signal = ve2;
let le2 = () => oe2.zone.cancelTask(oe2);
a.call(ve2, "abort", le2, { once: true }), oe2.removeAbortListener = () => ve2.removeEventListener("abort", le2);
}
if (L10.target = null, Pe2 && (Pe2.taskData = null), ut2 && (L10.options.once = true), typeof oe2.options != "boolean" && (oe2.options = ae2), oe2.target = M10, oe2.capture = Fe, oe2.eventName = Z4, z10 && (oe2.originalDelegate = U10), I10 ? ke2.unshift(oe2) : ke2.push(oe2), y) return M10;
};
};
return g[i] = c(S, b10, Y4, x4, W10), X9 && (g[T10] = c(X9, P10, v3, x4, W10, true)), g[l] = function() {
let a = this || n40, u10 = arguments[0];
f3 && f3.transferEventName && (u10 = f3.transferEventName(u10));
let k = arguments[2], C10 = k ? typeof k == "boolean" ? true : k.capture : false, y = arguments[1];
if (!y) return w3.apply(this, arguments);
if (V10 && !V10(w3, y, a, arguments)) return;
let I10 = re[u10], M10;
I10 && (M10 = I10[C10 ? de : _e]);
let Z4 = M10 && a[M10];
if (Z4) for (let U10 = 0; U10 < Z4.length; U10++) {
let z10 = Z4[U10];
if (he2(z10, y)) {
if (Z4.splice(U10, 1), z10.isRemoved = true, Z4.length === 0 && (z10.allRemoved = true, a[M10] = null, !C10 && typeof u10 == "string")) {
let me2 = Ce + "ON_PROPERTY" + u10;
a[me2] = null;
}
return z10.zone.cancelTask(z10), W10 ? a : void 0;
}
}
return w3.apply(this, arguments);
}, g[d] = function() {
let a = this || n40, u10 = arguments[0];
f3 && f3.transferEventName && (u10 = f3.transferEventName(u10));
let k = [], C10 = Nt(a, q10 ? q10(u10) : u10);
for (let y = 0; y < C10.length; y++) {
let I10 = C10[y], M10 = I10.originalDelegate ? I10.originalDelegate : I10.callback;
k.push(M10);
}
return k;
}, g[E10] = function() {
let a = this || n40, u10 = arguments[0];
if (u10) {
f3 && f3.transferEventName && (u10 = f3.transferEventName(u10));
let k = re[u10];
if (k) {
let C10 = k[_e], y = k[de], I10 = a[C10], M10 = a[y];
if (I10) {
let Z4 = I10.slice();
for (let U10 = 0; U10 < Z4.length; U10++) {
let z10 = Z4[U10], me2 = z10.originalDelegate ? z10.originalDelegate : z10.callback;
this[l].call(this, u10, me2, z10.options);
}
}
if (M10) {
let Z4 = M10.slice();
for (let U10 = 0; U10 < Z4.length; U10++) {
let z10 = Z4[U10], me2 = z10.originalDelegate ? z10.originalDelegate : z10.callback;
this[l].call(this, u10, me2, z10.options);
}
}
}
} else {
let k = Object.keys(a);
for (let C10 = 0; C10 < k.length; C10++) {
let y = k[C10], I10 = Rt.exec(y), M10 = I10 && I10[1];
M10 && M10 !== "removeListener" && this[E10].call(this, M10);
}
this[E10].call(this, "removeListener");
}
if (W10) return this;
}, pe(g[i], S), pe(g[l], w3), te2 && pe(g[E10], te2), N10 && pe(g[d], N10), true;
}
let O10 = [];
for (let p10 = 0; p10 < s.length; p10++) O10[p10] = K9(s[p10], t);
return O10;
}
function Nt(n40, e) {
if (!e) {
let l = [];
for (let d in n40) {
let E10 = Rt.exec(d), _10 = E10 && E10[1];
if (_10 && (!e || _10 === e)) {
let b10 = n40[d];
if (b10) for (let T10 = 0; T10 < b10.length; T10++) l.push(b10[T10]);
}
}
return l;
}
let s = re[e];
s || (Ct(e), s = re[e]);
let t = n40[s[_e]], i = n40[s[de]];
return t ? i ? t.concat(i) : t.slice() : i ? i.slice() : [];
}
function Jt(n40, e) {
let s = n40.Event;
s && s.prototype && e.patchMethod(s.prototype, "stopImmediatePropagation", (t) => function(i, l) {
i[St] = true, t && t.apply(i, l);
});
}
function Qt(n40, e) {
e.patchMethod(n40, "queueMicrotask", (s) => function(t, i) {
Zone.current.scheduleMicroTask("queueMicrotask", i[0]);
});
}
var Me = B("zoneTask");
function be(n40, e, s, t) {
let i = null, l = null;
e += t, s += t;
let d = {};
function E10(b10) {
let T10 = b10.data;
T10.args[0] = function() {
return b10.invoke.apply(this, arguments);
};
let P10 = i.apply(n40, T10.args);
return gt(P10) ? T10.handleId = P10 : (T10.handle = P10, T10.isRefreshable = mt(P10.refresh)), b10;
}
function _10(b10) {
let { handle: T10, handleId: P10 } = b10.data;
return l.call(n40, T10 ?? P10);
}
i = Ee(n40, e, (b10) => function(T10, P10) {
if (mt(P10[0])) {
let D10 = { isRefreshable: false, isPeriodic: t === "Interval", delay: t === "Timeout" || t === "Interval" ? P10[1] || 0 : void 0, args: P10 }, H3 = P10[0];
P10[0] = function() {
try {
return H3.apply(this, arguments);
} finally {
let { handle: j, handleId: V10, isPeriodic: $, isRefreshable: W10 } = D10;
!$ && !W10 && (V10 ? delete d[V10] : j && (j[Me] = null));
}
};
let G7 = et(e, P10[0], D10, E10, _10);
if (!G7) return G7;
let { handleId: J, handle: K9, isRefreshable: O10, isPeriodic: p10 } = G7.data;
if (J) d[J] = G7;
else if (K9 && (K9[Me] = G7, O10 && !p10)) {
let f3 = K9.refresh;
K9.refresh = function() {
let { zone: j, state: V10 } = G7;
return V10 === "notScheduled" ? (G7._state = "scheduled", j._updateTaskCount(G7, 1)) : V10 === "running" && (G7._state = "scheduling"), f3.call(this);
};
}
return K9 ?? J ?? G7;
} else return b10.apply(n40, P10);
}), l = Ee(n40, s, (b10) => function(T10, P10) {
let D10 = P10[0], H3;
gt(D10) ? (H3 = d[D10], delete d[D10]) : (H3 = D10?.[Me], H3 ? D10[Me] = null : H3 = D10), H3?.type ? H3.cancelFn && H3.zone.cancelTask(H3) : b10.apply(n40, P10);
});
}
function en(n40, e) {
let { isBrowser: s, isMix: t } = e.getGlobalObjects();
if (!s && !t || !n40.customElements || !("customElements" in n40)) return;
let i = ["connectedCallback", "disconnectedCallback", "adoptedCallback", "attributeChangedCallback", "formAssociatedCallback", "formDisabledCallback", "formResetCallback", "formStateRestoreCallback"];
e.patchCallbacks(e, n40.customElements, "customElements", "define", i);
}
function tn(n40, e) {
if (Zone[e.symbol("patchEventTarget")]) return;
let { eventNames: s, zoneSymbolEventNames: t, TRUE_STR: i, FALSE_STR: l, ZONE_SYMBOL_PREFIX: d } = e.getGlobalObjects();
for (let _10 = 0; _10 < s.length; _10++) {
let b10 = s[_10], T10 = b10 + l, P10 = b10 + i, D10 = d + T10, H3 = d + P10;
t[b10] = {}, t[b10][l] = D10, t[b10][i] = H3;
}
let E10 = n40.EventTarget;
if (!(!E10 || !E10.prototype)) return e.patchEventTarget(n40, e, [E10 && E10.prototype]), true;
}
function nn(n40, e) {
e.patchEventPrototype(n40, e);
}
function Dt(n40, e, s) {
if (!s || s.length === 0) return e;
let t = s.filter((l) => l.target === n40);
if (t.length === 0) return e;
let i = t[0].ignoreProperties;
return e.filter((l) => i.indexOf(l) === -1);
}
function yt(n40, e, s, t) {
if (!n40) return;
let i = Dt(n40, e, s);
wt(n40, i, t);
}
function Xe(n40) {
return Object.getOwnPropertyNames(n40).filter((e) => e.startsWith("on") && e.length > 2).map((e) => e.substring(2));
}
function rn(n40, e) {
if (je && !bt || Zone[n40.symbol("patchEvents")]) return;
let s = e.__Zone_ignore_on_properties, t = [];
if (nt) {
let i = window;
t = t.concat(["Document", "SVGElement", "Element", "HTMLElement", "HTMLBodyElement", "HTMLMediaElement", "HTMLFrameSetElement", "HTMLFrameElement", "HTMLIFrameElement", "HTMLMarqueeElement", "Worker"]);
let l = [];
yt(i, Xe(i), s && s.concat(l), $e(i));
}
t = t.concat(["XMLHttpRequest", "XMLHttpRequestEventTarget", "IDBIndex", "IDBRequest", "IDBOpenDBRequest", "IDBDatabase", "IDBTransaction", "IDBCursor", "WebSocket"]);
for (let i = 0; i < t.length; i++) {
let l = e[t[i]];
l?.prototype && yt(l.prototype, Xe(l.prototype), s);
}
}
function sn(n40) {
n40.__load_patch("legacy", (e) => {
let s = e[n40.__symbol__("legacyPatch")];
s && s();
}), n40.__load_patch("timers", (e) => {
let t = "clear";
be(e, "set", t, "Timeout"), be(e, "set", t, "Interval"), be(e, "set", t, "Immediate");
}), n40.__load_patch("requestAnimationFrame", (e) => {
be(e, "request", "cancel", "AnimationFrame"), be(e, "mozRequest", "mozCancel", "AnimationFrame"), be(e, "webkitRequest", "webkitCancel", "AnimationFrame");
}), n40.__load_patch("blocking", (e, s) => {
let t = ["alert", "prompt", "confirm"];
for (let i = 0; i < t.length; i++) {
let l = t[i];
Ee(e, l, (d, E10, _10) => function(b10, T10) {
return s.current.run(d, e, T10, _10);
});
}
}), n40.__load_patch("EventTarget", (e, s, t) => {
nn(e, t), tn(e, t);
let i = e.XMLHttpRequestEventTarget;
i && i.prototype && t.patchEventTarget(e, t, [i.prototype]);
}), n40.__load_patch("MutationObserver", (e, s, t) => {
Re("MutationObserver"), Re("WebKitMutationObserver");
}), n40.__load_patch("IntersectionObserver", (e, s, t) => {
Re("IntersectionObserver");
}), n40.__load_patch("FileReader", (e, s, t) => {
Re("FileReader");
}), n40.__load_patch("on_property", (e, s, t) => {
rn(t, e);
}), n40.__load_patch("customElements", (e, s, t) => {
en(e, t);
}), n40.__load_patch("XHR", (e, s) => {
b10(e);
let t = B("xhrTask"), i = B("xhrSync"), l = B("xhrListener"), d = B("xhrScheduled"), E10 = B("xhrURL"), _10 = B("xhrErrorBeforeScheduled");
function b10(T10) {
let P10 = T10.XMLHttpRequest;
if (!P10) return;
let D10 = P10.prototype;
function H3(S) {
return S[t];
}
let G7 = D10[Ue], J = D10[ze];
if (!G7) {
let S = T10.XMLHttpRequestEventTarget;
if (S) {
let w3 = S.prototype;
G7 = w3[Ue], J = w3[ze];
}
}
let K9 = "readystatechange", O10 = "scheduled";
function p10(S) {
let w3 = S.data, N10 = w3.target;
N10[d] = false, N10[_10] = false;
let te2 = N10[l];
G7 || (G7 = N10[Ue], J = N10[ze]), te2 && J.call(N10, K9, te2);
let X9 = N10[l] = () => {
if (N10.readyState === N10.DONE) if (!w3.aborted && N10[d] && S.state === O10) {
let m10 = N10[s.__symbol__("loadfalse")];
if (N10.status !== 0 && m10 && m10.length > 0) {
let r = S.invoke;
S.invoke = function() {
let o = N10[s.__symbol__("loadfalse")];
for (let v3 = 0; v3 < o.length; v3++) o[v3] === S && o.splice(v3, 1);
!w3.aborted && S.state === O10 && r.call(S);
}, m10.push(S);
} else S.invoke();
} else !w3.aborted && N10[d] === false && (N10[_10] = true);
};
return G7.call(N10, K9, X9), N10[t] || (N10[t] = S), q10.apply(N10, w3.args), N10[d] = true, S;
}
function f3() {
}
function j(S) {
let w3 = S.data;
return w3.aborted = true, L10.apply(w3.target, w3.args);
}
let V10 = Ee(D10, "open", () => function(S, w3) {
return S[i] = w3[2] == false, S[E10] = w3[1], V10.apply(S, w3);
}), $ = "XMLHttpRequest.send", W10 = B("fetchTaskAborting"), g = B("fetchTaskScheduling"), q10 = Ee(D10, "send", () => function(S, w3) {
if (s.current[g] === true || S[i]) return q10.apply(S, w3);
{
let N10 = { target: S, url: S[E10], isPeriodic: false, args: w3, aborted: false }, te2 = et($, f3, N10, p10, j);
S && S[_10] === true && !N10.aborted && te2.state === O10 && te2.invoke();
}
}), L10 = Ee(D10, "abort", () => function(S, w3) {
let N10 = H3(S);
if (N10 && typeof N10.type == "string") {
if (N10.cancelFn == null || N10.data && N10.data.aborted) return;
N10.zone.cancelTask(N10);
} else if (s.current[W10] === true) return L10.apply(S, w3);
});
}
}), n40.__load_patch("geolocation", (e) => {
e.navigator && e.navigator.geolocation && zt(e.navigator.geolocation, ["getCurrentPosition", "watchPosition"]);
}), n40.__load_patch("PromiseRejectionEvent", (e, s) => {
function t(i) {
return function(l) {
Nt(e, i).forEach((E10) => {
let _10 = e.PromiseRejectionEvent;
if (_10) {
let b10 = new _10(i, { promise: l.promise, reason: l.rejection });
E10.invoke(b10);
}
});
};
}
e.PromiseRejectionEvent && (s[B("unhandledPromiseRejectionHandler")] = t("unhandledrejection"), s[B("rejectionHandledHandler")] = t("rejectionhandled"));
}), n40.__load_patch("queueMicrotask", (e, s, t) => {
Qt(e, t);
});
}
function on(n40) {
n40.__load_patch("ZoneAwarePromise", (e, s, t) => {
let i = Object.getOwnPropertyDescriptor, l = Object.defineProperty;
function d(h) {
if (h && h.toString === Object.prototype.toString) {
let c = h.constructor && h.constructor.name;
return (c || "") + ": " + JSON.stringify(h);
}
return h ? h.toString() : Object.prototype.toString.call(h);
}
let E10 = t.symbol, _10 = [], b10 = e[E10("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")] !== false, T10 = E10("Promise"), P10 = E10("then"), D10 = "__creationTrace__";
t.onUnhandledError = (h) => {
if (t.showUncaughtError()) {
let c = h && h.rejection;
c ? console.error("Unhandled Promise rejection:", c instanceof Error ? c.message : c, "; Zone:", h.zone.name, "; Task:", h.task && h.task.source, "; Value:", c, c instanceof Error ? c.stack : void 0) : console.error(h);
}
}, t.microtaskDrainDone = () => {
for (; _10.length; ) {
let h = _10.shift();
try {
h.zone.runGuarded(() => {
throw h.throwOriginal ? h.rejection : h;
});
} catch (c) {
G7(c);
}
}
};
let H3 = E10("unhandledPromiseRejectionHandler");
function G7(h) {
t.onUnhandledError(h);
try {
let c = s[H3];
typeof c == "function" && c.call(this, h);
} catch {
}
}
function J(h) {
return h && typeof h.then == "function";
}
function K9(h) {
return h;
}
function O10(h) {
return x4.reject(h);
}
let p10 = E10("state"), f3 = E10("value"), j = E10("finally"), V10 = E10("parentPromiseValue"), $ = E10("parentPromiseState"), W10 = "Promise.then", g = null, q10 = true, L10 = false, S = 0;
function w3(h, c) {
return (a) => {
try {
A10(h, c, a);
} catch (u10) {
A10(h, false, u10);
}
};
}
let N10 = function() {
let h = false;
return function(a) {
return function() {
h || (h = true, a.apply(null, arguments));
};
};
}, te2 = "Promise resolved with itself", X9 = E10("currentTaskTrace");
function A10(h, c, a) {
let u10 = N10();
if (h === a) throw new TypeError(te2);
if (h[p10] === g) {
let k = null;
try {
(typeof a == "object" || typeof a == "function") && (k = a && a.then);
} catch (C10) {
return u10(() => {
A10(h, false, C10);
})(), h;
}
if (c !== L10 && a instanceof x4 && a.hasOwnProperty(p10) && a.hasOwnProperty(f3) && a[p10] !== g) r(a), A10(h, a[p10], a[f3]);
else if (c !== L10 && typeof k == "function") try {
k.call(a, u10(w3(h, c)), u10(w3(h, false)));
} catch (C10) {
u10(() => {
A10(h, false, C10);
})();
}
else {
h[p10] = c;
let C10 = h[f3];
if (h[f3] = a, h[j] === j && c === q10 && (h[p10] = h[$], h[f3] = h[V10]), c === L10 && a instanceof Error) {
let y = s.currentTask && s.currentTask.data && s.currentTask.data[D10];
y && l(a, X9, { configurable: true, enumerable: false, writable: true, value: y });
}
for (let y = 0; y < C10.length; ) o(h, C10[y++], C10[y++], C10[y++], C10[y++]);
if (C10.length == 0 && c == L10) {
h[p10] = S;
let y = a;
try {
throw new Error("Uncaught (in promise): " + d(a) + (a && a.stack ? `
` + a.stack : ""));
} catch (I10) {
y = I10;
}
b10 && (y.throwOriginal = true), y.rejection = a, y.promise = h, y.zone = s.current, y.task = s.currentTask, _10.push(y), t.scheduleMicroTask();
}
}
}
return h;
}
let m10 = E10("rejectionHandledHandler");
function r(h) {
if (h[p10] === S) {
try {
let c = s[m10];
c && typeof c == "function" && c.call(this, { rejection: h[f3], promise: h });
} catch {
}
h[p10] = L10;
for (let c = 0; c < _10.length; c++) h === _10[c].promise && _10.splice(c, 1);
}
}
function o(h, c, a, u10, k) {
r(h);
let C10 = h[p10], y = C10 ? typeof u10 == "function" ? u10 : K9 : typeof k == "function" ? k : O10;
c.scheduleMicroTask(W10, () => {
try {
let I10 = h[f3], M10 = !!a && j === a[j];
M10 && (a[V10] = I10, a[$] = C10);
let Z4 = c.run(y, void 0, M10 && y !== O10 && y !== K9 ? [] : [I10]);
A10(a, true, Z4);
} catch (I10) {
A10(a, false, I10);
}
}, a);
}
let v3 = "function ZoneAwarePromise() { [native code] }", R = function() {
}, Y4 = e.AggregateError;
class x4 {
static toString() {
return v3;
}
static resolve(c) {
return c instanceof x4 ? c : A10(new this(null), q10, c);
}
static reject(c) {
return A10(new this(null), L10, c);
}
static withResolvers() {
let c = {};
return c.promise = new x4((a, u10) => {
c.resolve = a, c.reject = u10;
}), c;
}
static any(c) {
if (!c || typeof c[Symbol.iterator] != "function") return Promise.reject(new Y4([], "All promises were rejected"));
let a = [], u10 = 0;
try {
for (let y of c) u10++, a.push(x4.resolve(y));
} catch {
return Promise.reject(new Y4([], "All promises were rejected"));
}
if (u10 === 0) return Promise.reject(new Y4([], "All promises were rejected"));
let k = false, C10 = [];
return new x4((y, I10) => {
for (let M10 = 0; M10 < a.length; M10++) a[M10].then((Z4) => {
k || (k = true, y(Z4));
}, (Z4) => {
C10.push(Z4), u10--, u10 === 0 && (k = true, I10(new Y4(C10, "All promises were rejected")));
});
});
}
static race(c) {
let a, u10, k = new this((I10, M10) => {
a = I10, u10 = M10;
});
function C10(I10) {
a(I10);
}
function y(I10) {
u10(I10);
}
for (let I10 of c) J(I10) || (I10 = this.resolve(I10)), I10.then(C10, y);
return k;
}
static all(c) {
return x4.allWithCallback(c);
}
static allSettled(c) {
return (this && this.prototype instanceof x4 ? this : x4).allWithCallback(c, { thenCallback: (u10) => ({ status: "fulfilled", value: u10 }), errorCallback: (u10) => ({ status: "rejected", reason: u10 }) });
}
static allWithCallback(c, a) {
let u10, k, C10 = new this((Z4, U10) => {
u10 = Z4, k = U10;
}), y = 2, I10 = 0, M10 = [];
for (let Z4 of c) {
J(Z4) || (Z4 = this.resolve(Z4));
let U10 = I10;
try {
Z4.then((z10) => {
M10[U10] = a ? a.thenCallback(z10) : z10, y--, y === 0 && u10(M10);
}, (z10) => {
a ? (M10[U10] = a.errorCallback(z10), y--, y === 0 && u10(M10)) : k(z10);
});
} catch (z10) {
k(z10);
}
y++, I10++;
}
return y -= 2, y === 0 && u10(M10), C10;
}
constructor(c) {
let a = this;
if (!(a instanceof x4)) throw new Error("Must be an instanceof Promise.");
a[p10] = g, a[f3] = [];
try {
let u10 = N10();
c && c(u10(w3(a, q10)), u10(w3(a, L10)));
} catch (u10) {
A10(a, false, u10);
}
}
get [Symbol.toStringTag]() {
return "Promise";
}
get [Symbol.species]() {
return x4;
}
then(c, a) {
let u10 = this.constructor?.[Symbol.species];
(!u10 || typeof u10 != "function") && (u10 = this.constructor || x4);
let k = new u10(R), C10 = s.current;
return this[p10] == g ? this[f3].push(C10, k, c, a) : o(this, C10, k, c, a), k;
}
catch(c) {
return this.then(null, c);
}
finally(c) {
let a = this.constructor?.[Symbol.species];
(!a || typeof a != "function") && (a = x4);
let u10 = new a(R);
u10[j] = j;
let k = s.current;
return this[p10] == g ? this[f3].push(k, u10, c, c) : o(this, k, u10, c, c), u10;
}
}
x4.resolve = x4.resolve, x4.reject = x4.reject, x4.race = x4.race, x4.all = x4.all;
let Te2 = e[T10] = e.Promise;
e.Promise = x4;
let he2 = E10("thenPatched");
function fe2(h) {
let c = h.prototype, a = i(c, "then");
if (a && (a.writable === false || !a.configurable)) return;
let u10 = c.then;
c[P10] = u10, h.prototype.then = function(k, C10) {
return new x4((I10, M10) => {
u10.call(this, I10, M10);
}).then(k, C10);
}, h[he2] = true;
}
t.patchThen = fe2;
function se(h) {
return function(c, a) {
let u10 = h.apply(c, a);
if (u10 instanceof x4) return u10;
let k = u10.constructor;
return k[he2] || fe2(k), u10;
};
}
return Te2 && (fe2(Te2), Ee(e, "fetch", (h) => se(h))), Promise[s.__symbol__("uncaughtPromiseErrors")] = _10, x4;
});
}
function an(n40) {
n40.__load_patch("toString", (e) => {
let s = Function.prototype.toString, t = B("OriginalDelegate"), i = B("Promise"), l = B("Error"), d = function() {
if (typeof this == "function") {
let T10 = this[t];
if (T10) return typeof T10 == "function" ? s.call(T10) : Object.prototype.toString.call(T10);
if (this === Promise) {
let P10 = e[i];
if (P10) return s.call(P10);
}
if (this === Error) {
let P10 = e[l];
if (P10) return s.call(P10);
}
}
return s.call(this);
};
d[t] = s, Function.prototype.toString = d;
let E10 = Object.prototype.toString, _10 = "[object Promise]";
Object.prototype.toString = function() {
return typeof Promise == "function" && this instanceof Promise ? _10 : E10.call(this);
};
});