@sbb-esta/lyne-elements-experimental-dev 4.7.0-dev.1773333596 → 4.7.0-dev.1773388997

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.
Files changed (199) hide show
  1. package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +65 -76
  2. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +72 -52
  3. package/autocomplete-grid/autocomplete-grid-button.js +3 -6
  4. package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -17
  5. package/autocomplete-grid/autocomplete-grid-cell.js +4 -7
  6. package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +20 -21
  7. package/autocomplete-grid/autocomplete-grid-optgroup.js +3 -6
  8. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -33
  9. package/autocomplete-grid/autocomplete-grid-option.js +4 -9
  10. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -22
  11. package/autocomplete-grid/autocomplete-grid-row.js +4 -7
  12. package/autocomplete-grid/autocomplete-grid.js +3 -6
  13. package/autocomplete-grid-cell.component-Dak9wlBr.js +24 -0
  14. package/autocomplete-grid-option.component-DNRFHOwc.js +37 -0
  15. package/autocomplete-grid-row.component-DBHZQ0GQ.js +27 -0
  16. package/autocomplete-grid.js +9 -21
  17. package/autocomplete-grid.pure.js +7 -15
  18. package/core/datetime/date-helper.js +2 -191
  19. package/core/datetime.js +2 -5
  20. package/core/timetable/access-leg-helper.js +76 -71
  21. package/core/timetable/timetable-helper.js +9 -11
  22. package/core/timetable/timetable-properties.js +0 -1
  23. package/core/timetable.js +3 -7
  24. package/date-helper-CGproP5d.js +185 -0
  25. package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +114 -122
  26. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +92 -70
  27. package/development/autocomplete-grid/autocomplete-grid-button.js +6 -4
  28. package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +2 -29
  29. package/development/autocomplete-grid/autocomplete-grid-cell.js +7 -5
  30. package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +27 -22
  31. package/development/autocomplete-grid/autocomplete-grid-optgroup.js +6 -4
  32. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +2 -109
  33. package/development/autocomplete-grid/autocomplete-grid-option.js +7 -7
  34. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -91
  35. package/development/autocomplete-grid/autocomplete-grid-row.js +7 -5
  36. package/development/autocomplete-grid/autocomplete-grid.js +6 -4
  37. package/development/autocomplete-grid-cell.component-BBvM4o2H.js +42 -0
  38. package/development/autocomplete-grid-option.component-QzfM5eIE.js +123 -0
  39. package/development/autocomplete-grid-row.component-H8sCTCkT.js +104 -0
  40. package/development/autocomplete-grid.js +10 -14
  41. package/development/autocomplete-grid.pure.js +4 -13
  42. package/development/core/datetime/date-helper.js +2 -285
  43. package/development/core/datetime.js +2 -6
  44. package/development/core/timetable/access-leg-helper.js +104 -82
  45. package/development/core/timetable/timetable-helper.js +16 -17
  46. package/development/core/timetable/timetable-properties.js +0 -2
  47. package/development/core/timetable.js +3 -8
  48. package/development/date-helper-8_Y-PuHh.js +520 -0
  49. package/development/differenceInMinutes-DN_1Rk3O.js +110 -0
  50. package/development/format-Bbrn2bgo.js +1848 -0
  51. package/development/isValid-C-HzKv4v.js +178 -0
  52. package/development/journey-summary/journey-summary.component.js +2 -288
  53. package/development/journey-summary.component-uGhZvA4p.js +385 -0
  54. package/development/journey-summary.js +8 -5
  55. package/development/journey-summary.pure.js +2 -5
  56. package/development/pearl-chain/pearl-chain.component.js +2 -634
  57. package/development/pearl-chain-time/pearl-chain-time.component.js +2 -306
  58. package/development/pearl-chain-time.component-B8mayTWD.js +415 -0
  59. package/development/pearl-chain-time.js +8 -5
  60. package/development/pearl-chain-time.pure.js +2 -5
  61. package/development/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -28
  62. package/development/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -393
  63. package/development/pearl-chain-vertical-item.component-BDzbcIaf.js +435 -0
  64. package/development/pearl-chain-vertical-item.js +8 -5
  65. package/development/pearl-chain-vertical-item.pure.js +2 -5
  66. package/development/pearl-chain-vertical.component-CswE7b3M.js +39 -0
  67. package/development/pearl-chain-vertical.js +8 -5
  68. package/development/pearl-chain-vertical.pure.js +2 -5
  69. package/development/pearl-chain.component-wpsTvoSe.js +704 -0
  70. package/development/pearl-chain.js +8 -5
  71. package/development/pearl-chain.pure.js +2 -5
  72. package/development/seat-reservation/common/mapper/icon-mapper.js +168 -71
  73. package/development/seat-reservation/common/mapper/mapper.js +153 -122
  74. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +570 -559
  75. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +992 -972
  76. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20334 -20367
  77. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1731 -1738
  78. package/development/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9741 -9782
  79. package/development/seat-reservation/common/mapper.js +1 -8
  80. package/development/seat-reservation/common/svgs.js +2 -46
  81. package/development/seat-reservation/common/translations/i18n.js +1118 -900
  82. package/development/seat-reservation/common/translations.js +1 -4
  83. package/development/seat-reservation/common/types.js +0 -2
  84. package/development/seat-reservation/common.js +7 -11
  85. package/development/seat-reservation/seat-reservation/seat-reservation-base-element.js +1305 -1230
  86. package/development/seat-reservation/seat-reservation/seat-reservation.component.js +2 -859
  87. package/development/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -106
  88. package/development/seat-reservation/seat-reservation-area.js +7 -5
  89. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +35 -34
  90. package/development/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -162
  91. package/development/seat-reservation/seat-reservation-graphic.js +7 -5
  92. package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -713
  93. package/development/seat-reservation/seat-reservation-navigation-coach.js +7 -5
  94. package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -131
  95. package/development/seat-reservation/seat-reservation-navigation-services.js +7 -5
  96. package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -601
  97. package/development/seat-reservation/seat-reservation-place-control.js +7 -5
  98. package/development/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -22
  99. package/development/seat-reservation/seat-reservation-scoped.js +7 -5
  100. package/development/seat-reservation/seat-reservation.js +7 -6
  101. package/development/seat-reservation-area.component-BK92ZtFo.js +138 -0
  102. package/development/seat-reservation-graphic.component-cUnsHh5x.js +193 -0
  103. package/development/seat-reservation-navigation-coach.component-D6Bglus8.js +828 -0
  104. package/development/seat-reservation-navigation-services.component-DYJ6Ddkg.js +179 -0
  105. package/development/seat-reservation-place-control.component-Bg9evKBW.js +726 -0
  106. package/development/seat-reservation-scoped.component-DRQ_I702.js +31 -0
  107. package/development/seat-reservation.component-Cq_aJKR0.js +818 -0
  108. package/development/seat-reservation.js +15 -28
  109. package/development/seat-reservation.pure.js +10 -28
  110. package/development/svgs-C3JMWR26.js +28 -0
  111. package/development/timetable-duration/timetable-duration.component.js +2 -108
  112. package/development/timetable-duration.component-DI0lET17.js +125 -0
  113. package/development/timetable-duration.js +8 -5
  114. package/development/timetable-duration.pure.js +2 -5
  115. package/development/timetable-row/timetable-row.component.js +2 -781
  116. package/development/timetable-row.component-CAED6Zwc.js +932 -0
  117. package/development/timetable-row.js +8 -13
  118. package/development/timetable-row.pure.js +2 -12
  119. package/development/toDate-Biiv3kyf.js +150 -0
  120. package/differenceInMinutes-Dr9gRqtu.js +27 -0
  121. package/format-CM5exOsN.js +1103 -0
  122. package/isValid-B9oVW3lA.js +36 -0
  123. package/journey-summary/journey-summary.component.js +2 -194
  124. package/journey-summary.component-Cq_4kaOp.js +264 -0
  125. package/journey-summary.js +5 -4
  126. package/journey-summary.pure.js +2 -4
  127. package/package.json +2 -2
  128. package/pearl-chain/pearl-chain.component.js +2 -165
  129. package/pearl-chain-time/pearl-chain-time.component.js +2 -157
  130. package/pearl-chain-time.component-DGDW5S1c.js +239 -0
  131. package/pearl-chain-time.js +5 -4
  132. package/pearl-chain-time.pure.js +2 -4
  133. package/pearl-chain-vertical/pearl-chain-vertical.component.js +2 -17
  134. package/pearl-chain-vertical-item/pearl-chain-vertical-item.component.js +2 -77
  135. package/pearl-chain-vertical-item.component-G22bWhLU.js +108 -0
  136. package/pearl-chain-vertical-item.js +5 -4
  137. package/pearl-chain-vertical-item.pure.js +2 -4
  138. package/pearl-chain-vertical.component-CXIDT5RD.js +21 -0
  139. package/pearl-chain-vertical.js +5 -4
  140. package/pearl-chain-vertical.pure.js +2 -4
  141. package/pearl-chain.component-DmjkVIva.js +194 -0
  142. package/pearl-chain.js +5 -4
  143. package/pearl-chain.pure.js +2 -4
  144. package/seat-reservation/common/mapper/icon-mapper.js +71 -71
  145. package/seat-reservation/common/mapper/mapper.js +95 -89
  146. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-bus.js +568 -558
  147. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-decks.js +989 -970
  148. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-giruno.js +20332 -20366
  149. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-others.js +1729 -1737
  150. package/seat-reservation/common/mapper/sample-data/seat-reservation-sample-data-train.js +9739 -9781
  151. package/seat-reservation/common/mapper.js +3 -9
  152. package/seat-reservation/common/svgs.js +2 -243
  153. package/seat-reservation/common/translations/i18n.js +1084 -891
  154. package/seat-reservation/common/translations.js +2 -4
  155. package/seat-reservation/common/types.js +0 -1
  156. package/seat-reservation/common.js +9 -15
  157. package/seat-reservation/seat-reservation/seat-reservation-base-element.js +832 -810
  158. package/seat-reservation/seat-reservation/seat-reservation.component.js +2 -420
  159. package/seat-reservation/seat-reservation-area/seat-reservation-area.component.js +2 -51
  160. package/seat-reservation/seat-reservation-area.js +4 -7
  161. package/seat-reservation/seat-reservation-graphic/seat-reservation-assets.js +68 -71
  162. package/seat-reservation/seat-reservation-graphic/seat-reservation-graphic.component.js +2 -75
  163. package/seat-reservation/seat-reservation-graphic.js +4 -7
  164. package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +2 -234
  165. package/seat-reservation/seat-reservation-navigation-coach.js +4 -7
  166. package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +2 -85
  167. package/seat-reservation/seat-reservation-navigation-services.js +4 -7
  168. package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +2 -203
  169. package/seat-reservation/seat-reservation-place-control.js +4 -7
  170. package/seat-reservation/seat-reservation-scoped/seat-reservation-scoped.component.js +2 -13
  171. package/seat-reservation/seat-reservation-scoped.js +4 -7
  172. package/seat-reservation/seat-reservation.js +5 -9
  173. package/seat-reservation-area.component-n-9rGn_y.js +75 -0
  174. package/seat-reservation-graphic.component-YTXRmKt0.js +102 -0
  175. package/seat-reservation-navigation-coach.component-YJ0vaYmO.js +333 -0
  176. package/seat-reservation-navigation-services.component-C3xnLJg2.js +127 -0
  177. package/seat-reservation-place-control.component-DmBAfM6K.js +322 -0
  178. package/seat-reservation-scoped.component-DPkz6u17.js +17 -0
  179. package/seat-reservation.component-C_anMkgw.js +364 -0
  180. package/seat-reservation.js +17 -39
  181. package/seat-reservation.pure.js +15 -32
  182. package/svgs-D9arBcqr.js +26 -0
  183. package/timetable-duration/timetable-duration.component.js +2 -57
  184. package/timetable-duration.component-DCu8Phts.js +65 -0
  185. package/timetable-duration.js +5 -4
  186. package/timetable-duration.pure.js +2 -4
  187. package/timetable-row/timetable-row.component.js +2 -427
  188. package/timetable-row.component-BVRCB3xK.js +559 -0
  189. package/timetable-row.js +6 -13
  190. package/timetable-row.pure.js +2 -11
  191. package/toDate-p-Tpkb7t.js +16 -0
  192. package/development/differenceInMinutes-B0dawX-5.js +0 -26
  193. package/development/format-BMkeaqaF.js +0 -1433
  194. package/development/isValid-BYRch7pV.js +0 -53
  195. package/development/toDate-BWb6Z1JD.js +0 -24
  196. package/differenceInMinutes-COvvdYsJ.js +0 -23
  197. package/format-CmKROkbc.js +0 -1186
  198. package/isValid-m3_OsPaB.js +0 -45
  199. package/toDate-Bw2KTWeq.js +0 -15
