hanc-webrtc-widgets 2.9.2 → 2.9.5
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.
|
@@ -580,7 +580,7 @@ const Il = { attribute: !0, type: String, converter: Po, reflect: !1, hasChanged
|
|
|
580
580
|
}
|
|
581
581
|
throw Error("Unsupported decorator location: " + i);
|
|
582
582
|
};
|
|
583
|
-
function
|
|
583
|
+
function O(t) {
|
|
584
584
|
return (A, e) => typeof e == "object" ? Cl(t, A, e) : ((i, g, I) => {
|
|
585
585
|
const C = g.hasOwnProperty(I);
|
|
586
586
|
return g.constructor.createProperty(I, C ? { ...i, wrapped: !0 } : i), C ? Object.getOwnPropertyDescriptor(g, I) : void 0;
|
|
@@ -592,7 +592,7 @@ function V(t) {
|
|
|
592
592
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
593
593
|
*/
|
|
594
594
|
function LA(t) {
|
|
595
|
-
return
|
|
595
|
+
return O({ ...t, state: !0, attribute: !1 });
|
|
596
596
|
}
|
|
597
597
|
/**
|
|
598
598
|
* @license
|
|
@@ -7582,19 +7582,19 @@ function ta(t) {
|
|
|
7582
7582
|
}
|
|
7583
7583
|
var cu = "2.15.6";
|
|
7584
7584
|
const du = cu, hu = 16;
|
|
7585
|
-
class
|
|
7585
|
+
class gt {
|
|
7586
7586
|
}
|
|
7587
|
-
|
|
7587
|
+
gt.setTimeout = function() {
|
|
7588
7588
|
return setTimeout(...arguments);
|
|
7589
7589
|
};
|
|
7590
|
-
|
|
7590
|
+
gt.setInterval = // eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
7591
7591
|
function() {
|
|
7592
7592
|
return setInterval(...arguments);
|
|
7593
7593
|
};
|
|
7594
|
-
|
|
7594
|
+
gt.clearTimeout = function() {
|
|
7595
7595
|
return clearTimeout(...arguments);
|
|
7596
7596
|
};
|
|
7597
|
-
|
|
7597
|
+
gt.clearInterval = function() {
|
|
7598
7598
|
return clearInterval(...arguments);
|
|
7599
7599
|
};
|
|
7600
7600
|
const lu = 5e3, XI = [];
|
|
@@ -7887,7 +7887,7 @@ function _u(t) {
|
|
|
7887
7887
|
}
|
|
7888
7888
|
function wt(t) {
|
|
7889
7889
|
return k(this, void 0, void 0, function* () {
|
|
7890
|
-
return new Promise((A) =>
|
|
7890
|
+
return new Promise((A) => gt.setTimeout(A, t));
|
|
7891
7891
|
});
|
|
7892
7892
|
}
|
|
7893
7893
|
function us() {
|
|
@@ -9172,7 +9172,7 @@ class er {
|
|
|
9172
9172
|
this.log.warn("ping timeout duration not set", this.logContext);
|
|
9173
9173
|
return;
|
|
9174
9174
|
}
|
|
9175
|
-
this.pingTimeout =
|
|
9175
|
+
this.pingTimeout = gt.setTimeout(() => {
|
|
9176
9176
|
this.log.warn("ping timeout triggered. last pong received at: ".concat(new Date(Date.now() - this.pingTimeoutDuration * 1e3).toUTCString()), this.logContext), this.handleOnClose("ping timeout");
|
|
9177
9177
|
}, this.pingTimeoutDuration * 1e3);
|
|
9178
9178
|
}
|
|
@@ -9180,19 +9180,19 @@ class er {
|
|
|
9180
9180
|
* Clears ping timeout (does not start a new timeout)
|
|
9181
9181
|
*/
|
|
9182
9182
|
clearPingTimeout() {
|
|
9183
|
-
this.pingTimeout &&
|
|
9183
|
+
this.pingTimeout && gt.clearTimeout(this.pingTimeout);
|
|
9184
9184
|
}
|
|
9185
9185
|
startPingInterval() {
|
|
9186
9186
|
if (this.clearPingInterval(), this.resetPingTimeout(), !this.pingIntervalDuration) {
|
|
9187
9187
|
this.log.warn("ping interval duration not set", this.logContext);
|
|
9188
9188
|
return;
|
|
9189
9189
|
}
|
|
9190
|
-
this.log.debug("start ping interval", this.logContext), this.pingInterval =
|
|
9190
|
+
this.log.debug("start ping interval", this.logContext), this.pingInterval = gt.setInterval(() => {
|
|
9191
9191
|
this.sendPing();
|
|
9192
9192
|
}, this.pingIntervalDuration * 1e3);
|
|
9193
9193
|
}
|
|
9194
9194
|
clearPingInterval() {
|
|
9195
|
-
this.log.debug("clearing ping interval", this.logContext), this.clearPingTimeout(), this.pingInterval &&
|
|
9195
|
+
this.log.debug("clearing ping interval", this.logContext), this.clearPingTimeout(), this.pingInterval && gt.clearInterval(this.pingInterval);
|
|
9196
9196
|
}
|
|
9197
9197
|
}
|
|
9198
9198
|
function MB(t) {
|
|
@@ -10474,10 +10474,10 @@ class Qf {
|
|
|
10474
10474
|
if (i.getConnectionState() !== "connected")
|
|
10475
10475
|
return new Promise((n, a) => k(I, void 0, void 0, function* () {
|
|
10476
10476
|
const s = () => {
|
|
10477
|
-
this.log.warn("abort transport connection", this.logContext),
|
|
10477
|
+
this.log.warn("abort transport connection", this.logContext), gt.clearTimeout(Q), a(new ye("room connection has been cancelled", oe.Cancelled));
|
|
10478
10478
|
};
|
|
10479
10479
|
g != null && g.signal.aborted && s(), g == null || g.signal.addEventListener("abort", s);
|
|
10480
|
-
const Q =
|
|
10480
|
+
const Q = gt.setTimeout(() => {
|
|
10481
10481
|
g == null || g.signal.removeEventListener("abort", s), a(new ye("could not establish pc connection", oe.InternalError));
|
|
10482
10482
|
}, C);
|
|
10483
10483
|
for (; this.state !== Le.CONNECTED; )
|
|
@@ -10485,7 +10485,7 @@ class Qf {
|
|
|
10485
10485
|
a(new ye("room connection has been cancelled", oe.Cancelled));
|
|
10486
10486
|
return;
|
|
10487
10487
|
}
|
|
10488
|
-
|
|
10488
|
+
gt.clearTimeout(Q), g == null || g.signal.removeEventListener("abort", s), n();
|
|
10489
10489
|
}));
|
|
10490
10490
|
}();
|
|
10491
10491
|
});
|
|
@@ -11909,7 +11909,7 @@ class Rf extends wi.EventEmitter {
|
|
|
11909
11909
|
I(C);
|
|
11910
11910
|
return;
|
|
11911
11911
|
}
|
|
11912
|
-
i === ra && (o = 0), this.log.debug("reconnecting in ".concat(o, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout =
|
|
11912
|
+
i === ra && (o = 0), this.log.debug("reconnecting in ".concat(o, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = gt.setTimeout(() => this.attemptReconnect(g).finally(() => this.reconnectTimeout = void 0), o);
|
|
11913
11913
|
}, this.waitForRestarted = () => new Promise((i, g) => {
|
|
11914
11914
|
this.pcState === Vt.Connected && i();
|
|
11915
11915
|
const I = () => {
|
|
@@ -12514,7 +12514,7 @@ class Rf extends wi.EventEmitter {
|
|
|
12514
12514
|
return e(this.dataChannelForKind(WA.LOSSY), Zt.PUBLISHER), e(this.dataChannelForKind(WA.RELIABLE), Zt.PUBLISHER), e(this.dataChannelForKind(WA.LOSSY, !0), Zt.SUBSCRIBER), e(this.dataChannelForKind(WA.RELIABLE, !0), Zt.SUBSCRIBER), A;
|
|
12515
12515
|
}
|
|
12516
12516
|
clearReconnectTimeout() {
|
|
12517
|
-
this.reconnectTimeout &&
|
|
12517
|
+
this.reconnectTimeout && gt.clearTimeout(this.reconnectTimeout);
|
|
12518
12518
|
}
|
|
12519
12519
|
clearPendingReconnect() {
|
|
12520
12520
|
this.clearReconnectTimeout(), this.reconnectAttempts = 0;
|
|
@@ -13526,7 +13526,7 @@ class qf extends _d {
|
|
|
13526
13526
|
const g = this.elementInfos.reduce((n, a) => Math.max(n, a.visibilityChangedAt || 0), 0), I = !((i = (e = this.adaptiveStreamSettings) === null || e === void 0 ? void 0 : e.pauseVideoInBackground) !== null && i !== void 0) || i ? this.isInBackground : !1, C = this.elementInfos.some((n) => n.pictureInPicture), o = this.elementInfos.some((n) => n.visible) && !I || C;
|
|
13527
13527
|
if (!(this.lastVisible === o && !A)) {
|
|
13528
13528
|
if (!o && Date.now() - g < Ba) {
|
|
13529
|
-
|
|
13529
|
+
gt.setTimeout(() => {
|
|
13530
13530
|
this.updateVisibility();
|
|
13531
13531
|
}, Ba);
|
|
13532
13532
|
return;
|
|
@@ -14682,8 +14682,8 @@ class Wf extends pd {
|
|
|
14682
14682
|
}
|
|
14683
14683
|
});
|
|
14684
14684
|
try {
|
|
14685
|
-
for (var sA = !0, xA = Yi(l),
|
|
14686
|
-
P =
|
|
14685
|
+
for (var sA = !0, xA = Yi(l), TA; TA = yield xA.next(), H = TA.done, !H; sA = !0) {
|
|
14686
|
+
P = TA.value, sA = !1;
|
|
14687
14687
|
const X = P;
|
|
14688
14688
|
yield De.write(X);
|
|
14689
14689
|
}
|
|
@@ -16417,7 +16417,7 @@ class UI extends wi.EventEmitter {
|
|
|
16417
16417
|
registerConnectionReconcile() {
|
|
16418
16418
|
this.clearConnectionReconcile();
|
|
16419
16419
|
let A = 0;
|
|
16420
|
-
this.connectionReconcileInterval =
|
|
16420
|
+
this.connectionReconcileInterval = gt.setInterval(() => {
|
|
16421
16421
|
// ensure we didn't tear it down
|
|
16422
16422
|
!this.engine || // engine detected close, but Room missed it
|
|
16423
16423
|
this.engine.isClosed || // transports failed without notifying engine
|
|
@@ -16431,7 +16431,7 @@ class UI extends wi.EventEmitter {
|
|
|
16431
16431
|
}, Zf);
|
|
16432
16432
|
}
|
|
16433
16433
|
clearConnectionReconcile() {
|
|
16434
|
-
this.connectionReconcileInterval &&
|
|
16434
|
+
this.connectionReconcileInterval && gt.clearInterval(this.connectionReconcileInterval);
|
|
16435
16435
|
}
|
|
16436
16436
|
setAndEmitConnectionState(A) {
|
|
16437
16437
|
return A === this.state ? !1 : (this.state = A, this.emit(tA.ConnectionStateChanged, this.state), !0);
|
|
@@ -18042,11 +18042,10 @@ function ED() {
|
|
|
18042
18042
|
console.debug("[NoiseFilter] destroy error on reset (non-fatal):", A);
|
|
18043
18043
|
});
|
|
18044
18044
|
}
|
|
18045
|
-
const
|
|
18045
|
+
const it = class it extends EventTarget {
|
|
18046
18046
|
constructor() {
|
|
18047
18047
|
super(...arguments), this.room = null, this.callStatus = "idle", this.isReady = !1, this.error = null, this.microphoneEnabled = !1, this.connectedParticipants = [], this.userIdentity = "", this.roomName = "", this.audioPlaybackPrompt = !1, this.isAppleDevice = /iPhone|iPad|iPod|Macintosh|Mac OS/i.test(navigator.userAgent), this.agentAudioElements = [], this.unmuteTimer = null, this.speakingHandler = null, this.fadeContext = null, this.fadeContextAcquired = !1, this.fadeGains = /* @__PURE__ */ new Map(), this.fadeSetupPromise = null, this.noiseFilterAttached = !1;
|
|
18048
18048
|
}
|
|
18049
|
-
// ~95% audible by 90ms
|
|
18050
18049
|
/** Centralized agent identity check — single source of truth for identity patterns. */
|
|
18051
18050
|
static isAgentIdentity(A) {
|
|
18052
18051
|
return A.includes("agent") || A.includes("voice-assistant") || A.includes("AJ_");
|
|
@@ -18141,10 +18140,10 @@ const Qt = class Qt extends EventTarget {
|
|
|
18141
18140
|
const r = setTimeout(() => {
|
|
18142
18141
|
g.off(tA.ParticipantConnected, B), Q();
|
|
18143
18142
|
}, 2e3), B = (h) => {
|
|
18144
|
-
|
|
18143
|
+
it.isAgentIdentity(h.identity) && (clearTimeout(r), g.off(tA.ParticipantConnected, B), Q());
|
|
18145
18144
|
};
|
|
18146
18145
|
for (const h of g.remoteParticipants.values())
|
|
18147
|
-
if (
|
|
18146
|
+
if (it.isAgentIdentity(h.identity)) {
|
|
18148
18147
|
clearTimeout(r), Q();
|
|
18149
18148
|
return;
|
|
18150
18149
|
}
|
|
@@ -18180,7 +18179,7 @@ const Qt = class Qt extends EventTarget {
|
|
|
18180
18179
|
...this.connectedParticipants,
|
|
18181
18180
|
e.identity
|
|
18182
18181
|
];
|
|
18183
|
-
const i =
|
|
18182
|
+
const i = it.isAgentIdentity(e.identity);
|
|
18184
18183
|
i && (this.updateStatus("agent-connected"), this.audioPlaybackPrompt = !0, this.dispatchEvent(
|
|
18185
18184
|
new CustomEvent("agent-connected", {
|
|
18186
18185
|
detail: { participant: e.identity }
|
|
@@ -18197,7 +18196,7 @@ const Qt = class Qt extends EventTarget {
|
|
|
18197
18196
|
this.connectedParticipants = this.connectedParticipants.filter(
|
|
18198
18197
|
(g) => g !== e.identity
|
|
18199
18198
|
);
|
|
18200
|
-
const i =
|
|
18199
|
+
const i = it.isAgentIdentity(e.identity);
|
|
18201
18200
|
i && (this.audioPlaybackPrompt = !1, this.updateStatus("connected"), this.dispatchEvent(
|
|
18202
18201
|
new CustomEvent("agent-disconnected", {
|
|
18203
18202
|
detail: { participant: e.identity }
|
|
@@ -18213,7 +18212,9 @@ const Qt = class Qt extends EventTarget {
|
|
|
18213
18212
|
(e, i, g) => {
|
|
18214
18213
|
if (e.kind === "audio") {
|
|
18215
18214
|
const I = e.attach();
|
|
18216
|
-
document.body.appendChild(I)
|
|
18215
|
+
document.body.appendChild(I);
|
|
18216
|
+
const C = i.trackName === it.BACKGROUND_AUDIO_TRACK_NAME;
|
|
18217
|
+
it.isAgentIdentity(g.identity) && !C && (this.agentAudioElements.push(I), this.setupAgentAudioFade(I)), this.dispatchEvent(
|
|
18217
18218
|
new CustomEvent("audio-track-added", {
|
|
18218
18219
|
detail: {
|
|
18219
18220
|
participant: g.identity,
|
|
@@ -18221,10 +18222,10 @@ const Qt = class Qt extends EventTarget {
|
|
|
18221
18222
|
}
|
|
18222
18223
|
})
|
|
18223
18224
|
);
|
|
18224
|
-
const
|
|
18225
|
-
C && this.dispatchEvent(
|
|
18225
|
+
const o = e.mediaStreamTrack;
|
|
18226
|
+
o && !C && this.dispatchEvent(
|
|
18226
18227
|
new CustomEvent("audio-track", {
|
|
18227
|
-
detail:
|
|
18228
|
+
detail: o
|
|
18228
18229
|
})
|
|
18229
18230
|
);
|
|
18230
18231
|
}
|
|
@@ -18263,7 +18264,7 @@ const Qt = class Qt extends EventTarget {
|
|
|
18263
18264
|
);
|
|
18264
18265
|
}), A.on(tA.AudioPlaybackStatusChanged, async () => {
|
|
18265
18266
|
A.canPlaybackAudio || this.connectedParticipants.some(
|
|
18266
|
-
(i) =>
|
|
18267
|
+
(i) => it.isAgentIdentity(i)
|
|
18267
18268
|
) && !this.audioPlaybackPrompt && (this.updateStatus("agent-connected"), this.audioPlaybackPrompt = !0), this.dispatchEvent(
|
|
18268
18269
|
new CustomEvent("audio-playback-status-changed", {
|
|
18269
18270
|
detail: { canPlayback: A.canPlaybackAudio }
|
|
@@ -18278,13 +18279,13 @@ const Qt = class Qt extends EventTarget {
|
|
|
18278
18279
|
bubbles: !0,
|
|
18279
18280
|
composed: !0
|
|
18280
18281
|
})
|
|
18281
|
-
) : (!i ||
|
|
18282
|
+
) : (!i || it.isAgentIdentity(i.identity)) && this.dispatchEvent(new CustomEvent("agent-command", { detail: g }));
|
|
18282
18283
|
} catch {
|
|
18283
18284
|
}
|
|
18284
18285
|
}), this.speakingHandler = (e) => {
|
|
18285
|
-
e ? (this.unmuteTimer && (clearTimeout(this.unmuteTimer), this.unmuteTimer = null), this.rampAgentGain(0,
|
|
18286
|
-
this.unmuteTimer = null, this.rampAgentGain(1,
|
|
18287
|
-
},
|
|
18286
|
+
e ? (this.unmuteTimer && (clearTimeout(this.unmuteTimer), this.unmuteTimer = null), this.rampAgentGain(0, it.FADEOUT_TC)) : this.unmuteTimer = setTimeout(() => {
|
|
18287
|
+
this.unmuteTimer = null, this.rampAgentGain(1, it.FADEIN_TC);
|
|
18288
|
+
}, it.UNMUTE_HOLDOVER_MS);
|
|
18288
18289
|
}, A.localParticipant.on("isSpeakingChanged", this.speakingHandler);
|
|
18289
18290
|
}
|
|
18290
18291
|
async toggleMicrophone() {
|
|
@@ -18424,14 +18425,14 @@ const Qt = class Qt extends EventTarget {
|
|
|
18424
18425
|
});
|
|
18425
18426
|
}
|
|
18426
18427
|
};
|
|
18427
|
-
|
|
18428
|
-
let Xg =
|
|
18428
|
+
it.UNMUTE_HOLDOVER_MS = 350, it.FADEOUT_TC = 0.045, it.FADEIN_TC = 0.03, it.BACKGROUND_AUDIO_TRACK_NAME = "background_audio";
|
|
18429
|
+
let Xg = it;
|
|
18429
18430
|
/**
|
|
18430
18431
|
* @license
|
|
18431
18432
|
* Copyright 2010-2025 Three.js Authors
|
|
18432
18433
|
* SPDX-License-Identifier: MIT
|
|
18433
18434
|
*/
|
|
18434
|
-
const sr = "182", cD = 0, t0 = 1, dD = 2, Lo = 1, hD = 2, sC = 3, ji = 0, rt = 1, qi = 2, Pi = 0, SI = 1, Us = 2, i0 = 3, g0 = 4, lD = 5, vg = 100, xD = 101, uD = 102, fD = 103, DD = 104, _D = 200, pD = 201, wD = 202, mD = 203, Ls = 204, vs = 205, yD = 206, bD = 207, ND = 208, kD = 209, SD = 210, RD = 211, GD = 212, MD = 213, FD = 214, Ks = 0, Js = 1, Ys = 2, LI = 3, Ts = 4, qs = 5, Hs = 6, Ps = 7, kd = 0, UD = 1, LD = 2, li = 0, Sd = 1, Rd = 2, Gd = 3, Md = 4, Fd = 5, Ud = 6, Ld = 7, vd = 300, Zg = 301, vI = 302, Os = 303, Vs = 304, wn = 306, js = 1e3, Hi = 1001, Ws = 1002,
|
|
18435
|
+
const sr = "182", cD = 0, t0 = 1, dD = 2, Lo = 1, hD = 2, sC = 3, ji = 0, rt = 1, qi = 2, Pi = 0, SI = 1, Us = 2, i0 = 3, g0 = 4, lD = 5, vg = 100, xD = 101, uD = 102, fD = 103, DD = 104, _D = 200, pD = 201, wD = 202, mD = 203, Ls = 204, vs = 205, yD = 206, bD = 207, ND = 208, kD = 209, SD = 210, RD = 211, GD = 212, MD = 213, FD = 214, Ks = 0, Js = 1, Ys = 2, LI = 3, Ts = 4, qs = 5, Hs = 6, Ps = 7, kd = 0, UD = 1, LD = 2, li = 0, Sd = 1, Rd = 2, Gd = 3, Md = 4, Fd = 5, Ud = 6, Ld = 7, vd = 300, Zg = 301, vI = 302, Os = 303, Vs = 304, wn = 306, js = 1e3, Hi = 1001, Ws = 1002, It = 1003, vD = 1004, eo = 1005, nt = 1006, da = 1007, Yg = 1008, Yt = 1009, Kd = 1010, Jd = 1011, yC = 1012, Qr = 1013, _i = 1014, ci = 1015, Wi = 1016, rr = 1017, Br = 1018, bC = 1020, Yd = 35902, Td = 35899, qd = 1021, Hd = 1022, ei = 1023, Xi = 1026, Tg = 1027, Pd = 1028, Er = 1029, KI = 1030, cr = 1031, dr = 1033, vo = 33776, Ko = 33777, Jo = 33778, Yo = 33779, Xs = 35840, Zs = 35841, zs = 35842, $s = 35843, AQ = 36196, eQ = 37492, tQ = 37496, iQ = 37488, gQ = 37489, IQ = 37490, CQ = 37491, oQ = 37808, nQ = 37809, aQ = 37810, sQ = 37811, QQ = 37812, rQ = 37813, BQ = 37814, EQ = 37815, cQ = 37816, dQ = 37817, hQ = 37818, lQ = 37819, xQ = 37820, uQ = 37821, fQ = 36492, DQ = 36494, _Q = 36495, pQ = 36283, wQ = 36284, mQ = 36285, yQ = 36286, KD = 3200, JD = 0, YD = 1, Eg = "", Kt = "srgb", JI = "srgb-linear", on = "linear", fe = "srgb", CI = 7680, I0 = 519, TD = 512, qD = 513, HD = 514, hr = 515, PD = 516, OD = 517, lr = 518, VD = 519, C0 = 35044, o0 = "300 es", di = 2e3, nn = 2001;
|
|
18435
18436
|
function Od(t) {
|
|
18436
18437
|
for (let A = t.length - 1; A >= 0; --A)
|
|
18437
18438
|
if (t[A] >= 65535) return !0;
|
|
@@ -18534,10 +18535,10 @@ class qI {
|
|
|
18534
18535
|
}
|
|
18535
18536
|
}
|
|
18536
18537
|
}
|
|
18537
|
-
const
|
|
18538
|
+
const Ct = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"], ha = Math.PI / 180, bQ = 180 / Math.PI;
|
|
18538
18539
|
function PC() {
|
|
18539
18540
|
const t = Math.random() * 4294967295 | 0, A = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
|
|
18540
|
-
return (
|
|
18541
|
+
return (Ct[t & 255] + Ct[t >> 8 & 255] + Ct[t >> 16 & 255] + Ct[t >> 24 & 255] + "-" + Ct[A & 255] + Ct[A >> 8 & 255] + "-" + Ct[A >> 16 & 15 | 64] + Ct[A >> 24 & 255] + "-" + Ct[e & 63 | 128] + Ct[e >> 8 & 255] + "-" + Ct[e >> 16 & 255] + Ct[e >> 24 & 255] + Ct[i & 255] + Ct[i >> 8 & 255] + Ct[i >> 16 & 255] + Ct[i >> 24 & 255]).toLowerCase();
|
|
18541
18542
|
}
|
|
18542
18543
|
function Ce(t, A, e) {
|
|
18543
18544
|
return Math.max(A, Math.min(e, t));
|
|
@@ -20954,7 +20955,7 @@ class Bt extends qI {
|
|
|
20954
20955
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
20955
20956
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
20956
20957
|
*/
|
|
20957
|
-
constructor(A = Bt.DEFAULT_IMAGE, e = Bt.DEFAULT_MAPPING, i = Hi, g = Hi, I =
|
|
20958
|
+
constructor(A = Bt.DEFAULT_IMAGE, e = Bt.DEFAULT_MAPPING, i = Hi, g = Hi, I = nt, C = Yg, o = ei, n = Yt, a = Bt.DEFAULT_ANISOTROPY, s = Eg) {
|
|
20958
20959
|
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A2++ }), this.uuid = PC(), this.name = "", this.source = new xr(A), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = i, this.wrapT = g, this.magFilter = I, this.minFilter = C, this.anisotropy = a, this.format = o, this.internalFormat = null, this.type = n, this.offset = new de(0, 0), this.repeat = new de(1, 1), this.center = new de(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new HA(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = s, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(A && A.depth && A.depth > 1), this.pmremVersion = 0;
|
|
20959
20960
|
}
|
|
20960
20961
|
/**
|
|
@@ -21736,7 +21737,7 @@ class e2 extends qI {
|
|
|
21736
21737
|
super(), i = Object.assign({
|
|
21737
21738
|
generateMipmaps: !1,
|
|
21738
21739
|
internalFormat: null,
|
|
21739
|
-
minFilter:
|
|
21740
|
+
minFilter: nt,
|
|
21740
21741
|
depthBuffer: !0,
|
|
21741
21742
|
stencilBuffer: !1,
|
|
21742
21743
|
resolveDepthBuffer: !0,
|
|
@@ -21756,7 +21757,7 @@ class e2 extends qI {
|
|
|
21756
21757
|
}
|
|
21757
21758
|
_setTextureOptions(A = {}) {
|
|
21758
21759
|
const e = {
|
|
21759
|
-
minFilter:
|
|
21760
|
+
minFilter: nt,
|
|
21760
21761
|
generateMipmaps: !1,
|
|
21761
21762
|
flipY: !1,
|
|
21762
21763
|
internalFormat: null
|
|
@@ -21863,7 +21864,7 @@ class Vd extends Bt {
|
|
|
21863
21864
|
* @param {number} [depth=1] - The depth of the texture.
|
|
21864
21865
|
*/
|
|
21865
21866
|
constructor(A = null, e = 1, i = 1, g = 1) {
|
|
21866
|
-
super(null), this.isDataArrayTexture = !0, this.image = { data: A, width: e, height: i, depth: g }, this.magFilter =
|
|
21867
|
+
super(null), this.isDataArrayTexture = !0, this.image = { data: A, width: e, height: i, depth: g }, this.magFilter = It, this.minFilter = It, this.wrapR = Hi, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
|
|
21867
21868
|
}
|
|
21868
21869
|
/**
|
|
21869
21870
|
* Describes that a specific layer of the texture needs to be updated.
|
|
@@ -21894,7 +21895,7 @@ class t2 extends Bt {
|
|
|
21894
21895
|
* @param {number} [depth=1] - The depth of the texture.
|
|
21895
21896
|
*/
|
|
21896
21897
|
constructor(A = null, e = 1, i = 1, g = 1) {
|
|
21897
|
-
super(null), this.isData3DTexture = !0, this.image = { data: A, width: e, height: i, depth: g }, this.magFilter =
|
|
21898
|
+
super(null), this.isData3DTexture = !0, this.image = { data: A, width: e, height: i, depth: g }, this.magFilter = It, this.minFilter = It, this.wrapR = Hi, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
21898
21899
|
}
|
|
21899
21900
|
}
|
|
21900
21901
|
class VC {
|
|
@@ -25101,7 +25102,7 @@ class ne {
|
|
|
25101
25102
|
* @return {number} The hexadecimal value.
|
|
25102
25103
|
*/
|
|
25103
25104
|
getHex(A = Kt) {
|
|
25104
|
-
return se.workingToColorSpace(
|
|
25105
|
+
return se.workingToColorSpace(ot.copy(this), A), Math.round(Ce(ot.r * 255, 0, 255)) * 65536 + Math.round(Ce(ot.g * 255, 0, 255)) * 256 + Math.round(Ce(ot.b * 255, 0, 255));
|
|
25105
25106
|
}
|
|
25106
25107
|
/**
|
|
25107
25108
|
* Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
|
|
@@ -25121,8 +25122,8 @@ class ne {
|
|
|
25121
25122
|
* @return {{h:number,s:number,l:number}} The HSL representation of this color.
|
|
25122
25123
|
*/
|
|
25123
25124
|
getHSL(A, e = se.workingColorSpace) {
|
|
25124
|
-
se.workingToColorSpace(
|
|
25125
|
-
const i =
|
|
25125
|
+
se.workingToColorSpace(ot.copy(this), e);
|
|
25126
|
+
const i = ot.r, g = ot.g, I = ot.b, C = Math.max(i, g, I), o = Math.min(i, g, I);
|
|
25126
25127
|
let n, a;
|
|
25127
25128
|
const s = (o + C) / 2;
|
|
25128
25129
|
if (o === C)
|
|
@@ -25152,7 +25153,7 @@ class ne {
|
|
|
25152
25153
|
* @return {Color} The RGB representation of this color.
|
|
25153
25154
|
*/
|
|
25154
25155
|
getRGB(A, e = se.workingColorSpace) {
|
|
25155
|
-
return se.workingToColorSpace(
|
|
25156
|
+
return se.workingToColorSpace(ot.copy(this), e), A.r = ot.r, A.g = ot.g, A.b = ot.b, A;
|
|
25156
25157
|
}
|
|
25157
25158
|
/**
|
|
25158
25159
|
* Returns the value of this color as a CSS style string. Example: `rgb(255,0,0)`.
|
|
@@ -25161,8 +25162,8 @@ class ne {
|
|
|
25161
25162
|
* @return {string} The CSS representation of this color.
|
|
25162
25163
|
*/
|
|
25163
25164
|
getStyle(A = Kt) {
|
|
25164
|
-
se.workingToColorSpace(
|
|
25165
|
-
const e =
|
|
25165
|
+
se.workingToColorSpace(ot.copy(this), A);
|
|
25166
|
+
const e = ot.r, i = ot.g, g = ot.b;
|
|
25166
25167
|
return A !== Kt ? `color(${A} ${e.toFixed(3)} ${i.toFixed(3)} ${g.toFixed(3)})` : `rgb(${Math.round(e * 255)},${Math.round(i * 255)},${Math.round(g * 255)})`;
|
|
25167
25168
|
}
|
|
25168
25169
|
/**
|
|
@@ -25346,7 +25347,7 @@ class ne {
|
|
|
25346
25347
|
yield this.r, yield this.g, yield this.b;
|
|
25347
25348
|
}
|
|
25348
25349
|
}
|
|
25349
|
-
const
|
|
25350
|
+
const ot = /* @__PURE__ */ new ne();
|
|
25350
25351
|
ne.NAMES = Wd;
|
|
25351
25352
|
let Q2 = 0;
|
|
25352
25353
|
class mn extends qI {
|
|
@@ -26583,15 +26584,15 @@ class jC extends Ci {
|
|
|
26583
26584
|
const hA = new K();
|
|
26584
26585
|
for (let sA = 0; sA < q; sA++) {
|
|
26585
26586
|
const xA = sA * N - L;
|
|
26586
|
-
for (let
|
|
26587
|
-
const JA =
|
|
26588
|
-
hA[c] = JA * u, hA[d] = xA * _, hA[E] = H, a.push(hA.x, hA.y, hA.z), hA[c] = 0, hA[d] = 0, hA[E] = w > 0 ? 1 : -1, s.push(hA.x, hA.y, hA.z), Q.push(
|
|
26587
|
+
for (let TA = 0; TA < j; TA++) {
|
|
26588
|
+
const JA = TA * p - F;
|
|
26589
|
+
hA[c] = JA * u, hA[d] = xA * _, hA[E] = H, a.push(hA.x, hA.y, hA.z), hA[c] = 0, hA[d] = 0, hA[E] = w > 0 ? 1 : -1, s.push(hA.x, hA.y, hA.z), Q.push(TA / y), Q.push(1 - sA / S), P += 1;
|
|
26589
26590
|
}
|
|
26590
26591
|
}
|
|
26591
26592
|
for (let sA = 0; sA < S; sA++)
|
|
26592
26593
|
for (let xA = 0; xA < y; xA++) {
|
|
26593
|
-
const
|
|
26594
|
-
n.push(
|
|
26594
|
+
const TA = r + xA + j * sA, JA = r + xA + j * (sA + 1), Se = r + (xA + 1) + j * (sA + 1), De = r + (xA + 1) + j * sA;
|
|
26595
|
+
n.push(TA, JA, De), n.push(JA, Se, De), Z += 6;
|
|
26595
26596
|
}
|
|
26596
26597
|
o.addGroup(B, Z, l), B += Z, r += P;
|
|
26597
26598
|
}
|
|
@@ -26621,7 +26622,7 @@ function YI(t) {
|
|
|
26621
26622
|
}
|
|
26622
26623
|
return A;
|
|
26623
26624
|
}
|
|
26624
|
-
function
|
|
26625
|
+
function Qt(t) {
|
|
26625
26626
|
const A = {};
|
|
26626
26627
|
for (let e = 0; e < t.length; e++) {
|
|
26627
26628
|
const i = YI(t[e]);
|
|
@@ -26640,7 +26641,7 @@ function $d(t) {
|
|
|
26640
26641
|
const A = t.getRenderTarget();
|
|
26641
26642
|
return A === null ? t.outputColorSpace : A.isXRRenderTarget === !0 ? A.texture.colorSpace : se.workingColorSpace;
|
|
26642
26643
|
}
|
|
26643
|
-
const d2 = { clone: YI, merge:
|
|
26644
|
+
const d2 = { clone: YI, merge: Qt };
|
|
26644
26645
|
var h2 = `void main() {
|
|
26645
26646
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
26646
26647
|
}`, l2 = `void main() {
|
|
@@ -27080,7 +27081,7 @@ class th extends xi {
|
|
|
27080
27081
|
});
|
|
27081
27082
|
I.uniforms.tEquirect.value = e;
|
|
27082
27083
|
const C = new Ii(g, I), o = e.minFilter;
|
|
27083
|
-
return e.minFilter === Yg && (e.minFilter =
|
|
27084
|
+
return e.minFilter === Yg && (e.minFilter = nt), new x2(1, 10, this).update(A, C), e.minFilter = o, C.geometry.dispose(), C.material.dispose(), this;
|
|
27084
27085
|
}
|
|
27085
27086
|
/**
|
|
27086
27087
|
* Clears this cube render target.
|
|
@@ -27252,7 +27253,7 @@ class D2 extends Bt {
|
|
|
27252
27253
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
27253
27254
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
27254
27255
|
*/
|
|
27255
|
-
constructor(A = null, e = 1, i = 1, g, I, C, o, n, a =
|
|
27256
|
+
constructor(A = null, e = 1, i = 1, g, I, C, o, n, a = It, s = It, Q, r) {
|
|
27256
27257
|
super(null, C, o, n, a, s, g, I, Q, r), this.isDataTexture = !0, this.image = { data: A, width: e, height: i }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
27257
27258
|
}
|
|
27258
27259
|
}
|
|
@@ -27623,7 +27624,7 @@ class kC extends Bt {
|
|
|
27623
27624
|
* @param {number} [format=DepthFormat] - The texture format.
|
|
27624
27625
|
* @param {number} [depth=1] - The depth of the texture.
|
|
27625
27626
|
*/
|
|
27626
|
-
constructor(A, e, i = _i, g, I, C, o =
|
|
27627
|
+
constructor(A, e, i = _i, g, I, C, o = It, n = It, a, s = Xi, Q = 1) {
|
|
27627
27628
|
if (s !== Xi && s !== Tg)
|
|
27628
27629
|
throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
27629
27630
|
const r = { width: A, height: e, depth: Q };
|
|
@@ -27651,7 +27652,7 @@ class m2 extends kC {
|
|
|
27651
27652
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
27652
27653
|
* @param {number} [format=DepthFormat] - The texture format.
|
|
27653
27654
|
*/
|
|
27654
|
-
constructor(A, e = _i, i = Zg, g, I, C =
|
|
27655
|
+
constructor(A, e = _i, i = Zg, g, I, C = It, o = It, n, a = Xi) {
|
|
27655
27656
|
const s = { width: A, height: A, depth: 1 }, Q = [s, s, s, s, s, s];
|
|
27656
27657
|
super(A, A, e, i, g, I, C, o, n, a), this.image = Q, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
|
|
27657
27658
|
}
|
|
@@ -31973,7 +31974,7 @@ void main() {
|
|
|
31973
31974
|
#include <tonemapping_fragment>
|
|
31974
31975
|
#include <colorspace_fragment>
|
|
31975
31976
|
#include <fog_fragment>
|
|
31976
|
-
}`,
|
|
31977
|
+
}`, OA = {
|
|
31977
31978
|
alphahash_fragment: M2,
|
|
31978
31979
|
alphahash_pars_fragment: F2,
|
|
31979
31980
|
alphamap_fragment: U2,
|
|
@@ -32280,7 +32281,7 @@ void main() {
|
|
|
32280
32281
|
}
|
|
32281
32282
|
}, Qi = {
|
|
32282
32283
|
basic: {
|
|
32283
|
-
uniforms: /* @__PURE__ */
|
|
32284
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32284
32285
|
dA.common,
|
|
32285
32286
|
dA.specularmap,
|
|
32286
32287
|
dA.envmap,
|
|
@@ -32288,11 +32289,11 @@ void main() {
|
|
|
32288
32289
|
dA.lightmap,
|
|
32289
32290
|
dA.fog
|
|
32290
32291
|
]),
|
|
32291
|
-
vertexShader:
|
|
32292
|
-
fragmentShader:
|
|
32292
|
+
vertexShader: OA.meshbasic_vert,
|
|
32293
|
+
fragmentShader: OA.meshbasic_frag
|
|
32293
32294
|
},
|
|
32294
32295
|
lambert: {
|
|
32295
|
-
uniforms: /* @__PURE__ */
|
|
32296
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32296
32297
|
dA.common,
|
|
32297
32298
|
dA.specularmap,
|
|
32298
32299
|
dA.envmap,
|
|
@@ -32308,11 +32309,11 @@ void main() {
|
|
|
32308
32309
|
emissive: { value: /* @__PURE__ */ new ne(0) }
|
|
32309
32310
|
}
|
|
32310
32311
|
]),
|
|
32311
|
-
vertexShader:
|
|
32312
|
-
fragmentShader:
|
|
32312
|
+
vertexShader: OA.meshlambert_vert,
|
|
32313
|
+
fragmentShader: OA.meshlambert_frag
|
|
32313
32314
|
},
|
|
32314
32315
|
phong: {
|
|
32315
|
-
uniforms: /* @__PURE__ */
|
|
32316
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32316
32317
|
dA.common,
|
|
32317
32318
|
dA.specularmap,
|
|
32318
32319
|
dA.envmap,
|
|
@@ -32330,11 +32331,11 @@ void main() {
|
|
|
32330
32331
|
shininess: { value: 30 }
|
|
32331
32332
|
}
|
|
32332
32333
|
]),
|
|
32333
|
-
vertexShader:
|
|
32334
|
-
fragmentShader:
|
|
32334
|
+
vertexShader: OA.meshphong_vert,
|
|
32335
|
+
fragmentShader: OA.meshphong_frag
|
|
32335
32336
|
},
|
|
32336
32337
|
standard: {
|
|
32337
|
-
uniforms: /* @__PURE__ */
|
|
32338
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32338
32339
|
dA.common,
|
|
32339
32340
|
dA.envmap,
|
|
32340
32341
|
dA.aomap,
|
|
@@ -32354,11 +32355,11 @@ void main() {
|
|
|
32354
32355
|
envMapIntensity: { value: 1 }
|
|
32355
32356
|
}
|
|
32356
32357
|
]),
|
|
32357
|
-
vertexShader:
|
|
32358
|
-
fragmentShader:
|
|
32358
|
+
vertexShader: OA.meshphysical_vert,
|
|
32359
|
+
fragmentShader: OA.meshphysical_frag
|
|
32359
32360
|
},
|
|
32360
32361
|
toon: {
|
|
32361
|
-
uniforms: /* @__PURE__ */
|
|
32362
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32362
32363
|
dA.common,
|
|
32363
32364
|
dA.aomap,
|
|
32364
32365
|
dA.lightmap,
|
|
@@ -32373,11 +32374,11 @@ void main() {
|
|
|
32373
32374
|
emissive: { value: /* @__PURE__ */ new ne(0) }
|
|
32374
32375
|
}
|
|
32375
32376
|
]),
|
|
32376
|
-
vertexShader:
|
|
32377
|
-
fragmentShader:
|
|
32377
|
+
vertexShader: OA.meshtoon_vert,
|
|
32378
|
+
fragmentShader: OA.meshtoon_frag
|
|
32378
32379
|
},
|
|
32379
32380
|
matcap: {
|
|
32380
|
-
uniforms: /* @__PURE__ */
|
|
32381
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32381
32382
|
dA.common,
|
|
32382
32383
|
dA.bumpmap,
|
|
32383
32384
|
dA.normalmap,
|
|
@@ -32387,19 +32388,19 @@ void main() {
|
|
|
32387
32388
|
matcap: { value: null }
|
|
32388
32389
|
}
|
|
32389
32390
|
]),
|
|
32390
|
-
vertexShader:
|
|
32391
|
-
fragmentShader:
|
|
32391
|
+
vertexShader: OA.meshmatcap_vert,
|
|
32392
|
+
fragmentShader: OA.meshmatcap_frag
|
|
32392
32393
|
},
|
|
32393
32394
|
points: {
|
|
32394
|
-
uniforms: /* @__PURE__ */
|
|
32395
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32395
32396
|
dA.points,
|
|
32396
32397
|
dA.fog
|
|
32397
32398
|
]),
|
|
32398
|
-
vertexShader:
|
|
32399
|
-
fragmentShader:
|
|
32399
|
+
vertexShader: OA.points_vert,
|
|
32400
|
+
fragmentShader: OA.points_frag
|
|
32400
32401
|
},
|
|
32401
32402
|
dashed: {
|
|
32402
|
-
uniforms: /* @__PURE__ */
|
|
32403
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32403
32404
|
dA.common,
|
|
32404
32405
|
dA.fog,
|
|
32405
32406
|
{
|
|
@@ -32408,19 +32409,19 @@ void main() {
|
|
|
32408
32409
|
totalSize: { value: 2 }
|
|
32409
32410
|
}
|
|
32410
32411
|
]),
|
|
32411
|
-
vertexShader:
|
|
32412
|
-
fragmentShader:
|
|
32412
|
+
vertexShader: OA.linedashed_vert,
|
|
32413
|
+
fragmentShader: OA.linedashed_frag
|
|
32413
32414
|
},
|
|
32414
32415
|
depth: {
|
|
32415
|
-
uniforms: /* @__PURE__ */
|
|
32416
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32416
32417
|
dA.common,
|
|
32417
32418
|
dA.displacementmap
|
|
32418
32419
|
]),
|
|
32419
|
-
vertexShader:
|
|
32420
|
-
fragmentShader:
|
|
32420
|
+
vertexShader: OA.depth_vert,
|
|
32421
|
+
fragmentShader: OA.depth_frag
|
|
32421
32422
|
},
|
|
32422
32423
|
normal: {
|
|
32423
|
-
uniforms: /* @__PURE__ */
|
|
32424
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32424
32425
|
dA.common,
|
|
32425
32426
|
dA.bumpmap,
|
|
32426
32427
|
dA.normalmap,
|
|
@@ -32429,16 +32430,16 @@ void main() {
|
|
|
32429
32430
|
opacity: { value: 1 }
|
|
32430
32431
|
}
|
|
32431
32432
|
]),
|
|
32432
|
-
vertexShader:
|
|
32433
|
-
fragmentShader:
|
|
32433
|
+
vertexShader: OA.meshnormal_vert,
|
|
32434
|
+
fragmentShader: OA.meshnormal_frag
|
|
32434
32435
|
},
|
|
32435
32436
|
sprite: {
|
|
32436
|
-
uniforms: /* @__PURE__ */
|
|
32437
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32437
32438
|
dA.sprite,
|
|
32438
32439
|
dA.fog
|
|
32439
32440
|
]),
|
|
32440
|
-
vertexShader:
|
|
32441
|
-
fragmentShader:
|
|
32441
|
+
vertexShader: OA.sprite_vert,
|
|
32442
|
+
fragmentShader: OA.sprite_frag
|
|
32442
32443
|
},
|
|
32443
32444
|
background: {
|
|
32444
32445
|
uniforms: {
|
|
@@ -32446,8 +32447,8 @@ void main() {
|
|
|
32446
32447
|
t2D: { value: null },
|
|
32447
32448
|
backgroundIntensity: { value: 1 }
|
|
32448
32449
|
},
|
|
32449
|
-
vertexShader:
|
|
32450
|
-
fragmentShader:
|
|
32450
|
+
vertexShader: OA.background_vert,
|
|
32451
|
+
fragmentShader: OA.background_frag
|
|
32451
32452
|
},
|
|
32452
32453
|
backgroundCube: {
|
|
32453
32454
|
uniforms: {
|
|
@@ -32457,8 +32458,8 @@ void main() {
|
|
|
32457
32458
|
backgroundIntensity: { value: 1 },
|
|
32458
32459
|
backgroundRotation: { value: /* @__PURE__ */ new HA() }
|
|
32459
32460
|
},
|
|
32460
|
-
vertexShader:
|
|
32461
|
-
fragmentShader:
|
|
32461
|
+
vertexShader: OA.backgroundCube_vert,
|
|
32462
|
+
fragmentShader: OA.backgroundCube_frag
|
|
32462
32463
|
},
|
|
32463
32464
|
cube: {
|
|
32464
32465
|
uniforms: {
|
|
@@ -32466,18 +32467,18 @@ void main() {
|
|
|
32466
32467
|
tFlip: { value: -1 },
|
|
32467
32468
|
opacity: { value: 1 }
|
|
32468
32469
|
},
|
|
32469
|
-
vertexShader:
|
|
32470
|
-
fragmentShader:
|
|
32470
|
+
vertexShader: OA.cube_vert,
|
|
32471
|
+
fragmentShader: OA.cube_frag
|
|
32471
32472
|
},
|
|
32472
32473
|
equirect: {
|
|
32473
32474
|
uniforms: {
|
|
32474
32475
|
tEquirect: { value: null }
|
|
32475
32476
|
},
|
|
32476
|
-
vertexShader:
|
|
32477
|
-
fragmentShader:
|
|
32477
|
+
vertexShader: OA.equirect_vert,
|
|
32478
|
+
fragmentShader: OA.equirect_frag
|
|
32478
32479
|
},
|
|
32479
32480
|
distance: {
|
|
32480
|
-
uniforms: /* @__PURE__ */
|
|
32481
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32481
32482
|
dA.common,
|
|
32482
32483
|
dA.displacementmap,
|
|
32483
32484
|
{
|
|
@@ -32486,11 +32487,11 @@ void main() {
|
|
|
32486
32487
|
farDistance: { value: 1e3 }
|
|
32487
32488
|
}
|
|
32488
32489
|
]),
|
|
32489
|
-
vertexShader:
|
|
32490
|
-
fragmentShader:
|
|
32490
|
+
vertexShader: OA.distance_vert,
|
|
32491
|
+
fragmentShader: OA.distance_frag
|
|
32491
32492
|
},
|
|
32492
32493
|
shadow: {
|
|
32493
|
-
uniforms: /* @__PURE__ */
|
|
32494
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32494
32495
|
dA.lights,
|
|
32495
32496
|
dA.fog,
|
|
32496
32497
|
{
|
|
@@ -32498,12 +32499,12 @@ void main() {
|
|
|
32498
32499
|
opacity: { value: 1 }
|
|
32499
32500
|
}
|
|
32500
32501
|
]),
|
|
32501
|
-
vertexShader:
|
|
32502
|
-
fragmentShader:
|
|
32502
|
+
vertexShader: OA.shadow_vert,
|
|
32503
|
+
fragmentShader: OA.shadow_frag
|
|
32503
32504
|
}
|
|
32504
32505
|
};
|
|
32505
32506
|
Qi.physical = {
|
|
32506
|
-
uniforms: /* @__PURE__ */
|
|
32507
|
+
uniforms: /* @__PURE__ */ Qt([
|
|
32507
32508
|
Qi.standard.uniforms,
|
|
32508
32509
|
{
|
|
32509
32510
|
clearcoat: { value: 0 },
|
|
@@ -32552,8 +32553,8 @@ Qi.physical = {
|
|
|
32552
32553
|
anisotropyMapTransform: { value: /* @__PURE__ */ new HA() }
|
|
32553
32554
|
}
|
|
32554
32555
|
]),
|
|
32555
|
-
vertexShader:
|
|
32556
|
-
fragmentShader:
|
|
32556
|
+
vertexShader: OA.meshphysical_vert,
|
|
32557
|
+
fragmentShader: OA.meshphysical_frag
|
|
32557
32558
|
};
|
|
32558
32559
|
const fo = { r: 0, b: 0, g: 0 }, Rg = /* @__PURE__ */ new Zi(), Bw = /* @__PURE__ */ new Ve();
|
|
32559
32560
|
function Ew(t, A, e, i, g, I, C) {
|
|
@@ -32731,9 +32732,9 @@ function cw(t, A) {
|
|
|
32731
32732
|
if (Z.location >= 0) {
|
|
32732
32733
|
let hA = H[P];
|
|
32733
32734
|
if (hA === void 0 && (P === "instanceMatrix" && p.instanceMatrix && (hA = p.instanceMatrix), P === "instanceColor" && p.instanceColor && (hA = p.instanceColor)), hA !== void 0) {
|
|
32734
|
-
const sA = hA.normalized, xA = hA.itemSize,
|
|
32735
|
-
if (
|
|
32736
|
-
const JA =
|
|
32735
|
+
const sA = hA.normalized, xA = hA.itemSize, TA = A.get(hA);
|
|
32736
|
+
if (TA === void 0) continue;
|
|
32737
|
+
const JA = TA.buffer, Se = TA.type, De = TA.bytesPerElement, X = Se === t.INT || Se === t.UNSIGNED_INT || hA.gpuType === Qr;
|
|
32737
32738
|
if (hA.isInterleavedBufferAttribute) {
|
|
32738
32739
|
const iA = hA.data, pA = iA.stride, qA = hA.offset;
|
|
32739
32740
|
if (iA.isInstancedInterleavedBuffer) {
|
|
@@ -33119,8 +33120,8 @@ class N0 {
|
|
|
33119
33120
|
}
|
|
33120
33121
|
_allocateTargets() {
|
|
33121
33122
|
const A = 3 * Math.max(this._cubeSize, 112), e = 4 * this._cubeSize, i = {
|
|
33122
|
-
magFilter:
|
|
33123
|
-
minFilter:
|
|
33123
|
+
magFilter: nt,
|
|
33124
|
+
minFilter: nt,
|
|
33124
33125
|
generateMipmaps: !1,
|
|
33125
33126
|
type: Wi,
|
|
33126
33127
|
format: ei,
|
|
@@ -34670,11 +34671,11 @@ function kQ(t) {
|
|
|
34670
34671
|
}
|
|
34671
34672
|
const Um = /* @__PURE__ */ new Map();
|
|
34672
34673
|
function Lm(t, A) {
|
|
34673
|
-
let e =
|
|
34674
|
+
let e = OA[A];
|
|
34674
34675
|
if (e === void 0) {
|
|
34675
34676
|
const i = Um.get(A);
|
|
34676
34677
|
if (i !== void 0)
|
|
34677
|
-
e =
|
|
34678
|
+
e = OA[i], KA('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', A, i);
|
|
34678
34679
|
else
|
|
34679
34680
|
throw new Error("Can not resolve #include <" + A + ">");
|
|
34680
34681
|
}
|
|
@@ -34971,12 +34972,12 @@ function Wm(t, A, e, i) {
|
|
|
34971
34972
|
"uniform vec3 cameraPosition;",
|
|
34972
34973
|
"uniform bool isOrthographic;",
|
|
34973
34974
|
e.toneMapping !== li ? "#define TONE_MAPPING" : "",
|
|
34974
|
-
e.toneMapping !== li ?
|
|
34975
|
+
e.toneMapping !== li ? OA.tonemapping_pars_fragment : "",
|
|
34975
34976
|
// this code is required here because it is used by the toneMapping() function defined below
|
|
34976
34977
|
e.toneMapping !== li ? km("toneMapping", e.toneMapping) : "",
|
|
34977
34978
|
e.dithering ? "#define DITHERING" : "",
|
|
34978
34979
|
e.opaque ? "#define OPAQUE" : "",
|
|
34979
|
-
|
|
34980
|
+
OA.colorspace_pars_fragment,
|
|
34980
34981
|
// this code is required here because it is used by the various encoding/decoding function defined below
|
|
34981
34982
|
bm("linearToOutputTexel", e.outputColorSpace),
|
|
34982
34983
|
Sm(),
|
|
@@ -35129,15 +35130,15 @@ function $m(t, A, e, i, g, I, C) {
|
|
|
35129
35130
|
const H = F.fog, j = L.geometry, q = l.isMeshStandardMaterial ? F.environment : null, P = (l.isMeshStandardMaterial ? e : A).get(l.envMap || q), Z = P && P.mapping === wn ? P.image.height : null, hA = h[l.type];
|
|
35130
35131
|
l.precision !== null && (B = g.getMaxPrecision(l.precision), B !== l.precision && KA("WebGLProgram.getParameters:", l.precision, "not supported, using", B, "instead."));
|
|
35131
35132
|
const sA = j.morphAttributes.position || j.morphAttributes.normal || j.morphAttributes.color, xA = sA !== void 0 ? sA.length : 0;
|
|
35132
|
-
let
|
|
35133
|
-
j.morphAttributes.position !== void 0 && (
|
|
35133
|
+
let TA = 0;
|
|
35134
|
+
j.morphAttributes.position !== void 0 && (TA = 1), j.morphAttributes.normal !== void 0 && (TA = 2), j.morphAttributes.color !== void 0 && (TA = 3);
|
|
35134
35135
|
let JA, Se, De, X;
|
|
35135
35136
|
if (hA) {
|
|
35136
35137
|
const xe = Qi[hA];
|
|
35137
35138
|
JA = xe.vertexShader, Se = xe.fragmentShader;
|
|
35138
35139
|
} else
|
|
35139
35140
|
JA = l.vertexShader, Se = l.fragmentShader, n.update(l), De = n.getVertexShaderID(l), X = n.getFragmentShaderID(l);
|
|
35140
|
-
const iA = t.getRenderTarget(), pA = t.state.buffers.depth.getReversed(), qA = L.isInstancedMesh === !0, yA = L.isBatchedMesh === !0, re = !!l.map, Ze = !!l.matcap, ae = !!P, le = !!l.aoMap, we = !!l.lightMap, VA = !!l.bumpMap, Te = !!l.normalMap, R = !!l.displacementMap, qe = !!l.emissiveMap, he = !!l.metalnessMap, be = !!l.roughnessMap, NA = l.anisotropy > 0, b = l.clearcoat > 0, f = l.dispersion > 0, M = l.iridescence > 0, W = l.sheen > 0, eA = l.transmission > 0,
|
|
35141
|
+
const iA = t.getRenderTarget(), pA = t.state.buffers.depth.getReversed(), qA = L.isInstancedMesh === !0, yA = L.isBatchedMesh === !0, re = !!l.map, Ze = !!l.matcap, ae = !!P, le = !!l.aoMap, we = !!l.lightMap, VA = !!l.bumpMap, Te = !!l.normalMap, R = !!l.displacementMap, qe = !!l.emissiveMap, he = !!l.metalnessMap, be = !!l.roughnessMap, NA = l.anisotropy > 0, b = l.clearcoat > 0, f = l.dispersion > 0, M = l.iridescence > 0, W = l.sheen > 0, eA = l.transmission > 0, V = NA && !!l.anisotropyMap, SA = b && !!l.clearcoatMap, rA = b && !!l.clearcoatNormalMap, bA = b && !!l.clearcoatRoughnessMap, UA = M && !!l.iridescenceMap, IA = M && !!l.iridescenceThicknessMap, EA = W && !!l.sheenColorMap, mA = W && !!l.sheenRoughnessMap, kA = !!l.specularMap, BA = !!l.specularColorMap, jA = !!l.specularIntensityMap, G = eA && !!l.transmissionMap, uA = eA && !!l.thicknessMap, oA = !!l.gradientMap, fA = !!l.alphaMap, gA = l.alphaTest > 0, z = !!l.alphaHash, QA = !!l.extensions;
|
|
35141
35142
|
let vA = li;
|
|
35142
35143
|
l.toneMapped && (iA === null || iA.isXRRenderTarget === !0) && (vA = t.toneMapping);
|
|
35143
35144
|
const Ne = {
|
|
@@ -35175,7 +35176,7 @@ function $m(t, A, e, i, g, I, C) {
|
|
|
35175
35176
|
metalnessMap: he,
|
|
35176
35177
|
roughnessMap: be,
|
|
35177
35178
|
anisotropy: NA,
|
|
35178
|
-
anisotropyMap:
|
|
35179
|
+
anisotropyMap: V,
|
|
35179
35180
|
clearcoat: b,
|
|
35180
35181
|
clearcoatMap: SA,
|
|
35181
35182
|
clearcoatNormalMap: rA,
|
|
@@ -35209,7 +35210,7 @@ function $m(t, A, e, i, g, I, C) {
|
|
|
35209
35210
|
emissiveMapUv: qe && c(l.emissiveMap.channel),
|
|
35210
35211
|
metalnessMapUv: he && c(l.metalnessMap.channel),
|
|
35211
35212
|
roughnessMapUv: be && c(l.roughnessMap.channel),
|
|
35212
|
-
anisotropyMapUv:
|
|
35213
|
+
anisotropyMapUv: V && c(l.anisotropyMap.channel),
|
|
35213
35214
|
clearcoatMapUv: SA && c(l.clearcoatMap.channel),
|
|
35214
35215
|
clearcoatNormalMapUv: rA && c(l.clearcoatNormalMap.channel),
|
|
35215
35216
|
clearcoatRoughnessMapUv: bA && c(l.clearcoatRoughnessMap.channel),
|
|
@@ -35240,7 +35241,7 @@ function $m(t, A, e, i, g, I, C) {
|
|
|
35240
35241
|
morphNormals: j.morphAttributes.normal !== void 0,
|
|
35241
35242
|
morphColors: j.morphAttributes.color !== void 0,
|
|
35242
35243
|
morphTargetsCount: xA,
|
|
35243
|
-
morphTextureStride:
|
|
35244
|
+
morphTextureStride: TA,
|
|
35244
35245
|
numDirLights: p.directional.length,
|
|
35245
35246
|
numPointLights: p.point.length,
|
|
35246
35247
|
numSpotLights: p.spot.length,
|
|
@@ -35779,14 +35780,14 @@ function By(t, A, e) {
|
|
|
35779
35780
|
P.map = new xi(g.x, g.y, {
|
|
35780
35781
|
format: KI,
|
|
35781
35782
|
type: Wi,
|
|
35782
|
-
minFilter:
|
|
35783
|
-
magFilter:
|
|
35783
|
+
minFilter: nt,
|
|
35784
|
+
magFilter: nt,
|
|
35784
35785
|
generateMipmaps: !1
|
|
35785
|
-
}), P.map.texture.name = q.name + ".shadowMap", P.map.depthTexture = new kC(g.x, g.y, ci), P.map.depthTexture.name = q.name + ".shadowMapDepth", P.map.depthTexture.format = Xi, P.map.depthTexture.compareFunction = null, P.map.depthTexture.minFilter =
|
|
35786
|
+
}), P.map.texture.name = q.name + ".shadowMap", P.map.depthTexture = new kC(g.x, g.y, ci), P.map.depthTexture.name = q.name + ".shadowMapDepth", P.map.depthTexture.format = Xi, P.map.depthTexture.compareFunction = null, P.map.depthTexture.minFilter = It, P.map.depthTexture.magFilter = It;
|
|
35786
35787
|
} else {
|
|
35787
35788
|
q.isPointLight ? (P.map = new th(g.x), P.map.depthTexture = new m2(g.x, _i)) : (P.map = new xi(g.x, g.y), P.map.depthTexture = new kC(g.x, g.y, _i)), P.map.depthTexture.name = q.name + ".shadowMap", P.map.depthTexture.format = Xi;
|
|
35788
35789
|
const sA = t.state.buffers.depth.getReversed();
|
|
35789
|
-
this.type === Lo ? (P.map.depthTexture.compareFunction = sA ? lr : hr, P.map.depthTexture.minFilter =
|
|
35790
|
+
this.type === Lo ? (P.map.depthTexture.compareFunction = sA ? lr : hr, P.map.depthTexture.minFilter = nt, P.map.depthTexture.magFilter = nt) : (P.map.depthTexture.compareFunction = null, P.map.depthTexture.minFilter = It, P.map.depthTexture.magFilter = It);
|
|
35790
35791
|
}
|
|
35791
35792
|
P.camera.updateProjectionMatrix();
|
|
35792
35793
|
}
|
|
@@ -35805,8 +35806,8 @@ function By(t, A, e) {
|
|
|
35805
35806
|
), F.viewport(C);
|
|
35806
35807
|
}
|
|
35807
35808
|
if (q.isPointLight) {
|
|
35808
|
-
const xA = P.camera,
|
|
35809
|
-
JA !== xA.far && (xA.far = JA, xA.updateProjectionMatrix()), IC.setFromMatrixPosition(q.matrixWorld), xA.position.copy(IC), Oa.copy(xA.position), Oa.add(Qy[sA]), xA.up.copy(ry[sA]), xA.lookAt(Oa), xA.updateMatrixWorld(),
|
|
35809
|
+
const xA = P.camera, TA = P.matrix, JA = q.distance || xA.far;
|
|
35810
|
+
JA !== xA.far && (xA.far = JA, xA.updateProjectionMatrix()), IC.setFromMatrixPosition(q.matrixWorld), xA.position.copy(IC), Oa.copy(xA.position), Oa.add(Qy[sA]), xA.up.copy(ry[sA]), xA.lookAt(Oa), xA.updateMatrixWorld(), TA.makeTranslation(-IC.x, -IC.y, -IC.z), W0.multiplyMatrices(xA.projectionMatrix, xA.matrixWorldInverse), P._frustum.setFromProjectionMatrix(W0, xA.coordinateSystem, xA.reversedDepth);
|
|
35810
35811
|
} else
|
|
35811
35812
|
P.updateMatrices(q);
|
|
35812
35813
|
i = P.getFrustum(), x(y, S, P.camera, q, this.type);
|
|
@@ -35999,7 +36000,7 @@ function cy(t, A) {
|
|
|
35999
36000
|
const Z = t.getParameter(t.VERSION);
|
|
36000
36001
|
Z.indexOf("WebGL") !== -1 ? (P = parseFloat(/^WebGL (\d)/.exec(Z)[1]), q = P >= 1) : Z.indexOf("OpenGL ES") !== -1 && (P = parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]), q = P >= 2);
|
|
36001
36002
|
let hA = null, sA = {};
|
|
36002
|
-
const xA = t.getParameter(t.SCISSOR_BOX),
|
|
36003
|
+
const xA = t.getParameter(t.SCISSOR_BOX), TA = t.getParameter(t.VIEWPORT), JA = new Ye().fromArray(xA), Se = new Ye().fromArray(TA);
|
|
36003
36004
|
function De(G, uA, oA, fA) {
|
|
36004
36005
|
const gA = new Uint8Array(4), z = t.createTexture();
|
|
36005
36006
|
t.bindTexture(G, z), t.texParameteri(G, t.TEXTURE_MIN_FILTER, t.NEAREST), t.texParameteri(G, t.TEXTURE_MAG_FILTER, t.NEAREST);
|
|
@@ -36169,7 +36170,7 @@ function cy(t, A) {
|
|
|
36169
36170
|
Ee("WebGLState:", G);
|
|
36170
36171
|
}
|
|
36171
36172
|
}
|
|
36172
|
-
function
|
|
36173
|
+
function V() {
|
|
36173
36174
|
try {
|
|
36174
36175
|
t.compressedTexSubImage2D(...arguments);
|
|
36175
36176
|
} catch (G) {
|
|
@@ -36261,7 +36262,7 @@ function cy(t, A) {
|
|
|
36261
36262
|
texStorage3D: bA,
|
|
36262
36263
|
texSubImage2D: W,
|
|
36263
36264
|
texSubImage3D: eA,
|
|
36264
|
-
compressedTexSubImage2D:
|
|
36265
|
+
compressedTexSubImage2D: V,
|
|
36265
36266
|
compressedTexSubImage3D: SA,
|
|
36266
36267
|
scissor: EA,
|
|
36267
36268
|
viewport: mA,
|
|
@@ -36285,10 +36286,10 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36285
36286
|
const eA = NA(b);
|
|
36286
36287
|
if ((eA.width > M || eA.height > M) && (W = M / Math.max(eA.width, eA.height)), W < 1)
|
|
36287
36288
|
if (typeof HTMLImageElement < "u" && b instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && b instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && b instanceof ImageBitmap || typeof VideoFrame < "u" && b instanceof VideoFrame) {
|
|
36288
|
-
const
|
|
36289
|
-
Q === void 0 && (Q = h(
|
|
36290
|
-
const rA = f ? h(
|
|
36291
|
-
return rA.width =
|
|
36289
|
+
const V = Math.floor(W * eA.width), SA = Math.floor(W * eA.height);
|
|
36290
|
+
Q === void 0 && (Q = h(V, SA));
|
|
36291
|
+
const rA = f ? h(V, SA) : Q;
|
|
36292
|
+
return rA.width = V, rA.height = SA, rA.getContext("2d").drawImage(b, 0, 0, V, SA), KA("WebGLRenderer: Texture has been resized from (" + eA.width + "x" + eA.height + ") to (" + V + "x" + SA + ")."), rA;
|
|
36292
36293
|
} else
|
|
36293
36294
|
return "data" in b && KA("WebGLRenderer: Image in DataTexture is too big (" + eA.width + "x" + eA.height + ")."), b;
|
|
36294
36295
|
return b;
|
|
@@ -36307,19 +36308,19 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36307
36308
|
if (t[b] !== void 0) return t[b];
|
|
36308
36309
|
KA("WebGLRenderer: Attempt to use non-existing WebGL internal format '" + b + "'");
|
|
36309
36310
|
}
|
|
36310
|
-
let
|
|
36311
|
-
if (f === t.RED && (M === t.FLOAT && (
|
|
36311
|
+
let V = f;
|
|
36312
|
+
if (f === t.RED && (M === t.FLOAT && (V = t.R32F), M === t.HALF_FLOAT && (V = t.R16F), M === t.UNSIGNED_BYTE && (V = t.R8)), f === t.RED_INTEGER && (M === t.UNSIGNED_BYTE && (V = t.R8UI), M === t.UNSIGNED_SHORT && (V = t.R16UI), M === t.UNSIGNED_INT && (V = t.R32UI), M === t.BYTE && (V = t.R8I), M === t.SHORT && (V = t.R16I), M === t.INT && (V = t.R32I)), f === t.RG && (M === t.FLOAT && (V = t.RG32F), M === t.HALF_FLOAT && (V = t.RG16F), M === t.UNSIGNED_BYTE && (V = t.RG8)), f === t.RG_INTEGER && (M === t.UNSIGNED_BYTE && (V = t.RG8UI), M === t.UNSIGNED_SHORT && (V = t.RG16UI), M === t.UNSIGNED_INT && (V = t.RG32UI), M === t.BYTE && (V = t.RG8I), M === t.SHORT && (V = t.RG16I), M === t.INT && (V = t.RG32I)), f === t.RGB_INTEGER && (M === t.UNSIGNED_BYTE && (V = t.RGB8UI), M === t.UNSIGNED_SHORT && (V = t.RGB16UI), M === t.UNSIGNED_INT && (V = t.RGB32UI), M === t.BYTE && (V = t.RGB8I), M === t.SHORT && (V = t.RGB16I), M === t.INT && (V = t.RGB32I)), f === t.RGBA_INTEGER && (M === t.UNSIGNED_BYTE && (V = t.RGBA8UI), M === t.UNSIGNED_SHORT && (V = t.RGBA16UI), M === t.UNSIGNED_INT && (V = t.RGBA32UI), M === t.BYTE && (V = t.RGBA8I), M === t.SHORT && (V = t.RGBA16I), M === t.INT && (V = t.RGBA32I)), f === t.RGB && (M === t.UNSIGNED_INT_5_9_9_9_REV && (V = t.RGB9_E5), M === t.UNSIGNED_INT_10F_11F_11F_REV && (V = t.R11F_G11F_B10F)), f === t.RGBA) {
|
|
36312
36313
|
const SA = eA ? on : se.getTransfer(W);
|
|
36313
|
-
M === t.FLOAT && (
|
|
36314
|
+
M === t.FLOAT && (V = t.RGBA32F), M === t.HALF_FLOAT && (V = t.RGBA16F), M === t.UNSIGNED_BYTE && (V = SA === fe ? t.SRGB8_ALPHA8 : t.RGBA8), M === t.UNSIGNED_SHORT_4_4_4_4 && (V = t.RGBA4), M === t.UNSIGNED_SHORT_5_5_5_1 && (V = t.RGB5_A1);
|
|
36314
36315
|
}
|
|
36315
|
-
return (
|
|
36316
|
+
return (V === t.R16F || V === t.R32F || V === t.RG16F || V === t.RG32F || V === t.RGBA16F || V === t.RGBA32F) && A.get("EXT_color_buffer_float"), V;
|
|
36316
36317
|
}
|
|
36317
36318
|
function x(b, f) {
|
|
36318
36319
|
let M;
|
|
36319
36320
|
return b ? f === null || f === _i || f === bC ? M = t.DEPTH24_STENCIL8 : f === ci ? M = t.DEPTH32F_STENCIL8 : f === yC && (M = t.DEPTH24_STENCIL8, KA("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : f === null || f === _i || f === bC ? M = t.DEPTH_COMPONENT24 : f === ci ? M = t.DEPTH_COMPONENT32F : f === yC && (M = t.DEPTH_COMPONENT16), M;
|
|
36320
36321
|
}
|
|
36321
36322
|
function D(b, f) {
|
|
36322
|
-
return d(b) === !0 || b.isFramebufferTexture && b.minFilter !==
|
|
36323
|
+
return d(b) === !0 || b.isFramebufferTexture && b.minFilter !== It && b.minFilter !== nt ? Math.log2(Math.max(f.width, f.height)) + 1 : b.mipmaps !== void 0 && b.mipmaps.length > 0 ? b.mipmaps.length : b.isCompressedTexture && Array.isArray(b.image) ? f.mipmaps.length : 1;
|
|
36323
36324
|
}
|
|
36324
36325
|
function w(b) {
|
|
36325
36326
|
const f = b.target;
|
|
@@ -36367,8 +36368,8 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36367
36368
|
}
|
|
36368
36369
|
const M = b.textures;
|
|
36369
36370
|
for (let W = 0, eA = M.length; W < eA; W++) {
|
|
36370
|
-
const
|
|
36371
|
-
|
|
36371
|
+
const V = i.get(M[W]);
|
|
36372
|
+
V.__webglTexture && (t.deleteTexture(V.__webglTexture), C.memory.textures--), i.remove(M[W]);
|
|
36372
36373
|
}
|
|
36373
36374
|
i.remove(b);
|
|
36374
36375
|
}
|
|
@@ -36428,10 +36429,10 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36428
36429
|
[Hi]: t.CLAMP_TO_EDGE,
|
|
36429
36430
|
[Ws]: t.MIRRORED_REPEAT
|
|
36430
36431
|
}, sA = {
|
|
36431
|
-
[
|
|
36432
|
+
[It]: t.NEAREST,
|
|
36432
36433
|
[vD]: t.NEAREST_MIPMAP_NEAREST,
|
|
36433
36434
|
[eo]: t.NEAREST_MIPMAP_LINEAR,
|
|
36434
|
-
[
|
|
36435
|
+
[nt]: t.LINEAR,
|
|
36435
36436
|
[da]: t.LINEAR_MIPMAP_NEAREST,
|
|
36436
36437
|
[Yg]: t.LINEAR_MIPMAP_LINEAR
|
|
36437
36438
|
}, xA = {
|
|
@@ -36444,9 +36445,9 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36444
36445
|
[PD]: t.GREATER,
|
|
36445
36446
|
[OD]: t.NOTEQUAL
|
|
36446
36447
|
};
|
|
36447
|
-
function
|
|
36448
|
-
if (f.type === ci && A.has("OES_texture_float_linear") === !1 && (f.magFilter ===
|
|
36449
|
-
if (f.magFilter ===
|
|
36448
|
+
function TA(b, f) {
|
|
36449
|
+
if (f.type === ci && A.has("OES_texture_float_linear") === !1 && (f.magFilter === nt || f.magFilter === da || f.magFilter === eo || f.magFilter === Yg || f.minFilter === nt || f.minFilter === da || f.minFilter === eo || f.minFilter === Yg) && KA("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), t.texParameteri(b, t.TEXTURE_WRAP_S, hA[f.wrapS]), t.texParameteri(b, t.TEXTURE_WRAP_T, hA[f.wrapT]), (b === t.TEXTURE_3D || b === t.TEXTURE_2D_ARRAY) && t.texParameteri(b, t.TEXTURE_WRAP_R, hA[f.wrapR]), t.texParameteri(b, t.TEXTURE_MAG_FILTER, sA[f.magFilter]), t.texParameteri(b, t.TEXTURE_MIN_FILTER, sA[f.minFilter]), f.compareFunction && (t.texParameteri(b, t.TEXTURE_COMPARE_MODE, t.COMPARE_REF_TO_TEXTURE), t.texParameteri(b, t.TEXTURE_COMPARE_FUNC, xA[f.compareFunction])), A.has("EXT_texture_filter_anisotropic") === !0) {
|
|
36450
|
+
if (f.magFilter === It || f.minFilter !== eo && f.minFilter !== Yg || f.type === ci && A.has("OES_texture_float_linear") === !1) return;
|
|
36450
36451
|
if (f.anisotropy > 1 || i.get(f).__currentAnisotropy) {
|
|
36451
36452
|
const M = A.get("EXT_texture_filter_anisotropic");
|
|
36452
36453
|
t.texParameterf(b, M.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(f.anisotropy, g.getMaxAnisotropy())), i.get(f).__currentAnisotropy = f.anisotropy;
|
|
@@ -36459,14 +36460,14 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36459
36460
|
const W = f.source;
|
|
36460
36461
|
let eA = r.get(W);
|
|
36461
36462
|
eA === void 0 && (eA = {}, r.set(W, eA));
|
|
36462
|
-
const
|
|
36463
|
-
if (
|
|
36464
|
-
eA[
|
|
36463
|
+
const V = H(f);
|
|
36464
|
+
if (V !== b.__cacheKey) {
|
|
36465
|
+
eA[V] === void 0 && (eA[V] = {
|
|
36465
36466
|
texture: t.createTexture(),
|
|
36466
36467
|
usedTimes: 0
|
|
36467
|
-
}, C.memory.textures++, M = !0), eA[
|
|
36468
|
+
}, C.memory.textures++, M = !0), eA[V].usedTimes++;
|
|
36468
36469
|
const SA = eA[b.__cacheKey];
|
|
36469
|
-
SA !== void 0 && (eA[b.__cacheKey].usedTimes--, SA.usedTimes === 0 && l(f)), b.__cacheKey =
|
|
36470
|
+
SA !== void 0 && (eA[b.__cacheKey].usedTimes--, SA.usedTimes === 0 && l(f)), b.__cacheKey = V, b.__webglTexture = eA[V].texture;
|
|
36470
36471
|
}
|
|
36471
36472
|
return M;
|
|
36472
36473
|
}
|
|
@@ -36474,24 +36475,24 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36474
36475
|
return Math.floor(Math.floor(b / M) / f);
|
|
36475
36476
|
}
|
|
36476
36477
|
function De(b, f, M, W) {
|
|
36477
|
-
const
|
|
36478
|
-
if (
|
|
36478
|
+
const V = b.updateRanges;
|
|
36479
|
+
if (V.length === 0)
|
|
36479
36480
|
e.texSubImage2D(t.TEXTURE_2D, 0, 0, 0, f.width, f.height, M, W, f.data);
|
|
36480
36481
|
else {
|
|
36481
|
-
|
|
36482
|
+
V.sort((IA, EA) => IA.start - EA.start);
|
|
36482
36483
|
let SA = 0;
|
|
36483
|
-
for (let IA = 1; IA <
|
|
36484
|
-
const EA =
|
|
36484
|
+
for (let IA = 1; IA < V.length; IA++) {
|
|
36485
|
+
const EA = V[SA], mA = V[IA], kA = EA.start + EA.count, BA = Se(mA.start, f.width, 4), jA = Se(EA.start, f.width, 4);
|
|
36485
36486
|
mA.start <= kA + 1 && BA === jA && Se(mA.start + mA.count - 1, f.width, 4) === BA ? EA.count = Math.max(
|
|
36486
36487
|
EA.count,
|
|
36487
36488
|
mA.start + mA.count - EA.start
|
|
36488
|
-
) : (++SA,
|
|
36489
|
+
) : (++SA, V[SA] = mA);
|
|
36489
36490
|
}
|
|
36490
|
-
|
|
36491
|
+
V.length = SA + 1;
|
|
36491
36492
|
const rA = t.getParameter(t.UNPACK_ROW_LENGTH), bA = t.getParameter(t.UNPACK_SKIP_PIXELS), UA = t.getParameter(t.UNPACK_SKIP_ROWS);
|
|
36492
36493
|
t.pixelStorei(t.UNPACK_ROW_LENGTH, f.width);
|
|
36493
|
-
for (let IA = 0, EA =
|
|
36494
|
-
const mA =
|
|
36494
|
+
for (let IA = 0, EA = V.length; IA < EA; IA++) {
|
|
36495
|
+
const mA = V[IA], kA = Math.floor(mA.start / 4), BA = Math.ceil(mA.count / 4), jA = kA % f.width, G = Math.floor(kA / f.width), uA = BA, oA = 1;
|
|
36495
36496
|
t.pixelStorei(t.UNPACK_SKIP_PIXELS, jA), t.pixelStorei(t.UNPACK_SKIP_ROWS, G), e.texSubImage2D(t.TEXTURE_2D, 0, jA, G, uA, oA, M, W, f.data);
|
|
36496
36497
|
}
|
|
36497
36498
|
b.clearUpdateRanges(), t.pixelStorei(t.UNPACK_ROW_LENGTH, rA), t.pixelStorei(t.UNPACK_SKIP_PIXELS, bA), t.pixelStorei(t.UNPACK_SKIP_ROWS, UA);
|
|
@@ -36500,10 +36501,10 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36500
36501
|
function X(b, f, M) {
|
|
36501
36502
|
let W = t.TEXTURE_2D;
|
|
36502
36503
|
(f.isDataArrayTexture || f.isCompressedArrayTexture) && (W = t.TEXTURE_2D_ARRAY), f.isData3DTexture && (W = t.TEXTURE_3D);
|
|
36503
|
-
const eA = JA(b, f),
|
|
36504
|
+
const eA = JA(b, f), V = f.source;
|
|
36504
36505
|
e.bindTexture(W, b.__webglTexture, t.TEXTURE0 + M);
|
|
36505
|
-
const SA = i.get(
|
|
36506
|
-
if (
|
|
36506
|
+
const SA = i.get(V);
|
|
36507
|
+
if (V.version !== SA.__version || eA === !0) {
|
|
36507
36508
|
e.activeTexture(t.TEXTURE0 + M);
|
|
36508
36509
|
const rA = se.getPrimaries(se.workingColorSpace), bA = f.colorSpace === Eg ? null : se.getPrimaries(f.colorSpace), UA = f.colorSpace === Eg || rA === bA ? t.NONE : t.BROWSER_DEFAULT_WEBGL;
|
|
36509
36510
|
t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, f.flipY), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, f.premultiplyAlpha), t.pixelStorei(t.UNPACK_ALIGNMENT, f.unpackAlignment), t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL, UA);
|
|
@@ -36511,9 +36512,9 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36511
36512
|
IA = be(f, IA);
|
|
36512
36513
|
const EA = I.convert(f.format, f.colorSpace), mA = I.convert(f.type);
|
|
36513
36514
|
let kA = _(f.internalFormat, EA, mA, f.colorSpace, f.isVideoTexture);
|
|
36514
|
-
|
|
36515
|
+
TA(W, f);
|
|
36515
36516
|
let BA;
|
|
36516
|
-
const jA = f.mipmaps, G = f.isVideoTexture !== !0, uA = SA.__version === void 0 || eA === !0, oA =
|
|
36517
|
+
const jA = f.mipmaps, G = f.isVideoTexture !== !0, uA = SA.__version === void 0 || eA === !0, oA = V.dataReady, fA = D(f, IA);
|
|
36517
36518
|
if (f.isDepthTexture)
|
|
36518
36519
|
kA = x(f.format === Tg, f.type), uA && (G ? e.texStorage2D(t.TEXTURE_2D, 1, kA, IA.width, IA.height) : e.texImage2D(t.TEXTURE_2D, 0, kA, IA.width, IA.height, 0, EA, mA, null));
|
|
36519
36520
|
else if (f.isDataTexture)
|
|
@@ -36599,7 +36600,7 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36599
36600
|
oA && e.texSubImage2D(t.TEXTURE_2D, 0, 0, 0, EA, mA, IA);
|
|
36600
36601
|
} else
|
|
36601
36602
|
e.texImage2D(t.TEXTURE_2D, 0, kA, EA, mA, IA);
|
|
36602
|
-
d(f) && E(W), SA.__version =
|
|
36603
|
+
d(f) && E(W), SA.__version = V.version, f.onUpdate && f.onUpdate(f);
|
|
36603
36604
|
}
|
|
36604
36605
|
b.__version = f.version;
|
|
36605
36606
|
}
|
|
@@ -36607,17 +36608,17 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36607
36608
|
if (f.image.length !== 6) return;
|
|
36608
36609
|
const W = JA(b, f), eA = f.source;
|
|
36609
36610
|
e.bindTexture(t.TEXTURE_CUBE_MAP, b.__webglTexture, t.TEXTURE0 + M);
|
|
36610
|
-
const
|
|
36611
|
-
if (eA.version !==
|
|
36611
|
+
const V = i.get(eA);
|
|
36612
|
+
if (eA.version !== V.__version || W === !0) {
|
|
36612
36613
|
e.activeTexture(t.TEXTURE0 + M);
|
|
36613
36614
|
const SA = se.getPrimaries(se.workingColorSpace), rA = f.colorSpace === Eg ? null : se.getPrimaries(f.colorSpace), bA = f.colorSpace === Eg || SA === rA ? t.NONE : t.BROWSER_DEFAULT_WEBGL;
|
|
36614
36615
|
t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, f.flipY), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, f.premultiplyAlpha), t.pixelStorei(t.UNPACK_ALIGNMENT, f.unpackAlignment), t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL, bA);
|
|
36615
36616
|
const UA = f.isCompressedTexture || f.image[0].isCompressedTexture, IA = f.image[0] && f.image[0].isDataTexture, EA = [];
|
|
36616
36617
|
for (let z = 0; z < 6; z++)
|
|
36617
36618
|
!UA && !IA ? EA[z] = c(f.image[z], !0, g.maxCubemapSize) : EA[z] = IA ? f.image[z].image : f.image[z], EA[z] = be(f, EA[z]);
|
|
36618
|
-
const mA = EA[0], kA = I.convert(f.format, f.colorSpace), BA = I.convert(f.type), jA = _(f.internalFormat, kA, BA, f.colorSpace), G = f.isVideoTexture !== !0, uA =
|
|
36619
|
+
const mA = EA[0], kA = I.convert(f.format, f.colorSpace), BA = I.convert(f.type), jA = _(f.internalFormat, kA, BA, f.colorSpace), G = f.isVideoTexture !== !0, uA = V.__version === void 0 || W === !0, oA = eA.dataReady;
|
|
36619
36620
|
let fA = D(f, mA);
|
|
36620
|
-
|
|
36621
|
+
TA(t.TEXTURE_CUBE_MAP, f);
|
|
36621
36622
|
let gA;
|
|
36622
36623
|
if (UA) {
|
|
36623
36624
|
G && uA && e.texStorage2D(t.TEXTURE_CUBE_MAP, fA, jA, mA.width, mA.height);
|
|
@@ -36649,26 +36650,26 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36649
36650
|
}
|
|
36650
36651
|
}
|
|
36651
36652
|
}
|
|
36652
|
-
d(f) && E(t.TEXTURE_CUBE_MAP),
|
|
36653
|
+
d(f) && E(t.TEXTURE_CUBE_MAP), V.__version = eA.version, f.onUpdate && f.onUpdate(f);
|
|
36653
36654
|
}
|
|
36654
36655
|
b.__version = f.version;
|
|
36655
36656
|
}
|
|
36656
|
-
function pA(b, f, M, W, eA,
|
|
36657
|
+
function pA(b, f, M, W, eA, V) {
|
|
36657
36658
|
const SA = I.convert(M.format, M.colorSpace), rA = I.convert(M.type), bA = _(M.internalFormat, SA, rA, M.colorSpace), UA = i.get(f), IA = i.get(M);
|
|
36658
36659
|
if (IA.__renderTarget = f, !UA.__hasExternalTextures) {
|
|
36659
|
-
const EA = Math.max(1, f.width >>
|
|
36660
|
-
eA === t.TEXTURE_3D || eA === t.TEXTURE_2D_ARRAY ? e.texImage3D(eA,
|
|
36660
|
+
const EA = Math.max(1, f.width >> V), mA = Math.max(1, f.height >> V);
|
|
36661
|
+
eA === t.TEXTURE_3D || eA === t.TEXTURE_2D_ARRAY ? e.texImage3D(eA, V, bA, EA, mA, f.depth, 0, SA, rA, null) : e.texImage2D(eA, V, bA, EA, mA, 0, SA, rA, null);
|
|
36661
36662
|
}
|
|
36662
|
-
e.bindFramebuffer(t.FRAMEBUFFER, b), qe(f) ? o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER, W, eA, IA.__webglTexture, 0, R(f)) : (eA === t.TEXTURE_2D || eA >= t.TEXTURE_CUBE_MAP_POSITIVE_X && eA <= t.TEXTURE_CUBE_MAP_NEGATIVE_Z) && t.framebufferTexture2D(t.FRAMEBUFFER, W, eA, IA.__webglTexture,
|
|
36663
|
+
e.bindFramebuffer(t.FRAMEBUFFER, b), qe(f) ? o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER, W, eA, IA.__webglTexture, 0, R(f)) : (eA === t.TEXTURE_2D || eA >= t.TEXTURE_CUBE_MAP_POSITIVE_X && eA <= t.TEXTURE_CUBE_MAP_NEGATIVE_Z) && t.framebufferTexture2D(t.FRAMEBUFFER, W, eA, IA.__webglTexture, V), e.bindFramebuffer(t.FRAMEBUFFER, null);
|
|
36663
36664
|
}
|
|
36664
36665
|
function qA(b, f, M) {
|
|
36665
36666
|
if (t.bindRenderbuffer(t.RENDERBUFFER, b), f.depthBuffer) {
|
|
36666
|
-
const W = f.depthTexture, eA = W && W.isDepthTexture ? W.type : null,
|
|
36667
|
-
qe(f) ? o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER, R(f),
|
|
36667
|
+
const W = f.depthTexture, eA = W && W.isDepthTexture ? W.type : null, V = x(f.stencilBuffer, eA), SA = f.stencilBuffer ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT;
|
|
36668
|
+
qe(f) ? o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER, R(f), V, f.width, f.height) : M ? t.renderbufferStorageMultisample(t.RENDERBUFFER, R(f), V, f.width, f.height) : t.renderbufferStorage(t.RENDERBUFFER, V, f.width, f.height), t.framebufferRenderbuffer(t.FRAMEBUFFER, SA, t.RENDERBUFFER, b);
|
|
36668
36669
|
} else {
|
|
36669
36670
|
const W = f.textures;
|
|
36670
36671
|
for (let eA = 0; eA < W.length; eA++) {
|
|
36671
|
-
const
|
|
36672
|
+
const V = W[eA], SA = I.convert(V.format, V.colorSpace), rA = I.convert(V.type), bA = _(V.internalFormat, SA, rA, V.colorSpace);
|
|
36672
36673
|
qe(f) ? o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER, R(f), bA, f.width, f.height) : M ? t.renderbufferStorageMultisample(t.RENDERBUFFER, R(f), bA, f.width, f.height) : t.renderbufferStorage(t.RENDERBUFFER, bA, f.width, f.height);
|
|
36673
36674
|
}
|
|
36674
36675
|
}
|
|
@@ -36681,7 +36682,7 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36681
36682
|
const eA = i.get(f.depthTexture);
|
|
36682
36683
|
if (eA.__renderTarget = f, (!eA.__webglTexture || f.depthTexture.image.width !== f.width || f.depthTexture.image.height !== f.height) && (f.depthTexture.image.width = f.width, f.depthTexture.image.height = f.height, f.depthTexture.needsUpdate = !0), W) {
|
|
36683
36684
|
if (eA.__webglInit === void 0 && (eA.__webglInit = !0, f.depthTexture.addEventListener("dispose", w)), eA.__webglTexture === void 0) {
|
|
36684
|
-
eA.__webglTexture = t.createTexture(), e.bindTexture(t.TEXTURE_CUBE_MAP, eA.__webglTexture),
|
|
36685
|
+
eA.__webglTexture = t.createTexture(), e.bindTexture(t.TEXTURE_CUBE_MAP, eA.__webglTexture), TA(t.TEXTURE_CUBE_MAP, f.depthTexture);
|
|
36685
36686
|
const UA = I.convert(f.depthTexture.format), IA = I.convert(f.depthTexture.type);
|
|
36686
36687
|
let EA;
|
|
36687
36688
|
f.depthTexture.format === Xi ? EA = t.DEPTH_COMPONENT24 : f.depthTexture.format === Tg && (EA = t.DEPTH24_STENCIL8);
|
|
@@ -36690,11 +36691,11 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36690
36691
|
}
|
|
36691
36692
|
} else
|
|
36692
36693
|
j(f.depthTexture, 0);
|
|
36693
|
-
const
|
|
36694
|
+
const V = eA.__webglTexture, SA = R(f), rA = W ? t.TEXTURE_CUBE_MAP_POSITIVE_X + M : t.TEXTURE_2D, bA = f.depthTexture.format === Tg ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT;
|
|
36694
36695
|
if (f.depthTexture.format === Xi)
|
|
36695
|
-
qe(f) ? o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER, bA, rA,
|
|
36696
|
+
qe(f) ? o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER, bA, rA, V, 0, SA) : t.framebufferTexture2D(t.FRAMEBUFFER, bA, rA, V, 0);
|
|
36696
36697
|
else if (f.depthTexture.format === Tg)
|
|
36697
|
-
qe(f) ? o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER, bA, rA,
|
|
36698
|
+
qe(f) ? o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER, bA, rA, V, 0, SA) : t.framebufferTexture2D(t.FRAMEBUFFER, bA, rA, V, 0);
|
|
36698
36699
|
else
|
|
36699
36700
|
throw new Error("Unknown depthTexture format");
|
|
36700
36701
|
}
|
|
@@ -36724,16 +36725,16 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36724
36725
|
if (e.bindFramebuffer(t.FRAMEBUFFER, f.__webglFramebuffer[W]), f.__webglDepthbuffer[W] === void 0)
|
|
36725
36726
|
f.__webglDepthbuffer[W] = t.createRenderbuffer(), qA(f.__webglDepthbuffer[W], b, !1);
|
|
36726
36727
|
else {
|
|
36727
|
-
const eA = b.stencilBuffer ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT,
|
|
36728
|
-
t.bindRenderbuffer(t.RENDERBUFFER,
|
|
36728
|
+
const eA = b.stencilBuffer ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT, V = f.__webglDepthbuffer[W];
|
|
36729
|
+
t.bindRenderbuffer(t.RENDERBUFFER, V), t.framebufferRenderbuffer(t.FRAMEBUFFER, eA, t.RENDERBUFFER, V);
|
|
36729
36730
|
}
|
|
36730
36731
|
} else {
|
|
36731
36732
|
const W = b.texture.mipmaps;
|
|
36732
36733
|
if (W && W.length > 0 ? e.bindFramebuffer(t.FRAMEBUFFER, f.__webglFramebuffer[0]) : e.bindFramebuffer(t.FRAMEBUFFER, f.__webglFramebuffer), f.__webglDepthbuffer === void 0)
|
|
36733
36734
|
f.__webglDepthbuffer = t.createRenderbuffer(), qA(f.__webglDepthbuffer, b, !1);
|
|
36734
36735
|
else {
|
|
36735
|
-
const eA = b.stencilBuffer ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT,
|
|
36736
|
-
t.bindRenderbuffer(t.RENDERBUFFER,
|
|
36736
|
+
const eA = b.stencilBuffer ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT, V = f.__webglDepthbuffer;
|
|
36737
|
+
t.bindRenderbuffer(t.RENDERBUFFER, V), t.framebufferRenderbuffer(t.FRAMEBUFFER, eA, t.RENDERBUFFER, V);
|
|
36737
36738
|
}
|
|
36738
36739
|
}
|
|
36739
36740
|
e.bindFramebuffer(t.FRAMEBUFFER, null);
|
|
@@ -36745,8 +36746,8 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36745
36746
|
function ae(b) {
|
|
36746
36747
|
const f = b.texture, M = i.get(b), W = i.get(f);
|
|
36747
36748
|
b.addEventListener("dispose", y);
|
|
36748
|
-
const eA = b.textures,
|
|
36749
|
-
if (SA || (W.__webglTexture === void 0 && (W.__webglTexture = t.createTexture()), W.__version = f.version, C.memory.textures++),
|
|
36749
|
+
const eA = b.textures, V = b.isWebGLCubeRenderTarget === !0, SA = eA.length > 1;
|
|
36750
|
+
if (SA || (W.__webglTexture === void 0 && (W.__webglTexture = t.createTexture()), W.__version = f.version, C.memory.textures++), V) {
|
|
36750
36751
|
M.__webglFramebuffer = [];
|
|
36751
36752
|
for (let rA = 0; rA < 6; rA++)
|
|
36752
36753
|
if (f.mipmaps && f.mipmaps.length > 0) {
|
|
@@ -36778,8 +36779,8 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36778
36779
|
t.bindRenderbuffer(t.RENDERBUFFER, null), b.depthBuffer && (M.__webglDepthRenderbuffer = t.createRenderbuffer(), qA(M.__webglDepthRenderbuffer, b, !0)), e.bindFramebuffer(t.FRAMEBUFFER, null);
|
|
36779
36780
|
}
|
|
36780
36781
|
}
|
|
36781
|
-
if (
|
|
36782
|
-
e.bindTexture(t.TEXTURE_CUBE_MAP, W.__webglTexture),
|
|
36782
|
+
if (V) {
|
|
36783
|
+
e.bindTexture(t.TEXTURE_CUBE_MAP, W.__webglTexture), TA(t.TEXTURE_CUBE_MAP, f);
|
|
36783
36784
|
for (let rA = 0; rA < 6; rA++)
|
|
36784
36785
|
if (f.mipmaps && f.mipmaps.length > 0)
|
|
36785
36786
|
for (let bA = 0; bA < f.mipmaps.length; bA++)
|
|
@@ -36791,12 +36792,12 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36791
36792
|
for (let rA = 0, bA = eA.length; rA < bA; rA++) {
|
|
36792
36793
|
const UA = eA[rA], IA = i.get(UA);
|
|
36793
36794
|
let EA = t.TEXTURE_2D;
|
|
36794
|
-
(b.isWebGL3DRenderTarget || b.isWebGLArrayRenderTarget) && (EA = b.isWebGL3DRenderTarget ? t.TEXTURE_3D : t.TEXTURE_2D_ARRAY), e.bindTexture(EA, IA.__webglTexture),
|
|
36795
|
+
(b.isWebGL3DRenderTarget || b.isWebGLArrayRenderTarget) && (EA = b.isWebGL3DRenderTarget ? t.TEXTURE_3D : t.TEXTURE_2D_ARRAY), e.bindTexture(EA, IA.__webglTexture), TA(EA, UA), pA(M.__webglFramebuffer, b, UA, t.COLOR_ATTACHMENT0 + rA, EA, 0), d(UA) && E(EA);
|
|
36795
36796
|
}
|
|
36796
36797
|
e.unbindTexture();
|
|
36797
36798
|
} else {
|
|
36798
36799
|
let rA = t.TEXTURE_2D;
|
|
36799
|
-
if ((b.isWebGL3DRenderTarget || b.isWebGLArrayRenderTarget) && (rA = b.isWebGL3DRenderTarget ? t.TEXTURE_3D : t.TEXTURE_2D_ARRAY), e.bindTexture(rA, W.__webglTexture),
|
|
36800
|
+
if ((b.isWebGL3DRenderTarget || b.isWebGLArrayRenderTarget) && (rA = b.isWebGL3DRenderTarget ? t.TEXTURE_3D : t.TEXTURE_2D_ARRAY), e.bindTexture(rA, W.__webglTexture), TA(rA, f), f.mipmaps && f.mipmaps.length > 0)
|
|
36800
36801
|
for (let bA = 0; bA < f.mipmaps.length; bA++)
|
|
36801
36802
|
pA(M.__webglFramebuffer[bA], b, f, t.COLOR_ATTACHMENT0, rA, bA);
|
|
36802
36803
|
else
|
|
@@ -36810,8 +36811,8 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36810
36811
|
for (let M = 0, W = f.length; M < W; M++) {
|
|
36811
36812
|
const eA = f[M];
|
|
36812
36813
|
if (d(eA)) {
|
|
36813
|
-
const
|
|
36814
|
-
e.bindTexture(
|
|
36814
|
+
const V = u(b), SA = i.get(eA).__webglTexture;
|
|
36815
|
+
e.bindTexture(V, SA), E(V), e.unbindTexture();
|
|
36815
36816
|
}
|
|
36816
36817
|
}
|
|
36817
36818
|
}
|
|
@@ -36821,7 +36822,7 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36821
36822
|
if (qe(b) === !1) {
|
|
36822
36823
|
const f = b.textures, M = b.width, W = b.height;
|
|
36823
36824
|
let eA = t.COLOR_BUFFER_BIT;
|
|
36824
|
-
const
|
|
36825
|
+
const V = b.stencilBuffer ? t.DEPTH_STENCIL_ATTACHMENT : t.DEPTH_ATTACHMENT, SA = i.get(b), rA = f.length > 1;
|
|
36825
36826
|
if (rA)
|
|
36826
36827
|
for (let UA = 0; UA < f.length; UA++)
|
|
36827
36828
|
e.bindFramebuffer(t.FRAMEBUFFER, SA.__webglMultisampledFramebuffer), t.framebufferRenderbuffer(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0 + UA, t.RENDERBUFFER, null), e.bindFramebuffer(t.FRAMEBUFFER, SA.__webglFramebuffer), t.framebufferTexture2D(t.DRAW_FRAMEBUFFER, t.COLOR_ATTACHMENT0 + UA, t.TEXTURE_2D, null, 0);
|
|
@@ -36834,7 +36835,7 @@ function dy(t, A, e, i, g, I, C) {
|
|
|
36834
36835
|
const IA = i.get(f[UA]).__webglTexture;
|
|
36835
36836
|
t.framebufferTexture2D(t.DRAW_FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, IA, 0);
|
|
36836
36837
|
}
|
|
36837
|
-
t.blitFramebuffer(0, 0, M, W, 0, 0, M, W, eA, t.NEAREST), n === !0 && (we.length = 0, VA.length = 0, we.push(t.COLOR_ATTACHMENT0 + UA), b.depthBuffer && b.resolveDepthBuffer === !1 && (we.push(
|
|
36838
|
+
t.blitFramebuffer(0, 0, M, W, 0, 0, M, W, eA, t.NEAREST), n === !0 && (we.length = 0, VA.length = 0, we.push(t.COLOR_ATTACHMENT0 + UA), b.depthBuffer && b.resolveDepthBuffer === !1 && (we.push(V), VA.push(V), t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER, VA)), t.invalidateFramebuffer(t.READ_FRAMEBUFFER, we));
|
|
36838
36839
|
}
|
|
36839
36840
|
if (e.bindFramebuffer(t.READ_FRAMEBUFFER, null), e.bindFramebuffer(t.DRAW_FRAMEBUFFER, null), rA)
|
|
36840
36841
|
for (let UA = 0; UA < f.length; UA++) {
|
|
@@ -37214,9 +37215,9 @@ class fy extends qI {
|
|
|
37214
37215
|
xA(F, qA);
|
|
37215
37216
|
for (let re = 0; re < yA.length; re++)
|
|
37216
37217
|
xA(yA[re], qA);
|
|
37217
|
-
yA.length === 2 ? sA(F, l, p) : F.projectionMatrix.copy(l.projectionMatrix),
|
|
37218
|
+
yA.length === 2 ? sA(F, l, p) : F.projectionMatrix.copy(l.projectionMatrix), TA(X, F, qA);
|
|
37218
37219
|
};
|
|
37219
|
-
function
|
|
37220
|
+
function TA(X, iA, pA) {
|
|
37220
37221
|
pA === null ? X.matrix.copy(iA.matrixWorld) : (X.matrix.copy(pA.matrixWorld), X.matrix.invert(), X.matrix.multiply(iA.matrixWorld)), X.matrix.decompose(X.position, X.quaternion, X.scale), X.updateMatrixWorld(!0), X.projectionMatrix.copy(iA.projectionMatrix), X.projectionMatrixInverse.copy(iA.projectionMatrixInverse), X.isPerspectiveCamera && (X.fov = bQ * 2 * Math.atan(1 / X.projectionMatrix.elements[5]), X.zoom = 1);
|
|
37221
37222
|
}
|
|
37222
37223
|
this.getCamera = function() {
|
|
@@ -37960,7 +37961,7 @@ const wy = new Uint16Array([
|
|
|
37960
37961
|
]);
|
|
37961
37962
|
let ni = null;
|
|
37962
37963
|
function my() {
|
|
37963
|
-
return ni === null && (ni = new D2(wy, 16, 16, KI, Wi), ni.name = "DFG_LUT", ni.minFilter =
|
|
37964
|
+
return ni === null && (ni = new D2(wy, 16, 16, KI, Wi), ni.name = "DFG_LUT", ni.minFilter = nt, ni.magFilter = nt, ni.wrapS = Hi, ni.wrapT = Hi, ni.generateMipmaps = !1, ni.needsUpdate = !0), ni;
|
|
37964
37965
|
}
|
|
37965
37966
|
class yy {
|
|
37966
37967
|
/**
|
|
@@ -38025,8 +38026,8 @@ class yy {
|
|
|
38025
38026
|
const q = new Ye(), P = new Ye();
|
|
38026
38027
|
let Z = null;
|
|
38027
38028
|
const hA = new ne(0);
|
|
38028
|
-
let sA = 0, xA = e.width,
|
|
38029
|
-
const X = new Ye(0, 0, xA,
|
|
38029
|
+
let sA = 0, xA = e.width, TA = e.height, JA = 1, Se = null, De = null;
|
|
38030
|
+
const X = new Ye(0, 0, xA, TA), iA = new Ye(0, 0, xA, TA);
|
|
38030
38031
|
let pA = !1;
|
|
38031
38032
|
const qA = new ih();
|
|
38032
38033
|
let yA = !1, re = !1;
|
|
@@ -38058,9 +38059,9 @@ class yy {
|
|
|
38058
38059
|
} catch (m) {
|
|
38059
38060
|
throw Ee("WebGLRenderer: " + m.message), m;
|
|
38060
38061
|
}
|
|
38061
|
-
let he, be, NA, b, f, M, W, eA,
|
|
38062
|
+
let he, be, NA, b, f, M, W, eA, V, SA, rA, bA, UA, IA, EA, mA, kA, BA, jA, G, uA, oA, fA, gA;
|
|
38062
38063
|
function z() {
|
|
38063
|
-
he = new mw(R), he.init(), oA = new hy(R, he), be = new hw(R, he, A, oA), NA = new cy(R, he), be.reversedDepthBuffer && r && NA.buffers.depth.setReversed(!0), b = new Nw(R), f = new Ay(), M = new dy(R, he, NA, f, be, oA, b), W = new xw(l), eA = new ww(l),
|
|
38064
|
+
he = new mw(R), he.init(), oA = new hy(R, he), be = new hw(R, he, A, oA), NA = new cy(R, he), be.reversedDepthBuffer && r && NA.buffers.depth.setReversed(!0), b = new Nw(R), f = new Ay(), M = new dy(R, he, NA, f, be, oA, b), W = new xw(l), eA = new ww(l), V = new G2(R), fA = new cw(R, V), SA = new yw(R, V, b, fA), rA = new Sw(R, SA, V, b), jA = new kw(R, be, M), mA = new lw(f), bA = new $m(l, W, eA, he, be, fA, mA), UA = new _y(l, f), IA = new ty(), EA = new ny(he), BA = new Ew(l, W, eA, NA, rA, h, n), kA = new By(l, rA, be), gA = new py(R, b, be, NA), G = new dw(R, he, b), uA = new bw(R, he, b), b.programs = bA.programs, l.capabilities = be, l.extensions = he, l.properties = f, l.renderLists = IA, l.shadowMap = kA, l.state = NA, l.info = b;
|
|
38064
38065
|
}
|
|
38065
38066
|
z(), c !== Yt && (S = new Gw(c, e.width, e.height, g, I));
|
|
38066
38067
|
const QA = new fy(l, R);
|
|
@@ -38077,19 +38078,19 @@ class yy {
|
|
|
38077
38078
|
}, this.getPixelRatio = function() {
|
|
38078
38079
|
return JA;
|
|
38079
38080
|
}, this.setPixelRatio = function(m) {
|
|
38080
|
-
m !== void 0 && (JA = m, this.setSize(xA,
|
|
38081
|
+
m !== void 0 && (JA = m, this.setSize(xA, TA, !1));
|
|
38081
38082
|
}, this.getSize = function(m) {
|
|
38082
|
-
return m.set(xA,
|
|
38083
|
+
return m.set(xA, TA);
|
|
38083
38084
|
}, this.setSize = function(m, U, T = !0) {
|
|
38084
38085
|
if (QA.isPresenting) {
|
|
38085
38086
|
KA("WebGLRenderer: Can't change size while VR device is presenting.");
|
|
38086
38087
|
return;
|
|
38087
38088
|
}
|
|
38088
|
-
xA = m,
|
|
38089
|
+
xA = m, TA = U, e.width = Math.floor(m * JA), e.height = Math.floor(U * JA), T === !0 && (e.style.width = m + "px", e.style.height = U + "px"), S !== null && S.setSize(e.width, e.height), this.setViewport(0, 0, m, U);
|
|
38089
38090
|
}, this.getDrawingBufferSize = function(m) {
|
|
38090
|
-
return m.set(xA * JA,
|
|
38091
|
+
return m.set(xA * JA, TA * JA).floor();
|
|
38091
38092
|
}, this.setDrawingBufferSize = function(m, U, T) {
|
|
38092
|
-
xA = m,
|
|
38093
|
+
xA = m, TA = U, JA = T, e.width = Math.floor(m * T), e.height = Math.floor(U * T), this.setViewport(0, 0, m, U);
|
|
38093
38094
|
}, this.setEffects = function(m) {
|
|
38094
38095
|
if (c === Yt) {
|
|
38095
38096
|
console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");
|
|
@@ -38193,7 +38194,7 @@ class yy {
|
|
|
38193
38194
|
if (Fe < 0 || Fe === 1 / 0) return;
|
|
38194
38195
|
fA.setup(v, J, lA, T, wA);
|
|
38195
38196
|
let Ue, me = G;
|
|
38196
|
-
if (wA !== null && (Ue =
|
|
38197
|
+
if (wA !== null && (Ue = V.get(wA), me = uA, me.setIndex(Ue)), v.isMesh)
|
|
38197
38198
|
J.wireframe === !0 ? (NA.setLineWidth(J.wireframeLinewidth * Te()), me.setMode(R.LINES)) : me.setMode(R.TRIANGLES);
|
|
38198
38199
|
else if (v.isLine) {
|
|
38199
38200
|
let MA = J.linewidth;
|
|
@@ -38205,7 +38206,7 @@ class yy {
|
|
|
38205
38206
|
else if (he.get("WEBGL_multi_draw"))
|
|
38206
38207
|
me.renderMultiDraw(v._multiDrawStarts, v._multiDrawCounts, v._multiDrawCount);
|
|
38207
38208
|
else {
|
|
38208
|
-
const MA = v._multiDrawStarts, ue = v._multiDrawCounts, Be = v._multiDrawCount, mt = wA ?
|
|
38209
|
+
const MA = v._multiDrawStarts, ue = v._multiDrawCounts, Be = v._multiDrawCount, mt = wA ? V.get(wA).bytesPerElement : 1, tI = f.get(J).currentProgram.getUniforms();
|
|
38209
38210
|
for (let yt = 0; yt < Be; yt++)
|
|
38210
38211
|
tI.setValue(R, "_gl_DrawID", yt), me.render(MA[yt] / mt, ue[yt]);
|
|
38211
38212
|
}
|
|
@@ -38413,8 +38414,8 @@ class yy {
|
|
|
38413
38414
|
J.toneMapped && (L === null || L.isXRRenderTarget === !0) && (Fe = l.toneMapping);
|
|
38414
38415
|
const Ue = T.morphAttributes.position || T.morphAttributes.normal || T.morphAttributes.color, me = Ue !== void 0 ? Ue.length : 0, MA = f.get(J), ue = D.state.lights;
|
|
38415
38416
|
if (yA === !0 && (re === !0 || m !== j)) {
|
|
38416
|
-
const
|
|
38417
|
-
mA.setState(J, m,
|
|
38417
|
+
const st = m === j && J.id === H;
|
|
38418
|
+
mA.setState(J, m, st);
|
|
38418
38419
|
}
|
|
38419
38420
|
let Be = !1;
|
|
38420
38421
|
J.version === MA.__version ? (MA.needsLights && MA.lightsStateVersion !== ue.state.version || MA.outputColorSpace !== lA || v.isBatchedMesh && MA.batching === !1 || !v.isBatchedMesh && MA.batching === !0 || v.isBatchedMesh && MA.batchingColor === !0 && v.colorTexture === null || v.isBatchedMesh && MA.batchingColor === !1 && v.colorTexture !== null || v.isInstancedMesh && MA.instancing === !1 || !v.isInstancedMesh && MA.instancing === !0 || v.isSkinnedMesh && MA.skinning === !1 || !v.isSkinnedMesh && MA.skinning === !0 || v.isInstancedMesh && MA.instancingColor === !0 && v.instanceColor === null || v.isInstancedMesh && MA.instancingColor === !1 && v.instanceColor !== null || v.isInstancedMesh && MA.instancingMorph === !0 && v.morphTexture === null || v.isInstancedMesh && MA.instancingMorph === !1 && v.morphTexture !== null || MA.envMap !== wA || J.fog === !0 && MA.fog !== cA || MA.numClippingPlanes !== void 0 && (MA.numClippingPlanes !== mA.numPlanes || MA.numIntersection !== mA.numIntersection) || MA.vertexAlphas !== RA || MA.vertexTangents !== FA || MA.morphTargets !== GA || MA.morphNormals !== ZA || MA.morphColors !== _e || MA.toneMapping !== Fe || MA.morphTargetsCount !== me) && (Be = !0) : (Be = !0, MA.__version = J.version);
|
|
@@ -38433,15 +38434,15 @@ class yy {
|
|
|
38433
38434
|
}
|
|
38434
38435
|
if (MA.needsLights && (ue.state.directionalShadowMap.length > 0 && ke.setValue(R, "directionalShadowMap", ue.state.directionalShadowMap, M), ue.state.spotShadowMap.length > 0 && ke.setValue(R, "spotShadowMap", ue.state.spotShadowMap, M), ue.state.pointShadowMap.length > 0 && ke.setValue(R, "pointShadowMap", ue.state.pointShadowMap, M)), v.isSkinnedMesh) {
|
|
38435
38436
|
ke.setOptional(R, v, "bindMatrix"), ke.setOptional(R, v, "bindMatrixInverse");
|
|
38436
|
-
const
|
|
38437
|
-
|
|
38437
|
+
const st = v.skeleton;
|
|
38438
|
+
st && (st.boneTexture === null && st.computeBoneTexture(), ke.setValue(R, "boneTexture", st.boneTexture, M));
|
|
38438
38439
|
}
|
|
38439
38440
|
v.isBatchedMesh && (ke.setOptional(R, v, "batchingTexture"), ke.setValue(R, "batchingTexture", v._matricesTexture, M), ke.setOptional(R, v, "batchingIdTexture"), ke.setValue(R, "batchingIdTexture", v._indirectTexture, M), ke.setOptional(R, v, "batchingColorTexture"), v._colorsTexture !== null && ke.setValue(R, "batchingColorTexture", v._colorsTexture, M));
|
|
38440
38441
|
const Ut = T.morphAttributes;
|
|
38441
|
-
if ((Ut.position !== void 0 || Ut.normal !== void 0 || Ut.color !== void 0) && jA.update(v, T, mt), (yt || MA.receiveShadow !== v.receiveShadow) && (MA.receiveShadow = v.receiveShadow, ke.setValue(R, "receiveShadow", v.receiveShadow)), J.isMeshGouraudMaterial && J.envMap !== null && (dt.envMap.value = wA, dt.flipEnvMap.value = wA.isCubeTexture && wA.isRenderTargetTexture === !1 ? -1 : 1), J.isMeshStandardMaterial && J.envMap === null && U.environment !== null && (dt.envMapIntensity.value = U.environmentIntensity), dt.dfgLUT !== void 0 && (dt.dfgLUT.value = my()), yt && (ke.setValue(R, "toneMappingExposure", l.toneMappingExposure), MA.needsLights && Fh(dt, PI), cA && J.fog === !0 && UA.refreshFogUniforms(dt, cA), UA.refreshMaterialUniforms(dt, J, JA,
|
|
38442
|
-
const
|
|
38443
|
-
for (let ht = 0, Pn =
|
|
38444
|
-
const mg =
|
|
38442
|
+
if ((Ut.position !== void 0 || Ut.normal !== void 0 || Ut.color !== void 0) && jA.update(v, T, mt), (yt || MA.receiveShadow !== v.receiveShadow) && (MA.receiveShadow = v.receiveShadow, ke.setValue(R, "receiveShadow", v.receiveShadow)), J.isMeshGouraudMaterial && J.envMap !== null && (dt.envMap.value = wA, dt.flipEnvMap.value = wA.isCubeTexture && wA.isRenderTargetTexture === !1 ? -1 : 1), J.isMeshStandardMaterial && J.envMap === null && U.environment !== null && (dt.envMapIntensity.value = U.environmentIntensity), dt.dfgLUT !== void 0 && (dt.dfgLUT.value = my()), yt && (ke.setValue(R, "toneMappingExposure", l.toneMappingExposure), MA.needsLights && Fh(dt, PI), cA && J.fog === !0 && UA.refreshFogUniforms(dt, cA), UA.refreshMaterialUniforms(dt, J, JA, TA, D.state.transmissionRenderTarget[m.id]), To.upload(R, Lr(MA), dt, M)), J.isShaderMaterial && J.uniformsNeedUpdate === !0 && (To.upload(R, Lr(MA), dt, M), J.uniformsNeedUpdate = !1), J.isSpriteMaterial && ke.setValue(R, "center", v.center), ke.setValue(R, "modelViewMatrix", v.modelViewMatrix), ke.setValue(R, "normalMatrix", v.normalMatrix), ke.setValue(R, "modelMatrix", v.matrixWorld), J.isShaderMaterial || J.isRawShaderMaterial) {
|
|
38443
|
+
const st = J.uniformsGroups;
|
|
38444
|
+
for (let ht = 0, Pn = st.length; ht < Pn; ht++) {
|
|
38445
|
+
const mg = st[ht];
|
|
38445
38446
|
gA.update(mg, mt), gA.bind(mg, mt);
|
|
38446
38447
|
}
|
|
38447
38448
|
}
|
|
@@ -38574,16 +38575,16 @@ class yy {
|
|
|
38574
38575
|
R.pixelStorei(R.UNPACK_ROW_LENGTH, Ue.width), R.pixelStorei(R.UNPACK_IMAGE_HEIGHT, Ue.height), R.pixelStorei(R.UNPACK_SKIP_PIXELS, RA), R.pixelStorei(R.UNPACK_SKIP_ROWS, FA), R.pixelStorei(R.UNPACK_SKIP_IMAGES, GA);
|
|
38575
38576
|
const ke = m.isDataArrayTexture || m.isData3DTexture, dt = U.isDataArrayTexture || U.isData3DTexture;
|
|
38576
38577
|
if (m.isDepthTexture) {
|
|
38577
|
-
const Ut = f.get(m),
|
|
38578
|
+
const Ut = f.get(m), st = f.get(U), ht = f.get(Ut.__renderTarget), Pn = f.get(st.__renderTarget);
|
|
38578
38579
|
NA.bindFramebuffer(R.READ_FRAMEBUFFER, ht.__webglFramebuffer), NA.bindFramebuffer(R.DRAW_FRAMEBUFFER, Pn.__webglFramebuffer);
|
|
38579
38580
|
for (let mg = 0; mg < wA; mg++)
|
|
38580
38581
|
ke && (R.framebufferTextureLayer(R.READ_FRAMEBUFFER, R.COLOR_ATTACHMENT0, f.get(m).__webglTexture, v, GA + mg), R.framebufferTextureLayer(R.DRAW_FRAMEBUFFER, R.COLOR_ATTACHMENT0, f.get(U).__webglTexture, cA, Fe + mg)), R.blitFramebuffer(RA, FA, DA, lA, ZA, _e, DA, lA, R.DEPTH_BUFFER_BIT, R.NEAREST);
|
|
38581
38582
|
NA.bindFramebuffer(R.READ_FRAMEBUFFER, null), NA.bindFramebuffer(R.DRAW_FRAMEBUFFER, null);
|
|
38582
38583
|
} else if (v !== 0 || m.isRenderTargetTexture || f.has(m)) {
|
|
38583
|
-
const Ut = f.get(m),
|
|
38584
|
+
const Ut = f.get(m), st = f.get(U);
|
|
38584
38585
|
NA.bindFramebuffer(R.READ_FRAMEBUFFER, vh), NA.bindFramebuffer(R.DRAW_FRAMEBUFFER, Kh);
|
|
38585
38586
|
for (let ht = 0; ht < wA; ht++)
|
|
38586
|
-
ke ? R.framebufferTextureLayer(R.READ_FRAMEBUFFER, R.COLOR_ATTACHMENT0, Ut.__webglTexture, v, GA + ht) : R.framebufferTexture2D(R.READ_FRAMEBUFFER, R.COLOR_ATTACHMENT0, R.TEXTURE_2D, Ut.__webglTexture, v), dt ? R.framebufferTextureLayer(R.DRAW_FRAMEBUFFER, R.COLOR_ATTACHMENT0,
|
|
38587
|
+
ke ? R.framebufferTextureLayer(R.READ_FRAMEBUFFER, R.COLOR_ATTACHMENT0, Ut.__webglTexture, v, GA + ht) : R.framebufferTexture2D(R.READ_FRAMEBUFFER, R.COLOR_ATTACHMENT0, R.TEXTURE_2D, Ut.__webglTexture, v), dt ? R.framebufferTextureLayer(R.DRAW_FRAMEBUFFER, R.COLOR_ATTACHMENT0, st.__webglTexture, cA, Fe + ht) : R.framebufferTexture2D(R.DRAW_FRAMEBUFFER, R.COLOR_ATTACHMENT0, R.TEXTURE_2D, st.__webglTexture, cA), v !== 0 ? R.blitFramebuffer(RA, FA, DA, lA, ZA, _e, DA, lA, R.COLOR_BUFFER_BIT, R.NEAREST) : dt ? R.copyTexSubImage3D(ue, cA, ZA, _e, Fe + ht, RA, FA, DA, lA) : R.copyTexSubImage2D(ue, cA, ZA, _e, RA, FA, DA, lA);
|
|
38587
38588
|
NA.bindFramebuffer(R.READ_FRAMEBUFFER, null), NA.bindFramebuffer(R.DRAW_FRAMEBUFFER, null);
|
|
38588
38589
|
} else
|
|
38589
38590
|
dt ? m.isDataTexture || m.isData3DTexture ? R.texSubImage3D(ue, cA, ZA, _e, Fe, DA, lA, wA, me, MA, Ue.data) : U.isCompressedArrayTexture ? R.compressedTexSubImage3D(ue, cA, ZA, _e, Fe, DA, lA, wA, me, Ue.data) : R.texSubImage3D(ue, cA, ZA, _e, Fe, DA, lA, wA, me, MA, Ue) : m.isDataTexture ? R.texSubImage2D(R.TEXTURE_2D, cA, ZA, _e, DA, lA, me, MA, Ue.data) : m.isCompressedTexture ? R.compressedTexSubImage2D(R.TEXTURE_2D, cA, ZA, _e, Ue.width, Ue.height, me, Ue.data) : R.texSubImage2D(R.TEXTURE_2D, cA, ZA, _e, DA, lA, me, MA, Ue);
|
|
@@ -40324,16 +40325,16 @@ zg.styles = $g`
|
|
|
40324
40325
|
}
|
|
40325
40326
|
`;
|
|
40326
40327
|
XC([
|
|
40327
|
-
|
|
40328
|
+
O({ type: String, attribute: "privacy-url" })
|
|
40328
40329
|
], zg.prototype, "privacyUrl", 2);
|
|
40329
40330
|
XC([
|
|
40330
|
-
|
|
40331
|
+
O({ type: String, attribute: "terms-url" })
|
|
40331
40332
|
], zg.prototype, "termsUrl", 2);
|
|
40332
40333
|
XC([
|
|
40333
|
-
|
|
40334
|
+
O({ type: String, attribute: "terms-content" })
|
|
40334
40335
|
], zg.prototype, "termsContent", 2);
|
|
40335
40336
|
XC([
|
|
40336
|
-
|
|
40337
|
+
O({ type: String, attribute: "modal-title" })
|
|
40337
40338
|
], zg.prototype, "modalTitle", 2);
|
|
40338
40339
|
zg = XC([
|
|
40339
40340
|
AI("hanc-privacy-modal")
|
|
@@ -40638,13 +40639,13 @@ let pi = class extends ti {
|
|
|
40638
40639
|
};
|
|
40639
40640
|
pi.styles = vy;
|
|
40640
40641
|
pg([
|
|
40641
|
-
|
|
40642
|
+
O({ type: String })
|
|
40642
40643
|
], pi.prototype, "requestId", 2);
|
|
40643
40644
|
pg([
|
|
40644
|
-
|
|
40645
|
+
O({ type: Array })
|
|
40645
40646
|
], pi.prototype, "fields", 2);
|
|
40646
40647
|
pg([
|
|
40647
|
-
|
|
40648
|
+
O({ type: Boolean })
|
|
40648
40649
|
], pi.prototype, "visible", 2);
|
|
40649
40650
|
pg([
|
|
40650
40651
|
LA()
|
|
@@ -40661,14 +40662,14 @@ pg([
|
|
|
40661
40662
|
pi = pg([
|
|
40662
40663
|
AI("form-overlay")
|
|
40663
40664
|
], pi);
|
|
40664
|
-
var Yy = Object.defineProperty, Ty = Object.getOwnPropertyDescriptor,
|
|
40665
|
+
var Yy = Object.defineProperty, Ty = Object.getOwnPropertyDescriptor, PA = (t, A, e, i) => {
|
|
40665
40666
|
for (var g = i > 1 ? void 0 : i ? Ty(A, e) : A, I = t.length - 1, C; I >= 0; I--)
|
|
40666
40667
|
(C = t[I]) && (g = (i ? C(A, e, g) : C(g)) || g);
|
|
40667
40668
|
return i && g && Yy(A, e, g), g;
|
|
40668
40669
|
};
|
|
40669
|
-
let
|
|
40670
|
+
let YA = class extends ti {
|
|
40670
40671
|
constructor() {
|
|
40671
|
-
super(...arguments), this.callManager = new Xg(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = dn(), this.animationId = null, this.user_identity = Fn(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.formVisible = !1, this.formRequestId = "", this.formFields = [], this.domainBlocked = !1, this.errorKind = null, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.apiBaseUrl = mi, this.buttonStartText = "Try to call", this.buttonConnectingText = "Connecting...", this.size = 370, this.containerPadding = 45, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (t) => {
|
|
40672
|
+
super(...arguments), this.callManager = new Xg(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = dn(), this.animationId = null, this.user_identity = Fn(), this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.showPrivacyModal = !1, this.widgetConfig = null, this.configLoading = !1, this.formVisible = !1, this.formRequestId = "", this.formFields = [], this.domainBlocked = !1, this.errorKind = null, this.privacyUrl = "https://hanc.ai/privacy", this.termsUrl = "https://hanc.ai/terms", this.termsEnabled = !1, this.termsContent = "", this.skipFetch = !1, this.hideBranding = !1, this.apiBaseUrl = mi, this.buttonStartText = "Try to call", this.buttonConnectingText = "Connecting...", this.size = 370, this.containerPadding = 45, this.theme = "default", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (t) => {
|
|
40672
40673
|
const e = t.detail;
|
|
40673
40674
|
if (!(!e || !this.audioAnalyzer))
|
|
40674
40675
|
try {
|
|
@@ -41126,9 +41127,11 @@ let TA = class extends ti {
|
|
|
41126
41127
|
</style>
|
|
41127
41128
|
|
|
41128
41129
|
<div class="container" part="container">
|
|
41129
|
-
|
|
41130
|
-
|
|
41131
|
-
|
|
41130
|
+
${this.hideBranding ? "" : _A`
|
|
41131
|
+
<div class="brand">
|
|
41132
|
+
Powered by <a class="brand_link" href="https://hanc.ai" target="_blank">HANC.ai</a>
|
|
41133
|
+
</div>
|
|
41134
|
+
`}
|
|
41132
41135
|
<div
|
|
41133
41136
|
class="orb-container"
|
|
41134
41137
|
part="orb-container"
|
|
@@ -41197,132 +41200,135 @@ let TA = class extends ti {
|
|
|
41197
41200
|
`;
|
|
41198
41201
|
}
|
|
41199
41202
|
};
|
|
41200
|
-
|
|
41203
|
+
YA.styles = $g`
|
|
41201
41204
|
:host {
|
|
41202
41205
|
display: inline-block;
|
|
41203
41206
|
contain: layout style;
|
|
41204
41207
|
}
|
|
41205
41208
|
`;
|
|
41206
|
-
|
|
41207
|
-
|
|
41208
|
-
],
|
|
41209
|
-
|
|
41210
|
-
|
|
41211
|
-
],
|
|
41212
|
-
|
|
41209
|
+
PA([
|
|
41210
|
+
O({ type: String, attribute: "agent-id" })
|
|
41211
|
+
], YA.prototype, "agentId", 2);
|
|
41212
|
+
PA([
|
|
41213
|
+
O({ type: String, attribute: "voice-service-url" })
|
|
41214
|
+
], YA.prototype, "voiceServiceUrl", 2);
|
|
41215
|
+
PA([
|
|
41213
41216
|
LA()
|
|
41214
|
-
],
|
|
41215
|
-
|
|
41217
|
+
], YA.prototype, "callStatus", 2);
|
|
41218
|
+
PA([
|
|
41216
41219
|
LA()
|
|
41217
|
-
],
|
|
41218
|
-
|
|
41220
|
+
], YA.prototype, "microphoneEnabled", 2);
|
|
41221
|
+
PA([
|
|
41219
41222
|
LA()
|
|
41220
|
-
],
|
|
41221
|
-
|
|
41223
|
+
], YA.prototype, "microphoneInitialized", 2);
|
|
41224
|
+
PA([
|
|
41222
41225
|
LA()
|
|
41223
|
-
],
|
|
41224
|
-
|
|
41226
|
+
], YA.prototype, "showPrivacyModal", 2);
|
|
41227
|
+
PA([
|
|
41225
41228
|
LA()
|
|
41226
|
-
],
|
|
41227
|
-
|
|
41229
|
+
], YA.prototype, "widgetConfig", 2);
|
|
41230
|
+
PA([
|
|
41228
41231
|
LA()
|
|
41229
|
-
],
|
|
41230
|
-
|
|
41232
|
+
], YA.prototype, "configLoading", 2);
|
|
41233
|
+
PA([
|
|
41231
41234
|
LA()
|
|
41232
|
-
],
|
|
41233
|
-
|
|
41235
|
+
], YA.prototype, "formVisible", 2);
|
|
41236
|
+
PA([
|
|
41234
41237
|
LA()
|
|
41235
|
-
],
|
|
41236
|
-
|
|
41238
|
+
], YA.prototype, "formRequestId", 2);
|
|
41239
|
+
PA([
|
|
41237
41240
|
LA()
|
|
41238
|
-
],
|
|
41239
|
-
|
|
41241
|
+
], YA.prototype, "formFields", 2);
|
|
41242
|
+
PA([
|
|
41240
41243
|
LA()
|
|
41241
|
-
],
|
|
41242
|
-
|
|
41244
|
+
], YA.prototype, "domainBlocked", 2);
|
|
41245
|
+
PA([
|
|
41243
41246
|
LA()
|
|
41244
|
-
],
|
|
41245
|
-
|
|
41246
|
-
|
|
41247
|
-
],
|
|
41248
|
-
|
|
41249
|
-
|
|
41250
|
-
],
|
|
41251
|
-
|
|
41252
|
-
|
|
41253
|
-
],
|
|
41254
|
-
|
|
41255
|
-
|
|
41256
|
-
],
|
|
41257
|
-
|
|
41258
|
-
|
|
41259
|
-
],
|
|
41260
|
-
|
|
41261
|
-
|
|
41262
|
-
],
|
|
41263
|
-
|
|
41264
|
-
|
|
41265
|
-
],
|
|
41266
|
-
|
|
41267
|
-
|
|
41268
|
-
],
|
|
41269
|
-
|
|
41270
|
-
|
|
41271
|
-
],
|
|
41272
|
-
|
|
41273
|
-
|
|
41274
|
-
],
|
|
41275
|
-
|
|
41276
|
-
|
|
41277
|
-
],
|
|
41278
|
-
|
|
41279
|
-
|
|
41280
|
-
],
|
|
41281
|
-
|
|
41282
|
-
|
|
41283
|
-
],
|
|
41284
|
-
|
|
41285
|
-
|
|
41286
|
-
],
|
|
41287
|
-
|
|
41288
|
-
|
|
41289
|
-
],
|
|
41290
|
-
|
|
41291
|
-
|
|
41292
|
-
],
|
|
41293
|
-
|
|
41294
|
-
|
|
41295
|
-
],
|
|
41296
|
-
|
|
41297
|
-
|
|
41298
|
-
],
|
|
41299
|
-
|
|
41300
|
-
|
|
41301
|
-
],
|
|
41302
|
-
|
|
41303
|
-
|
|
41304
|
-
],
|
|
41305
|
-
|
|
41306
|
-
|
|
41307
|
-
],
|
|
41308
|
-
|
|
41309
|
-
|
|
41310
|
-
],
|
|
41311
|
-
|
|
41312
|
-
|
|
41313
|
-
],
|
|
41314
|
-
|
|
41315
|
-
|
|
41316
|
-
],
|
|
41317
|
-
|
|
41318
|
-
|
|
41319
|
-
],
|
|
41320
|
-
|
|
41321
|
-
|
|
41322
|
-
],
|
|
41323
|
-
|
|
41247
|
+
], YA.prototype, "errorKind", 2);
|
|
41248
|
+
PA([
|
|
41249
|
+
O({ type: String, attribute: "privacy-url" })
|
|
41250
|
+
], YA.prototype, "privacyUrl", 2);
|
|
41251
|
+
PA([
|
|
41252
|
+
O({ type: String, attribute: "terms-url" })
|
|
41253
|
+
], YA.prototype, "termsUrl", 2);
|
|
41254
|
+
PA([
|
|
41255
|
+
O({ type: Boolean, attribute: "terms-enabled" })
|
|
41256
|
+
], YA.prototype, "termsEnabled", 2);
|
|
41257
|
+
PA([
|
|
41258
|
+
O({ type: String, attribute: "terms-content" })
|
|
41259
|
+
], YA.prototype, "termsContent", 2);
|
|
41260
|
+
PA([
|
|
41261
|
+
O({ type: Boolean, attribute: "skip-fetch" })
|
|
41262
|
+
], YA.prototype, "skipFetch", 2);
|
|
41263
|
+
PA([
|
|
41264
|
+
O({ type: Boolean, attribute: "hide-branding" })
|
|
41265
|
+
], YA.prototype, "hideBranding", 2);
|
|
41266
|
+
PA([
|
|
41267
|
+
O({ type: String, attribute: "api-base-url" })
|
|
41268
|
+
], YA.prototype, "apiBaseUrl", 2);
|
|
41269
|
+
PA([
|
|
41270
|
+
O({ type: String, attribute: "button-start-text" })
|
|
41271
|
+
], YA.prototype, "buttonStartText", 2);
|
|
41272
|
+
PA([
|
|
41273
|
+
O({ type: String, attribute: "button-connecting-text" })
|
|
41274
|
+
], YA.prototype, "buttonConnectingText", 2);
|
|
41275
|
+
PA([
|
|
41276
|
+
O({ type: Number, attribute: "size" })
|
|
41277
|
+
], YA.prototype, "size", 2);
|
|
41278
|
+
PA([
|
|
41279
|
+
O({ type: Number, attribute: "container-padding" })
|
|
41280
|
+
], YA.prototype, "containerPadding", 2);
|
|
41281
|
+
PA([
|
|
41282
|
+
O({ type: String, attribute: "theme", reflect: !0 })
|
|
41283
|
+
], YA.prototype, "theme", 2);
|
|
41284
|
+
PA([
|
|
41285
|
+
O({ type: Object, attribute: "orb-colors" })
|
|
41286
|
+
], YA.prototype, "orbColors", 2);
|
|
41287
|
+
PA([
|
|
41288
|
+
O({ type: Number, attribute: "glow-intensity" })
|
|
41289
|
+
], YA.prototype, "glowIntensity", 2);
|
|
41290
|
+
PA([
|
|
41291
|
+
O({ type: Number, attribute: "idle-glow-multiplier" })
|
|
41292
|
+
], YA.prototype, "idleGlowMultiplier", 2);
|
|
41293
|
+
PA([
|
|
41294
|
+
O({ type: Number, attribute: "morph-strength" })
|
|
41295
|
+
], YA.prototype, "morphStrength", 2);
|
|
41296
|
+
PA([
|
|
41297
|
+
O({ type: Number, attribute: "noise-scale" })
|
|
41298
|
+
], YA.prototype, "noiseScale", 2);
|
|
41299
|
+
PA([
|
|
41300
|
+
O({ type: Number, attribute: "noise-speed" })
|
|
41301
|
+
], YA.prototype, "noiseSpeed", 2);
|
|
41302
|
+
PA([
|
|
41303
|
+
O({ type: Number, attribute: "fresnel-power" })
|
|
41304
|
+
], YA.prototype, "fresnelPower", 2);
|
|
41305
|
+
PA([
|
|
41306
|
+
O({ type: Number, attribute: "rotation-speed" })
|
|
41307
|
+
], YA.prototype, "rotationSpeed", 2);
|
|
41308
|
+
PA([
|
|
41309
|
+
O({ type: Number, attribute: "audio-reactivity" })
|
|
41310
|
+
], YA.prototype, "audioReactivity", 2);
|
|
41311
|
+
PA([
|
|
41312
|
+
O({ type: Number, attribute: "audio-smoothing" })
|
|
41313
|
+
], YA.prototype, "audioSmoothing", 2);
|
|
41314
|
+
PA([
|
|
41315
|
+
O({ type: Number, attribute: "idle-morph-multiplier" })
|
|
41316
|
+
], YA.prototype, "idleMorphMultiplier", 2);
|
|
41317
|
+
PA([
|
|
41318
|
+
O({ type: Number, attribute: "color-contrast" })
|
|
41319
|
+
], YA.prototype, "colorContrast", 2);
|
|
41320
|
+
PA([
|
|
41321
|
+
O({ type: Boolean, attribute: "sound-enabled" })
|
|
41322
|
+
], YA.prototype, "soundEnabled", 2);
|
|
41323
|
+
PA([
|
|
41324
|
+
O({ type: Number, attribute: "sound-volume" })
|
|
41325
|
+
], YA.prototype, "soundVolume", 2);
|
|
41326
|
+
PA([
|
|
41327
|
+
O({ type: String, attribute: "sound-preset" })
|
|
41328
|
+
], YA.prototype, "soundPreset", 2);
|
|
41329
|
+
YA = PA([
|
|
41324
41330
|
AI("hanc-ai-inline-call")
|
|
41325
|
-
],
|
|
41331
|
+
], YA);
|
|
41326
41332
|
var qy = Object.defineProperty, Hy = Object.getOwnPropertyDescriptor, ge = (t, A, e, i) => {
|
|
41327
41333
|
for (var g = i > 1 ? void 0 : i ? Hy(A, e) : A, I = t.length - 1, C; I >= 0; I--)
|
|
41328
41334
|
(C = t[I]) && (g = (i ? C(A, e, g) : C(g)) || g);
|
|
@@ -41832,10 +41838,10 @@ zA.styles = $g`
|
|
|
41832
41838
|
}
|
|
41833
41839
|
`;
|
|
41834
41840
|
ge([
|
|
41835
|
-
|
|
41841
|
+
O({ type: String, attribute: "agent-id" })
|
|
41836
41842
|
], zA.prototype, "agentId", 2);
|
|
41837
41843
|
ge([
|
|
41838
|
-
|
|
41844
|
+
O({ type: String, attribute: "voice-service-url" })
|
|
41839
41845
|
], zA.prototype, "voiceServiceUrl", 2);
|
|
41840
41846
|
ge([
|
|
41841
41847
|
LA()
|
|
@@ -41859,82 +41865,82 @@ ge([
|
|
|
41859
41865
|
LA()
|
|
41860
41866
|
], zA.prototype, "domainBlocked", 2);
|
|
41861
41867
|
ge([
|
|
41862
|
-
|
|
41868
|
+
O({ type: String, attribute: "privacy-url" })
|
|
41863
41869
|
], zA.prototype, "privacyUrl", 2);
|
|
41864
41870
|
ge([
|
|
41865
|
-
|
|
41871
|
+
O({ type: String, attribute: "terms-url" })
|
|
41866
41872
|
], zA.prototype, "termsUrl", 2);
|
|
41867
41873
|
ge([
|
|
41868
|
-
|
|
41874
|
+
O({ type: Boolean, attribute: "terms-enabled" })
|
|
41869
41875
|
], zA.prototype, "termsEnabled", 2);
|
|
41870
41876
|
ge([
|
|
41871
|
-
|
|
41877
|
+
O({ type: String, attribute: "terms-content" })
|
|
41872
41878
|
], zA.prototype, "termsContent", 2);
|
|
41873
41879
|
ge([
|
|
41874
|
-
|
|
41880
|
+
O({ type: Boolean, attribute: "skip-fetch" })
|
|
41875
41881
|
], zA.prototype, "skipFetch", 2);
|
|
41876
41882
|
ge([
|
|
41877
|
-
|
|
41883
|
+
O({ type: String, attribute: "api-base-url" })
|
|
41878
41884
|
], zA.prototype, "apiBaseUrl", 2);
|
|
41879
41885
|
ge([
|
|
41880
|
-
|
|
41886
|
+
O({ type: String, attribute: "button-start-text" })
|
|
41881
41887
|
], zA.prototype, "buttonStartText", 2);
|
|
41882
41888
|
ge([
|
|
41883
|
-
|
|
41889
|
+
O({ type: String, attribute: "button-connecting-text" })
|
|
41884
41890
|
], zA.prototype, "buttonConnectingText", 2);
|
|
41885
41891
|
ge([
|
|
41886
|
-
|
|
41892
|
+
O({ type: String, attribute: "position" })
|
|
41887
41893
|
], zA.prototype, "position", 2);
|
|
41888
41894
|
ge([
|
|
41889
|
-
|
|
41895
|
+
O({ type: Number, attribute: "size" })
|
|
41890
41896
|
], zA.prototype, "size", 2);
|
|
41891
41897
|
ge([
|
|
41892
|
-
|
|
41898
|
+
O({ type: String, attribute: "theme" })
|
|
41893
41899
|
], zA.prototype, "theme", 2);
|
|
41894
41900
|
ge([
|
|
41895
|
-
|
|
41901
|
+
O({ type: Object, attribute: "orb-colors" })
|
|
41896
41902
|
], zA.prototype, "orbColors", 2);
|
|
41897
41903
|
ge([
|
|
41898
|
-
|
|
41904
|
+
O({ type: Number, attribute: "glow-intensity" })
|
|
41899
41905
|
], zA.prototype, "glowIntensity", 2);
|
|
41900
41906
|
ge([
|
|
41901
|
-
|
|
41907
|
+
O({ type: Number, attribute: "idle-glow-multiplier" })
|
|
41902
41908
|
], zA.prototype, "idleGlowMultiplier", 2);
|
|
41903
41909
|
ge([
|
|
41904
|
-
|
|
41910
|
+
O({ type: Number, attribute: "morph-strength" })
|
|
41905
41911
|
], zA.prototype, "morphStrength", 2);
|
|
41906
41912
|
ge([
|
|
41907
|
-
|
|
41913
|
+
O({ type: Number, attribute: "noise-scale" })
|
|
41908
41914
|
], zA.prototype, "noiseScale", 2);
|
|
41909
41915
|
ge([
|
|
41910
|
-
|
|
41916
|
+
O({ type: Number, attribute: "noise-speed" })
|
|
41911
41917
|
], zA.prototype, "noiseSpeed", 2);
|
|
41912
41918
|
ge([
|
|
41913
|
-
|
|
41919
|
+
O({ type: Number, attribute: "fresnel-power" })
|
|
41914
41920
|
], zA.prototype, "fresnelPower", 2);
|
|
41915
41921
|
ge([
|
|
41916
|
-
|
|
41922
|
+
O({ type: Number, attribute: "rotation-speed" })
|
|
41917
41923
|
], zA.prototype, "rotationSpeed", 2);
|
|
41918
41924
|
ge([
|
|
41919
|
-
|
|
41925
|
+
O({ type: Number, attribute: "audio-reactivity" })
|
|
41920
41926
|
], zA.prototype, "audioReactivity", 2);
|
|
41921
41927
|
ge([
|
|
41922
|
-
|
|
41928
|
+
O({ type: Number, attribute: "audio-smoothing" })
|
|
41923
41929
|
], zA.prototype, "audioSmoothing", 2);
|
|
41924
41930
|
ge([
|
|
41925
|
-
|
|
41931
|
+
O({ type: Number, attribute: "idle-morph-multiplier" })
|
|
41926
41932
|
], zA.prototype, "idleMorphMultiplier", 2);
|
|
41927
41933
|
ge([
|
|
41928
|
-
|
|
41934
|
+
O({ type: Number, attribute: "color-contrast" })
|
|
41929
41935
|
], zA.prototype, "colorContrast", 2);
|
|
41930
41936
|
ge([
|
|
41931
|
-
|
|
41937
|
+
O({ type: Boolean, attribute: "sound-enabled" })
|
|
41932
41938
|
], zA.prototype, "soundEnabled", 2);
|
|
41933
41939
|
ge([
|
|
41934
|
-
|
|
41940
|
+
O({ type: Number, attribute: "sound-volume" })
|
|
41935
41941
|
], zA.prototype, "soundVolume", 2);
|
|
41936
41942
|
ge([
|
|
41937
|
-
|
|
41943
|
+
O({ type: String, attribute: "sound-preset" })
|
|
41938
41944
|
], zA.prototype, "soundPreset", 2);
|
|
41939
41945
|
zA = ge([
|
|
41940
41946
|
AI("hanc-ai-floating-call")
|
|
@@ -42382,10 +42388,10 @@ $A.styles = $g`
|
|
|
42382
42388
|
}
|
|
42383
42389
|
`;
|
|
42384
42390
|
Ie([
|
|
42385
|
-
|
|
42391
|
+
O({ type: String, attribute: "agent-id" })
|
|
42386
42392
|
], $A.prototype, "agentId", 2);
|
|
42387
42393
|
Ie([
|
|
42388
|
-
|
|
42394
|
+
O({ type: String, attribute: "voice-service-url" })
|
|
42389
42395
|
], $A.prototype, "voiceServiceUrl", 2);
|
|
42390
42396
|
Ie([
|
|
42391
42397
|
LA()
|
|
@@ -42409,82 +42415,82 @@ Ie([
|
|
|
42409
42415
|
LA()
|
|
42410
42416
|
], $A.prototype, "domainBlocked", 2);
|
|
42411
42417
|
Ie([
|
|
42412
|
-
|
|
42418
|
+
O({ type: String, attribute: "privacy-url" })
|
|
42413
42419
|
], $A.prototype, "privacyUrl", 2);
|
|
42414
42420
|
Ie([
|
|
42415
|
-
|
|
42421
|
+
O({ type: String, attribute: "terms-url" })
|
|
42416
42422
|
], $A.prototype, "termsUrl", 2);
|
|
42417
42423
|
Ie([
|
|
42418
|
-
|
|
42424
|
+
O({ type: Boolean, attribute: "terms-enabled" })
|
|
42419
42425
|
], $A.prototype, "termsEnabled", 2);
|
|
42420
42426
|
Ie([
|
|
42421
|
-
|
|
42427
|
+
O({ type: String, attribute: "terms-content" })
|
|
42422
42428
|
], $A.prototype, "termsContent", 2);
|
|
42423
42429
|
Ie([
|
|
42424
|
-
|
|
42430
|
+
O({ type: Boolean, attribute: "skip-fetch" })
|
|
42425
42431
|
], $A.prototype, "skipFetch", 2);
|
|
42426
42432
|
Ie([
|
|
42427
|
-
|
|
42433
|
+
O({ type: String, attribute: "api-base-url" })
|
|
42428
42434
|
], $A.prototype, "apiBaseUrl", 2);
|
|
42429
42435
|
Ie([
|
|
42430
|
-
|
|
42436
|
+
O({ type: String, attribute: "button-start-text" })
|
|
42431
42437
|
], $A.prototype, "buttonStartText", 2);
|
|
42432
42438
|
Ie([
|
|
42433
|
-
|
|
42439
|
+
O({ type: String, attribute: "button-connecting-text" })
|
|
42434
42440
|
], $A.prototype, "buttonConnectingText", 2);
|
|
42435
42441
|
Ie([
|
|
42436
|
-
|
|
42442
|
+
O({ type: String, attribute: "button-end-text" })
|
|
42437
42443
|
], $A.prototype, "buttonEndText", 2);
|
|
42438
42444
|
Ie([
|
|
42439
|
-
|
|
42445
|
+
O({ type: Number, attribute: "orb-size" })
|
|
42440
42446
|
], $A.prototype, "orbSize", 2);
|
|
42441
42447
|
Ie([
|
|
42442
|
-
|
|
42448
|
+
O({ type: String, attribute: "theme" })
|
|
42443
42449
|
], $A.prototype, "theme", 2);
|
|
42444
42450
|
Ie([
|
|
42445
|
-
|
|
42451
|
+
O({ type: Object, attribute: "orb-colors" })
|
|
42446
42452
|
], $A.prototype, "orbColors", 2);
|
|
42447
42453
|
Ie([
|
|
42448
|
-
|
|
42454
|
+
O({ type: Number, attribute: "glow-intensity" })
|
|
42449
42455
|
], $A.prototype, "glowIntensity", 2);
|
|
42450
42456
|
Ie([
|
|
42451
|
-
|
|
42457
|
+
O({ type: Number, attribute: "idle-glow-multiplier" })
|
|
42452
42458
|
], $A.prototype, "idleGlowMultiplier", 2);
|
|
42453
42459
|
Ie([
|
|
42454
|
-
|
|
42460
|
+
O({ type: Number, attribute: "morph-strength" })
|
|
42455
42461
|
], $A.prototype, "morphStrength", 2);
|
|
42456
42462
|
Ie([
|
|
42457
|
-
|
|
42463
|
+
O({ type: Number, attribute: "noise-scale" })
|
|
42458
42464
|
], $A.prototype, "noiseScale", 2);
|
|
42459
42465
|
Ie([
|
|
42460
|
-
|
|
42466
|
+
O({ type: Number, attribute: "noise-speed" })
|
|
42461
42467
|
], $A.prototype, "noiseSpeed", 2);
|
|
42462
42468
|
Ie([
|
|
42463
|
-
|
|
42469
|
+
O({ type: Number, attribute: "fresnel-power" })
|
|
42464
42470
|
], $A.prototype, "fresnelPower", 2);
|
|
42465
42471
|
Ie([
|
|
42466
|
-
|
|
42472
|
+
O({ type: Number, attribute: "rotation-speed" })
|
|
42467
42473
|
], $A.prototype, "rotationSpeed", 2);
|
|
42468
42474
|
Ie([
|
|
42469
|
-
|
|
42475
|
+
O({ type: Number, attribute: "audio-reactivity" })
|
|
42470
42476
|
], $A.prototype, "audioReactivity", 2);
|
|
42471
42477
|
Ie([
|
|
42472
|
-
|
|
42478
|
+
O({ type: Number, attribute: "audio-smoothing" })
|
|
42473
42479
|
], $A.prototype, "audioSmoothing", 2);
|
|
42474
42480
|
Ie([
|
|
42475
|
-
|
|
42481
|
+
O({ type: Number, attribute: "idle-morph-multiplier" })
|
|
42476
42482
|
], $A.prototype, "idleMorphMultiplier", 2);
|
|
42477
42483
|
Ie([
|
|
42478
|
-
|
|
42484
|
+
O({ type: Number, attribute: "color-contrast" })
|
|
42479
42485
|
], $A.prototype, "colorContrast", 2);
|
|
42480
42486
|
Ie([
|
|
42481
|
-
|
|
42487
|
+
O({ type: Boolean, attribute: "sound-enabled" })
|
|
42482
42488
|
], $A.prototype, "soundEnabled", 2);
|
|
42483
42489
|
Ie([
|
|
42484
|
-
|
|
42490
|
+
O({ type: Number, attribute: "sound-volume" })
|
|
42485
42491
|
], $A.prototype, "soundVolume", 2);
|
|
42486
42492
|
Ie([
|
|
42487
|
-
|
|
42493
|
+
O({ type: String, attribute: "sound-preset" })
|
|
42488
42494
|
], $A.prototype, "soundPreset", 2);
|
|
42489
42495
|
$A = Ie([
|
|
42490
42496
|
AI("hanc-ai-pill-call")
|
|
@@ -42926,10 +42932,10 @@ XA.styles = $g`
|
|
|
42926
42932
|
}
|
|
42927
42933
|
`;
|
|
42928
42934
|
te([
|
|
42929
|
-
|
|
42935
|
+
O({ type: String, attribute: "agent-id" })
|
|
42930
42936
|
], XA.prototype, "agentId", 2);
|
|
42931
42937
|
te([
|
|
42932
|
-
|
|
42938
|
+
O({ type: String, attribute: "voice-service-url" })
|
|
42933
42939
|
], XA.prototype, "voiceServiceUrl", 2);
|
|
42934
42940
|
te([
|
|
42935
42941
|
LA()
|
|
@@ -42953,85 +42959,85 @@ te([
|
|
|
42953
42959
|
LA()
|
|
42954
42960
|
], XA.prototype, "domainBlocked", 2);
|
|
42955
42961
|
te([
|
|
42956
|
-
|
|
42962
|
+
O({ type: String, attribute: "privacy-url" })
|
|
42957
42963
|
], XA.prototype, "privacyUrl", 2);
|
|
42958
42964
|
te([
|
|
42959
|
-
|
|
42965
|
+
O({ type: String, attribute: "terms-url" })
|
|
42960
42966
|
], XA.prototype, "termsUrl", 2);
|
|
42961
42967
|
te([
|
|
42962
|
-
|
|
42968
|
+
O({ type: Boolean, attribute: "terms-enabled" })
|
|
42963
42969
|
], XA.prototype, "termsEnabled", 2);
|
|
42964
42970
|
te([
|
|
42965
|
-
|
|
42971
|
+
O({ type: String, attribute: "terms-content" })
|
|
42966
42972
|
], XA.prototype, "termsContent", 2);
|
|
42967
42973
|
te([
|
|
42968
|
-
|
|
42974
|
+
O({ type: Boolean, attribute: "skip-fetch" })
|
|
42969
42975
|
], XA.prototype, "skipFetch", 2);
|
|
42970
42976
|
te([
|
|
42971
|
-
|
|
42977
|
+
O({ type: String, attribute: "api-base-url" })
|
|
42972
42978
|
], XA.prototype, "apiBaseUrl", 2);
|
|
42973
42979
|
te([
|
|
42974
|
-
|
|
42980
|
+
O({ type: String, attribute: "button-start-text" })
|
|
42975
42981
|
], XA.prototype, "buttonStartText", 2);
|
|
42976
42982
|
te([
|
|
42977
|
-
|
|
42983
|
+
O({ type: String, attribute: "button-connecting-text" })
|
|
42978
42984
|
], XA.prototype, "buttonConnectingText", 2);
|
|
42979
42985
|
te([
|
|
42980
|
-
|
|
42986
|
+
O({ type: String, attribute: "button-end-text" })
|
|
42981
42987
|
], XA.prototype, "buttonEndText", 2);
|
|
42982
42988
|
te([
|
|
42983
|
-
|
|
42989
|
+
O({ type: String, attribute: "position" })
|
|
42984
42990
|
], XA.prototype, "position", 2);
|
|
42985
42991
|
te([
|
|
42986
|
-
|
|
42992
|
+
O({ type: Number, attribute: "orb-size" })
|
|
42987
42993
|
], XA.prototype, "orbSize", 2);
|
|
42988
42994
|
te([
|
|
42989
|
-
|
|
42995
|
+
O({ type: String, attribute: "theme" })
|
|
42990
42996
|
], XA.prototype, "theme", 2);
|
|
42991
42997
|
te([
|
|
42992
|
-
|
|
42998
|
+
O({ type: Object, attribute: "orb-colors" })
|
|
42993
42999
|
], XA.prototype, "orbColors", 2);
|
|
42994
43000
|
te([
|
|
42995
|
-
|
|
43001
|
+
O({ type: Number, attribute: "glow-intensity" })
|
|
42996
43002
|
], XA.prototype, "glowIntensity", 2);
|
|
42997
43003
|
te([
|
|
42998
|
-
|
|
43004
|
+
O({ type: Number, attribute: "idle-glow-multiplier" })
|
|
42999
43005
|
], XA.prototype, "idleGlowMultiplier", 2);
|
|
43000
43006
|
te([
|
|
43001
|
-
|
|
43007
|
+
O({ type: Number, attribute: "morph-strength" })
|
|
43002
43008
|
], XA.prototype, "morphStrength", 2);
|
|
43003
43009
|
te([
|
|
43004
|
-
|
|
43010
|
+
O({ type: Number, attribute: "noise-scale" })
|
|
43005
43011
|
], XA.prototype, "noiseScale", 2);
|
|
43006
43012
|
te([
|
|
43007
|
-
|
|
43013
|
+
O({ type: Number, attribute: "noise-speed" })
|
|
43008
43014
|
], XA.prototype, "noiseSpeed", 2);
|
|
43009
43015
|
te([
|
|
43010
|
-
|
|
43016
|
+
O({ type: Number, attribute: "fresnel-power" })
|
|
43011
43017
|
], XA.prototype, "fresnelPower", 2);
|
|
43012
43018
|
te([
|
|
43013
|
-
|
|
43019
|
+
O({ type: Number, attribute: "rotation-speed" })
|
|
43014
43020
|
], XA.prototype, "rotationSpeed", 2);
|
|
43015
43021
|
te([
|
|
43016
|
-
|
|
43022
|
+
O({ type: Number, attribute: "audio-reactivity" })
|
|
43017
43023
|
], XA.prototype, "audioReactivity", 2);
|
|
43018
43024
|
te([
|
|
43019
|
-
|
|
43025
|
+
O({ type: Number, attribute: "audio-smoothing" })
|
|
43020
43026
|
], XA.prototype, "audioSmoothing", 2);
|
|
43021
43027
|
te([
|
|
43022
|
-
|
|
43028
|
+
O({ type: Number, attribute: "idle-morph-multiplier" })
|
|
43023
43029
|
], XA.prototype, "idleMorphMultiplier", 2);
|
|
43024
43030
|
te([
|
|
43025
|
-
|
|
43031
|
+
O({ type: Number, attribute: "color-contrast" })
|
|
43026
43032
|
], XA.prototype, "colorContrast", 2);
|
|
43027
43033
|
te([
|
|
43028
|
-
|
|
43034
|
+
O({ type: Boolean, attribute: "sound-enabled" })
|
|
43029
43035
|
], XA.prototype, "soundEnabled", 2);
|
|
43030
43036
|
te([
|
|
43031
|
-
|
|
43037
|
+
O({ type: Number, attribute: "sound-volume" })
|
|
43032
43038
|
], XA.prototype, "soundVolume", 2);
|
|
43033
43039
|
te([
|
|
43034
|
-
|
|
43040
|
+
O({ type: String, attribute: "sound-preset" })
|
|
43035
43041
|
], XA.prototype, "soundPreset", 2);
|
|
43036
43042
|
XA = te([
|
|
43037
43043
|
AI("hanc-ai-pill-floating-call")
|
|
@@ -46880,7 +46886,7 @@ function J1(t) {
|
|
|
46880
46886
|
const e = parseInt(A[1], 16), i = e >> 16 & 255, g = e >> 8 & 255, I = e & 255;
|
|
46881
46887
|
return 0.2126 * i + 0.7152 * g + 0.0722 * I > 165 ? "#171717" : "#ffffff";
|
|
46882
46888
|
}
|
|
46883
|
-
var Y1 = Object.defineProperty, T1 = Object.getOwnPropertyDescriptor,
|
|
46889
|
+
var Y1 = Object.defineProperty, T1 = Object.getOwnPropertyDescriptor, at = (t, A, e, i) => {
|
|
46884
46890
|
for (var g = i > 1 ? void 0 : i ? T1(A, e) : A, I = t.length - 1, C; I >= 0; I--)
|
|
46885
46891
|
(C = t[I]) && (g = (i ? C(A, e, g) : C(g)) || g);
|
|
46886
46892
|
return i && g && Y1(A, e, g), g;
|
|
@@ -46936,7 +46942,7 @@ const H1 = {
|
|
|
46936
46942
|
};
|
|
46937
46943
|
let tt = class extends ti {
|
|
46938
46944
|
constructor() {
|
|
46939
|
-
super(...arguments), this.agentId = "", this.apiBaseUrl = mi, this.skipFetch = !1, this.manifestOverride = null, this.theme = "", this.locale = "", this.view = { kind: "loading" }, this.manifest = null, this.selectedCountry = null, this.phoneRaw = "", this.phoneError = "", this.apiError = null, this.pickerOpen = !1, this.pickerSearch = "", this.recaptchaToken = null, this.recaptchaWidgetId = null, this.recaptchaRendering = !1, this.postSubmitView = null, this.pollAbort = null, this.pollTimer = null, this.lastFocusedBeforeOpen = null, this.onDocumentKey = (t) => {
|
|
46945
|
+
super(...arguments), this.agentId = "", this.apiBaseUrl = mi, this.skipFetch = !1, this.manifestOverride = null, this.theme = "", this.locale = "", this.view = { kind: "loading" }, this.manifest = null, this.selectedCountry = null, this.phoneRaw = "", this.phoneError = "", this.apiError = null, this.pickerOpen = !1, this.pickerSearch = "", this.recaptchaToken = null, this.recaptchaWidgetId = null, this.recaptchaRendering = !1, this.recaptchaHost = null, this.postSubmitView = null, this.pollAbort = null, this.pollTimer = null, this.lastFocusedBeforeOpen = null, this.onDocumentKey = (t) => {
|
|
46940
46946
|
t.key === "Escape" && this.view.kind !== "closed" && this.view.kind !== "loading" && this.close();
|
|
46941
46947
|
}, this.open = () => {
|
|
46942
46948
|
if (this.manifest) {
|
|
@@ -46978,33 +46984,41 @@ let tt = class extends ti {
|
|
|
46978
46984
|
super.connectedCallback(), await this.loadManifest(), document.addEventListener("keydown", this.onDocumentKey);
|
|
46979
46985
|
}
|
|
46980
46986
|
disconnectedCallback() {
|
|
46981
|
-
super.disconnectedCallback(), this.stopPolling(), document.removeEventListener("keydown", this.onDocumentKey);
|
|
46987
|
+
super.disconnectedCallback(), this.stopPolling(), this.teardownRecaptcha(), document.removeEventListener("keydown", this.onDocumentKey);
|
|
46982
46988
|
}
|
|
46983
46989
|
updated(t) {
|
|
46984
46990
|
t.has("manifestOverride") && this.skipFetch && this.manifestOverride && this.adoptManifest(this.manifestOverride), this.syncRecaptcha();
|
|
46985
46991
|
}
|
|
46986
46992
|
/**
|
|
46987
46993
|
* Render (or tear down) the reCAPTCHA checkbox to match the current view.
|
|
46988
|
-
* Only acts when the manifest shipped a site key. The form subtree
|
|
46989
|
-
* destroyed/recreated by Lit when leaving the
|
|
46990
|
-
*
|
|
46991
|
-
*
|
|
46994
|
+
* Only acts when the manifest shipped a site key. The form subtree (with its
|
|
46995
|
+
* `<slot name="recaptcha">`) is destroyed/recreated by Lit when leaving the
|
|
46996
|
+
* form, so we tear the light-DOM host down on exit and render afresh the next
|
|
46997
|
+
* time the form mounts.
|
|
46998
|
+
*
|
|
46999
|
+
* The reCAPTCHA is rendered into a LIGHT-DOM `<div slot="recaptcha">` child of
|
|
47000
|
+
* this element (not into `renderRoot`): reCAPTCHA v2 spins forever inside a
|
|
47001
|
+
* Shadow DOM. The slot projects the host into the form layout while it stays
|
|
47002
|
+
* in the document tree where grecaptcha works.
|
|
46992
47003
|
*/
|
|
46993
47004
|
syncRecaptcha() {
|
|
46994
47005
|
var i;
|
|
46995
47006
|
const t = (i = this.manifest) == null ? void 0 : i.recaptcha_site_key;
|
|
46996
47007
|
if (!t) return;
|
|
46997
47008
|
if (!(this.view.kind === "form" || this.view.kind === "submitting")) {
|
|
46998
|
-
this.
|
|
47009
|
+
this.teardownRecaptcha();
|
|
46999
47010
|
return;
|
|
47000
47011
|
}
|
|
47001
|
-
|
|
47002
|
-
|
|
47003
|
-
|
|
47004
|
-
this.recaptchaWidgetId
|
|
47012
|
+
this.recaptchaWidgetId !== null || this.recaptchaRendering || !this.renderRoot.querySelector(
|
|
47013
|
+
'slot[name="recaptcha"]'
|
|
47014
|
+
) || (this.recaptchaRendering = !0, q1().then(() => {
|
|
47015
|
+
if (this.recaptchaWidgetId !== null || this.view.kind !== "form" && this.view.kind !== "submitting")
|
|
47016
|
+
return;
|
|
47017
|
+
const g = document.createElement("div");
|
|
47018
|
+
g.setAttribute("slot", "recaptcha"), this.appendChild(g), this.recaptchaHost = g, this.recaptchaWidgetId = window.grecaptcha.render(g, {
|
|
47005
47019
|
sitekey: t,
|
|
47006
|
-
callback: (
|
|
47007
|
-
this.recaptchaToken =
|
|
47020
|
+
callback: (I) => {
|
|
47021
|
+
this.recaptchaToken = I;
|
|
47008
47022
|
},
|
|
47009
47023
|
"expired-callback": () => {
|
|
47010
47024
|
this.recaptchaToken = null;
|
|
@@ -47012,13 +47026,17 @@ let tt = class extends ti {
|
|
|
47012
47026
|
"error-callback": () => {
|
|
47013
47027
|
this.recaptchaToken = null;
|
|
47014
47028
|
}
|
|
47015
|
-
})
|
|
47029
|
+
});
|
|
47016
47030
|
}).catch((g) => {
|
|
47017
47031
|
console.warn("[hanc-callback] reCAPTCHA load failed:", g);
|
|
47018
47032
|
}).finally(() => {
|
|
47019
47033
|
this.recaptchaRendering = !1;
|
|
47020
47034
|
}));
|
|
47021
47035
|
}
|
|
47036
|
+
/** Remove the light-DOM reCAPTCHA host and forget its widget id/token. */
|
|
47037
|
+
teardownRecaptcha() {
|
|
47038
|
+
this.recaptchaHost && (this.recaptchaHost.remove(), this.recaptchaHost = null), this.recaptchaWidgetId = null, this.recaptchaToken = null;
|
|
47039
|
+
}
|
|
47022
47040
|
async loadManifest() {
|
|
47023
47041
|
if (this.skipFetch) {
|
|
47024
47042
|
this.manifestOverride ? this.adoptManifest(this.manifestOverride) : this.view = { kind: "closed" };
|
|
@@ -47307,7 +47325,9 @@ let tt = class extends ti {
|
|
|
47307
47325
|
${this.phoneError ? _A`<div class="error">${this.phoneError}</div>` : Qe}
|
|
47308
47326
|
${this.apiError ? _A`<div class="error">${this.localizeError(this.apiError)}</div>` : Qe}
|
|
47309
47327
|
|
|
47310
|
-
${g ? _A`<div class="recaptcha-box"
|
|
47328
|
+
${g ? _A`<div class="recaptcha-box">
|
|
47329
|
+
<slot name="recaptcha"></slot>
|
|
47330
|
+
</div>` : Qe}
|
|
47311
47331
|
|
|
47312
47332
|
<button
|
|
47313
47333
|
class="submit-btn"
|
|
@@ -47897,58 +47917,58 @@ tt.styles = $g`
|
|
|
47897
47917
|
75% { transform: rotate(12deg); }
|
|
47898
47918
|
}
|
|
47899
47919
|
`;
|
|
47900
|
-
|
|
47901
|
-
|
|
47920
|
+
at([
|
|
47921
|
+
O({ type: String, attribute: "agent-id" })
|
|
47902
47922
|
], tt.prototype, "agentId", 2);
|
|
47903
|
-
|
|
47904
|
-
|
|
47923
|
+
at([
|
|
47924
|
+
O({ type: String, attribute: "api-base-url" })
|
|
47905
47925
|
], tt.prototype, "apiBaseUrl", 2);
|
|
47906
|
-
|
|
47907
|
-
|
|
47926
|
+
at([
|
|
47927
|
+
O({ type: Boolean, attribute: "skip-fetch" })
|
|
47908
47928
|
], tt.prototype, "skipFetch", 2);
|
|
47909
|
-
|
|
47910
|
-
|
|
47929
|
+
at([
|
|
47930
|
+
O({ type: Object, attribute: !1 })
|
|
47911
47931
|
], tt.prototype, "manifestOverride", 2);
|
|
47912
|
-
|
|
47913
|
-
|
|
47932
|
+
at([
|
|
47933
|
+
O({ type: String })
|
|
47914
47934
|
], tt.prototype, "theme", 2);
|
|
47915
|
-
|
|
47916
|
-
|
|
47935
|
+
at([
|
|
47936
|
+
O({ type: String })
|
|
47917
47937
|
], tt.prototype, "locale", 2);
|
|
47918
|
-
|
|
47938
|
+
at([
|
|
47919
47939
|
LA()
|
|
47920
47940
|
], tt.prototype, "view", 2);
|
|
47921
|
-
|
|
47941
|
+
at([
|
|
47922
47942
|
LA()
|
|
47923
47943
|
], tt.prototype, "manifest", 2);
|
|
47924
|
-
|
|
47944
|
+
at([
|
|
47925
47945
|
LA()
|
|
47926
47946
|
], tt.prototype, "selectedCountry", 2);
|
|
47927
|
-
|
|
47947
|
+
at([
|
|
47928
47948
|
LA()
|
|
47929
47949
|
], tt.prototype, "phoneRaw", 2);
|
|
47930
|
-
|
|
47950
|
+
at([
|
|
47931
47951
|
LA()
|
|
47932
47952
|
], tt.prototype, "phoneError", 2);
|
|
47933
|
-
|
|
47953
|
+
at([
|
|
47934
47954
|
LA()
|
|
47935
47955
|
], tt.prototype, "apiError", 2);
|
|
47936
|
-
|
|
47956
|
+
at([
|
|
47937
47957
|
LA()
|
|
47938
47958
|
], tt.prototype, "pickerOpen", 2);
|
|
47939
|
-
|
|
47959
|
+
at([
|
|
47940
47960
|
LA()
|
|
47941
47961
|
], tt.prototype, "pickerSearch", 2);
|
|
47942
|
-
|
|
47962
|
+
at([
|
|
47943
47963
|
LA()
|
|
47944
47964
|
], tt.prototype, "recaptchaToken", 2);
|
|
47945
|
-
tt =
|
|
47965
|
+
tt = at([
|
|
47946
47966
|
AI("hanc-ai-callback")
|
|
47947
47967
|
], tt);
|
|
47948
47968
|
export {
|
|
47949
47969
|
zA as FloatingCall,
|
|
47950
47970
|
tt as HancAiCallback,
|
|
47951
|
-
|
|
47971
|
+
YA as InlineCall,
|
|
47952
47972
|
$A as PillCall,
|
|
47953
47973
|
XA as PillFloatingCall,
|
|
47954
47974
|
Rn as SoundManager,
|