@sbb-esta/lyne-elements-experimental 2.11.2 → 3.0.0-next.1
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/core/datetime/date-helper.js +142 -142
- package/core/timetable/access-leg-helper.js +52 -49
- package/core/timetable/timetable-helper.js +8 -7
- package/custom-elements.json +8 -8
- package/development/core/datetime/date-helper.js +10 -10
- package/development/core/timetable/access-leg-helper.js +15 -12
- package/development/core/timetable/timetable-helper.js +7 -6
- package/development/{differenceInMinutes-D5Nj8Stc.js → differenceInMinutes-CHSyWiQs.js} +3 -3
- package/development/{format-BQfaa1ZT.js → format-D0-yhzi4.js} +26 -22
- package/development/{isValid-DvieCZVi.js → isValid-Bo4R7iA7.js} +3 -3
- package/development/journey-summary/journey-summary.component.d.ts +5 -3
- package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/development/journey-summary/journey-summary.component.js +9 -5
- package/development/pearl-chain/pearl-chain.component.d.ts +5 -3
- package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/development/pearl-chain/pearl-chain.component.js +43 -29
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts +5 -3
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +10 -6
- package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +1 -1
- package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +1 -1
- package/development/seat-reservation/common/mapper/icon-mapper.js +1 -1
- package/development/seat-reservation/common/mapper/mapper.js +16 -14
- package/development/seat-reservation/common/mapper/seat-reservation-sample-data.js +1 -1
- package/development/seat-reservation/common/svgs.js +1 -1
- package/development/seat-reservation/common/translations/i18n.js +3 -2
- package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +33 -22
- package/development/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +7 -6
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +23 -16
- package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +1 -1
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +3 -2
- package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +8 -7
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +11 -7
- package/development/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +3 -2
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +5 -4
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/timetable-row/timetable-row.component.d.ts +5 -3
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +93 -59
- package/differenceInMinutes-BMqUZdhj.js +23 -0
- package/{format-lqeCzmzS.js → format-Dg8rkk7h.js} +442 -438
- package/isValid-DJ69OMZJ.js +45 -0
- package/journey-summary/journey-summary.component.d.ts +5 -3
- package/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/journey-summary/journey-summary.component.js +8 -4
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.d.ts +5 -3
- package/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/pearl-chain/pearl-chain.component.js +99 -79
- package/pearl-chain-time/pearl-chain-time.component.d.ts +5 -3
- package/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
- package/pearl-chain-time/pearl-chain-time.component.js +49 -45
- package/seat-reservation/common/mapper/mapper.js +54 -50
- package/seat-reservation/common/translations/i18n.js +6 -5
- package/seat-reservation/seat-reservation/seat-reservation-base-element.js +115 -104
- package/seat-reservation/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +41 -40
- package/seat-reservation/seat-reservation/seat-reservation.component.js +87 -78
- package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +18 -15
- package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +59 -58
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +75 -71
- package/seat-reservation/seat-reservation-navigation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +13 -12
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +24 -23
- package/timetable-row/timetable-row.component.d.ts +5 -3
- package/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/timetable-row/timetable-row.component.js +251 -208
- package/differenceInMinutes-CP_C5onR.js +0 -23
- package/isValid-Ceq2O0NQ.js +0 -45
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as r, c as D, a as m } from "./toDate-BCXKL_wM.js";
|
|
2
|
+
function o(e) {
|
|
3
|
+
const t = r(e), n = new Date(
|
|
4
|
+
Date.UTC(
|
|
5
|
+
t.getFullYear(),
|
|
6
|
+
t.getMonth(),
|
|
7
|
+
t.getDate(),
|
|
8
|
+
t.getHours(),
|
|
9
|
+
t.getMinutes(),
|
|
10
|
+
t.getSeconds(),
|
|
11
|
+
t.getMilliseconds()
|
|
12
|
+
)
|
|
13
|
+
);
|
|
14
|
+
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
15
|
+
}
|
|
16
|
+
function g(e, ...t) {
|
|
17
|
+
const n = D.bind(
|
|
18
|
+
null,
|
|
19
|
+
t.find((a) => typeof a == "object")
|
|
20
|
+
);
|
|
21
|
+
return t.map(n);
|
|
22
|
+
}
|
|
23
|
+
function i(e, t) {
|
|
24
|
+
const n = r(e, t == null ? void 0 : t.in);
|
|
25
|
+
return n.setHours(0, 0, 0, 0), n;
|
|
26
|
+
}
|
|
27
|
+
function b(e, t, n) {
|
|
28
|
+
const [a, l] = g(
|
|
29
|
+
n == null ? void 0 : n.in,
|
|
30
|
+
e,
|
|
31
|
+
t
|
|
32
|
+
), c = i(a), s = i(l), u = +c - o(c), f = +s - o(s);
|
|
33
|
+
return Math.round((u - f) / m);
|
|
34
|
+
}
|
|
35
|
+
function d(e) {
|
|
36
|
+
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
37
|
+
}
|
|
38
|
+
function M(e) {
|
|
39
|
+
return !(!d(e) && typeof e != "number" || isNaN(+r(e)));
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
b as d,
|
|
43
|
+
M as i,
|
|
44
|
+
g as n
|
|
45
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SbbDateLike } from '@sbb-esta/lyne-elements/core/interfaces/types';
|
|
2
1
|
import { SbbTitleLevel } from '@sbb-esta/lyne-elements/title.js';
|
|
3
2
|
import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
|
|
4
3
|
import { Leg } from '../core/timetable.js';
|
|
@@ -42,8 +41,11 @@ export declare class SbbJourneySummaryElement extends LitElement {
|
|
|
42
41
|
* default: render walk-icon
|
|
43
42
|
*/
|
|
44
43
|
accessor a11yFootpath: boolean;
|
|
45
|
-
/**
|
|
46
|
-
|
|
44
|
+
/**
|
|
45
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
46
|
+
* Only recommended for testing purposes.
|
|
47
|
+
*/
|
|
48
|
+
set now(value: Date | undefined);
|
|
47
49
|
get now(): Date;
|
|
48
50
|
private _now;
|
|
49
51
|
private _hasContentSlot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-summary.component.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/journey-summary/journey-summary.component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"journey-summary.component.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/journey-summary/journey-summary.component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAIhD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,+CAA+C,CAAC;AACvD,OAAO,2CAA2C,CAAC;AACnD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,qBAEM,wBAAyB,SAAQ,UAAU;IAC/C,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,qBAAqB;IACrB,SAA4C,IAAI,EAAE,oCAAoC,CAAS;IAE/F,yBAAyB;IACzB,SACgB,QAAQ,EAAE,oCAAoC,CAAS;IAEvE;;OAEG;IACH,SAEgB,SAAS,EAAE,OAAO,CAAS;IAE3C,gEAAgE;IAChE,SAAyD,WAAW,EAAE,aAAa,CAAO;IAE1F;;;OAGG;IACH,SAEgB,gBAAgB,EAAE,OAAO,CAAS;IAElD;;;;;OAKG;IACH,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C;;;OAGG;IACH,IACW,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,EAErC;IACD,IAAW,GAAG,IAAI,IAAI,CAErB;IACD,OAAO,CAAC,IAAI,CAAqB;IAEjC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,SAAS,CAAmC;IAEpC,iBAAiB,IAAI,IAAI;IAKzC,2EAA2E;IAC3E,OAAO,CAAC,mBAAmB;IAwB3B,OAAO,CAAC,kBAAkB;IAmB1B,OAAO,CAAC,yBAAyB;cAuBd,MAAM,IAAI,cAAc;CA4B5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,qBAAqB,EAAE,wBAAwB,CAAC;KACjD;CACF"}
|
|
@@ -15,8 +15,8 @@ import "@sbb-esta/lyne-elements/divider.js";
|
|
|
15
15
|
import "@sbb-esta/lyne-elements/screen-reader-only.js";
|
|
16
16
|
import "@sbb-esta/lyne-elements/journey-header.js";
|
|
17
17
|
import "../pearl-chain-time.js";
|
|
18
|
-
import { i as nt } from "../isValid-
|
|
19
|
-
import { f as R } from "../format-
|
|
18
|
+
import { i as nt } from "../isValid-DJ69OMZJ.js";
|
|
19
|
+
import { f as R } from "../format-Dg8rkk7h.js";
|
|
20
20
|
const ot = et`*,:before,:after{box-sizing:border-box}:host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-color-iron);display:flex;flex-direction:column}.sbb-journey-summary__via-block{display:flex}.sbb-journey-summary__vias{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-block:0;padding-inline-start:var(--sbb-spacing-fixed-1x)}.sbb-journey-summary__date{margin-block-end:var(--sbb-spacing-fixed-2x)}.sbb-journey-summary__via{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sbb-journey-summary__divider{margin-block:var(--sbb-spacing-fixed-6x)}ul li{list-style:none;display:inline}`;
|
|
21
21
|
let wt = (() => {
|
|
22
22
|
var y, v, f, g, k, $, r;
|
|
@@ -84,7 +84,10 @@ let wt = (() => {
|
|
|
84
84
|
set a11yFootpath(e) {
|
|
85
85
|
l(this, $, e);
|
|
86
86
|
}
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
89
|
+
* Only recommended for testing purposes.
|
|
90
|
+
*/
|
|
88
91
|
set now(e) {
|
|
89
92
|
this._now = x.getValidDateOrNull(x.deserialize(e));
|
|
90
93
|
}
|
|
@@ -92,7 +95,8 @@ let wt = (() => {
|
|
|
92
95
|
return this._now ?? /* @__PURE__ */ new Date();
|
|
93
96
|
}
|
|
94
97
|
connectedCallback() {
|
|
95
|
-
|
|
98
|
+
var e;
|
|
99
|
+
super.connectedCallback(), this._hasContentSlot = !!((e = this.querySelector) != null && e.call(this, '[slot="content"]'));
|
|
96
100
|
}
|
|
97
101
|
/** renders the date of the journey or if it is the current or next day */
|
|
98
102
|
_renderJourneyStart(e, t) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbb-esta/lyne-elements-experimental",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.1",
|
|
4
4
|
"description": "Lyne Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"customElements": "custom-elements.json",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@sbb-esta/lyne-elements": "
|
|
14
|
+
"@sbb-esta/lyne-elements": "3.0.0-next.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"lit": "^3.3.0",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SbbDateLike } from '@sbb-esta/lyne-elements/core/interfaces/types';
|
|
2
1
|
import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
|
|
3
2
|
import { Leg, PtRideLeg } from '../core/timetable.js';
|
|
4
3
|
/**
|
|
@@ -20,8 +19,11 @@ export declare class SbbPearlChainElement extends LitElement {
|
|
|
20
19
|
* disable the animation with this property.
|
|
21
20
|
*/
|
|
22
21
|
accessor disableAnimation: boolean;
|
|
23
|
-
/**
|
|
24
|
-
|
|
22
|
+
/**
|
|
23
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
24
|
+
* Only recommended for testing purposes.
|
|
25
|
+
*/
|
|
26
|
+
set now(value: Date | null);
|
|
25
27
|
get now(): Date | null;
|
|
26
28
|
private _now;
|
|
27
29
|
private _getAllDuration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pearl-chain.component.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain/pearl-chain.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pearl-chain.component.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain/pearl-chain.component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAKhD,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAW3D;;GAEG;AACH,qBAEM,oBAAqB,SAAQ,UAAU;IAC3C,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;;;;OAOG;IACH,SAA2C,IAAI,EAAE,CAAC,GAAG,GAAG,SAAS,CAAC,EAAE,CAAM;IAE1E;;;OAGG;IACH,SAEgB,gBAAgB,EAAE,OAAO,CAAS;IAElD;;;OAGG;IACH,IACW,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,EAEhC;IACD,IAAW,GAAG,IAAI,IAAI,GAAG,IAAI,CAE5B;IACD,OAAO,CAAC,IAAI,CAAqB;IAEjC,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,eAAe;cAmBJ,MAAM,IAAI,cAAc;CA4I5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,iBAAiB,EAAE,oBAAoB,CAAC;KACzC;CACF"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var oe = (l) => {
|
|
2
|
+
throw TypeError(l);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { defaultDateAdapter as
|
|
8
|
-
import { forceType as
|
|
9
|
-
import { css as
|
|
10
|
-
import { customElement as
|
|
11
|
-
import { styleMap as
|
|
12
|
-
import { removeTimezoneFromISOTimeString as
|
|
13
|
-
import { isRideLeg as
|
|
14
|
-
import { d as
|
|
15
|
-
import { t as
|
|
16
|
-
function
|
|
17
|
-
return +
|
|
4
|
+
var be = (l, n, p) => n.has(l) || oe("Cannot " + p);
|
|
5
|
+
var I = (l, n, p) => (be(l, n, "read from private field"), p ? p.call(l) : n.get(l)), H = (l, n, p) => n.has(l) ? oe("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(l) : n.set(l, p), k = (l, n, p, d) => (be(l, n, "write to private field"), d ? d.call(l, p) : n.set(l, p), p);
|
|
6
|
+
import { __runInitializers as f, __esDecorate as S } from "tslib";
|
|
7
|
+
import { defaultDateAdapter as ce } from "@sbb-esta/lyne-elements/core/datetime.js";
|
|
8
|
+
import { forceType as xe } from "@sbb-esta/lyne-elements/core/decorators.js";
|
|
9
|
+
import { css as Se, LitElement as De, html as y, nothing as pe } from "lit";
|
|
10
|
+
import { customElement as Te, property as O } from "lit/decorators.js";
|
|
11
|
+
import { styleMap as he } from "lit/directives/style-map.js";
|
|
12
|
+
import { removeTimezoneFromISOTimeString as h } from "../core/datetime.js";
|
|
13
|
+
import { isRideLeg as Ae } from "../core/timetable.js";
|
|
14
|
+
import { d as D, a as T } from "../differenceInMinutes-BMqUZdhj.js";
|
|
15
|
+
import { t as A } from "../toDate-BCXKL_wM.js";
|
|
16
|
+
function Ce(l, n) {
|
|
17
|
+
return +A(l) > +A(n);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return +
|
|
19
|
+
function de(l, n) {
|
|
20
|
+
return +A(l) < +A(n);
|
|
21
21
|
}
|
|
22
|
-
const ve = he`*,:before,:after{box-sizing:border-box}:host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small: .125rem;--sbb-pearl-chain-color: var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-color-past: var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-leg-width: 100%;display:block;--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-color-charcoal);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-red);--sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-2x);--sbb-pearl-chain-bullet-animation-duration: 1.92s;--sbb-pearl-chain-bullet-animation-easing: ease-out;--sbb-pearl-chain-bullet-crossed-width: .88375rem;--sbb-pearl-chain-bullet-crossed-height: .21875rem;--sbb-pearl-chain-bullet-crossed-border-width: .09375rem}.sbb-pearl-chain{position:relative;display:flex;justify-content:space-between;flex-wrap:nowrap;color:var(--sbb-pearl-chain-color);width:100%;padding-block:calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);padding-inline-end:var(--sbb-pearl-chain-bullet-size-start-end)}.sbb-pearl-chain__bullet{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__bullet{content:"";position:absolute;background-color:currentcolor;inset-block-start:0;z-index:3}.sbb-pearl-chain__bullet:first-of-type{inset-inline-start:0}.sbb-pearl-chain__bullet:last-of-type{inset-inline-end:0}.sbb-pearl-chain__leg{flex-shrink:0;flex-grow:0;position:relative;height:var(--sbb-pearl-chain-height);border-inline-end:var(--sbb-pearl-chain-spacing-small) solid Canvas;background-color:currentcolor;width:var(--sbb-pearl-chain-leg-width);display:flex;align-items:center}@media (forced-colors: active){.sbb-pearl-chain__leg{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type{border:none}.sbb-pearl-chain__stop{position:relative;z-index:2;background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__stop{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__bullet--future{background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__bullet--future{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{color:var(--sbb-pearl-chain-color-past);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors: active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{--sbb-pearl-chain-bullet-color: GrayText !important}}@media (forced-colors: active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{background-color:GrayText!important}}.sbb-pearl-chain__bullet--progress{background:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors: active){.sbb-pearl-chain__bullet--progress{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:var(--sbb-pearl-chain-color-disruption);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors: active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{--sbb-pearl-chain-bullet-color: Highlight}}@media (forced-colors: active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:Highlight;background:Highlight}}.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors: active){.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: Highlight}}.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors: active){.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__leg--disruption:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media (forced-colors: active){.sbb-pearl-chain__leg--disruption:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__leg--skipped{color:var(--sbb-pearl-chain-color-disruption)}.sbb-pearl-chain__leg--skipped:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media (forced-colors: active){.sbb-pearl-chain__leg--skipped:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__stop--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__stop--departure-skipped:before{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media (forced-colors: active){.sbb-pearl-chain__stop--departure-skipped:before{background:Highlight}}.sbb-pearl-chain--arrival-skipped,.sbb-pearl-chain--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media (forced-colors: active){.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{background:Highlight}}.sbb-pearl-chain__leg:after{content:"";position:absolute;inset-block:0;inset-inline-start:0;background-color:currentcolor;border-radius:var(--sbb-pearl-chain-height);z-index:1}@media (forced-colors: active){.sbb-pearl-chain__leg:after{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg:after{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type:after{inset-inline-end:calc(-1 * var(--sbb-pearl-chain-height))}.sbb-pearl-chain__leg--progress:after{background-color:var(--sbb-pearl-chain-color-past);width:var(--sbb-pearl-chain-leg-status)}.sbb-pearl-chain__position{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors: active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}50%{box-shadow:0 0 0 .1875rem var(--sbb-color-red-alpha-20)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}}.sbb-pearl-chain__position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite}.sbb-pearl-chain__position{position:absolute;inset-block-start:-200%;z-index:4;inset-inline-start:var(--sbb-pearl-chain-status-position)}.sbb-pearl-chain__position--no-animation{animation:unset}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
23
|
-
let
|
|
24
|
-
var
|
|
25
|
-
let
|
|
26
|
-
return
|
|
22
|
+
const $e = Se`*,:before,:after{box-sizing:border-box}:host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small: .125rem;--sbb-pearl-chain-color: var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-color-past: var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-leg-width: 100%;display:block;--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-color-charcoal);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-red);--sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-2x);--sbb-pearl-chain-bullet-animation-duration: 1.92s;--sbb-pearl-chain-bullet-animation-easing: ease-out;--sbb-pearl-chain-bullet-crossed-width: .88375rem;--sbb-pearl-chain-bullet-crossed-height: .21875rem;--sbb-pearl-chain-bullet-crossed-border-width: .09375rem}.sbb-pearl-chain{position:relative;display:flex;justify-content:space-between;flex-wrap:nowrap;color:var(--sbb-pearl-chain-color);width:100%;padding-block:calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);padding-inline-end:var(--sbb-pearl-chain-bullet-size-start-end)}.sbb-pearl-chain__bullet{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__bullet{content:"";position:absolute;background-color:currentcolor;inset-block-start:0;z-index:3}.sbb-pearl-chain__bullet:first-of-type{inset-inline-start:0}.sbb-pearl-chain__bullet:last-of-type{inset-inline-end:0}.sbb-pearl-chain__leg{flex-shrink:0;flex-grow:0;position:relative;height:var(--sbb-pearl-chain-height);border-inline-end:var(--sbb-pearl-chain-spacing-small) solid Canvas;background-color:currentcolor;width:var(--sbb-pearl-chain-leg-width);display:flex;align-items:center}@media (forced-colors: active){.sbb-pearl-chain__leg{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type{border:none}.sbb-pearl-chain__stop{position:relative;z-index:2;background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__stop{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__bullet--future{background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__bullet--future{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{color:var(--sbb-pearl-chain-color-past);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors: active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{--sbb-pearl-chain-bullet-color: GrayText !important}}@media (forced-colors: active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{background-color:GrayText!important}}.sbb-pearl-chain__bullet--progress{background:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors: active){.sbb-pearl-chain__bullet--progress{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:var(--sbb-pearl-chain-color-disruption);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors: active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{--sbb-pearl-chain-bullet-color: Highlight}}@media (forced-colors: active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:Highlight;background:Highlight}}.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors: active){.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: Highlight}}.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media (forced-colors: active){.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__leg--disruption:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media (forced-colors: active){.sbb-pearl-chain__leg--disruption:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__leg--skipped{color:var(--sbb-pearl-chain-color-disruption)}.sbb-pearl-chain__leg--skipped:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media (forced-colors: active){.sbb-pearl-chain__leg--skipped:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__stop--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__stop--departure-skipped:before{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media (forced-colors: active){.sbb-pearl-chain__stop--departure-skipped:before{background:Highlight}}.sbb-pearl-chain--arrival-skipped,.sbb-pearl-chain--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media (forced-colors: active){.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{background:Highlight}}.sbb-pearl-chain__leg:after{content:"";position:absolute;inset-block:0;inset-inline-start:0;background-color:currentcolor;border-radius:var(--sbb-pearl-chain-height);z-index:1}@media (forced-colors: active){.sbb-pearl-chain__leg:after{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg:after{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type:after{inset-inline-end:calc(-1 * var(--sbb-pearl-chain-height))}.sbb-pearl-chain__leg--progress:after{background-color:var(--sbb-pearl-chain-color-past);width:var(--sbb-pearl-chain-leg-status)}.sbb-pearl-chain__position{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media (forced-colors: active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media (forced-colors: active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}50%{box-shadow:0 0 0 .1875rem var(--sbb-color-red-alpha-20)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-bullet-color-disruption)}}.sbb-pearl-chain__position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite}.sbb-pearl-chain__position{position:absolute;inset-block-start:-200%;z-index:4;inset-inline-start:var(--sbb-pearl-chain-status-position)}.sbb-pearl-chain__position--no-animation{animation:unset}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
23
|
+
let Me = (() => {
|
|
24
|
+
var v, g, u;
|
|
25
|
+
let l = [Te("sbb-pearl-chain")], n, p = [], d, J = De, R = [], W, G = [], V = [], B, j = [], M = [], Y;
|
|
26
|
+
return u = class extends J {
|
|
27
27
|
constructor() {
|
|
28
28
|
super(...arguments);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
H(this, v);
|
|
30
|
+
H(this, g);
|
|
31
|
+
k(this, v, (f(this, R), f(this, G, []))), k(this, g, (f(this, V), f(this, j, !1))), this._now = (f(this, M), null);
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Define the legs of the pearl-chain.
|
|
@@ -39,122 +39,142 @@ let Ne = (() => {
|
|
|
39
39
|
* arrival at 17:00. So the change should have a duration of 33.33%.
|
|
40
40
|
*/
|
|
41
41
|
get legs() {
|
|
42
|
-
return
|
|
42
|
+
return I(this, v);
|
|
43
43
|
}
|
|
44
44
|
set legs(a) {
|
|
45
|
-
|
|
45
|
+
k(this, v, a);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Per default, the current location has a pulsating animation. You can
|
|
49
49
|
* disable the animation with this property.
|
|
50
50
|
*/
|
|
51
51
|
get disableAnimation() {
|
|
52
|
-
return
|
|
52
|
+
return I(this, g);
|
|
53
53
|
}
|
|
54
54
|
set disableAnimation(a) {
|
|
55
|
-
|
|
55
|
+
k(this, g, a);
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
59
|
+
* Only recommended for testing purposes.
|
|
60
|
+
*/
|
|
58
61
|
set now(a) {
|
|
59
|
-
this._now =
|
|
62
|
+
this._now = ce.getValidDateOrNull(ce.deserialize(a));
|
|
60
63
|
}
|
|
61
64
|
get now() {
|
|
62
65
|
return this._now;
|
|
63
66
|
}
|
|
64
67
|
_getAllDuration(a) {
|
|
65
|
-
return a
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
return a == null ? void 0 : a.reduce((e, r) => {
|
|
69
|
+
var c, _;
|
|
70
|
+
const i = h((c = r.arrival) == null ? void 0 : c.time), b = h((_ = r.departure) == null ? void 0 : _.time);
|
|
71
|
+
return i && b ? e + D(h(r.arrival.time), h(r.departure.time)) : e;
|
|
68
72
|
}, 0);
|
|
69
73
|
}
|
|
70
74
|
_isAllCancelled(a) {
|
|
71
|
-
return a
|
|
75
|
+
return a == null ? void 0 : a.every((e) => {
|
|
76
|
+
var r, i;
|
|
77
|
+
return (i = (r = e == null ? void 0 : e.serviceJourney) == null ? void 0 : r.serviceAlteration) == null ? void 0 : i.cancelled;
|
|
78
|
+
});
|
|
72
79
|
}
|
|
73
80
|
_getRelativeDuration(a, e) {
|
|
74
|
-
|
|
81
|
+
var b, c;
|
|
82
|
+
const r = h((b = e.arrival) == null ? void 0 : b.time), i = h((c = e.departure) == null ? void 0 : c.time);
|
|
75
83
|
if (r && i) {
|
|
76
|
-
const
|
|
77
|
-
return
|
|
84
|
+
const _ = D(h(e.arrival.time), h(e.departure.time)), w = this._getAllDuration(a);
|
|
85
|
+
return w === 0 ? 100 : _ / w * 100;
|
|
78
86
|
}
|
|
79
87
|
return 0;
|
|
80
88
|
}
|
|
81
89
|
_getProgress(a, e, r) {
|
|
82
|
-
if (!e
|
|
90
|
+
if (!(e != null && e.time) || !(r != null && r.time))
|
|
83
91
|
return 0;
|
|
84
|
-
const i =
|
|
85
|
-
return
|
|
92
|
+
const i = T(e.time, e.delay ?? 0), b = T(r.time, r.delay ?? 0), c = D(b, i), _ = D(a, i);
|
|
93
|
+
return c && _ / c * 100;
|
|
86
94
|
}
|
|
87
95
|
_getStatus(a, e, r) {
|
|
88
|
-
const i = e && e.time &&
|
|
89
|
-
return i &&
|
|
96
|
+
const i = e && e.time && T(e.time, e.delay ?? 0), b = r && r.time && T(r.time, r.delay ?? 0);
|
|
97
|
+
return i && de(i, a) && b && Ce(b, a) ? "progress" : b && de(b, a) ? "past" : "future";
|
|
90
98
|
}
|
|
91
99
|
_renderPosition(a, e, r) {
|
|
92
100
|
const i = this._getProgress(a, e, r);
|
|
93
101
|
if (i < 0 && i > 100)
|
|
94
102
|
return;
|
|
95
|
-
const
|
|
103
|
+
const b = () => ({
|
|
96
104
|
"--sbb-pearl-chain-status-position": `${i}%`,
|
|
97
105
|
...i >= 50 ? { transform: "translateX(-100%)" } : {}
|
|
98
|
-
}),
|
|
99
|
-
return
|
|
100
|
-
style=${
|
|
101
|
-
class="sbb-pearl-chain__position ${
|
|
106
|
+
}), c = this.disableAnimation ? "sbb-pearl-chain__position--no-animation" : "";
|
|
107
|
+
return y`<span
|
|
108
|
+
style=${he(b())}
|
|
109
|
+
class="sbb-pearl-chain__position ${c}"
|
|
102
110
|
></span>`;
|
|
103
111
|
}
|
|
104
112
|
render() {
|
|
105
|
-
|
|
113
|
+
var X, q, K, Q, U;
|
|
114
|
+
const a = this.now ?? /* @__PURE__ */ new Date(), e = (X = this.legs) == null ? void 0 : X.filter((t) => Ae(t)), r = (e == null ? void 0 : e.length) && h((K = (q = e[0]) == null ? void 0 : q.departure) == null ? void 0 : K.time), i = r && {
|
|
106
115
|
time: r,
|
|
107
116
|
delay: e[0].departure.delay ?? 0
|
|
108
|
-
},
|
|
109
|
-
time:
|
|
110
|
-
delay: e[e.length - 1]
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
return
|
|
114
|
-
})(),
|
|
115
|
-
|
|
117
|
+
}, b = (e == null ? void 0 : e.length) && h((Q = e[e.length - 1].arrival) == null ? void 0 : Q.time), c = b && {
|
|
118
|
+
time: b,
|
|
119
|
+
delay: ((U = e[e.length - 1]) == null ? void 0 : U.arrival.delay) ?? 0
|
|
120
|
+
}, _ = (() => {
|
|
121
|
+
var t, o, s, m;
|
|
122
|
+
return e && ((o = (t = e[0]) == null ? void 0 : t.serviceJourney) != null && o.stopPoints) && ((m = (s = e[0]) == null ? void 0 : s.serviceJourney) == null ? void 0 : m.stopPoints[0].stopStatus) === "NOT_SERVICED" ? "sbb-pearl-chain--departure-skipped" : "";
|
|
123
|
+
})(), w = (() => {
|
|
124
|
+
var s;
|
|
125
|
+
const t = e && e[e.length - 1], o = t && ((s = t.serviceJourney) == null ? void 0 : s.stopPoints);
|
|
126
|
+
return o && o[o.length - 1].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--arrival-skipped" : "";
|
|
127
|
+
})(), F = (() => {
|
|
128
|
+
var t, o, s;
|
|
129
|
+
return e && ((s = (o = (t = e[0]) == null ? void 0 : t.serviceJourney) == null ? void 0 : o.serviceAlteration) != null && s.cancelled) ? "sbb-pearl-chain--departure-disruption" : "";
|
|
130
|
+
})(), L = (() => {
|
|
131
|
+
var t, o, s;
|
|
132
|
+
return e && ((s = (o = (t = e[e.length - 1]) == null ? void 0 : t.serviceJourney) == null ? void 0 : o.serviceAlteration) != null && s.cancelled) ? "sbb-pearl-chain--arrival-disruption" : "";
|
|
133
|
+
})(), C = i && c && this._getStatus(a, i, c), ue = e && C && !F ? "sbb-pearl-chain__bullet--" + C : "", _e = e && C && !L ? "sbb-pearl-chain__bullet--" + this._getStatus(a, void 0, c) : "";
|
|
134
|
+
return this._isAllCancelled(e) ? y`
|
|
116
135
|
<div class="sbb-pearl-chain">
|
|
117
136
|
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
118
137
|
<div class="sbb-pearl-chain__leg sbb-pearl-chain__leg--disruption"></div>
|
|
119
138
|
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
120
139
|
</div>
|
|
121
|
-
` :
|
|
140
|
+
` : y`
|
|
122
141
|
<div class="sbb-pearl-chain">
|
|
123
142
|
<span
|
|
124
|
-
class="sbb-pearl-chain__bullet ${
|
|
143
|
+
class="sbb-pearl-chain__bullet ${ue} ${_} ${F}"
|
|
125
144
|
></span>
|
|
126
|
-
${e
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
${e == null ? void 0 : e.map((t, o) => {
|
|
146
|
+
var ee, ae, re, te, le, ie, se, ne;
|
|
147
|
+
const { stopPoints: s, serviceAlteration: m } = (t == null ? void 0 : t.serviceJourney) || {}, ve = this._getRelativeDuration(e, t), ge = h((ee = t.departure) == null ? void 0 : ee.time), me = h((ae = t.arrival) == null ? void 0 : ae.time), fe = s && ((re = s[s.length - 1]) == null ? void 0 : re.stopStatus) === "NOT_SERVICED", ke = s && ((te = s[s.length - 1]) == null ? void 0 : te.stopStatus) === "PLANNED", Z = s && ((le = s[0]) == null ? void 0 : le.stopStatus) === "NOT_SERVICED", $ = o > 0 && e[o - 1].serviceJourney.stopPoints, ye = $ && ((ie = $[$.length - 1]) == null ? void 0 : ie.stopStatus) === "NOT_SERVICED", z = fe || Z && ke ? "sbb-pearl-chain__leg--skipped" : "", we = Z || ye ? "sbb-pearl-chain__stop--departure-skipped" : "", x = m != null && m.cancelled ? "sbb-pearl-chain__leg--disruption" : "", N = { time: ge, delay: ((se = t.departure) == null ? void 0 : se.delay) ?? 0 }, E = { time: me, delay: ((ne = t.arrival) == null ? void 0 : ne.delay) ?? 0 }, P = this._getStatus(a, N, E), ze = !x && !z && "sbb-pearl-chain__leg--" + P;
|
|
148
|
+
return y` <div
|
|
149
|
+
class="sbb-pearl-chain__leg ${ze || ""} ${x} ${z}"
|
|
150
|
+
style=${he({
|
|
151
|
+
"--sbb-pearl-chain-leg-width": `${ve}%`,
|
|
152
|
+
...P === "progress" && !x && !z ? {
|
|
153
|
+
"--sbb-pearl-chain-leg-status": `${this._getProgress(a, N, E)}%`
|
|
134
154
|
} : {}
|
|
135
155
|
})}
|
|
136
156
|
>
|
|
137
|
-
${
|
|
138
|
-
${
|
|
157
|
+
${o > 0 && o < e.length ? y`<span class="sbb-pearl-chain__stop ${we}"></span>` : pe}
|
|
158
|
+
${P === "progress" && !x && !z ? this._renderPosition(a, N, E) : pe}
|
|
139
159
|
</div>`;
|
|
140
160
|
})}
|
|
141
161
|
<span
|
|
142
|
-
class="sbb-pearl-chain__bullet ${
|
|
162
|
+
class="sbb-pearl-chain__bullet ${_e} ${w} ${L}"
|
|
143
163
|
></span>
|
|
144
164
|
</div>
|
|
145
165
|
`;
|
|
146
166
|
}
|
|
147
|
-
},
|
|
148
|
-
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
149
|
-
|
|
167
|
+
}, v = new WeakMap(), g = new WeakMap(), d = u, (() => {
|
|
168
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(J[Symbol.metadata] ?? null) : void 0;
|
|
169
|
+
W = [O({ type: Array })], B = [xe(), O({ attribute: "disable-animation", type: Boolean })], Y = [O()], S(u, null, W, { kind: "accessor", name: "legs", static: !1, private: !1, access: { has: (e) => "legs" in e, get: (e) => e.legs, set: (e, r) => {
|
|
150
170
|
e.legs = r;
|
|
151
|
-
} }, metadata: a },
|
|
171
|
+
} }, metadata: a }, G, V), S(u, null, B, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, r) => {
|
|
152
172
|
e.disableAnimation = r;
|
|
153
|
-
} }, metadata: a },
|
|
173
|
+
} }, metadata: a }, j, M), S(u, null, Y, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, r) => {
|
|
154
174
|
e.now = r;
|
|
155
|
-
} }, metadata: a }, null,
|
|
156
|
-
})(),
|
|
175
|
+
} }, metadata: a }, null, R), S(null, n = { value: d }, l, { kind: "class", name: d.name, metadata: a }, null, p), d = n.value, a && Object.defineProperty(d, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
|
|
176
|
+
})(), u.styles = $e, f(d, p), d;
|
|
157
177
|
})();
|
|
158
178
|
export {
|
|
159
|
-
|
|
179
|
+
Me as SbbPearlChainElement
|
|
160
180
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SbbDateLike } from '@sbb-esta/lyne-elements/core/interfaces/types';
|
|
2
1
|
import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
|
|
3
2
|
import { Leg, PtRideLeg } from '../core/timetable.js';
|
|
4
3
|
/**
|
|
@@ -30,8 +29,11 @@ export declare class SbbPearlChainTimeElement extends LitElement {
|
|
|
30
29
|
accessor disableAnimation: boolean;
|
|
31
30
|
/** Optional prop to render wheelchair-small instead of walk-small */
|
|
32
31
|
accessor a11yFootpath: boolean;
|
|
33
|
-
/**
|
|
34
|
-
|
|
32
|
+
/**
|
|
33
|
+
* A configured date which acts as the current date instead of the real current date.
|
|
34
|
+
* Only recommended for testing purposes.
|
|
35
|
+
*/
|
|
36
|
+
set now(value: Date | undefined);
|
|
35
37
|
get now(): Date;
|
|
36
38
|
private _now;
|
|
37
39
|
private _language;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pearl-chain-time.component.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain-time/pearl-chain-time.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pearl-chain-time.component.d.ts","sourceRoot":"","sources":["../../../src/elements-experimental/pearl-chain-time/pearl-chain-time.component.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAIhD,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAK3D,OAAO,mBAAmB,CAAC;AAE3B;;GAEG;AACH,qBAEM,wBAAyB,SAAQ,UAAU;IAC/C,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;;;;OAOG;IACH,SAA2C,IAAI,EAAE,CAAC,GAAG,GAAG,SAAS,CAAC,EAAE,CAAM;IAE1E,sEAAsE;IACtE,SAEgB,aAAa,EAAE,MAAM,CAAM;IAE3C,oEAAoE;IACpE,SAEgB,WAAW,EAAE,MAAM,CAAM;IAEzC,0EAA0E;IAC1E,SAEgB,aAAa,EAAE,MAAM,CAAO;IAE5C,uEAAuE;IACvE,SAEgB,WAAW,EAAE,MAAM,CAAO;IAE1C;;;OAGG;IACH,SAEgB,gBAAgB,EAAE,OAAO,CAAS;IAElD,qEAAqE;IACrE,SAEgB,YAAY,EAAE,OAAO,CAAS;IAE9C;;;OAGG;IACH,IACW,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,EAErC;IACD,IAAW,GAAG,IAAI,IAAI,CAErB;IACD,OAAO,CAAC,IAAI,CAAqB;IAEjC,OAAO,CAAC,SAAS,CAAmC;cAEjC,MAAM,IAAI,cAAc;CAoD5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,sBAAsB,EAAE,wBAAwB,CAAC;KAClD;CACF"}
|