@realsee/dnalogel
Version:
609 lines (608 loc) • 15.3 kB
JavaScript
import { SvelteComponent as W, init as X, safe_not_equal as Y, append_styles as Z, element as y, attr as H, null_to_empty as S, insert as R, group_outros as z, transition_out as D, check_outros as F, transition_in as u, detach as k, assign as P, create_component as p, space as w, empty as x, mount_component as C, get_spread_update as U, destroy_component as v } from "../../vendor/svelte/internal/index.js";
import { writable as $ } from "../../vendor/svelte/store/index.js";
import { BaseImage as ee } from "./BaseImage.js";
import { RoomLabels as le } from "./RoomLabels/RoomLabels.js";
import { RuleLabels as oe } from "./RuleLabels/RuleLabels.js";
import { RoomMaterial as ne } from "./RoomMaterials/RoomMaterial.js";
import { RoomHighlight as ae } from "./RoomHighlight/RoomHighlight.js";
import { MissingFloor as re } from "./MissingFloor.js";
import { Camera as te } from "./Camera.js";
import { Compass as ie } from "./Compass.js";
function fe(r) {
Z(r, "svelte-bl8zrz", ".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}");
}
function me(r) {
let l, o, a, i, e, m, s, L, b, d;
const I = [
{
floorIndex: (
/*floorIndex*/
r[2]
),
floorplanData: (
/*floorplanData*/
r[10]
)
}
];
let T = {};
for (let n = 0; n < I.length; n += 1)
T = P(T, I[n]);
l = new ne({ props: T });
let g = (
/*highlightEnable*/
(r[3] || /*hoverEnable*/
r[5]) && j(r)
);
const N = [
{
floorplanData: (
/*floorplanData*/
r[10]
),
floorIndex: (
/*floorIndex*/
r[2]
)
}
];
let A = {};
for (let n = 0; n < N.length; n += 1)
A = P(A, N[n]);
i = new ee({ props: A });
let _ = (
/*roomLabelsEnable*/
r[6] && G(r)
), h = (
/*ruleLabelsEnable*/
r[9] && J(r)
), c = (
/*cameraEnable*/
r[4] && K(r)
), E = (
/*compassEnable*/
r[20] && O(r)
);
return {
c() {
p(l.$$.fragment), o = w(), g && g.c(), a = w(), p(i.$$.fragment), e = w(), _ && _.c(), m = w(), h && h.c(), s = w(), c && c.c(), L = w(), E && E.c(), b = x();
},
m(n, f) {
C(l, n, f), R(n, o, f), g && g.m(n, f), R(n, a, f), C(i, n, f), R(n, e, f), _ && _.m(n, f), R(n, m, f), h && h.m(n, f), R(n, s, f), c && c.m(n, f), R(n, L, f), E && E.m(n, f), R(n, b, f), d = !0;
},
p(n, f) {
const V = f & /*floorIndex, floorplanData*/
1028 ? U(I, [
{
floorIndex: (
/*floorIndex*/
n[2]
),
floorplanData: (
/*floorplanData*/
n[10]
)
}
]) : {};
l.$set(V), /*highlightEnable*/
n[3] || /*hoverEnable*/
n[5] ? g ? (g.p(n, f), f & /*highlightEnable, hoverEnable*/
40 && u(g, 1)) : (g = j(n), g.c(), u(g, 1), g.m(a.parentNode, a)) : g && (z(), D(g, 1, 1, () => {
g = null;
}), F());
const M = f & /*floorplanData, floorIndex*/
1028 ? U(N, [
{
floorplanData: (
/*floorplanData*/
n[10]
),
floorIndex: (
/*floorIndex*/
n[2]
)
}
]) : {};
i.$set(M), /*roomLabelsEnable*/
n[6] ? _ ? (_.p(n, f), f & /*roomLabelsEnable*/
64 && u(_, 1)) : (_ = G(n), _.c(), u(_, 1), _.m(m.parentNode, m)) : _ && (z(), D(_, 1, 1, () => {
_ = null;
}), F()), /*ruleLabelsEnable*/
n[9] ? h ? (h.p(n, f), f & /*ruleLabelsEnable*/
512 && u(h, 1)) : (h = J(n), h.c(), u(h, 1), h.m(s.parentNode, s)) : h && (z(), D(h, 1, 1, () => {
h = null;
}), F()), /*cameraEnable*/
n[4] ? c ? (c.p(n, f), f & /*cameraEnable*/
16 && u(c, 1)) : (c = K(n), c.c(), u(c, 1), c.m(L.parentNode, L)) : c && (z(), D(c, 1, 1, () => {
c = null;
}), F()), /*compassEnable*/
n[20] ? E ? (E.p(n, f), f & /*compassEnable*/
1048576 && u(E, 1)) : (E = O(n), E.c(), u(E, 1), E.m(b.parentNode, b)) : E && (z(), D(E, 1, 1, () => {
E = null;
}), F());
},
i(n) {
d || (u(l.$$.fragment, n), u(g), u(i.$$.fragment, n), u(_), u(h), u(c), u(E), d = !0);
},
o(n) {
D(l.$$.fragment, n), D(g), D(i.$$.fragment, n), D(_), D(h), D(c), D(E), d = !1;
},
d(n) {
v(l, n), n && k(o), g && g.d(n), n && k(a), v(i, n), n && k(e), _ && _.d(n), n && k(m), h && h.d(n), n && k(s), c && c.d(n), n && k(L), E && E.d(n), n && k(b);
}
};
}
function se(r) {
let l, o;
return l = new re({
props: {
missingFloorConfig: (
/*missingFloorConfig*/
r[16]
)
}
}), {
c() {
p(l.$$.fragment);
},
m(a, i) {
C(l, a, i), o = !0;
},
p(a, i) {
const e = {};
i & /*missingFloorConfig*/
65536 && (e.missingFloorConfig = /*missingFloorConfig*/
a[16]), l.$set(e);
},
i(a) {
o || (u(l.$$.fragment, a), o = !0);
},
o(a) {
D(l.$$.fragment, a), o = !1;
},
d(a) {
v(l, a);
}
};
}
function j(r) {
let l, o;
const a = [
{
floorIndex: (
/*floorIndex*/
r[2]
),
floorplanData: (
/*floorplanData*/
r[10]
),
hoveredRoom: (
/*hoveredRoom*/
r[22]
),
highlightData: (
/*highlightData*/
r[15]
)
}
];
let i = {};
for (let e = 0; e < a.length; e += 1)
i = P(i, a[e]);
return l = new ae({ props: i }), {
c() {
p(l.$$.fragment);
},
m(e, m) {
C(l, e, m), o = !0;
},
p(e, m) {
const s = m & /*floorIndex, floorplanData, hoveredRoom, highlightData*/
4228100 ? U(a, [
{
floorIndex: (
/*floorIndex*/
e[2]
),
floorplanData: (
/*floorplanData*/
e[10]
),
hoveredRoom: (
/*hoveredRoom*/
e[22]
),
highlightData: (
/*highlightData*/
e[15]
)
}
]) : {};
l.$set(s);
},
i(e) {
o || (u(l.$$.fragment, e), o = !0);
},
o(e) {
D(l.$$.fragment, e), o = !1;
},
d(e) {
v(l, e);
}
};
}
function G(r) {
let l, o;
const a = [
{
floorplanData: (
/*floorplanData*/
r[10]
),
roomAreaEnable: (
/*roomAreaEnable*/
r[7]
),
roomNameEnable: (
/*roomNameEnable*/
r[8]
),
floorIndex: (
/*floorIndex*/
r[2]
),
getRoomAreaText: (
/*getRoomAreaText*/
r[11]
),
getLabelElement: (
/*getLabelElement*/
r[12]
),
hoveredRoom: (
/*hoveredRoom*/
r[22]
),
adaptiveRoomLabelVisibleEnable: (
/*adaptiveRoomLabelVisibleEnable*/
r[14]
)
}
];
let i = {};
for (let e = 0; e < a.length; e += 1)
i = P(i, a[e]);
return l = new le({ props: i }), {
c() {
p(l.$$.fragment);
},
m(e, m) {
C(l, e, m), o = !0;
},
p(e, m) {
const s = m & /*floorplanData, roomAreaEnable, roomNameEnable, floorIndex, getRoomAreaText, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/
4218244 ? U(a, [
{
floorplanData: (
/*floorplanData*/
e[10]
),
roomAreaEnable: (
/*roomAreaEnable*/
e[7]
),
roomNameEnable: (
/*roomNameEnable*/
e[8]
),
floorIndex: (
/*floorIndex*/
e[2]
),
getRoomAreaText: (
/*getRoomAreaText*/
e[11]
),
getLabelElement: (
/*getLabelElement*/
e[12]
),
hoveredRoom: (
/*hoveredRoom*/
e[22]
),
adaptiveRoomLabelVisibleEnable: (
/*adaptiveRoomLabelVisibleEnable*/
e[14]
)
}
]) : {};
l.$set(s);
},
i(e) {
o || (u(l.$$.fragment, e), o = !0);
},
o(e) {
D(l.$$.fragment, e), o = !1;
},
d(e) {
v(l, e);
}
};
}
function J(r) {
let l, o;
const a = [
{
floorplanData: (
/*floorplanData*/
r[10]
),
floorIndex: (
/*floorIndex*/
r[2]
),
getRuleDistanceText: (
/*getRuleDistanceText*/
r[13]
)
}
];
let i = {};
for (let e = 0; e < a.length; e += 1)
i = P(i, a[e]);
return l = new oe({ props: i }), {
c() {
p(l.$$.fragment);
},
m(e, m) {
C(l, e, m), o = !0;
},
p(e, m) {
const s = m & /*floorplanData, floorIndex, getRuleDistanceText*/
9220 ? U(a, [
{
floorplanData: (
/*floorplanData*/
e[10]
),
floorIndex: (
/*floorIndex*/
e[2]
),
getRuleDistanceText: (
/*getRuleDistanceText*/
e[13]
)
}
]) : {};
l.$set(s);
},
i(e) {
o || (u(l.$$.fragment, e), o = !0);
},
o(e) {
D(l.$$.fragment, e), o = !1;
},
d(e) {
v(l, e);
}
};
}
function K(r) {
let l, o;
const a = [
{
panoIndex: (
/*panoIndex*/
r[0]
),
floorplanData: (
/*floorplanData*/
r[10]
),
lastPanoramaLongitude: (
/*lastPanoramaLongitude*/
r[17]
),
cameraImageUrl: (
/*cameraImageUrl*/
r[18]
)
}
];
let i = {};
for (let e = 0; e < a.length; e += 1)
i = P(i, a[e]);
return l = new te({ props: i }), {
c() {
p(l.$$.fragment);
},
m(e, m) {
C(l, e, m), o = !0;
},
p(e, m) {
const s = m & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/
394241 ? U(a, [
{
panoIndex: (
/*panoIndex*/
e[0]
),
floorplanData: (
/*floorplanData*/
e[10]
),
lastPanoramaLongitude: (
/*lastPanoramaLongitude*/
e[17]
),
cameraImageUrl: (
/*cameraImageUrl*/
e[18]
)
}
]) : {};
l.$set(s);
},
i(e) {
o || (u(l.$$.fragment, e), o = !0);
},
o(e) {
D(l.$$.fragment, e), o = !1;
},
d(e) {
v(l, e);
}
};
}
function O(r) {
let l, o;
return l = new ie({
props: {
floorplanData: (
/*floorplanData*/
r[10]
),
northDesc: (
/*northDesc*/
r[19]
)
}
}), {
c() {
p(l.$$.fragment);
},
m(a, i) {
C(l, a, i), o = !0;
},
p(a, i) {
const e = {};
i & /*floorplanData*/
1024 && (e.floorplanData = /*floorplanData*/
a[10]), i & /*northDesc*/
524288 && (e.northDesc = /*northDesc*/
a[19]), l.$set(e);
},
i(a) {
o || (u(l.$$.fragment, a), o = !0);
},
o(a) {
D(l.$$.fragment, a), o = !1;
},
d(a) {
v(l, a);
}
};
}
function ue(r) {
let l, o, a, i, e;
const m = [se, me], s = [];
function L(b, d) {
return (
/*hasCurrentFloorData*/
b[21] ? 1 : 0
);
}
return o = L(r), a = s[o] = m[o](r), {
c() {
l = y("div"), a.c(), H(l, "class", i = S(`floorplan-plugin__floor${/*isCurrent*/
r[1] ? " floorplan-plugin__floor--is-current" : ""}`) + " svelte-bl8zrz");
},
m(b, d) {
R(b, l, d), s[o].m(l, null), e = !0;
},
p(b, [d]) {
let I = o;
o = L(b), o === I ? s[o].p(b, d) : (z(), D(s[I], 1, 1, () => {
s[I] = null;
}), F(), a = s[o], a ? a.p(b, d) : (a = s[o] = m[o](b), a.c()), u(a, 1), a.m(l, null)), (!e || d & /*isCurrent*/
2 && i !== (i = S(`floorplan-plugin__floor${/*isCurrent*/
b[1] ? " floorplan-plugin__floor--is-current" : ""}`) + " svelte-bl8zrz")) && H(l, "class", i);
},
i(b) {
e || (u(a), e = !0);
},
o(b) {
D(a), e = !1;
},
d(b) {
b && k(l), s[o].d();
}
};
}
function be(r, l, o) {
let a, i, { panoIndex: e } = l, { isCurrent: m } = l, { floorIndex: s } = l, { highlightEnable: L } = l, { cameraEnable: b } = l, { hoverEnable: d } = l, { roomLabelsEnable: I } = l, { roomAreaEnable: T } = l, { roomNameEnable: g } = l, { ruleLabelsEnable: N } = l, { floorplanData: A } = l, { getRoomAreaText: _ } = l, { getLabelElement: h } = l, { getRuleDistanceText: c } = l, { adaptiveRoomLabelVisibleEnable: E } = l, { highlightData: n } = l, { missingFloorConfig: f } = l, { lastPanoramaLongitude: V } = l, { cameraImageUrl: M } = l, { northDesc: q } = l, { compassEnable: B } = l;
const Q = $(void 0);
return r.$$set = (t) => {
"panoIndex" in t && o(0, e = t.panoIndex), "isCurrent" in t && o(1, m = t.isCurrent), "floorIndex" in t && o(2, s = t.floorIndex), "highlightEnable" in t && o(3, L = t.highlightEnable), "cameraEnable" in t && o(4, b = t.cameraEnable), "hoverEnable" in t && o(5, d = t.hoverEnable), "roomLabelsEnable" in t && o(6, I = t.roomLabelsEnable), "roomAreaEnable" in t && o(7, T = t.roomAreaEnable), "roomNameEnable" in t && o(8, g = t.roomNameEnable), "ruleLabelsEnable" in t && o(9, N = t.ruleLabelsEnable), "floorplanData" in t && o(10, A = t.floorplanData), "getRoomAreaText" in t && o(11, _ = t.getRoomAreaText), "getLabelElement" in t && o(12, h = t.getLabelElement), "getRuleDistanceText" in t && o(13, c = t.getRuleDistanceText), "adaptiveRoomLabelVisibleEnable" in t && o(14, E = t.adaptiveRoomLabelVisibleEnable), "highlightData" in t && o(15, n = t.highlightData), "missingFloorConfig" in t && o(16, f = t.missingFloorConfig), "lastPanoramaLongitude" in t && o(17, V = t.lastPanoramaLongitude), "cameraImageUrl" in t && o(18, M = t.cameraImageUrl), "northDesc" in t && o(19, q = t.northDesc), "compassEnable" in t && o(20, B = t.compassEnable);
}, r.$$.update = () => {
r.$$.dirty & /*floorplanData, floorIndex*/
1028 && o(23, a = A.floorDatas[s]), r.$$.dirty & /*floorData*/
8388608 && o(21, i = a.rooms.length > 0);
}, [
e,
m,
s,
L,
b,
d,
I,
T,
g,
N,
A,
_,
h,
c,
E,
n,
f,
V,
M,
q,
B,
i,
Q,
a
];
}
class ke extends W {
constructor(l) {
super(), X(
this,
l,
be,
ue,
Y,
{
panoIndex: 0,
isCurrent: 1,
floorIndex: 2,
highlightEnable: 3,
cameraEnable: 4,
hoverEnable: 5,
roomLabelsEnable: 6,
roomAreaEnable: 7,
roomNameEnable: 8,
ruleLabelsEnable: 9,
floorplanData: 10,
getRoomAreaText: 11,
getLabelElement: 12,
getRuleDistanceText: 13,
adaptiveRoomLabelVisibleEnable: 14,
highlightData: 15,
missingFloorConfig: 16,
lastPanoramaLongitude: 17,
cameraImageUrl: 18,
northDesc: 19,
compassEnable: 20
},
fe
);
}
}
export {
ke as CurrentFloor
};