@geops/rvf-mobility-web-component 0.1.88 → 0.1.90
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.90](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.89...v0.1.90) (2025-11-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* hide overlay when it is not open ([3f9e8f2](https://github.com/geops/rvf-mobility-web-component/commit/3f9e8f2e3f7b9632152b924d860f4c5387fb51ee))
|
|
11
|
+
|
|
12
|
+
### [0.1.89](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.88...v0.1.89) (2025-11-20)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* fix padding ([853c54f](https://github.com/geops/rvf-mobility-web-component/commit/853c54f6a6a4616a07d19d41bf1e1f41032b449e))
|
|
18
|
+
|
|
5
19
|
### [0.1.88](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.87...v0.1.88) (2025-11-20)
|
|
6
20
|
|
|
7
21
|
|
package/index.js
CHANGED
|
@@ -1281,7 +1281,7 @@ end`};t.events.push(["putFont",function(n){(function(l){var h=l.font,d=l.out,p=l
|
|
|
1281
1281
|
/* transform: rotate(-45deg); */
|
|
1282
1282
|
`,children:j("path",{d:"M13.2928932,5.29289322 C13.6834175,4.90236893 14.3165825,4.90236893 14.7071068,5.29289322 L20.7071068,11.2928932 C20.7355731,11.3213595 20.7623312,11.3515341 20.787214,11.3832499 C20.7927155,11.3901576 20.7982466,11.397397 20.8036654,11.4046934 C20.8215099,11.4288693 20.8382813,11.453725 20.8539326,11.4793398 C20.8613931,11.4913869 20.8685012,11.5036056 20.8753288,11.5159379 C20.8862061,11.5357061 20.8966234,11.5561086 20.9063462,11.5769009 C20.914321,11.5939015 20.9218036,11.6112044 20.9287745,11.628664 C20.9366843,11.6484208 20.9438775,11.6682023 20.9504533,11.6882636 C20.9552713,11.7031487 20.9599023,11.7185367 20.9641549,11.734007 C20.9701664,11.7555635 20.9753602,11.7772539 20.9798348,11.7992059 C20.9832978,11.8166247 20.9863719,11.834051 20.9889822,11.8515331 C20.9962388,11.8996379 21,11.9493797 21,12 L20.9962979,11.9137692 C20.9978436,11.9317345 20.9989053,11.9497336 20.9994829,11.9677454 L21,12 C21,12.0112225 20.9998151,12.0224019 20.9994483,12.0335352 C20.9988772,12.050591 20.997855,12.0679231 20.996384,12.0852242 C20.994564,12.1070574 20.9920941,12.1281144 20.9889807,12.1489612 C20.9863719,12.165949 20.9832978,12.1833753 20.9797599,12.2007258 C20.9753602,12.2227461 20.9701664,12.2444365 20.964279,12.2658396 C20.9599023,12.2814633 20.9552713,12.2968513 20.9502619,12.3121425 C20.9438775,12.3317977 20.9366843,12.3515792 20.928896,12.3710585 C20.9218036,12.3887956 20.914321,12.4060985 20.9063266,12.4232215 C20.8966234,12.4438914 20.8862061,12.4642939 20.8751242,12.484277 C20.8685012,12.4963944 20.8613931,12.5086131 20.8540045,12.5207088 C20.8382813,12.546275 20.8215099,12.5711307 20.8036865,12.5951593 C20.774687,12.6343256 20.7425008,12.6717127 20.7071068,12.7071068 L20.787214,12.6167501 C20.7849289,12.6196628 20.7826279,12.6225624 20.7803112,12.625449 L20.7071068,12.7071068 L14.7071068,18.7071068 C14.3165825,19.0976311 13.6834175,19.0976311 13.2928932,18.7071068 C12.9023689,18.3165825 12.9023689,17.6834175 13.2928932,17.2928932 L17.585,13 L4,13 C3.48716416,13 3.06449284,12.6139598 3.00672773,12.1166211 L3,12 C3,11.4477153 3.44771525,11 4,11 L17.585,11 L13.2928932,6.70710678 C12.9324093,6.34662282 12.9046797,5.77939176 13.2097046,5.38710056 Z",fill:"currentColor",fillRule:"nonzero",id:"Combined-Shape",style:`
|
|
1283
1283
|
/* transform: rotate(-45deg); */
|
|
1284
|
-
`})})]})}var eF=Zd1;var Nd1="my-1 flex items-center leading-[1.1] underline text-base items-center justify-left font-semibold gap-1",Ud1={primary:{classes:"bg-red text-white disabled:bg-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"bg-white text-black hover:text-red active:text-lightred",selectedClasses:"text-red"}};function Qd1({children:r,className:t,theme:e="secondary",...i}){let o=It(()=>oe(`${Nd1} ${Ud1[e].classes} ${t||""}`),[t,e]);return j("a",{className:o,rel:"noreferrer",target:"_blank",...i,children:[(!i.href?.includes(window.location.hostname)||!i.href?.startsWith("(https?|ftp)"))&&j(eF,{height:"20",width:"20"}),r]})}var ds=et(Qd1);var cX=(r,t,e,i=!0)=>{let o=r.toLocaleTimeString(["de"],{hour:"2-digit",minute:"2-digit"});return`${r.toLocaleDateString(["de"],{day:"2-digit",month:i?"short":"long",year:e?"numeric":void 0})}${t&&o?` ${o}`:""}`.replace(",","")};function Hd1({canToggle:r=!1,headerClassName:t,iconClassName:e,publicationClassName:i,reasonClassName:o,situation:n,timeIntervalClassName:l,useShortMonth:h=!0}){let{locale:d,t:p}=er(),[C,M]=pt(!r);if(!n)return null;let S={},y={},O=[],Q=[],H=[];return Q=(n?.publications||[])?.filter(({publicationWindows:t1})=>(!t1?.length&&n?.publicationWindows?.length&&(t1=n?.publicationWindows),t1.find(({endTime:e1,startTime:J})=>{let g1=new Date,b1=new Date(J),T1=new Date(e1);return b1<=g1&&g1<=T1})))||[],O=(n?.affectedTimeIntervals||[]).filter(({endTime:t1,startTime:e1})=>{let J=new Date,g1=new Date(e1),b1=new Date(t1);return g1<=J&&J<=b1||J<g1})||[],H=(n?.reasons||[]).map(({name:t1})=>t1),j(Xe,{children:Q?.map(({id:t1,publicationLines:e1,publicationStops:J,textualContentLarge:g1,textualContentMedium:b1,textualContentSmall:T1})=>{S=g1||b1||T1,y=S?.[d()],y?.summary||(y=S?.de);let x1=e1?.flatMap(D1=>D1.lines?.map(({name:a1})=>a1)||[])||[],C1=J.map(D1=>D1?.name||"");return j("div",{className:oe("text-base",i),children:[j("div",{className:oe("text-xs uppercase",o),children:H}),j("h3",{className:oe("space-x-2 text-xl leading-[1.3] font-bold text-balance",t),children:[j("span",{className:"inline-block align-middle",children:j(tF,{className:oe(e)})}),j("span",{className:"align-middle *:inline",dangerouslySetInnerHTML:{__html:y?.summary}})]}),j("hr",{className:"my-1"}),O?.map(({dailyEndTime:D1,dailyStartTime:a1,endTime:w1,startTime:Q1},j1)=>{let c2=D1&&a1,C2=w1.includes("2500"),Y1=cX(new Date(Q1),!1,!0,h),H1=C2?void 0:cX(new Date(w1),!1,!0,h);return j("button",{className:oe("flex w-full items-center",r&&"cursor-pointer"),onClick:()=>{M(!C)},tabIndex:r?0:-1,children:[j("div",{className:oe("flex-1 text-left text-sm font-bold text-balance",l),children:[j("span",{children:[Y1&&H1?`${Y1} \u2013 ${H1}`:null,Y1&&!H1?p("from",{from:Y1}):null]}),c2&&j("span",{children:` (${p("daily_from_to",{from:a1,to:D1})})`})]},Q1),r&&j1==0&&j(Xe,{children:C?j(sL,{className:"text-red"}):j(_c,{className:"text-red"})})]},Q1)}),j("div",{className:C?"my-4 flex flex-col gap-4":"hidden",children:[y?.description&&j("div",{dangerouslySetInnerHTML:{__html:y?.description}}),!!S?.images?.length&&j("div",{className:"flex flex-wrap gap-2",children:S.images.map(({image:{absoluteUrl:D1,label:a1}})=>j("img",{alt:a1,className:"h-fit",src:D1,title:a1},D1+a1))}),!!S?.infoLinks?.length&&j("div",{children:S.infoLinks.map(({label:D1,uri:a1})=>{let w1=D1[d()]||D1.de||a1;return j(ds,{href:a1,title:w1,children:w1},a1)})}),!!x1?.length&&j("div",{children:[j("div",{className:"font-bold",children:[p("affected_lines"),":"]}),j("div",{className:"flex flex-wrap gap-1 text-sm",children:x1?.map(D1=>j("div",{className:"bg-red rounded-md px-[8px] py-[4px] font-bold text-white",children:D1},D1))})]}),!!C1?.length&&j("div",{children:[j("div",{className:"font-bold",children:[p("affected_stops"),":"]}),j("div",{className:"flex flex-wrap gap-1 text-sm",children:C1.map(D1=>j("div",{className:"bg-red rounded-md px-[8px] py-[4px] font-bold text-white",children:D1},D1))})]})]}),r&&j("hr",{className:"my-1"})]},t1)})})}var lL=et(Hd1);function Vd1(r,t){let{lang:e,notificationsLayer:i,previewNotifications:o}=Ct(),[n,l]=pt(),h=It(()=>i?.api,[i]);return G2(()=>{let d=o?.find(C=>C.id===r);if(d){l(d);return}let p=new AbortController;return h?.exportById(r,{contentLarge:!0,contentMedium:!0,contentSmall:!0,includeGeoms:!1,includeLines:!0,includeStops:!0,[e]:!0,limit:1,...t||{}}).then(C=>{l(C)}).catch(C=>{if(C.code!==20){l(void 0),console.error("Failed to fetch situation",C);return}}),()=>{p.abort()}},[h,r,t,e,o]),n}var uX=Vd1;function Gd1({className:r,feature:t,...e}){let{situationId:i}=t.getProperties(),o=uX(i);return j(Sn,{...e,className:oe("px-4 text-base",r),children:j(lL,{situation:o})})}var Fy=Gd1;var rF=(r,t)=>t?j("a",{className:"whitespace-normal underline",href:t,rel:"noreferrer",target:"_blank",children:r}):r;function jd1({stopSequence:r}){return!r.operator&&!r.publisher?null:j(Xe,{children:j("div",{className:"m-4 mb-0 flex flex-wrap text-[10px] text-gray-500",children:[r.operator&&rF(r.operator,r.operatorUrl),r.operator&&r.publisher&&j("span",{children:" - "}),r.publisher&&rF(r.publisher,r.publisherUrl),r.license&&j("span",{children:"\xA0("}),r.license&&rF(r.license,r.licenseUrl),r.license&&")"]})})}var iF=et(jd1);function qd1({...r}){return j("svg",{fill:"none",height:"24",part:"svg",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:[j("path",{clipRule:"evenodd",d:"M7 0.333344C7.375 0.333344 7.66667 0.62501 7.66667 0.97921V2.35414C9.7292 2.66668 11.3333 4.27081 11.625 6.33334H13C13.375 6.33334 13.6667 6.62501 13.6667 7.00001C13.6667 7.37501 13.375 7.66668 13 7.66668H11.625C11.3333 9.70834 9.70833 11.3333 7.66667 11.625V13C7.66667 13.375 7.375 13.6667 7 13.6667C6.64587 13.6667 6.33333 13.375 6.33333 13V11.625C4.29167 11.3333 2.68747 9.70834 2.39587 7.66668H1C0.625 7.66668 0.333333 7.37501 0.333333 7.00001C0.333333 6.62501 0.625 6.33334 1 6.33334H2.39587C2.68747 4.27081 4.29167 2.66668 6.33333 2.35414V0.97921C6.33333 0.62501 6.64587 0.333344 7 0.333344ZM7 3.66668C5.16667 3.66668 3.66667 5.16668 3.66667 7.00001C3.66667 8.79168 5.08333 10.3125 7 10.3125C8.89587 10.3125 10.3333 8.81254 10.3333 7.00001C10.3333 5.16668 8.83333 3.66668 7 3.66668Z",fill:"currentColor",fillRule:"evenodd"}),j("path",{clipRule:"evenodd",d:"M5.66667 7.00001C5.66667 6.27081 6.2708 5.66668 7 5.66668C7.7292 5.66668 8.33333 6.27081 8.33333 7.00001C8.33333 7.72921 7.7292 8.33334 7 8.33334C6.2708 8.33334 5.66667 7.72921 5.66667 7.00001Z",fill:"currentColor",fillRule:"evenodd",part:"circle"})]})}var nF=qd1;function Kd1({stopSequence:r,...t}){let{destination:e}=r||{};return j("span",{...t,children:e})}var oF=et(Kd1);function Wd1({stopSequence:r,...t}){let{longName:e,routeIdentifier:i}=r||{},o=e;if(i){let n=i;i.includes(".")?[n]=i.split("."):i.includes("_")?[n]=i.split("_"):i.includes(":")&&([n]=i.split(":")),/^\d*$/.test(n)&&(n=`${parseInt(n,10)}`),e.includes(n)||(o=`${e} (${n})`)}return j("span",{...t,children:o})}var aF=et(Wd1);function $d1({stopSequence:r,...t}){return j("div",{...t,children:[j(oF,{className:"text-base font-bold",stopSequence:r}),j(aF,{className:"text-sm",stopSequence:r})]})}var sF=et($d1);function Xd1({stopSequence:r}){let{isFollowing:t,setIsFollowing:e}=Ct();return j("div",{className:"flex items-center gap-x-4 bg-slate-100 p-4 py-2",children:[j(n4,{stopSequence:r}),j(sF,{className:"flex grow flex-col",stopSequence:r}),j(p0,{className:`${t?"animate-pulse":""}`,onClick:()=>{e(!t)},selected:t,children:j(nF,{})})]})}var lF=et(Xd1);var Yd1=()=>It(()=>{let t=new URLSearchParams(window.location.search).get("debug");return!t||t==="false"?!1:t},[]),Py=Yd1;var cF=L8({index:null,invertColor:null,station:null,status:null,stop:null,stopSequence:null}),Jd1=()=>{let r=C6(cF);if(!r)throw new Error("useRouteStop must be used within a ContextProvider");return r},F9=Jd1;function tf1(r){let{status:t,stop:e}=F9();return Py()?j("div",{className:"p-4 text-left text-xs",...r,children:[j("div",{children:["State: ",j("b",{children:e.state})," (isPassed: ",`${t.isPassed}`,") (cancelled: ",`${e.cancelled}`,")"]}),j("div",{children:["Arrival time: ",e.arrivalTime," (delay: ",j("b",{children:`${e.arrivalDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),j("div",{children:["Departure time: ",e.arrivalTime," (delay:"," ",j("b",{children:`${e.departureDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),j("div",{children:Object.entries(t).map(([o,n])=>n===!1?null:j("div",{children:[o,": ",`${n}`]},o))})]}):null}var hX=tf1;var ef1=(r,t=!1)=>{let e=Math.round(r/1e3/60);return e>5?"#dc2626":e>=3?"#ea580c":t?"#16a34a":"transparent"},cL=ef1;var rf1=r=>{let t=r;t<0&&(t=0);let e=Math.floor(t/36e5),i=Math.round(t%36e5/6e4),o="";return e>0&&(o+=`${e}h`),i>0&&(o+=`${i}m`),o||"0"},uL=rf1;function if1(r){let{status:t,stop:e}=F9(),{arrivalDelay:i,departureDelay:o}=e,n=t.isNotRealtime||t.isCancelled||t.isNotStop||t.isPassed;return j("div",{...r,children:[n||i===null||t.isFirst?null:j("span",{style:{color:cL(i)},children:`+${uL(i)}`}),n||o===null||t.isLast?null:j("span",{style:{color:cL(i)},children:`+${uL(o)}`})]})}var uF=et(if1);function nf1({svgProps:r,...t}){let{invertColor:e,status:i,stopSequence:o}=F9(),{isBoarding:n,isFirst:l,isLast:h,isLeft:d,isPassed:p,progress:C}=i,M=l?"50%":"-100%",S=h?"50%":"100%",y=`${C}%`,O="rgb(156, 163, 175)",Q=_A(o),H=p?O:Q,G=p?Q:O,t1=O;e&&(H=p?Q:O,G=p?O:Q,t1=Q);let e1=!p&&(d||n)?G:H;return j("div",{...t,children:j("svg",{fill:"none",height:"100%",stroke:H,width:"16",xmlns:"http://www.w3.org/2000/svg",...r,children:[j("circle",{cx:"50%",cy:"50%",r:"5",stroke:"black",strokeWidth:"6"}),j("line",{stroke:"black",strokeWidth:"6",x1:"50%",x2:"50%",y1:M,y2:S}),j("line",{stroke:t1,strokeWidth:"4",x1:"50%",x2:"50%",y1:M,y2:y}),j("line",{strokeWidth:"4",x1:"50%",x2:"50%",y1:`${C-2}%`,y2:S}),j("circle",{cx:"50%",cy:"50%",r:"5",strokeWidth:"4"}),j("circle",{className:n?"animate-pulse":"",cx:"50%",cy:"50%",r:"5",stroke:e1,strokeWidth:"4"}),j("circle",{cx:"50%",cy:"50%",fill:"white",r:"3",stroke:"black",strokeWidth:"1"})]})})}var hF=et(nf1);function of1({...r}){let{stop:t,stopSequence:e}=F9(),{type:i}=e,{t:o}=er(),{platform:n}=t||{};if(!n)return null;let l=o(`platform_${i||"rail"}`);return j("span",{...r,children:[l||o("platform_rail")," ",n]})}var AF=et(of1);function af1({children:r,...t}){let{stop:e}=F9(),{stationName:i}=e||{};return j("div",{...t,children:[i,j("br",{}),j(AF,{className:"rounded-sm bg-slate-100 px-0.5 py-px text-xs group-hover:bg-slate-50"}),r]})}var dF=et(af1);function sf1({...r}){return j("svg",{fill:"currentColor",height:"24",version:"1.1",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"m 14,8 0,1 -6,-1 0,3 2,2 0,1 L 7,13 4,14 4,13 6,11 6,8 0,9 0,8 6,5 6,2 C 6,1 6.22222,0 7,0 7.77777,0 8,1 8,2 l 0,3 z"})})}var fF=sf1;function lf1({...r}){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 -3.84 122.88 122.88",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M29.03,100.46l20.79-25.21l9.51,12.13L41,110.69C33.98,119.61,20.99,110.21,29.03,100.46L29.03,100.46z M53.31,43.05 c1.98-6.46,1.07-11.98-6.37-20.18L28.76,1c-2.58-3.03-8.66,1.42-6.12,5.09L37.18,24c2.75,3.34-2.36,7.76-5.2,4.32L16.94,9.8 c-2.8-3.21-8.59,1.03-5.66,4.7c4.24,5.1,10.8,13.43,15.04,18.53c2.94,2.99-1.53,7.42-4.43,3.69L6.96,18.32 c-2.19-2.38-5.77-0.9-6.72,1.88c-1.02,2.97,1.49,5.14,3.2,7.34L20.1,49.06c5.17,5.99,10.95,9.54,17.67,7.53 c1.03-0.31,2.29-0.94,3.64-1.77l44.76,57.78c2.41,3.11,7.06,3.44,10.08,0.93l0.69-0.57c3.4-2.83,3.95-8,1.04-11.34L50.58,47.16 C51.96,45.62,52.97,44.16,53.31,43.05L53.31,43.05z M65.98,55.65l7.37-8.94C63.87,23.21,99-8.11,116.03,6.29 C136.72,23.8,105.97,66,84.36,55.57l-8.73,11.09L65.98,55.65L65.98,55.65z"})})}var pF=lf1;function cf1({...r}){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 512 512",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:[j("g",{children:j("g",{children:j("path",{d:`M256,0c-9.217,0-16.696,7.473-16.696,16.696v478.609c0,9.223,7.479,16.696,16.696,16.696
|
|
1284
|
+
`})})]})}var eF=Zd1;var Nd1="my-1 flex items-center leading-[1.1] underline text-base items-center justify-left font-semibold gap-1",Ud1={primary:{classes:"bg-red text-white disabled:bg-lightgrey hover:bg-darkred hover:border-darkred active:bg-lightred active:border-lightred ",selectedClasses:"bg-darkred border-darkred"},secondary:{classes:"bg-white text-black hover:text-red active:text-lightred",selectedClasses:"text-red"}};function Qd1({children:r,className:t,theme:e="secondary",...i}){let o=It(()=>oe(`${Nd1} ${Ud1[e].classes} ${t||""}`),[t,e]);return j("a",{className:o,rel:"noreferrer",target:"_blank",...i,children:[(!i.href?.includes(window.location.hostname)||!i.href?.startsWith("(https?|ftp)"))&&j(eF,{height:"20",width:"20"}),r]})}var ds=et(Qd1);var cX=(r,t,e,i=!0)=>{let o=r.toLocaleTimeString(["de"],{hour:"2-digit",minute:"2-digit"});return`${r.toLocaleDateString(["de"],{day:"2-digit",month:i?"short":"long",year:e?"numeric":void 0})}${t&&o?` ${o}`:""}`.replace(",","")};function Hd1({canToggle:r=!1,headerClassName:t,iconClassName:e,publicationClassName:i,reasonClassName:o,situation:n,timeIntervalClassName:l,useShortMonth:h=!0}){let{locale:d,t:p}=er(),[C,M]=pt(!r);if(!n)return null;let S={},y={},O=[],Q=[],H=[];return Q=(n?.publications||[])?.filter(({publicationWindows:t1})=>(!t1?.length&&n?.publicationWindows?.length&&(t1=n?.publicationWindows),t1.find(({endTime:e1,startTime:J})=>{let g1=new Date,b1=new Date(J),T1=new Date(e1);return b1<=g1&&g1<=T1})))||[],O=(n?.affectedTimeIntervals||[]).filter(({endTime:t1,startTime:e1})=>{let J=new Date,g1=new Date(e1),b1=new Date(t1);return g1<=J&&J<=b1||J<g1})||[],H=(n?.reasons||[]).map(({name:t1})=>t1),j(Xe,{children:Q?.map(({id:t1,publicationLines:e1,publicationStops:J,textualContentLarge:g1,textualContentMedium:b1,textualContentSmall:T1})=>{S=g1||b1||T1,y=S?.[d()],y?.summary||(y=S?.de);let x1=e1?.flatMap(D1=>D1.lines?.map(({name:a1})=>a1)||[])||[],C1=J.map(D1=>D1?.name||"");return j("div",{className:oe("text-base",i),children:[j("div",{className:oe("text-xs uppercase",o),children:H}),j("h3",{className:oe("space-x-2 text-xl leading-[1.3] font-bold text-balance",t),children:[j("span",{className:"inline-block align-middle",children:j(tF,{className:oe(e)})}),j("span",{className:"align-middle *:inline",dangerouslySetInnerHTML:{__html:y?.summary}})]}),j("hr",{className:"my-1"}),O?.map(({dailyEndTime:D1,dailyStartTime:a1,endTime:w1,startTime:Q1},j1)=>{let c2=D1&&a1,C2=w1.includes("2500"),Y1=cX(new Date(Q1),!1,!0,h),H1=C2?void 0:cX(new Date(w1),!1,!0,h);return j("button",{className:oe("flex w-full items-center",r&&"cursor-pointer"),onClick:()=>{M(!C)},tabIndex:r?0:-1,children:[j("div",{className:oe("flex-1 text-left text-sm font-bold text-balance",l),children:[j("span",{children:[Y1&&H1?`${Y1} \u2013 ${H1}`:null,Y1&&!H1?p("from",{from:Y1}):null]}),c2&&j("span",{children:` (${p("daily_from_to",{from:a1,to:D1})})`})]},Q1),r&&j1==0&&j(Xe,{children:C?j(sL,{className:"text-red"}):j(_c,{className:"text-red"})})]},Q1)}),j("div",{className:C?"my-4 flex flex-col gap-4":"hidden",children:[y?.description&&j("div",{dangerouslySetInnerHTML:{__html:y?.description}}),!!S?.images?.length&&j("div",{className:"flex flex-wrap gap-2",children:S.images.map(({image:{absoluteUrl:D1,label:a1}})=>j("img",{alt:a1,className:"h-fit",src:D1,title:a1},D1+a1))}),!!S?.infoLinks?.length&&j("div",{children:S.infoLinks.map(({label:D1,uri:a1})=>{let w1=D1[d()]||D1.de||a1;return j(ds,{href:a1,title:w1,children:w1},a1)})}),!!x1?.length&&j("div",{children:[j("div",{className:"font-bold",children:[p("affected_lines"),":"]}),j("div",{className:"flex flex-wrap gap-1 text-sm",children:x1?.map(D1=>j("div",{className:"bg-red rounded-sm px-[2px] py-[0px] font-semibold text-white",children:D1},D1))})]}),!!C1?.length&&j("div",{children:[j("div",{className:"font-bold",children:[p("affected_stops"),":"]}),j("div",{className:"flex flex-wrap gap-1 text-sm",children:C1.map(D1=>j("div",{className:"bg-red rounded-sm px-[2px] py-[0px] font-semibold text-white",children:D1},D1))})]})]}),r&&j("hr",{className:"my-1"})]},t1)})})}var lL=et(Hd1);function Vd1(r,t){let{lang:e,notificationsLayer:i,previewNotifications:o}=Ct(),[n,l]=pt(),h=It(()=>i?.api,[i]);return G2(()=>{let d=o?.find(C=>C.id===r);if(d){l(d);return}let p=new AbortController;return h?.exportById(r,{contentLarge:!0,contentMedium:!0,contentSmall:!0,includeGeoms:!1,includeLines:!0,includeStops:!0,[e]:!0,limit:1,...t||{}}).then(C=>{l(C)}).catch(C=>{if(C.code!==20){l(void 0),console.error("Failed to fetch situation",C);return}}),()=>{p.abort()}},[h,r,t,e,o]),n}var uX=Vd1;function Gd1({className:r,feature:t,...e}){let{situationId:i}=t.getProperties(),o=uX(i);return console.log("situationParsed",t.getProperties()),j(Sn,{...e,className:oe("px-4 text-base",r),children:j(lL,{situation:o})})}var Fy=Gd1;var rF=(r,t)=>t?j("a",{className:"whitespace-normal underline",href:t,rel:"noreferrer",target:"_blank",children:r}):r;function jd1({stopSequence:r}){return!r.operator&&!r.publisher?null:j(Xe,{children:j("div",{className:"m-4 mb-0 flex flex-wrap text-[10px] text-gray-500",children:[r.operator&&rF(r.operator,r.operatorUrl),r.operator&&r.publisher&&j("span",{children:" - "}),r.publisher&&rF(r.publisher,r.publisherUrl),r.license&&j("span",{children:"\xA0("}),r.license&&rF(r.license,r.licenseUrl),r.license&&")"]})})}var iF=et(jd1);function qd1({...r}){return j("svg",{fill:"none",height:"24",part:"svg",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:[j("path",{clipRule:"evenodd",d:"M7 0.333344C7.375 0.333344 7.66667 0.62501 7.66667 0.97921V2.35414C9.7292 2.66668 11.3333 4.27081 11.625 6.33334H13C13.375 6.33334 13.6667 6.62501 13.6667 7.00001C13.6667 7.37501 13.375 7.66668 13 7.66668H11.625C11.3333 9.70834 9.70833 11.3333 7.66667 11.625V13C7.66667 13.375 7.375 13.6667 7 13.6667C6.64587 13.6667 6.33333 13.375 6.33333 13V11.625C4.29167 11.3333 2.68747 9.70834 2.39587 7.66668H1C0.625 7.66668 0.333333 7.37501 0.333333 7.00001C0.333333 6.62501 0.625 6.33334 1 6.33334H2.39587C2.68747 4.27081 4.29167 2.66668 6.33333 2.35414V0.97921C6.33333 0.62501 6.64587 0.333344 7 0.333344ZM7 3.66668C5.16667 3.66668 3.66667 5.16668 3.66667 7.00001C3.66667 8.79168 5.08333 10.3125 7 10.3125C8.89587 10.3125 10.3333 8.81254 10.3333 7.00001C10.3333 5.16668 8.83333 3.66668 7 3.66668Z",fill:"currentColor",fillRule:"evenodd"}),j("path",{clipRule:"evenodd",d:"M5.66667 7.00001C5.66667 6.27081 6.2708 5.66668 7 5.66668C7.7292 5.66668 8.33333 6.27081 8.33333 7.00001C8.33333 7.72921 7.7292 8.33334 7 8.33334C6.2708 8.33334 5.66667 7.72921 5.66667 7.00001Z",fill:"currentColor",fillRule:"evenodd",part:"circle"})]})}var nF=qd1;function Kd1({stopSequence:r,...t}){let{destination:e}=r||{};return j("span",{...t,children:e})}var oF=et(Kd1);function Wd1({stopSequence:r,...t}){let{longName:e,routeIdentifier:i}=r||{},o=e;if(i){let n=i;i.includes(".")?[n]=i.split("."):i.includes("_")?[n]=i.split("_"):i.includes(":")&&([n]=i.split(":")),/^\d*$/.test(n)&&(n=`${parseInt(n,10)}`),e.includes(n)||(o=`${e} (${n})`)}return j("span",{...t,children:o})}var aF=et(Wd1);function $d1({stopSequence:r,...t}){return j("div",{...t,children:[j(oF,{className:"text-base font-bold",stopSequence:r}),j(aF,{className:"text-sm",stopSequence:r})]})}var sF=et($d1);function Xd1({stopSequence:r}){let{isFollowing:t,setIsFollowing:e}=Ct();return j("div",{className:"flex items-center gap-x-4 bg-slate-100 p-4 py-2",children:[j(n4,{stopSequence:r}),j(sF,{className:"flex grow flex-col",stopSequence:r}),j(p0,{className:`${t?"animate-pulse":""}`,onClick:()=>{e(!t)},selected:t,children:j(nF,{})})]})}var lF=et(Xd1);var Yd1=()=>It(()=>{let t=new URLSearchParams(window.location.search).get("debug");return!t||t==="false"?!1:t},[]),Py=Yd1;var cF=L8({index:null,invertColor:null,station:null,status:null,stop:null,stopSequence:null}),Jd1=()=>{let r=C6(cF);if(!r)throw new Error("useRouteStop must be used within a ContextProvider");return r},F9=Jd1;function tf1(r){let{status:t,stop:e}=F9();return Py()?j("div",{className:"p-4 text-left text-xs",...r,children:[j("div",{children:["State: ",j("b",{children:e.state})," (isPassed: ",`${t.isPassed}`,") (cancelled: ",`${e.cancelled}`,")"]}),j("div",{children:["Arrival time: ",e.arrivalTime," (delay: ",j("b",{children:`${e.arrivalDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),j("div",{children:["Departure time: ",e.arrivalTime," (delay:"," ",j("b",{children:`${e.departureDelay}`}),") (aimed: ",e.aimedArrivalTime,")"]}),j("div",{children:Object.entries(t).map(([o,n])=>n===!1?null:j("div",{children:[o,": ",`${n}`]},o))})]}):null}var hX=tf1;var ef1=(r,t=!1)=>{let e=Math.round(r/1e3/60);return e>5?"#dc2626":e>=3?"#ea580c":t?"#16a34a":"transparent"},cL=ef1;var rf1=r=>{let t=r;t<0&&(t=0);let e=Math.floor(t/36e5),i=Math.round(t%36e5/6e4),o="";return e>0&&(o+=`${e}h`),i>0&&(o+=`${i}m`),o||"0"},uL=rf1;function if1(r){let{status:t,stop:e}=F9(),{arrivalDelay:i,departureDelay:o}=e,n=t.isNotRealtime||t.isCancelled||t.isNotStop||t.isPassed;return j("div",{...r,children:[n||i===null||t.isFirst?null:j("span",{style:{color:cL(i)},children:`+${uL(i)}`}),n||o===null||t.isLast?null:j("span",{style:{color:cL(i)},children:`+${uL(o)}`})]})}var uF=et(if1);function nf1({svgProps:r,...t}){let{invertColor:e,status:i,stopSequence:o}=F9(),{isBoarding:n,isFirst:l,isLast:h,isLeft:d,isPassed:p,progress:C}=i,M=l?"50%":"-100%",S=h?"50%":"100%",y=`${C}%`,O="rgb(156, 163, 175)",Q=_A(o),H=p?O:Q,G=p?Q:O,t1=O;e&&(H=p?Q:O,G=p?O:Q,t1=Q);let e1=!p&&(d||n)?G:H;return j("div",{...t,children:j("svg",{fill:"none",height:"100%",stroke:H,width:"16",xmlns:"http://www.w3.org/2000/svg",...r,children:[j("circle",{cx:"50%",cy:"50%",r:"5",stroke:"black",strokeWidth:"6"}),j("line",{stroke:"black",strokeWidth:"6",x1:"50%",x2:"50%",y1:M,y2:S}),j("line",{stroke:t1,strokeWidth:"4",x1:"50%",x2:"50%",y1:M,y2:y}),j("line",{strokeWidth:"4",x1:"50%",x2:"50%",y1:`${C-2}%`,y2:S}),j("circle",{cx:"50%",cy:"50%",r:"5",strokeWidth:"4"}),j("circle",{className:n?"animate-pulse":"",cx:"50%",cy:"50%",r:"5",stroke:e1,strokeWidth:"4"}),j("circle",{cx:"50%",cy:"50%",fill:"white",r:"3",stroke:"black",strokeWidth:"1"})]})})}var hF=et(nf1);function of1({...r}){let{stop:t,stopSequence:e}=F9(),{type:i}=e,{t:o}=er(),{platform:n}=t||{};if(!n)return null;let l=o(`platform_${i||"rail"}`);return j("span",{...r,children:[l||o("platform_rail")," ",n]})}var AF=et(of1);function af1({children:r,...t}){let{stop:e}=F9(),{stationName:i}=e||{};return j("div",{...t,children:[i,j("br",{}),j(AF,{className:"rounded-sm bg-slate-100 px-0.5 py-px text-xs group-hover:bg-slate-50"}),r]})}var dF=et(af1);function sf1({...r}){return j("svg",{fill:"currentColor",height:"24",version:"1.1",viewBox:"0 0 14 14",width:"24",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"m 14,8 0,1 -6,-1 0,3 2,2 0,1 L 7,13 4,14 4,13 6,11 6,8 0,9 0,8 6,5 6,2 C 6,1 6.22222,0 7,0 7.77777,0 8,1 8,2 l 0,3 z"})})}var fF=sf1;function lf1({...r}){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 -3.84 122.88 122.88",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M29.03,100.46l20.79-25.21l9.51,12.13L41,110.69C33.98,119.61,20.99,110.21,29.03,100.46L29.03,100.46z M53.31,43.05 c1.98-6.46,1.07-11.98-6.37-20.18L28.76,1c-2.58-3.03-8.66,1.42-6.12,5.09L37.18,24c2.75,3.34-2.36,7.76-5.2,4.32L16.94,9.8 c-2.8-3.21-8.59,1.03-5.66,4.7c4.24,5.1,10.8,13.43,15.04,18.53c2.94,2.99-1.53,7.42-4.43,3.69L6.96,18.32 c-2.19-2.38-5.77-0.9-6.72,1.88c-1.02,2.97,1.49,5.14,3.2,7.34L20.1,49.06c5.17,5.99,10.95,9.54,17.67,7.53 c1.03-0.31,2.29-0.94,3.64-1.77l44.76,57.78c2.41,3.11,7.06,3.44,10.08,0.93l0.69-0.57c3.4-2.83,3.95-8,1.04-11.34L50.58,47.16 C51.96,45.62,52.97,44.16,53.31,43.05L53.31,43.05z M65.98,55.65l7.37-8.94C63.87,23.21,99-8.11,116.03,6.29 C136.72,23.8,105.97,66,84.36,55.57l-8.73,11.09L65.98,55.65L65.98,55.65z"})})}var pF=lf1;function cf1({...r}){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 512 512",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:[j("g",{children:j("g",{children:j("path",{d:`M256,0c-9.217,0-16.696,7.473-16.696,16.696v478.609c0,9.223,7.479,16.696,16.696,16.696
|
|
1285
1285
|
c9.217,0,16.696-7.473,16.696-16.696V16.696C272.696,7.473,265.217,0,256,0z`})})}),j("g",{children:j("g",{children:j("path",{d:`M105.739,44.522c-36.826,0-66.783,29.956-66.783,66.783c0,36.826,29.956,66.783,66.783,66.783
|
|
1286
1286
|
s66.783-29.956,66.783-66.783C172.522,74.478,142.565,44.522,105.739,44.522z`})})}),j("g",{children:j("g",{children:j("path",{d:`M406.261,44.522c-36.826,0-66.783,29.956-66.783,66.783c0,36.826,29.956,66.783,66.783,66.783
|
|
1287
1287
|
s66.783-29.956,66.783-66.783C473.043,74.478,443.087,44.522,406.261,44.522z`})})}),j("g",{children:j("g",{children:j("path",{d:`M202.935,218.664c-3.109-4.501-8.239-7.186-13.717-7.186H22.261c-5.478,0-10.608,2.685-13.717,7.185
|
|
@@ -1547,7 +1547,7 @@ ${String(r)}`)}catch(t){return t}},jX=r=>{if(typeof r!="object"||r===null)throw
|
|
|
1547
1547
|
left: unset;
|
|
1548
1548
|
bottom: unset;
|
|
1549
1549
|
background:unset;
|
|
1550
|
-
}`;function rC1({options:r,...t}){let{map:e}=Ct(),[i,o]=pt(),n=It(()=>i?new gN({target:i,...r}):null,[r,i]);return G2(()=>{if(!(!e||!n))return e.addControl(n),()=>{e&&n&&e.removeControl(n)}},[e,n]),j("div",{ref:l=>{o(l)},...t,children:j("style",{children:MY})})}var SP=rC1;function iC1({...r}){let{isSearchOpen:t,setIsSearchOpen:e}=Ct(),{t:i}=er(),o=or(()=>{e(!t)},[t,e]);return j(p0,{title:i("search_menu_title"),...r,onClick:o,selected:t,children:j(Jc,{})})}var EP=et(iC1);function nC1({...r}){return j("svg",{fill:"none",height:24,stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z",strokeLinecap:"round",strokeLinejoin:"round"})})}var TP=nC1;function oC1({...r}){let{isShareMenuOpen:t,setIsShareMenuOpen:e}=Ct(),{t:i}=er(),o=or(()=>{e(!t)},[t,e]);return j(p0,{title:i("share_menu_title"),...r,onClick:o,selected:t,children:j(TP,{})})}var IP=et(oC1);function aC1(r){let{baseLayer:t,map:e,setStationsLayer:i}=Ct(),o=It(()=>t?new O0({layersFilter:({metadata:n})=>n?.["tralis.variable"]==="station"||n?.["general.filter"]==="stations"||n?.["geops.filter"]==="netzplan_stops",maplibreLayer:t,name:Zg,...r||{}}):null,[t,r]);return G2(()=>{if(!(!e||!o))return e.addLayer(o),i(o),()=>{e.removeLayer(o)}},[e,i,o]),null}var BY=et(aC1);var sC1=()=>({layersFilter:({metadata:r})=>r?.["general.filter"]==="stations",minZoom:10});function lC1(r){return j(BY,{...sC1,...r})}var PA=et(lC1);function cC1(r){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M19,10.9999 C19.5522847,10.9999 20,11.4476153 20,11.9999 C20,12.5521847 19.5522847,12.9999 19,12.9999 L5,12.9999 C4.44771525,12.9999 4,12.5521847 4,11.9999 C4,11.4476153 4.44771525,10.9999 5,10.9999 L19,10.9999 Z"})})}var FP=cC1;function uC1(r){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M12,4 C12.5522847,4 13,4.44771525 13,5 L13,11 L19,11 C19.5128358,11 19.9355072,11.3860402 19.9932723,11.8833789 L20,12 C20,12.5522847 19.5522847,13 19,13 L13,13 L13,19 C13,19.5128358 12.6139598,19.9355072 12.1166211,19.9932723 L12,20 C11.4477153,20 11,19.5522847 11,19 L11,13 L5,13 C4.48716416,13 4.06449284,12.6139598 4.00672773,12.1166211 L4,12 C4,11.4477153 4.44771525,11 5,11 L11,11 L11,5 C11,4.48716416 11.3860402,4.06449284 11.8833789,4.00672773 Z"})})}var PP=uC1;function hC1(){let{map:r}=Ct(),[t,e]=pt(!1),[i,o]=pt(!1),{t:n}=er(),l=or(()=>{if(!r?.getView())return;let d=r.getView(),p=d.getZoom();d.setZoom(p+1)},[r]),h=or(()=>{if(!r?.getView())return;let d=r.getView(),p=d.getZoom();d.setZoom(p-1)},[r]);return G2(()=>{let d=r?.on("moveend",()=>{let p=r.getView(),C=p.getZoom(),M=p.getMaxZoom(),S=p.getMinZoom();M&&C===Number(M)?e(!0):e(!1),S&&C===Number(S)?o(!0):o(!1)});return()=>{tr(d)}},[r]),j(Xe,{children:[j(p0,{disabled:t,onClick:l,title:n("zoomin"),children:j(PP,{})}),j(p0,{disabled:i,onClick:h,title:n("zoomout"),children:j(FP,{})})]})}var RP=et(hC1);var SY={style:{width:"calc(100% - 60px)"}},AC1=()=>({layersFilter:({metadata:r})=>r?.["general.filter"]==="stations"});function dC1({className:r,...t}){let{hasDetails:e,hasGeolocation:i,hasLayerTree:o,hasPrint:n,hasRealtime:l,hasSearch:h,hasShare:d,hasToolbar:p,isEmbed:C,isOverlayOpen:M,isSearchOpen:S,mainlink:y}=Ct();return j("div",{className:oe("relative flex size-full flex-col text-base @lg/main:flex-row-reverse",r),...t,children:[j(yP,{}),j(PA,{minZoom:10,...AC1}),j(BP,{}),j(_P,{}),j(vP,{}),j(MP,{}),j(XB,{className:"relative flex-1 overflow-visible",children:[C&&j(VB,{}),y&&j(gP,{className:"absolute inset-x-2 bottom-8 z-10"}),j("div",{className:"pointer-events-none absolute inset-x-2 bottom-2 z-10 flex items-end justify-between gap-2 text-[10px]",children:[j(SP,{className:"bg-slate-50/70"}),j(Kg,{className:"pointer-events-auto bg-slate-50/70"})]}),j("div",{className:"absolute top-2 right-2 z-10 flex",children:i&&j(Wg,{title:"Geolokalisierung"})}),j("div",{className:"absolute right-2 bottom-10 z-10 flex flex-col justify-between gap-2",children:j(RP,{})}),!p&&h&&j("div",{className:oe("absolute top-2 right-2 left-2 z-10 max-w-96",M&&"@lg:left-68"),children:j(tu,{})})]}),j("div",{className:"pointer-events-none absolute top-2 bottom-2 left-2 z-10 flex flex-col gap-2",children:[p&&j("div",{className:"pointer-events-none relative z-10 w-fit rounded-2xl bg-black/10 p-0 backdrop-blur-sm *:pointer-events-auto",children:[h&&j("div",{className:oe("absolute top-12 left-0 w-0 p-0 opacity-0 transition-all @sm:top-0 @sm:left-[calc(100%-43px)] @md:left-[calc(100%-47px)]",S?"w-64 opacity-100":""),children:j(tu,{className:"border-grey @container m-0 h-[40px] rounded-2xl border p-2 px-4 text-base @sm/main:h-[44px] @sm/main:rounded-l-none @sm/main:rounded-r-2xl @md/main:h-[48px]",inputClassName:"h-6 text-base",inputContainerClassName:"border-none",resultClassName:"text-base **:hover:cursor-pointer hover:text-red-500 p-2",resultsContainerClassName:"@container rounded-b-2xl max-h-[200px] overflow-y-auto border border-grey border-t-0 ",withResultsClassName:"text-base !rounded-b-none"})}),j("div",{className:oe("border-grey relative flex gap-[1px] overflow-hidden rounded-2xl border @sm/main:h-[44px] @md/main:h-[48px]","*:size-[38px] *:rounded-none *:border-none *:@sm/main:size-[42px] *:@md/main:!size-[46px]","*:first:!rounded-l-2xl","*:last:!rounded-r-2xl",S?"@sm:rounded-r-none @sm:border-r-0 @sm:*:last:!rounded-r-none @sm:*:last:border-r-0":""),children:[o&&j($B,{}),n&&j(jB,{}),d&&j(IP,{}),h&&j(EP,{})]})]}),j("div",{className:oe("pointer-events-none flex w-0 flex-1 flex-col overflow-hidden rounded-2xl",M?"@lg:min-w-[320px]":"p-0"),style:{containerType:"normal"},children:j(Xg,{className:"border-grey @container/overlay pointer-events-auto relative hidden flex-col overflow-hidden rounded-2xl border bg-white text-base shadow-lg @lg:flex",ScrollableHandlerProps:SY,children:j(i_,{hasDetails:e,hasLayerTree:o,hasPrint:n,hasRealtime:l,hasSearch:!1,hasShare:d})})})]}),j(Xg,{className:M?"absolute bottom-0 z-20 flex max-h-[70%] min-h-[75px] w-full flex-col border-t bg-white @lg:hidden":"@lg:hidden",ScrollableHandlerProps:SY,children:j(i_,{hasDetails:e,hasLayerTree:o,hasPrint:n,hasRealtime:l,hasSearch:!1,hasShare:d})})]})}var l_=et(dC1);var fC1=(r,t)=>{let e=t?.getView()?.getZoom(),i=r.get("minZoom"),o=r.get("maxZoom");return i>e||e>o};function pC1(r){let{apikey:t,baseLayer:e,map:i,mapsetplanid:o,mapsettags:n,mapsettenants:l,mapsettimestamp:h,mapseturl:d,setMapsetLayer:p}=Ct(),C=It(()=>!e||!i?null:new aB({apiKey:t,name:Ug,planId:o??void 0,tags:n?.split(",").map(M=>M.trim()),tenants:l?.split(",").map(M=>M.trim()),timestamp:h,url:d,...r||{}}),[e,i,t,d,o,n,l,h,r]);return G2(()=>{p?.(C)},[C,p,i]),G2(()=>{if(!(!i||!C))return i.addLayer(C),()=>{i.removeLayer(C)}},[i,C]),G2(()=>{let M=null;return C&&(M=C.on("updatefeatures",()=>{let S=C.getSource()?.getFeatures();S?.length&&S.forEach(y=>{let O=y.getStyleFunction();O&&y.setStyle((Q,H)=>fC1(Q,C.getMapInternal())?null:O(y,H))})})),()=>{tr(M)}},[C]),null}var zP=et(pC1);function LC1(r){let{apikey:t,baseLayer:e,linesNetworkPlanLayer:i,map:o,notificationat:n,notificationtenant:l,notificationurl:h,previewNotifications:d,setNotificationsLayer:p}=Ct(),[C,M]=pt(!!i?.getVisible()),S=It(()=>{if(!e)return null;let y=new uB({apiKey:t,apiParameters:{contentMedium:!0,isEdited:!0,publicNow:!0},maplibreLayer:e,name:Ng,publicAt:n?new Date(n):void 0,situations:d,tenant:l,url:h,...r||{},loadAll:!d});return d&&!y.getVisible()&&y.setVisible(!0),y},[e,t,n,d,l,h,r]);return G2(()=>{p?.(S)},[S,p]),G2(()=>{if(!(!o||!S))return o.addLayer(S),()=>{o.removeLayer(S)}},[o,S]),G2(()=>{let y=i?.on("change:visible",()=>{let O=i.getVisible();M(O)});return M(i?.getVisible()||!1),()=>{tr(y)}},[i]),G2(()=>{if(!S)return;let y=S.getVisible();return y&&S.setVisible(!1),C?S.layersFilter=O=>O.metadata?.["general.filter"]==="moco.lnp":S.layersFilter=O=>O.metadata?.["general.filter"]==="moco",S.setVisible(y),()=>{S.applyLayoutVisibility()}},[C,S,i]),null}var DP=et(LC1);var TY=d3(W4(),1);var CC1=(r,t=new URLSearchParams)=>{let e=r.getView().getZoom(),[i,o]=r.getView().getCenter()||[],n=P4(r.getLayers().getArray()).filter(l=>l.get("name")&&l.getVisible()).map(l=>l.get("name"));return t.set("layers",n.join(",")),i>=0&&t.set("x",i.toFixed(2)),o>=0&&t.set("y",o.toFixed(2)),e>=0&&t.set("z",e.toFixed(1)),t},EY=CC1;var gC1=({replaceState:r=!1})=>{let{map:t,setPermalinkUrlSearchParams:e}=Ct(),i=FA(),o=or(n=>{if(t.get(Yo))return;let l=new URLSearchParams(window.location.search),h=EY(n,l);e(h)},[t,e]);return G2(()=>{r&&i&&i!==window.location.href&&!i.includes(encodeURIComponent("{{"))&&window.history.replaceState(null,null,i)},[t,i,r]),G2(()=>{let n,l,h,d=(0,TY.default)(o,1e3);return t&&(d(t),n=t?.on("moveend",p=>{d(p.map)}),l=t.once("loadend",p=>{d(p.map),h=P4(p.map.getLayers().getArray()).map(C=>C.on("change:visible",()=>{d(p.map)}))})),()=>{tr(n),tr(l),tr(h)}},[t,o]),null},kP=et(gC1);var mC1=async(r,t,e=0,i=!0)=>{if(!r)return Promise.reject(new Error("No vehicle provided"));let{geometry:o,properties:{coordinate:n}}=r,l=t.getView(),h=e||l.getZoom(),d=h>0?l.getResolutionForZoom(h):void 0,p=n?[...n]:null;if(!p&&o){let{coord:M}=Xd(Date.now(),r,!0);p=M?[...M]:null}return p?(i&&(p[0]-=320/2*d),l.cancelAnimations(),new Promise(M=>{l.animate({center:p,duration:1e3,easing:qC,resolution:d},S=>{M(S)})})):Promise.reject(new Error("No center found"))},OP=mC1;var vC1=(r,t,e,i,o)=>i?o?"#dc2626":"#a0a0a0":e===null?"transparent":cL(e,o),IY=vC1;var yC1=(r,t,e,i=!1)=>{if(i)return String.fromCodePoint(215);let o=uL(e);return o==="0"?"":`+${o}`},FY=yC1;var PY=16,_C1=!0,xC1=new f0;function wC1(r){let{apikey:t,baseLayer:e,isFollowing:i,isTracking:o,linesNetworkPlanLayer:n,map:l,mots:h,realtimebboxparameters:d,realtimeurl:p,setIsFollowing:C,setIsTracking:M,setRealtimeLayer:S,tenant:y,trainId:O}=Ct(),[Q,H]=pt([]),[G,t1]=pt(!1),e1=It(()=>!t||!p?null:new gB({apiKey:t,bboxParameters:d?.split(" ").reduce((g1,b1)=>{if(!b1)return g1;let[T1,x1]=b1.split("=");return g1[T1]=x1,g1},{}),getMotsByZoom:h?()=>h.split(","):void 0,isQueryable:!0,minZoom:5,name:Og,tenant:y,url:p,zIndex:1,...r,styleOptions:{getColor:_A,getDelayColor:IY,getDelayText:FY,getText:Ty,getTextColor:Sy,getTextFont:Ey,...r?.styleOptions||{}}}),[t,p,d,h,y,r]);return G2(()=>{if(!(!l||!e1))return l.getView()?.getCenter()?l.addLayer(e1):l.once("moveend",()=>{l.addLayer(e1)}),S(e1),()=>{l.removeLayer(e1),S(null)}},[l,S,e1]),G2(()=>{O||C(!1)},[O,C]),G2(()=>{let J=[];return o&&C(!1),()=>{tr(J)}},[o,C]),G2(()=>{if(!l)return;let J=null;return J=l.getView().on("change:center",g1=>{g1.target.getInteracting()&&(C(!1),M(!1))}),()=>{tr(J)}},[l,C,M]),G2(()=>{let J=null;return e1&&(e1.engine.useThrottle=!i,e1.engine.isUpdateBboxOnMoveEnd=!i,e1.allowRenderWhenAnimating=!!i),!i||!O||!l||!e1?void 0:(M(!1),(async b1=>{let T1=b1&&e1?.trajectories?.[b1];if(!T1){T1=(await e1.api.getTrajectory(O,e1.mode))?.content;let D1=await e1.api.getFullTrajectory(O,e1.mode,void 0);if(D1?.content)try{let a1=xC1.readFeatures(D1.content),w1=new V4({features:a1}).getExtent();e1.api.bbox=[...w1,...e1.api.bbox.slice(4)]}catch(a1){console.warn("Error parsing full trajectory feature:",a1,D1?.content)}}await OP(T1,l,PY)===!0&&(J=setInterval(()=>{OP(e1?.trajectories?.[O],l,PY)},1e3))})(O),()=>{clearInterval(J)})},[i,l,e1,O,M]),G2(()=>{if(!(!O||!e1?.api))return e1.selectedVehicleId=O,e1.highlightTrajectory(O).catch(J=>{console.error("Error highlighting trajectory:",J)}),()=>{e1?.selectedVehicleId&&(e1.api?.unsubscribeFullTrajectory(e1.selectedVehicleId),e1.selectedVehicleId=null,e1.vectorLayer.getSource().clear())}},[O,e1,e1?.api]),G2(()=>{if(!l||!e)return;let J=l.once("rendercomplete",()=>{let g1=e.mapLibreMap?.getStyle()?.metadata,b1=[];for(let T1=0;T1<26;T1++)b1.push(Bh(T1,g1?.graphs));H(b1)});return()=>{tr(J)}},[l,e,e1]),G2(()=>{let J=n?.on("change:visible",()=>{let g1=n.getVisible();t1(g1)});return t1(n?.getVisible()||!1),()=>{tr(J)}},[n]),G2(()=>{!e1||!Q?.length||(_C1&&G?e1.engine.graphByZoom=Q:e1.engine.graphByZoom=[],e1.engine.setBbox())},[G,e1,Q,n]),null}var RY=et(wC1);var bC1=new q3({image:new o7({fill:new k6({color:"#000000"}),radius:5}),stroke:new wi({color:"#000000",width:6}),zIndex:2}),MC1=r=>{let t="#ffffff",e=r.get("type"),i=r.get("stroke");return i&&i[0]!=="#"&&(i=`#${i}`),t=i||yA(e,{name:r.get("line_name")}),t=/#ffffff/i.test(t)?"#ff0000":t,[bC1,new q3({image:new o7({fill:new k6({color:t}),radius:4}),stroke:new wi({color:t,width:4}),zIndex:3})]},zY=MC1;var BC1={0:[0,0,0,0,0,2,2,2,2,2,3,3,4,4,6,7,7],1:[0,0,0,0,0,2,2,2,2,2,3,3,4,4,6,7,7],2:[0,0,0,0,0,2,2,2,2,3,3,4,4,6,7,12,15],3:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,6,6],4:[0,0,0,0,0,2,2,2,2,2,2,3,3,6,7,12,15],5:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,7,7],6:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,7,7],7:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,7,7],8:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,6,6],9:[0,0,0,0,0,2,2,2,2,3,3,4,4,6,7,12,15]},SC1=BC1,DY=(r=0,t=0,e=!1)=>{let i=Math.min(Math.floor(t||1),16);try{let o=O7.getTypeIndex(r);return SC1[o][i]*(e?2:1)}catch{return 1}};var kY='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 42 42" width="42" height="42">%0A <path id="Pfad_1" data-name="Pfad 1" d="M40,20A20,20,0,1,1,20,0,20,20,0,0,1,40,20Z" transform="translate(0 0)" fill="%23353535"/>%0A <path id="Pfad_2" data-name="Pfad 2" d="M25.481,11.843a9.993,9.993,0,0,0-10,9.992c0,7.773,10,14.8,10,14.8s9.992-7.5,9.992-14.8a9.991,9.991,0,0,0-9.992-9.992m0,14.662a4.924,4.924,0,1,1,4.924-4.924A4.93,4.93,0,0,1,25.482,26.5" transform="translate(-5.477 -4.19)" fill="%23fff"/>%0A <path id="Pfad_3" data-name="Pfad 3" d="M12.015,8.124,38.081,34.031,35.4,36.536,9.06,10.527Z" transform="translate(-3.206 -2.874)" fill="%23ec0016"/>%0A <path id="Pfad_4" data-name="Pfad 4" d="M20,3.231A16.769,16.769,0,1,1,3.231,20,16.788,16.788,0,0,1,20,3.231M20,0A20,20,0,1,0,40,20,20,20,0,0,0,20,0" transform="translate(0 0)" fill="%23353535"/>%0A</svg>%0A';var ZP={},OY=new Image(42,42);OY.src=kY;var TC1=(r,t)=>{let e=16;r>e&&(e=22);let i=`${e},${t}`;if(!ZP[i]){let o=C8(e*t,e*t),n=o.getContext("2d");if(!n)return null;n.drawImage(OY,0,0,e*t,e*t),ZP[i]=o}return ZP[i]},NP={},IC1=(r,t,e)=>{let i=`${r}, ${t}, ${e}`;if(!NP[i]){let o=C8(r*2,r*2);if(o){let n=o.getContext("2d");if(!n)return null;n.beginPath(),n.arc(r,r,t,0,2*Math.PI,!1),n.fillStyle=e,n.filter="blur(1px)",n.fill(),NP[i]=o}}return NP[i]},UP={},FC1=(r,t,e,i,o="#000",n=1)=>{let l=`${r}, ${e}, ${i}, ${o}, ${n}`;if(!UP[l]){let h=C8(Math.ceil(r.length*t),Math.ceil(t+8*n));if(h){let d=h.getContext("2d");if(!d)return null;d.font=e,d.textAlign="left",d.textBaseline="middle",d.font=e,d.fillStyle=i,d.strokeStyle=o,d.lineWidth=1.5*n,d.strokeText(r,0,t),d.fillText(r,0,t),UP[l]=h}}return UP[l]},QP={},PC1=(r,t,e,i,o,n)=>{let l=`${r}, ${t}, ${e}, ${i}, ${o}, ${n}`;if(!QP[l]){let h=C8(r*2,r*2);if(h){let d=h.getContext("2d");if(!d)return null;d.fillStyle=e,i&&(d.lineWidth=1*n,d.strokeStyle="#000000"),d.beginPath(),d.arc(r,r,t,0,2*Math.PI,!1),d.fill(),o&&d.setLineDash([5,3]),i&&d.stroke(),QP[l]=h}}return QP[l]},HP={},RC1=(r,t,e,i,o,n,l,h,d,p)=>{let C=`${e}, ${i}, ${o}, ${n},${l}, ${h}, ${d}`;if(!HP[C]){let M=C8(i*2,i*2);if(M){let S=M.getContext("2d");if(!S)return null;h&&(S.save(),S.textBaseline="middle",S.textAlign="center",S.font=p(r,t,o+2,e),S.strokeStyle=l,S.strokeText(e,i,i),S.restore()),S.textBaseline="middle",S.textAlign="center",S.fillStyle=n,S.font=p(r,t,o,e),S.strokeStyle=l,S.strokeText(e,i,i),S.fillText(e,i,i),HP[C]=M}}return HP[C]},VP={},zC1=(r,t,e)=>{let{delayDisplay:i=3e5,delayOutlineColor:o="#000",getColor:n=()=>"#000",getDelayColor:l=()=>"#000",getDelayFont:h=(T2,A1,P1)=>`bold ${P1}px arial, sans-serif`,getDelayText:d=()=>null,getMaxRadiusForStrokeAndDelay:p=()=>7,getMaxRadiusForText:C=()=>10,getRadius:M=()=>0,getText:S=T2=>T2?.properties?.line?.name||"I",getTextColor:y=()=>"#000",getTextFont:O=(T2,A1,P1)=>`bold ${P1}px arial, sans-serif`,getTextSize:Q=()=>14,hoverVehicleId:H,selectedVehicleId:G,useDelayStyle:t1}=e,{pixelRatio:e1=1}=t,{type:J}=r.properties,{delay:g1,has_realtime_journey:b1,line:T1,operator_provides_realtime_journey:x1,state:C1,train_id:D1}=r.properties,{color:a1,name:w1,text_color:Q1}=T1||{};w1=S(r,t);let j1=C1==="JOURNEY_CANCELLED";w1||(w1="I"),Q1=y(r,t),a1=n(r,t),a1&&!a1.startsWith("#")&&(a1=`#${a1}`),Q1.startsWith("#")||(Q1=`#${Q1}`);let c2=!!(H&&H===D1),C2=!!(G&&G===D1),Y1=M(r,t)*e1,H1=Y1>=p()*e1;(c2||C2)&&(Y1=H1?Y1+5*e1:14*e1);let y2=Y1>C()*e1,Q2=`${Y1}${c2||C2}${b1}`;if(t1?Q2+=`${x1}${g1}${j1}`:(Q2+=`${a1||J}`,H1&&(Q2+=`${j1}${g1}`)),y2&&(Q2+=`${w1}${Q1}`),!VP[Q2]){if(Y1===0)return null;let T2=1*e1,A1=Y1+2*e1,P1=Y1*2,F1=A1*2+T2*2,n2=F1/2,f2=null;H1&&g1!==null&&(f2=IC1(n2,A1,l(r,t,g1,j1)));let a2=null,k2=0;if(H1&&(c2||(g1||0)>=i||j1)){k2=Math.max(j1?19:14,Math.min(j1?19:17,Y1*1.2))*e1;let wt=d(r,t,g1,j1);wt&&(a2=FC1(wt,k2,h(r,t,c2||t.zoom>=13?k2:0,wt),l(r,t,g1,j1,!0),o,e1))}let Z2=null,R2;t1?R2=l(r,t,g1,j1):R2=a1||n(r,t);let H2=H1||c2||C2,nt=!!H1&&!!t1&&g1===null&&x1==="yes",it=!!H2&&y2&&!b1&&!j1;it&&(Z2=TC1(Y1,e1));let P2=PC1(n2,Y1,R2,H2,nt,e1),q1=a2?.width||it&&Z2.width/2||0,he=it&&Z2.height/2||0,se=F1+q1*2,Yt=F1+he*2,st=C8(se,Yt);if(st){let wt=st.getContext("2d");if(!wt)return null;let ft=q1,Pt=he;f2&&wt.drawImage(f2,ft,Pt),P2&&wt.drawImage(P2,ft,Pt);let zt=null;if(y2){let Ot=Math.max(Y1,10),ie=Q(r,t,wt,P1,w1,Ot,O(r,t,Ot,w1)),Jt=t1?"#000000":Q1||y(r,t);zt=RC1(r,t,w1,n2,ie,Jt,R2,!!t1&&g1===null&&x1==="yes",e1,O)}zt&&wt.drawImage(zt,ft,Pt),a2&&wt.drawImage(a2,ft+Math.ceil(n2+A1)+T2,Pt+Math.ceil(n2-k2)),it&&wt.drawImage(Z2,ft-Z2.width/4,Pt-Z2.height/4),VP[Q2]=st}}return VP[Q2]},ZY=zC1;var NY={bus:25,coach:15,train:30,tram:20},DC1={fullTrajectoryStyle:zY,getMotsByZoom:r=>r<9?["rail"]:null,sort:({properties:{delay:r,type:t}},{properties:{delay:e,type:i}})=>t!==i?NY[t]<NY[i]?-1:1:r===e?0:r<e?-1:1,style:ZY,styleOptions:{getColor:r=>yA(r?.properties?.type,r?.properties?.line),getMaxRadiusForStrokeAndDelay:()=>4,getMaxRadiusForText:()=>8,getRadius:(r,t)=>DY(r?.properties?.type,t?.zoom),getTextColor:r=>By(r?.properties?.type)}};function kC1(r){return j(RY,{...DC1,...r})}var c_=et(kC1);var UY=d3(W4(),1);function OC1({debounceOptions:r,debounceTimeout:t=150,hover:e=!0}){let{map:i,mots:o,queryablelayers:n,setFeaturesInfos:l,setFeaturesInfosHovered:h,setLinesIds:d,setNotificationId:p,setStationId:C,setTrainId:M,stationsLayer:S,tenant:y}=Ct(),O=or(async G=>{let t1=G.map.getAllLayers().filter(J=>n.split(",").includes(J.get("name"))),e1=await mB(G.coordinate,t1,5,!0);if(S){let J=e1?.find(T1=>T1.layer===S),g1=J?.features||[],[b1]=g1.filter(T1=>{let x1=!1;return o?.split(",")?.length>0&&(x1=!!o.split(",").find(C1=>{if(T1.get(C1.trim().toLowerCase())===1)return!0})),!T1.get("uid")&&T1.get("external_id")&&T1.set("uid",T1.get("external_id")),x1?!!T1.get("tralis_network")?.includes(y):T1.get("network")?T1.get("network").toLowerCase().includes(y):x1});J&&(J.features=b1?[b1]:[])}return e1},[o,n,S,y]),Q=or(async G=>{let t1=await O(G);h(t1);let e1=t1.flatMap(J=>J.features);G.map.getTargetElement().style.cursor=e1?.length?"pointer":"default"},[O,h]),H=or(async G=>{let t1=await O(G);l(t1),t1?.flatMap(e1=>e1.features).length===0&&(M(null),C(null),p(null),d(null))},[O,l,d,p,C,M]);return G2(()=>{let G=i?.on("singleclick",H);return()=>{tr(G)}},[i,H]),G2(()=>{let G;if(e){let t1=Q;t&&(t1=(0,UY.default)(Q,t,r)),G=i?.on("pointermove",t1)}return()=>{tr(G)}},[r,t,e,i,Q]),null}var GP=OC1;var QY=(r,t)=>{if(!!t.get("name")&&r!=null){let o=r?.split(",")||[],n=t.get("name"),l=o.includes(n);t.getVisible()!==l&&(t.setVisible(l),t.getLayers&&t.getLayers().getArray().forEach(h=>{h.setVisible(l)}))}t.getLayers&&t.getLayers().getArray().forEach(o=>{QY(r,o)})},jP=QY;var ZC1=(r,t,e)=>{let i=k0(!1),o=k0($g(e)?.layers);return G2(()=>{if(!r)return;let n=t;o.current!==null&&o.current!==void 0&&!i.current&&(n=o.current,i.current=!0),P4(r.getLayers().getArray()).forEach(h=>{jP(n,h)});let l=r.getLayers().on("add",h=>{jP(n,h.element)});return()=>{tr(l)}},[r,t]),null},HY=ZC1;var VY=["mwc:permalink","mwc:selectedfeature","mwc:singleclick","mwc:attribute"];function NC1({eventNode:r}){let{setPreviewNotifications:t}=Ct();return G2(()=>{let e=i=>{i.data.situations&&t(i.data.situations)};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}},[t]),G2(()=>{if(!r)return;let e=i=>{i.type==="mwc:attribute"&&delete i.data.children,i.type==="mwc:selectedfeature"&&i.data?.properties?.olGeometry&&delete i.data.properties.olGeometry,window.parent?.postMessage({data:i.data,type:i.type},"*")};return VY.forEach(i=>{r.addEventListener(i,e)}),window.parent?.postMessage({data:!0,type:"mwc:messageready"},"*"),()=>{VY.forEach(i=>{r.removeEventListener(i,e)})}},[r]),null}var qP=et(NC1);var UC1='<a href="https://developer.geops.io/">geOps API key</a>',GY='<a href="https://developer.geops.io/apis/maps">geOps Maps API</a>',QC1='<a href="https://developer.geops.io/apis/stops">geOps Stops API</a>',KP='<a href="https://geops.com/en/solution/disruption-information">geOps MOCO API</a>',u_='<a href="https://geops.com/en/solution/mapset">geOps Mapset API</a>',h_='<a href="https://developer.geops.io/apis/realtime">geOps Realtime API</a>',HC1={apikey:{defaultValue:"5cc87b12d7c5370001c1d655820abcc37dfd4d968d7bab5b2a74a935",description:`Your ${UC1}`,public:!1},baselayer:{defaultValue:"de.rvf_moco",description:`The style's name from the ${GY}. <br/>Ex: base_dark_v2, base_bright_v2, ...`,public:!1},center:{description:"The center of the map in EPSG:3857 coordinates.<br/>Parameter required if extent is not set.",public:!0},details:{defaultValue:"true",description:"When a feature of a queryable layer is clicked, it displays informations about it.",public:!0,type:"boolean"},embed:{defaultValue:"false",description:"Toggle the embedded navigation mode.<br/>In this mode zooming with mouse wheel is deactivated and, on touch device, you can only navigate with two finger, a warning message is displayed to warn the user.",public:!0,type:"boolean"},extent:{defaultValue:Of.join(","),description:"The map's extent in EPSG:3857 coordinates.<br/>Ex: 831634,5933959,940649,6173660 .<br/>Parameter required if center and zoom are not set.",public:!0},geolocation:{defaultValue:"true",description:"Toggle the display of the geolocation button or not.",public:!0,type:"boolean"},lang:{defaultValue:"de",description:"The language to use for the map. Supported languages are : de, en, fr, it.",public:!1},layers:{defaultValue:null,description:`A comma separated list of layers's name to make visible on load, others are hidden. If empty, all layers will be hidden except the baselayer.<br/>Layers available are ${Object.values(Ft).join(", ")}.`,public:!0},layersconfig:{description:`A JSON string to configure the layers and other components associated to it.<br/>
|
|
1550
|
+
}`;function rC1({options:r,...t}){let{map:e}=Ct(),[i,o]=pt(),n=It(()=>i?new gN({target:i,...r}):null,[r,i]);return G2(()=>{if(!(!e||!n))return e.addControl(n),()=>{e&&n&&e.removeControl(n)}},[e,n]),j("div",{ref:l=>{o(l)},...t,children:j("style",{children:MY})})}var SP=rC1;function iC1({...r}){let{isSearchOpen:t,setIsSearchOpen:e}=Ct(),{t:i}=er(),o=or(()=>{e(!t)},[t,e]);return j(p0,{title:i("search_menu_title"),...r,onClick:o,selected:t,children:j(Jc,{})})}var EP=et(iC1);function nC1({...r}){return j("svg",{fill:"none",height:24,stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z",strokeLinecap:"round",strokeLinejoin:"round"})})}var TP=nC1;function oC1({...r}){let{isShareMenuOpen:t,setIsShareMenuOpen:e}=Ct(),{t:i}=er(),o=or(()=>{e(!t)},[t,e]);return j(p0,{title:i("share_menu_title"),...r,onClick:o,selected:t,children:j(TP,{})})}var IP=et(oC1);function aC1(r){let{baseLayer:t,map:e,setStationsLayer:i}=Ct(),o=It(()=>t?new O0({layersFilter:({metadata:n})=>n?.["tralis.variable"]==="station"||n?.["general.filter"]==="stations"||n?.["geops.filter"]==="netzplan_stops",maplibreLayer:t,name:Zg,...r||{}}):null,[t,r]);return G2(()=>{if(!(!e||!o))return e.addLayer(o),i(o),()=>{e.removeLayer(o)}},[e,i,o]),null}var BY=et(aC1);var sC1=()=>({layersFilter:({metadata:r})=>r?.["general.filter"]==="stations",minZoom:10});function lC1(r){return j(BY,{...sC1,...r})}var PA=et(lC1);function cC1(r){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M19,10.9999 C19.5522847,10.9999 20,11.4476153 20,11.9999 C20,12.5521847 19.5522847,12.9999 19,12.9999 L5,12.9999 C4.44771525,12.9999 4,12.5521847 4,11.9999 C4,11.4476153 4.44771525,10.9999 5,10.9999 L19,10.9999 Z"})})}var FP=cC1;function uC1(r){return j("svg",{fill:"currentColor",height:"24px",version:"1.1",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",...r,children:j("path",{d:"M12,4 C12.5522847,4 13,4.44771525 13,5 L13,11 L19,11 C19.5128358,11 19.9355072,11.3860402 19.9932723,11.8833789 L20,12 C20,12.5522847 19.5522847,13 19,13 L13,13 L13,19 C13,19.5128358 12.6139598,19.9355072 12.1166211,19.9932723 L12,20 C11.4477153,20 11,19.5522847 11,19 L11,13 L5,13 C4.48716416,13 4.06449284,12.6139598 4.00672773,12.1166211 L4,12 C4,11.4477153 4.44771525,11 5,11 L11,11 L11,5 C11,4.48716416 11.3860402,4.06449284 11.8833789,4.00672773 Z"})})}var PP=uC1;function hC1(){let{map:r}=Ct(),[t,e]=pt(!1),[i,o]=pt(!1),{t:n}=er(),l=or(()=>{if(!r?.getView())return;let d=r.getView(),p=d.getZoom();d.setZoom(p+1)},[r]),h=or(()=>{if(!r?.getView())return;let d=r.getView(),p=d.getZoom();d.setZoom(p-1)},[r]);return G2(()=>{let d=r?.on("moveend",()=>{let p=r.getView(),C=p.getZoom(),M=p.getMaxZoom(),S=p.getMinZoom();M&&C===Number(M)?e(!0):e(!1),S&&C===Number(S)?o(!0):o(!1)});return()=>{tr(d)}},[r]),j(Xe,{children:[j(p0,{disabled:t,onClick:l,title:n("zoomin"),children:j(PP,{})}),j(p0,{disabled:i,onClick:h,title:n("zoomout"),children:j(FP,{})})]})}var RP=et(hC1);var SY={style:{width:"calc(100% - 60px)"}},AC1=()=>({layersFilter:({metadata:r})=>r?.["general.filter"]==="stations"});function dC1({className:r,...t}){let{hasDetails:e,hasGeolocation:i,hasLayerTree:o,hasPrint:n,hasRealtime:l,hasSearch:h,hasShare:d,hasToolbar:p,isEmbed:C,isOverlayOpen:M,isSearchOpen:S,mainlink:y}=Ct();return j("div",{className:oe("relative flex size-full flex-col text-base @lg/main:flex-row-reverse",r),...t,children:[j(yP,{}),j(PA,{minZoom:10,...AC1}),j(BP,{}),j(_P,{}),j(vP,{}),j(MP,{}),j(XB,{className:"relative flex-1 overflow-visible",children:[C&&j(VB,{}),y&&j(gP,{className:"absolute inset-x-2 bottom-8 z-10"}),j("div",{className:"pointer-events-none absolute inset-x-2 bottom-2 z-10 flex items-end justify-between gap-2 text-[10px]",children:[j(SP,{className:"bg-slate-50/70"}),j(Kg,{className:"pointer-events-auto bg-slate-50/70"})]}),j("div",{className:"absolute top-2 right-2 z-10 flex",children:i&&j(Wg,{title:"Geolokalisierung"})}),j("div",{className:"absolute right-2 bottom-10 z-10 flex flex-col justify-between gap-2",children:j(RP,{})}),!p&&h&&j("div",{className:oe("absolute top-2 right-2 left-2 z-10 max-w-96",M&&"@lg:left-68"),children:j(tu,{})})]}),j("div",{className:"pointer-events-none absolute top-2 bottom-2 left-2 z-10 flex flex-col gap-2",children:[p&&j("div",{className:"pointer-events-none relative z-10 w-fit rounded-2xl bg-black/10 p-0 backdrop-blur-sm *:pointer-events-auto",children:[h&&j("div",{className:oe("absolute top-12 left-0 w-0 p-0 opacity-0 transition-all @sm:top-0 @sm:left-[calc(100%-43px)] @md:left-[calc(100%-47px)]",S?"w-64 opacity-100":""),children:j(tu,{className:"border-grey @container m-0 h-[40px] rounded-2xl border p-2 px-4 text-base @sm/main:h-[44px] @sm/main:rounded-l-none @sm/main:rounded-r-2xl @md/main:h-[48px]",inputClassName:"h-6 text-base",inputContainerClassName:"border-none",resultClassName:"text-base **:hover:cursor-pointer hover:text-red-500 p-2",resultsContainerClassName:"@container rounded-b-2xl max-h-[200px] overflow-y-auto border border-grey border-t-0 ",withResultsClassName:"text-base !rounded-b-none"})}),j("div",{className:oe("border-grey relative flex gap-[1px] overflow-hidden rounded-2xl border @sm/main:h-[44px] @md/main:h-[48px]","*:size-[38px] *:rounded-none *:border-none *:@sm/main:size-[42px] *:@md/main:!size-[46px]","*:first:!rounded-l-2xl","*:last:!rounded-r-2xl",S?"@sm:rounded-r-none @sm:border-r-0 @sm:*:last:!rounded-r-none @sm:*:last:border-r-0":""),children:[o&&j($B,{}),n&&j(jB,{}),d&&j(IP,{}),h&&j(EP,{})]})]}),M&&j("div",{className:oe("pointer-events-none flex w-0 flex-1 flex-col overflow-hidden rounded-2xl @lg:min-w-[320px]"),style:{containerType:"normal"},children:j(Xg,{className:"border-grey @container/overlay pointer-events-auto relative hidden flex-col overflow-hidden rounded-2xl border bg-white text-base shadow-lg @lg:flex",ScrollableHandlerProps:SY,children:j(i_,{hasDetails:e,hasLayerTree:o,hasPrint:n,hasRealtime:l,hasSearch:!1,hasShare:d})})})]}),M&&j(Xg,{className:"absolute bottom-0 z-20 flex max-h-[70%] min-h-[75px] w-full flex-col border-t bg-white @lg:hidden",ScrollableHandlerProps:SY,children:j(i_,{hasDetails:e,hasLayerTree:o,hasPrint:n,hasRealtime:l,hasSearch:!1,hasShare:d})})]})}var l_=et(dC1);var fC1=(r,t)=>{let e=t?.getView()?.getZoom(),i=r.get("minZoom"),o=r.get("maxZoom");return i>e||e>o};function pC1(r){let{apikey:t,baseLayer:e,map:i,mapsetplanid:o,mapsettags:n,mapsettenants:l,mapsettimestamp:h,mapseturl:d,setMapsetLayer:p}=Ct(),C=It(()=>!e||!i?null:new aB({apiKey:t,name:Ug,planId:o??void 0,tags:n?.split(",").map(M=>M.trim()),tenants:l?.split(",").map(M=>M.trim()),timestamp:h,url:d,...r||{}}),[e,i,t,d,o,n,l,h,r]);return G2(()=>{p?.(C)},[C,p,i]),G2(()=>{if(!(!i||!C))return i.addLayer(C),()=>{i.removeLayer(C)}},[i,C]),G2(()=>{let M=null;return C&&(M=C.on("updatefeatures",()=>{let S=C.getSource()?.getFeatures();S?.length&&S.forEach(y=>{let O=y.getStyleFunction();O&&y.setStyle((Q,H)=>fC1(Q,C.getMapInternal())?null:O(y,H))})})),()=>{tr(M)}},[C]),null}var zP=et(pC1);function LC1(r){let{apikey:t,baseLayer:e,linesNetworkPlanLayer:i,map:o,notificationat:n,notificationtenant:l,notificationurl:h,previewNotifications:d,setNotificationsLayer:p}=Ct(),[C,M]=pt(!!i?.getVisible()),S=It(()=>{if(!e)return null;let y=new uB({apiKey:t,apiParameters:{contentMedium:!0,isEdited:!0,publicNow:!0},maplibreLayer:e,name:Ng,publicAt:n?new Date(n):void 0,situations:d,tenant:l,url:h,...r||{},loadAll:!d});return d&&!y.getVisible()&&y.setVisible(!0),y},[e,t,n,d,l,h,r]);return G2(()=>{p?.(S)},[S,p]),G2(()=>{if(!(!o||!S))return o.addLayer(S),()=>{o.removeLayer(S)}},[o,S]),G2(()=>{let y=i?.on("change:visible",()=>{let O=i.getVisible();M(O)});return M(i?.getVisible()||!1),()=>{tr(y)}},[i]),G2(()=>{if(!S)return;let y=S.getVisible();return y&&S.setVisible(!1),C?S.layersFilter=O=>O.metadata?.["general.filter"]==="moco.lnp":S.layersFilter=O=>O.metadata?.["general.filter"]==="moco",S.setVisible(y),()=>{S.applyLayoutVisibility()}},[C,S,i]),null}var DP=et(LC1);var TY=d3(W4(),1);var CC1=(r,t=new URLSearchParams)=>{let e=r.getView().getZoom(),[i,o]=r.getView().getCenter()||[],n=P4(r.getLayers().getArray()).filter(l=>l.get("name")&&l.getVisible()).map(l=>l.get("name"));return t.set("layers",n.join(",")),i>=0&&t.set("x",i.toFixed(2)),o>=0&&t.set("y",o.toFixed(2)),e>=0&&t.set("z",e.toFixed(1)),t},EY=CC1;var gC1=({replaceState:r=!1})=>{let{map:t,setPermalinkUrlSearchParams:e}=Ct(),i=FA(),o=or(n=>{if(t.get(Yo))return;let l=new URLSearchParams(window.location.search),h=EY(n,l);e(h)},[t,e]);return G2(()=>{r&&i&&i!==window.location.href&&!i.includes(encodeURIComponent("{{"))&&window.history.replaceState(null,null,i)},[t,i,r]),G2(()=>{let n,l,h,d=(0,TY.default)(o,1e3);return t&&(d(t),n=t?.on("moveend",p=>{d(p.map)}),l=t.once("loadend",p=>{d(p.map),h=P4(p.map.getLayers().getArray()).map(C=>C.on("change:visible",()=>{d(p.map)}))})),()=>{tr(n),tr(l),tr(h)}},[t,o]),null},kP=et(gC1);var mC1=async(r,t,e=0,i=!0)=>{if(!r)return Promise.reject(new Error("No vehicle provided"));let{geometry:o,properties:{coordinate:n}}=r,l=t.getView(),h=e||l.getZoom(),d=h>0?l.getResolutionForZoom(h):void 0,p=n?[...n]:null;if(!p&&o){let{coord:M}=Xd(Date.now(),r,!0);p=M?[...M]:null}return p?(i&&(p[0]-=320/2*d),l.cancelAnimations(),new Promise(M=>{l.animate({center:p,duration:1e3,easing:qC,resolution:d},S=>{M(S)})})):Promise.reject(new Error("No center found"))},OP=mC1;var vC1=(r,t,e,i,o)=>i?o?"#dc2626":"#a0a0a0":e===null?"transparent":cL(e,o),IY=vC1;var yC1=(r,t,e,i=!1)=>{if(i)return String.fromCodePoint(215);let o=uL(e);return o==="0"?"":`+${o}`},FY=yC1;var PY=16,_C1=!0,xC1=new f0;function wC1(r){let{apikey:t,baseLayer:e,isFollowing:i,isTracking:o,linesNetworkPlanLayer:n,map:l,mots:h,realtimebboxparameters:d,realtimeurl:p,setIsFollowing:C,setIsTracking:M,setRealtimeLayer:S,tenant:y,trainId:O}=Ct(),[Q,H]=pt([]),[G,t1]=pt(!1),e1=It(()=>!t||!p?null:new gB({apiKey:t,bboxParameters:d?.split(" ").reduce((g1,b1)=>{if(!b1)return g1;let[T1,x1]=b1.split("=");return g1[T1]=x1,g1},{}),getMotsByZoom:h?()=>h.split(","):void 0,isQueryable:!0,minZoom:5,name:Og,tenant:y,url:p,zIndex:1,...r,styleOptions:{getColor:_A,getDelayColor:IY,getDelayText:FY,getText:Ty,getTextColor:Sy,getTextFont:Ey,...r?.styleOptions||{}}}),[t,p,d,h,y,r]);return G2(()=>{if(!(!l||!e1))return l.getView()?.getCenter()?l.addLayer(e1):l.once("moveend",()=>{l.addLayer(e1)}),S(e1),()=>{l.removeLayer(e1),S(null)}},[l,S,e1]),G2(()=>{O||C(!1)},[O,C]),G2(()=>{let J=[];return o&&C(!1),()=>{tr(J)}},[o,C]),G2(()=>{if(!l)return;let J=null;return J=l.getView().on("change:center",g1=>{g1.target.getInteracting()&&(C(!1),M(!1))}),()=>{tr(J)}},[l,C,M]),G2(()=>{let J=null;return e1&&(e1.engine.useThrottle=!i,e1.engine.isUpdateBboxOnMoveEnd=!i,e1.allowRenderWhenAnimating=!!i),!i||!O||!l||!e1?void 0:(M(!1),(async b1=>{let T1=b1&&e1?.trajectories?.[b1];if(!T1){T1=(await e1.api.getTrajectory(O,e1.mode))?.content;let D1=await e1.api.getFullTrajectory(O,e1.mode,void 0);if(D1?.content)try{let a1=xC1.readFeatures(D1.content),w1=new V4({features:a1}).getExtent();e1.api.bbox=[...w1,...e1.api.bbox.slice(4)]}catch(a1){console.warn("Error parsing full trajectory feature:",a1,D1?.content)}}await OP(T1,l,PY)===!0&&(J=setInterval(()=>{OP(e1?.trajectories?.[O],l,PY)},1e3))})(O),()=>{clearInterval(J)})},[i,l,e1,O,M]),G2(()=>{if(!(!O||!e1?.api))return e1.selectedVehicleId=O,e1.highlightTrajectory(O).catch(J=>{console.error("Error highlighting trajectory:",J)}),()=>{e1?.selectedVehicleId&&(e1.api?.unsubscribeFullTrajectory(e1.selectedVehicleId),e1.selectedVehicleId=null,e1.vectorLayer.getSource().clear())}},[O,e1,e1?.api]),G2(()=>{if(!l||!e)return;let J=l.once("rendercomplete",()=>{let g1=e.mapLibreMap?.getStyle()?.metadata,b1=[];for(let T1=0;T1<26;T1++)b1.push(Bh(T1,g1?.graphs));H(b1)});return()=>{tr(J)}},[l,e,e1]),G2(()=>{let J=n?.on("change:visible",()=>{let g1=n.getVisible();t1(g1)});return t1(n?.getVisible()||!1),()=>{tr(J)}},[n]),G2(()=>{!e1||!Q?.length||(_C1&&G?e1.engine.graphByZoom=Q:e1.engine.graphByZoom=[],e1.engine.setBbox())},[G,e1,Q,n]),null}var RY=et(wC1);var bC1=new q3({image:new o7({fill:new k6({color:"#000000"}),radius:5}),stroke:new wi({color:"#000000",width:6}),zIndex:2}),MC1=r=>{let t="#ffffff",e=r.get("type"),i=r.get("stroke");return i&&i[0]!=="#"&&(i=`#${i}`),t=i||yA(e,{name:r.get("line_name")}),t=/#ffffff/i.test(t)?"#ff0000":t,[bC1,new q3({image:new o7({fill:new k6({color:t}),radius:4}),stroke:new wi({color:t,width:4}),zIndex:3})]},zY=MC1;var BC1={0:[0,0,0,0,0,2,2,2,2,2,3,3,4,4,6,7,7],1:[0,0,0,0,0,2,2,2,2,2,3,3,4,4,6,7,7],2:[0,0,0,0,0,2,2,2,2,3,3,4,4,6,7,12,15],3:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,6,6],4:[0,0,0,0,0,2,2,2,2,2,2,3,3,6,7,12,15],5:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,7,7],6:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,7,7],7:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,7,7],8:[0,0,0,0,0,2,2,2,2,2,2,3,3,4,6,6,6],9:[0,0,0,0,0,2,2,2,2,3,3,4,4,6,7,12,15]},SC1=BC1,DY=(r=0,t=0,e=!1)=>{let i=Math.min(Math.floor(t||1),16);try{let o=O7.getTypeIndex(r);return SC1[o][i]*(e?2:1)}catch{return 1}};var kY='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 42 42" width="42" height="42">%0A <path id="Pfad_1" data-name="Pfad 1" d="M40,20A20,20,0,1,1,20,0,20,20,0,0,1,40,20Z" transform="translate(0 0)" fill="%23353535"/>%0A <path id="Pfad_2" data-name="Pfad 2" d="M25.481,11.843a9.993,9.993,0,0,0-10,9.992c0,7.773,10,14.8,10,14.8s9.992-7.5,9.992-14.8a9.991,9.991,0,0,0-9.992-9.992m0,14.662a4.924,4.924,0,1,1,4.924-4.924A4.93,4.93,0,0,1,25.482,26.5" transform="translate(-5.477 -4.19)" fill="%23fff"/>%0A <path id="Pfad_3" data-name="Pfad 3" d="M12.015,8.124,38.081,34.031,35.4,36.536,9.06,10.527Z" transform="translate(-3.206 -2.874)" fill="%23ec0016"/>%0A <path id="Pfad_4" data-name="Pfad 4" d="M20,3.231A16.769,16.769,0,1,1,3.231,20,16.788,16.788,0,0,1,20,3.231M20,0A20,20,0,1,0,40,20,20,20,0,0,0,20,0" transform="translate(0 0)" fill="%23353535"/>%0A</svg>%0A';var ZP={},OY=new Image(42,42);OY.src=kY;var TC1=(r,t)=>{let e=16;r>e&&(e=22);let i=`${e},${t}`;if(!ZP[i]){let o=C8(e*t,e*t),n=o.getContext("2d");if(!n)return null;n.drawImage(OY,0,0,e*t,e*t),ZP[i]=o}return ZP[i]},NP={},IC1=(r,t,e)=>{let i=`${r}, ${t}, ${e}`;if(!NP[i]){let o=C8(r*2,r*2);if(o){let n=o.getContext("2d");if(!n)return null;n.beginPath(),n.arc(r,r,t,0,2*Math.PI,!1),n.fillStyle=e,n.filter="blur(1px)",n.fill(),NP[i]=o}}return NP[i]},UP={},FC1=(r,t,e,i,o="#000",n=1)=>{let l=`${r}, ${e}, ${i}, ${o}, ${n}`;if(!UP[l]){let h=C8(Math.ceil(r.length*t),Math.ceil(t+8*n));if(h){let d=h.getContext("2d");if(!d)return null;d.font=e,d.textAlign="left",d.textBaseline="middle",d.font=e,d.fillStyle=i,d.strokeStyle=o,d.lineWidth=1.5*n,d.strokeText(r,0,t),d.fillText(r,0,t),UP[l]=h}}return UP[l]},QP={},PC1=(r,t,e,i,o,n)=>{let l=`${r}, ${t}, ${e}, ${i}, ${o}, ${n}`;if(!QP[l]){let h=C8(r*2,r*2);if(h){let d=h.getContext("2d");if(!d)return null;d.fillStyle=e,i&&(d.lineWidth=1*n,d.strokeStyle="#000000"),d.beginPath(),d.arc(r,r,t,0,2*Math.PI,!1),d.fill(),o&&d.setLineDash([5,3]),i&&d.stroke(),QP[l]=h}}return QP[l]},HP={},RC1=(r,t,e,i,o,n,l,h,d,p)=>{let C=`${e}, ${i}, ${o}, ${n},${l}, ${h}, ${d}`;if(!HP[C]){let M=C8(i*2,i*2);if(M){let S=M.getContext("2d");if(!S)return null;h&&(S.save(),S.textBaseline="middle",S.textAlign="center",S.font=p(r,t,o+2,e),S.strokeStyle=l,S.strokeText(e,i,i),S.restore()),S.textBaseline="middle",S.textAlign="center",S.fillStyle=n,S.font=p(r,t,o,e),S.strokeStyle=l,S.strokeText(e,i,i),S.fillText(e,i,i),HP[C]=M}}return HP[C]},VP={},zC1=(r,t,e)=>{let{delayDisplay:i=3e5,delayOutlineColor:o="#000",getColor:n=()=>"#000",getDelayColor:l=()=>"#000",getDelayFont:h=(T2,A1,P1)=>`bold ${P1}px arial, sans-serif`,getDelayText:d=()=>null,getMaxRadiusForStrokeAndDelay:p=()=>7,getMaxRadiusForText:C=()=>10,getRadius:M=()=>0,getText:S=T2=>T2?.properties?.line?.name||"I",getTextColor:y=()=>"#000",getTextFont:O=(T2,A1,P1)=>`bold ${P1}px arial, sans-serif`,getTextSize:Q=()=>14,hoverVehicleId:H,selectedVehicleId:G,useDelayStyle:t1}=e,{pixelRatio:e1=1}=t,{type:J}=r.properties,{delay:g1,has_realtime_journey:b1,line:T1,operator_provides_realtime_journey:x1,state:C1,train_id:D1}=r.properties,{color:a1,name:w1,text_color:Q1}=T1||{};w1=S(r,t);let j1=C1==="JOURNEY_CANCELLED";w1||(w1="I"),Q1=y(r,t),a1=n(r,t),a1&&!a1.startsWith("#")&&(a1=`#${a1}`),Q1.startsWith("#")||(Q1=`#${Q1}`);let c2=!!(H&&H===D1),C2=!!(G&&G===D1),Y1=M(r,t)*e1,H1=Y1>=p()*e1;(c2||C2)&&(Y1=H1?Y1+5*e1:14*e1);let y2=Y1>C()*e1,Q2=`${Y1}${c2||C2}${b1}`;if(t1?Q2+=`${x1}${g1}${j1}`:(Q2+=`${a1||J}`,H1&&(Q2+=`${j1}${g1}`)),y2&&(Q2+=`${w1}${Q1}`),!VP[Q2]){if(Y1===0)return null;let T2=1*e1,A1=Y1+2*e1,P1=Y1*2,F1=A1*2+T2*2,n2=F1/2,f2=null;H1&&g1!==null&&(f2=IC1(n2,A1,l(r,t,g1,j1)));let a2=null,k2=0;if(H1&&(c2||(g1||0)>=i||j1)){k2=Math.max(j1?19:14,Math.min(j1?19:17,Y1*1.2))*e1;let wt=d(r,t,g1,j1);wt&&(a2=FC1(wt,k2,h(r,t,c2||t.zoom>=13?k2:0,wt),l(r,t,g1,j1,!0),o,e1))}let Z2=null,R2;t1?R2=l(r,t,g1,j1):R2=a1||n(r,t);let H2=H1||c2||C2,nt=!!H1&&!!t1&&g1===null&&x1==="yes",it=!!H2&&y2&&!b1&&!j1;it&&(Z2=TC1(Y1,e1));let P2=PC1(n2,Y1,R2,H2,nt,e1),q1=a2?.width||it&&Z2.width/2||0,he=it&&Z2.height/2||0,se=F1+q1*2,Yt=F1+he*2,st=C8(se,Yt);if(st){let wt=st.getContext("2d");if(!wt)return null;let ft=q1,Pt=he;f2&&wt.drawImage(f2,ft,Pt),P2&&wt.drawImage(P2,ft,Pt);let zt=null;if(y2){let Ot=Math.max(Y1,10),ie=Q(r,t,wt,P1,w1,Ot,O(r,t,Ot,w1)),Jt=t1?"#000000":Q1||y(r,t);zt=RC1(r,t,w1,n2,ie,Jt,R2,!!t1&&g1===null&&x1==="yes",e1,O)}zt&&wt.drawImage(zt,ft,Pt),a2&&wt.drawImage(a2,ft+Math.ceil(n2+A1)+T2,Pt+Math.ceil(n2-k2)),it&&wt.drawImage(Z2,ft-Z2.width/4,Pt-Z2.height/4),VP[Q2]=st}}return VP[Q2]},ZY=zC1;var NY={bus:25,coach:15,train:30,tram:20},DC1={fullTrajectoryStyle:zY,getMotsByZoom:r=>r<9?["rail"]:null,sort:({properties:{delay:r,type:t}},{properties:{delay:e,type:i}})=>t!==i?NY[t]<NY[i]?-1:1:r===e?0:r<e?-1:1,style:ZY,styleOptions:{getColor:r=>yA(r?.properties?.type,r?.properties?.line),getMaxRadiusForStrokeAndDelay:()=>4,getMaxRadiusForText:()=>8,getRadius:(r,t)=>DY(r?.properties?.type,t?.zoom),getTextColor:r=>By(r?.properties?.type)}};function kC1(r){return j(RY,{...DC1,...r})}var c_=et(kC1);var UY=d3(W4(),1);function OC1({debounceOptions:r,debounceTimeout:t=150,hover:e=!0}){let{map:i,mots:o,queryablelayers:n,setFeaturesInfos:l,setFeaturesInfosHovered:h,setLinesIds:d,setNotificationId:p,setStationId:C,setTrainId:M,stationsLayer:S,tenant:y}=Ct(),O=or(async G=>{let t1=G.map.getAllLayers().filter(J=>n.split(",").includes(J.get("name"))),e1=await mB(G.coordinate,t1,5,!0);if(S){let J=e1?.find(T1=>T1.layer===S),g1=J?.features||[],[b1]=g1.filter(T1=>{let x1=!1;return o?.split(",")?.length>0&&(x1=!!o.split(",").find(C1=>{if(T1.get(C1.trim().toLowerCase())===1)return!0})),!T1.get("uid")&&T1.get("external_id")&&T1.set("uid",T1.get("external_id")),x1?!!T1.get("tralis_network")?.includes(y):T1.get("network")?T1.get("network").toLowerCase().includes(y):x1});J&&(J.features=b1?[b1]:[])}return e1},[o,n,S,y]),Q=or(async G=>{let t1=await O(G);h(t1);let e1=t1.flatMap(J=>J.features);G.map.getTargetElement().style.cursor=e1?.length?"pointer":"default"},[O,h]),H=or(async G=>{let t1=await O(G);l(t1),t1?.flatMap(e1=>e1.features).length===0&&(M(null),C(null),p(null),d(null))},[O,l,d,p,C,M]);return G2(()=>{let G=i?.on("singleclick",H);return()=>{tr(G)}},[i,H]),G2(()=>{let G;if(e){let t1=Q;t&&(t1=(0,UY.default)(Q,t,r)),G=i?.on("pointermove",t1)}return()=>{tr(G)}},[r,t,e,i,Q]),null}var GP=OC1;var QY=(r,t)=>{if(!!t.get("name")&&r!=null){let o=r?.split(",")||[],n=t.get("name"),l=o.includes(n);t.getVisible()!==l&&(t.setVisible(l),t.getLayers&&t.getLayers().getArray().forEach(h=>{h.setVisible(l)}))}t.getLayers&&t.getLayers().getArray().forEach(o=>{QY(r,o)})},jP=QY;var ZC1=(r,t,e)=>{let i=k0(!1),o=k0($g(e)?.layers);return G2(()=>{if(!r)return;let n=t;o.current!==null&&o.current!==void 0&&!i.current&&(n=o.current,i.current=!0),P4(r.getLayers().getArray()).forEach(h=>{jP(n,h)});let l=r.getLayers().on("add",h=>{jP(n,h.element)});return()=>{tr(l)}},[r,t]),null},HY=ZC1;var VY=["mwc:permalink","mwc:selectedfeature","mwc:singleclick","mwc:attribute"];function NC1({eventNode:r}){let{setPreviewNotifications:t}=Ct();return G2(()=>{let e=i=>{i.data.situations&&t(i.data.situations)};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}},[t]),G2(()=>{if(!r)return;let e=i=>{i.type==="mwc:attribute"&&delete i.data.children,i.type==="mwc:selectedfeature"&&i.data?.properties?.olGeometry&&delete i.data.properties.olGeometry,window.parent?.postMessage({data:i.data,type:i.type},"*")};return VY.forEach(i=>{r.addEventListener(i,e)}),window.parent?.postMessage({data:!0,type:"mwc:messageready"},"*"),()=>{VY.forEach(i=>{r.removeEventListener(i,e)})}},[r]),null}var qP=et(NC1);var UC1='<a href="https://developer.geops.io/">geOps API key</a>',GY='<a href="https://developer.geops.io/apis/maps">geOps Maps API</a>',QC1='<a href="https://developer.geops.io/apis/stops">geOps Stops API</a>',KP='<a href="https://geops.com/en/solution/disruption-information">geOps MOCO API</a>',u_='<a href="https://geops.com/en/solution/mapset">geOps Mapset API</a>',h_='<a href="https://developer.geops.io/apis/realtime">geOps Realtime API</a>',HC1={apikey:{defaultValue:"5cc87b12d7c5370001c1d655820abcc37dfd4d968d7bab5b2a74a935",description:`Your ${UC1}`,public:!1},baselayer:{defaultValue:"de.rvf_moco",description:`The style's name from the ${GY}. <br/>Ex: base_dark_v2, base_bright_v2, ...`,public:!1},center:{description:"The center of the map in EPSG:3857 coordinates.<br/>Parameter required if extent is not set.",public:!0},details:{defaultValue:"true",description:"When a feature of a queryable layer is clicked, it displays informations about it.",public:!0,type:"boolean"},embed:{defaultValue:"false",description:"Toggle the embedded navigation mode.<br/>In this mode zooming with mouse wheel is deactivated and, on touch device, you can only navigate with two finger, a warning message is displayed to warn the user.",public:!0,type:"boolean"},extent:{defaultValue:Of.join(","),description:"The map's extent in EPSG:3857 coordinates.<br/>Ex: 831634,5933959,940649,6173660 .<br/>Parameter required if center and zoom are not set.",public:!0},geolocation:{defaultValue:"true",description:"Toggle the display of the geolocation button or not.",public:!0,type:"boolean"},lang:{defaultValue:"de",description:"The language to use for the map. Supported languages are : de, en, fr, it.",public:!1},layers:{defaultValue:null,description:`A comma separated list of layers's name to make visible on load, others are hidden. If empty, all layers will be hidden except the baselayer.<br/>Layers available are ${Object.values(Ft).join(", ")}.`,public:!0},layersconfig:{description:`A JSON string to configure the layers and other components associated to it.<br/>
|
|
1551
1551
|
The layers available are : ${xZ.toString()}.<br/>
|
|
1552
1552
|
Definition for a layer :
|
|
1553
1553
|
<pre style="font-size: 12px; overflow: auto;">{
|
|
@@ -2531,6 +2531,9 @@ where:
|
|
|
2531
2531
|
.px-4 {
|
|
2532
2532
|
padding-inline: calc(var(--spacing) * 4);
|
|
2533
2533
|
}
|
|
2534
|
+
.px-\\[2px\\] {
|
|
2535
|
+
padding-inline: 2px;
|
|
2536
|
+
}
|
|
2534
2537
|
.px-\\[4px\\] {
|
|
2535
2538
|
padding-inline: 4px;
|
|
2536
2539
|
}
|
|
@@ -2555,6 +2558,9 @@ where:
|
|
|
2555
2558
|
.py-4 {
|
|
2556
2559
|
padding-block: calc(var(--spacing) * 4);
|
|
2557
2560
|
}
|
|
2561
|
+
.py-\\[0px\\] {
|
|
2562
|
+
padding-block: 0px;
|
|
2563
|
+
}
|
|
2558
2564
|
.py-\\[2px\\] {
|
|
2559
2565
|
padding-block: 2px;
|
|
2560
2566
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@geops/rvf-mobility-web-component",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
4
|
"description": "Web components for rvf in the domains of mobility and logistics.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.90",
|
|
6
6
|
"homepage": "https://rvf-mobility-web-component-geops.vercel.app/",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
@@ -22,7 +22,7 @@ function NotificationDetails({
|
|
|
22
22
|
}) {
|
|
23
23
|
const { situationId } = feature.getProperties();
|
|
24
24
|
const situationParsed = useMocoSituation(situationId);
|
|
25
|
-
|
|
25
|
+
console.log("situationParsed", feature.getProperties());
|
|
26
26
|
return (
|
|
27
27
|
<ShadowOverflow {...props} className={twMerge("px-4 text-base", className)}>
|
|
28
28
|
<SituationDetails situation={situationParsed} />
|
|
@@ -148,49 +148,50 @@ function RvfMapLayout({
|
|
|
148
148
|
)}
|
|
149
149
|
|
|
150
150
|
{/* Desktop (>= lg) */}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
>
|
|
158
|
-
<Overlay
|
|
159
|
-
className={
|
|
160
|
-
"border-grey @container/overlay pointer-events-auto relative hidden flex-col overflow-hidden rounded-2xl border bg-white text-base shadow-lg @lg:flex"
|
|
161
|
-
}
|
|
162
|
-
ScrollableHandlerProps={scrollableHandlerProps}
|
|
151
|
+
{isOverlayOpen && (
|
|
152
|
+
<div
|
|
153
|
+
className={twMerge(
|
|
154
|
+
"pointer-events-none flex w-0 flex-1 flex-col overflow-hidden rounded-2xl @lg:min-w-[320px]",
|
|
155
|
+
)}
|
|
156
|
+
style={{ containerType: "normal" }}
|
|
163
157
|
>
|
|
164
|
-
<
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
158
|
+
<Overlay
|
|
159
|
+
className={
|
|
160
|
+
"border-grey @container/overlay pointer-events-auto relative hidden flex-col overflow-hidden rounded-2xl border bg-white text-base shadow-lg @lg:flex"
|
|
161
|
+
}
|
|
162
|
+
ScrollableHandlerProps={scrollableHandlerProps}
|
|
163
|
+
>
|
|
164
|
+
<OverlayContent
|
|
165
|
+
hasDetails={hasDetails}
|
|
166
|
+
hasLayerTree={hasLayerTree}
|
|
167
|
+
hasPrint={hasPrint}
|
|
168
|
+
hasRealtime={hasRealtime}
|
|
169
|
+
hasSearch={false}
|
|
170
|
+
hasShare={hasShare}
|
|
171
|
+
/>
|
|
172
|
+
</Overlay>
|
|
173
|
+
</div>
|
|
174
|
+
)}
|
|
174
175
|
</div>
|
|
175
176
|
|
|
176
|
-
{/* Mobile */}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
177
|
+
{/* Mobile (< lg) */}
|
|
178
|
+
{isOverlayOpen && (
|
|
179
|
+
<Overlay
|
|
180
|
+
className={
|
|
181
|
+
"absolute bottom-0 z-20 flex max-h-[70%] min-h-[75px] w-full flex-col border-t bg-white @lg:hidden"
|
|
182
|
+
}
|
|
183
|
+
ScrollableHandlerProps={scrollableHandlerProps}
|
|
184
|
+
>
|
|
185
|
+
<OverlayContent
|
|
186
|
+
hasDetails={hasDetails}
|
|
187
|
+
hasLayerTree={hasLayerTree}
|
|
188
|
+
hasPrint={hasPrint}
|
|
189
|
+
hasRealtime={hasRealtime}
|
|
190
|
+
hasSearch={false} // The search could be in the overlay but we decide to put it in the toolbar for better UX
|
|
191
|
+
hasShare={hasShare}
|
|
192
|
+
/>
|
|
193
|
+
</Overlay>
|
|
194
|
+
)}
|
|
194
195
|
</div>
|
|
195
196
|
);
|
|
196
197
|
}
|
|
@@ -293,7 +293,7 @@ function SituationDetails({
|
|
|
293
293
|
// px-[8px] py-[4px] are important for bermekt
|
|
294
294
|
<div
|
|
295
295
|
className={
|
|
296
|
-
"bg-red rounded-
|
|
296
|
+
"bg-red rounded-sm px-[2px] py-[0px] font-semibold text-white"
|
|
297
297
|
}
|
|
298
298
|
key={name}
|
|
299
299
|
>
|
|
@@ -314,7 +314,7 @@ function SituationDetails({
|
|
|
314
314
|
<div
|
|
315
315
|
// px-[8px] py-[4px] are important for bermekt
|
|
316
316
|
className={
|
|
317
|
-
"bg-red rounded-
|
|
317
|
+
"bg-red rounded-sm px-[2px] py-[0px] font-semibold text-white"
|
|
318
318
|
}
|
|
319
319
|
key={name}
|
|
320
320
|
>
|