diff --git a/starter/assets/20c79a1e73ae.js b/starter/assets/1762233d590c.js similarity index 85% rename from starter/assets/20c79a1e73ae.js rename to starter/assets/1762233d590c.js index bc9fc3623..857b9f405 100644 --- a/starter/assets/20c79a1e73ae.js +++ b/starter/assets/1762233d590c.js @@ -1 +1 @@ -import{v as a,j as r,w as o}from"./ed1045c62907.js";import{_ as i}from"./41c905a75d98.js";import{u as p,a as c}from"./820e0ae9dfd0.js";import{C as m,H as l,T as s}from"./ad369b8c8384.js";class u{greet(){return"Hello from Greeter"}}const d={empty:{name:"empty",services:{},ui:{references:[{name:"sample-package.Greeter",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/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"sample-package":{name:"sample-package",services:{GreeterImpl:{name:"GreeterImpl",clazz:u,provides:[{name:"sample-package.Greeter",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},f="",g=["en"];function v(e){switch(e){case"en":return i(()=>import("./cd18741b67a7.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const h=a(f),_=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:v,locales:g,packages:d,styles:h},Symbol.toStringTag,{value:"Module"})),n="empty",k=p.bind(void 0,n),x=c.bind(void 0,n);function E(){const e=x(),t=k("sample-package.Greeter");return r.jsxs(m,{children:[r.jsx(l,{as:"h1",size:"lg",children:e.formatMessage({id:"heading"})}),r.jsx(s,{pt:5,children:e.formatMessage({id:"text"})}),r.jsxs(s,{pt:5,children:["This messages comes from the sample package","'","s greeter service: ",t.greet()]})]})}const I=o({component:E,appMetadata:_});customElements.define("empty-app",I); +import{v as a,j as r,w as o}from"./ed1045c62907.js";import{_ as i}from"./41c905a75d98.js";import{u as p,a as c}from"./820e0ae9dfd0.js";import{C as m,H as l,T as s}from"./ad369b8c8384.js";class u{greet(){return"Hello from Greeter"}}const d={empty:{name:"empty",services:{},ui:{references:[{name:"sample-package.Greeter",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"sample-package":{name:"sample-package",services:{GreeterImpl:{name:"GreeterImpl",clazz:u,provides:[{name:"sample-package.Greeter",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},f="",g=["en"];function v(e){switch(e){case"en":return i(()=>import("./cd18741b67a7.js"),[],import.meta.url).then(t=>t.default)}throw new Error(`Unsupported locale: '${e}'`)}const h=a(f),_=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:v,locales:g,packages:d,styles:h},Symbol.toStringTag,{value:"Module"})),n="empty",k=p.bind(void 0,n),x=c.bind(void 0,n);function E(){const e=x(),t=k("sample-package.Greeter");return r.jsxs(m,{children:[r.jsx(l,{as:"h1",size:"lg",children:e.formatMessage({id:"heading"})}),r.jsx(s,{pt:5,children:e.formatMessage({id:"text"})}),r.jsxs(s,{pt:5,children:["This messages comes from the sample package","'","s greeter service: ",t.greet()]})]})}const I=o({component:E,appMetadata:_});customElements.define("empty-app",I); diff --git a/starter/assets/7bf7ae15df47.js b/starter/assets/2653c2b2c0df.js similarity index 74% rename from starter/assets/7bf7ae15df47.js rename to starter/assets/2653c2b2c0df.js index e17fa60c6..67cd3918a 100644 --- a/starter/assets/7bf7ae15df47.js +++ b/starter/assets/2653c2b2c0df.js @@ -1 +1 @@ -import{x as m,v as x,r as o,j as i,w as v}from"./ed1045c62907.js";import{E as u}from"./960f2965a833.js";import{E as d}from"./4eca66f82c38.js";import{u as f}from"./820e0ae9dfd0.js";import{V as E}from"./448a495d30b4.js";import{C as h,H as s,T as g}from"./ad369b8c8384.js";import{B as S}from"./49916b87ef64.js";import"./446cd47ccb2f.js";class T{textService;logger;constructor(e){this.textService=e.references.textService,this.logger=m("api-app:TextApiExtension")}async getApiMethods(){return{changeText:e=>{this.logger.info("Changing text to",JSON.stringify(e)),this.textService.setText(e)}}}}class A extends u{text="not yet set";setText(e){const n=this.text;this.text=e,this.emit("text-changed",{newText:this.text,oldText:n})}getText(){return this.text}}class j{async getApiMethods(){return{justAnotherApiMethod:()=>{console.log("justAnotherApiMethod")}}}}class z{async fetch(e,n){return await globalThis.fetch(e,n)}}const y={"api-app":{name:"api-app",services:{TextApiExtension:{name:"TextApiExtension",clazz:T,provides:[{name:"integration.ApiExtension",qualifier:void 0}],references:{textService:{name:"api-app.TextService",qualifier:void 0,all:!1}}},TextService:{name:"TextService",clazz:A,provides:[{name:"api-app.TextService",qualifier:void 0}],references:{}},SecondApiExtension:{name:"SecondApiExtension",clazz:j,provides:[{name:"integration.ApiExtension",qualifier:void 0}],references:{}}},ui:{references:[{name:"api-app.TextService",qualifier:void 0,all:!1},{name:"integration.ExternalEventService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",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:{}}},ui:{references:[]},properties:{}},"@open-pioneer/integration":{name:"@open-pioneer/integration",services:{ExternalEventServiceImpl:{name:"ExternalEventServiceImpl",clazz:d,provides:[{name:"integration.ExternalEventService",qualifier:"integration.ExternalEventService"}],references:{ctx:{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},q="",C=[];function I(t){throw new Error(`Unsupported locale: '${t}'`)}const M=x(q),b=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:I,locales:C,packages:y,styles:M},Symbol.toStringTag,{value:"Module"})),w="api-app",a=f.bind(void 0,w);function H(){const t=a("integration.ExternalEventService"),e=()=>{t.emitEvent("my-custom-event",{data:"my-event-data"})},n=a("api-app.TextService"),[p,r]=o.useState("");return o.useEffect(()=>{r(n.getText());const c=n.on("text-changed",l=>{r(l.newText)});return()=>c.destroy()},[n]),i.jsx(h,{children:i.jsxs(E,{children:[i.jsx(s,{size:"md",children:"Emitting Events"}),i.jsx(g,{children:"Click this button to emit a browser event:"}),i.jsx(S,{onClick:e,children:"Emit Event"}),i.jsx(s,{size:"md",pt:20,children:"Reacting to API calls from the host site"}),i.jsxs("div",{children:["Current text: ",p]})]})})}const k=v({component:H,appMetadata:b});customElements.define("api-app",k); +import{x as m,v as x,r as o,j as i,w as v}from"./ed1045c62907.js";import{E as u}from"./960f2965a833.js";import{E as d}from"./4eca66f82c38.js";import{u as f}from"./820e0ae9dfd0.js";import{V as E}from"./448a495d30b4.js";import{C as h,H as s,T as g}from"./ad369b8c8384.js";import{B as S}from"./49916b87ef64.js";import"./446cd47ccb2f.js";class T{textService;logger;constructor(e){this.textService=e.references.textService,this.logger=m("api-app:TextApiExtension")}async getApiMethods(){return{changeText:e=>{this.logger.info("Changing text to",JSON.stringify(e)),this.textService.setText(e)}}}}class A extends u{text="not yet set";setText(e){const n=this.text;this.text=e,this.emit("text-changed",{newText:this.text,oldText:n})}getText(){return this.text}}class j{async getApiMethods(){return{justAnotherApiMethod:()=>{console.log("justAnotherApiMethod")}}}}class z{async fetch(e,n){return await globalThis.fetch(e,n)}}const y={"api-app":{name:"api-app",services:{TextApiExtension:{name:"TextApiExtension",clazz:T,provides:[{name:"integration.ApiExtension",qualifier:void 0}],references:{textService:{name:"api-app.TextService",qualifier:void 0,all:!1}}},TextService:{name:"TextService",clazz:A,provides:[{name:"api-app.TextService",qualifier:void 0}],references:{}},SecondApiExtension:{name:"SecondApiExtension",clazz:j,provides:[{name:"integration.ApiExtension",qualifier:void 0}],references:{}}},ui:{references:[{name:"api-app.TextService",qualifier:void 0,all:!1},{name:"integration.ExternalEventService",qualifier:void 0,all:!1}]},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/chakra-integration":{name:"@open-pioneer/chakra-integration",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:{}}},ui:{references:[]},properties:{}},"@open-pioneer/integration":{name:"@open-pioneer/integration",services:{ExternalEventServiceImpl:{name:"ExternalEventServiceImpl",clazz:d,provides:[{name:"integration.ExternalEventService",qualifier:"integration.ExternalEventService"}],references:{ctx:{name:"runtime.ApplicationContext",qualifier:void 0,all:!1}}}},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},q="",C=[];function I(t){throw new Error(`Unsupported locale: '${t}'`)}const M=x(q),b=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:I,locales:C,packages:y,styles:M},Symbol.toStringTag,{value:"Module"})),w="api-app",a=f.bind(void 0,w);function H(){const t=a("integration.ExternalEventService"),e=()=>{t.emitEvent("my-custom-event",{data:"my-event-data"})},n=a("api-app.TextService"),[p,r]=o.useState("");return o.useEffect(()=>{r(n.getText());const c=n.on("text-changed",l=>{r(l.newText)});return()=>c.destroy()},[n]),i.jsx(h,{children:i.jsxs(E,{children:[i.jsx(s,{size:"md",children:"Emitting Events"}),i.jsx(g,{children:"Click this button to emit a browser event:"}),i.jsx(S,{onClick:e,children:"Emit Event"}),i.jsx(s,{size:"md",pt:20,children:"Reacting to API calls from the host site"}),i.jsxs("div",{children:["Current text: ",p]})]})})}const k=v({component:H,appMetadata:b});customElements.define("api-app",k); diff --git a/starter/assets/0ed789483325.js b/starter/assets/399800742e51.js similarity index 95% rename from starter/assets/0ed789483325.js rename to starter/assets/399800742e51.js index 830599213..bb3d17e90 100644 --- a/starter/assets/0ed789483325.js +++ b/starter/assets/399800742e51.js @@ -1 +1 @@ -var v=(i,n,e)=>{if(!n.has(i))throw TypeError("Cannot "+e)};var c=(i,n,e)=>(v(i,n,"read from private field"),e?e.call(i):n.get(i)),d=(i,n,e)=>{if(n.has(i))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(i):n.set(i,e)};import{v as u,j as r,w as f}from"./ed1045c62907.js";import{u as g}from"./820e0ae9dfd0.js";import{B as x}from"./49916b87ef64.js";import{C as h,H as p,T as a}from"./ad369b8c8384.js";import{V as A}from"./448a495d30b4.js";import"./446cd47ccb2f.js";var o;class w{constructor(n){d(this,o,new Map);const e=c(this,o),t=n.references.providers;for(const l of t){const m=l.createActions();for(const s of m){if(e.has(s.id))throw new Error(`Action '${s.id}' was defined twice.`);e.set(s.id,s)}}}getActionInfo(){const n=Array.from(c(this,o).values()).map(e=>({id:e.id,text:e.text}));return n.sort((e,t)=>e.text.localeCompare(t.text)),n}triggerAction(n){const e=c(this,o).get(n);if(!e)throw new Error(`Action '${n}' was not defined.`);e.trigger()}}o=new WeakMap;class P{createActions(){return[{id:"logging-action",text:"Log a message",trigger(){console.info("Logging a message!")}}]}}class j{createActions(){return[{id:"clear-browser-action",text:"Clear browser",trigger(){document.body.innerHTML=""}},{id:"refresh-browser-action",text:"Refresh browser",trigger(){window.location.reload()}}]}}class b{createActions(){return[{id:"open-window-action",text:"Open window",trigger(){window.open("https://www.conterra.de")}}]}}const S={"extension-app":{name:"extension-app",services:{ActionServiceImpl:{name:"ActionServiceImpl",clazz:w,provides:[{name:"extension-app.ActionService",qualifier:void 0}],references:{providers:{name:"extension-app.ActionProvider",qualifier:void 0,all:!0}}},LoggingActionProvider:{name:"LoggingActionProvider",clazz:P,provides:[{name:"extension-app.ActionProvider",qualifier:void 0}],references:{}},MultiActionProvider:{name:"MultiActionProvider",clazz:j,provides:[{name:"extension-app.ActionProvider",qualifier:void 0}],references:{}},OpenWindowActionProvider:{name:"OpenWindowActionProvider",clazz:b,provides:[{name:"extension-app.ActionProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"extension-app.ActionService",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/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},y="",I=[];function z(i){throw new Error(`Unsupported locale: '${i}'`)}const E=u(y),M=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:z,locales:I,packages:S,styles:E},Symbol.toStringTag,{value:"Module"})),T="extension-app",k=g.bind(void 0,T);function C(){const i=k("extension-app.ActionService"),n=i.getActionInfo().map(({id:e,text:t})=>r.jsx(x,{onClick:()=>i.triggerAction(e),children:t},e));return r.jsxs(h,{maxW:"3xl",py:2,children:[r.jsx(p,{as:"h1",size:"4xl",mb:4,children:"Extension Example"}),r.jsx(a,{my:2,children:"This example demonstrates how to provide an extensible API with services and 1-to-N dependencies."}),r.jsxs(a,{my:2,children:["Individual ",r.jsx("code",{children:"ActionProvider"})," instances can provide a number of actions, which are then gathered and indexed by the ",r.jsx("code",{children:"ActionService"}),", which depends on all ActionProviders. The UI references the ",r.jsx("code",{children:"ActionService"})," and renders the provided actions as buttons. When a button is clicked, the appropriate action will be triggered."]}),r.jsxs(a,{my:2,children:["To add a new action, simply add new implementation of"," ",r.jsx("code",{children:'"extension-app.ActionProvider"'}),". The"," ",r.jsx("code",{children:"ActionService"})," will pick it up automatically."]}),r.jsxs(p,{as:"h4",size:"xl",children:["Buttons from ",r.jsx("code",{children:"ActionService"}),":"]}),r.jsx(A,{align:"start",children:n})]})}const q=f({component:C,appMetadata:M});customElements.define("extension-app",q); +var v=(i,n,e)=>{if(!n.has(i))throw TypeError("Cannot "+e)};var c=(i,n,e)=>(v(i,n,"read from private field"),e?e.call(i):n.get(i)),d=(i,n,e)=>{if(n.has(i))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(i):n.set(i,e)};import{v as u,j as r,w as f}from"./ed1045c62907.js";import{u as g}from"./820e0ae9dfd0.js";import{B as x}from"./49916b87ef64.js";import{C as h,H as p,T as a}from"./ad369b8c8384.js";import{V as A}from"./448a495d30b4.js";import"./446cd47ccb2f.js";var o;class w{constructor(n){d(this,o,new Map);const e=c(this,o),t=n.references.providers;for(const l of t){const m=l.createActions();for(const s of m){if(e.has(s.id))throw new Error(`Action '${s.id}' was defined twice.`);e.set(s.id,s)}}}getActionInfo(){const n=Array.from(c(this,o).values()).map(e=>({id:e.id,text:e.text}));return n.sort((e,t)=>e.text.localeCompare(t.text)),n}triggerAction(n){const e=c(this,o).get(n);if(!e)throw new Error(`Action '${n}' was not defined.`);e.trigger()}}o=new WeakMap;class P{createActions(){return[{id:"logging-action",text:"Log a message",trigger(){console.info("Logging a message!")}}]}}class j{createActions(){return[{id:"clear-browser-action",text:"Clear browser",trigger(){document.body.innerHTML=""}},{id:"refresh-browser-action",text:"Refresh browser",trigger(){window.location.reload()}}]}}class b{createActions(){return[{id:"open-window-action",text:"Open window",trigger(){window.open("https://www.conterra.de")}}]}}const S={"extension-app":{name:"extension-app",services:{ActionServiceImpl:{name:"ActionServiceImpl",clazz:w,provides:[{name:"extension-app.ActionService",qualifier:void 0}],references:{providers:{name:"extension-app.ActionProvider",qualifier:void 0,all:!0}}},LoggingActionProvider:{name:"LoggingActionProvider",clazz:P,provides:[{name:"extension-app.ActionProvider",qualifier:void 0}],references:{}},MultiActionProvider:{name:"MultiActionProvider",clazz:j,provides:[{name:"extension-app.ActionProvider",qualifier:void 0}],references:{}},OpenWindowActionProvider:{name:"OpenWindowActionProvider",clazz:b,provides:[{name:"extension-app.ActionProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"extension-app.ActionService",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",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:{}}},y="",I=[];function z(i){throw new Error(`Unsupported locale: '${i}'`)}const E=u(y),M=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:z,locales:I,packages:S,styles:E},Symbol.toStringTag,{value:"Module"})),T="extension-app",k=g.bind(void 0,T);function C(){const i=k("extension-app.ActionService"),n=i.getActionInfo().map(({id:e,text:t})=>r.jsx(x,{onClick:()=>i.triggerAction(e),children:t},e));return r.jsxs(h,{maxW:"3xl",py:2,children:[r.jsx(p,{as:"h1",size:"4xl",mb:4,children:"Extension Example"}),r.jsx(a,{my:2,children:"This example demonstrates how to provide an extensible API with services and 1-to-N dependencies."}),r.jsxs(a,{my:2,children:["Individual ",r.jsx("code",{children:"ActionProvider"})," instances can provide a number of actions, which are then gathered and indexed by the ",r.jsx("code",{children:"ActionService"}),", which depends on all ActionProviders. The UI references the ",r.jsx("code",{children:"ActionService"})," and renders the provided actions as buttons. When a button is clicked, the appropriate action will be triggered."]}),r.jsxs(a,{my:2,children:["To add a new action, simply add new implementation of"," ",r.jsx("code",{children:'"extension-app.ActionProvider"'}),". The"," ",r.jsx("code",{children:"ActionService"})," will pick it up automatically."]}),r.jsxs(p,{as:"h4",size:"xl",children:["Buttons from ",r.jsx("code",{children:"ActionService"}),":"]}),r.jsx(A,{align:"start",children:n})]})}const q=f({component:C,appMetadata:M});customElements.define("extension-app",q); diff --git a/starter/assets/08fcc396a8b3.js b/starter/assets/6f587b432b22.js similarity index 84% rename from starter/assets/08fcc396a8b3.js rename to starter/assets/6f587b432b22.js index 482e2f4bc..6e62b9786 100644 --- a/starter/assets/08fcc396a8b3.js +++ b/starter/assets/6f587b432b22.js @@ -1,4 +1,4 @@ -import{j as e,v as r,w as o}from"./ed1045c62907.js";function t(){return e.jsxs("div",{className:"sample-component-with-css",children:["The text in this div should be ",e.jsx("strong",{children:"RED"})," because it is styled using external css."]})}const i={"styling-app":{name:"styling-app",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"styling-sample-components":{name:"styling-sample-components",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},p=`.sample-component-with-css{color:red;font-size:1.25em} +import{j as e,v as r,w as o}from"./ed1045c62907.js";function t(){return e.jsxs("div",{className:"sample-component-with-css",children:["The text in this div should be ",e.jsx("strong",{children:"RED"})," because it is styled using external css."]})}const i={"styling-app":{name:"styling-app",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",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:{}},"styling-sample-components":{name:"styling-sample-components",services:{},ui:{references:[]},properties:{}}},p=`.sample-component-with-css{color:red;font-size:1.25em} `,c=[];function a(s){throw new Error(`Unsupported locale: '${s}'`)}const n=r(p),l=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:a,locales:c,packages:i,styles:n},Symbol.toStringTag,{value:"Module"})),m=o({component:t,appMetadata:l});console.log(`CSS: ${n.value}`);customElements.define("styling-app",m); diff --git a/starter/assets/9f72be2bcd20.js b/starter/assets/71487f4e2ff1.js similarity index 98% rename from starter/assets/9f72be2bcd20.js rename to starter/assets/71487f4e2ff1.js index 9316979a1..c325f7f13 100644 --- a/starter/assets/9f72be2bcd20.js +++ b/starter/assets/71487f4e2ff1.js @@ -1 +1 @@ -import{r as l,j as e,C as Ae,D as Q,d as j,F as J,T as Re,G as pe,H as mo,B as ye,f as v,l as fo,o as Z,e as m,z as De,A as vo,J as xo,K as jo,L as yo,M as go,N as L,O as A,Q as _o,R as bo,U as Be,k as S,g as ge,V as Po,W as So,X as ie,m as z,b as _e,Y as wo,Z as Co,q as ko,h as No,s as To,v as Eo,_ as Ie,$ as Fo,a0 as Ro,a1 as Oo,a2 as Mo,a3 as Ao,a4 as Do,a5 as Bo,a6 as Io,a7 as Ho,a8 as zo,w as Lo}from"./ed1045c62907.js";import{C as $o,H as He,T as Vo}from"./ad369b8c8384.js";import{S as Go,R as Uo,a as le}from"./3175a3fb44a2.js";import{S as ze}from"./446cd47ccb2f.js";import{B as w}from"./fde0f3c41d58.js";import{u as Wo}from"./b7d20d8aaf96.js";import{u as be}from"./19fd289afc0b.js";import{u as Ko}from"./f9623fa81503.js";import{B as b}from"./49916b87ef64.js";var qo={enter:({transition:o,transitionEnd:t,delay:s}={})=>{var n;return{opacity:1,transition:(n=o?.enter)!=null?n:J.enter(Re.enter,s),transitionEnd:t?.enter}},exit:({transition:o,transitionEnd:t,delay:s}={})=>{var n;return{opacity:0,transition:(n=o?.exit)!=null?n:J.exit(Re.exit,s),transitionEnd:t?.exit}}},Le={initial:"exit",animate:"enter",exit:"exit",variants:qo},Xo=l.forwardRef(function(t,s){const{unmountOnExit:n,in:a,className:r,transition:i,transitionEnd:c,delay:u,...d}=t,h=a||n?"enter":"exit",f=n?a&&n:!0,_={transition:i,transitionEnd:c,delay:u};return e.jsx(Ae,{custom:_,children:f&&e.jsx(Q.div,{ref:s,className:j("chakra-fade",r),custom:_,...Le,animate:h,...d})})});Xo.displayName="Fade";var Oe={exit:{duration:.15,ease:mo.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Yo={exit:({direction:o,transition:t,transitionEnd:s,delay:n})=>{var a;const{exit:r}=pe({direction:o});return{...r,transition:(a=t?.exit)!=null?a:J.exit(Oe.exit,n),transitionEnd:s?.exit}},enter:({direction:o,transitionEnd:t,transition:s,delay:n})=>{var a;const{enter:r}=pe({direction:o});return{...r,transition:(a=s?.enter)!=null?a:J.enter(Oe.enter,n),transitionEnd:t?.enter}}},$e=l.forwardRef(function(t,s){const{direction:n="right",style:a,unmountOnExit:r,in:i,className:c,transition:u,transitionEnd:d,delay:h,motionProps:f,..._}=t,C=pe({direction:n}),T=Object.assign({position:"fixed"},C.position,a),E=r?i&&r:!0,x=i||r?"enter":"exit",g={transitionEnd:d,transition:u,direction:n,delay:h};return e.jsx(Ae,{custom:g,children:E&&e.jsx(Q.div,{..._,ref:s,initial:"exit",className:j("chakra-slide",c),animate:x,exit:"exit",custom:g,variants:Yo,style:T,...f})})});$e.displayName="Slide";function Jo(o){return"current"in o}var Ve=()=>typeof window<"u";function Qo(){var o;const t=navigator.userAgentData;return(o=t?.platform)!=null?o:navigator.platform}var Zo=o=>Ve()&&o.test(navigator.vendor),et=o=>Ve()&&o.test(Qo()),ot=()=>et(/mac|iphone|ipad|ipod/i),tt=()=>ot()&&Zo(/apple/i);function st(o){const{ref:t,elements:s,enabled:n}=o,a=()=>{var r,i;return(i=(r=t.current)==null?void 0:r.ownerDocument)!=null?i:document};ye(a,"pointerdown",r=>{if(!tt()||!n)return;const i=r.target,u=(s??[t]).some(d=>{const h=Jo(d)?d.current:d;return h?.contains(i)||h===i});a().activeElement!==i&&u&&(r.preventDefault(),i.focus())})}var Ge=v(function(t,s){const n=fo("Link",t),{className:a,isExternal:r,...i}=Z(t);return e.jsx(m.a,{target:r?"_blank":void 0,rel:r?"noopener":void 0,ref:s,className:j("chakra-link",a),...i,__css:n})});Ge.displayName="Link";function nt(o){const t=o.current;if(!t)return!1;const s=jo(t);return!s||t.contains(s)?!1:!!yo(s)}function rt(o,t){const{shouldFocus:s,visible:n,focusRef:a}=t,r=s&&!n;De(()=>{if(!r||nt(o))return;const i=a?.current||o.current;let c;if(i)return c=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(c)}},[r,o,a])}var at={preventScroll:!0,shouldFocus:!1};function it(o,t=at){const{focusRef:s,preventScroll:n,shouldFocus:a,visible:r}=t,i=lt(o)?o.current:o,c=a&&r,u=l.useRef(c),d=l.useRef(r);vo(()=>{!d.current&&r&&(u.current=c),d.current=r},[r,c]);const h=l.useCallback(()=>{if(!(!r||!i||!u.current)&&(u.current=!1,!i.contains(document.activeElement)))if(s?.current)requestAnimationFrame(()=>{var f;(f=s.current)==null||f.focus({preventScroll:n})});else{const f=xo(i);f.length>0&&requestAnimationFrame(()=>{f[0].focus({preventScroll:n})})}},[r,n,i,s]);De(()=>{h()},[h]),ye(i,"transitionend",h)}function lt(o){return"current"in o}function ct(o){const{isOpen:t,ref:s}=o,[n,a]=l.useState(t),[r,i]=l.useState(!1);return l.useEffect(()=>{r||(a(t),i(!0))},[t,r,n]),ye(()=>s.current,"animationend",()=>{a(t)}),{present:!(t?!1:!n),onComplete(){var u;const d=go(s.current),h=new d.CustomEvent("animationend",{bubbles:!0});(u=s.current)==null||u.dispatchEvent(h)}}}function dt(o){const{wasSelected:t,enabled:s,isSelected:n,mode:a="unmount"}=o;return!!(!s||n||a==="keepMounted"&&t)}var ut=m($e),Ue=v((o,t)=>{const{className:s,children:n,motionProps:a,containerProps:r,...i}=o,{getDialogProps:c,getDialogContainerProps:u,isOpen:d}=L(),h=c(i,t),f=u(r),_=j("chakra-modal__content",s),C=A(),T={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...C.dialog},E={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...C.dialogContainer},{placement:x}=_o();return e.jsx(bo,{children:e.jsx(m.div,{...f,className:"chakra-modal__content-container",__css:E,children:e.jsx(ut,{motionProps:a,direction:x,in:d,className:_,...h,__css:T,children:n})})})});Ue.displayName="DrawerContent";var ee=v((o,t)=>{const{className:s,...n}=o,a=j("chakra-modal__footer",s),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...A().footer};return e.jsx(m.footer,{ref:t,...n,__css:i,className:a})});ee.displayName="ModalFooter";var oe=v((o,t)=>{const{className:s,...n}=o,{headerId:a,setHeaderMounted:r}=L();l.useEffect(()=>(r(!0),()=>r(!1)),[r]);const i=j("chakra-modal__header",s),u={flex:0,...A().header};return e.jsx(m.header,{ref:t,className:i,id:a,...n,__css:u})});oe.displayName="ModalHeader";var pt=m(Q.div),te=v((o,t)=>{const{className:s,transition:n,motionProps:a,...r}=o,i=j("chakra-modal__overlay",s),u={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...A().overlay},{motionPreset:d}=L(),f=a||(d==="none"?{}:Le);return e.jsx(pt,{...f,__css:u,ref:t,className:i,...r})});te.displayName="ModalOverlay";var se=v((o,t)=>{const{className:s,...n}=o,{bodyId:a,setBodyMounted:r}=L();l.useEffect(()=>(r(!0),()=>r(!1)),[r]);const i=j("chakra-modal__body",s),c=A();return e.jsx(m.div,{ref:t,className:i,id:a,...n,__css:c.body})});se.displayName="ModalBody";var Pe=v((o,t)=>{const{onClick:s,className:n,...a}=o,{onClose:r}=L(),i=j("chakra-modal__close-btn",n),c=A();return e.jsx(Be,{ref:t,__css:c.closeButton,className:i,onClick:S(s,u=>{u.stopPropagation(),r()}),...a})});Pe.displayName="ModalCloseButton";var[ht,R]=ge({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[mt,D]=ge({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),he=v(function(t,s){const{getHeaderProps:n}=R(),a=D();return e.jsx(m.header,{...n(t,s),className:j("chakra-popover__header",t.className),__css:a.header})});he.displayName="PopoverHeader";function me(o){const t=l.Children.only(o.children),{getTriggerProps:s}=R();return l.cloneElement(t,s(t.props,t.ref))}me.displayName="PopoverTrigger";var M={click:"click",hover:"hover"};function ft(o={}){const{closeOnBlur:t=!0,closeOnEsc:s=!0,initialFocusRef:n,id:a,returnFocusOnClose:r=!0,autoFocus:i=!0,arrowSize:c,arrowShadowColor:u,trigger:d=M.click,openDelay:h=200,closeDelay:f=200,isLazy:_,lazyBehavior:C="unmount",computePositionOnMount:T,...E}=o,{isOpen:x,onClose:g,onOpen:I,onToggle:$}=Po(o),ne=l.useRef(null),V=l.useRef(null),O=l.useRef(null),H=l.useRef(!1),Se=l.useRef(!1);x&&(Se.current=!0);const[we,Ze]=l.useState(!1),[Ce,eo]=l.useState(!1),oo=l.useId(),to=a??oo,[ke,G,U,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(p=>`${p}-${to}`),{referenceRef:K,getArrowProps:so,getPopperProps:Ne,getArrowInnerProps:no,forceUpdate:ro}=So({...E,enabled:x||!!T}),Te=ct({isOpen:x,ref:O});st({enabled:x,ref:V}),rt(O,{focusRef:V,visible:x,shouldFocus:r&&d===M.click}),it(O,{focusRef:n,visible:x,shouldFocus:i&&d===M.click});const Ee=dt({wasSelected:Se.current,enabled:_,mode:C,isSelected:Te.present}),ao=l.useCallback((p={},P=null)=>{const y={...p,style:{...p.style,transformOrigin:ie.transformOrigin.varRef,[ie.arrowSize.var]:c?`${c}px`:void 0,[ie.arrowShadowColor.var]:u},ref:z(O,P),children:Ee?p.children:null,id:G,tabIndex:-1,role:"dialog",onKeyDown:S(p.onKeyDown,k=>{s&&k.key==="Escape"&&g()}),onBlur:S(p.onBlur,k=>{const q=Me(k),ae=ce(O.current,q),ho=ce(V.current,q);x&&t&&(!ae&&!ho)&&g()}),"aria-labelledby":we?U:void 0,"aria-describedby":Ce?W:void 0};return d===M.hover&&(y.role="tooltip",y.onMouseEnter=S(p.onMouseEnter,()=>{H.current=!0}),y.onMouseLeave=S(p.onMouseLeave,k=>{k.nativeEvent.relatedTarget!==null&&(H.current=!1,setTimeout(()=>g(),f))})),y},[Ee,G,we,U,Ce,W,d,s,g,x,t,f,u,c]),io=l.useCallback((p={},P=null)=>Ne({...p,style:{visibility:x?"visible":"hidden",...p.style}},P),[x,Ne]),lo=l.useCallback((p,P=null)=>({...p,ref:z(P,ne,K)}),[ne,K]),F=l.useRef(),re=l.useRef(),Fe=l.useCallback(p=>{ne.current==null&&K(p)},[K]),co=l.useCallback((p={},P=null)=>{const y={...p,ref:z(V,P,Fe),id:ke,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":G};return d===M.click&&(y.onClick=S(p.onClick,$)),d===M.hover&&(y.onFocus=S(p.onFocus,()=>{F.current===void 0&&I()}),y.onBlur=S(p.onBlur,k=>{const q=Me(k),ae=!ce(O.current,q);x&&t&&ae&&g()}),y.onKeyDown=S(p.onKeyDown,k=>{k.key==="Escape"&&g()}),y.onMouseEnter=S(p.onMouseEnter,()=>{H.current=!0,F.current=window.setTimeout(()=>I(),h)}),y.onMouseLeave=S(p.onMouseLeave,()=>{H.current=!1,F.current&&(clearTimeout(F.current),F.current=void 0),re.current=window.setTimeout(()=>{H.current===!1&&g()},f)})),y},[ke,x,G,d,Fe,$,I,t,g,h,f]);l.useEffect(()=>()=>{F.current&&clearTimeout(F.current),re.current&&clearTimeout(re.current)},[]);const uo=l.useCallback((p={},P=null)=>({...p,id:U,ref:z(P,y=>{Ze(!!y)})}),[U]),po=l.useCallback((p={},P=null)=>({...p,id:W,ref:z(P,y=>{eo(!!y)})}),[W]);return{forceUpdate:ro,isOpen:x,onAnimationComplete:Te.onComplete,onClose:g,getAnchorProps:lo,getArrowProps:so,getArrowInnerProps:no,getPopoverPositionerProps:io,getPopoverProps:ao,getTriggerProps:co,getHeaderProps:uo,getBodyProps:po}}function ce(o,t){return o===t||o?.contains(t)}function Me(o){var t;const s=o.currentTarget.ownerDocument.activeElement;return(t=o.relatedTarget)!=null?t:s}function fe(o){const t=_e("Popover",o),{children:s,...n}=Z(o),a=wo(),r=ft({...n,direction:a.direction});return e.jsx(ht,{value:r,children:e.jsx(mt,{value:t,children:Co(s,{isOpen:r.isOpen,onClose:r.onClose,forceUpdate:r.forceUpdate})})})}fe.displayName="Popover";var de=(o,t)=>t?`${o}.${t}, ${t}`:void 0;function ve(o){var t;const{bg:s,bgColor:n,backgroundColor:a,shadow:r,boxShadow:i,shadowColor:c}=o,{getArrowProps:u,getArrowInnerProps:d}=R(),h=D(),f=(t=s??n)!=null?t:a,_=r??i;return e.jsx(m.div,{...u(),className:"chakra-popover__arrow-positioner",children:e.jsx(m.div,{className:j("chakra-popover__arrow",o.className),...d(o),__css:{"--popper-arrow-shadow-color":de("colors",c),"--popper-arrow-bg":de("colors",f),"--popper-arrow-shadow":de("shadows",_),...h.arrow}})})}ve.displayName="PopoverArrow";var Y=v(function(t,s){const{getBodyProps:n}=R(),a=D();return e.jsx(m.div,{...n(t,s),className:j("chakra-popover__body",t.className),__css:a.body})});Y.displayName="PopoverBody";var xe=v(function(t,s){const{onClose:n}=R(),a=D();return e.jsx(Be,{size:"sm",onClick:n,className:j("chakra-popover__close-btn",t.className),__css:a.closeButton,ref:s,...t})});xe.displayName="PopoverCloseButton";function vt(o){if(o)return{enter:{...o.enter,visibility:"visible"},exit:{...o.exit,transitionEnd:{visibility:"hidden"}}}}var xt={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},jt=m(Q.section),We=v(function(t,s){const{variants:n=xt,...a}=t,{isOpen:r}=R();return e.jsx(jt,{ref:s,variants:vt(n),initial:!1,animate:r?"enter":"exit",...a})});We.displayName="PopoverTransition";var je=v(function(t,s){const{rootProps:n,motionProps:a,...r}=t,{getPopoverProps:i,getPopoverPositionerProps:c,onAnimationComplete:u}=R(),d=D(),h={position:"relative",display:"flex",flexDirection:"column",...d.content};return e.jsx(m.div,{...c(n),__css:d.popper,className:"chakra-popover__popper",children:e.jsx(We,{...a,...i(r,s),onAnimationComplete:ko(u,r.onAnimationComplete),className:j("chakra-popover__content",t.className),__css:h})})});je.displayName="PopoverContent";function Ke(o){const t=D();return e.jsx(m.footer,{...o,className:j("chakra-popover__footer",o.className),__css:t.footer})}Ke.displayName="PopoverFooter";var qe=v(function(t,s){const{children:n,placeholder:a,className:r,...i}=t;return e.jsxs(m.select,{...i,ref:s,className:j("chakra-select",r),children:[a&&e.jsx("option",{value:"",children:a}),n]})});qe.displayName="SelectField";function yt(o,t){const s={},n={};for(const[a,r]of Object.entries(o))t.includes(a)?s[a]=r:n[a]=r;return[s,n]}var Xe=v((o,t)=>{var s;const n=_e("Select",o),{rootProps:a,placeholder:r,icon:i,color:c,height:u,h:d,minH:h,minHeight:f,iconColor:_,iconSize:C,...T}=Z(o),[E,x]=yt(T,To),g=Ko(x),I={width:"100%",height:"fit-content",position:"relative",color:c},$={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...(s=n.field)==null?void 0:s._focus}};return e.jsxs(m.div,{className:"chakra-select__wrapper",__css:I,...E,...a,children:[e.jsx(qe,{ref:t,height:d??u,minH:h??f,placeholder:r,...g,__css:$,children:o.children}),e.jsx(Ye,{"data-disabled":No(g.disabled),...(_||c)&&{color:_||c},__css:n.icon,...C&&{fontSize:C},children:i})]})});Xe.displayName="Select";var gt=o=>e.jsx("svg",{viewBox:"0 0 24 24",...o,children:e.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),_t=m("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Ye=o=>{const{children:t=e.jsx(gt,{}),...s}=o,n=l.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return e.jsx(_t,{...s,className:"chakra-select__icon-wrapper",children:l.isValidElement(t)?n:null})};Ye.displayName="SelectIcon";var[bt,B]=ge({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Je=v((o,t)=>{const s=_e("Table",o),{className:n,layout:a,...r}=Z(o);return e.jsx(bt,{value:s,children:e.jsx(m.table,{ref:t,__css:{tableLayout:a,...s.table},className:j("chakra-table",n),...r})})});Je.displayName="Table";var Pt=v((o,t)=>{const s=B();return e.jsx(m.thead,{...o,ref:t,__css:s.thead})}),X=v((o,t)=>{const s=B();return e.jsx(m.tr,{...o,ref:t,__css:s.tr})}),Qe=v((o,t)=>{const{placement:s="bottom",...n}=o,a=B();return e.jsx(m.caption,{...n,ref:t,__css:{...a.caption,captionSide:s}})});Qe.displayName="TableCaption";var St=v((o,t)=>{var s;const{overflow:n,overflowX:a,className:r,...i}=o;return e.jsx(m.div,{ref:t,className:j("chakra-table__container",r),...i,__css:{display:"block",whiteSpace:"nowrap",WebkitOverflowScrolling:"touch",overflowX:(s=n??a)!=null?s:"auto",overflowY:"hidden",maxWidth:"100%"}})}),wt=v((o,t)=>{const s=B();return e.jsx(m.tbody,{...o,ref:t,__css:s.tbody})}),N=v(({isNumeric:o,...t},s)=>{const n=B();return e.jsx(m.td,{...t,ref:s,__css:n.td,"data-is-numeric":o})}),ue=v(({isNumeric:o,...t},s)=>{const n=B();return e.jsx(m.th,{...t,ref:s,__css:n.th,"data-is-numeric":o})});const Ct={"chakra-app":{name:"chakra-app",services:{},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/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},kt="",Nt=[];function Tt(o){throw new Error(`Unsupported locale: '${o}'`)}const Et=Eo(kt),Ft=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Tt,locales:Nt,packages:Ct,styles:Et},Symbol.toStringTag,{value:"Module"}));function Rt(){return e.jsx(St,{sx:{border:"solid"},children:e.jsxs(Je,{variant:"striped",colorScheme:"teal",children:[e.jsx(Qe,{children:"This is the table cation"}),e.jsx(Pt,{children:e.jsxs(X,{children:[e.jsx(ue,{children:"First"}),e.jsx(ue,{children:"Test"}),e.jsx(ue,{isNumeric:!0,children:"Third (numeric)"})]})}),e.jsxs(wt,{children:[e.jsxs(X,{children:[e.jsx(N,{children:"one"}),e.jsx(N,{children:"bla"}),e.jsx(N,{isNumeric:!0,children:"22,3"})]}),e.jsxs(X,{children:[e.jsx(N,{children:"two"}),e.jsx(N,{children:"blub"}),e.jsx(N,{isNumeric:!0,children:"23.4"})]}),e.jsxs(X,{children:[e.jsx(N,{children:"three"}),e.jsx(N,{children:"blob"}),e.jsx(N,{isNumeric:!0,children:"12"})]})]})]})})}function Ot(){return e.jsx("div",{style:{overflow:"auto",height:"100%",width:"100%"},children:e.jsxs($o,{children:[e.jsx(He,{mb:5,children:"chakra technical demo"}),e.jsx(Mt,{}),e.jsx(At,{}),e.jsx(Rt,{}),e.jsx(Ut,{})]})})}function Mt(){return e.jsxs(Vo,{children:["This is a"," ",e.jsx(Ge,{href:"https://chakra-ui.com",isExternal:!0,color:"yellow.500",children:"link to Chakra's Design system"})]})}function At(){return e.jsxs(ze,{mb:5,mt:5,divider:e.jsx(Go,{borderColor:"gray.200"}),spacing:"24px",align:"stretch",children:[e.jsx(w,{children:e.jsx(Dt,{})}),e.jsx(w,{children:e.jsx(Bt,{})}),e.jsx(w,{children:e.jsx(It,{})}),e.jsx(w,{children:e.jsx(Ht,{})}),e.jsx(w,{children:e.jsx(zt,{})}),e.jsx(w,{children:e.jsx(Lt,{})}),e.jsx(w,{children:e.jsx($t,{})}),e.jsx(w,{children:e.jsx(Vt,{})}),e.jsx(w,{bg:"yellow.100",children:e.jsx(Gt,{})})]})}function Dt(){return e.jsxs(w,{bg:"yellow.100",children:[e.jsx(He,{size:"sm",children:"Portal Example: "}),"This is box and displayed here. Scroll/Look down to see the portal that is added at the end of document.body. The Portal is part of this Box.",e.jsx(Ie,{children:"This is the portal content!"})]})}function Bt(){return e.jsx(Fo,{hasArrow:!0,label:"Button Tooltip","aria-label":"A tooltip",placement:"top",children:e.jsx(b,{colorScheme:"teal",children:"Button with a tooltip"})})}function It(){const o=Wo();return e.jsx(b,{colorScheme:"teal",onClick:()=>o({title:"Account created.",description:"We've created your account for you.",status:"success",duration:9e3,position:"bottom-left",isClosable:!0}),children:"Show Toast"})}function Ht(){return e.jsxs(Ro,{status:"error",children:[e.jsx(Oo,{}),e.jsx(Mo,{children:"Test Alert!"}),e.jsx(Ao,{children:"This is a test alert (error)"})]})}function zt(){const{isOpen:o,onOpen:t,onClose:s}=be(),n=l.useRef(null);return e.jsxs(e.Fragment,{children:[e.jsx(b,{onClick:t,colorScheme:"teal",children:"Open Alert"}),e.jsx(Do,{isOpen:o,leastDestructiveRef:n,onClose:s,children:e.jsx(te,{children:e.jsxs(Bo,{className:"class-from-app",children:[e.jsx(oe,{fontSize:"lg",fontWeight:"bold",children:"Alert Title"}),e.jsx(se,{children:"This is the text in the alert dialog body."}),e.jsxs(ee,{children:[e.jsx(b,{ref:n,onClick:s,children:"Cancel"}),e.jsx(b,{colorScheme:"green",onClick:s,ml:3,children:"Okay"})]})]})})})]})}function Lt(){const{isOpen:o,onOpen:t,onClose:s}=be();return e.jsxs(e.Fragment,{children:[e.jsx(b,{onClick:t,colorScheme:"teal",children:"Show Modal"}),e.jsxs(Io,{closeOnOverlayClick:!1,isOpen:o,onClose:s,children:[e.jsx(te,{}),e.jsxs(Ho,{children:[e.jsx(oe,{children:"This is a modal"}),e.jsx(Pe,{}),e.jsx(se,{pb:6,children:"This is a modal text!"}),e.jsxs(ee,{children:[e.jsx(b,{colorScheme:"green",mr:2,children:"Got it"}),e.jsx(b,{onClick:s,children:"Cancel"})]})]})]})]})}function $t(){const{isOpen:o,onOpen:t,onClose:s}=be(),n=l.useRef(null);return e.jsxs(e.Fragment,{children:[e.jsx(b,{ref:n,colorScheme:"teal",onClick:t,children:"Open Drawer"}),e.jsxs(zo,{isOpen:o,placement:"left",onClose:s,finalFocusRef:n,isFullHeight:!1,children:[e.jsx(te,{}),e.jsxs(Ue,{children:[e.jsx(Pe,{}),e.jsx(oe,{children:"This is the drawer header"}),e.jsx(se,{children:"This is the body."}),e.jsxs(ee,{children:[e.jsx(b,{variant:"outline",mr:3,onClick:s,children:"Cancel"}),e.jsx(b,{colorScheme:"green",children:"Got it"})]})]})]})]})}function Vt(){return e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(me,{children:e.jsx(b,{colorScheme:"teal",children:"Show Popover"})}),e.jsxs(je,{children:[e.jsx(ve,{}),e.jsx(xe,{}),e.jsx(he,{children:"Popover!"}),e.jsx(Y,{children:"This is a very important Popover"})]})]}),e.jsxs(fe,{children:[e.jsx(me,{children:e.jsx(b,{ml:5,colorScheme:"teal",children:"Show Popover rendered in an portal"})}),e.jsx(Ie,{children:e.jsxs(je,{children:[e.jsx(ve,{}),e.jsx(he,{children:"Header"}),e.jsx(xe,{}),e.jsx(Y,{children:e.jsx(Y,{children:"This is a very important Popover"})}),e.jsx(Ke,{children:"This is the footer"})]})})]})]})}function Gt(){const[o,t]=l.useState("2");return e.jsxs(e.Fragment,{children:[e.jsx(Uo,{onChange:t,value:o,children:e.jsxs(ze,{spacing:4,direction:"row",children:[e.jsx(le,{size:"sm",value:"1",isDisabled:!0,children:"Radio 1 (Disabled)"}),e.jsx(le,{size:"md",value:"2",children:"Radio 2"}),e.jsx(le,{size:"lg",value:"3",children:"Radio 3"})]})}),e.jsx("p",{children:"Checked radio: "+o})]})}function Ut(){return e.jsxs(Xe,{m:5,placeholder:"Select an item",children:[e.jsx("option",{value:"item1",children:"Item 1"}),e.jsx("option",{value:"item2",children:"Item 2"}),e.jsx("option",{value:"item3",children:"Item 3"})]})}const Wt=Lo({component:Ot,appMetadata:Ft});customElements.define("chakra-app",Wt); +import{r as l,j as e,C as Ae,D as Q,d as j,F as J,T as Re,G as pe,H as mo,B as ye,f as v,l as fo,o as Z,e as m,z as De,A as vo,J as xo,K as jo,L as yo,M as go,N as L,O as A,Q as _o,R as bo,U as Be,k as S,g as ge,V as Po,W as So,X as ie,m as z,b as _e,Y as wo,Z as Co,q as ko,h as No,s as To,v as Eo,_ as Ie,$ as Fo,a0 as Ro,a1 as Oo,a2 as Mo,a3 as Ao,a4 as Do,a5 as Bo,a6 as Io,a7 as Ho,a8 as zo,w as Lo}from"./ed1045c62907.js";import{C as $o,H as He,T as Vo}from"./ad369b8c8384.js";import{S as Go,R as Uo,a as le}from"./3175a3fb44a2.js";import{S as ze}from"./446cd47ccb2f.js";import{B as w}from"./fde0f3c41d58.js";import{u as Wo}from"./b7d20d8aaf96.js";import{u as be}from"./19fd289afc0b.js";import{u as Ko}from"./f9623fa81503.js";import{B as b}from"./49916b87ef64.js";var qo={enter:({transition:o,transitionEnd:t,delay:s}={})=>{var n;return{opacity:1,transition:(n=o?.enter)!=null?n:J.enter(Re.enter,s),transitionEnd:t?.enter}},exit:({transition:o,transitionEnd:t,delay:s}={})=>{var n;return{opacity:0,transition:(n=o?.exit)!=null?n:J.exit(Re.exit,s),transitionEnd:t?.exit}}},Le={initial:"exit",animate:"enter",exit:"exit",variants:qo},Xo=l.forwardRef(function(t,s){const{unmountOnExit:n,in:a,className:r,transition:i,transitionEnd:c,delay:u,...d}=t,h=a||n?"enter":"exit",f=n?a&&n:!0,_={transition:i,transitionEnd:c,delay:u};return e.jsx(Ae,{custom:_,children:f&&e.jsx(Q.div,{ref:s,className:j("chakra-fade",r),custom:_,...Le,animate:h,...d})})});Xo.displayName="Fade";var Oe={exit:{duration:.15,ease:mo.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Yo={exit:({direction:o,transition:t,transitionEnd:s,delay:n})=>{var a;const{exit:r}=pe({direction:o});return{...r,transition:(a=t?.exit)!=null?a:J.exit(Oe.exit,n),transitionEnd:s?.exit}},enter:({direction:o,transitionEnd:t,transition:s,delay:n})=>{var a;const{enter:r}=pe({direction:o});return{...r,transition:(a=s?.enter)!=null?a:J.enter(Oe.enter,n),transitionEnd:t?.enter}}},$e=l.forwardRef(function(t,s){const{direction:n="right",style:a,unmountOnExit:r,in:i,className:c,transition:u,transitionEnd:d,delay:h,motionProps:f,..._}=t,C=pe({direction:n}),T=Object.assign({position:"fixed"},C.position,a),E=r?i&&r:!0,x=i||r?"enter":"exit",g={transitionEnd:d,transition:u,direction:n,delay:h};return e.jsx(Ae,{custom:g,children:E&&e.jsx(Q.div,{..._,ref:s,initial:"exit",className:j("chakra-slide",c),animate:x,exit:"exit",custom:g,variants:Yo,style:T,...f})})});$e.displayName="Slide";function Jo(o){return"current"in o}var Ve=()=>typeof window<"u";function Qo(){var o;const t=navigator.userAgentData;return(o=t?.platform)!=null?o:navigator.platform}var Zo=o=>Ve()&&o.test(navigator.vendor),et=o=>Ve()&&o.test(Qo()),ot=()=>et(/mac|iphone|ipad|ipod/i),tt=()=>ot()&&Zo(/apple/i);function st(o){const{ref:t,elements:s,enabled:n}=o,a=()=>{var r,i;return(i=(r=t.current)==null?void 0:r.ownerDocument)!=null?i:document};ye(a,"pointerdown",r=>{if(!tt()||!n)return;const i=r.target,u=(s??[t]).some(d=>{const h=Jo(d)?d.current:d;return h?.contains(i)||h===i});a().activeElement!==i&&u&&(r.preventDefault(),i.focus())})}var Ge=v(function(t,s){const n=fo("Link",t),{className:a,isExternal:r,...i}=Z(t);return e.jsx(m.a,{target:r?"_blank":void 0,rel:r?"noopener":void 0,ref:s,className:j("chakra-link",a),...i,__css:n})});Ge.displayName="Link";function nt(o){const t=o.current;if(!t)return!1;const s=jo(t);return!s||t.contains(s)?!1:!!yo(s)}function rt(o,t){const{shouldFocus:s,visible:n,focusRef:a}=t,r=s&&!n;De(()=>{if(!r||nt(o))return;const i=a?.current||o.current;let c;if(i)return c=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(c)}},[r,o,a])}var at={preventScroll:!0,shouldFocus:!1};function it(o,t=at){const{focusRef:s,preventScroll:n,shouldFocus:a,visible:r}=t,i=lt(o)?o.current:o,c=a&&r,u=l.useRef(c),d=l.useRef(r);vo(()=>{!d.current&&r&&(u.current=c),d.current=r},[r,c]);const h=l.useCallback(()=>{if(!(!r||!i||!u.current)&&(u.current=!1,!i.contains(document.activeElement)))if(s?.current)requestAnimationFrame(()=>{var f;(f=s.current)==null||f.focus({preventScroll:n})});else{const f=xo(i);f.length>0&&requestAnimationFrame(()=>{f[0].focus({preventScroll:n})})}},[r,n,i,s]);De(()=>{h()},[h]),ye(i,"transitionend",h)}function lt(o){return"current"in o}function ct(o){const{isOpen:t,ref:s}=o,[n,a]=l.useState(t),[r,i]=l.useState(!1);return l.useEffect(()=>{r||(a(t),i(!0))},[t,r,n]),ye(()=>s.current,"animationend",()=>{a(t)}),{present:!(t?!1:!n),onComplete(){var u;const d=go(s.current),h=new d.CustomEvent("animationend",{bubbles:!0});(u=s.current)==null||u.dispatchEvent(h)}}}function dt(o){const{wasSelected:t,enabled:s,isSelected:n,mode:a="unmount"}=o;return!!(!s||n||a==="keepMounted"&&t)}var ut=m($e),Ue=v((o,t)=>{const{className:s,children:n,motionProps:a,containerProps:r,...i}=o,{getDialogProps:c,getDialogContainerProps:u,isOpen:d}=L(),h=c(i,t),f=u(r),_=j("chakra-modal__content",s),C=A(),T={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...C.dialog},E={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...C.dialogContainer},{placement:x}=_o();return e.jsx(bo,{children:e.jsx(m.div,{...f,className:"chakra-modal__content-container",__css:E,children:e.jsx(ut,{motionProps:a,direction:x,in:d,className:_,...h,__css:T,children:n})})})});Ue.displayName="DrawerContent";var ee=v((o,t)=>{const{className:s,...n}=o,a=j("chakra-modal__footer",s),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...A().footer};return e.jsx(m.footer,{ref:t,...n,__css:i,className:a})});ee.displayName="ModalFooter";var oe=v((o,t)=>{const{className:s,...n}=o,{headerId:a,setHeaderMounted:r}=L();l.useEffect(()=>(r(!0),()=>r(!1)),[r]);const i=j("chakra-modal__header",s),u={flex:0,...A().header};return e.jsx(m.header,{ref:t,className:i,id:a,...n,__css:u})});oe.displayName="ModalHeader";var pt=m(Q.div),te=v((o,t)=>{const{className:s,transition:n,motionProps:a,...r}=o,i=j("chakra-modal__overlay",s),u={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...A().overlay},{motionPreset:d}=L(),f=a||(d==="none"?{}:Le);return e.jsx(pt,{...f,__css:u,ref:t,className:i,...r})});te.displayName="ModalOverlay";var se=v((o,t)=>{const{className:s,...n}=o,{bodyId:a,setBodyMounted:r}=L();l.useEffect(()=>(r(!0),()=>r(!1)),[r]);const i=j("chakra-modal__body",s),c=A();return e.jsx(m.div,{ref:t,className:i,id:a,...n,__css:c.body})});se.displayName="ModalBody";var Pe=v((o,t)=>{const{onClick:s,className:n,...a}=o,{onClose:r}=L(),i=j("chakra-modal__close-btn",n),c=A();return e.jsx(Be,{ref:t,__css:c.closeButton,className:i,onClick:S(s,u=>{u.stopPropagation(),r()}),...a})});Pe.displayName="ModalCloseButton";var[ht,R]=ge({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[mt,D]=ge({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),he=v(function(t,s){const{getHeaderProps:n}=R(),a=D();return e.jsx(m.header,{...n(t,s),className:j("chakra-popover__header",t.className),__css:a.header})});he.displayName="PopoverHeader";function me(o){const t=l.Children.only(o.children),{getTriggerProps:s}=R();return l.cloneElement(t,s(t.props,t.ref))}me.displayName="PopoverTrigger";var M={click:"click",hover:"hover"};function ft(o={}){const{closeOnBlur:t=!0,closeOnEsc:s=!0,initialFocusRef:n,id:a,returnFocusOnClose:r=!0,autoFocus:i=!0,arrowSize:c,arrowShadowColor:u,trigger:d=M.click,openDelay:h=200,closeDelay:f=200,isLazy:_,lazyBehavior:C="unmount",computePositionOnMount:T,...E}=o,{isOpen:x,onClose:g,onOpen:I,onToggle:$}=Po(o),ne=l.useRef(null),V=l.useRef(null),O=l.useRef(null),H=l.useRef(!1),Se=l.useRef(!1);x&&(Se.current=!0);const[we,Ze]=l.useState(!1),[Ce,eo]=l.useState(!1),oo=l.useId(),to=a??oo,[ke,G,U,W]=["popover-trigger","popover-content","popover-header","popover-body"].map(p=>`${p}-${to}`),{referenceRef:K,getArrowProps:so,getPopperProps:Ne,getArrowInnerProps:no,forceUpdate:ro}=So({...E,enabled:x||!!T}),Te=ct({isOpen:x,ref:O});st({enabled:x,ref:V}),rt(O,{focusRef:V,visible:x,shouldFocus:r&&d===M.click}),it(O,{focusRef:n,visible:x,shouldFocus:i&&d===M.click});const Ee=dt({wasSelected:Se.current,enabled:_,mode:C,isSelected:Te.present}),ao=l.useCallback((p={},P=null)=>{const y={...p,style:{...p.style,transformOrigin:ie.transformOrigin.varRef,[ie.arrowSize.var]:c?`${c}px`:void 0,[ie.arrowShadowColor.var]:u},ref:z(O,P),children:Ee?p.children:null,id:G,tabIndex:-1,role:"dialog",onKeyDown:S(p.onKeyDown,k=>{s&&k.key==="Escape"&&g()}),onBlur:S(p.onBlur,k=>{const q=Me(k),ae=ce(O.current,q),ho=ce(V.current,q);x&&t&&(!ae&&!ho)&&g()}),"aria-labelledby":we?U:void 0,"aria-describedby":Ce?W:void 0};return d===M.hover&&(y.role="tooltip",y.onMouseEnter=S(p.onMouseEnter,()=>{H.current=!0}),y.onMouseLeave=S(p.onMouseLeave,k=>{k.nativeEvent.relatedTarget!==null&&(H.current=!1,setTimeout(()=>g(),f))})),y},[Ee,G,we,U,Ce,W,d,s,g,x,t,f,u,c]),io=l.useCallback((p={},P=null)=>Ne({...p,style:{visibility:x?"visible":"hidden",...p.style}},P),[x,Ne]),lo=l.useCallback((p,P=null)=>({...p,ref:z(P,ne,K)}),[ne,K]),F=l.useRef(),re=l.useRef(),Fe=l.useCallback(p=>{ne.current==null&&K(p)},[K]),co=l.useCallback((p={},P=null)=>{const y={...p,ref:z(V,P,Fe),id:ke,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":G};return d===M.click&&(y.onClick=S(p.onClick,$)),d===M.hover&&(y.onFocus=S(p.onFocus,()=>{F.current===void 0&&I()}),y.onBlur=S(p.onBlur,k=>{const q=Me(k),ae=!ce(O.current,q);x&&t&&ae&&g()}),y.onKeyDown=S(p.onKeyDown,k=>{k.key==="Escape"&&g()}),y.onMouseEnter=S(p.onMouseEnter,()=>{H.current=!0,F.current=window.setTimeout(()=>I(),h)}),y.onMouseLeave=S(p.onMouseLeave,()=>{H.current=!1,F.current&&(clearTimeout(F.current),F.current=void 0),re.current=window.setTimeout(()=>{H.current===!1&&g()},f)})),y},[ke,x,G,d,Fe,$,I,t,g,h,f]);l.useEffect(()=>()=>{F.current&&clearTimeout(F.current),re.current&&clearTimeout(re.current)},[]);const uo=l.useCallback((p={},P=null)=>({...p,id:U,ref:z(P,y=>{Ze(!!y)})}),[U]),po=l.useCallback((p={},P=null)=>({...p,id:W,ref:z(P,y=>{eo(!!y)})}),[W]);return{forceUpdate:ro,isOpen:x,onAnimationComplete:Te.onComplete,onClose:g,getAnchorProps:lo,getArrowProps:so,getArrowInnerProps:no,getPopoverPositionerProps:io,getPopoverProps:ao,getTriggerProps:co,getHeaderProps:uo,getBodyProps:po}}function ce(o,t){return o===t||o?.contains(t)}function Me(o){var t;const s=o.currentTarget.ownerDocument.activeElement;return(t=o.relatedTarget)!=null?t:s}function fe(o){const t=_e("Popover",o),{children:s,...n}=Z(o),a=wo(),r=ft({...n,direction:a.direction});return e.jsx(ht,{value:r,children:e.jsx(mt,{value:t,children:Co(s,{isOpen:r.isOpen,onClose:r.onClose,forceUpdate:r.forceUpdate})})})}fe.displayName="Popover";var de=(o,t)=>t?`${o}.${t}, ${t}`:void 0;function ve(o){var t;const{bg:s,bgColor:n,backgroundColor:a,shadow:r,boxShadow:i,shadowColor:c}=o,{getArrowProps:u,getArrowInnerProps:d}=R(),h=D(),f=(t=s??n)!=null?t:a,_=r??i;return e.jsx(m.div,{...u(),className:"chakra-popover__arrow-positioner",children:e.jsx(m.div,{className:j("chakra-popover__arrow",o.className),...d(o),__css:{"--popper-arrow-shadow-color":de("colors",c),"--popper-arrow-bg":de("colors",f),"--popper-arrow-shadow":de("shadows",_),...h.arrow}})})}ve.displayName="PopoverArrow";var Y=v(function(t,s){const{getBodyProps:n}=R(),a=D();return e.jsx(m.div,{...n(t,s),className:j("chakra-popover__body",t.className),__css:a.body})});Y.displayName="PopoverBody";var xe=v(function(t,s){const{onClose:n}=R(),a=D();return e.jsx(Be,{size:"sm",onClick:n,className:j("chakra-popover__close-btn",t.className),__css:a.closeButton,ref:s,...t})});xe.displayName="PopoverCloseButton";function vt(o){if(o)return{enter:{...o.enter,visibility:"visible"},exit:{...o.exit,transitionEnd:{visibility:"hidden"}}}}var xt={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},jt=m(Q.section),We=v(function(t,s){const{variants:n=xt,...a}=t,{isOpen:r}=R();return e.jsx(jt,{ref:s,variants:vt(n),initial:!1,animate:r?"enter":"exit",...a})});We.displayName="PopoverTransition";var je=v(function(t,s){const{rootProps:n,motionProps:a,...r}=t,{getPopoverProps:i,getPopoverPositionerProps:c,onAnimationComplete:u}=R(),d=D(),h={position:"relative",display:"flex",flexDirection:"column",...d.content};return e.jsx(m.div,{...c(n),__css:d.popper,className:"chakra-popover__popper",children:e.jsx(We,{...a,...i(r,s),onAnimationComplete:ko(u,r.onAnimationComplete),className:j("chakra-popover__content",t.className),__css:h})})});je.displayName="PopoverContent";function Ke(o){const t=D();return e.jsx(m.footer,{...o,className:j("chakra-popover__footer",o.className),__css:t.footer})}Ke.displayName="PopoverFooter";var qe=v(function(t,s){const{children:n,placeholder:a,className:r,...i}=t;return e.jsxs(m.select,{...i,ref:s,className:j("chakra-select",r),children:[a&&e.jsx("option",{value:"",children:a}),n]})});qe.displayName="SelectField";function yt(o,t){const s={},n={};for(const[a,r]of Object.entries(o))t.includes(a)?s[a]=r:n[a]=r;return[s,n]}var Xe=v((o,t)=>{var s;const n=_e("Select",o),{rootProps:a,placeholder:r,icon:i,color:c,height:u,h:d,minH:h,minHeight:f,iconColor:_,iconSize:C,...T}=Z(o),[E,x]=yt(T,To),g=Ko(x),I={width:"100%",height:"fit-content",position:"relative",color:c},$={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...(s=n.field)==null?void 0:s._focus}};return e.jsxs(m.div,{className:"chakra-select__wrapper",__css:I,...E,...a,children:[e.jsx(qe,{ref:t,height:d??u,minH:h??f,placeholder:r,...g,__css:$,children:o.children}),e.jsx(Ye,{"data-disabled":No(g.disabled),...(_||c)&&{color:_||c},__css:n.icon,...C&&{fontSize:C},children:i})]})});Xe.displayName="Select";var gt=o=>e.jsx("svg",{viewBox:"0 0 24 24",...o,children:e.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),_t=m("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Ye=o=>{const{children:t=e.jsx(gt,{}),...s}=o,n=l.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return e.jsx(_t,{...s,className:"chakra-select__icon-wrapper",children:l.isValidElement(t)?n:null})};Ye.displayName="SelectIcon";var[bt,B]=ge({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "
" `}),Je=v((o,t)=>{const s=_e("Table",o),{className:n,layout:a,...r}=Z(o);return e.jsx(bt,{value:s,children:e.jsx(m.table,{ref:t,__css:{tableLayout:a,...s.table},className:j("chakra-table",n),...r})})});Je.displayName="Table";var Pt=v((o,t)=>{const s=B();return e.jsx(m.thead,{...o,ref:t,__css:s.thead})}),X=v((o,t)=>{const s=B();return e.jsx(m.tr,{...o,ref:t,__css:s.tr})}),Qe=v((o,t)=>{const{placement:s="bottom",...n}=o,a=B();return e.jsx(m.caption,{...n,ref:t,__css:{...a.caption,captionSide:s}})});Qe.displayName="TableCaption";var St=v((o,t)=>{var s;const{overflow:n,overflowX:a,className:r,...i}=o;return e.jsx(m.div,{ref:t,className:j("chakra-table__container",r),...i,__css:{display:"block",whiteSpace:"nowrap",WebkitOverflowScrolling:"touch",overflowX:(s=n??a)!=null?s:"auto",overflowY:"hidden",maxWidth:"100%"}})}),wt=v((o,t)=>{const s=B();return e.jsx(m.tbody,{...o,ref:t,__css:s.tbody})}),N=v(({isNumeric:o,...t},s)=>{const n=B();return e.jsx(m.td,{...t,ref:s,__css:n.td,"data-is-numeric":o})}),ue=v(({isNumeric:o,...t},s)=>{const n=B();return e.jsx(m.th,{...t,ref:s,__css:n.th,"data-is-numeric":o})});const Ct={"chakra-app":{name:"chakra-app",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",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:{}}},kt="",Nt=[];function Tt(o){throw new Error(`Unsupported locale: '${o}'`)}const Et=Eo(kt),Ft=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Tt,locales:Nt,packages:Ct,styles:Et},Symbol.toStringTag,{value:"Module"}));function Rt(){return e.jsx(St,{sx:{border:"solid"},children:e.jsxs(Je,{variant:"striped",colorScheme:"teal",children:[e.jsx(Qe,{children:"This is the table cation"}),e.jsx(Pt,{children:e.jsxs(X,{children:[e.jsx(ue,{children:"First"}),e.jsx(ue,{children:"Test"}),e.jsx(ue,{isNumeric:!0,children:"Third (numeric)"})]})}),e.jsxs(wt,{children:[e.jsxs(X,{children:[e.jsx(N,{children:"one"}),e.jsx(N,{children:"bla"}),e.jsx(N,{isNumeric:!0,children:"22,3"})]}),e.jsxs(X,{children:[e.jsx(N,{children:"two"}),e.jsx(N,{children:"blub"}),e.jsx(N,{isNumeric:!0,children:"23.4"})]}),e.jsxs(X,{children:[e.jsx(N,{children:"three"}),e.jsx(N,{children:"blob"}),e.jsx(N,{isNumeric:!0,children:"12"})]})]})]})})}function Ot(){return e.jsx("div",{style:{overflow:"auto",height:"100%",width:"100%"},children:e.jsxs($o,{children:[e.jsx(He,{mb:5,children:"chakra technical demo"}),e.jsx(Mt,{}),e.jsx(At,{}),e.jsx(Rt,{}),e.jsx(Ut,{})]})})}function Mt(){return e.jsxs(Vo,{children:["This is a"," ",e.jsx(Ge,{href:"https://chakra-ui.com",isExternal:!0,color:"yellow.500",children:"link to Chakra's Design system"})]})}function At(){return e.jsxs(ze,{mb:5,mt:5,divider:e.jsx(Go,{borderColor:"gray.200"}),spacing:"24px",align:"stretch",children:[e.jsx(w,{children:e.jsx(Dt,{})}),e.jsx(w,{children:e.jsx(Bt,{})}),e.jsx(w,{children:e.jsx(It,{})}),e.jsx(w,{children:e.jsx(Ht,{})}),e.jsx(w,{children:e.jsx(zt,{})}),e.jsx(w,{children:e.jsx(Lt,{})}),e.jsx(w,{children:e.jsx($t,{})}),e.jsx(w,{children:e.jsx(Vt,{})}),e.jsx(w,{bg:"yellow.100",children:e.jsx(Gt,{})})]})}function Dt(){return e.jsxs(w,{bg:"yellow.100",children:[e.jsx(He,{size:"sm",children:"Portal Example: "}),"This is box and displayed here. Scroll/Look down to see the portal that is added at the end of document.body. The Portal is part of this Box.",e.jsx(Ie,{children:"This is the portal content!"})]})}function Bt(){return e.jsx(Fo,{hasArrow:!0,label:"Button Tooltip","aria-label":"A tooltip",placement:"top",children:e.jsx(b,{colorScheme:"teal",children:"Button with a tooltip"})})}function It(){const o=Wo();return e.jsx(b,{colorScheme:"teal",onClick:()=>o({title:"Account created.",description:"We've created your account for you.",status:"success",duration:9e3,position:"bottom-left",isClosable:!0}),children:"Show Toast"})}function Ht(){return e.jsxs(Ro,{status:"error",children:[e.jsx(Oo,{}),e.jsx(Mo,{children:"Test Alert!"}),e.jsx(Ao,{children:"This is a test alert (error)"})]})}function zt(){const{isOpen:o,onOpen:t,onClose:s}=be(),n=l.useRef(null);return e.jsxs(e.Fragment,{children:[e.jsx(b,{onClick:t,colorScheme:"teal",children:"Open Alert"}),e.jsx(Do,{isOpen:o,leastDestructiveRef:n,onClose:s,children:e.jsx(te,{children:e.jsxs(Bo,{className:"class-from-app",children:[e.jsx(oe,{fontSize:"lg",fontWeight:"bold",children:"Alert Title"}),e.jsx(se,{children:"This is the text in the alert dialog body."}),e.jsxs(ee,{children:[e.jsx(b,{ref:n,onClick:s,children:"Cancel"}),e.jsx(b,{colorScheme:"green",onClick:s,ml:3,children:"Okay"})]})]})})})]})}function Lt(){const{isOpen:o,onOpen:t,onClose:s}=be();return e.jsxs(e.Fragment,{children:[e.jsx(b,{onClick:t,colorScheme:"teal",children:"Show Modal"}),e.jsxs(Io,{closeOnOverlayClick:!1,isOpen:o,onClose:s,children:[e.jsx(te,{}),e.jsxs(Ho,{children:[e.jsx(oe,{children:"This is a modal"}),e.jsx(Pe,{}),e.jsx(se,{pb:6,children:"This is a modal text!"}),e.jsxs(ee,{children:[e.jsx(b,{colorScheme:"green",mr:2,children:"Got it"}),e.jsx(b,{onClick:s,children:"Cancel"})]})]})]})]})}function $t(){const{isOpen:o,onOpen:t,onClose:s}=be(),n=l.useRef(null);return e.jsxs(e.Fragment,{children:[e.jsx(b,{ref:n,colorScheme:"teal",onClick:t,children:"Open Drawer"}),e.jsxs(zo,{isOpen:o,placement:"left",onClose:s,finalFocusRef:n,isFullHeight:!1,children:[e.jsx(te,{}),e.jsxs(Ue,{children:[e.jsx(Pe,{}),e.jsx(oe,{children:"This is the drawer header"}),e.jsx(se,{children:"This is the body."}),e.jsxs(ee,{children:[e.jsx(b,{variant:"outline",mr:3,onClick:s,children:"Cancel"}),e.jsx(b,{colorScheme:"green",children:"Got it"})]})]})]})]})}function Vt(){return e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(me,{children:e.jsx(b,{colorScheme:"teal",children:"Show Popover"})}),e.jsxs(je,{children:[e.jsx(ve,{}),e.jsx(xe,{}),e.jsx(he,{children:"Popover!"}),e.jsx(Y,{children:"This is a very important Popover"})]})]}),e.jsxs(fe,{children:[e.jsx(me,{children:e.jsx(b,{ml:5,colorScheme:"teal",children:"Show Popover rendered in an portal"})}),e.jsx(Ie,{children:e.jsxs(je,{children:[e.jsx(ve,{}),e.jsx(he,{children:"Header"}),e.jsx(xe,{}),e.jsx(Y,{children:e.jsx(Y,{children:"This is a very important Popover"})}),e.jsx(Ke,{children:"This is the footer"})]})})]})]})}function Gt(){const[o,t]=l.useState("2");return e.jsxs(e.Fragment,{children:[e.jsx(Uo,{onChange:t,value:o,children:e.jsxs(ze,{spacing:4,direction:"row",children:[e.jsx(le,{size:"sm",value:"1",isDisabled:!0,children:"Radio 1 (Disabled)"}),e.jsx(le,{size:"md",value:"2",children:"Radio 2"}),e.jsx(le,{size:"lg",value:"3",children:"Radio 3"})]})}),e.jsx("p",{children:"Checked radio: "+o})]})}function Ut(){return e.jsxs(Xe,{m:5,placeholder:"Select an item",children:[e.jsx("option",{value:"item1",children:"Item 1"}),e.jsx("option",{value:"item2",children:"Item 2"}),e.jsx("option",{value:"item3",children:"Item 3"})]})}const Wt=Lo({component:Ot,appMetadata:Ft});customElements.define("chakra-app",Wt); diff --git a/starter/assets/6ac28e9c9f86.js b/starter/assets/8520116258af.js similarity index 99% rename from starter/assets/6ac28e9c9f86.js rename to starter/assets/8520116258af.js index 3ed2e20c6..0e8fcc4e6 100644 --- a/starter/assets/6ac28e9c9f86.js +++ b/starter/assets/8520116258af.js @@ -1,3 +1,3 @@ import{y as Xe,r as E,f as it,j as C,g as Zi,e as _e,A as oi,z as xs,h as de,k as Se,m as Vt,a9 as Xi,b as Cs,o as Rs,q as qo,d as Ts,Y as Qo,x as Jo,v as ea,aa as ta,ab as ws,ac as $e,Z as ct,p as ht,ad as na,ae as Ss,af as ia,ag as ra,ah as xr,ai as Ve,aj as sa,ak as oa,al as aa,P as Is,E as la,am as ca,$ as Ci,U as ua,an as Cr,ao as ha,w as da}from"./ed1045c62907.js";import{_ as Rr}from"./41c905a75d98.js";import{B as Vi}from"./49916b87ef64.js";import{t as ga,B as Rn}from"./fde0f3c41d58.js";import{u as Tr}from"./19fd289afc0b.js";import{c as fa}from"./f9623fa81503.js";import{c as ai,p as ma,r as wr,v as Sr}from"./f68c64fe84b1.js";import{u as pa}from"./820e0ae9dfd0.js";const Ps=1/60*1e3,_a=typeof performance<"u"?()=>performance.now():()=>Date.now(),ks=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(_a()),Ps);function ya(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&r,d=h?e:t;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),h&&r&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=ya(()=>Kt=!0),n),{}),ba=en.reduce((n,e)=>{const t=Bn[e];return n[e]=(i,r=!1,s=!1)=>(Kt||Ca(),t.schedule(i,r,s)),n},{}),Ea=en.reduce((n,e)=>(n[e]=Bn[e].cancel,n),{});en.reduce((n,e)=>(n[e]=()=>Bn[e].process(It),n),{});const xa=n=>Bn[n].process(It),Ms=n=>{Kt=!1,It.delta=Ri?Ps:Math.max(Math.min(n-It.timestamp,va),1),It.timestamp=n,Ti=!0,en.forEach(xa),Ti=!1,Kt&&(Ri=!1,ks(Ms))},Ca=()=>{Kt=!0,Ri=!0,Ti||ks(Ms)},Ir=()=>It;function Ra(n){const{value:e,defaultValue:t,onChange:i,shouldUpdate:r=(d,f)=>d!==f}=n,s=Xe(i),o=Xe(r),[a,l]=E.useState(t),c=e!==void 0,u=c?e:a,h=Xe(d=>{const p=typeof d=="function"?d(u):d;o(u,p)&&(c||l(p),s(p))},[c,s,u,o]);return[u,h]}var Yt=it((n,e)=>{const{icon:t,children:i,isRound:r,"aria-label":s,...o}=n,a=t||i,l=E.isValidElement(a)?E.cloneElement(a,{"aria-hidden":!0,focusable:!1}):null;return C.jsx(Vi,{padding:"0",borderRadius:r?"full":void 0,ref:e,"aria-label":s,...o,children:l})});Yt.displayName="IconButton";var[yf,Ta]=Zi({name:"CheckboxGroupContext",strict:!1});function wa(n){const[e,t]=E.useState(n),[i,r]=E.useState(!1);return n!==e&&(r(!0),t(n)),i}function Sa(n){return C.jsx(_e.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...n,children:C.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function Ia(n){return C.jsx(_e.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...n,children:C.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Pa(n){const{isIndeterminate:e,isChecked:t,...i}=n,r=e?Ia:Sa;return t||e?C.jsx(_e.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:C.jsx(r,{...i})}):null}var ka={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function Ma(n,e=[]){const t=Object.assign({},n);for(const i of e)i in t&&delete t[i];return t}function La(n={}){const e=fa(n),{isDisabled:t,isReadOnly:i,isRequired:r,isInvalid:s,id:o,onBlur:a,onFocus:l,"aria-describedby":c}=e,{defaultChecked:u,isChecked:h,isFocusable:d,onChange:f,isIndeterminate:p,name:m,value:_,tabIndex:v=void 0,"aria-label":y,"aria-labelledby":x,"aria-invalid":b,...w}=n,L=Ma(w,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),M=Xe(f),F=Xe(a),X=Xe(l),[D,le]=E.useState(!1),[q,ne]=E.useState(!1),[ye,ie]=E.useState(!1),[ce,P]=E.useState(!1);E.useEffect(()=>ga(le),[]);const Z=E.useRef(null),[Q,j]=E.useState(!0),[we,Y]=E.useState(!!u),re=h!==void 0,A=re?h:we,k=E.useCallback(S=>{if(i||t){S.preventDefault();return}re||Y(A?S.target.checked:p?!0:S.target.checked),M?.(S)},[i,t,A,re,p,M]);oi(()=>{Z.current&&(Z.current.indeterminate=!!p)},[p]),xs(()=>{t&&ne(!1)},[t,ne]),oi(()=>{const S=Z.current;S?.form&&(S.form.onreset=()=>{Y(!!u)})},[]);const fe=t&&!d,he=E.useCallback(S=>{S.key===" "&&P(!0)},[P]),H=E.useCallback(S=>{S.key===" "&&P(!1)},[P]);oi(()=>{if(!Z.current)return;Z.current.checked!==A&&Y(Z.current.checked)},[Z.current]);const Le=E.useCallback((S={},J=null)=>{const se=Ae=>{q&&Ae.preventDefault(),P(!0)};return{...S,ref:J,"data-active":de(ce),"data-hover":de(ye),"data-checked":de(A),"data-focus":de(q),"data-focus-visible":de(q&&D),"data-indeterminate":de(p),"data-disabled":de(t),"data-invalid":de(s),"data-readonly":de(i),"aria-hidden":!0,onMouseDown:Se(S.onMouseDown,se),onMouseUp:Se(S.onMouseUp,()=>P(!1)),onMouseEnter:Se(S.onMouseEnter,()=>ie(!0)),onMouseLeave:Se(S.onMouseLeave,()=>ie(!1))}},[ce,A,t,q,D,ye,p,s,i]),Ue=E.useCallback((S={},J=null)=>({...L,...S,ref:Vt(J,se=>{se&&j(se.tagName==="LABEL")}),onClick:Se(S.onClick,()=>{var se;Q||((se=Z.current)==null||se.click(),requestAnimationFrame(()=>{var Ae;(Ae=Z.current)==null||Ae.focus({preventScroll:!0})}))}),"data-disabled":de(t),"data-checked":de(A),"data-invalid":de(s)}),[L,t,A,s,Q]),st=E.useCallback((S={},J=null)=>({...S,ref:Vt(Z,J),type:"checkbox",name:m,value:_,id:o,tabIndex:v,onChange:Se(S.onChange,k),onBlur:Se(S.onBlur,F,()=>ne(!1)),onFocus:Se(S.onFocus,X,()=>ne(!0)),onKeyDown:Se(S.onKeyDown,he),onKeyUp:Se(S.onKeyUp,H),required:r,checked:A,disabled:fe,readOnly:i,"aria-label":y,"aria-labelledby":x,"aria-invalid":b?!!b:s,"aria-describedby":c,"aria-disabled":t,style:ka}),[m,_,o,k,F,X,he,H,r,A,fe,i,y,x,b,s,c,t,v]),De=E.useCallback((S={},J=null)=>({...S,ref:J,onMouseDown:Se(S.onMouseDown,Aa),"data-disabled":de(t),"data-checked":de(A),"data-invalid":de(s)}),[A,t,s]);return{state:{isInvalid:s,isFocused:q,isChecked:A,isActive:ce,isHovered:ye,isIndeterminate:p,isDisabled:t,isReadOnly:i,isRequired:r},getRootProps:Ue,getCheckboxProps:Le,getInputProps:st,getLabelProps:De,htmlProps:L}}function Aa(n){n.preventDefault(),n.stopPropagation()}var Oa={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Fa={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Da=Xi({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Na=Xi({from:{opacity:0},to:{opacity:1}}),za=Xi({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Ls=it(function(e,t){const i=Ta(),r={...i,...e},s=Cs("Checkbox",r),o=Rs(e),{spacing:a="0.5rem",className:l,children:c,iconColor:u,iconSize:h,icon:d=C.jsx(Pa,{}),isChecked:f,isDisabled:p=i?.isDisabled,onChange:m,inputProps:_,...v}=o;let y=f;i?.value&&o.value&&(y=i.value.includes(o.value));let x=m;i?.onChange&&o.value&&(x=qo(i.onChange,m));const{state:b,getInputProps:w,getCheckboxProps:L,getLabelProps:M,getRootProps:F}=La({...v,isDisabled:p,isChecked:y,onChange:x}),X=wa(b.isChecked),D=E.useMemo(()=>({animation:X?b.isIndeterminate?`${Na} 20ms linear, ${za} 200ms linear`:`${Da} 200ms linear`:void 0,fontSize:h,color:u,...s.icon}),[u,h,X,b.isIndeterminate,s.icon]),le=E.cloneElement(d,{__css:D,isIndeterminate:b.isIndeterminate,isChecked:b.isChecked});return C.jsxs(_e.label,{__css:{...Fa,...s.container},className:Ts("chakra-checkbox",l),...F(),children:[C.jsx("input",{className:"chakra-checkbox__input",...w(_,t)}),C.jsx(_e.span,{__css:{...Oa,...s.control},className:"chakra-checkbox__control",...L(),children:le}),c&&C.jsx(_e.span,{className:"chakra-checkbox__label",...M(),__css:{marginStart:a,...s.label},children:c})]})});Ls.displayName="Checkbox";var wi=_e("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});wi.displayName="Spacer";var dt=it(function(e,t){const{direction:i,align:r,justify:s,wrap:o,basis:a,grow:l,shrink:c,...u}=e,h={display:"flex",flexDirection:i,alignItems:r,justifyContent:s,flexWrap:o,flexBasis:a,flexGrow:l,flexShrink:c};return C.jsx(_e.div,{ref:t,__css:h,...u})});dt.displayName="Flex";var _t=n=>n?"":void 0,li=n=>n?!0:void 0,tn=(...n)=>n.filter(Boolean).join(" ");function ci(...n){return function(t){n.some(i=>(i?.(t),t?.defaultPrevented))}}function gn(n){const{orientation:e,vertical:t,horizontal:i}=n;return e==="vertical"?t:i}var Tn={width:0,height:0},fn=n=>n||Tn;function ja(n){const{orientation:e,thumbPercents:t,thumbRects:i,isReversed:r}=n,s=m=>{var _;const v=(_=i[m])!=null?_:Tn;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...gn({orientation:e,vertical:{bottom:`calc(${t[m]}% - ${v.height/2}px)`},horizontal:{left:`calc(${t[m]}% - ${v.width/2}px)`}})}},o=e==="vertical"?i.reduce((m,_)=>fn(m).height>fn(_).height?m:_,Tn):i.reduce((m,_)=>fn(m).width>fn(_).width?m:_,Tn),a={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...gn({orientation:e,vertical:o?{paddingLeft:o.width/2,paddingRight:o.width/2}:{},horizontal:o?{paddingTop:o.height/2,paddingBottom:o.height/2}:{}})},l={position:"absolute",...gn({orientation:e,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},c=t.length===1,u=[0,r?100-t[0]:t[0]],h=c?u:t;let d=h[0];!c&&r&&(d=100-d);const f=Math.abs(h[h.length-1]-h[0]),p={...l,...gn({orientation:e,vertical:r?{height:`${f}%`,top:`${d}%`}:{height:`${f}%`,bottom:`${d}%`},horizontal:r?{width:`${f}%`,right:`${d}%`}:{width:`${f}%`,left:`${d}%`}})};return{trackStyle:l,innerTrackStyle:p,rootStyle:a,getThumbStyle:s}}function Ga(n){const{isReversed:e,direction:t,orientation:i}=n;return t==="ltr"||i==="vertical"?e:!e}function Ba(n,e,t,i){return n.addEventListener(e,t,i),()=>{n.removeEventListener(e,t,i)}}function $a(n){const e=Xa(n);return typeof e.PointerEvent<"u"&&n instanceof e.PointerEvent?n.pointerType==="mouse":n instanceof e.MouseEvent}function As(n){return!!n.touches}function Za(n){return As(n)&&n.touches.length>1}function Xa(n){var e;return(e=n.view)!=null?e:window}function Va(n,e="page"){const t=n.touches[0]||n.changedTouches[0];return{x:t[`${e}X`],y:t[`${e}Y`]}}function Wa(n,e="page"){return{x:n[`${e}X`],y:n[`${e}Y`]}}function Os(n,e="page"){return As(n)?Va(n,e):Wa(n,e)}function Ua(n){return e=>{const t=$a(e);(!t||t&&e.button===0)&&n(e)}}function Ka(n,e=!1){function t(r){n(r,{point:Os(r)})}return e?Ua(t):t}function wn(n,e,t,i){return Ba(n,e,Ka(t,e==="pointerdown"),i)}var Ya=Object.defineProperty,Ha=(n,e,t)=>e in n?Ya(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ie=(n,e,t)=>(Ha(n,typeof e!="symbol"?e+"":e,t),t),qa=class{constructor(n,e,t){Ie(this,"history",[]),Ie(this,"startEvent",null),Ie(this,"lastEvent",null),Ie(this,"lastEventInfo",null),Ie(this,"handlers",{}),Ie(this,"removeListeners",()=>{}),Ie(this,"threshold",3),Ie(this,"win"),Ie(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const a=ui(this.lastEventInfo,this.history),l=this.startEvent!==null,c=tl(a.offset,{x:0,y:0})>=this.threshold;if(!l&&!c)return;const{timestamp:u}=Ir();this.history.push({...a.point,timestamp:u});const{onStart:h,onMove:d}=this.handlers;l||(h?.(this.lastEvent,a),this.startEvent=this.lastEvent),d?.(this.lastEvent,a)}),Ie(this,"onPointerMove",(a,l)=>{this.lastEvent=a,this.lastEventInfo=l,ba.update(this.updatePoint,!0)}),Ie(this,"onPointerUp",(a,l)=>{const c=ui(l,this.history),{onEnd:u,onSessionEnd:h}=this.handlers;h?.(a,c),this.end(),!(!u||!this.startEvent)&&u?.(a,c)});var i;if(this.win=(i=n.view)!=null?i:window,Za(n))return;this.handlers=e,t&&(this.threshold=t),n.stopPropagation(),n.preventDefault();const r={point:Os(n)},{timestamp:s}=Ir();this.history=[{...r.point,timestamp:s}];const{onSessionStart:o}=e;o?.(n,ui(r,this.history)),this.removeListeners=el(wn(this.win,"pointermove",this.onPointerMove),wn(this.win,"pointerup",this.onPointerUp),wn(this.win,"pointercancel",this.onPointerUp))}updateHandlers(n){this.handlers=n}end(){var n;(n=this.removeListeners)==null||n.call(this),Ea.update(this.updatePoint)}};function Pr(n,e){return{x:n.x-e.x,y:n.y-e.y}}function ui(n,e){return{point:n.point,delta:Pr(n.point,e[e.length-1]),offset:Pr(n.point,e[0]),velocity:Ja(e,.1)}}var Qa=n=>n*1e3;function Ja(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=n[n.length-1];for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Qa(e)));)t--;if(!i)return{x:0,y:0};const s=(r.timestamp-i.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function el(...n){return e=>n.reduce((t,i)=>i(t),e)}function hi(n,e){return Math.abs(n-e)}function kr(n){return"x"in n&&"y"in n}function tl(n,e){if(typeof n=="number"&&typeof e=="number")return hi(n,e);if(kr(n)&&kr(e)){const t=hi(n.x,e.x),i=hi(n.y,e.y);return Math.sqrt(t**2+i**2)}return 0}function Fs(n){const e=E.useRef(null);return e.current=n,e}function nl(n,e){const{onPan:t,onPanStart:i,onPanEnd:r,onPanSessionStart:s,onPanSessionEnd:o,threshold:a}=e,l=!!(t||i||r||s||o),c=E.useRef(null),u=Fs({onSessionStart:s,onSessionEnd:o,onStart:i,onMove:t,onEnd(h,d){c.current=null,r?.(h,d)}});E.useEffect(()=>{var h;(h=c.current)==null||h.updateHandlers(u.current)}),E.useEffect(()=>{const h=n.current;if(!h||!l)return;function d(f){c.current=new qa(f,u.current,a)}return wn(h,"pointerdown",d)},[n,l,u,a]),E.useEffect(()=>()=>{var h;(h=c.current)==null||h.end(),c.current=null},[])}function il(n,e){if(!n){e(void 0);return}e({width:n.offsetWidth,height:n.offsetHeight});const t=n.ownerDocument.defaultView??window,i=new t.ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const[s]=r;let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=n.offsetWidth,a=n.offsetHeight;e({width:o,height:a})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}var rl=globalThis?.document?E.useLayoutEffect:E.useEffect;function sl(n,e){var t,i;if(!n||!n.parentElement)return;const r=(i=(t=n.ownerDocument)==null?void 0:t.defaultView)!=null?i:window,s=new r.MutationObserver(()=>{e()});return s.observe(n.parentElement,{childList:!0}),()=>{s.disconnect()}}function ol({getNodes:n,observeMutation:e=!0}){const[t,i]=E.useState([]),[r,s]=E.useState(0);return rl(()=>{const o=n(),a=o.map((l,c)=>il(l,u=>{i(h=>[...h.slice(0,c),u,...h.slice(c+1)])}));if(e){const l=o[0];a.push(sl(l,()=>{s(c=>c+1)}))}return()=>{a.forEach(l=>{l?.()})}},[r]),t}function al(n){return typeof n=="object"&&n!==null&&"current"in n}function ll(n){const[e]=ol({observeMutation:!1,getNodes(){return[al(n)?n.current:n]}});return e}function cl(n){var e;const{min:t=0,max:i=100,onChange:r,value:s,defaultValue:o,isReversed:a,direction:l="ltr",orientation:c="horizontal",id:u,isDisabled:h,isReadOnly:d,onChangeStart:f,onChangeEnd:p,step:m=1,getAriaValueText:_,"aria-valuetext":v,"aria-label":y,"aria-labelledby":x,name:b,focusThumbOnChange:w=!0,...L}=n,M=Xe(f),F=Xe(p),X=Xe(_),D=Ga({isReversed:a,direction:l,orientation:c}),[le,q]=Ra({value:s,defaultValue:o??hl(t,i),onChange:r}),[ne,ye]=E.useState(!1),[ie,ce]=E.useState(!1),P=!(h||d),Z=(i-t)/10,Q=m||(i-t)/100,j=ai(le,t,i),we=i-j+t,re=Sr(D?we:j,t,i),A=c==="vertical",k=Fs({min:t,max:i,step:m,isDisabled:h,value:j,isInteractive:P,isReversed:D,isVertical:A,eventSource:null,focusThumbOnChange:w,orientation:c}),fe=E.useRef(null),he=E.useRef(null),H=E.useRef(null),Le=E.useId(),Ue=u??Le,[st,De]=[`slider-thumb-${Ue}`,`slider-track-${Ue}`],ln=E.useCallback(R=>{var I,Gt;if(!fe.current)return;const pe=k.current;pe.eventSource="pointer";const Ne=fe.current.getBoundingClientRect(),{clientX:ri,clientY:Ko}=(Gt=(I=R.touches)==null?void 0:I[0])!=null?Gt:R,Yo=A?Ne.bottom-Ko:ri-Ne.left,Ho=A?Ne.height:Ne.width;let si=Yo/Ho;D&&(si=1-si);let Bt=ma(si,pe.min,pe.max);return pe.step&&(Bt=parseFloat(wr(Bt,pe.min,pe.step))),Bt=ai(Bt,pe.min,pe.max),Bt},[A,D,k]),S=E.useCallback(R=>{const I=k.current;I.isInteractive&&(R=parseFloat(wr(R,I.min,Q)),R=ai(R,I.min,I.max),q(R))},[Q,q,k]),J=E.useMemo(()=>({stepUp(R=Q){const I=D?j-R:j+R;S(I)},stepDown(R=Q){const I=D?j+R:j-R;S(I)},reset(){S(o||0)},stepTo(R){S(R)}}),[S,D,j,Q,o]),se=E.useCallback(R=>{const I=k.current,pe={ArrowRight:()=>J.stepUp(),ArrowUp:()=>J.stepUp(),ArrowLeft:()=>J.stepDown(),ArrowDown:()=>J.stepDown(),PageUp:()=>J.stepUp(Z),PageDown:()=>J.stepDown(Z),Home:()=>S(I.min),End:()=>S(I.max)}[R.key];pe&&(R.preventDefault(),R.stopPropagation(),pe(R),I.eventSource="keyboard")},[J,S,Z,k]),Ae=(e=X?.(j))!=null?e:v,mt=ll(he),{getThumbStyle:cn,rootStyle:zt,trackStyle:un,innerTrackStyle:ve}=E.useMemo(()=>{const R=k.current,I=mt??{width:0,height:0};return ja({isReversed:D,orientation:R.orientation,thumbRects:[I],thumbPercents:[re]})},[D,mt,re,k]),be=E.useCallback(()=>{k.current.focusThumbOnChange&&setTimeout(()=>{var I;return(I=he.current)==null?void 0:I.focus()})},[k]);xs(()=>{const R=k.current;be(),R.eventSource==="keyboard"&&F?.(R.value)},[j,F]);function Ke(R){const I=ln(R);I!=null&&I!==k.current.value&&q(I)}nl(H,{onPanSessionStart(R){const I=k.current;I.isInteractive&&(ye(!0),be(),Ke(R),M?.(I.value))},onPanSessionEnd(){const R=k.current;R.isInteractive&&(ye(!1),F?.(R.value))},onPan(R){k.current.isInteractive&&Ke(R)}});const ot=E.useCallback((R={},I=null)=>({...R,...L,ref:Vt(I,H),tabIndex:-1,"aria-disabled":li(h),"data-focused":_t(ie),style:{...R.style,...zt}}),[L,h,ie,zt]),hn=E.useCallback((R={},I=null)=>({...R,ref:Vt(I,fe),id:De,"data-disabled":_t(h),style:{...R.style,...un}}),[h,De,un]),dn=E.useCallback((R={},I=null)=>({...R,ref:I,style:{...R.style,...ve}}),[ve]),jt=E.useCallback((R={},I=null)=>({...R,ref:Vt(I,he),role:"slider",tabIndex:P?0:void 0,id:st,"data-active":_t(ne),"aria-valuetext":Ae,"aria-valuemin":t,"aria-valuemax":i,"aria-valuenow":j,"aria-orientation":c,"aria-disabled":li(h),"aria-readonly":li(d),"aria-label":y,"aria-labelledby":y?void 0:x,style:{...R.style,...cn(0)},onKeyDown:ci(R.onKeyDown,se),onFocus:ci(R.onFocus,()=>ce(!0)),onBlur:ci(R.onBlur,()=>ce(!1))}),[P,st,ne,Ae,t,i,j,c,h,d,y,x,cn,se]),pt=E.useCallback((R,I=null)=>{const Gt=!(R.valuei),pe=j>=R.value,Ne=Sr(R.value,t,i),ri={position:"absolute",pointerEvents:"none",...ul({orientation:c,vertical:{bottom:D?`${100-Ne}%`:`${Ne}%`},horizontal:{left:D?`${100-Ne}%`:`${Ne}%`}})};return{...R,ref:I,role:"presentation","aria-hidden":!0,"data-disabled":_t(h),"data-invalid":_t(!Gt),"data-highlighted":_t(pe),style:{...R.style,...ri}}},[h,D,i,t,c,j]),ii=E.useCallback((R={},I=null)=>({...R,ref:I,type:"hidden",value:j,name:b}),[b,j]);return{state:{value:j,isFocused:ie,isDragging:ne},actions:J,getRootProps:ot,getTrackProps:hn,getInnerTrackProps:dn,getThumbProps:jt,getMarkerProps:pt,getInputProps:ii}}function ul(n){const{orientation:e,vertical:t,horizontal:i}=n;return e==="vertical"?t:i}function hl(n,e){return e"}),[gl,Zn]=Zi({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),Ds=it((n,e)=>{var t;const i={...n,orientation:(t=n?.orientation)!=null?t:"horizontal"},r=Cs("Slider",i),s=Rs(i),{direction:o}=Qo();s.direction=o;const{getInputProps:a,getRootProps:l,...c}=cl(s),u=l(),h=a({},e);return C.jsx(dl,{value:c,children:C.jsx(gl,{value:r,children:C.jsxs(_e.div,{...u,className:tn("chakra-slider",i.className),__css:r.container,children:[i.children,C.jsx("input",{...h})]})})})});Ds.displayName="Slider";var Ns=it((n,e)=>{const{getThumbProps:t}=$n(),i=Zn(),r=t(n,e);return C.jsx(_e.div,{...r,className:tn("chakra-slider__thumb",n.className),__css:i.thumb})});Ns.displayName="SliderThumb";var zs=it((n,e)=>{const{getTrackProps:t}=$n(),i=Zn(),r=t(n,e);return C.jsx(_e.div,{...r,className:tn("chakra-slider__track",n.className),__css:i.track})});zs.displayName="SliderTrack";var js=it((n,e)=>{const{getInnerTrackProps:t}=$n(),i=Zn(),r=t(n,e);return C.jsx(_e.div,{...r,className:tn("chakra-slider__filled-track",n.className),__css:i.filledTrack})});js.displayName="SliderFilledTrack";var fl=it((n,e)=>{const{getMarkerProps:t}=$n(),i=Zn(),r=t(n,e);return C.jsx(_e.div,{...r,className:tn("chakra-slider__marker",n.className),__css:i.mark})});fl.displayName="SliderMark";class ml{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const rt=ml,Ht={PROPERTYCHANGE:"propertychange"};class pl{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const Wi=pl;function Ui(n,e){return n>e?1:n0){for(r=1;r0?r-1:r:n[r-1]-e0||t&&o===0)})}function Mn(){return!0}function Vn(){return!1}function Ln(){}function vl(n){let e=!1,t,i,r;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==r||!Xn(s,i))&&(e=!0,r=this,i=s,t=n.apply(this,arguments)),t}}function Wn(n){for(const e in n)delete n[e]}function bl(n){let e;for(e in n)return!1;return!e}class El extends Wi{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const i=this.listeners_||(this.listeners_={}),r=i[e]||(i[e]=[]);r.includes(t)||r.push(t)}dispatchEvent(e){const t=typeof e=="string",i=t?e:e.type,r=this.listeners_&&this.listeners_[i];if(!r)return;const s=t?new rt(e):e;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,u=r.length;c0:!1}removeEventListener(e,t){const i=this.listeners_&&this.listeners_[e];if(i){const r=i.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[r]=Ln,++this.pendingRemovals_[e]):(i.splice(r,1),i.length===0&&delete this.listeners_[e]))}}}const Yi=El,O={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function B(n,e,t,i,r){if(i&&i!==n&&(t=t.bind(i)),r){const o=t;t=function(){n.removeEventListener(e,t),o.apply(this,arguments)}}const s={target:n,type:e,listener:t};return n.addEventListener(e,t),s}function An(n,e,t,i){return B(n,e,t,i,!0)}function K(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),Wn(n))}class Un extends Yi{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(O.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const i=e.length,r=new Array(i);for(let s=0;sr.getAttributions(e)))),i=!this.getMap().getAllLayers().some(r=>r.getSource()&&r.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(i),t}updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=this.collectSourceAttributions_(e),i=t.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Xn(t,this.renderedAttributions_)){Pl(this.ulElement_);for(let r=0,s=t.length;r1?t:2,e===void 0&&(t>2?e=n.slice():e=new Array(i));for(let r=0;rpn?s=pn:s<-pn&&(s=-pn),e[r+1]=s}return e}function Nl(n,e,t){const i=n.length;t=t>1?t:2,e===void 0&&(t>2?e=n.slice():e=new Array(i));for(let r=0;rr&&(l=l|ae.RIGHT),as&&(l=l|ae.ABOVE),l===ae.UNKNOWN&&(l=ae.INTERSECTING),l}function gt(){return[1/0,1/0,-1/0,-1/0]}function Dt(n,e,t,i,r){return r?(r[0]=n,r[1]=e,r[2]=t,r[3]=i,r):[n,e,t,i]}function Yn(n){return Dt(1/0,1/0,-1/0,-1/0,n)}function Ul(n,e){const t=n[0],i=n[1];return Dt(t,i,t,i,e)}function Kl(n,e,t,i,r){const s=Yn(r);return Hs(s,n,e,t,i)}function ki(n,e){return n[0]==e[0]&&n[2]==e[2]&&n[1]==e[1]&&n[3]==e[3]}function Yl(n,e){return e[0]n[2]&&(n[2]=e[2]),e[1]n[3]&&(n[3]=e[3]),n}function Sn(n,e){e[0]n[2]&&(n[2]=e[0]),e[1]n[3]&&(n[3]=e[1])}function Hs(n,e,t,i,r){for(;te[0]?i[0]=n[0]:i[0]=e[0],n[1]>e[1]?i[1]=n[1]:i[1]=e[1],n[2]=e[0]&&n[1]<=e[3]&&n[3]>=e[1]}function Ji(n){return n[2]=o&&m<=l),!i&&s&ae.RIGHT&&!(r&ae.RIGHT)&&(_=f-(d-l)*p,i=_>=a&&_<=c),!i&&s&ae.BELOW&&!(r&ae.BELOW)&&(m=d-(f-a)/p,i=m>=o&&m<=l),!i&&s&ae.LEFT&&!(r&ae.LEFT)&&(_=f-(d-o)*p,i=_>=a&&_<=c)}return i}function te(n,e,t){return Math.min(Math.max(n,e),t)}function ec(n,e,t,i,r,s){const o=r-t,a=s-i;if(o!==0||a!==0){const l=((n-t)*o+(e-i)*a)/(o*o+a*a);l>1?(t=r,i=s):l>0&&(t+=o*l,i+=a*l)}return kt(n,e,t,i)}function kt(n,e,t,i){const r=t-n,s=i-e;return r*r+s*s}function tc(n){const e=n.length;for(let i=0;is&&(s=l,r=a)}if(s===0)return null;const o=n[r];n[r]=n[i],n[i]=o;for(let a=i+1;a=0;i--){t[i]=n[i][e]/n[i][i];for(let r=i-1;r>=0;r--)n[r][e]-=n[r][i]*t[i]}return t}function In(n){return n*Math.PI/180}function Mt(n,e){const t=n%e;return t*e<0?t+e:t}function nc(n,e,t){return n+t*(e-n)}function Qs(n,e){const t=Math.pow(10,e);return Math.round(n*t)/t}function _n(n,e){return Math.floor(Qs(n,e))}function yn(n,e){return Math.ceil(Qs(n,e))}function ic(n,e){return n[0]+=+e[0],n[1]+=+e[1],n}function Fn(n,e){let t=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=e[i]){t=!1;break}return t}function er(n,e){const t=Math.cos(e),i=Math.sin(e),r=n[0]*t-n[1]*i,s=n[1]*t+n[0]*i;return n[0]=r,n[1]=s,n}function rc(n,e){return n[0]*=e,n[1]*=e,n}function sc(n,e){if(e.canWrapX()){const t=ee(e.getExtent()),i=oc(n,e,t);i&&(n[0]-=i*t)}return n}function oc(n,e,t){const i=e.getExtent();let r=0;return e.canWrapX()&&(n[0]i[2])&&(t=t||ee(i),r=Math.floor((n[0]-i[0])/t)),r}const ac=63710088e-1;function jr(n,e,t){t=t||ac;const i=In(n[1]),r=In(e[1]),s=(r-i)/2,o=In(e[0]-n[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(r);return 2*t*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const Js={info:1,warn:2,error:3,none:4};let lc=Js.info;function eo(...n){lc>Js.warn||console.warn(...n)}let Oi=!0;function cc(n){Oi=!(n===void 0?!0:n)}function tr(n,e){if(e!==void 0){for(let t=0,i=n.length;t=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Oi=!1,eo("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function fc(n,e){return n}function St(n,e){return n}function mc(){Gr(Or),Gr(Dr),dc(Dr,Or,Dl,Nl)}mc();const Te={ADD:"add",REMOVE:"remove"},Br={LENGTH:"length"};class vn extends rt{constructor(e,t,i){super(e),this.element=t,this.index=i}}class pc extends We{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e||[],this.unique_)for(let i=0,r=this.array_.length;i0;)this.pop()}extend(e){for(let t=0,i=e.length;tthis.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new vn(Te.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let i=0,r=t.length;i=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new vn(Te.REMOVE,t,e)),t}setAt(e,t){const i=this.getLength();if(e>=i){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const r=this.array_[e];this.array_[e]=t,this.dispatchEvent(new vn(Te.REMOVE,r,e)),this.dispatchEvent(new vn(Te.ADD,t,e))}updateLength_(){this.set(Br.LENGTH,this.array_.length)}assertUnique_(e,t){for(let i=0,r=this.array_.length;i=1024){let s=0;for(const o in e)s++&3||(delete e[o],--t)}r=Rc(i),e[i]=r,++t}return r}}();function Zr(n){return Array.isArray(n)?n:Cc(n)}function Rc(n){let e,t,i,r,s;if(bc.exec(n)&&(n=xc(n)),vc.exec(n)){const o=n.length-1;let a;o<=4?a=1:a=2;const l=o===4||o===8;e=parseInt(n.substr(1+0*a,a),16),t=parseInt(n.substr(1+1*a,a),16),i=parseInt(n.substr(1+2*a,a),16),l?r=parseInt(n.substr(1+3*a,a),16):r=255,a==1&&(e=(e<<4)+e,t=(t<<4)+t,i=(i<<4)+i,l&&(r=(r<<4)+r)),s=[e,t,i,r/255]}else n.startsWith("rgba(")?(s=n.slice(5,-1).split(",").map(Number),Xr(s)):n.startsWith("rgb(")?(s=n.slice(4,-1).split(",").map(Number),s.push(1),Xr(s)):$(!1,14);return s}function Xr(n){return n[0]=te(n[0]+.5|0,0,255),n[1]=te(n[1]+.5|0,0,255),n[2]=te(n[2]+.5|0,0,255),n[3]=te(n[3],0,1),n}function Tc(n){let e=n[0];e!=(e|0)&&(e=e+.5|0);let t=n[1];t!=(t|0)&&(t=t+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const r=n[3]===void 0?1:Math.round(n[3]*100)/100;return"rgba("+e+","+t+","+i+","+r+")"}class wc{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const i=this.cache_[t];!(e++&3)&&!i.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}}get(e,t,i){const r=Vr(e,t,i);return r in this.cache_?this.cache_[r]:null}set(e,t,i,r){const s=Vr(e,t,i);this.cache_[s]=r,++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function Vr(n,e,t){const i=t?Ec(t):"null";return e+":"+n+":"+i}const io=new wc,G={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class Sc extends We{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[G.OPACITY]=e.opacity!==void 0?e.opacity:1,$(typeof t[G.OPACITY]=="number",64),t[G.VISIBLE]=e.visible!==void 0?e.visible:!0,t[G.Z_INDEX]=e.zIndex,t[G.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[G.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[G.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[G.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return t.opacity=te(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=i===void 0&&!t.managed?1/0:i,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return U()}getLayerStatesArray(e){return U()}getExtent(){return this.get(G.EXTENT)}getMaxResolution(){return this.get(G.MAX_RESOLUTION)}getMinResolution(){return this.get(G.MIN_RESOLUTION)}getMinZoom(){return this.get(G.MIN_ZOOM)}getMaxZoom(){return this.get(G.MAX_ZOOM)}getOpacity(){return this.get(G.OPACITY)}getSourceState(){return U()}getVisible(){return this.get(G.VISIBLE)}getZIndex(){return this.get(G.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(G.EXTENT,e)}setMaxResolution(e){this.set(G.MAX_RESOLUTION,e)}setMinResolution(e){this.set(G.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(G.MAX_ZOOM,e)}setMinZoom(e){this.set(G.MIN_ZOOM,e)}setOpacity(e){$(typeof e=="number",64),this.set(G.OPACITY,e)}setVisible(e){this.set(G.VISIBLE,e)}setZIndex(e){this.set(G.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const ro=Sc,et={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Re={ANIMATING:0,INTERACTING:1},Pe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ic=42,rr=256;function Wr(n,e,t){return function(i,r,s,o,a){if(!i)return;if(!r&&!e)return i;const l=e?0:s[0]*r,c=e?0:s[1]*r,u=a?a[0]:0,h=a?a[1]:0;let d=n[0]+l/2+u,f=n[2]-l/2+u,p=n[1]+c/2+h,m=n[3]-c/2+h;d>f&&(d=(f+d)/2,f=d),p>m&&(p=(m+p)/2,m=p);let _=te(i[0],d,f),v=te(i[1],p,m);if(o&&t&&r){const y=30*r;_+=-y*Math.log(1+Math.max(0,d-i[0])/y)+y*Math.log(1+Math.max(0,i[0]-f)/y),v+=-y*Math.log(1+Math.max(0,p-i[1])/y)+y*Math.log(1+Math.max(0,i[1]-m)/y)}return[_,v]}}function Pc(n){return n}function sr(n,e,t,i){const r=ee(e)/t[0],s=Fe(e)/t[1];return i?Math.min(n,Math.max(r,s)):Math.min(n,Math.min(r,s))}function or(n,e,t){let i=Math.min(n,e);const r=50;return i*=Math.log(1+r*Math.max(0,n/e-1))/r+1,t&&(i=Math.max(i,t),i/=Math.log(1+r*Math.max(0,t/n-1))/r+1),te(i,t/2,e*2)}function kc(n,e,t,i){return e=e!==void 0?e:!0,function(r,s,o,a){if(r!==void 0){const l=n[0],c=n[n.length-1],u=t?sr(l,t,o,i):l;if(a)return e?or(r,u,c):te(r,c,u);const h=Math.min(u,r),d=Math.floor(Ki(n,h,s));return n[d]>u&&d1)h=t;else if(d>0){for(let f=0;fr&&(r=c),s=a,o=l}return r}function Xc(n,e,t,i,r){for(let s=0,o=t.length;s0;){const h=c.pop(),d=c.pop();let f=0;const p=n[d],m=n[d+1],_=n[h],v=n[h+1];for(let y=d+i;yf&&(u=y,f=w)}f>r&&(l[(u-e)/i]=1,d+i0&&m>f)&&(p<0&&_0&&_>p)){c=h,u=d;continue}s[o++]=c,s[o++]=u,a=c,l=u,c=h,u=d}return s[o++]=c,s[o++]=u,o}function Hc(n,e,t,i,r,s,o,a){for(let l=0,c=t.length;ls&&(c-a)*(s-l)-(r-a)*(u-l)>0&&o++:u<=s&&(c-a)*(s-l)-(r-a)*(u-l)<0&&o--,a=c,l=u}return o!==0}function ho(n,e,t,i,r,s){if(t.length===0||!ut(n,e,t[0],i,r,s))return!1;for(let o=1,a=t.length;ov&&(c=(u+h)/2,ho(n,e,t,i,c,p)&&(_=c,v=y)),u=h}return isNaN(_)&&(_=r[s]),o?(o.push(_,p,v),o):[_,p,v]}function nu(n,e,t,i,r){let s;for(e+=i;e=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:nu(n,e,t,i,function(o,a){return Jl(r,o,a)}):!1}function fo(n,e,t,i,r){return!!(go(n,e,t,i,r)||ut(n,e,t,i,r[0],r[1])||ut(n,e,t,i,r[0],r[3])||ut(n,e,t,i,r[2],r[1])||ut(n,e,t,i,r[2],r[3]))}function iu(n,e,t,i,r){if(!fo(n,e,t[0],i,r))return!1;if(t.length===1)return!0;for(let s=1,o=t.length;s0}function su(n,e,t,i,r){r=r!==void 0?r:!1;for(let s=0,o=t.length;s1&&typeof arguments[t-1]=="function"&&(i=arguments[t-1],--t);let r=0;for(;r0}getInteracting(){return this.hints_[Re.INTERACTING]>0}cancelAnimations(){this.setHint(Re.ANIMATING,-this.hints_[Re.ANIMATING]);let e;for(let t=0,i=this.animations_.length;t=0;--i){const r=this.animations_[i];let s=!0;for(let o=0,a=r.length;o0?c/l.duration:1;u>=1?(l.complete=!0,u=1):s=!1;const h=l.easing(u);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],p=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const _=d+h*(p-d),v=f+h*(m-f);this.targetCenter_=[_,v]}if(l.sourceResolution&&l.targetResolution){const d=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=h===1?Mt(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),t=!0,!l.complete)break}if(s){this.animations_[i]=null,this.setHint(Re.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=r[0].callback;o&&bn(o,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let i;const r=this.getCenterInternal();return r!==void 0&&(i=[r[0]-t[0],r[1]-t[1]],er(i,e-this.getRotation()),ic(i,t)),i}calculateCenterZoom(e,t){let i;const r=this.getCenterInternal(),s=this.getResolution();if(r!==void 0&&s!==void 0){const o=t[0]-e*(t[0]-r[0])/s,a=t[1]-e*(t[1]-r[1])/s;i=[o,a]}return i}getViewportSize_(e){const t=this.viewportSize_;if(e){const i=t[0],r=t[1];return[Math.abs(i*Math.cos(e))+Math.abs(r*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(r*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&Fi(e,this.getProjection())}getCenterInternal(){return this.get(Pe.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const t=this.calculateExtentInternal(e);return fc(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();$(t,1);const i=this.getResolution();$(i!==void 0,2);const r=this.getRotation();return $(r!==void 0,3),Li(t,i,r,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(Pe.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(St(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const i=ee(e)/t[0],r=Fe(e)/t[1];return Math.max(i,r)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(t/i)/Math.log(e);return function(s){return t/Math.pow(e,s*r)}}getRotation(){return this.get(Pe.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,s=Math.log(i/r)/t;return function(o){return Math.log(i/o)/t/s}}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const i=this.padding_;return i&&(t=[t[0]-i[1]-i[3],t[1]-i[0]-i[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),i=this.getRotation();let r=this.getCenterInternal();const s=this.padding_;if(s){const o=this.getViewportSizeMinusPadding_();r=gi(r,this.getViewportSize_(),[o[0]/2+s[3],o[1]/2+s[0]],t,i)}return{center:r.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,i,r;if(this.resolutions_){const s=Ki(this.resolutions_,e,1);t=s,i=this.resolutions_[s],s==this.resolutions_.length-1?r=2:r=i/this.resolutions_[s+1]}else i=this.maxResolution_,r=this.zoomFactor_;return t+Math.log(i/e)/Math.log(r)}getResolutionForZoom(e){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const t=te(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[t]/this.resolutions_[t+1];return this.resolutions_[t]/Math.pow(i,te(e-t,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let i;if($(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function",24),Array.isArray(e)){$(!Ji(e),25);const r=St(e,this.getProjection());i=es(r)}else if(e.getType()==="Circle"){const r=St(e.getExtent(),this.getProjection());i=es(r),i.rotate(this.getRotation(),qt(r))}else i=e;this.fitInternal(i,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),i=Math.cos(t),r=Math.sin(-t),s=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let h=0,d=s.length;h{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t;e instanceof ke?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e;const i=this.getExtent();return this.getVisible()&&ur(this.getLayerState(),t.viewState)&&(!i||sn(i,t.extent))}getAttributions(e){if(!this.isVisible(e))return[];let t;const i=this.getSource();if(i&&(t=i.getAttributions()),!t)return[];const r=e instanceof ke?e.getViewStateAndExtent():e;let s=t(r);return Array.isArray(s)||(s=[s]),s}render(e,t){const i=this.getRenderer();if(i.prepareFrame(e))return this.rendered=!0,i.renderFrame(e,t)}unrender(){this.rendered=!1}setMapInternal(e){e||this.unrender(),this.set(G.MAP,e)}getMapInternal(){return this.get(G.MAP)}setMap(e){this.mapPrecomposeKey_&&(K(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(K(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=B(e,et.PRECOMPOSE,function(t){const r=t.frameState.layerStatesArray,s=this.getLayerState(!1);$(!r.some(function(o){return o.layer===s.layer}),67),r.push(s)},this),this.mapRenderKey_=B(this,O.CHANGE,e.render,e),this.changed())}setSource(e){this.set(G.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function ur(n,e){if(!n.visible)return!1;const t=e.resolution;if(t=n.maxResolution)return!1;const i=e.zoom;return i>n.minZoom&&i<=n.maxZoom}const hr=hu;class du extends Wi{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){U()}calculateMatrices2D(e){const t=e.viewState,i=e.coordinateToPixelTransform,r=e.pixelToCoordinateTransform;Qt(i,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),no(r,i)}forEachFeatureAtCoordinate(e,t,i,r,s,o,a,l){let c;const u=t.viewState;function h(b,w,L,M){return s.call(o,w,b?L:null,M)}const d=u.projection,f=sc(e.slice(),d),p=[[0,0]];if(d.canWrapX()&&r){const b=d.getExtent(),w=ee(b);p.push([-w,0],[w,0])}const m=t.layerStatesArray,_=m.length,v=[],y=[];for(let b=0;b=0;--w){const L=m[w],M=L.layer;if(M.hasRenderer()&&ur(L,u)&&a.call(l,M)){const F=M.getRenderer(),X=M.getSource();if(F&&X){const D=X.getWrapX()?f:e,le=h.bind(null,L.managed);y[0]=D[0]+p[b][0],y[1]=D[1]+p[b][1],c=F.forEachFeatureAtCoordinate(y,t,i,le,v)}if(c)return c}}if(v.length===0)return;const x=1/v.length;return v.forEach((b,w)=>b.distanceSq+=w*x),v.sort((b,w)=>b.distanceSq-w.distanceSq),v.some(b=>c=b.callback(b.feature,b.layer,b.geometry)),c}hasFeatureAtCoordinate(e,t,i,r,s,o){return this.forEachFeatureAtCoordinate(e,t,i,r,Mn,this,s,o)!==void 0}getMap(){return this.map_}renderFrame(e){U()}scheduleExpireIconCache(e){io.canExpireCache()&&e.postRenderFunctions.push(gu)}}function gu(n,e){io.expire()}const fu=du;class mu extends rt{constructor(e,t,i,r){super(e),this.inversePixelTransform=t,this.frameState=i,this.context=r}}const po=mu,pu=new We;class _u extends fu{constructor(e){super(e),this.fontChangeListenerKey_=B(pu,Ht.PROPERTYCHANGE,e.redrawText.bind(e)),this.element_=document.createElement("div");const t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=nn+" ol-layers";const i=e.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,t){const i=this.getMap();if(i.hasListener(e)){const r=new po(e,void 0,t);i.dispatchEvent(r)}}disposeInternal(){K(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(et.PRECOMPOSE,e);const t=e.layerStatesArray.sort(function(o,a){return o.zIndex-a.zIndex}),i=e.viewState;this.children_.length=0;const r=[];let s=null;for(let o=0,a=t.length;o=0;--o)r[o].renderDeclutter(e);kl(this.element_,this.children_),this.dispatchRenderEvent(et.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}}const yu=_u;class Je extends rt{constructor(e,t){super(e),this.layer=t}}const fi={LAYERS:"layers"};class dr extends ro{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let i=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(fi.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new Ze(i.slice(),{unique:!0}):$(typeof i.getArray=="function",43):i=new Ze(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(K),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(B(e,Te.ADD,this.handleLayersAdd_,this),B(e,Te.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(K);Wn(this.listenerKeys_);const t=e.getArray();for(let i=0,r=t.length;i{this.clickTimeoutId_=void 0;const i=new Qe(W.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const t=e,i=t.pointerId;if(t.type==W.POINTERUP||t.type==W.POINTERCANCEL){delete this.trackedTouches_[i];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==t.target){delete this.trackedTouches_[r];break}}else(t.type==W.POINTERDOWN||t.type==W.POINTERMOVE)&&(this.trackedTouches_[i]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new Qe(W.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(K),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const t=new Qe(W.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(B(i,W.POINTERMOVE,this.handlePointerMove_,this),B(i,W.POINTERUP,this.handlePointerUp_,this),B(this.element_,W.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(B(this.element_.getRootNode(),W.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new Qe(W.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new Qe(W.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(K(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(O.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(K(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(K),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const xu=Eu,jn=1/0;class Cu{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Wn(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,i=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const r=this.keyFunction_(i);return delete this.queuedElements_[r],i}enqueue(e){$(!(this.keyFunction_(e)in this.queuedElements_),31);const t=this.priorityFunction_(e);return t!=jn?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,i=this.priorities_,r=t.length,s=t[e],o=i[e],a=e;for(;e>1;){const l=this.getLeftChildIndex_(e),c=this.getRightChildIndex_(e),u=ce;){const a=this.getParentIndex_(t);if(r[a]>o)i[t]=i[a],r[t]=r[a],t=a;else break}i[t]=s,r[t]=o}reprioritize(){const e=this.priorityFunction_,t=this.elements_,i=this.priorities_;let r=0;const s=t.length;let o,a,l;for(a=0;a0;)s=this.dequeue()[0],o=s.getKey(),r=s.getState(),r===T.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++i,s.load())}}const wu=Tu;function Su(n,e,t,i,r){if(!n||!(t in n.wantedTiles)||!n.wantedTiles[t][e.getKey()])return jn;const s=n.viewState.center,o=i[0]-s[0],a=i[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}class Iu extends Kn{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const t=e.className!==void 0?e.className:"ol-rotate",i=e.label!==void 0?e.label:"⇧",r=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof i=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(r));const s=e.tipLabel?e.tipLabel:"Reset rotation",o=document.createElement("button");o.className=t+"-reset",o.setAttribute("type","button"),o.title=s,o.appendChild(this.label_),o.addEventListener(O.CLICK,this.handleClick_.bind(this),!1);const a=t+" "+nn+" "+qi,l=this.element;l.className=a,l.appendChild(o),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(mn)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const i=t.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:Nt}):t.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const i=t.viewState.rotation;if(i!=this.rotation_){const r="rotate("+i+"rad)";if(this.autoHide_){const s=this.element.classList.contains(mn);!s&&i===0?this.element.classList.add(mn):s&&i!==0&&this.element.classList.remove(mn)}this.label_.style.transform=r}this.rotation_=i}}const Pu=Iu;class ku extends Kn{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=e.className!==void 0?e.className:"ol-zoom",i=e.delta!==void 0?e.delta:1,r=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",s=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",c=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(O.CLICK,this.handleClick_.bind(this,i),!1);const h=document.createElement("button");h.className=s,h.setAttribute("type","button"),h.title=c,h.appendChild(typeof a=="string"?document.createTextNode(a):a),h.addEventListener(O.CLICK,this.handleClick_.bind(this,-i),!1);const d=t+" "+nn+" "+qi,f=this.element;f.className=d,f.appendChild(u),f.appendChild(h),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const i=this.getMap().getView();if(!i)return;const r=i.getZoom();if(r!==void 0){const s=i.getConstrainedZoom(r+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:s,duration:this.duration_,easing:Nt})):i.setZoom(s)}}}const Mu=ku;function Lu(n){n=n||{};const e=new Ze;return(n.zoom!==void 0?n.zoom:!0)&&e.push(new Mu(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&e.push(new Pu(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&e.push(new Vs(n.attributionOptions)),e}const ts={ACTIVE:"active"};class Au extends We{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(ts.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(ts.ACTIVE,e)}setMap(e){this.map_=e}}function Ou(n,e,t){const i=n.getCenterInternal();if(i){const r=[i[0]+e[0],i[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:Fc,center:n.getConstrainedCenter(r)})}}function gr(n,e,t,i){const r=n.getZoom();if(r===void 0)return;const s=n.getConstrainedZoom(r+e),o=n.getResolutionForZoom(s);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:o,anchor:t,duration:i!==void 0?i:250,easing:Nt})}const on=Au;class Fu extends on{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==W.DBLCLICK){const i=e.originalEvent,r=e.map,s=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=r.getView();gr(a,o,s,this.duration_),i.preventDefault(),t=!0}return!t}}const Du=Fu;class Nu extends on{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==W.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==W.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==W.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,t=this.stopDown(i)}else e.type==W.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function fr(n){const e=n.length;let t=0,i=0;for(let r=0;r0&&this.condition_(e)){const i=e.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const Xu=Zu;class Vu extends an{constructor(e){e=e||{},super({stopDown:Vn}),this.condition_=e.condition?e.condition:zu,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!mi(e))return;const t=e.map,i=t.getView();if(i.getConstraints().rotation===ar)return;const r=t.getSize(),s=e.pixel,o=Math.atan2(r[1]/2-s[1],s[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return mi(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return mi(e)&&yo(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const Wu=Vu;class Uu extends Wi{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,i="px",r=this.element_.style;r.left=Math.min(e[0],t[0])+i,r.top=Math.min(e[1],t[1])+i,r.width=Math.abs(t[0]-e[0])+i,r.height=Math.abs(t[1]-e[1])+i}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const e=this.startPixel_,t=this.endPixel_,r=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Jt([r])}getGeometry(){return this.geometry_}}const Ku=Uu,En={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class pi extends rt{constructor(e,t,i){super(e),this.coordinate=t,this.mapBrowserEvent=i}}class Yu extends an{constructor(e){super(),this.on,this.once,this.un,e=e||{},this.box_=new Ku(e.className||"ol-dragbox"),this.minArea_=e.minArea!==void 0?e.minArea:64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition?e.condition:yo,this.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,i){const r=i[0]-t[0],s=i[1]-t[1];return r*r+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new pi(En.BOXDRAG,e.coordinate,e))}handleUpEvent(e){this.box_.setMap(null);const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new pi(t?En.BOXEND:En.BOXCANCEL,e.coordinate,e)),!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new pi(En.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}}const Hu=Yu;class qu extends Hu{constructor(e){e=e||{};const t=e.condition?e.condition:Bu;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const i=this.getMap().getView();let r=this.getGeometry();if(this.out_){const s=i.rotatedExtentForGeometry(r),o=i.getResolutionForExtentInternal(s),a=i.getResolution()/o;r=r.clone(),r.scale(a*a)}i.fitInternal(r,{duration:this.duration_,easing:Nt})}}const Qu=qu,lt={LEFT:37,UP:38,RIGHT:39,DOWN:40};class Ju extends on{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return vo(t)&&bo(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==O.KEYDOWN){const i=e.originalEvent,r=i.keyCode;if(this.condition_(e)&&(r==lt.DOWN||r==lt.LEFT||r==lt.RIGHT||r==lt.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;r==lt.DOWN?c=-a:r==lt.LEFT?l=-a:r==lt.RIGHT?l=a:c=a;const u=[l,c];er(u,o.getRotation()),Ou(o,u,this.duration_),i.preventDefault(),t=!0}}return!t}}const eh=Ju;class th extends on{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:bo,this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==O.KEYDOWN||e.type==O.KEYPRESS){const i=e.originalEvent,r=i.key;if(this.condition_(e)&&(r==="+"||r==="-")){const s=e.map,o=r==="+"?this.delta_:-this.delta_,a=s.getView();gr(a,o,void 0,this.duration_),i.preventDefault(),t=!0}}return!t}}const nh=th;class ih{constructor(e,t,i){this.decay_=e,this.minVelocity_=t,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]0&&this.points_[i+2]>e;)i-=3;const r=this.points_[t+2]-this.points_[i+2];if(r<1e3/60)return!1;const s=this.points_[t]-this.points_[i],o=this.points_[t+1]-this.points_[i+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const rh=ih;class sh extends on{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const t=e.condition?e.condition:Gu;this.condition_=e.onFocusOnly?Di(_o,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(e){if(!this.condition_(e)||e.type!==O.WHEEL)return!0;const i=e.map,r=e.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.coordinate);let s;if(e.type==O.WHEEL&&(s=r.deltaY,Rl&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=$s),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();let i=-te(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),gr(t,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}const oh=sh;class ah extends an{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=Vn),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0;const i=this.targetPointers[0],r=this.targetPointers[1],s=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(this.lastAngle_!==void 0){const l=s-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=l}this.lastAngle_=s;const o=e.map,a=o.getView();a.getConstraints().rotation!==ar&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(fr(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}const lh=ah;class ch extends an{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=Vn),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const i=this.targetPointers[0],r=this.targetPointers[1],s=i.clientX-r.clientX,o=i.clientY-r.clientY,a=Math.sqrt(s*s+o*o);this.lastDistance_!==void 0&&(t=this.lastDistance_/a),this.lastDistance_=a;const l=e.map,c=l.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(fr(this.targetPointers))),l.render(),c.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const i=e.map.getView(),r=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,r),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}const uh=ch;function hh(n){n=n||{};const e=new Ze,t=new rh(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&e.push(new Wu),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&e.push(new Du({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&e.push(new Xu({onFocusOnly:n.onFocusOnly,kinetic:t})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&e.push(new lh),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&e.push(new uh({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(e.push(new eh),e.push(new nh({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&e.push(new oh({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&e.push(new Qu({duration:n.zoomDuration})),e}function ns(n){return n[0]>0&&n[1]>0}function dh(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function Be(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}function Eo(n){if(n instanceof hr){n.setMapInternal(null);return}n instanceof Jn&&n.getLayers().forEach(Eo)}function xo(n,e){if(n instanceof hr){n.setMapInternal(e);return}if(n instanceof Jn){const t=n.getLayers().getArray();for(let i=0,r=t.length;ithis.updateSize()),this.controls=t.controls||Lu(),this.interactions=t.interactions||hh({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new wu(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(ue.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(ue.VIEW,this.handleViewChanged_),this.addChangeListener(ue.SIZE,this.handleSizeChanged_),this.addChangeListener(ue.TARGET,this.handleTargetChanged_),this.setProperties(t.values);const i=this;e.view&&!(e.view instanceof ke)&&e.view.then(function(r){i.setView(new ke(r))}),this.controls.addEventListener(Te.ADD,r=>{r.element.setMap(this)}),this.controls.addEventListener(Te.REMOVE,r=>{r.element.setMap(null)}),this.interactions.addEventListener(Te.ADD,r=>{r.element.setMap(this)}),this.interactions.addEventListener(Te.REMOVE,r=>{r.element.setMap(null)}),this.overlays_.addEventListener(Te.ADD,r=>{this.addOverlayInternal_(r.element)}),this.overlays_.addEventListener(Te.REMOVE,r=>{const s=r.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],r.element.setMap(null)}),this.controls.forEach(r=>{r.setMap(this)}),this.interactions.forEach(r=>{r.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){xo(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,i){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};const s=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:Mn,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,s,a,t,null,o,null)}getFeaturesAtPixel(e,t){const i=[];return this.forEachFeatureAtPixel(e,function(r){i.push(r)},t),i}getAllLayers(){const e=[];function t(i){i.forEach(function(r){r instanceof Jn?t(r.getLayers()):e.push(r)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};const r=t.layerFilter!==void 0?t.layerFilter:Mn,s=t.hitTolerance!==void 0?t.hitTolerance:0,o=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,o,r,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const i=this.viewport_.getBoundingClientRect(),r=this.getSize(),s=i.width/r[0],o=i.height/r[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-i.left)/s,(a.clientY-i.top)/o]}getTarget(){return this.get(ue.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return Fi(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?Ce(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(ue.LAYERGROUP)}setLayers(e){const t=this.getLayerGroup();if(e instanceof Ze){t.setLayers(e);return}const i=t.getLayers();i.clear(),i.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,i=e.length;t=0;s--){const o=r[s];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let r=this.maxTilesLoading_,s=r;if(e){const o=e.viewHints;if(o[Re.ANIMATING]||o[Re.INTERACTING]){const a=Date.now()-e.time>8;r=a?0:8,s=a?0:2}}t.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new Je("removelayer",t)),this.set(ue.LAYERGROUP,e)}setSize(e){this.set(ue.SIZE,e)}setTarget(e){this.set(ue.TARGET,e)}setView(e){if(!e||e instanceof ke){this.set(ue.VIEW,e);return}this.set(ue.VIEW,new ke);const t=this;e.then(function(i){t.setView(new ke(i))})}updateSize(){const e=this.getTargetElement();let t;if(e){const r=getComputedStyle(e),s=e.offsetWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-parseFloat(r.borderRightWidth),o=e.offsetHeight-parseFloat(r.borderTopWidth)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)-parseFloat(r.borderBottomWidth);!isNaN(s)&&!isNaN(o)&&(t=[s,o],!ns(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&eo("No map visible because the map container's width or height are 0."))}const i=this.getSize();t&&(!i||!Xn(t,i))&&(this.setSize(t),this.updateViewportSize_())}updateViewportSize_(){const e=this.getView();if(e){let t;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(t=[parseInt(i.width,10),parseInt(i.height,10)]),e.setViewportSize(t)}}};function fh(n){let e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const t={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new Jn({layers:n.layers});t[ue.LAYERGROUP]=i,t[ue.TARGET]=n.target,t[ue.VIEW]=n.view instanceof ke?n.view:new ke;let r;n.controls!==void 0&&(Array.isArray(n.controls)?r=new Ze(n.controls.slice()):($(typeof n.controls.getArray=="function",47),r=n.controls));let s;n.interactions!==void 0&&(Array.isArray(n.interactions)?s=new Ze(n.interactions.slice()):($(typeof n.interactions.getArray=="function",48),s=n.interactions));let o;return n.overlays!==void 0?Array.isArray(n.overlays)?o=new Ze(n.overlays.slice()):($(typeof n.overlays.getArray=="function",49),o=n.overlays):o=new Ze,{controls:r,interactions:s,keyboardEventTarget:e,overlays:o,values:t}}const mh=gh,_i="units",ph=[1,2,5],$t=25.4/.28;class _h extends Kn{constructor(e){e=e||{};const t=document.createElement("div");t.style.pointerEvents="none",super({element:t,render:e.render,target:e.target}),this.on,this.once,this.un;const i=e.className!==void 0?e.className:e.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+nn,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=e.minWidth!==void 0?e.minWidth:64,this.maxWidth_=e.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(_i,this.handleUnitsChanged_),this.setUnits(e.units||"metric"),this.scaleBar_=e.bar||!1,this.scaleBarSteps_=e.steps||4,this.scaleBarText_=e.text||!1,this.dpi_=e.dpi||void 0}getUnits(){return this.get(_i)}handleUnitsChanged_(){this.updateElement_()}setUnits(e){this.set(_i,e)}setDpi(e){this.dpi_=e}updateElement_(){const e=this.viewState_;if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=e.center,i=e.projection,r=this.getUnits(),s=r=="degrees"?"degrees":"m";let o=Dn(i,e.resolution,t,s);const a=this.minWidth_*(this.dpi_||$t)/$t,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||$t)/$t:void 0;let c=a*o,u="";if(r=="degrees"){const x=Ft.degrees;c*=x,c=l){d=m,f=_,p=v;break}else if(f>=a)break;m=d,_=f,v=p,++h}const y=this.scaleBar_?this.createScaleBar(f,d,u):d.toFixed(p<0?-p:0)+" "+u;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,t,i){const r=this.getScaleForResolution(),s=r<1?Math.round(1/r).toLocaleString()+" : 1":"1 : "+Math.round(r).toLocaleString(),o=this.scaleBarSteps_,a=e/o,l=[this.createMarker("absolute")];for(let u=0;u
`+this.createMarker("relative")+(u%2===0||o===2?this.createStepText(u,e,!1,t,i):"")+"")}return l.push(this.createStepText(o,e,!0,t,i)),(this.scaleBarText_?`
`+s+"
":"")+l.join("")}createMarker(e){return`
`}createStepText(e,t,i,r,s){const a=(e===0?0:Math.round(r/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+s),l=e===0?-3:t/this.scaleBarSteps_*-1,c=e===0?0:t/this.scaleBarSteps_*2;return`
`+a+"
"}getScaleForResolution(){const e=Dn(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),t=this.dpi_||$t,i=1e3/25.4;return e*i*t}render(e){const t=e.frameState;t?this.viewState_=t.viewState:this.viewState_=null,this.updateElement_()}}const yh=_h,xn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class vh extends hr{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getPreload(){return this.get(xn.PRELOAD)}setPreload(e){this.set(xn.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(xn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(xn.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const bh=vh,Zt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Eh extends Bs{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}getFeatures(e){return U()}getData(e){return null}prepareFrame(e){return U()}renderFrame(e,t){return U()}loadedTileCallback(e,t,i){e[t]||(e[t]={}),e[t][i.tileCoord.toString()]=i}createLoadedTileFinder(e,t,i){return(r,s)=>{const o=this.loadedTileCallback.bind(this,i,r);return e.forEachLoadedTile(t,r,s,o)}}forEachFeatureAtCoordinate(e,t,i,r,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){e.target.getState()===Zt.LOADED&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=Zt.LOADED&&t!=Zt.ERROR&&e.addEventListener(O.CHANGE,this.boundHandleImageChange_),t==Zt.IDLE&&(e.load(),t=e.getState()),t==Zt.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const xh=Eh;let Rt=null;function Ch(){Rt=Ot(1,1,void 0,{willReadFrequently:!0})}class Rh extends xh{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=Lt(),this.pixelTransform=Lt(),this.inversePixelTransform=Lt(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(e,t,i){Rt||Ch(),Rt.clearRect(0,0,1,1);let r;try{Rt.drawImage(e,t,i,1,1,0,0,1,1),r=Rt.getImageData(0,0,1,1).data}catch{return Rt=null,null}return r}getBackground(e){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(e.viewState.resolution)),i||void 0}useContainer(e,t,i){const r=this.getLayer().getClassName();let s,o;if(e&&e.className===r&&(!i||e&&e.style.backgroundColor&&Xn(Zr(e.style.backgroundColor),Zr(i)))){const a=e.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===t?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){s=document.createElement("div"),s.className=r;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=Ot();const l=o.canvas;s.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(e,t,i){const r=ft(i),s=Qn(i),o=qn(i),a=Hn(i);Ce(t.coordinateToPixelTransform,r),Ce(t.coordinateToPixelTransform,s),Ce(t.coordinateToPixelTransform,o),Ce(t.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Ce(l,r),Ce(l,s),Ce(l,o),Ce(l,a),e.save(),e.beginPath(),e.moveTo(Math.round(r[0]),Math.round(r[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}dispatchRenderEvent_(e,t,i){const r=this.getLayer();if(r.hasListener(e)){const s=new po(e,this.inversePixelTransform,i,t);r.dispatchEvent(s)}}preRender(e,t){this.frameState=t,this.dispatchRenderEvent_(et.PRERENDER,e,t)}postRender(e,t){this.dispatchRenderEvent_(et.POSTRENDER,e,t)}getRenderTransform(e,t,i,r,s,o,a){const l=s/2,c=o/2,u=r/t,h=-u,d=-e[0]+a,f=-e[1];return Qt(this.tempTransform,l,c,u,h,-i,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Th=Rh;class wh extends Yi{constructor(e,t,i){super(),i=i||{},this.tileCoord=e,this.state=t,this.interimTile=null,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(O.CHANGE)}release(){this.state===T.ERROR&&this.setState(T.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let e=this.interimTile;do{if(e.getState()==T.LOADED)return this.transition_=0,e;e=e.interimTile}while(e);return this}refreshInterimChain(){if(!this.interimTile)return;let e=this.interimTile,t=this;do{if(e.getState()==T.LOADED){e.interimTile=null;break}else e.getState()==T.LOADING?t=e:e.getState()==T.IDLE?t.interimTile=e.interimTile:t=e;e=t.interimTile}while(e)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==T.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){U()}getAlpha(e,t){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=t,this.transitionStarts_[e]=i;else if(i===-1)return 1;const r=t-i+1e3/60;return r>=this.transition_?1:so(r/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}}const Co=wh;function Sh(n,e,t){const i=n;let r=!0,s=!1,o=!1;const a=[An(i,O.LOAD,function(){o=!0,s||e()})];return i.src&&Il?(s=!0,i.decode().then(function(){r&&e()}).catch(function(l){r&&(o?e():t())})):a.push(An(i,O.ERROR,t)),function(){r=!1,a.forEach(K)}}class Ih extends Co{constructor(e,t,i,r,s,o){super(e,t,o),this.crossOrigin_=r,this.src_=i,this.key=i,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=T.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=T.ERROR,this.unlistenImage_(),this.image_=Ph(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=T.LOADED:this.state=T.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==T.ERROR&&(this.state=T.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==T.IDLE&&(this.state=T.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Sh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Ph(){const n=Ot(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const Ro=Ih,kh=.5,Mh=10,is=.25;class Lh{constructor(e,t,i,r,s,o){this.sourceProj_=e,this.targetProj_=t;let a={};const l=Nn(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const x=y[0]+"/"+y[1];return a[x]||(a[x]=l(y)),a[x]},this.maxSourceExtent_=r,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&ee(r)==ee(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ee(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ee(this.targetProj_.getExtent()):null;const c=ft(i),u=Qn(i),h=qn(i),d=Hn(i),f=this.transformInv_(c),p=this.transformInv_(u),m=this.transformInv_(h),_=this.transformInv_(d),v=Mh+(o?Math.max(0,Math.ceil(Math.log2(Mi(i)/(o*o*256*256)))):0);if(this.addQuad_(c,u,h,d,f,p,m,_,v),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(x,b,w){y=Math.min(y,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-y>this.sourceWorldWidth_/2){const b=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];b[0][0]-y>this.sourceWorldWidth_/2&&(b[0][0]-=this.sourceWorldWidth_),b[1][0]-y>this.sourceWorldWidth_/2&&(b[1][0]-=this.sourceWorldWidth_),b[2][0]-y>this.sourceWorldWidth_/2&&(b[2][0]-=this.sourceWorldWidth_);const w=Math.min(b[0][0],b[1][0],b[2][0]);Math.max(b[0][0],b[1][0],b[2][0])-w.5&&h<1;let p=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const _=Nr([e,t,i,r]);p=ee(_)/this.targetWorldWidth_>is||p}!f&&this.sourceProj_.isGlobal()&&h&&(p=h>is||p)}if(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!sn(u,this.maxSourceExtent_))return;let m=0;if(!p&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(c>0)p=!0;else if(m=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(c>0){if(!p){const _=[(e[0]+i[0])/2,(e[1]+i[1])/2],v=this.transformInv_(_);let y;f?y=(Mt(s[0],d)+Mt(a[0],d))/2-Mt(v[0],d):y=(s[0]+a[0])/2-v[0];const x=(s[1]+a[1])/2-v[1];p=y*y+x*x>this.errorThresholdSquared_}if(p){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const _=[(t[0]+i[0])/2,(t[1]+i[1])/2],v=this.transformInv_(_),y=[(r[0]+e[0])/2,(r[1]+e[1])/2],x=this.transformInv_(y);this.addQuad_(e,t,_,y,s,o,v,x,c-1),this.addQuad_(y,_,i,r,x,v,a,l,c-1)}else{const _=[(e[0]+t[0])/2,(e[1]+t[1])/2],v=this.transformInv_(_),y=[(i[0]+r[0])/2,(i[1]+r[1])/2],x=this.transformInv_(y);this.addQuad_(e,_,y,r,s,v,x,l,c-1),this.addQuad_(_,t,i,y,v,o,a,x,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(e,i,r,s,a,l),m&14||this.addTriangle_(e,i,t,s,a,o),m&&(m&13||this.addTriangle_(t,r,e,o,l,s),m&7||this.addTriangle_(t,r,i,o,l,a))}calculateSourceExtent(){const e=gt();return this.triangles_.forEach(function(t,i,r){const s=t.source;Sn(e,s[0]),Sn(e,s[1]),Sn(e,s[2])}),e}getTriangles(){return this.triangles_}}const Ah=Lh;let yi;const At=[];function rs(n,e,t,i,r){n.beginPath(),n.moveTo(0,0),n.lineTo(e,t),n.lineTo(i,r),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(e,i)+1,Math.max(t,r)),n.restore()}function vi(n,e){return Math.abs(n[e*4]-210)>2||Math.abs(n[e*4+3]-.75*255)>2}function Oh(){if(yi===void 0){const n=Ot(6,6,At);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",rs(n,4,5,4,0),rs(n,4,5,0,5);const e=n.getImageData(0,0,3,3).data;yi=vi(e,0)||vi(e,4)||vi(e,8),Hi(n),At.push(n.canvas)}return yi}function ss(n,e,t,i){const r=gc(t,e,n);let s=Dn(e,i,t);const o=e.getMetersPerUnit();o!==void 0&&(s*=o);const a=n.getMetersPerUnit();a!==void 0&&(s/=a);const l=n.getExtent();if(!l||Qi(l,r)){const c=Dn(n,s,r)/s;isFinite(c)&&c>0&&(s/=c)}return s}function Fh(n,e,t,i){const r=qt(t);let s=ss(n,e,r,i);return(!isFinite(s)||s<=0)&&qs(t,function(o){return s=ss(n,e,o,i),isFinite(s)&&s>0}),s}function Dh(n,e,t,i,r,s,o,a,l,c,u,h){const d=Ot(Math.round(t*n),Math.round(t*e),At);if(h||(d.imageSmoothingEnabled=!1),l.length===0)return d.canvas;d.scale(t,t);function f(b){return Math.round(b*t)/t}d.globalCompositeOperation="lighter";const p=gt();l.forEach(function(b,w,L){Yl(p,b.extent)});const m=ee(p),_=Fe(p),v=Ot(Math.round(t*m/i),Math.round(t*_/i),At);h||(v.imageSmoothingEnabled=!1);const y=t/i;l.forEach(function(b,w,L){const M=b.extent[0]-p[0],F=-(b.extent[3]-p[3]),X=ee(b.extent),D=Fe(b.extent);b.image.width>0&&b.image.height>0&&v.drawImage(b.image,c,c,b.image.width-2*c,b.image.height-2*c,M*y,F*y,X*y,D*y)});const x=ft(o);return a.getTriangles().forEach(function(b,w,L){const M=b.source,F=b.target;let X=M[0][0],D=M[0][1],le=M[1][0],q=M[1][1],ne=M[2][0],ye=M[2][1];const ie=f((F[0][0]-x[0])/s),ce=f(-(F[0][1]-x[1])/s),P=f((F[1][0]-x[0])/s),Z=f(-(F[1][1]-x[1])/s),Q=f((F[2][0]-x[0])/s),j=f(-(F[2][1]-x[1])/s),we=X,Y=D;X=0,D=0,le-=we,q-=Y,ne-=we,ye-=Y;const re=[[le,q,0,0,P-ie],[ne,ye,0,0,Q-ie],[0,0,le,q,Z-ce],[0,0,ne,ye,j-ce]],A=tc(re);if(A){if(d.save(),d.beginPath(),Oh()||!h){d.moveTo(P,Z);const k=4,fe=ie-P,he=ce-Z;for(let H=0;H{t&&t.getState()==T.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}),this.sourceTiles_.length=0,e.length===0)this.state=T.ERROR;else{const t=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(t),r=typeof i=="number"?i:i[0],s=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Dh(r,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=T.LOADED}this.changed()}load(){if(this.state==T.IDLE){this.state=T.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(t=>{const i=t.getState();if(i==T.IDLE||i==T.LOADING){e++;const r=B(t,O.CHANGE,function(s){const o=t.getState();(o==T.LOADED||o==T.ERROR||o==T.EMPTY)&&(K(r),e--,e===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(t,i,r){t.getState()==T.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(K),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Hi(this.canvas_.getContext("2d")),At.push(this.canvas_),this.canvas_=null),super.release()}}const Ni=Nh;class To{constructor(e,t,i,r){this.minX=e,this.maxX=t,this.minY=i,this.maxY=r}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minXthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function bt(n,e,t,i,r){return r!==void 0?(r.minX=n,r.maxX=e,r.minY=t,r.maxY=i,r):new To(n,e,t,i)}const wo=To;class zh extends Th{constructor(e){super(e),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=gt(),this.tmpTileRange_=new wo(0,0,0,0)}isDrawableTile(e){const t=this.getLayer(),i=e.getState(),r=t.getUseInterimTilesOnError();return i==T.LOADED||i==T.EMPTY||i==T.ERROR&&!r}getTile(e,t,i,r){const s=r.pixelRatio,o=r.viewState.projection,a=this.getLayer();let c=a.getSource().getTile(e,t,i,s,o);return c.getState()==T.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(c)||(c=c.getInterimTile()),c}getData(e){const t=this.frameState;if(!t)return null;const i=this.getLayer(),r=Ce(t.pixelToCoordinateTransform,e.slice()),s=i.getExtent();if(s&&!Qi(s,r))return null;const o=t.pixelRatio,a=t.viewState.projection,l=t.viewState,c=i.getRenderSource(),u=c.getTileGridForProjection(l.projection),h=c.getTilePixelRatio(t.pixelRatio);for(let d=u.getZForResolution(l.resolution);d>=u.getMinZoom();--d){const f=u.getTileCoordForCoordAndZ(r,d),p=c.getTile(d,f[1],f[2],o,a);if(!(p instanceof Ro||p instanceof Ni)||p instanceof Ni&&p.getState()===T.EMPTY)return null;if(p.getState()!==T.LOADED)continue;const m=u.getOrigin(d),_=Be(u.getTileSize(d)),v=u.getResolution(d),y=Math.floor(h*((r[0]-m[0])/v-f[1]*_[0])),x=Math.floor(h*((m[1]-r[1])/v-f[2]*_[1])),b=Math.round(h*c.getGutterForProjection(l.projection));return this.getImageData(p.getImage(),y+b,x+b)}return null}loadedTileCallback(e,t,i){return this.isDrawableTile(i)?super.loadedTileCallback(e,t,i):!1}prepareFrame(e){return!!this.getLayer().getSource()}renderFrame(e,t){const i=e.layerStatesArray[e.layerIndex],r=e.viewState,s=r.projection,o=r.resolution,a=r.center,l=r.rotation,c=e.pixelRatio,u=this.getLayer(),h=u.getSource(),d=h.getRevision(),f=h.getTileGridForProjection(s),p=f.getZForResolution(o,h.zDirection),m=f.getResolution(p);let _=e.extent;const v=e.viewState.resolution,y=h.getTilePixelRatio(c),x=Math.round(ee(_)/v*c),b=Math.round(Fe(_)/v*c),w=i.extent&&St(i.extent);w&&(_=Wt(_,St(i.extent)));const L=m*x/2/y,M=m*b/2/y,F=[a[0]-L,a[1]-M,a[0]+L,a[1]+M],X=f.getTileRangeForExtentAndZ(_,p),D={};D[p]={};const le=this.createLoadedTileFinder(h,s,D),q=this.tmpExtent,ne=this.tmpTileRange_;this.newTiles_=!1;const ye=l?Ai(r.center,v,l,e.size):void 0;for(let re=X.minX;re<=X.maxX;++re)for(let A=X.minY;A<=X.maxY;++A){if(l&&!f.tileCoordIntersectsViewport([p,re,A],ye))continue;const k=this.getTile(p,re,A,e);if(this.isDrawableTile(k)){const H=ge(this);if(k.getState()==T.LOADED){D[p][k.tileCoord.toString()]=k;let Le=k.inTransition(H);Le&&i.opacity!==1&&(k.endTransition(H),Le=!1),!this.newTiles_&&(Le||!this.renderedTiles.includes(k))&&(this.newTiles_=!0)}if(k.getAlpha(H,e.time)===1)continue}const fe=f.getTileCoordChildTileRange(k.tileCoord,ne,q);let he=!1;fe&&(he=le(p+1,fe)),he||f.forEachTileCoordParentTileRange(k.tileCoord,le,ne,q)}const ie=m/o*c/y;Qt(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/c,1/c,l,-x/2,-b/2);const ce=yc(this.pixelTransform);this.useContainer(t,ce,this.getBackground(e));const P=this.context,Z=P.canvas;no(this.inversePixelTransform,this.pixelTransform),Qt(this.tempTransform,x/2,b/2,ie,ie,0,-x/2,-b/2),Z.width!=x||Z.height!=b?(Z.width=x,Z.height=b):this.containerReused||P.clearRect(0,0,x,b),w&&this.clipUnrotated(P,e,w),h.getInterpolate()||(P.imageSmoothingEnabled=!1),this.preRender(P,e),this.renderedTiles.length=0;let Q=Object.keys(D).map(Number);Q.sort(Ui);let j,we,Y;i.opacity===1&&(!this.containerReused||h.getOpaque(e.viewState.projection))?Q=Q.reverse():(j=[],we=[]);for(let re=Q.length-1;re>=0;--re){const A=Q[re],k=h.getTilePixelSize(A,c,s),he=f.getResolution(A)/m,H=k[0]*he*ie,Le=k[1]*he*ie,Ue=f.getTileCoordForCoordAndZ(ft(F),A),st=f.getTileCoordExtent(Ue),De=Ce(this.tempTransform,[y*(st[0]-F[0])/m,y*(F[3]-st[3])/m]),ln=y*h.getGutterForProjection(s),S=D[A];for(const J in S){const se=S[J],Ae=se.tileCoord,mt=Ue[1]-Ae[1],cn=Math.round(De[0]-(mt-1)*H),zt=Ue[2]-Ae[2],un=Math.round(De[1]-(zt-1)*Le),ve=Math.round(De[0]-mt*H),be=Math.round(De[1]-zt*Le),Ke=cn-ve,ot=un-be,hn=p===A,dn=hn&&se.getAlpha(ge(this),e.time)!==1;let jt=!1;if(!dn)if(j){Y=[ve,be,ve+Ke,be,ve+Ke,be+ot,ve,be+ot];for(let pt=0,ii=j.length;pt0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const i=this.entries_[e];return $(i!==void 0,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const t=this.entries_[e];return $(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.key_;return e}getValues(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){if(this.containsKey(e))return this.entries_[e].value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){$(!(e in this.entries_),16);const i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}const $h=Bh;function os(n,e,t,i){return i!==void 0?(i[0]=n,i[1]=e,i[2]=t,i):[n,e,t]}function ei(n,e,t){return n+"/"+e+"/"+t}function So(n){return ei(n[0],n[1],n[2])}function Zh(n){return n.split("/").map(Number)}function Xh(n){return(n[1]<t||t>e.getMaxZoom())return!1;const s=e.getFullTileRange(t);return s?s.containsXY(i,r):!0}class Wh extends $h{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(e){for(;this.canExpireCache()&&!(this.peekLast().getKey()in e);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const e=this.peekFirstKey(),i=Zh(e)[0];this.forEach(r=>{r.tileCoord[0]!==i&&(this.remove(So(r.tileCoord)),r.release())})}}const Io=Wh,bi={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class Uh extends We{constructor(e){super(),this.projection=Me(e.projection),this.attributions_=as(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible!==void 0?e.attributionsCollapsible:!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise(function(i,r){t.viewResolver=i,t.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=as(e),this.changed()}setState(e){this.state_=e,this.changed()}}function as(n){return n?Array.isArray(n)?function(e){return n}:typeof n=="function"?n:function(e){return[n]}:null}const Kh=Uh,Et=[0,0,0],Ye=5;class Yh{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,$(yl(this.resolutions_,function(r,s){return s-r},!0),17);let t;if(!e.origins){for(let r=0,s=this.resolutions_.length-1;r=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),a=Math.floor(a/2),s=bt(o,o,a,a,i)):s=this.getTileRangeForExtentAndZ(l,c,i),t(c,s))return!0;--c}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,i){if(e[0]this.maxZoom||t0?i:Math.max(s/t[0],r/t[1]);const o=e+1,a=new Array(o);for(let l=0;li.highWaterMark&&(i.highWaterMark=e)}useTile(e,t,i,r){}}class td extends rt{constructor(e,t){super(e),this.tile=t}}const nd=ed;function id(n,e){const t=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){if(o)return n.replace(t,o[0].toString()).replace(i,o[1].toString()).replace(r,o[2].toString()).replace(s,function(){const c=o[0],u=e.getFullTileRange(c);return $(u,55),(u.getHeight()-o[2]-1).toString()})}}function rd(n,e){const t=n.length,i=new Array(t);for(let r=0;rthis.getTileInternal(_,v,y,x,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=h,c?(m.interimTile=c,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}getTileInternal(e,t,i,r,s){let o=null;const a=ei(e,t,i),l=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(e,t,i,r,s,l),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=l){const c=o;o=this.createTile_(e,t,i,r,s,l),c.getState()==T.IDLE?o.interimTile=c.interimTile:o.interimTile=c,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(e,t){const i=Me(e);if(i){const r=ge(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}}function cd(n,e){n.getImage().src=e}const ud=ld;class hd extends ud{constructor(e){e=e||{};const t=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:Qh({extent:mr(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:e.opaque,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const Lo=hd,Ao='© OpenStreetMap contributors.';class dd extends Lo{constructor(e){e=e||{};let t;e.attributions!==void 0?t=e.attributions:t=[Ao];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",r=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:t,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,opaque:e.opaque!==void 0?e.opaque:!0,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:r,wrapX:e.wrapX,zDirection:e.zDirection})}}const Oo=dd,gd=['Map tiles by Stamen Design, under CC BY 3.0.',Ao],fd={terrain:{extension:"png",opaque:!0},"terrain-background":{extension:"png",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},md={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}};class pd extends Lo{constructor(e){const t=e.layer.indexOf("-"),i=t==-1?e.layer:e.layer.slice(0,t),r=md[i],s=fd[e.layer],o=e.url!==void 0?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+s.extension;super({attributions:gd,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:e.maxZoom!=null?e.maxZoom:r.maxZoom,minZoom:e.minZoom!=null?e.minZoom:r.minZoom,opaque:s.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:o,wrapX:e.wrapX,zDirection:e.zDirection})}}const ls=pd,Tt="main";class _d{mapId=Tt;mapOptions={view:new ke({projection:"EPSG:3857",center:[847541,6793584],zoom:14}),layers:[new Pn({source:new Oo,properties:{title:"OSM"}}),new Pn({source:new ls({layer:"watercolor"}),properties:{title:"Watercolor"},visible:!1}),new Pn({source:new ls({layer:"toner"}),properties:{title:"Toner"},visible:!1})],controls:[new Vs]};async getMapOptions(){return this.mapOptions}}const ze=Jo("open-layers:OlMapRegistry");class yd{maps=new Map;configProviders=new Map;mapCreations=new Map;constructor(e){const t=e.references.providers;for(const i of t)this.configProviders.set(i.mapId,i)}destroy(){ze.info("Destroy map registry and all maps"),this.maps.forEach(e=>{e.dispose()}),this.maps.clear()}async getMap(e){const t=this.mapCreations.get(e);if(t)return t;const i=this.maps.get(e);if(i)return i;{const r=this.createMap(e);return this.mapCreations.set(e,r),r}}async createMap(e){let t=await this.configProviders.get(e)?.getMapOptions();t||(ze.warn(`config provider for map with id '${e}' does not exist`),t={});const i={...t};i.layers||(i.layers=[new Pn({source:new Oo,properties:{title:"OSM"}})]),i.view||(i.view=new ke({projection:"EPSG:3857",center:[0,0],zoom:1})),ze.info(`Create map with id '${e}'`);const r=new mh(i);return this.maps.set(e,r),this.mapCreations.delete(e),r}destroyMap(e){ze.info(`Destroy map with id '${e}'`);const t=this.maps.get(e);t?(t.dispose(),this.maps.delete(e),this.mapCreations.delete(e)):ze.warn(`Map with id '${e}' does not exist, so can't be destroyed.`)}setContainer(e,t){if(!t)throw new Error("Map target is not defined, so the map couldn't be mounted.");const i=this.maps.get(e);if(!i)throw new Error(`Map with id '${e}' does not exist.`);if(i.getTarget())throw new Error(`Map with id '${e}' already has a container.`);ze.isDebug()&&ze.debug(`Setting container of map '${e}':`,t),i.setTarget(t);let r=!1;return{destroy(){r||(ze.isDebug()&&ze.debug(`Removing container of map '${e}':`,t),i.setTarget(void 0),r=!0)}}}}class vd{constructor({properties:e}){const t=e.logLevel;console.debug("Log Service created with log level",t)}destroy(){console.debug("Log Service destroyed")}log(e){console.info("LOG: "+e)}}const bd={"ol-app":{name:"ol-app",services:{MainMapProvider:{name:"MainMapProvider",clazz:_d,provides:[{name:"ol-map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map-sample-logging.LogService",qualifier:void 0,all:!1},{name:"ol-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/experimental-ol-map":{name:"@open-pioneer/experimental-ol-map",services:{OlMapRegistry:{name:"OlMapRegistry",clazz:yd,provides:[{name:"ol-map.MapRegistry",qualifier:"ol-map.MapRegistry"}],references:{providers:{name:"ol-map.MapConfigProvider",qualifier:void 0,all:!0}}}},ui:{references:[{name:"ol-map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-ol-layer-control":{name:"@open-pioneer/experimental-ol-layer-control",services:{},ui:{references:[]},properties:{}},"map-sample-logging":{name:"map-sample-logging",services:{LogService:{name:"LogService",clazz:vd,provides:[{name:"map-sample-logging.LogService",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{logLevel:{value:"INFO",required:!1}}},"map-sample-scale-component":{name:"map-sample-scale-component",services:{},ui:{references:[]},properties:{}},"map-sample-zoom-component":{name:"map-sample-zoom-component",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},Ed=`.sidebar{height:100%;position:absolute;top:0;background-color:#ffffffb3;transition:width .3s ease-out 0s}.right-bottom{position:absolute;right:0;bottom:0;background:white}.zoom-controls{position:absolute;z-index:1000;bottom:2rem;right:1rem}.ol-control.ol-zoom{left:unset;right:.5em}: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}.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}.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}.scale-wrapper .ol-scale-line{position:relative;bottom:0px;left:0px;background:none}.scale-wrapper .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)} +`);this.generateTileUrlFunction_?this.setTileUrlFunction(rd(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,i){}useTile(e,t,i){const r=ei(e,t,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const ad=pr;class ld extends ad{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:cd,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:Ro,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1}expireCache(e,t){const i=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==i?t:{});for(const r in this.tileCacheForProjection){const s=this.tileCacheForProjection[r];s.expireCache(s==i?t:{})}}getGutterForProjection(e){return this.getProjection()&&e&&!xt(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getOpaque(e){return this.getProjection()&&e&&!xt(this.getProjection(),e)?!1:super.getOpaque(e)}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||xt(t,e)))return this.tileGrid;const i=ge(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=ko(e)),this.tileGridForProjection[i]}getTileCacheForProjection(e){const t=this.getProjection();if(!t||xt(t,e))return this.tileCache;const i=ge(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Io(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(e,t,i,r,s,o){const a=[e,t,i],l=this.getTileCoordForTileUrlFunction(a,s),c=l?this.tileUrlFunction(l,r,s):void 0,u=new this.tileClass(a,c!==void 0?T.IDLE:T.EMPTY,c!==void 0?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(O.CHANGE,this.handleTileChange.bind(this)),u}getTile(e,t,i,r,s){const o=this.getProjection();if(!o||!s||xt(o,s))return this.getTileInternal(e,t,i,r,o||s);const a=this.getTileCacheForProjection(s),l=[e,t,i];let c;const u=So(l);a.containsKey(u)&&(c=a.get(u));const h=this.getKey();if(c&&c.key==h)return c;const d=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),p=this.getTileCoordForTileUrlFunction(l,s),m=new Ni(o,d,s,f,l,p,this.getTilePixelRatio(r),this.getGutter(),(_,v,y,x)=>this.getTileInternal(_,v,y,x,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=h,c?(m.interimTile=c,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}getTileInternal(e,t,i,r,s){let o=null;const a=ei(e,t,i),l=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(e,t,i,r,s,l),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=l){const c=o;o=this.createTile_(e,t,i,r,s,l),c.getState()==T.IDLE?o.interimTile=c.interimTile:o.interimTile=c,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(e,t){const i=Me(e);if(i){const r=ge(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}}function cd(n,e){n.getImage().src=e}const ud=ld;class hd extends ud{constructor(e){e=e||{};const t=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:Qh({extent:mr(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:e.opaque,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const Lo=hd,Ao='© OpenStreetMap contributors.';class dd extends Lo{constructor(e){e=e||{};let t;e.attributions!==void 0?t=e.attributions:t=[Ao];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",r=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:t,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,opaque:e.opaque!==void 0?e.opaque:!0,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:r,wrapX:e.wrapX,zDirection:e.zDirection})}}const Oo=dd,gd=['Map tiles by Stamen Design, under CC BY 3.0.',Ao],fd={terrain:{extension:"png",opaque:!0},"terrain-background":{extension:"png",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},md={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}};class pd extends Lo{constructor(e){const t=e.layer.indexOf("-"),i=t==-1?e.layer:e.layer.slice(0,t),r=md[i],s=fd[e.layer],o=e.url!==void 0?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+s.extension;super({attributions:gd,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:e.maxZoom!=null?e.maxZoom:r.maxZoom,minZoom:e.minZoom!=null?e.minZoom:r.minZoom,opaque:s.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:o,wrapX:e.wrapX,zDirection:e.zDirection})}}const ls=pd,Tt="main";class _d{mapId=Tt;mapOptions={view:new ke({projection:"EPSG:3857",center:[847541,6793584],zoom:14}),layers:[new Pn({source:new Oo,properties:{title:"OSM"}}),new Pn({source:new ls({layer:"watercolor"}),properties:{title:"Watercolor"},visible:!1}),new Pn({source:new ls({layer:"toner"}),properties:{title:"Toner"},visible:!1})],controls:[new Vs]};async getMapOptions(){return this.mapOptions}}const ze=Jo("open-layers:OlMapRegistry");class yd{maps=new Map;configProviders=new Map;mapCreations=new Map;constructor(e){const t=e.references.providers;for(const i of t)this.configProviders.set(i.mapId,i)}destroy(){ze.info("Destroy map registry and all maps"),this.maps.forEach(e=>{e.dispose()}),this.maps.clear()}async getMap(e){const t=this.mapCreations.get(e);if(t)return t;const i=this.maps.get(e);if(i)return i;{const r=this.createMap(e);return this.mapCreations.set(e,r),r}}async createMap(e){let t=await this.configProviders.get(e)?.getMapOptions();t||(ze.warn(`config provider for map with id '${e}' does not exist`),t={});const i={...t};i.layers||(i.layers=[new Pn({source:new Oo,properties:{title:"OSM"}})]),i.view||(i.view=new ke({projection:"EPSG:3857",center:[0,0],zoom:1})),ze.info(`Create map with id '${e}'`);const r=new mh(i);return this.maps.set(e,r),this.mapCreations.delete(e),r}destroyMap(e){ze.info(`Destroy map with id '${e}'`);const t=this.maps.get(e);t?(t.dispose(),this.maps.delete(e),this.mapCreations.delete(e)):ze.warn(`Map with id '${e}' does not exist, so can't be destroyed.`)}setContainer(e,t){if(!t)throw new Error("Map target is not defined, so the map couldn't be mounted.");const i=this.maps.get(e);if(!i)throw new Error(`Map with id '${e}' does not exist.`);if(i.getTarget())throw new Error(`Map with id '${e}' already has a container.`);ze.isDebug()&&ze.debug(`Setting container of map '${e}':`,t),i.setTarget(t);let r=!1;return{destroy(){r||(ze.isDebug()&&ze.debug(`Removing container of map '${e}':`,t),i.setTarget(void 0),r=!0)}}}}class vd{constructor({properties:e}){const t=e.logLevel;console.debug("Log Service created with log level",t)}destroy(){console.debug("Log Service destroyed")}log(e){console.info("LOG: "+e)}}const bd={"ol-app":{name:"ol-app",services:{MainMapProvider:{name:"MainMapProvider",clazz:_d,provides:[{name:"ol-map.MapConfigProvider",qualifier:void 0}],references:{}}},ui:{references:[{name:"map-sample-logging.LogService",qualifier:void 0,all:!1},{name:"ol-map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-ol-map":{name:"@open-pioneer/experimental-ol-map",services:{OlMapRegistry:{name:"OlMapRegistry",clazz:yd,provides:[{name:"ol-map.MapRegistry",qualifier:"ol-map.MapRegistry"}],references:{providers:{name:"ol-map.MapConfigProvider",qualifier:void 0,all:!0}}}},ui:{references:[{name:"ol-map.MapRegistry",qualifier:void 0,all:!1}]},properties:{}},"@open-pioneer/experimental-layout-sidebar":{name:"@open-pioneer/experimental-layout-sidebar",services:{},ui:{references:[]},properties:{}},"@open-pioneer/experimental-ol-layer-control":{name:"@open-pioneer/experimental-ol-layer-control",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}},"map-sample-logging":{name:"map-sample-logging",services:{LogService:{name:"LogService",clazz:vd,provides:[{name:"map-sample-logging.LogService",qualifier:void 0}],references:{}}},ui:{references:[]},properties:{logLevel:{value:"INFO",required:!1}}},"map-sample-scale-component":{name:"map-sample-scale-component",services:{},ui:{references:[]},properties:{}},"map-sample-zoom-component":{name:"map-sample-zoom-component",services:{},ui:{references:[]},properties:{}}},Ed=`.sidebar{height:100%;position:absolute;top:0;background-color:#ffffffb3;transition:width .3s ease-out 0s}.right-bottom{position:absolute;right:0;bottom:0;background:white}.zoom-controls{position:absolute;z-index:1000;bottom:2rem;right:1rem}.ol-control.ol-zoom{left:unset;right:.5em}: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}.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}.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}.scale-wrapper .ol-scale-line{position:relative;bottom:0px;left:0px;background:none}.scale-wrapper .ol-scale-line .ol-scale-line-inner{color:var(--chakra-white);border-color:var(--chakra-white)} `,xd=["en","de"];function Cd(n){switch(n){case"en":return Rr(()=>import("./fdad15d0958e.js"),[],import.meta.url).then(e=>e.default);case"de":return Rr(()=>import("./316f9b05d7c4.js"),[],import.meta.url).then(e=>e.default)}throw new Error(`Unsupported locale: '${n}'`)}const Rd=ea(Ed),Td=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:Cd,locales:xd,packages:bd,styles:Rd},Symbol.toStringTag,{value:"Module"}));function wd(){const n=E.useContext(ta);if(!n)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return n}function Sd(){const n=ws(),e=wd();return{...n,theme:e}}var Id=n=>/!(important)?$/.test(n),cs=n=>typeof n=="string"?n.replace(/!(important)?$/,"").trim():n,Pd=(n,e)=>t=>{const i=String(e),r=Id(i),s=cs(i),o=n?`${n}.${s}`:s;let a=ht(t.__cssMap)&&o in t.__cssMap?t.__cssMap[o].varRef:e;return a=cs(a),r?`${a} !important`:a};function _r(n){const{scale:e,transform:t,compose:i}=n;return(s,o)=>{var a;const l=Pd(e,s)(o);let c=(a=t?.(l,o))!=null?a:l;return i&&(c=i(c,o)),c}}var Cn=(...n)=>e=>n.reduce((t,i)=>i(t),e);function Ee(n,e){return t=>{const i={property:t,scale:n};return i.transform=_r({scale:n,transform:e}),i}}var kd=({rtl:n,ltr:e})=>t=>t.direction==="rtl"?n:e;function Md(n){const{property:e,scale:t,transform:i}=n;return{scale:t,property:kd(e),transform:t?_r({scale:t,compose:i}):i}}var Fo=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Ld(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Fo].join(" ")}function Ad(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Fo].join(" ")}var Od={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Fd={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function Dd(n){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":n,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Nd={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},zi={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},zd=new Set(Object.values(zi)),ji=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),jd=n=>n.trim();function Gd(n,e){if(n==null||ji.has(n))return n;if(!(Gi(n)||ji.has(n)))return`url('${n}')`;const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(n),s=r?.[1],o=r?.[2];if(!s||!o)return n;const a=s.includes("-gradient")?s:`${s}-gradient`,[l,...c]=o.split(",").map(jd).filter(Boolean);if(c?.length===0)return n;const u=l in zi?zi[l]:l;c.unshift(u);const h=c.map(d=>{if(zd.has(d))return d;const f=d.indexOf(" "),[p,m]=f!==-1?[d.substr(0,f),d.substr(f+1)]:[d],_=Gi(m)?m:m&&m.split(" "),v=`colors.${p}`,y=v in e.__cssMap?e.__cssMap[v].varRef:p;return _?[y,...Array.isArray(_)?_:[_]].join(" "):y});return`${a}(${h.join(", ")})`}var Gi=n=>typeof n=="string"&&n.includes("(")&&n.includes(")"),Bd=(n,e)=>Gd(n,e??{});function $d(n){return/^var\(--.+\)$/.test(n)}var Zd=n=>{const e=parseFloat(n.toString()),t=n.toString().replace(String(e),"");return{unitless:!t,value:e,unit:t}},Oe=n=>e=>`${n}(${e})`,N={filter(n){return n!=="auto"?n:Od},backdropFilter(n){return n!=="auto"?n:Fd},ring(n){return Dd(N.px(n))},bgClip(n){return n==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:n}},transform(n){return n==="auto"?Ld():n==="auto-gpu"?Ad():n},vh(n){return n==="$100vh"?"var(--chakra-vh)":n},px(n){if(n==null)return n;const{unitless:e}=Zd(n);return e||typeof n=="number"?`${n}px`:n},fraction(n){return typeof n!="number"||n>1?n:`${n*100}%`},float(n,e){const t={left:"right",right:"left"};return e.direction==="rtl"?t[n]:n},degree(n){if($d(n)||n==null)return n;const e=typeof n=="string"&&!n.endsWith("deg");return typeof n=="number"||e?`${n}deg`:n},gradient:Bd,blur:Oe("blur"),opacity:Oe("opacity"),brightness:Oe("brightness"),contrast:Oe("contrast"),dropShadow:Oe("drop-shadow"),grayscale:Oe("grayscale"),hueRotate:Oe("hue-rotate"),invert:Oe("invert"),saturate:Oe("saturate"),sepia:Oe("sepia"),bgImage(n){return n==null||Gi(n)||ji.has(n)?n:`url(${n})`},outline(n){const e=String(n)==="0"||String(n)==="none";return n!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:n}},flexDirection(n){var e;const{space:t,divide:i}=(e=Nd[n])!=null?e:{},r={flexDirection:n};return t&&(r[t]=1),i&&(r[i]=1),r}},g={borderWidths:Ee("borderWidths"),borderStyles:Ee("borderStyles"),colors:Ee("colors"),borders:Ee("borders"),gradients:Ee("gradients",N.gradient),radii:Ee("radii",N.px),space:Ee("space",Cn(N.vh,N.px)),spaceT:Ee("space",Cn(N.vh,N.px)),degreeT(n){return{property:n,transform:N.degree}},prop(n,e,t){return{property:n,scale:e,...e&&{transform:_r({scale:e,transform:t})}}},propT(n,e){return{property:n,transform:e}},sizes:Ee("sizes",Cn(N.vh,N.px)),sizesT:Ee("sizes",Cn(N.vh,N.fraction)),shadows:Ee("shadows"),logical:Md,blur:Ee("blur",N.blur)},kn={background:g.colors("background"),backgroundColor:g.colors("backgroundColor"),backgroundImage:g.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:N.bgClip},bgSize:g.prop("backgroundSize"),bgPosition:g.prop("backgroundPosition"),bg:g.colors("background"),bgColor:g.colors("backgroundColor"),bgPos:g.prop("backgroundPosition"),bgRepeat:g.prop("backgroundRepeat"),bgAttachment:g.prop("backgroundAttachment"),bgGradient:g.gradients("backgroundImage"),bgClip:{transform:N.bgClip}};Object.assign(kn,{bgImage:kn.backgroundImage,bgImg:kn.backgroundImage});var z={border:g.borders("border"),borderWidth:g.borderWidths("borderWidth"),borderStyle:g.borderStyles("borderStyle"),borderColor:g.colors("borderColor"),borderRadius:g.radii("borderRadius"),borderTop:g.borders("borderTop"),borderBlockStart:g.borders("borderBlockStart"),borderTopLeftRadius:g.radii("borderTopLeftRadius"),borderStartStartRadius:g.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:g.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:g.radii("borderTopRightRadius"),borderStartEndRadius:g.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:g.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:g.borders("borderRight"),borderInlineEnd:g.borders("borderInlineEnd"),borderBottom:g.borders("borderBottom"),borderBlockEnd:g.borders("borderBlockEnd"),borderBottomLeftRadius:g.radii("borderBottomLeftRadius"),borderBottomRightRadius:g.radii("borderBottomRightRadius"),borderLeft:g.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:g.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:g.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:g.borders(["borderLeft","borderRight"]),borderInline:g.borders("borderInline"),borderY:g.borders(["borderTop","borderBottom"]),borderBlock:g.borders("borderBlock"),borderTopWidth:g.borderWidths("borderTopWidth"),borderBlockStartWidth:g.borderWidths("borderBlockStartWidth"),borderTopColor:g.colors("borderTopColor"),borderBlockStartColor:g.colors("borderBlockStartColor"),borderTopStyle:g.borderStyles("borderTopStyle"),borderBlockStartStyle:g.borderStyles("borderBlockStartStyle"),borderBottomWidth:g.borderWidths("borderBottomWidth"),borderBlockEndWidth:g.borderWidths("borderBlockEndWidth"),borderBottomColor:g.colors("borderBottomColor"),borderBlockEndColor:g.colors("borderBlockEndColor"),borderBottomStyle:g.borderStyles("borderBottomStyle"),borderBlockEndStyle:g.borderStyles("borderBlockEndStyle"),borderLeftWidth:g.borderWidths("borderLeftWidth"),borderInlineStartWidth:g.borderWidths("borderInlineStartWidth"),borderLeftColor:g.colors("borderLeftColor"),borderInlineStartColor:g.colors("borderInlineStartColor"),borderLeftStyle:g.borderStyles("borderLeftStyle"),borderInlineStartStyle:g.borderStyles("borderInlineStartStyle"),borderRightWidth:g.borderWidths("borderRightWidth"),borderInlineEndWidth:g.borderWidths("borderInlineEndWidth"),borderRightColor:g.colors("borderRightColor"),borderInlineEndColor:g.colors("borderInlineEndColor"),borderRightStyle:g.borderStyles("borderRightStyle"),borderInlineEndStyle:g.borderStyles("borderInlineEndStyle"),borderTopRadius:g.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:g.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:g.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:g.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(z,{rounded:z.borderRadius,roundedTop:z.borderTopRadius,roundedTopLeft:z.borderTopLeftRadius,roundedTopRight:z.borderTopRightRadius,roundedTopStart:z.borderStartStartRadius,roundedTopEnd:z.borderStartEndRadius,roundedBottom:z.borderBottomRadius,roundedBottomLeft:z.borderBottomLeftRadius,roundedBottomRight:z.borderBottomRightRadius,roundedBottomStart:z.borderEndStartRadius,roundedBottomEnd:z.borderEndEndRadius,roundedLeft:z.borderLeftRadius,roundedRight:z.borderRightRadius,roundedStart:z.borderInlineStartRadius,roundedEnd:z.borderInlineEndRadius,borderStart:z.borderInlineStart,borderEnd:z.borderInlineEnd,borderTopStartRadius:z.borderStartStartRadius,borderTopEndRadius:z.borderStartEndRadius,borderBottomStartRadius:z.borderEndStartRadius,borderBottomEndRadius:z.borderEndEndRadius,borderStartRadius:z.borderInlineStartRadius,borderEndRadius:z.borderInlineEndRadius,borderStartWidth:z.borderInlineStartWidth,borderEndWidth:z.borderInlineEndWidth,borderStartColor:z.borderInlineStartColor,borderEndColor:z.borderInlineEndColor,borderStartStyle:z.borderInlineStartStyle,borderEndStyle:z.borderInlineEndStyle});var Xd={color:g.colors("color"),textColor:g.colors("color"),fill:g.colors("fill"),stroke:g.colors("stroke")},Bi={boxShadow:g.shadows("boxShadow"),mixBlendMode:!0,blendMode:g.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:g.prop("backgroundBlendMode"),opacity:!0};Object.assign(Bi,{shadow:Bi.boxShadow});var Vd={filter:{transform:N.filter},blur:g.blur("--chakra-blur"),brightness:g.propT("--chakra-brightness",N.brightness),contrast:g.propT("--chakra-contrast",N.contrast),hueRotate:g.degreeT("--chakra-hue-rotate"),invert:g.propT("--chakra-invert",N.invert),saturate:g.propT("--chakra-saturate",N.saturate),dropShadow:g.propT("--chakra-drop-shadow",N.dropShadow),backdropFilter:{transform:N.backdropFilter},backdropBlur:g.blur("--chakra-backdrop-blur"),backdropBrightness:g.propT("--chakra-backdrop-brightness",N.brightness),backdropContrast:g.propT("--chakra-backdrop-contrast",N.contrast),backdropHueRotate:g.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:g.propT("--chakra-backdrop-invert",N.invert),backdropSaturate:g.propT("--chakra-backdrop-saturate",N.saturate)},Gn={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:N.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:g.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:g.space("gap"),rowGap:g.space("rowGap"),columnGap:g.space("columnGap")};Object.assign(Gn,{flexDir:Gn.flexDirection});var Do={gridGap:g.space("gridGap"),gridColumnGap:g.space("gridColumnGap"),gridRowGap:g.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Wd={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:N.outline},outlineOffset:!0,outlineColor:g.colors("outlineColor")},xe={width:g.sizesT("width"),inlineSize:g.sizesT("inlineSize"),height:g.sizes("height"),blockSize:g.sizes("blockSize"),boxSize:g.sizes(["width","height"]),minWidth:g.sizes("minWidth"),minInlineSize:g.sizes("minInlineSize"),minHeight:g.sizes("minHeight"),minBlockSize:g.sizes("minBlockSize"),maxWidth:g.sizes("maxWidth"),maxInlineSize:g.sizes("maxInlineSize"),maxHeight:g.sizes("maxHeight"),maxBlockSize:g.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(n,e)=>{var t,i,r;return{[`@media screen and (min-width: ${(r=(i=(t=e.__breakpoints)==null?void 0:t.get(n))==null?void 0:i.minW)!=null?r:n})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(n,e)=>{var t,i,r;return{[`@media screen and (max-width: ${(r=(i=(t=e.__breakpoints)==null?void 0:t.get(n))==null?void 0:i._minW)!=null?r:n})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:g.propT("float",N.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(xe,{w:xe.width,h:xe.height,minW:xe.minWidth,maxW:xe.maxWidth,minH:xe.minHeight,maxH:xe.maxHeight,overscroll:xe.overscrollBehavior,overscrollX:xe.overscrollBehaviorX,overscrollY:xe.overscrollBehaviorY});var Ud={listStyleType:!0,listStylePosition:!0,listStylePos:g.prop("listStylePosition"),listStyleImage:!0,listStyleImg:g.prop("listStyleImage")};function Kd(n,e,t,i){const r=typeof e=="string"?e.split("."):[e];for(i=0;i{const e=new WeakMap;return(i,r,s,o)=>{if(typeof i>"u")return n(i,r,s);e.has(i)||e.set(i,new Map);const a=e.get(i);if(a.has(r))return a.get(r);const l=n(i,r,s,o);return a.set(r,l),l}},Hd=Yd(Kd),qd={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qd={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Ei=(n,e,t)=>{const i={},r=Hd(n,e,{});for(const s in r)s in t&&t[s]!=null||(i[s]=r[s]);return i},Jd={srOnly:{transform(n){return n===!0?qd:n==="focusable"?Qd:{}}},layerStyle:{processResult:!0,transform:(n,e,t)=>Ei(e,`layerStyles.${n}`,t)},textStyle:{processResult:!0,transform:(n,e,t)=>Ei(e,`textStyles.${n}`,t)},apply:{processResult:!0,transform:(n,e,t)=>Ei(e,n,t)}},Ut={position:!0,pos:g.prop("position"),zIndex:g.prop("zIndex","zIndices"),inset:g.spaceT("inset"),insetX:g.spaceT(["left","right"]),insetInline:g.spaceT("insetInline"),insetY:g.spaceT(["top","bottom"]),insetBlock:g.spaceT("insetBlock"),top:g.spaceT("top"),insetBlockStart:g.spaceT("insetBlockStart"),bottom:g.spaceT("bottom"),insetBlockEnd:g.spaceT("insetBlockEnd"),left:g.spaceT("left"),insetInlineStart:g.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:g.spaceT("right"),insetInlineEnd:g.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Ut,{insetStart:Ut.insetInlineStart,insetEnd:Ut.insetInlineEnd});var eg={ring:{transform:N.ring},ringColor:g.colors("--chakra-ring-color"),ringOffset:g.prop("--chakra-ring-offset-width"),ringOffsetColor:g.colors("--chakra-ring-offset-color"),ringInset:g.prop("--chakra-ring-inset")},V={margin:g.spaceT("margin"),marginTop:g.spaceT("marginTop"),marginBlockStart:g.spaceT("marginBlockStart"),marginRight:g.spaceT("marginRight"),marginInlineEnd:g.spaceT("marginInlineEnd"),marginBottom:g.spaceT("marginBottom"),marginBlockEnd:g.spaceT("marginBlockEnd"),marginLeft:g.spaceT("marginLeft"),marginInlineStart:g.spaceT("marginInlineStart"),marginX:g.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:g.spaceT("marginInline"),marginY:g.spaceT(["marginTop","marginBottom"]),marginBlock:g.spaceT("marginBlock"),padding:g.space("padding"),paddingTop:g.space("paddingTop"),paddingBlockStart:g.space("paddingBlockStart"),paddingRight:g.space("paddingRight"),paddingBottom:g.space("paddingBottom"),paddingBlockEnd:g.space("paddingBlockEnd"),paddingLeft:g.space("paddingLeft"),paddingInlineStart:g.space("paddingInlineStart"),paddingInlineEnd:g.space("paddingInlineEnd"),paddingX:g.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:g.space("paddingInline"),paddingY:g.space(["paddingTop","paddingBottom"]),paddingBlock:g.space("paddingBlock")};Object.assign(V,{m:V.margin,mt:V.marginTop,mr:V.marginRight,me:V.marginInlineEnd,marginEnd:V.marginInlineEnd,mb:V.marginBottom,ml:V.marginLeft,ms:V.marginInlineStart,marginStart:V.marginInlineStart,mx:V.marginX,my:V.marginY,p:V.padding,pt:V.paddingTop,py:V.paddingY,px:V.paddingX,pb:V.paddingBottom,pl:V.paddingLeft,ps:V.paddingInlineStart,paddingStart:V.paddingInlineStart,pr:V.paddingRight,pe:V.paddingInlineEnd,paddingEnd:V.paddingInlineEnd});var tg={textDecorationColor:g.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:g.shadows("textShadow")},ng={clipPath:!0,transform:g.propT("transform",N.transform),transformOrigin:!0,translateX:g.spaceT("--chakra-translate-x"),translateY:g.spaceT("--chakra-translate-y"),skewX:g.degreeT("--chakra-skew-x"),skewY:g.degreeT("--chakra-skew-y"),scaleX:g.prop("--chakra-scale-x"),scaleY:g.prop("--chakra-scale-y"),scale:g.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:g.degreeT("--chakra-rotate")},ig={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:g.prop("transitionDuration","transition.duration"),transitionProperty:g.prop("transitionProperty","transition.property"),transitionTimingFunction:g.prop("transitionTimingFunction","transition.easing")},rg={fontFamily:g.prop("fontFamily","fonts"),fontSize:g.prop("fontSize","fontSizes",N.px),fontWeight:g.prop("fontWeight","fontWeights"),lineHeight:g.prop("lineHeight","lineHeights"),letterSpacing:g.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(n){if(n===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},sg={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:g.spaceT("scrollMargin"),scrollMarginTop:g.spaceT("scrollMarginTop"),scrollMarginBottom:g.spaceT("scrollMarginBottom"),scrollMarginLeft:g.spaceT("scrollMarginLeft"),scrollMarginRight:g.spaceT("scrollMarginRight"),scrollMarginX:g.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:g.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:g.spaceT("scrollPadding"),scrollPaddingTop:g.spaceT("scrollPaddingTop"),scrollPaddingBottom:g.spaceT("scrollPaddingBottom"),scrollPaddingLeft:g.spaceT("scrollPaddingLeft"),scrollPaddingRight:g.spaceT("scrollPaddingRight"),scrollPaddingX:g.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:g.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function No(n){return ht(n)&&n.reference?n.reference:String(n)}var ti=(n,...e)=>e.map(No).join(` ${n} `).replace(/calc/g,""),us=(...n)=>`calc(${ti("+",...n)})`,hs=(...n)=>`calc(${ti("-",...n)})`,$i=(...n)=>`calc(${ti("*",...n)})`,ds=(...n)=>`calc(${ti("/",...n)})`,gs=n=>{const e=No(n);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):`-${e}`:$i(e,-1)},Xt=Object.assign(n=>({add:(...e)=>Xt(us(n,...e)),subtract:(...e)=>Xt(hs(n,...e)),multiply:(...e)=>Xt($i(n,...e)),divide:(...e)=>Xt(ds(n,...e)),negate:()=>Xt(gs(n)),toString:()=>n.toString()}),{add:us,subtract:hs,multiply:$i,divide:ds,negate:gs});function og(n){const e=parseFloat(n.toString()),t=n.toString().replace(String(e),"");return{unitless:!t,value:e,unit:t}}function fs(n){if(n==null)return n;const{unitless:e}=og(n);return e||typeof n=="number"?`${n}px`:n}function ag(n,e){const t=["@media screen"];return n&&t.push("and",`(min-width: ${fs(n)})`),e&&t.push("and",`(max-width: ${fs(e)})`),t.join(" ")}var oe={hover:(n,e)=>`${n}:hover ${e}, ${n}[data-hover] ${e}`,focus:(n,e)=>`${n}:focus ${e}, ${n}[data-focus] ${e}`,focusVisible:(n,e)=>`${n}:focus-visible ${e}`,focusWithin:(n,e)=>`${n}:focus-within ${e}`,active:(n,e)=>`${n}:active ${e}, ${n}[data-active] ${e}`,disabled:(n,e)=>`${n}:disabled ${e}, ${n}[data-disabled] ${e}`,invalid:(n,e)=>`${n}:invalid ${e}, ${n}[data-invalid] ${e}`,checked:(n,e)=>`${n}:checked ${e}, ${n}[data-checked] ${e}`,indeterminate:(n,e)=>`${n}:indeterminate ${e}, ${n}[aria-checked=mixed] ${e}, ${n}[data-indeterminate] ${e}`,readOnly:(n,e)=>`${n}:read-only ${e}, ${n}[readonly] ${e}, ${n}[data-read-only] ${e}`,expanded:(n,e)=>`${n}:read-only ${e}, ${n}[aria-expanded=true] ${e}, ${n}[data-expanded] ${e}`,placeholderShown:(n,e)=>`${n}:placeholder-shown ${e}`},He=n=>zo(e=>n(e,"&"),"[role=group]","[data-group]",".group"),je=n=>zo(e=>n(e,"~ &"),"[data-peer]",".peer"),zo=(n,...e)=>e.map(n).join(", "),yr={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:He(oe.hover),_peerHover:je(oe.hover),_groupFocus:He(oe.focus),_peerFocus:je(oe.focus),_groupFocusVisible:He(oe.focusVisible),_peerFocusVisible:je(oe.focusVisible),_groupActive:He(oe.active),_peerActive:je(oe.active),_groupDisabled:He(oe.disabled),_peerDisabled:je(oe.disabled),_groupInvalid:He(oe.invalid),_peerInvalid:je(oe.invalid),_groupChecked:He(oe.checked),_peerChecked:je(oe.checked),_groupFocusWithin:He(oe.focusWithin),_peerFocusWithin:je(oe.focusWithin),_peerPlaceholderShown:je(oe.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},lg=Object.keys(yr),vr=$e({},kn,z,Xd,Gn,xe,Vd,eg,Wd,Do,Jd,Ut,Bi,V,sg,rg,tg,ng,Ud,ig);Object.assign({},V,xe,Gn,Do,Ut);var cg=[...Object.keys(vr),...lg],ug={...vr,...yr},hg=n=>n in ug,dg=n=>e=>{if(!e.__breakpoints)return n;const{isResponsive:t,toArrayValue:i,media:r}=e.__breakpoints,s={};for(const o in n){let a=ct(n[o],e);if(a==null)continue;if(a=ht(a)&&t(a)?i(a):a,!Array.isArray(a)){s[o]=a;continue}const l=a.slice(0,r.length).length;for(let c=0;cn.startsWith("--")&&typeof e=="string"&&!fg(e),pg=(n,e)=>{var t,i;if(e==null)return e;const r=l=>{var c,u;return(u=(c=n.__cssMap)==null?void 0:c[l])==null?void 0:u.varRef},s=l=>{var c;return(c=r(l))!=null?c:l},[o,a]=gg(e);return e=(i=(t=r(o))!=null?t:s(a))!=null?i:s(e),e};function _g(n){const{configs:e={},pseudos:t={},theme:i}=n,r=(s,o=!1)=>{var a,l,c;const u=ct(s,i),h=dg(u)(i);let d={};for(let f in h){const p=h[f];let m=ct(p,i);f in t&&(f=t[f]),mg(f,m)&&(m=pg(i,m));let _=e[f];if(_===!0&&(_={property:f}),ht(m)){d[f]=(a=d[f])!=null?a:{},d[f]=$e({},d[f],r(m,!0));continue}let v=(c=(l=_?.transform)==null?void 0:l.call(_,m,i,u))!=null?c:m;v=_?.processResult?r(v,!0):v;const y=ct(_?.property,i);if(!o&&_?.static){const x=ct(_.static,i);d=$e({},d,x)}if(y&&Array.isArray(y)){for(const x of y)d[x]=v;continue}if(y){y==="&"&&ht(v)?d=$e({},d,v):d[y]=v;continue}if(ht(v)){d=$e({},d,v);continue}d[f]=v}return d};return r}var yg=n=>e=>_g({theme:e,pseudos:yr,configs:vr})(n);function vg(n,e){if(Array.isArray(n))return n;if(ht(n))return e(n);if(n!=null)return[n]}function bg(n,e){for(let t=e+1;t{$e(c,{[x]:d?y[x]:{[v]:y[x]}})});continue}if(!f){d?$e(c,y):c[v]=y;continue}c[v]=y}}return c}}function xg(n){return e=>{var t;const{variant:i,size:r,theme:s}=e,o=Eg(s);return $e({},ct((t=n.baseStyle)!=null?t:{},e),o(n,"sizes",r,e),o(n,"variants",i,e))}}function Cg(n,e={}){var t;const{styleConfig:i,...r}=e,{theme:s,colorMode:o}=Sd(),a=n?na(s,`components.${n}`):void 0,l=i||a,c=$e({theme:s,colorMode:o},(t=l?.defaultProps)!=null?t:{},Ss(ia(r,["children"]))),u=E.useRef({});if(l){const d=xg(l)(c);ra(u.current,d)||(u.current=d)}return u.current}function Rg(n,e={}){return Cg(n,e)}var Tg=new Set([...cg,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),wg=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Sg(n){return wg.has(n)||!Tg.has(n)}var ms,Ig=(ms=xr.default)!=null?ms:xr,Pg=({baseStyle:n})=>e=>{const{theme:t,css:i,__css:r,sx:s,...o}=e,a=sa(o,(h,d)=>hg(d)),l=oa(n,e),c=aa({},r,l,Ss(a),s),u=yg(c)(e.theme);return i?[u,i]:u};function xi(n,e){const{baseStyle:t,...i}=e??{};i.shouldForwardProp||(i.shouldForwardProp=Sg);const r=Pg({baseStyle:t}),s=Ig(n,i)(r);return Ve.forwardRef(function(l,c){const{colorMode:u,forced:h}=ws();return Ve.createElement(s,{ref:c,"data-theme":h?u:void 0,...l})})}function kg(){const n=new Map;return new Proxy(xi,{apply(e,t,i){return xi(...i)},get(e,t){return n.has(t)||n.set(t,xi(t)),n.get(t)}})}var ps=kg();function jo(n){return E.forwardRef(n)}var _s={path:C.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[C.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),C.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),C.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Go=jo((n,e)=>{const{as:t,viewBox:i,color:r="currentColor",focusable:s=!1,children:o,className:a,__css:l,...c}=n,u=Ts("chakra-icon",a),h=Rg("Icon",n),d={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:r,...l,...h},f={ref:e,focusable:s,className:u,__css:d},p=i??_s.viewBox;if(t&&typeof t!="string")return C.jsx(ps.svg,{as:t,...f,...c});const m=o??_s.path;return C.jsx(ps.svg,{verticalAlign:"middle",viewBox:p,...f,...c,children:m})});Go.displayName="Icon";function ni(n){const{viewBox:e="0 0 24 24",d:t,displayName:i,defaultProps:r={}}=n,s=E.Children.toArray(n.path),o=jo((a,l)=>C.jsx(Go,{ref:l,viewBox:e,...r,...a,children:s.length?s:C.jsx("path",{fill:"currentColor",d:t})}));return o.displayName=i,o}var Mg=ni({displayName:"MinusIcon",path:C.jsx("g",{fill:"currentColor",children:C.jsx("rect",{height:"4",width:"20",x:"2",y:"10"})})}),Lg=ni({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"}),Ag=ni({displayName:"ArrowLeftIcon",path:C.jsxs("g",{fill:"currentColor",children:[C.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"}),C.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"})]})}),Og=ni({displayName:"ArrowRightIcon",path:C.jsxs("g",{fill:"currentColor",children:[C.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"}),C.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"})]})});function Fg(n,e,t){const i=E.useContext(Is);return E.useMemo(()=>$o("useService",i).getService(n,e,t??{}),[i,n,e,t])}function Bo(n){const e=E.useContext(Is);return $o("useIntl",e).getIntl(n)}function $o(n,e){if(!e)throw new la(ca.INTERNAL,`"Failed to access package context from '${n}': react integration was not set up properly.`);return e}const Dg="@open-pioneer/experimental-layout-sidebar",Ng=Bo.bind(void 0,Dg),ys=60,vs=180,bs=300;function zg({defaultExpanded:n,expandedChanged:e,sidebarWidthChanged:t,items:i}){const r=Ng(),[s,{toggle:o}]=jg(i),{isOpen:a,onToggle:l}=Tr({defaultIsOpen:n,onOpen(){e?.(!0)},onClose(){e?.(!1)}}),{isOpen:c,onToggle:u}=Tr(),h=s.size>0;E.useEffect(()=>{h&&!c&&u(),!h&&c&&u()},[h]),E.useEffect(()=>{if(t){let m=ys;a&&(m=vs),c&&(m+=bs),t(m)}},[a,c]);const d=i?.map((m,_)=>{const v="white",y=s.has(m.id)?"outline":"ghost";return C.jsx("div",{children:a?C.jsx(Vi,{leftIcon:m.icon,variant:y,colorScheme:v,onClick:()=>o(m),children:m.label},m.id):C.jsx(Ci,{hasArrow:!0,label:m.label,placement:"right",children:C.jsx(Yt,{"aria-label":m.label,variant:y,colorScheme:v,icon:m.icon,onClick:()=>o(m)})},m.id)},_)}),f=i?.filter(m=>s.has(m.id)).map(m=>C.jsxs("div",{className:"content-section",children:[C.jsxs(dt,{className:"content-header",alignItems:"center",children:[C.jsx(Rn,{children:m.label}),C.jsx(wi,{}),C.jsx(ua,{onClick:()=>o(m)})]}),C.jsx("div",{className:"content-body",children:m.content})]},m.id)),p=r.formatMessage({id:a?"toggle.collapse":"toggle.expand"});return C.jsxs(dt,{className:"layout-sidebar",children:[C.jsxs(Rn,{className:"layout-sidebar-main",display:"flex",flexDirection:"column",width:a?`${vs}px`:`${ys}px`,padding:"10px",gap:"10px",children:[d,C.jsx(wi,{}),C.jsx(Ci,{label:p,hasArrow:!0,placement:"right",children:C.jsx(Yt,{"aria-label":p,variant:"ghost",icon:a?C.jsx(Ag,{}):C.jsx(Og,{}),onClick:l})})]}),C.jsx(Rn,{className:"layout-sidebar-content",width:c?`${bs}px`:"0px",children:f})]})}function jg(n){const[e,t]=E.useReducer((r,s)=>{switch(s.type){case"toggle":{const o=new Set(r);return o.has(s.id)?o.delete(s.id):o.add(s.id),o}case"retain":{const o=new Set(s.ids),a=new Set(r);for(const l of a)o.has(l)||a.delete(l);return a}}},void 0,()=>new Set),i=E.useCallback(r=>{t({type:"toggle",id:r.id})},[t]);return E.useEffect(()=>{t({type:"retain",ids:n?.map(r=>r.id)??[]})},[n,t]),[e,{toggle:i}]}const Gg="@open-pioneer/experimental-ol-map",Zo=Fg.bind(void 0,Gg);function Bg(){var n=E.useRef(!1),e=E.useCallback(function(){return n.current},[]);return E.useEffect(function(){return n.current=!0,function(){n.current=!1}},[]),e}function $g(n,e,t){e===void 0&&(e=[]),t===void 0&&(t={loading:!1});var i=E.useRef(0),r=Bg(),s=E.useState(t),o=s[0],a=s[1],l=E.useCallback(function(){for(var c=[],u=0;uawait t.getMap(n.mapId),[n.mapId]);E.useEffect(()=>{if(i.value&&e.current){const s=t.setContainer(n.mapId,e.current);return()=>s.destroy()}},[i.value,t,n.mapId]),E.useEffect(()=>{const s=i.value?.getView();if(n.viewPadding&&s){const o=s.getCenter(),{top:a=0,right:l=0,bottom:c=0,left:u=0}=n.viewPadding;s.padding=[a,l,c,u],s.animate({center:o,duration:300})}},[n.viewPadding,i.value]);const r={height:"100%"};return C.jsx("div",{className:"ol-map-container",ref:e,style:r})}function Er(n){const e=Zo("ol-map.MapRegistry"),t=br(()=>e.getMap(n),[e,n]);return E.useMemo(()=>{if(t.loading)return{loading:!0};if(t.value)return{loading:!1,map:t.value};if(t.error)return{loading:!1,error:t.error};throw new Error("Unexpected state (expected either loading, value or error).")},[t])}const Kg="@open-pioneer/experimental-ol-layer-control",Xo=Bo.bind(void 0,Kg);function Yg(n){const e=Xo(),{loading:t,error:i,map:r}=Er(n.mapId),s=E.useMemo(()=>r?.getAllLayers().reverse()??[],[r]),[o]=Wg(100),a=!t||o()||!1;return C.jsx(ha,{in:a,children:t?C.jsx("div",{children:e.formatMessage({id:"loading"})}):i?C.jsxs("div",{children:[e.formatMessage({id:"error"})," ",i.message]}):C.jsx("div",{children:s.map((l,c)=>C.jsxs("div",{className:"layer-entry",children:[C.jsx(Hg,{layer:l}),n.showOpacitySlider&&C.jsx(qg,{layer:l})]},c))})})}function Hg(n){const e=Xo(),[t,i]=E.useState(n.layer.getVisible()),r=n.layer.getProperties().title??e.formatMessage({id:"undefined-layer-title"}),s=()=>{i(!t),n.layer.setVisible(!t)};return C.jsx(Ls,{className:"layer-select",size:"lg",isChecked:t,onChange:s,children:r})}function qg(n){const[e,t]=E.useState(n.layer.getOpacity()*100),[i,r]=E.useState(!1);return E.useEffect(()=>{const s=n.layer.on("change:opacity",()=>{const o=n.layer.getOpacity()*100;o!==e&&t(Math.round(o))});return()=>Gs(s)},[]),C.jsxs(Ds,{id:"slider",value:e,min:0,max:100,colorScheme:"teal",onChange:s=>n.layer.setOpacity(s/100),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[C.jsx(zs,{children:C.jsx(js,{})}),C.jsx(Ci,{hasArrow:!0,bg:"teal.500",color:"white",placement:"top",isOpen:i,label:`${e}%`,children:C.jsx(Ns,{bg:"teal.500"})})]})}function Qg(n){const{mapId:e,...t}=n,i=E.useRef(null),{map:r}=Er(e);return E.useEffect(()=>{if(i.current&&r){const s=r,o=new yh({units:"metric",target:i.current});return s.addControl(o),()=>{s.removeControl(o)}}},[r]),C.jsx("div",{className:"scale-wrapper",ref:i,...t})}function Jg(n){const{mapId:e,...t}=n,{map:i}=Er(e),r=200;function s(o){const a=i?.getView(),l=a?.getZoom();a&&l!==void 0&&a.animate({zoom:l+(o?1:-1),duration:r})}return C.jsxs(dt,{direction:"column",gap:"1",...t,children:[C.jsx(Yt,{size:"sm","aria-label":"zoom in",colorScheme:"teal",variant:"solid",icon:C.jsx(Lg,{}),onClick:()=>s(!0)}),C.jsx(Yt,{size:"sm","aria-label":"zoom out",colorScheme:"teal",variant:"solid",icon:C.jsx(Mg,{}),onClick:()=>s(!1)})]})}const ef="ol-app",tf=pa.bind(void 0,ef);var Vo={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Es=Ve.createContext&&Ve.createContext(Vo),tt=globalThis&&globalThis.__assign||function(){return tt=Object.assign||function(n){for(var e,t=1,i=arguments.length;tawait r.getMap(Tt)),o=()=>{s.value&&s.value.getView().fit(af,{maxZoom:13})},a=[{id:"mapcontent",icon:C.jsx(of,{}),label:"Karteninhalt",content:C.jsx(Yg,{mapId:Tt,showOpacitySlider:!0})},{id:"sandbox",icon:C.jsx(sf,{}),label:"Sandbox",content:C.jsx(Vi,{onClick:o,children:"Center Berlin"})}];return C.jsxs(dt,{height:"100%",direction:"column",overflow:"hidden",children:[C.jsx(Rn,{textAlign:"center",py:1,children:"Open Pioneer - Map sample"}),C.jsxs(dt,{flex:"1",direction:"column",position:"relative",children:[C.jsx(Ug,{mapId:Tt,viewPadding:n}),C.jsx(Jg,{className:"zoom-controls",mapId:Tt}),C.jsx(zg,{defaultExpanded:t,expandedChanged:l=>i(l),sidebarWidthChanged:l=>e({left:l/2}),items:a})]}),C.jsx(dt,{gap:3,alignItems:"center",justifyContent:"center",children:C.jsx(Qg,{mapId:Tt})})]})}const cf=da({component:lf,appMetadata:Td});customElements.define("ol-map-app",cf); diff --git a/starter/assets/67aabfcef9f7.js b/starter/assets/9192a5c4a707.js similarity index 91% rename from starter/assets/67aabfcef9f7.js rename to starter/assets/9192a5c4a707.js index 2fb6c2ad3..b66239571 100644 --- a/starter/assets/67aabfcef9f7.js +++ b/starter/assets/9192a5c4a707.js @@ -1 +1 @@ -import{f as u,l as j,o as R,j as r,e as m,d as f,v as w,r as d,w as F}from"./ed1045c62907.js";import{E as y}from"./960f2965a833.js";import{u as C}from"./820e0ae9dfd0.js";import{u as k}from"./b7d20d8aaf96.js";import{a as v,b as _,F as S}from"./f9623fa81503.js";import{I as q}from"./795a7a4a06fd.js";import{H as L}from"./b2e1bced439b.js";import{C as O,H as T,T as A}from"./ad369b8c8384.js";import{V as U}from"./448a495d30b4.js";import{B as l}from"./49916b87ef64.js";import"./446cd47ccb2f.js";var h=u(function(e,i){var o;const n=j("FormLabel",e),s=R(e),{className:Y,children:b,requiredIndicator:N=r.jsx(g,{}),optionalIndicator:E=null,...c}=s,a=v(),I=(o=a?.getLabelProps(c,i))!=null?o:{ref:i,...c};return r.jsxs(m.label,{...I,className:f("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...n},children:[b,a?.isRequired?N:E]})});h.displayName="FormLabel";var g=u(function(e,i){const o=v(),n=_();if(!o?.isRequired)return null;const s=f("chakra-form__required-indicator",e.className);return r.jsx(m.span,{...o?.getRequiredIndicatorProps(e,i),__css:n.requiredIndicator,className:s})});g.displayName="RequiredIndicator";const p={DEBUG:0,INFO:1,ERROR:2};class B extends y{level;constructor(e){super(),this.level=M(e.properties)}notify(e,i="INFO"){p[this.level]>p[i]||this.emit("show-notification",{level:i,message:e})}}function M(t){const e=t.notifierLevel;switch(e){case"DEBUG":case"INFO":case"ERROR":return e}throw new Error(`Invalid notifier level: '${e}'.`)}const P={"properties-app":{name:"properties-app",services:{NotifierImpl:{name:"NotifierImpl",clazz:B,provides:[{name:"properties-app.Notifier",qualifier:void 0}],references:{}}},ui:{references:[{name:"properties-app.Notifier",qualifier:void 0,all:!1}]},properties:{notifierLevel:{value:"INFO",required:!1}}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},D="",G=[];function z(t){throw new Error(`Unsupported locale: '${t}'`)}const H=w(D),V=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:z,locales:G,packages:P,styles:H},Symbol.toStringTag,{value:"Module"})),$="properties-app",x=C.bind(void 0,$),K={DEBUG:void 0,INFO:"info",ERROR:"error"};function J(){const t=x("properties-app.Notifier"),e=k();return d.useEffect(()=>{const i=t.on("show-notification",o=>{e({position:"bottom-right",title:o.message,isClosable:!0,status:K[o.level]})});return()=>i.destroy()},[t,e]),null}function Q(){return r.jsxs(r.Fragment,{children:[r.jsx(J,{}),r.jsx(W,{})]})}function W(){const t=x("properties-app.Notifier"),[e,i]=d.useState(""),o=n=>{e&&t.notify(e,n)};return r.jsx(O,{children:r.jsxs(U,{my:"20",children:[r.jsx(T,{size:"m",children:"Notifier Sample"}),r.jsxs(A,{children:["This Form attempts to emit a notification with a certain level when clicking one of the button below. The notifier will ignore notifications with a level lower than ",r.jsx("strong",{children:t.level}),". The notifier's level can be configured using an attribute on the web component element."]}),r.jsxs(S,{pt:"3",children:[r.jsx(h,{children:"Enter a message and click one of the buttons to emit a notification"}),r.jsx(q,{placeholder:"Notification text...",value:e,onChange:n=>i(n.target.value)})]}),r.jsxs(L,{children:[r.jsx(l,{onClick:o.bind(void 0,"DEBUG"),children:"Debug"}),r.jsx(l,{onClick:o.bind(void 0,"INFO"),children:"Info"}),r.jsx(l,{onClick:o.bind(void 0,"ERROR"),children:"Error"})]})]})})}const X=F({component:Q,appMetadata:V,async resolveConfig(t){const e=t.getAttribute("level");return e?{properties:{"properties-app":{notifierLevel:e}}}:void 0}});customElements.define("properties-app",X); +import{f as u,l as j,o as R,j as r,e as m,d as f,v as w,r as d,w as F}from"./ed1045c62907.js";import{E as y}from"./960f2965a833.js";import{u as C}from"./820e0ae9dfd0.js";import{u as k}from"./b7d20d8aaf96.js";import{a as v,b as _,F as S}from"./f9623fa81503.js";import{I as q}from"./795a7a4a06fd.js";import{H as L}from"./b2e1bced439b.js";import{C as O,H as T,T as A}from"./ad369b8c8384.js";import{V as U}from"./448a495d30b4.js";import{B as l}from"./49916b87ef64.js";import"./446cd47ccb2f.js";var h=u(function(e,i){var o;const n=j("FormLabel",e),s=R(e),{className:Y,children:b,requiredIndicator:N=r.jsx(g,{}),optionalIndicator:E=null,...c}=s,a=v(),I=(o=a?.getLabelProps(c,i))!=null?o:{ref:i,...c};return r.jsxs(m.label,{...I,className:f("chakra-form__label",s.className),__css:{display:"block",textAlign:"start",...n},children:[b,a?.isRequired?N:E]})});h.displayName="FormLabel";var g=u(function(e,i){const o=v(),n=_();if(!o?.isRequired)return null;const s=f("chakra-form__required-indicator",e.className);return r.jsx(m.span,{...o?.getRequiredIndicatorProps(e,i),__css:n.requiredIndicator,className:s})});g.displayName="RequiredIndicator";const p={DEBUG:0,INFO:1,ERROR:2};class B extends y{level;constructor(e){super(),this.level=M(e.properties)}notify(e,i="INFO"){p[this.level]>p[i]||this.emit("show-notification",{level:i,message:e})}}function M(t){const e=t.notifierLevel;switch(e){case"DEBUG":case"INFO":case"ERROR":return e}throw new Error(`Invalid notifier level: '${e}'.`)}const P={"properties-app":{name:"properties-app",services:{NotifierImpl:{name:"NotifierImpl",clazz:B,provides:[{name:"properties-app.Notifier",qualifier:void 0}],references:{}}},ui:{references:[{name:"properties-app.Notifier",qualifier:void 0,all:!1}]},properties:{notifierLevel:{value:"INFO",required:!1}}},"@open-pioneer/runtime":{name:"@open-pioneer/runtime",services:{},ui:{references:[]},properties:{}},"@open-pioneer/core":{name:"@open-pioneer/core",services:{},ui:{references:[]},properties:{}},"@open-pioneer/chakra-integration":{name:"@open-pioneer/chakra-integration",services:{},ui:{references:[]},properties:{}},"@open-pioneer/runtime-react-support":{name:"@open-pioneer/runtime-react-support",services:{},ui:{references:[]},properties:{}}},D="",G=[];function z(t){throw new Error(`Unsupported locale: '${t}'`)}const H=w(D),V=Object.freeze(Object.defineProperty({__proto__:null,loadMessages:z,locales:G,packages:P,styles:H},Symbol.toStringTag,{value:"Module"})),$="properties-app",x=C.bind(void 0,$),K={DEBUG:void 0,INFO:"info",ERROR:"error"};function J(){const t=x("properties-app.Notifier"),e=k();return d.useEffect(()=>{const i=t.on("show-notification",o=>{e({position:"bottom-right",title:o.message,isClosable:!0,status:K[o.level]})});return()=>i.destroy()},[t,e]),null}function Q(){return r.jsxs(r.Fragment,{children:[r.jsx(J,{}),r.jsx(W,{})]})}function W(){const t=x("properties-app.Notifier"),[e,i]=d.useState(""),o=n=>{e&&t.notify(e,n)};return r.jsx(O,{children:r.jsxs(U,{my:"20",children:[r.jsx(T,{size:"m",children:"Notifier Sample"}),r.jsxs(A,{children:["This Form attempts to emit a notification with a certain level when clicking one of the button below. The notifier will ignore notifications with a level lower than ",r.jsx("strong",{children:t.level}),". The notifier's level can be configured using an attribute on the web component element."]}),r.jsxs(S,{pt:"3",children:[r.jsx(h,{children:"Enter a message and click one of the buttons to emit a notification"}),r.jsx(q,{placeholder:"Notification text...",value:e,onChange:n=>i(n.target.value)})]}),r.jsxs(L,{children:[r.jsx(l,{onClick:o.bind(void 0,"DEBUG"),children:"Debug"}),r.jsx(l,{onClick:o.bind(void 0,"INFO"),children:"Info"}),r.jsx(l,{onClick:o.bind(void 0,"ERROR"),children:"Error"})]})]})})}const X=F({component:Q,appMetadata:V,async resolveConfig(t){const e=t.getAttribute("level");return e?{properties:{"properties-app":{notifierLevel:e}}}:void 0}});customElements.define("properties-app",X); diff --git a/starter/docs/interfaces/Greeter.html b/starter/docs/interfaces/Greeter.html index f8ab32ba2..b1b8c919f 100644 --- a/starter/docs/interfaces/Greeter.html +++ b/starter/docs/interfaces/Greeter.html @@ -24,7 +24,7 @@

Hierarchy

  • Greeter
+
  • Defined in index.ts:7
  • @@ -46,7 +46,7 @@
    +
  • Defined in index.ts:11