From 3f21c09e79018f55c8ee93ebbd10568df75b88c9 Mon Sep 17 00:00:00 2001 From: antoniave Date: Wed, 4 Dec 2024 14:43:52 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20preview=20for=20PR=20355=20?= =?UTF-8?q?=F0=9F=9B=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pr-355/assets/{B54buj5MMZhs.js => BdVObcUBxMFJ.js} | 2 +- .../pr-355/assets/{D6N1XV4yWCDw.js => BjoO2CDCNgNx.js} | 2 +- .../pr-355/assets/{tOtqIq0vqwRj.js => BsgfV0Dzj2CU.js} | 2 +- .../pr-355/assets/{BkOP4yx1U5l-.js => CDAAkDxRqy1k.js} | 2 +- .../pr-355/assets/{B2mU5pjSe5Bt.js => CWjri1ru9tw2.js} | 2 +- .../pr-355/assets/{HtWnt4Af3rFB.js => CsoHcLCCE1Em.js} | 2 +- .../pr-355/assets/{B2JeDJc3u--N.js => H7VhUBOXt34K.js} | 2 +- .../pr-355/assets/{CGddQzaLUNKL.js => HTd2VoWp6VZs.js} | 2 +- .../pr-previews/pr-355/samples/experimental-sidebar/index.html | 2 +- .../pr-previews/pr-355/samples/map-sample/index.html | 2 +- .../pr-previews/pr-355/samples/ogc-api-sample/index.html | 2 +- .../pr-previews/pr-355/samples/showcase/index.html | 2 +- .../pr-previews/pr-355/samples/test-basemap-switcher/index.html | 2 +- .../pr-355/samples/test-highlight-and-zoom/index.html | 2 +- .../pr-previews/pr-355/samples/test-result-list/index.html | 2 +- .../pr-previews/pr-355/samples/test-toc/index.html | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) rename openlayers-base-packages/pr-previews/pr-355/assets/{B54buj5MMZhs.js => BdVObcUBxMFJ.js} (91%) rename openlayers-base-packages/pr-previews/pr-355/assets/{D6N1XV4yWCDw.js => BjoO2CDCNgNx.js} (90%) rename openlayers-base-packages/pr-previews/pr-355/assets/{tOtqIq0vqwRj.js => BsgfV0Dzj2CU.js} (98%) rename openlayers-base-packages/pr-previews/pr-355/assets/{BkOP4yx1U5l-.js => CDAAkDxRqy1k.js} (88%) rename openlayers-base-packages/pr-previews/pr-355/assets/{B2mU5pjSe5Bt.js => CWjri1ru9tw2.js} (93%) rename openlayers-base-packages/pr-previews/pr-355/assets/{HtWnt4Af3rFB.js => CsoHcLCCE1Em.js} (96%) rename openlayers-base-packages/pr-previews/pr-355/assets/{B2JeDJc3u--N.js => H7VhUBOXt34K.js} (92%) rename openlayers-base-packages/pr-previews/pr-355/assets/{CGddQzaLUNKL.js => HTd2VoWp6VZs.js} (87%) diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/B54buj5MMZhs.js b/openlayers-base-packages/pr-previews/pr-355/assets/BdVObcUBxMFJ.js similarity index 91% rename from openlayers-base-packages/pr-previews/pr-355/assets/B54buj5MMZhs.js rename to openlayers-base-packages/pr-previews/pr-355/assets/BdVObcUBxMFJ.js index 37f6714..9b836c0 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/B54buj5MMZhs.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/BdVObcUBxMFJ.js @@ -1 +1 @@ -import{a as E,r as n,j as e,B as s,F,n as U,l as A,e as D}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as B,T as V,O as q,M as W,H as $,i as y,e as X,B as N,f as Y,j as Z,k as j}from"./B36mctiVgF5V.js";import{_ as S}from"./CmsKOCeNyeyo.js";import{C as J}from"./DfjlrXSmDfH9.js";import{a as z,b as u,R as K}from"./K_sKz2BiM23b.js";import{S as L,T as g,V as Q,U as ee,a as p}from"./CovJx79h1x39.js";import{M as oe}from"./C41Ku2EWcQEd.js";import{a as re,b as te,M as c}from"./DgJGd2MHfhXI.js";import{F as C}from"./0jkoYKtubXoE.js";import{F as I}from"./DAtS2L2h2gmX.js";import{C as ie}from"./DXNMkmWkGPwJ.js";import"./SSUBJAaBGB7g.js";import"./E5Cg9XwqIVqj.js";const G="main";class le{mapId=G;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new B({title:"OSM",isBaseLayer:!0,olLayer:new V({source:new q})})]}}}const ne={"result-list-app":{name:"result-list-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:W,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:$,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ae=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',se=["en","de"];function pe(o){switch(o){case"en":return S(()=>import("./CWewJjE-xeCE.js"),[],import.meta.url).then(i=>i.default);case"de":return S(()=>import("./BbSw8Fldfnox.js"),[],import.meta.url).then(i=>i.default)}throw new Error(`Unsupported locale: '${o}'`)}const ce=E(ae),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:se,packages:ne,styles:ce},Symbol.toStringTag,{value:"Module"})),M=400;function ue(){const[o,i]=n.useState(0),[r,x]=n.useState(),[T,m]=n.useState(!1),[d,R]=n.useState(!1),[h,_]=n.useState("multi"),[v,f]=n.useState("checkbox"),w=!!r&&T,a=l=>{x(l),m(!0),i(o+1)},k=n.useMemo(()=>{if(!r||!d)return r;const l=r.columns.filter((b,P)=>P%2==1);return{...r,columns:l}},[d,r]);return e.jsx(y,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(X,{title:e.jsx(N,{textAlign:"center",py:1,children:e.jsx(Y,{size:"md",children:"OpenLayers Base Packages - Result List"})}),children:e.jsxs(y,{flex:"1",direction:"column",position:"relative",children:[e.jsxs(Z,{mapId:G,viewPadding:{bottom:w?M:0},children:[e.jsx(j,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(N,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(L,{children:[e.jsx(g,{align:"center",children:"Test Controls:"}),e.jsxs(oe,{placement:"right-end",children:[e.jsx(re,{as:s,rightIcon:e.jsx(J,{}),children:"Fill result list"}),e.jsx(F,{children:e.jsxs(te,{children:[e.jsx(c,{onClick:()=>a(he),children:"Persons"}),e.jsx(c,{onClick:()=>a(Ne),children:"Custom render"}),e.jsx(c,{onClick:()=>a(be),children:"Generated"}),e.jsx(c,{onClick:()=>a(ge),children:"Long Strings"}),e.jsx(c,{onClick:()=>a(Oe),children:"Many Columns"})]})})]}),e.jsxs(s,{onClick:()=>R(!d),children:[d?"Show":"Hide"," even columns"]}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>m(!0),children:"Show result list"}),e.jsx(s,{onClick:()=>m(!1),children:"Hide result list"}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>x(void 0),children:"Close result list"}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection mode"}),e.jsx(z,{value:h,onChange:l=>{const b=l;_(b),f(b==="single"?"radio":"checkbox")},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"single",children:"Single"}),e.jsx(u,{value:"multi",children:"Multi"})]})})]}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection style"}),e.jsx(z,{value:v,onChange:l=>{f(l)},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"radio",isDisabled:h==="multi",children:"Radio"}),e.jsx(u,{value:"checkbox",children:"Checkbox"})]})})]})]})})}),e.jsx(j,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(Q,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(g,{as:"b",children:"Description"}),e.jsx(g,{children:"This application can be used to test the result list component. Internally, this application keeps track of the current result list input and displays it when the component shall be shown."}),e.jsxs(ee,{children:[e.jsx(p,{children:"If the result list has been filled, it can be hidden and shown again while preserving the state (selection, sort, scroll, ...)."}),e.jsx(p,{children:"The result list is embedded with a fixed height (with internal scrolling) above the map (using view padding). Showing or hiding the component will animate the view."}),e.jsx(p,{children:"Toggling columns will preserve the state of the result list."}),e.jsx(p,{children:"Filling the result list again resets the state (even when using equal data)."}),e.jsx(p,{children:"Fully closing the result list drops all state."})]})]})})]}),k&&e.jsx(N,{position:"absolute",visibility:w?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:`${M}px`,borderTop:"2px solid",borderColor:"trails.500",zIndex:1,children:e.jsx(K,{mapId:G,input:k,selectionMode:h,selectionStyle:v},String(o))})]})})})}let me=1;function t(o,i,r){return{id:String(me++),properties:{name:o,age:i,city:r}}}const he={data:[t("Test User A",21,"Cologne"),t("Test User B",33,"Berlin"),t("Test User C",44,"New York"),t("Test User D",55,"London"),t("Test User E",8,"Rome"),t("Test User F",14,"Vienna"),t("Test User G",17,"Paris"),t("Test User H",27,"Brussels"),t("Test User I",19,"Warsaw")],columns:[{displayName:"id",getPropertyValue(o){return o.id}},{propertyName:"name"},{propertyName:"age"},{propertyName:"city"}]},be={data:Array.from(Array(100).keys()).map(o=>({id:o,properties:{boolean:o%2==0,empty:o%2==0?null:void 0,number:o,float:o/7,string:`Item ${o}`,date:new Date}})),columns:[{propertyName:"boolean"},{propertyName:"number"},{propertyName:"float"},{propertyName:"string"},{propertyName:"date"},{propertyName:"empty"}],formatOptions:{numberOptions:{maximumFractionDigits:2},dateOptions:{timeStyle:"full",dateStyle:"full",timeZone:"UTC"}}},Ne={data:[{id:1,properties:{bool:!0}},{id:2,properties:{bool:!1}},{id:3,properties:{bool:void 0}}],columns:[{displayName:"id (with tooltip)",getPropertyValue(o){return o.id},renderCell({feature:o}){return e.jsx(Le,{id:o.id})}},{displayName:"boolean as checkbox (read only)",propertyName:"bool",renderCell({value:o}){return e.jsx(ie,{isIndeterminate:o===void 0,isChecked:!!o})}}]};function Le(o){return e.jsx(U,{label:`tooltip for feature ${o.id}`,placement:"top",children:e.jsx(A.span,{children:o.id})})}const ge={data:[{id:1,properties:{short:"Short 1",long:"LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG "}},{id:2,properties:{short:"Short 2",long:"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG"}}],columns:[{propertyName:"short"},{propertyName:"long",width:300}]},Oe={columns:[{propertyName:"a"},{propertyName:"b"},{propertyName:"c"},{propertyName:"d"},{propertyName:"e"},{propertyName:"f"},{propertyName:"g"},{propertyName:"h"},{propertyName:"i"}],data:[{id:0,properties:{a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1}}]},Ge=new URLSearchParams(window.location.search),O=Ge.get("lang"),xe=D({component:ue,theme:H,appMetadata:de,config:{locale:O==="de"||O==="en"?O:void 0}});customElements.define("result-list-app",xe); +import{a as E,r as n,j as e,B as s,F,n as U,l as A,e as D}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as B,T as V,O as q,M as W,H as $,i as y,e as X,B as N,f as Y,j as Z,k as j}from"./B36mctiVgF5V.js";import{_ as S}from"./CmsKOCeNyeyo.js";import{C as J}from"./DfjlrXSmDfH9.js";import{a as z,b as u,R as K}from"./K_sKz2BiM23b.js";import{S as L,T as g,V as Q,U as ee,a as p}from"./CovJx79h1x39.js";import{M as oe}from"./C41Ku2EWcQEd.js";import{a as re,b as te,M as c}from"./DgJGd2MHfhXI.js";import{F as C}from"./0jkoYKtubXoE.js";import{F as I}from"./DAtS2L2h2gmX.js";import{C as ie}from"./DXNMkmWkGPwJ.js";import"./SSUBJAaBGB7g.js";import"./E5Cg9XwqIVqj.js";const G="main";class le{mapId=G;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new B({title:"OSM",isBaseLayer:!0,olLayer:new V({source:new q})})]}}}const ne={"result-list-app":{name:"result-list-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:le,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:W,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:$,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ae=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',se=["en","de"];function pe(o){switch(o){case"en":return S(()=>import("./CWewJjE-xeCE.js"),[],import.meta.url).then(i=>i.default);case"de":return S(()=>import("./BbSw8Fldfnox.js"),[],import.meta.url).then(i=>i.default)}throw new Error(`Unsupported locale: '${o}'`)}const ce=E(ae),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:pe,locales:se,packages:ne,styles:ce},Symbol.toStringTag,{value:"Module"})),M=400;function ue(){const[o,i]=n.useState(0),[r,x]=n.useState(),[T,m]=n.useState(!1),[d,R]=n.useState(!1),[h,_]=n.useState("multi"),[v,f]=n.useState("checkbox"),w=!!r&&T,a=l=>{x(l),m(!0),i(o+1)},k=n.useMemo(()=>{if(!r||!d)return r;const l=r.columns.filter((b,P)=>P%2==1);return{...r,columns:l}},[d,r]);return e.jsx(y,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(X,{title:e.jsx(N,{textAlign:"center",py:1,children:e.jsx(Y,{size:"md",children:"OpenLayers Base Packages - Result List"})}),children:e.jsxs(y,{flex:"1",direction:"column",position:"relative",children:[e.jsxs(Z,{mapId:G,viewPadding:{bottom:w?M:0},children:[e.jsx(j,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(N,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:e.jsxs(L,{children:[e.jsx(g,{align:"center",children:"Test Controls:"}),e.jsxs(oe,{placement:"right-end",children:[e.jsx(re,{as:s,rightIcon:e.jsx(J,{}),children:"Fill result list"}),e.jsx(F,{children:e.jsxs(te,{children:[e.jsx(c,{onClick:()=>a(he),children:"Persons"}),e.jsx(c,{onClick:()=>a(Ne),children:"Custom render"}),e.jsx(c,{onClick:()=>a(be),children:"Generated"}),e.jsx(c,{onClick:()=>a(ge),children:"Long Strings"}),e.jsx(c,{onClick:()=>a(Oe),children:"Many Columns"})]})})]}),e.jsxs(s,{onClick:()=>R(!d),children:[d?"Show":"Hide"," even columns"]}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>m(!0),children:"Show result list"}),e.jsx(s,{onClick:()=>m(!1),children:"Hide result list"}),e.jsx(s,{isDisabled:r===void 0,onClick:()=>x(void 0),children:"Close result list"}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection mode"}),e.jsx(z,{value:h,onChange:l=>{const b=l;_(b),f(b==="single"?"radio":"checkbox")},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"single",children:"Single"}),e.jsx(u,{value:"multi",children:"Multi"})]})})]}),e.jsxs(C,{children:[e.jsx(I,{children:"Selection style"}),e.jsx(z,{value:v,onChange:l=>{f(l)},children:e.jsxs(L,{direction:"row",children:[e.jsx(u,{value:"radio",isDisabled:h==="multi",children:"Radio"}),e.jsx(u,{value:"checkbox",children:"Checkbox"})]})})]})]})})}),e.jsx(j,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(Q,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",maxHeight:"300px",overflow:"auto",children:[e.jsx(g,{as:"b",children:"Description"}),e.jsx(g,{children:"This application can be used to test the result list component. Internally, this application keeps track of the current result list input and displays it when the component shall be shown."}),e.jsxs(ee,{children:[e.jsx(p,{children:"If the result list has been filled, it can be hidden and shown again while preserving the state (selection, sort, scroll, ...)."}),e.jsx(p,{children:"The result list is embedded with a fixed height (with internal scrolling) above the map (using view padding). Showing or hiding the component will animate the view."}),e.jsx(p,{children:"Toggling columns will preserve the state of the result list."}),e.jsx(p,{children:"Filling the result list again resets the state (even when using equal data)."}),e.jsx(p,{children:"Fully closing the result list drops all state."})]})]})})]}),k&&e.jsx(N,{position:"absolute",visibility:w?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:`${M}px`,borderTop:"2px solid",borderColor:"trails.500",zIndex:1,children:e.jsx(K,{mapId:G,input:k,selectionMode:h,selectionStyle:v},String(o))})]})})})}let me=1;function t(o,i,r){return{id:String(me++),properties:{name:o,age:i,city:r}}}const he={data:[t("Test User A",21,"Cologne"),t("Test User B",33,"Berlin"),t("Test User C",44,"New York"),t("Test User D",55,"London"),t("Test User E",8,"Rome"),t("Test User F",14,"Vienna"),t("Test User G",17,"Paris"),t("Test User H",27,"Brussels"),t("Test User I",19,"Warsaw")],columns:[{displayName:"id",getPropertyValue(o){return o.id}},{propertyName:"name"},{propertyName:"age"},{propertyName:"city"}]},be={data:Array.from(Array(100).keys()).map(o=>({id:o,properties:{boolean:o%2==0,empty:o%2==0?null:void 0,number:o,float:o/7,string:`Item ${o}`,date:new Date}})),columns:[{propertyName:"boolean"},{propertyName:"number"},{propertyName:"float"},{propertyName:"string"},{propertyName:"date"},{propertyName:"empty"}],formatOptions:{numberOptions:{maximumFractionDigits:2},dateOptions:{timeStyle:"full",dateStyle:"full",timeZone:"UTC"}}},Ne={data:[{id:1,properties:{bool:!0}},{id:2,properties:{bool:!1}},{id:3,properties:{bool:void 0}}],columns:[{displayName:"id (with tooltip)",getPropertyValue(o){return o.id},renderCell({feature:o}){return e.jsx(Le,{id:o.id})}},{displayName:"boolean as checkbox (read only)",propertyName:"bool",renderCell({value:o}){return e.jsx(ie,{isIndeterminate:o===void 0,isChecked:!!o})}}]};function Le(o){return e.jsx(U,{label:`tooltip for feature ${o.id}`,placement:"top",children:e.jsx(A.span,{children:o.id})})}const ge={data:[{id:1,properties:{short:"Short 1",long:"LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG LONG "}},{id:2,properties:{short:"Short 2",long:"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG"}}],columns:[{propertyName:"short"},{propertyName:"long",width:300}]},Oe={columns:[{propertyName:"a"},{propertyName:"b"},{propertyName:"c"},{propertyName:"d"},{propertyName:"e"},{propertyName:"f"},{propertyName:"g"},{propertyName:"h"},{propertyName:"i"}],data:[{id:0,properties:{a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1}}]},Ge=new URLSearchParams(window.location.search),O=Ge.get("lang"),xe=D({component:ue,theme:H,appMetadata:de,config:{locale:O==="de"||O==="en"?O:void 0}});customElements.define("result-list-app",xe); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/D6N1XV4yWCDw.js b/openlayers-base-packages/pr-previews/pr-355/assets/BjoO2CDCNgNx.js similarity index 90% rename from openlayers-base-packages/pr-previews/pr-355/assets/D6N1XV4yWCDw.js rename to openlayers-base-packages/pr-previews/pr-355/assets/BjoO2CDCNgNx.js index c9ce576..bc6de73 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/D6N1XV4yWCDw.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/BjoO2CDCNgNx.js @@ -1 +1 @@ -import{a as y,r as m,j as o,e as z}from"./CzUo6bX8-UUU.js";import{S as a,T as f,O as _,bM as T,bN as M,b as w,a as x,M as L,H as P,u as I,i as s,e as b,B as p,f as g,j as D,k as c}from"./B36mctiVgF5V.js";import{W as S,b as j}from"./kPJ9UZ8lVIau.js";import{G as k,e as C,T as R}from"./C1o_VwAkx5Nm.js";import{_ as h}from"./CmsKOCeNyeyo.js";import{V as A,T as v}from"./CovJx79h1x39.js";import"./CkG3hRXjrvfc.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./_05fvbTuDT_t.js";import"./E5Cg9XwqIVqj.js";import"./0jkoYKtubXoE.js";import"./C41Ku2EWcQEd.js";import"./BSX9fy8BsUsv.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const d="main";class E{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},projection:"EPSG:25832",layers:[new a({id:"topplus_open",title:"TopPlus Open",isBaseLayer:!0,visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_openERROR/1.0.0/WMTSCapabilities.xml",olLayer:u("web")}),new a({id:"topplus_open_grau",title:"TopPlus Open (Grau)",isBaseLayer:!0,visible:!1,healthCheck:async()=>{function t(r){return new Promise(n=>setTimeout(n,r))}return await t(2e3),"error"},olLayer:u("web_grau")}),new a({id:"topplus_open_light",title:"TopPlus Open (Light)",isBaseLayer:!0,visible:!1,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:u("web_light")}),new a({title:"OSM",visible:!1,isBaseLayer:!0,olLayer:new f({source:new _})}),new a({title:"Haltestellen Stadt Rostock",visible:!0,description:"Haltestellen des öffentlichen Personenverkehrs in der Hanse- und Universitätsstadt Rostock.",olLayer:O()}),new a({title:"Kindertagesstätten",visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:G()}),W(),q()]}}}function u(e){const t=[-380316598427299e-8,880590808284866e-8],r=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],n=new Array(r.length);for(let l=0;lDatenquellen`});return new f({source:i})}function O(){const e=new w({url:"https://geo.sv.rostock.de/download/opendata/haltestellen/haltestellen.json",format:new k,attributions:"Haltestellen Stadt Rostock, Creative Commons CC Zero License (cc-zero)"});return new x({source:e})}function G(){const e=new w({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new k,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'});return new x({source:e})}function W(){return new S({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,healthCheck:async()=>{function e(t){return new Promise(r=>setTimeout(r,t))}return await e(3e3),"error"},url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW"}],sourceOptions:{ratio:1}})}function q(){return new S({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",sublayers:[{name:"1",title:"Verwaltungen"},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}const H={"toc-map":{name:"toc-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:E,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:L,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},B=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',N=["en","de"];function U(e){switch(e){case"en":return h(()=>import("./Clif7aTs2LHR.js"),[],import.meta.url).then(t=>t.default);case"de":return h(()=>import("./Cx-LAL-6-WEp.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const V=y(B),F=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:U,locales:N,packages:H,styles:V},Symbol.toStringTag,{value:"Module"})),K="toc-map",$=I.bind(void 0,K);function J(){const e=$(),t=m.useId(),[r,n]=m.useState(!0);function i(){n(!r)}return o.jsx(s,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(b,{title:o.jsx(p,{role:"region","aria-label":e.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:o.jsx(g,{size:"md",children:"OpenLayers Base Packages - TOC and Health Check Sample"})}),children:o.jsx(s,{flex:"1",direction:"column",children:o.jsxs(D,{mapId:d,role:"main","aria-label":e.formatMessage({id:"ariaLabel.map"}),children:[o.jsx(c,{position:"top-left",horizontalGap:10,verticalGap:10,children:r&&o.jsx(p,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:350,children:r&&o.jsx(p,{role:"dialog","aria-labelledby":t,children:o.jsx(b,{title:o.jsx(g,{id:t,size:"md",mb:2,children:e.formatMessage({id:"tocTitle"})}),children:o.jsx(C,{mapId:d,showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}),o.jsx(c,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(A,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(v,{as:"b",children:"Description"}),o.jsxs(v,{children:["This application can be used to test the TOC, including health checks for configured layers. Two base layers (",'"',"TopPlus Open",'"'," and ",'"',"TopPlus Open (Grau)",'"',") and one operational layer (",'"',"Schulstandorte",'"',") will be unavailable and should be marked as such by the UI."]})]})}),o.jsx(c,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:o.jsx(s,{role:"toolbar","aria-label":e.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:o.jsx(R,{label:e.formatMessage({id:"tocTitle"}),icon:o.jsx(j,{}),isActive:r,onClick:i})})})]})})})})}const Y=z({component:J,appMetadata:F,async resolveConfig(e){const t=e.getAttribute("forced-locale");if(t)return{locale:t}}});customElements.define("toc-map-app",Y);const Z=document.getElementsByTagName("body")[0];Q();function Q(){const e=window.location.search,r=new URLSearchParams(e).get("lang"),n=document.createElement("toc-map-app");n.classList.add("full-height"),n.classList.add("app"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),Z.appendChild(n)} +import{a as y,r as m,j as o,e as z}from"./CzUo6bX8-UUU.js";import{S as a,T as f,O as _,bM as T,bN as M,b as w,a as x,M as L,H as P,u as I,i as s,e as b,B as p,f as g,j as D,k as c}from"./B36mctiVgF5V.js";import{W as S,b as j}from"./kPJ9UZ8lVIau.js";import{G as k,e as C,T as R}from"./C1o_VwAkx5Nm.js";import{_ as h}from"./CmsKOCeNyeyo.js";import{V as A,T as v}from"./CovJx79h1x39.js";import"./CkG3hRXjrvfc.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./_05fvbTuDT_t.js";import"./E5Cg9XwqIVqj.js";import"./0jkoYKtubXoE.js";import"./C41Ku2EWcQEd.js";import"./BSX9fy8BsUsv.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const d="main";class E{mapId=d;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},projection:"EPSG:25832",layers:[new a({id:"topplus_open",title:"TopPlus Open",isBaseLayer:!0,visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_openERROR/1.0.0/WMTSCapabilities.xml",olLayer:u("web")}),new a({id:"topplus_open_grau",title:"TopPlus Open (Grau)",isBaseLayer:!0,visible:!1,healthCheck:async()=>{function t(r){return new Promise(n=>setTimeout(n,r))}return await t(2e3),"error"},olLayer:u("web_grau")}),new a({id:"topplus_open_light",title:"TopPlus Open (Light)",isBaseLayer:!0,visible:!1,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:u("web_light")}),new a({title:"OSM",visible:!1,isBaseLayer:!0,olLayer:new f({source:new _})}),new a({title:"Haltestellen Stadt Rostock",visible:!0,description:"Haltestellen des öffentlichen Personenverkehrs in der Hanse- und Universitätsstadt Rostock.",olLayer:O()}),new a({title:"Kindertagesstätten",visible:!0,healthCheck:"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",olLayer:G()}),W(),q()]}}}function u(e){const t=[-380316598427299e-8,880590808284866e-8],r=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],n=new Array(r.length);for(let l=0;lDatenquellen`});return new f({source:i})}function O(){const e=new w({url:"https://geo.sv.rostock.de/download/opendata/haltestellen/haltestellen.json",format:new k,attributions:"Haltestellen Stadt Rostock, Creative Commons CC Zero License (cc-zero)"});return new x({source:e})}function G(){const e=new w({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new k,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'});return new x({source:e})}function W(){return new S({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,healthCheck:async()=>{function e(t){return new Promise(r=>setTimeout(r,t))}return await e(3e3),"error"},url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW"}],sourceOptions:{ratio:1}})}function q(){return new S({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",sublayers:[{name:"1",title:"Verwaltungen"},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}const H={"toc-map":{name:"toc-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:E,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:L,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:P,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},B=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',N=["en","de"];function U(e){switch(e){case"en":return h(()=>import("./Clif7aTs2LHR.js"),[],import.meta.url).then(t=>t.default);case"de":return h(()=>import("./Cx-LAL-6-WEp.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const V=y(B),F=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:U,locales:N,packages:H,styles:V},Symbol.toStringTag,{value:"Module"})),K="toc-map",$=I.bind(void 0,K);function J(){const e=$(),t=m.useId(),[r,n]=m.useState(!0);function i(){n(!r)}return o.jsx(s,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(b,{title:o.jsx(p,{role:"region","aria-label":e.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:o.jsx(g,{size:"md",children:"OpenLayers Base Packages - TOC and Health Check Sample"})}),children:o.jsx(s,{flex:"1",direction:"column",children:o.jsxs(D,{mapId:d,role:"main","aria-label":e.formatMessage({id:"ariaLabel.map"}),children:[o.jsx(c,{position:"top-left",horizontalGap:10,verticalGap:10,children:r&&o.jsx(p,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:350,children:r&&o.jsx(p,{role:"dialog","aria-labelledby":t,children:o.jsx(b,{title:o.jsx(g,{id:t,size:"md",mb:2,children:e.formatMessage({id:"tocTitle"})}),children:o.jsx(C,{mapId:d,showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}),o.jsx(c,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(A,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(v,{as:"b",children:"Description"}),o.jsxs(v,{children:["This application can be used to test the TOC, including health checks for configured layers. Two base layers (",'"',"TopPlus Open",'"'," and ",'"',"TopPlus Open (Grau)",'"',") and one operational layer (",'"',"Schulstandorte",'"',") will be unavailable and should be marked as such by the UI."]})]})}),o.jsx(c,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:o.jsx(s,{role:"toolbar","aria-label":e.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:o.jsx(R,{label:e.formatMessage({id:"tocTitle"}),icon:o.jsx(j,{}),isActive:r,onClick:i})})})]})})})})}const Y=z({component:J,appMetadata:F,async resolveConfig(e){const t=e.getAttribute("forced-locale");if(t)return{locale:t}}});customElements.define("toc-map-app",Y);const Z=document.getElementsByTagName("body")[0];Q();function Q(){const e=window.location.search,r=new URLSearchParams(e).get("lang"),n=document.createElement("toc-map-app");n.classList.add("full-height"),n.classList.add("app"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),Z.appendChild(n)} diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/tOtqIq0vqwRj.js b/openlayers-base-packages/pr-previews/pr-355/assets/BsgfV0Dzj2CU.js similarity index 98% rename from openlayers-base-packages/pr-previews/pr-355/assets/tOtqIq0vqwRj.js rename to openlayers-base-packages/pr-previews/pr-355/assets/BsgfV0Dzj2CU.js index 37a7466..4a3e098 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/tOtqIq0vqwRj.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/BsgfV0Dzj2CU.js @@ -16,4 +16,4 @@ ${s}`)!==100){const l=e.replace("{font-family}",s.replace(/ /g,"-").toLowerCase( `)return B.push(` `,""),B;if(N==2){B.push(Ar(Y,ot),K);return}Y=Dr(Y,K,tr,ot).split(` `);for(let fe=0,ue=Y.length;fe0&&B.push(` -`,""),B.push(Y[fe],K);return B},[]):te=Tr(W,j).trim(),Te=z(v,"paint","text-opacity",b,T,m,x)}if(te&&Te&&!er){kt||(++U,w=S[U],(!w||!w.getText()||w.getFill()||w.getStroke())&&(w=new Ie,S[U]=w),w.setImage(void 0),w.setGeometry(void 0));const H=ti(v,b,T,"text",m);w.getText()||w.setText(q),q=w.getText(),(!q||"getDeclutterMode"in q&&q.getDeclutterMode()!==H)&&(q=new Jo({padding:[2,2,2,2],declutterMode:H}),w.setText(q));const W=z(v,"layout","text-transform",b,T,m,x);W=="uppercase"?te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toUpperCase()):te.toUpperCase():W=="lowercase"&&(te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toLowerCase()):te.toLowerCase());const B=Array.isArray(te)?te:N==2?Ar(te,ot):Dr(te,nt,tr,ot);q.setText(B),q.setFont(nt),q.setRotation(xr(z(v,"layout","text-rotate",b,T,m,x)));const X=z(v,"layout","text-anchor",b,T,m,x),D=kt||N==1?"point":z(v,"layout","symbol-placement",b,T,m,x);let O;if(D==="line-center"?(q.setPlacement("line"),O="center"):q.setPlacement(D),D==="line"&&typeof q.setRepeat=="function"){const ne=z(v,"layout","symbol-spacing",b,T,m,x);q.setRepeat(ne*2)}q.setOverflow(D==="point");let K=z(v,"paint","text-halo-width",b,T,m,x);const Y=z(v,"layout","text-offset",b,T,m,x),fe=z(v,"paint","text-translate",b,T,m,x);let ue=0,oe=0;if(D=="point"){O="center",X.indexOf("left")!==-1?(O="left",oe=K):X.indexOf("right")!==-1&&(O="right",oe=-K);const ne=z(v,"layout","text-rotation-alignment",b,T,m,x);q.setRotateWithView(ne=="map")}else q.setMaxAngle(xr(z(v,"layout","text-max-angle",b,T,m,x))*te.length/B.length),q.setRotateWithView(!1);q.setTextAlign(O);let ae="middle";X.indexOf("bottom")==0?(ae="bottom",ue=-K-.5*(it-1)*Ce):X.indexOf("top")==0&&(ae="top",ue=K+.5*(it-1)*Ce),q.setTextBaseline(ae);const J=z(v,"layout","text-justify",b,T,m,x);q.setJustify(J==="auto"?void 0:J),q.setOffsetX(Y[0]*Ce+oe+fe[0]),q.setOffsetY(Y[1]*Ce+ue+fe[1]),F.setColor(Ee(z(v,"paint","text-color",b,T,m,x),Te)),q.setFill(F);const he=Ee(z(v,"paint","text-halo-color",b,T,m,x),Te);if(he&&K>0){E.setColor(he),K*=2;const ne=.5*Ce;E.setWidth(K<=ne?K:ne),q.setStroke(E)}else q.setStroke(void 0);const me=z(v,"layout","text-padding",b,T,m,x),ye=q.getPadding();me!==ye[0]&&(ye[0]=me,ye[1]=me,ye[2]=me,ye[3]=me),w.setZIndex($e)}}}if(U>-1)return S.length=U+1,S};return t.setStyle($),t.set("mapbox-source",C),t.set("mapbox-layers",f),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),$}function Ul(t,e=512){return t.getExtent()?$r({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Yt}function Zl(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((n,i)=>{e.accessToken=n,e.accessTokenParam=i})),e}function Hl(t,e,r="",n={},i=void 0){let o,a,s,l,u=!0;return typeof r!="string"&&!Array.isArray(r)?(s=r,l=s.source||s.layers,n=s):l=r,typeof n=="string"?(o=n,s={}):(o=n.styleUrl,s=n),s.updateSource===!1&&(u=!1),i||(i=s.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:Ui(o,s.accessToken),s=Zl(o,s)),new Promise(function(c,p){Hi(e,s).then(function(d){if(d.version!=8)return p(new Error("glStyle version 8 required."));if(!(t instanceof Fr||t instanceof pt))return p(new Error("Can only apply to VectorLayer or VectorTileLayer"));const f=t instanceof pt?"vector":"geojson";if(l?Array.isArray(l)?a=d.layers.find(function(F){return F.id===l[0]}).source:a=l:(a=Object.keys(d.sources).find(function(F){return d.sources[F].type===f}),l=a),!a)return p(new Error(`No ${f} source found in the glStyle.`));function h(){if(!u)return Promise.resolve();if(t instanceof pt)return Ql(d.sources[a],o,s).then(function(k){const I=t.getSource();I?k!==I&&(I.setTileUrlFunction(k.getTileUrlFunction()),typeof I.setUrls=="function"&&typeof k.getUrls=="function"&&I.setUrls(k.getUrls()),I.format_||(I.format_=k.format_),I.getAttributions()||I.setAttributions(k.getAttributions()),I.getTileLoadFunction()===di&&I.setTileLoadFunction(k.getTileLoadFunction()),Ho(I.getProjection(),k.getProjection())&&(I.tileGrid=k.getTileGrid())):t.setSource(k);const A=t.getSource().getTileGrid();!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())&&A.getMinZoom()>0&&t.setMaxResolution(Ml(Math.max(0,A.getMinZoom()-1e-12),A.getResolutions()))});const F=d.sources[a];let S=t.getSource();(!S||S.get("mapbox-source")!==F)&&(S=tu(F,o,s));const $=t.getSource();return $?S!==$&&($.getAttributions()||$.setAttributions(S.getAttributions()),$.format_||($.format_=S.getFormat()),$.url_=S.getUrl()):t.setSource(S),Promise.resolve()}let g,m,_,C;function E(){if(!C&&(!d.sprite||m)){if(s.projection&&!i){const S=Ke(s.projection).getUnits();S!=="m"&&(i=Yt.map($=>$/Go[S]))}C=Bl(t,d,l,i,m,_,(F,S=s.webfonts)=>$l(F,S),s.getImage),t.getStyle()?h().then(c).catch(p):p(new Error(`Nothing to show for source [${a}]`))}else C?(t.setStyle(C),h().then(c).catch(p)):p(new Error("Something went wrong trying to apply style."))}if(d.sprite){const F=new URL(Fl(d.sprite,s.accessToken,o||location.href));g=window.devicePixelRatio>=1.5?.5:1;const S=g==.5?"@2x":"";let $=F.origin+F.pathname+S+".json"+F.search;new Promise(function(k,I){Ye("Sprite",$,s).then(k).catch(function(A){$=F.origin+F.pathname+".json"+F.search,Ye("Sprite",$,s).then(k).catch(I)})}).then(function(k){if(k===void 0&&p(new Error("No sprites found.")),m=k,_=F.origin+F.pathname+S+".png"+F.search,s.transformRequest){const I=s.transformRequest(_,"SpriteImage")||_;(I instanceof Request||I instanceof Promise)&&(_=I)}E()}).catch(function(k){p(new Error(`Sprites cannot be loaded: ${$}: ${k.message}`))})}else E()}).catch(p)})}const ri={};function Wl(t,e,r){e.layers.some(function(n){if(n.type==="background"){if(t instanceof ui)return t.setBackground(function(i){return Xi(n,i,r,{})}),!0;if(t instanceof No||t instanceof Vo)return t.getLayers().insertAt(0,Yl(n,r,{})),!0}})}function Xl(t,e,r={}){return Hi(e,r).then(function(n){Wl(t,n,r)})}function Jl(t,e){const r=t.bounds;if(r){const n=Tn([r[0],r[1]],e),i=Tn([r[2],r[3]],e);return[n[0],n[1],i[0],i[1]]}return Ke(e).getExtent()}function Kl(t,e,r){const n=new xa({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),i=n.getTileJSON(),o=n.getTileGrid(),a=Ke(r.projection||"EPSG:3857"),s=Jl(i,a),l=a.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,p={attributions:n.getAttributions(),projection:a,tileGrid:new ai({origin:l?li(l):o.getOrigin(0),extent:s||o.getExtent(),minZoom:u,resolutions:Ul(a,e.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?p.urls=i.tiles:p.url=i.tiles,p}function Xi(t,e,r,n){const i={id:t.id,type:t.type},o=t.layout||{},a=t.paint||{};i.paint=a;const s=Zi(e,r.resolutions||Yt);let l;const u=z(i,"paint","background-color",s,ri,n);return a["background-opacity"]!==void 0&&(l=z(i,"paint","background-opacity",s,ri,n)),o.visibility=="none"?void 0:Ee(u,l)}function Yl(t,e,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new ui({source:new Bo({}),render(i){const o=Xi(t,i.viewState.resolution,e,r);return n.style.backgroundColor=o,n}})}function Ql(t,e,r){return new Promise(function(n,i){Rl(t,e,r).then(function({tileJson:o,tileLoadFunction:a}){const s=Kl(t,o,r);s.tileLoadFunction=a,s.format=new qr,n(new Lr(s))}).catch(i)})}function eu(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function tu(t,e,r){const n=r.projection?new Sn({dataProjection:r.projection}):new Sn,i=t.data,o={};if(typeof i=="string"){const s=At(i,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const u=(p,d,f)=>{const h=eu(f);return s.replace(h,`${p.join(",")}`)},c=new ir({attributions:t.attribution,format:n,loader:(p,d,f,h,g)=>{const m=typeof u=="function"?u(p,d,f):u;Ye("GeoJSON",m,r).then(_=>{const C=c.getFormat().readFeatures(_,{featureProjection:f});c.addFeatures(C),h(C)}).catch(_=>{c.removeLoadedExtent(p),g()})},strategy:Wo});return c.set("mapbox-source",t),c}const l=new ir({attributions:t.attribution,format:n,url:s,loader:(u,c,p,d,f)=>{Ye("GeoJSON",s,r).then(h=>{const g=l.getFormat().readFeatures(h,{featureProjection:p});l.addFeatures(g),d(g)}).catch(h=>{l.removeLoadedExtent(u),f()})}});return l}o.features=n.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new ir(Object.assign({attributions:t.attribution,format:n},o));return a.set("mapbox-source",t),a}class ru extends qo{constructor(e){super(kr.ERROR),this.error=e}}class nu extends pt{constructor(e){const r="declutter"in e?e.declutter:!0,n=new Lr({state:"loading",format:new qr});super({source:n,background:e.background===!1?null:e.background,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties}),e.accessToken&&(this.accessToken=e.accessToken);const i=e.styleUrl,o=[Hl(this,i,e.layers||e.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&o.push(Xl(this,e.styleUrl,{accessToken:this.accessToken})),Promise.all(o).then(()=>{n.setState("ready")}).catch(a=>{this.dispatchEvent(new ru(a)),this.getSource().setState("error")})}}const Ve="main";class iu{mapId=Ve;vectorSourceFactory;constructor({references:e}){this.vectorSourceFactory=e.vectorSourceFactory}async getMapConfig(){return{projection:"EPSG:3857",initialView:{kind:"position",center:{x:848890,y:6793350},zoom:13},layers:[new st({title:"OSM",visible:!0,isBaseLayer:!0,olLayer:new Ko({source:new Yo})}),new st({id:"inspire-us-kindergarten",title:"Kindertageseinrichtungen in NRW",visible:!0,olLayer:new Fr({style:new Ie({image:new ci({fill:new Be({color:"blue"}),radius:5})}),source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1",collectionId:"governmentalservice",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({id:"ogc_katasterbezirk",title:"Liegenschaftskatasterbezirke in NRW (viele Daten)",visible:!1,olLayer:new Fr({source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/lika/v1",collectionId:"katasterbezirk",limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({title:"Abschnitte / Äste mit Unfällen (Mapbox Style)",visible:!1,olLayer:new nu({styleUrl:"https://demo.ldproxy.net/strassen/styles/default?f=mbs"})}),new st({title:"Pendleratlas",visible:!0,olLayer:new pt({source:new Lr({url:"https://pendleratlas.statistikportal.de/_vector_tiles/2022/vg250/{z}/{x}/{y}.pbf",format:new qr,projection:"EPSG:3857",attributions:`© Statistische Ämter der Länder ${new Date().getFullYear()} | GeoBasis-DE/BKG ${new Date().getFullYear()}`}),style:new Ie({fill:new Be({color:"rgba(173, 209, 158, 0.6)"}),stroke:new ut({color:"#2d7d9f",width:3})})})})]}}}class ou{beforeRequest({target:e,options:r}){e.protocol==="https:"&&e.hostname==="ogc-api.nrw.de"&&r.headers.set("Authorization","Bearer 12345")}}const au={"ogc-api-app":{name:"ogc-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:iu,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},SampleTokenInterceptor:{name:"SampleTokenInterceptor",clazz:ou,provides:[{name:"http.Interceptor",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Qo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ea,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:ca,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:pa,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},su=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}',lu=["en","de"];function uu(t){switch(t){case"en":return Cn(()=>import("./DBP_-rsMB4Hw.js"),[],import.meta.url).then(e=>e.default);case"de":return Cn(()=>import("./DsBi5dvhCBBO.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const cu=eo(su),pu=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:uu,locales:lu,packages:au,styles:cu},Symbol.toStringTag,{value:"Module"})),du="ogc-api-app",fu=ta.bind(void 0,du);function hu(){const t=fu();return Q.jsx(or,{height:"100%",direction:"column",overflow:"hidden",children:Q.jsx(kn,{title:Q.jsx(zn,{textAlign:"center",py:1,children:Q.jsx(Fn,{size:"md",children:"Open Pioneer - OGC API Features and OGC API Tiles Sample"})}),children:Q.jsx(or,{flex:"1",direction:"column",position:"relative",children:Q.jsxs(ra,{mapId:Ve,children:[Q.jsx(ar,{position:"top-left",horizontalGap:20,verticalGap:20,children:Q.jsx(zn,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:Q.jsx(kn,{title:Q.jsx(Fn,{size:"md",children:t.formatMessage({id:"tocTitle"})}),children:Q.jsx(oa,{mapId:Ve,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})}),Q.jsx(ar,{position:"top-right",horizontalGap:10,verticalGap:10,children:Q.jsxs(ma,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[Q.jsx(sr,{as:"b",children:"Description"}),Q.jsx(sr,{children:"This application can be used to test OGC API Features and OGC API Tiles."}),Q.jsx(sr,{children:"Vector Tiles cannot be reprojected and require the map to use the same projection. Currently all known MVT vector tile sets are using WebMercator, making them unusable in the Default Sample App which uses ETRS89/UTM zone 32N. This Sample App uses WebMercator."})]})}),Q.jsx(ar,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:Q.jsxs(or,{direction:"column",gap:1,padding:1,children:[Q.jsx(da,{mapId:Ve}),Q.jsx(fa,{mapId:Ve}),Q.jsx(ha,{mapId:Ve})]})})]})})})})}const mu=to({component:hu,theme:ro,appMetadata:pu,async resolveConfig(t){const e=t.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("ogc-api-app",mu);const yu=document.getElementsByTagName("body")[0];gu();function gu(){const t=window.location.search,r=new URLSearchParams(t).get("lang"),n=document.createElement("ogc-api-app");n.classList.add("full-height"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),yu.appendChild(n)} +`,""),B.push(Y[fe],K);return B},[]):te=Tr(W,j).trim(),Te=z(v,"paint","text-opacity",b,T,m,x)}if(te&&Te&&!er){kt||(++U,w=S[U],(!w||!w.getText()||w.getFill()||w.getStroke())&&(w=new Ie,S[U]=w),w.setImage(void 0),w.setGeometry(void 0));const H=ti(v,b,T,"text",m);w.getText()||w.setText(q),q=w.getText(),(!q||"getDeclutterMode"in q&&q.getDeclutterMode()!==H)&&(q=new Jo({padding:[2,2,2,2],declutterMode:H}),w.setText(q));const W=z(v,"layout","text-transform",b,T,m,x);W=="uppercase"?te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toUpperCase()):te.toUpperCase():W=="lowercase"&&(te=Array.isArray(te)?te.map((ne,at)=>at%2?ne:ne.toLowerCase()):te.toLowerCase());const B=Array.isArray(te)?te:N==2?Ar(te,ot):Dr(te,nt,tr,ot);q.setText(B),q.setFont(nt),q.setRotation(xr(z(v,"layout","text-rotate",b,T,m,x)));const X=z(v,"layout","text-anchor",b,T,m,x),D=kt||N==1?"point":z(v,"layout","symbol-placement",b,T,m,x);let O;if(D==="line-center"?(q.setPlacement("line"),O="center"):q.setPlacement(D),D==="line"&&typeof q.setRepeat=="function"){const ne=z(v,"layout","symbol-spacing",b,T,m,x);q.setRepeat(ne*2)}q.setOverflow(D==="point");let K=z(v,"paint","text-halo-width",b,T,m,x);const Y=z(v,"layout","text-offset",b,T,m,x),fe=z(v,"paint","text-translate",b,T,m,x);let ue=0,oe=0;if(D=="point"){O="center",X.indexOf("left")!==-1?(O="left",oe=K):X.indexOf("right")!==-1&&(O="right",oe=-K);const ne=z(v,"layout","text-rotation-alignment",b,T,m,x);q.setRotateWithView(ne=="map")}else q.setMaxAngle(xr(z(v,"layout","text-max-angle",b,T,m,x))*te.length/B.length),q.setRotateWithView(!1);q.setTextAlign(O);let ae="middle";X.indexOf("bottom")==0?(ae="bottom",ue=-K-.5*(it-1)*Ce):X.indexOf("top")==0&&(ae="top",ue=K+.5*(it-1)*Ce),q.setTextBaseline(ae);const J=z(v,"layout","text-justify",b,T,m,x);q.setJustify(J==="auto"?void 0:J),q.setOffsetX(Y[0]*Ce+oe+fe[0]),q.setOffsetY(Y[1]*Ce+ue+fe[1]),F.setColor(Ee(z(v,"paint","text-color",b,T,m,x),Te)),q.setFill(F);const he=Ee(z(v,"paint","text-halo-color",b,T,m,x),Te);if(he&&K>0){E.setColor(he),K*=2;const ne=.5*Ce;E.setWidth(K<=ne?K:ne),q.setStroke(E)}else q.setStroke(void 0);const me=z(v,"layout","text-padding",b,T,m,x),ye=q.getPadding();me!==ye[0]&&(ye[0]=me,ye[1]=me,ye[2]=me,ye[3]=me),w.setZIndex($e)}}}if(U>-1)return S.length=U+1,S};return t.setStyle($),t.set("mapbox-source",C),t.set("mapbox-layers",f),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),$}function Ul(t,e=512){return t.getExtent()?$r({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Yt}function Zl(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((n,i)=>{e.accessToken=n,e.accessTokenParam=i})),e}function Hl(t,e,r="",n={},i=void 0){let o,a,s,l,u=!0;return typeof r!="string"&&!Array.isArray(r)?(s=r,l=s.source||s.layers,n=s):l=r,typeof n=="string"?(o=n,s={}):(o=n.styleUrl,s=n),s.updateSource===!1&&(u=!1),i||(i=s.resolutions),!o&&typeof e=="string"&&!e.trim().startsWith("{")&&(o=e),o&&(o=o.startsWith("data:")?location.href:Ui(o,s.accessToken),s=Zl(o,s)),new Promise(function(c,p){Hi(e,s).then(function(d){if(d.version!=8)return p(new Error("glStyle version 8 required."));if(!(t instanceof Fr||t instanceof pt))return p(new Error("Can only apply to VectorLayer or VectorTileLayer"));const f=t instanceof pt?"vector":"geojson";if(l?Array.isArray(l)?a=d.layers.find(function(F){return F.id===l[0]}).source:a=l:(a=Object.keys(d.sources).find(function(F){return d.sources[F].type===f}),l=a),!a)return p(new Error(`No ${f} source found in the glStyle.`));function h(){if(!u)return Promise.resolve();if(t instanceof pt)return Ql(d.sources[a],o,s).then(function(k){const I=t.getSource();I?k!==I&&(I.setTileUrlFunction(k.getTileUrlFunction()),typeof I.setUrls=="function"&&typeof k.getUrls=="function"&&I.setUrls(k.getUrls()),I.format_||(I.format_=k.format_),I.getAttributions()||I.setAttributions(k.getAttributions()),I.getTileLoadFunction()===di&&I.setTileLoadFunction(k.getTileLoadFunction()),Ho(I.getProjection(),k.getProjection())&&(I.tileGrid=k.getTileGrid())):t.setSource(k);const A=t.getSource().getTileGrid();!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())&&A.getMinZoom()>0&&t.setMaxResolution(Ml(Math.max(0,A.getMinZoom()-1e-12),A.getResolutions()))});const F=d.sources[a];let S=t.getSource();(!S||S.get("mapbox-source")!==F)&&(S=tu(F,o,s));const $=t.getSource();return $?S!==$&&($.getAttributions()||$.setAttributions(S.getAttributions()),$.format_||($.format_=S.getFormat()),$.url_=S.getUrl()):t.setSource(S),Promise.resolve()}let g,m,_,C;function E(){if(!C&&(!d.sprite||m)){if(s.projection&&!i){const S=Ke(s.projection).getUnits();S!=="m"&&(i=Yt.map($=>$/Go[S]))}C=Bl(t,d,l,i,m,_,(F,S=s.webfonts)=>$l(F,S),s.getImage),t.getStyle()?h().then(c).catch(p):p(new Error(`Nothing to show for source [${a}]`))}else C?(t.setStyle(C),h().then(c).catch(p)):p(new Error("Something went wrong trying to apply style."))}if(d.sprite){const F=new URL(Fl(d.sprite,s.accessToken,o||location.href));g=window.devicePixelRatio>=1.5?.5:1;const S=g==.5?"@2x":"";let $=F.origin+F.pathname+S+".json"+F.search;new Promise(function(k,I){Ye("Sprite",$,s).then(k).catch(function(A){$=F.origin+F.pathname+".json"+F.search,Ye("Sprite",$,s).then(k).catch(I)})}).then(function(k){if(k===void 0&&p(new Error("No sprites found.")),m=k,_=F.origin+F.pathname+S+".png"+F.search,s.transformRequest){const I=s.transformRequest(_,"SpriteImage")||_;(I instanceof Request||I instanceof Promise)&&(_=I)}E()}).catch(function(k){p(new Error(`Sprites cannot be loaded: ${$}: ${k.message}`))})}else E()}).catch(p)})}const ri={};function Wl(t,e,r){e.layers.some(function(n){if(n.type==="background"){if(t instanceof ui)return t.setBackground(function(i){return Xi(n,i,r,{})}),!0;if(t instanceof No||t instanceof Vo)return t.getLayers().insertAt(0,Yl(n,r,{})),!0}})}function Xl(t,e,r={}){return Hi(e,r).then(function(n){Wl(t,n,r)})}function Jl(t,e){const r=t.bounds;if(r){const n=Tn([r[0],r[1]],e),i=Tn([r[2],r[3]],e);return[n[0],n[1],i[0],i[1]]}return Ke(e).getExtent()}function Kl(t,e,r){const n=new xa({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),i=n.getTileJSON(),o=n.getTileGrid(),a=Ke(r.projection||"EPSG:3857"),s=Jl(i,a),l=a.getExtent(),u=i.minzoom||0,c=i.maxzoom||22,p={attributions:n.getAttributions(),projection:a,tileGrid:new ai({origin:l?li(l):o.getOrigin(0),extent:s||o.getExtent(),minZoom:u,resolutions:Ul(a,e.tileSize).slice(0,c+1),tileSize:o.getTileSize(0)})};return Array.isArray(i.tiles)?p.urls=i.tiles:p.url=i.tiles,p}function Xi(t,e,r,n){const i={id:t.id,type:t.type},o=t.layout||{},a=t.paint||{};i.paint=a;const s=Zi(e,r.resolutions||Yt);let l;const u=z(i,"paint","background-color",s,ri,n);return a["background-opacity"]!==void 0&&(l=z(i,"paint","background-opacity",s,ri,n)),o.visibility=="none"?void 0:Ee(u,l)}function Yl(t,e,r){const n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new ui({source:new Bo({}),render(i){const o=Xi(t,i.viewState.resolution,e,r);return n.style.backgroundColor=o,n}})}function Ql(t,e,r){return new Promise(function(n,i){Rl(t,e,r).then(function({tileJson:o,tileLoadFunction:a}){const s=Kl(t,o,r);s.tileLoadFunction=a,s.format=new qr,n(new Lr(s))}).catch(i)})}function eu(t){return`{bbox-${(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function tu(t,e,r){const n=r.projection?new Sn({dataProjection:r.projection}):new Sn,i=t.data,o={};if(typeof i=="string"){const s=At(i,r.accessToken,r.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(s)){const u=(p,d,f)=>{const h=eu(f);return s.replace(h,`${p.join(",")}`)},c=new ir({attributions:t.attribution,format:n,loader:(p,d,f,h,g)=>{const m=typeof u=="function"?u(p,d,f):u;Ye("GeoJSON",m,r).then(_=>{const C=c.getFormat().readFeatures(_,{featureProjection:f});c.addFeatures(C),h(C)}).catch(_=>{c.removeLoadedExtent(p),g()})},strategy:Wo});return c.set("mapbox-source",t),c}const l=new ir({attributions:t.attribution,format:n,url:s,loader:(u,c,p,d,f)=>{Ye("GeoJSON",s,r).then(h=>{const g=l.getFormat().readFeatures(h,{featureProjection:p});l.addFeatures(g),d(g)}).catch(h=>{l.removeLoadedExtent(u),f()})}});return l}o.features=n.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new ir(Object.assign({attributions:t.attribution,format:n},o));return a.set("mapbox-source",t),a}class ru extends qo{constructor(e){super(kr.ERROR),this.error=e}}class nu extends pt{constructor(e){const r="declutter"in e?e.declutter:!0,n=new Lr({state:"loading",format:new qr});super({source:n,background:e.background===!1?null:e.background,declutter:r,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties}),e.accessToken&&(this.accessToken=e.accessToken);const i=e.styleUrl,o=[Hl(this,i,e.layers||e.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&o.push(Xl(this,e.styleUrl,{accessToken:this.accessToken})),Promise.all(o).then(()=>{n.setState("ready")}).catch(a=>{this.dispatchEvent(new ru(a)),this.getSource().setState("error")})}}const Ve="main";class iu{mapId=Ve;vectorSourceFactory;constructor({references:e}){this.vectorSourceFactory=e.vectorSourceFactory}async getMapConfig(){return{projection:"EPSG:3857",initialView:{kind:"position",center:{x:848890,y:6793350},zoom:13},layers:[new st({title:"OSM",visible:!0,isBaseLayer:!0,olLayer:new Ko({source:new Yo})}),new st({id:"inspire-us-kindergarten",title:"Kindertageseinrichtungen in NRW",visible:!0,olLayer:new Fr({style:new Ie({image:new ci({fill:new Be({color:"blue"}),radius:5})}),source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1",collectionId:"governmentalservice",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({id:"ogc_katasterbezirk",title:"Liegenschaftskatasterbezirke in NRW (viele Daten)",visible:!1,olLayer:new Fr({source:this.vectorSourceFactory.createVectorSource({baseUrl:"https://ogc-api.nrw.de/lika/v1",collectionId:"katasterbezirk",limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:"Datenlizenz Deutschland - Namensnennung - Version 2.0"})})}),new st({title:"Abschnitte / Äste mit Unfällen (Mapbox Style)",visible:!1,olLayer:new nu({styleUrl:"https://demo.ldproxy.net/strassen/styles/default?f=mbs"})}),new st({title:"Pendleratlas",visible:!0,olLayer:new pt({source:new Lr({url:"https://pendleratlas.statistikportal.de/_vector_tiles/2022/vg250/{z}/{x}/{y}.pbf",format:new qr,projection:"EPSG:3857",attributions:`© Statistische Ämter der Länder ${new Date().getFullYear()} | GeoBasis-DE/BKG ${new Date().getFullYear()}`}),style:new Ie({fill:new Be({color:"rgba(173, 209, 158, 0.6)"}),stroke:new ut({color:"#2d7d9f",width:3})})})})]}}}class ou{beforeRequest({target:e,options:r}){e.protocol==="https:"&&e.hostname==="ogc-api.nrw.de"&&r.headers.set("Authorization","Bearer 12345")}}const au={"ogc-api-app":{name:"ogc-api-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:iu,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},SampleTokenInterceptor:{name:"SampleTokenInterceptor",clazz:ou,provides:[{name:"http.Interceptor",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Qo,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ea,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:ca,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:pa,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}}},su=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}',lu=["en","de"];function uu(t){switch(t){case"en":return Cn(()=>import("./DBP_-rsMB4Hw.js"),[],import.meta.url).then(e=>e.default);case"de":return Cn(()=>import("./DsBi5dvhCBBO.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const cu=eo(su),pu=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:uu,locales:lu,packages:au,styles:cu},Symbol.toStringTag,{value:"Module"})),du="ogc-api-app",fu=ta.bind(void 0,du);function hu(){const t=fu();return Q.jsx(or,{height:"100%",direction:"column",overflow:"hidden",children:Q.jsx(kn,{title:Q.jsx(zn,{textAlign:"center",py:1,children:Q.jsx(Fn,{size:"md",children:"Open Pioneer - OGC API Features and OGC API Tiles Sample"})}),children:Q.jsx(or,{flex:"1",direction:"column",position:"relative",children:Q.jsxs(ra,{mapId:Ve,children:[Q.jsx(ar,{position:"top-left",horizontalGap:20,verticalGap:20,children:Q.jsx(zn,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:Q.jsx(kn,{title:Q.jsx(Fn,{size:"md",children:t.formatMessage({id:"tocTitle"})}),children:Q.jsx(oa,{mapId:Ve,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})}),Q.jsx(ar,{position:"top-right",horizontalGap:10,verticalGap:10,children:Q.jsxs(ma,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[Q.jsx(sr,{as:"b",children:"Description"}),Q.jsx(sr,{children:"This application can be used to test OGC API Features and OGC API Tiles."}),Q.jsx(sr,{children:"Vector Tiles cannot be reprojected and require the map to use the same projection. Currently all known MVT vector tile sets are using WebMercator, making them unusable in the Default Sample App which uses ETRS89/UTM zone 32N. This Sample App uses WebMercator."})]})}),Q.jsx(ar,{position:"bottom-right",horizontalGap:10,verticalGap:30,children:Q.jsxs(or,{direction:"column",gap:1,padding:1,children:[Q.jsx(da,{mapId:Ve}),Q.jsx(fa,{mapId:Ve}),Q.jsx(ha,{mapId:Ve})]})})]})})})})}const mu=to({component:hu,theme:ro,appMetadata:pu,async resolveConfig(t){const e=t.getAttribute("forced-locale");if(e)return{locale:e}}});customElements.define("ogc-api-app",mu);const yu=document.getElementsByTagName("body")[0];gu();function gu(){const t=window.location.search,r=new URLSearchParams(t).get("lang"),n=document.createElement("ogc-api-app");n.classList.add("full-height"),n.setAttribute("id","test"),r&&n.setAttribute("forced-locale",r),yu.appendChild(n)} diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/BkOP4yx1U5l-.js b/openlayers-base-packages/pr-previews/pr-355/assets/CDAAkDxRqy1k.js similarity index 88% rename from openlayers-base-packages/pr-previews/pr-355/assets/BkOP4yx1U5l-.js rename to openlayers-base-packages/pr-previews/pr-355/assets/CDAAkDxRqy1k.js index eb6a062..b50f4b2 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/BkOP4yx1U5l-.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/CDAAkDxRqy1k.js @@ -1 +1 @@ -import{a as v,j as e,r as f,B as d,e as w}from"./CzUo6bX8-UUU.js";import{t as y}from"./CWtAa_vMA4rU.js";import{bM as k,bN as z,S as h,T as x,O as j,M as S,H as M,u as I,i as m,e as L,B as b,f as T,j as _,k as g,g as u}from"./B36mctiVgF5V.js";import{_ as B}from"./CmsKOCeNyeyo.js";import{B as C}from"./_05fvbTuDT_t.js";import{T as p,S as A,V as P,U as E,a as c}from"./CovJx79h1x39.js";import{F}from"./0jkoYKtubXoE.js";import{F as R}from"./DAtS2L2h2gmX.js";import"./E5Cg9XwqIVqj.js";import"./C41Ku2EWcQEd.js";import"./CkG3hRXjrvfc.js";class q extends k{constructor(a){const r=[-380316598427299e-8,880590808284866e-8],n=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],i=new Array(n.length);for(let t=0;tDatenquellen`})}}const s="main";class G{mapId=s;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new h({title:"OSM",isBaseLayer:!0,olLayer:new x({source:new j})})]}}}const O={"basemap-switcher-app":{name:"basemap-switcher-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:G,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:S,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:M,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},H=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',D=["en"];function U(o){switch(o){case"en":return B(()=>import("./BFyPnFni35WZ.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${o}'`)}const W=v(H),N=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:U,locales:D,packages:O,styles:W},Symbol.toStringTag,{value:"Module"})),V="basemap-switcher-app",$=I.bind(void 0,V);function K(){const o=$();return e.jsx(m,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(L,{title:e.jsx(b,{textAlign:"center",py:1,children:e.jsx(T,{size:"md",children:"OpenLayers Base Packages - Basemap Switcher"})}),children:e.jsx(m,{flex:"1",direction:"column",position:"relative",children:e.jsxs(_,{mapId:s,children:[e.jsx(g,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsxs(b,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[e.jsxs(F,{children:[e.jsx(R,{ps:1,children:e.jsx(p,{as:"b",children:o.formatMessage({id:"basemapLabel"})})}),e.jsx(C,{allowSelectingEmptyBasemap:!0,mapId:s})]}),e.jsxs(A,{pt:5,children:[e.jsx(p,{align:"center",children:"Test Controls:"}),e.jsx(Y,{mapId:s}),e.jsx(J,{mapId:s}),e.jsx(Q,{mapId:s})]})]})}),e.jsx(g,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(P,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[e.jsx(p,{as:"b",children:"Description"}),e.jsx(p,{children:"This application can be used to test the basemap switcher. The basemap switcher synchronizes with the state of the shared map model. If the map model is changed (for example, by changing the current basemap), the basemap switcher must update itself accordingly."}),e.jsxs(E,{children:[e.jsx(c,{children:"Adding a new basemap updates the dropdown menu (new option)"}),e.jsx(c,{children:"Changing the current basemap to another basemap updates the selected option"}),e.jsxs(c,{children:["Setting the current basemap to ","'undefined'"," also updates the selection"]})]})]})})]})})})})}function Y(o){const{mapId:a}=o,{map:r}=u(a),n=f.useRef(1),i=()=>{if(!r)return;const l=n.current++,t=new h({title:`New Layer ${l}`,isBaseLayer:!0,olLayer:new x({source:new q({layer:"web_grau"})})});r.layers.addLayer(t),console.log("generated base layer with id",t.id)};return e.jsx(d,{onClick:i,children:"Add base layer"})}function J(o){const{mapId:a}=o,{map:r}=u(a),n=()=>{if(!r)return;const i=r.layers.getAllLayers();if(i.length===0){console.error("There is no base layer");return}const l=Math.floor(Math.random()*i.length),t=i[l];if(!t){console.error("Failed to find a layer");return}console.log("activating base layer",t.id),r.layers.activateBaseLayer(t.id)};return e.jsx(d,{onClick:n,children:"Activate random base layer"})}function Q(o){const{mapId:a}=o,{map:r}=u(a),n=()=>{r&&(console.log("setting active base layer to undefined"),r.layers.activateBaseLayer(void 0))};return e.jsx(d,{onClick:n,children:"Clear base layer"})}const X=w({component:K,theme:y,appMetadata:N});customElements.define("basemap-switcher-app",X); +import{a as v,j as e,r as f,B as d,e as w}from"./CzUo6bX8-UUU.js";import{t as y}from"./CWtAa_vMA4rU.js";import{bM as k,bN as z,S as h,T as x,O as j,M as S,H as M,u as I,i as m,e as L,B as b,f as T,j as _,k as g,g as u}from"./B36mctiVgF5V.js";import{_ as B}from"./CmsKOCeNyeyo.js";import{B as C}from"./_05fvbTuDT_t.js";import{T as p,S as A,V as P,U as E,a as c}from"./CovJx79h1x39.js";import{F}from"./0jkoYKtubXoE.js";import{F as R}from"./DAtS2L2h2gmX.js";import"./E5Cg9XwqIVqj.js";import"./C41Ku2EWcQEd.js";import"./CkG3hRXjrvfc.js";class q extends k{constructor(a){const r=[-380316598427299e-8,880590808284866e-8],n=[4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.874056570353,76.4370282851763,38.2185141425881,19.1092570712941,9.55462853564703,4.77731426782352,2.38865713391176,1.19432856695588,.59716428347794],i=new Array(n.length);for(let t=0;tDatenquellen`})}}const s="main";class G{mapId=s;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new h({title:"OSM",isBaseLayer:!0,olLayer:new x({source:new j})})]}}}const O={"basemap-switcher-app":{name:"basemap-switcher-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:G,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:S,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:M,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},H=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',D=["en"];function U(o){switch(o){case"en":return B(()=>import("./BFyPnFni35WZ.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${o}'`)}const W=v(H),N=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:U,locales:D,packages:O,styles:W},Symbol.toStringTag,{value:"Module"})),V="basemap-switcher-app",$=I.bind(void 0,V);function K(){const o=$();return e.jsx(m,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(L,{title:e.jsx(b,{textAlign:"center",py:1,children:e.jsx(T,{size:"md",children:"OpenLayers Base Packages - Basemap Switcher"})}),children:e.jsx(m,{flex:"1",direction:"column",position:"relative",children:e.jsxs(_,{mapId:s,children:[e.jsx(g,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsxs(b,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[e.jsxs(F,{children:[e.jsx(R,{ps:1,children:e.jsx(p,{as:"b",children:o.formatMessage({id:"basemapLabel"})})}),e.jsx(C,{allowSelectingEmptyBasemap:!0,mapId:s})]}),e.jsxs(A,{pt:5,children:[e.jsx(p,{align:"center",children:"Test Controls:"}),e.jsx(Y,{mapId:s}),e.jsx(J,{mapId:s}),e.jsx(Q,{mapId:s})]})]})}),e.jsx(g,{position:"top-right",horizontalGap:10,verticalGap:10,children:e.jsxs(P,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[e.jsx(p,{as:"b",children:"Description"}),e.jsx(p,{children:"This application can be used to test the basemap switcher. The basemap switcher synchronizes with the state of the shared map model. If the map model is changed (for example, by changing the current basemap), the basemap switcher must update itself accordingly."}),e.jsxs(E,{children:[e.jsx(c,{children:"Adding a new basemap updates the dropdown menu (new option)"}),e.jsx(c,{children:"Changing the current basemap to another basemap updates the selected option"}),e.jsxs(c,{children:["Setting the current basemap to ","'undefined'"," also updates the selection"]})]})]})})]})})})})}function Y(o){const{mapId:a}=o,{map:r}=u(a),n=f.useRef(1),i=()=>{if(!r)return;const l=n.current++,t=new h({title:`New Layer ${l}`,isBaseLayer:!0,olLayer:new x({source:new q({layer:"web_grau"})})});r.layers.addLayer(t),console.log("generated base layer with id",t.id)};return e.jsx(d,{onClick:i,children:"Add base layer"})}function J(o){const{mapId:a}=o,{map:r}=u(a),n=()=>{if(!r)return;const i=r.layers.getAllLayers();if(i.length===0){console.error("There is no base layer");return}const l=Math.floor(Math.random()*i.length),t=i[l];if(!t){console.error("Failed to find a layer");return}console.log("activating base layer",t.id),r.layers.activateBaseLayer(t.id)};return e.jsx(d,{onClick:n,children:"Activate random base layer"})}function Q(o){const{mapId:a}=o,{map:r}=u(a),n=()=>{r&&(console.log("setting active base layer to undefined"),r.layers.activateBaseLayer(void 0))};return e.jsx(d,{onClick:n,children:"Clear base layer"})}const X=w({component:K,theme:y,appMetadata:N});customElements.define("basemap-switcher-app",X); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/B2mU5pjSe5Bt.js b/openlayers-base-packages/pr-previews/pr-355/assets/CWjri1ru9tw2.js similarity index 93% rename from openlayers-base-packages/pr-previews/pr-355/assets/B2mU5pjSe5Bt.js rename to openlayers-base-packages/pr-previews/pr-355/assets/CWjri1ru9tw2.js index ac3f062..0db93a9 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/B2mU5pjSe5Bt.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/CWjri1ru9tw2.js @@ -1 +1 @@ -import{j as t,c as q,a as U,r as p,B as I,i as K,b as $,d as A,F as Z,e as Y}from"./CzUo6bX8-UUU.js";import{B as d,V as J,S as j,T as X,O as Q,a as C,b as N,c as ee,C as te,F as oe,H as re,M as ie,u as ne,d as ae,e as v,f as x,g as L,h as M,i as y,D as se,j as le,k as ce}from"./B36mctiVgF5V.js";import{W as V,P as pe,a as de,b as ue,c as me,d as ge,e as he,f as fe,g as be,h as ve}from"./kPJ9UZ8lVIau.js";import{W as T,E as xe,V as we,S as Se,O as ye,C as ke,a as Me,b as je,L as Ce,M as Le,c as ze,d as _e,P as Pe,N as Ie}from"./CtkSqPB4B2ET.js";import{G as O,u as Ae,T as h,P as Te,a as De,b as Re,c as Ee,d as Fe,e as qe}from"./C1o_VwAkx5Nm.js";import{T as z}from"./CovJx79h1x39.js";import{r as D,a as R,b as Ne,V as Ve,S as Oe,u as b,I as He,Z as Ge,c as Be}from"./BUCtgDDw782G.js";import{N as We,P as Ue}from"./BZqu8ZKsC5y7.js";import{_ as E}from"./CmsKOCeNyeyo.js";import{H}from"./_YjaCHRtWzU8.js";import{G}from"./CkG3hRXjrvfc.js";import{R as Ke}from"./K_sKz2BiM23b.js";import{C as $e}from"./CdXIVWNpc0nj.js";import{D as Ze}from"./_05fvbTuDT_t.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./E5Cg9XwqIVqj.js";import"./SSUBJAaBGB7g.js";import"./0jkoYKtubXoE.js";import"./DAtS2L2h2gmX.js";import"./BSX9fy8BsUsv.js";import"./C41Ku2EWcQEd.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const Ye={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Je(r){return t.jsxs(d,{children:[t.jsx(z,{children:r.layer.title}),t.jsx(d,{style:Ye})]})}const _="main";class Xe{mapId=_;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{advanced:{view:new J({center:[404747,5757920],zoom:13,constrainResolution:!0,projection:"EPSG:25832"})},layers:[...Qe(),ot(),et(this.vectorSourceFactory),tt(),rt()]}}}function Qe(){return[new T({isBaseLayer:!0,title:"Topplus grau",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_grau",matrixSet:"EPSG_25832_14",visible:!1,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new T({isBaseLayer:!0,title:"Topplus farbig",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_col",matrixSet:"EPSG_25832_14",visible:!0,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new j({title:"OpenStreetMaps",visible:!1,isBaseLayer:!0,olLayer:new X({source:new Q})})]}function et(r){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",i=r.createVectorSource({strategy:"next",baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/25832",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),n=new C({source:i});return new j({id:"krankenhaus",title:"Krankenhäuser",visible:!1,olLayer:n,attributes:{collectionURL:e+"/collections/"+o}})}function tt(){return new V({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW",attributes:{legend:{}}}],sourceOptions:{ratio:1}})}function ot(){return new V({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",visible:!0,sublayers:[{name:"1",title:"Verwaltungen",attributes:{legend:{imageUrl:"https://www.wms.nrw.de/legends/wms/strassen_nrw_wms/1.png"}}},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}function rt(){const r={Component:Je},e=new N({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new O,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),o=new C({source:e,style:new ee({image:new te({fill:new oe({color:"blue"}),radius:4})})});return new j({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:o,attributes:{legend:r,resultListMetadata:[{id:"id",displayName:"ID",width:100,getPropertyValue(i){return i.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(i){switch(i.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return i.properties?.gefoerdert}}}]}})}class it{label;filteredTypes;httpService;constructor(e,o,i){this.label=e,this.filteredTypes=o,this.httpService=i}async search(e,{mapProjection:o,signal:i}){const n=await this.request(e,100,i),a=new O({dataProjection:"EPSG:4326",featureProjection:o});return n.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,l)=>{const c=a.readGeometry(s.geometry);return{id:s.properties.osm_id||l,label:this.createLabel(s),geometry:c,properties:s.properties}})}async request(e,o,i){const n=new URL("https://photon.komoot.io/api?");n.searchParams.set("q",e),n.searchParams.set("lang","de"),n.searchParams.set("lat","51.961563"),n.searchParams.set("lon","7.628202"),n.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(n,{signal:i});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}const nt=q("ol-app:AppModel");function k(r){return r==="selection"||r==="measurement"||r.startsWith("editing-")}class at{_mapRegistry;_vectorSelectionSourceFactory;_httpService;_resources=[];_featureHighlight=void 0;_mainContent=D(["toc"]);_searchSources=R();_selectionSources=R();_sourceMetadata=Ne();_resultListState=D({key:0,open:!1,input:void 0});constructor({references:e}){this._mapRegistry=e.mapRegistry,this._vectorSelectionSourceFactory=e.vectorSelectionSourceFactory,this._httpService=e.httpService,this.initSearchSources(),this.initSelectionSources().catch(o=>{nt.error("Failed to initialize selection sources",o)})}destroy(){this.clearHighlight(),this._resources.forEach(e=>e.destroy())}get mainContent(){return this._mainContent.value}get searchSources(){return this._searchSources}get selectionSources(){return this._selectionSources}get sourceMetadata(){return this._sourceMetadata}get resultListState(){return this._resultListState.value}toggleMainContent(e){const o=this._mainContent.value;if(o.includes(e)){this._mainContent.value=o.filter(n=>n!==e);return}let i;k(e)?(i=[e],this.clearHighlight()):(i=o.filter(n=>!k(n)),i.push(e)),this._mainContent.value=i}hideContent(e){this._mainContent.value=this._mainContent.value.filter(o=>o!==e)}clearInteractions(){this._mainContent.value=this._mainContent.value.filter(e=>!k(e))}setResultListInput(e){const o=this._resultListState.value;this._resultListState.value={open:!0,key:o.key+1,input:e}}setResultListVisibility(e){this._resultListState.value={...this._resultListState.value,open:e}}highlightAndZoom(e,o){const i=e.olMap.getViewport();this.clearHighlight(),this._featureHighlight=e.highlightAndZoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}zoom(e,o){const i=e.olMap.getViewport();e.zoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}clearHighlight(){this._featureHighlight&&(this._featureHighlight.destroy(),this._featureHighlight=void 0)}initSearchSources(){const e=new it("Photon Geocoder",["city","street"],this._httpService);this._searchSources.push(e)}async initSelectionSources(){const e=["ogc_kitas","ogc_kataster"],i=(await this._mapRegistry.expectMapModel(_)).layers.getOperationalLayers({sortByDisplayOrder:!0});for(const n of i){if(!e.includes(n.id)||!st(n.olLayer))continue;const a=this._vectorSelectionSourceFactory.createSelectionSource({vectorLayer:n.olLayer,label:n.title}),s=a.on("changed:status",()=>{a.status!=="available"&&(a.status==="unavailable"||a.status?.kind==="unavailable")&&this.clearHighlight()});this._resources.push(s,a),this._selectionSources.unshift(a),this._sourceMetadata.set(a,n.attributes.resultListMetadata)}}}function st(r){return r instanceof C&&r.getSource()instanceof N}const lt={"ol-map":{name:"ol-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Xe,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppModel:{name:"AppModel",clazz:at,provides:[{name:"ol-app.AppModel",qualifier:void 0}],references:{vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1},{name:"ol-app.AppModel",qualifier:void 0,all:!1},{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"editing.EditingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:re,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:We,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ie,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Ve,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Oe,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:Ue,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:xe,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:we,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},ct='.search-box{position:absolute;width:500px;max-width:100%;z-index:1}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',pt=["en","de"];function dt(r){switch(r){case"en":return E(()=>import("./BYGrfKr5WBJ9.js"),[],import.meta.url).then(e=>e.default);case"de":return E(()=>import("./C-s9YzO5rJEK.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${r}'`)}const ut=U(ct),mt=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:dt,locales:pt,packages:lt,styles:ut},Symbol.toStringTag,{value:"Module"})),B="ol-map",g=ae.bind(void 0,B),u=ne.bind(void 0,B),gt=q("ol-app:Editing");function F(r){const e=ht(r.kind),o=p.useId(),i=u();return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:i.formatMessage({id:"editing.title"})}),children:t.jsxs(d,{overflowY:"auto",maxHeight:300,children:[t.jsx(z,{textAlign:"center",children:i.formatMessage({id:"editing.active"})}),t.jsxs(H,{mt:4,align:"center",justify:"center",children:[t.jsx(I,{onClick:()=>{e?.reset()},children:i.formatMessage({id:"editing.resetGeometry"})}),t.jsx(I,{onClick:()=>{e?.destroy()},children:i.formatMessage({id:"editing.abort"})})]})]})})})}function ht(r){const e=g("notifier.NotificationService"),o=g("editing.EditingService"),i=u(),n=g("ol-app.AppModel"),{map:a}=L(),[s,l]=p.useState();return p.useEffect(()=>{if(!a)return;const c=new ft(e,o,a,i,n,r);return l(c),()=>{c.destroy(),l(void 0)}},[n,o,i,a,e,r]),s}class ft{notificationService;editingService;map;intl;appModel;kind;job;constructor(e,o,i,n,a,s){this.notificationService=e,this.editingService=o,this.map=i,this.intl=n,this.appModel=a,this.kind=s;let l;switch(s){case"create":l=this.createJob();break;case"update":l=this.updateJob();break}this.job=l,this.job.run().catch(c=>{K(c)||(gt.error("Edit operation failed",c),this.notificationService.notify({level:"error",message:this.intl.formatMessage({id:"editing.error"})}))}).finally(()=>{this.destroy()})}destroy(){this.job?.destroy(),this.job=void 0,this.appModel.hideContent(`editing-${this.kind}`)}reset(){this.job?.reset()}createJob(){let e;return{destroy(){e?.stop(),e=void 0},reset(){e?.reset()},run:async()=>{const o=this.findLayer(),i=new URL(o.attributes.collectionURL+"/items");e=this.editingService.createFeature(this.map,i);const n=await e.whenComplete();if(e=void 0,!n)return;this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.create.featureCreated"},{featureId:n.featureId})}),(o?.olLayer).getSource()?.refresh()}}}updateJob(){const e=this.map,o=new AbortController,i=o.signal;let n,a,s;function l(){a&&e.olMap.removeInteraction(a),a&&a.dispose(),n&&n.destroy(),o.abort(),a=void 0,n=void 0}return{destroy(){l(),s?.stop(),s=void 0},reset(){s?.reset()},run:async()=>{const c=this.findLayer(),m=c.olLayer,w=new URL(c.attributes.collectionURL+"/items");a=new Se({layers:[m]}),e.olMap.addInteraction(a),n=bt(this.intl,e.olMap),n.element.classList.remove("editing-tooltip-hidden");let f;for(;;){const{selected:P,deselected:W}=await vt(a,i);if(P.length===1&&W.length===0){l(),f=P[0];break}}if(!f)throw Error("Feature is undefined");s=this.editingService.updateFeature(e,w,f);const S=await s.whenComplete();S&&(this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.update.featureModified"},{featureId:S.featureId})}),m.getSource()?.refresh())}}}findLayer(){const e=this.map.layers.getLayerById("krankenhaus");if(!e)throw new Error("Layer not found");return e}}function bt(r,e){const o=document.createElement("div");o.className="editing-tooltip editing-tooltip-hidden",o.textContent=r.formatMessage({id:"editing.update.tooltip.select"});const i=new ye({element:o,offset:[15,0],positioning:"center-left"}),n=e.on("pointermove",a=>{a.dragging||i.setPosition(a.coordinate)});return e.addOverlay(i),{overlay:i,element:o,destroy(){M(n),e.removeOverlay(i)}}}function vt(r,e){let o;const{promise:i,resolve:n,reject:a}=$();if(e.aborted)return a(A()),i;const s=()=>{o&&M(o),o=void 0,a(A())};return e.addEventListener("abort",s),o=r.on("select",l=>{e.removeEventListener("abort",s),o&&M(o),o=void 0,n(l)}),i}function xt(){const r=u();return t.jsxs(y,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[t.jsx(ke,{precision:2,displayProjectionCode:"EPSG:4326"}),t.jsx(Me,{}),t.jsx(je,{})]})}function wt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"legendTitle"})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(Ce,{showBaseLayers:!0})})})})}function St(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l1.546 -1.311"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-1.185 3.318m-1.062 2.972l-.253 .71"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(r)}function yt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l3.5 -3"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-2.5 7"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]}]})(r)}function kt(){const r=u(),e=g("ol-app.AppModel"),o=b(()=>e.resultListState,[e]),i=o.open,{isTocActive:n,isLegendActive:a,isPrintingActive:s}=b(()=>({isTocActive:e.mainContent.includes("toc"),isLegendActive:e.mainContent.includes("legend"),isPrintingActive:e.mainContent.includes("printing")}),[e]);return t.jsxs(y,{role:"toolbar","aria-label":r.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:[t.jsx(Mt,{}),o.input&&t.jsx(h,{label:r.formatMessage({id:"resultListTitle"}),icon:t.jsx(de,{}),isActive:o.open,onClick:()=>e.setResultListVisibility(!i)}),t.jsx(h,{label:r.formatMessage({id:"tocTitle"}),icon:t.jsx(ue,{}),isActive:n,onClick:()=>e.toggleMainContent("toc")}),t.jsx(h,{label:r.formatMessage({id:"legendTitle"}),icon:t.jsx(me,{}),isActive:a,onClick:()=>e.toggleMainContent("legend")}),t.jsx(h,{label:r.formatMessage({id:"printingTitle"}),icon:t.jsx(ge,{}),isActive:s,onClick:()=>e.toggleMainContent("printing")}),t.jsx(He,{}),t.jsx(Ge,{}),t.jsx(Be,{})]})}function Mt(){const r=u(),e=g("ol-app.AppModel"),[o,i]=p.useState(!1),{isSelectionActive:n,isMeasurementActive:a,isEditingCreateActive:s,isEditingUpdateActive:l}=b(()=>({isSelectionActive:e.mainContent.includes("selection"),isMeasurementActive:e.mainContent.includes("measurement"),isEditingCreateActive:e.mainContent.includes("editing-create"),isEditingUpdateActive:e.mainContent.includes("editing-update")}),[e]),c=f=>()=>{f(),i(!1)},m={placement:"top"},w=t.jsxs(t.Fragment,{children:[t.jsx(h,{label:s?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.create.startTitle"}),icon:s?t.jsx(St,{}):t.jsx(yt,{}),isActive:s,onClick:c(()=>e.toggleMainContent("editing-create")),tooltipProps:m}),t.jsx(h,{label:l?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.update.startTitle"}),icon:l?t.jsx(he,{}):t.jsx(fe,{}),isActive:l,onClick:c(()=>e.toggleMainContent("editing-update")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"measurementTitle"}),icon:t.jsx(be,{}),isActive:a,onClick:c(()=>e.toggleMainContent("measurement")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"selectionTitle"}),icon:t.jsx(ve,{}),isActive:n,onClick:c(()=>e.toggleMainContent("selection")),tooltipProps:m})]});return t.jsxs(Te,{placement:"left",isLazy:!0,onOpen:()=>i(!0),onClose:()=>i(!1),isOpen:o,children:[t.jsx(De,{children:t.jsx(jt,{})}),t.jsx(Z,{children:t.jsxs(Re,{width:"auto",children:[t.jsx(Ee,{}),t.jsx(Fe,{children:t.jsx(H,{spacing:2,children:w})})]})})]})}const jt=p.forwardRef(function(e,o){const i=u(),n=Ae(),{onClick:a,...s}=n.getTriggerProps();return t.jsx(h,{ref:o,label:i.formatMessage({id:"mapInteractions.title"}),icon:t.jsx(pe,{}),onClick:a,buttonProps:s})});function Ct(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"measurementTitle"})}),children:t.jsx(Le,{})})})}function Lt(){const r=g("ol-app.AppModel"),e=b(()=>r.resultListState,[r]),[o,i]=p.useState([]),[n,a]=p.useState([]),s=p.useCallback(l=>{i(l.features),a(l.getFeatureIds())},[]);return p.useEffect(()=>{console.log("Anzahl Features: "+o.length),console.log("SelectedIds: "+n.toString())},[o,n]),e.input&&t.jsx(d,{className:"result-list-container",position:"absolute",visibility:e.open?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderBottom:"2px solid",borderColor:"trails.100",children:t.jsx(Ke,{input:e.input,onSelectionChange:s},e.key)})}function zt(){const{map:r}=L(),e=g("ol-app.AppModel"),o=b(()=>e.searchSources.getItems(),[e]);function i(a){if(console.debug("The user selected the following item: ",a.result),!r)return;const s=a.result.geometry;s&&e.highlightAndZoom(r,[s])}function n(){console.debug("The user cleared the search"),e.clearHighlight()}return t.jsx(d,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",mt:5,className:"search-box",children:t.jsx(ze,{sources:o,maxResultsPerGroup:10,onSelect:i,onClear:n})})}function _t(){const r=u(),e=g("notifier.NotificationService"),o=p.useId(),{map:i}=L(),n=g("ol-app.AppModel"),a=b(()=>n.selectionSources.getItems(),[n]),s={numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}};function l(m){const{source:w,results:f}=m;if(!i){console.debug("Map not ready");return}const S=n.sourceMetadata.get(w);if(!S){console.warn("Can not show results because no metadata could be found");return}n.setResultListInput({columns:S,data:f,formatOptions:s}),e.notify({level:"info",message:r.formatMessage({id:"foundResults"},{resultsCount:f.length}),displayDuration:4e3})}function c(m){n.clearHighlight()}return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:r.formatMessage({id:"selectionTitle"})}),children:t.jsx(_e,{sources:a,onSelectionComplete:l,onSelectionSourceChanged:c})})})}function Pt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:t.jsx(z,{children:e.formatMessage({id:"tocTitle"})})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(qe,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}function It(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"printingTitle"})}),children:t.jsx(Pe,{})})})}function At(){const r=u(),e=g("ol-app.AppModel"),{resultListState:o,mainContent:i}=b(()=>({resultListState:e.resultListState,mainContent:e.mainContent}),[e]),n=o.input&&o.open;return t.jsx(se,{mapId:_,children:t.jsxs(y,{height:"100%",direction:"column",overflow:"hidden",children:[t.jsx(Ie,{position:"top-right"}),t.jsxs(v,{title:t.jsx(d,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:t.jsx(x,{size:"md",children:"Sample Application"})}),children:[t.jsx(y,{flex:"1",direction:"column",position:"relative",children:t.jsxs(le,{role:"main","aria-label":r.formatMessage({id:"ariaLabel.map"}),viewPadding:n?{bottom:400}:void 0,children:[t.jsx($e,{centerContent:!0,children:t.jsx(zt,{})}),t.jsx(Tt,{mainContent:i}),t.jsx(ce,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:t.jsx(kt,{})}),t.jsx(Lt,{})]})}),t.jsx(xt,{})]})]})})}function Tt(r){const{mainContent:e}=r,o=p.useMemo(()=>{const i=n=>{switch(n){case"toc":return t.jsx(Pt,{},n);case"legend":return t.jsx(wt,{},n);case"printing":return t.jsx(It,{},n);case"selection":return t.jsx(_t,{},n);case"measurement":return t.jsx(Ct,{},n);case"editing-create":return t.jsx(F,{kind:"create"},n);case"editing-update":return t.jsx(F,{kind:"update"},n)}};return e.map(n=>i(n))},[e]);return t.jsx(Dt,{children:o})}function Dt(r){const e=r.children,o=[];for(const i of e)i&&(o.length&&o.push(t.jsx(Ze,{mt:4,mb:4},o.length)),o.push(i));if(o.length!==0)return t.jsx(d,{position:"absolute",top:"100px",left:4,maxHeight:"calc(100% - 140px)",width:350,maxWidth:350,zIndex:1,backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",overflow:"auto",children:o})}const Rt=new URLSearchParams(window.location.search),Et=Rt.get("lang")||void 0,Ft=Y({component:At,appMetadata:mt,config:{locale:Et,properties:{"@open-pioneer/local-storage":{storageId:"ol-app-state"}}}});customElements.define("ol-map-app",Ft); +import{j as t,c as q,a as U,r as p,B as I,i as K,b as $,d as A,F as Z,e as Y}from"./CzUo6bX8-UUU.js";import{B as d,V as J,S as j,T as X,O as Q,a as C,b as N,c as ee,C as te,F as oe,H as re,M as ie,u as ne,d as ae,e as v,f as x,g as L,h as M,i as y,D as se,j as le,k as ce}from"./B36mctiVgF5V.js";import{W as V,P as pe,a as de,b as ue,c as me,d as ge,e as he,f as fe,g as be,h as ve}from"./kPJ9UZ8lVIau.js";import{W as T,E as xe,V as we,S as Se,O as ye,C as ke,a as Me,b as je,L as Ce,M as Le,c as ze,d as _e,P as Pe,N as Ie}from"./CtkSqPB4B2ET.js";import{G as O,u as Ae,T as h,P as Te,a as De,b as Re,c as Ee,d as Fe,e as qe}from"./C1o_VwAkx5Nm.js";import{T as z}from"./CovJx79h1x39.js";import{r as D,a as R,b as Ne,V as Ve,S as Oe,u as b,I as He,Z as Ge,c as Be}from"./BUCtgDDw782G.js";import{N as We,P as Ue}from"./BZqu8ZKsC5y7.js";import{_ as E}from"./CmsKOCeNyeyo.js";import{H}from"./_YjaCHRtWzU8.js";import{G}from"./CkG3hRXjrvfc.js";import{R as Ke}from"./K_sKz2BiM23b.js";import{C as $e}from"./CdXIVWNpc0nj.js";import{D as Ze}from"./_05fvbTuDT_t.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./E5Cg9XwqIVqj.js";import"./SSUBJAaBGB7g.js";import"./0jkoYKtubXoE.js";import"./DAtS2L2h2gmX.js";import"./BSX9fy8BsUsv.js";import"./C41Ku2EWcQEd.js";import"./DXNMkmWkGPwJ.js";import"./DgJGd2MHfhXI.js";const Ye={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function Je(r){return t.jsxs(d,{children:[t.jsx(z,{children:r.layer.title}),t.jsx(d,{style:Ye})]})}const _="main";class Xe{mapId=_;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{advanced:{view:new J({center:[404747,5757920],zoom:13,constrainResolution:!0,projection:"EPSG:25832"})},layers:[...Qe(),ot(),et(this.vectorSourceFactory),tt(),rt()]}}}function Qe(){return[new T({isBaseLayer:!0,title:"Topplus grau",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_grau",matrixSet:"EPSG_25832_14",visible:!1,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new T({isBaseLayer:!0,title:"Topplus farbig",url:"https://www.wmts.nrw.de/topplus_open/1.0.0/WMTSCapabilities.xml",name:"topplus_col",matrixSet:"EPSG_25832_14",visible:!0,sourceOptions:{attributions:`Kartendarstellung und Präsentationsgraphiken: © Bundesamt für Kartographie und Geodäsie ${new Date().getFullYear()}, Datenquellen`}}),new j({title:"OpenStreetMaps",visible:!1,isBaseLayer:!0,olLayer:new X({source:new Q})})]}function et(r){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",i=r.createVectorSource({strategy:"next",baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/25832",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),n=new C({source:i});return new j({id:"krankenhaus",title:"Krankenhäuser",visible:!1,olLayer:n,attributes:{collectionURL:e+"/collections/"+o}})}function tt(){return new V({title:"Schulstandorte",description:"Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.Der vorliegende Datenbestand / Dienst zu den Schulstandorten in NRW stammt aus der Schuldatenbank. Die Informationen werden von den Schulträgern bzw. Schulen selbst eingetragen und aktuell gehalten. Die Daten werden tagesaktuell bereitgestellt und enthalten alle grundlegenden Informationen zu Schulen wie Schulnummer, Schulbezeichnung und Adresse.",visible:!0,url:"https://www.wms.nrw.de/wms/wms_nw_inspire-schulen",sublayers:[{name:"US.education",title:"INSPIRE - WMS Schulstandorte NRW",attributes:{legend:{}}}],sourceOptions:{ratio:1}})}function ot(){return new V({title:"Straßennetz Landesbetrieb Straßenbau NRW",url:"https://www.wms.nrw.de/wms/strassen_nrw_wms",visible:!0,sublayers:[{name:"1",title:"Verwaltungen",attributes:{legend:{imageUrl:"https://www.wms.nrw.de/legends/wms/strassen_nrw_wms/1.png"}}},{name:"4",title:"Abschnitte und Äste"},{name:"6",title:"Unfälle"}]})}function rt(){const r={Component:Je},e=new N({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new O,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),o=new C({source:e,style:new ee({image:new te({fill:new oe({color:"blue"}),radius:4})})});return new j({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:o,attributes:{legend:r,resultListMetadata:[{id:"id",displayName:"ID",width:100,getPropertyValue(i){return i.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(i){switch(i.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return i.properties?.gefoerdert}}}]}})}class it{label;filteredTypes;httpService;constructor(e,o,i){this.label=e,this.filteredTypes=o,this.httpService=i}async search(e,{mapProjection:o,signal:i}){const n=await this.request(e,100,i),a=new O({dataProjection:"EPSG:4326",featureProjection:o});return n.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,l)=>{const c=a.readGeometry(s.geometry);return{id:s.properties.osm_id||l,label:this.createLabel(s),geometry:c,properties:s.properties}})}async request(e,o,i){const n=new URL("https://photon.komoot.io/api?");n.searchParams.set("q",e),n.searchParams.set("lang","de"),n.searchParams.set("lat","51.961563"),n.searchParams.set("lon","7.628202"),n.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(n,{signal:i});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}const nt=q("ol-app:AppModel");function k(r){return r==="selection"||r==="measurement"||r.startsWith("editing-")}class at{_mapRegistry;_vectorSelectionSourceFactory;_httpService;_resources=[];_featureHighlight=void 0;_mainContent=D(["toc"]);_searchSources=R();_selectionSources=R();_sourceMetadata=Ne();_resultListState=D({key:0,open:!1,input:void 0});constructor({references:e}){this._mapRegistry=e.mapRegistry,this._vectorSelectionSourceFactory=e.vectorSelectionSourceFactory,this._httpService=e.httpService,this.initSearchSources(),this.initSelectionSources().catch(o=>{nt.error("Failed to initialize selection sources",o)})}destroy(){this.clearHighlight(),this._resources.forEach(e=>e.destroy())}get mainContent(){return this._mainContent.value}get searchSources(){return this._searchSources}get selectionSources(){return this._selectionSources}get sourceMetadata(){return this._sourceMetadata}get resultListState(){return this._resultListState.value}toggleMainContent(e){const o=this._mainContent.value;if(o.includes(e)){this._mainContent.value=o.filter(n=>n!==e);return}let i;k(e)?(i=[e],this.clearHighlight()):(i=o.filter(n=>!k(n)),i.push(e)),this._mainContent.value=i}hideContent(e){this._mainContent.value=this._mainContent.value.filter(o=>o!==e)}clearInteractions(){this._mainContent.value=this._mainContent.value.filter(e=>!k(e))}setResultListInput(e){const o=this._resultListState.value;this._resultListState.value={open:!0,key:o.key+1,input:e}}setResultListVisibility(e){this._resultListState.value={...this._resultListState.value,open:e}}highlightAndZoom(e,o){const i=e.olMap.getViewport();this.clearHighlight(),this._featureHighlight=e.highlightAndZoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}zoom(e,o){const i=e.olMap.getViewport();e.zoom(o,{viewPadding:i&&i.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}clearHighlight(){this._featureHighlight&&(this._featureHighlight.destroy(),this._featureHighlight=void 0)}initSearchSources(){const e=new it("Photon Geocoder",["city","street"],this._httpService);this._searchSources.push(e)}async initSelectionSources(){const e=["ogc_kitas","ogc_kataster"],i=(await this._mapRegistry.expectMapModel(_)).layers.getOperationalLayers({sortByDisplayOrder:!0});for(const n of i){if(!e.includes(n.id)||!st(n.olLayer))continue;const a=this._vectorSelectionSourceFactory.createSelectionSource({vectorLayer:n.olLayer,label:n.title}),s=a.on("changed:status",()=>{a.status!=="available"&&(a.status==="unavailable"||a.status?.kind==="unavailable")&&this.clearHighlight()});this._resources.push(s,a),this._selectionSources.unshift(a),this._sourceMetadata.set(a,n.attributes.resultListMetadata)}}}function st(r){return r instanceof C&&r.getSource()instanceof N}const lt={"ol-map":{name:"ol-map",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:Xe,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppModel:{name:"AppModel",clazz:at,provides:[{name:"ol-app.AppModel",qualifier:void 0}],references:{vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1},{name:"ol-app.AppModel",qualifier:void 0,all:!1},{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"editing.EditingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:re,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:We,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:ie,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Ve,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Oe,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:Ue,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:xe,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:we,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}}},ct='.search-box{position:absolute;width:500px;max-width:100%;z-index:1}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',pt=["en","de"];function dt(r){switch(r){case"en":return E(()=>import("./BYGrfKr5WBJ9.js"),[],import.meta.url).then(e=>e.default);case"de":return E(()=>import("./C-s9YzO5rJEK.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${r}'`)}const ut=U(ct),mt=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:dt,locales:pt,packages:lt,styles:ut},Symbol.toStringTag,{value:"Module"})),B="ol-map",g=ae.bind(void 0,B),u=ne.bind(void 0,B),gt=q("ol-app:Editing");function F(r){const e=ht(r.kind),o=p.useId(),i=u();return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:i.formatMessage({id:"editing.title"})}),children:t.jsxs(d,{overflowY:"auto",maxHeight:300,children:[t.jsx(z,{textAlign:"center",children:i.formatMessage({id:"editing.active"})}),t.jsxs(H,{mt:4,align:"center",justify:"center",children:[t.jsx(I,{onClick:()=>{e?.reset()},children:i.formatMessage({id:"editing.resetGeometry"})}),t.jsx(I,{onClick:()=>{e?.destroy()},children:i.formatMessage({id:"editing.abort"})})]})]})})})}function ht(r){const e=g("notifier.NotificationService"),o=g("editing.EditingService"),i=u(),n=g("ol-app.AppModel"),{map:a}=L(),[s,l]=p.useState();return p.useEffect(()=>{if(!a)return;const c=new ft(e,o,a,i,n,r);return l(c),()=>{c.destroy(),l(void 0)}},[n,o,i,a,e,r]),s}class ft{notificationService;editingService;map;intl;appModel;kind;job;constructor(e,o,i,n,a,s){this.notificationService=e,this.editingService=o,this.map=i,this.intl=n,this.appModel=a,this.kind=s;let l;switch(s){case"create":l=this.createJob();break;case"update":l=this.updateJob();break}this.job=l,this.job.run().catch(c=>{K(c)||(gt.error("Edit operation failed",c),this.notificationService.notify({level:"error",message:this.intl.formatMessage({id:"editing.error"})}))}).finally(()=>{this.destroy()})}destroy(){this.job?.destroy(),this.job=void 0,this.appModel.hideContent(`editing-${this.kind}`)}reset(){this.job?.reset()}createJob(){let e;return{destroy(){e?.stop(),e=void 0},reset(){e?.reset()},run:async()=>{const o=this.findLayer(),i=new URL(o.attributes.collectionURL+"/items");e=this.editingService.createFeature(this.map,i);const n=await e.whenComplete();if(e=void 0,!n)return;this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.create.featureCreated"},{featureId:n.featureId})}),(o?.olLayer).getSource()?.refresh()}}}updateJob(){const e=this.map,o=new AbortController,i=o.signal;let n,a,s;function l(){a&&e.olMap.removeInteraction(a),a&&a.dispose(),n&&n.destroy(),o.abort(),a=void 0,n=void 0}return{destroy(){l(),s?.stop(),s=void 0},reset(){s?.reset()},run:async()=>{const c=this.findLayer(),m=c.olLayer,w=new URL(c.attributes.collectionURL+"/items");a=new Se({layers:[m]}),e.olMap.addInteraction(a),n=bt(this.intl,e.olMap),n.element.classList.remove("editing-tooltip-hidden");let f;for(;;){const{selected:P,deselected:W}=await vt(a,i);if(P.length===1&&W.length===0){l(),f=P[0];break}}if(!f)throw Error("Feature is undefined");s=this.editingService.updateFeature(e,w,f);const S=await s.whenComplete();S&&(this.notificationService.notify({level:"info",message:this.intl.formatMessage({id:"editing.update.featureModified"},{featureId:S.featureId})}),m.getSource()?.refresh())}}}findLayer(){const e=this.map.layers.getLayerById("krankenhaus");if(!e)throw new Error("Layer not found");return e}}function bt(r,e){const o=document.createElement("div");o.className="editing-tooltip editing-tooltip-hidden",o.textContent=r.formatMessage({id:"editing.update.tooltip.select"});const i=new ye({element:o,offset:[15,0],positioning:"center-left"}),n=e.on("pointermove",a=>{a.dragging||i.setPosition(a.coordinate)});return e.addOverlay(i),{overlay:i,element:o,destroy(){M(n),e.removeOverlay(i)}}}function vt(r,e){let o;const{promise:i,resolve:n,reject:a}=$();if(e.aborted)return a(A()),i;const s=()=>{o&&M(o),o=void 0,a(A())};return e.addEventListener("abort",s),o=r.on("select",l=>{e.removeEventListener("abort",s),o&&M(o),o=void 0,n(l)}),i}function xt(){const r=u();return t.jsxs(y,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.footer"}),gap:3,alignItems:"center",justifyContent:"center",children:[t.jsx(ke,{precision:2,displayProjectionCode:"EPSG:4326"}),t.jsx(Me,{}),t.jsx(je,{})]})}function wt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"legendTitle"})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(Ce,{showBaseLayers:!0})})})})}function St(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l1.546 -1.311"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-1.185 3.318m-1.062 2.972l-.253 .71"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(r)}function yt(r){return G({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6.5 9.5l3.5 -3"},child:[]},{tag:"path",attr:{d:"M14 5.5l3 1.5"},child:[]},{tag:"path",attr:{d:"M18.5 10l-2.5 7"},child:[]},{tag:"path",attr:{d:"M13.5 17.5l-7 -5"},child:[]}]})(r)}function kt(){const r=u(),e=g("ol-app.AppModel"),o=b(()=>e.resultListState,[e]),i=o.open,{isTocActive:n,isLegendActive:a,isPrintingActive:s}=b(()=>({isTocActive:e.mainContent.includes("toc"),isLegendActive:e.mainContent.includes("legend"),isPrintingActive:e.mainContent.includes("printing")}),[e]);return t.jsxs(y,{role:"toolbar","aria-label":r.formatMessage({id:"ariaLabel.toolbar"}),direction:"column",gap:1,padding:1,children:[t.jsx(Mt,{}),o.input&&t.jsx(h,{label:r.formatMessage({id:"resultListTitle"}),icon:t.jsx(de,{}),isActive:o.open,onClick:()=>e.setResultListVisibility(!i)}),t.jsx(h,{label:r.formatMessage({id:"tocTitle"}),icon:t.jsx(ue,{}),isActive:n,onClick:()=>e.toggleMainContent("toc")}),t.jsx(h,{label:r.formatMessage({id:"legendTitle"}),icon:t.jsx(me,{}),isActive:a,onClick:()=>e.toggleMainContent("legend")}),t.jsx(h,{label:r.formatMessage({id:"printingTitle"}),icon:t.jsx(ge,{}),isActive:s,onClick:()=>e.toggleMainContent("printing")}),t.jsx(He,{}),t.jsx(Ge,{}),t.jsx(Be,{})]})}function Mt(){const r=u(),e=g("ol-app.AppModel"),[o,i]=p.useState(!1),{isSelectionActive:n,isMeasurementActive:a,isEditingCreateActive:s,isEditingUpdateActive:l}=b(()=>({isSelectionActive:e.mainContent.includes("selection"),isMeasurementActive:e.mainContent.includes("measurement"),isEditingCreateActive:e.mainContent.includes("editing-create"),isEditingUpdateActive:e.mainContent.includes("editing-update")}),[e]),c=f=>()=>{f(),i(!1)},m={placement:"top"},w=t.jsxs(t.Fragment,{children:[t.jsx(h,{label:s?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.create.startTitle"}),icon:s?t.jsx(St,{}):t.jsx(yt,{}),isActive:s,onClick:c(()=>e.toggleMainContent("editing-create")),tooltipProps:m}),t.jsx(h,{label:l?r.formatMessage({id:"editing.stopTitle"}):r.formatMessage({id:"editing.update.startTitle"}),icon:l?t.jsx(he,{}):t.jsx(fe,{}),isActive:l,onClick:c(()=>e.toggleMainContent("editing-update")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"measurementTitle"}),icon:t.jsx(be,{}),isActive:a,onClick:c(()=>e.toggleMainContent("measurement")),tooltipProps:m}),t.jsx(h,{label:r.formatMessage({id:"selectionTitle"}),icon:t.jsx(ve,{}),isActive:n,onClick:c(()=>e.toggleMainContent("selection")),tooltipProps:m})]});return t.jsxs(Te,{placement:"left",isLazy:!0,onOpen:()=>i(!0),onClose:()=>i(!1),isOpen:o,children:[t.jsx(De,{children:t.jsx(jt,{})}),t.jsx(Z,{children:t.jsxs(Re,{width:"auto",children:[t.jsx(Ee,{}),t.jsx(Fe,{children:t.jsx(H,{spacing:2,children:w})})]})})]})}const jt=p.forwardRef(function(e,o){const i=u(),n=Ae(),{onClick:a,...s}=n.getTriggerProps();return t.jsx(h,{ref:o,label:i.formatMessage({id:"mapInteractions.title"}),icon:t.jsx(pe,{}),onClick:a,buttonProps:s})});function Ct(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"measurementTitle"})}),children:t.jsx(Le,{})})})}function Lt(){const r=g("ol-app.AppModel"),e=b(()=>r.resultListState,[r]),[o,i]=p.useState([]),[n,a]=p.useState([]),s=p.useCallback(l=>{i(l.features),a(l.getFeatureIds())},[]);return p.useEffect(()=>{console.log("Anzahl Features: "+o.length),console.log("SelectedIds: "+n.toString())},[o,n]),e.input&&t.jsx(d,{className:"result-list-container",position:"absolute",visibility:e.open?"visible":"hidden",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderBottom:"2px solid",borderColor:"trails.100",children:t.jsx(Ke,{input:e.input,onSelectionChange:s},e.key)})}function zt(){const{map:r}=L(),e=g("ol-app.AppModel"),o=b(()=>e.searchSources.getItems(),[e]);function i(a){if(console.debug("The user selected the following item: ",a.result),!r)return;const s=a.result.geometry;s&&e.highlightAndZoom(r,[s])}function n(){console.debug("The user cleared the search"),e.clearHighlight()}return t.jsx(d,{backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",mt:5,className:"search-box",children:t.jsx(ze,{sources:o,maxResultsPerGroup:10,onSelect:i,onClear:n})})}function _t(){const r=u(),e=g("notifier.NotificationService"),o=p.useId(),{map:i}=L(),n=g("ol-app.AppModel"),a=b(()=>n.selectionSources.getItems(),[n]),s={numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}};function l(m){const{source:w,results:f}=m;if(!i){console.debug("Map not ready");return}const S=n.sourceMetadata.get(w);if(!S){console.warn("Can not show results because no metadata could be found");return}n.setResultListInput({columns:S,data:f,formatOptions:s}),e.notify({level:"info",message:r.formatMessage({id:"foundResults"},{resultsCount:f.length}),displayDuration:4e3})}function c(m){n.clearHighlight()}return t.jsx(d,{role:"dialog","aria-labelledby":o,children:t.jsx(v,{title:t.jsx(x,{id:o,size:"md",mb:2,children:r.formatMessage({id:"selectionTitle"})}),children:t.jsx(_e,{sources:a,onSelectionComplete:l,onSelectionSourceChanged:c})})})}function Pt(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:t.jsx(z,{children:e.formatMessage({id:"tocTitle"})})}),children:t.jsx(d,{overflowY:"auto",maxHeight:300,children:t.jsx(qe,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})})})}function It(){const r=p.useId(),e=u();return t.jsx(d,{role:"dialog","aria-labelledby":r,children:t.jsx(v,{title:t.jsx(x,{id:r,size:"md",mb:2,children:e.formatMessage({id:"printingTitle"})}),children:t.jsx(Pe,{})})})}function At(){const r=u(),e=g("ol-app.AppModel"),{resultListState:o,mainContent:i}=b(()=>({resultListState:e.resultListState,mainContent:e.mainContent}),[e]),n=o.input&&o.open;return t.jsx(se,{mapId:_,children:t.jsxs(y,{height:"100%",direction:"column",overflow:"hidden",children:[t.jsx(Ie,{position:"top-right"}),t.jsxs(v,{title:t.jsx(d,{role:"region","aria-label":r.formatMessage({id:"ariaLabel.header"}),textAlign:"center",py:1,children:t.jsx(x,{size:"md",children:"Sample Application"})}),children:[t.jsx(y,{flex:"1",direction:"column",position:"relative",children:t.jsxs(le,{role:"main","aria-label":r.formatMessage({id:"ariaLabel.map"}),viewPadding:n?{bottom:400}:void 0,children:[t.jsx($e,{centerContent:!0,children:t.jsx(zt,{})}),t.jsx(Tt,{mainContent:i}),t.jsx(ce,{position:"bottom-right",horizontalGap:10,verticalGap:45,children:t.jsx(kt,{})}),t.jsx(Lt,{})]})}),t.jsx(xt,{})]})]})})}function Tt(r){const{mainContent:e}=r,o=p.useMemo(()=>{const i=n=>{switch(n){case"toc":return t.jsx(Pt,{},n);case"legend":return t.jsx(wt,{},n);case"printing":return t.jsx(It,{},n);case"selection":return t.jsx(_t,{},n);case"measurement":return t.jsx(Ct,{},n);case"editing-create":return t.jsx(F,{kind:"create"},n);case"editing-update":return t.jsx(F,{kind:"update"},n)}};return e.map(n=>i(n))},[e]);return t.jsx(Dt,{children:o})}function Dt(r){const e=r.children,o=[];for(const i of e)i&&(o.length&&o.push(t.jsx(Ze,{mt:4,mb:4},o.length)),o.push(i));if(o.length!==0)return t.jsx(d,{position:"absolute",top:"100px",left:4,maxHeight:"calc(100% - 140px)",width:350,maxWidth:350,zIndex:1,backgroundColor:"white",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",overflow:"auto",children:o})}const Rt=new URLSearchParams(window.location.search),Et=Rt.get("lang")||void 0,Ft=Y({component:At,appMetadata:mt,config:{locale:Et,properties:{"@open-pioneer/local-storage":{storageId:"ol-app-state"}}}});customElements.define("ol-map-app",Ft); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/HtWnt4Af3rFB.js b/openlayers-base-packages/pr-previews/pr-355/assets/CsoHcLCCE1Em.js similarity index 96% rename from openlayers-base-packages/pr-previews/pr-355/assets/HtWnt4Af3rFB.js rename to openlayers-base-packages/pr-previews/pr-355/assets/CsoHcLCCE1Em.js index 50cffe4..3097692 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/HtWnt4Af3rFB.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/CsoHcLCCE1Em.js @@ -1 +1 @@ -var fo=Object.defineProperty;var pt=t=>{throw TypeError(t)};var vo=(t,e,o)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var y=(t,e,o)=>vo(t,typeof e!="symbol"?e+"":e,o),$e=(t,e,o)=>e.has(t)||pt("Cannot "+o);var l=(t,e,o)=>($e(t,e,"read from private field"),o?o.call(t):e.get(t)),h=(t,e,o)=>e.has(t)?pt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),v=(t,e,o,r)=>($e(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),S=(t,e,o)=>($e(t,e,"access private method"),o);import{f as bo,h as B,u as wo,o as yo,k as Ce,r as b,j as n,l as Le,c as je,B as Y,F as Pt,A as Ke,m as Ye,n as Tt,E as R,a as xo,e as So}from"./CzUo6bX8-UUU.js";import{aF as ko,aG as Io,P as Mo,N as X,aH as Eo,aI as _o,ap as Co,aJ as Lo,aK as jo,aL as Ao,E as Po,at as To,aM as ht,aN as Ro,aO as No,aP as mt,aQ as Vo,aR as Do,aS as Ze,V as Rt,aT as gt,Z as Oo,a3 as Fo,aU as Go,a1 as zo,aV as Bo,aW as Ho,aX as Uo,aY as Wo,aZ as ft,h as we,B as V,S as tt,T as Nt,O as Vt,a as ot,b as Dt,a_ as ge,g as ee,d as rt,u as Ae,a$ as vt,b0 as qo,ao as $o,c as Ot,C as Ko,F as Ft,ay as Gt,b1 as Yo,b2 as Zo,b3 as Xo,b4 as Jo,i as L,b5 as Qo,b6 as er,e as Ne,f as Je,H as tr,M as or,D as rr,j as ir,k as bt}from"./B36mctiVgF5V.js";import{W as nr,i as ar,j as zt}from"./kPJ9UZ8lVIau.js";import{O as Bt,W as sr,c as lr,u as cr,I as Ht,e as dr,C as ur,b as pr,a as hr,M as mr,P as gr,L as fr,d as vr,S as br,E as wr,V as yr,f as Ut,N as xr}from"./CtkSqPB4B2ET.js";import{G as Wt,T as Sr,e as kr}from"./C1o_VwAkx5Nm.js";import{g as Ir,c as Mr,T as Ue,V as Qe,L as Er}from"./CovJx79h1x39.js";import{b as _r,r as J,u as Q,a as Cr,w as qt,Z as Lr,c as jr,I as Ar,H as Pr,d as Tr,e as Rr,f as Nr,V as Vr,S as Dr}from"./BUCtgDDw782G.js";import{G as Or}from"./CkG3hRXjrvfc.js";import{c as it}from"./SSUBJAaBGB7g.js";import{M as Fr,a as Gr,b as zr}from"./DgJGd2MHfhXI.js";import{M as Br}from"./C41Ku2EWcQEd.js";import{S as Hr}from"./BSX9fy8BsUsv.js";import{u as $t}from"./E5Cg9XwqIVqj.js";import{r as Ur}from"./_05fvbTuDT_t.js";import{I as wt}from"./XuMECp8BqZmI.js";import{R as Wr}from"./K_sKz2BiM23b.js";import{N as qr,P as $r}from"./BZqu8ZKsC5y7.js";import{_ as yt}from"./CmsKOCeNyeyo.js";import{F as Kr}from"./0jkoYKtubXoE.js";import{H as Yr}from"./_YjaCHRtWzU8.js";import{F as Zr}from"./DAtS2L2h2gmX.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./DXNMkmWkGPwJ.js";var[Xr,Kt]=bo({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),nt=B(function(e,o){const r=wo("Input",e),{children:i,className:a,...s}=yo(e),c=Ce("chakra-input__group",a),d={},u=Ir(i),p=r.field;u.forEach(m=>{var f,w;r&&(p&&m.type.id==="InputLeftElement"&&(d.paddingStart=(f=p.height)!=null?f:p.h),p&&m.type.id==="InputRightElement"&&(d.paddingEnd=(w=p.height)!=null?w:p.h),m.type.id==="InputRightAddon"&&(d.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const g=u.map(m=>{var f,w;const j=Mr({size:((f=m.props)==null?void 0:f.size)||e.size,variant:((w=m.props)==null?void 0:w.variant)||e.variant});return m.type.id!=="Input"?b.cloneElement(m,j):b.cloneElement(m,Object.assign(j,d,m.props))});return n.jsx(Le.div,{className:c,ref:o,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...s,children:n.jsx(Xr,{value:r,children:g})})});nt.displayName="InputGroup";var Jr={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Qr=Le("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),at=B(function(e,o){var r;const{placement:i="left",...a}=e,s=(r=Jr[i])!=null?r:{},c=Kt();return n.jsx(Qr,{ref:o,...a,__css:{...c.addon,...s}})});at.displayName="InputAddon";var Yt=B(function(e,o){return n.jsx(at,{ref:o,placement:"left",...e,className:Ce("chakra-input__left-addon",e.className)})});Yt.displayName="InputLeftAddon";Yt.id="InputLeftAddon";var st=B(function(e,o){return n.jsx(at,{ref:o,placement:"right",...e,className:Ce("chakra-input__right-addon",e.className)})});st.displayName="InputRightAddon";st.id="InputRightAddon";var ei=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),We=B(function(e,o){var r,i;const{placement:a="left",...s}=e,c=Kt(),d=c.field,p={[a==="left"?"insetStart":"insetEnd"]:"0",width:(r=d?.height)!=null?r:d?.h,height:(i=d?.height)!=null?i:d?.h,fontSize:d?.fontSize,...c.element};return n.jsx(ei,{ref:o,__css:p,...s})});We.id="InputElement";We.displayName="InputElement";var Zt=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__left-element",r);return n.jsx(We,{ref:o,placement:"left",className:a,...i})});Zt.id="InputLeftElement";Zt.displayName="InputLeftElement";var Ve=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__right-element",r);return n.jsx(We,{ref:o,placement:"right",className:a,...i})});Ve.id="InputRightElement";Ve.displayName="InputRightElement";var Xt=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Xt.displayName="Center";var ti={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};B(function(e,o){const{axis:r="both",...i}=e;return n.jsx(Le.div,{ref:o,__css:ti[r],...i,position:"absolute"})});const x={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},oi={ERROR:"error"};class ri extends Co{constructor(e){super(oi.ERROR),this.code=e.code,this.message=e.message}}let ii=class extends ko{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=Io,this.watchId_=void 0,this.addChangeListener(x.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(x.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const e=this.getProjection();e&&(this.transform_=Mo(X("EPSG:4326"),e),this.position_&&this.set(x.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){const o=e.coords;this.set(x.ACCURACY,o.accuracy),this.set(x.ALTITUDE,o.altitude===null?void 0:o.altitude),this.set(x.ALTITUDE_ACCURACY,o.altitudeAccuracy===null?void 0:o.altitudeAccuracy),this.set(x.HEADING,o.heading===null?void 0:Eo(o.heading)),this.position_?(this.position_[0]=o.longitude,this.position_[1]=o.latitude):this.position_=[o.longitude,o.latitude];const r=this.transform_(this.position_);this.set(x.POSITION,r.slice()),this.set(x.SPEED,o.speed===null?void 0:o.speed);const i=_o(this.position_,o.accuracy);i.applyTransform(this.transform_),this.set(x.ACCURACY_GEOMETRY,i),this.changed()}positionError_(e){this.dispatchEvent(new ri(e))}getAccuracy(){return this.get(x.ACCURACY)}getAccuracyGeometry(){return this.get(x.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(x.ALTITUDE)}getAltitudeAccuracy(){return this.get(x.ALTITUDE_ACCURACY)}getHeading(){return this.get(x.HEADING)}getPosition(){return this.get(x.POSITION)}getProjection(){return this.get(x.PROJECTION)}getSpeed(){return this.get(x.SPEED)}getTracking(){return this.get(x.TRACKING)}getTrackingOptions(){return this.get(x.TRACKING_OPTIONS)}setProjection(e){this.set(x.PROJECTION,X(e))}setTracking(e){this.set(x.TRACKING,e)}setTrackingOptions(e){this.set(x.TRACKING_OPTIONS,e)}};const ni=1.2;function ai(t,e=ni){si(t);const o=Lo(t),r=jo(t),i=o*e,a=r*e;return[t[0]-(i-o)/2,t[1]-(a-r)/2,t[2]+(i-o)/2,t[3]+(a-r)/2]}function si(t){if(t.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${t.length}).`)}const Xe=.75,Te=.1;let li=class extends Ao{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=e.rotateWithView!==void 0?e.rotateWithView:!1,this.viewExtent_=void 0;const o=e.className!==void 0?e.className:"ol-overviewmap",r=e.tipLabel!==void 0?e.tipLabel:"Overview map",i=e.collapseLabel!==void 0?e.collapseLabel:"‹";typeof i=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=i):this.collapseLabel_=i;const a=e.label!==void 0?e.label:"›";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const s=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=r,c.appendChild(s),c.addEventListener(Po.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=e.view;const d=new To({view:e.view,controls:new ht,interactions:new ht});this.ovmap_=d,e.layers&&e.layers.forEach(function(I){d.addLayer(I)});const u=document.createElement("div");u.className="ol-overviewmap-box",u.style.boxSizing="border-box",this.boxOverlay_=new Bt({position:[0,0],positioning:"center-center",element:u}),this.ovmap_.addOverlay(this.boxOverlay_);const p=o+" "+Ro+" "+No+(this.collapsed_&&this.collapsible_?" "+mt:"")+(this.collapsible_?"":" ol-uncollapsible"),g=this.element;g.className=p,g.appendChild(this.ovmapDiv_),g.appendChild(c);const m=this,f=this.boxOverlay_,w=this.boxOverlay_.getElement(),j=function(I){return{clientX:I.clientX,clientY:I.clientY}},te=function(I){const E=j(I),ut=d.getEventCoordinateInternal(E);f.setPosition(ut)},H=function(I){const E=d.getEventCoordinateInternal(I);m.getMap().getView().setCenterInternal(E),window.removeEventListener("mousemove",te),window.removeEventListener("mouseup",H)};w.addEventListener("mousedown",function(){window.addEventListener("mousemove",te),window.addEventListener("mouseup",H)})}setMap(e){const o=this.getMap();if(e!==o){if(o){const r=o.getView();r&&this.unbindView_(r),this.ovmap_.setTarget(null)}if(super.setMap(e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(Vo(e,Do.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const r=e.getView();r&&(this.bindView_(r),r.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(e){if(e.key===Ze.VIEW){const o=e.oldValue;o&&this.unbindView_(o);const r=this.getMap().getView();this.bindView_(r)}else!this.ovmap_.isRendered()&&(e.key===Ze.TARGET||e.key===Ze.SIZE)&&this.ovmap_.updateSize()}bindView_(e){if(!this.view_){const o=new Rt({projection:e.getProjection()});this.ovmap_.setView(o)}e.addChangeListener(gt.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(e){e.removeChangeListener(gt.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),a=e.getView().calculateExtentInternal(r);if(this.viewExtent_&&Oo(a,this.viewExtent_))return;this.viewExtent_=a;const s=o.getSize(),d=o.getView().calculateExtentInternal(s),u=o.getPixelFromCoordinateInternal(Fo(a)),p=o.getPixelFromCoordinateInternal(Go(a)),g=Math.abs(u[0]-p[0]),m=Math.abs(u[1]-p[1]),f=s[0],w=s[1];gf*Xe||m>w*Xe?this.resetExtent_():zo(d,a)||this.recenter_()}resetExtent_(){const e=this.getMap(),o=this.ovmap_,r=e.getSize(),a=e.getView().calculateExtentInternal(r),s=o.getView(),c=Math.log(Xe/Te)/Math.LN2,d=1/(Math.pow(2,c/2)*Te);Bo(a,d),s.fitInternal(Ho(a))}recenter_(){const e=this.getMap(),o=this.ovmap_,r=e.getView();o.getView().setCenterInternal(r.getCenterInternal())}updateBox_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),i=e.getView(),a=o.getView(),s=this.rotateWithView_?0:-i.getRotation(),c=this.boxOverlay_,d=this.boxOverlay_.getElement(),u=i.getCenterInternal(),p=i.getResolution(),g=a.getResolution(),m=r[0]*p/g,f=r[1]*p/g;if(c.setPosition(u),d){d.style.width=m+"px",d.style.height=f+"px";const w="rotate("+s+"rad)";d.style.transform=w}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Uo(this.ovmap_,Wo.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(e){e.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(mt),this.collapsed_?ft(this.collapseLabel_,this.label_):ft(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const e=this.ovmap_;if(!this.collapsed_){if(e.isRendered()){this.viewExtent_=void 0,e.render();return}e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())}setCollapsed(e){!this.collapsible_||this.collapsed_===e||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(e){this.validateExtent_(),this.updateBox_()}};var ci=it({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),di=it({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),ui=it({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),C,et,Re,Jt;class pi{constructor(e){h(this,C);y(this,"olMap");y(this,"handle");y(this,"_mapViews",_r());y(this,"_activeViewId",J(0));y(this,"backward",()=>{if(this.canBackward)S(this,C,Re).call(this,this.activeViewId-1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});y(this,"forward",()=>{if(this.canForward)S(this,C,Re).call(this,this.activeViewId+1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=e.olMap,this.handle=S(this,C,Jt).call(this)}destroy(){this.handle&&we(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}C=new WeakSet,et=function(e){const o=this.olMap.getView();this.olMap.setView(new Rt({center:this.mapViews.get(e).center,resolution:this.mapViews.get(e).resolution,projection:o.getProjection()}))},Re=function(e){this._activeViewId.value=e},Jt=function(){const e=this.olMap.on("moveend",()=>{o()}),o=()=>{const r=this.olMap,i=this.mapViews,a=r.getView(),s=a.getResolution(),c=a.getCenter();if(s!=null&&c!=null&&(c!==i.get(this.activeViewId)?.center||s!==i.get(this.activeViewId)?.resolution)){const d={resolution:s,center:c},u=this.activeViewId+1;for(const p of i.keys())p>u&&i.delete(p);S(this,C,Re).call(this,u),i.set(u,d)}};return e};const hi={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function mi(t){return n.jsxs(V,{children:[n.jsx(Ue,{children:t.layer.title}),n.jsx(V,{style:hi})]})}const fe="main";class gi{mapId=fe;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{initialView:{kind:"position",center:{x:823091,y:6724521},zoom:8},layers:[new tt({title:"OSM",id:"osm",isBaseLayer:!0,olLayer:new Nt({source:new Vt})}),new sr({isBaseLayer:!0,title:"Orthofotos NRW",url:"https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml",name:"nw_dop",matrixSet:"EPSG_3857_16",sourceOptions:{attributions:'Die Geobasisdaten des amtlichen Vermessungswesens werden als öffentliche Aufgabe gem. VermKatG NRW und gebührenfrei nach Open Data-Prinzipien über online-Verfahren bereitgestellt. Nutzungsbedingungen: siehe '}}),bi(),vi(),fi(this.vectorSourceFactory)]}}}function fi(t){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",r=t.createVectorSource({baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),i=new ot({source:r});return new tt({id:"krankenhaus",title:"Krankenhäuser-Demo-Dienst",visible:!1,olLayer:i,attributes:{collectionURL:e+"/collections/"+o}})}function vi(){const t=new Dt({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new Wt,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),e=new ot({source:t}),o={Component:mi};return new tt({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:e,attributes:{legend:o}})}function bi(){return new nr({title:"Verwaltungsgebiete",id:"verwaltungsgebiete",visible:!1,url:"https://www.wms.nrw.de/geobasis/wms_nw_dvg",sublayers:[{name:"nw_dvg_krs",title:"Kreise und kreisfreie Städte"}]})}const wi="200px",yi="300px",xi=t=>{const{olLayer:e,height:o=wi,width:r=yi}=t,{containerProps:i}=ge("overview-map",t),a=b.useRef(null),{map:s}=ee(t);return b.useEffect(()=>{if(a.current&&s&&e){const c=s.olMap,d=new li({className:"ol-overviewmap",layers:[e],collapsible:!1,collapsed:!1,target:a.current});return c.addControl(d),()=>{c.removeControl(d)}}},[s,e]),n.jsx(V,{height:o,width:r,ref:a,...i})};function Si({intl:t}){return{id:"overviewMap",title:t.formatMessage({id:"demos.overviewMap.title"}),createModel(){const e=new Nt({source:new Vt});return{description:t.formatMessage({id:"demos.overviewMap.description"}),mainWidget:n.jsx(xi,{olLayer:e}),destroy(){e.dispose()}}}}}class ki{label;filteredTypes;httpService;constructor(e,o,r){this.label=e,this.filteredTypes=o,this.httpService=r}async search(e,{mapProjection:o,signal:r}){const i=await this.request(e,100,r),a=new Wt({dataProjection:"EPSG:4326",featureProjection:o});return i.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,c)=>{const d=a.readGeometry(s.geometry);return{id:s.properties.osm_id||c,label:this.createLabel(s),geometry:d,properties:s.properties}})}async request(e,o,r){const i=new URL("https://photon.komoot.io/api?");i.searchParams.set("q",e),i.searchParams.set("lang","de"),i.searchParams.set("lat","51.961563"),i.searchParams.set("lon","7.628202"),i.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(i,{signal:r});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}function Ii({intl:t,httpService:e,mapModel:o}){return{id:"searchAndHighlight",title:t.formatMessage({id:"demos.searchAndHighlight.title"}),createModel(){return new Mi(t,o,e)}}}var ye,xe,re,De,ie,jt;let Mi=(jt=class{constructor(e,o,r){h(this,ye);h(this,xe);h(this,re);y(this,"description");y(this,"mainWidget");h(this,De,e=>{const o=e.result.geometry;o&&(l(this,ie).call(this),v(this,re,Ei(l(this,xe),[o])))});h(this,ie,()=>{l(this,re)?.destroy(),v(this,re,void 0)});v(this,ye,new ki("Photon Geocoder",["city","street"],r)),v(this,xe,o),this.description=e.formatMessage({id:"demos.searchAndHighlight.description"}),this.mainWidget=n.jsx(lr,{sources:[l(this,ye)],onSelect:l(this,De),onClear:l(this,ie)})}destroy(){l(this,ie).call(this)}},ye=new WeakMap,xe=new WeakMap,re=new WeakMap,De=new WeakMap,ie=new WeakMap,jt);function Ei(t,e){const o=t.olMap.getViewport();return t.highlightAndZoom(e,{viewPadding:o&&o.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}const Qt="@open-pioneer/geolocation",_i=rt.bind(void 0,Qt),eo=Ae.bind(void 0,Qt);function Ci(t){return Or({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(t)}const xt=je("geolocation:GeolocationController"),St=17;var U,W;class Li{constructor(e,o,r){y(this,"supported",!!navigator.geolocation);y(this,"olMap");y(this,"positionHighlightLayer");y(this,"geolocation");y(this,"onError");y(this,"maxZoom",St);y(this,"accuracyFeature");y(this,"positionFeature");y(this,"changeHandlers",[]);y(this,"setMapToPosition",!0);y(this,"trackingOptions",{});y(this,"isInitialZoom",!0);h(this,U,J(!1));h(this,W,J(!1));this.olMap=e,this.onError=o,this.isInitialZoom=!0,this.accuracyFeature=new vt,this.accuracyFeature.setStyle(It()),this.positionFeature=new vt,this.positionFeature.setStyle(kt()),this.positionHighlightLayer=new ot({source:new Dt({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(qo);const i=r||ji();this.geolocation=new ii({tracking:!1,trackingOptions:i,projection:e.getView()?.getProjection()}),this.trackingOptions=i,this.geolocation.on("error",a=>this.handleGeolocationError(a))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(l(this,W).value)return;const e=this.olMap;new Promise(r=>{l(this,W).value=!0,l(this,U).value=!0,this.geolocation?.setProjection(e.getView()?.getProjection()),this.geolocation?.setTracking(!0);const i=this.geolocation.on("change:accuracyGeometry",()=>{const d=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(d),this.accuracyFeature?.getGeometry()!==void 0&&r(),this.isInitialZoom){const u=this?.accuracyFeature?.getGeometry()?.getExtent();if(u){const p=ai(u);if(!p)return;e.getView().fit(p,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),a=this.geolocation.on("change:position",()=>{const d=this.geolocation.getPosition();d&&(d[0]||d[1])!==void 0&&(this.positionFeature?.setGeometry(new $o(d)),this.setMapToPosition&&e.getView().setCenter(d),this.positionFeature?.getGeometry()!==void 0&&r())}),s=e.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),c=e.on("pointermove",d=>{d.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(i,a,s,c),e.addLayer(this.positionHighlightLayer)}).then(()=>{l(this,U).value=!1}).catch(r=>{xt.error("Failed to determine location",r)})}stopGeolocation(){this.geolocation?.setTracking(!1),l(this,W).value=!1,l(this,U).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(e=>{we(e)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return l(this,W).value}get loading(){return l(this,U).value}setPositionFeatureStyle(e){this.positionFeature?.setStyle(e??kt())}setAccuracyFeatureStyle(e){this.accuracyFeature?.setStyle(e??It())}setMaxZoom(e){this.maxZoom=e??St}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(e){xt.error("Error from geolocation API:",e.message),this.stopGeolocation();const o=(()=>{switch(e.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(o)}}U=new WeakMap,W=new WeakMap;const kt=()=>new Ot({image:new Ko({radius:6,fill:new Ft({color:"#3399CC"}),stroke:new Gt({color:"#fff",width:2})})}),It=()=>new Ot({stroke:new Gt({color:"#3399CC",width:3}),fill:new Ft({color:"rgba(0, 0, 255, 0.05)"})}),ji=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),Ai=b.forwardRef(function(e,o){const{maxZoom:r,positionFeatureStyle:i,accuracyFeatureStyle:a,trackingOptions:s}=e,{map:c}=ee(e),d=Ti(c,r,s,i,a);return d&&n.jsx(Pi,{...e,controller:d,ref:o})}),Pi=b.forwardRef(function(e,o){const{controller:r}=e,{containerProps:i}=ge("geolocation",e),{isLoading:a,isActive:s}=Q(()=>({isLoading:r.loading,isActive:r.active}),[r]),c=eo(),d=r.supported?s?c.formatMessage({id:"locateMeEnd"}):c.formatMessage({id:"locateMeStart"}):c.formatMessage({id:"locateNotSupported"}),u=()=>{r.active?r.stopGeolocation():r.startGeolocation()};return n.jsx(Sr,{ref:o,label:d,icon:n.jsx(Ci,{}),onClick:()=>u(),isActive:s,isLoading:a,isDisabled:!r.supported,...i})});function Ti(t,e,o,r,i){const a=eo(),s=_i("notifier.NotificationService"),[c,d]=b.useState();return b.useEffect(()=>{if(!t)return;const u=g=>{const m=a.formatMessage({id:"error"}),f=(()=>{switch(g){case"permission-denied":return a.formatMessage({id:"permissionDenied"});case"position-unavailable":return a.formatMessage({id:"positionUnavailable"});case"timeout":return a.formatMessage({id:"timeout"});case"unknown":return a.formatMessage({id:"unknownError"})}})();s.notify({level:"error",title:m,message:f})},p=new Li(t.olMap,u,o);return d(p),()=>{p.destroy(),d(void 0)}},[t,o,a,s]),b.useEffect(()=>{c?.setPositionFeatureStyle(r)},[c,r]),b.useEffect(()=>{c?.setAccuracyFeatureStyle(i)},[c,i]),b.useEffect(()=>{c?.setMaxZoom(e)},[c,e]),c}const Ri="@open-pioneer/scale-setter",Ni=Ae.bind(void 0,Ri),Vi=25.4/.28,Di=39.37,Oi=[17471320,8735660,4367830,2183915,1091957,545978,272989,136494,68247,34123,17061,8530,4265,2132],Fi=t=>{const{scales:e=Oi}=t,{containerProps:o}=ge("scale-setter",t),{map:r}=ee(t),i=Ni(),a=cr(r?.olMap)??1;function s(u){if(!r)return;const p=r.olMap.getView(),g=r.olMap.getView().getProjection(),m=g.getMetersPerUnit()??1,f=Di*Vi*m,w=r.olMap.getView().getCenter();if(!w)return;const j=u/Yo(g,f,w);p.setResolution(j)}const c=e.map(u=>n.jsx(Fr,{value:u,onClick:()=>s(u),onFocus:p=>{p.target?.scrollIntoView?.({block:"nearest"})},className:"scale-setter-option",children:Mt(i,u)},u)),d=Mt(i,a);return n.jsx(V,{...o,children:n.jsxs(Br,{isLazy:!0,children:[n.jsx(Gr,{as:Y,rightIcon:n.jsx(ci,{}),className:"scale-setter-menubutton","aria-label":i.formatMessage({id:"button.ariaLabel"},{scale:d}),"aria-description":i.formatMessage({id:"button.ariaDescription"}),children:d}),n.jsx(Pt,{children:n.jsx(zr,{className:"scale-setter-menuoptions",maxHeight:"20em",overflowY:"auto",children:c})})]})})};function Mt(t,e){return"1 : "+t.formatNumber(e)}const to="@open-pioneer/spatial-bookmarks",Gi=rt.bind(void 0,to),zi=Ae.bind(void 0,to),O=je("spatial-bookmark:SpatialBookmarkViewModel");class Bi{map;packageNamespace;writableBookmarks=Cr([]);watchBookmarksHandle;get bookmarks(){return this.writableBookmarks.getItems()}constructor(e,o){this.map=e,this.packageNamespace=o.getNamespace("spatial-bookmarks"),this.loadState(),this.watchBookmarksHandle=qt(()=>[this.writableBookmarks.getItems()],([r])=>this.saveState(r),{immediate:!1})}destroy(){this.watchBookmarksHandle.destroy()}createBookmark(e){const o=this.map.olMap,r=o.getView().calculateExtent(),i=o.getView().getProjection().getCode(),a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3]},s={id:Zo(),title:e,extent:a,projection:i};O.debug("Created a new bookmark",s),this.writableBookmarks.push(s)}activateBookmark(e){O.debug("Activating bookmark",e);const o=this.getBookmarkExtent(e);O.debug("Attempting to apply extent",o),this.applyExtent(o)}deleteBookmark(e){O.debug("Deleting bookmark",e);const o=this.writableBookmarks.findIndex(r=>r.id===e);o>-1&&this.writableBookmarks.splice(o,1)}deleteAllBookmarks(){O.debug("Deleting all bookmarks"),this.writableBookmarks.splice(0)}loadState(){O.debug("Restoring bookmarks from local storage");const e=this.packageNamespace.get("bookmarks")??[];try{Hi(e),this.writableBookmarks.push(...e)}catch(o){O.error("Bookmarks data in local storage is invalid, resetting to default value.",o),this.writableBookmarks.splice(0),this.saveState([])}}saveState(e){O.debug("Saving bookmarks to local storage"),this.packageNamespace.set("bookmarks",e)}getBookmarkExtent(e){const r=this.map.olMap.getView(),i=e.extent,a=[i.minX,i.minY,i.maxX,i.maxY],s=r.getProjection(),c=e.projection;return Xo(a,c,s)}applyExtent(e){const r=this.map.olMap.getView(),i=Jo(e),a=r.getResolutionForExtent(e);r.setCenter(i),r.setResolution(a)}}function Hi(t){if(!Array.isArray(t))throw new Error("Expected bookmarks from local storage to be an array.");for(const e of t)Ui(e)}function Ui(t){if(!t||typeof t!="object")throw new Error("Expected bookmark from local storage to be an object.");const e=t;if(typeof e.id!="string")throw new Error("Bookmark does not have a valid id.");if(typeof e.title!="string")throw new Error("Bookmark does not have a valid title.");if(Wi(e.extent),typeof e.projection!="string")throw new Error("Bookmark does not have a valid projection value.")}function Wi(t){if(!t||typeof t!="object")throw new Error("Expected bookmark extent from local storage to be an object.");const e=t;if(typeof e.minX!="number"||typeof e.minY!="number"||typeof e.maxX!="number"||typeof e.maxY!="number")throw new Error("Expected bookmark extent from local storage to have valid coordinates.")}const qi=t=>{const{map:e}=ee(t),o=Gi("local-storage.LocalStorageService"),r=Qi(e,o);return r&&n.jsx($i,{...t,viewModel:r})};function $i(t){const{viewModel:e}=t,o=zi(),r=b.useRef([]),[i,a]=b.useState(!1),s=Q(()=>e.bookmarks,[e]),[c,d]=b.useState(""),u=c.trim().length>0,{containerProps:p}=ge("spatial-bookmarks",t),[g,m]=b.useState("list"),f=()=>{e.deleteAllBookmarks(),m("list")},w=()=>{u&&(e.createBookmark(c),m("list"),d(""),a(!0))};b.useEffect(()=>{if(i){const E=r.current;E&&E[s.length-1]?.scrollIntoView?.(),a(!1)}},[s,i]);const j=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"warning",children:[n.jsx(Ye,{}),o.formatMessage({id:"bookmark.alert.delete"})]}),n.jsx(Xi,{intl:o,onClear:f,onCancel:()=>m("list")})]}),te=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ye,{}),o.formatMessage({id:"bookmark.alert.create"})]}),n.jsx(Ht,{"aria-label":o.formatMessage({id:"bookmark.input.label"}),placeholder:o.formatMessage({id:"bookmark.input.placeholder"}),value:c,onChange:E=>{d(E.target.value)},onKeyDown:E=>{E.key==="Enter"&&w()},isRequired:!0,isInvalid:!u,autoFocus:!0}),n.jsx(Ji,{intl:o,isInvalid:!u,onCancel:()=>{d(""),m("list")},onSave:w})]}),H=()=>n.jsxs(n.Fragment,{children:[s.length?Ki(s,e,o,r):n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ye,{}),o.formatMessage({id:"bookmark.alert.noSaved"})]}),n.jsx(Zi,{intl:o,bookmarks:s,showCreate:()=>m("create"),showDelete:()=>m("delete")})]}),I=n.jsxs(n.Fragment,{children:[g==="list"&&H(),g==="create"&&te(),g==="delete"&&j()]});return n.jsx(L,{flexDirection:"column",...p,children:I})}function Ki(t,e,o,r){const i=o.formatMessage({id:"bookmark.button.deleteOne"}),a=t.map((s,c)=>n.jsx(Yi,{index:c,listItemNodes:r,bookmark:s,onActivate:()=>e.activateBookmark(s),onDelete:()=>e.deleteBookmark(s.id),deleteBtnLabel:i},s.id));return n.jsx(Er,{as:"ul",className:"spatial-bookmark-list",role:"listbox","aria-label":o.formatMessage({id:"bookmark.list.label"}),flexShrink:1,flexGrow:1,p:1,spacing:1,overflowY:"auto",listStyleType:"none",children:a})}const Et={ArrowDown:1,ArrowUp:-1};function Yi(t){const{index:e,listItemNodes:o,bookmark:r,onDelete:i,onActivate:a,deleteBtnLabel:s}=t,c=r.title,d=u=>{const p=u.key;if(p==="Enter"){u.target===u.currentTarget&&a();return}if(Et[p]!=null){const g=o.current?.length;if(!g)return;let m=(e+Et[p])%g;m<0&&(m=g-1),o.current[m]?.focus()}};return n.jsx(V,{as:"li",p:1,ref:u=>{if(!u){o.current.splice(e,1);return}o.current[e]=u},className:Qo("spatial-bookmarks-item"),tabIndex:0,rounded:"md",role:"option",cursor:"pointer",outline:0,_hover:{background:"trails.50"},_focusVisible:{boxShadow:"outline"},onKeyDown:d,onClick:a,children:n.jsxs(L,{width:"100%",flexDirection:"row",align:"center",gap:1,children:[n.jsx(Xt,{children:n.jsx(ar,{})}),n.jsx(Ue,{ps:2,noOfLines:1,children:c}),n.jsx(Hr,{}),n.jsx(Tt,{hasArrow:!0,label:s,placement:"right",children:n.jsx(Y,{className:"spatial-bookmarks-item-delete","aria-label":s,borderRadius:"full",iconSpacing:0,padding:0,colorScheme:"red",variant:"ghost",leftIcon:n.jsx(zt,{}),onClick:u=>{i(),u.stopPropagation()}})},e)]})})}function Zi(t){const{intl:e,bookmarks:o,showCreate:r,showDelete:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{isDisabled:o.length===0,colorScheme:"red",width:void 0,iconSpacing:0,leftIcon:n.jsx(zt,{}),onClick:i,"aria-label":e.formatMessage({id:"bookmark.button.deleteAll"}),variant:"outline"}),n.jsx(pe,{onClick:r,width:"100%",children:e.formatMessage({id:"bookmark.button.create"})})]})}function Xi(t){const{intl:e,onCancel:o,onClear:r}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:o,children:e.formatMessage({id:"bookmark.button.cancelDelete"})}),n.jsx(pe,{onClick:r,children:e.formatMessage({id:"bookmark.button.confirmDelete"})})]})}function Ji(t){const{intl:e,onCancel:o,onSave:r,isInvalid:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:()=>o(),children:e.formatMessage({id:"bookmark.button.cancel"})}),n.jsx(pe,{isDisabled:i,onClick:()=>r(),children:e.formatMessage({id:"bookmark.button.save"})})]})}function lt(t){return n.jsx(L,{width:"100%",flexDirection:"row",mt:2,gap:1,flexGrow:0,flexShrink:0,children:t.children})}function pe(t){return n.jsx(Y,{width:"100%",...t})}function Qi(t,e){const[o,r]=b.useState();return b.useEffect(()=>{let i;return t?i=new Bi(t,e):i=void 0,r(i),()=>i?.destroy()},[t,e]),o}const en="@open-pioneer/coordinate-search",Pe=Ae.bind(void 0,en),tn=3,on=[{label:"WGS 84",value:X("EPSG:4326"),precision:3},{label:"Web Mercator",value:X("EPSG:3857"),precision:2}],oo=t=>{const{onSelect:e,onClear:o,projections:r=on,input:i,placeholder:a=""}=t,{containerProps:s}=ge("coordinate-input",t),{map:c}=ee(t),d=Pe(),u=c?.olMap,p=dr(u)??void 0,g=cn(r),[m,f]=b.useState(g[0]),[w,j]=ln(i,p,m,e),te=dn(a,p,m),H=ro(d,w,m.value),I=H==="success",E=b.useRef(null);return n.jsxs(V,{...s,children:[n.jsx(Pt,{children:n.jsx("div",{ref:E})}),n.jsx(L,{flexDirection:"row",flexDir:"row",children:n.jsx(Tt,{label:I?void 0:d.formatMessage({id:H}),hasArrow:!0,placement:"auto",isOpen:!I,className:"coordinateInputToolTip",children:n.jsxs(nt,{className:"coordinateInputGroup",children:[n.jsx(rn,{coordinateSearchInput:w,setCoordinateSearchInput:j,placeholder:a,placeholderString:te,onClear:o,isInputValid:I,selectedProjection:m,mapProjection:p,onSelect:e}),n.jsx(st,{padding:"0px",borderLeft:"0px",children:n.jsx(an,{selectedProjection:m,availableProjections:g,portalElement:E,setSelectedProjection:f,coordinateSearchInput:w,mapProjection:p,onSelect:e})})]})})})]})};function rn(t){const{isInputValid:e,selectedProjection:o,mapProjection:r,onSelect:i,coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u}=t,p=Pe();return n.jsxs(nt,{className:"coordinateInputFieldGroup",children:[n.jsx(Ht,{type:"text",value:a,onChange:g=>{s(g.target.value)},isInvalid:!e,backgroundColor:e?"undefined":"red.100",placeholder:d,errorBorderColor:"red.500","aria-label":p.formatMessage({id:"coordinateInput.ariaLabel"}),borderRightRadius:0,onKeyDown:g=>{g.key=="Enter"&&ct(p,a,o.value,r,i)}}),n.jsx(nn,{coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u,intl:p})]})}function nn(t){const{coordinateSearchInput:e,setCoordinateSearchInput:o,placeholder:r,placeholderString:i,onClear:a,intl:s}=t;return e!==""?n.jsx(Ve,{children:n.jsx(wt,{className:"clearButton",size:"sm",onClick:()=>{o(""),a&&a()},isDisabled:e=="",padding:0,icon:n.jsx(di,{}),"aria-label":s.formatMessage({id:"coordinateInput.ariaLabel"})})}):typeof r=="object"&&e==""?n.jsx(Ve,{children:n.jsx(wt,{className:"copyButton",size:"sm",onClick:()=>{navigator.clipboard.writeText(i)},padding:0,icon:n.jsx(ui,{}),"aria-label":s.formatMessage({id:"coordinateInput.copyPlaceholder"})})}):n.jsx(n.Fragment,{})}function an(t){const[e,o]=b.useState(!1),r=$t(f=>{!e&&f.key==="Enter"&&o(!0)}),{selectedProjection:i,availableProjections:a,portalElement:s,setSelectedProjection:c,coordinateSearchInput:d,mapProjection:u,onSelect:p}=t,g=Pe(),m=sn(g);return n.jsx(Ur,{value:i,defaultValue:i,options:a,menuPlacement:"auto",menuPortalTarget:s.current,"aria-label":g.formatMessage({id:"coordinateInput.ariaLabel"}),classNamePrefix:"coordinate-Input-Select",isSearchable:!1,chakraStyles:{menu:f=>({...f,width:"max-content",minWidth:"100%"}),control:(f,{selectProps:{menuIsOpen:w}})=>({...f,width:"max-content",minWidth:"100%",color:"white",borderleftstyle:"none",borderLeftRadius:0,padding:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,_focus:{boxShadow:"var(--chakra-shadows-outline)"}}),valueContainer:f=>({...f,paddingEnd:0,cursor:"pointer"}),dropdownIndicator:(f,{selectProps:{menuIsOpen:w}})=>({...f,paddingStart:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`}),option:f=>({...f,_focus:{background:"var(--chakra-colors-trails-300)"}}),indicatorSeparator:(f,{selectProps:{menuIsOpen:w}})=>({...f,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,borderColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`})},ariaLiveMessages:m,onChange:f=>{f?.value!==void 0&&(c(f),ct(g,d,f?.value,u,p))},onKeyDown:r,menuIsOpen:e,onMenuOpen:()=>o(!0),onMenuClose:()=>o(!1)})}function sn(t){return b.useMemo(()=>({onFocus:()=>"",onChange:a=>a.action=="select-option"||a.action=="initial-input-focus"?a.label+" "+t.formatMessage({id:"selected"}):"",guidance:()=>"",onFilter:()=>""}),[t])}function ln(t,e,o,r){const i=Pe(),[a,s]=b.useState(""),c=b.useMemo(()=>{if(!t||!e)return"";const u=qe(t,e,o.value);return no(u,o.precision,i)},[t,e,o,i]),d=$t(u=>{r?.(u)});return b.useEffect(()=>{t!=null&&(s(c),ct(i,c,o.value,e,d))},[t,c,d,i,e,o]),[a,s]}function cn(t){return b.useMemo(()=>t.flatMap(o=>X(o.value)!=null?{label:o.label,value:X(o.value),precision:o.precision??tn}:[]),[t])}function dn(t,e,o){const r=Pe();return b.useMemo(()=>{let i;if(typeof t=="string")i=t;else if(!e)i="";else{const a=qe(t,e,o.value);i=no(a,o.precision,r)}return i},[t,e,o,r])}function ro(t,e,o){if(e=="")return"success";if(!e.includes(" "))return"tooltip.space";if(e.indexOf(" ")!=e.lastIndexOf(" "))return"tooltip.spaceOne";const r=e.split(" ");if(r.length!=2||r[0]==""||r[1]=="")return"tooltip.2coords";let i="";if(/^de-?/.test(t.locale)){i=".";const s=e.replaceAll(i,"");if(!/^-?\d+(,\d+)? -?\d+(,\d+)?$/.test(s))return"tooltip.dividerDe"}else if(/en-?/.test(t.locale)){i=",";const s=e.replaceAll(i,"");if(!/^-?\d+(.\d+)? -?\d+(.\d+)?$/.test(s))return"tooltip.dividerEn"}const a=io(e,t);try{if(!_t(o,a))return"tooltip.extent"}catch(s){console.log(s)}try{if(!_t(X("EPSG:4326"),qe(a,o,"EPSG:4326")))return"tooltip.extent"}catch(s){return console.log(s),"tooltip.projection"}return"success"}function _t(t,e){return t.getExtent().length==4&&t.getExtent()[0]<=e[0]&&t.getExtent()[1]<=e[1]&&t.getExtent()[2]>=e[0]&&t.getExtent()[3]>=e[1]}function io(t,e){const o=/^de-?/.test(e.locale)?".":/^en-?/.test(e.locale)?",":"",a=t.replaceAll(o,"").replaceAll(",",".").split(" ");return[parseFloat(a[0]),parseFloat(a[1])]}function ct(t,e,o,r,i){if(o==null||e==""||ro(t,e,o)!=="success")return;const a=io(e,t),s=qe(a,o,r);i&&r&&i({coords:s,projection:r})}function qe(t,e,o){return er(t,e,o)}function no(t,e,o){if(t[0]==null||t[1]==null)return"";const[r,i]=t,a=o.formatNumber(r,{maximumFractionDigits:e,minimumFractionDigits:e}),s=o.formatNumber(i,{maximumFractionDigits:e,minimumFractionDigits:e});return a+" "+s}const un=t=>{const{onSelect:e,onClear:o,projections:r}=t,{containerProps:i}=ge("coordinate-search",t),{map:a}=ee(t),s=a?.olMap,{coordinates:c}=pn(s);return n.jsx(oo,{...i,mapId:t.mapId,onSelect:d=>{a&&(s?.getView().setCenter(d.coords),e?.(d))},onClear:o,placeholder:c||"",projections:r})};function pn(t){const[e,o]=b.useState();return b.useEffect(()=>{if(!t)return;const r=t.on("pointermove",i=>{o(i.coordinate)});return()=>we(r)},[t]),{coordinates:e}}function hn({intl:t}){return{id:"coordinateViewer",title:t.formatMessage({id:"demos.coordinateViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateViewer.description"}),mainWidget:n.jsx(ur,{})}}}}function mn({intl:t,notificationService:e}){return{id:"coordinateInput",title:t.formatMessage({id:"demos.coordinateInput.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateInput.description"}),mainWidget:n.jsx(gn,{notificationService:e,intl:t})}}}}function gn(t){const{notificationService:e,intl:o}=t,[r,i]=b.useState();function a(c,d){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateInput.entered"},{coordinates:c.toString(),projection:d.getCode()}),displayDuration:4e3})}function s(){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateSearch.cleared"}),displayDuration:4e3}),i(void 0)}return n.jsxs(L,{direction:"column",gap:10,children:[n.jsx(oo,{mapId:fe,input:r,placeholder:o.formatMessage({id:"demos.coordinateInput.placeholder"}),onSelect:({coords:c,projection:d})=>a(c,d),onClear:s,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]}),n.jsx(Y,{onClick:()=>{i([761166,6692084])},children:o.formatMessage({id:"demos.coordinateInput.setInput"})})]})}function fn({intl:t,notificationService:e}){return{id:"coordinateSearch",title:t.formatMessage({id:"demos.coordinateSearch.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateSearch.description"}),mainWidget:n.jsx(vn,{notificationService:e,intl:t})}}}}function vn(t){const{notificationService:e,intl:o}=t;function r(a,s){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateSearch.entered"},{coordinates:a.toString(),projection:s.getCode()}),displayDuration:4e3})}function i(){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateSearch.cleared"}),displayDuration:4e3})}return n.jsx(L,{direction:"column",gap:10,children:n.jsx(un,{mapId:fe,onSelect:({coords:a,projection:s})=>r(a,s),onClear:i,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]})})}function bn({intl:t}){return{id:"scaleViewer",title:t.formatMessage({id:"demos.scaleViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleViewer.description"}),mainWidget:n.jsx(pr,{})}}}}function wn({intl:t}){return{id:"scaleSetter",title:t.formatMessage({id:"demos.scaleSetter.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleSetter.description"}),mainWidget:n.jsx(Fi,{})}}}}function yn({intl:t}){return{id:"scaleBar",title:t.formatMessage({id:"demos.scaleBar.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleBar.description"}),tools:n.jsx(hr,{})}}}}function xn({intl:t}){return{id:"measurement",title:t.formatMessage({id:"demos.measurement.title"}),createModel(){return{description:t.formatMessage({id:"demos.measurement.description"}),mainWidget:n.jsx(mr,{})}}}}function Sn({intl:t}){return{id:"mapNavigation",title:t.formatMessage({id:"demos.mapNavigation.title"}),createModel(){return{description:t.formatMessage({id:"demos.mapNavigation.description"}),tools:n.jsxs(n.Fragment,{children:[n.jsx(Lr,{}),n.jsx(jr,{}),n.jsx(kn,{}),n.jsx(Ar,{})]})}}}}function kn(){const{map:t}=ee(),[e,o]=b.useState(void 0);return b.useEffect(()=>{if(!t)return;const r=new pi(t);return o(r),()=>r.destroy()},[t]),e&&n.jsxs(n.Fragment,{children:[n.jsx(Pr,{viewModel:e}),n.jsx(Tr,{viewModel:e})]})}function In({intl:t}){return{id:"geolocation",title:t.formatMessage({id:"demos.geolocation.title"}),createModel(){return{description:t.formatMessage({id:"demos.geolocation.description"}),tools:n.jsx(Ai,{})}}}}function Mn({intl:t}){return{id:"spatialBookmarks",title:t.formatMessage({id:"demos.spatialBookmarks.title"}),createModel(){return{description:t.formatMessage({id:"demos.spatialBookmarks.description"}),mainWidget:n.jsx(qi,{})}}}}function En({intl:t}){return{id:"printing",title:t.formatMessage({id:"demos.printing.title"}),createModel(){return{description:t.formatMessage({id:"demos.printing.description"}),mainWidget:n.jsx(gr,{})}}}}const ao="showcase-app",so=rt.bind(void 0,ao),ve=Ae.bind(void 0,ao);function _n({intl:t,mapModel:e}){return{id:"tocLegend",title:t.formatMessage({id:"demos.tocLegend.title"}),createModel(){function o(i=!0){e.layers.getLayerById("verwaltungsgebiete").setVisible(i),e.layers.getLayerById("krankenhaus").setVisible(i),e.layers.getLayerById("ogc_kitas").setVisible(i)}function r(){o(!1),e?.layers.activateBaseLayer("osm")}return{description:t.formatMessage({id:"demos.tocLegend.description"}),mainWidget:n.jsx(Cn,{}),destroy:r}}}}function Cn(){const t=b.useId(),e=b.useId(),o=ve();return n.jsxs(n.Fragment,{children:[n.jsx(V,{role:"dialog","aria-labelledby":t,children:n.jsx(Ne,{title:n.jsx(Je,{id:t,size:"md",mb:2,children:n.jsx(Ue,{children:o.formatMessage({id:"demos.tocLegend.tocTitle"})})}),children:n.jsx(kr,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})}),n.jsx(V,{pt:2,role:"dialog","aria-labelledby":e,children:n.jsx(Ne,{title:n.jsx(Je,{id:e,size:"md",mb:2,children:o.formatMessage({id:"demos.tocLegend.legendTitle"})}),children:n.jsx(fr,{showBaseLayers:!0})})})]})}function Ln(t){return{id:"selectionResultList",title:t.intl.formatMessage({id:"demos.selectionResultList.title"}),createModel(){return new jn(t)}}}var Se,ne,ae,Oe,Fe,At;let jn=(At=class{constructor(e){h(this,Se);h(this,ne);h(this,ae,J({key:0,input:void 0,open:!1}));y(this,"description");y(this,"mainWidget");h(this,Oe,e=>{const{results:o}=e,a={columns:[{id:"id",displayName:"ID",width:100,getPropertyValue(c){return c.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(c){switch(c.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return c.properties?.gefoerdert}}}],data:o,formatOptions:{numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}}},s=l(this,ae).value.key;l(this,ae).value={open:!0,key:s+1,input:a}});h(this,Fe,e=>{console.log("Selected features: ",e.features)});const{mapModel:o,vectorSelectionSourceFactory:r,intl:i}=e;v(this,Se,o),v(this,ne,An(o,r)),this.description=i.formatMessage({id:"demos.selectionResultList.description"}),this.mainWidget=n.jsx(vr,{sources:[l(this,ne)],onSelectionComplete:l(this,Oe)}),o.layers.getLayerById("ogc_kitas").setVisible(!0)}destroy(){l(this,ne).destroy(),l(this,Se).layers.getLayerById("ogc_kitas").setVisible(!1)}get listContainer(){const e=l(this,ae).value;if(!(!e.open||!e.input))return n.jsx(Wr,{input:e.input,onSelectionChange:l(this,Fe)},e.key)}},Se=new WeakMap,ne=new WeakMap,ae=new WeakMap,Oe=new WeakMap,Fe=new WeakMap,At);function An(t,e){const o=t.layers.getLayerById("ogc_kitas");return e.createSelectionSource({vectorLayer:o.olLayer,label:o.title})}const Pn="krankenhaus";function Tn(t){return{id:"editing",title:t.intl.formatMessage({id:"demos.editing.title"}),createModel(){return new Rn(t)}}}var ke,se;class Rn{constructor(e){y(this,"description");y(this,"mainWidget");h(this,ke);h(this,se);const{mapModel:o,intl:r,editingService:i,notificationService:a}=e;v(this,ke,o),this.description=r.formatMessage({id:"demos.editing.description"}),v(this,se,new Nn(o,i,a,r)),this.mainWidget=n.jsx(Vn,{editingController:l(this,se)}),this._setEditLayerVisible(!0)}destroy(){this._setEditLayerVisible(!1),l(this,se).stopEditing()}_setEditLayerVisible(e=!0){l(this,ke).layers.getLayerById(Pn).setVisible(e)}}ke=new WeakMap,se=new WeakMap;var M,_,q,le,$,D,K,F;class Nn{constructor(e,o,r,i){h(this,M);h(this,_);h(this,q);h(this,le);h(this,$);h(this,D);h(this,K);h(this,F);v(this,M,J(!1)),v(this,_,e),v(this,q,o),v(this,le,r),v(this,$,i)}editingActive(){return l(this,M).value}startCreateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0;const e=l(this,_).layers.getLayerById("krankenhaus"),o=new URL(e.attributes.collectionURL+"/items");l(this,q).createFeature(l(this,_),o).whenComplete().then(i=>{if(!i)return;l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.create.featureCreated"},{featureId:i.featureId})}),(e?.olLayer).getSource()?.refresh()}).catch(i=>{console.error(i)}).finally(()=>{l(this,M).value=!1})}catch(e){l(this,M).value=!1,console.error(e)}}startUpdateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0,v(this,F,this._createEditingSelectTooltip());const e=l(this,_).layers.getLayerById("krankenhaus"),o=e?.olLayer;v(this,D,new br({layers:[o]})),l(this,_).olMap.addInteraction(l(this,D)),l(this,F).element.classList.remove("editing-tooltip-hidden"),v(this,K,l(this,D).on("select",r=>{const i=r.selected,a=r.deselected;if(i.length!==1||a.length!==0)return;this._stopUpdateSelection();const s=i[0];if(!s)throw Error("feature is undefined");const c=new URL(e.attributes.collectionURL+"/items");l(this,q).updateFeature(l(this,_),c,s).whenComplete().then(u=>{u&&(l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.update.featureModified"},{featureId:u.featureId})}),o.getSource()?.refresh())}).catch(u=>{console.error(u)}).finally(()=>{l(this,M).value=!1})}))}catch(e){l(this,M).value=!1,console.error(e)}}_createEditingSelectTooltip(){const e=document.createElement("div");e.className="editing-tooltip editing-tooltip-hidden",e.textContent=l(this,$).formatMessage({id:"demos.editing.update.tooltip.select"});const o=new Bt({element:e,offset:[15,0],positioning:"center-left"}),r=l(this,_).olMap,i=r.on("pointermove",a=>{a.dragging||o.setPosition(a.coordinate)});return r.addOverlay(o),{overlay:o,element:e,destroy(){we(i),r.removeOverlay(o)}}}_stopUpdateSelection(){l(this,D)&&l(this,_).olMap.removeInteraction(l(this,D)),l(this,K)&&we(l(this,K)),l(this,F)&&l(this,F).destroy(),v(this,D,void 0),v(this,K,void 0),v(this,F,void 0)}stopEditing(){l(this,q).stop(fe),this._stopUpdateSelection(),l(this,M).value=!1}}M=new WeakMap,_=new WeakMap,q=new WeakMap,le=new WeakMap,$=new WeakMap,D=new WeakMap,K=new WeakMap,F=new WeakMap;function Vn({editingController:t}){const e=ve(),o=Q(()=>t.editingActive(),[t]),r=o?e.formatMessage({id:"demos.editing.activeInfo"}):e.formatMessage({id:"demos.editing.inactiveInfo"});return n.jsxs(n.Fragment,{children:[n.jsxs(L,{px:1,py:1,children:[n.jsx(Y,{mr:2,isDisabled:o,onClick:()=>{t.startCreateWorkflow()},children:e.formatMessage({id:"demos.editing.startCreateButton"})}),n.jsx(Y,{mr:2,isDisabled:o,onClick:()=>{t.startUpdateWorkflow()},children:e.formatMessage({id:"demos.editing.startUpdateButton"})}),n.jsx(Y,{isDisabled:!o,onClick:()=>{t.stopEditing()},children:e.formatMessage({id:"demos.editing.stopButton"})})]}),n.jsx(L,{px:1,py:1,children:r})]})}function Dn(t){return[_n(t),hn(t),mn(t),fn(t),bn(t),wn(t),yn(t),xn(t),Tn(t),Sn(t),In(t),Mn(t),Si(t),En(t),Ln(t),Ii(t)]}const On=je("app::AppModel");var Ge,Ie,Me,G,A,ze,Be,me,lo,co;class Fn{constructor(e,o,r,i){h(this,me);h(this,Ge);h(this,Ie);h(this,Me);h(this,G);h(this,A);h(this,ze,Rr(()=>Array.from(l(this,G).values())));h(this,Be,[]);if(v(this,Ge,e),v(this,Ie,o),v(this,Me,r),v(this,G,new Map(i.map(s=>[s.id,s]))),l(this,G).size===0)throw new Error("No demos defined.");const a=i[0];v(this,A,J([a,a.createModel()])),S(this,me,lo).call(this),l(this,Be).push(S(this,me,co).call(this))}destroy(){l(this,A).value[1].destroy?.()}get currentDemo(){return l(this,A).value[0]}get currentDemoModel(){return l(this,A).value[1]}get allDemoInfos(){return l(this,ze).value}selectDemo(e){const o=l(this,G).get(e);if(!o)throw new Error(`Demo '${e}' does not exist.`);Nr(()=>{const[,r]=l(this,A).value;r.destroy?.(),l(this,A).value=[o,o.createModel()]})}}Ge=new WeakMap,Ie=new WeakMap,Me=new WeakMap,G=new WeakMap,A=new WeakMap,ze=new WeakMap,Be=new WeakMap,me=new WeakSet,lo=function(){const o=new URL(window.location.href).searchParams.get("demo");if(o){if(!l(this,G).has(o)){l(this,Ie).notify({title:l(this,Me).formatMessage({id:"demoSelection.notFound"},{demoId:o})});return}try{this.selectDemo(o)}catch(r){On.error("Failed to select demo from URL",r)}}},co=function(){return qt(()=>[l(this,A).value[0].id],([e])=>{const o=new URL(window.location.href);o.searchParams.set("demo",e),window.history.replaceState(null,"",o.toString())},{immediate:!0})};var ce,Ee,_e,He,uo;class Gn{constructor(e){h(this,He);h(this,ce,J({kind:"loading"}));h(this,Ee,[]);h(this,_e,!1);const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,notificationService:c}=e.references,d=e.intl;S(this,He,uo).call(this,{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:d,notificationService:c}).catch(u=>{l(this,ce).value={kind:"error",message:u.message||"Unknown error"}})}destroy(){v(this,_e,!0);for(const e of l(this,Ee))e.destroy()}get appState(){return l(this,ce).value}}ce=new WeakMap,Ee=new WeakMap,_e=new WeakMap,He=new WeakSet,uo=async function(e){const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:c,notificationService:d}=e,u=await o.getMapModel(fe);if(!u)throw new Error("No mapModel found.");const p=Dn({intl:c,httpService:r,mapModel:u,vectorSelectionSourceFactory:a,editingService:s,notificationService:d}),g={kind:"ready",appModel:new Fn(u,i,c,p),destroy(){this.appModel.destroy()}};if(l(this,_e)){g.destroy();return}l(this,ce).value=g,l(this,Ee).push(g)};const Z=je("local-storage"),zn=0,N={CORRUPTED_DATA:"local-storage:corrupted-data",INVALID_PATH:"local-storage:invalid-path",INVALID_VALUE:"local-storage:invalid-value",NOT_SUPPORTED:"local-storage:not-supported",INTERNAL:"local-storage:internal-error"};var de,P,z,ue,T,k,po,ho,be,oe,mo;class Bn{constructor(e){h(this,k);h(this,de);h(this,P,{});h(this,z);h(this,ue);h(this,T);v(this,de,qn(e.properties)),v(this,z,$n()),l(this,z)&&(S(this,k,ho).call(this),v(this,ue,S(this,k,mo).call(this)))}destroy(){l(this,T)&&(clearTimeout(l(this,T)),v(this,T,void 0)),l(this,z)&&S(this,k,be).call(this)}get isSupported(){return!!l(this,ue)}get(e){return S(this,k,oe).call(this).get(e)}set(e,o){return S(this,k,oe).call(this).set(e,o)}remove(e){return S(this,k,oe).call(this).remove(e)}removeAll(){return S(this,k,oe).call(this).removeAll()}getNamespace(e){return S(this,k,oe).call(this).getNamespace(e)}}de=new WeakMap,P=new WeakMap,z=new WeakMap,ue=new WeakMap,T=new WeakMap,k=new WeakSet,po=function(){l(this,T)&&clearTimeout(l(this,T)),v(this,T,setTimeout(()=>{v(this,T,void 0),S(this,k,be).call(this)},zn))},ho=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=e.getItem(l(this,de));if(o==null){v(this,P,{}),S(this,k,be).call(this);return}try{const r=JSON.parse(o);if(!he(r))throw new R(N.CORRUPTED_DATA,"Persisted value should be an object.");v(this,P,r)}catch(r){Z.warn("Invalid persisted data, reverting to default.",r),v(this,P,{}),S(this,k,be).call(this)}}catch(e){Z.error("Failed to load from local storage",e)}},be=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=JSON.stringify(l(this,P));e.setItem(l(this,de),o)}catch(e){Z.error("Failed to save to local storage",e)}},oe=function(){const e=l(this,ue);if(!e)throw new R(N.NOT_SUPPORTED,"Local storage is not supported by this browser.");return e},mo=function(){const e={getByPath:o=>Lt(Hn(l(this,P),o)),setByPath:(o,r)=>{if(!Wn(r))throw new R(N.INVALID_VALUE,"The value is not supported by local storage.");if(r=Lt(r),o.length===0){if(!he(r))throw new R(N.INVALID_VALUE,"The root value must be a plain object.");v(this,P,r)}else Un(l(this,P),o,r);S(this,k,po).call(this)}};return new dt([],e)};class dt{path;access;constructor(e,o){this.path=e,this.access=o}get(e){return this.access.getByPath([...this.path,e])}set(e,o){this.access.setByPath([...this.path,e],o)}remove(e){this.access.setByPath([...this.path,e],void 0)}removeAll(){this.access.setByPath(this.path,{})}getNamespace(e){const o=this.get(e);if(o===void 0)this.set(e,{});else if(!he(o))throw new R(N.INVALID_PATH,`Cannot use '${e}' as a namespace because it is not associated with an object.`);return new dt(this.path.concat([e]),this.access)}}const Ct="trails-state";function Hn(t,e){let o=t;for(const r of e){if(!he(o))throw new R(N.INVALID_PATH,`Cannot get nested property '${r}' because the parent is no object.`);o=o[r]}return o}function Un(t,e,o){if(!e.length)throw new R(N.INTERNAL,"Path must not be empty.");let r=t;for(let a=0,s=e.length-1;a"u"){Z.warn("Local storage is not supported by this browser.");return}try{const t=globalThis.localStorage;if(!t){Z.warn("Local storage is not supported by this browser.");return}return t}catch(t){Z.warn("Local storage is not supported by this browser.",t);return}}function Lt(t){return t!=null&&(t=JSON.parse(JSON.stringify(t))),t}const Kn={"showcase-app":{name:"showcase-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:gi,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppInitModel:{name:"AppInitModel",clazz:Gn,provides:[{name:"app.AppInitModel",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},notifier:{name:"notifier.NotificationService",qualifier:void 0,all:!1},vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},editingService:{name:"editing.EditingService",qualifier:void 0,all:!1},notificationService:{name:"notifier.NotificationService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"app.AppInitModel",qualifier:void 0,all:!1},{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:tr,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:qr,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:or,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Vr,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Dr,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:$r,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:wr,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:yr,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/coordinate-search":{name:"@open-pioneer/coordinate-search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-setter":{name:"@open-pioneer/scale-setter",services:{},ui:{references:[]},properties:{}},"@open-pioneer/spatial-bookmarks":{name:"@open-pioneer/spatial-bookmarks",services:{},ui:{references:[{name:"local-storage.LocalStorageService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/local-storage":{name:"@open-pioneer/local-storage",services:{LocalStorageServiceImpl:{name:"LocalStorageServiceImpl",clazz:Bn,provides:[{name:"local-storage.LocalStorageService",qualifier:"local-storage.LocalStorageService"}],references:{}}},ui:{references:[]},properties:{storageId:{value:null,required:!1}}}},Yn=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.map-anchor.main-map-anchor{overflow-x:hidden;overflow-y:auto}.map-container:focus-visible{outline:none}.map-container:focus-visible:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:3px solid var(--chakra-colors-trails-500)}@media screen and (max-width: 48em){.map-anchor.main-map-anchor{max-height:45%}}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',Zn=["en","de"];function Xn(t){switch(t){case"en":return yt(()=>import("./CyW8jJ9EgQGV.js"),[],import.meta.url).then(e=>e.default);case"de":return yt(()=>import("./DhZSBGOtlRpg.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const Jn=xo(Yn),Qn=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Xn,locales:Zn,packages:Kn,styles:Jn},Symbol.toStringTag,{value:"Module"}));function go({label:t,children:e}){return n.jsxs(Kr,{as:Yr,maxWidth:{base:"none",md:"20em"},width:{base:"100%",sm:"47%",md:void 0},children:[n.jsx(Zr,{flexBasis:{base:"8em",sm:"auto"},m:0,children:t}),e]})}const ea=je("app::DemoSelection");function ta({appModel:t}){const e=ve(),{allDemos:o,currentDemo:r}=Q(()=>({allDemos:t.allDemoInfos,currentDemo:t.currentDemo}),[t]),i=b.useMemo(()=>o.map(a=>n.jsx("option",{value:a.id,children:a.title},a.id)),[o]);return n.jsx(go,{label:e.formatMessage({id:"demoSelection.label"}),children:n.jsx(Ut,{value:r.id,onChange:a=>{const s=a.target.value;try{t.selectDemo(s)}catch(c){ea.error("Failed to select demo",c)}},children:i})})}function oa(){const t=ve(),e=so("runtime.ApplicationContext"),o=ra(e.getLocale()),r=i=>{switch(i){case"en":e.setLocale("en-GB");break;case"de":e.setLocale("de-DE");break}};return n.jsx(go,{label:t.formatMessage({id:"localeSwitcher.label"}),children:n.jsxs(Ut,{value:o,onChange:i=>r(i.target.value),children:[n.jsx("option",{value:"de",children:t.formatMessage({id:"localeSwitcher.locale.de"})}),n.jsx("option",{value:"en",children:t.formatMessage({id:"localeSwitcher.locale.en"})})]})})}function ra(t){const e=t.match(/^[a-z]+/i)?.[0];if(e==="en"||e=="de")return e;throw new Error("unexpected locale prefix: "+e)}function ia({appModel:t}){const e=ve();return n.jsxs(L,{as:"header",px:2,py:3,flexWrap:{base:"wrap",md:"nowrap"},alignItems:"baseline",gap:2,boxShadow:"1px 0px 3px rgba(0, 0, 0, 0.5)",bgColor:"white",zIndex:100,children:[n.jsx(Je,{size:"md",flexShrink:0,flexGrow:1,textAlign:{base:"center",md:"left"},width:{base:"100%",md:"auto"},mb:{base:2,md:0},children:e.formatMessage({id:"header.title"})}),n.jsx(ta,{appModel:t}),n.jsx(oa,{})]})}function na(){const t=so("app.AppInitModel"),e=Q(()=>t.appState,[t]);let o;switch(e.kind){case"loading":o="Loading...";break;case"error":o="Error: "+e.message;break;case"ready":o=n.jsx(aa,{state:e})}return o}function aa(t){const e=ve(),o=t.state.appModel,{currentDemo:r,currentDemoModel:i}=Q(()=>({currentDemo:o.currentDemo,currentDemoModel:o.currentDemoModel}),[o]),a=Q(()=>i.listContainer,[i]),s=b.useMemo(()=>({left:0,right:0,bottom:a!=null?400:0,top:0}),[a]);return n.jsxs(n.Fragment,{children:[n.jsx(xr,{position:"top-right"}),n.jsx(L,{height:"100%",direction:"column",children:n.jsx(Ne,{title:n.jsx(ia,{appModel:o}),children:n.jsx(L,{flex:"1",direction:"column",position:"relative",children:n.jsx(rr,{mapId:fe,children:n.jsxs(ir,{viewPadding:s,role:"main","aria-label":e.formatMessage({id:"ariaLabels.map"}),children:[n.jsx(bt,{className:"main-map-anchor",position:"top-left",horizontalGap:10,verticalGap:10,children:n.jsx(V,{bgColor:"white",borderRadius:10,p:2,maxW:"500px",children:n.jsxs(Ne,{title:r.title,sectionHeadingProps:{size:"lg"},children:[n.jsx(Ue,{py:4,dangerouslySetInnerHTML:{__html:i.description}}),i.mainWidget]})})}),n.jsx(bt,{position:"bottom-right",horizontalGap:6,children:n.jsx(Qe,{p:1,children:i.tools})}),a&&n.jsx(V,{className:"list-container",position:"absolute",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderColor:"trails.100",children:a})]})})})})})]})}const sa=new URLSearchParams(window.location.search),la=sa.get("lang")||void 0,ca=So({component:na,appMetadata:Qn,config:{properties:{"@open-pioneer/local-storage":{storageId:"ol-showcase-state"}},locale:la}});customElements.define("showcase-app",ca); +var fo=Object.defineProperty;var pt=t=>{throw TypeError(t)};var vo=(t,e,o)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var y=(t,e,o)=>vo(t,typeof e!="symbol"?e+"":e,o),$e=(t,e,o)=>e.has(t)||pt("Cannot "+o);var l=(t,e,o)=>($e(t,e,"read from private field"),o?o.call(t):e.get(t)),h=(t,e,o)=>e.has(t)?pt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),v=(t,e,o,r)=>($e(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),S=(t,e,o)=>($e(t,e,"access private method"),o);import{f as bo,h as B,u as wo,o as yo,k as Ce,r as b,j as n,l as Le,c as je,B as Y,F as Pt,A as Ke,m as Ye,n as Tt,E as R,a as xo,e as So}from"./CzUo6bX8-UUU.js";import{aF as ko,aG as Io,P as Mo,N as X,aH as Eo,aI as _o,ap as Co,aJ as Lo,aK as jo,aL as Ao,E as Po,at as To,aM as ht,aN as Ro,aO as No,aP as mt,aQ as Vo,aR as Do,aS as Ze,V as Rt,aT as gt,Z as Oo,a3 as Fo,aU as Go,a1 as zo,aV as Bo,aW as Ho,aX as Uo,aY as Wo,aZ as ft,h as we,B as V,S as tt,T as Nt,O as Vt,a as ot,b as Dt,a_ as ge,g as ee,d as rt,u as Ae,a$ as vt,b0 as qo,ao as $o,c as Ot,C as Ko,F as Ft,ay as Gt,b1 as Yo,b2 as Zo,b3 as Xo,b4 as Jo,i as L,b5 as Qo,b6 as er,e as Ne,f as Je,H as tr,M as or,D as rr,j as ir,k as bt}from"./B36mctiVgF5V.js";import{W as nr,i as ar,j as zt}from"./kPJ9UZ8lVIau.js";import{O as Bt,W as sr,c as lr,u as cr,I as Ht,e as dr,C as ur,b as pr,a as hr,M as mr,P as gr,L as fr,d as vr,S as br,E as wr,V as yr,f as Ut,N as xr}from"./CtkSqPB4B2ET.js";import{G as Wt,T as Sr,e as kr}from"./C1o_VwAkx5Nm.js";import{g as Ir,c as Mr,T as Ue,V as Qe,L as Er}from"./CovJx79h1x39.js";import{b as _r,r as J,u as Q,a as Cr,w as qt,Z as Lr,c as jr,I as Ar,H as Pr,d as Tr,e as Rr,f as Nr,V as Vr,S as Dr}from"./BUCtgDDw782G.js";import{G as Or}from"./CkG3hRXjrvfc.js";import{c as it}from"./SSUBJAaBGB7g.js";import{M as Fr,a as Gr,b as zr}from"./DgJGd2MHfhXI.js";import{M as Br}from"./C41Ku2EWcQEd.js";import{S as Hr}from"./BSX9fy8BsUsv.js";import{u as $t}from"./E5Cg9XwqIVqj.js";import{r as Ur}from"./_05fvbTuDT_t.js";import{I as wt}from"./XuMECp8BqZmI.js";import{R as Wr}from"./K_sKz2BiM23b.js";import{N as qr,P as $r}from"./BZqu8ZKsC5y7.js";import{_ as yt}from"./CmsKOCeNyeyo.js";import{F as Kr}from"./0jkoYKtubXoE.js";import{H as Yr}from"./_YjaCHRtWzU8.js";import{F as Zr}from"./DAtS2L2h2gmX.js";import"./DNaBv0QziP17.js";import"./Di-_YM5QvGet.js";import"./DXNMkmWkGPwJ.js";var[Xr,Kt]=bo({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),nt=B(function(e,o){const r=wo("Input",e),{children:i,className:a,...s}=yo(e),c=Ce("chakra-input__group",a),d={},u=Ir(i),p=r.field;u.forEach(m=>{var f,w;r&&(p&&m.type.id==="InputLeftElement"&&(d.paddingStart=(f=p.height)!=null?f:p.h),p&&m.type.id==="InputRightElement"&&(d.paddingEnd=(w=p.height)!=null?w:p.h),m.type.id==="InputRightAddon"&&(d.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(d.borderStartRadius=0))});const g=u.map(m=>{var f,w;const j=Mr({size:((f=m.props)==null?void 0:f.size)||e.size,variant:((w=m.props)==null?void 0:w.variant)||e.variant});return m.type.id!=="Input"?b.cloneElement(m,j):b.cloneElement(m,Object.assign(j,d,m.props))});return n.jsx(Le.div,{className:c,ref:o,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...s,children:n.jsx(Xr,{value:r,children:g})})});nt.displayName="InputGroup";var Jr={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Qr=Le("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),at=B(function(e,o){var r;const{placement:i="left",...a}=e,s=(r=Jr[i])!=null?r:{},c=Kt();return n.jsx(Qr,{ref:o,...a,__css:{...c.addon,...s}})});at.displayName="InputAddon";var Yt=B(function(e,o){return n.jsx(at,{ref:o,placement:"left",...e,className:Ce("chakra-input__left-addon",e.className)})});Yt.displayName="InputLeftAddon";Yt.id="InputLeftAddon";var st=B(function(e,o){return n.jsx(at,{ref:o,placement:"right",...e,className:Ce("chakra-input__right-addon",e.className)})});st.displayName="InputRightAddon";st.id="InputRightAddon";var ei=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),We=B(function(e,o){var r,i;const{placement:a="left",...s}=e,c=Kt(),d=c.field,p={[a==="left"?"insetStart":"insetEnd"]:"0",width:(r=d?.height)!=null?r:d?.h,height:(i=d?.height)!=null?i:d?.h,fontSize:d?.fontSize,...c.element};return n.jsx(ei,{ref:o,__css:p,...s})});We.id="InputElement";We.displayName="InputElement";var Zt=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__left-element",r);return n.jsx(We,{ref:o,placement:"left",className:a,...i})});Zt.id="InputLeftElement";Zt.displayName="InputLeftElement";var Ve=B(function(e,o){const{className:r,...i}=e,a=Ce("chakra-input__right-element",r);return n.jsx(We,{ref:o,placement:"right",className:a,...i})});Ve.id="InputRightElement";Ve.displayName="InputRightElement";var Xt=Le("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Xt.displayName="Center";var ti={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};B(function(e,o){const{axis:r="both",...i}=e;return n.jsx(Le.div,{ref:o,__css:ti[r],...i,position:"absolute"})});const x={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},oi={ERROR:"error"};class ri extends Co{constructor(e){super(oi.ERROR),this.code=e.code,this.message=e.message}}let ii=class extends ko{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.position_=null,this.transform_=Io,this.watchId_=void 0,this.addChangeListener(x.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(x.TRACKING,this.handleTrackingChanged_),e.projection!==void 0&&this.setProjection(e.projection),e.trackingOptions!==void 0&&this.setTrackingOptions(e.trackingOptions),this.setTracking(e.tracking!==void 0?e.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const e=this.getProjection();e&&(this.transform_=Mo(X("EPSG:4326"),e),this.position_&&this.set(x.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const e=this.getTracking();e&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!e&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(e){const o=e.coords;this.set(x.ACCURACY,o.accuracy),this.set(x.ALTITUDE,o.altitude===null?void 0:o.altitude),this.set(x.ALTITUDE_ACCURACY,o.altitudeAccuracy===null?void 0:o.altitudeAccuracy),this.set(x.HEADING,o.heading===null?void 0:Eo(o.heading)),this.position_?(this.position_[0]=o.longitude,this.position_[1]=o.latitude):this.position_=[o.longitude,o.latitude];const r=this.transform_(this.position_);this.set(x.POSITION,r.slice()),this.set(x.SPEED,o.speed===null?void 0:o.speed);const i=_o(this.position_,o.accuracy);i.applyTransform(this.transform_),this.set(x.ACCURACY_GEOMETRY,i),this.changed()}positionError_(e){this.dispatchEvent(new ri(e))}getAccuracy(){return this.get(x.ACCURACY)}getAccuracyGeometry(){return this.get(x.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(x.ALTITUDE)}getAltitudeAccuracy(){return this.get(x.ALTITUDE_ACCURACY)}getHeading(){return this.get(x.HEADING)}getPosition(){return this.get(x.POSITION)}getProjection(){return this.get(x.PROJECTION)}getSpeed(){return this.get(x.SPEED)}getTracking(){return this.get(x.TRACKING)}getTrackingOptions(){return this.get(x.TRACKING_OPTIONS)}setProjection(e){this.set(x.PROJECTION,X(e))}setTracking(e){this.set(x.TRACKING,e)}setTrackingOptions(e){this.set(x.TRACKING_OPTIONS,e)}};const ni=1.2;function ai(t,e=ni){si(t);const o=Lo(t),r=jo(t),i=o*e,a=r*e;return[t[0]-(i-o)/2,t[1]-(a-r)/2,t[2]+(i-o)/2,t[3]+(a-r)/2]}function si(t){if(t.length!==4)throw new Error(`Invalid extent (expected length 4, but got length ${t.length}).`)}const Xe=.75,Te=.1;let li=class extends Ao{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=e.rotateWithView!==void 0?e.rotateWithView:!1,this.viewExtent_=void 0;const o=e.className!==void 0?e.className:"ol-overviewmap",r=e.tipLabel!==void 0?e.tipLabel:"Overview map",i=e.collapseLabel!==void 0?e.collapseLabel:"‹";typeof i=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=i):this.collapseLabel_=i;const a=e.label!==void 0?e.label:"›";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const s=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,c=document.createElement("button");c.setAttribute("type","button"),c.title=r,c.appendChild(s),c.addEventListener(Po.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=e.view;const d=new To({view:e.view,controls:new ht,interactions:new ht});this.ovmap_=d,e.layers&&e.layers.forEach(function(I){d.addLayer(I)});const u=document.createElement("div");u.className="ol-overviewmap-box",u.style.boxSizing="border-box",this.boxOverlay_=new Bt({position:[0,0],positioning:"center-center",element:u}),this.ovmap_.addOverlay(this.boxOverlay_);const p=o+" "+Ro+" "+No+(this.collapsed_&&this.collapsible_?" "+mt:"")+(this.collapsible_?"":" ol-uncollapsible"),g=this.element;g.className=p,g.appendChild(this.ovmapDiv_),g.appendChild(c);const m=this,f=this.boxOverlay_,w=this.boxOverlay_.getElement(),j=function(I){return{clientX:I.clientX,clientY:I.clientY}},te=function(I){const E=j(I),ut=d.getEventCoordinateInternal(E);f.setPosition(ut)},H=function(I){const E=d.getEventCoordinateInternal(I);m.getMap().getView().setCenterInternal(E),window.removeEventListener("mousemove",te),window.removeEventListener("mouseup",H)};w.addEventListener("mousedown",function(){window.addEventListener("mousemove",te),window.addEventListener("mouseup",H)})}setMap(e){const o=this.getMap();if(e!==o){if(o){const r=o.getView();r&&this.unbindView_(r),this.ovmap_.setTarget(null)}if(super.setMap(e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(Vo(e,Do.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const r=e.getView();r&&(this.bindView_(r),r.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(e){if(e.key===Ze.VIEW){const o=e.oldValue;o&&this.unbindView_(o);const r=this.getMap().getView();this.bindView_(r)}else!this.ovmap_.isRendered()&&(e.key===Ze.TARGET||e.key===Ze.SIZE)&&this.ovmap_.updateSize()}bindView_(e){if(!this.view_){const o=new Rt({projection:e.getProjection()});this.ovmap_.setView(o)}e.addChangeListener(gt.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(e){e.removeChangeListener(gt.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),a=e.getView().calculateExtentInternal(r);if(this.viewExtent_&&Oo(a,this.viewExtent_))return;this.viewExtent_=a;const s=o.getSize(),d=o.getView().calculateExtentInternal(s),u=o.getPixelFromCoordinateInternal(Fo(a)),p=o.getPixelFromCoordinateInternal(Go(a)),g=Math.abs(u[0]-p[0]),m=Math.abs(u[1]-p[1]),f=s[0],w=s[1];gf*Xe||m>w*Xe?this.resetExtent_():zo(d,a)||this.recenter_()}resetExtent_(){const e=this.getMap(),o=this.ovmap_,r=e.getSize(),a=e.getView().calculateExtentInternal(r),s=o.getView(),c=Math.log(Xe/Te)/Math.LN2,d=1/(Math.pow(2,c/2)*Te);Bo(a,d),s.fitInternal(Ho(a))}recenter_(){const e=this.getMap(),o=this.ovmap_,r=e.getView();o.getView().setCenterInternal(r.getCenterInternal())}updateBox_(){const e=this.getMap(),o=this.ovmap_;if(!e.isRendered()||!o.isRendered())return;const r=e.getSize(),i=e.getView(),a=o.getView(),s=this.rotateWithView_?0:-i.getRotation(),c=this.boxOverlay_,d=this.boxOverlay_.getElement(),u=i.getCenterInternal(),p=i.getResolution(),g=a.getResolution(),m=r[0]*p/g,f=r[1]*p/g;if(c.setPosition(u),d){d.style.width=m+"px",d.style.height=f+"px";const w="rotate("+s+"rad)";d.style.transform=w}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Uo(this.ovmap_,Wo.POSTRENDER,function(e){delete this.ovmapPostrenderKey_,this.updateBox_()},this))}handleClick_(e){e.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(mt),this.collapsed_?ft(this.collapseLabel_,this.label_):ft(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const e=this.ovmap_;if(!this.collapsed_){if(e.isRendered()){this.viewExtent_=void 0,e.render();return}e.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),!e&&this.collapsed_&&this.handleToggle_())}setCollapsed(e){!this.collapsible_||this.collapsed_===e||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(e){this.rotateWithView_!==e&&(this.rotateWithView_=e,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(e){this.validateExtent_(),this.updateBox_()}};var ci=it({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"}),di=it({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),ui=it({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"}),C,et,Re,Jt;class pi{constructor(e){h(this,C);y(this,"olMap");y(this,"handle");y(this,"_mapViews",_r());y(this,"_activeViewId",J(0));y(this,"backward",()=>{if(this.canBackward)S(this,C,Re).call(this,this.activeViewId-1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Backward is not possible at the moment")});y(this,"forward",()=>{if(this.canForward)S(this,C,Re).call(this,this.activeViewId+1),S(this,C,et).call(this,this.activeViewId);else throw new Error("Forward is not possible at the moment")});this.olMap=e.olMap,this.handle=S(this,C,Jt).call(this)}destroy(){this.handle&&we(this.handle),this.handle=void 0}get activeViewId(){return this._activeViewId.value}get mapViews(){return this._mapViews}get canBackward(){return this.mapViews.get(this.activeViewId-1)!=null}get canForward(){return this.mapViews.get(this.activeViewId+1)!=null}}C=new WeakSet,et=function(e){const o=this.olMap.getView();this.olMap.setView(new Rt({center:this.mapViews.get(e).center,resolution:this.mapViews.get(e).resolution,projection:o.getProjection()}))},Re=function(e){this._activeViewId.value=e},Jt=function(){const e=this.olMap.on("moveend",()=>{o()}),o=()=>{const r=this.olMap,i=this.mapViews,a=r.getView(),s=a.getResolution(),c=a.getCenter();if(s!=null&&c!=null&&(c!==i.get(this.activeViewId)?.center||s!==i.get(this.activeViewId)?.resolution)){const d={resolution:s,center:c},u=this.activeViewId+1;for(const p of i.keys())p>u&&i.delete(p);S(this,C,Re).call(this,u),i.set(u,d)}};return e};const hi={height:"25px",width:"25px",borderColor:"#4cb3ff",borderWidth:"3px",borderRadius:"50%",display:"inline-block "};function mi(t){return n.jsxs(V,{children:[n.jsx(Ue,{children:t.layer.title}),n.jsx(V,{style:hi})]})}const fe="main";class gi{mapId=fe;vectorSourceFactory;constructor(e){this.vectorSourceFactory=e.references.vectorSourceFactory}async getMapConfig(){return{initialView:{kind:"position",center:{x:823091,y:6724521},zoom:8},layers:[new tt({title:"OSM",id:"osm",isBaseLayer:!0,olLayer:new Nt({source:new Vt})}),new sr({isBaseLayer:!0,title:"Orthofotos NRW",url:"https://www.wmts.nrw.de/geobasis/wmts_nw_dop/1.0.0/WMTSCapabilities.xml",name:"nw_dop",matrixSet:"EPSG_3857_16",sourceOptions:{attributions:'Die Geobasisdaten des amtlichen Vermessungswesens werden als öffentliche Aufgabe gem. VermKatG NRW und gebührenfrei nach Open Data-Prinzipien über online-Verfahren bereitgestellt. Nutzungsbedingungen: siehe '}}),bi(),vi(),fi(this.vectorSourceFactory)]}}}function fi(t){const e="https://ogc-api-test.nrw.de/inspire-us-krankenhaus/v1",o="governmentalservice",r=t.createVectorSource({baseUrl:e,collectionId:o,limit:1e3,crs:"http://www.opengis.net/def/crs/EPSG/0/3857",attributions:`Land NRW (${new Date().getFullYear()}), Datenlizenz Deutschland - Namensnennung - Version 2.0, Datenquelle`}),i=new ot({source:r});return new tt({id:"krankenhaus",title:"Krankenhäuser-Demo-Dienst",visible:!1,olLayer:i,attributes:{collectionURL:e+"/collections/"+o}})}function vi(){const t=new Dt({url:"https://ogc-api.nrw.de/inspire-us-kindergarten/v1/collections/governmentalservice/items?f=json&limit=10000",format:new Wt,attributions:'© Bundesamt für Kartographie und Geodäsie 2017, Datenquellen'}),e=new ot({source:t}),o={Component:mi};return new tt({id:"ogc_kitas",title:"Kindertagesstätten",visible:!0,olLayer:e,attributes:{legend:o}})}function bi(){return new nr({title:"Verwaltungsgebiete",id:"verwaltungsgebiete",visible:!1,url:"https://www.wms.nrw.de/geobasis/wms_nw_dvg",sublayers:[{name:"nw_dvg_krs",title:"Kreise und kreisfreie Städte"}]})}const wi="200px",yi="300px",xi=t=>{const{olLayer:e,height:o=wi,width:r=yi}=t,{containerProps:i}=ge("overview-map",t),a=b.useRef(null),{map:s}=ee(t);return b.useEffect(()=>{if(a.current&&s&&e){const c=s.olMap,d=new li({className:"ol-overviewmap",layers:[e],collapsible:!1,collapsed:!1,target:a.current});return c.addControl(d),()=>{c.removeControl(d)}}},[s,e]),n.jsx(V,{height:o,width:r,ref:a,...i})};function Si({intl:t}){return{id:"overviewMap",title:t.formatMessage({id:"demos.overviewMap.title"}),createModel(){const e=new Nt({source:new Vt});return{description:t.formatMessage({id:"demos.overviewMap.description"}),mainWidget:n.jsx(xi,{olLayer:e}),destroy(){e.dispose()}}}}}class ki{label;filteredTypes;httpService;constructor(e,o,r){this.label=e,this.filteredTypes=o,this.httpService=r}async search(e,{mapProjection:o,signal:r}){const i=await this.request(e,100,r),a=new Wt({dataProjection:"EPSG:4326",featureProjection:o});return i.features.filter(s=>this.filteredTypes.includes(s.properties.type)).map((s,c)=>{const d=a.readGeometry(s.geometry);return{id:s.properties.osm_id||c,label:this.createLabel(s),geometry:d,properties:s.properties}})}async request(e,o,r){const i=new URL("https://photon.komoot.io/api?");i.searchParams.set("q",e),i.searchParams.set("lang","de"),i.searchParams.set("lat","51.961563"),i.searchParams.set("lon","7.628202"),i.searchParams.set("limit",o.toString());const a=await this.httpService.fetch(i,{signal:r});if(!a.ok)throw new Error("Request failed: "+a.status);return await a.json()}createLabel(e){return`${e.properties.name} (${e.properties.osm_value?e.properties.osm_value+", ":""}${e.properties.postcode?e.properties.postcode+", ":""}${e.properties.city?e.properties.city+", ":""}${e.properties.country?e.properties.country+")":")"}`}}function Ii({intl:t,httpService:e,mapModel:o}){return{id:"searchAndHighlight",title:t.formatMessage({id:"demos.searchAndHighlight.title"}),createModel(){return new Mi(t,o,e)}}}var ye,xe,re,De,ie,jt;let Mi=(jt=class{constructor(e,o,r){h(this,ye);h(this,xe);h(this,re);y(this,"description");y(this,"mainWidget");h(this,De,e=>{const o=e.result.geometry;o&&(l(this,ie).call(this),v(this,re,Ei(l(this,xe),[o])))});h(this,ie,()=>{l(this,re)?.destroy(),v(this,re,void 0)});v(this,ye,new ki("Photon Geocoder",["city","street"],r)),v(this,xe,o),this.description=e.formatMessage({id:"demos.searchAndHighlight.description"}),this.mainWidget=n.jsx(lr,{sources:[l(this,ye)],onSelect:l(this,De),onClear:l(this,ie)})}destroy(){l(this,ie).call(this)}},ye=new WeakMap,xe=new WeakMap,re=new WeakMap,De=new WeakMap,ie=new WeakMap,jt);function Ei(t,e){const o=t.olMap.getViewport();return t.highlightAndZoom(e,{viewPadding:o&&o.offsetWidth<1e3?{top:150,right:75,bottom:50,left:75}:{top:150,right:400,bottom:50,left:400}})}const Qt="@open-pioneer/geolocation",_i=rt.bind(void 0,Qt),eo=Ae.bind(void 0,Qt);function Ci(t){return Or({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"},child:[]}]})(t)}const xt=je("geolocation:GeolocationController"),St=17;var U,W;class Li{constructor(e,o,r){y(this,"supported",!!navigator.geolocation);y(this,"olMap");y(this,"positionHighlightLayer");y(this,"geolocation");y(this,"onError");y(this,"maxZoom",St);y(this,"accuracyFeature");y(this,"positionFeature");y(this,"changeHandlers",[]);y(this,"setMapToPosition",!0);y(this,"trackingOptions",{});y(this,"isInitialZoom",!0);h(this,U,J(!1));h(this,W,J(!1));this.olMap=e,this.onError=o,this.isInitialZoom=!0,this.accuracyFeature=new vt,this.accuracyFeature.setStyle(It()),this.positionFeature=new vt,this.positionFeature.setStyle(kt()),this.positionHighlightLayer=new ot({source:new Dt({features:[this.accuracyFeature,this.positionFeature]})}),this.positionHighlightLayer.setZIndex(qo);const i=r||ji();this.geolocation=new ii({tracking:!1,trackingOptions:i,projection:e.getView()?.getProjection()}),this.trackingOptions=i,this.geolocation.on("error",a=>this.handleGeolocationError(a))}destroy(){this.stopGeolocation(),this.geolocation?.setTracking(!1),this.geolocation.dispose(),this.accuracyFeature=void 0,this.positionFeature=void 0,this.positionHighlightLayer.dispose()}startGeolocation(){if(l(this,W).value)return;const e=this.olMap;new Promise(r=>{l(this,W).value=!0,l(this,U).value=!0,this.geolocation?.setProjection(e.getView()?.getProjection()),this.geolocation?.setTracking(!0);const i=this.geolocation.on("change:accuracyGeometry",()=>{const d=this.geolocation.getAccuracyGeometry()||void 0;if(this.accuracyFeature?.setGeometry(d),this.accuracyFeature?.getGeometry()!==void 0&&r(),this.isInitialZoom){const u=this?.accuracyFeature?.getGeometry()?.getExtent();if(u){const p=ai(u);if(!p)return;e.getView().fit(p,{maxZoom:this.maxZoom}),this.isInitialZoom=!1}}}),a=this.geolocation.on("change:position",()=>{const d=this.geolocation.getPosition();d&&(d[0]||d[1])!==void 0&&(this.positionFeature?.setGeometry(new $o(d)),this.setMapToPosition&&e.getView().setCenter(d),this.positionFeature?.getGeometry()!==void 0&&r())}),s=e.getView().on("change:resolution",()=>{this.setMapToPosition=this.isInitialZoom}),c=e.on("pointermove",d=>{d.dragging&&(this.setMapToPosition=!1)});this.changeHandlers.push(i,a,s,c),e.addLayer(this.positionHighlightLayer)}).then(()=>{l(this,U).value=!1}).catch(r=>{xt.error("Failed to determine location",r)})}stopGeolocation(){this.geolocation?.setTracking(!1),l(this,W).value=!1,l(this,U).value=!1,this.trackingOptions={},this.setMapToPosition=!0,this.isInitialZoom=!0,this.changeHandlers.forEach(e=>{we(e)}),this.changeHandlers=[],this.accuracyFeature?.setGeometry(void 0),this.positionFeature?.setGeometry(void 0),this.olMap.removeLayer(this.positionHighlightLayer)}get active(){return l(this,W).value}get loading(){return l(this,U).value}setPositionFeatureStyle(e){this.positionFeature?.setStyle(e??kt())}setAccuracyFeatureStyle(e){this.accuracyFeature?.setStyle(e??It())}setMaxZoom(e){this.maxZoom=e??St}getMaxZoom(){return this.maxZoom}getPositionFeature(){return this.positionFeature}getAccuracyFeature(){return this.accuracyFeature}getTrackingOptions(){return this.trackingOptions}getGeolocation(){return this.geolocation}handleGeolocationError(e){xt.error("Error from geolocation API:",e.message),this.stopGeolocation();const o=(()=>{switch(e.code){case 1:return"permission-denied";case 2:return"position-unavailable";case 3:return"timeout";default:return"unknown"}})();this.onError(o)}}U=new WeakMap,W=new WeakMap;const kt=()=>new Ot({image:new Ko({radius:6,fill:new Ft({color:"#3399CC"}),stroke:new Gt({color:"#fff",width:2})})}),It=()=>new Ot({stroke:new Gt({color:"#3399CC",width:3}),fill:new Ft({color:"rgba(0, 0, 255, 0.05)"})}),ji=()=>({enableHighAccuracy:!0,timeout:6e4,maximumAge:6e5}),Ai=b.forwardRef(function(e,o){const{maxZoom:r,positionFeatureStyle:i,accuracyFeatureStyle:a,trackingOptions:s}=e,{map:c}=ee(e),d=Ti(c,r,s,i,a);return d&&n.jsx(Pi,{...e,controller:d,ref:o})}),Pi=b.forwardRef(function(e,o){const{controller:r}=e,{containerProps:i}=ge("geolocation",e),{isLoading:a,isActive:s}=Q(()=>({isLoading:r.loading,isActive:r.active}),[r]),c=eo(),d=r.supported?s?c.formatMessage({id:"locateMeEnd"}):c.formatMessage({id:"locateMeStart"}):c.formatMessage({id:"locateNotSupported"}),u=()=>{r.active?r.stopGeolocation():r.startGeolocation()};return n.jsx(Sr,{ref:o,label:d,icon:n.jsx(Ci,{}),onClick:()=>u(),isActive:s,isLoading:a,isDisabled:!r.supported,...i})});function Ti(t,e,o,r,i){const a=eo(),s=_i("notifier.NotificationService"),[c,d]=b.useState();return b.useEffect(()=>{if(!t)return;const u=g=>{const m=a.formatMessage({id:"error"}),f=(()=>{switch(g){case"permission-denied":return a.formatMessage({id:"permissionDenied"});case"position-unavailable":return a.formatMessage({id:"positionUnavailable"});case"timeout":return a.formatMessage({id:"timeout"});case"unknown":return a.formatMessage({id:"unknownError"})}})();s.notify({level:"error",title:m,message:f})},p=new Li(t.olMap,u,o);return d(p),()=>{p.destroy(),d(void 0)}},[t,o,a,s]),b.useEffect(()=>{c?.setPositionFeatureStyle(r)},[c,r]),b.useEffect(()=>{c?.setAccuracyFeatureStyle(i)},[c,i]),b.useEffect(()=>{c?.setMaxZoom(e)},[c,e]),c}const Ri="@open-pioneer/scale-setter",Ni=Ae.bind(void 0,Ri),Vi=25.4/.28,Di=39.37,Oi=[17471320,8735660,4367830,2183915,1091957,545978,272989,136494,68247,34123,17061,8530,4265,2132],Fi=t=>{const{scales:e=Oi}=t,{containerProps:o}=ge("scale-setter",t),{map:r}=ee(t),i=Ni(),a=cr(r?.olMap)??1;function s(u){if(!r)return;const p=r.olMap.getView(),g=r.olMap.getView().getProjection(),m=g.getMetersPerUnit()??1,f=Di*Vi*m,w=r.olMap.getView().getCenter();if(!w)return;const j=u/Yo(g,f,w);p.setResolution(j)}const c=e.map(u=>n.jsx(Fr,{value:u,onClick:()=>s(u),onFocus:p=>{p.target?.scrollIntoView?.({block:"nearest"})},className:"scale-setter-option",children:Mt(i,u)},u)),d=Mt(i,a);return n.jsx(V,{...o,children:n.jsxs(Br,{isLazy:!0,children:[n.jsx(Gr,{as:Y,rightIcon:n.jsx(ci,{}),className:"scale-setter-menubutton","aria-label":i.formatMessage({id:"button.ariaLabel"},{scale:d}),"aria-description":i.formatMessage({id:"button.ariaDescription"}),children:d}),n.jsx(Pt,{children:n.jsx(zr,{className:"scale-setter-menuoptions",maxHeight:"20em",overflowY:"auto",children:c})})]})})};function Mt(t,e){return"1 : "+t.formatNumber(e)}const to="@open-pioneer/spatial-bookmarks",Gi=rt.bind(void 0,to),zi=Ae.bind(void 0,to),O=je("spatial-bookmark:SpatialBookmarkViewModel");class Bi{map;packageNamespace;writableBookmarks=Cr([]);watchBookmarksHandle;get bookmarks(){return this.writableBookmarks.getItems()}constructor(e,o){this.map=e,this.packageNamespace=o.getNamespace("spatial-bookmarks"),this.loadState(),this.watchBookmarksHandle=qt(()=>[this.writableBookmarks.getItems()],([r])=>this.saveState(r),{immediate:!1})}destroy(){this.watchBookmarksHandle.destroy()}createBookmark(e){const o=this.map.olMap,r=o.getView().calculateExtent(),i=o.getView().getProjection().getCode(),a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3]},s={id:Zo(),title:e,extent:a,projection:i};O.debug("Created a new bookmark",s),this.writableBookmarks.push(s)}activateBookmark(e){O.debug("Activating bookmark",e);const o=this.getBookmarkExtent(e);O.debug("Attempting to apply extent",o),this.applyExtent(o)}deleteBookmark(e){O.debug("Deleting bookmark",e);const o=this.writableBookmarks.findIndex(r=>r.id===e);o>-1&&this.writableBookmarks.splice(o,1)}deleteAllBookmarks(){O.debug("Deleting all bookmarks"),this.writableBookmarks.splice(0)}loadState(){O.debug("Restoring bookmarks from local storage");const e=this.packageNamespace.get("bookmarks")??[];try{Hi(e),this.writableBookmarks.push(...e)}catch(o){O.error("Bookmarks data in local storage is invalid, resetting to default value.",o),this.writableBookmarks.splice(0),this.saveState([])}}saveState(e){O.debug("Saving bookmarks to local storage"),this.packageNamespace.set("bookmarks",e)}getBookmarkExtent(e){const r=this.map.olMap.getView(),i=e.extent,a=[i.minX,i.minY,i.maxX,i.maxY],s=r.getProjection(),c=e.projection;return Xo(a,c,s)}applyExtent(e){const r=this.map.olMap.getView(),i=Jo(e),a=r.getResolutionForExtent(e);r.setCenter(i),r.setResolution(a)}}function Hi(t){if(!Array.isArray(t))throw new Error("Expected bookmarks from local storage to be an array.");for(const e of t)Ui(e)}function Ui(t){if(!t||typeof t!="object")throw new Error("Expected bookmark from local storage to be an object.");const e=t;if(typeof e.id!="string")throw new Error("Bookmark does not have a valid id.");if(typeof e.title!="string")throw new Error("Bookmark does not have a valid title.");if(Wi(e.extent),typeof e.projection!="string")throw new Error("Bookmark does not have a valid projection value.")}function Wi(t){if(!t||typeof t!="object")throw new Error("Expected bookmark extent from local storage to be an object.");const e=t;if(typeof e.minX!="number"||typeof e.minY!="number"||typeof e.maxX!="number"||typeof e.maxY!="number")throw new Error("Expected bookmark extent from local storage to have valid coordinates.")}const qi=t=>{const{map:e}=ee(t),o=Gi("local-storage.LocalStorageService"),r=Qi(e,o);return r&&n.jsx($i,{...t,viewModel:r})};function $i(t){const{viewModel:e}=t,o=zi(),r=b.useRef([]),[i,a]=b.useState(!1),s=Q(()=>e.bookmarks,[e]),[c,d]=b.useState(""),u=c.trim().length>0,{containerProps:p}=ge("spatial-bookmarks",t),[g,m]=b.useState("list"),f=()=>{e.deleteAllBookmarks(),m("list")},w=()=>{u&&(e.createBookmark(c),m("list"),d(""),a(!0))};b.useEffect(()=>{if(i){const E=r.current;E&&E[s.length-1]?.scrollIntoView?.(),a(!1)}},[s,i]);const j=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"warning",children:[n.jsx(Ye,{}),o.formatMessage({id:"bookmark.alert.delete"})]}),n.jsx(Xi,{intl:o,onClear:f,onCancel:()=>m("list")})]}),te=()=>n.jsxs(Qe,{children:[n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ye,{}),o.formatMessage({id:"bookmark.alert.create"})]}),n.jsx(Ht,{"aria-label":o.formatMessage({id:"bookmark.input.label"}),placeholder:o.formatMessage({id:"bookmark.input.placeholder"}),value:c,onChange:E=>{d(E.target.value)},onKeyDown:E=>{E.key==="Enter"&&w()},isRequired:!0,isInvalid:!u,autoFocus:!0}),n.jsx(Ji,{intl:o,isInvalid:!u,onCancel:()=>{d(""),m("list")},onSave:w})]}),H=()=>n.jsxs(n.Fragment,{children:[s.length?Ki(s,e,o,r):n.jsxs(Ke,{rounded:"md",status:"info",children:[n.jsx(Ye,{}),o.formatMessage({id:"bookmark.alert.noSaved"})]}),n.jsx(Zi,{intl:o,bookmarks:s,showCreate:()=>m("create"),showDelete:()=>m("delete")})]}),I=n.jsxs(n.Fragment,{children:[g==="list"&&H(),g==="create"&&te(),g==="delete"&&j()]});return n.jsx(L,{flexDirection:"column",...p,children:I})}function Ki(t,e,o,r){const i=o.formatMessage({id:"bookmark.button.deleteOne"}),a=t.map((s,c)=>n.jsx(Yi,{index:c,listItemNodes:r,bookmark:s,onActivate:()=>e.activateBookmark(s),onDelete:()=>e.deleteBookmark(s.id),deleteBtnLabel:i},s.id));return n.jsx(Er,{as:"ul",className:"spatial-bookmark-list",role:"listbox","aria-label":o.formatMessage({id:"bookmark.list.label"}),flexShrink:1,flexGrow:1,p:1,spacing:1,overflowY:"auto",listStyleType:"none",children:a})}const Et={ArrowDown:1,ArrowUp:-1};function Yi(t){const{index:e,listItemNodes:o,bookmark:r,onDelete:i,onActivate:a,deleteBtnLabel:s}=t,c=r.title,d=u=>{const p=u.key;if(p==="Enter"){u.target===u.currentTarget&&a();return}if(Et[p]!=null){const g=o.current?.length;if(!g)return;let m=(e+Et[p])%g;m<0&&(m=g-1),o.current[m]?.focus()}};return n.jsx(V,{as:"li",p:1,ref:u=>{if(!u){o.current.splice(e,1);return}o.current[e]=u},className:Qo("spatial-bookmarks-item"),tabIndex:0,rounded:"md",role:"option",cursor:"pointer",outline:0,_hover:{background:"trails.50"},_focusVisible:{boxShadow:"outline"},onKeyDown:d,onClick:a,children:n.jsxs(L,{width:"100%",flexDirection:"row",align:"center",gap:1,children:[n.jsx(Xt,{children:n.jsx(ar,{})}),n.jsx(Ue,{ps:2,noOfLines:1,children:c}),n.jsx(Hr,{}),n.jsx(Tt,{hasArrow:!0,label:s,placement:"right",children:n.jsx(Y,{className:"spatial-bookmarks-item-delete","aria-label":s,borderRadius:"full",iconSpacing:0,padding:0,colorScheme:"red",variant:"ghost",leftIcon:n.jsx(zt,{}),onClick:u=>{i(),u.stopPropagation()}})},e)]})})}function Zi(t){const{intl:e,bookmarks:o,showCreate:r,showDelete:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{isDisabled:o.length===0,colorScheme:"red",width:void 0,iconSpacing:0,leftIcon:n.jsx(zt,{}),onClick:i,"aria-label":e.formatMessage({id:"bookmark.button.deleteAll"}),variant:"outline"}),n.jsx(pe,{onClick:r,width:"100%",children:e.formatMessage({id:"bookmark.button.create"})})]})}function Xi(t){const{intl:e,onCancel:o,onClear:r}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:o,children:e.formatMessage({id:"bookmark.button.cancelDelete"})}),n.jsx(pe,{onClick:r,children:e.formatMessage({id:"bookmark.button.confirmDelete"})})]})}function Ji(t){const{intl:e,onCancel:o,onSave:r,isInvalid:i}=t;return n.jsxs(lt,{children:[n.jsx(pe,{variant:"outline",onClick:()=>o(),children:e.formatMessage({id:"bookmark.button.cancel"})}),n.jsx(pe,{isDisabled:i,onClick:()=>r(),children:e.formatMessage({id:"bookmark.button.save"})})]})}function lt(t){return n.jsx(L,{width:"100%",flexDirection:"row",mt:2,gap:1,flexGrow:0,flexShrink:0,children:t.children})}function pe(t){return n.jsx(Y,{width:"100%",...t})}function Qi(t,e){const[o,r]=b.useState();return b.useEffect(()=>{let i;return t?i=new Bi(t,e):i=void 0,r(i),()=>i?.destroy()},[t,e]),o}const en="@open-pioneer/coordinate-search",Pe=Ae.bind(void 0,en),tn=3,on=[{label:"WGS 84",value:X("EPSG:4326"),precision:3},{label:"Web Mercator",value:X("EPSG:3857"),precision:2}],oo=t=>{const{onSelect:e,onClear:o,projections:r=on,input:i,placeholder:a=""}=t,{containerProps:s}=ge("coordinate-input",t),{map:c}=ee(t),d=Pe(),u=c?.olMap,p=dr(u)??void 0,g=cn(r),[m,f]=b.useState(g[0]),[w,j]=ln(i,p,m,e),te=dn(a,p,m),H=ro(d,w,m.value),I=H==="success",E=b.useRef(null);return n.jsxs(V,{...s,children:[n.jsx(Pt,{children:n.jsx("div",{ref:E})}),n.jsx(L,{flexDirection:"row",flexDir:"row",children:n.jsx(Tt,{label:I?void 0:d.formatMessage({id:H}),hasArrow:!0,placement:"auto",isOpen:!I,className:"coordinateInputToolTip",children:n.jsxs(nt,{className:"coordinateInputGroup",children:[n.jsx(rn,{coordinateSearchInput:w,setCoordinateSearchInput:j,placeholder:a,placeholderString:te,onClear:o,isInputValid:I,selectedProjection:m,mapProjection:p,onSelect:e}),n.jsx(st,{padding:"0px",borderLeft:"0px",children:n.jsx(an,{selectedProjection:m,availableProjections:g,portalElement:E,setSelectedProjection:f,coordinateSearchInput:w,mapProjection:p,onSelect:e})})]})})})]})};function rn(t){const{isInputValid:e,selectedProjection:o,mapProjection:r,onSelect:i,coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u}=t,p=Pe();return n.jsxs(nt,{className:"coordinateInputFieldGroup",children:[n.jsx(Ht,{type:"text",value:a,onChange:g=>{s(g.target.value)},isInvalid:!e,backgroundColor:e?"undefined":"red.100",placeholder:d,errorBorderColor:"red.500","aria-label":p.formatMessage({id:"coordinateInput.ariaLabel"}),borderRightRadius:0,onKeyDown:g=>{g.key=="Enter"&&ct(p,a,o.value,r,i)}}),n.jsx(nn,{coordinateSearchInput:a,setCoordinateSearchInput:s,placeholder:c,placeholderString:d,onClear:u,intl:p})]})}function nn(t){const{coordinateSearchInput:e,setCoordinateSearchInput:o,placeholder:r,placeholderString:i,onClear:a,intl:s}=t;return e!==""?n.jsx(Ve,{children:n.jsx(wt,{className:"clearButton",size:"sm",onClick:()=>{o(""),a&&a()},isDisabled:e=="",padding:0,icon:n.jsx(di,{}),"aria-label":s.formatMessage({id:"coordinateInput.ariaLabel"})})}):typeof r=="object"&&e==""?n.jsx(Ve,{children:n.jsx(wt,{className:"copyButton",size:"sm",onClick:()=>{navigator.clipboard.writeText(i)},padding:0,icon:n.jsx(ui,{}),"aria-label":s.formatMessage({id:"coordinateInput.copyPlaceholder"})})}):n.jsx(n.Fragment,{})}function an(t){const[e,o]=b.useState(!1),r=$t(f=>{!e&&f.key==="Enter"&&o(!0)}),{selectedProjection:i,availableProjections:a,portalElement:s,setSelectedProjection:c,coordinateSearchInput:d,mapProjection:u,onSelect:p}=t,g=Pe(),m=sn(g);return n.jsx(Ur,{value:i,defaultValue:i,options:a,menuPlacement:"auto",menuPortalTarget:s.current,"aria-label":g.formatMessage({id:"coordinateInput.ariaLabel"}),classNamePrefix:"coordinate-Input-Select",isSearchable:!1,chakraStyles:{menu:f=>({...f,width:"max-content",minWidth:"100%"}),control:(f,{selectProps:{menuIsOpen:w}})=>({...f,width:"max-content",minWidth:"100%",color:"white",borderleftstyle:"none",borderLeftRadius:0,padding:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,_focus:{boxShadow:"var(--chakra-shadows-outline)"}}),valueContainer:f=>({...f,paddingEnd:0,cursor:"pointer"}),dropdownIndicator:(f,{selectProps:{menuIsOpen:w}})=>({...f,paddingStart:0,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`}),option:f=>({...f,_focus:{background:"var(--chakra-colors-trails-300)"}}),indicatorSeparator:(f,{selectProps:{menuIsOpen:w}})=>({...f,backgroundColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`,borderColor:`${w?"rgb(27, 75, 95)":"var(--chakra-colors-background_primary)"}`})},ariaLiveMessages:m,onChange:f=>{f?.value!==void 0&&(c(f),ct(g,d,f?.value,u,p))},onKeyDown:r,menuIsOpen:e,onMenuOpen:()=>o(!0),onMenuClose:()=>o(!1)})}function sn(t){return b.useMemo(()=>({onFocus:()=>"",onChange:a=>a.action=="select-option"||a.action=="initial-input-focus"?a.label+" "+t.formatMessage({id:"selected"}):"",guidance:()=>"",onFilter:()=>""}),[t])}function ln(t,e,o,r){const i=Pe(),[a,s]=b.useState(""),c=b.useMemo(()=>{if(!t||!e)return"";const u=qe(t,e,o.value);return no(u,o.precision,i)},[t,e,o,i]),d=$t(u=>{r?.(u)});return b.useEffect(()=>{t!=null&&(s(c),ct(i,c,o.value,e,d))},[t,c,d,i,e,o]),[a,s]}function cn(t){return b.useMemo(()=>t.flatMap(o=>X(o.value)!=null?{label:o.label,value:X(o.value),precision:o.precision??tn}:[]),[t])}function dn(t,e,o){const r=Pe();return b.useMemo(()=>{let i;if(typeof t=="string")i=t;else if(!e)i="";else{const a=qe(t,e,o.value);i=no(a,o.precision,r)}return i},[t,e,o,r])}function ro(t,e,o){if(e=="")return"success";if(!e.includes(" "))return"tooltip.space";if(e.indexOf(" ")!=e.lastIndexOf(" "))return"tooltip.spaceOne";const r=e.split(" ");if(r.length!=2||r[0]==""||r[1]=="")return"tooltip.2coords";let i="";if(/^de-?/.test(t.locale)){i=".";const s=e.replaceAll(i,"");if(!/^-?\d+(,\d+)? -?\d+(,\d+)?$/.test(s))return"tooltip.dividerDe"}else if(/en-?/.test(t.locale)){i=",";const s=e.replaceAll(i,"");if(!/^-?\d+(.\d+)? -?\d+(.\d+)?$/.test(s))return"tooltip.dividerEn"}const a=io(e,t);try{if(!_t(o,a))return"tooltip.extent"}catch(s){console.log(s)}try{if(!_t(X("EPSG:4326"),qe(a,o,"EPSG:4326")))return"tooltip.extent"}catch(s){return console.log(s),"tooltip.projection"}return"success"}function _t(t,e){return t.getExtent().length==4&&t.getExtent()[0]<=e[0]&&t.getExtent()[1]<=e[1]&&t.getExtent()[2]>=e[0]&&t.getExtent()[3]>=e[1]}function io(t,e){const o=/^de-?/.test(e.locale)?".":/^en-?/.test(e.locale)?",":"",a=t.replaceAll(o,"").replaceAll(",",".").split(" ");return[parseFloat(a[0]),parseFloat(a[1])]}function ct(t,e,o,r,i){if(o==null||e==""||ro(t,e,o)!=="success")return;const a=io(e,t),s=qe(a,o,r);i&&r&&i({coords:s,projection:r})}function qe(t,e,o){return er(t,e,o)}function no(t,e,o){if(t[0]==null||t[1]==null)return"";const[r,i]=t,a=o.formatNumber(r,{maximumFractionDigits:e,minimumFractionDigits:e}),s=o.formatNumber(i,{maximumFractionDigits:e,minimumFractionDigits:e});return a+" "+s}const un=t=>{const{onSelect:e,onClear:o,projections:r}=t,{containerProps:i}=ge("coordinate-search",t),{map:a}=ee(t),s=a?.olMap,{coordinates:c}=pn(s);return n.jsx(oo,{...i,mapId:t.mapId,onSelect:d=>{a&&(s?.getView().setCenter(d.coords),e?.(d))},onClear:o,placeholder:c||"",projections:r})};function pn(t){const[e,o]=b.useState();return b.useEffect(()=>{if(!t)return;const r=t.on("pointermove",i=>{o(i.coordinate)});return()=>we(r)},[t]),{coordinates:e}}function hn({intl:t}){return{id:"coordinateViewer",title:t.formatMessage({id:"demos.coordinateViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateViewer.description"}),mainWidget:n.jsx(ur,{})}}}}function mn({intl:t,notificationService:e}){return{id:"coordinateInput",title:t.formatMessage({id:"demos.coordinateInput.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateInput.description"}),mainWidget:n.jsx(gn,{notificationService:e,intl:t})}}}}function gn(t){const{notificationService:e,intl:o}=t,[r,i]=b.useState();function a(c,d){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateInput.entered"},{coordinates:c.toString(),projection:d.getCode()}),displayDuration:4e3})}function s(){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateSearch.cleared"}),displayDuration:4e3}),i(void 0)}return n.jsxs(L,{direction:"column",gap:10,children:[n.jsx(oo,{mapId:fe,input:r,placeholder:o.formatMessage({id:"demos.coordinateInput.placeholder"}),onSelect:({coords:c,projection:d})=>a(c,d),onClear:s,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]}),n.jsx(Y,{onClick:()=>{i([761166,6692084])},children:o.formatMessage({id:"demos.coordinateInput.setInput"})})]})}function fn({intl:t,notificationService:e}){return{id:"coordinateSearch",title:t.formatMessage({id:"demos.coordinateSearch.title"}),createModel(){return{description:t.formatMessage({id:"demos.coordinateSearch.description"}),mainWidget:n.jsx(vn,{notificationService:e,intl:t})}}}}function vn(t){const{notificationService:e,intl:o}=t;function r(a,s){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateSearch.entered"},{coordinates:a.toString(),projection:s.getCode()}),displayDuration:4e3})}function i(){e.notify({level:"info",message:o.formatMessage({id:"demos.coordinateSearch.cleared"}),displayDuration:4e3})}return n.jsx(L,{direction:"column",gap:10,children:n.jsx(un,{mapId:fe,onSelect:({coords:a,projection:s})=>r(a,s),onClear:i,projections:[{label:"EPSG:25832",value:"EPSG:25832"},{label:"WGS 84",value:"EPSG:4326"},{label:"Web Mercator",value:"EPSG:3857"},{label:"EPSG:25833",value:"EPSG:25833"},{label:"EPSG:31466",value:"EPSG:31466"},{label:"EPSG:31467",value:"EPSG:31467"},{label:"EPSG:3035",value:"EPSG:3035"}]})})}function bn({intl:t}){return{id:"scaleViewer",title:t.formatMessage({id:"demos.scaleViewer.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleViewer.description"}),mainWidget:n.jsx(pr,{})}}}}function wn({intl:t}){return{id:"scaleSetter",title:t.formatMessage({id:"demos.scaleSetter.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleSetter.description"}),mainWidget:n.jsx(Fi,{})}}}}function yn({intl:t}){return{id:"scaleBar",title:t.formatMessage({id:"demos.scaleBar.title"}),createModel(){return{description:t.formatMessage({id:"demos.scaleBar.description"}),tools:n.jsx(hr,{})}}}}function xn({intl:t}){return{id:"measurement",title:t.formatMessage({id:"demos.measurement.title"}),createModel(){return{description:t.formatMessage({id:"demos.measurement.description"}),mainWidget:n.jsx(mr,{})}}}}function Sn({intl:t}){return{id:"mapNavigation",title:t.formatMessage({id:"demos.mapNavigation.title"}),createModel(){return{description:t.formatMessage({id:"demos.mapNavigation.description"}),tools:n.jsxs(n.Fragment,{children:[n.jsx(Lr,{}),n.jsx(jr,{}),n.jsx(kn,{}),n.jsx(Ar,{})]})}}}}function kn(){const{map:t}=ee(),[e,o]=b.useState(void 0);return b.useEffect(()=>{if(!t)return;const r=new pi(t);return o(r),()=>r.destroy()},[t]),e&&n.jsxs(n.Fragment,{children:[n.jsx(Pr,{viewModel:e}),n.jsx(Tr,{viewModel:e})]})}function In({intl:t}){return{id:"geolocation",title:t.formatMessage({id:"demos.geolocation.title"}),createModel(){return{description:t.formatMessage({id:"demos.geolocation.description"}),tools:n.jsx(Ai,{})}}}}function Mn({intl:t}){return{id:"spatialBookmarks",title:t.formatMessage({id:"demos.spatialBookmarks.title"}),createModel(){return{description:t.formatMessage({id:"demos.spatialBookmarks.description"}),mainWidget:n.jsx(qi,{})}}}}function En({intl:t}){return{id:"printing",title:t.formatMessage({id:"demos.printing.title"}),createModel(){return{description:t.formatMessage({id:"demos.printing.description"}),mainWidget:n.jsx(gr,{})}}}}const ao="showcase-app",so=rt.bind(void 0,ao),ve=Ae.bind(void 0,ao);function _n({intl:t,mapModel:e}){return{id:"tocLegend",title:t.formatMessage({id:"demos.tocLegend.title"}),createModel(){function o(i=!0){e.layers.getLayerById("verwaltungsgebiete").setVisible(i),e.layers.getLayerById("krankenhaus").setVisible(i),e.layers.getLayerById("ogc_kitas").setVisible(i)}function r(){o(!1),e?.layers.activateBaseLayer("osm")}return{description:t.formatMessage({id:"demos.tocLegend.description"}),mainWidget:n.jsx(Cn,{}),destroy:r}}}}function Cn(){const t=b.useId(),e=b.useId(),o=ve();return n.jsxs(n.Fragment,{children:[n.jsx(V,{role:"dialog","aria-labelledby":t,children:n.jsx(Ne,{title:n.jsx(Je,{id:t,size:"md",mb:2,children:n.jsx(Ue,{children:o.formatMessage({id:"demos.tocLegend.tocTitle"})})}),children:n.jsx(kr,{showTools:!0,basemapSwitcherProps:{allowSelectingEmptyBasemap:!0}})})}),n.jsx(V,{pt:2,role:"dialog","aria-labelledby":e,children:n.jsx(Ne,{title:n.jsx(Je,{id:e,size:"md",mb:2,children:o.formatMessage({id:"demos.tocLegend.legendTitle"})}),children:n.jsx(fr,{showBaseLayers:!0})})})]})}function Ln(t){return{id:"selectionResultList",title:t.intl.formatMessage({id:"demos.selectionResultList.title"}),createModel(){return new jn(t)}}}var Se,ne,ae,Oe,Fe,At;let jn=(At=class{constructor(e){h(this,Se);h(this,ne);h(this,ae,J({key:0,input:void 0,open:!1}));y(this,"description");y(this,"mainWidget");h(this,Oe,e=>{const{results:o}=e,a={columns:[{id:"id",displayName:"ID",width:100,getPropertyValue(c){return c.id}},{propertyName:"pointOfContact.address.postCode",displayName:"PLZ",width:120},{propertyName:"name",displayName:"Name"},{propertyName:"inspireId",displayName:"inspireID"},{displayName:"Gefördert",width:160,getPropertyValue(c){switch(c.properties?.gefoerdert){case"ja":return!0;case"nein":return!1;default:return c.properties?.gefoerdert}}}],data:o,formatOptions:{numberOptions:{maximumFractionDigits:3},dateOptions:{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}}},s=l(this,ae).value.key;l(this,ae).value={open:!0,key:s+1,input:a}});h(this,Fe,e=>{console.log("Selected features: ",e.features)});const{mapModel:o,vectorSelectionSourceFactory:r,intl:i}=e;v(this,Se,o),v(this,ne,An(o,r)),this.description=i.formatMessage({id:"demos.selectionResultList.description"}),this.mainWidget=n.jsx(vr,{sources:[l(this,ne)],onSelectionComplete:l(this,Oe)}),o.layers.getLayerById("ogc_kitas").setVisible(!0)}destroy(){l(this,ne).destroy(),l(this,Se).layers.getLayerById("ogc_kitas").setVisible(!1)}get listContainer(){const e=l(this,ae).value;if(!(!e.open||!e.input))return n.jsx(Wr,{input:e.input,onSelectionChange:l(this,Fe)},e.key)}},Se=new WeakMap,ne=new WeakMap,ae=new WeakMap,Oe=new WeakMap,Fe=new WeakMap,At);function An(t,e){const o=t.layers.getLayerById("ogc_kitas");return e.createSelectionSource({vectorLayer:o.olLayer,label:o.title})}const Pn="krankenhaus";function Tn(t){return{id:"editing",title:t.intl.formatMessage({id:"demos.editing.title"}),createModel(){return new Rn(t)}}}var ke,se;class Rn{constructor(e){y(this,"description");y(this,"mainWidget");h(this,ke);h(this,se);const{mapModel:o,intl:r,editingService:i,notificationService:a}=e;v(this,ke,o),this.description=r.formatMessage({id:"demos.editing.description"}),v(this,se,new Nn(o,i,a,r)),this.mainWidget=n.jsx(Vn,{editingController:l(this,se)}),this._setEditLayerVisible(!0)}destroy(){this._setEditLayerVisible(!1),l(this,se).stopEditing()}_setEditLayerVisible(e=!0){l(this,ke).layers.getLayerById(Pn).setVisible(e)}}ke=new WeakMap,se=new WeakMap;var M,_,q,le,$,D,K,F;class Nn{constructor(e,o,r,i){h(this,M);h(this,_);h(this,q);h(this,le);h(this,$);h(this,D);h(this,K);h(this,F);v(this,M,J(!1)),v(this,_,e),v(this,q,o),v(this,le,r),v(this,$,i)}editingActive(){return l(this,M).value}startCreateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0;const e=l(this,_).layers.getLayerById("krankenhaus"),o=new URL(e.attributes.collectionURL+"/items");l(this,q).createFeature(l(this,_),o).whenComplete().then(i=>{if(!i)return;l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.create.featureCreated"},{featureId:i.featureId})}),(e?.olLayer).getSource()?.refresh()}).catch(i=>{console.error(i)}).finally(()=>{l(this,M).value=!1})}catch(e){l(this,M).value=!1,console.error(e)}}startUpdateWorkflow(){if(!l(this,M).value)try{l(this,M).value=!0,v(this,F,this._createEditingSelectTooltip());const e=l(this,_).layers.getLayerById("krankenhaus"),o=e?.olLayer;v(this,D,new br({layers:[o]})),l(this,_).olMap.addInteraction(l(this,D)),l(this,F).element.classList.remove("editing-tooltip-hidden"),v(this,K,l(this,D).on("select",r=>{const i=r.selected,a=r.deselected;if(i.length!==1||a.length!==0)return;this._stopUpdateSelection();const s=i[0];if(!s)throw Error("feature is undefined");const c=new URL(e.attributes.collectionURL+"/items");l(this,q).updateFeature(l(this,_),c,s).whenComplete().then(u=>{u&&(l(this,le).notify({level:"info",message:l(this,$).formatMessage({id:"demos.editing.update.featureModified"},{featureId:u.featureId})}),o.getSource()?.refresh())}).catch(u=>{console.error(u)}).finally(()=>{l(this,M).value=!1})}))}catch(e){l(this,M).value=!1,console.error(e)}}_createEditingSelectTooltip(){const e=document.createElement("div");e.className="editing-tooltip editing-tooltip-hidden",e.textContent=l(this,$).formatMessage({id:"demos.editing.update.tooltip.select"});const o=new Bt({element:e,offset:[15,0],positioning:"center-left"}),r=l(this,_).olMap,i=r.on("pointermove",a=>{a.dragging||o.setPosition(a.coordinate)});return r.addOverlay(o),{overlay:o,element:e,destroy(){we(i),r.removeOverlay(o)}}}_stopUpdateSelection(){l(this,D)&&l(this,_).olMap.removeInteraction(l(this,D)),l(this,K)&&we(l(this,K)),l(this,F)&&l(this,F).destroy(),v(this,D,void 0),v(this,K,void 0),v(this,F,void 0)}stopEditing(){l(this,q).stop(fe),this._stopUpdateSelection(),l(this,M).value=!1}}M=new WeakMap,_=new WeakMap,q=new WeakMap,le=new WeakMap,$=new WeakMap,D=new WeakMap,K=new WeakMap,F=new WeakMap;function Vn({editingController:t}){const e=ve(),o=Q(()=>t.editingActive(),[t]),r=o?e.formatMessage({id:"demos.editing.activeInfo"}):e.formatMessage({id:"demos.editing.inactiveInfo"});return n.jsxs(n.Fragment,{children:[n.jsxs(L,{px:1,py:1,children:[n.jsx(Y,{mr:2,isDisabled:o,onClick:()=>{t.startCreateWorkflow()},children:e.formatMessage({id:"demos.editing.startCreateButton"})}),n.jsx(Y,{mr:2,isDisabled:o,onClick:()=>{t.startUpdateWorkflow()},children:e.formatMessage({id:"demos.editing.startUpdateButton"})}),n.jsx(Y,{isDisabled:!o,onClick:()=>{t.stopEditing()},children:e.formatMessage({id:"demos.editing.stopButton"})})]}),n.jsx(L,{px:1,py:1,children:r})]})}function Dn(t){return[_n(t),hn(t),mn(t),fn(t),bn(t),wn(t),yn(t),xn(t),Tn(t),Sn(t),In(t),Mn(t),Si(t),En(t),Ln(t),Ii(t)]}const On=je("app::AppModel");var Ge,Ie,Me,G,A,ze,Be,me,lo,co;class Fn{constructor(e,o,r,i){h(this,me);h(this,Ge);h(this,Ie);h(this,Me);h(this,G);h(this,A);h(this,ze,Rr(()=>Array.from(l(this,G).values())));h(this,Be,[]);if(v(this,Ge,e),v(this,Ie,o),v(this,Me,r),v(this,G,new Map(i.map(s=>[s.id,s]))),l(this,G).size===0)throw new Error("No demos defined.");const a=i[0];v(this,A,J([a,a.createModel()])),S(this,me,lo).call(this),l(this,Be).push(S(this,me,co).call(this))}destroy(){l(this,A).value[1].destroy?.()}get currentDemo(){return l(this,A).value[0]}get currentDemoModel(){return l(this,A).value[1]}get allDemoInfos(){return l(this,ze).value}selectDemo(e){const o=l(this,G).get(e);if(!o)throw new Error(`Demo '${e}' does not exist.`);Nr(()=>{const[,r]=l(this,A).value;r.destroy?.(),l(this,A).value=[o,o.createModel()]})}}Ge=new WeakMap,Ie=new WeakMap,Me=new WeakMap,G=new WeakMap,A=new WeakMap,ze=new WeakMap,Be=new WeakMap,me=new WeakSet,lo=function(){const o=new URL(window.location.href).searchParams.get("demo");if(o){if(!l(this,G).has(o)){l(this,Ie).notify({title:l(this,Me).formatMessage({id:"demoSelection.notFound"},{demoId:o})});return}try{this.selectDemo(o)}catch(r){On.error("Failed to select demo from URL",r)}}},co=function(){return qt(()=>[l(this,A).value[0].id],([e])=>{const o=new URL(window.location.href);o.searchParams.set("demo",e),window.history.replaceState(null,"",o.toString())},{immediate:!0})};var ce,Ee,_e,He,uo;class Gn{constructor(e){h(this,He);h(this,ce,J({kind:"loading"}));h(this,Ee,[]);h(this,_e,!1);const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,notificationService:c}=e.references,d=e.intl;S(this,He,uo).call(this,{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:d,notificationService:c}).catch(u=>{l(this,ce).value={kind:"error",message:u.message||"Unknown error"}})}destroy(){v(this,_e,!0);for(const e of l(this,Ee))e.destroy()}get appState(){return l(this,ce).value}}ce=new WeakMap,Ee=new WeakMap,_e=new WeakMap,He=new WeakSet,uo=async function(e){const{mapRegistry:o,httpService:r,notifier:i,vectorSelectionSourceFactory:a,editingService:s,intl:c,notificationService:d}=e,u=await o.getMapModel(fe);if(!u)throw new Error("No mapModel found.");const p=Dn({intl:c,httpService:r,mapModel:u,vectorSelectionSourceFactory:a,editingService:s,notificationService:d}),g={kind:"ready",appModel:new Fn(u,i,c,p),destroy(){this.appModel.destroy()}};if(l(this,_e)){g.destroy();return}l(this,ce).value=g,l(this,Ee).push(g)};const Z=je("local-storage"),zn=0,N={CORRUPTED_DATA:"local-storage:corrupted-data",INVALID_PATH:"local-storage:invalid-path",INVALID_VALUE:"local-storage:invalid-value",NOT_SUPPORTED:"local-storage:not-supported",INTERNAL:"local-storage:internal-error"};var de,P,z,ue,T,k,po,ho,be,oe,mo;class Bn{constructor(e){h(this,k);h(this,de);h(this,P,{});h(this,z);h(this,ue);h(this,T);v(this,de,qn(e.properties)),v(this,z,$n()),l(this,z)&&(S(this,k,ho).call(this),v(this,ue,S(this,k,mo).call(this)))}destroy(){l(this,T)&&(clearTimeout(l(this,T)),v(this,T,void 0)),l(this,z)&&S(this,k,be).call(this)}get isSupported(){return!!l(this,ue)}get(e){return S(this,k,oe).call(this).get(e)}set(e,o){return S(this,k,oe).call(this).set(e,o)}remove(e){return S(this,k,oe).call(this).remove(e)}removeAll(){return S(this,k,oe).call(this).removeAll()}getNamespace(e){return S(this,k,oe).call(this).getNamespace(e)}}de=new WeakMap,P=new WeakMap,z=new WeakMap,ue=new WeakMap,T=new WeakMap,k=new WeakSet,po=function(){l(this,T)&&clearTimeout(l(this,T)),v(this,T,setTimeout(()=>{v(this,T,void 0),S(this,k,be).call(this)},zn))},ho=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=e.getItem(l(this,de));if(o==null){v(this,P,{}),S(this,k,be).call(this);return}try{const r=JSON.parse(o);if(!he(r))throw new R(N.CORRUPTED_DATA,"Persisted value should be an object.");v(this,P,r)}catch(r){Z.warn("Invalid persisted data, reverting to default.",r),v(this,P,{}),S(this,k,be).call(this)}}catch(e){Z.error("Failed to load from local storage",e)}},be=function(){try{const e=l(this,z);if(!e)throw new R(N.INTERNAL,"Local storage is not available.");const o=JSON.stringify(l(this,P));e.setItem(l(this,de),o)}catch(e){Z.error("Failed to save to local storage",e)}},oe=function(){const e=l(this,ue);if(!e)throw new R(N.NOT_SUPPORTED,"Local storage is not supported by this browser.");return e},mo=function(){const e={getByPath:o=>Lt(Hn(l(this,P),o)),setByPath:(o,r)=>{if(!Wn(r))throw new R(N.INVALID_VALUE,"The value is not supported by local storage.");if(r=Lt(r),o.length===0){if(!he(r))throw new R(N.INVALID_VALUE,"The root value must be a plain object.");v(this,P,r)}else Un(l(this,P),o,r);S(this,k,po).call(this)}};return new dt([],e)};class dt{path;access;constructor(e,o){this.path=e,this.access=o}get(e){return this.access.getByPath([...this.path,e])}set(e,o){this.access.setByPath([...this.path,e],o)}remove(e){this.access.setByPath([...this.path,e],void 0)}removeAll(){this.access.setByPath(this.path,{})}getNamespace(e){const o=this.get(e);if(o===void 0)this.set(e,{});else if(!he(o))throw new R(N.INVALID_PATH,`Cannot use '${e}' as a namespace because it is not associated with an object.`);return new dt(this.path.concat([e]),this.access)}}const Ct="trails-state";function Hn(t,e){let o=t;for(const r of e){if(!he(o))throw new R(N.INVALID_PATH,`Cannot get nested property '${r}' because the parent is no object.`);o=o[r]}return o}function Un(t,e,o){if(!e.length)throw new R(N.INTERNAL,"Path must not be empty.");let r=t;for(let a=0,s=e.length-1;a"u"){Z.warn("Local storage is not supported by this browser.");return}try{const t=globalThis.localStorage;if(!t){Z.warn("Local storage is not supported by this browser.");return}return t}catch(t){Z.warn("Local storage is not supported by this browser.",t);return}}function Lt(t){return t!=null&&(t=JSON.parse(JSON.stringify(t))),t}const Kn={"showcase-app":{name:"showcase-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:gi,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{vectorSourceFactory:{name:"ogc-features.VectorSourceFactory",qualifier:void 0,all:!1}}},AppInitModel:{name:"AppInitModel",clazz:Gn,provides:[{name:"app.AppInitModel",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1},mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},notifier:{name:"notifier.NotificationService",qualifier:void 0,all:!1},vectorSelectionSourceFactory:{name:"selection.VectorSelectionSourceFactory",qualifier:void 0,all:!1},editingService:{name:"editing.EditingService",qualifier:void 0,all:!1},notificationService:{name:"notifier.NotificationService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"app.AppInitModel",qualifier:void 0,all:!1},{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:tr,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/notifier":{name:"@open-pioneer/notifier",services:{NotificationServiceImpl:{name:"NotificationServiceImpl",clazz:qr,provides:[{name:"notifier.NotificationService",qualifier:"notifier.NotificationService"}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/reactivity":{name:"@open-pioneer/reactivity",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:or,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/ogc-features":{name:"@open-pioneer/ogc-features",services:{VectorSourceFactory:{name:"VectorSourceFactory",clazz:Vr,provides:[{name:"ogc-features.VectorSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}},SearchSourceFactory:{name:"SearchSourceFactory",clazz:Dr,provides:[{name:"ogc-features.SearchSourceFactory",qualifier:void 0}],references:{httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/coordinate-viewer":{name:"@open-pioneer/coordinate-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-bar":{name:"@open-pioneer/scale-bar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/scale-viewer":{name:"@open-pioneer/scale-viewer",services:{},ui:{references:[]},properties:{}},"@open-pioneer/overview-map":{name:"@open-pioneer/overview-map",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-navigation":{name:"@open-pioneer/map-navigation",services:{},ui:{references:[]},properties:{}},"@open-pioneer/toc":{name:"@open-pioneer/toc",services:{},ui:{references:[]},properties:{}},"@open-pioneer/result-list":{name:"@open-pioneer/result-list",services:{},ui:{references:[]},properties:{}},"@open-pioneer/printing":{name:"@open-pioneer/printing",services:{PrintingServiceImpl:{name:"PrintingServiceImpl",clazz:$r,provides:[{name:"printing.PrintingService",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1},{name:"printing.PrintingService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/editing":{name:"@open-pioneer/editing",services:{EditingServiceImpl:{name:"EditingServiceImpl",clazz:wr,provides:[{name:"editing.EditingService",qualifier:void 0}],references:{mapRegistry:{name:"map.MapRegistry",qualifier:void 0,all:!1},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{polygonStyle:{value:{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"red","stroke-width":1.25,"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1},vertexStyle:{value:{"circle-radius":3,"circle-fill-color":"red","circle-stroke-width":1.25,"circle-stroke-color":"red"},required:!1}}},"@open-pioneer/legend":{name:"@open-pioneer/legend",services:{},ui:{references:[]},properties:{}},"@open-pioneer/measurement":{name:"@open-pioneer/measurement",services:{},ui:{references:[]},properties:{}},"@open-pioneer/search":{name:"@open-pioneer/search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/selection":{name:"@open-pioneer/selection",services:{VectorSelectionSourceFactory:{name:"VectorSelectionSourceFactory",clazz:yr,provides:[{name:"selection.VectorSelectionSourceFactory",qualifier:void 0}],references:{}}},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/coordinate-search":{name:"@open-pioneer/coordinate-search",services:{},ui:{references:[]},properties:{}},"@open-pioneer/geolocation":{name:"@open-pioneer/geolocation",services:{},ui:{references:[{name:"notifier.NotificationService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/scale-setter":{name:"@open-pioneer/scale-setter",services:{},ui:{references:[]},properties:{}},"@open-pioneer/spatial-bookmarks":{name:"@open-pioneer/spatial-bookmarks",services:{},ui:{references:[{name:"local-storage.LocalStorageService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map-ui-components":{name:"@open-pioneer/map-ui-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/local-storage":{name:"@open-pioneer/local-storage",services:{LocalStorageServiceImpl:{name:"LocalStorageServiceImpl",clazz:Bn,provides:[{name:"local-storage.LocalStorageService",qualifier:"local-storage.LocalStorageService"}],references:{}}},ui:{references:[]},properties:{storageId:{value:null,required:!1}}}},Yn=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.printing-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10000;-webkit-user-select:none;user-select:none;pointer-events:all;cursor:wait;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:#b4b4b4cc}.printing-overlay-status{flex:1 1 auto;font-size:1.5em;text-align:center}.printing-scale-bar.ol-scale-bar{left:var(--printing-scale-bar-left);bottom:var(--printing-scale-bar-bottom)}.editing-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.editing-tooltip-hidden{visibility:hidden}.measurement-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.measurement-active-tooltip{background:#000000e6;border-radius:4px;border-color:#000000e6;opacity:.9;color:#fff}.measurement-finished-tooltip{background-color:#4cb3ffe6;color:#000;border:1px solid white}.measurement-active-tooltip:before,.measurement-finished-tooltip:before{border-top:6px solid rgba(0,0,0,.9);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.measurement-finished-tooltip:before{border-top-color:#4cb3ff}.search-component .chakra-divider{display:none}.search-component .search-highlighted-match{font-weight:700}.search-component .search-value-container{cursor:text;padding-left:30px!important}.search-component .search-invisible{display:none}.selection-drag-box{background-color:#ffffff4d!important;border:3px solid var(--chakra-colors-background_primary)!important}.selection-tooltip{position:relative;background:#fffc;border-radius:4px;color:#000;padding:4px 8px;opacity:1;white-space:nowrap;font-size:12px;cursor:default;-webkit-user-select:none;user-select:none;font-weight:700}.selection .react-select{cursor:default}.map-container .selection-active{cursor:crosshair}.map-container .selection-inactive{cursor:no-drop}.selection-source-value.selection-source-value--disabled{opacity:.4}.selection-source-value.selection-source-value--disabled span{margin:0 6px 0 0}.map-anchor.main-map-anchor{overflow-x:hidden;overflow-y:auto}.map-container:focus-visible{outline:none}.map-container:focus-visible:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:3px solid var(--chakra-colors-trails-500)}@media screen and (max-width: 48em){.map-anchor.main-map-anchor{max-height:45%}}.scale-bar .ol-scale-bar{margin-bottom:8px;margin-right:8px}.scale-bar .ol-scale-bar,.scale-bar .ol-scale-line{position:relative;bottom:0;left:0;background:none}.scale-bar .ol-scale-bar .ol-scale-bar-inner,.scale-bar .ol-scale-bar .ol-scale-line-inner,.scale-bar .ol-scale-line .ol-scale-bar-inner,.scale-bar .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)}.overview-map .ol-overviewmap{position:relative;height:100%;width:100%}.overview-map .ol-overviewmap:not(.ol-collapsed){border:1px solid black}.overview-map .ol-overviewmap .ol-overviewmap-map{border:none;width:100%;height:100%}.overview-map .ol-overviewmap .ol-overviewmap-box{border:2px solid red}.result-list-no-data-message{text-align:center;margin-top:50px;font-weight:700;font-size:larger}.result-list-table th,.result-list-table td{overflow-wrap:break-word}.result-list-table.result-list-table--is-resizing *{cursor:col-resize}.result-list-table thead{position:sticky;top:0;z-index:1;background:var(--chakra-colors-background_body)}.result-list-table th{position:relative;border-right-width:thin}.result-list-table tbody tr:hover{background:var(--chakra-colors-background_light)}.result-list-table .result-list-resizer{position:absolute;top:0;height:100%;right:0;width:8px;background:var(--chakra-colors-trails-100);transform:scaleX(.25);cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;padding-left:0}.result-list-table th:last-child .result-list-resizer{width:8px;transform:translate(50%) scaleX(.25)}.result-list-table th .result-list-resizer.result-list-resizer--is-resizing{background:var(--chakra-colors-trails-500);transform:scale(1)}.result-list-table th .result-list-resizer:hover{transform:scale(1)}',Zn=["en","de"];function Xn(t){switch(t){case"en":return yt(()=>import("./CyW8jJ9EgQGV.js"),[],import.meta.url).then(e=>e.default);case"de":return yt(()=>import("./DhZSBGOtlRpg.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${t}'`)}const Jn=xo(Yn),Qn=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Xn,locales:Zn,packages:Kn,styles:Jn},Symbol.toStringTag,{value:"Module"}));function go({label:t,children:e}){return n.jsxs(Kr,{as:Yr,maxWidth:{base:"none",md:"20em"},width:{base:"100%",sm:"47%",md:void 0},children:[n.jsx(Zr,{flexBasis:{base:"8em",sm:"auto"},m:0,children:t}),e]})}const ea=je("app::DemoSelection");function ta({appModel:t}){const e=ve(),{allDemos:o,currentDemo:r}=Q(()=>({allDemos:t.allDemoInfos,currentDemo:t.currentDemo}),[t]),i=b.useMemo(()=>o.map(a=>n.jsx("option",{value:a.id,children:a.title},a.id)),[o]);return n.jsx(go,{label:e.formatMessage({id:"demoSelection.label"}),children:n.jsx(Ut,{value:r.id,onChange:a=>{const s=a.target.value;try{t.selectDemo(s)}catch(c){ea.error("Failed to select demo",c)}},children:i})})}function oa(){const t=ve(),e=so("runtime.ApplicationContext"),o=ra(e.getLocale()),r=i=>{switch(i){case"en":e.setLocale("en-GB");break;case"de":e.setLocale("de-DE");break}};return n.jsx(go,{label:t.formatMessage({id:"localeSwitcher.label"}),children:n.jsxs(Ut,{value:o,onChange:i=>r(i.target.value),children:[n.jsx("option",{value:"de",children:t.formatMessage({id:"localeSwitcher.locale.de"})}),n.jsx("option",{value:"en",children:t.formatMessage({id:"localeSwitcher.locale.en"})})]})})}function ra(t){const e=t.match(/^[a-z]+/i)?.[0];if(e==="en"||e=="de")return e;throw new Error("unexpected locale prefix: "+e)}function ia({appModel:t}){const e=ve();return n.jsxs(L,{as:"header",px:2,py:3,flexWrap:{base:"wrap",md:"nowrap"},alignItems:"baseline",gap:2,boxShadow:"1px 0px 3px rgba(0, 0, 0, 0.5)",bgColor:"white",zIndex:100,children:[n.jsx(Je,{size:"md",flexShrink:0,flexGrow:1,textAlign:{base:"center",md:"left"},width:{base:"100%",md:"auto"},mb:{base:2,md:0},children:e.formatMessage({id:"header.title"})}),n.jsx(ta,{appModel:t}),n.jsx(oa,{})]})}function na(){const t=so("app.AppInitModel"),e=Q(()=>t.appState,[t]);let o;switch(e.kind){case"loading":o="Loading...";break;case"error":o="Error: "+e.message;break;case"ready":o=n.jsx(aa,{state:e})}return o}function aa(t){const e=ve(),o=t.state.appModel,{currentDemo:r,currentDemoModel:i}=Q(()=>({currentDemo:o.currentDemo,currentDemoModel:o.currentDemoModel}),[o]),a=Q(()=>i.listContainer,[i]),s=b.useMemo(()=>({left:0,right:0,bottom:a!=null?400:0,top:0}),[a]);return n.jsxs(n.Fragment,{children:[n.jsx(xr,{position:"top-right"}),n.jsx(L,{height:"100%",direction:"column",children:n.jsx(Ne,{title:n.jsx(ia,{appModel:o}),children:n.jsx(L,{flex:"1",direction:"column",position:"relative",children:n.jsx(rr,{mapId:fe,children:n.jsxs(ir,{viewPadding:s,role:"main","aria-label":e.formatMessage({id:"ariaLabels.map"}),children:[n.jsx(bt,{className:"main-map-anchor",position:"top-left",horizontalGap:10,verticalGap:10,children:n.jsx(V,{bgColor:"white",borderRadius:10,p:2,maxW:"500px",children:n.jsxs(Ne,{title:r.title,sectionHeadingProps:{size:"lg"},children:[n.jsx(Ue,{py:4,dangerouslySetInnerHTML:{__html:i.description}}),i.mainWidget]})})}),n.jsx(bt,{position:"bottom-right",horizontalGap:6,children:n.jsx(Qe,{p:1,children:i.tools})}),a&&n.jsx(V,{className:"list-container",position:"absolute",bottom:"0",backgroundColor:"white",width:"100%",height:"400px",zIndex:1,borderTop:"2px solid",borderColor:"trails.100",children:a})]})})})})})]})}const sa=new URLSearchParams(window.location.search),la=sa.get("lang")||void 0,ca=So({component:na,appMetadata:Qn,config:{properties:{"@open-pioneer/local-storage":{storageId:"ol-showcase-state"}},locale:la}});customElements.define("showcase-app",ca); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/B2JeDJc3u--N.js b/openlayers-base-packages/pr-previews/pr-355/assets/H7VhUBOXt34K.js similarity index 92% rename from openlayers-base-packages/pr-previews/pr-355/assets/B2JeDJc3u--N.js rename to openlayers-base-packages/pr-previews/pr-355/assets/H7VhUBOXt34K.js index 3865b1b..0fe00b7 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/B2JeDJc3u--N.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/H7VhUBOXt34K.js @@ -1 +1 @@ -import{j as o,l as I,a as O,r as v,B as t,e as W}from"./CzUo6bX8-UUU.js";import{S as F,T as U,O as G,M as T,H as B,c as i,aC as f,ay as l,F as w,g as N,ao as h,an as m,i as k,e as Q,B as y,f as E,j as V,k as A}from"./B36mctiVgF5V.js";import{L as z}from"./Di-_YM5QvGet.js";import{T as u,S as j,V as K,U as q,a}from"./CovJx79h1x39.js";import{H as d}from"./_YjaCHRtWzU8.js";import{C as Y}from"./DXNMkmWkGPwJ.js";import"./0jkoYKtubXoE.js";var M=r=>o.jsx(I.div,{className:"chakra-stack__divider",...r,__css:{...r.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});M.displayName="StackDivider";const b="main";class J{mapId=b;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new U({source:new G})})]}}}const X={"highlight-and-zoom-app":{name:"highlight-and-zoom-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:J,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:T,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},_=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',$=[];function oo(r){throw new Error(`Unsupported locale: '${r}'`)}const eo=O(_),ro=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:oo,locales:$,packages:X,styles:eo},Symbol.toStringTag,{value:"Module"})),C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM6SURBVGhD7Zn7TtRAFMZn2l2MRuWuBg2aGEX/MMLCC5iUx/UJ6CNw0WiiRBFBJaLAilyMbNvxO8tpgkDbM9MxarK/ZNPvdJfpt6dnznQW1aOHDM1Hb1x9PrvYSEx/YNQlijOtDpOG3v3+eK7V/YAnvBgfWozeKKPGYbCPT51LMzE/8UXW2634Pp9yppbxgaXZl4ExE0moG3xKRCM1nSzQy98m5x7xKWucjQ8vRO87DX2bQydwB9a2p+M7HFrhZHxkPto8auprHNair2O+bs3E1mMFfBSDTH/wZZrAWKMYc41DMVbGBxejZZTHLQ69gTHHB5eiVxyKsDKOCXWPpXeM1hMsRYiN02Q02n/fz0Gb1HQNDisRG88CZVUiYWYyenEoAubF1xBlkFZDHKaOo3KaHbOxPRPf5LDL8Hz0qdPUYxyWghVW5EmUcZgZZVkKlvp3p00TdI56NoelDC1EqyxLERlHCgZYFoLVMNmZju9yeAZaaMLUpBwWgmecIZaliIwblCzLQoJMHbIsJMzUD5aFSK5FiCengA4fyzjiYxn+ahwjVZpCq7zMshB0jcrP4FoJy1KkGa+8xVj9LrAspOqxl0CpHLAsRWQczxMbLEtBRygsBTyzS8pEoW1+ZlmKqJ4I9HIkQwae+DbTULUhdZiqAXzx68fvVOO1jxO0e2FZCRlNA/0Arwkb01gvKksyR2wck+8jyz9GFqp1lpWIS4WwKRcXpGVCiDNOoHb3WHoHY++wFGFlHPW6wtI72L4NsxRhZRy3cgqZ2efQGxhzi6UYqxrP8V3rNrWdY5XxHGToC8vaoM2KO8lJnDJO9D+bzepu5fCYm7RbcZNDK5wyTgSZecvSmTTUL1haUytj2JId4tniIodWUPuz7SQnqWWccJmo2iizOznnfLeJWn9M0D6TpRhtjNWPP+dRO+PEyHy0h8WpcpNAoEQ2USI3OHTGi3FCUjLdDbVjFzlN7VLJCTPzmmUhT1ux00Q+D2/G21PxQyoDDs+AubDyRLiflOCtVHLQIg/QIrv//8nBF3L6DbwM78aJwaUowe6n+/sITO/D9JXuG/8DNFmxeRZv9/4ZNsbGfiuXHj3+Ckr9AhPaF/aBpAV7AAAAAElFTkSuQmCC";function io(){const{map:r}=N(b),n=v.useRef(new Map),[S,R]=v.useState(!1),H=[new h([852011.307424,6788511322702e-6]),new h([829800.379064,6809086916672e-6])],P=[new z([[851890.680238,6788133616293e-6],[851298.293269,6790235634571e-6],[853419.420804,6790407617885e-6]]),new z([[848107.047338,6790579601198e-6],[849081.619449,6793197569417e-6]])],L=[new m([[[851728.251553,6788384425292e-6],[851518.049725,6788651954891e-6],[852182.096409,6788881265976e-6],[851728.251553,6788384425292e-6]]]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])],D=[new h([852011.307424,6788511322702e-6]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])];function c(e,x,g){if(e&&!n.current.has(g))if(S){const s=e.highlightAndZoom(x,{highlightStyle:to});s&&n.current.set(g,s)}else{const s=e.highlightAndZoom(x,{});s&&n.current.set(g,s)}}function p(e){n.current.has(e)&&(n.current.get(e)?.destroy(),n.current.delete(e))}function Z(e){e&&(e.removeHighlights(),n.current=new Map)}return o.jsx(k,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(Q,{title:o.jsx(y,{textAlign:"center",py:1,children:o.jsx(E,{size:"md",children:"OpenLayers Base Packages - Highlight and Zoom"})}),children:o.jsx(k,{flex:"1",direction:"column",position:"relative",children:o.jsxs(V,{mapId:b,children:[o.jsx(A,{position:"top-left",horizontalGap:10,verticalGap:10,children:o.jsxs(y,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[o.jsx(u,{align:"center",children:"Test Controls:"}),o.jsx(j,{align:"center",divider:o.jsx(M,{borderColor:"gray.200"}),pt:5,children:o.jsx(Y,{onChange:e=>{R(e.target.checked)},children:"Own Style"})}),o.jsxs(j,{pt:5,children:[o.jsxs(d,{align:"center",children:[o.jsx(t,{width:105,onClick:()=>c(r,H,"point"),children:"Points"}),o.jsx(t,{onClick:()=>p("point"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,P,"line"),children:"LineString"}),o.jsx(t,{onClick:()=>p("line"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,L,"polygon"),children:"Polygons"}),o.jsx(t,{onClick:()=>p("polygon"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,D,"mix"),children:"Mixed"}),o.jsx(t,{onClick:()=>p("mix"),children:"Remove"})]}),o.jsx(t,{onClick:()=>Z(r),children:"Reset All"})]})]})}),o.jsx(A,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(u,{as:"b",children:"Description"}),o.jsx(u,{children:"This application can be used to test adding highlight or marker, zoom to their extent, and removing highlight and marker. The highlight and zoom for point, line string and polygon geometries in two different styles can be tested."}),o.jsxs(q,{children:[o.jsxs(a,{children:["Clicking on ","'Points'"," adds markers for point geometries."]}),o.jsxs(a,{children:["Clicking on ","'LineString'"," adds highlight for linestring geometries."]}),o.jsxs(a,{children:["Clicking on ","'Polygon'"," adds highlight for polygon geometries."]}),o.jsxs(a,{children:["Clicking on ","'Mixed'"," adds highlight for geometries of different types."]}),o.jsxs(a,{children:["Clicking on ","'Remove'"," will remove the marker or highlight added by the button on the left."]}),o.jsxs(a,{children:["Clicking on ","'Reset All'"," removes all highlights and markers from the map."]}),o.jsxs(a,{children:["Clicking on ","'Own Style'"," activates highlighting with customstyle."]})]})]})})]})})})})}const to={Point:new i({image:new f({anchor:[.5,1],src:C})}),MultiPoint:new i({image:new f({anchor:[.5,1],src:C})}),LineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],MultiLineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],Polygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})],MultiPolygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})]},lo=W({component:io,appMetadata:ro});customElements.define("highlight-and-zoom-app",lo); +import{j as o,l as I,a as O,r as v,B as t,e as W}from"./CzUo6bX8-UUU.js";import{S as F,T as U,O as G,M as T,H as B,c as i,aC as f,ay as l,F as w,g as N,ao as h,an as m,i as k,e as Q,B as y,f as E,j as V,k as A}from"./B36mctiVgF5V.js";import{L as z}from"./Di-_YM5QvGet.js";import{T as u,S as j,V as K,U as q,a}from"./CovJx79h1x39.js";import{H as d}from"./_YjaCHRtWzU8.js";import{C as Y}from"./DXNMkmWkGPwJ.js";import"./0jkoYKtubXoE.js";var M=r=>o.jsx(I.div,{className:"chakra-stack__divider",...r,__css:{...r.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});M.displayName="StackDivider";const b="main";class J{mapId=b;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new F({title:"OSM",isBaseLayer:!0,olLayer:new U({source:new G})})]}}}const X={"highlight-and-zoom-app":{name:"highlight-and-zoom-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:J,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:T,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:B,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},_=':root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}',$=[];function oo(r){throw new Error(`Unsupported locale: '${r}'`)}const eo=O(_),ro=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:oo,locales:$,packages:X,styles:eo},Symbol.toStringTag,{value:"Module"})),C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAYAAABXuSs3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAM6SURBVGhD7Zn7TtRAFMZn2l2MRuWuBg2aGEX/MMLCC5iUx/UJ6CNw0WiiRBFBJaLAilyMbNvxO8tpgkDbM9MxarK/ZNPvdJfpt6dnznQW1aOHDM1Hb1x9PrvYSEx/YNQlijOtDpOG3v3+eK7V/YAnvBgfWozeKKPGYbCPT51LMzE/8UXW2634Pp9yppbxgaXZl4ExE0moG3xKRCM1nSzQy98m5x7xKWucjQ8vRO87DX2bQydwB9a2p+M7HFrhZHxkPto8auprHNair2O+bs3E1mMFfBSDTH/wZZrAWKMYc41DMVbGBxejZZTHLQ69gTHHB5eiVxyKsDKOCXWPpXeM1hMsRYiN02Q02n/fz0Gb1HQNDisRG88CZVUiYWYyenEoAubF1xBlkFZDHKaOo3KaHbOxPRPf5LDL8Hz0qdPUYxyWghVW5EmUcZgZZVkKlvp3p00TdI56NoelDC1EqyxLERlHCgZYFoLVMNmZju9yeAZaaMLUpBwWgmecIZaliIwblCzLQoJMHbIsJMzUD5aFSK5FiCengA4fyzjiYxn+ahwjVZpCq7zMshB0jcrP4FoJy1KkGa+8xVj9LrAspOqxl0CpHLAsRWQczxMbLEtBRygsBTyzS8pEoW1+ZlmKqJ4I9HIkQwae+DbTULUhdZiqAXzx68fvVOO1jxO0e2FZCRlNA/0Arwkb01gvKksyR2wck+8jyz9GFqp1lpWIS4WwKRcXpGVCiDNOoHb3WHoHY++wFGFlHPW6wtI72L4NsxRhZRy3cgqZ2efQGxhzi6UYqxrP8V3rNrWdY5XxHGToC8vaoM2KO8lJnDJO9D+bzepu5fCYm7RbcZNDK5wyTgSZecvSmTTUL1haUytj2JId4tniIodWUPuz7SQnqWWccJmo2iizOznnfLeJWn9M0D6TpRhtjNWPP+dRO+PEyHy0h8WpcpNAoEQ2USI3OHTGi3FCUjLdDbVjFzlN7VLJCTPzmmUhT1ux00Q+D2/G21PxQyoDDs+AubDyRLiflOCtVHLQIg/QIrv//8nBF3L6DbwM78aJwaUowe6n+/sITO/D9JXuG/8DNFmxeRZv9/4ZNsbGfiuXHj3+Ckr9AhPaF/aBpAV7AAAAAElFTkSuQmCC";function io(){const{map:r}=N(b),n=v.useRef(new Map),[S,R]=v.useState(!1),H=[new h([852011.307424,6788511322702e-6]),new h([829800.379064,6809086916672e-6])],P=[new z([[851890.680238,6788133616293e-6],[851298.293269,6790235634571e-6],[853419.420804,6790407617885e-6]]),new z([[848107.047338,6790579601198e-6],[849081.619449,6793197569417e-6]])],L=[new m([[[851728.251553,6788384425292e-6],[851518.049725,6788651954891e-6],[852182.096409,6788881265976e-6],[851728.251553,6788384425292e-6]]]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])],D=[new h([852011.307424,6788511322702e-6]),new m([[[845183.331006,6794496998898e-6],[850132.628588,6794764528497e-6],[850629.469272,6791707047365e-6],[844399.851466,6791229315939e-6],[845183.331006,6794496998898e-6]]])];function c(e,x,g){if(e&&!n.current.has(g))if(S){const s=e.highlightAndZoom(x,{highlightStyle:to});s&&n.current.set(g,s)}else{const s=e.highlightAndZoom(x,{});s&&n.current.set(g,s)}}function p(e){n.current.has(e)&&(n.current.get(e)?.destroy(),n.current.delete(e))}function Z(e){e&&(e.removeHighlights(),n.current=new Map)}return o.jsx(k,{height:"100%",direction:"column",overflow:"hidden",children:o.jsx(Q,{title:o.jsx(y,{textAlign:"center",py:1,children:o.jsx(E,{size:"md",children:"OpenLayers Base Packages - Highlight and Zoom"})}),children:o.jsx(k,{flex:"1",direction:"column",position:"relative",children:o.jsxs(V,{mapId:b,children:[o.jsx(A,{position:"top-left",horizontalGap:10,verticalGap:10,children:o.jsxs(y,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:[o.jsx(u,{align:"center",children:"Test Controls:"}),o.jsx(j,{align:"center",divider:o.jsx(M,{borderColor:"gray.200"}),pt:5,children:o.jsx(Y,{onChange:e=>{R(e.target.checked)},children:"Own Style"})}),o.jsxs(j,{pt:5,children:[o.jsxs(d,{align:"center",children:[o.jsx(t,{width:105,onClick:()=>c(r,H,"point"),children:"Points"}),o.jsx(t,{onClick:()=>p("point"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,P,"line"),children:"LineString"}),o.jsx(t,{onClick:()=>p("line"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,L,"polygon"),children:"Polygons"}),o.jsx(t,{onClick:()=>p("polygon"),children:"Remove"})]}),o.jsxs(d,{children:[o.jsx(t,{width:105,onClick:()=>c(r,D,"mix"),children:"Mixed"}),o.jsx(t,{onClick:()=>p("mix"),children:"Remove"})]}),o.jsx(t,{onClick:()=>Z(r),children:"Reset All"})]})]})}),o.jsx(A,{position:"top-right",horizontalGap:10,verticalGap:10,children:o.jsxs(K,{backgroundColor:"whiteAlpha.900",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",maxWidth:"400px",children:[o.jsx(u,{as:"b",children:"Description"}),o.jsx(u,{children:"This application can be used to test adding highlight or marker, zoom to their extent, and removing highlight and marker. The highlight and zoom for point, line string and polygon geometries in two different styles can be tested."}),o.jsxs(q,{children:[o.jsxs(a,{children:["Clicking on ","'Points'"," adds markers for point geometries."]}),o.jsxs(a,{children:["Clicking on ","'LineString'"," adds highlight for linestring geometries."]}),o.jsxs(a,{children:["Clicking on ","'Polygon'"," adds highlight for polygon geometries."]}),o.jsxs(a,{children:["Clicking on ","'Mixed'"," adds highlight for geometries of different types."]}),o.jsxs(a,{children:["Clicking on ","'Remove'"," will remove the marker or highlight added by the button on the left."]}),o.jsxs(a,{children:["Clicking on ","'Reset All'"," removes all highlights and markers from the map."]}),o.jsxs(a,{children:["Clicking on ","'Own Style'"," activates highlighting with customstyle."]})]})]})})]})})})})}const to={Point:new i({image:new f({anchor:[.5,1],src:C})}),MultiPoint:new i({image:new f({anchor:[.5,1],src:C})}),LineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],MultiLineString:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3})})],Polygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})],MultiPolygon:[new i({stroke:new l({color:"#ff0000",width:5})}),new i({stroke:new l({color:"#ff0000",width:3}),fill:new w({color:"rgba(51, 171, 71,0.35)"})})]},lo=W({component:io,appMetadata:ro});customElements.define("highlight-and-zoom-app",lo); diff --git a/openlayers-base-packages/pr-previews/pr-355/assets/CGddQzaLUNKL.js b/openlayers-base-packages/pr-previews/pr-355/assets/HTd2VoWp6VZs.js similarity index 87% rename from openlayers-base-packages/pr-previews/pr-355/assets/CGddQzaLUNKL.js rename to openlayers-base-packages/pr-previews/pr-355/assets/HTd2VoWp6VZs.js index 9b12cfe..02a554b 100644 --- a/openlayers-base-packages/pr-previews/pr-355/assets/CGddQzaLUNKL.js +++ b/openlayers-base-packages/pr-previews/pr-355/assets/HTd2VoWp6VZs.js @@ -1 +1 @@ -import{r as l,a5 as B,j as e,a as R,B as P,n as C,C as _,e as T}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as N,T as F,O as q,M as D,H as Z,u as $,i as v,B as f,g as V,e as W,f as G,j as U,k as K}from"./B36mctiVgF5V.js";import{_ as J}from"./CmsKOCeNyeyo.js";import{c as E}from"./SSUBJAaBGB7g.js";import{I as j}from"./XuMECp8BqZmI.js";import{S}from"./BSX9fy8BsUsv.js";import{g as Q}from"./CkG3hRXjrvfc.js";function X(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Y=X(),ee=Y?l.useLayoutEffect:l.useEffect;function z(r,a=[]){const t=l.useRef(r);return ee(()=>{t.current=r}),l.useCallback((...p)=>{var s;return(s=t.current)==null?void 0:s.call(t,...p)},a)}function oe(r,a){const t=l.useId();return l.useMemo(()=>r||[a,t].filter(Boolean).join("-"),[r,a,t])}function re(r,a){const t=r!==void 0;return[t,t&&typeof r<"u"?r:a]}function I(r={}){const{onClose:a,onOpen:t,isOpen:p,id:s}=r,c=z(t),i=z(a),[n,b]=l.useState(r.defaultIsOpen||!1),[d,u]=re(p,n),m=oe(s,"disclosure"),g=l.useCallback(()=>{d||b(!1),i?.()},[d,i]),h=l.useCallback(()=>{d||b(!0),c?.()},[d,c]),x=l.useCallback(()=>{(u?g:h)()},[u,h,g]);return{isOpen:!!u,onOpen:h,onClose:g,onToggle:x,isControlled:d,getButtonProps:(o={})=>({...o,"aria-expanded":u,"aria-controls":m,onClick:B(o.onClick,x)}),getDisclosureProps:(o={})=>({...o,hidden:!u,id:m})}}var te=E({displayName:"ArrowLeftIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),e.jsx("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),ne=E({displayName:"ArrowRightIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),e.jsx("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});const w="main";class ae{mapId=w;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new N({title:"OSM",isBaseLayer:!0,olLayer:new F({source:new q})})]}}}const le={"sidebar-app":{name:"sidebar-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:ae,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:D,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Z,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},ie='.layout-sidebar{z-index:99}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.layout-sidebar{height:100%;position:absolute;top:0}.layout-sidebar[data-theme=light]{background-color:var(--chakra-colors-whiteAlpha-700)}.layout-sidebar[data-theme=dark]{background-color:var(--chakra-colors-blackAlpha-700)}.layout-sidebar .layout-sidebar-main{transition:width .3s ease-out 0s;border-right:1px solid var(--chakra-colors-chakra-border-color)}.layout-sidebar .layout-sidebar-content{overflow:auto;transition:width .3s ease-out 0s}.layout-sidebar .layout-sidebar-content .content-section .content-header{font-size:1.5em;background-color:var(--chakra-colors-blackAlpha-500);padding:.5rem 1rem}.layout-sidebar .layout-sidebar-content .content-section .content-body{padding:1rem}',se=["en"];function ce(r){switch(r){case"en":return J(()=>import("./BIbDu0DJPL_e.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${r}'`)}const pe=R(ie),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ce,locales:se,packages:le,styles:pe},Symbol.toStringTag,{value:"Module"})),ue="@open-pioneer/experimental-layout-sidebar",be=$.bind(void 0,ue),M=60,A=180,O=300;function me({defaultExpanded:r,expandedChanged:a,sidebarWidthChanged:t,items:p}){const s=be(),[c,{toggle:i}]=ge(p),{isOpen:n,onToggle:b}=I({defaultIsOpen:r,onOpen(){a?.(!0)},onClose(){a?.(!1)}}),{isOpen:d,onToggle:u}=I(),m=c.size>0;l.useEffect(()=>{m&&!d&&u(),!m&&d&&u()},[m]),l.useEffect(()=>{if(t){let o=M;n&&(o=A),d&&(o+=O),t(o)}},[n,d]);const g=p?.map((o,L)=>{const k="white",y=c.has(o.id)?"outline":"ghost";return e.jsx("div",{children:n?e.jsx(P,{leftIcon:o.icon,variant:y,colorScheme:k,onClick:()=>i(o),children:o.label},o.id):e.jsx(C,{hasArrow:!0,label:o.label,placement:"right",children:e.jsx(j,{"aria-label":o.label,variant:y,colorScheme:k,icon:o.icon,onClick:()=>i(o)})},o.id)},L)}),h=p?.filter(o=>c.has(o.id)).map(o=>e.jsxs("div",{className:"content-section",children:[e.jsxs(v,{className:"content-header",alignItems:"center",children:[e.jsx(f,{children:o.label}),e.jsx(S,{}),e.jsx(_,{onClick:()=>i(o)})]}),e.jsx("div",{className:"content-body",children:o.content})]},o.id)),x=s.formatMessage({id:n?"toggle.collapse":"toggle.expand"});return e.jsxs(v,{className:"layout-sidebar",children:[e.jsxs(f,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:n?`${A}px`:`${M}px`,padding:"10px",gap:"10px",children:[g,e.jsx(S,{}),e.jsx(C,{label:x,hasArrow:!0,placement:"right",children:e.jsx(j,{"aria-label":x,variant:"ghost",icon:n?e.jsx(te,{}):e.jsx(ne,{}),onClick:b})})]}),e.jsx(f,{className:"layout-sidebar-content",width:d?`${O}px`:"0px",children:h})]})}function ge(r){const[a,t]=l.useReducer((s,c)=>{switch(c.type){case"toggle":{const i=new Set(s);return i.has(c.id)?i.delete(c.id):i.add(c.id),i}case"retain":{const i=new Set(c.ids),n=new Set(s);for(const b of n)i.has(b)||n.delete(b);return n}}},void 0,()=>new Set),p=l.useCallback(s=>{t({type:"toggle",id:s.id})},[t]);return l.useEffect(()=>{t({type:"retain",ids:r?.map(s=>s.id)??[]})},[r,t]),[a,{toggle:p}]}const he=[796987,5827477,796987,5827477];function xe(){const[r,a]=l.useState(),[t,p]=l.useState(!0),s=V(w),c=()=>{const n=s.map?.olMap;n&&n?.getView().fit(he,{maxZoom:13})},i=[{id:"sandbox",icon:e.jsx(Q,{}),label:"Sandbox",content:e.jsx(P,{onClick:c,children:"Center Berlin"})}];return e.jsx(v,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(W,{title:e.jsx(f,{textAlign:"center",py:1,px:1,children:e.jsx(G,{size:"md",children:"Sidebar sample"})}),children:e.jsxs(v,{flex:"1",direction:"column",position:"relative",children:[e.jsx(me,{defaultExpanded:t,expandedChanged:n=>p(n),sidebarWidthChanged:n=>a({left:n}),items:i}),e.jsx(U,{mapId:w,viewPadding:r,viewPaddingChangeBehavior:"preserve-extent",children:e.jsx(K,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(f,{backgroundColor:"whiteAlpha.800",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:"This is a sample for a sidebar component."})})})]})})})}const fe=T({component:xe,theme:H,appMetadata:de});customElements.define("sidebar-app",fe); +import{r as l,a5 as B,j as e,a as R,B as P,n as C,C as _,e as T}from"./CzUo6bX8-UUU.js";import{t as H}from"./CWtAa_vMA4rU.js";import{S as N,T as F,O as q,M as D,H as Z,u as $,i as v,B as f,g as V,e as W,f as G,j as U,k as K}from"./B36mctiVgF5V.js";import{_ as J}from"./CmsKOCeNyeyo.js";import{c as E}from"./SSUBJAaBGB7g.js";import{I as j}from"./XuMECp8BqZmI.js";import{S}from"./BSX9fy8BsUsv.js";import{g as Q}from"./CkG3hRXjrvfc.js";function X(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Y=X(),ee=Y?l.useLayoutEffect:l.useEffect;function z(r,a=[]){const t=l.useRef(r);return ee(()=>{t.current=r}),l.useCallback((...p)=>{var s;return(s=t.current)==null?void 0:s.call(t,...p)},a)}function oe(r,a){const t=l.useId();return l.useMemo(()=>r||[a,t].filter(Boolean).join("-"),[r,a,t])}function re(r,a){const t=r!==void 0;return[t,t&&typeof r<"u"?r:a]}function I(r={}){const{onClose:a,onOpen:t,isOpen:p,id:s}=r,c=z(t),i=z(a),[n,b]=l.useState(r.defaultIsOpen||!1),[d,u]=re(p,n),m=oe(s,"disclosure"),g=l.useCallback(()=>{d||b(!1),i?.()},[d,i]),h=l.useCallback(()=>{d||b(!0),c?.()},[d,c]),x=l.useCallback(()=>{(u?g:h)()},[u,h,g]);return{isOpen:!!u,onOpen:h,onClose:g,onToggle:x,isControlled:d,getButtonProps:(o={})=>({...o,"aria-expanded":u,"aria-controls":m,onClick:B(o.onClick,x)}),getDisclosureProps:(o={})=>({...o,hidden:!u,id:m})}}var te=E({displayName:"ArrowLeftIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),e.jsx("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})}),ne=E({displayName:"ArrowRightIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),e.jsx("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});const w="main";class ae{mapId=w;async getMapConfig(){return{initialView:{kind:"position",center:{x:404747,y:5757920},zoom:14},layers:[new N({title:"OSM",isBaseLayer:!0,olLayer:new F({source:new q})})]}}}const le={"sidebar-app":{name:"sidebar-app",services:{MapConfigProviderImpl:{name:"MapConfigProviderImpl",clazz:ae,provides:[{name:"map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/basemap-switcher":{name:"@open-pioneer/basemap-switcher",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/map":{name:"@open-pioneer/map",services:{MapRegistryImpl:{name:"MapRegistryImpl",clazz:D,provides:[{name:"map.MapRegistry",qualifier:void 0}],references:{providers:{name:"map.MapConfigProvider",qualifier:void 0,all:!0},httpService:{name:"http.HttpService",qualifier:void 0,all:!1}}}},ui:{references:[{name:"map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/react-utils":{name:"@open-pioneer/react-utils",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/theme":{name:"@open-pioneer/theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/http":{name:"@open-pioneer/http",services:{HttpServiceImpl:{name:"HttpServiceImpl",clazz:Z,provides:[{name:"http.HttpService",qualifier:"http.HttpService"}],references:{interceptors:{name:"http.Interceptor",qualifier:void 0,all:!0}}}},ui:{references:[]},properties:{}},"@open-pioneer/base-theme":{name:"@open-pioneer/base-theme",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}}},ie='.layout-sidebar{z-index:99}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.map-container .ol-viewport .ol-attribution{bottom:var(--map-padding-bottom);right:var(--map-padding-right)}.layout-sidebar{height:100%;position:absolute;top:0}.layout-sidebar[data-theme=light]{background-color:var(--chakra-colors-whiteAlpha-700)}.layout-sidebar[data-theme=dark]{background-color:var(--chakra-colors-blackAlpha-700)}.layout-sidebar .layout-sidebar-main{transition:width .3s ease-out 0s;border-right:1px solid var(--chakra-colors-chakra-border-color)}.layout-sidebar .layout-sidebar-content{overflow:auto;transition:width .3s ease-out 0s}.layout-sidebar .layout-sidebar-content .content-section .content-header{font-size:1.5em;background-color:var(--chakra-colors-blackAlpha-500);padding:.5rem 1rem}.layout-sidebar .layout-sidebar-content .content-section .content-body{padding:1rem}',se=["en"];function ce(r){switch(r){case"en":return J(()=>import("./BIbDu0DJPL_e.js"),[],import.meta.url).then(a=>a.default)}throw new Error(`Unsupported locale: '${r}'`)}const pe=R(ie),de=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:ce,locales:se,packages:le,styles:pe},Symbol.toStringTag,{value:"Module"})),ue="@open-pioneer/experimental-layout-sidebar",be=$.bind(void 0,ue),M=60,A=180,O=300;function me({defaultExpanded:r,expandedChanged:a,sidebarWidthChanged:t,items:p}){const s=be(),[c,{toggle:i}]=ge(p),{isOpen:n,onToggle:b}=I({defaultIsOpen:r,onOpen(){a?.(!0)},onClose(){a?.(!1)}}),{isOpen:d,onToggle:u}=I(),m=c.size>0;l.useEffect(()=>{m&&!d&&u(),!m&&d&&u()},[m]),l.useEffect(()=>{if(t){let o=M;n&&(o=A),d&&(o+=O),t(o)}},[n,d]);const g=p?.map((o,L)=>{const k="white",y=c.has(o.id)?"outline":"ghost";return e.jsx("div",{children:n?e.jsx(P,{leftIcon:o.icon,variant:y,colorScheme:k,onClick:()=>i(o),children:o.label},o.id):e.jsx(C,{hasArrow:!0,label:o.label,placement:"right",children:e.jsx(j,{"aria-label":o.label,variant:y,colorScheme:k,icon:o.icon,onClick:()=>i(o)})},o.id)},L)}),h=p?.filter(o=>c.has(o.id)).map(o=>e.jsxs("div",{className:"content-section",children:[e.jsxs(v,{className:"content-header",alignItems:"center",children:[e.jsx(f,{children:o.label}),e.jsx(S,{}),e.jsx(_,{onClick:()=>i(o)})]}),e.jsx("div",{className:"content-body",children:o.content})]},o.id)),x=s.formatMessage({id:n?"toggle.collapse":"toggle.expand"});return e.jsxs(v,{className:"layout-sidebar",children:[e.jsxs(f,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:n?`${A}px`:`${M}px`,padding:"10px",gap:"10px",children:[g,e.jsx(S,{}),e.jsx(C,{label:x,hasArrow:!0,placement:"right",children:e.jsx(j,{"aria-label":x,variant:"ghost",icon:n?e.jsx(te,{}):e.jsx(ne,{}),onClick:b})})]}),e.jsx(f,{className:"layout-sidebar-content",width:d?`${O}px`:"0px",children:h})]})}function ge(r){const[a,t]=l.useReducer((s,c)=>{switch(c.type){case"toggle":{const i=new Set(s);return i.has(c.id)?i.delete(c.id):i.add(c.id),i}case"retain":{const i=new Set(c.ids),n=new Set(s);for(const b of n)i.has(b)||n.delete(b);return n}}},void 0,()=>new Set),p=l.useCallback(s=>{t({type:"toggle",id:s.id})},[t]);return l.useEffect(()=>{t({type:"retain",ids:r?.map(s=>s.id)??[]})},[r,t]),[a,{toggle:p}]}const he=[796987,5827477,796987,5827477];function xe(){const[r,a]=l.useState(),[t,p]=l.useState(!0),s=V(w),c=()=>{const n=s.map?.olMap;n&&n?.getView().fit(he,{maxZoom:13})},i=[{id:"sandbox",icon:e.jsx(Q,{}),label:"Sandbox",content:e.jsx(P,{onClick:c,children:"Center Berlin"})}];return e.jsx(v,{height:"100%",direction:"column",overflow:"hidden",children:e.jsx(W,{title:e.jsx(f,{textAlign:"center",py:1,px:1,children:e.jsx(G,{size:"md",children:"Sidebar sample"})}),children:e.jsxs(v,{flex:"1",direction:"column",position:"relative",children:[e.jsx(me,{defaultExpanded:t,expandedChanged:n=>p(n),sidebarWidthChanged:n=>a({left:n}),items:i}),e.jsx(U,{mapId:w,viewPadding:r,viewPaddingChangeBehavior:"preserve-extent",children:e.jsx(K,{position:"top-left",horizontalGap:10,verticalGap:10,children:e.jsx(f,{backgroundColor:"whiteAlpha.800",borderWidth:"1px",borderRadius:"lg",padding:2,boxShadow:"lg",children:"This is a sample for a sidebar component."})})})]})})})}const fe=T({component:xe,theme:H,appMetadata:de});customElements.define("sidebar-app",fe); diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html index 7c305a7..dc37b32 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/experimental-sidebar/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html index 15b4035..94e4a8f 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/map-sample/index.html @@ -17,7 +17,7 @@ overflow: hidden; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html index dd6a463..a50dd09 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/ogc-api-sample/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html index dcc6557..f809ac8 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/showcase/index.html @@ -17,7 +17,7 @@ overflow: hidden; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-basemap-switcher/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-basemap-switcher/index.html index 652dea1..67675a4 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-basemap-switcher/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-basemap-switcher/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html index a123325..16b01c8 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-highlight-and-zoom/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html index 3d5f0c6..e9fe63c 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-result-list/index.html @@ -16,7 +16,7 @@ max-height: 100%; } - + diff --git a/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html b/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html index cf4b50e..9df055d 100644 --- a/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html +++ b/openlayers-base-packages/pr-previews/pr-355/samples/test-toc/index.html @@ -17,7 +17,7 @@ overflow: hidden; } - +