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AAO,CACL,KAAM,eACN,MAAO,OACP,EAAG,GACH,EAAG,EACL,CACF,EACA,aAAc,CACZ,MAAO,EACP,MAAO,uBACP,UAAW,OACX,MAAO,CACL,KAAM,eACN,MAAO,OACP,EAAG,GACH,EAAG,EACL,CACF,EACA,eAAgB,CACd,MAAO,EACP,MAAO,uBACP,UAAW,OACX,MAAO,CACL,KAAM,WACN,MAAO,OACP,EAAG,GACH,EAAG,EACL,CACF,EACA,SAAU,CACR,MAAO,EACP,MAAO,UACP,UAAW,OACX,MAAO,CACL,KAAM,KACN,YAAa,cACf,CACF,EACA,SAAU,CACR,MAAO,EACP,UAAW,OACX,MAAO,CACL,KAAM,KACN,YAAa,cACf,CACF,EACA,UAAW,CACT,MAAO,EACP,MAAO,UACP,UAAW,OACX,MAAO,CACL,KAAM,MACN,YAAa,2BACf,CACF,EACA,UAAW,CACT,MAAO,EACP,UAAW,OACX,MAAO,CACL,KAAM,MACN,YAAa,2BACf,CACF,EACA,UAAW,CACT,MAAO,EACP,UAAW,OACX,MAAO,CACL,KAAM,MACN,YAAa,2BACf,CACF,EACA,WAAY,CACV,MAAO,EACP,UAAW,OACX,MAAO,CACL,KAAM,OACN,YAAa,4BACf,CACF,EACA,WAAY,CACV,MAAO,EACP,UAAW,OACX,MAAO,CACL,KAAM,OACN,YAAa,4BACf,CACF,EACA,YAAa,CACX,MAAO,EACP,UAAW,OACX,MAAO,CACL,KAAM,QACN,YAAa,6BACf,CACF,CACF,CACF,EAEMC,GAAe,CACnB,UAAW,GACX,kBAAmB,GACnB,WAAY,yBACZ,WAAY,4BAEZ,WAAY,qDACZ,UAAW,GACX,gBAAiB,mBACjB,kBAAmB,KACnB,iBAAoB,GACpB,aAAc,CACZ,sBAAuB,EACvB,sBAAuB,CACzB,EACA,QAAS,CACP,KAAM,2EACN,SAAU,CACR,EAAG,IACH,EAAG,GACL,EACA,MAAO,CACL,SAAU,MACZ,EACA,KAAM,yCACR,EACA,cAAe,EACf,OAAQ,CACN,CACE,M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AAE,KAAM,OAAQ,GAzDPq4B,GA0DnB,2BA1DmBA,GAArB54B,IADCC,EAAc,mBAAmB,GACb24B,yMCiBrB,IAAqBM,GAArB,cAAwC/0B,GAAYxF,CAAU,CAAE,CAQ9D,aAAc,CACN,QACN,KAAK,aAAe,GACpB,KAAK,eAAiB,mBACxB,CAEA,QAAS,CACH,OAAC,KAAK,aAIHkB,2BAA8BkO,GAAU,sBAHtC,KAAK,eAIhB,CAEA,cAAe,CACR,mBACHorB,GAAW,KAAK,eAAgB34B,EAAa,EAAE,KAAe6oB,IAC5D+P,GAAK,CAAE,SAAU/P,EAAO,OAAS,GACjC,KAAK,QAAUA,EACf,KAAK,aAAe,GACrB,EAEL,CACF,EA/BqB6P,GACZ,OAASn5B;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,IADGm5B,GAArBl5B,IADCC,EAAc,cAAc,GACRi5B","names":["WwReport","Mix","LitElement","queryParamMixin","getCurrentApi","value","location","params","getRouteOptionsAndParams","_a","orderBy","filter","res","d","pathArray","last","dayjs","file","e","pdfurl","html","item","css","__decorateClass","customElement","nls$1","deCustomer","WwSampleComponent","i18nMixin","nls","property","importActions","__vitePreload","deCommon","deKiwis","enCommon","enKiwis","frCommon","frKiwis","zhCommon","waterlevelCfg","watertempCfg","lufttempCfg","niederschlagCfg","grundwasserCfg","KiStationInfoHdoe","val","station","graphComp","parameter","title","i18n","WwpStationDownloadHdoe","param","period","field","wwpHdoeKennzahlen","responsiveMixin","i","_b","_files","ts","fileName","serieslabel","Highcharts","wwpHdoeQuerprofil","self","name","data","color","z","show","new_series","x_max","level_data","chart","level","dp","files","crossSectionData","lastlevel","sortBy","WwpHdoeHochwasserbericht","fullurl","hochwasserberichte","defaultBericht","date","doc","query","WwpHtml","LoaderMixin","PropertyDefaultValue","contentFolder","tmpCanvas","tmpCanvasCtx","olStyleImage","canvas","half","FontIcon","FontSymbol","iconStyle","el","icon","cs","glyph","shape","backgroundColor","Fill","border","Stroke","descar","arys","fn","ary","newResult","result","reItem","r","LegendFactory","classification","_c","_d","tg","j","tag","tag1","tag2","marker","tgs","zIndex","Style","Icon","creatRule","key","rule","_getValue","get","getValue","oldGetValue","max","min","_val","multiplier","opsRule","Classifier","label","tagProperty","tags","dataItem","prev","StatusIcon","image","col","dir","rotation","deg","registeredProjections","registerProjections","mapCfg","proj","extent","proj4","getProjection","olProj","register","dataProjection","x","y","stations","point","viewProjection","offset","containsCoordinate","ListMode","clz","sorted","cols","sortedCol","changeColumn","c","changeOrder","getOptions","KiResponsiveTable","BaseTable","PromiseData","SortAble","ColumnFormatter","ColumnHider","Export","pelement","top","maxLeft","posY","topoffset","posX","getDisplayValue","template","returnString","placeholderString","capturingPlaceholder","lastCharDollar","currentChar","KiWcpWwpFilter","activeFilter","repeat","filt","ViewPort","SM","option","filterValue","combobox","getQueryObject","node","_stations","uniqBy","type","sortDir","additionalText","displayTemplate","t","a","b","numberValb","numberVala","WwMapPopup","hclocales","formatter","tsShortname","find","ser","series","mainParameter","stationparameterNo","siteNo","sdata","timestamp","river","st","unsafeHTML","groupBy","isMain","graph","until","WwMapPopupAuto","WwMapPopupBase","routes","getRoutes","stationDetailRoute","child","conf","options","WwMapPopupPrecip","sumSeries","sumData","sumlineData","sum","getAbsolutePath","path","callcache","KIWIS","basePath","service","datasource","returnfields","format","CSL","url","request","nocache","urlKey","req","resp","KiwisHelper","kiwisCfg","windowLocation","relPath","loc","ts_shortname","WwGraphWrapper","nodata","more","boost","changedProperties","currentData","currentId","threshholdMappings","WwMapPopupDynamic","getConfig","paths","from","to","tsPath","tsPathBase","alarms","tsData","mainTsData","maxValue","tsv","newId","target","tagName","event","datapoint","tooltip","findClosest","sparkline","KiWwpSparkline","WwpOverview","localStorageMixin","l","table","getCsvDelimiter","tab","regex","filterOptions","f","s","searchData","obj","filteredStations","fields","orders","_sort","_e","navigationPath","detailPaths","allHits","anyHits","detailPath","navigateTo","sameLayer","mapConfig","reproject","parFilter","par","tagCount","countBy","factory","locale","getTrendArrow","trend","opts","vals","style","popupBeforeLeft","getRelativePosAndPercentageFromMouseEventOnBar","targetX","pointedX","percentage","targetwidth","KiProgressBar","_changedProperties","newElement","marginDifference","oldMargin","legendType","KiProgressBarLegend","popupItems","lastPercentage","entry","absolutePercentage","percentageRange","newPercentage","maxWidth","firstEntry","lastEntry","lastPercentageNumber","newWidth","index","lastItem","KiPlayerSpeedChooser","newSpeed","speed","selectedItems","selectedSpeed","selectedText","playAccuracy","KiPlayer","newTicks","ticks","classiObj","rgbNumber","rgbString","WwRasterLegend","getLegendEntry","lastTimestamp","untilTimestamp","fromUnixMilliseconds","untilPercentage","childrenTimestamps","toTime","timeDifference","children","fillInMissingImages","rasterItem","minTime","maxTime","stepDuration","newImages","rasterImageIndex","rasterImage","returnValue","WwRasterPlayer","rasterlist","raster","images","keyBy","ImageLayer","legendEntries","_type","childrenArray","fromTime","steps","timeSpan","time","oldTimestamp","newTimestamp","dayUntil","imageNumber","_g","secImage","_h","rasterProduct","selectedLayer","bbox","projection","Static","selected","primary","primaryDuration","secondaryDuration","secondMin","secondMax","tsitem","dateformat","t0String","coverage","_i","_k","id","listitem","_f","group","itemId","WwRasterOverview","_j","queryAsync","WwpAttributeHtml","exporting","offlineexporting","KiChart","opt","cloneDeep","Chart","LinkedTo","_t","originHander","plotLines","p","vis","dur","past","start","TsData","plotline","transform","getTimestampFromDuration","ts_path","ts_name","KiTsGraph","KiLegend","absoluteCount","abscnt","mobile","ret","desc","grp","_opt","descr","flatten","op","_AddOn","UpdatingElement","KiBaseLayers","KiCatchmentInfo","parserWMTS","WMTSCapabilities","styleFontIconDefaults","styleDefaults","textStyleDefaultPoint","textStyleDefault","getTextStyle","textStyle","Text","getStyle","retStyle","stroke","fill","CircleStyle","getVectorTileLayer","VectorTileLayer","_style","VectorTileSource","MVT","attribution","getWTMSLayer","TileLayer","response","text","optionsFromCapabilities","tileLayer","attributions","WMTS","getWMSLayer","TileWMS","opacity","ImageWMS","getOSMLayer","OSM","getXYZLayer","XYZ","gridParams","TileGrid","getCustomLayer","urlTemplate","TileImage","tileCoord","_z","_r","getTileArcGISRestLayer","TileArcGISRest","getStaticImageLayer","ImageStatic","getImageArcGISRestLayer","ImageArcGISRest","getJsonLayer","vectorSource","VectorSource","FeatureParser","TopoJSON","GeoJSON","layer","VectorLayer","hoverStyle","haslinks","feature","xhr","features","feat","idProperty","styleProperty","highlightedStyle","labelProperty","_getLayer","args","bglayer","selectable","visible","getLayer","items","legendColor","KiLayerFactory","toggleValue","array","flag","conflictList","v","KiLayersControlElement","stopEvent","groupId","groupChecked","groupIntermediate","toggleGroup","checkbox","trees","tree","checkboxOrButtons","list","layerOptions","LayersControl","Control","map","unByKey","layerGroups","k","groupName","ls","values","getWithExpiry","setWithExpiry","viewFilter","KiLayersControl","_CanvasVectorLayerRenderer","CanvasVectorLayerRenderer","squaredTolerance","styles","builderGroup","optTransform","StationsLayer","legends","info","Feature","Point","LegendSwitcher","description","KiLegendControl","newVal","oldVal","isEqual","LocationControl","resolve","reject","pos","fromLonLat","KiLocationControl","PopupSwitcher","KiPopupControl","KiStationDownloadButton","StationDownloadLayer","KiStationDownloadControl","KiStationInfo","claz","stationMapOverviewLayer","div","se","_ovmap","VisibleMixin","Overview","inAndOut","Circle","KiStationMapOverviewControl","StationMapOverviewLayer","projections","MultiMousePosition","MousePosition","pixel","coordinate","decimals","select","MapPositionScaleLayer","ScaleLine","kiStationMapPositionScaleControl","RasterControl","kiStationMapRasterControl","KiStationMapZoomButton","StationMapControl","KiStationMapZoomControl","element","KiOlLayer","KiStationMap","View","Map","defaultControls","Attribution","readyEvent","evt","loadCacheZoom","size","popupelement","duration","padding","Popup","popup","showPopup","horizontal","vertical","layerAlias","closePopup","debounce","unsafeCSS","olcss","popupStyle","ovStyle","queryAssignedNodes","currentStationStyle","defaultMarkerStyle","StationsMarkerLayer","dynamicMarkerSize","resolution","valueToDisplay","contrastColor","hasRemark","attr","handleThreshold","config","isOutdated","outdatdedCfg","now","outdated","StationsChartLayer","colors","remarkAttribute","StationsTrendLayer","KiIconSwitcher","__publicField","MultiSelectionToggle","layers","mode","it","DragPan","Select","DragBox","always","selectedFeatures","selectionGeo","KiStationsLayer","customPosition","activePopup","selection","JsonLayer","KiJsonLayer","JSONLayer","catchment","hovering","OlVectorLayer","mapKeys","s0","s1","updateFn","PeriodsList","periodStr","m","unit","matched","returnOptions","returnCol","KiTimeRangePicker","lastPer","length","lastPeriod","input","range","ONE_DAY_MS","isPeriodLess24H","btn","column","_periodStart","_periodEnd","_firstCheck","_additionalCheck","nodesToSelect","fromOptions","selElem","instance","toOptions","datepicker","className","calendarToShow","calendarToHide","tabNode","tabsNode","fromTabNode","toTabNode","ignoreHistory","auxFrom","auxTo","columns","optFrom","optTo","fromTabs","toTabs","periodsList","isHidden","emitChange","button","KiTsListSelect","regx","concat","Parent","Selection","LazyRendering","KiTsViewerTable","KiTsViewer","mainTs","unzipWith","merge","WwpStationInfo","_skipSubst","_url","tmpret","count","templateResultList","anyValueFound","tr","first","_getNextItem","collection","stationId","findIndex","nextItem","_getPreviousItem","WwpStationDetail","router","mainRouteLength","newRoute","oldRoute","some","getSearchParamString","toReplace","getCurrentPath","favSta","prevItem","menu","menuItem","each","link","cond","module","layerName","bId","aId","filterList","dynMenuSubPaths","dynMenuItems","_flattenedList","initialSelection","mapInfo","downloadExcel","wb","XLSX","ws","WwpStationDownload","filename","mimeType","per","filehref","copyTextToClipboard","minDate","meanTs","maxTs","minTs","o","releaseStatusIndex","qualityCodeNameIndex","rows","row","releaseState","datems","dlfile","datafile","tsdata","mdList","mdfields","header","deUmlaut","csvResult","downloadFile","echarts.use","ToolboxComponent","TooltipComponent","TitleComponent","LegendComponent","GraphicComponent","DataZoomComponent","MarkLineComponent","LineChart","BarChart","ScatterChart","SVGRenderer","echarts.registerTheme","dark","KiEchart","echarts.init","echarts.dispose","isDark","widgetType","KiWidget","configServerUrl","rowType","elementType","uuid","saveLayout","layout","getExampleLayout","DragAreas","maxThreshold","minThreshold","renderElementContent","elementWidgetType","renderNewRowDropTarget","content","patchRow","rowArray","currentLength","patchedArray","firstElement","addNewExists","getFirstLayoutElement","elementArray","foundElement","KiDynamicLayout","draggedElementRow","draggedElementColumn","tempCurrentDraggedElement","currentRowType","targetDomElement","targetElementRow","targetElementColumn","targetElement","targetElementRowType","isFullRowTarget","targetColumn","tempElement","removeElements","dragArea","getAreaOfDrag","currentDragArea","elementRowType","oldLayout","rowIndex","columnIndex","WwDashboard","getSearchParam","uuidToLoad","getLayout","loaded","newLayout","newUuid","setSearchParam","WwPdfReports","subpath","WwDocuments","baseDir","pdf","WwpHdoeStart","__body","__html","ifrm","zoom","resize","copy","wwHdoeHydrochar","folder","month","yearDocs","monthDocs","chr","wwAppIndex","initConfig","init"],"sources":["../../../../libs/wiski-web/src/views/ww-report/ww-report.ts","../../../../common/src/locales/index.ts","../../../../common/src/components/ww-sample-component.ts","../../src/import-actions/import-actions.ts","../../../../libs/wcp-water/src/locales/index.ts","../../src/components/ki-station-info-hdoe.ts","../../src/components/wwp-station-download-hdoe.ts","../../src/components/wwp-hdoe-kennzahlen.ts","../../src/components/wwp-hdoe-querprofil.ts","../../src/components/wwp-hdoe-hochwasserbericht.ts","../../src/components/wwp-hdoe-bericht-wasserstand.ts","../../../../libs/wiski-web/src/views/wwp-html/wwp-html.ts","../../../../libs/wcp-water/src/components/ki-station-map/FontIcon.ts","../../../../libs/wcp-water/src/components/ki-station-map/LegendFactory.ts","../../../../libs/wcp-water/src/components/ki-station-map/Classifier.ts","../../../../libs/wcp-water/src/components/ki-status-icon/ki-status-icon.ts","../../../../libs/wcp-water/src/common/base.ts","../../../../libs/wiski-web/src/views/wwp-overview/wwp-overview.css.js?used","../../../../libs/wiski-web/src/common/maputils.ts","../../../../libs/wiski-web/src/components/ki-responsive-table/ListMode.ts","../../../../libs/wiski-web/src/components/ki-responsive-table/ki-responsive-table.ts","../../../../libs/wiski-web/src/components/ki-wcp-wwp-filter/ki-wcp-wwp-filter.ts","../../../../libs/wiski-web/src/components/common/ww-map-popup.ts","../../../../libs/wiski-web/src/components/common/ww-map-popup-base.ts","../../../../libs/wiski-web/src/components/common/ww-map-popup-auto.ts","../../../../libs/wiski-web/src/components/common/ww-map-popup-precip.ts","../../../../libs/wcp-water/src/api/kiwis.ts","../../../../libs/wcp-water/src/api/KiwisHelper.ts","../../../../libs/wiski-web/src/components/common/ww-graph-wrapper.ts","../../../../libs/wiski-web/src/components/common/ww-map-popup-dynamic.ts","../../../../libs/wiski-web/src/components/ki-wwp-graph/ki-wwp-sparkline.ts","../../../../libs/wiski-web/src/views/wwp-overview/wwp-overview.ts","../../../../libs/wcp-base/src/components/ki-progress-bar/ki-progress-bar.ts","../../../../libs/wcp-base/src/components/ki-progress-bar/ki-progress-bar-legend.ts","../../../../libs/wcp-base/src/components/ki-progress-bar/ki-player-speed-chooser.ts","../../../../libs/wcp-base/src/components/ki-progress-bar/ki-player.ts","../../../../libs/wiski-web/src/components/ki-wwp-raster/ww-raster-legend.ts","../../../../libs/wiski-web/src/components/ki-wwp-raster/ww-raster-player.ts","../../../../libs/wiski-web/src/views/wwp-overview/ww-raster-overview.ts","../../../../libs/wiski-web/src/views/wwp-station-detail/wwp-attribute-html.ts","../../../../libs/wcp-water/src/components/ki-chart/ki-chart.ts","../../../../libs/wcp-water/src/components/ki-chart/LinkedTo.ts","../../../../libs/wcp-water/src/common/ts-utils.ts","../../../../libs/wcp-water/src/components/ki-chart/TsData.ts","../../../../libs/wcp-water/src/components/ki-chart/ki-ts-graph.ts","../../../../libs/wcp-water/src/components/ki-legend/ki-legend.ts","../../../../libs/wcp-water/src/components/ki-station-map/_AddOn.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-base-layers.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-catchment-info.ts","../../../../libs/wcp-water/src/common/ki-ol-layer-generator.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-layer-factory.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-layers-control-element.css.js?used","../../../../libs/wcp-water/src/components/ki-station-map/ki-layers-control-element.ts","../../../../libs/wcp-water/src/components/ki-station-map/LayersControl.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-layers-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationsLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/LegendSwitcher.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-legends-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/LocationControl.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-location-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/PopupSwitcher.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-popup-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map.css.js?used","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-download-button.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationDownloadLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-download-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-info.ts","../../../../libs/wcp-water/src/components/ki-station-map/VisibleMixin.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationMapOverviewLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map-overview-control.ts","../../../../libs/wcp-water/src/common/projections.ts","../../../../libs/wcp-water/src/components/ki-station-map/MultiMousePosition.ts","../../../../libs/wcp-water/src/components/ki-station-map/MapPositionScaleLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map-position-scale-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/RasterControl.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map-raster-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map-zoom-button.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationMapControl.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map-zoom-control.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-ol-layer.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-station-map.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationsMarkerLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationsChartLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/StationsTrendLayer.ts","../../../../libs/wcp-base/src/components/ki-switcher/ki-icon-switcher.js","../../../../libs/wcp-water/src/components/ki-station-map/MultiSelectionToggle.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-stations-layer.ts","../../../../libs/wcp-water/src/components/ki-station-map/JSONLayer.ts","../../../../libs/wcp-water/src/components/ki-station-map/ki-json-layer.ts","../../../../libs/wcp-water/src/components/ki-station-map/ol-vector-layer.ts","../../../../libs/wcp-water/src/components/ki-time-range-picker/ki-time-range-picker.css.js?used","../../../../libs/wcp-water/src/components/ki-time-range-picker/PeriodsList.ts","../../../../libs/wcp-water/src/components/ki-time-range-picker/ki-time-range-picker.ts","../../../../libs/wcp-water/src/components/ki-ts-viewer/ki-ts-list-select.ts","../../../../libs/wcp-water/src/components/ki-ts-viewer/ki-ts-viewer-table.ts","../../../../libs/wcp-water/src/components/ki-ts-viewer/ki-ts-viewer.css.js?used","../../../../libs/wcp-water/src/components/ki-ts-viewer/ki-ts-viewer.ts","../../../../libs/wiski-web/src/views/wwp-station-detail/wwp-station-detail.css.js?used","../../../../libs/wiski-web/src/views/wwp-station-detail/wwp-station-info.ts","../../../../libs/wiski-web/src/views/wwp-station-detail/wwp-station-detail.ts","../../../../libs/wiski-web/src/common/download.ts","../../../../libs/wiski-web/src/views/wwp-station-detail/wwp-station-download.ts","../../../../libs/wcp-base/src/components/ki-echart/ki-echart.ts","../../../../libs/wiski-web/src/components/ki-widget/ki-widget.ts","../../../../libs/wiski-web/src/components/ki-dynamic-layout/service/layout-service.ts","../../../../libs/wiski-web/src/components/ki-dynamic-layout/service/layout-helper.ts","../../../../libs/wiski-web/src/components/ki-dynamic-layout/ki-dynamic-layout.ts","../../../../libs/wiski-web/src/views/ww-dashboard/ww-dashboard.ts","../../../../libs/wiski-web/src/views/ww-report/ww-pdf-reports.ts","../../../../libs/wiski-web/src/views/ww-report/ww-documents.ts","../../src/components/wwp-hdoe-start.css.js?used","../../src/components/wwp-hdoe-start.ts","../../src/components/ww-hdoe-hydrochar.ts","../../src/index.ts"],"sourcesContent":["import { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { Mix } from '@kisters/wcp-base/common';\nimport { queryParamMixin } from '@kisters/wcp-base/decorators';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport '@ui5/webcomponents/dist/Select';\nimport '@ui5/webcomponents/dist/Option';\nimport { customElement } from 'lit/decorators.js';\nimport { filter, last, orderBy } from 'lodash-es';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\n\n@customElement('ww-report')\nexport default class WwReport extends Mix(LitElement, [\n queryParamMixin,\n { targetProperty: 'selected', selector: 'selected', defaultValue: '' },\n]) {\n // language=css\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n height: calc(100% - 30px);\n }\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n .left-panel {\n text-align: center;\n flex: 0;\n }\n .right-panel {\n flex: 1;\n }\n\n ui5-select {\n width: 350px;\n }\n\n a {\n font-size: 2em;\n text-align: center;\n display: block;\n margin-top: 20%;\n }\n `;\n\n constructor() {\n super();\n this.api = getCurrentApi();\n this.data = [];\n }\n\n static get properties() {\n return {\n data: { type: Array },\n };\n }\n\n _selected = '';\n\n get selected() {\n return this._selected;\n }\n\n set selected(value) {\n this._selected = value;\n this.requestUpdate();\n }\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['content']);\n this.content = params.content;\n // Usually \"documents\" or \"reports\"\n this.directory = params.options?.directory || 'documents';\n\n this.fetchData();\n }\n\n // Fetch report\n async fetchData() {\n const res = await this.api._requestJson(\n `/${this.directory}/index.json`,\n undefined,\n true,\n );\n\n // Filter reports; only allow visible PDF\n this.data = orderBy(\n filter(res._links, d => {\n if (\n d.mime_type === 'application/pdf' &&\n d.id === this.content &&\n d.visible\n ) {\n const pathArray = d.href.split('/');\n d.date = pathArray[pathArray.length - 2];\n d.filename = last(pathArray);\n d.label = dayjs(d.date, 'YYYYMMDDHHmm').format('L LT'); // `${d.filename} (${d.date})`;\n return true;\n }\n return false;\n }),\n 'date',\n 'desc',\n ); // Newest file on first position\n this.requestUpdate();\n }\n\n updated() {\n // eslint-disable-next-line no-unused-expressions\n this.data?.length > 0 &&\n this._handleChanged({\n target: {\n selectedOption: { value: this.data[0].date },\n },\n });\n }\n\n getUrl(file) {\n return `${this.api.dataPath}/${this.directory}/${this.content}/${file}`;\n }\n\n _handleChanged(e) {\n // http://localhost:3000/data/internet/reports/daily-flood-guidance/202203111336/report.pdf\n // http://localhost:3000/data/internet/reports/daily-flood-guidance/202203171340/report.pdf\n // http://localhost:3000/data/internet/reports/flood-alert/202203111336/report.pdf\n const pdfurl = `${this.api.dataPath}/${this.directory}/${this.content}/${e.target.selectedOption.value}/report.pdf`;\n this.renderRoot.querySelector(\n '#contentframe',\n ).src = `./pdfjs/web/viewer.html?file=${\n new URL(pdfurl, window.location.origin).href\n }`;\n }\n\n render() {\n // language=html\n return this.data\n ? html`\n
\n \n ${this.data.map(\n item =>\n html`${item.label.replace('.pdf', '')}`,\n )}\n \n
\n
\n \n
\n `\n : html`
Loading...
`;\n }\n}\n","import deCustomer from './de/customer.json';\n\nexport default {\n de: {\n customer: deCustomer,\n },\n};\n","import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n// eslint-disable-next-line import/extensions\nimport { property } from 'lit/decorators/property.js';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport { Mix } from '@kisters/wcp-base/common';\nimport nls from '../locales/index';\n\n@customElement('ww-sample-component')\nexport default class WwSampleComponent extends Mix(LitElement, [\n i18nMixin,\n { nls },\n]) {\n // language=CSS\n static styles = css`\n :host {\n overflow: auto;\n display: flex;\n flex-wrap: wrap;\n }\n `;\n\n firstUpdated() {\n this.api = getCurrentApi();\n this.fetchData();\n }\n\n @property({ type: String })\n content = 'Some random content';\n\n @property({ type: Object })\n api = getCurrentApi();\n\n render() {\n return html``;\n }\n\n // eslint-disable-next-line class-methods-use-this, no-empty-function\n async fetchData() {}\n}\n","// Shared modules: @kisters/${name}-common/\n// App specific module: ../\n\nexport default [\n {\n component: 'ww-app',\n importAction: async () => {\n await import('../app/ww-app');\n },\n },\n];\n","import deCommon from './de/common.json';\nimport deKiwis from './de/kiwis.json';\nimport enCommon from './en/common.json';\nimport enKiwis from './en/kiwis.json';\nimport frCommon from './fr/common.json';\nimport frKiwis from './fr/kiwis.json';\nimport zhCommon from './zh/common.json';\n\nexport default {\n de: {\n common: deCommon,\n kiwis: deKiwis,\n },\n en: {\n common: enCommon,\n kiwis: enKiwis,\n },\n fr: {\n common: frCommon,\n kiwis: frKiwis,\n },\n zh: {\n common: zhCommon,\n },\n};\n","import { css, html, LitElement } from 'lit';\nimport { i18n } from '@kisters/wcp-base/decorators';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport '@kisters/wiski-web/components/ki-wwp-graph/ki-wwp-graph-precip';\n\nimport nls from '@kisters/wcp-water/locales';\n\nconst waterlevelCfg = {\n miniGraph: true,\n showUntilEndOfDay: false,\n imageShare: 'extralarge_ltv_week.png',\n parameter_label: 'Wasserstand',\n // eslint-disable-next-line no-template-curly-in-string\n graphTitle: '${station_name} / ${river_name} (Wasserstand)',\n station_parameter: 'S',\n yAxisMinRange: 100,\n yAxisMin: 'w_graph_min',\n yAxisMax: 'w_graph_max',\n progTs: 'web_prognose_ts_new',\n progDuration: 'web_prognose_duration',\n \"forcePeriodRange\": false,\n trendAb: 'web_prognose_trendab',\n additionalTsFiles: ['S/events.json', 'S/forecast.json'],\n credits: {\n text: 'Ungeprüfte Rohdaten
© Amt der OÖ Landesregierung',\n position: {\n x: -10,\n y: -35,\n },\n positionMobile: {\n x: -10,\n y: -15,\n },\n style: {\n fontSize: '10px',\n },\n href: 'https://www.land-oberoesterreich.gv.at/',\n },\n ranges: [\n {\n label: 'Woche',\n value: 'P7D',\n data: 'S/week.json',\n showforcast: true,\n yAxisLabel: 'Wasserstand in cm',\n timeseries: [\n {\n ts_shortname: '15m.Cmd.RelAbs.EXP',\n options: {\n type: 'area',\n fillOpacity: 0.5,\n name: 'Wasserstand',\n },\n },\n ],\n selected: true,\n },\n ],\n forecast: 'S/forecast.json',\n alarms: {\n file: ['S/alm.json', 'S/ltv.json'],\n items: [\n {\n label: 'Alarmstufen',\n tsList: ['Cmd.Voralarm', 'Cmd.Alarm1', 'Cmd.Alarm2', 'Cmd.Alarm3'],\n active: 'Wasserstand-Alarmpegel',\n },\n {\n label: 'Alle Kennzahlen',\n tsList: [\n 'Cmd.HW2',\n 'Cmd.HW5',\n 'Cmd.HW10',\n 'Cmd.HW30',\n 'Cmd.HW100',\n 'Cmd.NW',\n ],\n active: false,\n },\n {\n label: 'MW',\n tsList: ['Cmd.MW'],\n active: true,\n },\n {\n label: 'HW1',\n tsList: ['Cmd.HW1'],\n active: true,\n },\n ],\n },\n events: 'S/events.json',\n threshholdMappings: {\n 'Cmd.Alarm1': {\n width: 2,\n color: 'rgb(255, 165, 0)',\n dashStyle: 'dash',\n label: {\n text: 'Alarmstufe 1',\n align: 'left',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Alarm2': {\n width: 2,\n color: 'rgb(128, 0, 128)',\n dashStyle: 'dash',\n label: {\n text: 'Alarmstufe 2',\n align: 'left',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Alarm3': {\n width: 2,\n color: 'rgba(252, 81, 47, 1)',\n dashStyle: 'dash',\n label: {\n text: 'Alarmstufe 3',\n align: 'left',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Voralarm': {\n width: 2,\n color: 'rgba(255, 255, 0, 1)',\n dashStyle: 'dash',\n label: {\n text: 'Voralarm',\n align: 'left',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.MW': {\n width: 2,\n color: '#AAC8FF',\n dashStyle: 'dash',\n label: {\n text: 'MW',\n description: 'Mittelwasser',\n },\n },\n 'Cmd.NW': {\n width: 2,\n dashStyle: 'dash',\n label: {\n text: 'NW',\n description: 'Niederwasser',\n },\n },\n 'Cmd.HW1': {\n width: 2,\n color: '#0000FF',\n dashStyle: 'dash',\n label: {\n text: 'HW1',\n description: '1-jährliche Hochwasser',\n },\n },\n 'Cmd.HW2': {\n width: 2,\n dashStyle: 'dash',\n label: {\n text: 'HW2',\n description: '2-jährliche Hochwasser',\n },\n },\n 'Cmd.HW5': {\n width: 2,\n dashStyle: 'dash',\n label: {\n text: 'HW5',\n description: '5-jährliche Hochwasser',\n },\n },\n 'Cmd.HW10': {\n width: 2,\n dashStyle: 'dash',\n label: {\n text: 'HW10',\n description: '10-jährliche Hochwasser',\n },\n },\n 'Cmd.HW30': {\n width: 2,\n dashStyle: 'dash',\n label: {\n text: 'HW30',\n description: '30-jährliche Hochwasser',\n },\n },\n 'Cmd.HW100': {\n width: 2,\n dashStyle: 'dash',\n label: {\n text: 'HW100',\n description: '100-jährliche Hochwasser',\n },\n },\n },\n};\n\nconst watertempCfg = {\n miniGraph: true,\n showUntilEndOfDay: false,\n imageShare: 'extralarge_wt_week.png',\n yAxisLabel: 'Wassertemperatur in °C',\n // eslint-disable-next-line no-template-curly-in-string\n graphTitle: '${station_name} / ${river_name} (Wassertemperatur)',\n tableOpen: false,\n parameter_label: 'Wassertemperatur',\n station_parameter: 'WT',\n \"forcePeriodRange\": false,\n numberFormat: {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n credits: {\n text: 'Ungeprüfte Rohdaten
© Amt der OÖ Landesregierung',\n position: {\n x: -10,\n y: -35,\n },\n style: {\n fontSize: '10px',\n },\n href: 'https://www.land-oberoesterreich.gv.at/',\n },\n yAxisMinRange: 8,\n ranges: [\n {\n label: 'Woche',\n value: 'P7D',\n data: 'WT/week.json',\n selected: true,\n yAxisLabel: 'Wassertemperatur in °C',\n timeseries: [\n {\n ts_shortname: '15m.Cmd.EXP',\n options: {\n tooltip: {\n valueDecimals: 1,\n },\n name: 'Wassertemperatur',\n color: 'red',\n },\n },\n ],\n },\n ],\n};\n\nconst lufttempCfg = {\n miniGraph: true,\n showUntilEndOfDay: false,\n yAxisLabel: 'Lufttemperatur in °C',\n // eslint-disable-next-line no-template-curly-in-string\n graphTitle: '${station_name} (Lufttemperatur)',\n tableOpen: false,\n parameter_label: 'Lufttemperatur',\n station_parameter: 'AT',\n yAxisMinRange: 8,\n \"forcePeriodRange\": false,\n numberFormat: {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n credits: {\n text: 'Ungeprüfte Rohdaten
© Amt der OÖ Landesregierung',\n position: {\n x: -10,\n y: -35,\n },\n style: {\n fontSize: '10px',\n },\n href: 'https://www.land-oberoesterreich.gv.at/',\n },\n ranges: [\n {\n label: 'Woche',\n value: 'P7D',\n data: 'AT/week.json',\n selected: true,\n yAxisLabel: 'Lufttemperatur in °C',\n timeseries: [\n {\n ts_shortname: 'Cmd.P.DEF',\n options: {\n color: 'rgba(203,29,47)',\n tooltip: {\n valueDecimals: 1,\n },\n name: 'Lufttemperatur',\n },\n },\n ],\n },\n ],\n};\n\nconst niederschlagCfg = {\n miniGraph: true,\n showUntilEndOfDay: false,\n filterAccuracy: 66,\n // eslint-disable-next-line no-template-curly-in-string\n graphTitle: '${station_name} (Niederschlag)',\n tableOpen: false,\n yAxisLabelSum: 'Summenlinie in mm',\n parameter_label: 'Niederschlag',\n station_parameter: 'Precip',\n chartType: 'column',\n credits: {\n text: 'Ungeprüfte Rohdaten
© Amt der OÖ Landesregierung',\n position: {\n x: -10,\n y: -35,\n },\n style: {\n fontSize: '10px',\n },\n href: 'https://www.land-oberoesterreich.gv.at/',\n },\n numberFormat: {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n yAxisMinRange: 5,\n ranges: [\n {\n label: '48 Stunden',\n value: 'P2D',\n data: 'week.json',\n selected: true,\n yAxisLabel: 'Niederschlag in mm pro 30 Minuten',\n },\n {\n label: '2 Wochen',\n value: 'P14D',\n data: 'year.json',\n yAxisLabel: 'Niederschlag in mm pro Tag',\n dateFormat: \"'%d.%m.%Y\",\n dateFormatTable: 'L',\n },\n ],\n};\n\nconst grundwasserCfg = {\n \"miniGraph\": true,\n \"forcePeriodRange\": false,\n \"showUntilEndOfDay\" : false,\n \"zoomType\": null,\n \"favButton\": true,\n \"imageShare\": \"extralarge_gws_month.png\",\n \"tableOpen\": true,\n \"parameter_label\": \"Grundwasserstand\",\n // eslint-disable-next-line no-template-curly-in-string\n \"graphTitle\": \"${station_name} (Grundwasserstand)\",\n \"station_parameter\": \"GWLVL\",\n \"yAxisLabel\": \"Grundwasserstand in m ü.A.\",\n \n \"qCodeExclude\":[250],\n \"credits\": {\n \"text\": \"Ungeprüfte Rohdaten
© Amt der OÖ Landesregierung\",\n \"position\": {\n \"x\": -10,\n \"y\": -35\n },\n \"positionMobile\": {\n \"x\": -10,\n \"y\": -15\n },\n \"style\": {\n \"fontSize\": \"10px\"\n },\n \"href\": \"https://www.land-oberoesterreich.gv.at/\"\n },\n \"ranges\": [\n {\n \"selected\": true,\n \"label\": \"Monat\",\n \"value\": \"P1M\",\n \"data\": \"GWLVL/week.json\",\n \"tableTemplate\": [\"h.Cmd.GWS.Web\"],\n \"timeseries\": [\n {\n \"ts_shortname\": \"h.Cmd.GWS.Web\",\n \"options\": {\n \"tooltip\": {\n \"valueSuffix\": \" m ü.A.\"\n },\n \"name\": \"Grundwasserstand\"\n }\n },\n {\n \"ts_shortname\": \"Cmd.LTV.DMean\",\n \"options\": {\n \"tooltip\": {\n \"valueSuffix\": \" m ü.A.\",\n \"xDateFormat\": \"%d.%m.%Y\"\n },\n \"opacity\": \"0.3\",\n \"name\": \"langjähr. Mittel\"\n }\n },\n {\n \"ts_shortname_min\": \"Cmd.LTV.DMin\",\n \"ts_shortname_max\": \"Cmd.LTV.DMax\",\n \"options\": {\n \"lineColor\": \"rgba(255,255,255,0)\",\n \"tooltip\": {\n \"valueSuffix\": \" m ü.A.\",\n \"xDateFormat\": \"%d.%m.%Y\"\n },\n \"name\": \"langjähr. Minimum - Maximum\"\n }\n }\n ]\n }\n ],\n \"alarms\": {\n \"file\": [\"GWLVL/ltv.json\"],\n \"items\": [\n {\n \"label\": \"Kennzahlen\",\n \"tsList\": [\"Cmd.HGW\", \"Cmd.MGW\", \"Cmd.NGW\"],\n \"active\": true\n }\n ]\n },\n \"threshholdMappings\": {\n \"Cmd.HGW\": {\n \"width\": 2,\n \"color\": \"rgb(0, 0, 255)\",\n \"label\": {\n \"text\": \"HGW\",\n \"description\": \"Hoher Grundwasserstand\",\n \"align\": \"right\",\n \"y\": 12,\n \"x\": -5\n }\n },\n \"Cmd.MGW\": {\n \"width\": 2,\n \"color\": \"rgb(0, 136, 0)\",\n \"label\": {\n \"text\": \"MGW\",\n \"description\": \"Mittlerer Grundwasserstand\",\n \"align\": \"right\",\n \"y\": 12,\n \"x\": -5\n }\n },\n \"Cmd.NGW\": {\n \"width\": 2,\n \"color\": \"rgba(255, 136, 68, 1)\",\n \"label\": {\n \"text\": \"NGW\",\n \"description\": \"Niedriger Grundwasserstand\",\n \"align\": \"right\",\n \"y\": 12,\n \"x\": -5\n }\n }\n }\n }\n\n\n@i18n(nls)\nexport default class KiStationInfoHdoe extends LitElement {\n static styles = css`\n :host {\n display: block;\n }\n .station-name {\n padding-right: 5px;\n padding-left: 10px;\n padding-top: 10px;\n font-size: 1.2em;\n }\n\n hr {\n margin: 5px 0;\n }\n .table {\n display: table;\n line-height: 1.5em;\n }\n .row {\n display: table-row;\n }\n .cell {\n display: table-cell;\n padding: 0 10px;\n min-width: 50px;\n color: gray;\n }\n .label {\n color: #4a4a49;\n }\n\n ki-wwp-graph,\n ki-wwp-graph-precip,\n .graph {\n height: 240px;\n width: 400px;\n }\n `;\n\n static get properties() {\n return {\n stations: { type: Array }, // can be one or more stations\n };\n }\n\n constructor() {\n super();\n this.stations = [];\n this.api = getCurrentApi();\n this.formatter = new Intl.NumberFormat('de', {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n });\n }\n\n valFormatter(val) {\n return val === 0 ? val : this.formatter.format(val);\n }\n\n _stationTmpl(station) {\n let graphComp = html`
`;\n const parameter = station.stationparameter_name;\n let title = `${station.station_name} / ${station.river_name} (${station.stationparameter_name})`;\n\n if (parameter === 'Wasserstand') {\n this.formatter = new Intl.NumberFormat('de', {\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n });\n graphComp = html``;\n } else if (parameter === 'Wassertemperatur') {\n graphComp = html``;\n } else if (parameter === 'Niederschlag') {\n graphComp = html``;\n\n title = `${station.station_name} (${station.stationparameter_name})`;\n } else if (parameter === 'Lufttemperatur') {\n graphComp = html``;\n title = `${station.station_name} (${station.stationparameter_name})`;\n } else if (parameter === 'GWS') {\n station.ts_unitsymbol = 'm ü.A.';\n graphComp = html``;\n\n title = `${station.station_name} (Grundwasserstand)`;\n }\n\n return html`
${title}
\n
\n
\n
\n
${this.i18n.t(parameter)}
\n
\n ${station.ts_value != null\n ? `${this.valFormatter(station.ts_value)} ${\n station.ts_unitsymbol\n }`\n : '-'}\n
\n
\n
\n
${this.i18n.t('last_measure')}
\n
\n ${(station.timestamp && dayjs(station.timestamp).format('L LT')) ||\n '-'}\n
\n
\n
\n
${graphComp}
\n
`;\n }\n\n render() {\n return this.stations\n ? html`${this._stationTmpl(this.stations[0])}`\n : html`
`;\n }\n}\n\ncustomElements.define('ki-station-info-hdoe', KiStationInfoHdoe);\n","import { css, html, LitElement } from 'lit';\n\nimport { customElement } from 'lit/decorators.js';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { lastIndexOf } from 'lodash-es';\n\n@customElement('wwp-station-download-hdoe')\nexport default class WwpStationDownloadHdoe extends LitElement {\n static styles = css`\n .content {\n margin-top: 30px;\n }\n .row {\n display: table-row;\n line-height: 2em;\n }\n .cell {\n display: table-cell;\n padding: 0 20px;\n }\n .label,\n ki-icon {\n color: gray;\n padding-left: 30px;\n }\n .descr {\n padding: 30px;\n }\n `;\n\n constructor() {\n super();\n this.api = getCurrentApi();\n }\n\n static get properties() {\n return {};\n }\n\n get groups() {\n return this.station.downloads;\n }\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['stationId']);\n this.station = await this.api.getStation(params.stationId);\n Object.assign(this, params.options);\n this.requestUpdate();\n }\n\n getParameter(param) {\n return this.parameterMapping[param] || param;\n }\n\n // eslint-disable-next-line class-methods-use-this\n getPeriod(period) {\n switch (period) {\n case '7D':\n return 'Woche';\n case '1M':\n return 'Monat';\n case '1Y':\n return 'Jahr';\n default:\n return dayjs.duration(`P${period}`).humanize();\n }\n }\n\n render() {\n return this.station\n ? html`
\n \n ${this.descr}\n
\n ${this.groups.map(\n field => html`
\n
\n ${this.getParameter(field.station_parameter)}\n
\n
\n ${this.getPeriod(field.period_alias)}\n
\n
\n \n
\n
`,\n )}\n
\n ${this.moreDownloadsText}\n hier\n
\n `\n : html`
lade...
`;\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { responsiveMixin } from '@kisters/wcp-base/decorators';\nimport { last, orderBy } from 'lodash-es';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { Mix } from '@kisters/wcp-base/common';\n\nexport default class wwpHdoeKennzahlen extends Mix(\n LitElement,\n responsiveMixin,\n) {\n // language=CSS\n static styles = css`\n :host {\n display: block;\n }\n\n #box {\n margin: 20px;\n }\n\n h2 {\n color: black;\n }\n\n :host(.sm-screen) h2 {\n margin-left: 50px;\n margin-top: 15px;\n }\n\n .kennzahlen-table {\n margin: 10px 0;\n width: 300px;\n }\n\n .hidden {\n display: none;\n }\n\n table,\n th,\n td {\n border: 2px solid #e8e8ea;\n border-collapse: collapse;\n }\n\n th {\n text-align: center;\n }\n\n td {\n width: 50%;\n padding: 5px;\n }\n\n .rawdata {\n font-family: monospace;\n }\n `;\n\n constructor() {\n super();\n this.content = 'Kennzahlen';\n this.alarmstufen = [];\n this.ereignisse = [];\n this.kennzahlen = [];\n this.alarmstufen_data = [];\n this.ereignisse_data = [];\n this.kennzahlen_data = [];\n this.api = getCurrentApi();\n }\n\n static get properties() {\n return {\n content: { type: String },\n };\n }\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['stationId']);\n this.station = await this.api.getStation(params.stationId);\n Object.assign(this, params.options);\n this.fetchData();\n }\n\n render() {\n // Create data views\n this.alarmstufen_data &&\n orderBy(this.alarmstufen_data, 'ts_name').forEach(i => {\n this.alarmstufen.push(html``);\n this.alarmstufen.push(html`${i.ts_name.split('-')[1]}`);\n if (i.rows > 0) {\n this.alarmstufen.push(\n html`\n ${`${i.data[0][1].toString()} ${\n i.web_unit_gws || i.ts_unitsymbol\n }`}\n `,\n );\n } else {\n this.alarmstufen.push(html``);\n }\n this.alarmstufen.push(html``);\n });\n\n this.ereignisse_data &&\n this.ereignisse_data[0]?.data.forEach(i => {\n this.ereignisse.push(html``);\n this.ereignisse.push(html`${dayjs(i[0]).format('L')}`);\n this.ereignisse.push(\n html`\n ${`${i[1].toString()} ${\n this.ereignisse_data[0].web_unit_gws ||\n this.ereignisse_data[0].ts_unitsymbol\n }`}\n `,\n );\n this.ereignisse.push(html``);\n });\n\n this.kennzahlen_data &&\n orderBy(this.kennzahlen_data, 'ts_name').forEach(i => {\n this.kennzahlen.push(html``);\n this.kennzahlen.push(html`${i.ts_name.split('-')[1]}`);\n if (i.rows > 0) {\n this.kennzahlen.push(\n html`\n ${`${i.data[0][1].toString()} ${\n i.web_unit_gws || i.ts_unitsymbol\n }`}\n `,\n );\n } else {\n this.kennzahlen.push(html``);\n }\n this.kennzahlen.push(html``);\n });\n\n return html`
\n

${this.content}

\n
${this?.station?.web_kennzahlen_anmerkung}
\n
\n \n \n \n \n \n ${this.alarmstufen}\n
Alarmstufen
\n
\n \n \n \n \n \n ${this.ereignisse}\n
Ereignisse
\n
\n \n \n \n \n \n ${this.kennzahlen}\n
Kennzahlen
\n \n \n
\n

\n Weitere Informationen zu den Kennzahlen finden Sie in den zugehörigen\n Erklärungen.\n

\n
\n `;\n }\n\n async fetchData() {\n const _files = {};\n await Promise.all(\n this.station.timeseries\n .filter(ts => ts.station_parameter === this.station_parameter)\n .map(async ts => {\n const fileName = last(ts.href.split('/'));\n if (this.files.includes(fileName)) {\n _files[fileName] = await this.api.getTsData(ts.href);\n }\n }),\n );\n\n this.alarmstufen_data = _files['alm.json'];\n this.ereignisse_data = _files['events.json'];\n this.kennzahlen_data = _files['ltv.json'];\n this.requestUpdate();\n // console.log(JSON.stringify(this.alarmstufen))\n // console.log(JSON.stringify(this.ereignisse_data))\n // console.log(JSON.stringify(this.kennzahlen))\n }\n}\n\ncustomElements.define('wwp-hdoe-kennzahlen', wwpHdoeKennzahlen);\n","import { css, html, LitElement } from 'lit';\n\nimport { property } from 'lit/decorators.js';\nimport { last, sortBy } from 'lodash-es';\nimport Highcharts from 'highcharts';\nimport serieslabel from 'highcharts/modules/series-label';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\n\nserieslabel(Highcharts);\n\nexport default class wwpHdoeQuerprofil extends LitElement {\n // language=CSS\n static styles = css`\n :host {\n height: 100%;\n overflow-y: auto;\n width: 100%;\n display: flex;\n }\n #chart-node {\n display: table-cell;\n position: absolute;\n width: 100%;\n height: 100%;\n }\n\n #chart-wrapper {\n display: table-cell;\n position: relative;\n flex: 1;\n }\n `;\n\n api = getCurrentApi();\n\n @property({ attribute: false }) highcharts = Highcharts;\n\n static get properties() {\n return {\n content: { type: String },\n alarmstufen_data: { type: Object, attribute: false },\n ereignisse_data: { type: Object, attribute: false },\n kennzahlen_data: { type: Object, attribute: false },\n querprofil_data: { type: Object, attribute: false },\n week_data: { type: Object, attribute: false },\n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.numberFormatter = new Intl.NumberFormat('de', this.numberFormat || {});\n\n window.addEventListener('resize', () =>\n setTimeout(() => {\n this.chart && this.chart.reflow();\n }, 2200),\n );\n }\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['stationId']);\n this.station = await this.api.getStation(params.stationId);\n Object.assign(this, params.options);\n this.fetchData();\n }\n\n createChart() {\n this.chart = this.highcharts.chart(\n this.renderRoot.querySelector('#chart-node'),\n this.chartOptions(),\n this.chartCreated.bind(this),\n );\n }\n\n _formatNumber(val) {\n return val === undefined || val === null || val === '' || Number.isNaN(val)\n ? ''\n : this.numberFormatter.format(val);\n }\n\n // eslint-disable-next-line class-methods-use-this\n chartOptions() {\n const self = this;\n return {\n credits: {\n enabled: false,\n },\n plotOptions: {\n series: {\n label: {\n enabled: true,\n },\n states: {\n inactive: {\n opacity: 1,\n },\n },\n },\n },\n title: {\n text: 'Querschnittdarstellung',\n },\n tooltip: {\n enabled: true,\n valueSuffix: ' m',\n headerFormat: 'Abstand {point.key} m
',\n valueDecimals: 1,\n },\n yAxis: {\n title: {\n text: 'Höhe in m',\n },\n },\n legend: {\n title: {\n text: 'Legende zum EIN/AUSKLICKEN',\n },\n },\n xAxis: {\n title: {\n text: 'Abstand in m',\n },\n labels: {\n formatter() {\n return `${self._formatNumber(this.value)}`;\n },\n },\n },\n };\n }\n\n addNewLineToChart(name, data, color, z, show) {\n const new_series = {};\n new_series.type = 'line';\n new_series.id = name;\n new_series.name = name;\n\n new_series.color = color;\n new_series.showInLegend = show;\n new_series.visible =\n name === ' HW30' || name === ' HW1' || name === 'aktueller Wasserstand';\n\n new_series.data = data;\n new_series.zIndex = z + 50;\n\n // Do not show data points\n new_series.marker = {\n enabled: false,\n states: { hover: { enabled: false }, inactive: { opacity: 1 } },\n };\n // new_series.states = {\"hover\": {\"enabled\": false, \"opacity\": 1}};\n\n this.chart.addSeries(new_series);\n }\n\n addNewAreaToChart(name, data, color, z) {\n const new_series = {};\n new_series.type = 'area';\n new_series.id = name;\n new_series.name = name;\n new_series.label = {\n enabled: false,\n };\n\n if (Array.isArray(data)) new_series.data = data;\n else {\n // Span line over whole chart\n const x_max = last(this.chart.series[0].data).x;\n\n const level_data = [];\n level_data.push({ x: 0, y: data });\n level_data.push({ x: x_max, y: data });\n new_series.data = level_data;\n }\n new_series.color = color;\n new_series.fillColor = color;\n new_series.zIndex = z;\n new_series.threshold = null;\n\n // Do not show data points\n new_series.marker = {\n enabled: false,\n states: { hover: { enabled: false }, inactive: { opacity: 1 } },\n };\n // new_series.states = {\"hover\": {\"enabled\": false, \"opacity\": 1}};\n\n this.chart.addSeries(new_series);\n }\n\n chartCreated(chart) {\n const e = new CustomEvent('load', {\n detail: chart,\n });\n this.dispatchEvent(e);\n }\n\n updated() {\n if (this.chart) {\n this.chart.reflow();\n }\n }\n\n _fillLineData(level) {\n const crossSectionData = this.querprofil_data[0].polygon.point;\n return crossSectionData.map(dp => ({ x: dp.x, y: level }));\n }\n\n render() {\n return html`
\n
\n
`;\n }\n\n async fetchData() {\n const _files = {};\n\n // TODO: Fix API call\n const files = await this.api.getTsData(\n `internet/stations/${this.station.site_no}/${this.station.station_no}/cross_section/cross_section.json`,\n );\n\n await Promise.all(\n this.station.timeseries\n .filter(ts => ts.station_parameter === this.station_parameter)\n .map(async ts => {\n _files[last(ts.href.split('/'))] = await this.api.getTsData(ts.href);\n }),\n );\n\n this.alarmstufen_data = _files['alm.json'];\n this.ereignisse_data = _files['events.json'];\n this.kennzahlen_data = _files['ltv.json'];\n this.week_data = _files['week.json'];\n\n this.querprofil_data = files;\n\n this.createChart();\n const crossSectionData = this.querprofil_data[0].polygon.point;\n // Plot profile\n this.addNewAreaToChart(\n 'Gelände',\n crossSectionData,\n 'rgba(164, 100, 30, 1)',\n 15,\n );\n\n // Parse Waterlevel\n const lastlevel = last(this.week_data[0].data)[1]; // Access latest data point\n\n this.addNewAreaToChart(\n 'aktueller Wasserstand',\n this._fillLineData(lastlevel / 100),\n 'rgba(10, 67, 119, 0.5)',\n 3,\n ); // cm -> m\n // this.addNewLineToChart(\"aktueller Wasserstand\", this._fillLineData(lastlevel/100), \"rgb(10, 67, 119)\", 4, true )\n\n // Parse Alarm\n this.alarmstufen_data.forEach(i => {\n if (i.rows > 0) {\n this.addNewLineToChart(\n i.ts_name.split('-')[1],\n this._fillLineData(i.data[0][1] / 100),\n undefined,\n 5,\n true,\n ); // cm -> m\n }\n });\n\n // Parse Kennzahlen\n sortBy(this.kennzahlen_data, 'ts_name').forEach(i => {\n if (i.rows > 0)\n this.addNewLineToChart(\n i.ts_name.split('-')[1],\n this._fillLineData(i.data[0][1] / 100),\n undefined,\n 11,\n true,\n ); // cm -> m\n });\n\n // Brückenunterkante\n if (this.station.web_querprofil_buk) {\n this.addNewLineToChart(\n 'Brückenunterkante',\n this._fillLineData(this.station.web_querprofil_buk / 100),\n '#222222',\n 12,\n ); // cm -> m\n }\n\n if (this.station.web_querprofil_bok) {\n this.addNewLineToChart(\n 'Brückenoberkante',\n this._fillLineData(this.station.web_querprofil_bok / 100),\n '#222222',\n 12,\n ); // cm -> m\n }\n\n this.requestUpdate();\n }\n}\n\ncustomElements.define('wwp-hdoe-querprofil', wwpHdoeQuerprofil);\n","import { getCurrentApi } from '@kisters/wiski-web/api';\nimport { css, html, LitElement } from 'lit';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { orderBy } from 'lodash-es';\n\nexport default class WwpHdoeHochwasserbericht extends LitElement {\n static styles = css`\n :host {\n display: block;\n height: 100%;\n }\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n `;\n\n api = getCurrentApi();\n\n content = '';\n\n renderPDF() {\n const url = new URL(\n `${this.api.dataPath}/${this.content}`,\n window.location.origin,\n ).href;\n const fullurl = `./pdfjs/web/viewer.html?file=${url}`;\n return this.content\n ? html``\n : html``;\n }\n\n async onAfterEnter() {\n this.fetchData();\n }\n\n render() {\n // language=html\n return this.renderPDF();\n }\n\n async fetchData() {\n this.api.getReportInfo().then(d => {\n const defaultBericht = d.all_listing.filter(\n item =>\n item.mimeType === 'application/pdf' &&\n item.name.includes(\n 'documents/hochwasserbericht/default_Hochwasserbericht.pdf',\n ),\n );\n const hochwasserberichte = orderBy(\n d.all_listing.filter(\n item =>\n item.mimeType === 'application/pdf' &&\n item.name.includes('documents/hochwasserbericht/') &&\n !item.name.includes(\n 'documents/hochwasserbericht/default_Hochwasserbericht',\n ),\n ),\n 'lastModified',\n 'desc',\n );\n if (hochwasserberichte.length) {\n this.content = hochwasserberichte[0].name;\n } else if (defaultBericht[0]) {\n this.content = defaultBericht[0].name;\n }\n this.requestUpdate();\n });\n }\n}\n\ncustomElements.define('wwp-hdoe-hochwasserbericht', WwpHdoeHochwasserbericht);\n","import { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { Mix } from '@kisters/wcp-base/common';\nimport { queryParamMixin } from '@kisters/wcp-base/decorators';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\n\nimport '@ui5/webcomponents/dist/DatePicker';\nimport { customElement, query } from 'lit/decorators.js';\nimport { filter, last } from 'lodash-es';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\n\n@customElement('wwp-hdoe-bericht-wasserstand')\nexport default class WwReport extends Mix(LitElement, [\n queryParamMixin,\n { targetProperty: 'selected', selector: 'selected', defaultValue: '' },\n]) {\n @query('#datepicker')\n datepicker;\n\n // language=css\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n height: calc(100% - 30px);\n }\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n .left-panel {\n text-align: center;\n flex: 0;\n }\n .right-panel {\n flex: 1;\n }\n\n ui5-select {\n width: 350px;\n }\n\n a {\n font-size: 2em;\n text-align: center;\n display: block;\n margin-top: 20%;\n }\n `;\n\n constructor() {\n super();\n this.api = getCurrentApi();\n this.data = [];\n }\n\n static get properties() {\n return {\n data: { type: Array },\n };\n }\n\n _selected = '';\n\n get selected() {\n return this._selected;\n }\n\n set selected(value) {\n this._selected = value;\n this.requestUpdate();\n }\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['content']);\n this.content = params.content;\n // Usually \"documents\" or \"reports\"\n this.directory = params.options?.directory || 'documents';\n\n this.fetchData();\n }\n\n // Fetch report\n async fetchData() {\n const res = await this.api._requestJson(`/${this.directory}/index.json`);\n this.data = res.all_listing;\n\n // Filter reports; only allow visible PDF\n this.data = filter(this.data, d => {\n if (d.mimeType === 'application/pdf' && d.name.includes(this.content)) {\n const pathArray = d.name.split('/');\n const date = dayjs(\n pathArray[pathArray.length - 1]\n .replace('Wasserstandsbericht-', '')\n .replace('.pdf', ''),\n 'YYYY-MM-DD_hh-mm',\n );\n if (date.toString() === 'Invalid Date') {\n return false;\n }\n d.filename = last(pathArray);\n d.value = date.valueOf();\n d.label = date.format('DD.MM.YYYY');\n return true;\n }\n return false;\n }).reverse(); // Newest file on first position\n this.requestUpdate();\n }\n\n updated() {\n this.data[0] &&\n this._handleChanged({\n target: {\n selectedOption: { value: this.data[0].date },\n },\n });\n }\n\n getUrl(file) {\n return `${this.api.dataPath}/${this.directory}/${this.content}/${file}`;\n }\n\n _handleChanged(e) {\n const value = e?.detail?.value ? e?.detail?.value : this.data[0].label;\n const doc = this.data.find(item => item.label === value);\n if (doc) {\n const pdfurl = `${this.api.dataPath}/${doc.name}`;\n this.renderRoot.querySelector(\n '#contentframe',\n ).src = `./pdfjs/web/viewer.html?file=${\n new URL(pdfurl, window.location.origin).href\n }`;\n } else {\n this.renderRoot.querySelector('#contentframe').src = `./html/leer.html`;\n }\n }\n\n render() {\n // language=html\n return this.data.length\n ? html`\n
\n \n \n
\n
\n \n
\n `\n : html`
Lade...
`;\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport {\n Mix,\n LoaderMixin,\n PropertyDefaultValue,\n} from '@kisters/wcp-base/common';\nimport { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '../../api/API';\nimport nls from '../../locales/index';\n\n@customElement('wwp-html')\nexport default class WwpHtml extends Mix(\n LitElement,\n LoaderMixin,\n PropertyDefaultValue,\n [i18nMixin, { nls }],\n) {\n api = getCurrentApi();\n\n static styles = css`\n :host {\n display: flex;\n width: 100%;\n height: 100%;\n }\n iframe {\n flex: 1;\n width: 100%;\n height: 100%;\n border: none;\n }\n a {\n font-size: 2em;\n text-align: center;\n display: block;\n margin-top: 20%;\n }\n `;\n\n @property({ type: String })\n content;\n\n @property({ type: String })\n type;\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['content']);\n\n this.content = params.content ?? params.options?.content;\n const { contentFolder } = params.options;\n this.contentFolder =\n contentFolder === undefined ? 'html' : params.options.contentFolder;\n this.type = params.options.type || 'html';\n this.basePath = params.options.basePath || './';\n }\n\n renderHTML() {\n return html``;\n }\n\n /* eslint-disable lit/no-invalid-html */\n renderPDF() {\n this.basePath = this.basePath || '';\n this.contentFolder = this.contentFolder || '';\n\n const fullurl = new URL(\n `${this.basePath}${this.contentFolder}/${this.content}.${this.type}`,\n window.location.origin,\n ).href;\n return html``;\n }\n /* eslint-enable lit/no-invalid-html */\n\n render() {\n // language=html\n return this.type === 'pdf' ? this.renderPDF() : this.renderHTML();\n }\n}\n","import FontSymbol from 'ol-ext/style/FontSymbol';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport olStyleImage from 'ol/style/Image';\n\n/*\n * must ensure font css loaded before use it.\n * */\n\nconst tmpCanvas = document.createElement('CANVAS');\nconst tmpCanvasCtx = tmpCanvas.getContext('2d');\n\nolStyleImage.prototype.getImagePNGLegend = function () {\n const canvas = this.getImage(1);\n if (canvas) {\n try {\n tmpCanvasCtx.restore();\n tmpCanvas.width = canvas.width;\n tmpCanvas.height = canvas.height;\n if (this.getRotation()) {\n const half = canvas.width / 2;\n tmpCanvasCtx.translate(half, half);\n tmpCanvasCtx.rotate(this.getRotation());\n tmpCanvasCtx.drawImage(canvas, half * -1, half * -1);\n return tmpCanvas.toDataURL('image/png');\n }\n\n tmpCanvasCtx.drawImage(canvas, 0, 0);\n return tmpCanvas.toDataURL('image/png');\n } catch (e) {\n return false;\n }\n } else {\n return false;\n }\n};\nexport class FontIcon extends FontSymbol {\n constructor({\n iconTemplate = '',\n iconTemplateDecimals = 0,\n icon = 'ki ki-info-circle',\n color = 'darkblue',\n shape = 'circle',\n radius = 10,\n rotation = 0,\n rotateWithView = false,\n backgroundColor,\n border /* color,width */,\n fontSize = 1,\n } = {}) {\n let glyph;\n let iconStyle;\n if (icon.length > 3) {\n const el = document.createElement('i');\n el.className = icon;\n el.setAttribute('style', 'display:none');\n document.body.append(el);\n const cs = window.getComputedStyle(el, ':before');\n iconStyle = {\n content: cs.getPropertyValue('content'),\n fontFamily: cs.getPropertyValue('font-family'),\n fontWeight: cs.getPropertyValue('font-weight'),\n fontSize: cs.getPropertyValue('font-size'),\n backgroundColor: 'rgb(0,255,0)',\n };\n if (iconStyle.content.length === 3) {\n iconStyle.content = iconStyle.content.charAt(1);\n } else if (iconStyle.content.length === 1) {\n // safari browser\n iconStyle.content = iconStyle.content.charAt(0);\n }\n document.body.removeChild(el);\n glyph = {\n char: iconStyle.content,\n font: iconStyle.fontFamily,\n theme: 'none',\n name: 'none',\n search: '',\n };\n } else {\n glyph = {\n char: icon,\n font: 'Arial',\n theme: 'none',\n name: 'none',\n search: '',\n iconTemplate,\n iconTemplateDecimals,\n };\n }\n super({\n form: shape,\n gradient: false,\n glyph,\n fontSize, // related to radius\n fontStyle: iconStyle ? iconStyle.fontWeight : 900, // need for font awesome\n radius,\n rotation,\n rotateWithView,\n offsetY: 0,\n color,\n fill: backgroundColor && new Fill({ color: backgroundColor }),\n stroke: border && new Stroke(border),\n });\n }\n\n getGlyph(name) {\n if (typeof name === 'object') {\n return name;\n }\n return super.getGlyph(name);\n }\n\n getImagePNGLegend = olStyleImage.prototype.getImagePNGLegend;\n}\n","import Style from 'ol/style/Style';\nimport Icon from 'ol/style/Icon';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport { FontIcon } from './FontIcon';\n\nfunction descar(arys, fn) {\n let result = [null];\n\n arys.forEach(ary => {\n const newResult = [];\n [...ary, null].forEach(item => {\n result.forEach(reItem => {\n if (reItem && item) {\n newResult.push(fn(reItem, item));\n } else {\n newResult.push(reItem || item);\n }\n });\n });\n result = result.concat(newResult);\n });\n\n return result.filter(r => !!r);\n}\n\nexport default class LegendFactory {\n constructor(classification = {}) {\n // TODO use image instead fontIcon, to reuse it and good for performance?\n\n this.label = classification.label;\n\n this.description = classification.description;\n this.hideEmptyClasses = classification.hideEmptyClasses;\n this.notInteractive = classification.notInteractive;\n this.tagProperty = classification.tagProperty || '__tag';\n\n this.selectedMarkers = {}; // TODO move style settings to station,\n this.pngs = {};\n this.labels = {};\n this.tagCount = {};\n this.defaultMarker = this._createIconStyle(classification.default?.marker);\n this.defaultMarkerStyle = classification.default?.marker;\n\n this.markers = { _default: this.defaultMarker };\n this.polygons = {\n _default: this._createPolygonStyle(classification.default?.marker),\n };\n this.markers_ = { _default: classification.default?.marker };\n\n this.pngs._default = this.defaultMarker.icon\n ? this.defaultMarker.icon.image_.getImagePNGLegend()\n : this.defaultMarker.image_.getImagePNGLegend();\n this.tagGroups = classification.tags || [];\n if (!Array.isArray(this.tagGroups[0])) {\n this.tagGroups = [this.tagGroups];\n }\n this.tagGroups.forEach((tg, j) => {\n tg.forEach((tag, i) => {\n tag.zIndex = tag.zIndex || i + j;\n });\n });\n\n const allTags = descar(this.tagGroups, (tag1, tag2) => ({\n name: `${tag1.name}|${tag2.name}`,\n hideInLegend: tag1.hideInLegend || tag2.hideInLegend,\n deactivate: tag1.deactivate || tag2.deactivate,\n label: `${tag1.label},${tag2.label}`,\n zIndex: tag1.zIndex + tag2.zIndex,\n marker: {\n ...tag1.marker,\n ...tag2.marker,\n },\n }));\n\n allTags.forEach(item => {\n const marker = this._createIconStyle(item.marker, item.zIndex);\n this.markers[item.name] = marker;\n this.polygons[item.name] = this._createPolygonStyle(\n item.marker,\n item.zIndex,\n );\n this.markers_[item.name] = item.marker;\n this.selectedMarkers[item.name] = this._selectedStyle(item.marker); // TODO svg ?\n this.pngs[item.name] =\n item.marker.icon?.svg || marker.image_.getImagePNGLegend();\n this.labels[item.name] = item.label;\n return {\n ...item,\n marker,\n };\n });\n\n this.legendOptions = {\n description: this.description,\n label: this.label,\n notInteractive: this.notInteractive,\n hideEmptyClasses: this.hideEmptyClasses,\n items: this.tagGroups.map(tgs =>\n tgs.map(item => ({\n icon: this.pngs[item.name],\n label: item.label,\n name: item.name,\n hidden: item.hideInLegend,\n deactivate: item.deactivate,\n })),\n ),\n };\n }\n\n getMarker(item) {\n return this.markers[item[this.tagProperty]] || this.defaultMarker;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _createPolygonStyle(marker = {}, zIndex = 0) {\n return new Style({\n fill: new Fill({\n color: marker.backgroundColor,\n }),\n stroke: new Stroke(marker.border),\n zIndex,\n });\n }\n\n // can be override\n // eslint-disable-next-line class-methods-use-this\n _createIconStyle(marker = {}, zIndex = 0) {\n if (marker.icon?.svg) {\n return new Style({\n image: new Icon({\n src: marker.icon.svg,\n }),\n });\n }\n return new Style({\n image: new FontIcon({\n border: { color: 'white', width: 1 },\n ...this.defaultMarkerStyle,\n ...marker,\n }), // all style will mix on default\n zIndex,\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n _selectedStyle(marker) {\n marker = {\n ...this.defaultMarkerStyle,\n ...marker,\n };\n return [\n new Style({\n image: new FontIcon({\n border: { color: '#3399FF', width: 1 },\n ...marker,\n icon: 'ki ki-arrow-alt-to-bottom',\n backgroundColor: '#3399FF',\n }),\n }),\n ];\n }\n\n getLegendOptions() {\n return this.legendOptions;\n }\n}\n","import dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { orderBy, get } from 'lodash-es';\nimport { template } from '@kisters/wcp-base/common';\n\nfunction creatRule(key, rule) {\n if (rule && typeof rule === 'object') {\n const _getValue = item => get(item, key);\n let getValue = item => _getValue(item);\n if (rule.last) {\n getValue = item =>\n (_getValue(item)?.length ?? 0) > 0\n ? _getValue(item)[_getValue(item).length - 1]\n : undefined;\n } else if (rule.first) {\n getValue = item =>\n (_getValue(item)?.length ?? 0) > 0 ? _getValue(item)[0] : undefined;\n }\n if (rule.resultIndex) {\n const oldGetValue = getValue;\n getValue = item =>\n (oldGetValue(item)?.length ?? 0) >= rule.resultIndex\n ? oldGetValue(item)[rule.resultIndex]\n : undefined;\n }\n if (rule.in) {\n return item => rule.in.indexOf(item[key]) >= 0;\n }\n if (Object.prototype.hasOwnProperty.call(rule, 'includes')) {\n return item => item[key].includes(rule.includes);\n }\n if (Object.prototype.hasOwnProperty.call(rule, 'exact')) {\n return item =>\n item[key].every(r => rule.exact.includes(r)) &&\n rule.exact.every(r => item[key].includes(r));\n }\n if (\n Object.prototype.hasOwnProperty.call(rule, 'max') &&\n Object.prototype.hasOwnProperty.call(rule, 'min')\n ) {\n return item => {\n const multiplier = rule.multiplier || 1;\n const max =\n typeof rule.max === 'string'\n ? template(rule.max, item)\n ?.replace(',', '.')\n .replace(/[^\\d.-]/g, '')\n : rule.max;\n const min =\n typeof rule.min === 'string'\n ? template(rule.min, item)\n ?.replace(',', '.')\n .replace(/[^\\d.-]/g, '')\n : rule.min;\n\n if (max === '' || min === '') {\n return false;\n }\n const _val = getValue(item);\n const value = rule.absolute ? Math.abs(_val) : _val;\n return (\n _val !== undefined &&\n value <= max * multiplier &&\n value >= min * multiplier\n );\n };\n }\n if (Object.prototype.hasOwnProperty.call(rule, 'max')) {\n return item => {\n const multiplier = rule.multiplier || 1;\n const max =\n typeof rule.max === 'string'\n ? template(rule.max, item)\n ?.replace(',', '.')\n .replace(/[^\\d.-]/g, '')\n : rule.max;\n\n const _val = getValue(item);\n const value = rule.absolute ? Math.abs(_val) : _val;\n return max !== '' && _val !== undefined && value <= max * multiplier;\n };\n }\n if (Object.prototype.hasOwnProperty.call(rule, 'min')) {\n return item => {\n const multiplier = rule.multiplier || 1;\n\n const min =\n typeof rule.min === 'string'\n ? template(rule.min, item)\n ?.replace(',', '.')\n .replace(/[^\\d.-]/g, '')\n : rule.min;\n\n const _val = getValue(item);\n const value = rule.absolute ? Math.abs(_val) : _val;\n return min !== '' && _val !== undefined && value >= min * multiplier;\n };\n }\n if (Object.prototype.hasOwnProperty.call(rule, 'not')) {\n const opsRule = creatRule(key, rule.not);\n return item => !opsRule(item);\n }\n if (Object.prototype.hasOwnProperty.call(rule, 'duration')) {\n const last = dayjs().tz().subtract(dayjs.duration(rule.duration));\n return item => dayjs(getValue(item)).tz() >= last;\n }\n // TODO no rule\n return () => true;\n }\n if (key === 'exists') {\n return item => item[rule] !== undefined && item[rule] !== null;\n }\n return item => get(item, key) === rule;\n}\n\n// TODO move out.\n// TODO use symbol for _default\nexport default class Classifier {\n constructor({ label, tags = [], tagProperty = '__tag' } = {}) {\n this.label = label;\n this.valueProperty = 'ts_value';\n this.tagProperty = tagProperty;\n\n if (!Array.isArray(tags[0])) {\n tags = [tags];\n }\n\n this.tagGroups = tags.map(tgs =>\n orderBy(tgs, 'priority').map(tag => ({\n ...tag,\n filter: this._createFilterFn(tag.filter),\n })),\n );\n }\n\n _classify(dataItem) {\n dataItem = { ...dataItem, [this.tagProperty]: '_default' };\n this.tagGroups.forEach(tgs => {\n tgs.some((item, i) => {\n if (item.filter(dataItem)) {\n if (\n !dataItem[this.tagProperty] ||\n dataItem[this.tagProperty] === '_default'\n ) {\n dataItem[this.tagProperty] = item.name;\n if (item.invalidateValue) {\n dataItem.invalidatedValue = dataItem[this.valueProperty];\n dataItem[this.valueProperty] = null;\n }\n } else {\n dataItem[this.tagProperty] += `|${item.name}`;\n }\n dataItem.__tagpriority = item.sortPriority || i;\n dataItem.__tag_label = item.label || '';\n return true;\n }\n return false;\n });\n });\n\n return dataItem;\n }\n\n classify(data) {\n return data.map(item => this._classify(item));\n }\n\n // able to override\n // eslint-disable-next-line class-methods-use-this\n _createFilterFn(filter) {\n if (typeof filter === 'function') {\n return filter;\n }\n\n // TODO use 3rd party standard filter syntax\n const rules = Object.keys(filter).map(key => creatRule(key, filter[key]));\n return function filterFn(item) {\n return rules.reduce((prev, rule) => prev && rule(item), true);\n };\n }\n\n getTag(station) {\n return station[this.tagProperty];\n }\n}\n","import { html } from 'lit';\n\nexport function StatusIcon(image, label = '', col) {\n return html` \n \"${label}\"\n `;\n}\n","export const getTrendArrow = (dir, rotation) => {\n let deg;\n if (dir > 15) {\n deg = rotation ? 4.71238898038469 : '-90';\n } else if (dir > 5) {\n deg = rotation ? 5.497787143782138 : '-45';\n } else if (dir > -5) {\n deg = rotation ? 0 : '0';\n } else if (dir > -15) {\n deg = rotation ? 0.7853981633974483 : '45';\n } else if (dir > -Infinity) {\n deg = rotation ? 1.5707963267948966 : '90';\n }\n return deg;\n};\n","import { css } from 'lit';\n// language=CSS\nexport default css`\n :host {\n display: block;\n position: relative;\n height: 100%;\n }\n\n :host ki-searchbox {\n border-radius: 0;\n transition: none;\n width: 250px;\n flex: 0;\n position: absolute;\n max-width: 35%;\n right: 20px;\n top: 10px;\n z-index: 2;\n height: 40px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);\n box-shadow: none;\n align-items: center;\n z-index:3;\n }\n :host ki-searchbox:hover,\n :host ki-switcher:hover {\n border-bottom: 1px solid rgba(0, 0, 0, 0.87);\n }\n\n :host #copyToClipboardButton {\n position: absolute;\n top: 10px;\n right: 300px;\n z-index: 2;\n }\n\n :host(.sm-screen) .downloadButton {\n display: none;\n }\n\n .downloadButton {\n position: absolute;\n z-index: 2;\n right: 300px;\n top: 10px;\n }\n\n ki-wcp-wwp-filter {\n width: 33vw;\n position: absolute;\n left: 20px;\n top: 10px;\n z-index: 4;\n }\n\n :host ki-switcher {\n /*border: 1px solid var(--theme-color);*/\n border-bottom: 1px solid rgba(0, 0, 0, 0.42);\n box-shadow: none;\n border-radius: 0;\n position: absolute;\n top: 10px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 3;\n }\n\n ki-stack {\n height: 100%;\n }\n\n ki-station-map {\n height: 100%;\n width: 100%;\n display: block;\n }\n\n ki-stack > .map-container {\n display: block;\n }\n\n ki-stack > .overview-container {\n padding-top: 60px;\n box-sizing: border-box;\n }\n\n ki-stack > .station-list {\n padding-top: 60px;\n box-sizing: border-box;\n background: white;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n overflow: hidden;\n z-index: 1;\n top: 0;\n left: auto;\n right: -100%;\n display: block;\n transition: right 0.6s ease-in-out;\n }\n\n ki-stack > .station-list.selected {\n right: 0;\n }\n\n #selectedStations{\n position: absolute;\n bottom:20px;\n transform: translateX(-50%);\n width: auto;\n left: 50%;\n }\n\n ki-responsive-table {\n width: 100%;\n min-height: 50px;\n flex: 1;\n }\n\n :host(.table) ki-searchbox,\n :host(.table) ki-switcher {\n box-shadow: none;\n border: 1px solid lightgray;\n transition: all 0.3s ease-in-out 0.6s;\n }\n\n :host(.sm-screen) ki-searchbox {\n width: 100%;\n top: 10px;\n min-width: 33%;\n max-width: 33%;\n right: 5px;\n }\n\n :host(.sm-screen) #copyToClipboardButton {\n top: 12px;\n left: 120px;\n }\n\n :host(.sm-screen) ki-wcp-wwp-filter {\n top: 10px;\n left: 5px;\n padding: 2px;\n display: flex;\n align-items: center;\n }\n\n :host(.sm-screen) ki-switcher {\n top: 10px;\n }\n\n :host(.sm-screen) ki-stack > .station-list {\n padding-top: 50px;\n }\n\n ki-legend {\n bottom: 40px;\n left: 20px;\n max-width: 400px;\n transition: 0.6s all;\n z-index: 1;\n }\n\n\n ts-graph-viewer{\n background:white;\n width: 100%;\n position: absolute;\n z-index: 2;\n top: 20px;\n bottom: 0;\n }\n\n ts-graph-viewer::part(search){\n display: none;\n }\n\n ts-graph-viewer::part(actions){\n margin-right: 300px;\n margin-top: -20px;\n }\n\n .lastUpdate {\n position: absolute;\n bottom: 10px;\n color: rgb(74, 74, 73);\n left: 23px;\n font-size: 0.8em;\n background: var(\n --ki-overview-lastUpdate-background,\n rgba(255, 255, 255, 0)\n );\n padding: 2px;\n }\n\n :host(.sm-screen) .lastUpdate, :host(.overview) .lastUpdate {\n display: none;\n }\n\n :host(.sm-screen) ki-legend {\n display: block;\n top: unset;\n bottom: 85px;\n right: unset;\n left: 5px;\n z-index: unset;\n }\n\n \n\n :host(.table) ki-legend {\n left: unset;\n right: 20px;\n }\n\n :host(.sm-screen.table) ki-legend, :host(.overview) ki-legend{\n display: none;\n }\n\n :host(.md-screen) ki-station-map::part(overview-map) {\n background-color: rgba(255, 255, 255, 0.5);\n }\n\n :host(.sm-screen) ki-wcp-wwp-filter {\n left: 5px;\n top: 10px;\n display: inline-flex;\n padding: 0px;\n }\n\n :host(.md-screen) ki-wcp-wwp-filter {\n left: 5px;\n top: 10px;\n display: flex;\n padding: 0px;\n }\n\n :host(.md-screen) ki-legend {\n left: 5px;\n }\n\n :host(.sm-screen) ki-switcher {\n left: 50%;\n }\n`;\n","import proj4 from 'proj4';\nimport { register } from 'ol/proj/proj4';\nimport { containsCoordinate } from 'ol/extent';\nimport { get as getProjection } from 'ol/proj';\n\nlet registeredProjections = false;\n\nexport function registerProjections(mapCfg) {\n if (mapCfg.projections && !registeredProjections) {\n mapCfg.projections.forEach(proj => {\n const extent = proj.length === 3 ? proj.pop() : null;\n proj4.defs(proj[0], proj[1]);\n const olProj = getProjection(proj[0]);\n if (olProj && extent) {\n olProj.setExtent(extent);\n }\n });\n registeredProjections = true;\n register(proj4);\n }\n}\n\nexport function reproject(data, mapCfg) {\n try {\n registerProjections(mapCfg);\n } catch (e) {\n console.error('error registering projections', mapCfg);\n }\n\n const viewProjection = mapCfg?.view?.projection || 'EPSG:3857';\n const dataProjection = mapCfg?.dataProjection || 'EPSG:4326';\n let x = 'station_longitude';\n let y = 'station_latitude';\n if (mapCfg.crs === 'regional') {\n x = 'station_carteasting';\n y = 'station_cartnorthing';\n } else if (mapCfg.crs === 'local') {\n x = 'station_local_x';\n y = 'station_local_y';\n }\n\n const stations = [];\n\n data.forEach(station => {\n if (station[x] && station[y]) {\n const point =\n dataProjection !== viewProjection\n ? proj4(dataProjection, viewProjection, [\n parseFloat(station[x]),\n parseFloat(station[y]),\n ])\n : [parseFloat(station[x]), parseFloat(station[y])];\n if (station.Web_Offset) {\n try {\n const offset = JSON.parse(station.Web_Offset);\n point[0] += offset[0];\n point[1] += offset[1];\n } catch (e) {\n console.error('Could no parse station offset');\n }\n }\n if (mapCfg.view.extent) {\n if (containsCoordinate(mapCfg.view.extent, point)) {\n station.point = point;\n stations.push(station);\n } else {\n console.warn('station outside exten', station);\n }\n } else {\n station.point = point;\n stations.push(station);\n }\n }\n });\n // console.log(\"reproject: \", new Date().getTime()-start)\n return stations;\n}\n","import { css, html } from 'lit';\nimport '@ui5/webcomponents/dist/Select';\nimport '@ui5/webcomponents/dist/Option';\n\nexport default function ListMode(clz) {\n return class extends clz {\n // language=CSS\n static styles = css`\n :host(.sm-screen) .row {\n display: table;\n width: 100%;\n padding: 10px;\n }\n\n :host(.sm-screen) .inner-row {\n display: table-row;\n font-size: 14px;\n width: 100%;\n }\n\n :host(.sm-screen) .label.cell {\n width: 45%;\n font-weight: 600;\n }\n\n :host(.sm-screen) .cell {\n text-align: left !important;\n white-space: normal !important;\n }\n\n :host {\n height: 100%;\n }\n\n :host(.sm-screen) .header .row {\n display: flex;\n box-sizing: border-box;\n padding: 0;\n }\n\n :host(.sm-screen) .header .row .cell {\n flex: 1;\n }\n\n ui5-select {\n overflow: hidden;\n width: 100%;\n margin: 0;\n border: none;\n height: 35px !important;\n background: white;\n }\n\n .col-selector {\n padding: 0;\n }\n `;\n\n static get properties() {\n return {\n renderListItem: {\n type: Function,\n },\n };\n }\n\n _renderHeader() {\n if (this.classList.contains('sm-screen')) {\n const sorted = this.sort[0] || {};\n const cols = this.renderingColumns.filter(c => c.sortable);\n const sortedCol = cols.find(col => col.field === sorted.field) || {\n field: this.renderingColumns[0].field,\n };\n const changeColumn = e => {\n const col = cols.find(c => c.field === e.target.selectedOption.value);\n this.sort = [{ ...sorted, field: col.field, sortBy: col.sortBy }];\n };\n const changeOrder = e => {\n this.sort = [\n {\n ...sorted,\n ascending: e.target.selectedOption.value === 'Asc',\n },\n ];\n };\n\n const getOptions = item =>\n item.field === sortedCol.field\n ? html`${item.label}`\n : html`${item.label}`;\n\n // language=html\n return html`\n
\n
\n
\n
${this.i18n.t('sortBy')}:
\n
\n
\n
\n ${cols.map(item => getOptions(item))}\n
\n
\n
\n
\n \n ${this.i18n.t('asc')}\n ${this.i18n.t('desc')}\n \n
\n
\n
\n
\n `;\n }\n return super._renderHeader();\n }\n\n renderRow(item) {\n if (this.classList.contains('sm-screen')) {\n return html`\n {\n this._onRowClick(item);\n }}\"\n >\n ${this.renderListItem(item)}\n \n `;\n }\n return super.renderRow(item);\n }\n\n renderListItem(item) {\n return html`\n ${this.renderingColumns.map(\n col => html`\n
\n
${col.label}
\n ${this._renderCell(col, item)}\n
\n `,\n )}\n `;\n }\n };\n}\n","/* eslint-disable lit-a11y/click-events-have-key-events */\n/* eslint-disable max-classes-per-file */\nimport { customElement } from 'lit/decorators.js';\nimport { i18nMixin, responsiveMixin } from '@kisters/wcp-base/decorators';\nimport { html } from 'lit';\nimport {\n BaseTable,\n PromiseData,\n SortAble,\n ColumnHider,\n ColumnFormatter,\n Export,\n // LazyRendering\n} from '@kisters/wcp-base/components';\nimport { Mix } from '@kisters/wcp-base/common';\nimport nls from '../../locales/index';\nimport ListMode from './ListMode';\n\n@customElement('ki-responsive-table')\nexport default class KiResponsiveTable extends Mix(\n BaseTable,\n [i18nMixin, { nls }],\n responsiveMixin,\n PromiseData,\n SortAble,\n ColumnFormatter,\n ColumnHider,\n // LazyRendering,\n ListMode,\n Export,\n) {\n static nls = nls;\n\n _timeout;\n\n popupTimeout: ReturnType | undefined;\n\n constructor() {\n super();\n this.noDataMessage = this.i18n.t('noDataMessage');\n }\n\n // eslint-disable-next-line class-methods-use-this\n get localStorageId() {\n return `ww-station-table-columnHidder`;\n }\n\n showPopup(station, e) {\n this.popupElement = document.createElement(\n this.infoTag || 'ki-station-info',\n );\n const pelement = this.popupElement;\n\n pelement.layerAlias = this.layerAlias;\n pelement.stations = [station];\n pelement.style.position = 'fixed';\n pelement.style.background = 'white';\n pelement.style.zIndex = '111';\n pelement.style.border = '1px solid #ddd';\n document.body.appendChild(pelement);\n pelement.style.display = 'block';\n // const tablebody = this.renderRoot.querySelector('.body');\n // const {top} = tablebody.getBoundingClientRect();\n const top = 150;\n const obs = new ResizeObserver(() => {\n if (pelement.clientHeight > 0) {\n const topoffset = top + pelement.clientHeight;\n const maxLeft = window.document.body.clientWidth - pelement.clientWidth;\n const posY =\n e.clientY > topoffset ? e.clientY - pelement.clientHeight : e.clientY;\n const posX =\n e.clientX > maxLeft\n ? e.clientX - pelement.clientWidth - 30\n : e.clientX + 30;\n\n pelement.style.left = `${posX}px`;\n pelement.style.top = `${posY}px`;\n }\n });\n\n obs.observe(pelement);\n }\n\n hidePopup() {\n if (this.popupElement) {\n this.popupElement.remove();\n }\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) super.disconnectedCallback();\n this.hidePopup();\n }\n\n showPopupForItem(item, e) {\n this.hidePopup();\n this.showPopup(item, e);\n }\n\n startPopupTimer(item, e) {\n if (!this.classList.contains('sm-screen') && this.tablePopup) {\n if (this.popupTimeout) {\n clearTimeout(this.popupTimeout);\n }\n this.popupTimeout = setTimeout(() => this.showPopupForItem(item, e), 200);\n }\n }\n\n endPopupTimer() {\n if (this.popupTimeout) {\n clearTimeout(this.popupTimeout);\n this.popupTimeout = undefined;\n }\n this.hidePopup();\n }\n\n renderRow(item) {\n // can be override;\n // language=html\n if (this.classList.contains('sm-screen')) {\n return super.renderRow(item);\n }\n // eslint-disable-next-line lit-a11y/mouse-events-have-key-events\n return html`\n this.startPopupTimer(item, e)}\"\n @mouseleave=\"${this.endPopupTimer}\"\n @click=\"${() => {\n this._onRowClick(item);\n }}\"\n >\n ${this.renderingColumns.map(col => this._renderCell(col, item))}\n \n `;\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport {\n i18nMixin,\n SM,\n ViewPort,\n responsiveMixin,\n getQueryObject,\n} from '@kisters/wcp-base/decorators';\nimport '@kisters/wcp-base/components';\n// eslint-disable-next-line import/extensions\nimport { repeat } from 'lit/directives/repeat.js';\nimport { uniqBy, orderBy } from 'lodash-es';\nimport '@ui5/webcomponents/dist/MultiComboBox';\nimport '@ui5/webcomponents/dist/ComboBox';\nimport nls from '../../locales/index';\n\nconst getDisplayValue = (item: any, template: string): string => {\n let returnString = '';\n let placeholderString = '';\n let capturingPlaceholder = false;\n let lastCharDollar = false;\n\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < template.length; i++) {\n const currentChar = template.charAt(i);\n\n if (!capturingPlaceholder && !lastCharDollar && currentChar !== '$') {\n returnString = `${returnString}${currentChar}`;\n } else if (!capturingPlaceholder && lastCharDollar && currentChar !== '{') {\n returnString = `${returnString}$${currentChar}`;\n } else if (!capturingPlaceholder && lastCharDollar) {\n capturingPlaceholder = true;\n } else if (capturingPlaceholder && currentChar === '}') {\n returnString = `${returnString}${item[placeholderString]}`;\n capturingPlaceholder = false;\n placeholderString = '';\n } else if (capturingPlaceholder) {\n placeholderString = `${placeholderString}${currentChar}`;\n }\n\n lastCharDollar = currentChar === '$';\n }\n\n return returnString;\n};\n\n@customElement('ki-wcp-wwp-filter')\nexport default class KiWcpWwpFilter extends Mix(LitElement, responsiveMixin, [\n i18nMixin,\n { nls },\n]) {\n // language=CSS\n static styles = css`\n :host {\n display: flex;\n }\n\n ui5-multi-combobox,\n ui5-combobox {\n --_ui5_input_icon_padding: 11px;\n --_ui5_input_height: 40px;\n margin-right: 5px;\n flex: 1;\n border: 0;\n border-bottom: 1px solid var(--sapField_BorderColor);\n max-width: 250px;\n }\n\n ki-icon-btn.active,\n ki-icon-btn.selected {\n background-color: var(--theme-color-primary, #1d1d1b);\n color: white;\n }\n\n .hide {\n display: none;\n }\n\n .list-item {\n padding: 10px 20px;\n color: rgb(74, 74, 73);\n font-size: 1.2em;\n }\n\n .clear-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n .clear-icon {\n margin-right: 2px;\n cursor: pointer;\n fill: #7e7e7e;\n width: 12px;\n }\n\n ui5-combobox:not([value]) .clear-icon,\n ui5-combobox[value=''] .clear-icon,\n ui5-multi-combobox:not([value]) .clear-icon,\n ui5-multi-combobox[value=''] .clear-icon {\n display: none;\n }\n\n :host(.sm-screen) ki-icon-btn {\n margin-right: 10px;\n }\n\n :host(.sm-screen) ui5-combobox,\n :host(.md-screen) ui5-combobox,\n :host(.sm-screen) ui5-multi-combobox,\n :host(.md-screen) ui5-multi-combobox {\n margin-bottom: 5px;\n }\n `;\n\n constructor() {\n super();\n this.filters = [];\n this.favorites = [];\n }\n\n static get properties() {\n return {\n activeFilter: { type: String, default: '{}' },\n filters: { type: Array, default: [] },\n stations: { type: Array, default: [] },\n favorites: { type: Array },\n favsactive: { type: Boolean },\n };\n }\n\n // Hide favorite button\n @property({ type: Boolean })\n hideFavorite = false;\n\n get favOn() {\n let activeFilter = {};\n try {\n activeFilter = JSON.parse(this.activeFilter);\n } catch (e) {\n console.warn(`broken filter ${this.activeFilter}`);\n }\n return activeFilter.fav || false;\n }\n\n render() {\n // language=html\n return html` ${repeat(this.filters, item => this._getFilter(item))}\n ${!this.hideFavorite && this.favorites.length\n ? this._renderFavoriteBtn()\n : ''}`;\n }\n\n _renderFavoriteBtn() {\n return html` {\n this.favsactive = !this.favsactive;\n this._handleChanged();\n }}\"\n icon=\"ki ki-star\"\n >`;\n }\n\n _renderBtn(filt, activeFilter) {\n return html`\n {\n if (activeFilter[filt.field]) {\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: { value: {} },\n }),\n );\n } else {\n this.renderRoot\n .querySelector(`#${filt.field.replaceAll('.', '\\\\.')}`)\n .show();\n }\n }}\"\n >\n \n `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _getFilter(filt) {\n const activeFilter = JSON.parse(this.activeFilter);\n if (ViewPort.size === SM && filt.icon) {\n return html`\n ${this._renderBtn(filt, activeFilter)}\n \n
\n ${this.filterOptions(filt).map(\n option =>\n html` {\n const filterValue = {};\n filterValue[filt.field] = option.value;\n this.renderRoot\n .querySelector(`#${filt.field.replaceAll('.', '\\\\.')}`)\n .close();\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: { value: filterValue },\n }),\n );\n }}\"\n >\n ${option.displayValue}\n
`,\n )}\n \n
\n `;\n }\n\n const isSelected = item =>\n activeFilter[filt.field] && activeFilter[filt.field].includes(item)\n ? 'selected'\n : '';\n\n switch (filt.type) {\n case 'multiselect':\n return html`\n ${this.filterOptions(filt).map(item =>\n isSelected(item.value)\n ? html``\n : html``,\n )}\n `;\n default:\n return html`\n ${this.filterOptions(filt).map(\n item =>\n html``,\n )}\n
\n {\n console.log(e);\n const combobox = getQueryObject(\n this,\n `#${filt.field.replaceAll('.', '\\\\.')}`,\n );\n if (filt.linkedTo) {\n filt.linkedTo.forEach(item => {\n const node = this.renderRoot.querySelector(`#${item}`);\n if (node.value) {\n node.value = '';\n }\n });\n }\n\n combobox.value = '';\n this._handleChanged();\n }}\"\n >\n
\n `;\n }\n }\n\n filterOptions({\n field,\n type,\n sort,\n displayTemplate,\n additionalText,\n sortBy,\n sortDir,\n }) {\n let _stations = uniqBy(\n type === 'multiselect' ? this.allStations : this.stations,\n field,\n );\n\n if (sortBy) {\n _stations = orderBy(_stations, sortBy, sortDir);\n }\n const data =\n _stations\n .map(item => ({\n value: item[field],\n additionalText: item[additionalText] ?? '',\n displayValue: displayTemplate\n ? getDisplayValue(item, displayTemplate)\n : item[field],\n }))\n .filter(t => !!t.value) || [];\n\n if (sort === 'numeric' && !sortBy) {\n data.sort((a, b) => {\n const numberVala = parseFloat(a.value);\n const numberValb = parseFloat(b.value);\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(numberVala) && !isNaN(numberValb)) {\n if (numberVala > numberValb) return 1;\n if (numberVala < numberValb) return -1;\n return 0;\n }\n\n if (a.value > b.value) return 1;\n if (a.value < b.value) return -1;\n return 0;\n });\n } else if (!sortBy) {\n data.sort(\n (a, b) => a.value.localeCompare && a.value.localeCompare(b.value),\n );\n }\n return data;\n }\n\n _resetValue() {\n this.value = '';\n this.renderRoot.querySelector('#input').value = '';\n this._handleChanged();\n }\n\n _handleChangedMulti() {\n const activeFilter = {\n fav: this.favsactive,\n };\n this.renderRoot.querySelectorAll('ui5-multi-combobox').forEach(node => {\n if (node.selectedValues.length) {\n activeFilter[node.id] = node.selectedValues.map(item => item.text);\n }\n });\n this.dispatchEvent(\n new CustomEvent('change', { detail: { value: activeFilter } }),\n );\n }\n\n _handleChanged() {\n const activeFilter = {\n fav: this.favsactive,\n };\n this.renderRoot.querySelectorAll('ui5-combobox').forEach(node => {\n if (node.value) activeFilter[node.id] = node.value;\n });\n this.dispatchEvent(\n new CustomEvent('change', { detail: { value: activeFilter } }),\n );\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport Highcharts from 'highcharts/highstock';\nimport { groupBy, find } from 'lodash-es';\nimport { ExternalStation } from '@kisters/wcp-water/common';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport hclocales from '@kisters/wcp-water/common/highcharts-locales.js';\nimport nls from '../../locales/index';\nimport { getCurrentApi } from '../../api/API';\n\n// eslint-disable-next-line import/extensions\n\n@customElement('ww-map-popup')\nexport default class WwMapPopup extends Mix(LitElement, [i18nMixin, { nls }]) {\n static styles = css`\n :host {\n display: block;\n }\n .station-name {\n padding-right: 5px;\n padding-left: 10px;\n padding-top: 10px;\n font-size: 1.2em;\n }\n\n hr {\n margin: 5px 0;\n }\n .table {\n display: table;\n line-height: 1.5em;\n }\n .row {\n display: table-row;\n }\n\n .hidden {\n display: none !important;\n }\n\n .highlight {\n font-weight: bold;\n }\n\n .cell {\n display: table-cell;\n padding: 0 10px;\n min-width: 50px;\n color: gray;\n }\n\n .label {\n color: #4a4a49;\n }\n\n .highcharts-label {\n display: none;\n }\n\n #chartcontainer {\n border-top: 1px dotted lightgray;\n height: 200px;\n min-width: 360px;\n width: 100%;\n }\n\n .remark {\n padding-left: 10px;\n color: red;\n max-width: 100%;\n }\n `;\n\n @property({ type: Array })\n stations: Array = [];\n\n @property({ type: String })\n stationRemark; // Additional comment in left Menu\n\n constructor() {\n super();\n if (hclocales[this.i18n.language.substring(0, 2)]) {\n Highcharts.setOptions({\n lang: hclocales[this.i18n.language.substring(0, 2)],\n });\n }\n this.stations = [];\n this.api = getCurrentApi();\n const formatter = new Intl.NumberFormat(this.i18n.language, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n this.valFormatter = {\n format(val) {\n return val === 0 ? val : formatter.format(val);\n },\n };\n }\n\n firstUpdated() {\n const node = this.shadowRoot.querySelector('#chartcontainer');\n if (node) {\n this.chart = new Highcharts.Chart(node, {\n chart: {\n animation: false,\n },\n title: {\n text: '',\n },\n subtitle: {\n text: '',\n },\n exporting: {\n enabled: false,\n },\n legend: {\n enabled: false,\n },\n labels: {\n enabled: false,\n },\n credits: {\n enabled: false,\n },\n xAxis: {\n type: 'datetime',\n },\n yAxis: [\n {\n id: 'mainYAxis',\n\n title: {\n text: '',\n },\n },\n {\n id: 'sumYAxis',\n title: {\n text: '',\n },\n opposite: true,\n },\n ],\n plotOptions: {\n series: {\n animation: false,\n label: {\n enabled: false,\n },\n },\n },\n series: [\n {\n id: 'preview',\n data: [],\n label: {\n enabled: false,\n },\n },\n {\n id: 'linehelper',\n type: 'scatter',\n data: [],\n showInLegend: false,\n marker: {\n enabled: false,\n },\n enableMouseTracking: false,\n },\n ],\n });\n }\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n getSeries(data, tsShortname) {\n const ser = find(data, { ts_shortname: tsShortname }) || data[0];\n if (ser) {\n ser.data = ser.data.map(item => [new Date(item[0]).getTime(), item[1]]);\n }\n return ser;\n }\n\n async _setChartData(station) {\n if (this.chart && this.lastStationId !== station.station_id) {\n this.chart.showLoading();\n const series = this.chart.get('preview');\n series.setData([]);\n const mainParameter =\n station.mainParameter || Object.keys(station.ts_values)[0];\n const parameter = station.ts_values[mainParameter];\n this.lastStationId = station.station_id;\n const siteNo = station.site_no || station.ts_path?.split('/')[0] || 0;\n const stationparameterNo =\n parameter.stationparameter_no || parameter.ts_path.split('/')[2];\n const data = await this.api.getTsData(\n `internet/stations/${siteNo}/${station.station_no}/${stationparameterNo}/week.json`,\n false,\n );\n const sdata = this.getSeries(data, parameter.ts_shortname).data;\n series.update({ type: 'line', data: sdata });\n\n this.chart.hideLoading();\n }\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n _getRow(station) {\n const parameter =\n station.stationparameter_longname || station.stationparameter_name;\n const value =\n station.ts_value != null\n ? `${this.valFormatter.format(station.ts_value)} ${\n station.ts_unitsymbol\n }`\n : '-';\n const timestamp = station.timestamp\n ? dayjs(station.timestamp).tz().format('L LT')\n : '-';\n return html`
\n
${parameter}
\n
${value} (${timestamp})
\n
`;\n }\n\n _valueTmpl() {\n const station = this.stations[0];\n const river = station.WTO_OBJECT ? `(${station.WTO_OBJECT})` : '';\n if (station.external) return this._stationExternal(station);\n return html`
\n ${station.station_no} | ${station.station_name} ${river}\n
\n
\n
\n ${Object.values(station.ts_values)\n .reverse()\n .map(st => this._getRow(st))}\n
`;\n }\n\n _stationTmpl(stations) {\n const station = stations[0];\n const river = station.WTO_OBJECT ? `(${station.WTO_OBJECT})` : '';\n if (station.external) return this._stationExternal(station);\n if (this.stations.length < 2) {\n this._setChartData(station);\n }\n return html`
\n ${station.station_no} | ${station.station_name} ${river}\n
\n
${this.stationRemark}
\n
\n
\n ${station.ts_values\n ? Object.values(station.ts_values)\n .reverse()\n .map(st => this._getRow(st))\n : stations.map(st => this._getRow(st))}\n
`;\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n _stationExternal(station: ExternalStation) {\n return html`
${station.station_name}
\n
\n
\n
\n
${unsafeHTML(station.description)}
\n
\n
`;\n }\n\n render() {\n if (this.stations && this.stations[0] && this.stations[0].mainParameter)\n return this._render();\n return this._renderLegacy();\n }\n\n _render() {\n return html`${this.stations[0] &&\n this.stations[0].ts_values &&\n Object.keys(this.stations[0].ts_values).length > 1\n ? this._valueTmpl()\n : Object.values(groupBy(this.stations, 'station_id')).map(station =>\n this._stationTmpl(station),\n )}\n ${(Object.keys(this.stations[0].ts_values).length < 2 &&\n !this.stations[0].external) ||\n this.stations[0].mainParameter\n ? '
'\n : ''} `;\n }\n\n _renderLegacy() {\n return html`${this.stations &&\n this.stations[0] &&\n this.stations[0].ts_values &&\n Object.keys(this.stations[0].ts_values).length > 1\n ? this._valueTmpl()\n : Object.values(groupBy(this.stations, 'station_id')).map(station =>\n this._stationTmpl(station),\n )}\n `;\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport Highcharts from 'highcharts/highstock';\nimport { orderBy } from 'lodash-es';\nimport hclocales from '@kisters/wcp-water/common/highcharts-locales.js';\nimport { until } from 'lit/directives/until.js';\nimport nls from '../../locales/index';\nimport { getCurrentApi } from '../../api/API';\n\n// eslint-disable-next-line import/extensions\n\n@customElement('ww-map-popup-base')\nexport default class WwMapPopup extends Mix(LitElement, [i18nMixin, { nls }]) {\n static styles = css`\n :host {\n display: block;\n z-index: 10;\n max-width: 460px;\n }\n .station-name {\n padding-right: 5px;\n padding-left: 10px;\n padding-top: 10px;\n font-size: 1.2em;\n }\n\n hr {\n margin: 5px 0;\n }\n .table {\n display: table;\n line-height: 1.5em;\n }\n .row {\n display: table-row;\n }\n\n .hidden {\n display: none !important;\n }\n\n .highlight {\n font-weight: bold;\n }\n\n .cell {\n display: table-cell;\n padding: 0 10px;\n min-width: 50px;\n color: gray;\n }\n\n .label {\n color: #4a4a49;\n }\n\n .highcharts-label {\n display: none;\n }\n\n #chartcontainer {\n border-top: 1px dotted lightgray;\n height: 200px;\n min-width: 360px;\n width: 100%;\n }\n\n :host([flexSize]) #chartcontainer {\n width: auto;\n flex: 1;\n height: auto;\n }\n\n :host([flexSize]) {\n max-width: initial;\n }\n\n .remark {\n padding-left: 10px;\n color: red;\n max-width: 100%;\n }\n `;\n\n @property({ type: Boolean })\n flexSize = false;\n\n @property({ type: Array })\n stations: Array = [];\n\n /* Additional comment also displayed in left Menu at stationDetils\n * Config: app -> remarkAttr\n */\n @property({ type: String })\n stationRemark;\n\n constructor() {\n super();\n if (hclocales[this.i18n.language.substring(0, 2)]) {\n Highcharts.setOptions({\n lang: hclocales[this.i18n.language.substring(0, 2)],\n });\n }\n this.stations = [];\n this.api = getCurrentApi();\n this.formatter = new Intl.NumberFormat(this.i18n.language, {});\n }\n\n valFormatter(val) {\n return val === 0 ? val : this.formatter.format(val);\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n _getRow(station, mainParameter) {\n const isMain =\n (mainParameter && mainParameter === station.stationparameter_no) ||\n mainParameter === station.stationparameter_name;\n const parameter =\n station.stationparameter_longname || station.stationparameter_name;\n const value =\n station.ts_value != null\n ? `${this.valFormatter(station.ts_value)} ${station.ts_unitsymbol}`\n : '-';\n const timestamp = station.timestamp\n ? dayjs(station.timestamp).tz().format('L LT')\n : '-';\n return html`
\n
${parameter}
\n
${value} (${timestamp})
\n
`;\n }\n\n // eslint-disable-next-line class-methods-use-this\n getGraph(station) {\n // override for graph\n console.log(station);\n return html``;\n }\n\n _stationTmpl(stations, graph = true) {\n const station = stations[0];\n const river = station.WTO_OBJECT ? `(${station.WTO_OBJECT})` : '';\n\n if (station && this.config?.remarkAttr)\n this.stationRemark = station[this.config?.remarkAttr] || '';\n\n return html`
\n ${station.station_no} | ${station.station_name} ${river}\n
\n
${this.stationRemark}
\n
\n
\n ${station.ts_values\n ? orderBy(Object.values(station.ts_values), [\n item => item.stationparameter_name.toLowerCase(),\n ]).map(st => this._getRow(st, station.mainParameter))\n : stations.map(st => this._getRow(st, station.mainParameter))}\n
\n ${graph\n ? until(\n this.getGraph(station),\n html`...`,\n )\n : ''}`;\n }\n\n render() {\n return this?.stations?.length\n ? this._stationTmpl(this.stations)\n : html`
`;\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport { html } from 'lit';\nimport { getRoutes } from '@kisters/wcp-base/components/ki-app/services/ki-app-config-service';\n\nimport WwMapPopupBase from './ww-map-popup-base';\n\nexport default class WwMapPopupAuto extends WwMapPopupBase {\n // eslint-disable-next-line class-methods-use-this\n getGraph(station) {\n const routes = getRoutes();\n\n if (routes.length <= 0) {\n return [];\n }\n\n const stationDetailRoute = routes[0].children?.find\n ? routes[0].children.find(\n child => child?.component === 'wwp-station-detail',\n )\n : undefined;\n\n if (!stationDetailRoute) {\n return [];\n }\n\n const conf = stationDetailRoute.children.find(\n item =>\n item.component.includes('ki-wwp-graph') &&\n item.options.station_parameter === station.stationparameter_no,\n );\n\n if (!conf) {\n return html``;\n }\n\n const options = JSON.parse(JSON.stringify(conf.options));\n\n options.ranges = [options.ranges[0]];\n if (conf.component === 'ki-wwp-graph-precip') {\n return html``;\n }\n\n return html``;\n }\n}\n\ncustomElements.define('ww-map-popup-auto', WwMapPopupAuto);\n","/* eslint-disable class-methods-use-this */\nimport { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport Highcharts from 'highcharts/highstock';\nimport { groupBy, find } from 'lodash-es';\nimport hclocales from '@kisters/wcp-water/common/highcharts-locales.js';\nimport nls from '../../locales/index';\nimport { getCurrentApi } from '../../api/API';\n\n@customElement('ww-map-popup-precip')\nexport default class WwMapPopupPrecip extends Mix(LitElement, [\n i18nMixin,\n { nls },\n]) {\n static styles = css`\n :host {\n display: block;\n }\n .station-name {\n padding-right: 5px;\n padding-left: 10px;\n padding-top: 10px;\n font-size: 1.2em;\n }\n\n hr {\n margin: 5px 0;\n }\n .table {\n display: table;\n line-height: 1.5em;\n }\n .row {\n display: table-row;\n }\n .cell {\n display: table-cell;\n padding: 0 10px;\n min-width: 50px;\n color: gray;\n }\n .label {\n color: #4a4a49;\n }\n\n #chartcontainer {\n height: 200px;\n min-width: 360px;\n width: 100%;\n }\n\n .remark {\n padding-left: 10px;\n color: red;\n max-width: fit-content;\n }\n `;\n\n @property({ type: Array })\n stations: Array = [];\n\n @property({ type: String })\n stationRemark; // Additional comment in left Menu\n\n constructor() {\n super();\n Highcharts.setOptions({\n lang: hclocales[this.i18n.language.substring(0, 2)],\n });\n this.stations = [];\n this.api = getCurrentApi();\n const formatter = new Intl.NumberFormat(this.i18n.language, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n this.valFormatter = {\n format(val) {\n return val === 0 ? val : formatter.format(val);\n },\n };\n }\n\n firstUpdated() {\n this.chart = Highcharts.chart(\n this.renderRoot.querySelector('#chartcontainer'),\n {\n chart: {\n animation: false,\n },\n title: {\n text: '',\n },\n subtitle: {\n text: '',\n },\n exporting: {\n enabled: false,\n },\n legend: {\n enabled: false,\n },\n labels: {\n enabled: false,\n },\n credits: {\n enabled: false,\n },\n xAxis: {\n type: 'datetime',\n },\n yAxis: [\n {\n id: 'mainYAxis',\n title: {\n text: '',\n },\n },\n {\n id: 'sumYAxis',\n title: {\n text: '',\n },\n opposite: true,\n },\n ],\n plotOptions: {\n series: {\n animation: false,\n label: {\n enabled: false,\n },\n },\n },\n series: [\n {\n id: 'preview',\n type: 'scatter',\n data: [],\n label: {\n enabled: false,\n },\n },\n {\n id: 'linehelper',\n type: 'scatter',\n data: [],\n showInLegend: false,\n marker: {\n enabled: false,\n },\n enableMouseTracking: false,\n },\n {\n id: 'sumline',\n type: 'line',\n data: [],\n showInLegend: false,\n enableMouseTracking: false,\n step: 'left',\n marker: { enabled: false },\n color: 'rgb(170,70,67)',\n yAxis: 'sumYAxis',\n },\n ],\n },\n );\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n getSeries(data, tsShortname) {\n const ser = find(data, { ts_shortname: tsShortname }) || data[0];\n if (ser) {\n ser.data = ser.data.map(item => [new Date(item[0]).getTime(), item[1]]);\n }\n return ser;\n }\n\n async _setChartData(station) {\n if (this.chart && this.lastStationId !== station.station_id) {\n this.chart.showLoading();\n const series = this.chart.get('preview');\n const sumSeries = this.chart.get('sumline');\n sumSeries?.setData([]);\n series.setData([]);\n this.lastStationId = station.station_id;\n const siteNo = station.site_no || station.ts_path?.split('/')[0] || 0;\n const stationparameterNo =\n station.stationparameter_no || station.ts_path.split('/')[2];\n const data = await this.api.getTsData(\n `internet/stations/${siteNo}/${station.station_no}/${stationparameterNo}/week.json`,\n false,\n );\n const sdata = this.getSeries(data, station.ts_shortname).data;\n series.update({ type: 'bar', data: sdata }, false);\n\n const sumData = this._sumLine(sdata);\n sumSeries.setData(sumData);\n\n this.chart.hideLoading();\n }\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n _getRow(station) {\n const parameter =\n station.stationparameter_longname || station.stationparameter_name;\n const value =\n station.ts_value != null\n ? `${this.valFormatter.format(station.ts_value)} ${\n station.ts_unitsymbol\n }`\n : '-';\n const timestamp = station.timestamp\n ? dayjs(station.timestamp).tz().format('L LT')\n : '-';\n return html`
\n
${parameter}
\n
${value} (${timestamp})
\n
`;\n }\n\n _stationTmpl(stations) {\n const station = stations[0];\n if (this.stations.length < 2) {\n this._setChartData(station);\n }\n const river = station.WTO_OBJECT ? `(${station.WTO_OBJECT})` : '';\n return html`
\n ${station.station_no} | ${station.station_name} ${river}\n
\n
${this.stationRemark}
\n
\n
${stations.map(st => this._getRow(st))}
\n `;\n }\n\n _sumLine(data: Array<[string, number]>): Array<[string, number]> {\n const sumlineData: Array<[string, number]> = [];\n let sum: number = 0;\n data.forEach(d => {\n sum += d[1];\n const t: [string, number] = [d[0], sum];\n sumlineData.push(t);\n });\n return sumlineData;\n }\n\n render() {\n return html`${Object.values(groupBy(this.stations, 'station_id')).map(\n station => this._stationTmpl(station),\n )}`;\n }\n}\n","function getAbsolutePath(path) {\n if (path.includes('//')) {\n return path;\n }\n return new URL(`${window.location.protocol}//${window.location.host}/${path}`)\n .href;\n}\n\nconst callcache = {};\nexport default class KIWIS {\n constructor({\n basePath,\n service = 'kisters',\n type = 'queryServices',\n datasource = 0,\n }) {\n this.basePath = getAbsolutePath(basePath);\n this.service = service;\n this.type = type;\n this.datasource = datasource;\n }\n\n static _handleCSL(val) {\n if (Array.isArray(val)) {\n return val.join(',');\n }\n return val;\n }\n\n /**\n * Retrieves a list of stations with metadata.\n * @param params\n\n * @param {(String | String[] )} params.station_no ,\n * @param {(String | String[] )} params.station_id ,\n * @param {(String | String[] )} params.station_uuid ,\n * @param {(String | String[] )} params.station_name ,\n * @param {(String | String[] )} params.catchment_no ,\n * @param {(String | String[] )} params.catchment_id ,\n * @param {(String | String[] )} params.catchment_name ,\n * @param {(String | String[] )} params.site_no ,\n * @param {(String | String[] )} params.site_id ,\n * @param {(String | String[] )} params.site_uuid ,\n * @param {(String | String[] )} params.site_name ,\n * @param {String} params.stationgroup_id ,\n * @param {(String | String[] )} params.parametertype_id ,\n * @param {(String | String[] )} params.parametertype_name ,\n * @param {(String | String[] )} params.stationparameter_name ,\n * @param {(String | String[] )} params.object_type ,\n * @param {(String | String[] )} params.object_type_shortname ,\n * @param {String} params.bbox comma separated list with four values in order min_x, min_y, max_x, max_y; use 'crs' parameter to choose between local and global coordinates,\n * @param {String} params.fulltext fulltext filter for all station metadata fields,\n * @param {String} params.custattrfilter filter for one ore more custom station attributes in the form 'key1:value1;key2:value2;...'\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.crs] select which coordinates should be used for bbox filtering, possible values are 'localxy', 'regional' and 'global'; default is global; KML and LPK format will need global coordinates,\n * @param {String} [params.ca_site_returnfields] selects a set of custom defined site attributes (returnfield 'ca_site' must be active, allows comma separated list),\n * @param {String} [params.ca_sta_returnfields] selects a set of custom defined station attributes (returnfield 'ca_sta' must be active, allows comma separated list),\n * @param {String} [params.custattr_returnfields] DEPRECATED - use ca_sta_returnfields instead,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request,\n * @param {String} [params.flatten] if true, the list will be flattened to contain one station per station_id, all parameter and the object_type fields will be concatenated per entry; default is false,\n * @param {String} [params.addlinks] adds links for easier data discovery to the response\n * @param {('station_no'|'station_id'|'station_uuid'|'station_name'|'catchment_no'|'catchment_id'|'catchment_name'|'station_latitude'|'station_longitude'|'station_carteasting'|'station_cartnorthing'|'station_local_x'|'station_local_y'|'site_no'|'site_id'|'site_uuid'|'site_name'|'parametertype_id'|'parametertype_name'|'stationparameter_name'|'stationparameter_no'|'stationparameter_id'|'parametertype_longname'|'object_type'|'object_type_shortname'|'station_georefsystem'|'station_longname'|'station_area_wkt'|'station_area_wkt_org'|'river_id'|'river_name'|'area_id'|'area_name'|'ca_site'|'ca_sta'|'custom_attributes')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t station_no:\n* \t station_id:\n* \t station_uuid: Unique database independent ID\n* \t station_name:\n* \t catchment_no:\n* \t catchment_id:\n* \t catchment_name:\n* \t station_latitude:\n* \t station_longitude:\n* \t station_carteasting:\n* \t station_cartnorthing:\n* \t station_local_x:\n* \t station_local_y:\n* \t site_no:\n* \t site_id:\n* \t site_uuid: Unique database independent ID\n* \t site_name:\n* \t parametertype_id:\n* \t parametertype_name:\n* \t stationparameter_name:\n* \t stationparameter_no:\n* \t stationparameter_id:\n* \t parametertype_longname:\n* \t object_type: Station type, e.g. 'Surface Water'; Multiple values are concatenated with ; as separator\n* \t object_type_shortname: Station type shortname; Multiple values are concatenated with ; as separator\n* \t station_georefsystem:\n* \t station_longname:\n* \t station_area_wkt: the WKT string of the station extent if set\n* \t station_area_wkt_org: the original WKT string of the station extent if set\n* \t river_id:\n* \t river_name:\n* \t area_id:\n* \t area_name:\n* \t ca_site: returns custom site attributes, optionally use parameter ca_site_returnfields to select specific fields\n* \t ca_sta: returns custom station attributes, optionally use parameter ca_sta_returnfields to select specific fields\n* \t custom_attributes: DEPRECATED - use ca_sta instead\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"geojson\",\"kml\",\"lpk\",\"xlsx\"]\n */\n\n getStationList(params = {}, returnfields, format = 'objson') {\n let CSL = [\n 'station_no',\n 'station_id',\n 'station_uuid',\n 'station_name',\n 'catchment_no',\n 'catchment_id',\n 'catchment_name',\n 'site_no',\n 'site_id',\n 'site_uuid',\n 'site_name',\n 'parametertype_id',\n 'parametertype_name',\n 'stationparameter_name',\n 'object_type',\n 'object_type_shortname',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getStationList', query);\n }\n\n /**\n * Retrieves a list of timeseries with metadata.\n * @param params\n\n * @param {(String | String[] )} params.station_no ,\n * @param {(String | String[] )} params.station_id ,\n * @param {(String | String[] )} params.station_name ,\n * @param {(String | String[] )} params.ts_id ,\n * @param {String} params.ts_path The timeseries path as definied in WISKI7 - 'site_no/station_no/stationparameter_no/ts_shortname'; A single path can be used with wildcards, or a comma seperated list of paths without wildcards; using the ts_path filter disables all other filters,\n * @param {(String | String[] )} params.ts_name ,\n * @param {(String | String[] )} params.ts_shortname ,\n * @param {(String | String[] )} params.ts_type_id ,\n * @param {(String | String[] )} params.parametertype_id ,\n * @param {(String | String[] )} params.parametertype_name ,\n * @param {(String | String[] )} params.stationparameter_name ,\n * @param {(String | String[] )} params.stationparameter_no ,\n * @param {(String | String[] )} params.ts_unitname ,\n * @param {String} params.timeseriesgroup_id ,\n * @param {String} params.fulltext fulltext filter for all timeseries metadata fields\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.dateformat] the date format that will be returned, see date formats,\n * @param {String} [params.timezone] the time zone that will be returned for all timestamps, any time zone string as understood by Java (e.g. GMT+5, UTC, CET),\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request,\n * @param {String} [params.ca_site_returnfields] selects a set of custom defined site attributes (returnfield 'ca_site' must be active, allows comma separated list),\n * @param {String} [params.ca_sta_returnfields] selects a set of custom defined station attributes (returnfield 'ca_sta' must be active, allows comma separated list),\n * @param {String} [params.ca_par_returnfields] selects a set of custom defined parameter attributes (returnfield 'ca_par' must be active, allows comma separated list),\n * @param {String} [params.ca_ts_returnfields] selects a set of custom defined parameter attributes (md_returnfield 'ca_ts' must be active, allows comma separated list),\n * @param {String} [params.addlinks] adds links for easier data discovery to the response\n * @param {('station_no'|'station_id'|'station_name'|'station_latitude'|'station_longitude'|'station_carteasting'|'station_cartnorthing'|'station_local_x'|'station_local_y'|'station_georefsystem'|'station_longname'|'ts_id'|'ts_name'|'ts_shortname'|'ts_path'|'ts_type_id'|'ts_type_name'|'parametertype_id'|'parametertype_name'|'stationparameter_name'|'stationparameter_no'|'stationparameter_longname'|'ts_unitname'|'ts_unitsymbol'|'ts_unitname_abs'|'ts_unitsymbol_abs'|'site_no'|'site_id'|'site_name'|'catchment_no'|'catchment_id'|'catchment_name'|'coverage'|'ts_density'|'ts_exchange'|'ts_spacing'|'ts_clientvalue##'|'datacart'|'ca_site'|'ca_sta'|'ca_par'|'ca_ts')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t station_no:\n* \t station_id:\n* \t station_name:\n* \t station_latitude:\n* \t station_longitude:\n* \t station_carteasting:\n* \t station_cartnorthing:\n* \t station_local_x:\n* \t station_local_y:\n* \t station_georefsystem:\n* \t station_longname:\n* \t ts_id:\n* \t ts_name:\n* \t ts_shortname:\n* \t ts_path: The timeseries path as definied in WISKI7 - 'site_no/station_no/stationparameter_no/ts_shortname'\n* \t ts_type_id:\n* \t ts_type_name:\n* \t parametertype_id:\n* \t parametertype_name:\n* \t stationparameter_name:\n* \t stationparameter_no:\n* \t stationparameter_longname:\n* \t ts_unitname:\n* \t ts_unitsymbol:\n* \t ts_unitname_abs:\n* \t ts_unitsymbol_abs:\n* \t site_no:\n* \t site_id:\n* \t site_name:\n* \t catchment_no:\n* \t catchment_id:\n* \t catchment_name:\n* \t coverage: will add from/to values of the data coverage\n* \t ts_density: will add an estimation of how many values this timeseries theoretically has per year\n* \t ts_exchange: will add the timeseries exchange ID in case it exists\n* \t ts_spacing: value spacing of equidistant timeseries as ISO period\n* \t ts_clientvalue##: timeseries client values reaching from 1-10, e.g. ts_clientvalue4\n* \t datacart: use this fieldname to retrieve the result as a full 'Datacart', other entries will be ignored if existent\n* \t ca_site: returns custom site attributes, optionally use parameter ca_site_returnfields to select specific fields\n* \t ca_sta: returns custom station attributes, optionally use parameter ca_sta_returnfields to select specific fields\n* \t ca_par: returns custom parameter attributes, optionally use parameter ca_par_returnfields to select specific fields\n* \t ca_ts: returns custom timeseries attributes, optionally use parameter ca_ts_returnfields to select specific fields\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"geojson\",\"kml\",\"lpk\",\"xlsx\"]\n */\n\n getTimeseriesList(params = {}, returnfields, format = 'objson') {\n let CSL = [\n 'station_no',\n 'station_id',\n 'station_name',\n 'ts_id',\n 'ts_name',\n 'ts_shortname',\n 'ts_type_id',\n 'parametertype_id',\n 'parametertype_name',\n 'stationparameter_name',\n 'stationparameter_no',\n 'ts_unitname',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getTimeseriesList', query);\n }\n\n /**\n * Retrieves timeseries data.\n * @param params\n\n * @param {(String | String[] )} params.ts_id either ts_id or timeseriesgroup_id or ts_path can be used; one or more transformations may be concatenated to each ID with a semicolon, e.g. ts_id=123;factor(3.0),\n * @param {(String | String[] )} params.timeseriesgroup_id either ts_id or timeseriesgroup_id or ts_path can be used,\n * @param {String} params.ts_path the timeseries path according to WISKI7; a single path with placeholders may be used or a comma separated list without placeholders; either ts_id or timeseriesgroup_id or ts_path can be used; one or more transformations may be concatenated to each path with a semicolon, e.g. ts_path=a/b/c/d;factor(3.0),\n * @param {String} params.from see date formats, not providing 'from' delivers the last ts value only,\n * @param {String} params.to see date formats, using yyyy-MM-dd as format includes the complete given day,\n * @param {String} params.period retrieve data for a time period according to ISO format P#Y#M#DT#H#M#S where P just indicates an arbitrary period with the # being integers; the entities are: Y=Year, M=Month, D=Day, T just indicates that smaller entities are included, H=Hour, M=Minute, S=Second; W=Week is also supported but mutually exclusive with D=Day setting; Examples: P3D, P1Y, P1DT12H, PT6H, P1Y6M3DT4H20M30S; all periods are applied by calendar; as an alternative period can be set to 'complete' to return all data,\n * @param {String} params.changedsince see date formats, will return all data of the timeseries changed since the given date (requires active ts edit history in WISKI)\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.metadata] set metadata=true to add more metadata fields to responses,\n * @param {String} [params.md_returnfields] specify exactly which metadata fields should be returned; available fields: ts_id, ts_path, ts_name, ts_shortname, station_no, station_id, station_latitude, station_longitude, station_carteasting, station_cartnorthing, station_local_x, station_local_y, station_name, stationparameter_name, stationparameter_no, stationparameter_longname, ts_unitname, ts_unitsymbol, ts_unitname_abs, ts_unitsymbol_abs, parametertype_id, parametertype_name, ts_exchange, ts_precision, station_longname, site_id, site_no, site_name, catchment_id, catchment_no, catchment_name, ensembledate, ensembledispatchinfo, timezone (the timezone of the values), ts_spacing, ts_clientvalue## (client values 1-10), river_name, custom_attributes (deprecated - use ca_sta), ca_site (custom site attributes), ca_sta (custom station attributes), ca_par (custom parameter attributes), ca_ts (custom timeseries attributes),\n * @param {String} [params.custattr_returnfields] DEPRECATED - use ca_sta_returnfields instead,\n * @param {String} [params.ca_site_returnfields] selects a set of custom defined site attributes (md_returnfield 'ca_site' must be active, allows comma separated list),\n * @param {String} [params.ca_sta_returnfields] selects a set of custom defined station attributes (md_returnfield 'ca_sta' must be active, allows comma separated list),\n * @param {String} [params.ca_par_returnfields] selects a set of custom defined parameter attributes (md_returnfield 'ca_par' must be active, allows comma separated list),\n * @param {String} [params.ca_ts_returnfields] selects a set of custom defined timeseries attributes (md_returnfield 'ca_ts' must be active, allows comma separated list),\n * @param {String} [params.dateformat] the date format that will be returned, see date formats,\n * @param {String} [params.timezone] the time zone that will be returned for all timestamps, any time zone string as understood by Java (e.g. GMT+5, UTC, CET) or 'individual' to use individual timeseries timezones,\n * @param {String} [params.crs] set crs=webmercator to retrieve position data in webmercator projection (only applies for esrijson format),\n * @param {String} [params.valueorder] sets the order in which the values will be returned, asc/ascending or desc/descending; default is ascending,\n * @param {String} [params.useprecision] advises KiWIS to use the WISKI precision for value formatting, true or false; default is true,\n * @param {String} [params.valuelocale] sets the locale in which the values will be formatted; default is en; for de, csvDiv will automatically be ';', all json formats will use locale en; only applies if useprecision=true,\n * @param {String} [params.valuesasstring] advises KiWIS to return timeseries values in JSON as string instead of number, true or false; default is false,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request,\n * @param {String} [params.getensembletimestampsonly] can only be used if all ts_ids are ensemble timeseries and will return a list of available fore-/hindcast timestamps without values; cannot be used for wml2 format,\n * @param {String} [params.sincefirstchange] only active for the changedsince filter; retrieves all data since the first changed timestamp without gaps\n * @param {('Timestamp'|'Value'|'Interpolation Type'|'Quality Code'|'Quality Code Name'|'Quality Code Description'|'Aggregation Accuracy'|'Absolute Value'|'AV Interpolation Type'|'AV Quality Code'|'AV Quality Code Name'|'AV Quality Code Description'|'Runoff Value'|'RV Interpolation Type'|'RV Quality Code'|'RV Quality Code Name'|'RV Quality Code Description'|'Stagesource Value'|'Occurrance Timestamp'|'Occurrance Count'|'Timeseries Comment'|'Agent Comment'|'Station Comment'|'Parameter Comment'|'Data Comment'|'Release State')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\nPlease note that transformation results will have fixed automatic returnfields.\n * \t Timestamp:\n* \t Value: Default value column if present in the timeseries\n* \t Interpolation Type:\n* \t Quality Code:\n* \t Quality Code Name:\n* \t Quality Code Description:\n* \t Aggregation Accuracy: Percentage of not missing/good values for aggregation timeseries\n* \t Absolute Value: Absolute value column if present in the timeseries\n* \t AV Interpolation Type:\n* \t AV Quality Code:\n* \t AV Quality Code Name:\n* \t AV Quality Code Description:\n* \t Runoff Value: Runoff value column if present in the timeseries\n* \t RV Interpolation Type:\n* \t RV Quality Code:\n* \t RV Quality Code Name:\n* \t RV Quality Code Description:\n* \t Stagesource Value: Stagesource value column if present in the timeseries\n* \t Occurrance Timestamp: Time of occurrance for statistical values (e.g. time of the monthly max)\n* \t Occurrance Count: Occurrance count for statistical values\n* \t Timeseries Comment: Any comments written at the timeseries level, separated with a ';'\n* \t Agent Comment: Any comments written at the agent level, separated with a ';'\n* \t Station Comment: Any comments written at the station level, separated with a ';'\n* \t Parameter Comment: Any comments written at the parameter level, separated with a ';'\n* \t Data Comment: Any comments written at the data level, separated with a ';'\n* \t Release State: Any release states written at the data level, separated with a ';'\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"dajson\",\"esrijson\",\"wml2\",\"zrxp\",\"xlsx\"]\n */\n\n getTimeseriesValues(params = {}, returnfields, format = 'objson') {\n let CSL = ['ts_id', 'timeseriesgroup_id'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getTimeseriesValues', query, true);\n }\n\n /**\n * Retrieves a layer of timeseries values for a given date including location data.\n * @param params\n\n * @param {(String | String[] )} params.ts_id either ts_id, ts_path, timeseriesgroup_id or bbox can be used,\n * @param {String} params.ts_path the timeseries path according to WISKI7; a single path with placeholders may be used or a comma separated list without placeholders; either ts_id, ts_path, timeseriesgroup_id or bbox can be used,\n * @param {(String | String[] )} params.timeseriesgroup_id either ts_id, ts_path, timeseriesgroup_id or bbox can be used,\n * @param {String} params.bbox either ts_id, ts_path, timeseriesgroup_id or bbox can be used; comma separated list with four values in order min_x, min_y, max_x, max_y; use 'crs' parameter to choose between local and global coordinates; fields stationparameter_no and ts_shortname are required for bbox; the function will select 0 or 1 timeseries per station in the area according to filters,\n * @param {(String | String[] )} params.stationparameter_no with bbox filter only; if multiple values are given the order will be considered for timeseries selection,\n * @param {(String | String[] )} params.ts_shortname with bbox filter only; if multiple values are given the order will be considered for timeseries selection,\n * @param {String} params.date the date to request values for, see date formats,\n * @param {String} params.valuecolumn the value column to use for output; valid values are: default, absolute, runoff, stagesource,\n * @param {(String | String[] )} params.site_no can be used to additionally filter for sites\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.metadata] set metadata=true to add more metadata fields to responses,\n * @param {String} [params.md_returnfields] specify exactly which metadata fields should be returned; available fields: ts_id, ts_path, ts_name, ts_shortname, station_no, station_id, station_name, stationparameter_name, stationparameter_no, stationparameter_longname, ts_unitname, ts_unitsymbol, ts_unitname_abs, ts_unitsymbol_abs, parametertype_id, parametertype_name, station_longname, custom_attributes (deprecated - use ca_sta), station_count (adds a field containing the number of duplicate stations per entry), aggaccuracy_percent (adds percentage of not missing/good values for aggregation timeseries), timezone (the timezone of the values), group_item_order (only for one group), site_id, site_no, site_name, catchment_id, catchment_no, catchment_name, object_type, object_type_shortname, ts_clientvalue## (client values 1-10), ca_site (custom site attributes), ca_sta (custom station attributes), ca_par (custom parameter attributes), ca_ts (custom timeseries attributes),\n * @param {String} [params.custattr_returnfields] DEPRECATED - use ca_sta_returnfields instead,\n * @param {String} [params.ca_site_returnfields] selects a set of custom defined site attributes (md_returnfield 'ca_site' must be active, allows comma separated list),\n * @param {String} [params.ca_sta_returnfields] selects a set of custom defined station attributes (md_returnfield 'ca_sta' must be active, allows comma separated list),\n * @param {String} [params.ca_par_returnfields] selects a set of custom defined parameter attributes (md_returnfield 'ca_par' must be active, allows comma separated list),\n * @param {String} [params.ca_ts_returnfields] selects a set of custom defined timeseries attributes (md_returnfield 'ca_ts' must be active, allows comma separated list),\n * @param {String} [params.dateformat] the date format that will be returned, see date formats,\n * @param {String} [params.timezone] the time zone that will be returned for all timestamps, any time zone string as understood by Java (e.g. GMT+5, UTC, CET) or 'individual' to use individual timeseries timezones,\n * @param {String} [params.crs] set to 'localxy', 'regional' or 'global' to use the local, regional or global station reference system, set to 'webmercator' to retrieve position data in webmercator projection (only applies for esrijson format and uses global station coordinates for calculation),\n * @param {String} [params.orderby] sorts the result set by the given field, this can be helpful e.g. for drawing order in a map; available fields: value, timestamp, station_name, station_no, group_item_order (only with one group),\n * @param {String} [params.orderdir] sets the sort direction, only usable together with 'orderby'; possible values: asc, desc; default is ascending,\n * @param {String} [params.invalidperiod] sets the deviation period between requested and returned timestamp to determine which values will be invalidated, must be used together with 'invalidvalue'; can be used like the normal period parameter for other requests,\n * @param {String} [params.invalidvalue] sets the value that will be inserted for invalids, must be used together with 'invalidperiod'; any numeric value can be used,\n * @param {String} [params.showemptytimeseries] sets if timeseries without a value should be removed or shown in the layer; default is true,\n * @param {String} [params.hidetsid] sets if timeseries ids should be hidden or shown in the layer; default is false; DEPRECATED - use returnfields instead,\n * @param {String} [params.useprecision] advises KiWIS to use the WISKI precision for value formatting, true or false; default is true,\n * @param {String} [params.valuelocale] sets the locale in which the values will be formatted; default is en; for de, csvDiv will automatically be ';', all json formats will use locale en; only applies if useprecision=true,\n * @param {String} [params.valuesasstring] advises KiWIS to return timeseries values in JSON as string instead of number, true or false; default is false,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request\n * @param {('ts_id'|'timestamp'|'ts_value'|'req_timestamp'|'ts_intpol'|'q_code'|'q_code_name'|'q_code_desc'|'sta_location')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t ts_id:\n* \t timestamp:\n* \t ts_value:\n* \t req_timestamp:\n* \t ts_intpol: Interpolation Type\n* \t q_code: Quality Code\n* \t q_code_name: Quality Code Name\n* \t q_code_desc: Quality Code Description\n* \t sta_location: Station coordinates with consideration of the crs paramter\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"objson\",\"esrijson\",\"geojson\",\"xlsx\"]\n */\n\n getTimeseriesValueLayer(params = {}, returnfields, format = 'objson') {\n let CSL = [\n 'ts_id',\n 'timeseriesgroup_id',\n 'stationparameter_no',\n 'ts_shortname',\n 'site_no',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getTimeseriesValueLayer', query, true);\n }\n\n /**\n * Retrieves a list of sites with metadata.\n * @param params\n\n * @param {(String | String[] )} params.site_no ,\n * @param {(String | String[] )} params.site_id ,\n * @param {(String | String[] )} params.site_uuid ,\n * @param {(String | String[] )} params.site_name ,\n * @param {(String | String[] )} params.parametertype_id ,\n * @param {(String | String[] )} params.parametertype_name ,\n * @param {(String | String[] )} params.stationparameter_name ,\n * @param {String} params.bbox comma separated list with four values in order min_x, min_y, max_x, max_y; use 'crs' parameter to choose between local and global coordinates\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.crs] select which coordinates should be used for bbox filtering, possible values are 'local' and 'global'; default is global,\n * @param {String} [params.custattr_returnfields] DEPRECATED - use ca_site_returnfields instead,\n * @param {String} [params.ca_site_returnfields] selects a set of custom defined site attributes (md_returnfield 'ca_site' must be active, allows comma separated list),\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request,\n * @param {String} [params.addlinks] adds links for easier data discovery to the response\n * @param {('site_no'|'site_id'|'site_uuid'|'site_name'|'site_latitude'|'site_longitude'|'site_carteasting'|'site_cartnorthing'|'site_type_name'|'site_type_shortname'|'parametertype_id'|'parametertype_name'|'stationparameter_name'|'site_georefsystem'|'site_area_wkt'|'site_area_wkt_org'|'ca_site'|'custom_attributes')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t site_no:\n* \t site_id:\n* \t site_uuid: Unique database independent ID\n* \t site_name:\n* \t site_latitude:\n* \t site_longitude:\n* \t site_carteasting:\n* \t site_cartnorthing:\n* \t site_type_name:\n* \t site_type_shortname:\n* \t parametertype_id:\n* \t parametertype_name:\n* \t stationparameter_name:\n* \t site_georefsystem:\n* \t site_area_wkt: the WKT string of the site extent if set\n* \t site_area_wkt_org: the original WKT string of the site extent if set\n* \t ca_site: returns custom site attributes, optionally use parameter ca_site_returnfields to select specific fields\n* \t custom_attributes: DEPRECATED - use ca_site instead\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"geojson\",\"xlsx\"]\n */\n\n getSiteList(params = {}, returnfields, format = 'objson') {\n let CSL = [\n 'site_no',\n 'site_id',\n 'site_uuid',\n 'site_name',\n 'parametertype_id',\n 'parametertype_name',\n 'stationparameter_name',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getSiteList', query);\n }\n\n /**\n * Retrieves a list of parameters available at sites and/or stations.\n * @param params\n\n * @param {(String | String[] )} params.station_no ,\n * @param {(String | String[] )} params.station_id ,\n * @param {(String | String[] )} params.station_name ,\n * @param {(String | String[] )} params.site_no ,\n * @param {(String | String[] )} params.site_id ,\n * @param {(String | String[] )} params.site_name ,\n * @param {(String | String[] )} params.stationparameter_id ,\n * @param {(String | String[] )} params.stationparameter_name ,\n * @param {(String | String[] )} params.stationparameter_no ,\n * @param {(String | String[] )} params.stationparameter_longname ,\n * @param {(String | String[] )} params.parametertype_id ,\n * @param {(String | String[] )} params.parametertype_name ,\n * @param {(String | String[] )} params.parametertype_longname\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.ca_par_returnfields] selects a set of custom defined parameter attributes (returnfield 'ca_par' must be active, allows comma separated list),\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request\n * @param {('station_no'|'station_id'|'station_name'|'site_no'|'site_id'|'site_name'|'stationparameter_id'|'stationparameter_name'|'stationparameter_no'|'stationparameter_longname'|'parametertype_id'|'parametertype_name'|'parametertype_longname'|'parametertype_shortunitname'|'parametertype_unitname'|'ca_par')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t station_no:\n* \t station_id:\n* \t station_name:\n* \t site_no:\n* \t site_id:\n* \t site_name:\n* \t stationparameter_id:\n* \t stationparameter_name:\n* \t stationparameter_no:\n* \t stationparameter_longname:\n* \t parametertype_id:\n* \t parametertype_name:\n* \t parametertype_longname:\n* \t parametertype_shortunitname:\n* \t parametertype_unitname:\n* \t ca_par: custom parameter attributes\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"xlsx\"]\n */\n\n getParameterList(params = {}, returnfields, format = 'objson') {\n let CSL = [\n 'station_no',\n 'station_id',\n 'station_name',\n 'site_no',\n 'site_id',\n 'site_name',\n 'stationparameter_id',\n 'stationparameter_name',\n 'stationparameter_no',\n 'stationparameter_longname',\n 'parametertype_id',\n 'parametertype_name',\n 'parametertype_longname',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getParameterList', query);\n }\n\n /**\n * Retrieves the system defined parameter type list.\n * @param params\n\n * @param {(String | String[] )} params.parametertype_id ,\n * @param {(String | String[] )} params.parametertype_name\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request\n\n\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"xlsx\"]\n */\n\n getParameterTypeList(params = {}, format = 'objson') {\n let CSL = ['parametertype_id', 'parametertype_name'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getParameterTypeList', query);\n }\n\n /**\n * Retrieves a timeseries type list.\n * @param params\n\n * @param {(String | String[] )} params.ts_type_id ,\n * @param {(String | String[] )} params.ts_shortname ,\n * @param {(String | String[] )} params.ts_name\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request\n * @param {('ts_type_id'|'ts_type_name'|'ts_name'|'ts_shortname')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t ts_type_id:\n* \t ts_type_name:\n* \t ts_name:\n* \t ts_shortname:\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"xlsx\"]\n */\n\n getTimeseriesTypeList(params = {}, returnfields, format = 'objson') {\n let CSL = ['ts_type_id', 'ts_shortname', 'ts_name'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getTimeseriesTypeList', query);\n }\n\n /**\n * Retrieves a list of timeseries and station groups.\n * @param params\n\n * @param {(String | String[] )} params.group_name ,\n * @param {String} params.group_type valid values are 'station', 'parameter', 'timeseries' and 'timeseries_dynamic',\n * @param {(String | String[] )} params.supergroup_name\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request,\n * @param {String} [params.ca_group_returnfields] selects a set of custom defined group attributes (md_returnfield 'ca_group' must be active, allows comma separated list),\n * @param {String} [params.addlinks] adds links for easier data discovery to the response\n * @param {('group_name'|'group_id'|'supergroup_id'|'supergroup_name'|'group_type'|'group_remark'|'ca_group')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t group_name:\n* \t group_id:\n* \t supergroup_id:\n* \t supergroup_name:\n* \t group_type:\n* \t group_remark:\n* \t ca_group: returns custom group attributes, optionally use parameter ca_group_returnfields to select specific fields\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"xlsx\"]\n */\n\n getGroupList(params = {}, returnfields, format = 'objson') {\n let CSL = ['group_name', 'supergroup_name'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getGroupList', query);\n }\n\n /**\n * Retrieves a graph image of timeseries data.\n * @param params\n\n * @param {(String | String[] )} params.ts_id either ts_id or ts_path can be used,\n * @param {(String | String[] )} params.ext_ts_id additional ts ids for usage with the placeholder mechanism in templates; either ext_ts_id or ext_ts_path can be used,\n * @param {(String | String[] )} params.ts_path either ts_id or ts_path can be used,\n * @param {(String | String[] )} params.ext_ts_path additional ts paths for usage with the placeholder mechanism in templates; either ext_ts_id or ext_ts_path can be used,\n * @param {String} params.from see date formats,\n * @param {String} params.to see date formats, using yyyy-MM-dd as format includes the complete given day,\n * @param {String} params.period retrieve a graph for a time period according to ISO format P#Y#M#DT#H#M#S where P just indicates an arbitrary period with the # being integers; the entities are: Y=Year, M=Month, D=Day, T just indicates that smaller entities are included, H=Hour, M=Minute, S=Second; W=Week is also supported but mutually exclusive with D=Day setting; Examples: P3D, P1Y, P1DT12H, PT6H, P1Y6M3DT4H20M30S; all periods are applied by calendar; as an alternative period can be set to 'complete' to return all data,\n * @param {String} params.width in pixels, 100 - 2000,\n * @param {String} params.height in pixels, 50 - 1500,\n * @param {String} params.template use a stored template for graph design,\n * @param {String} params.templategroup optionally select a group (sub-directory) for a stored template,\n * @param {(String | String[] )} params.showgroups select specific object groups to be visible in the graph; only applies for template graphs and the template must have groups specified,\n * @param {String} params.hidelegend true|false - overwrites or sets the hide-legend flag for template graphs,\n * @param {String} params.overlayinterval set the overlay interval to year, month, week, day or halfyear; only applies for template graphs where the template contains overlaid setting for one timeseries,\n * @param {(String | String[] )} params.overlayslices select the slices that will be shown, e.g. 0,1,2 will show the first three years if interval is year; only applies for template graphs where the template contains overlaid setting for one timeseries\n\n * @param {String} [params.renderer] supported values: XYTsRenderer, XYAreaRenderer, XYBarRenderer, XYLineAndShapeRenderer, XYStepAreaRenderer, YIntervalRenderer; does not apply for template graphs,\n * @param {String} [params.timezone] the time zone that will be used in graph, any time zone string as understood by Java (e.g. GMT+5, UTC, CET); if a zone is already defined in a template, it will NOT be overriden,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set, default name is generic per request\n\n\n * @param {String} format Possible formats as parameter [\"jpg\",\"png\"]\n */\n\n getGraph(params = {}, format = 'objson') {\n let CSL = [\n 'ts_id',\n 'ext_ts_id',\n 'ts_path',\n 'ext_ts_path',\n 'showgroups',\n 'overlayslices',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getGraph', query);\n }\n\n /**\n * Retrieves a graph image of timeseries data based on stations with a template.\n * @param params\n\n * @param {(String | String[] )} params.station_id ,\n * @param {String} params.from see date formats,\n * @param {String} params.to see date formats, using yyyy-MM-dd as format includes the complete given day,\n * @param {String} params.period retrieve a graph for a time period according to ISO format P#Y#M#DT#H#M#S where P just indicates an arbitrary period with the # being integers; the entities are: Y=Year, M=Month, D=Day, T just indicates that smaller entities are included, H=Hour, M=Minute, S=Second; W=Week is also supported but mutually exclusive with D=Day setting; Examples: P3D, P1Y, P1DT12H, PT6H, P1Y6M3DT4H20M30S; all periods are applied by calendar; as an alternative period can be set to 'complete' to return all data,\n * @param {String} params.width in pixels, 100 - 2000,\n * @param {String} params.height in pixels, 50 - 1500,\n * @param {String} params.template select a stored template for station graph design, mandatory,\n * @param {String} params.templategroup optionally select a group (sub-directory) for a stored template,\n * @param {(String | String[] )} params.showgroups select specific groups to be visible in the graph; only applies for template graphs and the template must have groups specified,\n * @param {String} params.hidelegend true|false - overwrites or sets the hide-legend flag for template graphs,\n * @param {String} params.overlayinterval set the overlay interval to year, month, week, day or halfyear; only applies for template graphs where the template contains overlaid setting for one timeseries,\n * @param {(String | String[] )} params.overlayslices select the slices that will be shown, e.g. 0,1,2 will show the first three years if interval is year; only applies for template graphs where the template contains overlaid setting for one timeseries\n\n * @param {String} [params.timezone] the time zone that will be used in graph, any time zone string as understood by Java (e.g. GMT+5, UTC, CET); if a zone is already defined in a template, it will NOT be overriden,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set, default name is generic per request\n\n\n * @param {String} format Possible formats as parameter [\"jpg\",\"png\"]\n */\n\n getStationGraph(params = {}, format = 'objson') {\n let CSL = ['station_id', 'showgroups', 'overlayslices'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getStationGraph', query);\n }\n\n /**\n * Retrieves a list of stored graph templates with metadata.\n * @param params\n\n * @param {String} params.templategroup optionally select a group (sub-directory) for stored templates\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name\n\n\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"xlsx\"]\n */\n\n getGraphTemplateList(params = {}, format = 'objson') {\n let CSL = [];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getGraphTemplateList', query);\n }\n\n /**\n * Retrieves a list of catchments with metadata.\n * @param params\n\n * @param {(String | String[] )} params.catchment_no ,\n * @param {(String | String[] )} params.catchment_id ,\n * @param {(String | String[] )} params.catchment_name ,\n * @param {(String | String[] )} params.catchment_parent_id\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set, default name is generic per request,\n * @param {String} [params.addlinks] adds links for easier data discovery to the response\n * @param {('catchment_no'|'catchment_id'|'catchment_name'|'catchment_parent_id'|'catchment_size'|'catchment_area_wkt'|'catchment_area_wkt_org')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t catchment_no:\n* \t catchment_id:\n* \t catchment_name:\n* \t catchment_parent_id:\n* \t catchment_size:\n* \t catchment_area_wkt: the WKT string of the catchment polygon if set\n* \t catchment_area_wkt_org: the original WKT string of the site extent if set\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"xlsx\"]\n */\n\n getCatchmentList(params = {}, returnfields, format = 'objson') {\n let CSL = [\n 'catchment_no',\n 'catchment_id',\n 'catchment_name',\n 'catchment_parent_id',\n ];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getCatchmentList', query);\n }\n\n /**\n * Retrieves a list of rivers with metadata.\n * @param params\n\n * @param {(String | String[] )} params.river_id ,\n * @param {(String | String[] )} params.river_name\n\n * @param {String} [params.csvdiv] overwrite the standard CSV delimiter (;) with another symbol in CSV requests,\n * @param {String} [params.jsoncallback] return any JSON request as jsonp with the given function name,\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request\n * @param {('river_id'|'river_name')[]} [returnfields] Returnable fields as optional parameter 'returnfields' (allows comma separated list)\n * \t river_id:\n* \t river_name:\n * @param {String} format Possible formats as parameter [\"ascii\",\"html\",\"csv\",\"tabjson\",\"objson\",\"xlsx\"]\n */\n\n getRiverList(params = {}, returnfields, format = 'objson') {\n let CSL = ['river_id', 'river_name'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n return this._request('getRiverList', query);\n }\n\n /**\n * Retrieves a list of WISKI color classifications.\n * @param params\n\n * @param {String} params.name The stationClassification name,\n * @param {String} params.parameterType The parameter type,\n * @param {String} params.classificationType The stationClassification type\n\n\n\n * @param {String} format Possible formats as parameter [\"json\"]\n */\n\n getColorClassifications(params = {}, format = 'objson') {\n let CSL = [];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getColorClassifications', query);\n }\n\n /**\n * Retrieves a list of timeseries release states.\n * @param params\n\n * @param {(String | String[] )} params.ts_id either ts_id or ts_path can be used,\n * @param {(String | String[] )} params.ts_path the timeseries path according to WISKI7; either ts_id or ts_path can be used,\n * @param {String} params.from see date formats,\n * @param {String} params.to see date formats, using yyyy-MM-dd as format includes the complete given day,\n * @param {String} params.period retrieve data for a time period according to ISO format P#Y#M#DT#H#M#S where P just indicates an arbitrary period with the # being integers; the entities are: Y=Year, M=Month, D=Day, T just indicates that smaller entities are included, H=Hour, M=Minute, S=Second; W=Week is also supported but mutually exclusive with D=Day setting; Examples: P3D, P1Y, P1DT12H, PT6H, P1Y6M3DT4H20M30S; all periods are applied by calendar\n\n\n\n * @param {String} format Possible formats as parameter [\"json\"]\n */\n\n getTimeseriesReleaseStateList(params = {}, format = 'objson') {\n let CSL = ['ts_id', 'ts_path'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getTimeseriesReleaseStateList', query);\n }\n\n /**\n * Retrieves a list of timeseries ensembles with values for one or more timeseries.\n * @param params\n\n * @param {(String | String[] )} params.ts_id either ts_id, ts_path or timeseriesgroup_id can be used,\n * @param {String} params.ts_path the timeseries path according to WISKI7; a single path with placeholders may be used or a comma separated list without placeholders; either ts_id, ts_path or timeseriesgroup_id can be used,\n * @param {(String | String[] )} params.timeseriesgroup_id either ts_id, ts_path or timeseriesgroup_id can be used,\n * @param {String} params.from see date formats,\n * @param {String} params.to see date formats, using yyyy-MM-dd as format includes the complete given day,\n * @param {String} params.period retrieve data for a time period according to ISO format P#Y#M#DT#H#M#S where P just indicates an arbitrary period with the # being integers; the entities are: Y=Year, M=Month, D=Day, T just indicates that smaller entities are included, H=Hour, M=Minute, S=Second; W=Week is also supported but mutually exclusive with D=Day setting; Examples: P3D, P1Y, P1DT12H, PT6H, P1Y6M3DT4H20M30S; all periods are applied by calendar,\n * @param {String} params.ensembledispatchinfo the dispatch info for which ensembles should be returned\n\n * @param {String} [params.downloadaszip] provides the result as a ZIP file containing a file in the selected format,\n * @param {String} [params.downloadfilename] sets the file name if downloadaszip=true is set or CSV and Excel downloads are requested, default name is generic per request,\n * @param {String} [params.dateformat] the date format that will be returned, see date formats,\n * @param {String} [params.timezone] the time zone that will be returned for all timestamps, any time zone string as understood by Java (e.g. GMT+5, UTC, CET),\n * @param {String} [params.useprecision] advises KiWIS to use the WISKI precision for value formatting, true or false; default is true\n\n\n * @param {String} format Possible formats as parameter [\"json\"]\n */\n\n getTimeseriesEnsembleValues(params = {}, format = 'objson') {\n let CSL = ['ts_id', 'timeseriesgroup_id'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n return this._request('getTimeseriesEnsembleValues', query);\n }\n\n getUrl(params = {}, returnfields, format = 'objson') {\n let CSL = ['group_name', 'supergroup_name'];\n CSL = CSL.concat([]);\n CSL.forEach(key => {\n if (params[key]) {\n params[key] = KIWIS._handleCSL(params[key]);\n }\n });\n const query = { format, ...params };\n\n if (returnfields) {\n query.returnfields = KIWIS._handleCSL(returnfields);\n }\n\n const url = new URL(this.basePath);\n url.search = new URLSearchParams({\n request: 'getTimeseriesValues',\n service: this.service,\n type: this.type,\n datasource: this.datasource,\n ...query,\n }).toString();\n return url.toString();\n }\n\n _request(request, query, nocache) {\n const url = new URL(this.basePath);\n url.search = new URLSearchParams({\n request,\n service: this.service,\n type: this.type,\n datasource: this.datasource,\n ...query,\n }).toString();\n const urlKey = url.toString();\n if (callcache[urlKey] && !nocache) {\n return callcache[urlKey];\n }\n const req = fetch(urlKey).then(resp => {\n if (query.format === 'objson' || query.format === 'json') {\n return resp.json();\n }\n return resp.text();\n });\n callcache[urlKey] = req;\n return req;\n }\n}\n","/* eslint-disable camelcase */\nimport { KiwisConfig } from './KiwisConfig';\n\nexport default class KiwisHelper {\n /** Detect and convert relative path to absolute path\n * @param windowLocation is required if a realtive path is supplied\n */\n public static resolveUrl(\n kiwisCfg: KiwisConfig,\n windowLocation?: Object,\n ): string {\n /** Catch absolute path */\n if (\n kiwisCfg.basePath &&\n kiwisCfg.basePath.includes('//') &&\n !kiwisCfg.basePath.startsWith('//')\n )\n return kiwisCfg.basePath;\n /** Build from relative path and location */\n if (kiwisCfg.basePath && windowLocation) {\n return this._buildAbsPath(kiwisCfg.basePath, windowLocation);\n }\n throw Error(\"Can't build kiwis path\");\n }\n\n static _buildAbsPath(relPath, loc): string {\n /** Absolute path without specified protocol (http and https) */\n if (relPath.startsWith('//')) return `${loc.protocol}${relPath}`;\n /** Relative path handling */\n if (relPath.startsWith('/')) return `${loc.origin}${relPath}`;\n return `${loc.origin}/${relPath}`;\n }\n\n public static buildTsPath(station, ts_shortname) {\n if (ts_shortname)\n return `${station.site_no}/${station.station_no}/${station.stationparameter_no}/${ts_shortname}`;\n return `${station.site_no}/${station.station_no}/${station.stationparameter_no}/${station.ts_shortname}`;\n }\n}\n","/* eslint-disable class-methods-use-this */\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html, LitElement } from 'lit';\nimport Highcharts from 'highcharts/highstock';\nimport nodata from 'highcharts/modules/no-data-to-display';\nimport boost from 'highcharts/modules/boost';\nimport more from 'highcharts/highcharts-more';\n\n@customElement('ww-graph-wrapper')\nexport default class WwGraphWrapper extends LitElement {\n highcharts = Highcharts;\n\n chart;\n\n @property({ type: Boolean })\n showLoading;\n\n @query('#chartcontainer')\n chartcontainer;\n\n @property({ type: Boolean })\n display;\n\n @property({ type: Array, attribute: false })\n series = [];\n\n constructor() {\n super();\n\n nodata(Highcharts);\n more(Highcharts);\n boost(Highcharts);\n }\n\n protected firstUpdated(): void {\n this.chart?.destroy();\n this.chart = new Highcharts.Chart({\n chart: {\n renderTo: this.chartcontainer,\n animation: false,\n },\n title: {\n text: '',\n },\n subtitle: {\n text: '',\n },\n exporting: {\n enabled: false,\n },\n legend: {\n enabled: false,\n },\n credits: {\n enabled: false,\n },\n xAxis: [\n {\n id: 'mainXAxis',\n type: 'datetime',\n },\n {\n visible: false,\n min: 1,\n max: 2,\n },\n ],\n yAxis: {\n id: 'mainYAxis',\n title: {\n text: '',\n },\n },\n plotOptions: {\n series: {\n animation: false,\n label: {\n enabled: false,\n },\n },\n },\n series: [],\n });\n }\n\n updated(changedProperties) {\n super.update(changedProperties);\n if (this.series) {\n if (changedProperties.has('series')) {\n this.chart.series.forEach(ser => {\n ser.remove(false);\n });\n this.series.forEach(ser => {\n this.chart.addSeries(ser, false);\n });\n this.chart.update({});\n }\n }\n }\n\n render() {\n return html``;\n }\n}\n","/* eslint-disable class-methods-use-this */\nimport { customElement } from 'lit/decorators.js';\nimport { getConfig } from '@kisters/wcp-base/app';\nimport { html } from 'lit';\nimport { KIWIS, KiwisHelper } from '@kisters/wcp-water/kiwis';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport WwMapPopupBase from './ww-map-popup-base';\nimport './ww-graph-wrapper';\n\nlet currentData = [];\nlet currentId;\n\nconst threshholdMappings = {\n 'Cmd.Sys.W.MNW': {\n width: 2,\n color: 'rgba(64,64,64, 1)',\n dashStyle: 'dash',\n label: {\n text: 'MNW',\n shortText: 'MNW',\n align: 'right',\n description: 'Mittleres Niedrigwasser*',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Sys.W.MW': {\n width: 2,\n color: 'rgba(64,64,64, 1)',\n dashStyle: 'dash',\n label: {\n text: 'MW',\n shortText: 'MW',\n align: 'right',\n description: 'Mittelwasser*',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Sys.W.MHW': {\n width: 2,\n color: 'rgba(64,64,64, 1)',\n dashStyle: 'dash',\n label: {\n text: 'MHW',\n shortText: 'MHW',\n align: 'right',\n description: 'Mittleres Hochwasser*',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Sys.W.N7W': {\n width: 2,\n color: 'rgba(197,142,69, 1)',\n dashStyle: 'dash',\n label: {\n text: 'N7W',\n shortText: 'N7W',\n align: 'center',\n description: 'Minimum der niedrigsten jährl. 7-Tages-Mittel*',\n y: 12,\n x: 25,\n },\n },\n 'Cmd.Sys.W.MN7W': {\n width: 2,\n color: 'rgba(255,221,128,1)',\n dashStyle: 'dash',\n label: {\n text: 'MN7W',\n shortText: 'MN7W',\n align: 'center',\n description: 'Mittel der niedrigsten jährl. 7-Tages-Mittel*',\n y: 12,\n x: -25,\n },\n },\n 'Cmd.Sys.W.HN7W': {\n width: 2,\n color: 'rgba(99,195,199,1)',\n dashStyle: 'dash',\n label: {\n text: 'HN7W',\n shortText: 'HN7W',\n align: 'center',\n description: 'Maximum der niedrigsten jährl. 7-Tages-Mittel*',\n y: 12,\n x: -75,\n },\n },\n 'Cmd.Sys.W.Info1': {\n width: 2,\n color: 'rgba(255, 231, 76, 1)',\n dashStyle: 'dash',\n label: {\n text: 'Informationswert 1',\n shortText: 'Info 1',\n align: 'left',\n description:\n 'Ggfs. Ausuferung des Gewässers, land- und forstwirtschaftliche Flächen können überflutet werden; leichte Verkehrsbehinderungen auf Hauptverkehrs- und Gemeindestraßen sind möglich.',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Sys.W.Info2': {\n width: 2,\n color: 'rgba(252, 186, 2, 1)',\n dashStyle: 'dash',\n label: {\n text: 'Informationswert 2',\n shortText: 'Info 2',\n align: 'left',\n description:\n 'Gefahr der Überflutung einzelner bebauter Grundstücke oder Keller; Sperrung überörtlicher Verkehrsverbindungen oder vereinzelter Einsatz der Wasser- oder Dammwehr (Feuerwehr, Katastrophenschutz) möglich.',\n y: 12,\n x: -5,\n },\n },\n 'Cmd.Sys.W.Info3': {\n width: 2,\n color: 'rgba(252, 81, 47, 1)',\n dashStyle: 'dash',\n label: {\n text: 'Informationswert 3',\n shortText: 'Info 3',\n align: 'left',\n description:\n 'Bebaute Gebiete in größerem Umfang können überflutet werden; Einsatz der Wasser- oder Dammwehr (Feuerwehr, Katastrophenschutz) in großem Umfang möglich.',\n y: 12,\n x: -5,\n },\n },\n};\n\n@customElement('ww-map-popup-dynamic')\nexport default class WwMapPopupDynamic extends WwMapPopupBase {\n constructor() {\n super();\n\n this.config = getConfig();\n this.kiwis = new KIWIS({\n basePath: KiwisHelper.resolveUrl(this.config?.kiwis, window.location),\n datasource: this.config?.kiwis.datasource || 0,\n });\n }\n\n kiwisReq(paths = [], from = '', to = '') {\n return this.kiwis.getTimeseriesValues(\n {\n dateformat: 'UNIX',\n ts_path: paths.join(),\n metadata: true,\n md_returnfields: 'ts_shortname,ts_name',\n from,\n to,\n },\n null,\n 'json',\n );\n }\n\n async getSeries(station) {\n if (this.layerAlias === 'Wasserstand') {\n const tsPath = station.ts_path || KiwisHelper.buildTsPath(station);\n const tsPathBase = tsPath.split('/').slice(0, 3).join('/');\n const alarms = [\n 'Cmd.Sys.W.Info1',\n 'Cmd.Sys.W.Info2',\n 'Cmd.Sys.W.Info3',\n ].map(item => `${tsPathBase}/${item}`);\n const tsData = await Promise.all([\n this.kiwisReq(\n [tsPath],\n dayjs().subtract(1, 'months').valueOf(),\n dayjs().valueOf(),\n ),\n this.kiwisReq(alarms),\n ]);\n const mainTsData = tsData[0][0].data ?? [];\n const maxValue = Math.max(...mainTsData.map(tsv => tsv[1]));\n return [\n {\n id: 'preview',\n type: 'line',\n data: mainTsData,\n },\n ...tsData[1]\n .sort((a, b) => a.ts_shortname.localeCompare(b.ts_shortname))\n .map((item, i) => ({\n ...threshholdMappings[item.ts_shortname],\n type: 'line',\n step: 'left',\n visible: i === 0 || (item.data[0] && item.data[0][1] < maxValue),\n name: item.ts_name,\n marker: { enabled: false },\n label: {\n enabled: true,\n style: {\n color: '#111111',\n },\n },\n xAxis: 1,\n data: [\n [1, item.data[0] ? item.data[0][1] : null],\n [2, item.data[0] ? item.data[0][1] : null],\n ],\n })),\n ];\n }\n\n if (this.layerAlias === 'Niedrigwasser') {\n const tsPath = station.ts_path || KiwisHelper.buildTsPath(station);\n const tsPathBase = tsPath.split('/').slice(0, 3).join('/');\n const alarms = ['Cmd.Sys.W.N7W', 'Cmd.Sys.W.MN7W', 'Cmd.Sys.W.HN7W'].map(\n item => `${tsPathBase}/${item}`,\n );\n const tsData = await Promise.all([\n this.kiwisReq(\n [tsPath],\n dayjs().subtract(1, 'months').valueOf(),\n dayjs().valueOf(),\n ),\n this.kiwisReq(alarms),\n ]);\n const mainTsData = tsData[0][0].data ?? [];\n return [\n {\n id: 'preview',\n type: 'line',\n data: mainTsData,\n },\n ...tsData[1]\n .sort((a, b) => a.ts_shortname.localeCompare(b.ts_shortname))\n .map(item => ({\n ...threshholdMappings[item.ts_shortname],\n type: 'line',\n step: 'left',\n\n name: item.ts_name,\n marker: { enabled: false },\n label: {\n enabled: true,\n style: {\n color: '#111111',\n },\n },\n xAxis: 1,\n data: [\n [1, item.data[0] ? item.data[0][1] : null],\n [2, item.data[0] ? item.data[0][1] : null],\n ],\n })),\n ];\n }\n\n const tsPath = station.ts_path || KiwisHelper.buildTsPath(station);\n const tsData = await Promise.all([\n this.kiwisReq(\n [tsPath],\n dayjs().subtract(1, 'months').valueOf(),\n dayjs().valueOf(),\n ),\n ]);\n const mainTsData = tsData[0][0].data ?? [];\n return [\n {\n id: 'preview',\n type: 'line',\n data: mainTsData,\n },\n ];\n }\n\n async getGraph() {\n const station = this.stations[0];\n const newId = station.ts_path || KiwisHelper.buildTsPath(station);\n if (currentId !== newId) {\n currentData = await this.getSeries(station);\n currentId = newId;\n }\n return html` `;\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport { customElement } from 'lit/decorators.js';\nimport { html, LitElement, css } from 'lit';\nimport sparkline from '@fnando/sparkline/src/sparkline';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\n\n@customElement('ki-wwp-sparkline')\nexport class KiWwpSparkline extends LitElement {\n data = [];\n\n static get properties() {\n return {\n data: { type: Array },\n };\n }\n\n static styles = css`\n *[hidden] {\n display: none;\n }\n\n .tooltip {\n position: fixed;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n padding: 2px 5px;\n font-size: 12px;\n white-space: nowrap;\n z-index: 9999;\n }\n\n .sparkline--cursor {\n stroke: orange;\n }\n\n .sparkline--spot {\n fill: red;\n stroke: red;\n }\n `;\n\n // eslint-disable-next-line class-methods-use-this\n _findClosest(target: { tagName: any; parentNode: any }, tagName: any) {\n if (target.tagName === tagName) {\n return target;\n }\n\n // eslint-disable-next-line no-cond-assign\n while ((target = target.parentNode)) {\n if (target.tagName === tagName) {\n break;\n }\n }\n\n return target;\n }\n\n protected firstUpdated(): void {\n const findClosest = (target, tagName) => {\n if (target.tagName === tagName) {\n return target;\n }\n\n // eslint-disable-next-line no-cond-assign\n while ((target = target.parentNode)) {\n if (target.tagName === tagName) {\n break;\n }\n }\n\n return target;\n };\n\n const options = {\n onmousemove(event, datapoint) {\n const svg = findClosest(event.target, 'svg');\n const tooltip = svg.nextElementSibling;\n const date = dayjs(datapoint.date).tz().format('L LT');\n\n tooltip.hidden = false;\n tooltip.textContent = `${date}: ${datapoint.value} ${datapoint.unit}`;\n tooltip.style.top = `${event.clientY}px`;\n tooltip.style.left = `${event.clientX + 20}px`;\n },\n\n onmouseout(event) {\n const svg = findClosest(event.target, 'svg');\n const tooltip = svg.nextElementSibling;\n\n tooltip.hidden = true;\n },\n };\n sparkline(this.renderRoot.querySelector('#sparkline'), this.data, options);\n }\n\n protected render(): unknown {\n return html``;\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport { filter, countBy, pickBy, every, orderBy } from 'lodash-es';\n\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n navigateTo,\n getRouteOptionsAndParams,\n} from '@kisters/wcp-base/components';\nimport {\n localStorageMixin,\n responsiveMixin,\n i18nMixin,\n getQueryObject,\n queryParamMixin,\n ViewPort,\n SM,\n} from '@kisters/wcp-base/decorators';\nimport {\n LoaderMixin,\n Mix,\n PropertyDefaultValue,\n} from '@kisters/wcp-base/common';\n\nimport LegendFactory from '@kisters/wcp-water/components/ki-station-map/LegendFactory';\nimport Classifier from '@kisters/wcp-water/components/ki-station-map/Classifier';\nimport { StatusIcon } from '@kisters/wcp-water/components/ki-status-icon/ki-status-icon';\nimport { getTrendArrow } from '@kisters/wcp-water/common/base';\n\nimport { html, LitElement } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport '@ui5/webcomponents/dist/Toast';\n\nimport { getCsvDelimiter } from '@kisters/wcp-base/components/ki-app/services/ki-app-config-service';\n\nimport { getCurrentApi } from '../../api/API';\n\nimport nls from '../../locales/index';\nimport style from './wwp-overview.css';\n\nimport { reproject, registerProjections } from '../../common/maputils';\nimport '../../components/ki-responsive-table/ki-responsive-table';\n\nimport '../../components/ki-wcp-wwp-filter/ki-wcp-wwp-filter';\nimport '../../components/common/ww-map-popup';\nimport '../../components/common/ww-map-popup-auto';\nimport '../../components/common/ww-map-popup-base';\nimport '../../components/common/ww-map-popup-precip';\nimport '../../components/common/ww-map-popup-dynamic';\n\nimport '../../components/ki-wwp-graph/ki-wwp-sparkline';\nimport { SortedBy } from './SortedBy';\n\n@customElement('wwp-overview')\nexport default class WwpOverview extends Mix(\n LitElement,\n LoaderMixin,\n PropertyDefaultValue,\n [\n localStorageMixin,\n { targetProperty: '__favouriteStationIds', typeParam: Array },\n ],\n [\n queryParamMixin,\n { targetProperty: 'mapOrTable', selector: 'mode', defaultValue: 'map' },\n ],\n [\n queryParamMixin,\n {\n targetProperty: 'filterContent',\n selector: 'filter',\n defaultValue: '{}',\n },\n ],\n [\n queryParamMixin,\n {\n targetProperty: 'searchContent',\n selector: 'search',\n defaultValue: '',\n },\n ],\n responsiveMixin,\n [i18nMixin, { nls }],\n) {\n @query('#map')\n stationMap;\n\n static styles = style;\n\n static get properties() {\n return {\n strictSearch: { type: Boolean },\n layersToggleAll: { type: Boolean },\n layersTreeList: { type: Boolean },\n layerName: { type: String },\n showCsvExport: { type: Boolean },\n _dataLayer: { type: Object },\n quickFilters: { type: Array, default: [] },\n homeExtent: { type: Array, default: [] },\n positionProjections: { type: Array, default: [] },\n _legends: { type: Array, default: [] },\n displayStationsInLayerControl: {\n type: Boolean,\n default: true,\n attribute: false,\n },\n _view: {\n type: Object,\n default: {\n projection: 'EPSG:3857',\n zoom: 8,\n },\n attribute: false,\n },\n layerGroups: {\n type: Array,\n default: [\n 'Layers',\n 'Information',\n { name: 'Backgrounds', type: 'radio' },\n ],\n attribute: false,\n },\n };\n }\n\n layersToggleAll = false;\n\n layersTreeList = false;\n\n _firstWWVisit = 'yes';\n\n _enableAutoZoom = false;\n\n tzFormat = 'zzz';\n\n zoomReset = false;\n\n refreshTimer = true;\n\n _filterContent = '{}';\n\n currentStationExtent = null;\n\n mapsLoaded = false;\n\n @property({ type: Boolean })\n hideFavoriteButton = false;\n\n get filterContent() {\n return this._filterContent;\n }\n\n set filterContent(value) {\n this._filterContent = value;\n this.requestUpdate();\n }\n\n // eslint-disable-next-line no-undef\n cachePrefix = __APP_NAME__;\n\n // eslint-disable-next-line no-undef\n version = __APP_VERSION__;\n\n _searchContent = '';\n\n get searchContent() {\n return this._searchContent;\n }\n\n set searchContent(value) {\n this._searchContent = value;\n this.requestUpdate();\n }\n\n _mapOrTable = 'map';\n\n api = getCurrentApi();\n\n get mapOrTable() {\n return this._mapOrTable;\n }\n\n set mapOrTable(value) {\n this._mapOrTable = value;\n this.requestUpdate();\n }\n\n ___favouriteStationIds = [];\n\n get __favouriteStationIds() {\n return this.___favouriteStationIds;\n }\n\n set __favouriteStationIds(value) {\n this.___favouriteStationIds = value;\n this.requestUpdate();\n }\n\n get searchBox() {\n return getQueryObject(this, '#searchbox');\n }\n\n overViewLayer = {\n layer: [],\n };\n\n connectedCallback() {\n if (super.connectedCallback) super.connectedCallback();\n this.addEventListener('toggledPopupColumnHider', this._toggleLegend);\n\n this._loader._$loaderCount = 1;\n this.refresh = setInterval(() => {\n if (this.refreshTimer) {\n this.getDataLayer(true);\n }\n }, 60000);\n this._firstWWVisit = sessionStorage.getItem('firstWWVisit');\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) super.disconnectedCallback();\n this.removeEventListener('toggledPopupColumnHider', this._toggleLegend);\n clearInterval(this.refresh);\n }\n\n _toggleLegend(e) {\n const l = this.shadowRoot.querySelector('#overview-legend');\n if (l && e.detail?.visible === true) l.collapsed = true;\n }\n\n exportTable() {\n const table = getQueryObject(this, 'ki-responsive-table');\n\n if (table) {\n navigator.clipboard.writeText(table.toCSV(getCsvDelimiter())).then(\n () => {\n getQueryObject(this, '#DownloadSuccessToast').show();\n },\n () => {\n getQueryObject(this, '#DownloadFailureToast').show();\n },\n );\n } else {\n getQueryObject(this, '#DownloadNoTableToast').show();\n }\n }\n\n get _switcherOptions() {\n return [\n { label: 'Map', value: 'map', icon: 'ki ki-map' },\n { label: 'Table', value: 'table', icon: 'ki ki-table' },\n ].map(tab => ({\n label: this.i18n.t(tab.label),\n value: tab.value,\n icon: tab.icon,\n }));\n }\n\n // eslint-disable-next-line class-methods-use-this\n get localStorageId() {\n return `wwp-favorites-ids`;\n }\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n onAfterEnter(location) {\n this.filterContent = '{}';\n const params = getRouteOptionsAndParams(location, ['layerName']);\n this.layerName = params.layerName;\n Object.assign(this, params.options);\n }\n\n // eslint-disable-next-line class-methods-use-this\n additionalContent() {\n return html``;\n }\n\n // eslint-disable-next-line class-methods-use-this\n parseData(data) {\n return data;\n }\n\n enableAutoZoom() {\n this._enableAutoZoom = true;\n setTimeout(() => {\n this._enableAutoZoom = false;\n }, 50);\n }\n\n render() {\n // eslint-disable-next-line wc/no-self-class\n this.classList.toggle('table', this.mapOrTable === 'table');\n // TODO rename ki-station-layer to ki-maker-layer or value layer ?\n // language=html\n if (this.currentLayer !== this.layerName) {\n this.getDataLayer();\n }\n return (\n this._renderLoader() ||\n html`\n ${this.additionalContent()}\n\n {\n this.enableAutoZoom();\n this.searchContent = e.detail.value;\n }}\"\n >\n \n ${this.showCsvExport && this.mapOrTable === 'table'\n ? this.renderExportButton()\n : html``}\n {\n this.enableAutoZoom();\n this.filterContent = JSON.stringify(e.detail.value);\n }}\"\n >\n \n {\n this.enableAutoZoom();\n this.mapOrTable = e.detail.value;\n }}\"\n >\n \n
\n ${this.mapOrTable === 'table' ? this.renderTable() : html``}\n
\n
\n ${this.mapOrTable === 'map' ? this.renderMap() : html``}\n
\n
\n \n
\n ${this.mapLastSyncedLabel\n ? this.mapLastSyncedLabel\n : this.i18n.t('lastupdated')}:\n ${dayjs.tz(this._dataLayer.creationDateInMillis).format('L LT')}\n ${this.__getTimezone()}\n
\n `\n );\n }\n\n __getTimezone() {\n if (this.tzFormat) {\n return this.i18n.exists(\n encodeURIComponent(dayjs().tz().format(this.tzFormat)),\n )\n ? this.i18n.t(encodeURIComponent(dayjs().tz().format(this.tzFormat)))\n : dayjs().tz().format(this.tzFormat);\n }\n return '';\n }\n\n renderExportButton() {\n return html`\n ${this.i18n.t('copyTableMessage')}\n ${this.i18n.t('copyTableNoTableMessage')}\n ${this.i18n.t('copyTableFailureMessage')}`;\n }\n\n get filteredStations() {\n const regex = new RegExp(\n `${\n this.strictSearch\n ? `^${this.searchContent.replaceAll('*', '.')}`\n : this.searchContent.replaceAll('*', '.')\n }`,\n 'i',\n );\n let filterOptions = JSON.parse(this.filterContent);\n\n if (filterOptions && this._dataLayer.config.filter) {\n filterOptions = pickBy(filterOptions, (value, key) =>\n this._dataLayer.config.filter.some(\n f => f.field === key || key === 'fav',\n ),\n );\n }\n\n let searchData = this._dataLayer.data?.filter(\n s =>\n regex.test(s.station_longname || s.station_name) ||\n regex.test(s.station_no),\n );\n if (filterOptions.fav) {\n searchData = searchData.filter(s =>\n this.__favouriteStationIds.includes(s.station_id),\n );\n }\n delete filterOptions.fav;\n return filter(searchData, obj =>\n every(filterOptions, (value, key) => {\n const val = obj[key] && obj[key].toString();\n return Array.isArray(value) ? value.includes(val) : val === value;\n }),\n ).filter(s => {\n const tag = s.__tag;\n if (tag && this._legends.length > 0) {\n return tag.split('|').every(t => this._legends.indexOf(t) !== -1);\n }\n return true;\n });\n }\n\n get quickFilters() {\n return this._dataLayer.config?.filter || [];\n }\n\n get popup() {\n return this._dataLayer.config?.popup || 'ww-map-popup';\n }\n\n get sortedBy(): Array {\n return this._dataLayer.config?.sortedBy;\n }\n\n // Presort by\n renderTable() {\n return html``;\n }\n\n _initialOrder(filteredStations: Array) {\n // Transform provided dataset from layercfg\n const fields: Array = []; // field name\n const orders: Array<'asc' | 'desc'> = [];\n if (this.sortedBy && Array.isArray(this.sortedBy)) {\n this.sortedBy.forEach(_sort => {\n _sort.ascending ? orders.push('asc') : orders.push('desc');\n _sort.sortBy ? fields.push(_sort.sortBy) : fields.push(_sort.field);\n });\n return orderBy(filteredStations, fields, orders);\n }\n return filteredStations;\n }\n\n renderMap() {\n return html`\n ${this._dataLayer.config.popupControl\n ? html``\n : html``}\n\n {\n if (\n this.zoomReset ||\n this._enableAutoZoom ||\n this._firstWWVisit !== 'no'\n ) {\n this.stationMap.zoomTo(\n e.detail.extent,\n this._enableAutoZoom ? 500 : 0,\n this.extentBuffer,\n );\n this._firstWWVisit = 'no';\n sessionStorage.setItem('firstWWVisit', 'no');\n }\n }}\"\n >\n \n \n \n \n \n \n `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n showStation(e) {\n // TODO provide route-link , route.linkTo\n // TODO site_no ?\n const station = e.detail.data;\n const label = station.station_longname || station.station_name;\n if (station.external && station.projectName)\n /** Go to project detail page, see ww-worldmap\n * station_id ~ project_id\n * */\n window.open(\n `#/overview/${this.layerName}/${station.station_id}`,\n '_self',\n );\n else if (station.external && station.url) {\n window.open(station.url, '_new');\n } else if (station.URLEXTERN) {\n window.open(station.URLEXTERN, '_new');\n } else {\n let navigationPath = `/overview/${this.layerName}/station/${\n station.station_id\n }/${encodeURIComponent(label)}`;\n\n let detailPaths =\n this.detailsPaths?.filter(path => path.layerName === this.layerName) ??\n [];\n\n const anyHits = detailPaths.filter(path => {\n if (!path.anyParameters) {\n return false;\n }\n\n for (const param of path.anyParameters) {\n if (station.ts_values[param]) {\n return true;\n }\n }\n return false;\n });\n\n const allHits = detailPaths.filter(path => {\n if (!path.parameters) {\n return false;\n }\n\n for (const param of path.parameters) {\n if (!station.ts_values[param]) {\n return false;\n }\n }\n return true;\n });\n\n detailPaths = detailPaths.filter(\n path => !path.anyParameters && !path.parameters,\n );\n\n let detailPath;\n\n /* eslint-disable prefer-destructuring */\n if (anyHits.length > 0) {\n detailPath = anyHits[0];\n } else if (allHits.length > 0) {\n detailPath = allHits[0];\n } else if (detailPaths.length > 0) {\n detailPath = detailPaths[0];\n }\n /* eslint-enable prefer-destructuring */\n\n if (detailPath) {\n navigationPath = `${navigationPath}/${detailPath.detailsPath}`;\n }\n\n navigateTo(`${navigationPath}?mode=${this.mapOrTable}`);\n }\n }\n\n async getDataLayer(sameLayer: boolean = false) {\n if (!this.mapsLoaded) {\n const mapConfig = await this.api.getMapConfig();\n this.mapConfig = mapConfig;\n }\n if (this.layerName) {\n this.currentLayer = this.layerName;\n\n let resp;\n try {\n resp = await this.api.getLayer(this.layerName);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(\n `error loading layer \"${this.layerName}\". Going back to start...`,\n );\n navigateTo('/');\n return;\n }\n\n if (!resp?.config) {\n // eslint-disable-next-line no-console\n console.warn(\n `layer \"${this.layerName}\" not found or has no config. Going back to start`,\n );\n navigateTo('/');\n return;\n }\n\n if (this.zoomReset && sessionStorage) {\n sessionStorage.removeItem(`${this.cachePrefix}-ki-station-map-zoom`);\n }\n\n resp.data = reproject(resp.data, this.mapConfig);\n // console.time('clientFilter');\n\n if (this.parameterFilterAttribute) {\n try {\n resp.data.forEach(station => {\n if (station[this.parameterFilterAttribute]) {\n const parFilter = JSON.parse(\n station[this.parameterFilterAttribute],\n );\n if (Array.isArray(parFilter) && parFilter.length !== 0) {\n Object.keys(station.ts_values).forEach(par => {\n if (!parFilter.includes(par)) {\n delete station.ts_values[par];\n }\n });\n }\n }\n });\n resp.data = resp.data.filter(\n item => Object.keys(item.ts_values).length,\n );\n } catch (e) {\n console.error('invalid parameterFilterAttribute');\n }\n }\n\n resp.data.forEach(item => {\n if (item.ts_value) item.ts_value = parseFloat(item.ts_value);\n if (item.ts_values?.temp?.ts_value)\n item.ts_values.temp.ts_value = parseFloat(\n item.ts_values.temp.ts_value,\n );\n });\n // console.timeEnd('clientFilter');\n const data = new Classifier(resp.config.classification).classify(\n this.parseData(resp.data),\n );\n const tagCount =\n resp.config.classification.tagCount !== false\n ? countBy(data, '__tag')\n : null;\n this._loader._$loaderCount = 0;\n this._dataLayer = {\n config: resp.config,\n data,\n tagCount,\n creationDateInMillis: resp.creationDateInMillis,\n };\n if (!sameLayer) {\n this._legends = [];\n }\n if (!this.mapsLoaded) {\n registerProjections(this.mapConfig);\n this._view = this.mapConfig.view || this._view;\n this.homeExtent = this.mapConfig.homeExtent;\n this.homeExtentMobile =\n this.mapConfig.homeExtentMobile ?? this.mapConfig.homeExtent;\n this.positionProjections = this.mapConfig.positionProjections;\n this.displayStationsInLayerControl =\n this.mapConfig.displayStationsInLayerControl;\n this.mapsLoaded = true;\n }\n this.requestUpdate();\n }\n }\n\n get legendFactory() {\n return new LegendFactory(this._dataLayer.config.classification);\n }\n\n get legendOptions() {\n const opts = this.legendFactory.getLegendOptions();\n return [{ ...opts, tagCount: this._dataLayer.tagCount }];\n }\n\n get formatters() {\n const factory = this.legendFactory;\n return {\n status(val, locale, col) {\n return StatusIcon(factory.pngs[val], factory.labels[val], col);\n },\n info(val, locale, col) {\n // todo move into options.\n return val\n ? html`
\n \n
`\n : html`
`;\n },\n trend(val) {\n const trend =\n val !== null && val !== undefined\n ? `transform: rotateZ(${getTrendArrow(val)}deg)`\n : 'display:none;';\n return html`
\n \n
`;\n },\n sparkline(val, opts, col, item) {\n const vals = opts.options.values\n .map(value => ({\n unit: item?.ts_values[item.mainParameter]?.ts_unitsymbol,\n name: item?.ts_values[item.mainParameter]\n ?.stationparameter_longname,\n value: item[value],\n date: item[value.replace('ts_value', 'timestamp')],\n }))\n .filter(f => f.value);\n return html` `;\n },\n };\n }\n\n legendChanged(e) {\n this._legends = e.detail.value;\n }\n}\n","/* eslint-disable lit-a11y/mouse-events-have-key-events */\n/* eslint-disable lit-a11y/click-events-have-key-events */\nimport { html, css, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport '../ki-icon/ki-icon-btn';\n\nconst popupBeforeLeft = 13;\n\nconst getRelativePosAndPercentageFromMouseEventOnBar = e => {\n const targetwidth = e.target.clientWidth;\n const targetX = e.target.getBoundingClientRect().x;\n const mouseX = e.x;\n const pointedX = mouseX - targetX;\n const percentage = (pointedX * 100) / targetwidth;\n\n return { pointedX, percentage };\n};\n\n@customElement('ki-progress-bar')\nexport default class KiProgressBar extends LitElement {\n static styles = css`\n :host {\n width: 100%;\n display: block;\n }\n .progress-bar-container {\n padding-top: 33px;\n width: 100%;\n height: 8px;\n }\n .progress-bar {\n height: 8px;\n }\n .left-border-rounded {\n border-bottom-left-radius: 8px;\n border-top-left-radius: 8px;\n }\n .right-border-rounded {\n border-bottom-right-radius: 8px;\n border-top-right-radius: 8px;\n }\n .progress-bar-background {\n width: 100%;\n cursor: pointer;\n background-color: gray;\n }\n .progress-status-bar {\n pointer-events: none;\n position: relative;\n top: -8px;\n background-color: green;\n }\n .smooth-transition {\n -webkit-transition: width ease-in-out 0.7s;\n transition: width ease-in-out 0.7s;\n }\n .popup {\n pointer-events: none;\n position: absolute;\n display: block;\n box-sizing: border-box;\n padding: 3px;\n top: 0px;\n z-index: 999;\n border: 1px solid black;\n background: white;\n border-radius: 5px;\n margin-left: 250px;\n }\n .popup::before {\n pointer-events: none;\n top: 100%;\n left: ${popupBeforeLeft}px;\n border: solid transparent;\n content: '';\n height: 0;\n width: 0;\n position: absolute;\n border-top-color: black;\n border-width: 0.5em;\n margin-left: -0.5em;\n }\n `;\n\n @property({ type: Object, attribute: false })\n currentPopupItem:\n | {\n label: string;\n untilPercentage: number;\n }\n | undefined;\n\n /**\n * Percentage steps on right/left arrow key.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n keyDownSteps: number = 5;\n\n /**\n * Width of the legend popup.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n popupWidth: number = 140;\n\n @property({ type: Number, attribute: false })\n popupMarginLeft: number = 0;\n\n /**\n * Items for showing on hover.\n *\n * @type {Array<{ label: string, untilPercentage: number, }>}\n */\n @property({ type: Array, attribute: true })\n popupItems: Array<{\n label: string;\n untilPercentage: number;\n }> = [];\n\n /**\n * Current status.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n statusPercentage: number = 0;\n\n @property({ type: Boolean, attribute: false })\n trackMovement: boolean = false;\n\n @property({ type: Boolean, attribute: false })\n forcePopup: boolean = false;\n\n clickBackground(e): void {\n this.trackMovement = false;\n this.updateStatus(e);\n }\n\n connectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.connectedCallback();\n window.addEventListener('mouseup', this.mouseUp);\n window.addEventListener('keydown', this.keyDown);\n }\n\n disconnectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.disconnectedCallback();\n window.removeEventListener('mouseup', this.mouseUp);\n window.addEventListener('keydown', this.keyDown);\n }\n\n updated(_changedProperties: Map): void {\n if (\n _changedProperties.has('popupItems') &&\n !_changedProperties.has('forcePopup')\n ) {\n this.mouseLeaveBar();\n }\n }\n\n updateStatus(e) {\n const { percentage } = getRelativePosAndPercentageFromMouseEventOnBar(e);\n\n this.statusPercentage = percentage;\n this.emitProgressChange();\n }\n\n emitProgressChange() {\n const options = {\n detail: { newPercentage: this.statusPercentage },\n bubbles: true,\n composed: true,\n };\n this.dispatchEvent(new CustomEvent('progressChange', options));\n }\n\n mouseOverBar(e): void {\n if (this.trackMovement) {\n this.updateStatus(e);\n }\n const { percentage, pointedX } =\n getRelativePosAndPercentageFromMouseEventOnBar(e);\n // -15 so that the arrow aligns with the mouse\n this.popupMarginLeft = pointedX - 15;\n this.setCurrentPopupItem(percentage);\n this.requestUpdate();\n }\n\n mouseDown(): void {\n this.trackMovement = true;\n }\n\n mouseUp(): void {\n this.trackMovement = false;\n }\n\n mouseLeaveBar(): void {\n this.currentPopupItem = undefined;\n this.requestUpdate();\n }\n\n keyDown = (e): void => {\n switch (e.key) {\n case 'ArrowLeft':\n this.statusPercentage -= this.keyDownSteps;\n this.emitProgressChange();\n break;\n case 'ArrowRight':\n this.statusPercentage += this.keyDownSteps;\n this.emitProgressChange();\n break;\n default:\n break;\n }\n };\n\n setCurrentPopupItem(percentage: number) {\n let newElement;\n this.popupItems\n .filter(item => item.untilPercentage >= percentage)\n .forEach(item => {\n if (!newElement || newElement.untilPercentage > item.untilPercentage) {\n newElement = item;\n }\n });\n this.currentPopupItem = newElement;\n }\n\n renderPopup() {\n if (this.forcePopup) {\n this.setCurrentPopupItem(this.statusPercentage);\n this.popupMarginLeft =\n (this.clientWidth * this.statusPercentage) / 100 - 15;\n }\n let marginDifference = 0;\n if (this.popupMarginLeft + this.popupWidth > this.clientWidth) {\n const oldMargin = this.popupMarginLeft;\n this.popupMarginLeft = this.clientWidth - this.popupWidth;\n marginDifference = oldMargin - this.popupMarginLeft;\n }\n return this.currentPopupItem !== undefined\n ? html`\n ${marginDifference !== 0\n ? html`\n \n `\n : ''}\n \n ${this.currentPopupItem.label}\n \n `\n : html``;\n }\n\n render() {\n return html`\n
\n
\n = 99\n ? 'right-border-rounded'\n : ''} ${this.trackMovement ? '' : 'smooth-transition'}\"\n .style=\"width: ${this.statusPercentage}%\"\n >\n ${this.renderPopup()}\n \n `;\n }\n}\n","/* eslint-disable lit-a11y/click-events-have-key-events */\nimport { html, css, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { getQueryObject } from '../../decorators/query';\nimport './ki-progress-bar';\n\n// eslint-disable-next-line no-shadow\nexport enum legendType {\n legendEntries,\n minMax,\n}\n\nexport interface LegendEntryChild {\n label: string;\n untilPercentage: number;\n}\n\nexport interface LegendEntry {\n labelPosition: string;\n label: string;\n untilPercentage: number;\n children: Array;\n}\n\nexport interface MinMaxConfig {\n minLabel: string;\n maxLabel: string;\n children: Array;\n}\n\n@customElement('ki-progress-bar-legend')\nexport default class KiProgressBarLegend extends LitElement {\n static styles = css`\n :host {\n width: 100%;\n display: block;\n }\n .legend-container {\n overflow: hidden;\n width: 100%;\n height: 24px;\n }\n .left-border {\n border-left: 1px solid black;\n }\n .legend-entry {\n overflow: hidden;\n cursor: pointer;\n padding-left: 5px;\n height: 100%;\n float: left;\n clear: none;\n }\n .min-max-container {\n display: flex;\n width: 100%;\n height: 100%;\n flex-direction: row;\n }\n .min-max-item {\n margin-top: 5px;\n }\n .min-max-item-left {\n margin-left: 5px;\n }\n .min-max-item-center {\n flex: 1;\n }\n .min-max-item-right {\n margin-right: 5px;\n }\n `;\n\n /**\n * Auto show popup in progess.\n *\n * @type {number}\n */\n @property({ type: Boolean, attribute: true })\n forcePopup: Boolean = false;\n\n /**\n * Percentage steps on right/left arrow key.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n keyDownSteps: number = 5;\n\n /**\n * Width of the legend popup.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n popupWidth: number = 140;\n\n /**\n * Current status.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n statusPercentage: number = 0;\n\n /**\n * The legend entries. Each entry has a label and a max percentage.\n * Children are the entries shown on hover. The `untilPercentage` of each child is relative to its parent.\n *\n * @type {Array}\n */\n @property({ type: Array, attribute: true })\n legendEntries: Array = [];\n\n /**\n * The type of legend. (legendEntries, minMax)\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n legendType: legendType = legendType.legendEntries;\n\n /**\n * The configuration for the legend. Consists of label for min and max value.\n * Children are the entries shown on hover. The `untilPercentage` of each child is relative to the whole bar.\n *\n * @type {{ minLabel: string; maxLabel: string, children: Array<{ label: string; untilPercentage: number}> }}\n */\n @property({ type: Object, attribute: true })\n minMaxConfig: MinMaxConfig | undefined;\n\n getPopupItems() {\n switch (this.legendType) {\n default:\n case legendType.legendEntries:\n return this.getPopupItemsFromLegendEntries();\n case legendType.minMax:\n return this.minMaxConfig?.children ?? [];\n }\n }\n\n getPopupItemsFromLegendEntries() {\n const popupItems: Array<{ label: string; untilPercentage: number }> = [];\n let lastPercentage = 0;\n this.legendEntries.forEach(entry => {\n const percentageRange = entry.untilPercentage - lastPercentage;\n entry.children.forEach(child => {\n const absolutePercentage =\n lastPercentage + (percentageRange * child.untilPercentage) / 100;\n const { label } = child;\n\n popupItems.push({\n label,\n untilPercentage: absolutePercentage,\n });\n });\n\n if (\n popupItems.length === 0 ||\n popupItems[popupItems.length - 1].untilPercentage <\n entry.untilPercentage\n ) {\n popupItems.push({\n label: entry.label,\n untilPercentage: entry.untilPercentage,\n });\n }\n\n lastPercentage = entry.untilPercentage;\n });\n\n return popupItems;\n }\n\n connectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.connectedCallback();\n window.addEventListener('resize', this.handleResize);\n }\n\n disconnectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.disconnectedCallback();\n window.removeEventListener('resize', this.handleResize);\n }\n\n handleResize = (): void => {\n this.requestUpdate();\n };\n\n jumpToPercentage(percentage): void {\n this.updatePercentage(percentage);\n }\n\n emitProgressChange(e): void {\n this.updatePercentage(e.detail.newPercentage);\n }\n\n updatePercentage(percentage) {\n let newPercentage = percentage;\n if (newPercentage < 0) {\n newPercentage = 0;\n }\n if (newPercentage > 100) {\n newPercentage = 100;\n }\n this.statusPercentage = newPercentage;\n this.dispatchEvent(\n new CustomEvent('progressChange', {\n detail: { newPercentage },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n renderLegend() {\n const maxWidth = getQueryObject(this, '#progress-bar')?.offsetWidth;\n\n switch (this.legendType) {\n default:\n case legendType.legendEntries:\n return this.renderEntries(maxWidth);\n case legendType.minMax:\n return this.renderMinMax();\n }\n }\n\n renderLegendEntry(\n entry: { label: string; untilPercentage: number; labelPosition: string },\n firstEntry: boolean,\n lastEntry: boolean,\n lastPercentage: number | undefined,\n maxWidth: number,\n ) {\n const lastPercentageNumber = lastPercentage ?? 0;\n const newWidth =\n ((entry.untilPercentage - lastPercentageNumber) * maxWidth) / 100 -\n (firstEntry ? 5 : 6) -\n (lastEntry ? 1 : 0);\n\n return html`\n {\n this.jumpToPercentage(lastPercentageNumber);\n }}\n >\n ${entry.label}\n \n `;\n }\n\n renderEntries(maxWidth) {\n let lastItem: { label: string; untilPercentage: number };\n return this.legendEntries.map((entry, index) => {\n const lastPercentage = lastItem?.untilPercentage;\n const last = index === this.legendEntries.length - 1;\n lastItem = entry;\n return this.renderLegendEntry(\n entry,\n lastPercentage === undefined,\n last,\n lastPercentage,\n maxWidth,\n );\n });\n }\n\n renderMinMax() {\n if (!this.minMaxConfig) {\n return html``;\n }\n return html`
\n
\n ${this.minMaxConfig.minLabel}\n
\n
\n
\n ${this.minMaxConfig.maxLabel}\n
\n
`;\n }\n\n protected firstUpdated(): void {\n this.requestUpdate();\n }\n\n render() {\n return html`\n \n
${this.renderLegend()}
\n `;\n }\n}\n","/* eslint-disable lit-a11y/click-events-have-key-events */\nimport { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/extensions\nimport { customElement, property } from 'lit/decorators.js';\n\n/* eslint-disable import/no-extraneous-dependencies */\nimport '@ui5/webcomponents/dist/Popover';\nimport '@ui5/webcomponents/dist/List';\nimport '@ui5/webcomponents/dist/ListItem';\n/* eslint-enable import/no-extraneous-dependencies */\n\nimport { getQueryObject } from '../../decorators/query';\nimport { i18nMixin } from '../../decorators/i18n';\n\nimport nls from '../../locales/index';\n\ninterface Speed {\n label: string;\n value: number;\n}\n\n// @ts-expect-error\n@customElement('ki-player-speed-chooser')\nexport default class KiPlayerSpeedChooser extends i18nMixin(LitElement, {\n nls,\n}) {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n width: 40px;\n height: 40px;\n border-radius: 40px;\n background: white;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n cursor: pointer;\n position: relative;\n }\n .speed-chooser {\n cursor: pointer;\n }\n .closepopup {\n text-decoration: underline;\n cursor: pointer;\n }\n .speed-popup {\n cursor: default;\n }\n `;\n\n /**\n * Playback speed.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n speed: number = 1;\n\n @property({ type: Array, attribute: false })\n speeds: Array = [\n {\n label: '2x',\n value: 2,\n },\n {\n label: '1.75x',\n value: 1.75,\n },\n {\n label: '1.5x',\n value: 1.5,\n },\n {\n label: '1.25x',\n value: 1.25,\n },\n {\n label: '1x',\n value: 1,\n },\n {\n label: '0.75x',\n value: 0.75,\n },\n {\n label: '0.5x',\n value: 0.5,\n },\n {\n label: '0.25x',\n value: 0.25,\n },\n ];\n\n @property({ type: Boolean, attribute: false })\n popupOpened: boolean = false;\n\n get chooser() {\n return getQueryObject(this, '.speed-chooser');\n }\n\n get popup() {\n return getQueryObject(this, '.speed-popup');\n }\n\n constructor() {\n super();\n this.addEventListener('click', this.togglePopup);\n }\n\n dispatchSpeedChange(newSpeed: number): void {\n this.dispatchEvent(\n new CustomEvent('speedChange', {\n detail: { newSpeed },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n render() {\n return html`\n
${this.speed}x
\n\n \n
\n \n ${this.speeds.map(speed => this._renderListItem(speed))}\n \n
\n
\n `;\n }\n\n _renderListItem(item: Speed) {\n return html`${item.label}`;\n }\n\n selectionChanged(e) {\n const { selectedItems } = e.detail;\n if (!selectedItems || selectedItems.length <= 0) {\n return;\n }\n\n const selectedText = selectedItems[0].textContent;\n const selectedSpeed = this.speeds.find(\n speed => speed.label === selectedText,\n );\n if (!selectedSpeed) {\n return;\n }\n this.speed = selectedSpeed.value;\n this.dispatchSpeedChange(this.speed);\n }\n\n togglePopup() {\n if (this.popupOpened) {\n this.closePopup();\n } else {\n this.openPopup();\n }\n }\n\n openPopup() {\n this.popupOpened = true;\n this.popup.showAt(this.chooser);\n }\n\n closePopup() {\n this.popupOpened = false;\n this.popup.close();\n }\n}\n","/* eslint-disable lit-a11y/click-events-have-key-events */\nimport { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/extensions\nimport { customElement, property } from 'lit/decorators.js';\n\nimport '../ki-icon/ki-icon-btn';\nimport { legendType } from './ki-progress-bar-legend';\nimport './ki-player-speed-chooser';\n\nconst playAccuracy = 0.001;\n\n@customElement('ki-player')\nexport default class KiPlayer extends LitElement {\n static styles = css`\n :host {\n width: 100%;\n display: block;\n }\n .player-container {\n width: 100%;\n display: flex;\n flex-direction: row;\n }\n .button-container {\n width: 150px;\n padding-right: 10px;\n display: flex;\n flex-direction: row;\n }\n .no-left-radius {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n .no-right-radius {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n .left-button {\n margin-left: 2px;\n }\n .button-element {\n margin-top: 15px;\n }\n .speed-chooser {\n margin-left: 10px;\n }\n .button-element:hover {\n background-color: lightgray;\n }\n ki-progress-bar-legend {\n flex: 1;\n }\n `;\n\n @property({ type: Boolean, attribute: false })\n playing: boolean = false;\n\n @property({ type: Number, attribute: false })\n playInterval: number | undefined;\n\n /**\n * Percentage steps on right/left arrow key.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n keyDownSteps: number = 5;\n\n /**\n * How many playing steps there are.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n playSteps: number = 100;\n\n get tickSize(): number {\n return 100 / this.playSteps;\n }\n\n /**\n * Time in ms every tick should take.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n playTickTime: number = 1000;\n\n /**\n * Width of the legend popup.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n popupWidth: number = 140;\n\n /**\n * Current status.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n statusPercentage: number = 0;\n\n /**\n * Playback speed.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n speed: number = 1;\n\n /**\n * Current tick.\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n tickStatus: number = 0;\n\n /**\n * The legend entries. Each entry has a label and a max percentage.\n * Children are the entries shown on hover. The `untilPercentage` of each child is relative to its parent.\n *\n * @type {Array<{ label: string; untilPercentage: number, children: Array<{ label: string; untilPercentage: number}> }>}\n */\n @property({ type: Array, attribute: true })\n legendEntries: Array<{\n label: string;\n untilPercentage: number;\n children: Array<{ label: string; untilPercentage: number }>;\n }> = [];\n\n /**\n * The type of legend. (legendEntries, minMax)\n *\n * @type {number}\n */\n @property({ type: Number, attribute: true })\n legendType: legendType = legendType.legendEntries;\n\n /**\n * The configuration for the legend. Consists of label for min and max value.\n * Children are the entries shown on hover. The `untilPercentage` of each child is relative to the whole bar.\n *\n * @type {{ minLabel: string; maxLabel: string, children: Array<{ label: string; untilPercentage: number}> }}\n */\n @property({ type: Object, attribute: true })\n minMaxConfig:\n | {\n minLabel: string;\n maxLabel: string;\n children: Array<{ label: string; untilPercentage: number }>;\n }\n | undefined;\n\n disconnectedCallback(): void {\n // eslint-disable-next-line wc/guard-super-call\n super.disconnectedCallback();\n if (this.playInterval) {\n clearInterval(this.playInterval);\n this.playInterval = undefined;\n }\n }\n\n dispatchProgressChange(newPercentage: number, newTicks: number): void {\n this.dispatchEvent(\n new CustomEvent('progressChangePlayer', {\n detail: { newPercentage, newTicks },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n emitProgressChange(e): void {\n this.updatePercentage(e.detail.newPercentage);\n }\n\n updatePercentage(percentage) {\n let newPercentage = percentage;\n if (newPercentage < 0) {\n newPercentage = 0;\n }\n if (newPercentage > 100) {\n newPercentage = 100;\n }\n this.statusPercentage = newPercentage;\n\n let newTicks = newPercentage / this.tickSize;\n\n newTicks = Math.floor(newTicks);\n this.tickStatus = newTicks;\n\n this.dispatchProgressChange(newPercentage, newTicks);\n }\n\n updateTicks(ticks) {\n let newTicks = ticks;\n if (newTicks < 0) {\n newTicks = 0;\n }\n if (newTicks > this.playSteps) {\n newTicks = this.playSteps;\n }\n this.tickStatus = newTicks;\n\n this.statusPercentage = this.tickSize * newTicks;\n\n this.dispatchProgressChange(this.statusPercentage, newTicks);\n }\n\n speedChanged(e) {\n const { newSpeed } = e.detail;\n this.speed = newSpeed;\n if (this.playing) {\n this.togglePlay();\n this.togglePlay();\n }\n }\n\n togglePlay() {\n this.playing = !this.playing;\n if (this.playing && !this.playInterval) {\n this.playInterval = window.setInterval(\n this.play,\n this.playTickTime / this.speed,\n );\n } else if (this.playInterval) {\n clearInterval(this.playInterval);\n this.playInterval = undefined;\n }\n }\n\n skipInfront() {\n const newTicks =\n this.tickStatus - 1 < 0\n ? this.playSteps + playAccuracy\n : this.tickStatus - 1;\n this.updateTicks(newTicks);\n this.requestUpdate();\n }\n\n skipAhead() {\n this.play();\n }\n\n play = () => {\n const newTicks =\n this.tickStatus + 1 > this.playSteps + playAccuracy\n ? 0\n : this.tickStatus + 1;\n this.updateTicks(newTicks);\n this.requestUpdate();\n };\n\n render() {\n return html`\n
\n
\n \n \n \n \n
\n \n \n
\n `;\n }\n}\n","import { LitElement, html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport { until } from 'lit/directives/until.js';\n\n@customElement('ww-raster-legend')\nexport class WwRasterLegend extends LitElement {\n static styles = css`\n :host {\n padding: 10px;\n }\n .legend {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n .legend-item {\n flex: 1;\n color: white;\n padding: 0 5px;\n text-align: center;\n }\n `;\n\n api = getCurrentApi();\n\n @property() classification;\n\n @property() classiObj = { color: [] };\n\n async renderClass() {\n if (!this.classification) {\n return html``;\n }\n const classiObj = await this.api.getClassification(this.classification);\n if (classiObj) {\n return html`
${classiObj.description}
\n
\n ${classiObj.color.map(\n item =>\n html`\n ${item.description}\n
`,\n )}\n `;\n }\n return html``;\n }\n\n // eslint-disable-next-line class-methods-use-this\n getRgbString(rgbNumber: number) {\n let rgbString = rgbNumber.toString(16);\n while (rgbString.length < 6) {\n rgbString = `0${rgbString}`;\n }\n return rgbString;\n }\n\n render() {\n return html` ${until(this.renderClass(), html`...`)} `;\n }\n}\n","/* eslint-disable no-plusplus */\nimport { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/extensions\nimport { customElement, property, query } from 'lit/decorators.js';\nimport '@kisters/wcp-base/components/ki-progress-bar/ki-player';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport '@ui5/webcomponents/dist/Popover';\nimport '@ui5/webcomponents/dist/Button';\nimport '@ui5/webcomponents/dist/List';\nimport '@ui5/webcomponents/dist/StandardListItem';\nimport '@ui5/webcomponents/dist/GroupHeaderListItem';\nimport '@ui5/webcomponents-icons/dist/cancel.js';\nimport ImageLayer from 'ol/layer/Image';\nimport ImageSource from 'ol/source/Image';\nimport Static from 'ol/source/ImageStatic';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { sortBy, keyBy } from 'lodash-es';\nimport {\n legendType,\n LegendEntry,\n} from '@kisters/wcp-base/components/ki-progress-bar/ki-progress-bar-legend';\nimport KiStationMap from '@kisters/wcp-water/components/ki-station-map/ki-station-map';\nimport './ww-raster-legend';\n\ndeclare type LegendEntry_ = typeof LegendEntry;\ndeclare type KiStationMap_ = typeof KiStationMap;\n\ninterface ImageItem {\n timestamp: string;\n time: number;\n value: string;\n}\n\ninterface RasterItem {\n id: string;\n label: string;\n group: string;\n images: Array;\n meta: {\n attributes: {\n classification: string;\n parameterKey: string;\n };\n valueDistance: string;\n };\n}\n\nconst getLegendEntry = (\n lastTimestamp: any,\n untilTimestamp: any,\n fromUnixMilliseconds: number,\n untilPercentage: number,\n childrenTimestamps: Array,\n) => {\n const label = `${lastTimestamp.format('ddd DD.MM')}`;\n const toTime = untilTimestamp.valueOf();\n const timeDifference = toTime - lastTimestamp.valueOf();\n\n const children = childrenTimestamps.map(timestamp => ({\n label: timestamp.format('LLL'),\n untilPercentage:\n ((timestamp.valueOf() + timeDifference - fromUnixMilliseconds) /\n (toTime - fromUnixMilliseconds)) *\n 100,\n }));\n\n return {\n label,\n untilPercentage,\n children,\n };\n};\n\nconst fillInMissingImages = (\n rasterItem: RasterItem,\n minTime: number,\n maxTime: number,\n stepDuration: number,\n): RasterItem => {\n if (rasterItem.images.length === 0) {\n return rasterItem;\n }\n\n const newImages: Array = [];\n\n let rasterImageIndex = 0;\n\n for (let i = minTime; i <= maxTime; i += stepDuration) {\n let image = '';\n const rasterImage = rasterItem.images[rasterImageIndex];\n\n if (rasterImage.time > i) {\n if (rasterImageIndex > 0) {\n image = rasterItem.images[rasterImageIndex - 1].value;\n }\n } else {\n image = rasterImage.value;\n if (rasterImageIndex < rasterItem.images.length - 1) {\n rasterImageIndex += 1;\n }\n }\n\n if (rasterImage.time === i) {\n newImages.push(rasterImage);\n continue;\n }\n\n newImages.push({\n value: image,\n timestamp: dayjs(i).format('YYYY-MM-DDTHH:mm:ssZ'),\n time: i,\n });\n }\n\n const returnValue = {\n ...rasterItem,\n };\n returnValue.images = newImages;\n\n return returnValue;\n};\n\n@customElement('ww-raster-player')\nexport default class WwRasterPlayer extends LitElement {\n static styles = css`\n :host {\n height: 100%;\n display: flex;\n align-items: center;\n overflow: hidden;\n }\n\n ui5-popover {\n max-width: calc(100% - 100px);\n overflow-y: hidden;\n overflow-x: hidden;\n }\n\n ww-raster-legend {\n position: fixed;\n right: 60px;\n bottom: 90px;\n }\n\n ki-player {\n margin-right: 10px;\n }\n\n ui5-popover slot[name='header'] {\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid darkgray;\n align-items: center;\n }\n\n .popupover-header {\n font-size: 1.3em;\n color: #32363a;\n }\n\n ui5-li::part(additional-text) {\n padding-left: 40px;\n max-width: initial;\n }\n\n .selection {\n display: flex;\n flex-direction: column;\n width: 300px;\n }\n\n .tsLabel {\n position: absolute;\n width: 100%;\n left: 50%;\n top: 15px;\n color: dimgray;\n font-size: 1.3em;\n transform: translateX(-50%);\n text-align: center;\n }\n\n .popover-content {\n display: flex;\n flex-direction: column;\n }\n\n ki-icon-btn {\n font-size: 20px;\n margin-top: 6px;\n margin-left: auto;\n }\n\n ki-icon-btn:hover,\n .icon-btn:hover {\n fill: #4a4a49;\n }\n\n .list-item-content-wrapper {\n line-height: 25px;\n display: flex;\n flex-direction: row;\n }\n\n .left-right-container {\n padding-left: 16px;\n display: flex;\n flex-direction: row;\n }\n\n .selection-button-left {\n border-right: 1px solid black;\n }\n\n .selection-button {\n margin-top: -5px;\n }\n\n .selection-item {\n width: var(--_ui5_radio_button_height);\n height: var(--_ui5_radio_button_height);\n line-height: var(--_ui5_radio_button_height);\n text-align: center;\n }\n\n ui5-li::part(description) {\n padding-left: 90px;\n }\n ki-icon-btn[active] {\n background-color: var(--theme-color-primary, #0056a0);\n fill: white;\n }\n `;\n\n static get properties() {\n return {\n rasterlist: { type: Array },\n imageList: { type: Array },\n };\n }\n\n @property({ type: Object, attribute: true })\n comparemap;\n\n @property({ type: Array, attribute: false })\n imageLists: Array = [];\n\n @property({ type: Object, attribute: true })\n map: Promise = Promise.resolve(undefined);\n\n @property({ type: Object, attribute: true })\n _map: KiStationMap_ | undefined;\n\n @property({ type: Object, attribute: false })\n primarySelection: RasterItem | undefined | null;\n\n @property({ type: Boolean })\n disabled = false;\n\n @property({ type: Object, attribute: false })\n rasterIndex: {\n [id: string]: RasterItem;\n } = {};\n\n @property({ type: String, attribute: false })\n rlayerPrimary: ImageLayer | undefined;\n\n @property({ type: String, attribute: false })\n rlayerSecondary: ImageLayer | undefined;\n\n @property({ type: String, attribute: false })\n secondSelected;\n\n @property({ type: Object, attribute: false })\n secondarySelection: RasterItem | undefined | null;\n\n @query('#rasterSelect')\n _rasterSelect;\n\n api = getCurrentApi();\n\n rasterlist: Array<{\n label: string;\n id: string;\n alias: string;\n group: string;\n href: string;\n description: string;\n meta: {\n attributes: {\n classification: string;\n parameterKey: string;\n display_group: string;\n display_description: string;\n display_order: number;\n };\n parameterKey: string;\n };\n order: Number;\n groupOrder: Number;\n }>;\n\n constructor() {\n super();\n this.rasterlist = [];\n }\n\n async updated(changedProperties) {\n if (changedProperties.has('secondarySelection')) {\n this.createRasterLayer();\n this._renderNext();\n }\n }\n\n async firstUpdated(): Promise {\n const rasterlist = await this.api.getRasterList();\n this.rasterlist = rasterlist.filter(item => item.type === 'resource');\n this._map = await this.map;\n // this._comparemap = await this.comparemap;\n\n this.rasterlist = sortBy(this.rasterlist, [\n 'meta.attributes.display_order',\n ]);\n\n // @ts-expect-error\n this.imageLists = await Promise.all(\n this.rasterlist.map(async raster => {\n let images: Array = [];\n try {\n images = await this.api.getRessource(`/${raster.href}`);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`error loading raster images for: ${raster.href}`);\n }\n\n images = images\n .map(image => ({\n ...image,\n time: new Date(image.timestamp).getTime(),\n }))\n .sort((a, b) => a.time - b.time);\n\n return {\n ...raster,\n images,\n };\n }),\n );\n\n this.rasterIndex = keyBy(this.imageLists, 'id');\n }\n\n createRasterLayer() {\n if (this.rlayerPrimary) {\n this._map.map.removeLayer(this.rlayerPrimary);\n }\n\n if (this.rlayerSecondary && this.comparemap) {\n this.comparemap.map.removeLayer(this.rlayerSecondary);\n }\n\n this.rlayerPrimary = new ImageLayer({\n opacity: 0.7,\n zIndex: 22,\n // @ts-expect-error\n displayInLayerControl: false,\n group: 'Layers',\n name: 'Radar',\n visible: true,\n });\n this.rlayerSecondary = new ImageLayer({\n opacity: 0.7,\n zIndex: 22,\n // @ts-expect-error\n displayInLayerControl: false,\n group: 'Layers',\n name: 'Radar',\n visible: true,\n });\n\n if (this._map) {\n this._map.map.addLayer(this.rlayerPrimary);\n }\n\n if (this.comparemap) {\n this.comparemap.map.addLayer(this.rlayerSecondary);\n }\n this.rlayerPrimary.setVisible(true);\n this.rlayerSecondary.setVisible(true);\n }\n\n _createPlayer() {\n if (!this.primarySelection) {\n this.dispatchEvent(\n new CustomEvent('playeropen', {\n detail: { value: false },\n bubbles: false,\n composed: true,\n }),\n );\n return html``;\n }\n const legendEntries: Array = [];\n\n const _type = legendType.legendEntries;\n\n let oldTimestamp: any;\n let childrenArray: Array = [];\n\n let fromTime = this._minTime;\n\n const timeSpan = this._maxTime - this._minTime;\n\n const steps = timeSpan / this._stepDuration;\n\n for (\n let time = this._minTime;\n time <= this._maxTime;\n time += this._stepDuration\n ) {\n const newTimestamp = dayjs(time);\n\n if (\n oldTimestamp !== undefined &&\n !newTimestamp.isSame(oldTimestamp, 'day')\n ) {\n const dayUntil = oldTimestamp\n .hour(23)\n .minute(59)\n .second(59)\n .millisecond(999);\n const untilPercentage = (100 * (dayUntil - this._minTime)) / timeSpan;\n\n legendEntries.push(\n getLegendEntry(\n oldTimestamp,\n newTimestamp,\n fromTime,\n untilPercentage,\n childrenArray,\n ),\n );\n\n fromTime = newTimestamp.valueOf();\n childrenArray = [];\n }\n\n childrenArray.push(newTimestamp);\n\n oldTimestamp = newTimestamp;\n }\n\n if (oldTimestamp) {\n const newTimestamp = oldTimestamp.add(1, 'hour');\n legendEntries.push(\n getLegendEntry(\n oldTimestamp,\n newTimestamp,\n fromTime,\n 100,\n childrenArray,\n ),\n );\n }\n\n this.dispatchEvent(\n new CustomEvent('playeropen', {\n detail: { value: true },\n bubbles: false,\n composed: true,\n }),\n );\n\n return html``;\n }\n\n _renderNext(\n e:\n | {\n detail:\n | {\n newTicks: number;\n }\n | undefined;\n }\n | undefined = undefined,\n ) {\n const imageNumber = e?.detail?.newTicks ?? 0;\n\n if (this.rlayerPrimary && this.primarySelection?.images?.length) {\n const image = this.primarySelection?.images[imageNumber].value;\n this.rlayerPrimary.setSource(\n this._getSource(image, this.primarySelection),\n );\n }\n if (this.rlayerSecondary && this.secondarySelection?.images?.length) {\n const secImage = this.secondarySelection?.images[imageNumber].value;\n if (secImage && secImage !== '') {\n this.rlayerSecondary.setSource(\n this._getSource(secImage, this.secondarySelection),\n );\n } else {\n this.rlayerSecondary.setSource(null);\n }\n }\n }\n\n _getSource(image, rasterProduct) {\n const selectedLayer = rasterProduct;\n const bbox = selectedLayer.meta.boundingBox;\n const projection =\n selectedLayer.meta.projectionProj4 ===\n '+proj=tmerc +lon_0=-8 +lat_0=0 +lon_ts=0 +lat_ts=53.5 +a=6377560.00 +b=6356260.00'\n ? 'EPSG:123457'\n : 'EPSG:123456';\n return new Static({\n imageSmoothing: false,\n url: `${this.api.dataPath}/${selectedLayer.href.replace(\n 'index.json',\n image,\n )}`,\n projection: selectedLayer.meta.projectionIdentifier\n ? selectedLayer.meta.projectionIdentifier.toUpperCase()\n : projection,\n imageExtent: [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY],\n // @ts-expect-error\n zIndex: 15,\n });\n }\n\n _stepDuration;\n\n _minTime;\n\n _maxTime;\n\n async _changeSelection(selected, primary = true) {\n this._rasterSelect.close();\n if (selected) {\n try {\n if (primary) {\n this.primarySelection = this.rasterIndex[selected];\n (this.renderRoot.querySelector('ki-player') as any)?.updatePercentage(\n 0,\n );\n } else {\n this.secondarySelection = this.rasterIndex[selected];\n }\n let primaryDuration = 3600000;\n let secondaryDuration: number | undefined;\n if (this.primarySelection?.meta.valueDistance) {\n primaryDuration = dayjs\n .duration(this.primarySelection?.meta.valueDistance)\n .asMilliseconds();\n }\n if (this.secondarySelection?.meta.valueDistance) {\n secondaryDuration = dayjs\n .duration(this.secondarySelection?.meta.valueDistance)\n .asMilliseconds();\n }\n this._stepDuration =\n secondaryDuration && secondaryDuration < primaryDuration\n ? secondaryDuration\n : primaryDuration;\n\n let minTime = 0;\n let maxTime = 0;\n if (this.primarySelection && this.primarySelection.images.length > 0) {\n minTime = this.primarySelection.images[0].time;\n maxTime =\n this.primarySelection.images[\n this.primarySelection.images.length - 1\n ].time;\n }\n\n this._minTime = minTime;\n this._maxTime = maxTime;\n\n if (\n this.secondarySelection &&\n this.secondarySelection.images.length > 0\n ) {\n const secondMin = this.secondarySelection.images[0].time;\n const secondMax =\n this.secondarySelection.images[\n this.secondarySelection.images.length - 1\n ].time;\n if (secondMin < minTime) {\n minTime = secondMin;\n }\n if (secondMax > maxTime) {\n maxTime = secondMax;\n }\n }\n\n if (this.primarySelection) {\n this.primarySelection = fillInMissingImages(\n this.primarySelection,\n minTime,\n maxTime,\n this._stepDuration,\n );\n }\n if (this.secondarySelection) {\n this.secondarySelection = fillInMissingImages(\n this.secondarySelection,\n minTime,\n maxTime,\n this._stepDuration,\n );\n }\n\n this._renderNext();\n } catch (e) {\n this._clearSelection();\n // eslint-disable-next-line no-console\n console.error('could not load raster product', selected);\n }\n }\n this.requestUpdate();\n }\n\n // eslint-disable-next-line class-methods-use-this\n _getCoverage(tsitem) {\n const spacing = tsitem.meta?.valueDistance;\n const dateformat = spacing.includes('PT') ? 'L LT z' : 'L z';\n\n const t0String = tsitem.meta?.selection?.t0;\n let coverage = '-';\n if (t0String) {\n coverage = `t0: ${dayjs(t0String).format(dateformat)}`;\n } else if (tsitem.meta?.coverage?.from && tsitem.meta?.coverage?.until) {\n coverage = `${dayjs(tsitem.meta?.coverage?.from).format(\n dateformat,\n )} - ${dayjs(tsitem.meta?.coverage?.until).format(dateformat)}`;\n }\n return coverage;\n }\n\n _getTsTitle() {\n return this.primarySelection\n ? `${this.primarySelection.group} - ${this.primarySelection.label}${\n this.secondarySelection\n ? ` / ${this.secondarySelection.group} - ${this.secondarySelection.label}`\n : ''\n }`\n : '';\n }\n\n _clearSelection() {\n if (this.rlayerPrimary) {\n this._map.map.removeLayer(this.rlayerPrimary);\n }\n if (this.rlayerSecondary && this.comparemap) {\n this.comparemap.map.removeLayer(this.rlayerSecondary);\n }\n this.dispatchEvent(\n new CustomEvent('playeropen', {\n detail: { value: false },\n bubbles: false,\n composed: true,\n }),\n );\n this.primarySelection = null;\n this.secondarySelection = null;\n this.primarySelection = null;\n this._rasterSelect.close();\n this.dispatchEvent(new CustomEvent('clearselection'));\n }\n\n _getClassification(id) {\n return id ? this.rasterIndex[id]?.meta.attributes.classification : {};\n }\n\n render() {\n let group;\n return html`\n
${this._getTsTitle()}
\n\n ${this.primarySelection ? this._createPlayer() : ''}\n \n \n {\n this._rasterSelect.showAt(e.target);\n }}\n >\n\n \n \n \n
\n
Left
\n
Right
\n
\n
Raster products
\n
\n Deselect\n this._rasterSelect.close()}\"\n >X\n
\n
\n ${this.rasterlist.map(item => {\n const listitem = html` {\n this.selectItem(e, item.id, item.group);\n }}\"\n style=\"\"\n >\n
\n \n\n \n ${item.label}\n
\n
`;\n if (group !== item.group) {\n group = item.group;\n return html`${item.group}${listitem}`;\n }\n return listitem;\n })}\n \n \n `;\n }\n\n selectItem(e: any, itemId: string, group: string): void {\n this.createRasterLayer();\n if (e.target.getAttribute('group') !== 'secondary') {\n if (this.secondarySelection?.group !== group) {\n this.secondarySelection = null;\n this.dispatchEvent(new CustomEvent('clearselection'));\n }\n this.primarySelection = this.imageLists.find(item => item.id === itemId);\n this._changeSelection(itemId);\n } else if (this.primarySelection !== null) {\n this.dispatchEvent(new CustomEvent('opensecondary'));\n this.secondarySelection = this.imageLists.find(\n item => item.id === itemId,\n );\n this._changeSelection(itemId, false);\n }\n }\n}\n","import { css, html } from 'lit';\nimport { customElement, queryAsync, query, property } from 'lit/decorators.js';\nimport WwpOverview from '@kisters/wiski-web/views/wwp-overview/wwp-overview';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport '../../components/ki-wwp-raster/ww-raster-player';\n\n@customElement('ww-raster-overview')\nexport default class WwRasterOverview extends WwpOverview {\n @property({ type: Boolean })\n playeropen = false;\n\n @property({ type: Boolean })\n timelineropen = false;\n\n @queryAsync('#map')\n map;\n\n @query('#comparemap')\n comparemap;\n\n @query('#rasterplayer')\n rasterplayer;\n\n @query('#map')\n _map;\n\n @property({ type: Boolean })\n showCompareMap = false;\n\n layersTreeList = true;\n\n static styles = [\n WwpOverview.styles,\n css`\n ww-raster-player {\n position: absolute;\n right: 20px;\n height: 80px;\n max-width: 80%;\n z-index: 111;\n bottom: 0;\n }\n\n ww-raster-player.open {\n left: 20%;\n }\n\n :host(.sm-screen) ww-raster-player {\n display: none !important;\n }\n\n ki-station-map.map {\n width: auto;\n flex: 1;\n }\n\n #comparemap {\n border-right: 2px solid gray;\n }\n\n ki-stack > div.map-container {\n display: flex;\n }\n `,\n ];\n\n updated(changedProperties) {\n if (this._map && changedProperties.has('showCompareMap')) {\n this._map.resize();\n this.rasterplayer.comparemap = this.comparemap;\n setTimeout(() => {\n this.rasterplayer.createRasterLayer();\n this.rasterplayer._renderNext();\n }, 200);\n }\n }\n\n render() {\n // eslint-disable-next-line wc/no-self-class\n this.classList.toggle('table', this.mapOrTable === 'table');\n // TODO rename ki-station-layer to ki-maker-layer or value layer ?\n // language=html\n if (this.currentLayer !== this.layerName) {\n this.getDataLayer();\n }\n return (\n this._renderLoader() ||\n html`\n ${this.additionalContent()}\n\n {\n this._enableAutoZoom = true;\n this.searchContent = e.detail.value;\n }}\"\n >\n \n ${this.showCsvExport && this.mapOrTable === 'table'\n ? this.renderExportButton()\n : html``}\n {\n this._enableAutoZoom = true;\n this.filterContent = JSON.stringify(e.detail.value);\n }}\"\n >\n \n {\n this._enableAutoZoom = true;\n this.mapOrTable = e.detail.value;\n }}\"\n >\n \n
\n ${this.mapOrTable === 'table' ? this.renderTable() : html``}\n
\n
\n ${this.mapOrTable === 'map' ? this.renderMap() : html``}\n
\n
\n ${this.showCompareMap\n ? html``\n : html``}\n\n
\n ${this.i18n.t('lastupdated')}:\n ${dayjs.tz(this._dataLayer.creationDateInMillis).format('L LT')}\n ${this.i18n.exists(encodeURIComponent(dayjs().tz().format('zzz')))\n ? this.i18n.t(encodeURIComponent(dayjs().tz().format('zzz')))\n : dayjs().tz().format('zzz')}\n
\n `\n );\n }\n\n renderMap() {\n return html`\n {\n if (this.comparemap) {\n this.comparemap.zoomTo(e.detail.extent, 0, 0);\n }\n }}\n cachePrefix=\"${this.cachePrefix}\"\n >\n ${this._dataLayer.config.popupControl\n ? html``\n : html``}\n ${this.layerName === 'Rainfall'\n ? html` {\n this.timelineropen = !e.detail.active;\n this.refreshTimer = e.detail.active;\n }}\"\n >`\n : ''}\n ${this._dataLayer.config?.timeActive\n ? html` {\n this.timelineropen = !e.detail.active;\n this.refreshTimer = e.detail.active;\n }}\"\n >`\n : ''}\n {\n if (this._enableAutoZoom || this._firstWWVisit !== 'no') {\n this.stationMap.zoomTo(\n e.detail.extent,\n this._enableAutoZoom ? 500 : 0,\n );\n this._firstWWVisit === 'no';\n sessionStorage.setItem('firstWWVisit', 'no');\n }\n }}\"\n >\n \n \n \n \n \n \n \n ${this.showCompareMap\n ? html` {\n this._map.zoomTo(e.detail.extent, 0, 0);\n }}\n >`\n : html``}\n `;\n }\n\n additionalContent() {\n return html` {\n this.showCompareMap = false;\n }}\n @opensecondary=${() => {\n this.showCompareMap = true;\n }}\n @playeropen=${e => {\n this.playeropen = e.detail.value;\n }}\n >`;\n }\n}\n","// eslint-disable-next-line import/extensions\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '../../api/API';\n\n@customElement('wwp-attribute-html')\nexport default class WwpAttributeHtml extends LitElement {\n static styles = css`\n :host {\n overflow: auto;\n display: flex;\n flex-wrap: wrap;\n margin-top: 20px;\n padding: 20px;\n }\n `;\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['stationId']);\n this.api = getCurrentApi();\n this.stationId = params.stationId;\n this.station = await this.api.getStation(this.stationId);\n Object.assign(this, params.options);\n }\n\n static get properties() {\n return {\n content: { type: String },\n station: { type: Object },\n };\n }\n\n render() {\n // language=html\n return html`
\n ${this.station && this.station[this.content]\n ? unsafeHTML(this.station[this.content])\n : ''}\n
`;\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport { LitElement, html, css } from 'lit';\nimport { customElement, query } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport Highcharts from 'highcharts/highstock';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { cloneDeep } from 'lodash-es';\nimport more from 'highcharts/highcharts-more';\nimport nodata from 'highcharts/modules/no-data-to-display';\nimport exporting from 'highcharts/modules/exporting';\nimport label from 'highcharts/modules/series-label';\nimport offlineexporting from 'highcharts/modules/offline-exporting';\nimport boost from 'highcharts/modules/boost';\nimport hclocales from '../../common/highcharts-locales';\nimport nls from '../../locales/index';\n\nmore(Highcharts);\nlabel(Highcharts);\nnodata(Highcharts);\nexporting(Highcharts);\nofflineexporting(Highcharts);\nboost(Highcharts);\n\n@customElement('ki-chart')\nexport default class KiChart extends Mix(LitElement, [i18nMixin, { nls }]) {\n @query('#chart')\n chartNode;\n\n highcharts = Highcharts;\n\n static get properties() {\n return {\n options: { type: Object },\n };\n }\n\n static styles = css`\n #chart {\n height: 100%;\n width: 100%;\n }\n `;\n\n updated(changedProperties) {\n super.update(changedProperties);\n if (this.chart) {\n if (changedProperties.has('options')) {\n this.options.then(opt => {\n this.chart.update(cloneDeep(opt), true, true);\n });\n }\n }\n }\n\n render() {\n return html`
`;\n }\n\n firstUpdated() {\n super.firstUpdated();\n if (hclocales[this.i18n.language.substring(0, 2)]) {\n this.highcharts.setOptions({\n lang: hclocales[this.i18n.language.substring(0, 2)],\n });\n }\n\n const Chart = Highcharts.chart;\n if (Chart) {\n this.chart = Chart(\n this.chartNode,\n cloneDeep(this.options || {}),\n this.callback ? this.callback : null,\n );\n }\n }\n\n disconnectedCallback() {\n this.chart?.destroy();\n if (super.disconnectedCallback) super.disconnectedCallback();\n }\n}\n","// inject tsData to data in series and value in plotline\n// set id for series is better for performance\n// TODO write unit test\n\nexport default function LinkedTo(clz) {\n return class extends clz {\n static get properties() {\n return {\n visibleFlags: {\n type: Object,\n initial: () => ({}),\n },\n };\n }\n\n _addLinkedTo(options) {\n const series = options.series || [];\n const _t = this;\n series.forEach(s => {\n // the condition for fake series\n if (typeof s !== 'string') {\n const originHander = s.events?.legendItemClick;\n s.events = {\n ...s.events,\n legendItemClick() {\n originHander && originHander.call(this);\n _t.visibleFlags = { ..._t.visibleFlags, [s.id]: !this.visible };\n },\n };\n }\n });\n\n if (options.xAxis?.plotLines) {\n options.xAxis.plotLines = this._filterPlotLines(\n options.xAxis.plotLines,\n );\n }\n\n if (options.yAxis?.plotLines) {\n options.yAxis.plotLines = this._filterPlotLines(\n options.yAxis.plotLines,\n );\n }\n\n return options;\n }\n\n _filterPlotLines(plotLines) {\n return plotLines.filter(p => {\n if (p.linkedTo) {\n const vis = this.visibleFlags[p.linkedTo];\n return vis === undefined || vis;\n }\n return true;\n });\n }\n };\n}\n","import dayjs from '@kisters/wcp-base/common/dayjsext';\n\nexport function getTimestampFromDuration(\n dur,\n { start, past = true } = {},\n): number {\n if (!dur) {\n return dayjs(start).tz().valueOf();\n }\n if (past) {\n return dayjs(start).tz().subtract(dayjs.duration(dur)).valueOf();\n }\n return dayjs(start).tz().add(dayjs.duration(dur)).valueOf();\n}\n\n/*\n * condition:\n * ts should be ordered,\n * and [0] is same (most time is timestamp)\n * */\nexport function mergeTs(ts1, ts2) {\n return ts1.map((d, i) => {\n if (d[0] !== ts2[i][0]) {\n throw new Error(\"can't merge ts data are not consist\");\n }\n return [...d, ts2[i][1]];\n });\n}\n","/* eslint-disable camelcase */\n/* eslint-disable class-methods-use-this */\nimport { merge, last } from 'lodash-es';\nimport { getTimestampFromDuration } from '../../common/ts-utils';\n\nexport default function TsData(clz) {\n return class extends clz {\n static get properties() {\n return {\n options: { type: Object, initial: () => ({}) },\n getTsData: {\n type: Function,\n default: () => {\n throw new Error('getTsData is required: getTsData(tsName)');\n },\n },\n };\n }\n\n async _addTsDataToOptions(options) {\n // default\n options = merge({ xAxis: { type: 'datetime' } }, options);\n return {\n ...options,\n yAxis: {\n ...options.yAxis,\n plotLines: await Promise.all(\n options.xAxis?.plotLines\n ?.filter(p => !!p)\n ?.map(p => this._addTsDataToPlotLine(p, d => d?.[0]?.[1])) || [],\n ),\n },\n xAxis: {\n ...options.xAxis,\n ...this._addMinMaxFromPeriod(options.xAxis.period),\n plotLines: await Promise.all(\n options.xAxis?.plotLines\n ?.filter(p => !!p)\n ?.map(p => this._addTsDataToPlotLine(p, d => d?.[0]?.[0])) || [],\n ),\n },\n series: await Promise.all(\n options.series\n ?.filter(p => !!p)\n ?.map(this._addTsDataToSeries.bind(this)) || [],\n ),\n };\n }\n\n async _addTsDataToPlotLine(plotline, transform) {\n if (typeof plotline === 'string') {\n plotline = { ts: plotline };\n }\n let { value } = plotline;\n if (plotline.ts) {\n const data = await this.getTsData(plotline.ts);\n value = (plotline.transform || transform)(data);\n } else if (/^[+-]P/.test(plotline.value)) {\n // value is peroid\n value = getTimestampFromDuration(plotline.value.substr(1), {\n past: plotline.value.charAt(0) === '-',\n });\n }\n\n return {\n dashStyle: 'dash',\n width: 2,\n label: { text: plotline.ts, align: 'left' },\n ...plotline,\n value,\n };\n }\n\n // eslint-disable-next-line class-methods-use-this\n _addMinMaxFromPeriod(period) {\n if (period) {\n return {\n min: getTimestampFromDuration(period),\n max: getTimestampFromDuration(),\n };\n }\n return {};\n }\n\n async _addTsDataToSeries(series) {\n if (typeof series === 'string') {\n series = { ts: series };\n }\n if (series.ts) {\n let data = await this.getTsData(series.ts);\n data = data.map(d => [new Date(d[0]).getTime(), ...d.slice(1)]);\n series.transform?.(data);\n series = merge(\n { name: await this._resolveTsName(series.ts), data },\n series,\n );\n }\n return series;\n }\n\n async _resolveTsName(ts_path) {\n const ts_name = last(ts_path.split('/'));\n if (ts_name && ts_name[0] && ts_name[0].ts_name)\n return ts_name[0].ts_name;\n return ts_path;\n }\n };\n}\n","/* eslint-disable max-classes-per-file */\nimport { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport './ki-chart';\nimport { Mix, PropertyDefaultValue } from '@kisters/wcp-base/common';\nimport { i18nMixin, getQueryObject } from '@kisters/wcp-base/decorators';\nimport nls from '../../locales/index';\nimport LinkedTo from './LinkedTo';\nimport TsData from './TsData';\n\n@customElement('ki-ts-graph')\nexport default class KiTsGraph extends Mix(\n LitElement,\n PropertyDefaultValue,\n TsData,\n LinkedTo,\n [i18nMixin, { nls }],\n) {\n // language=CSS\n static styles = css`\n :host {\n display: block;\n }\n\n ki-chart {\n display: block;\n height: 100%;\n }\n `;\n\n static get properties() {\n return {\n afterComputedOptions: Function,\n };\n }\n\n render() {\n // language=html\n return html``;\n }\n\n get chartNode() {\n return getQueryObject(this, '#chartNode');\n }\n\n get chart() {\n return this.chartNode?.chart;\n }\n\n get computedOptions() {\n return this._addTsDataToOptions(this.options).then(async options => {\n options = await this._addLinkedTo(options);\n return this.afterComputedOptions?.(options) || options;\n });\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { responsiveMixin, SM, ViewPort } from '@kisters/wcp-base/decorators';\nimport flatten from 'lodash-es/flatten';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n@customElement('ki-legend')\nexport default class KiLegend extends Mix(LitElement, responsiveMixin) {\n // language=CSS\n static styles = css`\n :host {\n display: block;\n position: absolute;\n pointer-events: all;\n }\n\n :host(.sm-screen) {\n box-shadow: none;\n }\n\n :host(.md-screen) div.legends-list {\n background-color: var(\n --ki-legend-background-mdscreen,\n rgba(255, 255, 255, 1)\n );\n }\n\n :host(.hide) .legends-list {\n visibility: hidden;\n transform: scale(0.8);\n transform-origin: left bottom;\n opacity: 0;\n }\n\n .legends-list {\n visibility: visible;\n opacity: 1;\n transform: scale(1);\n transition: transform 0.3s linear 0s, opacity 0.3s linear 0s,\n visibility 0.3s linear 0s;\n background-color: rgba(255, 255, 255, 1);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n }\n a {\n text-decoration: none;\n }\n\n .name,\n .item {\n padding: 5px 20px;\n color: #4a4a49;\n }\n\n .name {\n font-weight: 600;\n cursor: pointer;\n }\n\n @media screen and (max-height: 800px) {\n .name,\n .item {\n padding: 2px 10px;\n font-size: 0.8;\n }\n }\n\n .item {\n cursor: pointer;\n display: flex;\n }\n\n .item:hover {\n background-color: #e7e7e7;\n }\n\n .item img,\n .item .label {\n flex: 0 0 auto;\n vertical-align: middle;\n object-fit: none;\n }\n\n .item .label {\n padding-left: 10px;\n white-space: nowrap;\n }\n\n .item.disabled {\n color: lightgray;\n }\n\n .item.disabled img {\n opacity: 0.5;\n }\n\n .description {\n font-size: 0.8em;\n padding: 0 0 5px 20px;\n }\n\n .link {\n cursor: pointer;\n }\n\n .tag-group + .tag-group {\n border-top: 1px solid lightgray;\n }\n\n .hide {\n display: none !important;\n }\n\n .show-btn {\n fill: white;\n background: var(--theme-color-primary, #1d1d1b);\n }\n\n .show-btn:hover {\n fill: var(--theme-color-primary, white);\n background: var(--theme-color-secondary, #1d1d1b);\n }\n\n .close-btn {\n padding: 5px 10px;\n float: right;\n cursor: pointer;\n fill: lightgray;\n }\n .close-btn:hover {\n fill: dimgray;\n }\n `;\n\n constructor() {\n super();\n this.value = [];\n this.options = [];\n this.addstyle = '';\n this.disabled = {};\n this.forceFullDisplay = false;\n }\n\n static get properties() {\n return {\n label: { type: String },\n closeable: { type: Boolean },\n forceFullDisplay: { type: Boolean },\n collapsed: { type: Boolean },\n addstyle: { type: String },\n options: { type: Array },\n };\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n getAbsoluteCount(opt) {\n const absoluteCount = {};\n for (const [key, value] of Object.entries(opt.tagCount)) {\n key.split('|').forEach(item => {\n if (absoluteCount[item]) {\n absoluteCount[item] += value;\n } else {\n absoluteCount[item] = value;\n }\n });\n }\n return absoluteCount;\n }\n\n firstUpdated() {\n this.options.forEach(opts => {\n opts.items.forEach(opt => {\n opt.forEach(item => {\n if (item.deactivate) {\n this.toggle(item, opts);\n }\n });\n });\n });\n }\n\n _getCount(name, opt) {\n if (opt.tagCount) {\n const abscnt = this.getAbsoluteCount(opt)[name];\n return abscnt ? `(${abscnt})` : '';\n }\n return '';\n }\n\n _getEntry(option, opt) {\n const tagCount = this._getCount(option.name, opt);\n return opt.hideEmptyClasses && !tagCount\n ? html``\n : html` {\n opt.notInteractive ? null : this.toggle(option, opt);\n }}\"\n >\n \"\"\n
${option.label} ${tagCount}
\n `;\n }\n\n updateTagCount(tagCount: any, index: number) {\n if (index < this.options.length) {\n this.options[index].tagCount = tagCount;\n this.requestUpdate();\n } else {\n console.warn('tried to update tag count for non existing option');\n }\n }\n\n _renderOptions(opt) {\n // TODO\n return html`\n ${opt.items &&\n opt.items.map(\n options =>\n html`
\n ${options.map(option => this._getEntry(option, opt))}\n
`,\n )}\n `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderBtn() {\n return html`\n {\n this.renderRoot.querySelector('#legends').show();\n }}\"\n >\n \n `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderShowBtn() {\n return html`\n {\n this.collapsed = false;\n }}\"\n >\n \n `;\n }\n\n _renderCloseBtn() {\n return html`\n {\n this.collapsed = true;\n }}\"\n >\n \n `;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _renderDescr(opt, mobile) {\n let ret = html``;\n const desc = opt.description;\n if (desc && desc.text && desc.link) {\n ret = html` \n ${desc.text}\n `;\n } else if (desc && desc.text) {\n ret = html`\n \n ${unsafeHTML(mobile ? desc.text.replaceAll('
', '') : desc.text)}\n \n `;\n }\n return ret;\n }\n\n toggleAll(opt) {\n opt.items.forEach(grp => {\n grp.forEach(_opt => {\n this.disabled[_opt.name] = !this.disabled[_opt.name];\n });\n });\n this.toggle(null, opt);\n }\n\n render() {\n // language=html\n return this.options.map(opt => {\n const descr = opt.description;\n if (ViewPort.size === SM && !this.forceFullDisplay) {\n return html`\n ${this._renderBtn()}\n \n
\n ${this._renderOptions(opt)}\n
\n ${descr ? this._renderDescr(opt, true) : ''}\n
\n
\n
\n `;\n }\n this.style.cssText += this.addstyle;\n return html`\n ${(this.closeable && this.collapsed && this._renderShowBtn()) || ''}\n \n ${(this.closeable && !this.collapsed && this._renderCloseBtn()) || ''}\n {\n opt.notInteractive ? null : this.toggleAll(opt);\n }}\"\n >\n ${opt.label}\n \n ${descr && descr.position === 'top' ? this._renderDescr(opt) : ''}\n ${this._renderOptions(opt)}\n ${descr && descr.position !== 'top' ? this._renderDescr(opt) : ''}\n \n `;\n });\n }\n\n toggle(option, opt) {\n if (option) {\n this.disabled[option.name] = !this.disabled[option.name];\n }\n const value = flatten(opt.items)\n .filter(op => !this.disabled[op.name])\n .map(op => op.name);\n if (!value.length) {\n this.toggleAll(opt);\n } else {\n this.dispatchEvent(new CustomEvent('changed', { detail: { value } }));\n this.requestUpdate();\n }\n }\n}\n","import { UpdatingElement } from 'lit';\nimport { Mix, PropertyDefaultValue } from '@kisters/wcp-base/common';\n\n// TODO try out mapping the observable properties to element?\n// export function ttt(layerClaz) {\n// return class extends BaseLayer{\n// static get properties(){\n// return layerClaz.setProperties().keys().map()...\n// }\n// }\n// }\n\nexport default class _AddOn extends Mix(UpdatingElement, PropertyDefaultValue) {\n static get properties() {\n return {\n disabled: { type: Boolean },\n };\n }\n\n connectedCallback() {\n if (super.connectedCallback) super.connectedCallback();\n if (this.zIndex === undefined) {\n this.zIndex = Array.prototype.indexOf.call(\n this.parentElement.children,\n this,\n );\n }\n if (this.parentElement && this.parentElement.map) {\n this.map = this.parentElement.map;\n this._afterMapCreated();\n } else {\n this.mapReadyEvent = () => {\n this.map = this.parentElement.map;\n this._afterMapCreated();\n this.parentElement.removeEventListener(\n 'kistationmapready',\n this.mapReadyEvent,\n );\n };\n this.parentElement.addEventListener(\n 'kistationmapready',\n this.mapReadyEvent,\n );\n }\n }\n\n _afterMapCreated() {\n if (!this.disabled) {\n this._create();\n }\n }\n\n shouldUpdate(_changedProperties) {\n if (_changedProperties.has('disabled') && this.disabled) {\n this.map && this._tear();\n }\n return !this.disabled;\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) super.disconnectedCallback();\n this.map && this._tear();\n }\n\n // eslint-disable-next-line class-methods-use-this\n _create() {\n throw new Error('need implement in sub class');\n }\n\n // eslint-disable-next-line class-methods-use-this\n _tear() {\n throw new Error('need implement in sub class');\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport { flatten } from 'lodash-es';\nimport _AddOn from './_AddOn';\n\n@customElement('ki-base-layers')\nexport default class KiBaseLayers extends _AddOn {\n static get properties() {\n return {\n layers: { type: Array },\n additionalLayers: { type: Array, initial: () => [] },\n defaultLayer: { type: String },\n zIndex: { type: String, attribute: 'z-index' },\n };\n }\n\n _create() {\n this.mapLayers = flatten(this.layers);\n this.map.getLayers().extend(this.mapLayers);\n this.mapLayers.forEach(l => {\n // TODO data update flow is not good\n // maybe layerControl should not change layer visibility directly.\n l.on('change:visible', e => {\n if (e.target.getVisible()) {\n this.dispatchEvent(\n new CustomEvent('changed', {\n detail: { value: e.target.get('label') },\n bubbles: true,\n composed: true,\n }),\n );\n }\n });\n });\n }\n\n _tear() {\n this.mapLayers.forEach(l => this.map.removeLayer(l));\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // TODO how to update.\n if (this.map && _changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport nls from '../../locales/index';\n\n@customElement('ki-catchment-info')\nexport default class KiCatchmentInfo extends Mix(LitElement, [\n i18nMixin,\n { nls },\n]) {\n static styles = css`\n :host {\n display: block;\n }\n .station-name {\n padding-left: 10px;\n padding-top: 10px;\n font-size: 1.2em;\n }\n\n hr {\n margin: 5px 0;\n }\n .table {\n display: table;\n line-height: 1.5em;\n }\n .row {\n display: table-row;\n }\n .cell {\n display: table-cell;\n padding: 0 10px;\n min-width: 50px;\n color: gray;\n }\n .label {\n color: #4a4a49;\n }\n `;\n\n static get properties() {\n return {\n catchment: { type: Object },\n };\n }\n\n constructor() {\n super();\n this.catchment = {};\n }\n\n render() {\n return html`
${this.catchment.catchment_name}
\n
\n
\n
\n
${this.i18n.t('alarm_status')}
\n
${this.catchment.__tag}
\n
\n
\n
${this.i18n.t('message_time')}
\n
${this.catchment.catchmentAlarmTimestamp}
\n
\n
\n
${this.i18n.t('message')}
\n
${this.catchment.catchmentAlarmMessage || '-'}
\n
\n
`;\n }\n}\n","import {\n ImageArcGISRest,\n ImageWMS,\n OSM,\n TileArcGISRest,\n TileImage,\n TileWMS,\n Vector as VectorSource,\n WMTS,\n XYZ,\n ImageStatic,\n VectorTile as VectorTileSource,\n} from 'ol/source';\nimport {\n Image as ImageLayer,\n Tile as TileLayer,\n Vector as VectorLayer,\n VectorTile as VectorTileLayer,\n} from 'ol/layer';\nimport { optionsFromCapabilities } from 'ol/source/WMTS';\nimport { GeoJSON, WMTSCapabilities, TopoJSON, MVT } from 'ol/format';\nimport { Circle as CircleStyle, Fill, Stroke, Style, Text } from 'ol/style';\nimport TileGrid from 'ol/tilegrid/TileGrid';\n\nimport { FontIcon } from '../components/ki-station-map/FontIcon';\n\nconst parserWMTS = new WMTSCapabilities();\n\nconst styleFontIconDefaults = {\n backgroundColor: 'rgba(197, 213, 234, 1)',\n icon: '',\n fontSize: 0.8,\n radius: 9,\n color: 'rgba(29,29,27, 1)',\n border: {\n color: 'rgba(29,29,27, 1)',\n width: 1,\n },\n};\n\nconst styleDefaults = {\n stroke: {\n color: 'rgba(255, 255, 255, 1.0)',\n width: 1,\n },\n fill: {\n color: 'rgba(155, 155, 155, 0.5)',\n },\n};\n\nconst textStyleDefaultPoint = {\n textAlign: 'left',\n textBaseline: 'middle',\n font: '14px -apple-system, BlinkMacSystemFont, sans-serif, Calibri',\n offsetX: 7,\n fill: { color: 'black' },\n stroke: { color: 'black', width: 0.5 },\n};\n\nconst textStyleDefault = {\n textAlign: 'center',\n textBaseline: 'middle',\n font: '24px -apple-system, BlinkMacSystemFont, sans-serif,Calibri',\n fill: new Fill({ color: 'white' }),\n stroke: new Stroke({ color: 'black', width: 1 }),\n};\n\nfunction getTextStyle(type, textStyle) {\n let style = { ...textStyleDefault, ...textStyle };\n switch (type) {\n case 'Point':\n style = { ...textStyleDefaultPoint, ...textStyle };\n break;\n default:\n }\n style.fill = new Fill(style.fill);\n style.zIndex = 1;\n style.stroke = new Stroke(style.stroke);\n style.backgroundFill = style.backgroundFill\n ? new Fill(style.backgroundFill)\n : null;\n style.backgroundStroke = style.backgroundStroke\n ? new Fill(style.backgroundStroke)\n : null;\n return new Text(style);\n}\n\nexport function getStyle(type, style = {}, textStyle = {}) {\n let retStyle;\n const { stroke, fill } = style;\n switch (type) {\n case 'Point':\n retStyle = new Style({\n text: getTextStyle(type, textStyle),\n image: new FontIcon({ ...styleFontIconDefaults, ...style }),\n });\n break;\n case 'LineString':\n case 'MultiLineString':\n retStyle = new Style({\n text: getTextStyle(type, textStyle),\n stroke: new Stroke(stroke || styleDefaults.stroke),\n });\n break;\n case 'Polygon':\n case 'MultiPolygon':\n case 'Circle':\n retStyle = new Style({\n text: getTextStyle(type, textStyle),\n stroke: new Stroke(stroke || styleDefaults.stroke),\n fill: new Fill(fill || styleDefaults.fill),\n });\n break;\n case 'GeometryCollection':\n retStyle = new Style({\n text: getTextStyle(type, textStyle),\n stroke: new Stroke(stroke || styleDefaults.stroke),\n fill: new Fill(fill || styleDefaults.fill),\n image: new CircleStyle({\n radius: 10,\n fill: null,\n stroke: new Stroke({\n color: 'magenta',\n }),\n }),\n });\n break;\n default:\n break;\n }\n return retStyle;\n}\n\nfunction getVectorTileLayer({\n viewFilter,\n label,\n zIndex,\n maxZoom,\n minZoom,\n extent,\n projection,\n url,\n attribution,\n style = {},\n}) {\n const _style = new Style({\n stroke: new Stroke(\n style.stroke ?? {\n color: 'gray',\n width: 1,\n },\n ),\n fill: new Fill(\n style.fill ?? {\n color: 'rgba(20,20,20,0.9)',\n },\n ),\n });\n return new VectorTileLayer({\n maxZoom,\n viewFilter,\n minZoom,\n zIndex,\n name: label,\n extent,\n style: () => _style,\n source: new VectorTileSource({\n format: new MVT(),\n projection,\n attributions: attribution,\n url,\n zIndex,\n }),\n });\n}\n\nfunction getWTMSLayer({\n viewFilter,\n attributions,\n maxZoom,\n minZoom,\n label,\n url,\n layer,\n matrixSet,\n opacity = 1,\n}) {\n const tileLayer = new TileLayer({\n opacity,\n maxZoom,\n minZoom,\n viewFilter,\n name: label,\n });\n fetch(url)\n .then(response => response.text())\n .then(text => {\n const options = optionsFromCapabilities(parserWMTS.read(text), {\n layer,\n matrixSet,\n });\n options.crossOrigin = 'Anonymous';\n tileLayer.set('name', label || options.title);\n options.attributions = attributions;\n tileLayer.setSource(new WMTS(options));\n });\n return tileLayer;\n}\n\nfunction getWMSLayer({\n viewFilter,\n attributions,\n projection,\n maxZoom,\n zIndex,\n minZoom,\n extent,\n ratio = 1,\n params = {},\n label,\n url,\n opacity = 1,\n tiled = false,\n}) {\n return tiled\n ? new TileLayer({\n opacity,\n maxZoom,\n minZoom,\n viewFilter,\n zIndex,\n extent,\n name: label,\n source: new TileWMS({\n crossOrigin: 'Anonymous',\n projection,\n url,\n params,\n transition: 0,\n attributions,\n }),\n })\n : new ImageLayer({\n opacity: opacity || 1,\n name: label,\n maxZoom,\n minZoom,\n zIndex,\n viewFilter,\n extent,\n source: new ImageWMS({\n serverType: 'mapserver',\n ratio,\n projection,\n crossOrigin: 'Anonymous',\n url,\n params,\n attributions,\n }),\n });\n}\n\nfunction getOSMLayer({ viewFilter, label, zIndex, maxZoom, minZoom, extent }) {\n return new TileLayer({\n maxZoom,\n viewFilter,\n minZoom,\n zIndex,\n extent,\n name: label,\n source: new OSM(),\n });\n}\n\nfunction getXYZLayer({\n viewFilter,\n projection,\n gridParams,\n zIndex,\n maxZoom,\n minZoom,\n label,\n url,\n attribution,\n params,\n extent,\n}) {\n return new TileLayer({\n name: label,\n maxZoom,\n minZoom,\n extent,\n viewFilter,\n source: new XYZ({\n projection,\n attributions: attribution,\n url,\n zIndex,\n crossOrigin: 'Anonymous',\n params,\n tileGrid: gridParams ? new TileGrid(gridParams) : undefined,\n }),\n });\n}\n\nfunction getCustomLayer({\n viewFilter,\n maxZoom,\n zIndex,\n minZoom,\n label,\n url,\n gridParams,\n projection,\n}) {\n const urlTemplate = `${url}_alllayers/L{z}/R{y}/C{x}.png`;\n return new TileLayer({\n name: label,\n zIndex,\n maxZoom,\n viewFilter,\n minZoom,\n source: new TileImage({\n tileUrlFunction(tileCoord) {\n const z = tileCoord[0];\n const x = tileCoord[1];\n const y = tileCoord[2];\n const _z = `00${z.toString()}`.substr(-2);\n const _r = `00000000${y.toString(16)}`.substr(-8);\n const _c = `00000000${x.toString(16)}`.substr(-8);\n return urlTemplate\n .replace('{z}', _z)\n .replace('{y}', _r)\n .replace('{x}', _c);\n },\n projection,\n tileGrid: new TileGrid(gridParams),\n }),\n });\n}\n\nfunction getTileArcGISRestLayer({\n viewFilter,\n maxZoom,\n zIndex,\n minZoom,\n label,\n url,\n attribution,\n format = 'PNG',\n}) {\n return new TileLayer({\n name: label,\n opacity: 1.0,\n maxZoom,\n minZoom,\n viewFilter,\n zIndex,\n source: new TileArcGISRest({\n attributions: attribution,\n url,\n crossOrigin: 'Anonymous',\n params: { FORMAT: format },\n }),\n });\n}\n\nfunction getStaticImageLayer({\n viewFilter,\n opacity = 1.0,\n imageSmoothing = true,\n maxZoom,\n zIndex,\n minZoom,\n label,\n url,\n projection,\n extent,\n}) {\n return new ImageLayer({\n name: label,\n opacity,\n maxZoom,\n minZoom,\n viewFilter,\n zIndex,\n source: new ImageStatic({\n imageSmoothing,\n url,\n projection,\n imageExtent: extent,\n }),\n });\n}\n\nfunction getImageArcGISRestLayer({\n viewFilter,\n maxZoom,\n zIndex,\n minZoom,\n label,\n url,\n attribution,\n params,\n projection,\n}) {\n return new ImageLayer({\n name: label,\n opacity: 1.0,\n maxZoom,\n minZoom,\n viewFilter,\n zIndex,\n source: new ImageArcGISRest({\n attributions: attribution,\n url,\n projection,\n ratio: 1,\n crossOrigin: 'Anonymous',\n params,\n }),\n });\n}\n\nfunction getJsonLayer({\n featureProjection,\n attribution,\n opacity = 1,\n highlightedStyle,\n idProperty,\n declutter = false,\n type,\n extent,\n label,\n url,\n dataProjection,\n labelProperty,\n style,\n styleProperty,\n zIndex = null,\n maxZoom,\n minZoom,\n hoverStyle,\n textStyle,\n viewFilter,\n haslinks,\n}) {\n const vectorSource = new VectorSource({ attributions: attribution });\n const FeatureParser = type === 'topojson' ? TopoJSON : GeoJSON;\n const layer = new VectorLayer({\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n name: label,\n source: vectorSource,\n type,\n declutter,\n extent,\n maxZoom,\n interactive: !!hoverStyle,\n haslinks: !!haslinks,\n opacity,\n viewFilter,\n minZoom,\n zIndex,\n style(feature) {\n return feature._style;\n },\n });\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.onload = () => {\n if (xhr.status === 200) {\n const data = JSON.parse(xhr.responseText);\n if (data.bbox) {\n layer.setExtent(data.bbox);\n }\n const features = new FeatureParser({\n dataProjection: dataProjection || 'EPSG:3857',\n }).readFeatures(data, { featureProjection });\n features.forEach(feat => {\n if (idProperty && feat.get(idProperty)) {\n feat.setId(feat.get(idProperty));\n }\n feat._style = getStyle(\n feat.getGeometry().getType(),\n style[feat.get(styleProperty)] || style,\n textStyle,\n );\n\n if (highlightedStyle) {\n feat._highlightedStyle = getStyle(\n feat.getGeometry().getType(),\n highlightedStyle.style[feat.get(styleProperty)] ||\n highlightedStyle.style,\n highlightedStyle.textStyle,\n );\n }\n\n if (hoverStyle) {\n if (hoverStyle.style) {\n feat._hoverStyle = getStyle(\n feat.getGeometry().getType(),\n hoverStyle.style[feat.get(styleProperty)] || hoverStyle.style,\n hoverStyle.textStyle,\n );\n if (hoverStyle.labelProperty) {\n feat._hoverStyle\n .getText()\n .setText(feat.get(hoverStyle.labelProperty));\n }\n }\n if (hoverStyle.tooltipProperty) {\n feat._toolTip = feat.get(hoverStyle.tooltipProperty);\n }\n }\n if (labelProperty) {\n feat._style.getText().setText(feat.get(labelProperty));\n }\n });\n vectorSource.addFeatures(features);\n vectorSource.dispatchEvent('done');\n } else {\n /* eslint-disable-next-line no-throw-literal */\n throw `generate layer ${label} failed`;\n }\n };\n xhr.send();\n return layer;\n}\n\nfunction _getLayer(args) {\n const {\n group = 'Backgrounds',\n selectable = true,\n visible = false,\n type = 'none',\n label = 'none',\n legendColor = null,\n } = args;\n let bglayer;\n switch (type.toLowerCase()) {\n case 'vectortiles':\n bglayer = getVectorTileLayer(args);\n break;\n case 'staticimage':\n bglayer = getStaticImageLayer(args);\n break;\n case 'osm':\n bglayer = getOSMLayer(args);\n break;\n case 'wmts':\n bglayer = getWTMSLayer(args);\n break;\n case 'wms':\n bglayer = getWMSLayer(args);\n break;\n case 'xyz':\n bglayer = getXYZLayer(args);\n break;\n case 'custom':\n bglayer = getCustomLayer(args);\n break;\n case 'tilearcgisrest':\n bglayer = getTileArcGISRestLayer(args);\n break;\n case 'imagearcgisrest':\n bglayer = getImageArcGISRestLayer(args);\n break;\n case 'geojson':\n bglayer = getJsonLayer(args);\n break;\n case 'topojson':\n bglayer = getJsonLayer(args);\n break;\n default:\n bglayer = new VectorLayer({\n name: label,\n vectorSource: new VectorSource({}),\n });\n }\n bglayer.setProperties({\n legendColor,\n displayInLayerControl: selectable,\n group,\n });\n bglayer.setVisible(visible);\n return bglayer;\n}\n\nexport function getLayer(args) {\n const { type, items, visible, label, group, legendColor } = args;\n if (type === 'layergroup') {\n const ret = items.map((layer, i) => {\n layer.selectable = i === 0;\n layer.group = group;\n layer.label = label;\n layer.visible = visible;\n layer.legendColor = legendColor;\n return _getLayer(layer);\n });\n ret.forEach(layer => {\n layer.linkedlayers = ret;\n });\n return ret;\n }\n return _getLayer(args);\n}\n","import { customElement } from 'lit/decorators.js';\nimport { getLayer } from '../../common/ki-ol-layer-generator';\nimport _AddOn from './_AddOn';\n\n@customElement('ki-layer-factory')\nexport default class KiLayerFactory extends _AddOn {\n static get properties() {\n return {\n additionalLayers: { type: Array },\n };\n }\n\n constructor() {\n super();\n this.mapLayers = [];\n }\n\n _create() {\n this.mapLayers = this.additionalLayers.map(c => getLayer(c));\n this.map.getLayers().extend(this.mapLayers);\n }\n\n _tear() {\n this.mapLayers.forEach(l => this.map.removeLayer(l));\n this.mapLayers = [];\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import { css } from 'lit';\n\n// language=CSS\nexport default css`\n :host {\n display: inline-block;\n color: gray;\n font-size: 14px;\n text-align: center;\n padding: 0;\n position: relative;\n background: transparent;\n pointer-events: all;\n z-index: 10;\n --ui5-listitem-selected-border-bottom: none;\n --sapList_SelectionBackgroundColor: white;\n --sapList_AlternatingBackground: white;\n --_ui5-tree-indent-step: 0;\n }\n\n ui5-checkbox {\n display: none;\n }\n\n .toggle-btn {\n line-height: 36px;\n font-size: 20px;\n position: relative;\n }\n\n :host(.list-visible) {\n height: 100%;\n }\n :host(.list-visible) .toggle-btn {\n background: var(--theme-color, #0056a0);\n fill: white;\n\n z-index: 2;\n }\n\n :host(.list-visible) ki-icon::part(icon) {\n fill: white;\n }\n\n .title,\n .basetitle {\n font-weight: bold;\n text-decoration: underline;\n }\n\n .basetitle {\n padding-left: 55px;\n }\n\n .layer-list {\n position: absolute;\n background: white;\n right: 0;\n top: 0;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n z-index: 1;\n min-width: 200px;\n text-align: left;\n display: block;\n visibility: hidden;\n transform: scale(0.8);\n transform-origin: top right;\n opacity: 0;\n transition: transform 0.3s linear 0s, opacity 0.3s linear 0s,\n visibility 0.3s linear 0s;\n border-radius: 18px;\n padding: 10px;\n }\n\n :host(.list-visible) .layer-list {\n visibility: visible;\n opacity: 1;\n transform: scale(1);\n overflow: auto;\n max-height: calc(100% - 220px);\n }\n\n :host(.sm-screen) .layer-list {\n visibility: visible !important;\n opacity: 1 !important;\n transform: scale(1) !important;\n position: relative;\n top: unset;\n left: unset;\n border-radius: 0;\n }\n\n .layer-item {\n white-space: nowrap;\n height: 40px;\n }\n\n .layer-item.radio {\n white-space: nowrap;\n height: 30px;\n }\n\n ki-checkbox {\n padding: 3px 15px;\n }\n\n .layer-item .label {\n display: inline-block;\n vertical-align: top;\n line-height: 25px;\n background: white;\n padding: 0px 5px;\n }\n\n .layer-item.radio .label {\n line-height: 30px;\n }\n\n hr {\n margin: 10px;\n }\n\n .radiobutton {\n transform: scale(1.5);\n margin-left: 15px;\n margin-right: 20px;\n margin-top: 8px;\n }\n\n .colorlegend {\n display: inline-block;\n vertical-align: middle;\n margin-left: 10px;\n width: 20px;\n height: 3px;\n }\n`;\n","/* eslint-disable wc/no-self-class */\nimport { html, LitElement } from 'lit';\n// eslint-disable-next-line import/extensions\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport '@ui5/webcomponents/dist/Button';\n\nimport '@kisters/wcp-base/components';\n\nimport {\n responsiveMixin,\n SM,\n ViewPort,\n i18nMixin,\n} from '@kisters/wcp-base/decorators';\n\nimport '@ui5/webcomponents/dist/Tree';\nimport '@ui5/webcomponents/dist/TreeItem';\n\nimport nls from '../../locales/index';\nimport style from './ki-layers-control-element.css';\n\n// TODO rework to read from map.\nfunction toggleValue(\n array,\n value,\n flag,\n conflictList: Array | undefined = undefined,\n) {\n const i = array.indexOf(value);\n if (conflictList) {\n conflictList.forEach(\n v => array.indexOf(v) >= 0 && array.splice(array.indexOf(v), 1),\n );\n }\n if (flag && !(array.indexOf(value) >= 0)) {\n array.push(value);\n } else if (!flag && i >= 0) {\n array.splice(array.indexOf(value), 1);\n }\n}\n\n// @ts-expect-error\n@customElement('ki-layers-control-element')\nexport default class KiLayersControlElement extends Mix(\n LitElement,\n [i18nMixin, { nls }],\n responsiveMixin,\n) {\n // language=CSS\n static styles = style;\n\n constructor() {\n super();\n this.treeList = false;\n this.values = [];\n this.layers = [];\n this.__maxHeight = null;\n this.toggleAll = false;\n\n // fix for bug fire map dragging\n const stopEvent = e => {\n e.stopPropagation();\n };\n this.onpointerdown = stopEvent;\n this.onpointerup = stopEvent;\n }\n\n static get properties() {\n return {\n layers: {\n type: Array,\n },\n values: {\n type: Object,\n },\n toggleAll: {\n type: Boolean,\n },\n treeList: {\n type: Boolean,\n },\n };\n }\n\n _renderCheckBoxGroup(group: {\n label: string;\n type: string;\n options: Array<{\n value: string;\n label: string;\n legendColor: string;\n }>;\n }) {\n // @ts-expect-error\n const groupId = group.label.replaceAll(' ', '_');\n\n const groupChecked = (): boolean =>\n group.options.every(option => this.values.indexOf(option.value) >= 0);\n\n const groupIntermediate = (): boolean =>\n group.options.some(option => this.values.indexOf(option.value) >= 0);\n\n const toggleGroup = (selected: boolean): void => {\n group.options.forEach(option => {\n toggleValue(this.values, option.value, selected);\n });\n this._emitChange();\n };\n\n return html`\n
\n
\n toggleGroup(e.target.checked)}\"\n ?checked=${groupChecked()}\n ?indeterminate=${groupIntermediate()}\n >\n {\n const checkbox = this.renderRoot.querySelector(`#${groupId}`);\n checkbox.checked = !checkbox.checked;\n toggleGroup(checkbox.checked);\n }}\"\n >\n ${this.i18n.t(group.label)}\n
\n
\n ${group.options.map(\n option => html`\n
\n {\n toggleValue(this.values, option.value, e.target.checked);\n this._emitChange();\n }}\"\n ?checked=\"${this.values.indexOf(option.value) >= 0}\"\n >\n {\n const checkbox = this.renderRoot.querySelector(\n `#${option.value}`,\n );\n checkbox.checked = !checkbox.checked;\n toggleValue(this.values, option.value, checkbox.checked);\n this._emitChange();\n }}\"\n >\n ${option.label}\n ${option.legendColor\n ? html``\n : ''}\n
\n \n `,\n )}\n \n `;\n }\n\n _renderRadioGroup(group) {\n return html`\n
\n
\n
\n ${this.i18n.t(group.label)}\n
\n
\n ${group.options.map(\n option => html`\n
\n {\n toggleValue(\n this.values,\n option.value,\n e.target.checked,\n group.options.map(op => op.value),\n );\n\n this.renderRoot\n .querySelectorAll('.radiobutton')\n .forEach(node => {\n // eslint-disable-next-line no-param-reassign\n node.checked = node === e.target;\n });\n this._emitChange();\n }}\"\n ?checked=\"${this.values.indexOf(option.value) >= 0}\"\n />\n
${option.label}
\n
\n `,\n )}\n
\n `;\n }\n\n _emitChange() {\n this.requestUpdate();\n this.dispatchEvent(\n new CustomEvent('changed', {\n detail: {\n values: this.values,\n },\n }),\n );\n }\n\n _renderLayerList() {\n return html`\n
\n ${this.layers.map((group, index) => {\n if (group.type === 'checkbox') {\n return [\n this._renderCheckBoxGroup(group),\n index === this.layers.length - 1 ? '' : html`
`,\n ];\n }\n if (group.type === 'radio') {\n return [\n this._renderRadioGroup(group),\n index === this.layers.length - 1 ? '' : html`
`,\n ];\n }\n return '';\n })}\n
\n `;\n }\n\n _renderLayerTree() {\n return html`\n
\n ${this.layers.map(\n group => html` {\n this.values = [\n ...this.renderRoot.querySelectorAll('ui5-tree-item'),\n ]\n .filter(item => item.selected)\n .map(item => item.text);\n this._emitChange();\n }}\"\n @item-click=\"${e => {\n if (e.detail.item.classList.contains('toplevel')) {\n e.detail.item.toggleAttribute('expanded');\n this.requestUpdate();\n }\n }}\"\n mode=\"${group.type === 'checkbox'\n ? 'MultiSelect'\n : 'SingleSelectBegin'}\"\n >\n ${group.options.map(\n opt =>\n html``,\n )}\n `,\n )}\n
\n `;\n }\n\n _hideToplevelSelect() {\n const trees = this.renderRoot.querySelectorAll('ui5-tree');\n if (trees) {\n [...trees].forEach(tree => {\n if (tree.shadowRoot?.children[0]?.children[1]?.shadowRoot) {\n const checkboxOrButtons =\n tree.shadowRoot.children[0].children[1].shadowRoot.querySelectorAll(\n 'ui5-checkbox,ui5-radio-button',\n );\n if (checkboxOrButtons.length > 0) {\n checkboxOrButtons[0].style.display = 'none';\n }\n }\n });\n }\n }\n\n firstUpdated() {\n setTimeout(() => {\n this._hideToplevelSelect();\n }, 200);\n }\n\n updated() {\n this._hideToplevelSelect();\n }\n\n render() {\n let list;\n if (ViewPort.size === SM) {\n list = html`\n {\n this._removeVisible();\n }}\"\n closeable\n >${this._renderLayerList()}\n `;\n } else if (this.treeList) {\n list = this._renderLayerTree();\n } else {\n list = this._renderLayerList();\n }\n // language=html\n return html`\n \n ${list}\n `;\n }\n\n _removeVisible() {\n const layerOptions = this.renderRoot.querySelector('#layers-options');\n if (layerOptions && !layerOptions.visible) {\n this.classList.remove('list-visible');\n }\n }\n\n _toggleList() {\n if (ViewPort.size === SM) {\n this.classList.toggle('list-visible');\n this.renderRoot.querySelector('#layers-options').show();\n } else {\n this.classList.toggle('list-visible');\n this._hideToplevelSelect();\n }\n }\n}\n","import Control from 'ol/control/Control';\nimport { groupBy } from 'lodash-es/collection';\nimport { unByKey } from 'ol/Observable';\nimport { setWithExpiry, getWithExpiry } from '@kisters/wcp-base/common';\n\nexport default class LayersControl extends Control {\n constructor(options) {\n options.element = document.createElement('ki-layers-control-element');\n super(options);\n this.toggleAll = options.toggleAll;\n this.treeList = options.treeList;\n this.i18n = options.i18n;\n this.groups = options.groups;\n this.style = options.style;\n this.context = options.context;\n this.cachePrefix = options.cachePrefix;\n this._listenLanguageChange();\n }\n\n setMap(map) {\n super.setMap(map);\n if (map) {\n this._buildOptions();\n this.element.addEventListener('changed', e => {\n this._setLayersVisible(e.detail.values);\n });\n this.__layerChangeListenerKey = map\n .getLayers()\n .on('change:length', () => {\n this._buildOptions();\n });\n } else {\n unByKey(this.__layerChangeListenerKey);\n }\n }\n\n set style(style) {\n this.element.style = style;\n }\n\n // TODO\n _buildOptions() {\n const items = this._getItems();\n const layerGroups = groupBy(items, l => l.get('group'));\n this.element.toggleAll = this.toggleAll;\n this.element.treeList = this.treeList;\n this.element.layers = this.groups.map(k => {\n const groupName = typeof k === 'string' ? k : k.name;\n const ls = layerGroups[groupName] || [];\n return {\n label: this.i18n?.t(groupName) || groupName,\n type: k.type || 'checkbox',\n options: ls.map(l => ({\n label: this.i18n?.t(l.get('name')),\n value: l.get('name'),\n legendColor: l.get('legendColor'),\n })),\n };\n });\n\n const values = getWithExpiry(\n `${this.cachePrefix}_LayersControl-visibleLayers`,\n true,\n );\n if (values) {\n this._setLayersVisible(values);\n this.element.values = values;\n } else {\n this.element.values = items\n .filter(l => l.getVisible())\n .map(l => l.get('name'));\n }\n }\n\n _setLayersVisible(values) {\n setWithExpiry(\n `${this.cachePrefix}_LayersControl-visibleLayers`,\n values,\n 24 * 3600 * 1000,\n true,\n );\n this._getItems().forEach(item => {\n const name = item.get('name');\n const viewFilter = item.get('viewFilter');\n\n item.setVisible(values.indexOf(name) >= 0);\n if (item.linkedlayers) {\n item.linkedlayers.forEach(layer =>\n layer.setVisible(values.indexOf(name) >= 0),\n );\n }\n if (viewFilter) {\n item.setVisible(\n viewFilter.length && !viewFilter.includes(this.context),\n );\n }\n });\n }\n\n _getItems() {\n return [\n ...this.getMap().getLayers().getArray(),\n ...this.getMap().getControls().getArray(),\n ]\n .filter(l => {\n const viewFilter = l.get('viewFilter');\n if (\n viewFilter &&\n viewFilter.length &&\n !viewFilter.includes(this.context)\n ) {\n l.setVisible(false);\n return false;\n }\n if (!viewFilter) {\n return true;\n }\n l.setVisible(true);\n return true;\n })\n .filter(l => l.get('displayInLayerControl') || l.displayInLayerControl);\n }\n\n _listenLanguageChange() {\n if (this.i18n) {\n this.i18n.on('initialized', () => {\n this._buildOptions();\n });\n this.i18n.on('languageChanged', () => {\n this._buildOptions();\n });\n }\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport LayersControl from './LayersControl';\nimport './ki-layers-control-element';\n\n@customElement('ki-layers-control')\nexport default class KiLayersControl extends _AddOn {\n // TODO i18n?\n\n constructor() {\n super();\n this.cachePrefix = 'none';\n }\n\n static get properties() {\n return {\n groups: { type: Array },\n i18n: { type: Object },\n style: { type: String },\n context: { type: String },\n cachePrefix: { type: String },\n toggleAll: { type: Boolean },\n treeList: { type: Boolean },\n };\n }\n\n _create() {\n this.controller = new LayersControl({\n toggleAll: this.toggleAll,\n treeList: this.treeList,\n i18n: this.i18n,\n groups: this.groups,\n style: this.style,\n context: this.context,\n cachePrefix: this.cachePrefix,\n });\n this.map.addControl(this.controller);\n }\n\n _tear() {\n this.map.removeControl(this.controller);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update. for simple component can just recreate.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport VectorLayer from 'ol/layer/Vector';\nimport VectorSource from 'ol/source/Vector';\nimport Feature from 'ol/Feature';\nimport Point from 'ol/geom/Point';\nimport CanvasVectorLayerRenderer from 'ol/renderer/canvas/VectorLayer';\n\n// support hide feature;\nclass _CanvasVectorLayerRenderer extends CanvasVectorLayerRenderer {\n // eslint-disable-next-line consistent-return,camelcase\n renderFeature(feature, squaredTolerance, styles, builderGroup, optTransform) {\n if (feature.hide) {\n return false;\n }\n super.renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n optTransform,\n );\n }\n}\n\n/*\n * support hide features according legends\n * render features for stations with one function\n * */\nexport default class StationsLayer extends VectorLayer {\n tagProperty = '__tag'; // TODO\n\n constructor(options) {\n options = {\n updateWhileInteracting: true,\n updateWhileAnimating: true,\n source: new VectorSource(),\n stations: [],\n ...options,\n };\n super(options);\n this.changeCounter = 0;\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n timeActive: options.timeActive || false,\n group: options.group,\n });\n this.selection = [];\n Object.assign(this, options);\n }\n\n set stations(val) {\n this.__stations = val;\n this.reload();\n }\n\n get stations() {\n return this.__stations;\n }\n\n set legends(legends) {\n this._legends = legends.concat(['_default']);\n this.reload();\n }\n\n reload() {\n const source = this.getSource();\n source.clear();\n if (this.stations && this.stations.length) {\n this.changeCounter += 1;\n this.setSource(\n new VectorSource({\n features: this._createStationFeatures(this.stations),\n }),\n );\n this._processFeaturesWithLegend();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n _filterStations(stations) {\n return stations.filter(station => {\n const info = this._getStationInfos(station);\n const longLatMissed =\n (!info.longitude && !info.latitude) ||\n info.longitude > 180 ||\n info.longitude < -180 ||\n info.latitude < -90 ||\n info.latitude > 90;\n return !longLatMissed;\n });\n }\n\n _getStationInfos(station) {\n return {\n longitude: this.isSiteLayer\n ? station.site_longitude\n : station.station_longitude,\n latitude: this.isSiteLayer\n ? station.site_latitude\n : station.station_latitude,\n no: this.isSiteLayer ? station.site_no : station.station_no,\n name: this.isSiteLayer ? station.site_name : station.station_name,\n };\n }\n\n _processFeaturesWithLegend() {\n // why hide it not filter it ? because need keep it map for selection.\n const features = this.getSource().getFeatures();\n features.forEach(f => {\n const tag = f.station[this.tagProperty];\n if (tag && this._legends) {\n f.hide = tag.split('|').some(t => this._legends.indexOf(t) === -1);\n }\n });\n }\n\n _createStationFeatures(stations) {\n const ret = [];\n stations.forEach(station => {\n if (station.point) {\n const f = new Feature(new Point(station.point));\n const style = this._getStationStyle(\n station,\n this.selection.includes(station.station_id),\n );\n if (style) {\n f.setStyle(style);\n }\n f.station = station;\n ret.push(f);\n }\n });\n return ret;\n }\n\n // eslint-disable-next-line no-unused-vars,class-methods-use-this\n _getStationStyle() {\n throw new Error('need implement');\n }\n\n createRenderer() {\n return new _CanvasVectorLayerRenderer(this);\n }\n}\n","import Control from 'ol/control/Control';\nimport StationsLayer from './StationsLayer';\nimport '../ki-legend/ki-legend';\n/*\n * switch legend and set to all layers.\n * */\nexport default class LegendSwitcher extends Control {\n constructor(params = {}) {\n params = { visible: true, ...params };\n params.element = document.createElement('ki-legend');\n params.element.part = 'legend';\n super(params);\n this.options = Array.isArray(params.options)\n ? params.options\n : [params.options];\n this.setVisible(params.visible);\n this.addstyle = params.addstyle;\n this.setProperties({\n name: params.name,\n displayInLayerControl: params.displayInLayerControl,\n group: params.group,\n });\n }\n\n set description(description) {\n this.element.description = description;\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set options(options) {\n this.element.options = Array.isArray(options) ? options : [options];\n }\n\n set addstyle(style) {\n this.element.addstyle = style;\n }\n\n setMap(map) {\n super.setMap(map);\n // TODO update flow\n this.element.addEventListener('changed', e => {\n this.getMap()\n .getLayers()\n .forEach(l => {\n if (l instanceof StationsLayer) {\n l.legends = e.detail.value;\n }\n });\n });\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import { isEqual } from 'lodash-es/lang';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport LegendSwitcher from './LegendSwitcher';\nimport nls from '../../locales/index';\n\n@customElement('ki-legend-control')\nexport default class KiLegendControl extends Mix(_AddOn, [i18nMixin, { nls }]) {\n static get properties() {\n return {\n options: {\n type: Object,\n hasChanged(newVal, oldVal) {\n return !isEqual(newVal, oldVal);\n },\n },\n addstyle: { type: String },\n // for all addOn controller ?\n };\n }\n\n _create() {\n this.legendSwitcher = new LegendSwitcher({\n name: this.i18n.t('Legends'),\n displayInLayerControl: true,\n group: 'Information',\n options: this.options,\n addstyle: this.addstyle,\n });\n this.map.addControl(this.legendSwitcher);\n }\n\n _tear() {\n this.map.removeControl(this.legendSwitcher);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n if (_changedProperties.has('options') && this.legendSwitcher) {\n this.legendSwitcher.options = this.options;\n }\n if (_changedProperties.has('addstyle') && this.legendSwitcher) {\n this.legendSwitcher.addstyle = this.addstyle;\n }\n if (_changedProperties.has('disabled') && this.legendSwitcher) {\n this.legendSwitcher.disabled = this.disabled;\n }\n }\n}\n","import Control from 'ol/control/Control';\nimport '@kisters/wcp-base/components';\nimport { fromLonLat } from 'ol/proj';\n\nif (!navigator.geolocation) {\n console.warn('Geolocation is not supported for this Browser/OS.');\n}\n\nexport default class LocationControl extends Control {\n constructor(options = {}) {\n options.element = document.createElement('ki-icon-btn');\n options.element.icon = 'ki ki-crosshairs';\n options.element.classList.add('location-btn');\n super(options);\n }\n\n gotoLocation() {\n // TODO timeout\n // need https\n const p = new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n pos => {\n this.getMap()\n .getView()\n .animate({\n center: fromLonLat(\n [pos.coords.longitude, pos.coords.latitude],\n this.getMap().getView().getProjection(),\n ),\n duration: 500,\n });\n resolve();\n },\n e => {\n console.error(e);\n alert(\"Can't get your location\");\n reject(e);\n },\n {\n timeout: 2000,\n },\n );\n });\n\n // TODO show loading?\n console.log(p);\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport LocationControl from './LocationControl';\n\n@customElement('ki-location-control')\nexport default class KiLocationControl extends _AddOn {\n _create() {\n this.locationControl = new LocationControl();\n this.map.addControl(this.locationControl);\n }\n\n _tear() {\n this.map.removeControl(this.locationControl);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import Control from 'ol/control/Control';\n/*\n * switch legend and set to all layers.\n * */\nexport default class PopupSwitcher extends Control {\n constructor(params = {}) {\n params = { visible: true, ...params };\n params.element = document.createElement('div');\n params.element.part = 'popup';\n super(params);\n this.setVisible(params.visible);\n this.addstyle = params.addstyle;\n this.setProperties({\n name: params.name,\n displayInLayerControl: params.displayInLayerControl,\n group: params.group,\n });\n }\n\n set description(description) {\n this.element.description = description;\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set addstyle(style) {\n this.element.addstyle = style;\n }\n\n set displayInLayerControl(visible) {\n this.setProperties({ displayInLayerControl: visible });\n }\n\n setMap(map) {\n super.setMap(map);\n // TODO update flow\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n const map = this.getMap();\n if (map) {\n map.disablePopup = !flag;\n }\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import {\n i18nMixin,\n responsiveMixin,\n SM,\n ViewPort,\n} from '@kisters/wcp-base/decorators';\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport _AddOn from './_AddOn';\nimport PopupSwitcher from './PopupSwitcher';\nimport nls from '../../locales/index';\n\n@customElement('ki-popup-control')\nexport default class KiPopupControl extends Mix(\n _AddOn,\n [i18nMixin, { nls }],\n responsiveMixin,\n) {\n static get properties() {\n return {\n addstyle: { type: String },\n // for all addOn controller ?\n };\n }\n\n _create() {\n this.popupSwitcher = new PopupSwitcher({\n name: this.i18n.t('PopupSwitcher'),\n displayInLayerControl: ViewPort.size !== SM,\n group: 'Information',\n addstyle: this.addstyle,\n });\n this.map.addControl(this.popupSwitcher);\n }\n\n _tear() {\n this.map.removeControl(this.popupSwitcher);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n if (this.popupSwitcher) {\n this.popupSwitcher.displayInLayerControl = ViewPort.size !== SM;\n }\n if (_changedProperties.has('addstyle') && this.popupSwitcher) {\n this.popupSwitcher.addstyle = this.addstyle;\n }\n if (_changedProperties.has('disabled') && this.popupSwitcher) {\n this.popupSwitcher.disabled = this.disabled;\n }\n }\n}\n","import { css } from 'lit';\n\n// language=CSS\nexport default css`\n :host {\n display: block;\n overflow: hidden;\n }\n\n .hide {\n display: none !important;\n }\n\n ki-layers-control-element {\n position: absolute;\n top: 200px;\n right: 20px;\n z-index: 222;\n bottom: unset;\n }\n\n #map {\n height: 100%;\n width: 100%;\n transform-origin: left;\n }\n\n ki-icon-btn[active]{\n background-color:var(--theme-color-primary, #0056a0);\n fill: white;\n }\n\n ki-icon-btn,\n .icon-btn {\n fill: gray;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n width: 40px;\n height: 40px;\n text-align: center;\n line-height: 40px;\n border-radius: 40px;\n font-size: 20px;\n cursor: pointer;\n position: absolute;\n box-sizing: border-box;\n }\n\n ki-icon-btn ki-icon,\n .icon-btn ki-icon {\n display: block;\n }\n\n ki-icon-btn:hover,\n .icon-btn:hover {\n fill: #4a4a49;\n }\n\n .download-btn {\n top: 15px;\n right: 20px;\n }\n\n ki-icon-switcher {\n position: absolute;\n display: flex;\n top: 250px;\n flex-direction: column;\n right: 20px;\n }\n\n ki-legend {\n bottom: 20px;\n left: 20px;\n transition: 0.6s all;\n }\n\n .legends-btn {\n top: 15px;\n right: 15px;\n display: none;\n }\n\n .dragbox {\n box-sizing: border-box;\n border-radius: 2px;\n border: 2px solid #1093cd;\n background: rgba(16, 147, 205, 0.4);\n }\n\n :host(.sm-screen) ki-layers-control-element {\n height: auto;\n top: unset;\n right: unset;\n left: 5px;\n bottom: 40px;\n z-index: unset;\n }\n\n :host(.sm-screen) ki-legend {\n display: block;\n top: unset;\n bottom: 90px;\n right: 15px;\n left: unset;\n }\n\n :host(.sm-screen) ki-station-map-zoom-button {\n bottom: 40px;\n top: unset;\n }\n\n :host(.sm-screen) .location-btn {\n top: unset;\n right: 15px;\n bottom: 140px;\n padding: 0;\n }\n\n :host(.sm-screen) #scale-info,\n :host(.sm-screen) .download-btn,\n :host(.sm-screen) ki-icon-switcher,\n :host(.sm-screen) .ol-scale-line,\n :host(.sm-screen) #overview-map {\n display: none;\n }\n\n table.datatable{\n margin: 5px 10px;\n border-collapse: collapse;\n }\n\n .datatable td, .datatable th{\n padding: 5px 10px;\n }\n\n select.control{\n border-width:0;\n background: white;\n border-radius:5px;\n }\n ki-player {\n position: absolute;\n bottom: 0px;\n\n left: 20%;\n width:70%;\n pointer-events: all;\n }\n\n .ol-scale-line {\n bottom: 0;\n left: 0;\n position: relative;\n }\n\n div.ol-scale-line,\n .custom-mouse-position {\n background: transparent;\n display: flex;\n position: relative;\n top: unset;\n left: unset;\n right: unset;\n bottom: unset;\n font-size: 10px;\n }\n .custom-mouse-position .info-box {\n align-self: center;\n font-size: 1.3em;\n padding: 0 10px;\n }\n .custom-mouse-position select {\n border-width: 0;\n color: rgb(74, 74, 73);\n }\n div.ol-scale-line-inner {\n color: #4a4a49;\n border: 1px solid #4a4a49;\n border-top: none;\n }\n #scale-info {\n display: flex;\n position: absolute;\n left: unset;\n right: 10px;\n bottom: 5px;\n background: white;\n color: #4a4a49;\n opacity: 0.8;\n padding: 2px;\n }\n div.ol-attribution.ol-uncollapsible {\n bottom: 5px;\n right: 50%;\n transform: translateX(50%);\n color: rgb(74, 74, 73);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .ol-attribution ul li {\n padding: 0 5px;\n color: rgb(74, 74, 73);\n }\n #overview-map {\n position: absolute;\n right: 15px;\n bottom: 40px;\n width: 180px;\n height: 150px;\n background-color: rgba(255, 255, 255, 1);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n }\n\n .ol-popup.default {\n position: fixed !important;\n z-index: 111;\n }\n\n .ol-popup.default div {\n border: none;\n max-height: 90%;\n overflow: auto;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n padding: 0;\n }\n .ol-popup.default .anchor {\n color: rgba(0, 0, 0, 0.14);\n }\n\n .tooltip-content {\n white-space: nowrap;\n }\n\n .ol-overlaycontainer-stopevent {\n z-index: unset !important;\n }\n\n .time-control-btn{\n position: absolute;\n bottom: 65px;\n right: 20px;\n z-index: 222;\n top: unset;\n pointer-events: all;\n }\n`;\n","import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { Mix } from '@kisters/wcp-base/common';\n\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport nls from '../../locales/index';\nimport style from './ki-station-map.css';\n\n@customElement('ki-station-download-button')\nexport default class KiStationDownloadButton extends Mix(LitElement, [\n i18nMixin,\n { nls },\n]) {\n // language=CSS\n static styles = style;\n\n static get properties() {\n return {\n selectedStations: { type: Array },\n };\n }\n\n render() {\n // language=html\n return html`\n \n `;\n }\n\n downloadStations() {\n this.dispatchEvent(\n new CustomEvent('downloadstationsmd', {\n bubbles: true,\n }),\n );\n }\n}\n","import Control from 'ol/control/Control';\nimport './ki-station-download-button';\n/*\n * station download layers.\n * */\nexport default class StationDownloadLayer extends Control {\n constructor(options = {}) {\n options = { visible: true, ...options };\n options.element = document.createElement('ki-station-download-button');\n options.element.selectedStations = options.selectedStations;\n super(options);\n this.label = options.label;\n this.setVisible(options.visible);\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n group: options.group,\n });\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set options(options) {\n this.element.options = options;\n }\n\n setMap(map) {\n super.setMap(map);\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport StationDownloadLayer from './StationDownloadLayer';\n\n@customElement('ki-station-download-control')\nexport default class KiStationDownloadControl extends _AddOn {\n static get properties() {\n return {\n label: { type: String },\n selectedStations: { type: Array },\n };\n }\n\n _create() {\n this.stationDownloadLayer = new StationDownloadLayer({\n name: 'Station download',\n displayInLayerControl: false,\n group: 'Information',\n label: this.label,\n selectedStations: this.selectedStations,\n });\n this.map.addControl(this.stationDownloadLayer);\n this.stationDownloadLayer.element.addEventListener(\n 'downloadstationsmd',\n () => {\n this.dispatchEvent(\n new CustomEvent('downloadstationsmd', {\n bubbles: true,\n }),\n );\n },\n );\n }\n\n _tear() {\n this.map.removeControl(this.stationDownloadLayer);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\n\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport nls from '../../locales/index';\nimport { ExternalStation } from '../../common';\n\n@customElement('ki-station-info')\nexport default class KiStationInfo extends Mix(LitElement, [\n i18nMixin,\n { nls },\n]) {\n static styles = css`\n :host {\n display: block;\n }\n .station-name {\n padding-right: 5px;\n padding-left: 10px;\n padding-top: 10px;\n font-size: 1.2em;\n }\n\n hr {\n margin: 5px 0;\n }\n .table {\n display: table;\n line-height: 1.5em;\n }\n .row {\n display: table-row;\n }\n .cell {\n display: table-cell;\n padding: 0 10px;\n min-width: 50px;\n color: gray;\n }\n .label {\n color: #4a4a49;\n }\n `;\n\n static get properties() {\n return {\n stations: { type: Array }, // can be one or more stations\n };\n }\n\n constructor() {\n super();\n this.stations = [];\n const formatter = new Intl.NumberFormat(this.i18n.language, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n this.valFormatter = {\n format(val) {\n return val === 0 ? val : formatter.format(val);\n },\n };\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n _stationExternal(station: ExternalStation) {\n return html`
\n ${station.station_no} | ${station.station_name} | ${station.river_name}\n
\n
\n
\n
\n
${unsafeHTML(station.description)}
\n
\n
`;\n }\n\n _stationTmpl(station) {\n const parameter =\n station.stationparameter_longname || station.stationparameter_name;\n return html`
\n ${station.station_no} | ${station.station_name} | ${station.river_name}\n
\n
\n
\n
\n
${this.i18n.t(parameter)}
\n
\n ${station.ts_value != null\n ? `${this.valFormatter.format(station.ts_value)} ${\n station.ts_unitsymbol\n }`\n : '-'}\n
\n
\n
\n
${this.i18n.t('last_measure')}
\n
\n ${(station.timestamp &&\n dayjs(station.timestamp).tz().format('L LT')) ||\n '-'}\n
\n
\n
`;\n }\n\n render() {\n return html`${this.stations.map(station =>\n station.external\n ? this._stationExternal(station)\n : this._stationTmpl(station),\n )}`;\n }\n}\n","export default function f(claz) {\n return class extends claz {\n constructor(args) {\n super(args);\n this._visible = true;\n this.setProperties({\n name: args.name,\n group: args.group,\n displayInLayerControl: args.displayInLayerControl,\n });\n\n this.__element = args.__element || this.element;\n }\n\n setVisible(flag) {\n this._visible = flag;\n this.__element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n };\n}\n","import Control from 'ol/control/Control';\nimport { SM, ViewPort } from '@kisters/wcp-base/decorators';\nimport Overview from 'ol-ext/control/Overview';\nimport Style from 'ol/style/Style';\nimport Stroke from 'ol/style/Stroke';\nimport Fill from 'ol/style/Fill';\nimport { inAndOut } from 'ol/easing';\nimport Circle from 'ol/style/Circle';\nimport VisibleMixin from './VisibleMixin';\nimport { getLayer } from '../../common/ki-ol-layer-generator';\n/*\n * map overview layers.\n * */\nexport default class stationMapOverviewLayer extends Control {\n constructor(options = {}) {\n options = { visible: true, ...options };\n const se = options.map.getOverlayContainerStopEvent();\n const div = se.ownerDocument.createElement('div');\n options.element = div;\n div.id = 'overview-map';\n div.part = 'overview-map';\n ViewPort.size !== SM && se.appendChild(div);\n\n const _ovmap = new (VisibleMixin(Overview))({\n name: 'Overview',\n group: 'Information',\n displayInLayerControl: options.displayInLayerControl,\n layers: options.layerOptions.layer.map(layer => getLayer(layer)),\n panAnimation: inAndOut,\n maxZoom: options.layerOptions.maxZoom,\n minZoom: options.layerOptions.minZoom,\n projection: options.layerOptions.projection,\n target: div,\n __element: div,\n style: [\n new Style({\n image: new Circle({\n fill: new Fill({\n color: 'rgba(105,105,105,0.8)',\n }),\n stroke: new Stroke({\n width: 7,\n color: 'rgba(105,105,105,0.8)',\n }),\n radius: 5,\n }),\n stroke: new Stroke({\n width: 1,\n color: 'rgba(16,147,205,1)',\n }),\n }),\n ],\n });\n options.map.addControl(_ovmap);\n super(options);\n this.label = options.label;\n this._ovmap = _ovmap;\n this.setVisible(options.visible);\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n group: options.group,\n });\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set options(options) {\n this.element.options = options;\n }\n\n setMap(map) {\n super.setMap(map);\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport StationMapOverviewLayer from './StationMapOverviewLayer';\n\n@customElement('ki-station-map-overview-control')\nexport default class KiStationMapOverviewControl extends _AddOn {\n constructor() {\n super();\n this.displayInLayerControl = false;\n }\n\n static get properties() {\n return {\n label: { type: String },\n layerOptions: { type: Object },\n displayInLayerControl: { type: Boolean },\n };\n }\n\n _create() {\n if (this.layerOptions && this.layerOptions.layer.length) {\n this.stationMapOverviewLayer = new StationMapOverviewLayer({\n layerOptions: this.layerOptions,\n name: 'Map overview',\n displayInLayerControl: this.displayInLayerControl,\n group: 'Information',\n label: this.label,\n selectedStations: this.selectedStations,\n map: this.map,\n });\n this.map.addControl(this.stationMapOverviewLayer);\n }\n }\n\n _tear() {\n this.map.removeControl(this.stationMapOverviewLayer);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import proj4 from 'proj4';\nimport { register } from 'ol/proj/proj4';\n\nconst projections = [\n [\n 'EPSG:31370',\n '+title=Lambert 72 +proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=-106.869,52.2978,-103.724,0.3366,-0.457,1.8422,-1.2747 +units=m +no_defs',\n ],\n [\n 'EPSG:3812',\n '+title=Lambert 2008 +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=649328 +y_0=665262 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',\n ],\n [\n 'EPSG:31258',\n '+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs',\n ],\n [\n 'EPSG:25832',\n '+title=ETRS89/ UTM 32N +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',\n ],\n];\nproj4.defs(projections);\nregister(proj4);\n\nexport default proj4;\n","import MousePosition from 'ol/control/MousePosition';\nimport { format } from 'ol/coordinate';\nimport proj4 from '../../common/projections';\n\nexport default class MultiMousePosition extends MousePosition {\n constructor(options) {\n super(options);\n const self = this;\n this.info = document.createElement('div');\n this.info.className = 'info-box';\n const select = document.createElement('select');\n this.projections = options.projections || ['EPSG:4326'];\n this.projections = options.projections.filter(item => !!proj4(item));\n this.projections.forEach(item =>\n select.appendChild(new Option(proj4(item).oProj.title || item, item)),\n );\n if (this.projections.length < 2) {\n select.style.appearance = 'none';\n }\n [this.currentProj] = this.projections;\n this.element.appendChild(select);\n this.element.appendChild(this.info);\n this.formatter = options.formatter || {\n default: { template: 'x: {x} / y: {y}', decimals: 0 },\n 'EPSG:4326': { template: 'long: {x} / lat: {y}', decimals: 4 },\n };\n select.addEventListener('change', e => {\n self.currentProj = e.target.value;\n });\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n handleMouseOut = function () {};\n\n updateHTML_ = function (pixel) {\n let html = this.undefinedHTML_;\n if (pixel && this.mapProjection_) {\n const map = this.getMap();\n let coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n coordinate = proj4(\n this.mapProjection_.getCode(),\n this.currentProj,\n coordinate,\n );\n const template =\n this.formatter[this.currentProj]?.template ||\n this.formatter.default?.template;\n const decimals =\n this.formatter[this.currentProj]?.decimals ||\n this.formatter.default?.decimals;\n if (template) {\n html = format(coordinate, template, decimals);\n this.info.innerHTML = html;\n }\n }\n }\n };\n}\n","import Control from 'ol/control/Control';\nimport ScaleLine from 'ol/control/ScaleLine';\nimport VisibleMixin from './VisibleMixin';\nimport MultiMousePosition from './MultiMousePosition';\n\n/*\n * station may position and scale layers.\n * */\nexport default class MapPositionScaleLayer extends Control {\n constructor(options = {}) {\n options = { visible: true, ...options };\n options.element = document.createElement('div');\n options.element.setAttribute('id', 'scale-info');\n\n options.map.addControl(\n new (VisibleMixin(MultiMousePosition))({\n projection: 'EPSG:4326',\n className: 'custom-mouse-position',\n target: options.element,\n projections: options.projections,\n name: 'Coordinate',\n group: 'Information',\n displayInLayerControl: options.displayInLayerControl, // hide in mobile\n }),\n );\n\n options.map.addControl(\n new (VisibleMixin(ScaleLine))({\n units: 'metric',\n target: options.element,\n name: 'scale_info',\n group: 'Information',\n displayInLayerControl: options.displayInLayerControl, // hide in mobile\n }),\n );\n\n super(options);\n this.label = options.label;\n this.setVisible(options.visible);\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n group: options.group,\n });\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set options(options) {\n this.element.options = options;\n }\n\n setMap(map) {\n super.setMap(map);\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport MapPositionScaleLayer from './MapPositionScaleLayer';\n\n@customElement('ki-station-map-position-scale-control')\nexport default class kiStationMapPositionScaleControl extends _AddOn {\n constructor() {\n super();\n this.displayInLayerControl = false;\n }\n\n static get properties() {\n return {\n label: { type: String },\n displayInLayerControl: { type: Boolean },\n };\n }\n\n _create() {\n if (this.projections) {\n this.mapPositionScaleLayer = new MapPositionScaleLayer({\n name: 'Station position',\n displayInLayerControl: this.displayInLayerControl,\n group: 'Information',\n label: this.label,\n projections: this.projections,\n selectedStations: this.selectedStations,\n map: this.map,\n });\n this.map.addControl(this.mapPositionScaleLayer);\n }\n }\n\n _tear() {\n this.map.removeControl(this.mapPositionScaleLayer);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import Control from 'ol/control/Control';\nimport '@kisters/wcp-base/components';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\n/*\n * map zoom in and zoom out layers.\n * */\nexport default class RasterControl extends Control {\n constructor(options = {}) {\n options = { visible: true, ...options };\n const div = document.createElement('ki-player');\n const start = dayjs().tz().subtract(24, 'hours').startOf('hour');\n div.labelFormatter = val =>\n `${dayjs(start).tz().add(val, 'hour').format('L LT')}`;\n options.element = div;\n options.element.map = options.map;\n super(options);\n this.label = options.label;\n this.style = options.style;\n this.setVisible(options.visible);\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n group: options.group,\n });\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set options(options) {\n this.element.options = options;\n }\n\n set style(style) {\n this.element.style = style;\n }\n\n setMap(map) {\n super.setMap(map);\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\nimport RasterControl from './RasterControl';\n\n@customElement('ki-station-map-raster-control')\nexport default class kiStationMapRasterControl extends _AddOn {\n constructor() {\n super();\n this.displayInLayerControl = false;\n }\n\n static get properties() {\n return {\n label: { type: String },\n displayInLayerControl: { type: Boolean },\n };\n }\n\n _create() {\n this.rc = new RasterControl({\n name: 'Raster Control',\n displayInLayerControl: this.displayInLayerControl,\n group: 'Information',\n label: this.label,\n projections: this.projections,\n map: this.map,\n });\n this.map.addControl(this.rc);\n }\n\n _tear() {\n this.map.removeControl(this.rc);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\n\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport nls from '../../locales/index';\n\n@customElement('ki-station-map-zoom-button')\nexport default class KiStationMapZoomButton extends Mix(LitElement, [\n i18nMixin,\n { nls },\n]) {\n static styles = [\n css`\n :host {\n position: absolute;\n top: 70px;\n right: 20px;\n pointer-events: all;\n }\n\n .zoom-btns {\n fill: var(--theme-text-color-tertiary, gray);\n background: var(--theme-color-tertiary, white);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n width: 40px;\n text-align: center;\n line-height: 40px;\n border-radius: 40px;\n font-size: 20px;\n cursor: pointer;\n overflow: hidden;\n }\n\n .zoom-btns .btn:hover ki-icon::part(icon) {\n fill: #4a4a49;\n }\n `,\n ];\n\n static get properties() {\n return {\n map: { Object },\n };\n }\n\n render() {\n // language=html\n return html`\n
\n \n \n
\n \n \n \n \n \n \n \n `;\n }\n\n zoomIn() {\n this.map.getView().animate({\n zoom: this.map.getView().getZoom() + 1,\n duration: 500,\n });\n }\n\n zoomToHome() {\n this.map.getView().fit(this.homeExtent, { duration: 500 });\n }\n\n zoomOut() {\n this.map.getView().animate({\n zoom: this.map.getView().getZoom() - 1,\n duration: 500,\n });\n }\n}\n","import Control from 'ol/control/Control';\n/*\n * map zoom in and zoom out layers.\n * */\nexport default class StationMapControl extends Control {\n constructor(options = {}) {\n options = { visible: true, ...options };\n options.element.map = options.map;\n super(options);\n this.label = options.label;\n this.style = options.style;\n this.setVisible(options.visible);\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n group: options.group,\n });\n }\n\n set label(label) {\n this.element.label = label;\n }\n\n set options(options) {\n this.element.options = options;\n }\n\n set style(style) {\n this.element.style = style;\n }\n\n setMap(map) {\n super.setMap(map);\n }\n\n // move a parent class\n setVisible(flag) {\n this._visible = flag;\n this.element.classList.toggle('hide', !flag);\n }\n\n getVisible() {\n return this._visible;\n }\n}\n","import { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { customElement } from 'lit/decorators.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport _AddOn from './_AddOn';\nimport StationMapControl from './StationMapControl';\nimport nls from '../../locales/index';\nimport './ki-station-map-zoom-button';\n\n@customElement('ki-station-map-zoom-control')\nexport default class KiStationMapZoomControl extends Mix(_AddOn, [\n i18nMixin,\n { nls },\n]) {\n static get properties() {\n return {\n label: { type: String },\n style: { type: String },\n homeExtent: { type: Array },\n };\n }\n\n _create() {\n const element = document.createElement('ki-station-map-zoom-button');\n element.homeExtent = this.homeExtent;\n this.stationMapZoomControl = new StationMapControl({\n element,\n homeExtent: this.homeExtent,\n name: 'Zoom',\n displayInLayerControl: false,\n group: 'Information',\n label: this.label,\n map: this.map,\n style: this.style,\n });\n this.map.addControl(this.stationMapZoomControl);\n }\n\n _tear() {\n this.map.removeControl(this.stationMapZoomControl);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n // // TODO how to update.\n if (_changedProperties.size > 0 && this.map) {\n this._tear();\n this._create();\n }\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { getLayer } from '../../common/ki-ol-layer-generator';\n\n@customElement('ki-ol-layer')\nexport default class KiOlLayer extends LitElement {\n @property()\n type?: string;\n\n @property()\n url?: string;\n\n @property()\n label?: string;\n\n @property({ type: Boolean })\n visible = false;\n\n render() {\n return html``;\n }\n\n getOlLayer() {\n return getLayer({\n type: this.type,\n label: this.label,\n visible: this.visible,\n });\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport popupStyle from 'ol-ext/overlay/Popup.css';\nimport {\n getQueryObject,\n i18nMixin,\n responsiveMixin,\n ViewPort,\n SM,\n} from '@kisters/wcp-base/decorators';\nimport { fromLonLat } from 'ol/proj';\nimport { html, LitElement, unsafeCSS } from 'lit';\nimport { customElement, property, queryAssignedNodes } from 'lit/decorators.js';\nimport { Map, View } from 'ol';\nimport { inAndOut } from 'ol/easing';\nimport {\n Mix,\n LoaderMixin,\n setWithExpiry,\n getWithExpiry,\n} from '@kisters/wcp-base/common';\nimport { flatten, debounce } from 'lodash-es';\nimport olcss from 'ol/ol.css';\nimport ovStyle from 'ol-ext/control/Overview.css';\nimport Popup from 'ol-ext/overlay/Popup';\nimport { Attribution, defaults as defaultControls } from 'ol/control';\nimport { getLayer } from '../../common/ki-ol-layer-generator';\nimport style from './ki-station-map.css';\nimport './ki-ol-layer';\nimport nls from '../../locales/index';\n\nexport interface OLStyle {\n background: String;\n icon: String;\n fontSize: Number;\n radius: Number;\n color: String;\n border: Object;\n}\nexport interface OLLayer {\n type: 'topojson' | 'GeoJSON' | 'osm' | 'layergroup' | 'xyz';\n url: string;\n label: string;\n group: string;\n visible: Boolean;\n opacity: Number;\n projection: string;\n zIndex: Number;\n selectable: Boolean;\n viewFilter: Array;\n maxZoom: Number;\n minZoom: Number;\n getOlLayer: Function;\n}\n\nexport interface VectorOLLayer extends OLLayer {\n style: OLStyle;\n hoverStyle: OLStyle;\n textStyle: Object;\n labelProperty: string;\n}\n\n@customElement('ki-station-map')\nexport default class KiStationMap extends Mix(\n LitElement,\n [i18nMixin, { nls }],\n responsiveMixin,\n LoaderMixin,\n) {\n static styles = [\n style,\n unsafeCSS(olcss),\n unsafeCSS(popupStyle),\n unsafeCSS(ovStyle),\n ];\n\n @property({ type: String })\n cachePrefix = 'none';\n\n @property({ type: Object })\n view = {\n projection: 'EPSG:3857',\n center: [0, 0],\n zoom: 2,\n };\n\n @property({ type: Array })\n olLayers = [];\n\n @property({ type: Array })\n layers = [{ type: 'osm', visible: true, label: 'Openstreetmap' }];\n\n @property({ type: Boolean })\n disableMouseOver = false;\n\n @property({ type: Boolean })\n hideAttributions = false;\n\n @property({ type: Number })\n persistancetimeout = 3600;\n\n @queryAssignedNodes({ slot: 'layer', flatten: true })\n layerElements!: Array;\n\n olLayerList: any = [];\n\n firstUpdated() {\n this._createMap();\n }\n\n get _view() {\n return new View(this.view);\n }\n\n get _layers() {\n return this.layerElements\n .map(layer => layer.getOlLayer())\n .concat(this.layers.map(layer => getLayer(layer)));\n }\n\n get __mapElement() {\n return getQueryObject(this, '#map');\n }\n\n get __infoElement() {\n return getQueryObject(this, '#scale-info');\n }\n\n _createMap() {\n this.map = new Map({\n target: this.__mapElement,\n view: this._view,\n controls: this.hideAttributions\n ? []\n : defaultControls({ zoom: false, attribution: false }).extend([\n new Attribution({\n collapsible: false,\n }),\n ]),\n });\n\n const readyEvent = new CustomEvent('kistationmapready');\n\n // this.map.once('rendercomplete', () => {\n this.dispatchEvent(readyEvent);\n this.setMapEvents();\n // });\n\n this.map.on('precompose', evt => {\n if (evt.context) {\n evt.context.imageSmoothingEnabled = false;\n evt.context.webkitImageSmoothingEnabled = false;\n evt.context.mozImageSmoothingEnabled = false;\n evt.context.msImageSmoothingEnabled = false;\n }\n });\n this.map.once('postrender', () => {\n this.retry = setInterval(() => {\n if (!this.map.isRendered()) {\n this.resize();\n } else {\n clearInterval(this.retry);\n }\n }, 1000);\n });\n\n // This can't be done with once because if the map size is 0,0 then it will zoom to an incredibly close extent.\n // If the first postrender happens while the map is not displayed then the size will be 0,0.\n const loadCacheZoom = () => {\n const size = this.map.getSize();\n // wait until the map is ready\n if (size && size.length > 1 && size[0] !== 0 && size[1] !== 0) {\n const extent = this.persistancetimeout\n ? getWithExpiry(`${this.cachePrefix}-ki-station-map-zoom`, true)\n : null;\n if (extent) {\n this.map.getView().fit(extent, this.map.getSize());\n }\n // remove the event because it should only happen once at the start\n this.map.un('postrender', loadCacheZoom);\n }\n };\n if (this.persistancetimeout) {\n this.map.on('postrender', loadCacheZoom);\n }\n }\n\n setMapEvents() {\n this._initPopup();\n\n const popupelement = document.createElement('div');\n popupelement.style.padding = '10px';\n let selected = null;\n let tooltip = null;\n\n this.map.on('moveend', evt => {\n const { map } = evt;\n const extent = map.getView().calculateExtent(map.getSize());\n this.dispatchEvent(\n new CustomEvent('extentchange', {\n bubbles: true,\n composed: true,\n detail: {\n extent,\n },\n }),\n );\n if (this.persistancetimeout) {\n setWithExpiry(\n `${this.cachePrefix}-ki-station-map-zoom`,\n extent,\n this.persistancetimeout,\n true,\n );\n }\n });\n\n this.map.on('singleclick', evt => {\n this.map.forEachFeatureAtPixel(\n evt.pixel,\n feature => {\n if (feature.get('url')) {\n window.open(feature.get('url'), '_blank');\n return true;\n }\n return false;\n },\n { layerFilter: layer => layer.get('haslinks') },\n );\n });\n /* eslint-disable-next-line consistent-return */\n this.map.on('pointermove', evt => {\n this.map.getTargetElement().style.cursor = '';\n if (this.disableMouseOver) {\n if (tooltip !== null) {\n this._popup.hide();\n tooltip = null;\n }\n return false;\n }\n if (selected !== null) {\n selected.setStyle(selected._style);\n selected = null;\n }\n if (tooltip !== null) {\n this._popup.hide();\n tooltip = null;\n }\n this.map.forEachFeatureAtPixel(\n evt.pixel,\n feature => {\n if (feature.get('url')) {\n this.map.getTargetElement().style.cursor = 'pointer';\n }\n\n if (feature._toolTip && !this._popup.getVisible()) {\n popupelement.innerHTML = feature._toolTip;\n this._popup.show(\n this.map.getCoordinateFromPixel(evt.pixel),\n popupelement,\n );\n tooltip = true;\n }\n if (feature._hoverStyle) {\n selected = feature;\n feature.setStyle(feature._hoverStyle);\n return true;\n }\n return false;\n },\n {\n layerFilter: layer =>\n layer.get('haslinks') || layer.get('interactive'),\n },\n );\n });\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) super.disconnectedCallback();\n this.retry && clearInterval(this.retry);\n }\n\n updated(changedProperties) {\n super.update(changedProperties);\n if (this.map) {\n if (changedProperties.has('view')) {\n this.map.setView(this._view);\n }\n\n if (changedProperties.has('layers')) {\n this.map\n .getLayers()\n .extend(flatten(this._layers).concat(this.olLayers));\n }\n }\n }\n\n render() {\n // language=html\n this.disableMouseOver = this.classList.contains('sm-screen');\n return html`\n \n
\n ${this._renderLoader()}\n `;\n }\n\n gotoLocation() {\n // TODO timeout\n // need https\n const p = new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n pos => {\n this.map.getView().animate({\n center: fromLonLat(\n [pos.coords.longitude, pos.coords.latitude],\n this.map.getView().getProjection(),\n ),\n duration: 500,\n });\n resolve();\n },\n e => {\n console.error(e);\n reject(e);\n },\n {\n timeout: 2000,\n },\n );\n });\n // TODO\n this.promiseLoader(p);\n }\n\n resize() {\n if (this.map) {\n this.__mapElement.style.width = 'auto';\n this.__mapElement.style.transform = '';\n this.map.updateSize();\n }\n }\n\n zoomTo(extent, duration = 0, padding = 100) {\n this.map.getView().fit(extent, {\n nearest: true,\n easing: inAndOut,\n padding:\n ViewPort.size === SM && padding\n ? [20, 20, 20, 20]\n : [padding, padding, padding, padding],\n size: this.map.getSize(),\n duration,\n });\n }\n\n // move to ki-map-popup\n _initPopup() {\n const popup = new Popup({\n positioning: 'top-right',\n closeBox: false,\n });\n this._popup = popup;\n this.map.addOverlay(popup);\n\n const showPopup = e => {\n if (!this.map.disablePopup) {\n const { coordinate, element, stations, layerAlias } = e.detail;\n if (popup.getVisible() && !popup.element.stations) {\n popup.hide();\n }\n const p = this.map.getPixelFromCoordinate(coordinate);\n const s = this.map.getSize();\n const horizontal = p[0] > s[0] / 2 ? 'right' : 'left';\n const vertical = p[1] > s[1] / 2 ? 'bottom' : 'top';\n\n popup.setPositioning(`${vertical}-${horizontal}`);\n element.stations = stations;\n element.layerAlias = layerAlias;\n popup.show(coordinate, element);\n }\n };\n\n const closePopup = e => {\n const { element } = e.detail;\n element.stations = null;\n popup.hide();\n };\n\n this.map.on('show-popup', debounce(showPopup, 100));\n this.map.on('close-popup', debounce(closePopup, 100));\n // show pointer\n }\n}\n","import { Text, Fill, Stroke, Style, Circle as CircleStyle } from 'ol/style';\nimport { template, contrastColor } from '@kisters/wcp-base/common';\nimport StationsLayer from './StationsLayer';\nimport { FontIcon } from './FontIcon';\n\nlet currentStationStyle;\n\nconst defaultMarkerStyle = new Style({\n image: new CircleStyle({\n radius: 6,\n fill: new Fill({\n color: '#0052cc',\n }),\n stroke: new Stroke({\n color: 'white',\n width: 2,\n }),\n }),\n});\n\nexport default class StationsMarkerLayer extends StationsLayer {\n set currentStation(val) {\n this.__currentStation = val;\n // this.reload();\n }\n\n _getStationStyle(station, selected = false) {\n const dynamicMarkerSize = this.get('dynamicMarkerSize');\n currentStationStyle =\n currentStationStyle ||\n new Style({\n image: new FontIcon({\n backgroundColor: 'rgba(0,0,0,0)',\n color: 'red',\n icon: 'ki ki-map-marker',\n }),\n zIndex: 100,\n });\n\n const info = this._getStationInfos(station);\n if (\n this.__currentStation &&\n info.no === this._getStationInfos(this.__currentStation).no\n ) {\n return currentStationStyle;\n }\n\n const iconStyle =\n (this.tagMarkers && this.tagMarkers[station.__tag]) ||\n (this.tagMarkers && this.tagMarkers._default) ||\n defaultMarkerStyle;\n // iconStyle.setZIndex(this.getZIndex()+iconStyle.getZIndex())\n if (dynamicMarkerSize) {\n return (feature, resolution) => {\n iconStyle\n .getImage()\n .setScale(\n resolution > dynamicMarkerSize.maxResolution\n ? dynamicMarkerSize.size\n : 1,\n );\n return iconStyle;\n };\n }\n const image = iconStyle.getImage();\n if (image.getGlyph) {\n const glyph = image.getGlyph();\n if (glyph.iconTemplate) {\n let valueToDisplay = template(glyph.iconTemplate, station);\n if (\n glyph.iconTemplateDecimals !== undefined &&\n glyph.iconTemplateDecimals !== null\n ) {\n valueToDisplay = Number.parseFloat(valueToDisplay).toFixed(\n glyph.iconTemplateDecimals,\n );\n }\n return [\n iconStyle,\n new Style({\n zIndex: iconStyle.getZIndex() + 0.1,\n text: new Text({\n font: 'bold 10px Calibri, \"sans-serif\"',\n text: valueToDisplay,\n fill: new Fill({\n color: contrastColor(image.getFill().getColor(), true),\n }),\n padding: [1, 5, 0, 5],\n offsetX: 0,\n offsetY: 0,\n }),\n }),\n ];\n }\n }\n\n if (selected) {\n return [\n iconStyle,\n new Style({\n zIndex: iconStyle.getZIndex() + 0.1,\n image: new CircleStyle({\n radius: iconStyle.getImage().getRadius(),\n fill: new Fill({\n color: 'rgba(0,0,0,0)',\n }),\n stroke: new Stroke({\n color: 'rgb(0, 0, 224)',\n width: 3,\n }),\n }),\n }),\n ];\n }\n return iconStyle;\n }\n\n set tagMarkers(val) {\n this.__tagMarkers = val;\n this.reload();\n }\n\n get tagMarkers() {\n return this.__tagMarkers;\n }\n}\n","/* eslint-disable class-methods-use-this */\n/* eslint-disable consistent-return */\n/* eslint-disable array-callback-return */\nimport { Stroke, Style } from 'ol/style';\nimport Chart from 'ol-ext/style/Chart';\nimport dayjs from 'dayjs';\nimport StationsLayer from './StationsLayer';\n\n/** Set in layercfg -> chartConfig -> remarkAttribute */\nconst hasRemark = function (attr, station) {\n return !!(station[attr] && station[attr] !== '');\n};\n\n/** TODO: Apply layerconfig (LANUV-103) */\nconst handleThreshold = function (item, config) {\n return Math.abs(item.ts_value) < config.chartConfig.threshold\n ? 'rgba(155, 229, 100, 1)'\n : 'rgba(209, 60, 38, 1)';\n};\n\nconst isOutdated = function (outdatdedCfg, timestamp) {\n const outdated = dayjs(timestamp)\n .add(outdatdedCfg.time, outdatdedCfg.unit)\n .valueOf();\n const now = dayjs().valueOf();\n return outdated < now;\n};\n\nexport default class StationsChartLayer extends StationsLayer {\n set currentStation(val) {\n this.__currentStation = val;\n // this.reload();\n }\n\n static getStationStyle(station, config) {\n const colors = Object.values(\n station.ts_values[config.chartConfig.parameter],\n ).map(item => {\n /** Inactive > Outdated > Threshold */\n if (config.chartConfig.inactive && station.INTERNET_AKTIV === 'no') {\n return '#ffe4e1';\n }\n if (\n config.chartConfig.outdated &&\n !isOutdated(config.chartConfig.outdated, item.timestamp) &&\n !config.chartConfig.threshold\n )\n return 'rgba(52,164,235, 1)';\n if (config.chartConfig.outdated && !config.chartConfig.threshold)\n return 'rgba(209, 60, 38, 1)';\n if (\n config.chartConfig.outdated &&\n isOutdated(config.chartConfig.outdated, item.timestamp) &&\n config.chartConfig.threshold\n )\n return `rgba(128, 128, 128, 1)`;\n if (config.chartConfig.threshold) {\n return handleThreshold(item, config);\n }\n if (station.__tag === 'none') {\n return 'rgba(128, 128, 128, 1)';\n }\n });\n\n const remarkAttribute = config?.chartConfig?.remarkAttribute;\n\n const currentStationStyle = new Style({\n image: new Chart({\n colors,\n type: 'pie',\n radius: 10,\n data: colors.map(() => 1),\n rotateWithView: true,\n stroke: new Stroke({\n color: hasRemark(remarkAttribute, station) ? '#000' : '#333',\n width: hasRemark(remarkAttribute, station) ? 3 : 1,\n }),\n }),\n zIndex: 100,\n });\n\n currentStationStyle.sortPriority = colors.filter(\n x => x === 'rgba(209, 60, 38, 1)',\n ).length;\n\n return currentStationStyle;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _getStationStyle(station) {\n return StationsChartLayer.getStationStyle(station, this.config);\n }\n\n set tagMarkers(val) {\n this.__tagMarkers = val;\n this.reload();\n }\n\n get tagMarkers() {\n return this.__tagMarkers;\n }\n}\n","import Style from 'ol/style/Style';\nimport { get } from 'lodash-es';\nimport Feature from 'ol/Feature';\nimport Point from 'ol/geom/Point';\nimport StationsLayer from './StationsLayer';\nimport { FontIcon } from './FontIcon';\nimport { getTrendArrow } from '../../common/base';\n\nexport default class StationsTrendLayer extends StationsLayer {\n // eslint-disable-next-line class-methods-use-this\n constructor(options) {\n options = {\n ...options,\n };\n super(options);\n }\n\n _createStationFeatures(stations) {\n const ret = [];\n stations.forEach(station => {\n if (station.point) {\n const f = new Feature({\n geometry: new Point(station.point),\n rot: get(station, this.trendkey),\n });\n\n const style = this._getStationStyle(f);\n style && f.setStyle(style);\n f.station = station;\n ret.push(f);\n }\n });\n return ret;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _getStationStyle(feature) {\n return new Style({\n image: new FontIcon({\n backgroundColor: 'rgba(197, 213, 234, 1)',\n icon: 'ki ki-arrow-right',\n fontSize: 0.8,\n radius: 9,\n rotation: getTrendArrow(feature.get('rot'), true),\n shape: 'none',\n color: 'rgba(69,69,67, 1)',\n border: {\n color: 'rgba(29,29,27, 1)',\n width: 1,\n },\n }),\n });\n }\n\n set labelTemplate(val) {\n this.__labelTemplate = val;\n this.reload();\n }\n\n get labelTemplate() {\n /* eslint-disable no-template-curly-in-string */\n return this.__labelTemplate || this.isSiteLayer\n ? '${site_name}'\n : '${station_name}';\n /* eslint-enable no-template-curly-in-string */\n }\n}\n","import { css, html, LitElement } from 'lit';\nimport '../ki-icon/ki-icon';\n\nexport default class KiIconSwitcher extends LitElement {\n // language=CSS\n static styles = css`\n :host {\n display: inline-block;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n color: gray;\n background: white;\n border-radius: 36px;\n }\n .tab {\n margin: 6px;\n width: 28px;\n height: 28px;\n text-align: center;\n line-height: 28px;\n border-radius: 28px;\n cursor: pointer;\n overflow: hidden;\n transition: background-color 0.4s ease-in-out, color 0.2s ease-in-out;\n }\n .tab:hover ki-icon::part(icon){\n fill: #4a4a49;\n }\n\n .tab.selected ki-icon{\n fill: white;\n }\n\n .tab.selected {\n color: white;\n background: var(--theme-color-primary, #0056a0);\n }\n\n ki-icon{\n fill: gray;\n }\n `;\n\n constructor() {\n super();\n this.content = 'default content';\n }\n\n static get properties() {\n return {\n options: { type: Array }, // icon, value, label\n value: { type: String },\n };\n }\n\n render() {\n this.value = this.value || this.options[0].value;\n // language=html\n return html`\n ${this.options.map((option, index) => {\n return html`\n {\n this.switchTo(option.value);\n }}\"\n >\n \n \n `;\n })}\n `;\n }\n\n switchTo(value) {\n if (this.value !== value) {\n this.value = value;\n this.dispatchEvent(new CustomEvent('changed', { detail: { value } }));\n }\n }\n}\n\ncustomElements.define('ki-icon-switcher', KiIconSwitcher);\n","// eslint-disable-next-line max-classes-per-file\nimport Control from 'ol/control/Control';\nimport DragPan from 'ol/interaction/DragPan';\nimport Select from 'ol/interaction/Select';\nimport { always } from 'ol/events/condition';\nimport DragBox from 'ol/interaction/DragBox';\nimport '@kisters/wcp-base/components/ki-switcher/ki-icon-switcher';\n\nexport default class MultiSelectionToggle extends Control {\n constructor(layers, options) {\n const element = document.createElement('ki-icon-switcher');\n element.options = options.options;\n element.value = 'mover';\n options.element = element;\n super(options);\n this.layers = layers;\n this.idProperty = options.idProperty;\n this.onSelection = options.onSelection;\n }\n\n setMap(map) {\n super.setMap(map);\n if (map) {\n this._initDrawingLayer();\n this.element.addEventListener('changed', e => {\n this.switchMode(e.detail.value);\n });\n this.switchMode(this.element.value);\n }\n }\n\n /*\n * @param {('mover','selector'))} mode\n * */\n switchMode(mode) {\n const dragpan = this.getMap()\n .getInteractions()\n .getArray()\n .filter(it => it instanceof DragPan)[0];\n dragpan.setActive(mode === 'mover');\n this.drawInteraction.setActive(mode === 'selector');\n }\n\n _initDrawingLayer() {\n this.__selectionInteraction = new (class extends Select {})();\n\n this.__selectionInteraction.setMap(this.getMap());\n const selectedFeatures = this.__selectionInteraction.getFeatures();\n\n this.drawInteraction = new DragBox({\n className: 'dragbox',\n condition: always,\n });\n this.getMap().addInteraction(this.drawInteraction);\n\n this.drawInteraction.on('boxend', event => {\n selectedFeatures.clear();\n const selectionGeo = event.target.getGeometry();\n selectedFeatures.extend(this._getSelectFeatures(selectionGeo));\n this._fireSelection(selectedFeatures);\n });\n\n // TODO deselect?\n }\n\n _fireSelection(selectedFeatures) {\n this.onSelection(\n selectedFeatures.getArray().map(f => f.station[this.idProperty]),\n );\n }\n\n _getSelectFeatures(selectionGeo) {\n // TODO\n const { layers } = this;\n const features = [];\n\n layers.forEach(layer => {\n if (layer.getVisible()) {\n layer\n .getSource()\n ?.getFeatures?.()\n .forEach(feature => {\n if (\n selectionGeo.intersectsExtent(\n feature?.getGeometry?.()?.getExtent(),\n )\n ) {\n !feature.hide && features.push(feature);\n }\n });\n }\n });\n return features;\n }\n\n clearSelection() {\n // TODO\n this.__selectionInteraction.getFeatures().clear();\n this.__selectionInteraction.getFeatures().forEach(f => {\n this.__selectionInteraction.removeFeature_(f);\n });\n }\n\n set selection(val) {\n const list = this.__selectionInteraction.getFeatures();\n list.clear();\n this.layers.forEach(layer => {\n if (layer.getVisible()) {\n const features = layer\n .getSource()\n ?.getFeatures?.()\n .filter(feature => {\n const { station } = feature;\n return station && val.some(s => s === station[this.idProperty]);\n });\n list.extend(features);\n }\n });\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport { Mix, template } from '@kisters/wcp-base/common';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { unByKey } from 'ol/Observable';\n\nimport Feature from 'ol/Feature';\nimport Point from 'ol/geom/Point';\nimport VectorLayer from 'ol/layer/Vector';\nimport VectorSource from 'ol/source/Vector';\nimport Style from 'ol/style/Style';\nimport Text from 'ol/style/Text';\nimport Fill from 'ol/style/Fill';\n\nimport _AddOn from './_AddOn';\nimport StationsMarkerLayer from './StationsMarkerLayer';\nimport StationsChartLayer from './StationsChartLayer';\nimport StationsTrendLayer from './StationsTrendLayer';\nimport MultiSelectionToggle from './MultiSelectionToggle';\nimport './ki-station-info';\nimport nls from '../../locales/index';\n// TODO\n@customElement('ki-stations-layer')\nexport default class KiStationsLayer extends Mix(_AddOn, [i18nMixin, { nls }]) {\n static get properties() {\n return {\n zIndex: { type: String, attribute: 'z-index' },\n\n stations: { type: Array },\n labelPositions: { type: String },\n labelTemplate: { type: String },\n tagMarkers: { type: Object },\n tagSelectedMarkers: { type: Object },\n config: { type: Object },\n currentStation: { type: Object },\n infoTag: { type: String }, // tooltip component\n selected: { type: Array },\n multiSelectable: { type: Boolean },\n timeActive: { type: Boolean },\n noAutoZoom: { type: Boolean },\n noDeclutter: { type: Boolean },\n displayStationLabelsOnStart: { type: Boolean },\n displayInLayerControl: { type: Boolean },\n };\n }\n\n @property({ type: Boolean, attribute: true })\n isSiteLayer = false;\n\n @property({ type: String, attribute: false })\n idProperty = this.isSiteLayer ? 'site_id' : 'station_id';\n\n constructor() {\n super();\n this.mapLayers = [];\n this.stations = [];\n this.selected = [];\n this.zIndex = 100;\n this.noAutoZoom = false;\n // eslint-disable-next-line no-template-curly-in-string\n this.labelTemplate = this.isSiteLayer ? '${site_name}' : '${station_name}';\n }\n\n updateSelection() {\n if (this.multiSelectionToggle) {\n this.stationsMarkerLayer.selection = this.selected;\n this.multiSelectionToggle.selection = this.selected;\n }\n }\n\n _afterMapCreated() {\n super._afterMapCreated();\n this._initPopup();\n }\n\n _create() {\n this._createMakerLayer();\n this._createLabelLayer();\n this.disableMouseOver = this.parentElement.classList.contains('sm-screen');\n if (this.trendKey) {\n this._createTrendLayer();\n }\n this.multiSelectable && this._createSelectionControl();\n this.map.getLayers().extend(this.mapLayers);\n }\n\n _createChartLayer() {\n this.stationsMarkerLayer = new StationsChartLayer({\n config: this.config,\n name: this.i18n.t('stations'),\n displayInLayerControl: this.displayInLayerControl,\n dynamicMarkerSize: this.dynamicMarkerSize,\n group: 'Layers',\n tagMarkers: this.tagMarkers,\n zIndex: this.zIndex + 1,\n currentStation: this.currentStation,\n });\n this.mapLayers.push(this.stationsMarkerLayer);\n }\n\n _createLabelLayer() {\n this.stationsLabelLayer = new VectorLayer({\n name: this.i18n.t('Labels'),\n displayInLayerControl: true,\n group: 'Information',\n zIndex: 112,\n labelPositions: this.labelPositions,\n visible: this.displayStationLabelsOnStart || false,\n declutter: !this.noDeclutter,\n source: new VectorSource({\n features: this.stations.map(station => {\n const f = new Feature(new Point(station.point));\n f.setProperties({ station });\n return f;\n }),\n }),\n style: feature => {\n const station = feature.get('station');\n const customPosition = this.labelPositions\n ? this.labelPositions[station?.station_id]\n : {} ?? {};\n const style = new Style({\n text: new Text({\n font: 'bold 12px \"Calibri\", \"sans-serif\"',\n text: this.labelTemplate\n ? template(this.labelTemplate, station)\n : station.station_name,\n textAlign: 'left',\n textBaseline: 'top',\n padding: [3, 3, 3, 3],\n offsetX: 12,\n offsetY: -17 / 2,\n fill: new Fill({ color: 'rgba(29,29,29,1)' }),\n backgroundFill: new Fill({ color: 'rgba(255,255,255,0.8)' }),\n ...customPosition,\n }),\n });\n return style;\n },\n });\n this.mapLayers.push(this.stationsLabelLayer);\n }\n\n _createTrendLayer() {\n this.stationsTrendLayer = new StationsTrendLayer({\n name: this.i18n.t('Trend'),\n displayInLayerControl: true,\n group: 'Information',\n visible: this.displayStationTrendOnStart || false,\n stations: this.stations,\n zIndex: this.zIndex + 2,\n trendKey: this.trendKey,\n timeActive: this.timeActive,\n });\n this.mapLayers.push(this.stationsTrendLayer);\n }\n\n _createMakerLayer() {\n if (this.config?.type === 'piechart') {\n this.stationsMarkerLayer = new StationsChartLayer({\n config: this.config,\n name: this.i18n.t('stations'),\n displayInLayerControl: this.displayInLayerControl,\n dynamicMarkerSize: this.dynamicMarkerSize,\n group: 'Layers',\n tagMarkers: this.tagMarkers,\n zIndex: this.zIndex + 1,\n currentStation: this.currentStation,\n });\n } else {\n this.stationsMarkerLayer = new StationsMarkerLayer({\n name: this.i18n.t('stations'),\n config: this.config,\n displayInLayerControl: this.displayInLayerControl,\n dynamicMarkerSize: this.dynamicMarkerSize,\n group: 'Layers',\n tagMarkers: this.tagMarkers,\n tagSelectedMarkers: this.tagSelectedMarkers,\n zIndex: this.zIndex + 1,\n currentStation: this.currentStation,\n isSiteLayer: this.isSiteLayer,\n timeActive: this.timeActive,\n });\n }\n\n this.stationsMarkerLayer.on('change:source', () => {\n this.dispatchEvent(\n new CustomEvent('sourceChange', {\n detail: { extent: this.stationsMarkerLayer.getSource().getExtent() },\n }),\n );\n });\n this.stationsMarkerLayer.stations = this.stations;\n this.mapLayers.push(this.stationsMarkerLayer);\n\n // eslint-disable-next-line consistent-return\n this.clickEvent = this.map.on('singleclick', evt => {\n const stations = [];\n this.map.forEachFeatureAtPixel(\n evt.pixel,\n feature => {\n if (feature && feature.station) {\n stations.push(feature.station);\n }\n },\n { layerFilter: layer => layer === this.stationsMarkerLayer },\n );\n\n if (stations.length > 0) {\n this.dispatchEvent(\n new CustomEvent('station-click', {\n detail: {\n value: `${stations[0].site_no}${\n this.isSiteLayer ? '' : `/${stations[0].station_no}`\n }`,\n data: stations[0],\n // TODO station\n },\n }),\n );\n return false; // skip rest listener;\n }\n });\n }\n\n _initPopup() {\n let activePopup = false;\n // eslint-disable-next-line consistent-return\n this.hoverEvent = this.map.on('pointermove', evt => {\n this.map.getTargetElement().style.cursor = '';\n if (!this.stationsMarkerLayer || this.disableMouseOver) {\n return false;\n }\n const stations = [];\n this.map.forEachFeatureAtPixel(\n evt.pixel,\n /* eslint-disable-next-line consistent-return */\n feature => {\n this.map.getTargetElement().style.cursor = 'pointer';\n if (feature && feature._hoverStyle) {\n feature.setStyle(feature._hoverStyle);\n }\n if (feature && feature.station) {\n stations.push(feature.station);\n }\n },\n { layerFilter: layer => layer === this.stationsMarkerLayer },\n );\n\n if (stations.length > 0) {\n activePopup = true;\n this.map.dispatchEvent({\n type: 'show-popup',\n detail: {\n coordinate: this.map.getCoordinateFromPixel(evt.pixel),\n element: this.element,\n stations,\n layerAlias: this.layerAlias,\n },\n });\n return false;\n }\n if (activePopup) {\n activePopup = false;\n this.map.dispatchEvent({\n type: 'close-popup',\n detail: {\n element: this.element,\n },\n });\n }\n // prevent other listener\n });\n }\n\n _createSelectionControl() {\n this.multiSelectionToggle = new MultiSelectionToggle(\n [this.stationsMarkerLayer],\n {\n idProperty: this.idProperty,\n displayInLayerControl: true,\n onSelection: selection => {\n this.dispatchEvent(\n new CustomEvent('selection', { detail: { selection } }),\n );\n },\n options: [\n {\n icon: 'ki ki-mouse-pointer',\n label: this.i18n.t('move_in_map'),\n value: 'mover',\n }, // TODO i18n ?\n {\n icon: 'ki ki-object-group',\n label: this.i18n.t('Select_stations'),\n value: 'selector',\n },\n ],\n },\n );\n this.map.addControl(this.multiSelectionToggle);\n this.multiSelectionToggle.selection = this.selected;\n this.stationsMarkerLayer.selection = this.selected;\n }\n\n _tear() {\n this.mapLayers.forEach(l => this.map.removeLayer(l));\n this.map.removeControl(this.multiSelectionToggle);\n\n this.multiSelectionToggle = null;\n this.stationsLabelLayer = null;\n this.stationsTrendLayer = null;\n this.stationsMarkerLayer = null;\n\n this.mapLayers = [];\n unByKey(this.clickEvent);\n unByKey(this.hoverEvent);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n this.element = document.createElement(this.infoTag || 'ki-station-info');\n if (this.map) {\n // TODO how to update. dirty code\n\n if (_changedProperties.has('stations')) {\n if (this.stationsMarkerLayer) this.stationsMarkerLayer._legends = null;\n if (this.stationsLabelLayer) {\n this.stationsLabelLayer.setSource(\n new VectorSource({\n features: this.stations.map(station => {\n const f = new Feature(new Point(station.point));\n f.setProperties({ station });\n return f;\n }),\n }),\n );\n }\n this.mapLayers.forEach(l => {\n l.selection = this.selected;\n l.stations = this.stations;\n });\n }\n\n if (_changedProperties.has('tagMarkers')) {\n if (this.stationsMarkerLayer) {\n this.stationsMarkerLayer.tagMarkers = this.tagMarkers;\n }\n }\n\n if (_changedProperties.has('tagSelectedMarkers')) {\n if (this.multiSelectionToggle) {\n this.multiSelectionToggle.tagSelectedMarkers =\n this.tagSelectedMarkers;\n }\n }\n }\n }\n}\n","import { Vector as VectorLayer } from 'ol/layer';\nimport VectorSource from 'ol/source/Vector';\nimport { Style } from 'ol/style';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport TopoJSON from 'ol/format/TopoJSON';\n\nconst style = new Style({\n fill: new Fill({\n color: 'rgba(122, 122, 122, 0.2)',\n }),\n stroke: new Stroke({\n color: '#319FD3',\n width: 1,\n }),\n});\n\nexport default class JsonLayer extends VectorLayer {\n constructor(options) {\n const type = options.url\n ? {\n format: new TopoJSON({\n dataProjection: options.projection || 'EPSG:3857',\n }),\n url: options.url,\n }\n : { features: options.features };\n options = {\n source: new VectorSource(type),\n ...options,\n };\n super(options);\n\n this.imageRatio = 2;\n this.style = options.style || style;\n this.setProperties({\n name: options.name,\n displayInLayerControl: options.displayInLayerControl,\n group: options.group,\n });\n }\n}\n","import { customElement } from 'lit/decorators.js';\nimport { unByKey } from 'ol/Observable';\nimport _AddOn from './_AddOn';\nimport JSONLayer from './JSONLayer';\n\n@customElement('ki-json-layer')\nexport default class KiJsonLayer extends _AddOn {\n static get properties() {\n return {\n styles: { type: Object },\n visible: { type: Boolean },\n name: { type: String },\n url: { type: String },\n group: { type: String },\n projection: { type: String },\n };\n }\n\n _create() {\n console.time('_create of catchments layer start');\n this._createLayer();\n console.timeEnd('_create of catchments layer end');\n }\n\n _createLayer() {\n this.catchmentsLayer = new JSONLayer({\n styles: this.styles,\n url: this.url,\n projection: this.projection,\n visible: this.visible,\n name: this.name || 'Catchments',\n displayInLayerControl: true,\n group: this.group || 'Layers',\n });\n\n this.catchmentsLayer.setZIndex(\n Number(this.getAttribute('zindexlayer')) || 50,\n ); // TODO use PropertyDefaultValue, check why atribute not works\n\n this.map.addLayer(this.catchmentsLayer);\n\n this.clickEvent = this.map.on('singleclick', evt => {\n let catchment;\n this.map.forEachFeatureAtPixel(\n evt.pixel,\n (feature, layer) => {\n if (layer === this.catchmentsLayer) {\n if (feature && feature.getId() !== undefined) {\n catchment = feature.catchment;\n // eslint-disable-next-line camelcase\n this.dispatchEvent(\n new CustomEvent('catchment-click', {\n detail: { value: feature.getId() },\n }),\n );\n }\n }\n },\n { layerFilter: layer => layer === this.catchmentsLayer },\n );\n if (catchment) {\n return false; // skip rest listener;\n }\n return true;\n });\n }\n\n _initHover() {\n const element = document.createElement('ki-catchment-info');\n\n this.hoverEvent = this.map.on('pointermove', evt => {\n if (!this.catchmentsLayer) {\n return;\n }\n\n let hovering;\n\n this.map.forEachFeatureAtPixel(\n evt.pixel,\n feature => {\n if (feature && feature.catchment) {\n this.map.getTargetElement().style.cursor = 'pointer';\n element.catchment = feature.catchment;\n\n this.map.dispatchEvent({\n type: 'show-popup',\n detail: {\n coordinate: this.map.getCoordinateFromPixel(evt.pixel),\n element,\n },\n });\n // hovering\n if (!feature.__bak_style) {\n feature.__bak_style = feature.getStyle();\n feature.setStyle(\n this.catchmentsLayer._getHoverStyle(feature.catchment),\n );\n }\n hovering = feature;\n }\n },\n { layerFilter: layer => layer === this.catchmentsLayer },\n );\n\n this.catchmentsLayer\n .getSource()\n .getFeatures()\n .forEach(f => {\n if (f !== hovering && f.__bak_style) {\n f.setStyle(f.__bak_style);\n f.__bak_style = null;\n }\n });\n\n if (hovering) {\n // eslint-disable-next-line consistent-return\n return false;\n }\n });\n }\n\n _tear() {\n this.map.removeLayer(this.catchmentsLayer);\n unByKey(this.clickEvent);\n unByKey(this.hoverEvent);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n if (_changedProperties.has('styles') && this.catchmentsLayer) {\n this.catchmentsLayer.styles = this.catchmentsStyles;\n }\n if (_changedProperties.has('url') && this.catchmentsLayer) {\n this.catchmentsLayer.url = this.catchmentFeatures;\n }\n if (_changedProperties.has('name') && this.catchmentsLayer) {\n this.catchmentsLayer.name = this.catchments;\n }\n\n if (this.catchmentsLayer && _changedProperties.has('currentCatchment')) {\n // TODO\n this.catchmentsLayer.highlight(this.currentCatchment);\n }\n }\n}\n","import VectorLayer from 'ol/layer/Vector';\nimport VectorSource from 'ol/source/Vector';\nimport mapKeys from 'lodash-es/mapKeys';\nimport { customElement } from 'lit/decorators.js';\nimport _AddOn from './_AddOn';\n\n// TODO refactor ki-wcp-walhydro\n\n@customElement('ol-vector-layer')\nexport default class OlVectorLayer extends _AddOn {\n static get properties() {\n return {\n features: { type: Array, initial: () => [] }, // Feature list\n zIndex: { type: String, attribute: 'z-index' },\n visible: { type: Boolean, default: true },\n };\n }\n\n _create() {\n // todo override lifecycle?\n\n this.layer = new VectorLayer({\n zIndex: this.zIndex,\n source: new VectorSource(this.source),\n });\n this.map.addLayer(this.layer);\n this._updateProperties();\n }\n\n _tear() {\n this.map.removeLayer(this.layer);\n }\n\n _updateProperties() {\n // TODO\n if (!this.layer) return;\n // TODO move to ol-layer\n mapKeys(this.constructor.properties, (value, key) => {\n const updateFn = `_update${key.replace(/^(.)/, (s0, s1) =>\n s1.toUpperCase(),\n )}`;\n if (this[updateFn]) {\n this[updateFn](this[key]);\n } else {\n this.layer.set(key, this[key]);\n }\n });\n }\n\n _updateFeatures(features) {\n this.layer.getSource().clear();\n this.layer.getSource().addFeatures(features);\n }\n\n updated(_changedProperties) {\n super.updated(_changedProperties);\n this._updateProperties();\n }\n}\n","import { css } from 'lit';\n// language=CSS\nexport default css`\n :host {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-direction: row;\n height: 45px;\n }\n\n .tabSection {\n display: none;\n }\n /* START custom style datepickers */\n .qs-datepicker-container {\n display: flex;\n flex-direction: row;\n width: 580px;\n font-size: 1rem;\n font-family: sans-serif;\n color: #000;\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n z-index: 9001;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border: 1px solid #ccc;\n overflow: hidden;\n background: #fff;\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n }\n\n .qs-datepicker-container * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .qs-datepicker-container.qs-centered {\n position: fixed;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n }\n\n .qs-datepicker-container.qs-hidden {\n display: none;\n }\n\n .qs-datepicker,\n .qs-datepicker .qs-overlay {\n padding: 0.5em;\n border-left: 1px solid #ccc;\n }\n\n .qs-datepicker {\n width: 70%;\n }\n\n .qs-datepicker .qs-overlay {\n width: 100%;\n }\n\n .qs-datepicker .qs-overlay {\n position: absolute;\n top: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.75);\n color: #fff;\n height: 100%;\n padding: 0.5em;\n z-index: 1;\n opacity: 1;\n -webkit-transition: opacity 0.3s;\n transition: opacity 0.3s;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .qs-datepicker .qs-overlay.qs-hidden {\n opacity: 0;\n z-index: -1;\n }\n\n .qs-datepicker .qs-overlay .qs-overlay-year {\n background: rgba(0, 0, 0, 0);\n border: none;\n border-bottom: 1px solid #fff;\n border-radius: 0;\n color: #fff;\n font-size: 0.875em;\n padding: 0.25em 0;\n width: 80%;\n text-align: center;\n margin: 0 auto;\n display: block;\n }\n\n .qs-datepicker .qs-overlay .qs-overlay-year::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n\n .qs-datepicker .qs-overlay .qs-close {\n padding: 0.5em;\n cursor: pointer;\n position: absolute;\n top: 0;\n right: 0;\n }\n\n .qs-datepicker .qs-overlay .qs-submit {\n border: 1px solid #fff;\n border-radius: 0.26392em;\n padding: 0.5em;\n margin: 0 auto auto;\n cursor: pointer;\n background: hsla(0, 0%, 50.2%, 0.4);\n }\n\n .qs-datepicker .qs-overlay .qs-submit.qs-disabled {\n color: grey;\n border-color: grey;\n cursor: not-allowed;\n }\n\n .qs-datepicker .qs-overlay .qs-overlay-month-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n }\n\n .qs-datepicker .qs-overlay .qs-overlay-month {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: calc(100% / 3);\n cursor: pointer;\n opacity: 0.5;\n -webkit-transition: opacity 0.15s;\n transition: opacity 0.15s;\n }\n\n .qs-datepicker .qs-overlay .qs-overlay-month.active,\n .qs-datepicker .qs-overlay .qs-overlay-month:hover {\n opacity: 1;\n }\n\n .qs-datepicker .qs-controls {\n height: 35px;\n width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -webkit-filter: blur(0);\n filter: blur(0);\n -webkit-transition: -webkit-filter 0.3s;\n transition: -webkit-filter 0.3s;\n transition: filter 0.3s;\n transition: filter 0.3s, -webkit-filter 0.3s;\n }\n\n .qs-datepicker .qs-controls.qs-blur {\n -webkit-filter: blur(5px);\n filter: blur(5px);\n }\n\n .qs-datepicker .qs-arrow {\n height: 1.7em;\n width: 1.7em;\n position: relative;\n cursor: pointer;\n border-radius: 0.26392em;\n -webkit-transition: background 0.15s;\n transition: background 0.15s;\n }\n\n .qs-datepicker .qs-arrow:hover {\n background: rgba(0, 0, 0, 0.1);\n }\n\n .qs-datepicker .qs-arrow:hover.qs-left:after {\n border-right-color: #000;\n }\n\n .qs-datepicker .qs-arrow:hover.qs-right:after {\n border-left-color: #000;\n }\n\n .qs-datepicker .qs-arrow:after {\n content: '';\n border: 0.39062em solid rgba(0, 0, 0, 0);\n position: absolute;\n top: 50%;\n -webkit-transition: border 0.2s;\n transition: border 0.2s;\n }\n\n .qs-datepicker .qs-arrow.qs-left:after {\n border-right-color: grey;\n right: 50%;\n -webkit-transform: translate(25%, -50%);\n -ms-transform: translate(25%, -50%);\n transform: translate(25%, -50%);\n }\n\n .qs-datepicker .qs-arrow.qs-right:after {\n border-left-color: grey;\n left: 50%;\n -webkit-transform: translate(-25%, -50%);\n -ms-transform: translate(-25%, -50%);\n transform: translate(-25%, -50%);\n }\n\n .qs-datepicker .qs-month-year {\n font-weight: 700;\n -webkit-transition: border 0.2s;\n transition: border 0.2s;\n border-bottom: 1px solid rgba(0, 0, 0, 0);\n cursor: pointer;\n }\n\n .qs-datepicker .qs-month-year:hover {\n border-bottom: 1px solid grey;\n }\n\n .qs-datepicker .qs-month-year:active:focus,\n .qs-datepicker .qs-month-year:focus {\n outline: none;\n }\n\n .qs-datepicker .qs-month {\n padding-right: 0.5ex;\n }\n\n .qs-datepicker .qs-year {\n padding-left: 0.5ex;\n }\n\n .qs-datepicker .qs-squares {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-filter: blur(0);\n filter: blur(0);\n -webkit-transition: -webkit-filter 0.3s;\n transition: -webkit-filter 0.3s;\n transition: filter 0.3s, -webkit-filter 0.3s;\n }\n\n .qs-datepicker .qs-squares.qs-blur {\n -webkit-filter: blur(5px);\n filter: blur(5px);\n }\n\n .qs-datepicker .qs-square {\n margin-top: 0.7em;\n width: calc(100% / 7);\n height: 50px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n cursor: pointer;\n -webkit-transition: background 0.1s;\n transition: background 0.1s;\n border-radius: 50px;\n }\n\n .qs-datepicker .qs-square.qs-current {\n font-weight: 700;\n }\n\n .qs-datepicker .qs-square.qs-current span {\n text-decoration: underline;\n }\n\n .qs-datepicker .qs-square.qs-active {\n background: #1093cd;\n color: #fff;\n }\n\n .qs-datepicker .qs-square.qs-range-date-start:not(.qs-range-date-6) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .qs-datepicker .qs-square.qs-range-date-middle {\n background: #e5eef5;\n }\n\n .qs-datepicker .qs-square.qs-range-date-middle {\n border-radius: 0;\n }\n\n .qs-datepicker .qs-square.qs-range-date-middle.qs-range-date-0 {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .qs-datepicker .qs-square.qs-range-date-end:not(.qs-range-date-0),\n .qs-datepicker .qs-square.qs-range-date-middle.qs-range-date-6 {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n .qs-datepicker .qs-square.qs-disabled span {\n opacity: 0.2;\n }\n\n .qs-datepicker .qs-square.qs-empty {\n cursor: default;\n }\n\n .qs-datepicker .qs-square.qs-disabled {\n cursor: not-allowed;\n }\n\n .qs-datepicker .qs-square.qs-day {\n cursor: default;\n color: grey;\n }\n\n .qs-datepicker\n .qs-square:not(.qs-empty):not(.qs-disabled):not(.qs-day):not(.qs-active):hover {\n background: #69b0e7;\n color: #fff;\n }\n\n .qs-datepicker .qs-event {\n position: relative;\n }\n\n .qs-datepicker .qs-event:after {\n content: '';\n position: absolute;\n width: 0.46875em;\n height: 0.46875em;\n border-radius: 50%;\n background: #07f;\n bottom: 0;\n right: 0;\n }\n\n .qs-datepicker .qs-event.qs-disabled:after,\n .qs-datepicker .qs-event.qs-empty:after {\n background: #cce4ff;\n }\n\n /* END custom style datepickers */\n\n .input-group {\n display: flex;\n align-items: center;\n }\n\n input[type='text'],\n a.input-button {\n border: 1px solid #ccc;\n box-sizing: border-box;\n height: 36px;\n }\n\n input[type='text'] {\n width: 8em;\n padding: 0.5em;\n display: inline-block;\n }\n\n input#from,\n input#to {\n text-align: center;\n font-family: Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif;\n }\n\n input#from {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: 50px;\n border-bottom-left-radius: 50px;\n border-right: 0;\n }\n\n input[type='text']:focus {\n background: #e8f3fb;\n }\n\n a.input-button {\n text-decoration: none;\n display: block;\n padding: 0 10px;\n border-left: 0;\n cursor: pointer;\n align-self: center;\n justify-content: center;\n line-height: 1;\n }\n\n a.input-button ki-icon-btn {\n border: 0;\n display: flex;\n box-shadow: none;\n height: 100%;\n width: auto;\n align-items: center;\n }\n\n ki-icon-btn {\n box-shadow: none;\n }\n\n ki-icon-btn.selected,\n ki-icon-btn:hover {\n box-sizing: border-box;\n }\n\n ki-icon-btn.selected,\n ki-icon-btn.selected:hover {\n fill: #ffffff;\n background: #1093cd;\n }\n\n ki-icon-btn:hover {\n fill: #4a4a49;\n }\n\n #periodListBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n border-top-right-radius: 50px 50px;\n border-bottom-right-radius: 50px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border: 1px solid #ccc;\n border-left: 0;\n box-sizing: border-box;\n height: 36px;\n }\n\n #periodListSummary {\n display: none;\n border: 1px solid #9099a0;\n border-radius: 50px;\n color: #9099a0;\n cursor: pointer;\n text-align: center;\n padding: 0.5em 1em;\n }\n\n #periodListSummary:hover {\n color: #4a4a49;\n fill: #4a4a49;\n }\n\n #periodListSummary.selected {\n background-color: #3f85cc;\n color: #ffffff;\n fill: #ffffff;\n border: 1px solid #fff;\n }\n\n .popover-column {\n display: flex;\n flex-direction: column;\n flex: 1;\n padding: 0.5em 0;\n }\n\n .popover-button {\n display: flex;\n font-family: Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif;\n cursor: pointer;\n padding: 0.5em 0.6em;\n }\n\n .popover-button.disabled {\n pointer-events: none;\n cursor: not-allowed;\n }\n\n .popover-button .check-icon {\n display: flex;\n align-items: center;\n width: 25px;\n flex-shrink: 0;\n }\n\n .popover-button.selected,\n .popover-button:hover {\n fill: #ffffff;\n }\n\n .popover-button.selected,\n .popover-button:hover {\n fill: #1093cd;\n }\n\n /* Media queries */\n @media (max-width: 1024px) {\n input[type='text'],\n a.input-button {\n width: 0;\n visibility: hidden;\n }\n\n .input-group {\n width: 0;\n }\n\n #periodListBtn {\n display: none;\n }\n\n #periodListSummary {\n display: block;\n white-space: nowrap;\n }\n\n .qs-datepicker-container {\n position: absolute;\n flex-direction: column;\n top: 50px !important;\n left: 0 !important;\n width: 400px;\n transform: translateX(-100px);\n }\n\n .qs-datepicker-container .qs-datepicker {\n width: 100%;\n }\n\n .qs-datepicker,\n .qs-datepicker .qs-overlay {\n width: 100%;\n }\n\n .tabSection {\n display: flex;\n height: 40px;\n width: 100%;\n }\n .tabSection .tab {\n display: flex;\n flex: 1;\n height: 100%;\n width: 100%;\n align-items: center;\n justify-content: center;\n }\n\n .tabSection .tab.tab-selected {\n border-bottom: 4px solid #1093cd;\n }\n\n .popover-column {\n display: flex;\n position: absolute;\n background: white;\n z-index: 999;\n height: 100%;\n width: 100%;\n }\n\n .popover-column.hide-mobile {\n display: none;\n }\n }\n`;\n","import dayjs from '@kisters/wcp-base/common/dayjsext';\n\nexport default class PeriodsList {\n allowtime;\n\n constraints;\n\n _periods;\n\n _periodsWithoutTime;\n\n periodListOptions;\n\n value;\n\n constructor(classification) {\n this.constraints =\n classification && classification.constraints\n ? classification.constraints\n : {};\n\n const options =\n classification && classification.periods\n ? classification.periods\n : [\n [\n 'today',\n 'thisWeek',\n 'thisMonth',\n 'thisYear',\n 'theDaySoFar',\n 'last15day',\n 'last30day',\n 'last60day',\n 'last6month',\n 'last1year',\n 'last2year',\n ],\n ];\n this.allowtime === true\n ? (this.periods = options)\n : (this.periodsWithoutTime = options);\n this.periodListOptions =\n classification && classification.periodListOptions\n ? classification.periodListOptions\n : null;\n this.value = 'today';\n }\n\n set periods(val) {\n if (!val) {\n return;\n }\n this._periods = val;\n }\n\n get periods() {\n return this._periodss;\n }\n\n set periodsWithoutTime(val) {\n if (!val) {\n return;\n }\n this._periodsWithoutTime = val;\n }\n\n get periodsWithoutTime() {\n return this._periodsWithoutTime;\n }\n\n static getDurationBySrt(periodStr) {\n let matched;\n let m;\n let unit;\n switch (periodStr) {\n case 'custom':\n return {\n from: dayjs(),\n to: dayjs(),\n };\n case 'today':\n return {\n from: dayjs().startOf('day'),\n to: dayjs().add(1, 'days').startOf('day'),\n };\n case 'thisWeek':\n return {\n from: dayjs().startOf('week'),\n to: dayjs().add(1, 'weeks').startOf('week'),\n };\n case 'thisMonth':\n return {\n from: dayjs().startOf('month'),\n to: dayjs().add(1, 'months').startOf('month'),\n };\n case 'lastMonth':\n return {\n from: dayjs().add(-1, 'months'),\n to: dayjs(),\n };\n case 'thisYear':\n return {\n from: dayjs().startOf('year'),\n to: dayjs().add(1, 'years').startOf('year'),\n };\n case 'lastYear':\n return {\n from: dayjs().add(-1, 'years'),\n to: dayjs(),\n };\n case 'theDaySoFar':\n return {\n from: dayjs().startOf('day'),\n to: dayjs(),\n };\n case 'WTD':\n return {\n from: dayjs().startOf('week'),\n to: dayjs().startOf('day'),\n };\n case 'MTD':\n return {\n from: dayjs().startOf('month'),\n to: dayjs().startOf('day'),\n };\n case 'YTD':\n return {\n from: dayjs().startOf('year'),\n to: dayjs().startOf('day'),\n };\n case 'yesterday':\n m = dayjs().subtract(1, 'days');\n return {\n from: m.clone().startOf('day'),\n to: m.add(1, 'days').startOf('day'),\n };\n case 'dayBeforeYesterday':\n m = dayjs().subtract(2, 'days');\n return {\n from: m.clone().startOf('day'),\n to: m.add(1, 'days').startOf('day'),\n };\n case 'dayLastWeek':\n m = dayjs().subtract(1, 'weeks');\n return {\n from: m.clone().startOf('day'),\n to: m.add(1, 'days').startOf('day'),\n };\n case 'preWeek':\n m = dayjs().subtract(1, 'weeks');\n return {\n from: m.clone().startOf('week'),\n to: m.add(1, 'weeks').startOf('week'),\n };\n case 'preMonth':\n m = dayjs().subtract(1, 'months');\n return {\n from: m.clone().startOf('month'),\n to: m.add(1, 'months').startOf('month'),\n };\n case 'preYear':\n m = dayjs().subtract(1, 'years');\n return {\n from: m.clone().startOf('year'),\n to: m.add(1, 'years').startOf('year'),\n };\n case 'periodOfRecord':\n return {\n from: dayjs().startOf('year'),\n to: dayjs().startOf('day'),\n };\n default:\n matched = periodStr.match(/^last(\\d+)(min|hour|day|month|year)/i);\n if (matched) {\n m = dayjs();\n unit = matched[2].toLowerCase();\n if (unit === 'min') {\n unit = 'minute';\n }\n return {\n from: m.clone().subtract(matched[1], `${unit}s`),\n to: m,\n };\n }\n return {};\n }\n }\n\n getPeriodsList() {\n const returnOptions = [];\n const options =\n this.allowtime === true ? this.periods : this.periodsWithoutTime;\n options.forEach(col => {\n const returnCol = [];\n col.forEach(opt => {\n returnCol.push({\n label: opt,\n dates: PeriodsList.getDurationBySrt(opt),\n });\n });\n returnOptions.push(returnCol);\n });\n return returnOptions;\n }\n}\n","/* eslint-disable*/\nimport { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport datepicker from 'js-datepicker/dist/datepicker.min';\nimport { LoaderMixin, Mix } from '@kisters/wcp-base/common';\nimport { i18nMixin } from '@kisters/wcp-base/decorators';\nimport style from './ki-time-range-picker.css';\nimport PeriodsList from './PeriodsList';\nimport nls from '../../locales/index';\nimport { last } from 'lodash-es/array';\n\n@customElement('ki-time-range-picker')\nexport default class KiTimeRangePicker extends Mix(\n LitElement,\n [i18nMixin, { nls }],\n LoaderMixin,\n) {\n // language=CSS\n static styles = style;\n\n _fromTime;\n\n _toTime;\n\n allowtimebox;\n\n constraints;\n\n fromDate;\n\n toDate;\n\n showPeriodList;\n\n constructor() {\n super();\n this._fromTime = null;\n this._toTime = null;\n this._periodsListOptions = null;\n\n this.allowtimebox = false;\n this.constraints = {};\n this.fromDate = null;\n this.toDate = null;\n this.showPeriodList = null;\n this._periodSelectionQue = [];\n }\n\n static get properties() {\n return {\n allowtimebox: { type: Boolean },\n constraints: { type: Object },\n showPeriodList: { type: Boolean },\n periods: { type: Array },\n _periodSelectionQue: { type: Array },\n dateFormat: { type: String, default: 'DD/MM/YYYY' },\n initMin: { type: Number },\n initMax: { type: Number },\n };\n }\n\n set from(val) {\n if (!val || (this._fromTime && this._fromTime.isSame(val))) {\n return;\n }\n this._fromTime = dayjs(val);\n this.requestUpdate();\n }\n\n get from() {\n return this._fromTime;\n }\n\n set to(val) {\n if (!val || (this._toTime && this._toTime.isSame(val))) {\n return;\n }\n this._toTime = dayjs(val);\n this.requestUpdate();\n }\n\n get to() {\n return this._toTime;\n }\n\n render() {\n // language=html\n return html`\n
\n \n \n \n
\n \n
\n \n
\n `;\n }\n\n getPreviousPeriod() {\n const length = this._periodSelectionQue.length;\n const lastPer = length > 1 ? this._periodSelectionQue[length - 2] : null;\n if (lastPer) {\n return (\n this.i18n.t('previouslySelected') +\n ' ' +\n lastPer.from.format('L') +\n ' - ' +\n lastPer.to.format('L')\n );\n } else {\n return this.i18n.t('previouslySelected');\n }\n }\n\n firstUpdated() {\n this._createInputs();\n this._setVisibilityToNodes();\n this._bindEvents();\n this._setFirstDates();\n }\n\n goToPreviousSelection() {\n if (this._periodSelectionQue.length > 1) {\n this._periodSelectionQue.pop();\n const lastPeriod = last(this._periodSelectionQue);\n this._updateSelections(\n lastPeriod.from.toISOString(),\n lastPeriod.to.toISOString(),\n );\n this._emitDatesChanged(lastPeriod.from, lastPeriod.to, true);\n }\n }\n\n _updateSelections(from, to) {\n this._deselectPeriodList();\n this.toDate.navigate(new Date(to));\n this.fromDate.navigate(new Date(from));\n this._setValuesToNodes(from, to);\n this._checkPeriodListSelection(from, to);\n }\n _bindEvents() {\n const _t = this;\n this.renderRoot.querySelector('#from').addEventListener('change', e => {\n _t._changeEvent(e, _t.fromDate);\n });\n this.renderRoot.querySelector('#to').addEventListener('change', e => {\n _t._changeEvent(e, _t.toDate);\n });\n this._datadateupdateHandler = e => {\n if (e.detail.to && e.detail.from && !e.detail.ignoreHistory) {\n _t._addToPeriodQue(e.detail.from, e.detail.to);\n }\n _t._updateSelections(\n dayjs(e.detail.from).toISOString(),\n dayjs(e.detail.to).toISOString(),\n );\n };\n document.addEventListener('datadateupdate', this._datadateupdateHandler);\n this._gotopreviousselectionHandler = e => {\n _t.goToPreviousSelection();\n };\n document.addEventListener(\n 'gotopreviousselection',\n this._gotopreviousselectionHandler,\n );\n }\n _changeEvent(e, input) {\n if (\n e &&\n e.target &&\n e.target.value &&\n dayjs(e.target.value, this.dateFormat).isValid()\n ) {\n input.setDate(\n new Date(dayjs(e.target.value, this.dateFormat).toISOString()),\n );\n this._checkRangeAndEmitChanges(input);\n }\n }\n\n _checkRangeAndEmitChanges(input) {\n const range = input.getRange();\n this._setValuesToNodes(range.start, range.end);\n if (range && range.start && range.end) {\n this._deselectPeriodList();\n this._emitDatesChanged(range.start, range.end);\n }\n }\n _checkPeriodListSelection(from, to) {\n const _t = this;\n const ONE_DAY_MS = 86400000;\n const isPeriodLess24H =\n dayjs(to).valueOf() - dayjs(from).valueOf() < ONE_DAY_MS;\n this.renderRoot.querySelectorAll(`.button.selected`).forEach(btn => {\n btn.classList.remove('selected');\n });\n this._periodsListOptions.forEach(column => {\n column.forEach(period => {\n const _periodStart = period.dates.from.clone();\n const _periodEnd = period.dates.to.clone();\n const _firstCheck =\n _periodStart.valueOf() === dayjs(from).valueOf() &&\n _periodEnd.valueOf() === dayjs(to).valueOf();\n const _additionalCheck = isPeriodLess24H\n ? false\n : _periodStart.startOf('day').valueOf() === dayjs(from).valueOf() &&\n _periodEnd.endOf('day').valueOf() === dayjs(to).valueOf();\n if (_firstCheck || _additionalCheck) {\n _t.renderRoot\n .querySelectorAll(`.popover-button.selected`)\n .forEach(btn => {\n btn.classList.remove('selected');\n });\n const nodesToSelect = _t.renderRoot.querySelectorAll(\n `[data-value*=\"from_${period.dates.from.valueOf()}_to_${period.dates.to.valueOf()}\"]`,\n );\n nodesToSelect &&\n nodesToSelect.forEach(node => {\n node.classList.add('selected');\n const icon = node.querySelector('.check-icon');\n if (icon) {\n icon.innerHTML = \"\";\n }\n });\n }\n });\n });\n }\n\n _createInputs() {\n const _t = this;\n let _id = dayjs().toISOString();\n const options = {\n id: _id,\n startDay: 1, // 0 = Sunday, 1 = Monday\n showAllDates: true,\n position: 'br',\n customDays: [\n _t.i18n.t('sundayAbbr'),\n _t.i18n.t('mondayAbbr'),\n _t.i18n.t('tuesdayAbbr'),\n _t.i18n.t('wednesdayAbbr'),\n _t.i18n.t('thursdayAbbr'),\n _t.i18n.t('fridayAbbr'),\n _t.i18n.t('saturdayAbbr'),\n ],\n customMonths: [\n _t.i18n.t('January'),\n _t.i18n.t('February'),\n _t.i18n.t('March'),\n _t.i18n.t('April'),\n _t.i18n.t('May'),\n _t.i18n.t('June'),\n _t.i18n.t('July'),\n _t.i18n.t('August'),\n _t.i18n.t('September'),\n _t.i18n.t('October'),\n _t.i18n.t('November'),\n _t.i18n.t('December'),\n ],\n overlayButton: _t.i18n.t('Submit'),\n overlayPlaceholder: _t.i18n.t('year'),\n formatter: (input, date /*, instance*/) => {\n input.value = dayjs(date).format(this.dateFormat);\n },\n onHide: () => {\n _t.renderRoot\n .querySelector('#periodListBtn')\n .classList.remove('selected');\n _t.renderRoot\n .querySelector('#periodListSummary')\n .classList.remove('selected');\n },\n };\n const fromOptions = Object.assign({}, options, {\n onShow: () => {\n _t.renderRoot\n .querySelectorAll('.to-tab')\n .forEach(selElem => selElem.classList.remove('tab-selected'));\n _t.renderRoot\n .querySelectorAll('.from-tab')\n .forEach(selElem => selElem.classList.add('tab-selected'));\n _t.renderRoot.querySelector('#periodListBtn').classList.add('selected');\n },\n onSelect: instance => {\n _t.toDate.show();\n _t._checkRangeAndEmitChanges(instance);\n },\n });\n const toOptions = Object.assign({}, options, {\n onShow: () => {\n _t.renderRoot\n .querySelectorAll('.from-tab')\n .forEach(selElem => selElem.classList.remove('tab-selected'));\n _t.renderRoot\n .querySelectorAll('.to-tab')\n .forEach(selElem => selElem.classList.add('tab-selected'));\n _t.renderRoot.querySelector('#periodListBtn').classList.add('selected');\n },\n onSelect: instance => {\n _t._checkRangeAndEmitChanges(instance);\n },\n });\n this.fromDate = datepicker(\n this.renderRoot.querySelector('#from'),\n fromOptions,\n );\n this.toDate = datepicker(this.renderRoot.querySelector('#to'), toOptions);\n }\n\n _createTabNode(className, calendarToShow, calendarToHide) {\n const _t = this;\n const tabNode = document.createElement('div');\n tabNode.classList.add('tab');\n tabNode.classList.add(className);\n tabNode.onclick = e => {\n e.stopPropagation();\n calendarToHide.hide();\n calendarToShow.show();\n };\n return tabNode;\n }\n\n _createTabsForMobile(node) {\n const tabsNode = document.createElement('div');\n tabsNode.classList.add('tabSection');\n\n const fromTabNode = this._createTabNode(\n 'from-tab',\n this.fromDate,\n this.toDate,\n );\n const toTabNode = this._createTabNode('to-tab', this.toDate, this.fromDate);\n tabsNode.appendChild(fromTabNode);\n tabsNode.appendChild(toTabNode);\n\n node.insertBefore(tabsNode, node.firstChild);\n }\n\n _emitDatesChanged(from, to, ignoreHistory) {\n const auxFrom = dayjs(from).startOf('day');\n const auxTo = dayjs(to).endOf('day');\n this.dispatchEvent(\n new CustomEvent('changedate', {\n bubbles: true,\n detail: {\n fromTime: auxFrom,\n toTime: auxTo,\n ignoreHistory: ignoreHistory,\n },\n }),\n );\n }\n disconnectedCallback() {\n document.removeEventListener('datadateupdate', this._datadateupdateHandler);\n document.removeEventListener(\n 'gotopreviousselection',\n this._gotopreviousselectionHandler,\n );\n if (super.disconnectedCallback) super.disconnectedCallback();\n }\n _generatePeriodList(node) {\n const _t = this;\n this._periodsListOptions.forEach(columns => {\n const column = document.createElement('div');\n column.classList.add('popover-column');\n columns.forEach(opt => {\n const option = document.createElement('span');\n const optFrom = opt && opt.dates ? opt.dates.from : dayjs();\n const optTo = opt && opt.dates ? opt.dates.to : dayjs();\n option.innerHTML = `${\n _t.i18n.t(opt.label) || opt.label || opt || ''\n }`;\n option.className = 'popover-button';\n option.setAttribute(\n 'data-value',\n `from_${optFrom.valueOf()}_to_${optTo.valueOf()}`,\n );\n option.onclick = () => {\n _t.renderRoot.querySelectorAll('.selected').forEach(selElem => {\n var icon = selElem.querySelector('.check-icon');\n if (icon) {\n icon.innerHTML = '';\n }\n selElem.classList.remove('selected');\n });\n option.classList.add('selected');\n var icon = option.querySelector('.check-icon');\n if (icon) {\n icon.innerHTML = \"\";\n }\n if (opt.label === 'custom') {\n column.classList.add('hide-mobile');\n setTimeout(() => {\n _t.fromDate.show();\n }, 50);\n } else if (opt.label === 'periodOfRecord') {\n if (\n this.constraints &&\n this.constraints.min &&\n this.constraints.max\n ) {\n _t.selectPeriod(\n this.constraints.min.toISOString(),\n this.constraints.max.toISOString(),\n true,\n );\n }\n } else {\n _t.selectPeriod(optFrom.toISOString(), optTo.toISOString(), true);\n }\n };\n column.appendChild(option);\n });\n node.insertBefore(column, node.childNodes[0]);\n });\n }\n\n _setFirstDates() {\n if (!this.initMin || !this.initMax) {\n return;\n }\n this.selectPeriod(\n dayjs(this.initMin).toISOString(),\n dayjs(this.initMaxax).toISOString(),\n false,\n );\n }\n\n _setValuesToNodes(from, to) {\n const fromTabs = this.renderRoot.querySelectorAll('.from-tab');\n const toTabs = this.renderRoot.querySelectorAll('.to-tab');\n if (!from || !to) {\n this.renderRoot.querySelector('#periodListSummary').innerHTML =\n '';\n fromTabs.forEach(\n selElem =>\n (selElem.innerHTML = from\n ? `${dayjs(from).format(this.dateFormat)}`\n : ''),\n );\n toTabs.forEach(\n selElem =>\n (selElem.innerHTML = to\n ? `${dayjs(to).format(this.dateFormat)}`\n : ''),\n );\n } else {\n this.renderRoot.querySelector('#periodListSummary').innerHTML = `${dayjs(\n from,\n ).format(this.dateFormat)} - ${dayjs(to).format(this.dateFormat)}`;\n fromTabs.forEach(\n selElem =>\n (selElem.innerHTML = `${dayjs(from).format(this.dateFormat)}`),\n );\n toTabs.forEach(\n selElem => (selElem.innerHTML = `${dayjs(to).format(this.dateFormat)}`),\n );\n }\n }\n\n _setVisibilityToNodes() {\n const _t = this;\n if (!this.showPeriodList) {\n this.renderRoot.querySelector('#periodListBtn').style.display = 'none';\n }\n const periodsList = new PeriodsList({\n allowtime: this.allowtimebox,\n periods: this.periods,\n });\n this._periodsListOptions = periodsList.getPeriodsList();\n const nodes = this.renderRoot.querySelectorAll('.qs-datepicker-container');\n nodes.forEach(node => {\n _t._generatePeriodList(node);\n _t._createTabsForMobile(node);\n });\n this._setValuesToNodes(this._fromTime, this._toTime);\n }\n\n openFromCalendar(e) {\n e.stopPropagation();\n this.toDate.hide();\n const isHidden =\n this.fromDate.calendarContainer.classList.contains('qs-hidden');\n this.fromDate[isHidden ? 'show' : 'hide']();\n }\n _addToPeriodQue(from, to) {\n const lastItem = last(this._periodSelectionQue) || {};\n if (\n dayjs.isDayjs(from) &&\n this._fromTime &&\n this._toTime &&\n from &&\n to &&\n lastItem.from != from &&\n lastItem.from != to\n ) {\n this._periodSelectionQue.push({ from, to });\n }\n }\n selectPeriod(from, to, emitChange) {\n this.toDate.setDate(new Date(to), false);\n this.fromDate.setDate(new Date(from), false);\n\n this._updateSelections(from, to);\n\n emitChange && this._emitDatesChanged(from, to);\n }\n _deselectPeriodList() {\n this.renderRoot\n .querySelectorAll(`.popover-button.selected`)\n .forEach(btn => {\n btn.classList.remove('selected');\n const icon = btn.querySelector('.check-icon');\n if (icon) {\n icon.innerHTML = '';\n }\n });\n }\n toggleOptions(e) {\n e.stopPropagation();\n const button = this.renderRoot.querySelector('#periodListSummary');\n const column = this.renderRoot.querySelector('.popover-column');\n if (button) {\n if (button.classList.contains('selected')) {\n button.classList.remove('selected');\n this.fromDate.hide();\n } else {\n button.classList.add('selected');\n column.classList.remove('hide-mobile');\n this.fromDate.show();\n }\n }\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport { html, LitElement, css } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { concat, orderBy } from 'lodash-es';\nimport { Mix, PropertyDefaultValue } from '@kisters/wcp-base/common';\nimport {\n responsiveMixin,\n SM,\n ViewPort,\n i18nMixin,\n} from '@kisters/wcp-base/decorators';\nimport '@kisters/wcp-base/components';\nimport nls from '../../locales/index';\nimport '@ui5/webcomponents/dist/Popover';\nimport '@ui5/webcomponents/dist/List';\nimport '@ui5/webcomponents/dist/StandardListItem';\n\n@customElement('ki-ts-list-select')\nexport default class KiTsListSelect extends Mix(\n LitElement,\n PropertyDefaultValue,\n responsiveMixin,\n [i18nMixin, { nls }],\n) {\n static styles = css`\n :host {\n position: relative;\n }\n\n ki-icon-btn {\n margin: 5px;\n box-shadow: none;\n }\n\n ki-icon-btn:hover {\n fill: white;\n background: var(--theme-color-secondary, #0056a0);\n }\n\n .no-ts {\n padding: 8px;\n width: 400px;\n text-align: center;\n }\n\n ki-searchbox {\n box-shadow: unset;\n }\n `;\n\n _open;\n\n static get properties() {\n return {\n tsList: {\n type: Array,\n default: [],\n },\n mainTs: {\n type: String,\n default: '',\n },\n presetTs: {\n type: Array,\n default: [],\n },\n searchExp: String,\n selectedTs: {\n type: Array,\n default: [],\n },\n };\n }\n\n get filteredTs() {\n const regx = new RegExp(this.searchExp, 'i');\n return orderBy(\n this.searchExp\n ? this.tsList.filter(ts => regx.test(ts.ts_path))\n : [...this.tsList],\n ['ts_name'],\n ['asc'],\n );\n }\n\n render() {\n return html`\n \n \n ${ViewPort.size === SM ? this._renderMobile() : this._renderMenu()}\n `;\n }\n\n _renderMenu() {\n return html`\n \n \n ${this.tsList?.length > 0\n ? this._renderList()\n : html`
${this.i18n.t('noTimeseriesList')}
`}\n \n \n `;\n }\n\n _renderMobile() {\n return html` \n \n ${this.tsList?.length > 0\n ? this._renderList()\n : html`
${this.i18n.t('noTimeseriesList')}
`}\n
\n `;\n }\n\n _renderList() {\n return html` \n ${this.filteredTs?.map(\n item =>\n html`${item.ts_name}`,\n )}`;\n }\n\n firstUpdated() {\n /** Select mainTs and presets if defined */\n this.selectedTs = this.presetTs?.length\n ? concat(\n [this.mainTs],\n this.presetTs.map(ts => ts.ts_path),\n )\n : [this.mainTs];\n\n // use to render default ts in graph\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: { value: this.selectedTs },\n }),\n );\n }\n\n _handleSearch(evt) {\n this.searchExp = evt.detail.value;\n }\n\n _openTsList() {\n if (ViewPort.size === SM) {\n this.renderRoot.querySelector('#ts-list-modal')?.show();\n } else {\n if (this._open) this.renderRoot.querySelector('#ts-list').close();\n else\n this.renderRoot\n .querySelector('#ts-list')\n .showAt(this.renderRoot.querySelector('#ts-list-selector-btn'));\n\n this._open = !this._open;\n }\n }\n\n _updateTs(evt) {\n this.selectedTs = [\n ...new Set(evt.detail.selectedItems.map(ts => ts.title)),\n ];\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: { value: this.selectedTs },\n }),\n );\n }\n}\n","import { i18nMixin } from '@kisters/wcp-base/decorators';\nimport { customElement } from 'lit/decorators.js';\nimport {\n BaseTable,\n Export,\n Selection,\n ColumnFormatter,\n SortAble,\n LazyRendering,\n} from '@kisters/wcp-base/components';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { css } from 'lit';\nimport nls from '../../locales/index';\n\nconst Parent = Mix(\n BaseTable,\n Selection,\n ColumnFormatter,\n LazyRendering,\n SortAble,\n Export,\n);\n\n@customElement('ki-ts-viewer-table')\nexport default class KiTsViewerTable extends Mix(Parent, [i18nMixin, { nls }]) {\n static styles = [\n ...Parent.styles,\n css`\n :host {\n height: 100%;\n }\n .col-value {\n text-align: right;\n }\n .header .header-content {\n padding: 10px 5px;\n hyphens: auto;\n text-align: left;\n }\n .table {\n font-size: 14px;\n }\n .table .body .cell {\n padding: 5px 5px;\n }\n .selection-col {\n display: none;\n }\n .row {\n cursor: default;\n }\n `,\n ];\n}\n","import { css } from 'lit';\n\n// language=CSS\nexport default css`\n :host {\n display: block;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n }\n\n .header {\n flex: 0 0 50px;\n padding: 0 20px;\n line-height: 20px;\n font-size: 0.8em;\n color: gray;\n max-height: 100px;\n min-height: 35px;\n border-bottom: 1px solid lightgray;\n display: flex;\n }\n\n .title {\n font-size: 1.5em;\n line-height: 50px;\n }\n\n .header-center {\n flex: 1;\n }\n\n .customAttributes {\n margin-top: 15px;\n font-size: 1.25em;\n }\n\n .adminStatus {\n color: red;\n font-weight: bold;\n }\n\n .adminBemerkung {\n margin-left: 5px;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n }\n\n .containerNode {\n height: calc(100% - 50px);\n display: flex;\n flex-direction: row;\n }\n\n ki-icon-btn {\n margin: 5px;\n box-shadow: none;\n }\n\n ki-icon-btn.selected {\n fill: white;\n background: var(--theme-color-secondary, #0056a0);\n }\n\n .chart-wrapper {\n flex: 1;\n overflow: hidden;\n }\n\n .table-wrapper {\n flex: 0 30%;\n border-left: lightgray 1px solid;\n height: 100%;\n overflow: auto;\n }\n\n .hidden {\n display: none;\n }\n\n ki-ts-graph {\n height: 100%;\n }\n\n .header .separator {\n font-size: 1.2em;\n font-weight: 600;\n padding: 0px 0.5em;\n color: rgb(204, 204, 204);\n line-height: 50px;\n }\n\n ki-time-range-picker {\n height: 50px;\n }\n`;\n","/* eslint-disable max-classes-per-file */\nimport { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport merge from 'lodash-es/merge';\nimport { getQueryObject, i18nMixin } from '@kisters/wcp-base/decorators';\nimport { Mix, PropertyDefaultValue } from '@kisters/wcp-base/common';\nimport { debounce, unzipWith, last } from 'lodash-es';\nimport nls from '../../locales/index';\nimport style from './ki-ts-viewer.css';\nimport '@kisters/wcp-base/components';\nimport '../ki-chart/ki-ts-graph';\nimport '../ki-time-range-picker/ki-time-range-picker';\nimport './ki-ts-viewer-table';\n\n@customElement('ki-ts-viewer')\nexport default class KiTsViewer extends Mix(LitElement, PropertyDefaultValue, [\n i18nMixin,\n { nls },\n]) {\n constructor() {\n super();\n\n this.tableOptions = {\n columns: [\n {\n field: 'x',\n label: this.i18n.t('valueTableHeaderTimestamp'),\n format: 'dateTime',\n sortable: true,\n },\n {\n field: 'y',\n label: this.i18n.t('valueTableHeaderValue'),\n sortable: false,\n },\n ],\n sort: [\n {\n field: 'x',\n ascending: false,\n },\n ],\n };\n }\n\n static styles = style;\n\n static get properties() {\n return {\n chartOptions: { type: Object, default: {} },\n customAttributes: { type: Object, default: {} },\n tableOptions: Object,\n periods: {\n type: Array,\n default: [\n ['last1month', 'last6month', 'last1year', 'last5year', 'last10year'],\n ],\n },\n // context with this\n getTsData: Function,\n // context with this\n getTableData: {\n type: Function,\n default() {\n // getTableData work with tableOptions\n const mainTs = this.graph.chart.series.find(s => s.options.mainTs);\n return mainTs\n ? unzipWith(\n [mainTs.processedXData, mainTs.processedYData],\n (x, y) => ({ x, y }),\n )\n : [];\n },\n },\n // inner\n tableVisible: Boolean,\n range: { Object },\n tableData: {\n type: Array,\n default: [],\n },\n };\n }\n\n get graph() {\n return getQueryObject(this, '#graph');\n }\n\n render() {\n // language=html\n return html`\n
\n
Title
\n
\n
\n ${this.customAttributes?.AdminStatus ||\n this.customAttributes?.AdminBemerkung\n ? html` ${this.customAttributes.AdminStatus}\n ${this.customAttributes.AdminBemerkung}`\n : html``}\n
\n
\n
\n \n\n
|
\n\n \n \n {\n this.tableVisible = !this.tableVisible;\n }}\"\n >\n \n \n
\n
\n
\n
\n \n this.getTsData({\n range: this.range,\n ts,\n })}\"\n >\n
\n
\n \n \n
\n
\n `;\n }\n\n toggleTableVisible() {\n this.graph.chart.reflow();\n }\n\n _updateRange(e) {\n this.graph.chart.zoomOut();\n this.range = {\n min: e.detail.fromTime.valueOf(),\n max: e.detail.toTime.valueOf(),\n };\n this.dispatchEvent(\n new CustomEvent('rangeChange', {\n detail: {\n range: this.range,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n _transformAlarmTs(data) {\n // Add left-side limit\n data[0].data.unshift([\n new Date('1900-1-1').toISOString(),\n data[0].data[0][1],\n ]);\n // Add right-side limit\n data[0].data.push([\n new Date(Date.now()).toISOString(),\n last(data[0].data)[1],\n ]);\n }\n\n get computedChartOptions() {\n const options = merge(\n {\n xAxis: {\n events: {\n // todo debounce ?\n afterSetExtremes: debounce(e => {\n this.tableData = this.getTableData({ max: e.max, min: e.min });\n }, 100),\n },\n },\n },\n this.chartOptions,\n );\n\n merge(options, {\n xAxis: {\n ...this.range,\n },\n });\n return options;\n }\n\n downloadGraph() {\n this.graph.chart.exportChartLocal();\n }\n}\n","import { css } from 'lit';\n// language=CSS\nexport default css`\n :host {\n position: relative;\n display: flex;\n height: 100%;\n flex: 1;\n overflow: auto;\n --ui5-listitem-border-bottom: none;\n }\n\n :host .left {\n flex: 1;\n display: flex;\n flex-direction: column;\n border-right: 1px solid lightgray;\n position: relative;\n min-width: 270px;\n max-width: 300px;\n }\n\n .icon-btn.back-btn-mobile{\n height: 30px;\n fill: var(--theme-color-primary, gray);\n margin-left: 10px;\n font-size: 2.5em;\n }\n\n :host(.sm-screen) {\n overflow: hidden;\n }\n\n .hidden {\n display: none;\n }\n\n .map-container {\n height: 200px;\n flex: 0 0 200px;\n }\n\n ki-station-map {\n height: 100%;\n width: 100%;\n display: block;\n pointer-events: none;\n }\n\n .left .list-container {\n flex: 1;\n overflow-y: auto;\n }\n\n .prevenxt-container {\n display: none;\n flex-direction: row;\n }\n\n .prevnext-title-container {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n :host .main {\n flex: 3;\n position: relative;\n height: 100%;\n overflow: auto;\n }\n\n .header {\n z-index: 1;\n padding: 5px;\n display: flex;\n height: 200px;\n position: absolute;\n width: 100%;\n background: linear-gradient(white, transparent);\n border-bottom: 1px solid lightgray;\n box-sizing: border-box;\n }\n\n .icon-btn {\n cursor: pointer;\n font-size: 3em;\n fill: gray;\n }\n\n .icon-btn:hover {\n color: #3c3c3c;\n }\n\n .back-btn {\n pointer-events: all;\n font-size: 5em;\n position: absolute;\n left: -15px;\n bottom: 0px;\n }\n\n .fav-navbtn {\n display: none;\n }\n\n .title {\n font-size: 1.2em;\n display: inline-block;\n flex: 1;\n color: #3c3c3c;\n }\n\n .title span {\n padding-left: 10px;\n }\n\n .fav {\n position: absolute;\n right: 5px;\n top: 0;\n font-size: 2.3em;\n }\n\n ui5-select {\n width: 250px;\n }\n\n .titleContainer {\n display: flex;\n align-items: center;\n position: absolute;\n width: 85%;\n }\n\n .status-bar {\n padding: 10px;\n color: red;\n border-bottom: 1px solid lightgray;\n }\n\n .status-bar a {\n color: unset;\n }\n\n ki-list {\n border-top: 1px solid gray;\n }\n\n ki-list-item {\n cursor: pointer;\n padding: 12px 16px;\n color: var(--theme-text-color, #1d1d1b);\n padding-left: 15px !important;\n }\n\n ki-list-item.selected {\n background: linear-gradient(\n 90deg,\n var(--theme-color-primary) 5px,\n rgb(255, 255, 255) 0%\n );\n font-weight: 600;\n }\n\n ki-list-item:hover {\n background: linear-gradient(\n 90deg,\n var(--theme-color-primary) 5px,\n var(--theme-color-secondary) 0%\n );\n color: var(--theme-color-tertiary, white);\n }\n\n img {\n max-height: 100%;\n max-width: 100%;\n left: 50%;\n top: 50%;\n position: absolute;\n transform: translate(-50%, -50%);\n }\n\n ui5-side-navigation {\n width: 100%;\n border: none;\n }\n\n :host(.sm-screen) .main {\n display: block;\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n height: 100%;\n background: white;\n transition: left 0.5s;\n }\n\n :host(.sm-screen) .main.hide {\n left: 100%;\n }\n\n :host .main .graph-title {\n display: none;\n }\n\n :host(.sm-screen) .main .graph-title {\n display: flex;\n padding: 0;\n position: absolute;\n z-index: 4;\n height: 50px;\n align-items: center;\n }\n\n :host(.sm-screen) .main.hide .graph-title {\n display: none;\n }\n\n :host(.sm-screen) .left {\n flex: 0 0 100%;\n display: flex;\n padding: 10px 0;\n max-width: initial;\n }\n\n ki-station-map::part(overview-map) {\n width: 30%;\n height: 50%;\n bottom: 5px;\n right: 5px;\n pointer-events: none;\n box-shadow: 0 0 3px 3px #fff;\n opacity: 0.9;\n border-radius: 10px;\n }\n\n :host(.sm-screen.LANDSCAPE) .left {\n flex-direction: row;\n }\n\n :host(.sm-screen.LANDSCAPE) .left .header {\n width: 30vw;\n height: initial;\n }\n\n :host(.sm-screen.LANDSCAPE) .left .list-container {\n height: initial;\n flex: 2;\n }\n\n :host(.sm-screen.LANDSCAPE) .left .map-container {\n height: initial;\n flex: 1;\n }\n\n :host(.sm-screen.LANDSCAPE) .left ki-list {\n border-top: none;\n }\n\n\n`;\n","/* eslint-disable max-classes-per-file */\nimport { LoaderMixin, Mix, template } from '@kisters/wcp-base/common';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { css, html, LitElement } from 'lit';\nimport { customElement, query } from 'lit/decorators.js';\nimport { i18nMixin, responsiveMixin } from '@kisters/wcp-base/decorators';\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport nls from '@kisters/wcp-water/locales';\n// eslint-disable-next-line import/extensions\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { last, first } from 'lodash-es';\nimport { getCurrentApi } from '../../api/API';\nimport '@ui5/webcomponents/dist/Carousel.js';\n\n@customElement('wwp-station-info')\nexport default class WwpStationInfo extends Mix(\n LitElement,\n LoaderMixin,\n responsiveMixin,\n [i18nMixin, { nls }],\n) {\n static styles = css`\n :host {\n height: 100%;\n width: 100%;\n overflow: auto;\n display: flex;\n flex-wrap: wrap;\n }\n\n .content {\n margin: 15pt;\n height: auto;\n flex: 1;\n }\n\n :host(.sm-screen) .content,\n :host(.md-screen) .content {\n width: 100%;\n margin: 0px;\n margin-right: 20px;\n display: table;\n }\n\n :host(.sm-screen) .content:first-of-type {\n margin-top: 50px;\n }\n\n :host(.md-screen) .content:first-of-type {\n margin-top: 25px;\n }\n\n ui5-carousel {\n }\n\n .images {\n margin: 15pt;\n height: 100%;\n max-height: 95%;\n flex: 1;\n min-width: 200px;\n }\n\n .images img {\n display: block;\n margin: auto;\n max-width: 90%;\n max-height: 90%;\n }\n\n .row {\n display: table-row;\n line-height: 1.5em;\n }\n\n .footer {\n display: table-row;\n line-height: 2em;\n }\n\n .row {\n width: 100%;\n height: 15px;\n }\n\n .cell {\n display: table-cell;\n padding: 5px 10px;\n }\n\n :host(.sm-screen) .cell {\n height: 34px;\n }\n\n .label {\n color: gray;\n padding-left: 30px;\n }\n\n .hidden {\n display: none;\n }\n\n .value {\n overflow-wrap: break-word;\n }\n\n .url {\n text-decoration: none;\n }\n\n :host(.sm-screen) .row {\n height: unset;\n }\n `;\n\n @query('#gallery')\n gallery;\n\n // eslint-disable-next-line class-methods-use-this\n get api() {\n return getCurrentApi();\n }\n\n static get properties() {\n return {\n station: {\n type: Object,\n initial: () => {},\n },\n fields: {\n type: Array,\n initial: () => ['station_no', 'station_name'],\n },\n };\n }\n\n disconnectedCallback() {\n super.connectedCallback();\n clearInterval(this.interval);\n }\n\n getLabel(field) {\n if (field.label) {\n return field.label;\n }\n return this.i18n.exists(`kiwis:${field.field}`)\n ? this.i18n.t(`kiwis:${field.field}`)\n : this.i18n.t(`customer:${field.field}`);\n }\n\n getValue(field) {\n let ret;\n let _skipSubst = false; // Skip string modification after parsing\n const val = this.station[field.field];\n if (!val) {\n ret = '-';\n } else if (field.type === 'number') {\n ret = new Intl.NumberFormat(\n this.i18n.language,\n field.numberFormat || this.numberFormat || {},\n ).format(parseFloat(val));\n } else if (field.type === 'textnumber') {\n ret = new Intl.NumberFormat(\n this.i18n.language,\n field.numberFormat || this.numberFormat || {},\n ).format(parseFloat(val.replace(',', '.')));\n } else if (field.type === 'datetime') {\n if (field.subst) {\n ret = val;\n field.subst.forEach(s => {\n ret = ret.replace(s.token, s.with);\n });\n _skipSubst = false;\n }\n const _dt = dayjs(ret, field.dateFormat?.inputPattern);\n ret = _dt.format(field.dateFormat?.outputFormat);\n } else if (field.type === 'html') {\n ret = unsafeHTML(this.station[field.field].replaceAll('\\r\\n', '
'));\n } else if (field.type === 'url') {\n // Check if URL is provided (either hardcoded or dynamic as station parameter)\n if (\n (field.urlIsStationParameter && this.station[field.url]) ||\n (!field.urlIsStationParameter && field.url)\n ) {\n let _url = ' {\n tmpret = tmpret.replace(item.token, item.with);\n });\n ret = tmpret;\n } else {\n ret = val.replace(field.subst.token, field.subst.with);\n }\n }\n if (ret !== '-' && field.suffix) {\n ret = template(`${ret}${field.suffix}`, this.station);\n }\n return ret;\n }\n\n getSlider() {\n // eslint-disable-next-line lit-a11y/alt-text\n return html`\n ${this.images?.map(i => html`\"station\"`)}\n `;\n }\n\n getTable(fields) {\n return fields.map(field => {\n const val = this.getValue(field);\n return val !== '-'\n ? html`
\n
${this.getLabel(field)}
\n \n ${val}\n
\n `\n : html``;\n });\n }\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['stationId']);\n this.stationId = params.stationId;\n this.station = await this.api.getStation(this.stationId);\n Object.assign(this, params.options);\n if (this.tsData) {\n this.fetchTsData();\n }\n if (this.showImages) {\n this.fetchImages();\n let count = 0;\n this.interval = setInterval(() => {\n count += 1;\n this.gallery.navigateTo(count % this.images.length);\n }, 10000000);\n }\n }\n\n render() {\n return html` ${this.tables?.map(\n table => html`
\n ${this.getTable(table.items)}\n ${table.footer\n ? html`
\n
\n ${table.footer &&\n this.tableHasValues(this.getTable(table.items))\n ? unsafeHTML(table.footer)\n : ''}\n
\n
`\n : ``}\n
`,\n )}\n\n
\n ${this.images && this.getSlider()}\n
`;\n }\n\n // TODO: Dirty, LANUV-167\n // eslint-disable-next-line class-methods-use-this\n tableHasValues(templateResultList) {\n let anyValueFound = false;\n templateResultList.forEach(tr => {\n if (tr.values?.length) anyValueFound = true;\n });\n return anyValueFound;\n }\n\n async fetchImages() {\n this.images = await this.api.getImage(this.station.station_no);\n this.requestUpdate();\n return this.images;\n }\n\n async fetchTsData() {\n await Promise.all(\n this.station.timeseries\n .filter(ts => this.tsData.includes(last(ts.href.split('/'))))\n .map(async ts => {\n const tsdata = await this.api.getTsData(ts.href);\n tsdata.forEach(item => {\n this.station[item.ts_shortname] = last(last(item.data));\n const from = first(first(item.data));\n const to = first(last(item.data));\n if (from && to) {\n this.station[`${item.ts_shortname}_from`] = from;\n this.station[`${item.ts_shortname}_to`] = to;\n this.station[`${item.ts_shortname}_coverage`] = `${dayjs(\n from,\n ).format('L LT')} - ${dayjs(to).format('L LT')}`;\n }\n });\n }),\n );\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport './dynMenu.js';\nimport './dynMenuLanuv.js';\n\nimport { LoaderMixin, Mix } from '@kisters/wcp-base/common';\n\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport {\n responsiveMixin,\n queryParamMixin,\n localStorageMixin,\n i18nMixin,\n SM,\n ViewPort,\n} from '@kisters/wcp-base/decorators';\nimport {\n navigateTo,\n getCurrentPath,\n getSearchParamString,\n getRouteOptionsAndParams,\n} from '@kisters/wcp-base/components';\nimport Feature from 'ol/Feature';\nimport Point from 'ol/geom/Point';\nimport Style from 'ol/style/Style';\nimport { FontIcon } from '@kisters/wcp-water/components';\n/* eslint-disable import/extensions */\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n/* eslint-enable import/extensions */\nimport { each, findIndex, find, some, concat, flatten } from 'lodash-es';\nimport { DynMenuOption } from './DynMenuOption.js';\n\nimport { getCurrentApi } from '../../api/API';\nimport style from './wwp-station-detail.css';\nimport nls from '../../locales/index';\nimport { reproject, registerProjections } from '../../common/maputils';\n\n/* eslint-enable import/extensions */\n\nimport './wwp-station-info';\n\n/* eslint-disable import/extensions */\nimport '@ui5/webcomponents-fiori/dist/SideNavigation';\nimport '@ui5/webcomponents-fiori/dist/SideNavigationItem';\nimport '@ui5/webcomponents-fiori/dist/SideNavigationSubItem';\nimport '@ui5/webcomponents/dist/Select';\nimport '@ui5/webcomponents/dist/Option';\n\n// eslint-disable-next-line camelcase\nconst _getNextItem = (\n collection: Array<{ station_id: number }>,\n stationId: number,\n) => {\n let nextItem;\n const index = findIndex(collection, s => s.station_id === stationId);\n\n if (index >= 0 && index < collection.length - 1) {\n nextItem = collection[index + 1];\n } else {\n [nextItem] = collection;\n }\n return nextItem;\n};\n\n// eslint-disable-next-line camelcase\nconst _getPreviousItem = (\n collection: Array<{ station_id: number }>,\n stationId: number,\n) => {\n let nextItem;\n const index = findIndex(collection, s => s.station_id === stationId);\n\n if (index > 0) {\n nextItem = collection[index - 1];\n } else {\n nextItem = collection[collection.length - 1];\n }\n return nextItem;\n};\n\n@customElement('wwp-station-detail')\nexport default class WwpStationDetail extends Mix(\n LitElement,\n LoaderMixin,\n responsiveMixin,\n [\n queryParamMixin,\n { targetProperty: 'mapOrTable', selector: 'mode', defaultValue: 'map' },\n ],\n [\n localStorageMixin,\n { targetProperty: '__favouriteStationIds', typeParam: Array },\n ],\n [i18nMixin, { nls }],\n) {\n static styles = style;\n\n @property({ type: String })\n stationId;\n\n @property({ type: Object })\n _station = {};\n\n @property({ type: String })\n detail;\n\n /** Option to hide favorite start in the top-left */\n hideFavorite = false;\n\n /** Option to hide minimap in top-left corner */\n showMiniMap = true;\n\n dynMenu: DynMenuOption | undefined;\n\n /** Path to selected Item\n * @remark Must start with \"/\", e.g. \"/Waterlevel\"\n */\n _selectedMenuItem: string | null = null;\n\n // eslint-disable-next-line class-methods-use-this\n get api() {\n return getCurrentApi();\n }\n\n mobileAutoForward = false;\n\n _appConfig;\n\n get appConfig() {\n return this._appConfig;\n }\n\n set appConfig(value) {\n this._appConfig = value;\n this.requestUpdate();\n }\n\n _currentSubPath;\n\n ___favouriteStationIds = [];\n\n get __favouriteStationIds() {\n return this.___favouriteStationIds;\n }\n\n set __favouriteStationIds(value) {\n this.___favouriteStationIds = value;\n this.requestUpdate();\n }\n\n _mapOrTable = 'map';\n\n get mapOrTable() {\n return this._mapOrTable;\n }\n\n set mapOrTable(value) {\n this._mapOrTable = value;\n this.requestUpdate();\n }\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n onAfterEnter(location, options, router) {\n const params = getRouteOptionsAndParams(location, [\n 'layerName',\n 'stationId',\n 'stationLabel',\n 'remarkAttr',\n ]);\n Object.assign(this, params.options);\n const mainRouteLength = location.route.path.split('/').length;\n this._search = location.search;\n this.currentRoute = location.route;\n\n this.currentRoute.children = this.currentRoute.children.filter(\n item => !(item.isDynamic || item.path?.includes('dyn_')),\n );\n this.currentRoute.__children = this.currentRoute.__children.filter(\n item => !(item.isDynamic || item.path?.includes('dyn_')),\n );\n\n this._mainRoute = location.pathname\n .split('/')\n .slice(0, mainRouteLength)\n .join('/');\n this._menuListRaw =\n location.route.children?.map(item => ({\n filter: item.filter,\n label: item.label,\n detailSelection: item.detailSelection || item.path.slice(1),\n path: item.path,\n })) ?? [];\n if (this._mainRoute !== location.pathname) {\n this._selectedMenuItem = `/${location.pathname\n .split('/')\n .slice(mainRouteLength)\n .join('/')}`;\n } else {\n this._selectedMenuItem =\n location.pathname === router.context.resolver.location.redirectFrom ||\n !router.context.resolver.location.redirectFrom\n ? null\n : `/${router.context.resolver.location.redirectFrom\n .split('/')\n .slice(-1)}`;\n }\n\n this.router = router;\n\n // Switch back to main menu on navigation (mobile)\n this.router.navigationChange = (newRoute, oldRoute) => {\n /** TODO: @Marko Why absolute length? This section is also executed on desktop devices */\n if (newRoute.length < oldRoute.length) {\n this.__selectedItem = this._selectedMenuItem; // Workaround LANUV: Preserve last selected menu item (required for nested LANUV dynMenu)\n this._selectedMenuItem = '';\n this.requestUpdate();\n }\n };\n\n this.stationId = params.stationId;\n this.stationLabel = params.stationLabel;\n this.fetchData(params.layerName);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get localStorageId() {\n return `wwp-favorites-ids`;\n }\n\n _renderLeftMenu() {\n if (this._station && this._menuList) {\n return html`\n ${this._menuList.map(i => this._renderMenuItem(i))}\n `;\n }\n return html`Loading...`;\n }\n\n /** Render Top-Level-Items\n * @remark Expand if Sub-Item is selected\n * @remark Selected if item-path is selectedItem\n * @remark Top-Level items with children can't be selected\n */\n _renderMenuItem(item) {\n // LANUV DynMenu Workaround\n if (this._selectedMenuItem === '')\n this._selectedMenuItem = this.__selectedItem;\n\n if (\n item.hide ||\n item.subitem ||\n (item.toplevel && item?.items.some(i => !i.hide))\n ) {\n return html``;\n }\n return html`\n this._selectedMenuItem === i.path ||\n i.aliasKeys?.includes(this._selectedMenuItem?.replace('/', '')),\n )}\"\n .path=\"${item.path}\"\n .text=\"${item.label}\"\n .selected=\"${!item.items && item.path === this._selectedMenuItem}\"\n >${item.items?.map(i =>\n this._renderMenuSubItem(i),\n )}`;\n }\n\n /** Render Sub-Menu-Items\n * @remark Grouping of parameters\n */\n _renderMenuSubItem(item) {\n return !item.hide\n ? html``\n : html``;\n }\n\n // eslint-disable-next-line class-methods-use-this\n _handleChange(evt) {\n if (evt.detail.item.path) {\n this._selectedMenuItem = evt.detail.item.path;\n navigateTo(`${this._mainRoute}${evt.detail.item.path}`);\n this._currentSubPath = evt.detail.item.path;\n this.requestUpdate();\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n switchStation(to) {\n const query = getSearchParamString();\n const toReplace = `${getCurrentPath().split('/station/')[0]}/station/${\n to.station_id\n }/${to.station_name || to.station_longname}${query}`;\n navigateTo(toReplace);\n }\n\n goToStation(event) {\n const station = find(this._stations, {\n station_id: event.target.selectedOption.value,\n });\n station && this.switchStation(station);\n }\n\n nextFavStation() {\n const favSta = this._stations.filter(s =>\n this.__favouriteStationIds.includes(s.station_id),\n );\n\n const nextItem = _getNextItem(favSta, this.stationId);\n\n nextItem && this.switchStation(nextItem);\n }\n\n prevFavStation() {\n const favSta = this._stations.filter(s =>\n this.__favouriteStationIds.includes(s.station_id),\n );\n\n const prevItem = _getPreviousItem(favSta, this.stationId);\n prevItem && this.switchStation(prevItem);\n }\n\n nextStation() {\n const nextItem = _getNextItem(this._sortedStations, this.stationId);\n nextItem && this.switchStation(nextItem);\n }\n\n prevStation() {\n const prevItem = _getPreviousItem(this._sortedStations, this.stationId);\n prevItem && this.switchStation(prevItem);\n }\n\n isFavorite() {\n return this.__favouriteStationIds.indexOf(this._station?.station_id) >= 0;\n }\n\n isSelected(station) {\n return this._station?.station_id === station.station_id;\n }\n\n getFavoriteList() {\n return this._stations\n ? this._stations.filter(s =>\n this.__favouriteStationIds.includes(s.station_id),\n )\n : [];\n }\n\n getTitle() {\n return this._stations && this.isFavorite()\n ? html`\n ${this.getFavoriteList().map(\n station =>\n html`${station.station_longname || station.station_name}`,\n )}\n `\n : html`${this._station?.station_longname ||\n this._station?.station_name ||\n ''}`;\n }\n\n _goToParent() {\n navigateTo(this._mainRoute.split('/').slice(0, 3).join('/') + this._search);\n }\n\n _goToStationMenu() {\n this._selectedMenuItem = null;\n navigateTo(this._mainRoute + this._search);\n }\n\n render() {\n // language=html\n return html`\n
\n
\n \n
\n \n\n
${this.getTitle()}
\n \n
\n \n
\n
\n \n \n ${this.showMiniMap\n ? html``\n : html``}\n \n
\n
\n
\n \n
\n
\n ${this._station?.station_longname || this._station?.station_name}\n
\n
\n \n
\n
\n ${this._renderStatusBar()}\n
${this._renderLeftMenu()}
\n
\n
\n
\n \n \n \n \n
\n \n
\n `;\n }\n\n _toggleFavourite() {\n if (this.__favouriteStationIds.indexOf(this._station.station_id) === -1) {\n this.__favouriteStationIds = [\n ...this.__favouriteStationIds,\n this._station.station_id,\n ];\n } else {\n this.__favouriteStationIds = this.__favouriteStationIds.filter(\n id => id !== this._station.station_id,\n );\n }\n }\n\n _renderStatusBar() {\n if (this._station && this._station[this.remarkAttr]) {\n return html`
\n ${unsafeHTML(\n this._station[this.remarkAttr].replace(//gi, ''),\n )}\n
`;\n }\n return '';\n }\n\n get stationPositionMarker() {\n const loc = this._station?.point || [0, 0];\n const marker = new Feature(new Point(loc));\n marker.setStyle(\n new Style({\n image: new FontIcon({\n backgroundColor: 'rgba(0,0,0,0)',\n color: 'red',\n icon: 'ki ki-map-marker',\n }),\n }),\n );\n return marker;\n }\n\n _menuFilter(menu) {\n const station = this._station;\n return menu.filter(menuItem => {\n if (typeof menuItem.filter === 'string') {\n return station.timeseries.some(ts =>\n menuItem.filter ? menuItem.filter === ts.station_parameter : true,\n );\n }\n\n // Filter array is OR - logic (one criterium must match to pass!)\n if (Array.isArray(menuItem.filter)) {\n let ret = true;\n for (const [key, value] of Object.entries(menuItem.filter)) {\n ret =\n (ret && station[key] === value) ||\n (ret && station[key] && value === '*');\n }\n return menuItem.filter.some(filter =>\n station.timeseries.some(ts =>\n filter ? filter === ts.station_parameter : true,\n ),\n );\n }\n\n // Filter object is AND - logic (all criterias must match to pass!)\n if (typeof menuItem.filter === 'object' && menuItem.filter !== null) {\n let ret = true;\n each(menuItem.filter, (val, key) => {\n if (key === 'parameter') {\n ret =\n ret &&\n val.every(item =>\n station._links.some(link => link.station_parameter === item),\n );\n } else if (key === 'anyparameter') {\n ret =\n ret &&\n val.some(item =>\n station._links.some(link => link.station_parameter === item),\n );\n } else if (key === 'href') {\n ret =\n ret &&\n val.some(item =>\n station._links.some(link => link.href.includes(item)),\n );\n } else if (Array.isArray(val)) {\n ret = ret && val.some(cond => station[key] === cond);\n } else if (val.charAt && val.charAt(0) === '!') {\n ret = ret && station[key] && station[key] !== val.substring(1);\n } else {\n ret =\n (ret && station[key] && val === '*') ||\n (ret && station[key] === val) ||\n station._links.some(item => item[key] === val);\n }\n });\n return ret;\n }\n return true;\n });\n }\n\n async loadDynamicMenu() {\n if (!this.dynMenu) {\n return [];\n }\n try {\n let module;\n const className = this.dynMenu?.className || 'dynMenu';\n console.log('Load DynMenu: ', className);\n if (className === 'dynMenu') module = await import(`./dynMenu.js`);\n else if (className === 'dynMenuLanuv')\n module = await import('./dynMenuLanuv.js');\n else console.error('Dynamic menu not found:', className);\n const items = await module.getMenuItems(\n this._station,\n this.dynMenu,\n this.dynMenu?.menuTemplate,\n );\n return items;\n } catch (e) {\n console.error('Error loading dynamic menu', e);\n return [];\n }\n }\n\n async fetchData(layerName) {\n if (this.api && this.stationId) {\n this._stations = await this.api.getStations();\n this._sortedStations = this._stations.sort((a, b) => {\n const aId = parseFloat(a.station_id);\n const bId = parseFloat(b.station_id);\n return aId > bId;\n });\n this._station = await this.api.getStation(this.stationId);\n await this._fetchMapData();\n\n if (\n this.parameterFilterAttribute &&\n this._station[this.parameterFilterAttribute]\n ) {\n try {\n const filterList = JSON.parse(\n this._station[this.parameterFilterAttribute],\n );\n if (filterList.length) {\n this._station.timeseries = this._station.timeseries.filter(ts =>\n filterList.includes(ts.station_parameter),\n );\n this._station._links = this._station._links.filter(ts =>\n filterList.includes(ts.station_parameter),\n );\n }\n } catch (e) {\n console.error('invalid parameterFilterAttribute');\n }\n }\n const dynMenuItems = await this.loadDynamicMenu();\n const dynMenuSubPaths = [];\n dynMenuItems.forEach(item => {\n if (item.items) {\n item.items.forEach(i => dynMenuSubPaths.push(i));\n }\n });\n this.currentRoute.children = this.currentRoute.children.concat(\n dynMenuItems.concat(dynMenuSubPaths),\n );\n this.currentRoute.__children = this.currentRoute.__children.concat(\n dynMenuItems.concat(dynMenuSubPaths),\n );\n this._menuList = this._menuFilter(this._menuListRaw).concat(dynMenuItems);\n\n if (!this._menuList.some(item => item.path === this._selectedMenuItem)) {\n this._selectedMenuItem = null;\n }\n\n if (!this._selectedMenuItem) {\n const _flattenedList: Array = flatten(\n this._menuList.map(i => (i.items ? concat(i, i.items) : i)),\n );\n\n const initialSelection =\n find(_flattenedList, { detailSelection: `${layerName}` })?.path ||\n find(_flattenedList, i => {\n const l = i.aliasKeys || [];\n l.push(i.label);\n l.push(i.path.replace('/', ''));\n return l.includes(layerName);\n })?.path ||\n this.defaultSelection ||\n this._menuList[0]?.path;\n\n this._selectedMenuItem = initialSelection;\n }\n\n if (this.mobileAutoForward || ViewPort.size !== SM) {\n setTimeout(() => {\n navigateTo(`${this._mainRoute}${this._selectedMenuItem}`);\n }, 10);\n } else {\n setTimeout(() => {\n navigateTo(`${this._mainRoute}${this._selectedMenuItem}`);\n }, 10);\n }\n\n this.requestUpdate();\n }\n }\n\n async _fetchMapData() {\n const mapInfo = await this.api.getMapConfig();\n this._mapConfig = mapInfo;\n registerProjections(this._mapConfig);\n reproject([this._station], mapInfo); // check if we can do auto reproject in map.\n this._mapConfig.view.center = this._station.point;\n this._mapConfig.view.zoom =\n this._mapConfig.view.stationDetailZoom || this._mapConfig.view.zoom;\n }\n}\n","// const station = {\n// \"station_no\": [\"nlsLabel\", \"1430\"],\n// ...\n// \"data\": [[\"2021-03-16T00:00:00.000+01:00\", 185], [\"2021-03-16T00:15:00.000+01:00\", 184]]\n// };\n\n/**\n * Download station data as excel\n *\n * @param {object} station - The station data to be download\n * @param {object} [options] - Options to customize the excel content\n * {\n * name: \"excelfilename\",\n * sheetName: \"sheetname\",\n * meta: ['station_name', 'station_no', 'parametertype_name', 'ts_unitsymbol',...]\n * }\n */\nexport async function downloadExcel(station = {}, options = {}) {\n const XLSX = await import('xlsx');\n const wb = XLSX.utils.book_new();\n if (station) {\n const ws = XLSX.utils.aoa_to_sheet(station.metadata);\n // Add ts data\n XLSX.utils.sheet_add_aoa(ws, station.data, { origin: -1 });\n ws['!cols'] = [{ wch: 30 }];\n XLSX.utils.book_append_sheet(wb, ws, options.sheetName || 'Sheet1');\n }\n XLSX.writeFile(wb, `${options.name || 'download'}.xlsx`);\n}\n\n/**\n * Download station data as csv\n * @param {object} station - The station data to be download\n * @param {object} [options] - Options to customize the excel content\n * {\n * name: \"excelfilename\",\n * sheetName: \"sheetname\",\n * meta: ['station_name', 'station_no', 'parametertype_name', 'ts_unitsymbol',...]\n * }\n */\nexport async function downloadCSV(station = {}, options = {}) {\n const XLSX = await import('xlsx');\n const wb = XLSX.utils.book_new();\n if (station) {\n const ws = XLSX.utils.aoa_to_sheet(\n station.metadata.map(item => ['#', ...item]),\n );\n // Add ts data\n XLSX.utils.sheet_add_aoa(ws, station.data, { origin: -1 });\n XLSX.utils.book_append_sheet(wb, ws, options.sheetName || 'Sheet1');\n }\n XLSX.writeFile(wb, `${options.name || 'download'}.csv`, {\n bookType: 'csv',\n FS: '\\t',\n });\n}\n","/* eslint-disable max-classes-per-file */\nimport { css, html, LitElement } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { customElement } from 'lit/decorators.js';\nimport {\n template,\n deUmlaut,\n Mix,\n downloadFile,\n copyTextToClipboard,\n} from '@kisters/wcp-base/common';\n\nimport dayjs from '@kisters/wcp-base/common/dayjsext';\nimport { keyBy, last, some } from 'lodash-es';\nimport { responsiveMixin, i18nMixin } from '@kisters/wcp-base/decorators';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport nls from '@kisters/wcp-water/locales';\n\nimport '@ui5/webcomponents/dist/Toast';\n\nimport { downloadExcel } from '../../common/download';\n\n@customElement('wwp-station-download')\nexport default class WwpStationDownload extends Mix(\n LitElement,\n responsiveMixin,\n [i18nMixin, { nls }],\n) {\n static styles = css`\n :host {\n height: 100%;\n width: 100%;\n overflow: auto;\n display: flex;\n flex-wrap: wrap;\n }\n\n .content {\n margin: 15pt;\n height: auto;\n }\n\n :host(.sm-screen) .content,\n :host(.md-screen) .content {\n width: 100%;\n margin: 15pt 0;\n display: table;\n }\n\n .cellheader {\n hyphens: auto;\n text-align: center;\n }\n\n .cell.iconcell {\n text-align: center;\n white-space: nowrap;\n }\n\n .content {\n padding: 2%;\n }\n\n .dltable {\n display: table;\n width: 100%;\n table-layout: fixed;\n max-width: 800px;\n }\n .header {\n padding: 10px;\n }\n .row {\n display: table-row;\n }\n .cell {\n display: table-cell;\n padding: 10px 2%;\n vertical-align: middle;\n hyphens: auto;\n overflow-x: hidden;\n word-wrap: break-word;\n }\n .innerCell {\n display: inline;\n font-size: 1.5em;\n }\n\n .label,\n ki-icon {\n fill: gray;\n padding: 5px;\n }\n ki-icon:hover {\n cursor: pointer;\n }\n .descr {\n padding: 30px 10px;\n }\n\n .hidden {\n display: none;\n }\n `;\n\n static get properties() {\n return {\n station: { type: Object },\n };\n }\n\n csvSeparator = '\\t';\n\n dataColumn = ['Timestamp', 'Value', 'Quality Code Name'];\n\n dataColumnLabels = ['Zeitpunkt', 'Messwert', 'Status'];\n\n dataColumnLabelsAggr = [\n 'Tag',\n 'Tages Minimum',\n 'Tages Mittel',\n 'Tages Maximum',\n 'Status',\n ];\n\n api = getCurrentApi();\n\n connectedCallback() {\n if (super.connectedCallback) super.connectedCallback();\n this.numberFormatter = new Intl.NumberFormat(\n this.i18n.language,\n this.numberFormat || {},\n );\n }\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['stationId']);\n this.station = await this.api.getStation(params.stationId);\n Object.assign(this, params.options);\n }\n\n getFile(\n filename: Array | string,\n param: string,\n mimeType: string = 'application/json',\n ) {\n if (Array.isArray(filename)) {\n return this.station.timeseries.filter(\n item =>\n item.station_parameter === param &&\n some(filename, f => item.href.includes(f)) &&\n item.mime_type === mimeType,\n );\n }\n return this.station.timeseries.filter(\n item =>\n item.station_parameter === param &&\n item.href.includes(filename) &&\n item.mime_type === mimeType,\n );\n }\n\n getParameter(param) {\n return this.parameterMapping[param] || param;\n }\n\n getPeriod(period, resolution = null) {\n if (!period) {\n return resolution;\n }\n let ret = dayjs.duration(period).humanize();\n if (period === 'PoR') {\n ret = this.i18n.t('complete');\n }\n if (resolution) {\n ret += ` ${this.i18n.t('as')} ${resolution}`;\n }\n return ret;\n }\n\n render() {\n return this.station\n ? html`
\n
${unsafeHTML(this.descr)}
\n
\n ${this._renderHeader()}\n ${this.periods.map(per => html`${this._renderRow(per)}`)}\n
\n ${this.additionalDownloads()}\n
\n ${this.i18n.t('copytoclipboard')}`\n : html`
Loading...
`;\n }\n\n // eslint-disable-next-line class-methods-use-this\n additionalDownloads() {\n return html``;\n }\n\n _renderHeader() {\n return html`
\n
\n ${this.params\n .filter(item =>\n this.station.timeseries.some(\n ts => ts.station_parameter === item.parameter,\n ),\n )\n .map(\n field =>\n html`
${field.label}
`,\n )}\n
`;\n }\n\n _checkVisibility(per, parameter) {\n const list =\n per.type === 'file' ? this.station.zips : this.station.timeseries;\n if (Array.isArray(per.file)) {\n return list.some(\n ts =>\n ts.station_parameter === parameter &&\n per.file.some(f => ts.href.includes(f)),\n );\n }\n return list.some(\n ts => ts.station_parameter === parameter && ts.href.includes(per.file),\n );\n }\n\n _getCSVDownloadIcon(per, field) {\n if (per.type !== 'file') {\n return html`
\n \n
`;\n }\n const filehref = this.getDownloadFileHref(per.file, field.parameter);\n if (!filehref) {\n return html``;\n }\n return html`
\n \n \n
\n
\n {\n const link = document.createElement('a');\n link.href = filehref;\n copyTextToClipboard(\n `${link.protocol}//${link.host}${link.pathname}${link.search}${link.hash}`,\n );\n this.renderRoot.querySelector('#wcToastShort').show();\n }}\"\n >\n
`;\n }\n\n _renderRow(per) {\n return html`
\n
${this.getPeriod(per.period, per.resolution)}
\n ${this.params\n .filter(item =>\n this.station.timeseries.some(\n ts => ts.station_parameter === item.parameter,\n ),\n )\n .map(\n field => html`
\n ${this._getCSVDownloadIcon(per, field)}\n
\n \n
\n
`,\n )}\n
`;\n }\n\n _getAggrData(data, minDate) {\n let minTs;\n let meanTs;\n let maxTs;\n data.forEach(ts => {\n if (ts.ts_shortname.includes('Min')) {\n minTs = keyBy(ts.data, o => o[0]);\n } else if (ts.ts_shortname.includes('Max')) {\n maxTs = keyBy(ts.data, o => o[0]);\n } else if (ts.ts_shortname.includes('Mean')) {\n meanTs = keyBy(ts.data, o => o[0]);\n }\n });\n\n const cols = data[0].columns.split(',');\n const releaseStatusIndex = cols.indexOf('Release State');\n const qualityCodeNameIndex = cols.indexOf('Quality Code');\n\n const rows = [];\n Object.keys(meanTs).forEach(k => {\n if (new Date(k).getTime() > minDate) {\n const row = [\n dayjs(k).format('L'),\n minTs[k] ? this.numberFormatter.format(minTs[k][1]) : '',\n meanTs[k] ? this.numberFormatter.format(meanTs[k][1]) : '',\n maxTs[k] ? this.numberFormatter.format(maxTs[k][1]) : '',\n ];\n\n if (releaseStatusIndex !== -1) {\n const releaseState =\n this.releaseStates[meanTs[k][releaseStatusIndex]] ||\n this.releaseStates.default;\n row.push(releaseState);\n }\n\n if (qualityCodeNameIndex !== -1) {\n row.push(meanTs[k][qualityCodeNameIndex]);\n }\n\n rows.push(row);\n }\n });\n return rows;\n }\n\n _getData(data, minDate) {\n const cols = data[0].columns.split(',');\n\n const releaseStatusIndex = cols.indexOf('Release State');\n const qualityCodeNameIndex = cols.indexOf('Quality Code');\n\n const rows = [];\n console.time('start download parsing');\n const tzoffset =\n (dayjs().utcOffset() - dayjs().tz().utcOffset()) * 60 * 1000;\n data[0].data.forEach(item => {\n const datems = new Date(item[0]).getTime() - tzoffset;\n if (datems > minDate) {\n const row = [\n dayjs(datems).format('L LT'),\n item[1] === null ? '' : this.numberFormatter.format(item[1]),\n ];\n\n if (releaseStatusIndex !== -1) {\n const releaseState =\n this.releaseStates[item[releaseStatusIndex]] ||\n this.releaseStates.default;\n row.push(releaseState);\n }\n\n if (qualityCodeNameIndex !== -1) {\n row.push(item[qualityCodeNameIndex]);\n }\n rows.push(row);\n }\n });\n console.timeEnd('start download parsing');\n return rows;\n }\n\n getDownloadFileHref(file, parameter) {\n const dlfile = this.station.zips.filter(item => {\n if (Array.isArray(file)) {\n return (\n item.station_parameter === parameter &&\n file.some(filename => item.href.includes(filename))\n );\n }\n return item.station_parameter === parameter && item.href.includes(file);\n })[0];\n\n return dlfile ? this.api.getLink(`/${dlfile.href}`) : null;\n }\n\n async download(evt) {\n const format = evt.target.fileformat;\n const { period, file, type, resolution } = evt.target.period;\n const { parameter, label } = evt.target.value;\n const tsShortname =\n evt.target.period.ts_shortname || evt.target.value.ts_shortname;\n if (type === 'file') {\n const dlfile = this.getDownloadFileHref(file, parameter);\n if (dlfile) {\n window.open(dlfile);\n }\n }\n const datafile = this.getFile(file, parameter);\n if (datafile[0] && type !== 'file') {\n let tsdata = await this.api.getTsData(datafile[0].href);\n if (tsShortname && type !== 'agg') {\n tsdata = tsdata.filter(item => item.ts_shortname === tsShortname);\n }\n if (tsdata[0] && tsdata[0].data[0]) {\n const mdList = { ...this.station, ...tsdata[0] };\n mdList.creation = dayjs().tz().format('L LT');\n mdList.resolution = resolution;\n const minDate =\n period === 'PoR'\n ? -Infinity\n : dayjs().tz().subtract(dayjs.duration(period)).valueOf();\n const data =\n type === 'agg' && tsdata.length > 1\n ? this._getAggrData(tsdata, minDate)\n : this._getData(tsdata, minDate);\n // eslint-disable-next-line prefer-destructuring\n mdList.from = data[0]?.[0];\n mdList.to = last(data)?.[0];\n const filename = this.filename\n ? `${template(this.filename, mdList)}_${this.getPeriod(period)}`\n : `${dayjs().tz().format('L')}_${\n this.station.station_longname\n }_${label}_${this.getPeriod(period)}`;\n const mdfields = this.mdfields.map(item => [\n this.mdlabels[item] || this.i18n.t(`kiwis:${item}`),\n this.mdValues[item] || mdList[item],\n ]);\n\n const header =\n type === 'agg' && tsdata.length > 1\n ? [this.dataColumnLabelsAggr]\n : [this.dataColumnLabels];\n\n if (format === 'xls') {\n downloadExcel(\n {\n metadata: mdfields.concat(header),\n data,\n },\n {\n sheetName:\n type === 'agg' && tsdata.length > 1\n ? this.i18n.t('dailydata')\n : this.i18n.t('complete'),\n name: deUmlaut(filename),\n },\n );\n } else {\n let csvResult = mdfields\n .map(item => `#${item.join(': ')}`)\n .join('\\r\\n');\n csvResult += `\\r\\n${header\n .map(item => `${item.join(this.csvSeparator)}`)\n .join('\\r\\n')}`;\n csvResult += `\\r\\n${data\n .map(item => `${item.join(this.csvSeparator)}`)\n .join('\\r\\n')}`;\n downloadFile(csvResult, deUmlaut(filename));\n }\n }\n }\n }\n}\n","import { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/extensions\nimport { customElement, property } from 'lit/decorators.js';\nimport * as echarts from 'echarts/core';\nimport { LineChart, ScatterChart, BarChart } from 'echarts/charts';\nimport { SVGRenderer } from 'echarts/renderers';\nimport {\n ToolboxComponent,\n TooltipComponent,\n LegendComponent,\n GraphicComponent,\n DataZoomComponent,\n MarkLineComponent,\n TitleComponent,\n} from 'echarts/components';\n// eslint-disable-next-line import/extensions\nimport dark from './dark.json';\n\nimport { getQueryObject } from '../../decorators/query';\n\necharts.use([\n ToolboxComponent,\n TooltipComponent,\n TitleComponent,\n LegendComponent,\n GraphicComponent,\n DataZoomComponent,\n MarkLineComponent,\n LineChart,\n BarChart,\n ScatterChart,\n SVGRenderer,\n]);\n\necharts.registerTheme('dark', dark);\n\n@customElement('ki-echart')\nexport default class KiEchart extends LitElement {\n static styles = css`\n :host {\n height: 100%;\n width: 100%;\n display: block;\n overflow: hidden;\n }\n .chart {\n height: 100%;\n width: 100%;\n }\n `;\n\n @property({ type: Object })\n options: any;\n\n @property({ type: Boolean })\n darkMode: boolean = false;\n\n @property({ type: Object, attribute: false })\n chart: any = false;\n\n get chartElement() {\n return getQueryObject(this, '#chart');\n }\n\n initChart() {\n this.chart = echarts.init(this.chartElement, this.darkMode ? 'dark' : '');\n }\n\n rerenderChart() {\n if (this.chart) {\n echarts.dispose(this.chart);\n }\n this.initChart();\n this.updated();\n }\n\n firstUpdated() {\n this.initChart();\n }\n\n updated() {\n // eslint-disable-next-line no-unused-expressions\n this.options && this.chart && this.chart.setOption(this.options);\n }\n\n updateTheme(isDark: boolean) {\n this.darkMode = isDark;\n this.rerenderChart();\n }\n\n resize() {\n this.chart.resize();\n }\n\n render() {\n return html`
`;\n }\n}\n","import { html, css, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport '@kisters/wcp-base/components/ki-echart/ki-echart';\n\nexport const widgetType = {\n default: 1,\n addNew: 2,\n empty: 3,\n};\n\n@customElement('ki-widget')\nexport default class KiWidget extends LitElement {\n static styles = css`\n :host {\n height: 100%;\n width: 100%;\n display: block;\n overflow: hidden;\n }\n .widget-container {\n height: 100%;\n width: 100%;\n }\n `;\n\n type: number = widgetType.empty;\n\n configuration: string = '';\n\n static get properties() {\n return {\n configuration: { type: String },\n type: { type: Number },\n };\n }\n\n renderWidgetContent() {\n switch (this.type) {\n case widgetType.addNew:\n return '+';\n case widgetType.empty:\n return '';\n case widgetType.default:\n case undefined:\n default: {\n const config = JSON.parse(this.configuration ?? '{}');\n if (config) {\n return html``;\n }\n return config.text ?? '';\n }\n }\n }\n\n render() {\n return html`\n
${this.renderWidgetContent()}
\n `;\n }\n}\n","// TODO: store in config\nconst configServerUrl = 'http://localhost:3300';\n\nexport enum rowType {\n fullRow,\n halfRow,\n thirdRow,\n}\n\nexport enum elementType {\n default,\n addNew,\n empty,\n dropTarget,\n}\n\nexport const getLayout = async (\n uuid: string,\n): Promise<{\n layout: {\n rowType: rowType;\n elementType?: elementType;\n configuration?: { text: string };\n }[][];\n name: string;\n description: string;\n}> => {\n const response = await fetch(\n `${configServerUrl}/config/${encodeURIComponent(uuid)}`,\n {\n method: 'GET',\n mode: 'cors',\n cache: 'no-cache',\n headers: {\n Accept: 'application/json',\n },\n },\n );\n return response.json();\n};\n\nexport const saveLayout = async (\n name: string,\n description: string,\n layout: {\n rowType: rowType;\n elementType?: elementType;\n configuration?: { text: string };\n }[][],\n): Promise => {\n const response = await fetch(`${configServerUrl}/config`, {\n method: 'POST',\n mode: 'cors',\n cache: 'no-cache',\n credentials: 'same-origin',\n headers: {\n 'Content-Type': 'application/json',\n },\n redirect: 'follow',\n referrerPolicy: 'no-referrer',\n body: JSON.stringify({\n name,\n description,\n layout,\n }),\n });\n return (await response.json()).uuid;\n};\n\nexport const getExampleLayout = (): {\n rowType: rowType;\n elementType?: elementType;\n configuration?: Object;\n}[][] => [\n [\n {\n rowType: rowType.thirdRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 1.1],\n type: 'line',\n },\n ],\n },\n },\n {\n rowType: rowType.thirdRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 1.2],\n type: 'line',\n },\n ],\n },\n },\n {\n rowType: rowType.thirdRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 1.3],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.thirdRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 2.1],\n type: 'line',\n },\n ],\n },\n },\n {\n rowType: rowType.thirdRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 3.1],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.thirdRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 3.1],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.halfRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 8],\n type: 'line',\n },\n ],\n },\n },\n {\n rowType: rowType.halfRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 8],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.halfRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 8],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.fullRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 8],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.fullRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 8],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.fullRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 8],\n type: 'line',\n },\n ],\n },\n },\n ],\n [\n {\n rowType: rowType.fullRow,\n configuration: {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n },\n yAxis: {\n type: 'value',\n },\n series: [\n {\n data: [1.5, 2.3, 2.24, 2.18, 1.35, 1.47, 2.6, 9],\n type: 'line',\n },\n ],\n },\n },\n ],\n];\n","export enum DragAreas {\n Upper,\n Lower,\n Center,\n}\n\nexport const getAreaOfDrag = (e: {\n layerX: number;\n layerY: number;\n target: {\n clientWidth: number;\n clientHeight: number;\n };\n}): DragAreas => {\n const thresholdFactor = 0.1;\n const minThreshold = e.target.clientHeight * thresholdFactor;\n const maxThreshold = e.target.clientHeight - minThreshold;\n\n if (e.layerY < minThreshold) {\n return DragAreas.Upper;\n }\n\n if (e.layerY > maxThreshold) {\n return DragAreas.Lower;\n }\n\n return DragAreas.Center;\n};\n","import { html, css, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport '@kisters/wcp-base/components/ki-icon/ki-icon-btn';\nimport { widgetType } from '../ki-widget/ki-widget.ts';\nimport { elementType, rowType } from './service/layout-service';\nimport { DragAreas, getAreaOfDrag } from './service/layout-helper';\n\nconst renderElementContent = element => {\n let elementWidgetType;\n switch (element.elementType) {\n case elementType.addNew:\n elementWidgetType = widgetType.addNew;\n break;\n case elementType.empty:\n elementWidgetType = widgetType.empty;\n break;\n case elementType.dropTarget:\n case elementType.default:\n case undefined:\n default:\n elementWidgetType = widgetType.default;\n break;\n }\n\n return html`\n \n `;\n};\n\nconst renderNewRowDropTarget = content => html`\n
${content}
\n`;\n\nconst patchRow = rowArray => {\n const currentLength = rowArray.length;\n const patchedArray = [...rowArray];\n const firstElement = rowArray[0];\n const addNewExists = firstElement.elementType === elementType.addNew;\n if (\n (firstElement.rowType === rowType.halfRow && currentLength < 2) ||\n (firstElement.rowType === rowType.thirdRow && currentLength < 3)\n ) {\n patchedArray.push({\n rowType: firstElement.rowType,\n elementType: addNewExists ? elementType.empty : elementType.addNew,\n });\n if (firstElement.rowType === rowType.thirdRow && currentLength < 2) {\n patchedArray.push({\n rowType: firstElement.rowType,\n elementType: elementType.empty,\n });\n }\n }\n return patchedArray;\n};\n\nconst getFirstLayoutElement = elementArray => {\n let foundElement;\n\n elementArray.every(element => {\n foundElement = element;\n return element['data-row'] === undefined;\n });\n\n return foundElement;\n};\n\n@customElement('ki-dynamic-layout')\nexport default class KiDynamicLayout extends LitElement {\n static styles = css`\n :host {\n height: 100%;\n width: 100%;\n display: block;\n overflow: auto;\n }\n .layout-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n -webkit-transform: translateZ(\n 0\n ); /* is needed to scroll while dragging in chrome */\n gap: 20px;\n }\n .layout-row {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n flex-wrap: wrap;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n }\n .layout-element {\n min-width: 200px;\n border: 1px solid green;\n box-sizing: border-box;\n flex: 1;\n position: relative;\n }\n .height-s {\n height: 400px;\n }\n .height-l {\n height: 500px;\n }\n .not-displayed {\n display: none;\n }\n .hidden {\n visibility: hidden;\n }\n .close-button {\n position: absolute;\n margin-top: 5px;\n margin-right: 5px;\n top: 0;\n right: 0;\n }\n .append-button {\n position: absolute;\n margin-right: 5px;\n top: 45%;\n right: 0;\n }\n `;\n\n layout: {\n rowType: rowType;\n elementType?: elementType;\n configuration?: { text: string };\n }[][] = [];\n\n cachedLayout: {\n rowType: rowType;\n elementType?: elementType;\n configuration?: { text: string };\n }[][] = [];\n\n succesfullyDropped: boolean = false;\n\n validTarget: boolean = false;\n\n newRowAfter: number | undefined;\n\n lastDragArea: DragAreas | undefined;\n\n currentDraggedElement: {\n element: {\n rowType: rowType;\n elementType?: elementType;\n configuration?: {\n text: string;\n };\n };\n row: any;\n column: any;\n } | null = null;\n\n static get properties() {\n return {\n layout: { type: Array, attribute: false },\n cachedLayout: { type: Array, attribute: false },\n currentDraggedElement: { type: Object, attribute: false },\n succesfullyDropped: { type: Boolean, attribute: false },\n validTarget: { type: Boolean, attribute: false },\n newRowAfter: { type: Number, attribute: false },\n };\n }\n\n appendElement(row) {\n this.layout[row].forEach(item => {\n // eslint-disable-next-line no-param-reassign\n item.rowType += 1;\n });\n this.cacheCurrentLayout();\n this.rerenderItems();\n }\n\n cacheCurrentLayout() {\n this.cachedLayout = [];\n\n this.layout.forEach(rowArray => this.cachedLayout.push([...rowArray]));\n }\n\n // eslint-disable-next-line class-methods-use-this\n deleteElement(row: number, column: number) {\n if (this.layout[row].length > column) {\n if (this.layout[row].length === 1) {\n this.layout.splice(row, 1);\n } else {\n this.layout[row].splice(column, 1);\n }\n } else {\n this.layout[row].forEach(item => {\n // eslint-disable-next-line no-param-reassign\n item.rowType -= 1;\n });\n }\n this.cacheCurrentLayout();\n this.rerenderItems();\n }\n\n elementDragStart(event) {\n this.cacheCurrentLayout();\n this.succesfullyDropped = false;\n this.validTarget = false;\n\n const { target } = event;\n\n const draggedElementRow = target['data-row'];\n const draggedElementColumn = target['data-column'];\n\n const tempCurrentDraggedElement = {\n element: this.layout[draggedElementRow][draggedElementColumn],\n row: draggedElementRow,\n column: draggedElementColumn,\n };\n\n const currentRowType = tempCurrentDraggedElement.element.rowType;\n\n // this timeout is necessary. https://stackoverflow.com/questions/19639969/html5-dragend-event-firing-immediately\n setTimeout(() => {\n this.currentDraggedElement = tempCurrentDraggedElement;\n this.removeItem(draggedElementRow, draggedElementColumn, currentRowType);\n }, 10);\n }\n\n switchTargetToExistingRow(event, targetDomElement, targetElementRow) {\n const targetElementColumn = targetDomElement['data-column'];\n const targetElement = this.layout[targetElementRow][targetElementColumn];\n const targetElementRowType = this.layout[targetElementRow][0].rowType;\n const targetElementType = targetElement?.elementType ?? elementType.default;\n\n if (targetElementType === elementType.dropTarget) {\n return;\n }\n\n const isFullRowTarget =\n targetElementRowType === rowType.fullRow &&\n this.layout[targetElementRow][0].elementType === elementType.addNew;\n if (\n (targetElementRowType !== rowType.thirdRow ||\n this.layout[targetElementRow].length >= 3) &&\n (targetElementRowType !== rowType.halfRow ||\n this.layout[targetElementRow].length >= 2) &&\n !isFullRowTarget\n ) {\n return;\n }\n\n if (!this.currentDraggedElement) {\n return;\n }\n\n const removeElements = isFullRowTarget ? 1 : 0;\n const targetColumn = targetElement\n ? targetElementColumn\n : this.layout[targetElementRow].length;\n const tempElement = {\n rowType: targetElementRowType,\n configuration: this.currentDraggedElement.element.configuration,\n elementType: elementType.dropTarget,\n };\n this.layout[targetElementRow].splice(\n targetColumn,\n removeElements,\n tempElement,\n );\n this.validTarget = true;\n event.preventDefault();\n this.requestUpdate();\n }\n\n switchTarget(event, dragArea: DragAreas) {\n if (!this.currentDraggedElement) {\n return;\n }\n\n this.removeOldElement();\n\n const targetDomElement = getFirstLayoutElement(event.composedPath());\n\n const targetElementRow = targetDomElement['data-row'];\n\n if (dragArea === DragAreas.Lower) {\n this.newRowAfter = targetElementRow;\n this.validTarget = true;\n event.preventDefault();\n this.requestUpdate();\n } else if (dragArea === DragAreas.Upper && targetElementRow > 0) {\n this.newRowAfter = targetElementRow - 1;\n this.validTarget = true;\n event.preventDefault();\n this.requestUpdate();\n } else {\n this.switchTargetToExistingRow(event, targetDomElement, targetElementRow);\n }\n }\n\n elementDragOver(event) {\n const currentDragArea = getAreaOfDrag(event);\n\n if (currentDragArea !== this.lastDragArea) {\n this.switchTarget(event, currentDragArea);\n } else {\n event.preventDefault();\n }\n\n this.lastDragArea = currentDragArea;\n }\n\n elementDrop() {\n if (this.validTarget) {\n this.succesfullyDropped = true;\n }\n }\n\n removeOldElement() {\n this.newRowAfter = undefined;\n this.restoreCache();\n if (this.currentDraggedElement) {\n const { row } = this.currentDraggedElement;\n const { column } = this.currentDraggedElement;\n const elementRowType = this.currentDraggedElement.element.rowType;\n this.removeItem(row, column, elementRowType);\n this.requestUpdate();\n }\n this.validTarget = false;\n }\n\n elementDragEnd() {\n if (this.newRowAfter !== undefined) {\n this.newRowDragEnd();\n }\n if (!this.succesfullyDropped) {\n this.restoreCache();\n this.requestUpdate();\n } else {\n this.removeEmptyRows();\n this.cacheCurrentLayout();\n }\n this.currentDraggedElement = null;\n this.rerenderItems();\n }\n\n newRowDragEnd() {\n if (\n this.succesfullyDropped &&\n this.newRowAfter !== undefined &&\n this.currentDraggedElement\n ) {\n this.currentDraggedElement.element.rowType = rowType.thirdRow;\n this.layout.splice(this.newRowAfter + 1, 0, [\n this.currentDraggedElement.element,\n ]);\n }\n this.newRowAfter = undefined;\n }\n\n restoreCache() {\n this.layout = [];\n\n this.cachedLayout.forEach(rowArray => this.layout.push([...rowArray]));\n }\n\n removeItem(row, column, currentRowType) {\n this.layout[row].splice(column, 1);\n if (this.layout[row].length === 0) {\n this.layout[row].push({\n rowType: currentRowType,\n elementType: elementType.addNew,\n });\n }\n this.requestUpdate();\n }\n\n removeEmptyRows() {\n this.layout.forEach((row, index) => {\n if (row.length === 0 || row[0].elementType === elementType.addNew) {\n this.layout.splice(index, 1);\n }\n });\n }\n\n rerenderItems() {\n const oldLayout = [...this.layout];\n this.layout = [];\n this.performUpdate();\n this.layout = oldLayout;\n }\n\n renderElement(element, rowIndex, columnIndex) {\n return html`\n \n ${renderElementContent(element)}\n ${!this.currentDraggedElement\n ? html`\n
\n this.deleteElement(rowIndex, columnIndex)}\"\n >\n
\n ${(element.rowType === rowType.halfRow && columnIndex === 1) ||\n element.rowType === rowType.fullRow\n ? html`\n
\n this.appendElement(rowIndex)}\"\n >\n
\n `\n : html``}\n `\n : html``}\n \n `;\n }\n\n renderRow(rowArray, rowIndex) {\n return html`\n \n ${rowArray.map((element, index) =>\n this.renderElement(element, rowIndex, index),\n )}\n \n \n ${this.renderFirstNewRowDropTarget(rowIndex)}\n ${renderNewRowDropTarget('+')} ${renderNewRowDropTarget('+')}\n \n `;\n }\n\n renderFirstNewRowDropTarget(rowIndex) {\n const content =\n this.newRowAfter !== undefined && this.newRowAfter === rowIndex\n ? renderElementContent(this.currentDraggedElement?.element)\n : '+';\n return html` ${renderNewRowDropTarget(content)} `;\n }\n\n render() {\n return html`\n
\n ${this.layout.map((rowArray, index) =>\n this.renderRow(patchRow(rowArray), index),\n )}\n
\n `;\n }\n}\n","/* eslint-disable no-return-assign */\nimport { html, css, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { getSearchParam, setSearchParam } from '@kisters/wcp-base/app';\nimport { getQueryObject } from '@kisters/wcp-base/decorators';\nimport '@kisters/wcp-base/components/ki-icon/ki-icon-btn';\nimport '../../components/ki-dynamic-layout/ki-dynamic-layout';\nimport {\n elementType,\n getExampleLayout,\n getLayout,\n rowType,\n saveLayout,\n} from '../../components/ki-dynamic-layout/service/layout-service';\n\n@customElement('ww-dashboard')\nexport default class WwDashboard extends LitElement {\n static styles = css`\n :host {\n display: block;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n }\n .button-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 100%;\n }\n .dashboard-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 20px;\n gap: 20px;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n }\n .dashboard-input-container {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n flex-wrap: wrap;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n }\n .dashboard-text-input {\n height: 50px;\n padding: 13px 8px;\n border: 1px solid #4d446c;\n box-sizing: border-box;\n border-radius: 4px;\n min-width: 100px;\n width: 100%;\n }\n .input-wrapper {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex-wrap: wrap;\n min-width: 100px;\n box-sizing: border-box;\n }\n .input-label {\n margin-bottom: 5px;\n }\n .grow-1 {\n flex-grow: 1;\n }\n .grow-2 {\n flex-grow: 2;\n }\n `;\n\n layout: {\n rowType: rowType;\n elementType?: elementType;\n configuration?: { text: string };\n }[][] = [];\n\n name: string = '';\n\n description: string = '';\n\n static get properties() {\n return {\n layout: { type: Array, attribute: false },\n name: { type: String, attribute: false },\n description: { type: String, attribute: false },\n };\n }\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n async onAfterEnter() {\n const uuidToLoad = getSearchParam('uuid');\n if (uuidToLoad) {\n const loaded = await getLayout(uuidToLoad);\n this.layout = loaded.layout;\n this.name = loaded.name;\n this.description = loaded.description;\n } else {\n this.layout = getExampleLayout();\n this.name = 'Example Layout';\n this.description = 'Example Description';\n }\n }\n\n render() {\n return html`\n
\n
\n
\n Name \n (this.name = e.target.value)}\n />\n
\n
\n Description \n (this.description = e.target.value)}\n />\n
\n
\n \n
\n
\n \n
\n `;\n }\n\n async saveLayout() {\n const newLayout = getQueryObject(this, 'ki-dynamic-layout').layout;\n\n const newUuid = await saveLayout(this.name, this.description, newLayout);\n\n if (newUuid) {\n setSearchParam('uuid', newUuid);\n }\n }\n}\n","/* eslint-disable lit/no-invalid-html */\nimport { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/no-extraneous-dependencies\n\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport '@ui5/webcomponents/dist/Select';\nimport '@ui5/webcomponents/dist/Option';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('ww-pdf-reports')\nexport default class WwPdfReports extends LitElement {\n // language=css\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n height: calc(100% - 30px);\n }\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n .left-panel {\n text-align: center;\n flex: 0;\n }\n .right-panel {\n flex: 1;\n }\n\n ui5-select {\n width: 350px;\n }\n `;\n\n constructor() {\n super();\n this.api = getCurrentApi();\n }\n\n data = [];\n\n @property({ type: String })\n path = '/documents';\n\n @property({ type: String })\n selectedDoc = '';\n\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['content']);\n console.log(params.content);\n // Usually \"documents\" or \"reports\"\n this.path = params.options?.path;\n\n this.fetchData();\n }\n\n _getFullPath(subpath) {\n return new URL(\n `${window.location.protocol}//${window.location.host}${window.location.pathname}${this.api.dataPath}${this.path}/${subpath}`,\n ).href;\n }\n\n async fetchData() {\n const res = await this.api._requestJson(`/${this.path}/index.json`);\n // Filter reports; only allow visible PDF\n this.data = res.data\n .sort((a, b) => new Date(b.lastModified) - new Date(a.lastModified))\n .map(doc => ({ label: doc.name.replace('.pdf', ''), value: doc.name }));\n if (this.data.length) {\n this.selectedDoc = `${this._getFullPath(this.data[0].value)}`;\n }\n }\n\n render() {\n // language=html\n return this.data && this.selectedDoc\n ? html`
\n {\n this.selectedDoc = `${this._getFullPath(\n e.target.selectedOption.value,\n )}`;\n }}\"\n >\n ${this.data.map(\n item =>\n html`${item.label}`,\n )}\n \n
\n
\n \n
`\n : html`
Loading...
`;\n }\n}\n","import { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { Mix } from '@kisters/wcp-base/common';\nimport { queryParamMixin } from '@kisters/wcp-base/decorators';\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport '@ui5/webcomponents/dist/Select';\nimport '@ui5/webcomponents/dist/Option';\nimport { customElement } from 'lit/decorators.js';\nimport { filter } from 'lodash-es';\n\n@customElement('ww-documents')\nexport default class WwDocuments extends Mix(LitElement, [\n queryParamMixin,\n { targetProperty: 'selected', selector: 'selected', defaultValue: '' },\n]) {\n // language=css\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n height: calc(100% - 30px);\n }\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n .left-panel {\n text-align: center;\n flex: 0;\n }\n .right-panel {\n flex: 1;\n }\n\n ui5-select {\n width: 350px;\n }\n\n a {\n font-size: 2em;\n text-align: center;\n display: block;\n margin-top: 20%;\n }\n `;\n\n constructor() {\n super();\n this.api = getCurrentApi();\n this.data = [];\n }\n\n static get properties() {\n return {};\n }\n\n _selected = '';\n\n get selected() {\n return this._selected;\n }\n\n set selected(value) {\n this._selected = value;\n this.requestUpdate();\n }\n\n // Vaadin Router Method that gets called after this component is called\n // eslint-disable-next-line no-unused-vars\n async onAfterEnter(location) {\n const params = getRouteOptionsAndParams(location, ['content']);\n const baseDir = params.options?.directory ?? 'documents';\n this.directory = `${baseDir}/${params.content}`;\n\n this.fetchData();\n }\n\n // Fetch report\n async fetchData() {\n const res = await this.api._requestJson(`/${this.directory}/index.json`);\n this.data = res.data;\n\n // Filter reports; only allow visible PDF\n this.data = filter(\n this.data,\n d => d.mimeType === 'application/pdf',\n ).reverse(); // Newest file on first position\n this._setDocument(this.data[0].name);\n this.requestUpdate();\n }\n\n getUrl(file) {\n return `${this.api.dataPath}/${this.directory}/${file}`;\n }\n\n _setDocument(pdf) {\n const pdfurl = `${this.api.dataPath}/${this.directory}/${pdf}`;\n this.renderRoot.querySelector(\n '#contentframe',\n ).src = `./pdfjs/web/viewer.html?file=${\n new URL(pdfurl, window.location.origin).href\n }`;\n }\n\n _handleChanged(e) {\n this._setDocument(e.target.selectedOption.value);\n }\n\n render() {\n // language=html\n return this.data\n ? html`\n
\n \n ${this.data.map(\n item =>\n html`${item.name.replace('.pdf', '')}`,\n )}\n \n
\n
\n \n
\n `\n : html`
Loading...
`;\n }\n}\n","import { css } from 'lit';\n// language=CSS\nexport default css`\n :host {\n display: flex;\n overflow: auto;\n flex-direction: column;\n padding: 0 170px 0px 175px;\n position: relative;\n background: rgb(232, 232, 234);\n }\n ki-station-map {\n position: absolute;\n top: 30px;\n bottom: 0;\n left: 0;\n right: 0;\n width: initial;\n height: initial;\n }\n\n .top{\n margin: 5px 0;\n z-index:2;\n }\n .top iframe {\n flex: 1;\n }\n .bottom{\n z-index:2;\n flex: 2;\n display: flex;\n padding-bottom: 5px;\n }\n .content {\n background: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid rgb(97, 102, 113);\n }\n .bottom .content.left {\n flex: 2;\n position: relative;\n margin-right: 5px;\n }\n iframe {\n flex: 1;\n border: 0;\n }\n\n .top img {\n\n align-self: center;\n margin: 10px auto;\n }\n\n .titleNode {\n color: #fff;\n font-size: larger;\n background-color: #616671;\n padding-left: 10px;\n }\n\n\n\n .overlay{\n position: absolute;\n z-index: 11;\n top: 30px;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n .leftBorder, .rightBorder {\n background: #e8e8ea;\n height: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 170px;\n }\n\n .leftBorder {\n left: 0;\n width: 175px;\n }\n\n .rightBorder {\n right: 0;\n }\n\n @media only screen and (max-width: 1300px) {\n :host {\n padding: 0 10px;\n background: rgb(232, 232, 234);\n }\n .leftBorder, .rightBorder {\n display: none;\n }\n .bottom .content.left {\n margin-right: 10px;\n }\n div.top img {\n align-self: center;\n margin: 10px auto;\n }\n }\n @media only screen and (max-width: 860px) {\n :host {\n padding: 0 10px;\n background: rgb(232, 232, 234);\n }\n .bottom {\n flex-direction: column;\n }\n .bottom .content{\n margin-top:10px;\n display: block;\n }\n .bottom .content.left {\n margin-right: 0;\n min-height: 250pt;\n }\n div.top img {\n align-self: center;\n margin: auto;\n margin-bottom: 10px;\n }\n }\n :host(.sm-screen) .top .content{\n max-height: calc(100vh - 180px);\n \n }\n :host(.sm-screen) .top .content {\n overflow: auto;\n }\n`;\n","import { html } from 'lit';\n\nimport { customElement } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { Mix } from '@kisters/wcp-base/common';\nimport { WwpOverview } from '@kisters/wiski-web/views';\nimport LegendFactory from '@kisters/wcp-water/components/ki-station-map/LegendFactory';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport style from './wwp-hdoe-start.css';\n\n@customElement('wwp-hdoe-start')\nclass WwpHdoeStart extends Mix(WwpOverview) {\n static styles = [WwpOverview.styles, style];\n\n startLayers = [\n {\n type: 'topojson',\n url: './maps/abdeckung.json',\n crs: 'EPSG:3857',\n label: 'Länder nah',\n zIndex: 29,\n selectable: false,\n visible: true,\n group: 'Layers',\n style: {\n stroke: {\n color: 'rgba(255, 255, 255, 1)',\n },\n fill: {\n color: 'rgba(255, 255, 255, 1)',\n },\n },\n },\n {\n type: 'GeoJSON',\n url: './maps/ooe.json',\n crs: 'EPSG:3857',\n label: 'ooe abdeckung',\n zIndex: 30,\n selectable: false,\n visible: true,\n group: 'Layers',\n style: {\n stroke: {\n color: 'rgba(29, 29, 29, 3)',\n },\n fill: {\n color: 'rgba(255, 255, 255, 0)',\n },\n },\n },\n {\n type: 'GeoJSON',\n url: './maps/seen.json',\n crs: 'EPSG:3857',\n label: 'Seen',\n visible: true,\n group: 'Layers',\n selectable: false,\n zIndex: 28,\n style: {\n stroke: {\n color: 'rgba(0, 77, 168, 1)',\n width: 1,\n },\n fill: {\n color: 'rgba(0, 112, 255, 1)',\n },\n },\n },\n {\n type: 'topojson',\n url: './maps/ezgs.json',\n crs: 'EPSG:3857',\n label: 'Einzugsgebiete',\n group: 'Layers',\n visible: true,\n opacity: 1,\n zIndex: 20,\n selectable: false,\n styleProperty: 'REGION',\n style: {\n Donau: {\n stroke: {\n color: 'rgba(110, 110, 110, 1.0)',\n width: 1,\n },\n fill: {\n color: 'rgba(254,190,190, 1)',\n },\n },\n Elbe: {\n stroke: {\n color: 'rgba(110, 110, 110, 1)',\n width: 1,\n },\n fill: {\n color: 'rgba(204, 204, 204, 1)',\n },\n },\n Enns: {\n stroke: {\n color: 'rgba(110, 110, 110, 1)',\n width: 1,\n },\n fill: {\n color: 'rgba(254, 232, 190, 1)',\n },\n },\n Inn: {\n stroke: {\n color: 'rgba(110, 110, 110, 1)',\n width: 1,\n },\n fill: {\n color: 'rgba(231, 254, 184, 1)',\n },\n },\n Traun: {\n stroke: {\n color: 'rgba(110, 110, 110, 1)',\n width: 1,\n },\n fill: {\n color: 'rgba(115, 178, 255, 1)',\n },\n },\n },\n },\n {\n type: 'GeoJSON',\n url: './maps/gew_grob.json',\n crs: 'EPSG:3857',\n label: 'Gewässer sehr grob',\n group: 'Layers',\n visible: true,\n selectable: false,\n styleProperty: 'SYMBOL',\n zIndex: 31,\n style: {\n '1': {\n stroke: {\n color: 'rgba(0, 77, 168, 1.0)',\n width: 4,\n },\n },\n '2': {\n stroke: {\n color: 'rgba(0, 92, 230, 1.0)',\n width: 3,\n },\n },\n '3': {\n stroke: {\n color: 'rgba(0, 112, 255, 1.0)',\n width: 1.5,\n },\n },\n '4': {\n stroke: {\n color: 'rgba(0, 169, 230, 1.0)',\n width: 1,\n },\n },\n },\n },\n ];\n\n api = getCurrentApi();\n\n // eslint-disable-next-line class-methods-use-this\n getDocHeight(doc) {\n doc = doc || document;\n const __body = doc.body;\n const __html = doc.documentElement;\n const height = Math.max(\n __body.scrollHeight,\n __body.offsetHeight,\n __html.clientHeight,\n __html.scrollHeight,\n __html.offsetHeight,\n );\n return height;\n }\n\n setIframeHeight(e) {\n const ifrm = e.target;\n if (ifrm) {\n let doc;\n if (ifrm.contentDocument) {\n doc = ifrm.contentDocument;\n } else {\n doc = ifrm.contentWindow ? ifrm.contentWindow.document : null;\n }\n if (doc) {\n ifrm.style.visibility = 'hidden';\n ifrm.style.height = '10px'; // reset to minimal height ...\n // IE opt. for bing/msn needs a bit added or scrollbar appears\n ifrm.style.height = `${this.getDocHeight(doc) + 4}px`;\n ifrm.style.minHeight = `${this.getDocHeight(doc) + 4}px`;\n\n ifrm.style.visibility = 'visible';\n }\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n get viewStart() {\n const zoom = this.classList.contains('sm-screen') ? 7 : 8;\n return {\n projection: 'EPSG:3857',\n center: [1537773, 6117425],\n maxZoom: zoom,\n minZoom: zoom,\n zoom,\n extent: [983646.5, 5836117.8, 2007460.6, 6299120.7],\n };\n }\n\n firstUpdated() {\n setTimeout(() => {\n // this.shadowRoot.getElementById(\"map\").resize()\n }, 1000);\n }\n\n connectedCallback() {\n if (super.connectedCallback) super.connectedCallback();\n let resize;\n this.lagebericht = fetch(\n `${\n this.api.dataPath\n }/html/Lagebericht.html?cachebust=${new Date().getTime()}`,\n ).then(r => r.text().then(t => unsafeHTML(t)));\n\n this.aktuelles = fetch(\n `${\n this.api.dataPath\n }/html/Aktuelles.html?cachebust=${new Date().getTime()}`,\n ).then(r => r.text().then(t => unsafeHTML(t)));\n this.iframeResize = window.addEventListener('resize', () => {\n window.clearTimeout(resize);\n resize = setTimeout(() => {\n this.setIframeHeight({\n target: this.renderRoot.getElementById('lagebericht'),\n });\n this.setIframeHeight({\n target: this.renderRoot.getElementById('aktuelles'),\n });\n }, 220);\n });\n }\n\n _getMaxHeight() {\n if (this.classList.contains('sm-screen')) {\n return `${this.renderRoot.host.clientHeight - 40}px`;\n }\n return 'inital';\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) super.disconnectedCallback();\n window.removeEventListener('resize', this.iframeResize);\n }\n\n // Define the element's template\n render() {\n if (this.currentLayer !== this.layerName) {\n this.getDataLayer();\n }\n return (\n this._renderLoader() ||\n html`\n
\n
\n
\n
Lagebericht
\n
\n
${until(\n this.lagebericht,\n html`Lade...`,\n )}
\n \"ZAMG\n
\n
\n
\n
\n
\n
Aktueller Wasserstand
\n
\n \n \n \n \n \n
\n
\n
Aktuelles
\n
${until(this.aktuelles, html`Lade...`)}
\n
\n
\n \n
\n`\n );\n }\n\n get legendFactory() {\n const copy = { ...this._dataLayer.config.classification };\n if (copy && copy.default && copy.default.marker) {\n copy.default.marker.radius = 10;\n }\n return new LegendFactory(copy);\n }\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable lit/no-invalid-html */\nimport { html, css, LitElement } from 'lit';\n// eslint-disable-next-line import/no-extraneous-dependencies\n\nimport { getRouteOptionsAndParams } from '@kisters/wcp-base/components';\nimport { getCurrentApi } from '@kisters/wiski-web/api';\nimport '@ui5/webcomponents/dist/Select';\nimport '@ui5/webcomponents/dist/Option';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('ww-hdoe-hydrochar')\nexport default class wwHdoeHydrochar extends LitElement {\n // language=css\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n height: calc(100% - 30px);\n }\n iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n .left-panel {\n text-align: center;\n flex: 0;\n }\n .right-panel {\n flex: 1;\n }\n\n .msg {\n margin: auto;\n }\n\n ui5-select {\n width: 300px;\n }\n `;\n\n months = [\n 'Jahrescharakteristik',\n 'Jänner',\n 'Februar',\n 'März',\n 'April',\n 'Mai',\n 'Juni',\n 'Juli',\n 'August',\n 'September',\n 'Oktober',\n 'November',\n 'Dezember',\n ];\n\n api = getCurrentApi();\n\n docs: Array = [];\n\n @property({ type: String })\n path = '/documents';\n\n loading = true;\n\n selectedYear = '';\n\n @property({ type: String })\n selectedDoc = '';\n\n async onAfterEnter() {\n this.fetchData();\n }\n\n _getFullPath(file) {\n const folder =\n file.length === 4 ? 'charakteristikJahr' : 'CharakteristikMonat';\n return new URL(\n `${window.location.protocol}//${window.location.host}${window.location.pathname}${this.api.dataPath}${this.path}/${folder}/${file}.pdf`,\n ).href;\n }\n\n async fetchData() {\n const year = await this.api._requestJson(\n `${this.path}/charakteristikJahr/index.json`,\n );\n const month = await this.api._requestJson(\n `${this.path}/CharakteristikMonat/index.json`,\n );\n this.loading = false;\n const yearDocs = year?.data?.map(item => item.name.substring(0, 4)) || [];\n const monthDocs = month?.data?.map(item => item.name.substring(0, 7)) || [];\n this.docs = yearDocs.concat(monthDocs).sort().reverse();\n this.selectedDoc = this.docs.length\n ? this._getFullPath(monthDocs[monthDocs.length - 1])\n : 'leer';\n }\n\n getMonthName(chr) {\n const month = chr.substring(5, 7) ? parseInt(chr.substring(5, 7), 10) : 0;\n return `${chr.substring(0, 4)} ${this.months[month]}`;\n }\n\n render() {\n // language=html\n if (this.loading) {\n return html`
Berichte werden geladen...
`;\n }\n return this.docs.length\n ? html`
\n {\n this.selectedDoc = `${this._getFullPath(\n e.target.selectedOption.value,\n )}`;\n }}\"\n >\n ${this.docs.map(\n item =>\n html`${this.getMonthName(item)}`,\n )}\n \n\n Archivdaten\n
\n
\n \n
`\n : html`
Aktuell sind keine Berichte vorhanden
`;\n }\n}\n","/* eslint-disable no-template-curly-in-string */\n/* eslint-disable no-nested-ternary */\nimport { html, css, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { initConfig, getRoutes } from '@kisters/wcp-base/app';\nimport { LoaderMixin } from '@kisters/wcp-base/common';\nimport { init } from '@kisters/wiski-web/api';\n\nimport '@kisters/wiski-web/components/ki-wwp-graph/ki-wwp-graph-ext';\nimport '@kisters/wiski-web/components/ki-wwp-graph/ki-wwp-graph-precip-ext';\nimport '@kisters/wiski-web/views/ww-report/ww-report';\n\n// Import common components here\nimport '@kisters/ww-hdoe-common/components/ww-sample-component';\n\nimport importActions from './import-actions/import-actions';\nimport './components/ki-station-info-hdoe';\nimport './components/wwp-station-download-hdoe';\nimport './components/wwp-hdoe-kennzahlen';\nimport './components/wwp-hdoe-querprofil';\nimport './components/wwp-hdoe-hochwasserbericht';\nimport './components/wwp-hdoe-bericht-wasserstand';\nimport './components/wwp-hdoe-start';\nimport './components/ww-hdoe-hydrochar';\n\n// TODO use lib without compile might be better.\n// can consider all ki-wcp project with build version instead import source and recompile it\n\n@customElement('ww-app-index')\nexport default class wwAppIndex extends LoaderMixin(LitElement) {\n static styles = css`\n :host {\n height: 100%;\n width: 100%;\n }\n `;\n\n constructor() {\n super();\n this.configLoaded = false;\n this.configLocation = './config/app.json';\n }\n\n render() {\n if (!this.configLoaded) {\n return this._renderLoader();\n }\n // language=html\n return html` `;\n }\n\n firstUpdated() {\n this.promiseLoader(\n initConfig(this.configLocation, importActions).then(config => {\n init({ dataPath: config.apiPath });\n this._config = config;\n this.configLoaded = true;\n }),\n );\n }\n}\n"],"file":"assets/main.f177638a.js"}