@maucwerk/glimmer 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/vite/glimmer.mjs +137 -137
- package/dist/vite/glimmer.umd.js +7 -7
- package/package.json +1 -1
package/dist/vite/glimmer.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var Mo = Object.defineProperty;
|
|
|
2
2
|
var Lo = (r, e, t) => e in r ? Mo(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var _ = (r, e, t) => Lo(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import * as p from "three";
|
|
5
|
-
import { Controls as ko, Vector3 as J, MOUSE as Wt, TOUCH as Bt, Quaternion as
|
|
5
|
+
import { Controls as ko, Vector3 as J, MOUSE as Wt, TOUCH as Bt, Quaternion as rs, Spherical as Ki, Vector2 as ke, Ray as Co, Plane as Oo, MathUtils as bi, DataTextureLoader as Do, HalfFloatType as ft, FloatType as Ls, DataUtils as dn, LinearSRGBColorSpace as Pe, LinearFilter as Yt, Loader as wi, RGBAFormat as qi, DataTexture as Io, UVMapping as No, ClampToEdgeWrapping as qs, LinearMipMapLinearFilter as Po, FileLoader as mn, Mesh as ye, ShaderMaterial as Ei, BackSide as Ur, UniformsUtils as Ai, BoxGeometry as Fr, Scene as zo, MeshStandardMaterial as os, PointLight as jr, MeshBasicMaterial as Ht, TrianglesDrawMode as Uo, TriangleFanDrawMode as Js, TriangleStripDrawMode as Br, InstancedBufferGeometry as Fo, Float32BufferAttribute as Ji, InstancedInterleavedBuffer as Qs, InterleavedBufferAttribute as Et, WireframeGeometry as jo, Box3 as _s, Sphere as Ti, ShaderLib as es, UniformsLib as ts, Vector4 as In, Line3 as Bo, Matrix4 as pn, LoaderUtils as fn, MeshPhysicalMaterial as qe, Color as lt, SRGBColorSpace as mt, SpotLight as Ho, DirectionalLight as Vo, InstancedMesh as Go, InstancedBufferAttribute as Zo, Object3D as Hr, TextureLoader as Wo, ImageBitmapLoader as Xo, BufferAttribute as at, InterleavedBuffer as $o, LinearMipmapLinearFilter as Vr, NearestMipmapLinearFilter as Yo, LinearMipmapNearestFilter as Ko, NearestMipmapNearestFilter as qo, NearestFilter as Gr, RepeatWrapping as ei, MirroredRepeatWrapping as Jo, PointsMaterial as Qo, Material as ks, LineBasicMaterial as ea, DoubleSide as ta, PropertyBinding as na, BufferGeometry as Si, SkinnedMesh as sa, LineSegments as Zr, Line as ia, LineLoop as ra, Points as oa, Group as Cs, PerspectiveCamera as aa, OrthographicCamera as ca, Skeleton as la, AnimationClip as da, Bone as ua, InterpolateDiscrete as ha, InterpolateLinear as Wr, Texture as Qi, VectorKeyframeTrack as er, NumberKeyframeTrack as tr, QuaternionKeyframeTrack as nr, ColorManagement as ti, FrontSide as fa, Interpolant as ma } from "three";
|
|
6
6
|
var q;
|
|
7
7
|
(function(r) {
|
|
8
8
|
r.assertEqual = (s) => s;
|
|
@@ -227,10 +227,10 @@ let Xr = Kt;
|
|
|
227
227
|
function _a(r) {
|
|
228
228
|
Xr = r;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function as() {
|
|
231
231
|
return Xr;
|
|
232
232
|
}
|
|
233
|
-
const
|
|
233
|
+
const cs = (r) => {
|
|
234
234
|
const { data: e, path: t, errorMaps: n, issueData: s } = r, i = [...t, ...s.path || []], o = {
|
|
235
235
|
...s,
|
|
236
236
|
path: i
|
|
@@ -252,7 +252,7 @@ const as = (r) => {
|
|
|
252
252
|
};
|
|
253
253
|
}, ga = [];
|
|
254
254
|
function M(r, e) {
|
|
255
|
-
const t =
|
|
255
|
+
const t = as(), n = cs({
|
|
256
256
|
issueData: e,
|
|
257
257
|
data: r.data,
|
|
258
258
|
path: r.path,
|
|
@@ -313,7 +313,7 @@ class xe {
|
|
|
313
313
|
const H = Object.freeze({
|
|
314
314
|
status: "aborted"
|
|
315
315
|
}), Vt = (r) => ({ status: "dirty", value: r }), Ee = (r) => ({ status: "valid", value: r }), si = (r) => r.status === "aborted", ii = (r) => r.status === "dirty", St = (r) => r.status === "valid", _n = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
316
|
-
function
|
|
316
|
+
function ls(r, e, t, n) {
|
|
317
317
|
if (typeof e == "function" ? r !== e || !0 : !e.has(r)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
318
318
|
return e.get(r);
|
|
319
319
|
}
|
|
@@ -582,7 +582,7 @@ class X {
|
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
const ya = /^c[^\s-]{8,}$/i, va = /^[0-9a-z]+$/, xa = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ba = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, wa = /^[a-z0-9_-]{21}$/i, Ea = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Aa = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ta = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Sa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
585
|
-
let
|
|
585
|
+
let Os;
|
|
586
586
|
const Ra = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ma = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, La = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, ka = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ca = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Oa = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Yr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Da = new RegExp(`^${Yr}$`);
|
|
587
587
|
function Kr(r) {
|
|
588
588
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
@@ -667,7 +667,7 @@ class je extends X {
|
|
|
667
667
|
message: i.message
|
|
668
668
|
}), n.dirty());
|
|
669
669
|
else if (i.kind === "emoji")
|
|
670
|
-
|
|
670
|
+
Os || (Os = new RegExp(Sa, "u")), Os.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
|
|
671
671
|
validation: "emoji",
|
|
672
672
|
code: A.invalid_string,
|
|
673
673
|
message: i.message
|
|
@@ -1407,7 +1407,7 @@ Rt.create = (r) => new Rt({
|
|
|
1407
1407
|
typeName: B.ZodDate,
|
|
1408
1408
|
...W(r)
|
|
1409
1409
|
});
|
|
1410
|
-
class
|
|
1410
|
+
class ds extends X {
|
|
1411
1411
|
_parse(e) {
|
|
1412
1412
|
if (this._getType(e) !== k.symbol) {
|
|
1413
1413
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1420,7 +1420,7 @@ class ls extends X {
|
|
|
1420
1420
|
return Ee(e.data);
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
|
-
|
|
1423
|
+
ds.create = (r) => new ds({
|
|
1424
1424
|
typeName: B.ZodSymbol,
|
|
1425
1425
|
...W(r)
|
|
1426
1426
|
});
|
|
@@ -1496,7 +1496,7 @@ dt.create = (r) => new dt({
|
|
|
1496
1496
|
typeName: B.ZodNever,
|
|
1497
1497
|
...W(r)
|
|
1498
1498
|
});
|
|
1499
|
-
class
|
|
1499
|
+
class us extends X {
|
|
1500
1500
|
_parse(e) {
|
|
1501
1501
|
if (this._getType(e) !== k.undefined) {
|
|
1502
1502
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1509,7 +1509,7 @@ class ds extends X {
|
|
|
1509
1509
|
return Ee(e.data);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
|
|
1512
|
+
us.create = (r) => new us({
|
|
1513
1513
|
typeName: B.ZodVoid,
|
|
1514
1514
|
...W(r)
|
|
1515
1515
|
});
|
|
@@ -1963,7 +1963,7 @@ xn.create = (r, e) => new xn({
|
|
|
1963
1963
|
...W(e)
|
|
1964
1964
|
});
|
|
1965
1965
|
const nt = (r) => r instanceof En ? nt(r.schema) : r instanceof He ? nt(r.innerType()) : r instanceof An ? [r.value] : r instanceof gt ? r.options : r instanceof Tn ? q.objectValues(r.enum) : r instanceof Sn ? nt(r._def.innerType) : r instanceof yn ? [void 0] : r instanceof vn ? [null] : r instanceof $e ? [void 0, ...nt(r.unwrap())] : r instanceof yt ? [null, ...nt(r.unwrap())] : r instanceof Ri || r instanceof Mn ? nt(r.unwrap()) : r instanceof Rn ? nt(r._def.innerType) : [];
|
|
1966
|
-
class
|
|
1966
|
+
class gs extends X {
|
|
1967
1967
|
_parse(e) {
|
|
1968
1968
|
const { ctx: t } = this._processInputParams(e);
|
|
1969
1969
|
if (t.parsedType !== k.object)
|
|
@@ -2016,7 +2016,7 @@ class _s extends X {
|
|
|
2016
2016
|
s.set(a, i);
|
|
2017
2017
|
}
|
|
2018
2018
|
}
|
|
2019
|
-
return new
|
|
2019
|
+
return new gs({
|
|
2020
2020
|
typeName: B.ZodDiscriminatedUnion,
|
|
2021
2021
|
discriminator: e,
|
|
2022
2022
|
options: t,
|
|
@@ -2180,7 +2180,7 @@ class wn extends X {
|
|
|
2180
2180
|
});
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
|
-
class
|
|
2183
|
+
class hs extends X {
|
|
2184
2184
|
get keySchema() {
|
|
2185
2185
|
return this._def.keyType;
|
|
2186
2186
|
}
|
|
@@ -2222,7 +2222,7 @@ class us extends X {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
}
|
|
2224
2224
|
}
|
|
2225
|
-
|
|
2225
|
+
hs.create = (r, e, t) => new hs({
|
|
2226
2226
|
valueType: e,
|
|
2227
2227
|
keyType: r,
|
|
2228
2228
|
typeName: B.ZodMap,
|
|
@@ -2305,13 +2305,13 @@ class Xt extends X {
|
|
|
2305
2305
|
received: t.parsedType
|
|
2306
2306
|
}), H;
|
|
2307
2307
|
function n(a, c) {
|
|
2308
|
-
return
|
|
2308
|
+
return cs({
|
|
2309
2309
|
data: a,
|
|
2310
2310
|
path: t.path,
|
|
2311
2311
|
errorMaps: [
|
|
2312
2312
|
t.common.contextualErrorMap,
|
|
2313
2313
|
t.schemaErrorMap,
|
|
2314
|
-
|
|
2314
|
+
as(),
|
|
2315
2315
|
Kt
|
|
2316
2316
|
].filter((l) => !!l),
|
|
2317
2317
|
issueData: {
|
|
@@ -2321,13 +2321,13 @@ class Xt extends X {
|
|
|
2321
2321
|
});
|
|
2322
2322
|
}
|
|
2323
2323
|
function s(a, c) {
|
|
2324
|
-
return
|
|
2324
|
+
return cs({
|
|
2325
2325
|
data: a,
|
|
2326
2326
|
path: t.path,
|
|
2327
2327
|
errorMaps: [
|
|
2328
2328
|
t.common.contextualErrorMap,
|
|
2329
2329
|
t.schemaErrorMap,
|
|
2330
|
-
|
|
2330
|
+
as(),
|
|
2331
2331
|
Kt
|
|
2332
2332
|
].filter((l) => !!l),
|
|
2333
2333
|
issueData: {
|
|
@@ -2448,7 +2448,7 @@ class gt extends X {
|
|
|
2448
2448
|
code: A.invalid_type
|
|
2449
2449
|
}), H;
|
|
2450
2450
|
}
|
|
2451
|
-
if (
|
|
2451
|
+
if (ls(this, un) || $r(this, un, new Set(this._def.values)), !ls(this, un).has(e.data)) {
|
|
2452
2452
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2453
2453
|
return M(t, {
|
|
2454
2454
|
received: t.data,
|
|
@@ -2508,7 +2508,7 @@ class Tn extends X {
|
|
|
2508
2508
|
code: A.invalid_type
|
|
2509
2509
|
}), H;
|
|
2510
2510
|
}
|
|
2511
|
-
if (
|
|
2511
|
+
if (ls(this, hn) || $r(this, hn, new Set(q.getValidEnumValues(this._def.values))), !ls(this, hn).has(e.data)) {
|
|
2512
2512
|
const s = q.objectValues(t);
|
|
2513
2513
|
return M(n, {
|
|
2514
2514
|
received: n.data,
|
|
@@ -2730,7 +2730,7 @@ Rn.create = (r, e) => new Rn({
|
|
|
2730
2730
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2731
2731
|
...W(e)
|
|
2732
2732
|
});
|
|
2733
|
-
class
|
|
2733
|
+
class fs extends X {
|
|
2734
2734
|
_parse(e) {
|
|
2735
2735
|
if (this._getType(e) !== k.nan) {
|
|
2736
2736
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2743,7 +2743,7 @@ class hs extends X {
|
|
|
2743
2743
|
return { status: "valid", value: e.data };
|
|
2744
2744
|
}
|
|
2745
2745
|
}
|
|
2746
|
-
|
|
2746
|
+
fs.create = (r) => new fs({
|
|
2747
2747
|
typeName: B.ZodNaN,
|
|
2748
2748
|
...W(r)
|
|
2749
2749
|
});
|
|
@@ -2846,7 +2846,7 @@ var B;
|
|
|
2846
2846
|
})(B || (B = {}));
|
|
2847
2847
|
const Ba = (r, e = {
|
|
2848
2848
|
message: `Input not instance of ${r.name}`
|
|
2849
|
-
}) => Qr((t) => t instanceof r, e), eo = je.create, to = pt.create, Ha =
|
|
2849
|
+
}) => Qr((t) => t instanceof r, e), eo = je.create, to = pt.create, Ha = fs.create, Va = _t.create, no = gn.create, Ga = Rt.create, Za = ds.create, Wa = yn.create, Xa = vn.create, $a = qt.create, Ya = At.create, Ka = dt.create, qa = us.create, Ja = Be.create, Qa = ie.create, ec = ie.strictCreate, tc = xn.create, nc = gs.create, sc = bn.create, ic = Ke.create, rc = wn.create, oc = hs.create, ac = Mt.create, cc = Xt.create, lc = En.create, dc = An.create, uc = gt.create, hc = Tn.create, fc = Jt.create, rr = He.create, mc = $e.create, pc = yt.create, _c = He.createWithPreprocess, gc = Nn.create, yc = () => eo().optional(), vc = () => to().optional(), xc = () => no().optional(), bc = {
|
|
2850
2850
|
string: (r) => je.create({ ...r, coerce: !0 }),
|
|
2851
2851
|
number: (r) => pt.create({ ...r, coerce: !0 }),
|
|
2852
2852
|
boolean: (r) => gn.create({
|
|
@@ -2860,8 +2860,8 @@ var E = /* @__PURE__ */ Object.freeze({
|
|
|
2860
2860
|
__proto__: null,
|
|
2861
2861
|
defaultErrorMap: Kt,
|
|
2862
2862
|
setErrorMap: _a,
|
|
2863
|
-
getErrorMap:
|
|
2864
|
-
makeIssue:
|
|
2863
|
+
getErrorMap: as,
|
|
2864
|
+
makeIssue: cs,
|
|
2865
2865
|
EMPTY_PATH: ga,
|
|
2866
2866
|
addIssueToContext: M,
|
|
2867
2867
|
ParseStatus: xe,
|
|
@@ -2887,21 +2887,21 @@ var E = /* @__PURE__ */ Object.freeze({
|
|
|
2887
2887
|
ZodBigInt: _t,
|
|
2888
2888
|
ZodBoolean: gn,
|
|
2889
2889
|
ZodDate: Rt,
|
|
2890
|
-
ZodSymbol:
|
|
2890
|
+
ZodSymbol: ds,
|
|
2891
2891
|
ZodUndefined: yn,
|
|
2892
2892
|
ZodNull: vn,
|
|
2893
2893
|
ZodAny: qt,
|
|
2894
2894
|
ZodUnknown: At,
|
|
2895
2895
|
ZodNever: dt,
|
|
2896
|
-
ZodVoid:
|
|
2896
|
+
ZodVoid: us,
|
|
2897
2897
|
ZodArray: Be,
|
|
2898
2898
|
ZodObject: ie,
|
|
2899
2899
|
ZodUnion: xn,
|
|
2900
|
-
ZodDiscriminatedUnion:
|
|
2900
|
+
ZodDiscriminatedUnion: gs,
|
|
2901
2901
|
ZodIntersection: bn,
|
|
2902
2902
|
ZodTuple: Ke,
|
|
2903
2903
|
ZodRecord: wn,
|
|
2904
|
-
ZodMap:
|
|
2904
|
+
ZodMap: hs,
|
|
2905
2905
|
ZodSet: Mt,
|
|
2906
2906
|
ZodFunction: Xt,
|
|
2907
2907
|
ZodLazy: En,
|
|
@@ -2915,7 +2915,7 @@ var E = /* @__PURE__ */ Object.freeze({
|
|
|
2915
2915
|
ZodNullable: yt,
|
|
2916
2916
|
ZodDefault: Sn,
|
|
2917
2917
|
ZodCatch: Rn,
|
|
2918
|
-
ZodNaN:
|
|
2918
|
+
ZodNaN: fs,
|
|
2919
2919
|
BRAND: Fa,
|
|
2920
2920
|
ZodBranded: Ri,
|
|
2921
2921
|
ZodPipeline: Nn,
|
|
@@ -3015,7 +3015,7 @@ const Ec = E.object({
|
|
|
3015
3015
|
fit_offset: E.number().optional(),
|
|
3016
3016
|
height_offset: E.number().optional()
|
|
3017
3017
|
}).optional()
|
|
3018
|
-
}),
|
|
3018
|
+
}), ns = E.object({
|
|
3019
3019
|
environment: Tc.default({ type: "none" }),
|
|
3020
3020
|
models: E.array(Sc).default([])
|
|
3021
3021
|
});
|
|
@@ -3040,7 +3040,7 @@ const j = {
|
|
|
3040
3040
|
super();
|
|
3041
3041
|
_(this, "settings");
|
|
3042
3042
|
try {
|
|
3043
|
-
const n =
|
|
3043
|
+
const n = ns.parse({}), s = {
|
|
3044
3044
|
...n,
|
|
3045
3045
|
...t,
|
|
3046
3046
|
environment: {
|
|
@@ -3049,7 +3049,7 @@ const j = {
|
|
|
3049
3049
|
},
|
|
3050
3050
|
models: t.models || n.models
|
|
3051
3051
|
};
|
|
3052
|
-
this.settings =
|
|
3052
|
+
this.settings = ns.parse(s), j.info("Settings initialized:", this.settings);
|
|
3053
3053
|
} catch (n) {
|
|
3054
3054
|
throw j.error("Error initializing settings:", n), n;
|
|
3055
3055
|
}
|
|
@@ -3072,7 +3072,7 @@ const j = {
|
|
|
3072
3072
|
return this.settings[t];
|
|
3073
3073
|
}
|
|
3074
3074
|
update(t) {
|
|
3075
|
-
const n =
|
|
3075
|
+
const n = ns.parse({
|
|
3076
3076
|
...this.settings,
|
|
3077
3077
|
...t,
|
|
3078
3078
|
environment: {
|
|
@@ -3119,7 +3119,7 @@ const cr = { type: "change" }, Mi = { type: "start" }, so = { type: "end" }, Gn
|
|
|
3119
3119
|
TOUCH_PAN: 4,
|
|
3120
3120
|
TOUCH_DOLLY_PAN: 5,
|
|
3121
3121
|
TOUCH_DOLLY_ROTATE: 6
|
|
3122
|
-
},
|
|
3122
|
+
}, Ds = 1e-6;
|
|
3123
3123
|
class Mc extends ko {
|
|
3124
3124
|
/**
|
|
3125
3125
|
* Constructs a new controls instance.
|
|
@@ -3128,7 +3128,7 @@ class Mc extends ko {
|
|
|
3128
3128
|
* @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
|
|
3129
3129
|
*/
|
|
3130
3130
|
constructor(e, t = null) {
|
|
3131
|
-
super(e, t), this.state = te.NONE, this.target = new J(), this.cursor = new J(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Wt.ROTATE, MIDDLE: Wt.DOLLY, RIGHT: Wt.PAN }, this.touches = { ONE: Bt.ROTATE, TWO: Bt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new J(), this._lastQuaternion = new
|
|
3131
|
+
super(e, t), this.state = te.NONE, this.target = new J(), this.cursor = new J(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Wt.ROTATE, MIDDLE: Wt.DOLLY, RIGHT: Wt.PAN }, this.touches = { ONE: Bt.ROTATE, TWO: Bt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new J(), this._lastQuaternion = new rs(), this._lastTargetPosition = new J(), this._quat = new rs().setFromUnitVectors(e.up, new J(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ki(), this._sphericalDelta = new Ki(), this._scale = 1, this._panOffset = new J(), this._rotateStart = new ke(), this._rotateEnd = new ke(), this._rotateDelta = new ke(), this._panStart = new ke(), this._panEnd = new ke(), this._panDelta = new ke(), this._dollyStart = new ke(), this._dollyEnd = new ke(), this._dollyDelta = new ke(), this._dollyDirection = new J(), this._mouse = new ke(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = kc.bind(this), this._onPointerDown = Lc.bind(this), this._onPointerUp = Cc.bind(this), this._onContextMenu = Uc.bind(this), this._onMouseWheel = Ic.bind(this), this._onKeyDown = Nc.bind(this), this._onTouchStart = Pc.bind(this), this._onTouchMove = zc.bind(this), this._onMouseDown = Oc.bind(this), this._onMouseMove = Dc.bind(this), this._interceptControlDown = Fc.bind(this), this._interceptControlUp = jc.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
3132
3132
|
}
|
|
3133
3133
|
connect(e) {
|
|
3134
3134
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -3224,7 +3224,7 @@ class Mc extends ko {
|
|
|
3224
3224
|
const o = this.object.zoom;
|
|
3225
3225
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
|
|
3226
3226
|
}
|
|
3227
|
-
return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) >
|
|
3227
|
+
return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > Ds || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Ds || this._lastTargetPosition.distanceToSquared(this.target) > Ds ? (this.dispatchEvent(cr), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
3228
3228
|
}
|
|
3229
3229
|
_getAutoRotationAngle(e) {
|
|
3230
3230
|
return e !== null ? Le / 60 * this.autoRotateSpeed * e : Le / 60 / 60 * this.autoRotateSpeed;
|
|
@@ -4073,12 +4073,12 @@ class Zc extends Do {
|
|
|
4073
4073
|
const b = h(x), w = b.width, T = b.height, v = f(x.subarray(x.pos), w, T);
|
|
4074
4074
|
let P, V, F;
|
|
4075
4075
|
switch (this.type) {
|
|
4076
|
-
case
|
|
4076
|
+
case Ls:
|
|
4077
4077
|
F = v.length / 4;
|
|
4078
4078
|
const L = new Float32Array(F * 4);
|
|
4079
4079
|
for (let C = 0; C < F; C++)
|
|
4080
4080
|
g(v, C * 4, L, C * 4);
|
|
4081
|
-
P = L, V =
|
|
4081
|
+
P = L, V = Ls;
|
|
4082
4082
|
break;
|
|
4083
4083
|
case ft:
|
|
4084
4084
|
F = v.length / 4;
|
|
@@ -4112,7 +4112,7 @@ class Zc extends Do {
|
|
|
4112
4112
|
load(e, t, n, s) {
|
|
4113
4113
|
function i(o, a) {
|
|
4114
4114
|
switch (o.type) {
|
|
4115
|
-
case
|
|
4115
|
+
case Ls:
|
|
4116
4116
|
case ft:
|
|
4117
4117
|
o.colorSpace = Pe, o.minFilter = Yt, o.magFilter = Yt, o.generateMipmaps = !1, o.flipY = !0;
|
|
4118
4118
|
break;
|
|
@@ -4601,7 +4601,7 @@ class $c extends zo {
|
|
|
4601
4601
|
super();
|
|
4602
4602
|
const e = new Fr();
|
|
4603
4603
|
e.deleteAttribute("uv");
|
|
4604
|
-
const t = new
|
|
4604
|
+
const t = new os({ side: Ur }), n = new os(), s = new jr(16777215, 900, 28, 2);
|
|
4605
4605
|
s.position.set(0.418, 16.199, 0.3), this.add(s);
|
|
4606
4606
|
const i = new ye(e, t);
|
|
4607
4607
|
i.position.set(-0.757, 13.219, 0.717), i.scale.set(31.713, 28.305, 28.591), this.add(i);
|
|
@@ -4690,7 +4690,7 @@ const Ce = {
|
|
|
4690
4690
|
INVALID_STORY_JSON: "INVALID_STORY_JSON",
|
|
4691
4691
|
INVALID_SLIDE_INDEX: "INVALID_SLIDE_INDEX"
|
|
4692
4692
|
};
|
|
4693
|
-
function
|
|
4693
|
+
function Zn(r) {
|
|
4694
4694
|
const e = r;
|
|
4695
4695
|
e && typeof e.dispose == "function" && e.dispose();
|
|
4696
4696
|
}
|
|
@@ -4750,7 +4750,7 @@ class Yc extends EventTarget {
|
|
|
4750
4750
|
}
|
|
4751
4751
|
}
|
|
4752
4752
|
clear_environment() {
|
|
4753
|
-
this.scene.background = null, this.scene.environment = null, this.sky = null, this.texture = null, this.last_sky_dir = null, this.sky_env_rt && (
|
|
4753
|
+
this.scene.background = null, this.scene.environment = null, this.sky = null, this.texture = null, this.last_sky_dir = null, this.sky_env_rt && (Zn(this.sky_env_rt), this.sky_env_rt = null);
|
|
4754
4754
|
}
|
|
4755
4755
|
set_sky_environment() {
|
|
4756
4756
|
const t = new Ln();
|
|
@@ -4780,14 +4780,14 @@ class Yc extends EventTarget {
|
|
|
4780
4780
|
const l = new p.Scene();
|
|
4781
4781
|
l.add(a), this.sky_pmrem || (this.sky_pmrem = new p.PMREMGenerator(this.renderer));
|
|
4782
4782
|
const d = this.sky_pmrem.fromScene(l, 0, 0.1, 500);
|
|
4783
|
-
this.sky_env_rt && this.sky_env_rt
|
|
4783
|
+
this.sky_env_rt && Zn(this.sky_env_rt), this.sky_env_rt = d, this.scene.environment = d.texture, this.scene.environmentIntensity = 0.4, l.remove(a), a.geometry.dispose(), a.material.dispose();
|
|
4784
4784
|
} catch (n) {
|
|
4785
4785
|
j.warn("Skipping sky environment rebuild:", n);
|
|
4786
4786
|
}
|
|
4787
4787
|
}
|
|
4788
4788
|
set_room_environment() {
|
|
4789
4789
|
const t = new $c(), s = new p.PMREMGenerator(this.renderer).fromScene(t).texture;
|
|
4790
|
-
this.scene.background = s, this.scene.environment = s;
|
|
4790
|
+
this.scene.background = s, this.scene.environment = s, this.scene.environmentIntensity = 1;
|
|
4791
4791
|
}
|
|
4792
4792
|
set_color_environment(t = 16777215) {
|
|
4793
4793
|
this.scene.background = new p.Color(t);
|
|
@@ -4803,7 +4803,7 @@ class Yc extends EventTarget {
|
|
|
4803
4803
|
try {
|
|
4804
4804
|
this.texture = c;
|
|
4805
4805
|
const l = s.fromEquirectangular(c).texture;
|
|
4806
|
-
this.scene.background = l, this.scene.environment = l, c.dispose(), s.dispose(), this.dispatchEvent(new CustomEvent("textureloaded", { detail: { texture: c } })), this.settings.dispatchEvent(new CustomEvent("environmentTextureLoaded", { detail: { texture: c } })), o();
|
|
4806
|
+
this.scene.background = l, this.scene.environment = l, this.scene.environmentIntensity = 1, c.dispose(), s.dispose(), this.dispatchEvent(new CustomEvent("textureloaded", { detail: { texture: c } })), this.settings.dispatchEvent(new CustomEvent("environmentTextureLoaded", { detail: { texture: c } })), o();
|
|
4807
4807
|
} catch (l) {
|
|
4808
4808
|
a(l);
|
|
4809
4809
|
}
|
|
@@ -4826,7 +4826,7 @@ class Yc extends EventTarget {
|
|
|
4826
4826
|
}
|
|
4827
4827
|
dispose() {
|
|
4828
4828
|
var t, n;
|
|
4829
|
-
this.clear_environment(), this.ambient && (this.scene.remove(this.ambient), (n = (t = this.ambient).dispose) == null || n.call(t), this.ambient = null), this.env_map && (this.env_map.dispose(), this.env_map = null), this.sky_env_rt && (
|
|
4829
|
+
this.clear_environment(), this.ambient && (this.scene.remove(this.ambient), (n = (t = this.ambient).dispose) == null || n.call(t), this.ambient = null), this.env_map && (this.env_map.dispose(), this.env_map = null), this.sky_env_rt && (Zn(this.sky_env_rt), this.sky_env_rt = null), this.sky_pmrem && (Zn(this.sky_pmrem), this.sky_pmrem = null), this.last_sky_dir = null, this.texture && (this.texture.dispose(), this.texture = null), this.sky && (this.scene.remove(this.sky), this.sky = null);
|
|
4830
4830
|
}
|
|
4831
4831
|
}
|
|
4832
4832
|
function dr(r) {
|
|
@@ -5151,7 +5151,7 @@ function hr(r, e) {
|
|
|
5151
5151
|
} else
|
|
5152
5152
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), r;
|
|
5153
5153
|
}
|
|
5154
|
-
const fr = new
|
|
5154
|
+
const fr = new _s(), Wn = new J();
|
|
5155
5155
|
class Li extends Fo {
|
|
5156
5156
|
/**
|
|
5157
5157
|
* Constructs a new line segments geometry.
|
|
@@ -5236,7 +5236,7 @@ class Li extends Fo {
|
|
|
5236
5236
|
return this.setPositions(t.attributes.position.array), this;
|
|
5237
5237
|
}
|
|
5238
5238
|
computeBoundingBox() {
|
|
5239
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
5239
|
+
this.boundingBox === null && (this.boundingBox = new _s());
|
|
5240
5240
|
const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
|
|
5241
5241
|
e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), fr.setFromBufferAttribute(t), this.boundingBox.union(fr));
|
|
5242
5242
|
}
|
|
@@ -5248,14 +5248,14 @@ class Li extends Fo {
|
|
|
5248
5248
|
this.boundingBox.getCenter(n);
|
|
5249
5249
|
let s = 0;
|
|
5250
5250
|
for (let i = 0, o = e.count; i < o; i++)
|
|
5251
|
-
|
|
5251
|
+
Wn.fromBufferAttribute(e, i), s = Math.max(s, n.distanceToSquared(Wn)), Wn.fromBufferAttribute(t, i), s = Math.max(s, n.distanceToSquared(Wn));
|
|
5252
5252
|
this.boundingSphere.radius = Math.sqrt(s), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
|
|
5253
5253
|
}
|
|
5254
5254
|
}
|
|
5255
5255
|
toJSON() {
|
|
5256
5256
|
}
|
|
5257
5257
|
}
|
|
5258
|
-
|
|
5258
|
+
ts.line = {
|
|
5259
5259
|
worldUnits: { value: 1 },
|
|
5260
5260
|
linewidth: { value: 1 },
|
|
5261
5261
|
resolution: { value: new ke(1, 1) },
|
|
@@ -5265,11 +5265,11 @@ es.line = {
|
|
|
5265
5265
|
gapSize: { value: 1 }
|
|
5266
5266
|
// todo FIX - maybe change to totalSize
|
|
5267
5267
|
};
|
|
5268
|
-
|
|
5268
|
+
es.line = {
|
|
5269
5269
|
uniforms: Ai.merge([
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5270
|
+
ts.common,
|
|
5271
|
+
ts.fog,
|
|
5272
|
+
ts.line
|
|
5273
5273
|
]),
|
|
5274
5274
|
vertexShader: (
|
|
5275
5275
|
/* glsl */
|
|
@@ -5663,9 +5663,9 @@ class ao extends Ei {
|
|
|
5663
5663
|
constructor(e) {
|
|
5664
5664
|
super({
|
|
5665
5665
|
type: "LineMaterial",
|
|
5666
|
-
uniforms: Ai.clone(
|
|
5667
|
-
vertexShader:
|
|
5668
|
-
fragmentShader:
|
|
5666
|
+
uniforms: Ai.clone(es.line.uniforms),
|
|
5667
|
+
vertexShader: es.line.vertexShader,
|
|
5668
|
+
fragmentShader: es.line.fragmentShader,
|
|
5669
5669
|
clipping: !0
|
|
5670
5670
|
// required for clipping support
|
|
5671
5671
|
}), this.isLineMaterial = !0, this.setValues(e);
|
|
@@ -5805,7 +5805,7 @@ class ao extends Ei {
|
|
|
5805
5805
|
this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
|
|
5806
5806
|
}
|
|
5807
5807
|
}
|
|
5808
|
-
const Ns = new In(), mr = new J(), pr = new J(), fe = new In(), me = new In(), Ge = new In(), Ps = new J(), zs = new pn(), _e = new Bo(), _r = new J(),
|
|
5808
|
+
const Ns = new In(), mr = new J(), pr = new J(), fe = new In(), me = new In(), Ge = new In(), Ps = new J(), zs = new pn(), _e = new Bo(), _r = new J(), Xn = new _s(), $n = new Ti(), Ze = new In();
|
|
5809
5809
|
let Xe, Tt;
|
|
5810
5810
|
function gr(r, e, t) {
|
|
5811
5811
|
return Ze.set(0, 0, -e, 1).applyMatrix4(r.projectionMatrix), Ze.multiplyScalar(1 / Ze.w), Ze.x = Tt / t.width, Ze.y = Tt / t.height, Ze.applyMatrix4(r.projectionMatrixInverse), Ze.multiplyScalar(1 / Ze.w), Math.abs(Math.max(Ze.x, Ze.y));
|
|
@@ -5896,25 +5896,25 @@ class yr extends ye {
|
|
|
5896
5896
|
const i = e.params.Line2 !== void 0 && e.params.Line2.threshold || 0;
|
|
5897
5897
|
Xe = e.ray;
|
|
5898
5898
|
const o = this.matrixWorld, a = this.geometry, c = this.material;
|
|
5899
|
-
Tt = c.linewidth + i, a.boundingSphere === null && a.computeBoundingSphere(),
|
|
5899
|
+
Tt = c.linewidth + i, a.boundingSphere === null && a.computeBoundingSphere(), $n.copy(a.boundingSphere).applyMatrix4(o);
|
|
5900
5900
|
let l;
|
|
5901
5901
|
if (n)
|
|
5902
5902
|
l = Tt * 0.5;
|
|
5903
5903
|
else {
|
|
5904
|
-
const u = Math.max(s.near,
|
|
5904
|
+
const u = Math.max(s.near, $n.distanceToPoint(Xe.origin));
|
|
5905
5905
|
l = gr(s, u, c.resolution);
|
|
5906
5906
|
}
|
|
5907
|
-
if (
|
|
5907
|
+
if ($n.radius += l, Xe.intersectsSphere($n) === !1)
|
|
5908
5908
|
return;
|
|
5909
|
-
a.boundingBox === null && a.computeBoundingBox(),
|
|
5909
|
+
a.boundingBox === null && a.computeBoundingBox(), Xn.copy(a.boundingBox).applyMatrix4(o);
|
|
5910
5910
|
let d;
|
|
5911
5911
|
if (n)
|
|
5912
5912
|
d = Tt * 0.5;
|
|
5913
5913
|
else {
|
|
5914
|
-
const u = Math.max(s.near,
|
|
5914
|
+
const u = Math.max(s.near, Xn.distanceToPoint(Xe.origin));
|
|
5915
5915
|
d = gr(s, u, c.resolution);
|
|
5916
5916
|
}
|
|
5917
|
-
|
|
5917
|
+
Xn.expandByScalar(d), Xe.intersectsBox(Xn) !== !1 && (n ? Tl(this, t) : Sl(this, s, t));
|
|
5918
5918
|
}
|
|
5919
5919
|
onBeforeRender(e) {
|
|
5920
5920
|
const t = this.material.uniforms;
|
|
@@ -7296,7 +7296,7 @@ class td {
|
|
|
7296
7296
|
return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((l) => {
|
|
7297
7297
|
const d = l.pop(), u = d.isGroup ? d.children : [d], h = l[0].count, f = [];
|
|
7298
7298
|
for (const g of u) {
|
|
7299
|
-
const y = new pn(), x = new J(), b = new
|
|
7299
|
+
const y = new pn(), x = new J(), b = new rs(), w = new J(1, 1, 1), T = new Go(g.geometry, g.material, h);
|
|
7300
7300
|
for (let v = 0; v < h; v++)
|
|
7301
7301
|
c.TRANSLATION && x.fromBufferAttribute(c.TRANSLATION, v), c.ROTATION && b.fromBufferAttribute(c.ROTATION, v), c.SCALE && w.fromBufferAttribute(c.SCALE, v), T.setMatrixAt(v, y.compose(x, b, w));
|
|
7302
7302
|
for (const v in c)
|
|
@@ -7406,7 +7406,7 @@ class lo extends ma {
|
|
|
7406
7406
|
return i;
|
|
7407
7407
|
}
|
|
7408
7408
|
}
|
|
7409
|
-
const od = new
|
|
7409
|
+
const od = new rs();
|
|
7410
7410
|
class ad extends lo {
|
|
7411
7411
|
interpolate_(e, t, n, s) {
|
|
7412
7412
|
const i = super.interpolate_(e, t, n, s);
|
|
@@ -7475,7 +7475,7 @@ const Ie = {
|
|
|
7475
7475
|
BLEND: "BLEND"
|
|
7476
7476
|
};
|
|
7477
7477
|
function ld(r) {
|
|
7478
|
-
return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new
|
|
7478
|
+
return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new os({
|
|
7479
7479
|
color: 16777215,
|
|
7480
7480
|
emissive: 0,
|
|
7481
7481
|
metalness: 1,
|
|
@@ -7945,11 +7945,11 @@ class pd {
|
|
|
7945
7945
|
if (e.isPoints) {
|
|
7946
7946
|
const a = "PointsMaterial:" + n.uuid;
|
|
7947
7947
|
let c = this.cache.get(a);
|
|
7948
|
-
c || (c = new Qo(),
|
|
7948
|
+
c || (c = new Qo(), ks.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
|
|
7949
7949
|
} else if (e.isLine) {
|
|
7950
7950
|
const a = "LineBasicMaterial:" + n.uuid;
|
|
7951
7951
|
let c = this.cache.get(a);
|
|
7952
|
-
c || (c = new ea(),
|
|
7952
|
+
c || (c = new ea(), ks.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
|
|
7953
7953
|
}
|
|
7954
7954
|
if (s || i || o) {
|
|
7955
7955
|
let a = "ClonedMaterial:" + n.uuid + ":";
|
|
@@ -7960,7 +7960,7 @@ class pd {
|
|
|
7960
7960
|
e.material = n;
|
|
7961
7961
|
}
|
|
7962
7962
|
getMaterialType() {
|
|
7963
|
-
return
|
|
7963
|
+
return os;
|
|
7964
7964
|
}
|
|
7965
7965
|
/**
|
|
7966
7966
|
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
@@ -8082,7 +8082,7 @@ class pd {
|
|
|
8082
8082
|
});
|
|
8083
8083
|
if (u.length === 1)
|
|
8084
8084
|
return i.extensions && bt(s, u[0], i), u[0];
|
|
8085
|
-
const h = new
|
|
8085
|
+
const h = new Cs();
|
|
8086
8086
|
i.extensions && bt(s, h, i), t.associations.set(h, { meshes: e });
|
|
8087
8087
|
for (let f = 0, g = u.length; f < g; f++)
|
|
8088
8088
|
h.add(u[f]);
|
|
@@ -8217,7 +8217,7 @@ class pd {
|
|
|
8217
8217
|
a.push(l);
|
|
8218
8218
|
}), this.nodeCache[e] = Promise.all(a).then(function(l) {
|
|
8219
8219
|
let d;
|
|
8220
|
-
if (i.isBone === !0 ? d = new ua() : l.length > 1 ? d = new
|
|
8220
|
+
if (i.isBone === !0 ? d = new ua() : l.length > 1 ? d = new Cs() : l.length === 1 ? d = l[0] : d = new Hr(), d !== l[0])
|
|
8221
8221
|
for (let u = 0, h = l.length; u < h; u++)
|
|
8222
8222
|
d.add(l[u]);
|
|
8223
8223
|
if (i.name && (d.userData.name = i.name, d.name = o), it(d, i), i.extensions && bt(n, d, i), i.matrix !== void 0) {
|
|
@@ -8236,7 +8236,7 @@ class pd {
|
|
|
8236
8236
|
* @return {Promise<Group>}
|
|
8237
8237
|
*/
|
|
8238
8238
|
loadScene(e) {
|
|
8239
|
-
const t = this.extensions, n = this.json.scenes[e], s = this, i = new
|
|
8239
|
+
const t = this.extensions, n = this.json.scenes[e], s = this, i = new Cs();
|
|
8240
8240
|
n.name && (i.name = s.createUniqueName(n.name)), it(i, n), n.extensions && bt(t, i, n);
|
|
8241
8241
|
const o = n.nodes || [], a = [];
|
|
8242
8242
|
for (let c = 0, l = o.length; c < l; c++)
|
|
@@ -8247,7 +8247,7 @@ class pd {
|
|
|
8247
8247
|
const l = (d) => {
|
|
8248
8248
|
const u = /* @__PURE__ */ new Map();
|
|
8249
8249
|
for (const [h, f] of s.associations)
|
|
8250
|
-
(h instanceof
|
|
8250
|
+
(h instanceof ks || h instanceof Qi) && u.set(h, f);
|
|
8251
8251
|
return d.traverse((h) => {
|
|
8252
8252
|
const f = s.associations.get(h);
|
|
8253
8253
|
f != null && u.set(h, f);
|
|
@@ -8316,7 +8316,7 @@ class pd {
|
|
|
8316
8316
|
}
|
|
8317
8317
|
}
|
|
8318
8318
|
function _d(r, e, t) {
|
|
8319
|
-
const n = e.attributes, s = new
|
|
8319
|
+
const n = e.attributes, s = new _s();
|
|
8320
8320
|
if (n.POSITION !== void 0) {
|
|
8321
8321
|
const a = t.json.accessors[n.POSITION], c = a.min, l = a.max;
|
|
8322
8322
|
if (c !== void 0 && l !== void 0) {
|
|
@@ -8855,12 +8855,12 @@ const bd = E.object({
|
|
|
8855
8855
|
y: E.number(),
|
|
8856
8856
|
z: E.number()
|
|
8857
8857
|
})
|
|
8858
|
-
}),
|
|
8858
|
+
}), ss = E.object({
|
|
8859
8859
|
id: E.string(),
|
|
8860
8860
|
title: E.string().optional(),
|
|
8861
8861
|
description: E.string().optional(),
|
|
8862
8862
|
// Glimmer settings to apply for this slide
|
|
8863
|
-
settings:
|
|
8863
|
+
settings: ns.partial(),
|
|
8864
8864
|
// Camera configuration
|
|
8865
8865
|
camera: E.object({
|
|
8866
8866
|
position: E.tuple([E.number(), E.number(), E.number()]),
|
|
@@ -8876,11 +8876,11 @@ const bd = E.object({
|
|
|
8876
8876
|
// milliseconds
|
|
8877
8877
|
easing: E.string().default("linear")
|
|
8878
8878
|
// 'linear' | 'ease-in-out' etc.
|
|
8879
|
-
}),
|
|
8879
|
+
}), Yn = E.object({
|
|
8880
8880
|
version: E.string().default("1.0.0"),
|
|
8881
8881
|
title: E.string(),
|
|
8882
8882
|
description: E.string().optional(),
|
|
8883
|
-
slides: E.array(
|
|
8883
|
+
slides: E.array(ss).min(1, "Story must have at least one slide"),
|
|
8884
8884
|
// Optional: default transition settings (for future transitions)
|
|
8885
8885
|
transition: Ed.optional()
|
|
8886
8886
|
});
|
|
@@ -8916,7 +8916,7 @@ hi || (hi = function(e) {
|
|
|
8916
8916
|
n[s - 1] = arguments[s];
|
|
8917
8917
|
return new e(...n);
|
|
8918
8918
|
});
|
|
8919
|
-
const
|
|
8919
|
+
const Kn = Te(Array.prototype.forEach), Rd = Te(Array.prototype.lastIndexOf), Tr = Te(Array.prototype.pop), nn = Te(Array.prototype.push), Md = Te(Array.prototype.splice), is = Te(String.prototype.toLowerCase), Vs = Te(String.prototype.toString), Gs = Te(String.prototype.match), sn = Te(String.prototype.replace), Ld = Te(String.prototype.indexOf), kd = Te(String.prototype.trim), Fe = Te(Object.prototype.hasOwnProperty), we = Te(RegExp.prototype.test), rn = Cd(TypeError);
|
|
8920
8920
|
function Te(r) {
|
|
8921
8921
|
return function(e) {
|
|
8922
8922
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -8933,7 +8933,7 @@ function Cd(r) {
|
|
|
8933
8933
|
};
|
|
8934
8934
|
}
|
|
8935
8935
|
function Y(r, e) {
|
|
8936
|
-
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
8936
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : is;
|
|
8937
8937
|
Ar && Ar(r, null);
|
|
8938
8938
|
let n = e.length;
|
|
8939
8939
|
for (; n--; ) {
|
|
@@ -8973,7 +8973,7 @@ function on(r, e) {
|
|
|
8973
8973
|
}
|
|
8974
8974
|
return t;
|
|
8975
8975
|
}
|
|
8976
|
-
const Sr = Ae(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Zs = Ae(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ws = Ae(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Dd = Ae(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Xs = Ae(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Id = Ae(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Rr = Ae(["#text"]), Mr = Ae(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), $s = Ae(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Lr = Ae(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]),
|
|
8976
|
+
const Sr = Ae(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Zs = Ae(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ws = Ae(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Dd = Ae(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Xs = Ae(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Id = Ae(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Rr = Ae(["#text"]), Mr = Ae(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), $s = Ae(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Lr = Ae(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), qn = Ae(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Nd = ze(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Pd = ze(/<%[\w\W]*|[\w\W]*%>/gm), zd = ze(/\$\{[\w\W]*/gm), Ud = ze(/^data-[\-\w.\u00B7-\uFFFF]+$/), Fd = ze(/^aria-[\-\w]+$/), ho = ze(
|
|
8977
8977
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
8978
8978
|
// eslint-disable-line no-useless-escape
|
|
8979
8979
|
), jd = ze(/^(?:\w+script|data):/i), Bd = ze(
|
|
@@ -9083,7 +9083,7 @@ function mo() {
|
|
|
9083
9083
|
} = kr, ne = null;
|
|
9084
9084
|
const ue = Y({}, [...Sr, ...Zs, ...Ws, ...Xs, ...Rr]);
|
|
9085
9085
|
let Q = null;
|
|
9086
|
-
const ut = Y({}, [...Mr, ...$s, ...Lr, ...
|
|
9086
|
+
const ut = Y({}, [...Mr, ...$s, ...Lr, ...qn]);
|
|
9087
9087
|
let z = Object.seal(di(null, {
|
|
9088
9088
|
tagNameCheck: {
|
|
9089
9089
|
writable: !0,
|
|
@@ -9118,15 +9118,15 @@ function mo() {
|
|
|
9118
9118
|
value: null
|
|
9119
9119
|
}
|
|
9120
9120
|
}));
|
|
9121
|
-
let
|
|
9121
|
+
let ys = !0, vs = !0, ki = !1, Ci = !0, Ct = !1, Pn = !0, vt = !1, xs = !1, bs = !1, Ot = !1, zn = !1, Un = !1, Oi = !0, Di = !1;
|
|
9122
9122
|
const xo = "user-content-";
|
|
9123
|
-
let
|
|
9123
|
+
let ws = !0, Qt = !1, Dt = {}, It = null;
|
|
9124
9124
|
const Ii = Y({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
9125
9125
|
let Ni = null;
|
|
9126
9126
|
const Pi = Y({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
9127
|
-
let
|
|
9127
|
+
let Es = null;
|
|
9128
9128
|
const zi = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Fn = "http://www.w3.org/1998/Math/MathML", jn = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml";
|
|
9129
|
-
let Nt = Qe,
|
|
9129
|
+
let Nt = Qe, As = !1, Ts = null;
|
|
9130
9130
|
const bo = Y({}, [Fn, jn, Qe], Vs);
|
|
9131
9131
|
let Bn = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Hn = Y({}, ["annotation-xml"]);
|
|
9132
9132
|
const wo = Y({}, ["title", "style", "font", "a", "script"]);
|
|
@@ -9135,11 +9135,11 @@ function mo() {
|
|
|
9135
9135
|
let de = null, Pt = null;
|
|
9136
9136
|
const To = t.createElement("form"), Ui = function(m) {
|
|
9137
9137
|
return m instanceof RegExp || m instanceof Function;
|
|
9138
|
-
},
|
|
9138
|
+
}, Ss = function() {
|
|
9139
9139
|
let m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9140
9140
|
if (!(Pt && Pt === m)) {
|
|
9141
9141
|
if ((!m || typeof m != "object") && (m = {}), m = st(m), en = // eslint-disable-next-line unicorn/prefer-includes
|
|
9142
|
-
Eo.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? Ao : m.PARSER_MEDIA_TYPE, de = en === "application/xhtml+xml" ? Vs :
|
|
9142
|
+
Eo.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? Ao : m.PARSER_MEDIA_TYPE, de = en === "application/xhtml+xml" ? Vs : is, ne = Fe(m, "ALLOWED_TAGS") ? Y({}, m.ALLOWED_TAGS, de) : ue, Q = Fe(m, "ALLOWED_ATTR") ? Y({}, m.ALLOWED_ATTR, de) : ut, Ts = Fe(m, "ALLOWED_NAMESPACES") ? Y({}, m.ALLOWED_NAMESPACES, Vs) : bo, Es = Fe(m, "ADD_URI_SAFE_ATTR") ? Y(st(zi), m.ADD_URI_SAFE_ATTR, de) : zi, Ni = Fe(m, "ADD_DATA_URI_TAGS") ? Y(st(Pi), m.ADD_DATA_URI_TAGS, de) : Pi, It = Fe(m, "FORBID_CONTENTS") ? Y({}, m.FORBID_CONTENTS, de) : Ii, Re = Fe(m, "FORBID_TAGS") ? Y({}, m.FORBID_TAGS, de) : st({}), kt = Fe(m, "FORBID_ATTR") ? Y({}, m.FORBID_ATTR, de) : st({}), Dt = Fe(m, "USE_PROFILES") ? m.USE_PROFILES : !1, ys = m.ALLOW_ARIA_ATTR !== !1, vs = m.ALLOW_DATA_ATTR !== !1, ki = m.ALLOW_UNKNOWN_PROTOCOLS || !1, Ci = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ct = m.SAFE_FOR_TEMPLATES || !1, Pn = m.SAFE_FOR_XML !== !1, vt = m.WHOLE_DOCUMENT || !1, Ot = m.RETURN_DOM || !1, zn = m.RETURN_DOM_FRAGMENT || !1, Un = m.RETURN_TRUSTED_TYPE || !1, bs = m.FORCE_BODY || !1, Oi = m.SANITIZE_DOM !== !1, Di = m.SANITIZE_NAMED_PROPS || !1, ws = m.KEEP_CONTENT !== !1, Qt = m.IN_PLACE || !1, Se = m.ALLOWED_URI_REGEXP || ho, Nt = m.NAMESPACE || Qe, Bn = m.MATHML_TEXT_INTEGRATION_POINTS || Bn, Hn = m.HTML_INTEGRATION_POINTS || Hn, z = m.CUSTOM_ELEMENT_HANDLING || {}, m.CUSTOM_ELEMENT_HANDLING && Ui(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = m.CUSTOM_ELEMENT_HANDLING.tagNameCheck), m.CUSTOM_ELEMENT_HANDLING && Ui(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), m.CUSTOM_ELEMENT_HANDLING && typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ct && (vs = !1), zn && (Ot = !0), Dt && (ne = Y({}, Rr), Q = [], Dt.html === !0 && (Y(ne, Sr), Y(Q, Mr)), Dt.svg === !0 && (Y(ne, Zs), Y(Q, $s), Y(Q, qn)), Dt.svgFilters === !0 && (Y(ne, Ws), Y(Q, $s), Y(Q, qn)), Dt.mathMl === !0 && (Y(ne, Xs), Y(Q, Lr), Y(Q, qn))), m.ADD_TAGS && (typeof m.ADD_TAGS == "function" ? Je.tagCheck = m.ADD_TAGS : (ne === ue && (ne = st(ne)), Y(ne, m.ADD_TAGS, de))), m.ADD_ATTR && (typeof m.ADD_ATTR == "function" ? Je.attributeCheck = m.ADD_ATTR : (Q === ut && (Q = st(Q)), Y(Q, m.ADD_ATTR, de))), m.ADD_URI_SAFE_ATTR && Y(Es, m.ADD_URI_SAFE_ATTR, de), m.FORBID_CONTENTS && (It === Ii && (It = st(It)), Y(It, m.FORBID_CONTENTS, de)), ws && (ne["#text"] = !0), vt && Y(ne, ["html", "head", "body"]), ne.table && (Y(ne, ["tbody"]), delete Re.tbody), m.TRUSTED_TYPES_POLICY) {
|
|
9143
9143
|
if (typeof m.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
9144
9144
|
throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
9145
9145
|
if (typeof m.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -9155,8 +9155,8 @@ function mo() {
|
|
|
9155
9155
|
namespaceURI: Nt,
|
|
9156
9156
|
tagName: "template"
|
|
9157
9157
|
});
|
|
9158
|
-
const D =
|
|
9159
|
-
return
|
|
9158
|
+
const D = is(m.tagName), se = is(S.tagName);
|
|
9159
|
+
return Ts[m.namespaceURI] ? m.namespaceURI === jn ? S.namespaceURI === Qe ? D === "svg" : S.namespaceURI === Fn ? D === "svg" && (se === "annotation-xml" || Bn[se]) : !!Fi[D] : m.namespaceURI === Fn ? S.namespaceURI === Qe ? D === "math" : S.namespaceURI === jn ? D === "math" && Hn[se] : !!ji[D] : m.namespaceURI === Qe ? S.namespaceURI === jn && !Hn[se] || S.namespaceURI === Fn && !Bn[se] ? !1 : !ji[D] && (wo[D] || !Fi[D]) : !!(en === "application/xhtml+xml" && Ts[m.namespaceURI]) : !1;
|
|
9160
9160
|
}, Ve = function(m) {
|
|
9161
9161
|
nn(e.removed, {
|
|
9162
9162
|
element: m
|
|
@@ -9191,7 +9191,7 @@ function mo() {
|
|
|
9191
9191
|
}
|
|
9192
9192
|
}, Bi = function(m) {
|
|
9193
9193
|
let S = null, D = null;
|
|
9194
|
-
if (
|
|
9194
|
+
if (bs)
|
|
9195
9195
|
m = "<remove></remove>" + m;
|
|
9196
9196
|
else {
|
|
9197
9197
|
const oe = Gs(m, /^[\r\n\t ]+/);
|
|
@@ -9207,7 +9207,7 @@ function mo() {
|
|
|
9207
9207
|
if (!S || !S.documentElement) {
|
|
9208
9208
|
S = V.createDocument(Nt, "template", null);
|
|
9209
9209
|
try {
|
|
9210
|
-
S.documentElement.innerHTML =
|
|
9210
|
+
S.documentElement.innerHTML = As ? P : se;
|
|
9211
9211
|
} catch {
|
|
9212
9212
|
}
|
|
9213
9213
|
}
|
|
@@ -9221,19 +9221,19 @@ function mo() {
|
|
|
9221
9221
|
l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION,
|
|
9222
9222
|
null
|
|
9223
9223
|
);
|
|
9224
|
-
},
|
|
9224
|
+
}, Rs = function(m) {
|
|
9225
9225
|
return m instanceof u && (typeof m.nodeName != "string" || typeof m.textContent != "string" || typeof m.removeChild != "function" || !(m.attributes instanceof d) || typeof m.removeAttribute != "function" || typeof m.setAttribute != "function" || typeof m.namespaceURI != "string" || typeof m.insertBefore != "function" || typeof m.hasChildNodes != "function");
|
|
9226
9226
|
}, Vi = function(m) {
|
|
9227
9227
|
return typeof a == "function" && m instanceof a;
|
|
9228
9228
|
};
|
|
9229
9229
|
function et(U, m, S) {
|
|
9230
|
-
|
|
9230
|
+
Kn(U, (D) => {
|
|
9231
9231
|
D.call(e, m, S, Pt);
|
|
9232
9232
|
});
|
|
9233
9233
|
}
|
|
9234
9234
|
const Gi = function(m) {
|
|
9235
9235
|
let S = null;
|
|
9236
|
-
if (et(N.beforeSanitizeElements, m, null),
|
|
9236
|
+
if (et(N.beforeSanitizeElements, m, null), Rs(m))
|
|
9237
9237
|
return Ve(m), !0;
|
|
9238
9238
|
const D = de(m.nodeName);
|
|
9239
9239
|
if (et(N.uponSanitizeElement, m, {
|
|
@@ -9244,7 +9244,7 @@ function mo() {
|
|
|
9244
9244
|
if (!(Je.tagCheck instanceof Function && Je.tagCheck(D)) && (!ne[D] || Re[D])) {
|
|
9245
9245
|
if (!Re[D] && Wi(D) && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, D) || z.tagNameCheck instanceof Function && z.tagNameCheck(D)))
|
|
9246
9246
|
return !1;
|
|
9247
|
-
if (
|
|
9247
|
+
if (ws && !It[D]) {
|
|
9248
9248
|
const se = T(m) || m.parentNode, ge = w(m) || m.childNodes;
|
|
9249
9249
|
if (ge && se) {
|
|
9250
9250
|
const oe = ge.length;
|
|
@@ -9256,7 +9256,7 @@ function mo() {
|
|
|
9256
9256
|
}
|
|
9257
9257
|
return Ve(m), !0;
|
|
9258
9258
|
}
|
|
9259
|
-
return m instanceof c && !So(m) || (D === "noscript" || D === "noembed" || D === "noframes") && we(/<\/no(script|embed|frames)/i, m.innerHTML) ? (Ve(m), !0) : (Ct && m.nodeType === an.text && (S = m.textContent,
|
|
9259
|
+
return m instanceof c && !So(m) || (D === "noscript" || D === "noembed" || D === "noframes") && we(/<\/no(script|embed|frames)/i, m.innerHTML) ? (Ve(m), !0) : (Ct && m.nodeType === an.text && (S = m.textContent, Kn([G, Z, O], (se) => {
|
|
9260
9260
|
S = sn(S, se, " ");
|
|
9261
9261
|
}), m.textContent !== S && (nn(e.removed, {
|
|
9262
9262
|
element: m.cloneNode()
|
|
@@ -9264,8 +9264,8 @@ function mo() {
|
|
|
9264
9264
|
}, Zi = function(m, S, D) {
|
|
9265
9265
|
if (Oi && (S === "id" || S === "name") && (D in t || D in To))
|
|
9266
9266
|
return !1;
|
|
9267
|
-
if (!(
|
|
9268
|
-
if (!(
|
|
9267
|
+
if (!(vs && !kt[S] && we(ee, S))) {
|
|
9268
|
+
if (!(ys && we($, S))) {
|
|
9269
9269
|
if (!(Je.attributeCheck instanceof Function && Je.attributeCheck(S, m))) {
|
|
9270
9270
|
if (!Q[S] || kt[S]) {
|
|
9271
9271
|
if (
|
|
@@ -9276,7 +9276,7 @@ function mo() {
|
|
|
9276
9276
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
9277
9277
|
S === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, D) || z.tagNameCheck instanceof Function && z.tagNameCheck(D)))
|
|
9278
9278
|
) return !1;
|
|
9279
|
-
} else if (!
|
|
9279
|
+
} else if (!Es[S]) {
|
|
9280
9280
|
if (!we(Se, sn(D, le, ""))) {
|
|
9281
9281
|
if (!((S === "src" || S === "xlink:href" || S === "href") && m !== "script" && Ld(D, "data:") === 0 && Ni[m])) {
|
|
9282
9282
|
if (!(ki && !we(be, sn(D, le, "")))) {
|
|
@@ -9297,7 +9297,7 @@ function mo() {
|
|
|
9297
9297
|
const {
|
|
9298
9298
|
attributes: S
|
|
9299
9299
|
} = m;
|
|
9300
|
-
if (!S ||
|
|
9300
|
+
if (!S || Rs(m))
|
|
9301
9301
|
return;
|
|
9302
9302
|
const D = {
|
|
9303
9303
|
attrName: "",
|
|
@@ -9312,8 +9312,8 @@ function mo() {
|
|
|
9312
9312
|
name: oe,
|
|
9313
9313
|
namespaceURI: Me,
|
|
9314
9314
|
value: tt
|
|
9315
|
-
} = ge, zt = de(oe),
|
|
9316
|
-
let he = oe === "value" ?
|
|
9315
|
+
} = ge, zt = de(oe), Ms = tt;
|
|
9316
|
+
let he = oe === "value" ? Ms : kd(Ms);
|
|
9317
9317
|
if (D.attrName = zt, D.attrValue = he, D.keepAttr = !0, D.forceKeepAttr = void 0, et(N.uponSanitizeAttribute, m, D), he = D.attrValue, Di && (zt === "id" || zt === "name") && (xt(oe, m), he = xo + he), Pn && we(/((--!?|])>)|<\/(style|title|textarea)/i, he)) {
|
|
9318
9318
|
xt(oe, m);
|
|
9319
9319
|
continue;
|
|
@@ -9332,7 +9332,7 @@ function mo() {
|
|
|
9332
9332
|
xt(oe, m);
|
|
9333
9333
|
continue;
|
|
9334
9334
|
}
|
|
9335
|
-
Ct &&
|
|
9335
|
+
Ct && Kn([G, Z, O], (Yi) => {
|
|
9336
9336
|
he = sn(he, Yi, " ");
|
|
9337
9337
|
});
|
|
9338
9338
|
const $i = de(m.nodeName);
|
|
@@ -9351,9 +9351,9 @@ function mo() {
|
|
|
9351
9351
|
break;
|
|
9352
9352
|
}
|
|
9353
9353
|
}
|
|
9354
|
-
if (he !==
|
|
9354
|
+
if (he !== Ms)
|
|
9355
9355
|
try {
|
|
9356
|
-
Me ? m.setAttributeNS(Me, oe, he) : m.setAttribute(oe, he),
|
|
9356
|
+
Me ? m.setAttributeNS(Me, oe, he) : m.setAttribute(oe, he), Rs(m) ? Ve(m) : Tr(e.removed);
|
|
9357
9357
|
} catch {
|
|
9358
9358
|
xt(oe, m);
|
|
9359
9359
|
}
|
|
@@ -9368,7 +9368,7 @@ function mo() {
|
|
|
9368
9368
|
};
|
|
9369
9369
|
return e.sanitize = function(U) {
|
|
9370
9370
|
let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = null, D = null, se = null, ge = null;
|
|
9371
|
-
if (
|
|
9371
|
+
if (As = !U, As && (U = "<!-->"), typeof U != "string" && !Vi(U))
|
|
9372
9372
|
if (typeof U.toString == "function") {
|
|
9373
9373
|
if (U = U.toString(), typeof U != "string")
|
|
9374
9374
|
throw rn("dirty is not a string, aborting");
|
|
@@ -9376,7 +9376,7 @@ function mo() {
|
|
|
9376
9376
|
throw rn("toString is not a function");
|
|
9377
9377
|
if (!e.isSupported)
|
|
9378
9378
|
return U;
|
|
9379
|
-
if (
|
|
9379
|
+
if (xs || Ss(m), e.removed = [], typeof U == "string" && (Qt = !1), Qt) {
|
|
9380
9380
|
if (U.nodeName) {
|
|
9381
9381
|
const tt = de(U.nodeName);
|
|
9382
9382
|
if (!ne[tt] || Re[tt])
|
|
@@ -9391,7 +9391,7 @@ function mo() {
|
|
|
9391
9391
|
if (S = Bi(U), !S)
|
|
9392
9392
|
return Ot ? null : Un ? P : "";
|
|
9393
9393
|
}
|
|
9394
|
-
S &&
|
|
9394
|
+
S && bs && Ve(S.firstChild);
|
|
9395
9395
|
const oe = Hi(Qt ? U : S);
|
|
9396
9396
|
for (; se = oe.nextNode(); )
|
|
9397
9397
|
Gi(se), Xi(se), se.content instanceof i && Ro(se.content);
|
|
@@ -9407,16 +9407,16 @@ function mo() {
|
|
|
9407
9407
|
}
|
|
9408
9408
|
let Me = vt ? S.outerHTML : S.innerHTML;
|
|
9409
9409
|
return vt && ne["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && we(fo, S.ownerDocument.doctype.name) && (Me = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
|
|
9410
|
-
` + Me), Ct &&
|
|
9410
|
+
` + Me), Ct && Kn([G, Z, O], (tt) => {
|
|
9411
9411
|
Me = sn(Me, tt, " ");
|
|
9412
9412
|
}), v && Un ? v.createHTML(Me) : Me;
|
|
9413
9413
|
}, e.setConfig = function() {
|
|
9414
9414
|
let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9415
|
-
|
|
9415
|
+
Ss(U), xs = !0;
|
|
9416
9416
|
}, e.clearConfig = function() {
|
|
9417
|
-
Pt = null,
|
|
9417
|
+
Pt = null, xs = !1;
|
|
9418
9418
|
}, e.isValidAttribute = function(U, m, S) {
|
|
9419
|
-
Pt ||
|
|
9419
|
+
Pt || Ss({});
|
|
9420
9420
|
const D = de(U), se = de(m);
|
|
9421
9421
|
return Zi(D, se, S);
|
|
9422
9422
|
}, e.addHook = function(U, m) {
|
|
@@ -10086,7 +10086,7 @@ function nu(r) {
|
|
|
10086
10086
|
const e = r.prev, t = r, n = r.next, s = e.x, i = t.x, o = n.x, a = e.y, c = t.y, l = n.y, d = Math.min(s, i, o), u = Math.min(a, c, l), h = Math.max(s, i, o), f = Math.max(a, c, l);
|
|
10087
10087
|
let g = n.next;
|
|
10088
10088
|
for (; g !== e; ) {
|
|
10089
|
-
if (g.x >= d && g.x <= h && g.y >= u && g.y <= f && !(s === g.x && a === g.y) &&
|
|
10089
|
+
if (g.x >= d && g.x <= h && g.y >= u && g.y <= f && !(s === g.x && a === g.y) && ps(s, a, i, c, o, l, g.x, g.y) && ae(g.prev, g, g.next) >= 0) return !1;
|
|
10090
10090
|
g = g.next;
|
|
10091
10091
|
}
|
|
10092
10092
|
return !0;
|
|
@@ -10095,12 +10095,12 @@ function su(r, e, t, n) {
|
|
|
10095
10095
|
const s = r.prev, i = r, o = r.next, a = s.x, c = i.x, l = o.x, d = s.y, u = i.y, h = o.y, f = Math.min(a, c, l), g = Math.min(d, u, h), y = Math.max(a, c, l), x = Math.max(d, u, h), b = vi(f, g, e, t, n), w = vi(y, x, e, t, n);
|
|
10096
10096
|
let T = r.prevZ;
|
|
10097
10097
|
for (; T && T.z >= b; ) {
|
|
10098
|
-
if (T.x >= f && T.x <= y && T.y >= g && T.y <= x && T !== o && !(a === T.x && d === T.y) &&
|
|
10098
|
+
if (T.x >= f && T.x <= y && T.y >= g && T.y <= x && T !== o && !(a === T.x && d === T.y) && ps(a, d, c, u, l, h, T.x, T.y) && ae(T.prev, T, T.next) >= 0) return !1;
|
|
10099
10099
|
T = T.prevZ;
|
|
10100
10100
|
}
|
|
10101
10101
|
let v = r.nextZ;
|
|
10102
10102
|
for (; v && v.z <= w; ) {
|
|
10103
|
-
if (v.x >= f && v.x <= y && v.y >= g && v.y <= x && v !== o && !(a === v.x && d === v.y) &&
|
|
10103
|
+
if (v.x >= f && v.x <= y && v.y >= g && v.y <= x && v !== o && !(a === v.x && d === v.y) && ps(a, d, c, u, l, h, v.x, v.y) && ae(v.prev, v, v.next) >= 0) return !1;
|
|
10104
10104
|
v = v.nextZ;
|
|
10105
10105
|
}
|
|
10106
10106
|
return !0;
|
|
@@ -10154,16 +10154,16 @@ function cu(r, e) {
|
|
|
10154
10154
|
return go(t, s.next), Lt(n, n.next), Lt(t, t.next);
|
|
10155
10155
|
}
|
|
10156
10156
|
const _o = 16;
|
|
10157
|
-
let re = new Float64Array(0),
|
|
10157
|
+
let re = new Float64Array(0), ms = 0;
|
|
10158
10158
|
const gi = [], yi = [];
|
|
10159
10159
|
function lu(r, e) {
|
|
10160
10160
|
const t = Math.ceil((r + 2 * e) / _o) + e + 2;
|
|
10161
|
-
re.length < t * 4 && (re = new Float64Array(t * 4)),
|
|
10161
|
+
re.length < t * 4 && (re = new Float64Array(t * 4)), ms = 0;
|
|
10162
10162
|
}
|
|
10163
10163
|
function go(r, e) {
|
|
10164
10164
|
let t = r;
|
|
10165
10165
|
do {
|
|
10166
|
-
const n =
|
|
10166
|
+
const n = ms++;
|
|
10167
10167
|
gi[n] = t;
|
|
10168
10168
|
let s = t.x, i = t.y, o = t.x, a = t.y, c = 0;
|
|
10169
10169
|
do {
|
|
@@ -10194,7 +10194,7 @@ function uu(r, e) {
|
|
|
10194
10194
|
const n = r.x, s = r.y;
|
|
10195
10195
|
let i = -1 / 0, o;
|
|
10196
10196
|
if (Cn(r, t)) return t;
|
|
10197
|
-
for (let h = 0, f = 0; h <
|
|
10197
|
+
for (let h = 0, f = 0; h < ms; h++, f += 4) {
|
|
10198
10198
|
if (s < re[f + 1] || s > re[f + 3] || re[f] > n || re[f + 2] <= i) continue;
|
|
10199
10199
|
const g = Dr(h);
|
|
10200
10200
|
t = Ir(h);
|
|
@@ -10213,13 +10213,13 @@ function uu(r, e) {
|
|
|
10213
10213
|
if (!o) return null;
|
|
10214
10214
|
const a = o.x, c = o.y, l = Math.min(s, c), d = Math.max(s, c);
|
|
10215
10215
|
let u = 1 / 0;
|
|
10216
|
-
for (let h = 0, f = 0; h <
|
|
10216
|
+
for (let h = 0, f = 0; h < ms; h++, f += 4) {
|
|
10217
10217
|
if (re[f + 2] < a || re[f] > n || re[f + 3] < l || re[f + 1] > d) continue;
|
|
10218
10218
|
const g = Dr(h);
|
|
10219
10219
|
t = Ir(h);
|
|
10220
10220
|
do {
|
|
10221
10221
|
if (t.prev.next === t && n >= t.x && t.x >= a && n !== t.x && // skip dead nodes
|
|
10222
|
-
|
|
10222
|
+
ps(s < c ? n : i, s, a, c, s < c ? i : n, s, t.x, t.y)) {
|
|
10223
10223
|
const y = Math.abs(s - t.y) / (n - t.x);
|
|
10224
10224
|
(On(t, r) || t.y === s && t.next.y === s && t.next.x > n) && (y < u || y === u && (t.x > o.x || t.x === o.x && hu(o, t))) && (o = t, u = y);
|
|
10225
10225
|
}
|
|
@@ -10272,9 +10272,9 @@ function mu(r) {
|
|
|
10272
10272
|
}
|
|
10273
10273
|
wt.length < r && (wt = new Uint32Array(r), cn = new Uint32Array(r), jt = new Array(r));
|
|
10274
10274
|
for (let e = 0; e < r; e++) wt[e] = Oe[e].z;
|
|
10275
|
-
|
|
10275
|
+
Jn(r, Oe, wt, jt, cn, 0), Jn(r, jt, cn, Oe, wt, 8), Jn(r, Oe, wt, jt, cn, 16), Jn(r, jt, cn, Oe, wt, 24);
|
|
10276
10276
|
}
|
|
10277
|
-
function
|
|
10277
|
+
function Jn(r, e, t, n, s, i) {
|
|
10278
10278
|
ln.fill(0);
|
|
10279
10279
|
for (let a = 0; a < r; a++) ln[t[a] >>> i & 255]++;
|
|
10280
10280
|
let o = 0;
|
|
@@ -10297,7 +10297,7 @@ function pu(r) {
|
|
|
10297
10297
|
while (e !== r);
|
|
10298
10298
|
return t;
|
|
10299
10299
|
}
|
|
10300
|
-
function
|
|
10300
|
+
function ps(r, e, t, n, s, i, o, a) {
|
|
10301
10301
|
return (s - o) * (e - a) >= (r - o) * (i - a) && (r - o) * (n - a) >= (t - o) * (e - a) && (t - o) * (i - a) >= (s - o) * (n - a);
|
|
10302
10302
|
}
|
|
10303
10303
|
function _u(r, e) {
|
|
@@ -10314,9 +10314,9 @@ function Cn(r, e) {
|
|
|
10314
10314
|
}
|
|
10315
10315
|
function yo(r, e, t, n, s = !0) {
|
|
10316
10316
|
const i = ae(r, e, t), o = ae(r, e, n), a = ae(t, n, r), c = ae(t, n, e);
|
|
10317
|
-
return (i > 0 && o < 0 || i < 0 && o > 0) && (a > 0 && c < 0 || a < 0 && c > 0) ? !0 : s ? !!(i === 0 &&
|
|
10317
|
+
return (i > 0 && o < 0 || i < 0 && o > 0) && (a > 0 && c < 0 || a < 0 && c > 0) ? !0 : s ? !!(i === 0 && Qn(r, t, e) || o === 0 && Qn(r, n, e) || a === 0 && Qn(t, r, n) || c === 0 && Qn(t, e, n)) : !1;
|
|
10318
10318
|
}
|
|
10319
|
-
function
|
|
10319
|
+
function Qn(r, e, t) {
|
|
10320
10320
|
return e.x <= Math.max(r.x, t.x) && e.x >= Math.min(r.x, t.x) && e.y <= Math.max(r.y, t.y) && e.y >= Math.min(r.y, t.y);
|
|
10321
10321
|
}
|
|
10322
10322
|
function gu(r, e) {
|
|
@@ -10933,7 +10933,7 @@ class Ou extends EventTarget {
|
|
|
10933
10933
|
if (this.glimmer = t, typeof n == "string")
|
|
10934
10934
|
try {
|
|
10935
10935
|
const s = JSON.parse(n);
|
|
10936
|
-
this.story =
|
|
10936
|
+
this.story = Yn.parse(s);
|
|
10937
10937
|
} catch (s) {
|
|
10938
10938
|
throw j.error("Failed to parse story JSON:", s), new ve(
|
|
10939
10939
|
`Invalid story JSON: ${s instanceof Error ? s.message : s}`,
|
|
@@ -10943,7 +10943,7 @@ class Ou extends EventTarget {
|
|
|
10943
10943
|
);
|
|
10944
10944
|
}
|
|
10945
10945
|
else
|
|
10946
|
-
this.story =
|
|
10946
|
+
this.story = Yn.parse(n);
|
|
10947
10947
|
j.info("StoryManager initialized with story:", this.story.title), this.glimmer.viewer.stop_camera_orbit_animation(), this.annotation_container = this._create_annotation_container(), this.annotation_2d_renderer = new Wd({ container: this.annotation_container }), this.annotation_3d_renderer = new Xd({
|
|
10948
10948
|
scene: this.glimmer.viewer.scene,
|
|
10949
10949
|
group_name: "story-annotations"
|
|
@@ -11054,7 +11054,7 @@ class Ou extends EventTarget {
|
|
|
11054
11054
|
},
|
|
11055
11055
|
section_box_enabled: !1
|
|
11056
11056
|
}, a = this.section_box_manager.get_bounds();
|
|
11057
|
-
return a && (o.section_box = a, o.section_box_enabled = !0),
|
|
11057
|
+
return a && (o.section_box = a, o.section_box_enabled = !0), ss.parse(o);
|
|
11058
11058
|
}
|
|
11059
11059
|
/**
|
|
11060
11060
|
* Export the story as JSON
|
|
@@ -11069,7 +11069,7 @@ class Ou extends EventTarget {
|
|
|
11069
11069
|
* @returns The index where the slide was added
|
|
11070
11070
|
*/
|
|
11071
11071
|
add_slide(t, n) {
|
|
11072
|
-
const s =
|
|
11072
|
+
const s = ss.parse(t), i = n !== void 0 ? Math.max(0, Math.min(n, this.story.slides.length)) : this.story.slides.length;
|
|
11073
11073
|
return this.story.slides.splice(i, 0, s), j.info(`Added slide "${s.id}" at index ${i}`), this._emit_story_change("add", i), i;
|
|
11074
11074
|
}
|
|
11075
11075
|
/**
|
|
@@ -11084,7 +11084,7 @@ class Ou extends EventTarget {
|
|
|
11084
11084
|
"StoryManager",
|
|
11085
11085
|
Ce.INVALID_STORY_JSON
|
|
11086
11086
|
);
|
|
11087
|
-
const s = { ...this.story.slides[t], ...n }, i =
|
|
11087
|
+
const s = { ...this.story.slides[t], ...n }, i = ss.parse(s);
|
|
11088
11088
|
this.story.slides[t] = i, j.info(`Updated slide at index ${t}: "${i.id}"`), this._emit_story_change("update", t), t === this.current_index && this.goto(t);
|
|
11089
11089
|
}
|
|
11090
11090
|
/**
|
|
@@ -11138,7 +11138,7 @@ class Ou extends EventTarget {
|
|
|
11138
11138
|
if (typeof t == "string")
|
|
11139
11139
|
try {
|
|
11140
11140
|
const n = JSON.parse(t);
|
|
11141
|
-
this.story =
|
|
11141
|
+
this.story = Yn.parse(n);
|
|
11142
11142
|
} catch (n) {
|
|
11143
11143
|
throw new ve(
|
|
11144
11144
|
`Invalid story JSON: ${n instanceof Error ? n.message : n}`,
|
|
@@ -11148,7 +11148,7 @@ class Ou extends EventTarget {
|
|
|
11148
11148
|
);
|
|
11149
11149
|
}
|
|
11150
11150
|
else
|
|
11151
|
-
this.story =
|
|
11151
|
+
this.story = Yn.parse(t);
|
|
11152
11152
|
j.info("Story replaced:", this.story.title), this.current_index = 0, this.goto(0), this._emit_story_change("replace", 0);
|
|
11153
11153
|
}
|
|
11154
11154
|
/**
|