@@ -1,165 +1,2 @@
1
- var j = (t) => {
2
- throw TypeError(t);
3
- };
4
- var M = (t, i, o) => i.has(t) || j("Cannot " + o);
5
- var N = (t, i, o) => (M(t, i, "read from private field"), o ? o.call(t) : i.get(t)), I = (t, i, o) => i.has(t) ? j("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, o), v = (t, i, o, _) => (M(t, i, "write to private field"), _ ? _.call(t, o) : i.set(t, o), o);
6
- import { __runInitializers as m, __esDecorate as P } from "tslib";
7
- import { SbbElement as oe } from "@sbb-esta/lyne-elements/core/base-elements.js";
8
- import { defaultDateAdapter as Y } from "@sbb-esta/lyne-elements/core/datetime.js";
9
- import { forceType as ne } from "@sbb-esta/lyne-elements/core/decorators.js";
10
- import { boxSizingStyles as be } from "@sbb-esta/lyne-elements/core/styles.js";
11
- import { css as ce, html as f, nothing as F } from "lit";
12
- import { property as E } from "lit/decorators.js";
13
- import { styleMap as X } from "lit/directives/style-map.js";
14
- import { removeTimezoneFromISOTimeString as n } from "../core/datetime.js";
15
- import { isRideLeg as pe } from "../core/timetable.js";
16
- import { d as w, a as z } from "../differenceInMinutes-COvvdYsJ.js";
17
- import { t as x } from "../toDate-Bw2KTWeq.js";
18
- function he(t, i) {
19
- return +x(t) > +x(i);
20
- }
21
- function q(t, i) {
22
- return +x(t) < +x(i);
23
- }
24
- const de = ce`: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-position-color: var(--sbb-color-primary);--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-background-color-3-inverted);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-past: light-dark(var(--sbb-color-metal), var(--sbb-color-granite));--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: light-dark( var(--sbb-color-metal), var(--sbb-color-granite) );--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-error);--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-position-color)}@media(forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-position-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}50%{box-shadow:0 0 0 .1875rem color-mix(in srgb,var(--sbb-pearl-chain-position-color) 20%,transparent)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}}.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;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-path:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
25
- let Ce = (() => {
26
- var u, g, b;
27
- let t = oe, i = [], o, _ = [], H = [], O, J = [], R = [], W;
28
- return b = class extends t {
29
- constructor() {
30
- super(...arguments);
31
- I(this, u);
32
- I(this, g);
33
- v(this, u, (m(this, i), m(this, _, []))), v(this, g, (m(this, H), m(this, J, !1))), this._now = (m(this, R), null);
34
- }
35
- /**
36
- * Define the legs of the pearl-chain.
37
- * Format:
38
- * `{"legs": [{"duration": 25}, ...]}`
39
- * `duration` in minutes. Duration of the leg is relative
40
- * to the total travel time. Example: departure 16:30, change at 16:40,
41
- * arrival at 17:00. So the change should have a duration of 33.33%.
42
- */
43
- get legs() {
44
- return N(this, u);
45
- }
46
- set legs(a) {
47
- v(this, u, a);
48
- }
49
- /**
50
- * Per default, the current location has a pulsating animation. You can
51
- * disable the animation with this property.
52
- */
53
- get disableAnimation() {
54
- return N(this, g);
55
- }
56
- set disableAnimation(a) {
57
- v(this, g, a);
58
- }
59
- /**
60
- * A configured date which acts as the current date instead of the real current date.
61
- * Only recommended for testing purposes.
62
- */
63
- set now(a) {
64
- this._now = Y.getValidDateOrNull(Y.deserialize(a));
65
- }
66
- get now() {
67
- return this._now;
68
- }
69
- _getAllDuration(a) {
70
- return a?.reduce((e, r) => {
71
- const l = n(r.arrival?.time), s = n(r.departure?.time);
72
- return l && s ? e + w(n(r.arrival.time), n(r.departure.time)) : e;
73
- }, 0);
74
- }
75
- _isAllCancelled(a) {
76
- return a?.every((e) => e?.serviceJourney?.serviceAlteration?.cancelled);
77
- }
78
- _getRelativeDuration(a, e) {
79
- const r = n(e.arrival?.time), l = n(e.departure?.time);
80
- if (r && l) {
81
- const s = w(n(e.arrival.time), n(e.departure.time)), c = this._getAllDuration(a);
82
- return c === 0 ? 100 : s / c * 100;
83
- }
84
- return 0;
85
- }
86
- _getProgress(a, e, r) {
87
- if (!e?.time || !r?.time)
88
- return 0;
89
- const l = z(e.time, e.delay ?? 0), s = z(r.time, r.delay ?? 0), c = w(s, l), S = w(a, l);
90
- return c && S / c * 100;
91
- }
92
- _getStatus(a, e, r) {
93
- const l = e && e.time && z(e.time, e.delay ?? 0), s = r && r.time && z(r.time, r.delay ?? 0);
94
- return l && q(l, a) && s && he(s, a) ? "progress" : s && q(s, a) ? "past" : "future";
95
- }
96
- _renderPosition(a, e, r) {
97
- const l = this._getProgress(a, e, r);
98
- if (l < 0 && l > 100)
99
- return;
100
- const s = () => ({
101
- "--sbb-pearl-chain-status-position": `${l}%`,
102
- ...l >= 50 ? { transform: "translateX(-100%)" } : {}
103
- }), c = this.disableAnimation ? "sbb-pearl-chain__position--no-animation" : "";
104
- return f`<span
105
- style=${X(s())}
106
- class="sbb-pearl-chain__position ${c}"
107
- ></span>`;
108
- }
109
- render() {
110
- const a = this.now ?? /* @__PURE__ */ new Date(), e = this.legs?.filter((p) => pe(p)), r = e?.length && n(e[0]?.departure?.time), l = r && {
111
- time: r,
112
- delay: e[0].departure.delay ?? 0
113
- }, s = e?.length && n(e[e.length - 1].arrival?.time), c = s && {
114
- time: s,
115
- delay: e[e.length - 1]?.arrival.delay ?? 0
116
- }, S = e && e[0]?.serviceJourney?.stopPoints && e[0]?.serviceJourney?.stopPoints[0].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--departure-skipped" : "", K = (() => {
117
- const p = e && e[e.length - 1], h = p && p.serviceJourney?.stopPoints;
118
- return h && h[h.length - 1].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--arrival-skipped" : "";
119
- })(), G = e && e[0]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--departure-disruption" : "", L = e && e[e.length - 1]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--arrival-disruption" : "", A = l && c && this._getStatus(a, l, c), Q = e && A && !G ? "sbb-pearl-chain__bullet--" + A : "", U = e && A && !L ? "sbb-pearl-chain__bullet--" + this._getStatus(a, void 0, c) : "";
120
- return this._isAllCancelled(e) ? f`
121
- <div class="sbb-pearl-chain">
122
- <span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
123
- <div class="sbb-pearl-chain__leg sbb-pearl-chain__leg--disruption"></div>
124
- <span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
125
- </div>
126
- ` : f`
127
- <div class="sbb-pearl-chain">
128
- <span
129
- class="sbb-pearl-chain__bullet ${Q} ${S} ${G}"
130
- ></span>
131
- ${e?.map((p, h) => {
132
- const { stopPoints: d, serviceAlteration: V } = p?.serviceJourney || {}, Z = this._getRelativeDuration(e, p), ee = n(p.departure?.time), ae = n(p.arrival?.time), re = d && d[d.length - 1]?.stopStatus === "NOT_SERVICED", te = d && d[d.length - 1]?.stopStatus === "PLANNED", B = d && d[0]?.stopStatus === "NOT_SERVICED", D = h > 0 && e[h - 1].serviceJourney.stopPoints, ie = D && D[D.length - 1]?.stopStatus === "NOT_SERVICED", k = re || B && te ? "sbb-pearl-chain__leg--skipped" : "", le = B || ie ? "sbb-pearl-chain__stop--departure-skipped" : "", y = V?.cancelled || V?.partiallyCancelled ? "sbb-pearl-chain__leg--disruption" : "", T = { time: ee, delay: p.departure?.delay ?? 0 }, C = { time: ae, delay: p.arrival?.delay ?? 0 }, $ = this._getStatus(a, T, C), se = !y && !k && "sbb-pearl-chain__leg--" + $;
133
- return f` <div
134
- class="sbb-pearl-chain__leg ${se || ""} ${y} ${k}"
135
- style=${X({
136
- "--sbb-pearl-chain-leg-width": `${Z}%`,
137
- ...$ === "progress" && !y && !k ? {
138
- "--sbb-pearl-chain-leg-status": `${this._getProgress(a, T, C)}%`
139
- } : {}
140
- })}
141
- >
142
- ${h > 0 && h < e.length ? f`<span class="sbb-pearl-chain__stop ${le}"></span>` : F}
143
- ${$ === "progress" && !y && !k ? this._renderPosition(a, T, C) : F}
144
- </div>`;
145
- })}
146
- <span
147
- class="sbb-pearl-chain__bullet ${U} ${K} ${L}"
148
- ></span>
149
- </div>
150
- `;
151
- }
152
- }, u = new WeakMap(), g = new WeakMap(), (() => {
153
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(t[Symbol.metadata] ?? null) : void 0;
154
- o = [E({ type: Array })], O = [ne(), E({ attribute: "disable-animation", type: Boolean })], W = [E()], P(b, null, o, { kind: "accessor", name: "legs", static: !1, private: !1, access: { has: (e) => "legs" in e, get: (e) => e.legs, set: (e, r) => {
155
- e.legs = r;
156
- } }, metadata: a }, _, H), P(b, null, O, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, r) => {
157
- e.disableAnimation = r;
158
- } }, metadata: a }, J, R), P(b, null, W, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, r) => {
159
- e.now = r;
160
- } }, metadata: a }, null, i), a && Object.defineProperty(b, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
161
- })(), b.elementName = "sbb-pearl-chain", b.styles = [be, de], b;
162
- })();
163
- export {
164
- Ce as SbbPearlChainElement
165
- };
1
+ import { t as e } from "../pearl-chain.component-DmjkVIva.js";
2
+ export { e as SbbPearlChainElement };
@@ -1,157 +1,2 @@
1
- var M = (a) => {
2
- throw TypeError(a);
3
- };
4
- var Q = (a, s, o) => s.has(a) || M("Cannot " + o);
5
- var m = (a, s, o) => (Q(a, s, "read from private field"), o ? o.call(a) : s.get(a)), c = (a, s, o) => s.has(a) ? M("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, o), l = (a, s, o, x) => (Q(a, s, "write to private field"), x ? x.call(a, o) : s.set(a, o), o);
6
- import { __runInitializers as n, __esDecorate as h } from "tslib";
7
- import { SbbElement as P } from "@sbb-esta/lyne-elements/core/base-elements.js";
8
- import { SbbLanguageController as C } from "@sbb-esta/lyne-elements/core/controllers.js";
9
- import { defaultDateAdapter as U } from "@sbb-esta/lyne-elements/core/datetime.js";
10
- import { forceType as y } from "@sbb-esta/lyne-elements/core/decorators.js";
11
- import { i18nDeparture as ee, i18nTransferProcedures as te, i18nArrival as ae } from "@sbb-esta/lyne-elements/core/i18n.js";
12
- import { boxSizingStyles as ie } from "@sbb-esta/lyne-elements/core/styles.js";
13
- import { css as re, nothing as w, html as k } from "lit";
14
- import { property as p } from "lit/decorators.js";
15
- import { removeTimezoneFromISOTimeString as X } from "../core/datetime.js";
16
- import { getDepartureArrivalTimeAttribute as se, isRideLeg as le } from "../core/timetable.js";
17
- import "../pearl-chain.js";
18
- import { f as Y } from "../format-CmKROkbc.js";
19
- const ne = re`:host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-width:37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media(min-width:64rem){:host{--sbb-pearl-chain-time-height: 1.75rem}}.sbb-pearl-chain__time{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;height:var(--sbb-pearl-chain-time-height)}.sbb-pearl-chain__time-walktime,.sbb-pearl-chain__time-transfer{--sbb-text-font-size: var(--sbb-text-font-size-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);display:inline-flex;align-items:center}.sbb-pearl-chain__time-walktime--walk-small-left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{transform:translate(-.375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{flex:1 1 auto;align-self:center;margin-inline:var(--sbb-spacing-fixed-3x)}.sbb-pearl-chain__time-time{--sbb-text-font-size: var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);font-weight:700;color:var(--sbb-color-2)}.sbb-screen-reader-only{border:0;clip-path:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
20
- let we = (() => {
21
- var b, d, g, _, u, f, v, r;
22
- let a = P, s = [], o, x = [], z = [], T, W = [], A = [], $, F = [], I = [], N, D = [], H = [], O, j = [], L = [], B, S = [], R = [], V, q = [], G = [], J;
23
- return r = class extends a {
24
- constructor() {
25
- super(...arguments);
26
- c(this, b);
27
- c(this, d);
28
- c(this, g);
29
- c(this, _);
30
- c(this, u);
31
- c(this, f);
32
- c(this, v);
33
- l(this, b, (n(this, s), n(this, x, []))), l(this, d, (n(this, z), n(this, W, ""))), l(this, g, (n(this, A), n(this, F, ""))), l(this, _, (n(this, I), n(this, D, NaN))), l(this, u, (n(this, H), n(this, j, NaN))), l(this, f, (n(this, L), n(this, S, !1))), l(this, v, (n(this, R), n(this, q, !1))), this._now = (n(this, G), null), this._language = new C(this);
34
- }
35
- /**
36
- * define the legs of the pearl-chain.
37
- * Format:
38
- * `{"legs": [{"duration": 25}, ...]}`
39
- * `duration` in minutes. Duration of the leg is relative
40
- * to the total travel time. Example: departure 16:30, change at 16:40,
41
- * arrival at 17:00. So the change should have a duration of 33.33%.
42
- */
43
- get legs() {
44
- return m(this, b);
45
- }
46
- set legs(t) {
47
- l(this, b, t);
48
- }
49
- /** Prop to render the departure time - will be formatted as "H:mm" */
50
- get departureTime() {
51
- return m(this, d);
52
- }
53
- set departureTime(t) {
54
- l(this, d, t);
55
- }
56
- /** Prop to render the arrival time - will be formatted as "H:mm" */
57
- get arrivalTime() {
58
- return m(this, g);
59
- }
60
- set arrivalTime(t) {
61
- l(this, g, t);
62
- }
63
- /** Optional prop to render the walk time (in minutes) before departure */
64
- get departureWalk() {
65
- return m(this, _);
66
- }
67
- set departureWalk(t) {
68
- l(this, _, t);
69
- }
70
- /** Optional prop to render the walk time (in minutes) after arrival */
71
- get arrivalWalk() {
72
- return m(this, u);
73
- }
74
- set arrivalWalk(t) {
75
- l(this, u, t);
76
- }
77
- /**
78
- * Per default, the current location has a pulsating animation. You can
79
- * disable the animation with this property.
80
- */
81
- get disableAnimation() {
82
- return m(this, f);
83
- }
84
- set disableAnimation(t) {
85
- l(this, f, t);
86
- }
87
- /** Optional prop to render wheelchair-small instead of walk-small */
88
- get a11yFootpath() {
89
- return m(this, v);
90
- }
91
- set a11yFootpath(t) {
92
- l(this, v, t);
93
- }
94
- /**
95
- * A configured date which acts as the current date instead of the real current date.
96
- * Only recommended for testing purposes.
97
- */
98
- set now(t) {
99
- this._now = U.getValidDateOrNull(U.deserialize(t));
100
- }
101
- get now() {
102
- return this._now ?? /* @__PURE__ */ new Date();
103
- }
104
- render() {
105
- const t = this.departureTime ? X(this.departureTime) : void 0, e = this.arrivalTime ? X(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: i, renderArrivalTimeAttribute: Z } = se(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath), K = this.legs?.filter((E) => le(E));
106
- return k`
107
- <div class="sbb-pearl-chain__time">
108
- ${i()}
109
- ${t ? k`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
110
- <span class="sbb-screen-reader-only"
111
- >${ee[this._language.current]}:&nbsp;</span
112
- >
113
- ${Y(t, "HH:mm")}
114
- </time>` : w}
115
- ${K?.length > 1 ? k`<span class="sbb-screen-reader-only" role="paragraph">
116
- ${K?.length - 1} ${te[this._language.current]}
117
- </span>` : w}
118
- <sbb-pearl-chain
119
- class="sbb-pearl-chain__time-chain"
120
- .legs=${this.legs}
121
- .disableAnimation=${this.disableAnimation}
122
- .now=${this.now}
123
- ></sbb-pearl-chain>
124
- ${e ? k`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
125
- <span class="sbb-screen-reader-only"
126
- >${ae[this._language.current]}:&nbsp;</span
127
- >
128
- ${Y(e, "HH:mm")}
129
- </time>` : w}
130
- ${Z()}
131
- </div>
132
- `;
133
- }
134
- }, b = new WeakMap(), d = new WeakMap(), g = new WeakMap(), _ = new WeakMap(), u = new WeakMap(), f = new WeakMap(), v = new WeakMap(), (() => {
135
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(a[Symbol.metadata] ?? null) : void 0;
136
- o = [p({ type: Array })], T = [y(), p({ attribute: "departure-time" })], $ = [y(), p({ attribute: "arrival-time" })], N = [y(), p({ attribute: "departure-walk", type: Number })], O = [y(), p({ attribute: "arrival-walk", type: Number })], B = [y(), p({ attribute: "disable-animation", type: Boolean })], V = [y(), p({ attribute: "a11y-footpath", type: Boolean })], J = [p()], h(r, null, o, { kind: "accessor", name: "legs", static: !1, private: !1, access: { has: (e) => "legs" in e, get: (e) => e.legs, set: (e, i) => {
137
- e.legs = i;
138
- } }, metadata: t }, x, z), h(r, null, T, { kind: "accessor", name: "departureTime", static: !1, private: !1, access: { has: (e) => "departureTime" in e, get: (e) => e.departureTime, set: (e, i) => {
139
- e.departureTime = i;
140
- } }, metadata: t }, W, A), h(r, null, $, { kind: "accessor", name: "arrivalTime", static: !1, private: !1, access: { has: (e) => "arrivalTime" in e, get: (e) => e.arrivalTime, set: (e, i) => {
141
- e.arrivalTime = i;
142
- } }, metadata: t }, F, I), h(r, null, N, { kind: "accessor", name: "departureWalk", static: !1, private: !1, access: { has: (e) => "departureWalk" in e, get: (e) => e.departureWalk, set: (e, i) => {
143
- e.departureWalk = i;
144
- } }, metadata: t }, D, H), h(r, null, O, { kind: "accessor", name: "arrivalWalk", static: !1, private: !1, access: { has: (e) => "arrivalWalk" in e, get: (e) => e.arrivalWalk, set: (e, i) => {
145
- e.arrivalWalk = i;
146
- } }, metadata: t }, j, L), h(r, null, B, { kind: "accessor", name: "disableAnimation", static: !1, private: !1, access: { has: (e) => "disableAnimation" in e, get: (e) => e.disableAnimation, set: (e, i) => {
147
- e.disableAnimation = i;
148
- } }, metadata: t }, S, R), h(r, null, V, { kind: "accessor", name: "a11yFootpath", static: !1, private: !1, access: { has: (e) => "a11yFootpath" in e, get: (e) => e.a11yFootpath, set: (e, i) => {
149
- e.a11yFootpath = i;
150
- } }, metadata: t }, q, G), h(r, null, J, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, set: (e, i) => {
151
- e.now = i;
152
- } }, metadata: t }, null, s), t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
153
- })(), r.elementName = "sbb-pearl-chain-time", r.styles = [ie, ne], r;
154
- })();
155
- export {
156
- we as SbbPearlChainTimeElement
157
- };
1
+ import { t as e } from "../pearl-chain-time.component-DGDW5S1c.js";
2
+ export { e as SbbPearlChainTimeElement };
@@ -0,0 +1,239 @@
1
+ import { t as e } from "./format-CM5exOsN.js";
2
+ import { __esDecorate as t, __runInitializers as n } from "tslib";
3
+ import { SbbElement as r } from "@sbb-esta/lyne-elements/core/base-elements.js";
4
+ import { SbbLanguageController as i } from "@sbb-esta/lyne-elements/core/controllers.js";
5
+ import { forceType as a } from "@sbb-esta/lyne-elements/core/decorators.js";
6
+ import { boxSizingStyles as o } from "@sbb-esta/lyne-elements/core/styles.js";
7
+ import { css as s, html as c, nothing as l } from "lit";
8
+ import { defaultDateAdapter as u } from "@sbb-esta/lyne-elements/core/datetime.js";
9
+ import { i18nArrival as d, i18nDeparture as f, i18nTransferProcedures as p } from "@sbb-esta/lyne-elements/core/i18n.js";
10
+ import { property as m } from "lit/decorators.js";
11
+ import { removeTimezoneFromISOTimeString as h } from "./core/datetime.js";
12
+ import { getDepartureArrivalTimeAttribute as g, isRideLeg as _ } from "./core/timetable.js";
13
+ import "./pearl-chain.js";
14
+ //#region src/elements-experimental/pearl-chain-time/pearl-chain-time.scss?lit&inline
15
+ var v = s`:host{--sbb-pearl-chain-time-height:auto;display:block}@media (width>=37.5rem){:host{--sbb-pearl-chain-time-height:1.5625rem}}@media (width>=64rem){:host{--sbb-pearl-chain-time-height:1.75rem}}.sbb-pearl-chain__time{height:var(--sbb-pearl-chain-time-height);flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}.sbb-pearl-chain__time-walktime,.sbb-pearl-chain__time-transfer{--sbb-text-font-size:var(--sbb-text-font-size-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);align-items:center;display:inline-flex}.sbb-pearl-chain__time-walktime--walk-small-left{margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem);transform:translate(-.4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem);transform:translate(-.375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{margin-inline:var(--sbb-spacing-fixed-3x);flex:auto;align-self:center}.sbb-pearl-chain__time-time{--sbb-text-font-size:var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);color:var(--sbb-color-2);font-weight:700}.sbb-screen-reader-only{clip-path:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`, y = (() => {
16
+ let s = r, y = [], b, x = [], S = [], C, w = [], T = [], E, D = [], O = [], k, A = [], j = [], M, N = [], P = [], F, I = [], L = [], R, z = [], B = [], V;
17
+ return class extends s {
18
+ constructor() {
19
+ super(...arguments), this.#e = (n(this, y), n(this, x, [])), this.#t = (n(this, S), n(this, w, "")), this.#n = (n(this, T), n(this, D, "")), this.#r = (n(this, O), n(this, A, NaN)), this.#i = (n(this, j), n(this, N, NaN)), this.#a = (n(this, P), n(this, I, !1)), this.#o = (n(this, L), n(this, z, !1)), this._now = (n(this, B), null), this._language = new i(this);
20
+ }
21
+ static {
22
+ let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(s[Symbol.metadata] ?? null) : void 0;
23
+ b = [m({ type: Array })], C = [a(), m({ attribute: "departure-time" })], E = [a(), m({ attribute: "arrival-time" })], k = [a(), m({
24
+ attribute: "departure-walk",
25
+ type: Number
26
+ })], M = [a(), m({
27
+ attribute: "arrival-walk",
28
+ type: Number
29
+ })], F = [a(), m({
30
+ attribute: "disable-animation",
31
+ type: Boolean
32
+ })], R = [a(), m({
33
+ attribute: "a11y-footpath",
34
+ type: Boolean
35
+ })], V = [m()], t(this, null, b, {
36
+ kind: "accessor",
37
+ name: "legs",
38
+ static: !1,
39
+ private: !1,
40
+ access: {
41
+ has: (e) => "legs" in e,
42
+ get: (e) => e.legs,
43
+ set: (e, t) => {
44
+ e.legs = t;
45
+ }
46
+ },
47
+ metadata: e
48
+ }, x, S), t(this, null, C, {
49
+ kind: "accessor",
50
+ name: "departureTime",
51
+ static: !1,
52
+ private: !1,
53
+ access: {
54
+ has: (e) => "departureTime" in e,
55
+ get: (e) => e.departureTime,
56
+ set: (e, t) => {
57
+ e.departureTime = t;
58
+ }
59
+ },
60
+ metadata: e
61
+ }, w, T), t(this, null, E, {
62
+ kind: "accessor",
63
+ name: "arrivalTime",
64
+ static: !1,
65
+ private: !1,
66
+ access: {
67
+ has: (e) => "arrivalTime" in e,
68
+ get: (e) => e.arrivalTime,
69
+ set: (e, t) => {
70
+ e.arrivalTime = t;
71
+ }
72
+ },
73
+ metadata: e
74
+ }, D, O), t(this, null, k, {
75
+ kind: "accessor",
76
+ name: "departureWalk",
77
+ static: !1,
78
+ private: !1,
79
+ access: {
80
+ has: (e) => "departureWalk" in e,
81
+ get: (e) => e.departureWalk,
82
+ set: (e, t) => {
83
+ e.departureWalk = t;
84
+ }
85
+ },
86
+ metadata: e
87
+ }, A, j), t(this, null, M, {
88
+ kind: "accessor",
89
+ name: "arrivalWalk",
90
+ static: !1,
91
+ private: !1,
92
+ access: {
93
+ has: (e) => "arrivalWalk" in e,
94
+ get: (e) => e.arrivalWalk,
95
+ set: (e, t) => {
96
+ e.arrivalWalk = t;
97
+ }
98
+ },
99
+ metadata: e
100
+ }, N, P), t(this, null, F, {
101
+ kind: "accessor",
102
+ name: "disableAnimation",
103
+ static: !1,
104
+ private: !1,
105
+ access: {
106
+ has: (e) => "disableAnimation" in e,
107
+ get: (e) => e.disableAnimation,
108
+ set: (e, t) => {
109
+ e.disableAnimation = t;
110
+ }
111
+ },
112
+ metadata: e
113
+ }, I, L), t(this, null, R, {
114
+ kind: "accessor",
115
+ name: "a11yFootpath",
116
+ static: !1,
117
+ private: !1,
118
+ access: {
119
+ has: (e) => "a11yFootpath" in e,
120
+ get: (e) => e.a11yFootpath,
121
+ set: (e, t) => {
122
+ e.a11yFootpath = t;
123
+ }
124
+ },
125
+ metadata: e
126
+ }, z, B), t(this, null, V, {
127
+ kind: "setter",
128
+ name: "now",
129
+ static: !1,
130
+ private: !1,
131
+ access: {
132
+ has: (e) => "now" in e,
133
+ set: (e, t) => {
134
+ e.now = t;
135
+ }
136
+ },
137
+ metadata: e
138
+ }, null, y), e && Object.defineProperty(this, Symbol.metadata, {
139
+ enumerable: !0,
140
+ configurable: !0,
141
+ writable: !0,
142
+ value: e
143
+ });
144
+ }
145
+ static {
146
+ this.elementName = "sbb-pearl-chain-time";
147
+ }
148
+ static {
149
+ this.styles = [o, v];
150
+ }
151
+ #e;
152
+ get legs() {
153
+ return this.#e;
154
+ }
155
+ set legs(e) {
156
+ this.#e = e;
157
+ }
158
+ #t;
159
+ get departureTime() {
160
+ return this.#t;
161
+ }
162
+ set departureTime(e) {
163
+ this.#t = e;
164
+ }
165
+ #n;
166
+ get arrivalTime() {
167
+ return this.#n;
168
+ }
169
+ set arrivalTime(e) {
170
+ this.#n = e;
171
+ }
172
+ #r;
173
+ get departureWalk() {
174
+ return this.#r;
175
+ }
176
+ set departureWalk(e) {
177
+ this.#r = e;
178
+ }
179
+ #i;
180
+ get arrivalWalk() {
181
+ return this.#i;
182
+ }
183
+ set arrivalWalk(e) {
184
+ this.#i = e;
185
+ }
186
+ #a;
187
+ get disableAnimation() {
188
+ return this.#a;
189
+ }
190
+ set disableAnimation(e) {
191
+ this.#a = e;
192
+ }
193
+ #o;
194
+ get a11yFootpath() {
195
+ return this.#o;
196
+ }
197
+ set a11yFootpath(e) {
198
+ this.#o = e;
199
+ }
200
+ set now(e) {
201
+ this._now = u.getValidDateOrNull(u.deserialize(e));
202
+ }
203
+ get now() {
204
+ return this._now ?? /* @__PURE__ */ new Date();
205
+ }
206
+ render() {
207
+ let t = this.departureTime ? h(this.departureTime) : void 0, n = this.arrivalTime ? h(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: r, renderArrivalTimeAttribute: i } = g(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath), a = this.legs?.filter((e) => _(e));
208
+ return c`
209
+ <div class="sbb-pearl-chain__time">
210
+ ${r()}
211
+ ${t ? c`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
212
+ <span class="sbb-screen-reader-only"
213
+ >${f[this._language.current]}:&nbsp;</span
214
+ >
215
+ ${e(t, "HH:mm")}
216
+ </time>` : l}
217
+ ${a?.length > 1 ? c`<span class="sbb-screen-reader-only" role="paragraph">
218
+ ${a?.length - 1} ${p[this._language.current]}
219
+ </span>` : l}
220
+ <sbb-pearl-chain
221
+ class="sbb-pearl-chain__time-chain"
222
+ .legs=${this.legs}
223
+ .disableAnimation=${this.disableAnimation}
224
+ .now=${this.now}
225
+ ></sbb-pearl-chain>
226
+ ${n ? c`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
227
+ <span class="sbb-screen-reader-only"
228
+ >${d[this._language.current]}:&nbsp;</span
229
+ >
230
+ ${e(n, "HH:mm")}
231
+ </time>` : l}
232
+ ${i()}
233
+ </div>
234
+ `;
235
+ }
236
+ };
237
+ })();
238
+ //#endregion
239
+ export { y as t };
@@ -1,5 +1,6 @@
1
- import { SbbPearlChainTimeElement as e } from "./pearl-chain-time/pearl-chain-time.component.js";
1
+ import { t as e } from "./pearl-chain-time.component-DGDW5S1c.js";
2
+ import "./pearl-chain-time.pure.js";
3
+ //#region src/elements-experimental/pearl-chain-time.ts
2
4
  e.define();
3
- export {
4
- e as SbbPearlChainTimeElement
5
- };
5
+ //#endregion
6
+ export { e as SbbPearlChainTimeElement };
@@ -1,4 +1,2 @@
1
- import { SbbPearlChainTimeElement as r } from "./pearl-chain-time/pearl-chain-time.component.js";
2
- export {
3
- r as SbbPearlChainTimeElement
4
- };
1
+ import { t as e } from "./pearl-chain-time.component-DGDW5S1c.js";
2
+ export { e as SbbPearlChainTimeElement };
@@ -1,17 +1,2 @@
1
- import { SbbElement as i } from "@sbb-esta/lyne-elements/core/base-elements.js";
2
- import { boxSizingStyles as r } from "@sbb-esta/lyne-elements/core/styles.js";
3
- import { css as a, html as l } from "lit";
4
- const c = a`:host{--sbb-pearl-chain-vertical-width: 100%;display:block}.sbb-pearl-chain-vertical{display:table;width:var(--sbb-pearl-chain-vertical-width)}`, s = class s extends i {
5
- render() {
6
- return l`
7
- <div class="sbb-pearl-chain-vertical">
8
- <slot></slot>
9
- </div>
10
- `;
11
- }
12
- };
13
- s.elementName = "sbb-pearl-chain-vertical", s.styles = [r, c];
14
- let t = s;
15
- export {
16
- t as SbbPearlChainVerticalElement
17
- };
1
+ import { t as e } from "../pearl-chain-vertical.component-CXIDT5RD.js";
2
+ export { e as SbbPearlChainVerticalElement };