UNPKG

trifid-plugin-yasgui

Version:
3 lines 427 kB
import{$ as yr,$a as Fu,A as _u,Aa as vr,B as pu,Ba as Mr,C as xu,Ca as ba,D as Aa,Da as La,E as ks,Ea as Sr,F as yu,Fa as Ri,G as js,Ga as Gn,H as B,Ha as Ga,I as Eu,Ia as Lt,J as xr,Ja as qi,K as Rn,Ka as Oa,L as Us,La as Cr,M as Kt,Ma as Gu,N as Ti,Na as Ou,O as we,Oa as Hs,P as zs,Pa as Gt,Q as vu,Qa as Ki,R as yt,Ra as Ht,S as ri,Sa as Vt,T as An,Ta as Hi,U as Mu,Ua as Vi,V as Xs,Va as Zi,W as si,Wa as Ai,X as Ws,Xa as $i,Y as In,Ya as oi,Z as Su,Za as Ji,_ as Bs,_a as Nu,a as c_,aa as Ys,ab as Na,b as cu,ba as qs,bb as Du,c as bt,ca as Te,cb as ku,d as ii,da as Cu,db as Fa,e as Fs,ea as Er,eb as ju,f as uu,fa as Ia,fb as _e,g as ni,ga as jt,gb as ae,h as Tn,ha as Pi,hb as Re,i as fu,ia as Ue,ib as Uu,j as Ct,ja as Ks,jb as zu,k as qt,ka as Q,kb as Xu,l as du,la as _t,lb as Wu,m as ge,ma as bn,mb as Bu,n as je,na as wu,nb as Yu,o as wi,oa as Tu,ob as qu,p as mu,pa as Pu,pb as Qi,q as Pn,qa as Ru,qb as Ku,r as Yi,ra as Au,rb as On,s as Ds,sa as lt,sb as Hu,t as U,ta as Iu,tb as Vu,u as K,ua as ze,v as tt,va as bu,w as gu,wa as Ln,x as X,xa as Pe,y as W,ya as Rt,z as wt,za as Lu}from"./chunk-A3ASAXCH.js";var ml=c_((fl,dl)=>{(function(i,t){typeof fl=="object"&&typeof dl<"u"?dl.exports=t():typeof define=="function"&&define.amd?define(t):(i=i||self).RBush=t()})(fl,function(){"use strict";function i(m,g,x,y,E){(function v(M,S,w,R,b){for(;R>w;){if(R-w>600){var L=R-w+1,A=S-w+1,O=Math.log(L),V=.5*Math.exp(2*O/3),z=.5*Math.sqrt(O*V*(L-V)/L)*(A-L/2<0?-1:1),G=Math.max(w,Math.floor(S-A*V/L+z)),N=Math.min(R,Math.floor(S+(L-A)*V/L+z));v(M,S,G,N,b)}var F=M[S],H=w,q=R;for(t(M,w,S),b(M[R],F)>0&&t(M,w,R);H<q;){for(t(M,H,q),H++,q--;b(M[H],F)<0;)H++;for(;b(M[q],F)>0;)q--}b(M[w],F)===0?t(M,w,q):t(M,++q,R),q<=S&&(w=q+1),S<=q&&(R=q-1)}})(m,g,x||0,y||m.length-1,E||e)}function t(m,g,x){var y=m[g];m[g]=m[x],m[x]=y}function e(m,g){return m<g?-1:m>g?1:0}var n=function(m){m===void 0&&(m=9),this._maxEntries=Math.max(4,m),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(m,g,x){if(!x)return g.indexOf(m);for(var y=0;y<g.length;y++)if(x(m,g[y]))return y;return-1}function s(m,g){o(m,0,m.children.length,g,m)}function o(m,g,x,y,E){E||(E=_(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var v=g;v<x;v++){var M=m.children[v];a(E,m.leaf?y(M):M)}return E}function a(m,g){return m.minX=Math.min(m.minX,g.minX),m.minY=Math.min(m.minY,g.minY),m.maxX=Math.max(m.maxX,g.maxX),m.maxY=Math.max(m.maxY,g.maxY),m}function h(m,g){return m.minX-g.minX}function l(m,g){return m.minY-g.minY}function c(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function u(m){return m.maxX-m.minX+(m.maxY-m.minY)}function f(m,g){return m.minX<=g.minX&&m.minY<=g.minY&&g.maxX<=m.maxX&&g.maxY<=m.maxY}function d(m,g){return g.minX<=m.maxX&&g.minY<=m.maxY&&g.maxX>=m.minX&&g.maxY>=m.minY}function _(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(m,g,x,y,E){for(var v=[g,x];v.length;)if(!((x=v.pop())-(g=v.pop())<=y)){var M=g+Math.ceil((x-g)/y/2)*y;i(m,M,g,x,E),v.push(g,M,M,x)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(m){var g=this.data,x=[];if(!d(m,g))return x;for(var y=this.toBBox,E=[];g;){for(var v=0;v<g.children.length;v++){var M=g.children[v],S=g.leaf?y(M):M;d(m,S)&&(g.leaf?x.push(M):f(m,S)?this._all(M,x):E.push(M))}g=E.pop()}return x},n.prototype.collides=function(m){var g=this.data;if(!d(m,g))return!1;for(var x=[];g;){for(var y=0;y<g.children.length;y++){var E=g.children[y],v=g.leaf?this.toBBox(E):E;if(d(m,v)){if(g.leaf||f(m,v))return!0;x.push(E)}}g=x.pop()}return!1},n.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var g=0;g<m.length;g++)this.insert(m[g]);return this}var x=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===x.height)this._splitRoot(this.data,x);else{if(this.data.height<x.height){var y=this.data;this.data=x,x=y}this._insert(x,this.data.height-x.height-1,!0)}else this.data=x;return this},n.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(m,g){if(!m)return this;for(var x,y,E,v=this.data,M=this.toBBox(m),S=[],w=[];v||S.length;){if(v||(v=S.pop(),y=S[S.length-1],x=w.pop(),E=!0),v.leaf){var R=r(m,v.children,g);if(R!==-1)return v.children.splice(R,1),S.push(v),this._condense(S),this}E||v.leaf||!f(v,M)?y?(x++,v=y.children[x],E=!1):v=null:(S.push(v),w.push(x),x=0,y=v,v=v.children[0])}return this},n.prototype.toBBox=function(m){return m},n.prototype.compareMinX=function(m,g){return m.minX-g.minX},n.prototype.compareMinY=function(m,g){return m.minY-g.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(m){return this.data=m,this},n.prototype._all=function(m,g){for(var x=[];m;)m.leaf?g.push.apply(g,m.children):x.push.apply(x,m.children),m=x.pop();return g},n.prototype._build=function(m,g,x,y){var E,v=x-g+1,M=this._maxEntries;if(v<=M)return s(E=_(m.slice(g,x+1)),this.toBBox),E;y||(y=Math.ceil(Math.log(v)/Math.log(M)),M=Math.ceil(v/Math.pow(M,y-1))),(E=_([])).leaf=!1,E.height=y;var S=Math.ceil(v/M),w=S*Math.ceil(Math.sqrt(M));p(m,g,x,w,this.compareMinX);for(var R=g;R<=x;R+=w){var b=Math.min(R+w-1,x);p(m,R,b,S,this.compareMinY);for(var L=R;L<=b;L+=S){var A=Math.min(L+S-1,b);E.children.push(this._build(m,L,A,y-1))}}return s(E,this.toBBox),E},n.prototype._chooseSubtree=function(m,g,x,y){for(;y.push(g),!g.leaf&&y.length-1!==x;){for(var E=1/0,v=1/0,M=void 0,S=0;S<g.children.length;S++){var w=g.children[S],R=c(w),b=(L=m,A=w,(Math.max(A.maxX,L.maxX)-Math.min(A.minX,L.minX))*(Math.max(A.maxY,L.maxY)-Math.min(A.minY,L.minY))-R);b<v?(v=b,E=R<E?R:E,M=w):b===v&&R<E&&(E=R,M=w)}g=M||g.children[0]}var L,A;return g},n.prototype._insert=function(m,g,x){var y=x?m:this.toBBox(m),E=[],v=this._chooseSubtree(y,this.data,g,E);for(v.children.push(m),a(v,y);g>=0&&E[g].children.length>this._maxEntries;)this._split(E,g),g--;this._adjustParentBBoxes(y,E,g)},n.prototype._split=function(m,g){var x=m[g],y=x.children.length,E=this._minEntries;this._chooseSplitAxis(x,E,y);var v=this._chooseSplitIndex(x,E,y),M=_(x.children.splice(v,x.children.length-v));M.height=x.height,M.leaf=x.leaf,s(x,this.toBBox),s(M,this.toBBox),g?m[g-1].children.push(M):this._splitRoot(x,M)},n.prototype._splitRoot=function(m,g){this.data=_([m,g]),this.data.height=m.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(m,g,x){for(var y,E,v,M,S,w,R,b=1/0,L=1/0,A=g;A<=x-g;A++){var O=o(m,0,A,this.toBBox),V=o(m,A,x,this.toBBox),z=(E=O,v=V,M=void 0,S=void 0,w=void 0,R=void 0,M=Math.max(E.minX,v.minX),S=Math.max(E.minY,v.minY),w=Math.min(E.maxX,v.maxX),R=Math.min(E.maxY,v.maxY),Math.max(0,w-M)*Math.max(0,R-S)),G=c(O)+c(V);z<b?(b=z,y=A,L=G<L?G:L):z===b&&G<L&&(L=G,y=A)}return y||x-g},n.prototype._chooseSplitAxis=function(m,g,x){var y=m.leaf?this.compareMinX:h,E=m.leaf?this.compareMinY:l;this._allDistMargin(m,g,x,y)<this._allDistMargin(m,g,x,E)&&m.children.sort(y)},n.prototype._allDistMargin=function(m,g,x,y){m.children.sort(y);for(var E=this.toBBox,v=o(m,0,g,E),M=o(m,x-g,x,E),S=u(v)+u(M),w=g;w<x-g;w++){var R=m.children[w];a(v,m.leaf?E(R):R),S+=u(v)}for(var b=x-g-1;b>=g;b--){var L=m.children[b];a(M,m.leaf?E(L):L),S+=u(M)}return S},n.prototype._adjustParentBBoxes=function(m,g,x){for(var y=x;y>=0;y--)a(g[y],m)},n.prototype._condense=function(m){for(var g=m.length-1,x=void 0;g>=0;g--)m[g].children.length===0?g>0?(x=m[g-1].children).splice(x.indexOf(m[g]),1):this.clear():s(m[g],this.toBBox)},n})});var Vs=globalThis,Zs=Vs.ShadowRoot&&(Vs.ShadyCSS===void 0||Vs.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Da=Symbol(),Zu=new WeakMap,wr=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==Da)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Zs&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=Zu.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Zu.set(e,t))}return t}toString(){return this.cssText}},$u=i=>new wr(typeof i=="string"?i:i+"",void 0,Da),ka=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((n,r,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[s+1],i[0]);return new wr(e,i,Da)},Ju=(i,t)=>{if(Zs)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),r=Vs.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)}},ja=Zs?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return $u(e)})(i):i;var{is:u_,defineProperty:f_,getOwnPropertyDescriptor:d_,getOwnPropertyNames:m_,getOwnPropertySymbols:g_,getPrototypeOf:__}=Object,$s=globalThis,Qu=$s.trustedTypes,p_=Qu?Qu.emptyScript:"",x_=$s.reactiveElementPolyfillSupport,Tr=(i,t)=>i,Pr={toAttribute(i,t){switch(t){case Boolean:i=i?p_:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Js=(i,t)=>!u_(i,t),tf={attribute:!0,type:String,converter:Pr,reflect:!1,useDefault:!1,hasChanged:Js};Symbol.metadata??=Symbol("metadata"),$s.litPropertyMetadata??=new WeakMap;var ai=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=tf){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(t,n,e);r!==void 0&&f_(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){let{get:r,set:s}=d_(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){let a=r?.call(this);s?.call(this,o),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??tf}static _$Ei(){if(this.hasOwnProperty(Tr("elementProperties")))return;let t=__(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Tr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Tr("properties"))){let e=this.properties,n=[...m_(e),...g_(e)];for(let r of n)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,r]of e)this.elementProperties.set(n,r)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let r=this._$Eu(e,n);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let r of n)e.unshift(ja(r))}else t!==void 0&&e.push(ja(t));return e}static _$Eu(t,e){let n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ju(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(r!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Pr).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){let n=this.constructor,r=n._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let s=n.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Pr;this._$Em=r;let a=o.fromAttribute(e,s.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,n,r=!1,s){if(t!==void 0){let o=this.constructor;if(r===!1&&(s=this[t]),n??=o.getPropertyOptions(t),!((n.hasChanged??Js)(s,e)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:s},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),s!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,s]of n){let{wrapped:o}=s,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,s,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};ai.elementStyles=[],ai.shadowRootOptions={mode:"open"},ai[Tr("elementProperties")]=new Map,ai[Tr("finalized")]=new Map,x_?.({ReactiveElement:ai}),($s.reactiveElementVersions??=[]).push("2.1.2");var qa=globalThis,ef=i=>i,Qs=qa.trustedTypes,nf=Qs?Qs.createPolicy("lit-html",{createHTML:i=>i}):void 0,lf="$lit$",Ii=`lit$${Math.random().toFixed(9).slice(2)}$`,cf="?"+Ii,y_=`<${cf}>`,nn=document,Ar=()=>nn.createComment(""),Ir=i=>i===null||typeof i!="object"&&typeof i!="function",Ka=Array.isArray,E_=i=>Ka(i)||typeof i?.[Symbol.iterator]=="function",Ua=`[ \f\r]`,Rr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rf=/-->/g,sf=/>/g,tn=RegExp(`>|${Ua}(?:([^\\s"'>=/]+)(${Ua}*=${Ua}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),of=/'/g,af=/"/g,uf=/^(?:script|style|textarea|title)$/i,Ha=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Dn=Ha(1),d2=Ha(2),m2=Ha(3),rn=Symbol.for("lit-noChange"),Tt=Symbol.for("lit-nothing"),hf=new WeakMap,en=nn.createTreeWalker(nn,129);function ff(i,t){if(!Ka(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return nf!==void 0?nf.createHTML(t):t}var v_=(i,t)=>{let e=i.length-1,n=[],r,s=t===2?"<svg>":t===3?"<math>":"",o=Rr;for(let a=0;a<e;a++){let h=i[a],l,c,u=-1,f=0;for(;f<h.length&&(o.lastIndex=f,c=o.exec(h),c!==null);)f=o.lastIndex,o===Rr?c[1]==="!--"?o=rf:c[1]!==void 0?o=sf:c[2]!==void 0?(uf.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=tn):c[3]!==void 0&&(o=tn):o===tn?c[0]===">"?(o=r??Rr,u=-1):c[1]===void 0?u=-2:(u=o.lastIndex-c[2].length,l=c[1],o=c[3]===void 0?tn:c[3]==='"'?af:of):o===af||o===of?o=tn:o===rf||o===sf?o=Rr:(o=tn,r=void 0);let d=o===tn&&i[a+1].startsWith("/>")?" ":"";s+=o===Rr?h+y_:u>=0?(n.push(l),h.slice(0,u)+lf+h.slice(u)+Ii+d):h+Ii+(u===-2?a:d)}return[ff(i,s+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},br=class i{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let s=0,o=0,a=t.length-1,h=this.parts,[l,c]=v_(t,e);if(this.el=i.createElement(l,n),en.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(r=en.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let u of r.getAttributeNames())if(u.endsWith(lf)){let f=c[o++],d=r.getAttribute(u).split(Ii),_=/([.?@])?(.*)/.exec(f);h.push({type:1,index:s,name:_[2],strings:d,ctor:_[1]==="."?Xa:_[1]==="?"?Wa:_[1]==="@"?Ba:Fn}),r.removeAttribute(u)}else u.startsWith(Ii)&&(h.push({type:6,index:s}),r.removeAttribute(u));if(uf.test(r.tagName)){let u=r.textContent.split(Ii),f=u.length-1;if(f>0){r.textContent=Qs?Qs.emptyScript:"";for(let d=0;d<f;d++)r.append(u[d],Ar()),en.nextNode(),h.push({type:2,index:++s});r.append(u[f],Ar())}}}else if(r.nodeType===8)if(r.data===cf)h.push({type:2,index:s});else{let u=-1;for(;(u=r.data.indexOf(Ii,u+1))!==-1;)h.push({type:7,index:s}),u+=Ii.length-1}s++}}static createElement(t,e){let n=nn.createElement("template");return n.innerHTML=t,n}};function Nn(i,t,e=i,n){if(t===rn)return t;let r=n!==void 0?e._$Co?.[n]:e._$Cl,s=Ir(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(i),r._$AT(i,e,n)),n!==void 0?(e._$Co??=[])[n]=r:e._$Cl=r),r!==void 0&&(t=Nn(i,r._$AS(i,t.values),r,n)),t}var za=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??nn).importNode(e,!0);en.currentNode=r;let s=en.nextNode(),o=0,a=0,h=n[0];for(;h!==void 0;){if(o===h.index){let l;h.type===2?l=new Lr(s,s.nextSibling,this,t):h.type===1?l=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(l=new Ya(s,this,t)),this._$AV.push(l),h=n[++a]}o!==h?.index&&(s=en.nextNode(),o++)}return en.currentNode=nn,r}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},Lr=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=Tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Nn(this,t,e),Ir(t)?t===Tt||t==null||t===""?(this._$AH!==Tt&&this._$AR(),this._$AH=Tt):t!==this._$AH&&t!==rn&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):E_(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Tt&&Ir(this._$AH)?this._$AA.nextSibling.data=t:this.T(nn.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,r=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=br.createElement(ff(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{let s=new za(r,this),o=s.u(this.options);s.p(e),this.T(o),this._$AH=s}}_$AC(t){let e=hf.get(t.strings);return e===void 0&&hf.set(t.strings,e=new br(t)),e}k(t){Ka(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,r=0;for(let s of t)r===e.length?e.push(n=new i(this.O(Ar()),this.O(Ar()),this,this.options)):n=e[r],n._$AI(s),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let n=ef(t).nextSibling;ef(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Fn=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,s){this.type=1,this._$AH=Tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Tt}_$AI(t,e=this,n,r){let s=this.strings,o=!1;if(s===void 0)t=Nn(this,t,e,0),o=!Ir(t)||t!==this._$AH&&t!==rn,o&&(this._$AH=t);else{let a=t,h,l;for(t=s[0],h=0;h<s.length-1;h++)l=Nn(this,a[n+h],e,h),l===rn&&(l=this._$AH[h]),o||=!Ir(l)||l!==this._$AH[h],l===Tt?t=Tt:t!==Tt&&(t+=(l??"")+s[h+1]),this._$AH[h]=l}o&&!r&&this.j(t)}j(t){t===Tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Xa=class extends Fn{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Tt?void 0:t}},Wa=class extends Fn{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Tt)}},Ba=class extends Fn{constructor(t,e,n,r,s){super(t,e,n,r,s),this.type=5}_$AI(t,e=this){if((t=Nn(this,t,e,0)??Tt)===rn)return;let n=this._$AH,r=t===Tt&&n!==Tt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==Tt&&(n===Tt||r);r&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Ya=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Nn(this,t)}};var M_=qa.litHtmlPolyfillSupport;M_?.(br,Lr),(qa.litHtmlVersions??=[]).push("3.3.3");var df=(i,t,e)=>{let n=e?.renderBefore??t,r=n._$litPart$;if(r===void 0){let s=e?.renderBefore??null;n._$litPart$=r=new Lr(t.insertBefore(Ar(),s),s,void 0,e??{})}return r._$AI(i),r};var Va=globalThis,Ot=class extends ai{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=df(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return rn}};Ot._$litElement$=!0,Ot.finalized=!0,Va.litElementHydrateSupport?.({LitElement:Ot});var S_=Va.litElementPolyfillSupport;S_?.({LitElement:Ot});(Va.litElementVersions??=[]).push("4.2.2");var C_={attribute:!0,type:String,converter:Pr,reflect:!1,hasChanged:Js},w_=(i=C_,t,e)=>{let{kind:n,metadata:r}=e,s=globalThis.litPropertyMetadata.get(r);if(s===void 0&&globalThis.litPropertyMetadata.set(r,s=new Map),n==="setter"&&((i=Object.create(i)).wrapped=!0),s.set(e.name,i),n==="accessor"){let{name:o}=e;return{set(a){let h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,i,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(n==="setter"){let{name:o}=e;return function(a){let h=this[o];t.call(this,a),this.requestUpdate(o,h,i,!0,a)}}throw Error("Unsupported decorator location: "+n)};function Y(i){return(t,e)=>typeof e=="object"?w_(i,t,e):((n,r,s)=>{let o=r.hasOwnProperty(s);return r.constructor.createProperty(s,n),o?Object.getOwnPropertyDescriptor(r,s):void 0})(i,t,e)}var sn=(i,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(i,t,e),e);function mf(i,t){return(e,n,r)=>{let s=o=>o.renderRoot?.querySelector(i)??null;if(t){let{get:o,set:a}=typeof n=="object"?e:r??(()=>{let h=Symbol();return{get(){return this[h]},set(l){this[h]=l}}})();return sn(e,n,{get(){let h=o.call(this);return h===void 0&&(h=s(this),(h!==null||this.hasUpdated)&&a.call(this,h)),h}})}return sn(e,n,{get(){return s(this)}})}}var ft={ADD:"add",REMOVE:"remove"};var gf={LENGTH:"length"},kn=class extends bt{constructor(t,e,n){super(t),this.element=e,this.index=n}},Za=class extends wt{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){let e=this.array_;for(let n=0,r=e.length;n<r;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(gf.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new kn(ft.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);let e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){let e=this.array_;for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;let e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new kn(ft.REMOVE,e,t)),e}setAt(t,e){let n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);let r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new kn(ft.REMOVE,r,t)),this.dispatchEvent(new kn(ft.ADD,e,t))}updateLength_(){this.set(gf.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new _u(58)}},At=Za;var hM=new Array(6);function Nt(){return[1,0,0,1,0,0]}function T_(i,t,e,n,r,s,o){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i[4]=s,i[5]=o,i}function pf(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function dt(i,t){let e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function xf(i,t,e){return T_(i,t,0,0,e,0,0)}function Ut(i,t,e,n,r,s,o,a){let h=Math.sin(s),l=Math.cos(s);return i[0]=n*l,i[1]=r*h,i[2]=-n*h,i[3]=r*l,i[4]=o*n*l-a*n*h+t,i[5]=o*r*h+a*r*l+e,i}function jn(i,t){let e=P_(t);B(e!==0,32);let n=t[0],r=t[1],s=t[2],o=t[3],a=t[4],h=t[5];return i[0]=o/e,i[1]=-r/e,i[2]=-s/e,i[3]=n/e,i[4]=(s*h-o*a)/e,i[5]=-(n*h-r*a)/e,i}function P_(i){return i[0]*i[3]-i[1]*i[2]}var _f;function to(i){let t="matrix("+i.join(", ")+")";if(yu)return t;let e=_f||(_f=document.createElement("div"));return e.style.transform=t,e.style.transform}var it={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"};var $a=class extends wt{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[it.OPACITY]=t.opacity!==void 0?t.opacity:1,B(typeof e[it.OPACITY]=="number",64),e[it.VISIBLE]=t.visible!==void 0?t.visible:!0,e[it.Z_INDEX]=t.zIndex,e[it.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[it.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[it.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[it.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=lt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return X()}getLayerStatesArray(t){return X()}getExtent(){return this.get(it.EXTENT)}getMaxResolution(){return this.get(it.MAX_RESOLUTION)}getMinResolution(){return this.get(it.MIN_RESOLUTION)}getMinZoom(){return this.get(it.MIN_ZOOM)}getMaxZoom(){return this.get(it.MAX_ZOOM)}getOpacity(){return this.get(it.OPACITY)}getSourceState(){return X()}getVisible(){return this.get(it.VISIBLE)}getZIndex(){return this.get(it.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(it.EXTENT,t)}setMaxResolution(t){this.set(it.MAX_RESOLUTION,t)}setMinResolution(t){this.set(it.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(it.MAX_ZOOM,t)}setMinZoom(t){this.set(it.MIN_ZOOM,t)}setOpacity(t){B(typeof t=="number",64),this.set(it.OPACITY,t)}setVisible(t){this.set(it.VISIBLE,t)}setZIndex(t){this.set(it.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},eo=$a;var zt={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var Et={ANIMATING:0,INTERACTING:1};var pe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var Ae={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var Ja=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ae[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},Un=Ja;var Gr=6378137,zn=Math.PI*Gr,R_=[-zn,-zn,zn,zn],A_=[-180,-85,180,85],io=Gr*Math.log(Math.tan(Math.PI/2)),bi=class extends Un{constructor(t){super({code:t,units:"m",extent:R_,global:!0,worldExtent:A_,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Gr)}})}},Qa=[new bi("EPSG:3857"),new bi("EPSG:102100"),new bi("EPSG:102113"),new bi("EPSG:900913"),new bi("http://www.opengis.net/def/crs/EPSG/0/3857"),new bi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function yf(i,t,e){let n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e){t[r]=zn*i[r]/180;let s=Gr*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));s>io?s=io:s<-io&&(s=-io),t[r+1]=s}return t}function Ef(i,t,e){let n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e)t[r]=180*i[r]/zn,t[r+1]=360*Math.atan(Math.exp(i[r+1]/Gr))/Math.PI-90;return t}var I_=6378137,vf=[-180,-90,180,90],b_=Math.PI*I_/180,hi=class extends Un{constructor(t,e){super({code:t,units:"degrees",extent:vf,axisOrientation:e,global:!0,metersPerUnit:b_,worldExtent:vf})}},th=[new hi("CRS:84"),new hi("EPSG:4326","neu"),new hi("urn:ogc:def:crs:OGC:1.3:CRS84"),new hi("urn:ogc:def:crs:OGC:2:84"),new hi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new hi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new hi("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var eh={};function Mf(i){return eh[i]||eh[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Sf(i,t){eh[i]=t}var Xn={};function on(i,t,e){let n=i.getCode(),r=t.getCode();n in Xn||(Xn[n]={}),Xn[n][r]=e}function no(i,t){let e;return i in Xn&&t in Xn[i]&&(e=Xn[i][t]),e}function Cf(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function an(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Wn(i,t){let e=Math.cos(t),n=Math.sin(t),r=i[0]*e-i[1]*n,s=i[1]*e+i[0]*n;return i[0]=r,i[1]=s,i}function wf(i,t){return i[0]*=t,i[1]*=t,i}function ro(i,t){if(t.canWrapX()){let e=Q(t.getExtent()),n=ih(i,t,e);n&&(i[0]-=n*e)}return i}function ih(i,t,e){let n=t.getExtent(),r=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Q(n),r=Math.floor((i[0]-n[0])/e)),r}var L_=63710088e-1;function nh(i,t,e){e=e||L_;let n=Ln(i[1]),r=Ln(t[1]),s=(r-n)/2,o=Ln(t[0]-i[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}var Tf={info:1,warn:2,error:3,none:4},G_=Tf.info;function so(...i){G_>Tf.warn||console.warn(...i)}var rh=!0;function sh(i){rh=!(i===void 0?!0:i)}function oh(i,t){if(t!==void 0){for(let e=0,n=i.length;e<n;++e)t[e]=i[e];t=t}else t=i.slice();return t}function Rf(i,t){if(t!==void 0&&i!==t){for(let e=0,n=i.length;e<n;++e)t[e]=i[e];i=t}return i}function ah(i){Sf(i.getCode(),i),on(i,i,oh)}function O_(i){i.forEach(ah)}function Z(i){return typeof i=="string"?Mf(i):i||null}function hh(i,t,e,n){i=Z(i);let r,s=i.getPointResolutionFunc();if(s){if(r=s(t,e),n&&n!==i.getUnits()){let o=i.getMetersPerUnit();o&&(r=r*o/Ae[n])}}else{let o=i.getUnits();if(o=="degrees"&&!n||n=="degrees")r=t;else{let a=Nr(i,Z("EPSG:4326"));if(a===Rf&&o!=="degrees")r=t*i.getMetersPerUnit();else{let l=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];l=a(l,l,2);let c=nh(l.slice(0,2),l.slice(2,4)),u=nh(l.slice(4,6),l.slice(6,8));r=(c+u)/2}let h=n?Ae[n]:i.getMetersPerUnit();h!==void 0&&(r/=h)}}return r}function oo(i){O_(i),i.forEach(function(t){i.forEach(function(e){t!==e&&on(t,e,oh)})})}function N_(i,t,e,n){i.forEach(function(r){t.forEach(function(s){on(r,s,e),on(s,r,n)})})}function ao(i,t){return i?typeof i=="string"?Z(i):i:Z(t)}function Pf(i){return(function(t,e,n){let r=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(r);for(let s=0;s<r;s+=n){let o=i(t.slice(s,s+n)),a=o.length;for(let h=0,l=n;h<l;++h)e[s+h]=h>=a?t[s+h]:o[h]}return e})}function Af(i,t,e,n){let r=Z(i),s=Z(t);on(r,s,Pf(e)),on(s,r,Pf(n))}function Or(i,t){return sh(),Bn(i,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function If(i,t){let e=Bn(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=Pe(n+180,360)-180),e}function he(i,t){if(i===t)return!0;let e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Nr(i,t)===oh)&&e}function Nr(i,t){let e=i.getCode(),n=t.getCode(),r=no(e,n);return r||(r=Rf),r}function hn(i,t){let e=Z(i),n=Z(t);return Nr(e,n)}function Bn(i,t,e){return hn(t,e)(i,void 0,i.length)}function Fr(i,t,e,n){let r=hn(t,e);return Pu(i,r,void 0,n)}var Ie=null;function ho(){return Ie}function Dr(i,t){return Ie?Bn(i,t,Ie):i}function be(i,t){return Ie?Bn(i,Ie,t):(rh&&!an(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(rh=!1,so("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i)}function Yn(i,t){return Ie?Fr(i,t,Ie):i}function Le(i,t){return Ie?Fr(i,Ie,t):i}function bf(i,t){if(!Ie)return i;let e=Z(t).getUnits(),n=Ie.getUnits();return e&&n?i*Ae[e]/Ae[n]:i}function lh(i,t,e){return function(n){let r,s;if(i.canWrapX()){let o=i.getExtent(),a=Q(o);n=n.slice(0),s=ih(n,i,a),s&&(n[0]=n[0]-s*a),n[0]=lt(n[0],o[0],o[2]),n[1]=lt(n[1],o[1],o[3]),r=e(n)}else r=e(n);return s&&t.canWrapX()&&(r[0]+=s*Q(t.getExtent())),r}}function F_(){oo(Qa),oo(th),N_(th,Qa,yf,Ef)}F_();function ch(i,t,e){return(function(n,r,s,o,a){if(!n)return;if(!r&&!t)return n;let h=t?0:s[0]*r,l=t?0:s[1]*r,c=a?a[0]:0,u=a?a[1]:0,f=i[0]+h/2+c,d=i[2]-h/2+c,_=i[1]+l/2+u,p=i[3]-l/2+u;f>d&&(f=(d+f)/2,d=f),_>p&&(_=(p+_)/2,p=_);let m=lt(n[0],f,d),g=lt(n[1],_,p);if(o&&e&&r){let x=30*r;m+=-x*Math.log(1+Math.max(0,f-n[0])/x)+x*Math.log(1+Math.max(0,n[0]-d)/x),g+=-x*Math.log(1+Math.max(0,_-n[1])/x)+x*Math.log(1+Math.max(0,n[1]-p)/x)}return[m,g]})}function Lf(i){return i}function uh(i,t,e,n){let r=Q(t)/e[0],s=jt(t)/e[1];return n?Math.min(i,Math.max(r,s)):Math.min(i,Math.min(r,s))}function fh(i,t,e){let n=Math.min(i,t),r=50;return n*=Math.log(1+r*Math.max(0,i/t-1))/r+1,e&&(n=Math.max(n,e),n/=Math.log(1+r*Math.max(0,e/i-1))/r+1),lt(n,e/2,t*2)}function Gf(i,t,e,n){return t=t!==void 0?t:!0,(function(r,s,o,a){if(r!==void 0){let h=i[0],l=i[i.length-1],c=e?uh(h,e,o,n):h;if(a)return t?fh(r,c,l):lt(r,l,c);let u=Math.min(c,r),f=Math.floor(Tn(i,u,s));return i[f]>c&&f<i.length-1?i[f+1]:i[f]}})}function Of(i,t,e,n,r,s){return n=n!==void 0?n:!0,e=e!==void 0?e:0,(function(o,a,h,l){if(o!==void 0){let c=r?uh(t,r,h,s):t;if(l)return n?fh(o,c,e):lt(o,e,c);let u=1e-9,f=Math.ceil(Math.log(t/c)/Math.log(i)-u),d=-a*(.5-u)+.5,_=Math.min(c,o),p=Math.floor(Math.log(t/_)/Math.log(i)+d),m=Math.max(f,p),g=t/Math.pow(i,m);return lt(g,e,c)}})}function dh(i,t,e,n,r){return e=e!==void 0?e:!0,(function(s,o,a,h){if(s!==void 0){let l=n?uh(i,n,a,r):i;return!e||!h?lt(s,t,l):fh(s,l,t)}})}function qn(i){if(i!==void 0)return 0}function mh(i){if(i!==void 0)return i}function Nf(i){let t=2*Math.PI/i;return(function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e})}function Ff(i){return i=i||Ln(5),(function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t})}function gh(i){return Math.pow(i,3)}function xe(i){return 1-gh(1-i)}function Df(i){return 3*i*i-2*i*i*i}function kf(i){return i}function ye(i,t,e,n,r,s){s=s||[];let o=0;for(let a=t;a<e;a+=n){let h=i[a],l=i[a+1];s[o++]=r[0]*h+r[2]*l+r[4],s[o++]=r[1]*h+r[3]*l+r[5]}return s&&s.length!=o&&(s.length=o),s}function lo(i,t,e,n,r,s,o){o=o||[];let a=Math.cos(r),h=Math.sin(r),l=s[0],c=s[1],u=0;for(let f=t;f<e;f+=n){let d=i[f]-l,_=i[f+1]-c;o[u++]=l+d*a-_*h,o[u++]=c+d*h+_*a;for(let p=f+2;p<f+n;++p)o[u++]=i[p]}return o&&o.length!=u&&(o.length=u),o}function jf(i,t,e,n,r,s,o,a){a=a||[];let h=o[0],l=o[1],c=0;for(let u=t;u<e;u+=n){let f=i[u]-h,d=i[u+1]-l;a[c++]=h+r*f,a[c++]=l+s*d;for(let _=u+2;_<u+n;++_)a[c++]=i[_]}return a&&a.length!=c&&(a.length=c),a}function Uf(i,t,e,n,r,s,o){o=o||[];let a=0;for(let h=t;h<e;h+=n){o[a++]=i[h]+r,o[a++]=i[h+1]+s;for(let l=h+2;l<h+n;++l)o[a++]=i[l]}return o&&o.length!=a&&(o.length=a),o}var zf=Nt(),_h=class extends wt{constructor(){super(),this.extent_=yt(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=mu(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);let r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return X()}closestPointXY(t,e,n,r){return X()}containsXY(t,e){let n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return X()}getExtent(t){if(this.extentRevision_!=this.getRevision()){let e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&An(e),this.extentRevision_=this.getRevision()}return wu(this.extent_,t)}rotate(t,e){X()}scale(t,e,n){X()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return X()}getType(){return X()}applyTransform(t){X()}intersectsExtent(t){return X()}translate(t,e){X()}transform(t,e){let n=Z(t),r=n.getUnits()=="tile-pixels"?function(s,o,a){let h=n.getExtent(),l=n.getWorldExtent(),c=jt(l)/jt(h);return Ut(zf,l[0],l[3],c,-c,0,0,0),ye(s,0,s.length,a,zf,o),hn(n,e)(s,o,a)}:hn(n,e);return this.applyTransform(r),this}},co=_h;var ph=class extends co{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Xs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return X()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=Xf(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){X()}setLayout(t,e,n){let r;if(t)r=Xf(t);else{for(let s=0;s<n;++s){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}r=e.length,t=D_(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){let n=this.getFlatCoordinates();if(n){let r=this.getStride();lo(n,0,n.length,r,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Te(this.getExtent()));let r=this.getFlatCoordinates();if(r){let s=this.getStride();jf(r,0,r.length,s,t,e,n,r),this.changed()}}translate(t,e){let n=this.getFlatCoordinates();if(n){let r=this.getStride();Uf(n,0,n.length,r,t,e,n),this.changed()}}};function D_(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function Xf(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Wf(i,t,e){let n=i.getFlatCoordinates();if(!n)return null;let r=i.getStride();return ye(n,0,n.length,r,t,e)}var Zt=ph;function Bf(i,t,e,n,r,s,o){let a=i[t],h=i[t+1],l=i[e]-a,c=i[e+1]-h,u;if(l===0&&c===0)u=t;else{let f=((r-a)*l+(s-h)*c)/(l*l+c*c);if(f>1)u=e;else if(f>0){for(let d=0;d<n;++d)o[d]=Rt(i[t+d],i[e+d],f);o.length=n;return}else u=t}for(let f=0;f<n;++f)o[f]=i[u+f];o.length=n}function kr(i,t,e,n,r){let s=i[t],o=i[t+1];for(t+=n;t<e;t+=n){let a=i[t],h=i[t+1],l=ze(s,o,a,h);l>r&&(r=l),s=a,o=h}return r}function jr(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];r=kr(i,t,a,n,r),t=a}return r}function Yf(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];r=jr(i,t,a,n,r),t=a[a.length-1]}return r}function Ur(i,t,e,n,r,s,o,a,h,l,c){if(t==e)return l;let u,f;if(r===0){if(f=ze(o,a,i[t],i[t+1]),f<l){for(u=0;u<n;++u)h[u]=i[t+u];return h.length=n,f}return l}c=c||[NaN,NaN];let d=t+n;for(;d<e;)if(Bf(i,d-n,d,n,o,a,c),f=ze(o,a,c[0],c[1]),f<l){for(l=f,u=0;u<n;++u)h[u]=c[u];h.length=n,d+=n}else d+=n*Math.max((Math.sqrt(f)-Math.sqrt(l))/r|0,1);if(s&&(Bf(i,e-n,t,n,o,a,c),f=ze(o,a,c[0],c[1]),f<l)){for(l=f,u=0;u<n;++u)h[u]=c[u];h.length=n}return l}function zr(i,t,e,n,r,s,o,a,h,l,c){c=c||[NaN,NaN];for(let u=0,f=e.length;u<f;++u){let d=e[u];l=Ur(i,t,d,n,r,s,o,a,h,l,c),t=d}return l}function qf(i,t,e,n,r,s,o,a,h,l,c){c=c||[NaN,NaN];for(let u=0,f=e.length;u<f;++u){let d=e[u];l=zr(i,t,d,n,r,s,o,a,h,l,c),t=d[d.length-1]}return l}function Kf(i,t,e,n){for(let r=0,s=e.length;r<s;++r)i[t++]=e[r];return t}function ln(i,t,e,n){for(let r=0,s=e.length;r<s;++r){let o=e[r];for(let a=0;a<n;++a)i[t++]=o[a]}return t}function Xr(i,t,e,n,r){r=r||[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=ln(i,t,e[o],n);r[s++]=h,t=h}return r.length=s,r}function Hf(i,t,e,n,r){r=r||[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=Xr(i,t,e[o],n,r[s]);h.length===0&&(h[0]=t),r[s++]=h,t=h[h.length-1]}return r.length=s,r}function Wr(i,t,e,n,r,s,o){let a=(e-t)/n;if(a<3){for(;t<e;t+=n)s[o++]=i[t],s[o++]=i[t+1];return o}let h=new Array(a);h[0]=1,h[a-1]=1;let l=[t,e-n],c=0;for(;l.length>0;){let u=l.pop(),f=l.pop(),d=0,_=i[f],p=i[f+1],m=i[u],g=i[u+1];for(let x=f+n;x<u;x+=n){let y=i[x],E=i[x+1],v=Iu(y,E,_,p,m,g);v>d&&(c=x,d=v)}d>r&&(h[(c-t)/n]=1,f+n<c&&l.push(f,c),c+n<u&&l.push(c,u))}for(let u=0;u<a;++u)h[u]&&(s[o++]=i[t+u*n],s[o++]=i[t+u*n+1]);return o}function Vf(i,t,e,n,r,s,o,a){for(let h=0,l=e.length;h<l;++h){let c=e[h];o=Wr(i,t,c,n,r,s,o),a.push(o),t=c}return o}function Li(i,t){return t*Math.round(i/t)}function k_(i,t,e,n,r,s,o){if(t==e)return o;let a=Li(i[t],r),h=Li(i[t+1],r);t+=n,s[o++]=a,s[o++]=h;let l,c;do if(l=Li(i[t],r),c=Li(i[t+1],r),t+=n,t==e)return s[o++]=l,s[o++]=c,o;while(l==a&&c==h);for(;t<e;){let u=Li(i[t],r),f=Li(i[t+1],r);if(t+=n,u==l&&f==c)continue;let d=l-a,_=c-h,p=u-a,m=f-h;if(d*m==_*p&&(d<0&&p<d||d==p||d>0&&p>d)&&(_<0&&m<_||_==m||_>0&&m>_)){l=u,c=f;continue}s[o++]=l,s[o++]=c,a=l,h=c,l=u,c=f}return s[o++]=l,s[o++]=c,o}function xh(i,t,e,n,r,s,o,a){for(let h=0,l=e.length;h<l;++h){let c=e[h];o=k_(i,t,c,n,r,s,o),a.push(o),t=c}return o}function Zf(i,t,e,n,r,s,o,a){for(let h=0,l=e.length;h<l;++h){let c=e[h],u=[];o=xh(i,t,c,n,r,s,o,u),a.push(u),t=c[c.length-1]}return o}function Ee(i,t,e,n,r){r=r!==void 0?r:[];let s=0;for(let o=t;o<e;o+=n)r[s++]=i.slice(o,o+n);return r.length=s,r}function Gi(i,t,e,n,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=e[o];r[s++]=Ee(i,t,h,n,r[s]),t=h}return r.length=s,r}function Br(i,t,e,n,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=e[o];r[s++]=h.length===1&&h[0]===t?[]:Gi(i,t,h,n,r[s]),t=h[h.length-1]}return r.length=s,r}function yh(i,t,e,n){let r=0,s=i[e-n],o=i[e-n+1];for(;t<e;t+=n){let a=i[t],h=i[t+1];r+=o*a-s*h,s=a,o=h}return r/2}function Eh(i,t,e,n){let r=0;for(let s=0,o=e.length;s<o;++s){let a=e[s];r+=yh(i,t,a,n),t=a}return r}function $f(i,t,e,n){let r=0;for(let s=0,o=e.length;s<o;++s){let a=e[s];r+=Eh(i,t,a,n),t=a[a.length-1]}return r}var vh=class i extends Zt{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new i(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,r){return r<Kt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(kr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ur(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))}getArea(){return yh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Ee(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){let e=[];return e.length=Wr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new i(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ln(this.flatCoordinates,0,t,this.stride),this.changed()}},Mh=vh;var Sh=class i extends Zt{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){let t=new i(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){let s=this.flatCoordinates,o=ze(t,e,s[0],s[1]);if(o<r){let a=this.stride;for(let h=0;h<a;++h)n[h]=s[h];return n.length=a,o}return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return Mu(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return zs(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Kf(this.flatCoordinates,0,t,this.stride),this.changed()}},Xe=Sh;function Jf(i,t,e,n,r){return!Bs(r,function(o){return!Oi(i,t,e,n,o[0],o[1])})}function Oi(i,t,e,n,r,s){let o=0,a=i[e-n],h=i[e-n+1];for(;t<e;t+=n){let l=i[t],c=i[t+1];h<=s?c>s&&(l-a)*(s-h)-(r-a)*(c-h)>0&&o++:c<=s&&(l-a)*(s-h)-(r-a)*(c-h)<0&&o--,a=l,h=c}return o!==0}function Yr(i,t,e,n,r,s){if(e.length===0||!Oi(i,t,e[0],n,r,s))return!1;for(let o=1,a=e.length;o<a;++o)if(Oi(i,e[o-1],e[o],n,r,s))return!1;return!0}function Qf(i,t,e,n,r,s){if(e.length===0)return!1;for(let o=0,a=e.length;o<a;++o){let h=e[o];if(Yr(i,t,h,n,r,s))return!0;t=h[h.length-1]}return!1}function Ch(i,t,e,n,r,s,o){let a,h,l,c,u,f,d,_=r[s+1],p=[];for(let x=0,y=e.length;x<y;++x){let E=e[x];for(c=i[E-n],f=i[E-n+1],a=t;a<E;a+=n)u=i[a],d=i[a+1],(_<=f&&d<=_||f<=_&&_<=d)&&(l=(_-f)/(d-f)*(u-c)+c,p.push(l)),c=u,f=d}let m=NaN,g=-1/0;for(p.sort(ni),c=p[0],a=1,h=p.length;a<h;++a){u=p[a];let x=Math.abs(u-c);x>g&&(l=(c+u)/2,Yr(i,t,e,n,l,_)&&(m=l,g=x)),c=u}return isNaN(m)&&(m=r[s]),o?(o.push(m,_,g),o):[m,_,g]}function td(i,t,e,n,r){let s=[];for(let o=0,a=e.length;o<a;++o){let h=e[o];s=Ch(i,t,h,n,r,2*o,s),t=h[h.length-1]}return s}function uo(i,t,e,n,r){let s;for(t+=n;t<e;t+=n)if(s=r(i.slice(t-n,t),i.slice(t,t+n)),s)return s;return!1}function qr(i,t,e,n,r){let s=Su(yt(),i,t,e,n);return _t(r,s)?we(r,s)||s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:uo(i,t,e,n,function(o,a){return Tu(r,o,a)}):!1}function ed(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){if(qr(i,t,e[s],n,r))return!0;t=e[s]}return!1}function wh(i,t,e,n,r){return!!(qr(i,t,e,n,r)||Oi(i,t,e,n,r[0],r[1])||Oi(i,t,e,n,r[0],r[3])||Oi(i,t,e,n,r[2],r[1])||Oi(i,t,e,n,r[2],r[3]))}function Th(i,t,e,n,r){if(!wh(i,t,e[0],n,r))return!1;if(e.length===1)return!0;for(let s=1,o=e.length;s<o;++s)if(Jf(i,e[s-1],e[s],n,r)&&!qr(i,e[s-1],e[s],n,r))return!1;return!0}function id(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];if(Th(i,t,a,n,r))return!0;t=a[a.length-1]}return!1}function nd(i,t,e,n){for(;t<e-n;){for(let r=0;r<n;++r){let s=i[t+r];i[t+r]=i[e-n+r],i[e-n+r]=s}t+=n,e-=n}}function rd(i,t,e,n){let r=0,s=i[e-n],o=i[e-n+1];for(;t<e;t+=n){let a=i[t],h=i[t+1];r+=(a-s)*(h+o),s=a,o=h}return r===0?void 0:r>0}function Ph(i,t,e,n,r){r=r!==void 0?r:!1;for(let s=0,o=e.length;s<o;++s){let a=e[s],h=rd(i,t,a,n);if(s===0){if(r&&h||!r&&!h)return!1}else if(r&&!h||!r&&h)return!1;t=a}return!0}function sd(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];if(!Ph(i,t,a,n,r))return!1;a.length&&(t=a[a.length-1])}return!0}function fo(i,t,e,n,r){r=r!==void 0?r:!1;for(let s=0,o=e.length;s<o;++s){let