@eox/itemfilter 0.8.6 → 0.9.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,70 +1,71 @@
1
- (function(ye,We){typeof exports=="object"&&typeof module<"u"?We(exports):typeof define=="function"&&define.amd?define(["exports"],We):(ye=typeof globalThis<"u"?globalThis:ye||self,We(ye["eox-itemfilter"]={}))})(this,function(ye){"use strict";/**
1
+ (function(xe,st){typeof exports=="object"&&typeof module<"u"?st(exports):typeof define=="function"&&define.amd?define(["exports"],st):(xe=typeof globalThis<"u"?globalThis:xe||self,st(xe["eox-itemfilter"]={}))})(this,function(xe){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const We=window,sr=We.ShadowRoot&&(We.ShadyCSS===void 0||We.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$i=Symbol(),wi=new WeakMap;let ds=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==$i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(sr&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=wi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&wi.set(t,e))}return e}toString(){return this.cssText}};const fs=r=>new ds(typeof r=="string"?r:r+"",void 0,$i),ps=(r,e)=>{sr?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),n=We.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=t.cssText,r.appendChild(i)})},_i=sr?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return fs(t)})(r):r;/**
5
+ */const st=window,Br=st.ShadowRoot&&(st.ShadyCSS===void 0||st.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,sn=Symbol(),on=new WeakMap;let lo=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==sn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(Br&&e===void 0){const i=r!==void 0&&r.length===1;i&&(e=on.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&on.set(r,e))}return e}toString(){return this.cssText}};const ao=t=>new lo(typeof t=="string"?t:t+"",void 0,sn),co=(t,e)=>{Br?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const i=document.createElement("style"),n=st.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},ln=Br?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const i of e.cssRules)r+=i.cssText;return ao(r)})(t):t;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var or;const Dt=window,Ei=Dt.trustedTypes,gs=Ei?Ei.emptyScript:"",Mi=Dt.reactiveElementPolyfillSupport,ar={toAttribute(r,e){switch(e){case Boolean:r=r?gs:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Ai=(r,e)=>e!==r&&(e==e||r==r),lr={attribute:!0,type:String,converter:ar,reflect:!1,hasChanged:Ai},cr="finalized";let lt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,i)=>{const n=this._$Ep(i,t);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,t=lr){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const s=this[e];this[t]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||lr}static finalize(){if(this.hasOwnProperty(cr))return!1;this[cr]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(_i(n))}else e!==void 0&&t.push(_i(e));return t}static _$Ep(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,i;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return ps(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=lr){var n;const s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:ar).toAttribute(t,i.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,t){var i;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:ar;this._$El=s,this[s]=l.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||Ai)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw t=!1,this._$Ek(),n}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,i)=>this._$EO(i,this[i],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};lt[cr]=!0,lt.elementProperties=new Map,lt.elementStyles=[],lt.shadowRootOptions={mode:"open"},Mi==null||Mi({ReactiveElement:lt}),((or=Dt.reactiveElementVersions)!==null&&or!==void 0?or:Dt.reactiveElementVersions=[]).push("1.6.2");/**
9
+ */var jr;const lr=window,an=lr.trustedTypes,uo=an?an.emptyScript:"",cn=lr.reactiveElementPolyfillSupport,Fr={toAttribute(t,e){switch(e){case Boolean:t=t?uo:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},un=(t,e)=>e!==t&&(e==e||t==t),Hr={attribute:!0,type:String,converter:Fr,reflect:!1,hasChanged:un},qr="finalized";let Et=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((r,i)=>{const n=this._$Ep(i,r);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,r=Hr){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,r);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(n){const s=this[e];this[r]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Hr}static finalize(){if(this.hasOwnProperty(qr))return!1;this[qr]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(const n of i)this.createProperty(n,r[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)r.unshift(ln(n))}else e!==void 0&&r.push(ln(e));return r}static _$Ep(e,r){const i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;const r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return co(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=Hr){var n;const s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){const o=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:Fr).toAttribute(r,i.type);this._$El=e,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(e,r){var i;const n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){const o=n.getPropertyOptions(s),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:Fr;this._$El=s,this[s]=a.fromAttribute(r,o.type),this._$El=null}}requestUpdate(e,r,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||un)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let r=!1;const i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw r=!1,this._$Ek(),n}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Et[qr]=!0,Et.elementProperties=new Map,Et.elementStyles=[],Et.shadowRootOptions={mode:"open"},cn==null||cn({ReactiveElement:Et}),((jr=lr.reactiveElementVersions)!==null&&jr!==void 0?jr:lr.reactiveElementVersions=[]).push("1.6.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var ur;const It=window,ct=It.trustedTypes,Oi=ct?ct.createPolicy("lit-html",{createHTML:r=>r}):void 0,jt="$lit$",Ye=`lit$${(Math.random()+"").slice(9)}$`,hr="?"+Ye,vs=`<${hr}>`,Qe=document,Et=()=>Qe.createComment(""),Mt=r=>r===null||typeof r!="object"&&typeof r!="function",Si=Array.isArray,Pi=r=>Si(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",dr=`[
14
- \f\r]`,At=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ci=/-->/g,ki=/>/g,et=RegExp(`>|${dr}(?:([^\\s"'>=/]+)(${dr}*=${dr}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Ti=/"/g,Ri=/^(?:script|style|textarea|title)$/i,ms=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),he=ms(1),Se=Symbol.for("lit-noChange"),ne=Symbol.for("lit-nothing"),Di=new WeakMap,tt=Qe.createTreeWalker(Qe,129,null,!1),Ii=(r,e)=>{const t=r.length-1,i=[];let n,s=e===2?"<svg>":"",o=At;for(let a=0;a<t;a++){const u=r[a];let p,v,y=-1,x=0;for(;x<u.length&&(o.lastIndex=x,v=o.exec(u),v!==null);)x=o.lastIndex,o===At?v[1]==="!--"?o=Ci:v[1]!==void 0?o=ki:v[2]!==void 0?(Ri.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=et):v[3]!==void 0&&(o=et):o===et?v[0]===">"?(o=n??At,y=-1):v[1]===void 0?y=-2:(y=o.lastIndex-v[2].length,p=v[1],o=v[3]===void 0?et:v[3]==='"'?Ti:Li):o===Ti||o===Li?o=et:o===Ci||o===ki?o=At:(o=et,n=void 0);const M=o===et&&r[a+1].startsWith("/>")?" ":"";s+=o===At?u+vs:y>=0?(i.push(p),u.slice(0,y)+jt+u.slice(y)+Ye+M):u+Ye+(y===-2?(i.push(void 0),a):M)}const l=s+(r[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Oi!==void 0?Oi.createHTML(l):l,i]};class Ot{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let s=0,o=0;const l=e.length-1,a=this.parts,[u,p]=Ii(e,t);if(this.el=Ot.createElement(u,i),tt.currentNode=this.el.content,t===2){const v=this.el.content,y=v.firstChild;y.remove(),v.append(...y.childNodes)}for(;(n=tt.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes()){const v=[];for(const y of n.getAttributeNames())if(y.endsWith(jt)||y.startsWith(Ye)){const x=p[o++];if(v.push(y),x!==void 0){const M=n.getAttribute(x.toLowerCase()+jt).split(Ye),j=/([.?@])?(.*)/.exec(x);a.push({type:1,index:s,name:j[2],strings:M,ctor:j[1]==="."?Ni:j[1]==="?"?Bi:j[1]==="@"?Fi:St})}else a.push({type:6,index:s})}for(const y of v)n.removeAttribute(y)}if(Ri.test(n.tagName)){const v=n.textContent.split(Ye),y=v.length-1;if(y>0){n.textContent=ct?ct.emptyScript:"";for(let x=0;x<y;x++)n.append(v[x],Et()),tt.nextNode(),a.push({type:2,index:++s});n.append(v[y],Et())}}}else if(n.nodeType===8)if(n.data===hr)a.push({type:2,index:s});else{let v=-1;for(;(v=n.data.indexOf(Ye,v+1))!==-1;)a.push({type:7,index:s}),v+=Ye.length-1}s++}}static createElement(e,t){const i=Qe.createElement("template");return i.innerHTML=e,i}}function rt(r,e,t=r,i){var n,s,o,l;if(e===Se)return e;let a=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl;const u=Mt(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==u&&((s=a==null?void 0:a._$AO)===null||s===void 0||s.call(a,!1),u===void 0?a=void 0:(a=new u(r),a._$AT(r,t,i)),i!==void 0?((o=(l=t)._$Co)!==null&&o!==void 0?o:l._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=rt(r,a._$AS(r,e.values),a,i)),e}class ji{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:i},parts:n}=this._$AD,s=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Qe).importNode(i,!0);tt.currentNode=s;let o=tt.nextNode(),l=0,a=0,u=n[0];for(;u!==void 0;){if(l===u.index){let p;u.type===2?p=new ut(o,o.nextSibling,this,e):u.type===1?p=new u.ctor(o,u.name,u.strings,this,e):u.type===6&&(p=new Hi(o,this,e)),this._$AV.push(p),u=n[++a]}l!==(u==null?void 0:u.index)&&(o=tt.nextNode(),l++)}return tt.currentNode=Qe,s}v(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class ut{constructor(e,t,i,n){var s;this.type=2,this._$AH=ne,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=rt(this,e,t),Mt(e)?e===ne||e==null||e===""?(this._$AH!==ne&&this._$AR(),this._$AH=ne):e!==this._$AH&&e!==Se&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Pi(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==ne&&Mt(this._$AH)?this._$AA.nextSibling.data=e:this.$(Qe.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Ot.createElement(n.h,this.options)),n);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(i);else{const o=new ji(s,this),l=o.u(this.options);o.v(i),this.$(l),this._$AH=o}}_$AC(e){let t=Di.get(e.strings);return t===void 0&&Di.set(e.strings,t=new Ot(e)),t}T(e){Si(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const s of e)n===t.length?t.push(i=new ut(this.k(Et()),this.k(Et()),this,this.options)):i=t[n],i._$AI(s),n++;n<t.length&&(this._$AR(i&&i._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class St{constructor(e,t,i,n,s){this.type=1,this._$AH=ne,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ne}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,n){const s=this.strings;let o=!1;if(s===void 0)e=rt(this,e,t,0),o=!Mt(e)||e!==this._$AH&&e!==Se,o&&(this._$AH=e);else{const l=e;let a,u;for(e=s[0],a=0;a<s.length-1;a++)u=rt(this,l[i+a],t,a),u===Se&&(u=this._$AH[a]),o||(o=!Mt(u)||u!==this._$AH[a]),u===ne?e=ne:e!==ne&&(e+=(u??"")+s[a+1]),this._$AH[a]=u}o&&!n&&this.j(e)}j(e){e===ne?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Ni extends St{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ne?void 0:e}}const ys=ct?ct.emptyScript:"";class Bi extends St{constructor(){super(...arguments),this.type=4}j(e){e&&e!==ne?this.element.setAttribute(this.name,ys):this.element.removeAttribute(this.name)}}class Fi extends St{constructor(e,t,i,n,s){super(e,t,i,n,s),this.type=5}_$AI(e,t=this){var i;if((e=(i=rt(this,e,t,0))!==null&&i!==void 0?i:ne)===Se)return;const n=this._$AH,s=e===ne&&n!==ne||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==ne&&(n===ne||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Hi{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){rt(this,e)}}const bs={O:jt,P:Ye,A:hr,C:1,M:Ii,L:ji,D:Pi,R:rt,I:ut,V:St,H:Bi,N:Fi,U:Ni,F:Hi},Ui=It.litHtmlPolyfillSupport;Ui==null||Ui(Ot,ut),((ur=It.litHtmlVersions)!==null&&ur!==void 0?ur:It.litHtmlVersions=[]).push("2.7.4");const xs=(r,e,t)=>{var i,n;const s=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const l=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new ut(e.insertBefore(Et(),l),l,void 0,t??{})}return o._$AI(r),o};/**
13
+ */var Ur;const ar=window,At=ar.trustedTypes,hn=At?At.createPolicy("lit-html",{createHTML:t=>t}):void 0,cr="$lit$",Ze=`lit$${(Math.random()+"").slice(9)}$`,zr="?"+Ze,ho=`<${zr}>`,ft=document,zt=()=>ft.createComment(""),Yt=t=>t===null||typeof t!="object"&&typeof t!="function",dn=Array.isArray,fn=t=>dn(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Yr=`[
14
+ \f\r]`,Vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pn=/-->/g,gn=/>/g,pt=RegExp(`>|${Yr}(?:([^\\s"'>=/]+)(${Yr}*=${Yr}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),mn=/'/g,vn=/"/g,yn=/^(?:script|style|textarea|title)$/i,fo=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),X=fo(1),ke=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),bn=new WeakMap,gt=ft.createTreeWalker(ft,129,null,!1);function xn(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return hn!==void 0?hn.createHTML(e):e}const wn=(t,e)=>{const r=t.length-1,i=[];let n,s=e===2?"<svg>":"",o=Vt;for(let a=0;a<r;a++){const l=t[a];let c,f,m=-1,y=0;for(;y<l.length&&(o.lastIndex=y,f=o.exec(l),f!==null);)y=o.lastIndex,o===Vt?f[1]==="!--"?o=pn:f[1]!==void 0?o=gn:f[2]!==void 0?(yn.test(f[2])&&(n=RegExp("</"+f[2],"g")),o=pt):f[3]!==void 0&&(o=pt):o===pt?f[0]===">"?(o=n??Vt,m=-1):f[1]===void 0?m=-2:(m=o.lastIndex-f[2].length,c=f[1],o=f[3]===void 0?pt:f[3]==='"'?vn:mn):o===vn||o===mn?o=pt:o===pn||o===gn?o=Vt:(o=pt,n=void 0);const v=o===pt&&t[a+1].startsWith("/>")?" ":"";s+=o===Vt?l+ho:m>=0?(i.push(c),l.slice(0,m)+cr+l.slice(m)+Ze+v):l+Ze+(m===-2?(i.push(void 0),a):v)}return[xn(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]};class Xt{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[c,f]=wn(e,r);if(this.el=Xt.createElement(c,i),gt.currentNode=this.el.content,r===2){const m=this.el.content,y=m.firstChild;y.remove(),m.append(...y.childNodes)}for(;(n=gt.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes()){const m=[];for(const y of n.getAttributeNames())if(y.endsWith(cr)||y.startsWith(Ze)){const v=f[o++];if(m.push(y),v!==void 0){const w=n.getAttribute(v.toLowerCase()+cr).split(Ze),O=/([.?@])?(.*)/.exec(v);l.push({type:1,index:s,name:O[2],strings:w,ctor:O[1]==="."?_n:O[1]==="?"?En:O[1]==="@"?An:Wt})}else l.push({type:6,index:s})}for(const y of m)n.removeAttribute(y)}if(yn.test(n.tagName)){const m=n.textContent.split(Ze),y=m.length-1;if(y>0){n.textContent=At?At.emptyScript:"";for(let v=0;v<y;v++)n.append(m[v],zt()),gt.nextNode(),l.push({type:2,index:++s});n.append(m[y],zt())}}}else if(n.nodeType===8)if(n.data===zr)l.push({type:2,index:s});else{let m=-1;for(;(m=n.data.indexOf(Ze,m+1))!==-1;)l.push({type:7,index:s}),m+=Ze.length-1}s++}}static createElement(e,r){const i=ft.createElement("template");return i.innerHTML=e,i}}function mt(t,e,r=t,i){var n,s,o,a;if(e===ke)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl;const c=Yt(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((s=l==null?void 0:l._$AO)===null||s===void 0||s.call(l,!1),c===void 0?l=void 0:(l=new c(t),l._$AT(t,r,i)),i!==void 0?((o=(a=r)._$Co)!==null&&o!==void 0?o:a._$Co=[])[i]=l:r._$Cl=l),l!==void 0&&(e=mt(t,l._$AS(t,e.values),l,i)),e}class $n{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var r;const{el:{content:i},parts:n}=this._$AD,s=((r=e==null?void 0:e.creationScope)!==null&&r!==void 0?r:ft).importNode(i,!0);gt.currentNode=s;let o=gt.nextNode(),a=0,l=0,c=n[0];for(;c!==void 0;){if(a===c.index){let f;c.type===2?f=new St(o,o.nextSibling,this,e):c.type===1?f=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(f=new Sn(o,this,e)),this._$AV.push(f),c=n[++l]}a!==(c==null?void 0:c.index)&&(o=gt.nextNode(),a++)}return gt.currentNode=ft,s}v(e){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}}class St{constructor(e,r,i,n){var s;this.type=2,this._$AH=se,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cp=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=mt(this,e,r),Yt(e)?e===se||e==null||e===""?(this._$AH!==se&&this._$AR(),this._$AH=se):e!==this._$AH&&e!==ke&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):fn(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==se&&Yt(this._$AH)?this._$AA.nextSibling.data=e:this.$(ft.createTextNode(e)),this._$AH=e}g(e){var r;const{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Xt.createElement(xn(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.v(i);else{const o=new $n(s,this),a=o.u(this.options);o.v(i),this.$(a),this._$AH=o}}_$AC(e){let r=bn.get(e.strings);return r===void 0&&bn.set(e.strings,r=new Xt(e)),r}T(e){dn(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,n=0;for(const s of e)n===r.length?r.push(i=new St(this.k(zt()),this.k(zt()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,r);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var r;this._$AM===void 0&&(this._$Cp=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}}class Wt{constructor(e,r,i,n,s){this.type=1,this._$AH=se,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=se}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,n){const s=this.strings;let o=!1;if(s===void 0)e=mt(this,e,r,0),o=!Yt(e)||e!==this._$AH&&e!==ke,o&&(this._$AH=e);else{const a=e;let l,c;for(e=s[0],l=0;l<s.length-1;l++)c=mt(this,a[i+l],r,l),c===ke&&(c=this._$AH[l]),o||(o=!Yt(c)||c!==this._$AH[l]),c===se?e=se:e!==se&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!n&&this.j(e)}j(e){e===se?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class _n extends Wt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===se?void 0:e}}const po=At?At.emptyScript:"";class En extends Wt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==se?this.element.setAttribute(this.name,po):this.element.removeAttribute(this.name)}}class An extends Wt{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=mt(this,e,r,0))!==null&&i!==void 0?i:se)===ke)return;const n=this._$AH,s=e===se&&n!==se||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==se&&(n===se||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,i;typeof this._$AH=="function"?this._$AH.call((i=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Sn{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){mt(this,e)}}const go={O:cr,P:Ze,A:zr,C:1,M:wn,L:$n,R:fn,D:mt,I:St,V:Wt,H:En,N:An,U:_n,F:Sn},Mn=ar.litHtmlPolyfillSupport;Mn==null||Mn(Xt,St),((Ur=ar.litHtmlVersions)!==null&&Ur!==void 0?Ur:ar.litHtmlVersions=[]).push("2.8.0");const mo=(t,e,r)=>{var i,n;const s=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const a=(n=r==null?void 0:r.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=o=new St(e.insertBefore(zt(),a),a,void 0,r??{})}return o._$AI(t),o};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */var fr,pr;let Pe=class extends lt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=xs(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Se}};Pe.finalized=!0,Pe._$litElement$=!0,(fr=globalThis.litElementHydrateSupport)===null||fr===void 0||fr.call(globalThis,{LitElement:Pe});const Yi=globalThis.litElementPolyfillSupport;Yi==null||Yi({LitElement:Pe}),((pr=globalThis.litElementVersions)!==null&&pr!==void 0?pr:globalThis.litElementVersions=[]).push("3.3.2");/**
19
+ */var Vr,Xr;let we=class extends Et{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;const i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=mo(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ke}};we.finalized=!0,we._$litElement$=!0,(Vr=globalThis.litElementHydrateSupport)===null||Vr===void 0||Vr.call(globalThis,{LitElement:we});const On=globalThis.litElementPolyfillSupport;On==null||On({LitElement:we}),((Xr=globalThis.litElementVersions)!==null&&Xr!==void 0?Xr:globalThis.litElementVersions=[]).push("3.3.2");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const qe=r=>e=>typeof e=="function"?((t,i)=>(customElements.define(t,i),i))(r,e):((t,i)=>{const{kind:n,elements:s}=i;return{kind:n,elements:s,finisher(o){customElements.define(t,o)}}})(r,e);/**
23
+ */const Pe=t=>e=>typeof e=="function"?((r,i)=>(customElements.define(r,i),i))(t,e):((r,i)=>{const{kind:n,elements:s}=i;return{kind:n,elements:s,finisher(o){customElements.define(r,o)}}})(t,e);/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const $s=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}},ws=(r,e,t)=>{e.constructor.createProperty(t,r)};function Ae(r){return(e,t)=>t!==void 0?ws(r,e,t):$s(r,e)}/**
27
+ */const vo=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}},yo=(t,e,r)=>{e.constructor.createProperty(r,t)};function J(t){return(e,r)=>r!==void 0?yo(t,e,r):vo(t,e)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function Pt(r){return Ae({...r,state:!0})}/**
31
+ */function Ue(t){return J({...t,state:!0})}/**
32
32
  * @license
33
33
  * Copyright 2021 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */var gr;((gr=window.HTMLSlotElement)===null||gr===void 0?void 0:gr.prototype.assignedElements)!=null;/**
35
+ */var Wr;((Wr=window.HTMLSlotElement)===null||Wr===void 0?void 0:Wr.prototype.assignedElements)!=null;/**
36
36
  * @license
37
37
  * Copyright 2021 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */function ht(r,e,t){return r?e():t==null?void 0:t()}/**
39
+ */function fe(t,e,r){return t?e():r==null?void 0:r()}/**
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */function*dt(r,e){if(r!==void 0){let t=0;for(const i of r)yield e(i,t++)}}/**
43
+ */function*Kt(t,e){if(t!==void 0){let r=0;for(const i of t)yield e(i,r++)}}/**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const Ge={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},vr=r=>(...e)=>({_$litDirective$:r,values:e});class mr{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
47
+ */const ot={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Kr=t=>(...e)=>({_$litDirective$:t,values:e});class Gr{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}}/**
48
48
  * @license
49
49
  * Copyright 2020 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */const{I:_s}=bs,Es=r=>r.strings===void 0,zi=()=>document.createComment(""),Ct=(r,e,t)=>{var i;const n=r._$AA.parentNode,s=e===void 0?r._$AB:e._$AA;if(t===void 0){const o=n.insertBefore(zi(),s),l=n.insertBefore(zi(),s);t=new _s(o,l,r,r.options)}else{const o=t._$AB.nextSibling,l=t._$AM,a=l!==r;if(a){let u;(i=t._$AQ)===null||i===void 0||i.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==l._$AU&&t._$AP(u)}if(o!==s||a){let u=t._$AA;for(;u!==o;){const p=u.nextSibling;n.insertBefore(u,s),u=p}}}return t},it=(r,e,t=r)=>(r._$AI(e,t),r),Ms={},Xi=(r,e=Ms)=>r._$AH=e,As=r=>r._$AH,yr=r=>{var e;(e=r._$AP)===null||e===void 0||e.call(r,!1,!0);let t=r._$AA;const i=r._$AB.nextSibling;for(;t!==i;){const n=t.nextSibling;t.remove(),t=n}};/**
51
+ */const{I:bo}=go,xo=t=>t.strings===void 0,Pn=()=>document.createComment(""),Gt=(t,e,r)=>{var i;const n=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(r===void 0){const o=n.insertBefore(Pn(),s),a=n.insertBefore(Pn(),s);r=new bo(o,a,t,t.options)}else{const o=r._$AB.nextSibling,a=r._$AM,l=a!==t;if(l){let c;(i=r._$AQ)===null||i===void 0||i.call(r,t),r._$AM=t,r._$AP!==void 0&&(c=t._$AU)!==a._$AU&&r._$AP(c)}if(o!==s||l){let c=r._$AA;for(;c!==o;){const f=c.nextSibling;n.insertBefore(c,s),c=f}}}return r},vt=(t,e,r=t)=>(t._$AI(e,r),t),wo={},Cn=(t,e=wo)=>t._$AH=e,$o=t=>t._$AH,Jr=t=>{var e;(e=t._$AP)===null||e===void 0||e.call(t,!1,!0);let r=t._$AA;const i=t._$AB.nextSibling;for(;r!==i;){const n=r.nextSibling;r.remove(),r=n}};/**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
- */const Vi=(r,e,t)=>{const i=new Map;for(let n=e;n<=t;n++)i.set(r[n],n);return i},Os=vr(class extends mr{constructor(r){if(super(r),r.type!==Ge.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const n=[],s=[];let o=0;for(const l of r)n[o]=i?i(l,o):o,s[o]=t(l,o),o++;return{values:s,keys:n}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,i]){var n;const s=As(r),{values:o,keys:l}=this.dt(e,t,i);if(!Array.isArray(s))return this.ht=l,o;const a=(n=this.ht)!==null&&n!==void 0?n:this.ht=[],u=[];let p,v,y=0,x=s.length-1,M=0,j=o.length-1;for(;y<=x&&M<=j;)if(s[y]===null)y++;else if(s[x]===null)x--;else if(a[y]===l[M])u[M]=it(s[y],o[M]),y++,M++;else if(a[x]===l[j])u[j]=it(s[x],o[j]),x--,j--;else if(a[y]===l[j])u[j]=it(s[y],o[j]),Ct(r,u[j+1],s[y]),y++,j--;else if(a[x]===l[M])u[M]=it(s[x],o[M]),Ct(r,s[y],s[x]),x--,M++;else if(p===void 0&&(p=Vi(l,M,j),v=Vi(a,y,x)),p.has(a[y]))if(p.has(a[x])){const q=v.get(l[M]),J=q!==void 0?s[q]:null;if(J===null){const f=Ct(r,s[y]);it(f,o[M]),u[M]=f}else u[M]=it(J,o[M]),Ct(r,s[y],J),s[q]=null;M++}else yr(s[x]),x--;else yr(s[y]),y++;for(;M<=j;){const q=Ct(r,u[j+1]);it(q,o[M]),u[M++]=q}for(;y<=x;){const q=s[y++];q!==null&&yr(q)}return this.ht=l,Xi(r,u),Se}});/**
55
+ */const Ln=(t,e,r)=>{const i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},kn=Kr(class extends Gr{constructor(t){if(super(t),t.type!==ot.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);const n=[],s=[];let o=0;for(const a of t)n[o]=i?i(a,o):o,s[o]=r(a,o),o++;return{values:s,keys:n}}render(t,e,r){return this.ct(t,e,r).values}update(t,[e,r,i]){var n;const s=$o(t),{values:o,keys:a}=this.ct(e,r,i);if(!Array.isArray(s))return this.ut=a,o;const l=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],c=[];let f,m,y=0,v=s.length-1,w=0,O=o.length-1;for(;y<=v&&w<=O;)if(s[y]===null)y++;else if(s[v]===null)v--;else if(l[y]===a[w])c[w]=vt(s[y],o[w]),y++,w++;else if(l[v]===a[O])c[O]=vt(s[v],o[O]),v--,O--;else if(l[y]===a[O])c[O]=vt(s[y],o[O]),Gt(t,c[O+1],s[y]),y++,O--;else if(l[v]===a[w])c[w]=vt(s[v],o[w]),Gt(t,s[y],s[v]),v--,w++;else if(f===void 0&&(f=Ln(a,w,O),m=Ln(l,y,v)),f.has(l[y]))if(f.has(l[v])){const q=m.get(a[w]),j=q!==void 0?s[q]:null;if(j===null){const p=Gt(t,s[y]);vt(p,o[w]),c[w]=p}else c[w]=vt(j,o[w]),Gt(t,s[y],j),s[q]=null;w++}else Jr(s[v]),v--;else Jr(s[y]),y++;for(;w<=O;){const q=Gt(t,c[O+1]);vt(q,o[w]),c[w++]=q}for(;y<=v;){const q=s[y++];q!==null&&Jr(q)}return this.ut=a,Cn(t,c),ke}});/**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */let br=class extends mr{constructor(e){if(super(e),this.et=ne,e.type!==Ge.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ne||e==null)return this.ft=void 0,this.et=e;if(e===Se)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};br.directiveName="unsafeHTML",br.resultType=1;const Wi=vr(br);/**
59
+ */let Zr=class extends Gr{constructor(e){if(super(e),this.et=se,e.type!==ot.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===se||e==null)return this.ft=void 0,this.et=e;if(e===ke)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const r=[e];return r.raw=r,this.ft={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Zr.directiveName="unsafeHTML",Zr.resultType=1;const Rn=Kr(Zr);/**
60
60
  * @license
61
61
  * Copyright 2020 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */const qi=Symbol.for(""),Ss=r=>{if((r==null?void 0:r.r)===qi)return r==null?void 0:r._$litStatic$},Nt=r=>({_$litStatic$:r,r:qi}),Gi=new Map,Ps=r=>(e,...t)=>{const i=t.length;let n,s;const o=[],l=[];let a,u=0,p=!1;for(;u<i;){for(a=e[u];u<i&&(s=t[u],(n=Ss(s))!==void 0);)a+=n+e[++u],p=!0;u!==i&&l.push(s),o.push(a),u++}if(u===i&&o.push(e[i]),p){const v=o.join("$$lit$$");(e=Gi.get(v))===void 0&&(o.raw=o,Gi.set(v,e=o)),t=l}return r(e,...t)},xr=Ps(he);(()=>{var r=Object.defineProperty,e=Math.pow,t=(c,d,b)=>d in c?r(c,d,{enumerable:!0,configurable:!0,writable:!0,value:b}):c[d]=b,i=(c,d,b)=>(t(c,typeof d!="symbol"?d+"":d,b),b),n=(c,d)=>` ${d&&d.length>0?d.map(b=>`<link rel="stylesheet" href="${b}" />`).join(""):""} <style> ${c} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,s=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",o="pointers-overlap",l="pointers-min-distance",a="pointers-max-distance",u="range-dragging",p="data",v="min",y="max",x="step",M="round",j="type",q="theme",J="rtl",f="btt",g="disabled",$="keyboard-disabled",S="mousewheel-disabled",E="slider-width",A="slider-height",C="slider-radius",L="slider-bg",I="slider-bg-hover",W="slider-bg-fill",re="pointer-width",k="pointer-height",_="pointer-radius",O="pointer-bg",B="pointer-bg-hover",P="pointer-bg-focus",H="pointer-shadow",V="pointer-shadow-hover",ee="pointer-shadow-focus",le="pointer-border",Z="pointer-border-hover",ve="pointer-border-focus",De="animate-onclick",Ie="css-links",be="vertical",Le="horizontal",He=(c,d,b,m,T)=>{let U=d-c;return U===0?b:(m-b)*(T-c)/U+b},ue=c=>!isNaN(parseFloat(c))&&isFinite(c),oe=(c,d)=>ue(c)?Number(c):d,bt=(c,d)=>d===0?0:Math.round(c/d)*d,xt=(c,d=1/0)=>{if(d===1/0)return c;let b=e(10,d);return Math.round(c*b)/b},xe=c=>c==null?!1:typeof c=="boolean"?c:c.trim().toLowerCase()==="true",rl=(c,d)=>{c.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},il=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},nl=(c,d)=>{c.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},sl=(c,d)=>{c.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},ol=(c,d)=>{if(!d||d.length<=0)return;let b=d.map(T=>ue(T)?oe(T,T):T),m={values:b||[]};m.value=b[0],m.value0=b[0],m.value1=b[0];for(let T=1;T<b.length;T++)m[`value${T+1}`]=b[T];c.dispatchEvent(new CustomEvent("change",{detail:m}))},Kr=(c,d,b)=>{let m=0,T,U,G,R,D=!1,K=(z,ce,me,ge,de,fe)=>{let _e=m;me!==void 0&&z>me&&(z=me),ce!==void 0&&z<ce&&(z=ce),m=z;let Ee=m;return(ge===be&&fe||ge===Le&&de)&&(Ee=100-Ee),ge===be?d.style.top=`${Ee}%`:d.style.left=`${Ee}%`,_e!==m},te=z=>z===d||d.contains(z),F=(z,ce,me,ge)=>{T=z,U=ce,G=me,R=ge},se=z=>{D=z,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Te=(z,ce)=>{ce==null?d.removeAttribute(z):d.setAttribute(z,ce)},we=z=>d.getAttribute(z),Y=z=>{if(!D){switch(z.key){case"ArrowLeft":{z.preventDefault(),typeof T=="function"&&T(b);break}case"ArrowRight":{z.preventDefault(),typeof U=="function"&&U(b);break}case"ArrowUp":{z.preventDefault(),typeof G=="function"&&G(b);break}case"ArrowDown":{z.preventDefault(),typeof R=="function"&&R(b);break}}sl(c,z)}},Q=()=>{D||rl(c,d)};return d.className=`pointer pointer-${b}`,d.addEventListener("keydown",Y),d.addEventListener("click",Q),{$pointer:d,get percent(){return m},get disabled(){return D},set disabled(z){se(z)},updatePosition:K,isClicked:te,setCallbacks:F,setAttr:Te,getAttr:we,destroy:()=>{d.removeEventListener("keydown",Y),d.removeEventListener("click",Q),d.remove()}}},al=c=>{if(c==null)return;if(Array.isArray(c))return c;if(c.trim()==="")return;let d=c.split(","),b=[],m=!0;for(let T=0;T<d.length;T++){let U=d[T].trim();U!==""&&(b.push(U),ue(U)||(m=!1))}return m?b.map(T=>Number(T)):b},ll=(c,d)=>d?d.findIndex(b=>b===c||b.toString().trim()===c.toString().trim()):-1,cl=c=>({updatePosition:(d,b,m,T)=>{if(b.length<=0)return;let U=b.length===1,G=b[0],R=b[b.length-1];d===be?(c.style.removeProperty("width"),c.style.removeProperty("right"),c.style.removeProperty("left"),U?c.style.height=`${G}%`:c.style.height=`${Math.abs(G-R)}%`,T?(c.style.bottom="0%",U?c.style.top="auto":c.style.top=`${Math.min(100-R,100-G)}%`):(c.style.bottom="auto",U?c.style.top="0%":c.style.top=`${Math.min(G,R)}%`)):(c.style.removeProperty("height"),c.style.removeProperty("top"),c.style.removeProperty("bottom"),U?c.style.width=`${G}%`:c.style.width=`${Math.abs(G-R)}%`,m?(c.style.right="0%",U?c.style.left="auto":c.style.left=`${Math.min(100-R,100-G)}%`):(c.style.right="auto",U?c.style.left="0%":c.style.left=`${Math.min(G,R)}%`))}}),Yn="--animate-onclick",ul="--width",hl="--height",dl="--panel-bg-border-radius",fl="--panel-bg",pl="--panel-bg-hover",gl="--panel-bg-fill",vl="--pointer-width",ml="--pointer-height",yl="--pointer-border-radius",bl="--pointer-bg",xl="--pointer-bg-hover",$l="--pointer-bg-focus",wl="--pointer-shadow",_l="--pointer-shadow-hover",El="--pointer-shadow-focus",Ml="--pointer-border",Al="--pointer-border-hover",Ol="--pointer-border-focus",Wt=(c,d,b)=>{let m=new Map;for(let T of c.attributes){let U=T.nodeName.trim().toLowerCase();if(!d.test(U))continue;let G=U.replace(/\D/g,"").trim(),R=G===""||G==="0"||G==="1"?0:oe(G,0)-1,D=b&&typeof b=="function"?b(T.value):T.value;m.set(R,D)}return m},Sl=c=>{if(!c)return null;let d=c.getAttribute(Ie);if(!d)return null;let b=d.split(";"),m=[];for(let T of b)T.trim()!==""&&m.push(T.trim());return m},zn=[[ul,E,"sliderWidth",null],[hl,A,"sliderHeight",null],[dl,C,"sliderRadius",null],[fl,L,"sliderBg",null],[pl,I,"sliderBgHover",null],[gl,W,"sliderBgFill",null],[vl,re,"pointer#Width",/^pointer([0-9]*)-width$/],[ml,k,"pointer#Height",/^pointer([0-9]*)-height$/],[yl,_,"pointer#Radius",/^pointer([0-9]*)-radius$/],[bl,O,"pointer#Bg",/^pointer([0-9]*)-bg$/],[xl,B,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[$l,P,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[wl,H,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[_l,V,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[El,ee,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Ml,le,"pointer#Border",/^pointer([0-9]*)-border$/],[Al,Z,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Ol,ve,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Pl=(c,d,b)=>{let m=null,T=[],U=new Map,G=(Y,Q=d)=>{let z=[...Q.classList];for(let ce of z)ce.startsWith(Y)&&d.classList.remove(ce)},R=()=>{G("shape");let Y=d.querySelectorAll(".pointer");for(let Q of Y)G("shape",Q)},D=Y=>{m=Y,G("theme-"),typeof Y=="string"&&d.classList.add(`theme-${Y}`)},K=()=>{if(R(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let Y=1;Y<T.length;Y++){let Q=T[Y];if(!Q)continue;let z=d.querySelector(`.pointer-${Y}`);!z||z.classList.add("shape",`shape-${Q}`)}}},te=(Y,Q)=>{T[Y]=Q,K()},F=()=>{R();let Y=Wt(c,/^pointer([0-9]*)-shape$/);if(!(Y.size<=0)){for(let Q of Y){let z=Q[0];T[z]=Q[1]}K()}},se=(Y,Q)=>`${Y}-${Q}`,Te=(Y,Q,z)=>{let ce=b[z];if(!ce)return;let me=z===0?d:ce.$pointer;if(Q==null){U.has(se(Y,z))&&U.delete(se(Y,z)),me.style.removeProperty(Y);return}U.set(se(Y,z),Q),me.style.setProperty(Y,Q)},we=(Y,Q)=>U.get(se(Y,Q));return(()=>{for(let Y of zn){let[Q,z,ce,me]=Y;if(me){let de=Wt(c,me);for(let fe of de){let _e=fe[0],Ee=fe[1];Te(Q,Ee,_e)}}else{let de=c.getAttribute(z);Te(Q,de,0)}let ge=[];if(ce.indexOf("#")===-1)ge.push([ce,0]);else{ge.push([ce.replace("#",""),0]),ge.push([ce.replace("#","0"),0]),ge.push([ce.replace("#","1"),0]);for(let de=1;de<b.length;de++)ge.push([ce.replace("#",(de+1).toString()),de])}for(let de of ge)try{let fe=de[0],_e=de[1];Object.prototype.hasOwnProperty.call(c,fe)||Object.defineProperty(c,fe,{get(){return we(Q,_e)},set:Ee=>{Te(Q,Ee,_e)}})}catch(fe){console.error(fe)}}D(c.getAttribute(q)),F()})(),{setStyle:Te,getStyle:we,get theme(){return m},set theme(Y){D(Y)},get pointerShapes(){return T},setPointerShape:te}},$t="animate-on-click",Xn="range-dragging",Cl=(c,d,b,m)=>{let T=[],U=te=>{for(let F of T)F.update&&typeof F.update=="function"&&F.update(te)},G=()=>{for(let te of T)te.destroy&&typeof te.destroy=="function"&&te.destroy()},R=(te,F)=>{for(let se of T)se.onAttrChange&&typeof se.onAttrChange=="function"&&se.onAttrChange(te,F)},D=te=>{if(te.gettersAndSetters){for(let F of te.gettersAndSetters)if(!(!F.name||!F.attributes))try{Object.prototype.hasOwnProperty.call(c,F.name)||Object.defineProperty(c,F.name,F.attributes)}catch(se){console.error("defineSettersGetters error:",se)}}},K=te=>{var F;if(!te.css)return;let se=(F=c.shadowRoot)==null?void 0:F.querySelector("style");!se||(se.innerHTML+=te.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let te of window.tcRangeSliderPlugins){let F=te();T.push(F),F.init&&typeof F.init=="function"&&(F.init(c,d,b,m),D(F),K(F))}},update:U,onAttrChange:R,destroy:G}},kl=10,Ll=(c,d)=>{let b=new Map,m=/^value([0-9]*)$/;for(let R of c.attributes){let D=R.nodeName.trim().toLowerCase();if(!m.test(D))continue;let K=D.replace("value","").trim(),te=K===""||K==="0"||K==="1"?0:oe(K,0)-1,F=ue(R.value)?oe(R.value,0):R.value;b.set(te,F)}let T=Math.max(...Array.from(b.keys())),U=[];U.push([Kr(c,d,0),b.get(0)]);let G=d;for(let R=1;R<=T;R++){let D=d.cloneNode(!0);G.after(D),G=D,U.push([Kr(c,D,R),b.get(R)])}return U},Vn=(c,d,b,m,T,U,G)=>{try{Object.defineProperty(c,m,{configurable:!0,get(){if(!d)return;let R=d.pointers[b];if(!R)return;let D=d.getTextValue(R.percent);return ue(D)?oe(D,D):D},set:R=>{d.pointers[b]?d==null||d.setValue(R,b):d==null||d.addPointer(R)}}),Object.defineProperty(c,T,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.pointers[b])==null?void 0:R.getAttr("aria-label"))!=null?D:void 0},set:R=>{!d||d.setAriaLabel(b,R)}}),Object.defineProperty(c,U,{configurable:!0,get(){var R,D;return(D=(R=d==null?void 0:d.styles)==null?void 0:R.pointerShapes[b])!=null?D:null},set:R=>{!d||!d.styles||d.styles.setPointerShape(b,R)}}),Object.defineProperty(c,G,{configurable:!0,get(){var R;return(R=d==null?void 0:d.pointers[b].disabled)!=null?R:!1},set:R=>{if(!d)return;let D=d==null?void 0:d.pointers[b];!D||(D.disabled=R)}})}catch(R){console.error(R)}},Tl=(c,d)=>{let b=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let m=2;m<kl;m++)b.push([`value${m}`,`ariaLabel${m}`,`pointer${m}Shape`,`pointer${m}Disabled`,m-1]);for(let m of b)Vn(c,d,m[4],m[0],m[1],m[2],m[3])},Wn=(c,d,b)=>{var m;let T=(m=b.shadowRoot)==null?void 0:m.querySelector(".container");if(T)for(let U of c)d?T.prepend(U.$pointer):T.append(U.$pointer)},Jr=0,Lt=100,wt=2,qn="0.3s",Rl=(c,d,b)=>{let m=b.map(h=>h[0]),T=null,U=null,G=null,R=null,D=Jr,K=Lt,te,F,se=Le,Te=wt,we=!1,Y=!1,Q=!1,z=0,ce=1/0,me=!1,ge,de,fe=!1,_e=!1,Ee=!1,Ze=qn,Gn=[],Kn=h=>{fe||(h.preventDefault&&h.preventDefault(),ot(h),window.addEventListener("mousemove",ot),window.addEventListener("mouseup",qt),il(c,h))},qt=h=>{fe||(ge=void 0,de=void 0,window.removeEventListener("mousemove",ot),window.removeEventListener("mouseup",qt),Ze&&d.classList.add($t),nl(c,h))},jl=(h,w)=>{if(m.length<=0)return;if(m.length===1)return m[0].isClicked(h)&&Ze&&d.classList.remove($t),m[0];let N=Bl(h);if(me){let ie=w,je=Kt(ie);je!==void 0&&(ie=bt(ie,je)),N?(ge=ie,de=0,Ze&&d.classList.remove($t)):ge!==void 0&&(de=ie-ge,ge=ie)}if(!Nl(h)&&!N){for(let ie of m)if(!(!ie.isClicked(h)||ie.disabled))return Ze&&d.classList.remove($t),ie;for(let ie of m)if(T===ie)return ie}let ae=1/0,pe=null;for(let ie of m){if(ie.disabled)continue;let je=Math.abs(w-ie.percent);je<ae&&(ae=je,pe=ie)}return pe},Jn=()=>m.findIndex(h=>T===h&&!h.disabled),ot=h=>{let w;if(se===be){let{height:ae,top:pe}=d.getBoundingClientRect(),ie=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;w=Math.min(Math.max(0,ie-pe),ae)*100/ae}else{let{width:ae,left:pe}=d.getBoundingClientRect(),ie=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;w=Math.min(Math.max(0,ie-pe),ae)*100/ae}if((we||Y)&&(w=100-w),T=jl(h.target,w),me&&m.length>1&&de!==void 0){let ae=m[0],pe=m[m.length-1],ie=ae.percent+de<0,je=pe.percent+de>100;if(ie||je)return;for(let nr=0;nr<m.length;nr++)Me(nr,m[nr].percent+de);return}let N=Jn();N!==-1&&(Me(N,w),T==null||T.$pointer.focus())},Gt=h=>{if(fe||document.activeElement!==c||T!=null&&T.disabled)return;h.stopPropagation(),h.preventDefault();let w=h.deltaY<0,N=we||Y,ae=w?!N:N,pe=Jn();pe!==-1&&(ae?Tt(pe,m[pe].percent):Rt(pe,m[pe].percent))},Zn=h=>{fe||_e||(se===be?Y?Me(h,100):Me(h,0):we?Rt(h,m[h].percent):Tt(h,m[h].percent))},Qn=h=>{fe||_e||(se===be?Y?Me(h,0):Me(h,100):we?Tt(h,m[h].percent):Rt(h,m[h].percent))},es=h=>{fe||_e||(se===be?Y?Rt(h,m[h].percent):Tt(h,m[h].percent):we?Me(h,100):Me(h,0))},ts=h=>{fe||_e||(se===be?Y?Tt(h,m[h].percent):Rt(h,m[h].percent):we?Me(h,0):Me(h,100))},Nl=h=>h.classList.contains("panel"),Bl=h=>h.classList.contains("panel-fill"),Tt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w-=N,w<0&&(w=0),Me(h,w)},Rt=(h,w)=>{if(w===void 0)return;let N=Kt(w);N==null&&(N=1),w+=N,w>100&&(w=100),Me(h,w)},at=()=>{!R||R.update({percents:rs(),values:is(),$pointers:ns(),min:ss(),max:os(),data:ei(),step:Qr(),round:ri(),type:ti(),textMin:Jt(),textMax:Zt(),rightToLeft:si(),bottomToTop:oi(),pointersOverlap:ui(),pointersMinDistance:ii(),pointersMaxDistance:ni(),rangeDragging:hi(),disabled:ai(),keyboardDisabled:li(),mousewheelDisabled:ci()})},Fl=()=>{at()},Hl=h=>{if(!(Q||m.length<=1||K===D))if(h===0){let w=ce*100/(K-D);return Math.max(0,m[h+1].percent-w)}else{let w=z*100/(K-D);return Math.min(m[h-1].percent+w,100)}},Ul=h=>{if(!(Q||m.length<=1||K===D))if(h===m.length-1){let w=ce*100/(K-D);return Math.min(m[h-1].percent+w,100)}else{let w=z*100/(K-D);return Math.max(0,m[h+1].percent-w)}},Kt=h=>{let w;if(typeof te=="function"){let N=He(0,100,D,K,h);w=te(N,h)}else w=te;if(ue(w)){let N=K-D;return w=N===0?0:w*100/N,w}},_t=h=>{if(h===void 0)return;let w=He(0,100,D,K,h);return F!==void 0?F[Math.round(w)]:xt(w,Te)},Jt=()=>F!==void 0?F[D]:D,Zt=()=>F!==void 0?F[K]:K,Qr=()=>te,Yl=h=>{var w;return h<=0||Q?Jt():(w=_t(m[h-1].percent))!=null?w:""},zl=h=>{var w;return m.length<=1||h>=m.length-1||Q?Zt():(w=_t(m[h+1].percent))!=null?w:""},rs=()=>m.map(h=>h.percent),is=()=>m.map(h=>_t(h.percent)),ns=()=>m.map(h=>h.$pointer),ss=()=>D,os=()=>K,ei=()=>F,ti=()=>se,ri=()=>Te,ii=()=>z,ni=()=>ce,Xl=h=>Gn[h],si=()=>we,oi=()=>Y,ai=()=>fe,li=()=>_e,ci=()=>Ee,ui=()=>Q,hi=()=>me,Me=(h,w)=>{if(w===void 0)return;let N=Kt(w);N!==void 0&&(w=bt(w,N));let ae=m[h];if(!ae)return;let pe=ae.updatePosition(w,Hl(h),Ul(h),se,we,Y);U==null||U.updatePosition(se,m.map(ie=>ie.percent),we,Y),at();for(let ie of m){let je=_t(ie.percent);je!==void 0&&(ie.setAttr("aria-valuenow",je.toString()),ie.setAttr("aria-valuetext",je.toString()))}Wl(),pe&&ol(c,m.map(ie=>_t(ie.percent)))},Ue=()=>{for(let h=0;h<m.length;h++)Me(h,m[h].percent)},Vl=(h,w)=>{D=F!==void 0?0:oe(h,Jr),K=F!==void 0?F.length-1:oe(w,Lt),Qt(D),er(K)},Wl=()=>{var h,w;for(let N=0;N<m.length;N++){let ae=m[N];ae.setAttr("aria-valuemin",((h=Yl(N))!=null?h:"").toString()),ae.setAttr("aria-valuemax",((w=zl(N))!=null?w:"").toString())}},Qt=h=>{D=oe(h,Jr),D>K&&(K=D+Lt),Ue()},er=h=>{K=oe(h,Lt),K<D&&(K=D+Lt),Ue()},as=h=>{Q=!0;for(let w=0;w<h.length;w++)tr(h[w],w);Q=!1;for(let w=0;w<h.length;w++)tr(h[w],w)},tr=(h,w)=>{let N;F!==void 0?(N=h==null?0:ll(h,F),N===-1&&(N=0)):(N=oe(h,D),N<D&&(N=D),N>K&&(N=K));let ae=He(D,K,0,100,N);Me(w,ae)},rr=h=>{if(h==null){te=void 0;return}if(typeof h=="function"){te=h,Ue();return}if(ue(h)){te=oe(h,1);let w=Math.abs(K-D);te>w&&(te=void 0),Ue();return}te=void 0},di=h=>{Q=h,Ue()},fi=h=>{(!ue(h)||h<0)&&(h=0),z=h},pi=h=>{(!ue(h)||h<0)&&(h=1/0),ce=h},gi=h=>{fe=h,d.classList.toggle("disabled",fe),fe?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},ls=h=>{_e=h},cs=h=>{Ee=h,Ee?document.removeEventListener("wheel",Gt):document.addEventListener("wheel",Gt,{passive:!1})},vi=h=>{if(h==null){F=void 0;return}if(F=al(h),F===void 0||F.length<=0){F=void 0;return}Qt(0),er(F.length-1),te===void 0&&rr(1)},mi=h=>{var w;typeof h=="string"?se=h.trim().toLowerCase()===be?be:Le:se=Le;let N=(w=c.shadowRoot)==null?void 0:w.querySelector(".range-slider-box");if(!N)return;N.className=`range-slider-box type-${se}`,Ue();let ae=se===be?"vertical":"horizontal";for(let pe of m)pe.setAttr("aria-orientation",ae)},yi=h=>{we=h,m.length>1&&Wn(m,we,c),Ue(),at()},bi=h=>{Y=h,m.length>1&&Wn(m,Y,c),Ue(),at()},xi=h=>{Te=oe(h,wt),Te<0&&(Te=wt),at()},us=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(Ze=void 0,d.style.removeProperty(Yn),d.classList.remove($t)):(Ze=h.toString(),d.style.setProperty(Yn,Ze),d.classList.add($t))},hs=(h,w)=>{let N=m[h];!N||(N.setAttr("aria-label",w),Gn[h]=w)},ir=h=>{if(ge=void 0,m.length<=1){me=!1,d.classList.remove(Xn);return}me=h,d.classList.toggle(Xn,me)},ql=()=>{gi(xe(c.getAttribute(g))),_e=xe(c.getAttribute($)),Ee=xe(c.getAttribute(S));let h=Wt(c,/^pointer([0-9]*)-disabled$/,w=>xe(w));for(let w of h){let N=w[0];!m[N]||(m[N].disabled=w[1])}},Gl=()=>{let h=Wt(c,/^aria-label([0-9]*)$/);for(let w of h){let N=w[0];hs(N,w[1])}},Kl=h=>{let w=m.length,N=m[w-1].$pointer,ae=N.cloneNode(!0);N.after(ae);let pe=Kr(c,ae,w);return pe.setCallbacks(Zn,Qn,es,ts),m.push(pe),tr(h,w),Ue(),at(),w},Jl=()=>{let h=m.length,w=m[h-1];return w?(w.destroy(),m.pop(),m.length<=1&&ir(!1),Ue(),at(),h-1):-1};return(()=>{var h,w;for(let ae of m)ae.setCallbacks(Zn,Qn,es,ts);let N=(h=c.shadowRoot)==null?void 0:h.querySelector(".panel-fill");N&&(U=cl(N)),mi(c.getAttribute(j)),yi(xe(c.getAttribute(J))),bi(xe(c.getAttribute(f))),Vl(c.getAttribute(v),c.getAttribute(y)),rr(c.getAttribute(x)),vi(c.getAttribute(p)),as(b.map(ae=>ae[1])),di(xe(c.getAttribute(o))),fi(oe(c.getAttribute(l),0)),pi(oe(c.getAttribute(a),1/0)),ir(xe(c.getAttribute(u))),xi(oe(c.getAttribute(M),wt)),ql(),Gl(),G=Pl(c,d,m),us((w=c.getAttribute(De))!=null?w:qn),d.addEventListener("mousedown",Kn),d.addEventListener("mouseup",qt),d.addEventListener("touchmove",ot),d.addEventListener("touchstart",ot),Ee||document.addEventListener("wheel",Gt,{passive:!1}),R=Cl(c,Fl,{setValues:as,setMin:Qt,setMax:er,setStep:rr,setPointersOverlap:di,setPointersMinDistance:fi,setPointersMaxDistance:pi,setDisabled:gi,setType:mi,setRightToLeft:yi,setBottomToTop:bi,setRound:xi,setKeyboardDisabled:ls,setMousewheelDisabled:cs,setRangeDragging:ir,setData:vi},{getPercents:rs,getValues:is,getPointerElements:ns,getMin:ss,getMax:os,getStep:Qr,getData:ei,getType:ti,getRound:ri,getTextMin:Jt,getTextMax:Zt,isRightToLeft:si,isBottomToTop:oi,isDisabled:ai,isKeyboardDisabled:li,isMousewheelDisabled:ci,isPointersOverlap:ui,isRangeDraggingEnabled:hi,getPointersMinDistance:ii,getPointersMaxDistance:ni}),R.init()})(),{get pointers(){return m},get styles(){return G},get pluginsManager(){return R},get min(){return Jt()},get max(){return Zt()},get step(){return Qr()},get pointersOverlap(){return ui()},set pointersOverlap(h){di(h)},get pointersMinDistance(){return ii()},set pointersMinDistance(h){fi(h)},get pointersMaxDistance(){return ni()},set pointersMaxDistance(h){pi(h)},get disabled(){return ai()},set disabled(h){gi(h)},get data(){return ei()},get type(){return ti()},set type(h){mi(h)},get rightToLeft(){return si()},set rightToLeft(h){yi(h)},get bottomToTop(){return oi()},set bottomToTop(h){bi(h)},get round(){return ri()},set round(h){xi(h)},get animateOnClick(){return Ze},set animateOnClick(h){us(h)},get keyboardDisabled(){return li()},set keyboardDisabled(h){ls(h)},get mousewheelDisabled(){return ci()},set mousewheelDisabled(h){cs(h)},get rangeDragging(){return hi()},set rangeDragging(h){ir(h)},setMin:Qt,setMax:er,setValue:tr,setStep:rr,setData:vi,getTextValue:_t,setAriaLabel:hs,getAriaLabel:Xl,addPointer:Kl,removePointer:Jl,destroy:()=>{d.removeEventListener("mousedown",Kn),d.removeEventListener("mouseup",qt),d.removeEventListener("touchmove",ot),d.removeEventListener("touchstart",ot),document.removeEventListener("wheel",Gt);for(let h of m)h.destroy();R==null||R.destroy()}}},Dl=(c,d,b)=>{let m=zn.find(([R,D,K,te])=>D.replace("#","")===d.replace(/\d+/g,""));if(m&&c.styles){let[R,D,K,te]=m,F=d.replace(/\D/g,"").trim(),se=F===""||F==="0"||F==="1"?0:oe(F,0)-1;c.styles.setStyle(R,b,se);return}switch(c&&c.pluginsManager&&c.pluginsManager.onAttrChange(d,b),d){case v:{c.setMin(b);break}case y:{c.setMax(b);break}case x:{c.setStep(b);break}case o:{c.pointersOverlap=xe(b);break}case l:{c.pointersMinDistance=oe(b,0);break}case u:{c.rangeDragging=xe(b);break}case a:{c.pointersMaxDistance=oe(b,1/0);break}case g:{c.disabled=xe(b);break}case $:{c.keyboardDisabled=xe(b);break}case S:{c.mousewheelDisabled=xe(b);break}case p:{c.setData(b);break}case j:{c.type=b;break}case J:{c.rightToLeft=xe(b);break}case f:{c.bottomToTop=xe(b);break}case M:{c.round=oe(b,wt);break}case q:{c.styles&&(c.styles.theme=b);break}case De:{c.animateOnClick=b;break}}let T=null;if(/^value([0-9]*)$/.test(d)&&(T="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(T="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(T="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(T="pointer-shape"),!T)return;let U=d.replace(/\D/g,"").trim(),G=U===""||U==="0"||U==="1"?0:oe(U,0)-1;switch(T){case"value":{c.setValue(b,G);break}case"pointer-disabled":{let R=c==null?void 0:c.pointers[G];if(!R)return;R.disabled=xe(b);break}case"aria-label":{c.setAriaLabel(G,b);break}case"pointer-shape":{c.styles&&c.styles.setPointerShape(G,b);break}}},Il=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(c){this.slider&&this.slider.setStep(c)}get step(){var c;return(c=this.slider)==null?void 0:c.step}set disabled(c){this.slider&&(this.slider.disabled=c)}get disabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.disabled)!=null?d:!1}set data(c){var d;(d=this.slider)==null||d.setData(c)}get data(){var c;return(c=this.slider)==null?void 0:c.data}set min(c){var d;(d=this.slider)==null||d.setMin(c)}get min(){var c;return(c=this.slider)==null?void 0:c.min}set max(c){var d;(d=this.slider)==null||d.setMax(c)}get max(){var c;return(c=this.slider)==null?void 0:c.max}set round(c){!this.slider||(this.slider.round=c)}get round(){var c,d;return(d=(c=this.slider)==null?void 0:c.round)!=null?d:wt}set type(c){!this.slider||(this.slider.type=c??Le)}get type(){var c;return((c=this.slider)==null?void 0:c.type)||Le}set pointersOverlap(c){!this.slider||(this.slider.pointersOverlap=c)}get pointersOverlap(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersOverlap)!=null?d:!1}set pointersMinDistance(c){!this.slider||(this.slider.pointersMinDistance=c)}get pointersMinDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMinDistance)!=null?d:0}set pointersMaxDistance(c){!this.slider||(this.slider.pointersMaxDistance=c)}get pointersMaxDistance(){var c,d;return(d=(c=this.slider)==null?void 0:c.pointersMaxDistance)!=null?d:1/0}set theme(c){!this.slider||!this.slider.styles||(this.slider.styles.theme=c)}get theme(){var c,d,b;return(b=(d=(c=this.slider)==null?void 0:c.styles)==null?void 0:d.theme)!=null?b:null}set rtl(c){!this.slider||(this.slider.rightToLeft=c)}get rtl(){var c,d;return(d=(c=this.slider)==null?void 0:c.rightToLeft)!=null?d:!1}set btt(c){!this.slider||(this.slider.bottomToTop=c)}get btt(){var c,d;return(d=(c=this.slider)==null?void 0:c.bottomToTop)!=null?d:!1}set keyboardDisabled(c){!this.slider||(this.slider.keyboardDisabled=c)}get keyboardDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(c){!this.slider||(this.slider.mousewheelDisabled=c)}get mousewheelDisabled(){var c,d;return(d=(c=this.slider)==null?void 0:c.mousewheelDisabled)!=null?d:!1}set animateOnClick(c){!this.slider||(this.slider.animateOnClick=c)}get animateOnClick(){var c;return(c=this.slider)==null?void 0:c.animateOnClick}get rangeDragging(){var c,d;return(d=(c=this.slider)==null?void 0:c.rangeDragging)!=null?d:!1}set rangeDragging(c){this.slider&&(this.slider.rangeDragging=xe(c))}get externalCSSList(){return this._externalCSSList}addPointer(c){var d;if(!this.slider)return;let b=(d=this.slider)==null?void 0:d.addPointer(c);Vn(this,this.slider,b,`value${b+1}`,`ariaLabel${b+1}`,`pointerShape${b+1}`,`pointer${b+1}Disabled`)}removePointer(){var c;!this.slider||(c=this.slider)==null||c.removePointer()}addCSS(c){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=c,this.shadowRoot.appendChild(d)}connectedCallback(){var c,d;if(!this.shadowRoot)return;this._externalCSSList=Sl(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let b=(c=this.shadowRoot)==null?void 0:c.querySelector(".pointer");if(!b)return;let m=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!m)return;let T=Ll(this,b);this.slider=Rl(this,m,T),Tl(this,this.slider),this._observer=new MutationObserver(U=>{U.forEach(G=>{var R;if(!this.slider||G.type!=="attributes")return;let D=G.attributeName;!D||Dl(this.slider,D,(R=this.getAttribute(D))!=null?R:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Zr=Il;window.tcRangeSlider=Zr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Zr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Zr{})})();var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function wr(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var n=[null];n.push.apply(n,arguments);var s=Function.bind.apply(e,n);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var n=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return r[i]}})}),t}var Ki={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ft,function(){var t=1e3,i=6e4,n=36e5,s="millisecond",o="second",l="minute",a="hour",u="day",p="week",v="month",y="quarter",x="year",M="date",j="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var _=["th","st","nd","rd"],O=k%100;return"["+k+(_[(O-20)%10]||_[O]||_[0])+"]"}},g=function(k,_,O){var B=String(k);return!B||B.length>=_?k:""+Array(_+1-B.length).join(O)+k},$={s:g,z:function(k){var _=-k.utcOffset(),O=Math.abs(_),B=Math.floor(O/60),P=O%60;return(_<=0?"+":"-")+g(B,2,"0")+":"+g(P,2,"0")},m:function k(_,O){if(_.date()<O.date())return-k(O,_);var B=12*(O.year()-_.year())+(O.month()-_.month()),P=_.clone().add(B,v),H=O-P<0,V=_.clone().add(B+(H?-1:1),v);return+(-(B+(O-P)/(H?P-V:V-P))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:v,y:x,w:p,d:u,D:M,h:a,m:l,s:o,ms:s,Q:y}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},S="en",E={};E[S]=f;var A=function(k){return k instanceof W},C=function k(_,O,B){var P;if(!_)return S;if(typeof _=="string"){var H=_.toLowerCase();E[H]&&(P=H),O&&(E[H]=O,P=H);var V=_.split("-");if(!P&&V.length>1)return k(V[0])}else{var ee=_.name;E[ee]=_,P=ee}return!B&&P&&(S=P),P||!B&&S},L=function(k,_){if(A(k))return k.clone();var O=typeof _=="object"?_:{};return O.date=k,O.args=arguments,new W(O)},I=$;I.l=C,I.i=A,I.w=function(k,_){return L(k,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var W=function(){function k(O){this.$L=C(O.locale,null,!0),this.parse(O)}var _=k.prototype;return _.parse=function(O){this.$d=function(B){var P=B.date,H=B.utc;if(P===null)return new Date(NaN);if(I.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var V=P.match(q);if(V){var ee=V[2]-1||0,le=(V[7]||"0").substring(0,3);return H?new Date(Date.UTC(V[1],ee,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)):new Date(V[1],ee,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)}}return new Date(P)}(O),this.$x=O.x||{},this.init()},_.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},_.$utils=function(){return I},_.isValid=function(){return this.$d.toString()!==j},_.isSame=function(O,B){var P=L(O);return this.startOf(B)<=P&&P<=this.endOf(B)},_.isAfter=function(O,B){return L(O)<this.startOf(B)},_.isBefore=function(O,B){return this.endOf(B)<L(O)},_.$g=function(O,B,P){return I.u(O)?this[B]:this.set(P,O)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(O,B){var P=this,H=!!I.u(B)||B,V=I.p(O),ee=function(He,ue){var oe=I.w(P.$u?Date.UTC(P.$y,ue,He):new Date(P.$y,ue,He),P);return H?oe:oe.endOf(u)},le=function(He,ue){return I.w(P.toDate()[He].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(ue)),P)},Z=this.$W,ve=this.$M,De=this.$D,Ie="set"+(this.$u?"UTC":"");switch(V){case x:return H?ee(1,0):ee(31,11);case v:return H?ee(1,ve):ee(0,ve+1);case p:var be=this.$locale().weekStart||0,Le=(Z<be?Z+7:Z)-be;return ee(H?De-Le:De+(6-Le),ve);case u:case M:return le(Ie+"Hours",0);case a:return le(Ie+"Minutes",1);case l:return le(Ie+"Seconds",2);case o:return le(Ie+"Milliseconds",3);default:return this.clone()}},_.endOf=function(O){return this.startOf(O,!1)},_.$set=function(O,B){var P,H=I.p(O),V="set"+(this.$u?"UTC":""),ee=(P={},P[u]=V+"Date",P[M]=V+"Date",P[v]=V+"Month",P[x]=V+"FullYear",P[a]=V+"Hours",P[l]=V+"Minutes",P[o]=V+"Seconds",P[s]=V+"Milliseconds",P)[H],le=H===u?this.$D+(B-this.$W):B;if(H===v||H===x){var Z=this.clone().set(M,1);Z.$d[ee](le),Z.init(),this.$d=Z.set(M,Math.min(this.$D,Z.daysInMonth())).$d}else ee&&this.$d[ee](le);return this.init(),this},_.set=function(O,B){return this.clone().$set(O,B)},_.get=function(O){return this[I.p(O)]()},_.add=function(O,B){var P,H=this;O=Number(O);var V=I.p(B),ee=function(ve){var De=L(H);return I.w(De.date(De.date()+Math.round(ve*O)),H)};if(V===v)return this.set(v,this.$M+O);if(V===x)return this.set(x,this.$y+O);if(V===u)return ee(1);if(V===p)return ee(7);var le=(P={},P[l]=i,P[a]=n,P[o]=t,P)[V]||1,Z=this.$d.getTime()+O*le;return I.w(Z,this)},_.subtract=function(O,B){return this.add(-1*O,B)},_.format=function(O){var B=this,P=this.$locale();if(!this.isValid())return P.invalidDate||j;var H=O||"YYYY-MM-DDTHH:mm:ssZ",V=I.z(this),ee=this.$H,le=this.$m,Z=this.$M,ve=P.weekdays,De=P.months,Ie=function(ue,oe,bt,xt){return ue&&(ue[oe]||ue(B,H))||bt[oe].slice(0,xt)},be=function(ue){return I.s(ee%12||12,ue,"0")},Le=P.meridiem||function(ue,oe,bt){var xt=ue<12?"AM":"PM";return bt?xt.toLowerCase():xt},He={YY:String(this.$y).slice(-2),YYYY:I.s(this.$y,4,"0"),M:Z+1,MM:I.s(Z+1,2,"0"),MMM:Ie(P.monthsShort,Z,De,3),MMMM:Ie(De,Z),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:Ie(P.weekdaysMin,this.$W,ve,2),ddd:Ie(P.weekdaysShort,this.$W,ve,3),dddd:ve[this.$W],H:String(ee),HH:I.s(ee,2,"0"),h:be(1),hh:be(2),a:Le(ee,le,!0),A:Le(ee,le,!1),m:String(le),mm:I.s(le,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:V};return H.replace(J,function(ue,oe){return oe||He[ue]||V.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(O,B,P){var H,V=I.p(B),ee=L(O),le=(ee.utcOffset()-this.utcOffset())*i,Z=this-ee,ve=I.m(this,ee);return ve=(H={},H[x]=ve/12,H[v]=ve,H[y]=ve/3,H[p]=(Z-le)/6048e5,H[u]=(Z-le)/864e5,H[a]=Z/n,H[l]=Z/i,H[o]=Z/t,H)[V]||Z,P?ve:I.a(ve)},_.daysInMonth=function(){return this.endOf(v).$D},_.$locale=function(){return E[this.$L]},_.locale=function(O,B){if(!O)return this.$L;var P=this.clone(),H=C(O,B,!0);return H&&(P.$L=H),P},_.clone=function(){return I.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},k}(),re=W.prototype;return L.prototype=re,[["$ms",s],["$s",o],["$m",l],["$H",a],["$W",u],["$M",v],["$y",x],["$D",M]].forEach(function(k){re[k[1]]=function(_){return this.$g(_,k[0],k[1])}}),L.extend=function(k,_){return k.$i||(k(_,W,L),k.$i=!0),L},L.locale=C,L.isDayjs=A,L.unix=function(k){return L(1e3*k)},L.en=E[S],L.Ls=E,L.p={},L})})(Ki);var Cs=Ki.exports;const Bt=$r(Cs);class ks extends Pe{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,t){this._startExpression=e,this._endExpression=t;const i=this.escapeRegex(this._startExpression),n=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${i}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${n}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,t,i){if(!this.hasTemplate(e))return null;i=i||e;const n=he` <slot name=${i}></slot> `,s={[e]:{...t}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:l}=this._renderedTemplates[i];this.contains(l)&&this.removeChild(l)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let t=0;t<this.children.length;t++){const i=this.children[t];if(i.nodeName==="RENDER-TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=t}}return e}_renderTemplate(e,t,i){let n;if(t&&t.childNodes.length){const s=t.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,t){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),t);return s?typeof s=="object"?JSON.stringify(s):s.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,t){t={...t};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(t)}catch{}return n}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,t,i){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,i),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=i,e;for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];this.renderNode(s,t,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const Ji=`
63
+ */const Tn=Symbol.for(""),_o=t=>{if((t==null?void 0:t.r)===Tn)return t==null?void 0:t._$litStatic$},Mt=t=>({_$litStatic$:t,r:Tn}),In=new Map,Eo=t=>(e,...r)=>{const i=r.length;let n,s;const o=[],a=[];let l,c=0,f=!1;for(;c<i;){for(l=e[c];c<i&&(s=r[c],(n=_o(s))!==void 0);)l+=n+e[++c],f=!0;c!==i&&a.push(s),o.push(l),c++}if(c===i&&o.push(e[i]),f){const m=o.join("$$lit$$");(e=In.get(m))===void 0&&(o.raw=o,In.set(m,e=o)),r=a}return t(e,...r)},ur=Eo(X);(()=>{var t=Object.defineProperty,e=Math.pow,r=(u,d,x)=>d in u?t(u,d,{enumerable:!0,configurable:!0,writable:!0,value:x}):u[d]=x,i=(u,d,x)=>(r(u,typeof d!="symbol"?d+"":d,x),x),n=(u,d)=>` ${d&&d.length>0?d.map(x=>`<link rel="stylesheet" href="${x}" />`).join(""):""} <style> ${u} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,s=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",o="pointers-overlap",a="pointers-min-distance",l="pointers-max-distance",c="range-dragging",f="data",m="min",y="max",v="step",w="round",O="type",q="theme",j="rtl",p="btt",g="disabled",$="keyboard-disabled",S="mousewheel-disabled",A="slider-width",M="slider-height",L="slider-radius",R="slider-bg",N="slider-bg-hover",G="slider-bg-fill",ne="pointer-width",k="pointer-height",E="pointer-radius",P="pointer-bg",F="pointer-bg-hover",C="pointer-bg-focus",U="pointer-shadow",K="pointer-shadow-hover",re="pointer-shadow-focus",ue="pointer-border",ee="pointer-border-hover",ye="pointer-border-focus",Fe="animate-onclick",He="css-links",$e="vertical",De="horizontal",Ge=(u,d,x,b,T)=>{let z=d-u;return z===0?x:(b-x)*(T-u)/z+x},de=u=>!isNaN(parseFloat(u))&&isFinite(u),ae=(u,d)=>de(u)?Number(u):d,jt=(u,d)=>d===0?0:Math.round(u/d)*d,Ft=(u,d=1/0)=>{if(d===1/0)return u;let x=e(10,d);return Math.round(u*x)/x},_e=u=>u==null?!1:typeof u=="boolean"?u:u.trim().toLowerCase()==="true",Cc=(u,d)=>{u.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:d}}))},Lc=(u,d)=>{u.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:d}}))},kc=(u,d)=>{u.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:d}}))},Rc=(u,d)=>{u.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:d}}))},Tc=(u,d)=>{if(!d||d.length<=0)return;let x=d.map(T=>de(T)?ae(T,T):T),b={values:x||[]};b.value=x[0],b.value0=x[0],b.value1=x[0];for(let T=1;T<x.length;T++)b[`value${T+1}`]=x[T];u.dispatchEvent(new CustomEvent("change",{detail:b}))},Ri=(u,d,x)=>{let b=0,T,z,Z,I,D=!1,Q=(V,he,be,ve,pe,ge)=>{let Se=b;be!==void 0&&V>be&&(V=be),he!==void 0&&V<he&&(V=he),b=V;let Me=b;return(ve===$e&&ge||ve===De&&pe)&&(Me=100-Me),ve===$e?d.style.top=`${Me}%`:d.style.left=`${Me}%`,Se!==b},ie=V=>V===d||d.contains(V),H=(V,he,be,ve)=>{T=V,z=he,Z=be,I=ve},le=V=>{D=V,d.classList.toggle("disabled",D),D?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},Ne=(V,he)=>{he==null?d.removeAttribute(V):d.setAttribute(V,he)},Ae=V=>d.getAttribute(V),Y=V=>{if(!D){switch(V.key){case"ArrowLeft":{V.preventDefault(),typeof T=="function"&&T(x);break}case"ArrowRight":{V.preventDefault(),typeof z=="function"&&z(x);break}case"ArrowUp":{V.preventDefault(),typeof Z=="function"&&Z(x);break}case"ArrowDown":{V.preventDefault(),typeof I=="function"&&I(x);break}}Rc(u,V)}},te=()=>{D||Cc(u,d)};return d.className=`pointer pointer-${x}`,d.addEventListener("keydown",Y),d.addEventListener("click",te),{$pointer:d,get percent(){return b},get disabled(){return D},set disabled(V){le(V)},updatePosition:Q,isClicked:ie,setCallbacks:H,setAttr:Ne,getAttr:Ae,destroy:()=>{d.removeEventListener("keydown",Y),d.removeEventListener("click",te),d.remove()}}},Ic=u=>{if(u==null)return;if(Array.isArray(u))return u;if(u.trim()==="")return;let d=u.split(","),x=[],b=!0;for(let T=0;T<d.length;T++){let z=d[T].trim();z!==""&&(x.push(z),de(z)||(b=!1))}return b?x.map(T=>Number(T)):x},Dc=(u,d)=>d?d.findIndex(x=>x===u||x.toString().trim()===u.toString().trim()):-1,Nc=u=>({updatePosition:(d,x,b,T)=>{if(x.length<=0)return;let z=x.length===1,Z=x[0],I=x[x.length-1];d===$e?(u.style.removeProperty("width"),u.style.removeProperty("right"),u.style.removeProperty("left"),z?u.style.height=`${Z}%`:u.style.height=`${Math.abs(Z-I)}%`,T?(u.style.bottom="0%",z?u.style.top="auto":u.style.top=`${Math.min(100-I,100-Z)}%`):(u.style.bottom="auto",z?u.style.top="0%":u.style.top=`${Math.min(Z,I)}%`)):(u.style.removeProperty("height"),u.style.removeProperty("top"),u.style.removeProperty("bottom"),z?u.style.width=`${Z}%`:u.style.width=`${Math.abs(Z-I)}%`,b?(u.style.right="0%",z?u.style.left="auto":u.style.left=`${Math.min(100-I,100-Z)}%`):(u.style.right="auto",z?u.style.left="0%":u.style.left=`${Math.min(Z,I)}%`))}}),Bs="--animate-onclick",Bc="--width",jc="--height",Fc="--panel-bg-border-radius",Hc="--panel-bg",qc="--panel-bg-hover",Uc="--panel-bg-fill",zc="--pointer-width",Yc="--pointer-height",Vc="--pointer-border-radius",Xc="--pointer-bg",Wc="--pointer-bg-hover",Kc="--pointer-bg-focus",Gc="--pointer-shadow",Jc="--pointer-shadow-hover",Zc="--pointer-shadow-focus",Qc="--pointer-border",eu="--pointer-border-hover",tu="--pointer-border-focus",Sr=(u,d,x)=>{let b=new Map;for(let T of u.attributes){let z=T.nodeName.trim().toLowerCase();if(!d.test(z))continue;let Z=z.replace(/\D/g,"").trim(),I=Z===""||Z==="0"||Z==="1"?0:ae(Z,0)-1,D=x&&typeof x=="function"?x(T.value):T.value;b.set(I,D)}return b},ru=u=>{if(!u)return null;let d=u.getAttribute(He);if(!d)return null;let x=d.split(";"),b=[];for(let T of x)T.trim()!==""&&b.push(T.trim());return b},js=[[Bc,A,"sliderWidth",null],[jc,M,"sliderHeight",null],[Fc,L,"sliderRadius",null],[Hc,R,"sliderBg",null],[qc,N,"sliderBgHover",null],[Uc,G,"sliderBgFill",null],[zc,ne,"pointer#Width",/^pointer([0-9]*)-width$/],[Yc,k,"pointer#Height",/^pointer([0-9]*)-height$/],[Vc,E,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Xc,P,"pointer#Bg",/^pointer([0-9]*)-bg$/],[Wc,F,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Kc,C,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Gc,U,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Jc,K,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Zc,re,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Qc,ue,"pointer#Border",/^pointer([0-9]*)-border$/],[eu,ee,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[tu,ye,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],iu=(u,d,x)=>{let b=null,T=[],z=new Map,Z=(Y,te=d)=>{let V=[...te.classList];for(let he of V)he.startsWith(Y)&&d.classList.remove(he)},I=()=>{Z("shape");let Y=d.querySelectorAll(".pointer");for(let te of Y)Z("shape",te)},D=Y=>{b=Y,Z("theme-"),typeof Y=="string"&&d.classList.add(`theme-${Y}`)},Q=()=>{if(I(),!(T.length<=0)){d.classList.add("shape",`shape-${T[0]}`);for(let Y=1;Y<T.length;Y++){let te=T[Y];if(!te)continue;let V=d.querySelector(`.pointer-${Y}`);!V||V.classList.add("shape",`shape-${te}`)}}},ie=(Y,te)=>{T[Y]=te,Q()},H=()=>{I();let Y=Sr(u,/^pointer([0-9]*)-shape$/);if(!(Y.size<=0)){for(let te of Y){let V=te[0];T[V]=te[1]}Q()}},le=(Y,te)=>`${Y}-${te}`,Ne=(Y,te,V)=>{let he=x[V];if(!he)return;let be=V===0?d:he.$pointer;if(te==null){z.has(le(Y,V))&&z.delete(le(Y,V)),be.style.removeProperty(Y);return}z.set(le(Y,V),te),be.style.setProperty(Y,te)},Ae=(Y,te)=>z.get(le(Y,te));return(()=>{for(let Y of js){let[te,V,he,be]=Y;if(be){let pe=Sr(u,be);for(let ge of pe){let Se=ge[0],Me=ge[1];Ne(te,Me,Se)}}else{let pe=u.getAttribute(V);Ne(te,pe,0)}let ve=[];if(he.indexOf("#")===-1)ve.push([he,0]);else{ve.push([he.replace("#",""),0]),ve.push([he.replace("#","0"),0]),ve.push([he.replace("#","1"),0]);for(let pe=1;pe<x.length;pe++)ve.push([he.replace("#",(pe+1).toString()),pe])}for(let pe of ve)try{let ge=pe[0],Se=pe[1];Object.prototype.hasOwnProperty.call(u,ge)||Object.defineProperty(u,ge,{get(){return Ae(te,Se)},set:Me=>{Ne(te,Me,Se)}})}catch(ge){console.error(ge)}}D(u.getAttribute(q)),H()})(),{setStyle:Ne,getStyle:Ae,get theme(){return b},set theme(Y){D(Y)},get pointerShapes(){return T},setPointerShape:ie}},Ht="animate-on-click",Fs="range-dragging",nu=(u,d,x,b)=>{let T=[],z=ie=>{for(let H of T)H.update&&typeof H.update=="function"&&H.update(ie)},Z=()=>{for(let ie of T)ie.destroy&&typeof ie.destroy=="function"&&ie.destroy()},I=(ie,H)=>{for(let le of T)le.onAttrChange&&typeof le.onAttrChange=="function"&&le.onAttrChange(ie,H)},D=ie=>{if(ie.gettersAndSetters){for(let H of ie.gettersAndSetters)if(!(!H.name||!H.attributes))try{Object.prototype.hasOwnProperty.call(u,H.name)||Object.defineProperty(u,H.name,H.attributes)}catch(le){console.error("defineSettersGetters error:",le)}}},Q=ie=>{var H;if(!ie.css)return;let le=(H=u.shadowRoot)==null?void 0:H.querySelector("style");!le||(le.innerHTML+=ie.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let ie of window.tcRangeSliderPlugins){let H=ie();T.push(H),H.init&&typeof H.init=="function"&&(H.init(u,d,x,b),D(H),Q(H))}},update:z,onAttrChange:I,destroy:Z}},su=10,ou=(u,d)=>{let x=new Map,b=/^value([0-9]*)$/;for(let I of u.attributes){let D=I.nodeName.trim().toLowerCase();if(!b.test(D))continue;let Q=D.replace("value","").trim(),ie=Q===""||Q==="0"||Q==="1"?0:ae(Q,0)-1,H=de(I.value)?ae(I.value,0):I.value;x.set(ie,H)}let T=Math.max(...Array.from(x.keys())),z=[];z.push([Ri(u,d,0),x.get(0)]);let Z=d;for(let I=1;I<=T;I++){let D=d.cloneNode(!0);Z.after(D),Z=D,z.push([Ri(u,D,I),x.get(I)])}return z},Hs=(u,d,x,b,T,z,Z)=>{try{Object.defineProperty(u,b,{configurable:!0,get(){if(!d)return;let I=d.pointers[x];if(!I)return;let D=d.getTextValue(I.percent);return de(D)?ae(D,D):D},set:I=>{d.pointers[x]?d==null||d.setValue(I,x):d==null||d.addPointer(I)}}),Object.defineProperty(u,T,{configurable:!0,get(){var I,D;return(D=(I=d==null?void 0:d.pointers[x])==null?void 0:I.getAttr("aria-label"))!=null?D:void 0},set:I=>{!d||d.setAriaLabel(x,I)}}),Object.defineProperty(u,z,{configurable:!0,get(){var I,D;return(D=(I=d==null?void 0:d.styles)==null?void 0:I.pointerShapes[x])!=null?D:null},set:I=>{!d||!d.styles||d.styles.setPointerShape(x,I)}}),Object.defineProperty(u,Z,{configurable:!0,get(){var I;return(I=d==null?void 0:d.pointers[x].disabled)!=null?I:!1},set:I=>{if(!d)return;let D=d==null?void 0:d.pointers[x];!D||(D.disabled=I)}})}catch(I){console.error(I)}},lu=(u,d)=>{let x=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let b=2;b<su;b++)x.push([`value${b}`,`ariaLabel${b}`,`pointer${b}Shape`,`pointer${b}Disabled`,b-1]);for(let b of x)Hs(u,d,b[4],b[0],b[1],b[2],b[3])},qs=(u,d,x)=>{var b;let T=(b=x.shadowRoot)==null?void 0:b.querySelector(".container");if(T)for(let z of u)d?T.prepend(z.$pointer):T.append(z.$pointer)},Ti=0,nr=100,qt=2,Us="0.3s",au=(u,d,x)=>{let b=x.map(h=>h[0]),T=null,z=null,Z=null,I=null,D=Ti,Q=nr,ie,H,le=De,Ne=qt,Ae=!1,Y=!1,te=!1,V=0,he=1/0,be=!1,ve,pe,ge=!1,Se=!1,Me=!1,dt=Us,zs=[],Ys=h=>{ge||(h.preventDefault&&h.preventDefault(),$t(h),window.addEventListener("mousemove",$t),window.addEventListener("mouseup",Mr),Lc(u,h))},Mr=h=>{ge||(ve=void 0,pe=void 0,window.removeEventListener("mousemove",$t),window.removeEventListener("mouseup",Mr),dt&&d.classList.add(Ht),kc(u,h))},hu=(h,_)=>{if(b.length<=0)return;if(b.length===1)return b[0].isClicked(h)&&dt&&d.classList.remove(Ht),b[0];let B=fu(h);if(be){let oe=_,qe=Pr(oe);qe!==void 0&&(oe=jt(oe,qe)),B?(ve=oe,pe=0,dt&&d.classList.remove(Ht)):ve!==void 0&&(pe=oe-ve,ve=oe)}if(!du(h)&&!B){for(let oe of b)if(!(!oe.isClicked(h)||oe.disabled))return dt&&d.classList.remove(Ht),oe;for(let oe of b)if(T===oe)return oe}let ce=1/0,me=null;for(let oe of b){if(oe.disabled)continue;let qe=Math.abs(_-oe.percent);qe<ce&&(ce=qe,me=oe)}return me},Vs=()=>b.findIndex(h=>T===h&&!h.disabled),$t=h=>{let _;if(le===$e){let{height:ce,top:me}=d.getBoundingClientRect(),oe=h.type.indexOf("mouse")!==-1?h.clientY:h.touches[0].clientY;_=Math.min(Math.max(0,oe-me),ce)*100/ce}else{let{width:ce,left:me}=d.getBoundingClientRect(),oe=h.type.indexOf("mouse")!==-1?h.clientX:h.touches[0].clientX;_=Math.min(Math.max(0,oe-me),ce)*100/ce}if((Ae||Y)&&(_=100-_),T=hu(h.target,_),be&&b.length>1&&pe!==void 0){let ce=b[0],me=b[b.length-1],oe=ce.percent+pe<0,qe=me.percent+pe>100;if(oe||qe)return;for(let Nr=0;Nr<b.length;Nr++)Oe(Nr,b[Nr].percent+pe);return}let B=Vs();B!==-1&&(Oe(B,_),T==null||T.$pointer.focus())},Or=h=>{if(ge||document.activeElement!==u||T!=null&&T.disabled)return;h.stopPropagation(),h.preventDefault();let _=h.deltaY<0,B=Ae||Y,ce=_?!B:B,me=Vs();me!==-1&&(ce?sr(me,b[me].percent):or(me,b[me].percent))},Xs=h=>{ge||Se||(le===$e?Y?Oe(h,100):Oe(h,0):Ae?or(h,b[h].percent):sr(h,b[h].percent))},Ws=h=>{ge||Se||(le===$e?Y?Oe(h,0):Oe(h,100):Ae?sr(h,b[h].percent):or(h,b[h].percent))},Ks=h=>{ge||Se||(le===$e?Y?or(h,b[h].percent):sr(h,b[h].percent):Ae?Oe(h,100):Oe(h,0))},Gs=h=>{ge||Se||(le===$e?Y?sr(h,b[h].percent):or(h,b[h].percent):Ae?Oe(h,0):Oe(h,100))},du=h=>h.classList.contains("panel"),fu=h=>h.classList.contains("panel-fill"),sr=(h,_)=>{if(_===void 0)return;let B=Pr(_);B==null&&(B=1),_-=B,_<0&&(_=0),Oe(h,_)},or=(h,_)=>{if(_===void 0)return;let B=Pr(_);B==null&&(B=1),_+=B,_>100&&(_=100),Oe(h,_)},_t=()=>{!I||I.update({percents:Js(),values:Zs(),$pointers:Qs(),min:eo(),max:to(),data:Ni(),step:Di(),round:ji(),type:Bi(),textMin:Cr(),textMax:Lr(),rightToLeft:qi(),bottomToTop:Ui(),pointersOverlap:Xi(),pointersMinDistance:Fi(),pointersMaxDistance:Hi(),rangeDragging:Wi(),disabled:zi(),keyboardDisabled:Yi(),mousewheelDisabled:Vi()})},pu=()=>{_t()},gu=h=>{if(!(te||b.length<=1||Q===D))if(h===0){let _=he*100/(Q-D);return Math.max(0,b[h+1].percent-_)}else{let _=V*100/(Q-D);return Math.min(b[h-1].percent+_,100)}},mu=h=>{if(!(te||b.length<=1||Q===D))if(h===b.length-1){let _=he*100/(Q-D);return Math.min(b[h-1].percent+_,100)}else{let _=V*100/(Q-D);return Math.max(0,b[h+1].percent-_)}},Pr=h=>{let _;if(typeof ie=="function"){let B=Ge(0,100,D,Q,h);_=ie(B,h)}else _=ie;if(de(_)){let B=Q-D;return _=B===0?0:_*100/B,_}},Ut=h=>{if(h===void 0)return;let _=Ge(0,100,D,Q,h);return H!==void 0?H[Math.round(_)]:Ft(_,Ne)},Cr=()=>H!==void 0?H[D]:D,Lr=()=>H!==void 0?H[Q]:Q,Di=()=>ie,vu=h=>{var _;return h<=0||te?Cr():(_=Ut(b[h-1].percent))!=null?_:""},yu=h=>{var _;return b.length<=1||h>=b.length-1||te?Lr():(_=Ut(b[h+1].percent))!=null?_:""},Js=()=>b.map(h=>h.percent),Zs=()=>b.map(h=>Ut(h.percent)),Qs=()=>b.map(h=>h.$pointer),eo=()=>D,to=()=>Q,Ni=()=>H,Bi=()=>le,ji=()=>Ne,Fi=()=>V,Hi=()=>he,bu=h=>zs[h],qi=()=>Ae,Ui=()=>Y,zi=()=>ge,Yi=()=>Se,Vi=()=>Me,Xi=()=>te,Wi=()=>be,Oe=(h,_)=>{if(_===void 0)return;let B=Pr(_);B!==void 0&&(_=jt(_,B));let ce=b[h];if(!ce)return;let me=ce.updatePosition(_,gu(h),mu(h),le,Ae,Y);z==null||z.updatePosition(le,b.map(oe=>oe.percent),Ae,Y),_t();for(let oe of b){let qe=Ut(oe.percent);qe!==void 0&&(oe.setAttr("aria-valuenow",qe.toString()),oe.setAttr("aria-valuetext",qe.toString()))}wu(),me&&Tc(u,b.map(oe=>Ut(oe.percent)))},Je=()=>{for(let h=0;h<b.length;h++)Oe(h,b[h].percent)},xu=(h,_)=>{D=H!==void 0?0:ae(h,Ti),Q=H!==void 0?H.length-1:ae(_,nr),kr(D),Rr(Q)},wu=()=>{var h,_;for(let B=0;B<b.length;B++){let ce=b[B];ce.setAttr("aria-valuemin",((h=vu(B))!=null?h:"").toString()),ce.setAttr("aria-valuemax",((_=yu(B))!=null?_:"").toString())}},kr=h=>{D=ae(h,Ti),D>Q&&(Q=D+nr),Je()},Rr=h=>{Q=ae(h,nr),Q<D&&(Q=D+nr),Je()},ro=h=>{te=!0;for(let _=0;_<h.length;_++)Tr(h[_],_);te=!1;for(let _=0;_<h.length;_++)Tr(h[_],_)},Tr=(h,_)=>{let B;H!==void 0?(B=h==null?0:Dc(h,H),B===-1&&(B=0)):(B=ae(h,D),B<D&&(B=D),B>Q&&(B=Q));let ce=Ge(D,Q,0,100,B);Oe(_,ce)},Ir=h=>{if(h==null){ie=void 0;return}if(typeof h=="function"){ie=h,Je();return}if(de(h)){ie=ae(h,1);let _=Math.abs(Q-D);ie>_&&(ie=void 0),Je();return}ie=void 0},Ki=h=>{te=h,Je()},Gi=h=>{(!de(h)||h<0)&&(h=0),V=h},Ji=h=>{(!de(h)||h<0)&&(h=1/0),he=h},Zi=h=>{ge=h,d.classList.toggle("disabled",ge),ge?d.setAttribute("aria-disabled","true"):d.hasAttribute("aria-disabled")&&d.removeAttribute("aria-disabled")},io=h=>{Se=h},no=h=>{Me=h,Me?document.removeEventListener("wheel",Or):document.addEventListener("wheel",Or,{passive:!1})},Qi=h=>{if(h==null){H=void 0;return}if(H=Ic(h),H===void 0||H.length<=0){H=void 0;return}kr(0),Rr(H.length-1),ie===void 0&&Ir(1)},en=h=>{var _;typeof h=="string"?le=h.trim().toLowerCase()===$e?$e:De:le=De;let B=(_=u.shadowRoot)==null?void 0:_.querySelector(".range-slider-box");if(!B)return;B.className=`range-slider-box type-${le}`,Je();let ce=le===$e?"vertical":"horizontal";for(let me of b)me.setAttr("aria-orientation",ce)},tn=h=>{Ae=h,b.length>1&&qs(b,Ae,u),Je(),_t()},rn=h=>{Y=h,b.length>1&&qs(b,Y,u),Je(),_t()},nn=h=>{Ne=ae(h,qt),Ne<0&&(Ne=qt),_t()},so=h=>{h==null||h.toString().trim().toLowerCase()==="false"?(dt=void 0,d.style.removeProperty(Bs),d.classList.remove(Ht)):(dt=h.toString(),d.style.setProperty(Bs,dt),d.classList.add(Ht))},oo=(h,_)=>{let B=b[h];!B||(B.setAttr("aria-label",_),zs[h]=_)},Dr=h=>{if(ve=void 0,b.length<=1){be=!1,d.classList.remove(Fs);return}be=h,d.classList.toggle(Fs,be)},$u=()=>{Zi(_e(u.getAttribute(g))),Se=_e(u.getAttribute($)),Me=_e(u.getAttribute(S));let h=Sr(u,/^pointer([0-9]*)-disabled$/,_=>_e(_));for(let _ of h){let B=_[0];!b[B]||(b[B].disabled=_[1])}},_u=()=>{let h=Sr(u,/^aria-label([0-9]*)$/);for(let _ of h){let B=_[0];oo(B,_[1])}},Eu=h=>{let _=b.length,B=b[_-1].$pointer,ce=B.cloneNode(!0);B.after(ce);let me=Ri(u,ce,_);return me.setCallbacks(Xs,Ws,Ks,Gs),b.push(me),Tr(h,_),Je(),_t(),_},Au=()=>{let h=b.length,_=b[h-1];return _?(_.destroy(),b.pop(),b.length<=1&&Dr(!1),Je(),_t(),h-1):-1};return(()=>{var h,_;for(let ce of b)ce.setCallbacks(Xs,Ws,Ks,Gs);let B=(h=u.shadowRoot)==null?void 0:h.querySelector(".panel-fill");B&&(z=Nc(B)),en(u.getAttribute(O)),tn(_e(u.getAttribute(j))),rn(_e(u.getAttribute(p))),xu(u.getAttribute(m),u.getAttribute(y)),Ir(u.getAttribute(v)),Qi(u.getAttribute(f)),ro(x.map(ce=>ce[1])),Ki(_e(u.getAttribute(o))),Gi(ae(u.getAttribute(a),0)),Ji(ae(u.getAttribute(l),1/0)),Dr(_e(u.getAttribute(c))),nn(ae(u.getAttribute(w),qt)),$u(),_u(),Z=iu(u,d,b),so((_=u.getAttribute(Fe))!=null?_:Us),d.addEventListener("mousedown",Ys),d.addEventListener("mouseup",Mr),d.addEventListener("touchmove",$t),d.addEventListener("touchstart",$t),Me||document.addEventListener("wheel",Or,{passive:!1}),I=nu(u,pu,{setValues:ro,setMin:kr,setMax:Rr,setStep:Ir,setPointersOverlap:Ki,setPointersMinDistance:Gi,setPointersMaxDistance:Ji,setDisabled:Zi,setType:en,setRightToLeft:tn,setBottomToTop:rn,setRound:nn,setKeyboardDisabled:io,setMousewheelDisabled:no,setRangeDragging:Dr,setData:Qi},{getPercents:Js,getValues:Zs,getPointerElements:Qs,getMin:eo,getMax:to,getStep:Di,getData:Ni,getType:Bi,getRound:ji,getTextMin:Cr,getTextMax:Lr,isRightToLeft:qi,isBottomToTop:Ui,isDisabled:zi,isKeyboardDisabled:Yi,isMousewheelDisabled:Vi,isPointersOverlap:Xi,isRangeDraggingEnabled:Wi,getPointersMinDistance:Fi,getPointersMaxDistance:Hi}),I.init()})(),{get pointers(){return b},get styles(){return Z},get pluginsManager(){return I},get min(){return Cr()},get max(){return Lr()},get step(){return Di()},get pointersOverlap(){return Xi()},set pointersOverlap(h){Ki(h)},get pointersMinDistance(){return Fi()},set pointersMinDistance(h){Gi(h)},get pointersMaxDistance(){return Hi()},set pointersMaxDistance(h){Ji(h)},get disabled(){return zi()},set disabled(h){Zi(h)},get data(){return Ni()},get type(){return Bi()},set type(h){en(h)},get rightToLeft(){return qi()},set rightToLeft(h){tn(h)},get bottomToTop(){return Ui()},set bottomToTop(h){rn(h)},get round(){return ji()},set round(h){nn(h)},get animateOnClick(){return dt},set animateOnClick(h){so(h)},get keyboardDisabled(){return Yi()},set keyboardDisabled(h){io(h)},get mousewheelDisabled(){return Vi()},set mousewheelDisabled(h){no(h)},get rangeDragging(){return Wi()},set rangeDragging(h){Dr(h)},setMin:kr,setMax:Rr,setValue:Tr,setStep:Ir,setData:Qi,getTextValue:Ut,setAriaLabel:oo,getAriaLabel:bu,addPointer:Eu,removePointer:Au,destroy:()=>{d.removeEventListener("mousedown",Ys),d.removeEventListener("mouseup",Mr),d.removeEventListener("touchmove",$t),d.removeEventListener("touchstart",$t),document.removeEventListener("wheel",Or);for(let h of b)h.destroy();I==null||I.destroy()}}},cu=(u,d,x)=>{let b=js.find(([I,D,Q,ie])=>D.replace("#","")===d.replace(/\d+/g,""));if(b&&u.styles){let[I,D,Q,ie]=b,H=d.replace(/\D/g,"").trim(),le=H===""||H==="0"||H==="1"?0:ae(H,0)-1;u.styles.setStyle(I,x,le);return}switch(u&&u.pluginsManager&&u.pluginsManager.onAttrChange(d,x),d){case m:{u.setMin(x);break}case y:{u.setMax(x);break}case v:{u.setStep(x);break}case o:{u.pointersOverlap=_e(x);break}case a:{u.pointersMinDistance=ae(x,0);break}case c:{u.rangeDragging=_e(x);break}case l:{u.pointersMaxDistance=ae(x,1/0);break}case g:{u.disabled=_e(x);break}case $:{u.keyboardDisabled=_e(x);break}case S:{u.mousewheelDisabled=_e(x);break}case f:{u.setData(x);break}case O:{u.type=x;break}case j:{u.rightToLeft=_e(x);break}case p:{u.bottomToTop=_e(x);break}case w:{u.round=ae(x,qt);break}case q:{u.styles&&(u.styles.theme=x);break}case Fe:{u.animateOnClick=x;break}}let T=null;if(/^value([0-9]*)$/.test(d)&&(T="value"),/^pointer([0-9]*)-disabled$/.test(d)&&(T="pointer-disabled"),/^aria-label([0-9]*)$/.test(d)&&(T="aria-label"),/^pointer([0-9]*)-shape$/.test(d)&&(T="pointer-shape"),!T)return;let z=d.replace(/\D/g,"").trim(),Z=z===""||z==="0"||z==="1"?0:ae(z,0)-1;switch(T){case"value":{u.setValue(x,Z);break}case"pointer-disabled":{let I=u==null?void 0:u.pointers[Z];if(!I)return;I.disabled=_e(x);break}case"aria-label":{u.setAriaLabel(Z,x);break}case"pointer-shape":{u.styles&&u.styles.setPointerShape(Z,x);break}}},uu=class extends HTMLElement{constructor(){super(),i(this,"slider"),i(this,"_externalCSSList",[]),i(this,"_observer",null),this.attachShadow({mode:"open"})}set step(u){this.slider&&this.slider.setStep(u)}get step(){var u;return(u=this.slider)==null?void 0:u.step}set disabled(u){this.slider&&(this.slider.disabled=u)}get disabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.disabled)!=null?d:!1}set data(u){var d;(d=this.slider)==null||d.setData(u)}get data(){var u;return(u=this.slider)==null?void 0:u.data}set min(u){var d;(d=this.slider)==null||d.setMin(u)}get min(){var u;return(u=this.slider)==null?void 0:u.min}set max(u){var d;(d=this.slider)==null||d.setMax(u)}get max(){var u;return(u=this.slider)==null?void 0:u.max}set round(u){!this.slider||(this.slider.round=u)}get round(){var u,d;return(d=(u=this.slider)==null?void 0:u.round)!=null?d:qt}set type(u){!this.slider||(this.slider.type=u??De)}get type(){var u;return((u=this.slider)==null?void 0:u.type)||De}set pointersOverlap(u){!this.slider||(this.slider.pointersOverlap=u)}get pointersOverlap(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersOverlap)!=null?d:!1}set pointersMinDistance(u){!this.slider||(this.slider.pointersMinDistance=u)}get pointersMinDistance(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersMinDistance)!=null?d:0}set pointersMaxDistance(u){!this.slider||(this.slider.pointersMaxDistance=u)}get pointersMaxDistance(){var u,d;return(d=(u=this.slider)==null?void 0:u.pointersMaxDistance)!=null?d:1/0}set theme(u){!this.slider||!this.slider.styles||(this.slider.styles.theme=u)}get theme(){var u,d,x;return(x=(d=(u=this.slider)==null?void 0:u.styles)==null?void 0:d.theme)!=null?x:null}set rtl(u){!this.slider||(this.slider.rightToLeft=u)}get rtl(){var u,d;return(d=(u=this.slider)==null?void 0:u.rightToLeft)!=null?d:!1}set btt(u){!this.slider||(this.slider.bottomToTop=u)}get btt(){var u,d;return(d=(u=this.slider)==null?void 0:u.bottomToTop)!=null?d:!1}set keyboardDisabled(u){!this.slider||(this.slider.keyboardDisabled=u)}get keyboardDisabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.keyboardDisabled)!=null?d:!1}set mousewheelDisabled(u){!this.slider||(this.slider.mousewheelDisabled=u)}get mousewheelDisabled(){var u,d;return(d=(u=this.slider)==null?void 0:u.mousewheelDisabled)!=null?d:!1}set animateOnClick(u){!this.slider||(this.slider.animateOnClick=u)}get animateOnClick(){var u;return(u=this.slider)==null?void 0:u.animateOnClick}get rangeDragging(){var u,d;return(d=(u=this.slider)==null?void 0:u.rangeDragging)!=null?d:!1}set rangeDragging(u){this.slider&&(this.slider.rangeDragging=_e(u))}get externalCSSList(){return this._externalCSSList}addPointer(u){var d;if(!this.slider)return;let x=(d=this.slider)==null?void 0:d.addPointer(u);Hs(this,this.slider,x,`value${x+1}`,`ariaLabel${x+1}`,`pointerShape${x+1}`,`pointer${x+1}Disabled`)}removePointer(){var u;!this.slider||(u=this.slider)==null||u.removePointer()}addCSS(u){if(!this.shadowRoot)return;let d=document.createElement("style");d.textContent=u,this.shadowRoot.appendChild(d)}connectedCallback(){var u,d;if(!this.shadowRoot)return;this._externalCSSList=ru(this),this.shadowRoot.innerHTML=n(s,this._externalCSSList);let x=(u=this.shadowRoot)==null?void 0:u.querySelector(".pointer");if(!x)return;let b=(d=this.shadowRoot)==null?void 0:d.getElementById("range-slider");if(!b)return;let T=ou(this,x);this.slider=au(this,b,T),lu(this,this.slider),this._observer=new MutationObserver(z=>{z.forEach(Z=>{var I;if(!this.slider||Z.type!=="attributes")return;let D=Z.attributeName;!D||cu(this.slider,D,(I=this.getAttribute(D))!=null?I:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Ii=uu;window.tcRangeSlider=Ii,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Ii),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Ii{})})();var Ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ei(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){if(this instanceof i){var n=[null];n.push.apply(n,arguments);var s=Function.bind.apply(e,n);return new s}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),r}var Dn={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(Ot,function(){var r=1e3,i=6e4,n=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",f="week",m="month",y="quarter",v="year",w="date",O="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var E=["th","st","nd","rd"],P=k%100;return"["+k+(E[(P-20)%10]||E[P]||E[0])+"]"}},g=function(k,E,P){var F=String(k);return!F||F.length>=E?k:""+Array(E+1-F.length).join(P)+k},$={s:g,z:function(k){var E=-k.utcOffset(),P=Math.abs(E),F=Math.floor(P/60),C=P%60;return(E<=0?"+":"-")+g(F,2,"0")+":"+g(C,2,"0")},m:function k(E,P){if(E.date()<P.date())return-k(P,E);var F=12*(P.year()-E.year())+(P.month()-E.month()),C=E.clone().add(F,m),U=P-C<0,K=E.clone().add(F+(U?-1:1),m);return+(-(F+(P-C)/(U?C-K:K-C))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:m,y:v,w:f,d:c,D:w,h:l,m:a,s:o,ms:s,Q:y}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},S="en",A={};A[S]=p;var M=function(k){return k instanceof G},L=function k(E,P,F){var C;if(!E)return S;if(typeof E=="string"){var U=E.toLowerCase();A[U]&&(C=U),P&&(A[U]=P,C=U);var K=E.split("-");if(!C&&K.length>1)return k(K[0])}else{var re=E.name;A[re]=E,C=re}return!F&&C&&(S=C),C||!F&&S},R=function(k,E){if(M(k))return k.clone();var P=typeof E=="object"?E:{};return P.date=k,P.args=arguments,new G(P)},N=$;N.l=L,N.i=M,N.w=function(k,E){return R(k,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var G=function(){function k(P){this.$L=L(P.locale,null,!0),this.parse(P)}var E=k.prototype;return E.parse=function(P){this.$d=function(F){var C=F.date,U=F.utc;if(C===null)return new Date(NaN);if(N.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var K=C.match(q);if(K){var re=K[2]-1||0,ue=(K[7]||"0").substring(0,3);return U?new Date(Date.UTC(K[1],re,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ue)):new Date(K[1],re,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ue)}}return new Date(C)}(P),this.$x=P.x||{},this.init()},E.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},E.$utils=function(){return N},E.isValid=function(){return this.$d.toString()!==O},E.isSame=function(P,F){var C=R(P);return this.startOf(F)<=C&&C<=this.endOf(F)},E.isAfter=function(P,F){return R(P)<this.startOf(F)},E.isBefore=function(P,F){return this.endOf(F)<R(P)},E.$g=function(P,F,C){return N.u(P)?this[F]:this.set(C,P)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(P,F){var C=this,U=!!N.u(F)||F,K=N.p(P),re=function(Ge,de){var ae=N.w(C.$u?Date.UTC(C.$y,de,Ge):new Date(C.$y,de,Ge),C);return U?ae:ae.endOf(c)},ue=function(Ge,de){return N.w(C.toDate()[Ge].apply(C.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(de)),C)},ee=this.$W,ye=this.$M,Fe=this.$D,He="set"+(this.$u?"UTC":"");switch(K){case v:return U?re(1,0):re(31,11);case m:return U?re(1,ye):re(0,ye+1);case f:var $e=this.$locale().weekStart||0,De=(ee<$e?ee+7:ee)-$e;return re(U?Fe-De:Fe+(6-De),ye);case c:case w:return ue(He+"Hours",0);case l:return ue(He+"Minutes",1);case a:return ue(He+"Seconds",2);case o:return ue(He+"Milliseconds",3);default:return this.clone()}},E.endOf=function(P){return this.startOf(P,!1)},E.$set=function(P,F){var C,U=N.p(P),K="set"+(this.$u?"UTC":""),re=(C={},C[c]=K+"Date",C[w]=K+"Date",C[m]=K+"Month",C[v]=K+"FullYear",C[l]=K+"Hours",C[a]=K+"Minutes",C[o]=K+"Seconds",C[s]=K+"Milliseconds",C)[U],ue=U===c?this.$D+(F-this.$W):F;if(U===m||U===v){var ee=this.clone().set(w,1);ee.$d[re](ue),ee.init(),this.$d=ee.set(w,Math.min(this.$D,ee.daysInMonth())).$d}else re&&this.$d[re](ue);return this.init(),this},E.set=function(P,F){return this.clone().$set(P,F)},E.get=function(P){return this[N.p(P)]()},E.add=function(P,F){var C,U=this;P=Number(P);var K=N.p(F),re=function(ye){var Fe=R(U);return N.w(Fe.date(Fe.date()+Math.round(ye*P)),U)};if(K===m)return this.set(m,this.$M+P);if(K===v)return this.set(v,this.$y+P);if(K===c)return re(1);if(K===f)return re(7);var ue=(C={},C[a]=i,C[l]=n,C[o]=r,C)[K]||1,ee=this.$d.getTime()+P*ue;return N.w(ee,this)},E.subtract=function(P,F){return this.add(-1*P,F)},E.format=function(P){var F=this,C=this.$locale();if(!this.isValid())return C.invalidDate||O;var U=P||"YYYY-MM-DDTHH:mm:ssZ",K=N.z(this),re=this.$H,ue=this.$m,ee=this.$M,ye=C.weekdays,Fe=C.months,He=function(de,ae,jt,Ft){return de&&(de[ae]||de(F,U))||jt[ae].slice(0,Ft)},$e=function(de){return N.s(re%12||12,de,"0")},De=C.meridiem||function(de,ae,jt){var Ft=de<12?"AM":"PM";return jt?Ft.toLowerCase():Ft},Ge={YY:String(this.$y).slice(-2),YYYY:N.s(this.$y,4,"0"),M:ee+1,MM:N.s(ee+1,2,"0"),MMM:He(C.monthsShort,ee,Fe,3),MMMM:He(Fe,ee),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:He(C.weekdaysMin,this.$W,ye,2),ddd:He(C.weekdaysShort,this.$W,ye,3),dddd:ye[this.$W],H:String(re),HH:N.s(re,2,"0"),h:$e(1),hh:$e(2),a:De(re,ue,!0),A:De(re,ue,!1),m:String(ue),mm:N.s(ue,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:K};return U.replace(j,function(de,ae){return ae||Ge[de]||K.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(P,F,C){var U,K=N.p(F),re=R(P),ue=(re.utcOffset()-this.utcOffset())*i,ee=this-re,ye=N.m(this,re);return ye=(U={},U[v]=ye/12,U[m]=ye,U[y]=ye/3,U[f]=(ee-ue)/6048e5,U[c]=(ee-ue)/864e5,U[l]=ee/n,U[a]=ee/i,U[o]=ee/r,U)[K]||ee,C?ye:N.a(ye)},E.daysInMonth=function(){return this.endOf(m).$D},E.$locale=function(){return A[this.$L]},E.locale=function(P,F){if(!P)return this.$L;var C=this.clone(),U=L(P,F,!0);return U&&(C.$L=U),C},E.clone=function(){return N.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},k}(),ne=G.prototype;return R.prototype=ne,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",m],["$y",v],["$D",w]].forEach(function(k){ne[k[1]]=function(E){return this.$g(E,k[0],k[1])}}),R.extend=function(k,E){return k.$i||(k(E,G,R),k.$i=!0),R},R.locale=L,R.isDayjs=M,R.unix=function(k){return R(1e3*k)},R.en=A[S],R.Ls=A,R.p={},R})})(Dn);var Ao=Dn.exports;const Pt=Qr(Ao);class So extends we{constructor(){super(...arguments),this.templates={},this._renderedTemplates={}}setBindingSyntax(e,r){this._startExpression=e,this._endExpression=r;const i=this.escapeRegex(this._startExpression),n=this.escapeRegex(this._endExpression);this._expression=new RegExp(`${i}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${n}`,"g")}hasTemplate(e){return this.templates&&!!this.templates[e]}renderTemplate(e,r,i){if(!this.hasTemplate(e))return null;i=i||e;const n=X` <slot name=${i}></slot> `,s={[e]:{...r}};if(this._renderedTemplates.hasOwnProperty(i)){const{slot:a}=this._renderedTemplates[i];this.contains(a)&&this.removeChild(a)}const o=document.createElement("div");return o.slot=i,o.dataset.generated="template",this._renderTemplate(o,this.templates[e],s),this.appendChild(o),this._renderedTemplates[i]={context:s,slot:o},n}getTemplates(){const e={};for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i.nodeName==="RENDER-TEMPLATE"){const n=i;n.dataset.type?e[n.dataset.type]=n:e.default=n,n.templateOrder=r}}return e}_renderTemplate(e,r,i){let n;if(r&&r.childNodes.length){const s=r.cloneNode(!0);n=this.renderNode(s,e,i)}n&&e.appendChild(n)}expandExpressionsAsString(e,r){return e.replace(this.expression,(i,n)=>{const s=this.evalInContext(n||this.trimExpression(i),r);return s?typeof s=="object"?JSON.stringify(s):s.toString():""})}get expression(){return this._expression||this.setBindingSyntax("{{","}}"),this._expression}escapeRegex(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}evalInContext(e,r){r={...r};const i=new Function("with(this) { return "+e+";}");let n;try{n=i.call(r)}catch{}return n}trimExpression(e){return e=e.trim(),e.startsWith(this._startExpression)&&e.endsWith(this._endExpression)&&(e=e.substr(this._startExpression.length,e.length-this._startExpression.length-this._endExpression.length),e=e.trim()),e}renderNode(e,r,i){if(e.nodeName==="#text")return e.textContent=this.expandExpressionsAsString(e.textContent,i),e;if(e.nodeName==="TEMPLATE")return e.$parentTemplateContext=i,e;for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];this.renderNode(s,r,i)}return e}firstUpdated(){this.templates=this.getTemplates()}}const ti=`
64
64
  :host {
65
65
  display: flex;
66
66
  box-sizing: border-box;
67
67
  height: 100%;
68
+ line-height: 1;
68
69
  }
69
70
  *,
70
71
  *:before,
@@ -81,12 +82,7 @@ form#itemfilter {
81
82
  details {
82
83
  width: 100%;
83
84
  }
84
- `,Zi=`
85
- * {
86
- font-family: Roboto, sans-serif;
87
- }
88
-
89
-
85
+ `,ri=`
90
86
  button {
91
87
  /* TODO: why does this only work here and not from :root? */
92
88
  --primary-color: #004170;
@@ -94,6 +90,7 @@ button {
94
90
  --error-color: #FF5252;
95
91
 
96
92
  display: inline-flex;
93
+ position: relative;
97
94
  align-items: center;
98
95
  color: #fff;
99
96
  border-width: 0;
@@ -168,7 +165,12 @@ button.small {
168
165
  padding: 12.4px;
169
166
  font-size: .75rem;
170
167
  }
168
+ `,ii=`
169
+ * {
170
+ font-family: Roboto, sans-serif;
171
+ }
171
172
 
173
+ ${ri}
172
174
 
173
175
  input[type=checkbox] {
174
176
  appearance: none;
@@ -398,11 +400,7 @@ section:not(section:last-of-type) {
398
400
  flex-direction: column;
399
401
  }
400
402
  ul li {
401
- padding-left: 0;
402
- }
403
- eox-itemfilter-expandcontainer ul li,
404
- details ul li {
405
- padding: 0.2rem;
403
+ padding: 5px 10px;
406
404
  }
407
405
  li.highlighted {
408
406
  background: #00417011;
@@ -454,16 +452,16 @@ eox-itemfilter-range {
454
452
  .range-after {
455
453
  margin-left: .5rem;
456
454
  }
457
- `;var Ls=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,_r=(r,e,t,i)=>{for(var n=i>1?void 0:i?Ts(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Ls(e,t,n),n};let Ft=class extends Pe{handleDetailsToggle(r){this.dispatchEvent(new CustomEvent("details-toggled",{detail:r,bubbles:!0,composed:!0}))}render(){return he`
455
+ `;var Mo=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,ni=(t,e,r,i)=>{for(var n=i>1?void 0:i?Oo(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Mo(e,r,n),n};let hr=class extends we{handleDetailsToggle(t){this.dispatchEvent(new CustomEvent("details-toggled",{detail:t,bubbles:!0,composed:!0}))}render(){return X`
458
456
  <style>
459
- ${Ji}
460
- ${!this.unstyled&&Zi}
457
+ ${ti}
458
+ ${!this.unstyled&&ii}
461
459
  </style>
462
460
  <details
463
461
  @toggle="${this.handleDetailsToggle}"
464
462
  class="details-filter"
465
463
  part="details-filter"
466
- open=${this.filterObject.expanded||ne}
464
+ open=${this.filterObject.expanded||se}
467
465
  >
468
466
  <summary>
469
467
  <span
@@ -477,72 +475,239 @@ eox-itemfilter-range {
477
475
  <slot name="filter"></slot>
478
476
  </div>
479
477
  </details>
480
- `}};_r([Ae({attribute:!1})],Ft.prototype,"filterObject",2),_r([Ae()],Ft.prototype,"unstyled",2),Ft=_r([qe("eox-itemfilter-expandcontainer")],Ft);var Rs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Qi=(r,e,t,i)=>{for(var n=i>1?void 0:i?Ds(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&Rs(e,t,n),n};let Er=class extends Pe{reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
481
- <ul>
482
- ${dt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>he`
483
- <li class=${this.filterObject.state[r]?"highlighted":ne}>
484
- <label>
485
- <input
486
- data-cy="multiselect-checkbox"
487
- name="selection"
488
- type="checkbox"
489
- class="multiselect-checkbox"
490
- id=${r}
491
- checked="${this.filterObject.state[r]||ne}"
492
- @click=${()=>{this.filterObject.state[r]=!this.filterObject.state[r],this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()}}
493
- />
494
- <span class="title">${r}</span>
495
- </label>
496
- </li>
497
- `)}
498
- </ul>
499
- `}};Qi([Ae()],Er.prototype,"filterObject",2),Er=Qi([qe("eox-itemfilter-multiselect")],Er);var Is="Expected a function",en=0/0,js="[object Symbol]",Ns=/^\s+|\s+$/g,Bs=/^[-+]0x[0-9a-f]+$/i,Fs=/^0b[01]+$/i,Hs=/^0o[0-7]+$/i,Us=parseInt,Ys=typeof ft=="object"&&ft&&ft.Object===Object&&ft,zs=typeof self=="object"&&self&&self.Object===Object&&self,Xs=Ys||zs||Function("return this")(),Vs=Object.prototype,Ws=Vs.toString,qs=Math.max,Gs=Math.min,Mr=function(){return Xs.Date.now()};function Ks(r,e,t){var i,n,s,o,l,a,u=0,p=!1,v=!1,y=!0;if(typeof r!="function")throw new TypeError(Is);e=tn(e)||0,Ar(t)&&(p=!!t.leading,v="maxWait"in t,s=v?qs(tn(t.maxWait)||0,e):s,y="trailing"in t?!!t.trailing:y);function x(E){var A=i,C=n;return i=n=void 0,u=E,o=r.apply(C,A),o}function M(E){return u=E,l=setTimeout(J,e),p?x(E):o}function j(E){var A=E-a,C=E-u,L=e-A;return v?Gs(L,s-C):L}function q(E){var A=E-a,C=E-u;return a===void 0||A>=e||A<0||v&&C>=s}function J(){var E=Mr();if(q(E))return f(E);l=setTimeout(J,j(E))}function f(E){return l=void 0,y&&i?x(E):(i=n=void 0,o)}function g(){l!==void 0&&clearTimeout(l),u=0,i=a=n=l=void 0}function $(){return l===void 0?o:f(Mr())}function S(){var E=Mr(),A=q(E);if(i=arguments,n=this,a=E,A){if(l===void 0)return M(a);if(v)return l=setTimeout(J,e),x(a)}return l===void 0&&(l=setTimeout(J,e)),o}return S.cancel=g,S.flush=$,S}function Ar(r){var e=typeof r;return!!r&&(e=="object"||e=="function")}function Js(r){return!!r&&typeof r=="object"}function Zs(r){return typeof r=="symbol"||Js(r)&&Ws.call(r)==js}function tn(r){if(typeof r=="number")return r;if(Zs(r))return en;if(Ar(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Ar(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=r.replace(Ns,"");var t=Fs.test(r);return t||Hs.test(r)?Us(r.slice(2),t?2:8):Bs.test(r)?en:+r}var Qs=Ks;const rn=$r(Qs);var eo=Object.defineProperty,to=Object.getOwnPropertyDescriptor,nn=(r,e,t,i)=>{for(var n=i>1?void 0:i?to(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&eo(e,t,n),n};let Or=class extends Pe{constructor(){super(...arguments),this.inputHandler=r=>{let e,t;[e,t]=r.detail.values,(e!==this.filterObject.state.min||t!=this.filterObject.state.max)&&([this.filterObject.state.min,this.filterObject.state.max]=[e,t],this.filterObject.dirty=!0),this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()},this.debouncedInputHandler=rn(this.inputHandler,0,{leading:!0})}reset(){this.filterObject.state.min=this.filterObject.min,this.filterObject.state.max=this.filterObject.max,delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
500
- <div class="range-before">
501
- ${this.filterObject.format==="date"?Bt.unix(this.filterObject.state.min):this.filterObject.state.min}
478
+ `}};ni([J({attribute:!1})],hr.prototype,"filterObject",2),ni([J()],hr.prototype,"unstyled",2),hr=ni([Pe("eox-itemfilter-expandcontainer")],hr);const Ct=t=>{if(!t.dirty)return;switch(t.type){case"multiselect":for(const r in t.state)t.state[r]=!1;break;case"range":t.state.min=t.min,t.state.max=t.max;break;case"select":for(const r in t.state)t.state[r]=!1;break;case"spatial":t.state.geometry=void 0;break;case"text":t.keys.forEach(r=>{t.state[r]=void 0});break}return delete t.stringifiedState,delete t.dirty,t},si=Math.min,Lt=Math.max,dr=Math.round,fr=Math.floor,lt=t=>({x:t,y:t});function Nn(t){return t.split("-")[0]}function Po(t){return t.split("-")[1]}function Co(t){return t==="x"?"y":"x"}function Lo(t){return t==="y"?"height":"width"}function Bn(t){return["top","bottom"].includes(Nn(t))?"y":"x"}function ko(t){return Co(Bn(t))}function jn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Fn(t,e,r){let{reference:i,floating:n}=t;const s=Bn(e),o=ko(e),a=Lo(o),l=Nn(e),c=s==="y",f=i.x+i.width/2-n.width/2,m=i.y+i.height/2-n.height/2,y=i[a]/2-n[a]/2;let v;switch(l){case"top":v={x:f,y:i.y-n.height};break;case"bottom":v={x:f,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-n.width,y:m};break;default:v={x:i.x,y:i.y}}switch(Po(e)){case"start":v[o]-=y*(r&&c?-1:1);break;case"end":v[o]+=y*(r&&c?-1:1);break}return v}const Ro=async(t,e,r)=>{const{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:f,y:m}=Fn(c,i,l),y=i,v={},w=0;for(let O=0;O<a.length;O++){const{name:q,fn:j}=a[O],{x:p,y:g,data:$,reset:S}=await j({x:f,y:m,initialPlacement:i,placement:y,strategy:n,middlewareData:v,rects:c,platform:o,elements:{reference:t,floating:e}});if(f=p??f,m=g??m,v={...v,[q]:{...v[q],...$}},S&&w<=50){w++,typeof S=="object"&&(S.placement&&(y=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):S.rects),{x:f,y:m}=Fn(c,y,l)),O=-1;continue}}return{x:f,y:m,placement:y,strategy:n,middlewareData:v}};function at(t){return Hn(t)?(t.nodeName||"").toLowerCase():"#document"}function Ce(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qe(t){var e;return(e=(Hn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Hn(t){return t instanceof Node||t instanceof Ce(t).Node}function et(t){return t instanceof Element||t instanceof Ce(t).Element}function ze(t){return t instanceof HTMLElement||t instanceof Ce(t).HTMLElement}function qn(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ce(t).ShadowRoot}function Jt(t){const{overflow:e,overflowX:r,overflowY:i,display:n}=Re(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&!["inline","contents"].includes(n)}function To(t){return["table","td","th"].includes(at(t))}function oi(t){const e=li(),r=Re(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(r.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(r.contain||"").includes(i))}function Io(t){let e=kt(t);for(;ze(e)&&!pr(e);){if(oi(e))return e;e=kt(e)}return null}function li(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pr(t){return["html","body","#document"].includes(at(t))}function Re(t){return Ce(t).getComputedStyle(t)}function gr(t){return et(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function kt(t){if(at(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qn(t)&&t.host||Qe(t);return qn(e)?e.host:e}function Un(t){const e=kt(t);return pr(e)?t.ownerDocument?t.ownerDocument.body:t.body:ze(e)&&Jt(e)?e:Un(e)}function Zt(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);const n=Un(t),s=n===((i=t.ownerDocument)==null?void 0:i.body),o=Ce(n);return s?e.concat(o,o.visualViewport||[],Jt(n)?n:[],o.frameElement&&r?Zt(o.frameElement):[]):e.concat(n,Zt(n,[],r))}function zn(t){const e=Re(t);let r=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const n=ze(t),s=n?t.offsetWidth:r,o=n?t.offsetHeight:i,a=dr(r)!==s||dr(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function ai(t){return et(t)?t:t.contextElement}function Rt(t){const e=ai(t);if(!ze(e))return lt(1);const r=e.getBoundingClientRect(),{width:i,height:n,$:s}=zn(e);let o=(s?dr(r.width):r.width)/i,a=(s?dr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Do=lt(0);function Yn(t){const e=Ce(t);return!li()||!e.visualViewport?Do:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function No(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ce(t)?!1:e}function yt(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=ai(t);let o=lt(1);e&&(i?et(i)&&(o=Rt(i)):o=Rt(t));const a=No(s,r,i)?Yn(s):lt(0);let l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,f=n.width/o.x,m=n.height/o.y;if(s){const y=Ce(s),v=i&&et(i)?Ce(i):i;let w=y.frameElement;for(;w&&i&&v!==y;){const O=Rt(w),q=w.getBoundingClientRect(),j=Re(w),p=q.left+(w.clientLeft+parseFloat(j.paddingLeft))*O.x,g=q.top+(w.clientTop+parseFloat(j.paddingTop))*O.y;l*=O.x,c*=O.y,f*=O.x,m*=O.y,l+=p,c+=g,w=Ce(w).frameElement}}return jn({width:f,height:m,x:l,y:c})}function Bo(t){let{rect:e,offsetParent:r,strategy:i}=t;const n=ze(r),s=Qe(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=lt(1);const l=lt(0);if((n||!n&&i!=="fixed")&&((at(r)!=="body"||Jt(s))&&(o=gr(r)),ze(r))){const c=yt(r);a=Rt(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function jo(t){return Array.from(t.getClientRects())}function Vn(t){return yt(Qe(t)).left+gr(t).scrollLeft}function Fo(t){const e=Qe(t),r=gr(t),i=t.ownerDocument.body,n=Lt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Lt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-r.scrollLeft+Vn(t);const a=-r.scrollTop;return Re(i).direction==="rtl"&&(o+=Lt(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:o,y:a}}function Ho(t,e){const r=Ce(t),i=Qe(t),n=r.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;const c=li();(!c||c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:o,x:a,y:l}}function qo(t,e){const r=yt(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,s=ze(t)?Rt(t):lt(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=n*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function Xn(t,e,r){let i;if(e==="viewport")i=Ho(t,r);else if(e==="document")i=Fo(Qe(t));else if(et(e))i=qo(e,r);else{const n=Yn(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return jn(i)}function Wn(t,e){const r=kt(t);return r===e||!et(r)||pr(r)?!1:Re(r).position==="fixed"||Wn(r,e)}function Uo(t,e){const r=e.get(t);if(r)return r;let i=Zt(t,[],!1).filter(a=>et(a)&&at(a)!=="body"),n=null;const s=Re(t).position==="fixed";let o=s?kt(t):t;for(;et(o)&&!pr(o);){const a=Re(o),l=oi(o);!l&&a.position==="fixed"&&(n=null),(s?!l&&!n:!l&&a.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Jt(o)&&!l&&Wn(t,o))?i=i.filter(f=>f!==o):n=a,o=kt(o)}return e.set(t,i),i}function zo(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t;const o=[...r==="clippingAncestors"?Uo(e,this._c):[].concat(r),i],a=o[0],l=o.reduce((c,f)=>{const m=Xn(e,f,n);return c.top=Lt(m.top,c.top),c.right=si(m.right,c.right),c.bottom=si(m.bottom,c.bottom),c.left=Lt(m.left,c.left),c},Xn(e,a,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Yo(t){return zn(t)}function Vo(t,e,r){const i=ze(e),n=Qe(e),s=r==="fixed",o=yt(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=lt(0);if(i||!i&&!s)if((at(e)!=="body"||Jt(n))&&(a=gr(e)),i){const c=yt(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else n&&(l.x=Vn(n));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Kn(t,e){return!ze(t)||Re(t).position==="fixed"?null:e?e(t):t.offsetParent}function Gn(t,e){const r=Ce(t);if(!ze(t))return r;let i=Kn(t,e);for(;i&&To(i)&&Re(i).position==="static";)i=Kn(i,e);return i&&(at(i)==="html"||at(i)==="body"&&Re(i).position==="static"&&!oi(i))?r:i||Io(t)||r}const Xo=async function(t){let{reference:e,floating:r,strategy:i}=t;const n=this.getOffsetParent||Gn,s=this.getDimensions;return{reference:Vo(e,await n(r),i),floating:{x:0,y:0,...await s(r)}}};function Wo(t){return Re(t).direction==="rtl"}const Ko={convertOffsetParentRelativeRectToViewportRelativeRect:Bo,getDocumentElement:Qe,getClippingRect:zo,getOffsetParent:Gn,getElementRects:Xo,getClientRects:jo,getDimensions:Yo,getScale:Rt,isElement:et,isRTL:Wo};function Go(t,e){let r=null,i;const n=Qe(t);function s(){clearTimeout(i),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:m,height:y}=t.getBoundingClientRect();if(a||e(),!m||!y)return;const v=fr(f),w=fr(n.clientWidth-(c+m)),O=fr(n.clientHeight-(f+y)),q=fr(c),p={rootMargin:-v+"px "+-w+"px "+-O+"px "+-q+"px",threshold:Lt(0,si(1,l))||1};let g=!0;function $(S){const A=S[0].intersectionRatio;if(A!==l){if(!g)return o();A?o(!1,A):i=setTimeout(()=>{o(!1,1e-7)},100)}g=!1}try{r=new IntersectionObserver($,{...p,root:n.ownerDocument})}catch{r=new IntersectionObserver($,p)}r.observe(t)}return o(!0),s}function Jo(t,e,r,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=ai(t),f=n||s?[...c?Zt(c):[],...Zt(e)]:[];f.forEach(j=>{n&&j.addEventListener("scroll",r,{passive:!0}),s&&j.addEventListener("resize",r)});const m=c&&a?Go(c,r):null;let y=-1,v=null;o&&(v=new ResizeObserver(j=>{let[p]=j;p&&p.target===c&&v&&(v.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{v&&v.observe(e)})),r()}),c&&!l&&v.observe(c),v.observe(e));let w,O=l?yt(t):null;l&&q();function q(){const j=yt(t);O&&(j.x!==O.x||j.y!==O.y||j.width!==O.width||j.height!==O.height)&&r(),O=j,w=requestAnimationFrame(q)}return r(),()=>{f.forEach(j=>{n&&j.removeEventListener("scroll",r),s&&j.removeEventListener("resize",r)}),m&&m(),v&&v.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const Zo=(t,e,r)=>{const i=new Map,n={platform:Ko,...r},s={...n.platform,_c:i};return Ro(t,e,{...n,platform:s})};var Qo=Object.defineProperty,el=Object.getOwnPropertyDescriptor,mr=(t,e,r,i)=>{for(var n=i>1?void 0:i?el(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Qo(e,r,n),n};let Qt=class extends we{constructor(){super(...arguments),this.open=!1,this.parent=null,this.unstyled=!1}_handleKeyboard(t){this.clientHeight}_overlayCleanup(){}_clickEventListener(){}_keyboardEventListener(){}connectedCallback(){super.connectedCallback(),this.unstyled||setTimeout(()=>{const t=this.parent||this.renderRoot.querySelector("[name=trigger]").assignedNodes()[0],e=this.renderRoot.querySelector("#dropdown"),r=()=>{e.classList.contains("open")&&Zo(t,e,{strategy:"fixed"}).then(({x:i,y:n})=>{Object.assign(e.style,{left:`${i}px`,top:`${n}px`,width:`${t.getBoundingClientRect().width}px`})})};this._overlayCleanup=Jo(t,e,r)})}disconnectedCallback(){super.disconnectedCallback(),this._overlayCleanup(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickEventListener)}render(){return X`
479
+ <style>
480
+ #dropdown {
481
+ display: none;
482
+ }
483
+ #dropdown.open {
484
+ display: block;
485
+ }
486
+ ${this.unstyled?se:X`
487
+ eox-dropdown { height: 100%;} #dropdown { position: fixed; top:
488
+ 0px; left: 0; width: 100%; margin: 0; padding: 0; background:
489
+ white; border-bottom-left-radius: 4px; border-bottom-right-radius:
490
+ 4px; box-shadow: 0 4px 4px #0007; cursor: default; max-height:
491
+ 200px; overflow-y: auto; z-index: 99;}
492
+ `}
493
+ </style>
494
+ <slot name="trigger"></slot>
495
+ <div id="dropdown">
496
+ <slot name="content"></slot>
502
497
  </div>
503
- <tc-range-slider
504
- min="${this.filterObject.min}"
505
- max="${this.filterObject.max}"
506
- value1="${this.filterObject.state.min}"
507
- value2="${this.filterObject.state.max}"
508
- step="1"
509
- @change="${this.debouncedInputHandler}"
510
- ></tc-range-slider>
511
- <div class="range-after">
512
- ${this.filterObject.format==="date"?Bt.unix(this.filterObject.state.max):this.filterObject.state.max}
498
+ `}updated(t){if(t.has("open")){const e=this.renderRoot.querySelector("#dropdown");this.open?e.classList.add("open"):e.classList.remove("open"),this.requestUpdate()}}firstUpdated(){this._clickEventListener=window.addEventListener("click",()=>{this.open=!1}),this._keyboardEventListener=this.getRootNode().addEventListener("keydown",e=>{const{code:r}=e;["Escape"].includes(r)&&this._handleKeyboard(r)}),this.renderRoot.querySelector("[name=trigger]").assignedNodes()[0].addEventListener("focus",()=>{this.open=!0})}};mr([J({type:Boolean})],Qt.prototype,"open",2),mr([J({type:Boolean})],Qt.prototype,"parent",2),mr([J({type:Boolean})],Qt.prototype,"unstyled",2),Qt=mr([Pe("eox-dropdown")],Qt);var tl=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,vr=(t,e,r,i)=>{for(var n=i>1?void 0:i?rl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&tl(e,r,n),n};let er=class extends we{constructor(){super(...arguments),this.items=[],this.titleProperty="title",this.unstyled=!1}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.items}))}_handleKeyboard(t){const e=this.renderRoot.querySelector(".chip.highlighted");if(t==="Escape"&&e&&e.classList.remove("highlighted"),t==="Backspace"){if(this.items.length){e&&this.items.splice(Array.from(this.renderRoot.querySelectorAll(".chip")).indexOf(e),1);const r=this.renderRoot.querySelectorAll(".chip")[this.renderRoot.querySelectorAll(".chip").length-1];r.classList.contains("highlighted")||r.classList.add("highlighted"),this.requestUpdate()}this._dispatchEvent()}if(t==="ArrowLeft"||t==="ArrowRight"){if(this.renderRoot.querySelectorAll(".chip").length<1)return;let r=0;const i=this.renderRoot.querySelector(".chip.highlighted");i&&(r=Array.from(this.renderRoot.querySelectorAll(".chip")).indexOf(i),i.classList.remove("highlighted")),r=r+(t==="ArrowLeft"?-1:1),t==="ArrowLeft"&&r<0&&(r=this.renderRoot.querySelectorAll(".chip").length-1),t==="ArrowRight"&&r>this.renderRoot.querySelectorAll(".chip").length-1&&(r=0),Array.from(this.renderRoot.querySelectorAll(".chip"))[r].classList.add("highlighted")}}_keyboardEventListener(){}connectedCallback(){super.connectedCallback(),this._keyboardEventListener=this.getRootNode().addEventListener("keydown",t=>{const{code:e}=t;["ArrowLeft","ArrowRight","Escape","Backspace"].includes(e)&&this._handleKeyboard(e)})}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}render(){return X`
499
+ <style>
500
+ .chip.highlighted {
501
+ background: lightgrey;
502
+ }
503
+ .chip-title {
504
+ pointer-events: none;
505
+ }
506
+ ${this.unstyled?se:X`
507
+ .chip-container { display: flex; flex: 0; } .chip { display: flex;
508
+ align-items: center; background: #00417022; border-radius: 4px;
509
+ margin-right: 4px; padding: 5px 10px; font-size: small; cursor:
510
+ default; white-space: nowrap; } .chip.highlighted { background:
511
+ #004170; color: white; } .chip-close { cursor: pointer;
512
+ margin-left: 4px; }
513
+ `}
514
+ </style>
515
+ <span class="chip-container">
516
+ ${Kt(this.items,t=>X`
517
+ <span
518
+ class="chip"
519
+ @click=${e=>{this.renderRoot.querySelectorAll(".chip").forEach((r,i)=>{r.classList.remove("highlighted"),delete this.items[i]._highlighted}),e.target.classList.add("highlighted"),t._highlighted=!0,this.requestUpdate()}}
520
+ >
521
+ <span class="chip-title">${t[this.titleProperty]}</span>
522
+ ${fe(t._inProgress,()=>t.stringifiedState?"":X` ... `)}
523
+ ${fe(t.stringifiedState,()=>X`: ${t.stringifiedState}`)}
524
+ <span
525
+ class="chip-close"
526
+ @click=${e=>{e.stopPropagation(),this.items.splice(this.items.indexOf(t),1),this._dispatchEvent(),this.requestUpdate()}}
527
+ >✕</span
528
+ >
529
+ </span>
530
+ `)}
531
+ </span>
532
+ `}};vr([J({type:Array})],er.prototype,"items",2),vr([J()],er.prototype,"titleProperty",2),vr([J({type:Boolean})],er.prototype,"unstyled",2),er=vr([Pe("eox-itemfilter-chips")],er);var il=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,Ye=(t,e,r,i)=>{for(var n=i>1?void 0:i?nl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&il(e,r,n),n};let Be=class extends we{constructor(){super(...arguments),this.idProperty="id",this.items=[],this.titleProperty="title",this.itemTitleProperty=this.titleProperty,this.multiple=!1,this.unstyled=!1,this.multiStep=!1,this.inputText="",this.selectedItems=[]}_handleKeyboard(t){if(this.clientHeight!==0){if(t==="Escape"){if(this.selectedItems.length<1||this.multiple){this.renderRoot.querySelector("input").value!==""?this.renderRoot.querySelector("input").value="":this.renderRoot.querySelector("eox-dropdown").open=!1;return}this.multiple||(this.renderRoot.querySelector("input").value!==this.selectedItems[0][this.titleProperty]?this.renderRoot.querySelector("input").value=this.selectedItems[0][this.titleProperty]:this.renderRoot.querySelector("eox-dropdown").open=!1);return}(t==="ArrowDown"||t==="ArrowUp")&&(this.renderRoot.querySelector("eox-dropdown").open=!0),this.renderRoot.querySelector("input").select()}}_handleHighlight(t){t[0]._inProgress||(this.renderRoot.querySelector("input").value=t[0][this.titleProperty]||"",this.renderRoot.querySelector("input").select())}_handleSelect(t){var e;t.length>0&&this.multiStep&&t.forEach(r=>{this.selectedItems.includes(r)||(r._inProgress=!0)}),this.selectedItems=t,t.length>0?this.multiple?(this.renderRoot.querySelector("input").value="",this.renderRoot.querySelector("input").focus()):(this.renderRoot.querySelector("input").value=t[0][this.titleProperty],t[0]._inProgress||(this.renderRoot.querySelector("eox-dropdown").open=!1)):(this.renderRoot.querySelector("input").select(),this.renderRoot.querySelector("input").focus()),this._dispatchEvent(),this.requestUpdate(),(e=this.renderRoot.querySelector("eox-itemfilter-chips"))==null||e.requestUpdate()}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.selectedItems}))}_keyboardEventListener(){}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickEventListener)}firstUpdated(){this._keyboardEventListener=this.getRootNode().addEventListener("keydown",t=>{const{code:e}=t;["ArrowUp","ArrowDown","Escape","Backspace"].includes(e)&&this._handleKeyboard(e)})}updated(t){t.has("selectedItems")&&this._handleSelect(this.selectedItems)}render(){return X`
533
+ <style>
534
+ :host,
535
+ .container {
536
+ display: flex;
537
+ }
538
+ #dropdown {
539
+ display: none;
540
+ }
541
+ ${this.unstyled?se:X`
542
+ ${ri} :host { position: relative; } .container { width: 100%;
543
+ position: relative; border: 1px solid #00417066; border-radius:
544
+ 4px; height: 24px; padding: 5px; flex: 1; justify-content:
545
+ space-between; cursor: text; overflow-x: auto; } .container:hover
546
+ { border: 1px solid #004170; } .input-container { display: flex;
547
+ flex: 1; align-items: center; } input, input:focus { height: 100%;
548
+ border: none; outline: none; } .button-container { display: flex;
549
+ align-items: center; justify-content: center; position: absolute;
550
+ right: 1px; top: 5px; height: calc(100% - 10px); width: 34px;
551
+ background: white; } button.icon { color: #004170; height: 24px;
552
+ font-size: large; width: unset; } .container::-webkit-scrollbar {
553
+ height: 2px; } .container::-webkit-scrollbar-thumb { background:
554
+ lightgrey; border-radius: 2px;} .hidden {height: 1px; padding: 0;
555
+ border: none;} .hidden:hover {border: none} .hidden input {
556
+ opacity: 0% }
557
+ `}
558
+ </style>
559
+ <div
560
+ class="container"
561
+ part="container"
562
+ @click=${t=>{t.stopPropagation(),this.renderRoot.querySelector("input[type=text]").focus()}}
563
+ >
564
+ ${fe(this.multiple,()=>X`
565
+ ${this.selectedItems.filter(t=>t._highlighted)}
566
+ <eox-itemfilter-chips
567
+ .items=${this.selectedItems}
568
+ .titleProperty=${this.titleProperty}
569
+ .unstyled=${this.unstyled}
570
+ ></eox-itemfilter-chips>
571
+ `)}
572
+ <div class="input-container">
573
+ <eox-dropdown
574
+ .parent=${this.parentNode.parentNode}
575
+ .unstyled=${this.unstyled}
576
+ >
577
+ <input
578
+ slot="trigger"
579
+ type="text"
580
+ @focus=${()=>{this.inputText="",this.requestUpdate()}}
581
+ @input=${t=>{this.inputText=t.target.value.toLowerCase()}}
582
+ />
583
+ ${fe(this.items.length>0,()=>X`
584
+ <eox-selectionlist
585
+ slot="content"
586
+ .filter=${this.inputText}
587
+ .idProperty=${this.idProperty}
588
+ .titleProperty=${this.titleProperty}
589
+ .items=${this.items.filter(t=>this.multiStep?!t.stringifiedState:!0).filter(t=>this.inputText?t[this.titleProperty].toLowerCase().includes(this.inputText.toLowerCase()):!0)}
590
+ .multiple=${this.multiStep?!0:this.multiple}
591
+ .disableKeyboardEvents=${this.multiStep}
592
+ .selectedItems=${this.multiStep?this.selectedItems.filter(t=>t.stringifiedState):this.selectedItems}
593
+ .unstyled=${this.unstyled}
594
+ @items-highlighted=${t=>{this._handleHighlight(t.detail)}}
595
+ @items-selected=${t=>{this._handleSelect(t.detail)}}
596
+ >
597
+ </eox-selectionlist>
598
+ `)}
599
+ </eox-dropdown>
600
+ </div>
513
601
  </div>
514
- `}};nn([Ae()],Or.prototype,"filterObject",2),Or=nn([qe("eox-itemfilter-range")],Or);var ro=Object.defineProperty,io=Object.getOwnPropertyDescriptor,sn=(r,e,t,i)=>{for(var n=i>1?void 0:i?io(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&ro(e,t,n),n};let Sr=class extends Pe{reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(r=>{r instanceof HTMLInputElement&&(r.checked=!1)});for(const r in this.filterObject.state)this.filterObject.state[r]=!1;delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
602
+ ${fe(this.selectedItems.length>0,()=>X`
603
+ <div class="button-container">
604
+ <button
605
+ class="icon"
606
+ @click=${()=>{this._handleSelect([])}}
607
+ >
608
+ ✕
609
+ </button>
610
+ </div>
611
+ `)}
612
+ `}};Ye([J()],Be.prototype,"idProperty",2),Ye([J()],Be.prototype,"items",2),Ye([J()],Be.prototype,"titleProperty",2),Ye([J()],Be.prototype,"itemTitleProperty",2),Ye([J({type:Boolean})],Be.prototype,"multiple",2),Ye([J({type:Boolean})],Be.prototype,"unstyled",2),Ye([J({type:Boolean})],Be.prototype,"multiStep",2),Ye([Ue()],Be.prototype,"inputText",2),Ye([Ue()],Be.prototype,"selectedItems",2),Be=Ye([Pe("eox-autocomplete")],Be);var sl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,tt=(t,e,r,i)=>{for(var n=i>1?void 0:i?ol(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&sl(e,r,n),n};let Ve=class extends we{constructor(){super(...arguments),this.filter="",this.idProperty="id",this.items=[],this.titleProperty="title",this.multiple=!1,this.selectedItems=[],this.unstyled=!1,this._currentHighlight=null}_handleKeyboard(t){if(this.clientHeight===0)return;const e=this.renderRoot.querySelector("li.highlighted");if(t==="Escape"){this._currentHighlight&&(this._currentHighlight=null);return}if(t==="Enter"){if(e){const s=this.items.find(o=>o[this.idProperty]===e.dataset.identifier);this._handleSelect(s),this.requestUpdate()}return}const r=this.renderRoot.querySelectorAll("li");let i=-1;e&&(delete e.dataset.highlighted,i=Array.from(r).indexOf(e)),t==="ArrowDown"&&(i++,i>r.length-1&&(i=0)),t==="ArrowUp"&&(i--,i<0&&(i=r.length-1));const n=Array.from(r)[i];n&&(this._currentHighlight=this.items.find(s=>s[this.idProperty]===n.dataset.identifier)),this.dispatchEvent(new CustomEvent("items-highlighted",{detail:[this._currentHighlight]}))}_handleSelect(t){if(t)if(this.multiple){const e=this.selectedItems.find(r=>r[this.idProperty]===t[this.idProperty]);e?this.selectedItems.splice(this.selectedItems.indexOf(e),1):this.selectedItems.push(t)}else this.selectedItems=[t];else this.selectedItems=[],this._currentHighlight=null;this._dispatchEvent()}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.selectedItems}))}_keyboardEventListener(){}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener)}firstUpdated(){this._keyboardEventListener=this.getRootNode().addEventListener("keydown",t=>{["ArrowDown","ArrowUp","Enter","Escape"].includes(t.code)&&this._handleKeyboard(t.code)})}updated(t){t.has("filter")&&(this.filter.length>0?setTimeout(()=>{const e=this.renderRoot.querySelectorAll("li")[0];e&&(this._currentHighlight=this.items.find(r=>r[this.idProperty]===e.dataset.identifier))}):this._currentHighlight=null)}render(){return X`
613
+ <style>
614
+ ${ti}
615
+ :host {
616
+ height: auto;
617
+ }
618
+ ul {
619
+ width: 100%;
620
+ }
621
+ li.highlighted {
622
+ background: lightgrey;
623
+ }
624
+ ${!this.unstyled&&ii}
625
+ </style>
515
626
  <ul>
516
- ${dt(Object.keys(this.filterObject.state).sort((r,e)=>r.localeCompare(e)),r=>he`
517
- <li class=${this.filterObject.state[r]?"highlighted":ne}>
627
+ ${kn(this.items.filter(t=>this.filter?t[this.titleProperty].toLowerCase().includes(this.filter.toLowerCase()):!0),t=>t[this.idProperty],t=>X`
628
+ <li
629
+ class=${this._currentHighlight===t?"highlighted":se}
630
+ data-identifier=${t[this.idProperty]}
631
+ data-title=${t[this.titleProperty]}
632
+ @mouseenter=${()=>{this._currentHighlight=t}}
633
+ @mouseleave=${()=>{this._currentHighlight=null}}
634
+ >
518
635
  <label>
519
636
  <input
520
- name="selection"
521
- type="radio"
522
- class="select-radio"
523
- id=${r}
524
- checked="${this.filterObject.state[r]||ne}"
525
- @click=${()=>{for(const e in this.filterObject.state)this.filterObject.state[e]=e===r;this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()}}
637
+ type="${this.multiple?"checkbox":"radio"}"
638
+ .checked=${this.selectedItems.find(e=>e[this.idProperty]===t[this.idProperty])||se}
639
+ @change=${()=>this._handleSelect(t)}
526
640
  />
527
- <span class="title">${r}</span>
641
+ <span class="title">${t[this.titleProperty]}</span>
528
642
  </label>
529
643
  </li>
530
644
  `)}
531
645
  </ul>
532
- `}};sn([Ae()],Sr.prototype,"filterObject",2),Sr=sn([qe("eox-itemfilter-select")],Sr);/**
646
+ `}};tt([J()],Ve.prototype,"filter",2),tt([J()],Ve.prototype,"idProperty",2),tt([J()],Ve.prototype,"items",2),tt([J()],Ve.prototype,"titleProperty",2),tt([J({type:Boolean})],Ve.prototype,"multiple",2),tt([J()],Ve.prototype,"selectedItems",2),tt([J({type:Boolean})],Ve.prototype,"unstyled",2),tt([Ue()],Ve.prototype,"_currentHighlight",2),Ve=tt([Pe("eox-selectionlist")],Ve);var ll=Object.defineProperty,al=Object.getOwnPropertyDescriptor,yr=(t,e,r,i)=>{for(var n=i>1?void 0:i?al(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&ll(e,r,n),n};let tr=class extends we{constructor(){super(...arguments),this.inline=!1,this.unstyled=!1}reset(){this.renderRoot.querySelectorAll("input[type='checkbox']").forEach(t=>{t instanceof HTMLInputElement&&(t.checked=!1)}),Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}_getItems(){return Object.keys(this.filterObject.state).sort((t,e)=>t.localeCompare(e)).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_getSelectedItems(){return Object.keys(this.filterObject.state).filter(t=>this.filterObject.state[t]).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_handleSelected(t){Object.keys(this.filterObject.state).forEach(e=>{this.filterObject.state[e]=t.map(r=>r.id).includes(e)}),this.filterObject.stringifiedState=Object.keys(this.filterObject.state).filter(e=>this.filterObject.state[e]).join(", "),this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))}render(){return fe(this.filterObject,()=>X`
647
+ ${fe(this.inline||Object.keys(this.filterObject.state).length>10,()=>X`
648
+ <eox-autocomplete
649
+ multiple
650
+ .items=${this._getItems()}
651
+ .selectedItems=${this._getSelectedItems()}
652
+ .unstyled=${this.unstyled}
653
+ @items-selected=${t=>this._handleSelected(t.detail)}
654
+ >
655
+ </eox-autocomplete>
656
+ `,()=>X`
657
+ <eox-selectionlist
658
+ multiple
659
+ .items=${this._getItems()}
660
+ .selectedItems=${this._getSelectedItems()}
661
+ .unstyled=${this.unstyled}
662
+ @items-selected=${t=>this._handleSelected(t.detail)}
663
+ ></eox-selectionlist>
664
+ `)}
665
+ `)}};yr([J()],tr.prototype,"filterObject",2),yr([J({type:Boolean})],tr.prototype,"inline",2),yr([J({type:Boolean})],tr.prototype,"unstyled",2),tr=yr([Pe("eox-itemfilter-multiselect")],tr);var cl="Expected a function",Jn=0/0,ul="[object Symbol]",hl=/^\s+|\s+$/g,dl=/^[-+]0x[0-9a-f]+$/i,fl=/^0b[01]+$/i,pl=/^0o[0-7]+$/i,gl=parseInt,ml=typeof Ot=="object"&&Ot&&Ot.Object===Object&&Ot,vl=typeof self=="object"&&self&&self.Object===Object&&self,yl=ml||vl||Function("return this")(),bl=Object.prototype,xl=bl.toString,wl=Math.max,$l=Math.min,ci=function(){return yl.Date.now()};function _l(t,e,r){var i,n,s,o,a,l,c=0,f=!1,m=!1,y=!0;if(typeof t!="function")throw new TypeError(cl);e=Zn(e)||0,ui(r)&&(f=!!r.leading,m="maxWait"in r,s=m?wl(Zn(r.maxWait)||0,e):s,y="trailing"in r?!!r.trailing:y);function v(A){var M=i,L=n;return i=n=void 0,c=A,o=t.apply(L,M),o}function w(A){return c=A,a=setTimeout(j,e),f?v(A):o}function O(A){var M=A-l,L=A-c,R=e-M;return m?$l(R,s-L):R}function q(A){var M=A-l,L=A-c;return l===void 0||M>=e||M<0||m&&L>=s}function j(){var A=ci();if(q(A))return p(A);a=setTimeout(j,O(A))}function p(A){return a=void 0,y&&i?v(A):(i=n=void 0,o)}function g(){a!==void 0&&clearTimeout(a),c=0,i=l=n=a=void 0}function $(){return a===void 0?o:p(ci())}function S(){var A=ci(),M=q(A);if(i=arguments,n=this,l=A,M){if(a===void 0)return w(l);if(m)return a=setTimeout(j,e),v(l)}return a===void 0&&(a=setTimeout(j,e)),o}return S.cancel=g,S.flush=$,S}function ui(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function El(t){return!!t&&typeof t=="object"}function Al(t){return typeof t=="symbol"||El(t)&&xl.call(t)==ul}function Zn(t){if(typeof t=="number")return t;if(Al(t))return Jn;if(ui(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ui(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(hl,"");var r=fl.test(t);return r||pl.test(t)?gl(t.slice(2),r?2:8):dl.test(t)?Jn:+t}var Sl=_l;const Qn=Qr(Sl);var Ml=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,es=(t,e,r,i)=>{for(var n=i>1?void 0:i?Ol(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Ml(e,r,n),n};let hi=class extends we{constructor(){super(...arguments),this.inputHandler=t=>{let e,r;[e,r]=t.detail.values,(e!==this.filterObject.state.min||r!=this.filterObject.state.max)&&([this.filterObject.state.min,this.filterObject.state.max]=[e,r],this.filterObject.dirty=!0),this.filterObject.dirty&&(this.filterObject.stringifiedState=`${Pt(e)} - ${Pt(r)}`),this.dispatchEvent(new CustomEvent("filter")),this.requestUpdate()},this.debouncedInputHandler=Qn(this.inputHandler,0,{leading:!0})}reset(){Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}render(){return fe(this.filterObject,()=>X`
666
+ <div class="range-before">
667
+ ${this.filterObject.format==="date"?Pt.unix(this.filterObject.state.min):this.filterObject.state.min}
668
+ </div>
669
+ <tc-range-slider
670
+ min="${this.filterObject.min}"
671
+ max="${this.filterObject.max}"
672
+ value1="${this.filterObject.state.min}"
673
+ value2="${this.filterObject.state.max}"
674
+ step="1"
675
+ @change="${this.debouncedInputHandler}"
676
+ ></tc-range-slider>
677
+ <div class="range-after">
678
+ ${this.filterObject.format==="date"?Pt.unix(this.filterObject.state.max):this.filterObject.state.max}
679
+ </div>
680
+ `)}};es([J()],hi.prototype,"filterObject",2),hi=es([Pe("eox-itemfilter-range")],hi);var Pl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,br=(t,e,r,i)=>{for(var n=i>1?void 0:i?Cl(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Pl(e,r,n),n};let rr=class extends we{constructor(){super(...arguments),this.inline=!1,this.unstyled=!1}reset(){this.renderRoot.querySelectorAll("input[type='radio']").forEach(t=>{t instanceof HTMLInputElement&&(t.checked=!1)}),Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}_getItems(){return Object.keys(this.filterObject.state).sort((t,e)=>t.localeCompare(e)).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_getSelectedItems(){return Object.keys(this.filterObject.state).filter(t=>this.filterObject.state[t]).map(t=>({id:t,title:t.replace(/^./,t[0].toUpperCase())}))}_handleSelected(t){Object.keys(this.filterObject.state).forEach(e=>{this.filterObject.state[e]=t.detail.map(r=>r.id).includes(e)}),this.filterObject.stringifiedState=Object.keys(this.filterObject.state).filter(e=>this.filterObject.state[e])[0],this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))}render(){return fe(this.filterObject,()=>X`
681
+ ${fe(this.inline||Object.keys(this.filterObject.state).length>1,()=>X`
682
+ <eox-autocomplete
683
+ .items=${this._getItems()}
684
+ .selectedItems=${this._getSelectedItems()}
685
+ .unstyled=${this.unstyled}
686
+ @items-selected=${t=>this._handleSelected(t)}
687
+ >
688
+ </eox-autocomplete>
689
+ `,()=>X`
690
+ <eox-selectionlist
691
+ .items=${this._getItems()}
692
+ .selectedItems=${this._getSelectedItems()}
693
+ .unstyled=${this.unstyled}
694
+ @items-selected=${t=>this._handleSelected(t)}
695
+ ></eox-selectionlist>
696
+ `)}
697
+ `)}};br([J()],rr.prototype,"filterObject",2),br([J({type:Boolean})],rr.prototype,"inline",2),br([J({type:Boolean})],rr.prototype,"unstyled",2),rr=br([Pe("eox-itemfilter-select")],rr);/**
533
698
  * @license
534
699
  * Copyright 2020 Google LLC
535
700
  * SPDX-License-Identifier: BSD-3-Clause
536
- */const no=vr(class extends mr{constructor(r){if(super(r),r.type!==Ge.PROPERTY&&r.type!==Ge.ATTRIBUTE&&r.type!==Ge.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Es(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===Se||e===ne)return e;const t=r.element,i=r.name;if(r.type===Ge.PROPERTY){if(e===t[i])return Se}else if(r.type===Ge.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return Se}else if(r.type===Ge.ATTRIBUTE&&t.getAttribute(i)===e+"")return Se;return Xi(r),e}});var $e=63710088e-1,Pr={centimeters:$e*100,centimetres:$e*100,degrees:$e/111325,feet:$e*3.28084,inches:$e*39.37,kilometers:$e/1e3,kilometres:$e/1e3,meters:$e,metres:$e,miles:$e/1609.344,millimeters:$e*1e3,millimetres:$e*1e3,nauticalmiles:$e/1852,radians:1,yards:$e*1.0936},so={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/$e,yards:1.0936133},Cr={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Ce(r,e,t){t===void 0&&(t={});var i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=r,i}function oo(r,e,t){switch(r){case"Point":return Ne(e).geometry;case"LineString":return Re(e).geometry;case"Polygon":return kr(e).geometry;case"MultiPoint":return on(e).geometry;case"MultiLineString":return Lr(e).geometry;case"MultiPolygon":return an(e).geometry;default:throw new Error(r+" is invalid")}}function Ne(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ht(r[0])||!Ht(r[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:r};return Ce(i,e,t)}function ao(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return Ne(i,e)}),t)}function kr(r,e,t){t===void 0&&(t={});for(var i=0,n=r;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:r};return Ce(l,e,t)}function lo(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return kr(i,e)}),t)}function Re(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:r};return Ce(i,e,t)}function co(r,e,t){return t===void 0&&(t={}),Ke(r.map(function(i){return Re(i,e)}),t)}function Ke(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function Lr(r,e,t){t===void 0&&(t={});var i={type:"MultiLineString",coordinates:r};return Ce(i,e,t)}function on(r,e,t){t===void 0&&(t={});var i={type:"MultiPoint",coordinates:r};return Ce(i,e,t)}function an(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return Ce(i,e,t)}function uo(r,e,t){t===void 0&&(t={});var i={type:"GeometryCollection",geometries:r};return Ce(i,e,t)}function ho(r,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var t=Math.pow(10,e||0);return Math.round(r*t)/t}function ln(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r*t}function Tr(r,e){e===void 0&&(e="kilometers");var t=Pr[e];if(!t)throw new Error(e+" units is invalid");return r/t}function fo(r,e){return cn(Tr(r,e))}function po(r){var e=r%360;return e<0&&(e+=360),e}function cn(r){var e=r%(2*Math.PI);return e*180/Math.PI}function go(r){var e=r%360;return e*Math.PI/180}function vo(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return ln(Tr(r,e),t)}function mo(r,e,t){if(e===void 0&&(e="meters"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("area must be a positive number");var i=Cr[e];if(!i)throw new Error("invalid original units");var n=Cr[t];if(!n)throw new Error("invalid final units");return r/i*n}function Ht(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Rr(r){return!!r&&r.constructor===Object}function yo(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(e){if(!Ht(e))throw new Error("bbox must only contain numbers")})}function bo(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const xo=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Cr,bearingToAzimuth:po,convertArea:mo,convertLength:vo,degreesToRadians:go,earthRadius:$e,factors:Pr,feature:Ce,featureCollection:Ke,geometry:oo,geometryCollection:uo,isNumber:Ht,isObject:Rr,lengthToDegrees:fo,lengthToRadians:Tr,lineString:Re,lineStrings:co,multiLineString:Lr,multiPoint:on,multiPolygon:an,point:Ne,points:ao,polygon:kr,polygons:lo,radiansToDegrees:cn,radiansToLength:ln,round:ho,unitsFactors:so,validateBBox:yo,validateId:bo},Symbol.toStringTag,{value:"Module"}));function un(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function pt(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function gt(r){return r.type==="Feature"?r.geometry:r}function ke(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=un(r),n=gt(e),s=n.type,o=e.bbox,l=n.coordinates;if(o&&$o(i,o)===!1)return!1;s==="Polygon"&&(l=[l]);for(var a=!1,u=0;u<l.length&&!a;u++)if(hn(i,l[u][0],t.ignoreBoundary)){for(var p=!1,v=1;v<l[u].length&&!p;)hn(i,l[u][v],!t.ignoreBoundary)&&(p=!0),v++;p||(a=!0)}return a}function hn(r,e,t){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],l=e[n][1],a=e[s][0],u=e[s][1],p=r[1]*(o-a)+l*(a-r[0])+u*(r[0]-o)===0&&(o-r[0])*(a-r[0])<=0&&(l-r[1])*(u-r[1])<=0;if(p)return!t;var v=l>r[1]!=u>r[1]&&r[0]<(a-o)*(r[1]-l)/(u-l)+o;v&&(i=!i)}return i}function $o(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function vt(r,e,t){if(r!==null)for(var i,n,s,o,l,a,u,p=0,v=0,y,x=r.type,M=x==="FeatureCollection",j=x==="Feature",q=M?r.features.length:1,J=0;J<q;J++){u=M?r.features[J].geometry:j?r.geometry:r,y=u?u.type==="GeometryCollection":!1,l=y?u.geometries.length:1;for(var f=0;f<l;f++){var g=0,$=0;if(o=y?u.geometries[f]:u,o!==null){a=o.coordinates;var S=o.type;switch(p=t&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(a,v,J,g,$)===!1)return!1;v++,g++;break;case"LineString":case"MultiPoint":for(i=0;i<a.length;i++){if(e(a[i],v,J,g,$)===!1)return!1;v++,S==="MultiPoint"&&g++}S==="LineString"&&g++;break;case"Polygon":case"MultiLineString":for(i=0;i<a.length;i++){for(n=0;n<a[i].length-p;n++){if(e(a[i][n],v,J,g,$)===!1)return!1;v++}S==="MultiLineString"&&g++,S==="Polygon"&&$++}S==="Polygon"&&g++;break;case"MultiPolygon":for(i=0;i<a.length;i++){for($=0,n=0;n<a[i].length;n++){for(s=0;s<a[i][n].length-p;s++){if(e(a[i][n][s],v,J,g,$)===!1)return!1;v++}$++}g++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(vt(o.geometries[i],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function wo(r,e,t,i){var n=t;return vt(r,function(s,o,l,a,u){o===0&&t===void 0?n=s:n=e(n,s,o,l,a,u)},i),n}function dn(r,e){var t;switch(r.type){case"FeatureCollection":for(t=0;t<r.features.length&&e(r.features[t].properties,t)!==!1;t++);break;case"Feature":e(r.properties,0);break}}function _o(r,e,t){var i=t;return dn(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Ut(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function Eo(r,e,t){var i=t;return Ut(r,function(n,s){s===0&&t===void 0?i=n:i=e(i,n,s)}),i}function Mo(r){var e=[];return vt(r,function(t){e.push(t)}),e}function Dr(r,e){var t,i,n,s,o,l,a,u,p,v,y=0,x=r.type==="FeatureCollection",M=r.type==="Feature",j=x?r.features.length:1;for(t=0;t<j;t++){for(l=x?r.features[t].geometry:M?r.geometry:r,u=x?r.features[t].properties:M?r.properties:{},p=x?r.features[t].bbox:M?r.bbox:void 0,v=x?r.features[t].id:M?r.id:void 0,a=l?l.type==="GeometryCollection":!1,o=a?l.geometries.length:1,n=0;n<o;n++){if(s=a?l.geometries[n]:l,s===null){if(e(null,y,u,p,v)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,y,u,p,v)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],y,u,p,v)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}function Ao(r,e,t){var i=t;return Dr(r,function(n,s,o,l,a){s===0&&t===void 0?i=n:i=e(i,n,s,o,l,a)}),i}function ze(r,e){Dr(r,function(t,i,n,s,o){var l=t===null?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return e(Ce(t,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var a;switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var p=t.coordinates[u],v={type:a,coordinates:p};if(e(Ce(v,n),i,u)===!1)return!1}})}function Oo(r,e,t){var i=t;return ze(r,function(n,s,o){s===0&&o===0&&t===void 0?i=n:i=e(i,n,s,o)}),i}function fn(r,e){ze(r,function(t,i,n){var s=0;if(t.geometry){var o=t.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var l,a=0,u=0,p=0;if(vt(t,function(v,y,x,M,j){if(l===void 0||i>a||M>u||j>p){l=v,a=i,u=M,p=j,s=0;return}var q=Re([l,v],t.properties);if(e(q,i,n,j,s)===!1)return!1;s++,l=v})===!1)return!1}}})}function So(r,e,t){var i=t,n=!1;return fn(r,function(s,o,l,a,u){n===!1&&t===void 0?i=s:i=e(i,s,o,l,a,u),n=!0}),i}function pn(r,e){if(!r)throw new Error("geojson is required");ze(r,function(t,i,n){if(t.geometry!==null){var s=t.geometry.type,o=t.geometry.coordinates;switch(s){case"LineString":if(e(t,i,n,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l<o.length;l++)if(e(Re(o[l],t.properties),i,n,l)===!1)return!1;break}}})}function Po(r,e,t){var i=t;return pn(r,function(n,s,o,l){s===0&&t===void 0?i=n:i=e(i,n,s,o,l)}),i}function Co(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,l;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,l=r.features[t].geometry;break;case"Feature":o=o||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=a.length+s-1),Re([a[s],a[s+1]],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s-1),Re([a[n][s],a[n][s+1]],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s-1),Re([a[i][s],a[i][s+1]],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s-1),Re([a[i][n][s],a[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function ko(r,e){if(e=e||{},!Rr(e))throw new Error("options is invalid");var t=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,l;switch(r.type){case"FeatureCollection":t<0&&(t=r.features.length+t),o=o||r.features[t].properties,l=r.features[t].geometry;break;case"Feature":o=o||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var a=l.coordinates;switch(l.type){case"Point":return Ne(a,o,e);case"MultiPoint":return i<0&&(i=a.length+i),Ne(a[i],o,e);case"LineString":return s<0&&(s=a.length+s),Ne(a[s],o,e);case"Polygon":return n<0&&(n=a.length+n),s<0&&(s=a[n].length+s),Ne(a[n][s],o,e);case"MultiLineString":return i<0&&(i=a.length+i),s<0&&(s=a[i].length+s),Ne(a[i][s],o,e);case"MultiPolygon":return i<0&&(i=a.length+i),n<0&&(n=a[i].length+n),s<0&&(s=a[i][n].length-s),Ne(a[i][n][s],o,e)}throw new Error("geojson is invalid")}const Lo=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Mo,coordEach:vt,coordReduce:wo,featureEach:Ut,featureReduce:Eo,findPoint:ko,findSegment:Co,flattenEach:ze,flattenReduce:Oo,geomEach:Dr,geomReduce:Ao,lineEach:pn,lineReduce:Po,propEach:dn,propReduce:_o,segmentEach:fn,segmentReduce:So},Symbol.toStringTag,{value:"Module"}));function gn(r){if(!r)throw new Error("geojson is required");var e=[];return ze(r,function(t){To(t,e)}),Ke(e)}function To(r,e){var t=[],i=r.geometry;if(i!==null){switch(i.type){case"Polygon":t=pt(i);break;case"LineString":t=[pt(i)]}t.forEach(function(n){var s=Ro(n,r.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function Ro(r,e){var t=[];return r.reduce(function(i,n){var s=Re([i,n],e);return s.bbox=Do(i,n),t.push(s),n}),t}function Do(r,e){var t=r[0],i=r[1],n=e[0],s=e[1],o=t<n?t:n,l=i<s?i:s,a=t>n?t:n,u=i>s?i:s;return[o,l,a,u]}var Ir={exports:{}},vn={exports:{}};(function(r,e){(function(t,i){r.exports=i()})(ft,function(){function t(f,g,$,S,E){(function A(C,L,I,W,re){for(;W>I;){if(W-I>600){var k=W-I+1,_=L-I+1,O=Math.log(k),B=.5*Math.exp(2*O/3),P=.5*Math.sqrt(O*B*(k-B)/k)*(_-k/2<0?-1:1),H=Math.max(I,Math.floor(L-_*B/k+P)),V=Math.min(W,Math.floor(L+(k-_)*B/k+P));A(C,L,H,V,re)}var ee=C[L],le=I,Z=W;for(i(C,I,L),re(C[W],ee)>0&&i(C,I,W);le<Z;){for(i(C,le,Z),le++,Z--;re(C[le],ee)<0;)le++;for(;re(C[Z],ee)>0;)Z--}re(C[I],ee)===0?i(C,I,Z):i(C,++Z,W),Z<=L&&(I=Z+1),L<=Z&&(W=Z-1)}})(f,g,$||0,S||f.length-1,E||n)}function i(f,g,$){var S=f[g];f[g]=f[$],f[$]=S}function n(f,g){return f<g?-1:f>g?1:0}var s=function(f){f===void 0&&(f=9),this._maxEntries=Math.max(4,f),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(f,g,$){if(!$)return g.indexOf(f);for(var S=0;S<g.length;S++)if($(f,g[S]))return S;return-1}function l(f,g){a(f,0,f.children.length,g,f)}function a(f,g,$,S,E){E||(E=q(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var A=g;A<$;A++){var C=f.children[A];u(E,f.leaf?S(C):C)}return E}function u(f,g){return f.minX=Math.min(f.minX,g.minX),f.minY=Math.min(f.minY,g.minY),f.maxX=Math.max(f.maxX,g.maxX),f.maxY=Math.max(f.maxY,g.maxY),f}function p(f,g){return f.minX-g.minX}function v(f,g){return f.minY-g.minY}function y(f){return(f.maxX-f.minX)*(f.maxY-f.minY)}function x(f){return f.maxX-f.minX+(f.maxY-f.minY)}function M(f,g){return f.minX<=g.minX&&f.minY<=g.minY&&g.maxX<=f.maxX&&g.maxY<=f.maxY}function j(f,g){return g.minX<=f.maxX&&g.minY<=f.maxY&&g.maxX>=f.minX&&g.maxY>=f.minY}function q(f){return{children:f,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function J(f,g,$,S,E){for(var A=[g,$];A.length;)if(!(($=A.pop())-(g=A.pop())<=S)){var C=g+Math.ceil(($-g)/S/2)*S;t(f,C,g,$,E),A.push(g,C,C,$)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(f){var g=this.data,$=[];if(!j(f,g))return $;for(var S=this.toBBox,E=[];g;){for(var A=0;A<g.children.length;A++){var C=g.children[A],L=g.leaf?S(C):C;j(f,L)&&(g.leaf?$.push(C):M(f,L)?this._all(C,$):E.push(C))}g=E.pop()}return $},s.prototype.collides=function(f){var g=this.data;if(!j(f,g))return!1;for(var $=[];g;){for(var S=0;S<g.children.length;S++){var E=g.children[S],A=g.leaf?this.toBBox(E):E;if(j(f,A)){if(g.leaf||M(f,A))return!0;$.push(E)}}g=$.pop()}return!1},s.prototype.load=function(f){if(!f||!f.length)return this;if(f.length<this._minEntries){for(var g=0;g<f.length;g++)this.insert(f[g]);return this}var $=this._build(f.slice(),0,f.length-1,0);if(this.data.children.length)if(this.data.height===$.height)this._splitRoot(this.data,$);else{if(this.data.height<$.height){var S=this.data;this.data=$,$=S}this._insert($,this.data.height-$.height-1,!0)}else this.data=$;return this},s.prototype.insert=function(f){return f&&this._insert(f,this.data.height-1),this},s.prototype.clear=function(){return this.data=q([]),this},s.prototype.remove=function(f,g){if(!f)return this;for(var $,S,E,A=this.data,C=this.toBBox(f),L=[],I=[];A||L.length;){if(A||(A=L.pop(),S=L[L.length-1],$=I.pop(),E=!0),A.leaf){var W=o(f,A.children,g);if(W!==-1)return A.children.splice(W,1),L.push(A),this._condense(L),this}E||A.leaf||!M(A,C)?S?($++,A=S.children[$],E=!1):A=null:(L.push(A),I.push($),$=0,S=A,A=A.children[0])}return this},s.prototype.toBBox=function(f){return f},s.prototype.compareMinX=function(f,g){return f.minX-g.minX},s.prototype.compareMinY=function(f,g){return f.minY-g.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(f){return this.data=f,this},s.prototype._all=function(f,g){for(var $=[];f;)f.leaf?g.push.apply(g,f.children):$.push.apply($,f.children),f=$.pop();return g},s.prototype._build=function(f,g,$,S){var E,A=$-g+1,C=this._maxEntries;if(A<=C)return l(E=q(f.slice(g,$+1)),this.toBBox),E;S||(S=Math.ceil(Math.log(A)/Math.log(C)),C=Math.ceil(A/Math.pow(C,S-1))),(E=q([])).leaf=!1,E.height=S;var L=Math.ceil(A/C),I=L*Math.ceil(Math.sqrt(C));J(f,g,$,I,this.compareMinX);for(var W=g;W<=$;W+=I){var re=Math.min(W+I-1,$);J(f,W,re,L,this.compareMinY);for(var k=W;k<=re;k+=L){var _=Math.min(k+L-1,re);E.children.push(this._build(f,k,_,S-1))}}return l(E,this.toBBox),E},s.prototype._chooseSubtree=function(f,g,$,S){for(;S.push(g),!g.leaf&&S.length-1!==$;){for(var E=1/0,A=1/0,C=void 0,L=0;L<g.children.length;L++){var I=g.children[L],W=y(I),re=(k=f,_=I,(Math.max(_.maxX,k.maxX)-Math.min(_.minX,k.minX))*(Math.max(_.maxY,k.maxY)-Math.min(_.minY,k.minY))-W);re<A?(A=re,E=W<E?W:E,C=I):re===A&&W<E&&(E=W,C=I)}g=C||g.children[0]}var k,_;return g},s.prototype._insert=function(f,g,$){var S=$?f:this.toBBox(f),E=[],A=this._chooseSubtree(S,this.data,g,E);for(A.children.push(f),u(A,S);g>=0&&E[g].children.length>this._maxEntries;)this._split(E,g),g--;this._adjustParentBBoxes(S,E,g)},s.prototype._split=function(f,g){var $=f[g],S=$.children.length,E=this._minEntries;this._chooseSplitAxis($,E,S);var A=this._chooseSplitIndex($,E,S),C=q($.children.splice(A,$.children.length-A));C.height=$.height,C.leaf=$.leaf,l($,this.toBBox),l(C,this.toBBox),g?f[g-1].children.push(C):this._splitRoot($,C)},s.prototype._splitRoot=function(f,g){this.data=q([f,g]),this.data.height=f.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(f,g,$){for(var S,E,A,C,L,I,W,re=1/0,k=1/0,_=g;_<=$-g;_++){var O=a(f,0,_,this.toBBox),B=a(f,_,$,this.toBBox),P=(E=O,A=B,C=void 0,L=void 0,I=void 0,W=void 0,C=Math.max(E.minX,A.minX),L=Math.max(E.minY,A.minY),I=Math.min(E.maxX,A.maxX),W=Math.min(E.maxY,A.maxY),Math.max(0,I-C)*Math.max(0,W-L)),H=y(O)+y(B);P<re?(re=P,S=_,k=H<k?H:k):P===re&&H<k&&(k=H,S=_)}return S||$-g},s.prototype._chooseSplitAxis=function(f,g,$){var S=f.leaf?this.compareMinX:p,E=f.leaf?this.compareMinY:v;this._allDistMargin(f,g,$,S)<this._allDistMargin(f,g,$,E)&&f.children.sort(S)},s.prototype._allDistMargin=function(f,g,$,S){f.children.sort(S);for(var E=this.toBBox,A=a(f,0,g,E),C=a(f,$-g,$,E),L=x(A)+x(C),I=g;I<$-g;I++){var W=f.children[I];u(A,f.leaf?E(W):W),L+=x(A)}for(var re=$-g-1;re>=g;re--){var k=f.children[re];u(C,f.leaf?E(k):k),L+=x(C)}return L},s.prototype._adjustParentBBoxes=function(f,g,$){for(var S=$;S>=0;S--)u(g[S],f)},s.prototype._condense=function(f){for(var g=f.length-1,$=void 0;g>=0;g--)f[g].children.length===0?g>0?($=f[g-1].children).splice($.indexOf(f[g]),1):this.clear():l(f[g],this.toBBox)},s})})(vn);var Io=vn.exports;const jo=wr(xo),No=wr(Lo);function nt(r){var e=[1/0,1/0,-1/0,-1/0];return vt(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}nt.default=nt;const Bo=wr(Object.freeze(Object.defineProperty({__proto__:null,default:nt},Symbol.toStringTag,{value:"Module"})));var Be=Io,mn=jo,yn=No,mt=Bo.default,Fo=yn.featureEach;yn.coordEach,mn.polygon;var bn=mn.featureCollection;function xn(r){var e=new Be(r);return e.insert=function(t){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:mt(t),Be.prototype.insert.call(this,t)},e.load=function(t){var i=[];return Array.isArray(t)?t.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:mt(n),i.push(n)}):Fo(t,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:mt(n),i.push(n)}),Be.prototype.load.call(this,i)},e.remove=function(t,i){if(t.type!=="Feature")throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:mt(t),Be.prototype.remove.call(this,t,i)},e.clear=function(){return Be.prototype.clear.call(this)},e.search=function(t){var i=Be.prototype.search.call(this,this.toBBox(t));return bn(i)},e.collides=function(t){return Be.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=Be.prototype.all.call(this);return bn(t)},e.toJSON=function(){return Be.prototype.toJSON.call(this)},e.fromJSON=function(t){return Be.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var i;if(t.bbox)i=t.bbox;else if(Array.isArray(t)&&t.length===4)i=t;else if(Array.isArray(t)&&t.length===6)i=[t[0],t[1],t[3],t[4]];else if(t.type==="Feature")i=mt(t);else if(t.type==="FeatureCollection")i=mt(t);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}Ir.exports=xn,Ir.exports.default=xn;var Ho=Ir.exports;const Uo=$r(Ho);function jr(r,e){var t={},i=[];if(r.type==="LineString"&&(r=Ce(r)),e.type==="LineString"&&(e=Ce(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=$n(r,e);return n&&i.push(n),Ke(i)}var s=Uo();return s.load(gn(e)),Ut(gn(r),function(o){Ut(s.search(o),function(l){var a=$n(o,l);if(a){var u=pt(a).join(",");t[u]||(t[u]=!0,i.push(a))}})}),Ke(i)}function $n(r,e){var t=pt(r),i=pt(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=t[0][0],s=t[0][1],o=t[1][0],l=t[1][1],a=i[0][0],u=i[0][1],p=i[1][0],v=i[1][1],y=(v-u)*(o-n)-(p-a)*(l-s),x=(p-a)*(s-u)-(v-u)*(n-a),M=(o-n)*(s-u)-(l-s)*(n-a);if(y===0)return null;var j=x/y,q=M/y;if(j>=0&&j<=1&&q>=0&&q<=1){var J=n+j*(o-n),f=s+j*(l-s);return Ne([J,f])}return null}function Nr(r,e){e===void 0&&(e={});var t=gt(r);switch(!e.properties&&r.type==="Feature"&&(e.properties=r.properties),t.type){case"Polygon":return Yo(t,e);case"MultiPolygon":return zo(t,e);default:throw new Error("invalid poly")}}function Yo(r,e){e===void 0&&(e={});var t=gt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{};return wn(i,n)}function zo(r,e){e===void 0&&(e={});var t=gt(r),i=t.coordinates,n=e.properties?e.properties:r.type==="Feature"?r.properties:{},s=[];return i.forEach(function(o){s.push(wn(o,n))}),Ke(s)}function wn(r,e){return r.length>1?Lr(r,e):Re(r[0],e)}function Xo(r,e){var t=!0;return ze(r,function(i){ze(e,function(n){if(t===!1)return!1;t=Vo(i.geometry,n.geometry)})}),t}function Vo(r,e){switch(r.type){case"Point":switch(e.type){case"Point":return!Ko(r.coordinates,e.coordinates);case"LineString":return!_n(e,r);case"Polygon":return!ke(r,e)}break;case"LineString":switch(e.type){case"Point":return!_n(r,e);case"LineString":return!Wo(r,e);case"Polygon":return!En(e,r)}break;case"Polygon":switch(e.type){case"Point":return!ke(e,r);case"LineString":return!En(r,e);case"Polygon":return!qo(e,r)}}return!1}function _n(r,e){for(var t=0;t<r.coordinates.length-1;t++)if(Go(r.coordinates[t],r.coordinates[t+1],e.coordinates))return!0;return!1}function Wo(r,e){var t=jr(r,e);return t.features.length>0}function En(r,e){for(var t=0,i=e.coordinates;t<i.length;t++){var n=i[t];if(ke(n,r))return!0}var s=jr(e,Nr(r));return s.features.length>0}function qo(r,e){for(var t=0,i=r.coordinates[0];t<i.length;t++){var n=i[t];if(ke(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var l=o[s];if(ke(l,r))return!0}var a=jr(Nr(r),Nr(e));return a.features.length>0}function Go(r,e,t){var i=t[0]-r[0],n=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],l=i*o-n*s;return l!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?r[0]<=t[0]&&t[0]<=e[0]:e[0]<=t[0]&&t[0]<=r[0]:o>0?r[1]<=t[1]&&t[1]<=e[1]:e[1]<=t[1]&&t[1]<=r[1]}function Ko(r,e){return r[0]===e[0]&&r[1]===e[1]}function Jo(r,e){var t=!1;return ze(r,function(i){ze(e,function(n){if(t===!0)return!0;t=!Xo(i.geometry,n.geometry)})}),t}function Yt(r,e,t){t===void 0&&(t={});for(var i=un(r),n=pt(e),s=0;s<n.length-1;s++){var o=!1;if(t.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Zo(n[s],n[s+1],i,o,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function Zo(r,e,t,i,n){var s=t[0],o=t[1],l=r[0],a=r[1],u=e[0],p=e[1],v=t[0]-l,y=t[1]-a,x=u-l,M=p-a,j=v*M-y*x;if(n!==null){if(Math.abs(j)>n)return!1}else if(j!==0)return!1;if(i){if(i==="start")return Math.abs(x)>=Math.abs(M)?x>0?l<s&&s<=u:u<=s&&s<l:M>0?a<o&&o<=p:p<=o&&o<a;if(i==="end")return Math.abs(x)>=Math.abs(M)?x>0?l<=s&&s<u:u<s&&s<=l:M>0?a<=o&&o<p:p<o&&o<=a;if(i==="both")return Math.abs(x)>=Math.abs(M)?x>0?l<s&&s<u:u<s&&s<l:M>0?a<o&&o<p:p<o&&o<a}else return Math.abs(x)>=Math.abs(M)?x>0?l<=s&&s<=u:u<=s&&s<=l:M>0?a<=o&&o<=p:p<=o&&o<=a;return!1}function Qo(r,e){var t=gt(r),i=gt(e),n=t.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return ea(t,i);case"LineString":return Yt(t,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return ke(t,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return ta(t,i);case"LineString":return ra(t,i);case"Polygon":case"MultiPolygon":return ia(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return na(t,i);case"Polygon":case"MultiPolygon":return sa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return oa(t,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function ea(r,e){var t,i=!1;for(t=0;t<e.coordinates.length;t++)if(An(e.coordinates[t],r.coordinates)){i=!0;break}return i}function ta(r,e){for(var t=0;t<r.coordinates.length;t++){for(var i=!1,n=0;n<e.coordinates.length;n++)An(r.coordinates[t],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function ra(r,e){for(var t=!1,i=0;i<r.coordinates.length;i++){if(!Yt(r.coordinates[i],e))return!1;t||(t=Yt(r.coordinates[i],e,{ignoreEndVertices:!0}))}return t}function ia(r,e){for(var t=!0,i=!1,n=0;n<r.coordinates.length;n++){if(i=ke(r.coordinates[1],e),!i){t=!1;break}i=ke(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&i}function na(r,e){for(var t=0;t<r.coordinates.length;t++)if(!Yt(r.coordinates[t],e))return!1;return!0}function sa(r,e){var t=nt(e),i=nt(r);if(!Mn(t,i))return!1;for(var n=!1,s=0;s<r.coordinates.length-1;s++){if(!ke(r.coordinates[s],e))return!1;if(n||(n=ke(r.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=aa(r.coordinates[s],r.coordinates[s+1]);n=ke(o,e,{ignoreBoundary:!0})}}return n}function oa(r,e){var t=nt(r),i=nt(e);if(!Mn(i,t))return!1;for(var n=0;n<r.coordinates[0].length;n++)if(!ke(r.coordinates[0][n],e))return!1;return!0}function Mn(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function An(r,e){return r[0]===e[0]&&r[1]===e[1]}function aa(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,kt=(r,e,t,i)=>{for(var n=i>1?void 0:i?ca(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&la(e,t,n),n};const ua=(r,e)=>e?Jo(r,e):!0,ha=(r,e)=>e?Qo(r,e):!0;let Br=class extends Pe{reset(){this.filterObject.state.geometry=void 0;const r=this.renderRoot.querySelector("eox-itemfilter-spatial-filter");delete this.filterObject.dirty,r.reset(),this.requestUpdate()}createRenderRoot(){return this}render(){var r;return he`
701
+ */const Ll=Kr(class extends Gr{constructor(t){if(super(t),t.type!==ot.PROPERTY&&t.type!==ot.ATTRIBUTE&&t.type!==ot.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!xo(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===ke||e===se)return e;const r=t.element,i=t.name;if(t.type===ot.PROPERTY){if(e===r[i])return ke}else if(t.type===ot.BOOLEAN_ATTRIBUTE){if(!!e===r.hasAttribute(i))return ke}else if(t.type===ot.ATTRIBUTE&&r.getAttribute(i)===e+"")return ke;return Cn(t),e}});var Ee=63710088e-1,di={centimeters:Ee*100,centimetres:Ee*100,degrees:Ee/111325,feet:Ee*3.28084,inches:Ee*39.37,kilometers:Ee/1e3,kilometres:Ee/1e3,meters:Ee,metres:Ee,miles:Ee/1609.344,millimeters:Ee*1e3,millimetres:Ee*1e3,nauticalmiles:Ee/1852,radians:1,yards:Ee*1.0936},kl={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Ee,yards:1.0936133},fi={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Te(t,e,r){r===void 0&&(r={});var i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=e||{},i.geometry=t,i}function Rl(t,e,r){switch(t){case"Point":return Xe(e).geometry;case"LineString":return je(e).geometry;case"Polygon":return pi(e).geometry;case"MultiPoint":return ts(e).geometry;case"MultiLineString":return gi(e).geometry;case"MultiPolygon":return rs(e).geometry;default:throw new Error(t+" is invalid")}}function Xe(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!xr(t[0])||!xr(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return Te(i,e,r)}function Tl(t,e,r){return r===void 0&&(r={}),ct(t.map(function(i){return Xe(i,e)}),r)}function pi(t,e,r){r===void 0&&(r={});for(var i=0,n=t;i<n.length;i++){var s=n[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:t};return Te(a,e,r)}function Il(t,e,r){return r===void 0&&(r={}),ct(t.map(function(i){return pi(i,e)}),r)}function je(t,e,r){if(r===void 0&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:t};return Te(i,e,r)}function Dl(t,e,r){return r===void 0&&(r={}),ct(t.map(function(i){return je(i,e)}),r)}function ct(t,e){e===void 0&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function gi(t,e,r){r===void 0&&(r={});var i={type:"MultiLineString",coordinates:t};return Te(i,e,r)}function ts(t,e,r){r===void 0&&(r={});var i={type:"MultiPoint",coordinates:t};return Te(i,e,r)}function rs(t,e,r){r===void 0&&(r={});var i={type:"MultiPolygon",coordinates:t};return Te(i,e,r)}function Nl(t,e,r){r===void 0&&(r={});var i={type:"GeometryCollection",geometries:t};return Te(i,e,r)}function Bl(t,e){if(e===void 0&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function is(t,e){e===void 0&&(e="kilometers");var r=di[e];if(!r)throw new Error(e+" units is invalid");return t*r}function mi(t,e){e===void 0&&(e="kilometers");var r=di[e];if(!r)throw new Error(e+" units is invalid");return t/r}function jl(t,e){return ns(mi(t,e))}function Fl(t){var e=t%360;return e<0&&(e+=360),e}function ns(t){var e=t%(2*Math.PI);return e*180/Math.PI}function Hl(t){var e=t%360;return e*Math.PI/180}function ql(t,e,r){if(e===void 0&&(e="kilometers"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return is(mi(t,e),r)}function Ul(t,e,r){if(e===void 0&&(e="meters"),r===void 0&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=fi[e];if(!i)throw new Error("invalid original units");var n=fi[r];if(!n)throw new Error("invalid final units");return t/i*n}function xr(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function vi(t){return!!t&&t.constructor===Object}function zl(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!xr(e))throw new Error("bbox must only contain numbers")})}function Yl(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const Vl=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:fi,bearingToAzimuth:Fl,convertArea:Ul,convertLength:ql,degreesToRadians:Hl,earthRadius:Ee,factors:di,feature:Te,featureCollection:ct,geometry:Rl,geometryCollection:Nl,isNumber:xr,isObject:vi,lengthToDegrees:jl,lengthToRadians:mi,lineString:je,lineStrings:Dl,multiLineString:gi,multiPoint:ts,multiPolygon:rs,point:Xe,points:Tl,polygon:pi,polygons:Il,radiansToDegrees:ns,radiansToLength:is,round:Bl,unitsFactors:kl,validateBBox:zl,validateId:Yl},Symbol.toStringTag,{value:"Module"}));function ss(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Tt(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function It(t){return t.type==="Feature"?t.geometry:t}function Ie(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=ss(t),n=It(e),s=n.type,o=e.bbox,a=n.coordinates;if(o&&Xl(i,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var l=!1,c=0;c<a.length&&!l;c++)if(os(i,a[c][0],r.ignoreBoundary)){for(var f=!1,m=1;m<a[c].length&&!f;)os(i,a[c][m],!r.ignoreBoundary)&&(f=!0),m++;f||(l=!0)}return l}function os(t,e,r){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var n=0,s=e.length-1;n<e.length;s=n++){var o=e[n][0],a=e[n][1],l=e[s][0],c=e[s][1],f=t[1]*(o-l)+a*(l-t[0])+c*(t[0]-o)===0&&(o-t[0])*(l-t[0])<=0&&(a-t[1])*(c-t[1])<=0;if(f)return!r;var m=a>t[1]!=c>t[1]&&t[0]<(l-o)*(t[1]-a)/(c-a)+o;m&&(i=!i)}return i}function Xl(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function Dt(t,e,r){if(t!==null)for(var i,n,s,o,a,l,c,f=0,m=0,y,v=t.type,w=v==="FeatureCollection",O=v==="Feature",q=w?t.features.length:1,j=0;j<q;j++){c=w?t.features[j].geometry:O?t.geometry:t,y=c?c.type==="GeometryCollection":!1,a=y?c.geometries.length:1;for(var p=0;p<a;p++){var g=0,$=0;if(o=y?c.geometries[p]:c,o!==null){l=o.coordinates;var S=o.type;switch(f=r&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(e(l,m,j,g,$)===!1)return!1;m++,g++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(e(l[i],m,j,g,$)===!1)return!1;m++,S==="MultiPoint"&&g++}S==="LineString"&&g++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(n=0;n<l[i].length-f;n++){if(e(l[i][n],m,j,g,$)===!1)return!1;m++}S==="MultiLineString"&&g++,S==="Polygon"&&$++}S==="Polygon"&&g++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for($=0,n=0;n<l[i].length;n++){for(s=0;s<l[i][n].length-f;s++){if(e(l[i][n][s],m,j,g,$)===!1)return!1;m++}$++}g++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(Dt(o.geometries[i],e,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Wl(t,e,r,i){var n=r;return Dt(t,function(s,o,a,l,c){o===0&&r===void 0?n=s:n=e(n,s,o,a,l,c)},i),n}function ls(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&e(t.features[r].properties,r)!==!1;r++);break;case"Feature":e(t.properties,0);break}}function Kl(t,e,r){var i=r;return ls(t,function(n,s){s===0&&r===void 0?i=n:i=e(i,n,s)}),i}function wr(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var r=0;r<t.features.length&&e(t.features[r],r)!==!1;r++);}function Gl(t,e,r){var i=r;return wr(t,function(n,s){s===0&&r===void 0?i=n:i=e(i,n,s)}),i}function Jl(t){var e=[];return Dt(t,function(r){e.push(r)}),e}function yi(t,e){var r,i,n,s,o,a,l,c,f,m,y=0,v=t.type==="FeatureCollection",w=t.type==="Feature",O=v?t.features.length:1;for(r=0;r<O;r++){for(a=v?t.features[r].geometry:w?t.geometry:t,c=v?t.features[r].properties:w?t.properties:{},f=v?t.features[r].bbox:w?t.bbox:void 0,m=v?t.features[r].id:w?t.id:void 0,l=a?a.type==="GeometryCollection":!1,o=l?a.geometries.length:1,n=0;n<o;n++){if(s=l?a.geometries[n]:a,s===null){if(e(null,y,c,f,m)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(s,y,c,f,m)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<s.geometries.length;i++)if(e(s.geometries[i],y,c,f,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}y++}}function Zl(t,e,r){var i=r;return yi(t,function(n,s,o,a,l){s===0&&r===void 0?i=n:i=e(i,n,s,o,a,l)}),i}function rt(t,e){yi(t,function(r,i,n,s,o){var a=r===null?null:r.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return e(Te(r,n,{bbox:s,id:o}),i,0)===!1?!1:void 0}var l;switch(a){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var c=0;c<r.coordinates.length;c++){var f=r.coordinates[c],m={type:l,coordinates:f};if(e(Te(m,n),i,c)===!1)return!1}})}function Ql(t,e,r){var i=r;return rt(t,function(n,s,o){s===0&&o===0&&r===void 0?i=n:i=e(i,n,s,o)}),i}function as(t,e){rt(t,function(r,i,n){var s=0;if(r.geometry){var o=r.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,l=0,c=0,f=0;if(Dt(r,function(m,y,v,w,O){if(a===void 0||i>l||w>c||O>f){a=m,l=i,c=w,f=O,s=0;return}var q=je([a,m],r.properties);if(e(q,i,n,O,s)===!1)return!1;s++,a=m})===!1)return!1}}})}function ea(t,e,r){var i=r,n=!1;return as(t,function(s,o,a,l,c){n===!1&&r===void 0?i=s:i=e(i,s,o,a,l,c),n=!0}),i}function cs(t,e){if(!t)throw new Error("geojson is required");rt(t,function(r,i,n){if(r.geometry!==null){var s=r.geometry.type,o=r.geometry.coordinates;switch(s){case"LineString":if(e(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(e(je(o[a],r.properties),i,n,a)===!1)return!1;break}}})}function ta(t,e,r){var i=r;return cs(t,function(n,s,o,a){s===0&&r===void 0?i=n:i=e(i,n,s,o,a)}),i}function ra(t,e){if(e=e||{},!vi(e))throw new Error("options is invalid");var r=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.segmentIndex||0,o=e.properties,a;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),o=o||t.features[r].properties,a=t.features[r].geometry;break;case"Feature":o=o||t.properties,a=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":a=t;break;default:throw new Error("geojson is invalid")}if(a===null)return null;var l=a.coordinates;switch(a.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),je([l[s],l[s+1]],o,e);case"Polygon":return n<0&&(n=l.length+n),s<0&&(s=l[n].length+s-1),je([l[n][s],l[n][s+1]],o,e);case"MultiLineString":return i<0&&(i=l.length+i),s<0&&(s=l[i].length+s-1),je([l[i][s],l[i][s+1]],o,e);case"MultiPolygon":return i<0&&(i=l.length+i),n<0&&(n=l[i].length+n),s<0&&(s=l[i][n].length-s-1),je([l[i][n][s],l[i][n][s+1]],o,e)}throw new Error("geojson is invalid")}function ia(t,e){if(e=e||{},!vi(e))throw new Error("options is invalid");var r=e.featureIndex||0,i=e.multiFeatureIndex||0,n=e.geometryIndex||0,s=e.coordIndex||0,o=e.properties,a;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),o=o||t.features[r].properties,a=t.features[r].geometry;break;case"Feature":o=o||t.properties,a=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":a=t;break;default:throw new Error("geojson is invalid")}if(a===null)return null;var l=a.coordinates;switch(a.type){case"Point":return Xe(l,o,e);case"MultiPoint":return i<0&&(i=l.length+i),Xe(l[i],o,e);case"LineString":return s<0&&(s=l.length+s),Xe(l[s],o,e);case"Polygon":return n<0&&(n=l.length+n),s<0&&(s=l[n].length+s),Xe(l[n][s],o,e);case"MultiLineString":return i<0&&(i=l.length+i),s<0&&(s=l[i].length+s),Xe(l[i][s],o,e);case"MultiPolygon":return i<0&&(i=l.length+i),n<0&&(n=l[i].length+n),s<0&&(s=l[i][n].length-s),Xe(l[i][n][s],o,e)}throw new Error("geojson is invalid")}const na=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Jl,coordEach:Dt,coordReduce:Wl,featureEach:wr,featureReduce:Gl,findPoint:ia,findSegment:ra,flattenEach:rt,flattenReduce:Ql,geomEach:yi,geomReduce:Zl,lineEach:cs,lineReduce:ta,propEach:ls,propReduce:Kl,segmentEach:as,segmentReduce:ea},Symbol.toStringTag,{value:"Module"}));function us(t){if(!t)throw new Error("geojson is required");var e=[];return rt(t,function(r){sa(r,e)}),ct(e)}function sa(t,e){var r=[],i=t.geometry;if(i!==null){switch(i.type){case"Polygon":r=Tt(i);break;case"LineString":r=[Tt(i)]}r.forEach(function(n){var s=oa(n,t.properties);s.forEach(function(o){o.id=e.length,e.push(o)})})}}function oa(t,e){var r=[];return t.reduce(function(i,n){var s=je([i,n],e);return s.bbox=la(i,n),r.push(s),n}),r}function la(t,e){var r=t[0],i=t[1],n=e[0],s=e[1],o=r<n?r:n,a=i<s?i:s,l=r>n?r:n,c=i>s?i:s;return[o,a,l,c]}var bi={exports:{}},hs={exports:{}};(function(t,e){(function(r,i){t.exports=i()})(Ot,function(){function r(p,g,$,S,A){(function M(L,R,N,G,ne){for(;G>N;){if(G-N>600){var k=G-N+1,E=R-N+1,P=Math.log(k),F=.5*Math.exp(2*P/3),C=.5*Math.sqrt(P*F*(k-F)/k)*(E-k/2<0?-1:1),U=Math.max(N,Math.floor(R-E*F/k+C)),K=Math.min(G,Math.floor(R+(k-E)*F/k+C));M(L,R,U,K,ne)}var re=L[R],ue=N,ee=G;for(i(L,N,R),ne(L[G],re)>0&&i(L,N,G);ue<ee;){for(i(L,ue,ee),ue++,ee--;ne(L[ue],re)<0;)ue++;for(;ne(L[ee],re)>0;)ee--}ne(L[N],re)===0?i(L,N,ee):i(L,++ee,G),ee<=R&&(N=ee+1),R<=ee&&(G=ee-1)}})(p,g,$||0,S||p.length-1,A||n)}function i(p,g,$){var S=p[g];p[g]=p[$],p[$]=S}function n(p,g){return p<g?-1:p>g?1:0}var s=function(p){p===void 0&&(p=9),this._maxEntries=Math.max(4,p),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(p,g,$){if(!$)return g.indexOf(p);for(var S=0;S<g.length;S++)if($(p,g[S]))return S;return-1}function a(p,g){l(p,0,p.children.length,g,p)}function l(p,g,$,S,A){A||(A=q(null)),A.minX=1/0,A.minY=1/0,A.maxX=-1/0,A.maxY=-1/0;for(var M=g;M<$;M++){var L=p.children[M];c(A,p.leaf?S(L):L)}return A}function c(p,g){return p.minX=Math.min(p.minX,g.minX),p.minY=Math.min(p.minY,g.minY),p.maxX=Math.max(p.maxX,g.maxX),p.maxY=Math.max(p.maxY,g.maxY),p}function f(p,g){return p.minX-g.minX}function m(p,g){return p.minY-g.minY}function y(p){return(p.maxX-p.minX)*(p.maxY-p.minY)}function v(p){return p.maxX-p.minX+(p.maxY-p.minY)}function w(p,g){return p.minX<=g.minX&&p.minY<=g.minY&&g.maxX<=p.maxX&&g.maxY<=p.maxY}function O(p,g){return g.minX<=p.maxX&&g.minY<=p.maxY&&g.maxX>=p.minX&&g.maxY>=p.minY}function q(p){return{children:p,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function j(p,g,$,S,A){for(var M=[g,$];M.length;)if(!(($=M.pop())-(g=M.pop())<=S)){var L=g+Math.ceil(($-g)/S/2)*S;r(p,L,g,$,A),M.push(g,L,L,$)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(p){var g=this.data,$=[];if(!O(p,g))return $;for(var S=this.toBBox,A=[];g;){for(var M=0;M<g.children.length;M++){var L=g.children[M],R=g.leaf?S(L):L;O(p,R)&&(g.leaf?$.push(L):w(p,R)?this._all(L,$):A.push(L))}g=A.pop()}return $},s.prototype.collides=function(p){var g=this.data;if(!O(p,g))return!1;for(var $=[];g;){for(var S=0;S<g.children.length;S++){var A=g.children[S],M=g.leaf?this.toBBox(A):A;if(O(p,M)){if(g.leaf||w(p,M))return!0;$.push(A)}}g=$.pop()}return!1},s.prototype.load=function(p){if(!p||!p.length)return this;if(p.length<this._minEntries){for(var g=0;g<p.length;g++)this.insert(p[g]);return this}var $=this._build(p.slice(),0,p.length-1,0);if(this.data.children.length)if(this.data.height===$.height)this._splitRoot(this.data,$);else{if(this.data.height<$.height){var S=this.data;this.data=$,$=S}this._insert($,this.data.height-$.height-1,!0)}else this.data=$;return this},s.prototype.insert=function(p){return p&&this._insert(p,this.data.height-1),this},s.prototype.clear=function(){return this.data=q([]),this},s.prototype.remove=function(p,g){if(!p)return this;for(var $,S,A,M=this.data,L=this.toBBox(p),R=[],N=[];M||R.length;){if(M||(M=R.pop(),S=R[R.length-1],$=N.pop(),A=!0),M.leaf){var G=o(p,M.children,g);if(G!==-1)return M.children.splice(G,1),R.push(M),this._condense(R),this}A||M.leaf||!w(M,L)?S?($++,M=S.children[$],A=!1):M=null:(R.push(M),N.push($),$=0,S=M,M=M.children[0])}return this},s.prototype.toBBox=function(p){return p},s.prototype.compareMinX=function(p,g){return p.minX-g.minX},s.prototype.compareMinY=function(p,g){return p.minY-g.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(p){return this.data=p,this},s.prototype._all=function(p,g){for(var $=[];p;)p.leaf?g.push.apply(g,p.children):$.push.apply($,p.children),p=$.pop();return g},s.prototype._build=function(p,g,$,S){var A,M=$-g+1,L=this._maxEntries;if(M<=L)return a(A=q(p.slice(g,$+1)),this.toBBox),A;S||(S=Math.ceil(Math.log(M)/Math.log(L)),L=Math.ceil(M/Math.pow(L,S-1))),(A=q([])).leaf=!1,A.height=S;var R=Math.ceil(M/L),N=R*Math.ceil(Math.sqrt(L));j(p,g,$,N,this.compareMinX);for(var G=g;G<=$;G+=N){var ne=Math.min(G+N-1,$);j(p,G,ne,R,this.compareMinY);for(var k=G;k<=ne;k+=R){var E=Math.min(k+R-1,ne);A.children.push(this._build(p,k,E,S-1))}}return a(A,this.toBBox),A},s.prototype._chooseSubtree=function(p,g,$,S){for(;S.push(g),!g.leaf&&S.length-1!==$;){for(var A=1/0,M=1/0,L=void 0,R=0;R<g.children.length;R++){var N=g.children[R],G=y(N),ne=(k=p,E=N,(Math.max(E.maxX,k.maxX)-Math.min(E.minX,k.minX))*(Math.max(E.maxY,k.maxY)-Math.min(E.minY,k.minY))-G);ne<M?(M=ne,A=G<A?G:A,L=N):ne===M&&G<A&&(A=G,L=N)}g=L||g.children[0]}var k,E;return g},s.prototype._insert=function(p,g,$){var S=$?p:this.toBBox(p),A=[],M=this._chooseSubtree(S,this.data,g,A);for(M.children.push(p),c(M,S);g>=0&&A[g].children.length>this._maxEntries;)this._split(A,g),g--;this._adjustParentBBoxes(S,A,g)},s.prototype._split=function(p,g){var $=p[g],S=$.children.length,A=this._minEntries;this._chooseSplitAxis($,A,S);var M=this._chooseSplitIndex($,A,S),L=q($.children.splice(M,$.children.length-M));L.height=$.height,L.leaf=$.leaf,a($,this.toBBox),a(L,this.toBBox),g?p[g-1].children.push(L):this._splitRoot($,L)},s.prototype._splitRoot=function(p,g){this.data=q([p,g]),this.data.height=p.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(p,g,$){for(var S,A,M,L,R,N,G,ne=1/0,k=1/0,E=g;E<=$-g;E++){var P=l(p,0,E,this.toBBox),F=l(p,E,$,this.toBBox),C=(A=P,M=F,L=void 0,R=void 0,N=void 0,G=void 0,L=Math.max(A.minX,M.minX),R=Math.max(A.minY,M.minY),N=Math.min(A.maxX,M.maxX),G=Math.min(A.maxY,M.maxY),Math.max(0,N-L)*Math.max(0,G-R)),U=y(P)+y(F);C<ne?(ne=C,S=E,k=U<k?U:k):C===ne&&U<k&&(k=U,S=E)}return S||$-g},s.prototype._chooseSplitAxis=function(p,g,$){var S=p.leaf?this.compareMinX:f,A=p.leaf?this.compareMinY:m;this._allDistMargin(p,g,$,S)<this._allDistMargin(p,g,$,A)&&p.children.sort(S)},s.prototype._allDistMargin=function(p,g,$,S){p.children.sort(S);for(var A=this.toBBox,M=l(p,0,g,A),L=l(p,$-g,$,A),R=v(M)+v(L),N=g;N<$-g;N++){var G=p.children[N];c(M,p.leaf?A(G):G),R+=v(M)}for(var ne=$-g-1;ne>=g;ne--){var k=p.children[ne];c(L,p.leaf?A(k):k),R+=v(L)}return R},s.prototype._adjustParentBBoxes=function(p,g,$){for(var S=$;S>=0;S--)c(g[S],p)},s.prototype._condense=function(p){for(var g=p.length-1,$=void 0;g>=0;g--)p[g].children.length===0?g>0?($=p[g-1].children).splice($.indexOf(p[g]),1):this.clear():a(p[g],this.toBBox)},s})})(hs);var aa=hs.exports;const ca=ei(Vl),ua=ei(na);function bt(t){var e=[1/0,1/0,-1/0,-1/0];return Dt(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}bt.default=bt;const ha=ei(Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"})));var We=aa,ds=ca,fs=ua,Nt=ha.default,da=fs.featureEach;fs.coordEach,ds.polygon;var ps=ds.featureCollection;function gs(t){var e=new We(t);return e.insert=function(r){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Nt(r),We.prototype.insert.call(this,r)},e.load=function(r){var i=[];return Array.isArray(r)?r.forEach(function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Nt(n),i.push(n)}):da(r,function(n){if(n.type!=="Feature")throw new Error("invalid features");n.bbox=n.bbox?n.bbox:Nt(n),i.push(n)}),We.prototype.load.call(this,i)},e.remove=function(r,i){if(r.type!=="Feature")throw new Error("invalid feature");return r.bbox=r.bbox?r.bbox:Nt(r),We.prototype.remove.call(this,r,i)},e.clear=function(){return We.prototype.clear.call(this)},e.search=function(r){var i=We.prototype.search.call(this,this.toBBox(r));return ps(i)},e.collides=function(r){return We.prototype.collides.call(this,this.toBBox(r))},e.all=function(){var r=We.prototype.all.call(this);return ps(r)},e.toJSON=function(){return We.prototype.toJSON.call(this)},e.fromJSON=function(r){return We.prototype.fromJSON.call(this,r)},e.toBBox=function(r){var i;if(r.bbox)i=r.bbox;else if(Array.isArray(r)&&r.length===4)i=r;else if(Array.isArray(r)&&r.length===6)i=[r[0],r[1],r[3],r[4]];else if(r.type==="Feature")i=Nt(r);else if(r.type==="FeatureCollection")i=Nt(r);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},e}bi.exports=gs,bi.exports.default=gs;var fa=bi.exports;const pa=Qr(fa);function xi(t,e){var r={},i=[];if(t.type==="LineString"&&(t=Te(t)),e.type==="LineString"&&(e=Te(e)),t.type==="Feature"&&e.type==="Feature"&&t.geometry!==null&&e.geometry!==null&&t.geometry.type==="LineString"&&e.geometry.type==="LineString"&&t.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var n=ms(t,e);return n&&i.push(n),ct(i)}var s=pa();return s.load(us(e)),wr(us(t),function(o){wr(s.search(o),function(a){var l=ms(o,a);if(l){var c=Tt(l).join(",");r[c]||(r[c]=!0,i.push(l))}})}),ct(i)}function ms(t,e){var r=Tt(t),i=Tt(e);if(r.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(i.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var n=r[0][0],s=r[0][1],o=r[1][0],a=r[1][1],l=i[0][0],c=i[0][1],f=i[1][0],m=i[1][1],y=(m-c)*(o-n)-(f-l)*(a-s),v=(f-l)*(s-c)-(m-c)*(n-l),w=(o-n)*(s-c)-(a-s)*(n-l);if(y===0)return null;var O=v/y,q=w/y;if(O>=0&&O<=1&&q>=0&&q<=1){var j=n+O*(o-n),p=s+O*(a-s);return Xe([j,p])}return null}function wi(t,e){e===void 0&&(e={});var r=It(t);switch(!e.properties&&t.type==="Feature"&&(e.properties=t.properties),r.type){case"Polygon":return ga(r,e);case"MultiPolygon":return ma(r,e);default:throw new Error("invalid poly")}}function ga(t,e){e===void 0&&(e={});var r=It(t),i=r.coordinates,n=e.properties?e.properties:t.type==="Feature"?t.properties:{};return vs(i,n)}function ma(t,e){e===void 0&&(e={});var r=It(t),i=r.coordinates,n=e.properties?e.properties:t.type==="Feature"?t.properties:{},s=[];return i.forEach(function(o){s.push(vs(o,n))}),ct(s)}function vs(t,e){return t.length>1?gi(t,e):je(t[0],e)}function va(t,e){var r=!0;return rt(t,function(i){rt(e,function(n){if(r===!1)return!1;r=ya(i.geometry,n.geometry)})}),r}function ya(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return!$a(t.coordinates,e.coordinates);case"LineString":return!ys(e,t);case"Polygon":return!Ie(t,e)}break;case"LineString":switch(e.type){case"Point":return!ys(t,e);case"LineString":return!ba(t,e);case"Polygon":return!bs(e,t)}break;case"Polygon":switch(e.type){case"Point":return!Ie(e,t);case"LineString":return!bs(t,e);case"Polygon":return!xa(e,t)}}return!1}function ys(t,e){for(var r=0;r<t.coordinates.length-1;r++)if(wa(t.coordinates[r],t.coordinates[r+1],e.coordinates))return!0;return!1}function ba(t,e){var r=xi(t,e);return r.features.length>0}function bs(t,e){for(var r=0,i=e.coordinates;r<i.length;r++){var n=i[r];if(Ie(n,t))return!0}var s=xi(e,wi(t));return s.features.length>0}function xa(t,e){for(var r=0,i=t.coordinates[0];r<i.length;r++){var n=i[r];if(Ie(n,e))return!0}for(var s=0,o=e.coordinates[0];s<o.length;s++){var a=o[s];if(Ie(a,t))return!0}var l=xi(wi(t),wi(e));return l.features.length>0}function wa(t,e,r){var i=r[0]-t[0],n=r[1]-t[1],s=e[0]-t[0],o=e[1]-t[1],a=i*o-n*s;return a!==0?!1:Math.abs(s)>=Math.abs(o)?s>0?t[0]<=r[0]&&r[0]<=e[0]:e[0]<=r[0]&&r[0]<=t[0]:o>0?t[1]<=r[1]&&r[1]<=e[1]:e[1]<=r[1]&&r[1]<=t[1]}function $a(t,e){return t[0]===e[0]&&t[1]===e[1]}function _a(t,e){var r=!1;return rt(t,function(i){rt(e,function(n){if(r===!0)return!0;r=!va(i.geometry,n.geometry)})}),r}function $r(t,e,r){r===void 0&&(r={});for(var i=ss(t),n=Tt(e),s=0;s<n.length-1;s++){var o=!1;if(r.ignoreEndVertices&&(s===0&&(o="start"),s===n.length-2&&(o="end"),s===0&&s+1===n.length-1&&(o="both")),Ea(n[s],n[s+1],i,o,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function Ea(t,e,r,i,n){var s=r[0],o=r[1],a=t[0],l=t[1],c=e[0],f=e[1],m=r[0]-a,y=r[1]-l,v=c-a,w=f-l,O=m*w-y*v;if(n!==null){if(Math.abs(O)>n)return!1}else if(O!==0)return!1;if(i){if(i==="start")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<=c:c<=s&&s<a:w>0?l<o&&o<=f:f<=o&&o<l;if(i==="end")return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<c:c<s&&s<=a:w>0?l<=o&&o<f:f<o&&o<=l;if(i==="both")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<c:c<s&&s<a:w>0?l<o&&o<f:f<o&&o<l}else return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<=c:c<=s&&s<=a:w>0?l<=o&&o<=f:f<=o&&o<=l;return!1}function Aa(t,e){var r=It(t),i=It(e),n=r.type,s=i.type;switch(n){case"Point":switch(s){case"MultiPoint":return Sa(r,i);case"LineString":return $r(r,i,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Ie(r,i,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return Ma(r,i);case"LineString":return Oa(r,i);case"Polygon":case"MultiPolygon":return Pa(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return Ca(r,i);case"Polygon":case"MultiPolygon":return La(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return ka(r,i);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}function Sa(t,e){var r,i=!1;for(r=0;r<e.coordinates.length;r++)if(ws(e.coordinates[r],t.coordinates)){i=!0;break}return i}function Ma(t,e){for(var r=0;r<t.coordinates.length;r++){for(var i=!1,n=0;n<e.coordinates.length;n++)ws(t.coordinates[r],e.coordinates[n])&&(i=!0);if(!i)return!1}return!0}function Oa(t,e){for(var r=!1,i=0;i<t.coordinates.length;i++){if(!$r(t.coordinates[i],e))return!1;r||(r=$r(t.coordinates[i],e,{ignoreEndVertices:!0}))}return r}function Pa(t,e){for(var r=!0,i=!1,n=0;n<t.coordinates.length;n++){if(i=Ie(t.coordinates[1],e),!i){r=!1;break}i=Ie(t.coordinates[1],e,{ignoreBoundary:!0})}return r&&i}function Ca(t,e){for(var r=0;r<t.coordinates.length;r++)if(!$r(t.coordinates[r],e))return!1;return!0}function La(t,e){var r=bt(e),i=bt(t);if(!xs(r,i))return!1;for(var n=!1,s=0;s<t.coordinates.length-1;s++){if(!Ie(t.coordinates[s],e))return!1;if(n||(n=Ie(t.coordinates[s],e,{ignoreBoundary:!0})),!n){var o=Ra(t.coordinates[s],t.coordinates[s+1]);n=Ie(o,e,{ignoreBoundary:!0})}}return n}function ka(t,e){var r=bt(t),i=bt(e);if(!xs(i,r))return!1;for(var n=0;n<t.coordinates[0].length;n++)if(!Ie(t.coordinates[0][n],e))return!1;return!0}function xs(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function ws(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ra(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var Ta=Object.defineProperty,Ia=Object.getOwnPropertyDescriptor,ir=(t,e,r,i)=>{for(var n=i>1?void 0:i?Ia(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Ta(e,r,n),n};const Da=(t,e)=>e?_a(t,e):!0,Na=(t,e)=>e?Aa(t,e):!0;let $i=class extends we{reset(){Ct(this.filterObject),this.renderRoot.querySelector("eox-itemfilter-spatial-filter").reset(),this.requestUpdate()}createRenderRoot(){return this}render(){return fe(this.filterObject,()=>{var t;return X`
537
702
  <form style="display: inline">
538
- ${dt(["intersects","within"],e=>he`
703
+ ${Kt(["intersects","within"],e=>X`
539
704
  <label>
540
705
  <input
541
706
  type="radio"
542
707
  name="mode"
543
- .checked="${no(this.filterObject.state.mode===e)}"
708
+ .checked="${Ll(this.filterObject.state.mode===e)}"
544
709
  value="${e}"
545
- @click="${()=>{this.filterObject.state.mode=e;const t=new CustomEvent("filter",{detail:{[this.filterObject.key]:{}}});this.dispatchEvent(t)}}"
710
+ @click="${()=>{this.filterObject.state.mode=e;const r=new CustomEvent("filter",{detail:{[this.filterObject.key]:{}}});this.dispatchEvent(r)}}"
546
711
  />
547
712
  <small>${e} filter geometry</small>
548
713
  </label>
@@ -550,140 +715,245 @@ eox-itemfilter-range {
550
715
  </form>
551
716
  <eox-itemfilter-spatial-filter
552
717
  exportparts="map: spatial-filter-map"
553
- .geometry=${(r=this.filterObject.state)==null?void 0:r.geometry}
554
- @filter="${e=>{this.filterObject.state.geometry=e.detail.geometry,this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))}}"
718
+ .geometry=${(t=this.filterObject.state)==null?void 0:t.geometry}
719
+ @filter="${e=>{this.filterObject.state.geometry=e.detail.geometry,this.filterObject.dirty=!0,this.filterObject.stringifiedState="Polygon",this.dispatchEvent(new CustomEvent("filter"))}}"
555
720
  ></eox-itemfilter-spatial>
556
- `}};kt([Ae()],Br.prototype,"filterObject",2),Br=kt([qe("eox-itemfilter-spatial")],Br);let zt=class extends Pe{render(){return he`<eox-map part="map" style="height: 400px"></eox-map>`}firstUpdated(){this.setup()}setup(){const r=[{type:"Vector",id:"draw",source:{type:"Vector",...this.geometry&&{format:"GeoJSON"},...this.geometry&&{url:this.createFeatureUrl(this.geometry)}},zIndex:1},{type:"Tile",source:{type:"XYZ",url:"https://s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpg",attribution:"{ OSM: Data &copy; OpenStreetMap contributors and others, Rendering &copy; EOX }"}}];this.eoxMap=this.renderRoot.querySelector("eox-map"),setTimeout(()=>{this.eoxMap.setLayers(r),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const e=t=>{const i=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:t.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(i)};this.eoxMap.interactions.drawInteraction.on("drawend",t=>{e(t.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",t=>{e(t.features.getArray()[0])})})}createFeatureUrl(r){return`data:text/json,${encodeURIComponent(JSON.stringify({type:"FeatureCollection",features:[{type:"Feature",properties:null,geometry:r}]}))}`}reset(){var e;const r=this.eoxMap.getLayerById("draw").getSource();((e=r.getFeatures())==null?void 0:e.length)>0&&(r.clear(),this.eoxMap.removeInteraction("drawInteraction_modify"),this.setup())}};kt([Ae()],zt.prototype,"geometry",2),kt([Pt()],zt.prototype,"eoxMap",2),zt=kt([qe("eox-itemfilter-spatial-filter")],zt);var da=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,On=(r,e,t,i)=>{for(var n=i>1?void 0:i?fa(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&da(e,t,n),n};let Fr=class extends Pe{constructor(){super(...arguments),this.inputHandler=()=>{const r=this.renderRoot.querySelector("input[type='text']");this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=r.value}),this.filterObject.dirty=!0,this.dispatchEvent(new CustomEvent("filter"))},this.debouncedInputHandler=rn(this.inputHandler,500,{leading:!0})}reset(){const r=this.renderRoot.querySelector("input[type='text']");r.value="",this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=void 0}),delete this.filterObject.dirty,this.requestUpdate()}createRenderRoot(){return this}render(){return he`
557
- <input
558
- type="text"
559
- placeholder="Type something..."
560
- data-cy="search"
561
- part="input-search"
562
- value="${Object.values(this.filterObject.state)[0]}"
563
- @input="${this.debouncedInputHandler}"
564
- />
565
- `}};On([Ae()],Fr.prototype,"filterObject",2),Fr=On([qe("eox-itemfilter-text")],Fr);function Xe(r){return Array.isArray?Array.isArray(r):Cn(r)==="[object Array]"}const pa=1/0;function ga(r){if(typeof r=="string")return r;let e=r+"";return e=="0"&&1/r==-pa?"-0":e}function va(r){return r==null?"":ga(r)}function Fe(r){return typeof r=="string"}function Sn(r){return typeof r=="number"}function ma(r){return r===!0||r===!1||ya(r)&&Cn(r)=="[object Boolean]"}function Pn(r){return typeof r=="object"}function ya(r){return Pn(r)&&r!==null}function Oe(r){return r!=null}function Hr(r){return!r.trim().length}function Cn(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const ic="Extended search is not available",ba="Incorrect 'index' type",xa=r=>`Invalid value for key ${r}`,$a=r=>`Pattern length exceeds max of ${r}.`,wa=r=>`Missing ${r} property in key`,_a=r=>`Property 'weight' in key '${r}' must be a positive integer`,kn=Object.prototype.hasOwnProperty;class Ea{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Ln(i);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ln(r){let e=null,t=null,i=null,n=1,s=null;if(Fe(r)||Xe(r))i=r,e=Tn(r),t=Ur(r);else{if(!kn.call(r,"name"))throw new Error(wa("name"));const o=r.name;if(i=o,kn.call(r,"weight")&&(n=r.weight,n<=0))throw new Error(_a(o));e=Tn(o),t=Ur(o),s=r.getFn}return{path:e,id:t,weight:n,src:i,getFn:s}}function Tn(r){return Xe(r)?r:r.split(".")}function Ur(r){return Xe(r)?r.join("."):r}function Ma(r,e){let t=[],i=!1;const n=(s,o,l)=>{if(Oe(s))if(!o[l])t.push(s);else{let a=o[l];const u=s[a];if(!Oe(u))return;if(l===o.length-1&&(Fe(u)||Sn(u)||ma(u)))t.push(va(u));else if(Xe(u)){i=!0;for(let p=0,v=u.length;p<v;p+=1)n(u[p],o,l+1)}else o.length&&n(u,o,l+1)}};return n(r,Fe(e)?e.split("."):e,0),i?t:t[0]}var X={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Ma,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const Aa=/[^ ]+/g;function Oa(r=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(Aa).length;if(t.has(s))return t.get(s);const o=1/Math.pow(s,.5*r),l=parseFloat(Math.round(o*i)/i);return t.set(s,l),l},clear(){t.clear()}}}class Yr{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=Oa(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Fe(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();Fe(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Oe(e)||Hr(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Oe(o)){if(Xe(o)){let l=[];const a=[{nestedArrIndex:-1,value:o}];for(;a.length;){const{nestedArrIndex:u,value:p}=a.pop();if(Oe(p))if(Fe(p)&&!Hr(p)){let v={v:p,i:u,n:this.norm.get(p)};l.push(v)}else Xe(p)&&p.forEach((v,y)=>{a.push({nestedArrIndex:y,value:v})})}i.$[s]=l}else if(Fe(o)&&!Hr(o)){let l={v:o,n:this.norm.get(o)};i.$[s]=l}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Rn(r,e,{getFn:t=X.getFn,fieldNormWeight:i=X.fieldNormWeight}={}){const n=new Yr({getFn:t,fieldNormWeight:i});return n.setKeys(r.map(Ln)),n.setSources(e),n.create(),n}function Sa(r,{getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){const{keys:i,records:n}=r,s=new Yr({getFn:e,fieldNormWeight:t});return s.setKeys(i),s.setIndexRecords(n),s}function Xt(r,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:n=X.distance,ignoreLocation:s=X.ignoreLocation}={}){const o=e/r.length;if(s)return o;const l=Math.abs(i-t);return n?o+l/n:l?1:o}function Pa(r=[],e=X.minMatchCharLength){let t=[],i=-1,n=-1,s=0;for(let o=r.length;s<o;s+=1){let l=r[s];l&&i===-1?i=s:!l&&i!==-1&&(n=s-1,n-i+1>=e&&t.push([i,n]),i=-1)}return r[s-1]&&s-i>=e&&t.push([i,s-1]),t}const st=32;function Ca(r,e,t,{location:i=X.location,distance:n=X.distance,threshold:s=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,includeMatches:a=X.includeMatches,ignoreLocation:u=X.ignoreLocation}={}){if(e.length>st)throw new Error($a(st));const p=e.length,v=r.length,y=Math.max(0,Math.min(i,v));let x=s,M=y;const j=l>1||a,q=j?Array(v):[];let J;for(;(J=r.indexOf(e,M))>-1;){let A=Xt(e,{currentLocation:J,expectedLocation:y,distance:n,ignoreLocation:u});if(x=Math.min(A,x),M=J+p,j){let C=0;for(;C<p;)q[J+C]=1,C+=1}}M=-1;let f=[],g=1,$=p+v;const S=1<<p-1;for(let A=0;A<p;A+=1){let C=0,L=$;for(;C<L;)Xt(e,{errors:A,currentLocation:y+L,expectedLocation:y,distance:n,ignoreLocation:u})<=x?C=L:$=L,L=Math.floor(($-C)/2+C);$=L;let I=Math.max(1,y-L+1),W=o?v:Math.min(y+L,v)+p,re=Array(W+2);re[W+1]=(1<<A)-1;for(let _=W;_>=I;_-=1){let O=_-1,B=t[r.charAt(O)];if(j&&(q[O]=+!!B),re[_]=(re[_+1]<<1|1)&B,A&&(re[_]|=(f[_+1]|f[_])<<1|1|f[_+1]),re[_]&S&&(g=Xt(e,{errors:A,currentLocation:O,expectedLocation:y,distance:n,ignoreLocation:u}),g<=x)){if(x=g,M=O,M<=y)break;I=Math.max(1,2*y-M)}}if(Xt(e,{errors:A+1,currentLocation:y,expectedLocation:y,distance:n,ignoreLocation:u})>x)break;f=re}const E={isMatch:M>=0,score:Math.max(.001,g)};if(j){const A=Pa(q,l);A.length?a&&(E.indices=A):E.isMatch=!1}return E}function ka(r){let e={};for(let t=0,i=r.length;t<i;t+=1){const n=r.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}class Dn{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:u},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const p=(y,x)=>{this.chunks.push({pattern:y,alphabet:ka(y),startIndex:x})},v=this.pattern.length;if(v>st){let y=0;const x=v%st,M=v-x;for(;y<M;)p(this.pattern.substr(y,st),y),y+=st;if(x){const j=v-st;p(this.pattern.substr(j),j)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:i}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let M={isMatch:!0,score:0};return i&&(M.indices=[[0,e.length-1]]),M}const{location:n,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options;let p=[],v=0,y=!1;this.chunks.forEach(({pattern:M,alphabet:j,startIndex:q})=>{const{isMatch:J,score:f,indices:g}=Ca(e,M,j,{location:n+q,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});J&&(y=!0),v+=f,J&&g&&(p=[...p,...g])});let x={isMatch:y,score:y?v/this.chunks.length:1};return y&&i&&(x.indices=p),x}}class Je{constructor(e){this.pattern=e}static isMultiMatch(e){return In(e,this.multiRegex)}static isSingleMatch(e){return In(e,this.singleRegex)}search(){}}function In(r,e){const t=r.match(e);return t?t[1]:null}class La extends Je{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Ta extends Je{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class Ra extends Je{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Da extends Je{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Ia extends Je{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ja extends Je{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class jn extends Je{constructor(e,{location:t=X.location,threshold:i=X.threshold,distance:n=X.distance,includeMatches:s=X.includeMatches,findAllMatches:o=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:a=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){super(e),this._bitapSearch=new Dn(e,{location:t,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:l,isCaseSensitive:a,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Nn extends Je{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+s,n.push([i,t-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const zr=[La,Nn,Ra,Da,ja,Ia,Ta,jn],Bn=zr.length,Na=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ba="|";function Fa(r,e={}){return r.split(Ba).map(t=>{let i=t.trim().split(Na).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const l=i[s];let a=!1,u=-1;for(;!a&&++u<Bn;){const p=zr[u];let v=p.isMultiMatch(l);v&&(n.push(new p(v,e)),a=!0)}if(!a)for(u=-1;++u<Bn;){const p=zr[u];let v=p.isSingleMatch(l);if(v){n.push(new p(v,e));break}}}return n})}const Ha=new Set([jn.type,Nn.type]);class Ua{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,includeMatches:i=X.includeMatches,minMatchCharLength:n=X.minMatchCharLength,ignoreLocation:s=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:l=X.location,threshold:a=X.threshold,distance:u=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:l,threshold:a,distance:u},this.pattern=t?e:e.toLowerCase(),this.query=Fa(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],l=0;for(let a=0,u=t.length;a<u;a+=1){const p=t[a];o.length=0,s=0;for(let v=0,y=p.length;v<y;v+=1){const x=p[v],{isMatch:M,indices:j,score:q}=x.search(e);if(M){if(s+=1,l+=q,i){const J=x.constructor.type;Ha.has(J)?o=[...o,...j]:o.push(j)}}else{l=0,s=0,o.length=0;break}}if(s){let v={isMatch:!0,score:l/s};return i&&(v.indices=o),v}}return{isMatch:!1,score:1}}}const Xr=[];function Ya(...r){Xr.push(...r)}function Vr(r,e){for(let t=0,i=Xr.length;t<i;t+=1){let n=Xr[t];if(n.condition(r,e))return new n(r,e)}return new Dn(r,e)}const Vt={AND:"$and",OR:"$or"},Wr={PATH:"$path",PATTERN:"$val"},qr=r=>!!(r[Vt.AND]||r[Vt.OR]),za=r=>!!r[Wr.PATH],Xa=r=>!Xe(r)&&Pn(r)&&!qr(r),Fn=r=>({[Vt.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function Hn(r,e,{auto:t=!0}={}){const i=n=>{let s=Object.keys(n);const o=za(n);if(!o&&s.length>1&&!qr(n))return i(Fn(n));if(Xa(n)){const a=o?n[Wr.PATH]:s[0],u=o?n[Wr.PATTERN]:n[a];if(!Fe(u))throw new Error(xa(a));const p={keyId:Ur(a),pattern:u};return t&&(p.searcher=Vr(u,e)),p}let l={children:[],operator:s[0]};return s.forEach(a=>{const u=n[a];Xe(u)&&u.forEach(p=>{l.children.push(i(p))})}),l};return qr(r)||(r=Fn(r)),i(r)}function Va(r,{ignoreFieldNorm:e=X.ignoreFieldNorm}){r.forEach(t=>{let i=1;t.matches.forEach(({key:n,norm:s,score:o})=>{const l=n?n.weight:null;i*=Math.pow(o===0&&l?Number.EPSILON:o,(l||1)*(e?1:s))}),t.score=i})}function Wa(r,e){const t=r.matches;e.matches=[],Oe(t)&&t.forEach(i=>{if(!Oe(i.indices)||!i.indices.length)return;const{indices:n,value:s}=i;let o={indices:n,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function qa(r,e){e.score=r.score}function Ga(r,e,{includeMatches:t=X.includeMatches,includeScore:i=X.includeScore}={}){const n=[];return t&&n.push(Wa),i&&n.push(qa),r.map(s=>{const{idx:o}=s,l={item:e[o],refIndex:o};return n.length&&n.forEach(a=>{a(s,l)}),l})}class yt{constructor(e,t={},i){this.options={...X,...t},this.options.useExtendedSearch,this._keyStore=new Ea(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Yr))throw new Error(ba);this._myIndex=t||Rn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Oe(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];e(s,i)&&(this.removeAt(i),i-=1,n-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;let a=Fe(e)?Fe(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Va(a,{ignoreFieldNorm:l}),s&&a.sort(o),Sn(t)&&t>-1&&(a=a.slice(0,t)),Ga(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const t=Vr(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:l})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:p}=t.searchIn(s);a&&n.push({item:s,idx:o,matches:[{score:u,value:s,norm:l,indices:p}]})}),n}_searchLogical(e){const t=Hn(e,this.options),i=(l,a,u)=>{if(!l.children){const{keyId:v,searcher:y}=l,x=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(a,v),searcher:y});return x&&x.length?[{idx:u,item:a,matches:x}]:[]}const p=[];for(let v=0,y=l.children.length;v<y;v+=1){const x=l.children[v],M=i(x,a,u);if(M.length)p.push(...M);else if(l.operator===Vt.AND)return[]}return p},n=this._myIndex.records,s={},o=[];return n.forEach(({$:l,i:a})=>{if(Oe(l)){let u=i(t,l,a);u.length&&(s[a]||(s[a]={idx:a,item:l,matches:[]},o.push(s[a])),u.forEach(({matches:p})=>{s[a].matches.push(...p)}))}}),o}_searchObjectList(e){const t=Vr(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:l})=>{if(!Oe(o))return;let a=[];i.forEach((u,p)=>{a.push(...this._findMatches({key:u,value:o[p],searcher:t}))}),a.length&&s.push({idx:l,item:o,matches:a})}),s}_findMatches({key:e,value:t,searcher:i}){if(!Oe(t))return[];let n=[];if(Xe(t))t.forEach(({v:s,i:o,n:l})=>{if(!Oe(s))return;const{isMatch:a,score:u,indices:p}=i.searchIn(s);a&&n.push({score:u,key:e,value:s,idx:o,norm:l,indices:p})});else{const{v:s,n:o}=t,{isMatch:l,score:a,indices:u}=i.searchIn(s);l&&n.push({score:a,key:e,value:s,norm:o,indices:u})}return n}}yt.version="6.6.2",yt.createIndex=Rn,yt.parseIndex=Sa,yt.config=X,yt.parseQuery=Hn,Ya(Ua);const Ka=(r,e="highlight",t="title")=>{const i=(s,o,l)=>{const a=o.split(".");let u;for(u=0;u<a.length-1;u++)s=s[a[u]];s[a[u]]=l},n=(s,o=[])=>{let l="",a=0;return o.forEach(u=>{const p=u[1]+1;l+=[s.substring(a,u[0]),`<mark class="${e}">`,s.substring(u[0],p),"</mark>"].join(""),a=p}),l+=s.substring(a),l};return r.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const l={...s};return o.forEach(a=>{a.key===t&&i(l,a.key,n(a.value,a.indices))}),l})};let Un;const Ja=(r,e)=>{Un=new yt(r,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Za=async(r,e,t)=>{const i=Object.entries(e).filter(([l,a])=>a.type==="text"||a.type==="select"||a.type==="multiselect").reduce((l,[a,u])=>{const p="$or",v=[],y=(x,M)=>{const j={};u.type==="text"?j[x]=`${M}`:j[a]=`="${x}"`,v.push(j)};return Object.entries(u.state).filter(([x,M])=>M).forEach(([x,M])=>y(x,M)),v.length>0&&l.push({[p]:v}),l},[]);let n;if(!(i.length>0)&&t.matchAllWhenEmpty!==!1)n=r;else{const l={$and:[...i]},a=Un.search(l);n=t.enableHighlighting?Ka(a,"highlight",t.titleProperty):a.map(u=>u.item)}const s=Object.entries(e).filter(([l,a])=>a.type==="range").reduce((l,[a,u])=>(l[a]={min:u.state.min,max:u.state.max,format:u.format},l),{});if(Object.keys(s).length>0){const l=[];for(let a=0;a<n.length;a++){const u={};for(const[p,v]of Object.entries(s)){const y=x=>v.format==="date"?Bt(x).unix():x;n[a].hasOwnProperty(p)?Array.isArray(n[a][p])?u[p]=s[p].min<=y(n[a][p][1])&&y(n[a][p][0])<=s[p].max:y(n[a][p])>=s[p].min&&y(n[a][p])<=s[p].max?u[p]=!0:u[p]=!1:u[p]=!0}Object.values(u).every(p=>!!p)&&l.push(n[a])}n=[...l]}const o=Object.entries(e).filter(([l,a])=>a.type==="spatial").reduce((l,[a,u])=>(l[a]={geometry:u.state.geometry,mode:u.state.mode},l),{});if(Object.values(o).map(l=>l.geometry).filter(l=>!!l).length>0){const l=[];for(let a=0;a<n.length;a++){const u={};for(const p of Object.keys(o)){const v=o[p].mode||"within";n[a].hasOwnProperty(p)&&(v==="within"?ha(n[a][p],o[p].geometry):ua(n[a][p],o[p].geometry))?u[p]=!0:u[p]=!1}Object.values(u).every(p=>!!p)&&l.push(n[a])}n=[...l]}return n},Qa=async(r,e,t)=>(await(await fetch(`${t.externalFilter(r,e)}`)).json()).features;var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Ve=(r,e,t,i)=>{for(var n=i>1?void 0:i?tl(e,t):e,s=r.length-1,o;s>=0;s--)(o=r[s])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&el(e,t,n),n};class Gr{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title",this.expandMultipleFilters=!0,this.expandMultipleResults=!0}}ye.EOxItemFilter=class extends ks{constructor(){super(...arguments),this._resultAggregation=[],this.filters={},this.items=[],this._config=new Gr,this.apply=e=>{this.items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Bt(o).unix():parseInt(o);this.items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const l=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,l[0]):l[0],n.max=n.max!==void 0?Math.max(n.max,l[1]):l[1]}else{const l=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,l):l,n.max=n.max!==void 0?Math.max(n.max,l):l}return}Array.isArray(o[i.key])?o[i.key].forEach(l=>{n[l]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!0},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this.items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this.items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const t=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{t.includes(n)||t.push(n)}):(i.type==="select"||i.type==="multiselect")&&(t.includes(i.key)||t.push(i.key))}),Ja(this.items,{keys:t,...this._config.fuseConfig}),this.search()}}set config(e){const t=this._config;this._config={...new Gr,...e},this.requestUpdate("config",t)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await Qa(this.items,this.filters,this._config):e=await Za(this.items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,t){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(l=>this.filters[this._config.aggregateResults].state[l])),(s!=null&&s.length?s.includes(t):!0)&&Array.isArray(n)?n.includes(t):n===t})}sortResults(e){return[...e].sort((t,i)=>t[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}toggleAccordion(e){let t;if(e.detail?t=e.detail.target:t=e.target,t.classList.contains("details-filter")){if(!t.open||this.config.expandMultipleFilters)return;this.shadowRoot.querySelectorAll("eox-itemfilter-expandcontainer").forEach(i=>{const n=i.shadowRoot.querySelector(".details-filter");n&&n!==t&&n.removeAttribute("open")})}else{if(!t.open||this.config.expandMultipleResults)return;this.shadowRoot.querySelectorAll("details").forEach(i=>{i!==t&&i.removeAttribute("open")})}}render(){return he`
721
+ `})}};ir([J()],$i.prototype,"filterObject",2),$i=ir([Pe("eox-itemfilter-spatial")],$i);let _r=class extends we{render(){return X`<eox-map part="map" style="height: 400px"></eox-map>`}firstUpdated(){this.setup()}setup(){const t=[{type:"Vector",id:"draw",source:{type:"Vector",...this.geometry&&{format:"GeoJSON"},...this.geometry&&{url:this.createFeatureUrl(this.geometry)}},zIndex:1},{type:"Tile",source:{type:"XYZ",url:"https://s2maps-tiles.eu/wmts/1.0.0/osm_3857/default/g/{z}/{y}/{x}.jpg",attribution:"{ OSM: Data &copy; OpenStreetMap contributors and others, Rendering &copy; EOX }"}}];this.eoxMap=this.renderRoot.querySelector("eox-map"),setTimeout(()=>{this.eoxMap.setLayers(t),this.eoxMap.addDraw("draw",{id:"drawInteraction",type:"Polygon"});const e=r=>{const i=new CustomEvent("filter",{detail:{geometry:{type:"Polygon",coordinates:r.getGeometry().clone().transform("EPSG:3857","EPSG:4326").getCoordinates()}}});this.dispatchEvent(i)};this.eoxMap.interactions.drawInteraction.on("drawend",r=>{e(r.feature),this.eoxMap.removeInteraction("drawInteraction")}),this.eoxMap.interactions.drawInteraction_modify.on("modifyend",r=>{e(r.features.getArray()[0])})},1e3)}createFeatureUrl(t){return`data:text/json,${encodeURIComponent(JSON.stringify({type:"FeatureCollection",features:[{type:"Feature",properties:null,geometry:t}]}))}`}reset(){var e;const t=this.eoxMap.getLayerById("draw").getSource();((e=t.getFeatures())==null?void 0:e.length)>0&&(t.clear(),this.eoxMap.removeInteraction("drawInteraction_modify"),this.setup())}};ir([J()],_r.prototype,"geometry",2),ir([Ue()],_r.prototype,"eoxMap",2),_r=ir([Pe("eox-itemfilter-spatial-filter")],_r);var Ba=Object.defineProperty,ja=Object.getOwnPropertyDescriptor,$s=(t,e,r,i)=>{for(var n=i>1?void 0:i?ja(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Ba(e,r,n),n};let _i=class extends we{constructor(){super(...arguments),this.inputHandler=()=>{const t=this.renderRoot.querySelector("input[type='text']");this.filterObject.keys.forEach(e=>{this.filterObject.state[e]=t.value}),this.filterObject.dirty=!0,this.filterObject.stringifiedState=t.value,this.dispatchEvent(new CustomEvent("filter"))},this.debouncedInputHandler=Qn(this.inputHandler,500,{leading:!0})}reset(){const t=this.renderRoot.querySelector("input[type='text']");t.value="",Ct(this.filterObject),this.requestUpdate()}createRenderRoot(){return this}render(){return fe(this.filterObject,()=>X`
722
+ <style>
723
+ input {
724
+ height: 100%;
725
+ }
726
+ </style>
727
+ <input
728
+ type="text"
729
+ placeholder="Type something..."
730
+ data-cy="search"
731
+ part="input-search"
732
+ value="${Object.values(this.filterObject.state)[0]}"
733
+ @input="${this.debouncedInputHandler}"
734
+ @click=${t=>{t.stopPropagation()}}
735
+ />
736
+ `)}};$s([J()],_i.prototype,"filterObject",2),_i=$s([Pe("eox-itemfilter-text")],_i);var Fa=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,xt=(t,e,r,i)=>{for(var n=i>1?void 0:i?Ha(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Fa(e,r,n),n};let ut=class extends we{constructor(){super(...arguments),this.idProperty="id",this.items=[],this.titleProperty="title",this.unstyled=!1,this.inputText="",this.replaceInput=null,this._clickOutsideListener=null}_handleKeyboard(t){if(this.clientHeight!==0&&t==="Escape"){const e=this.items.find(r=>r._inProgress);e&&(delete e._inProgress,this.requestUpdate(),this.inputText="",this.renderRoot.querySelector("input").value="",this.renderRoot.querySelector("input").focus()),this.renderRoot.querySelector("[slot=content]").classList.remove("hidden");return}}_handleReset(t){t.forEach(e=>{Ct(e),delete e._inProgress,delete e.stringifiedState}),this.requestUpdate(),this.dispatchEvent(new CustomEvent("filter"))}connectedCallback(){super.connectedCallback(),this._keyboardEventListener=this.getRootNode().addEventListener("keydown",t=>{["Escape"].includes(t.code)&&this._handleKeyboard(t.code)}),this._clickOutsideListener=window.addEventListener("click",()=>{this.items.forEach(t=>{delete t._inProgress}),this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",this._keyboardEventListener),window.removeEventListener("click",this._clickOutsideListener)}render(){return X`
737
+ <style>
738
+ :host,
739
+ .container {
740
+ display: flex;
741
+ }
742
+ ${this.unstyled?se:X`
743
+ ${ri} :host { position: relative; } .container { width: 100%;
744
+ position: relative; border: 1px solid #00417066; border-radius:
745
+ 4px; height: 24px; padding: 5px; flex: 1; justify-content:
746
+ space-between; cursor: text; transition: all 0.2s ease-in-out;
747
+ overflow-x: auto; } .container:hover { border: 1px solid #004170;
748
+ } .input-container { display: flex; flex: 1; align-items: center;
749
+ } input, input:focus { height: 100%; border: none; outline: none;
750
+ } .button-container { display: flex; align-items: center;
751
+ justify-content: center; position: absolute; right: 1px; top: 5px;
752
+ height: calc(100% - 10px); width: 34px; background: white; }
753
+ button.icon { color: #004170; height: 24px; font-size: large;
754
+ width: unset; } .container::-webkit-scrollbar { height: 2px; }
755
+ .container::-webkit-scrollbar-thumb { background: lightgrey;
756
+ border-radius: 2px; } .hidden {height: 0; padding: 0; border:
757
+ none;} .hidden:hover {border: none}
758
+ `}
759
+ </style>
760
+ <div
761
+ class="container"
762
+ part="container"
763
+ @click=${t=>{var e;t.stopPropagation(),(e=this.renderRoot.querySelector("input[type=text]"))==null||e.focus()}}
764
+ >
765
+ <eox-itemfilter-chips
766
+ .items=${this.items.filter(t=>t._inProgress||t.stringifiedState)}
767
+ .titleProperty=${this.titleProperty}
768
+ .unstyled=${this.unstyled}
769
+ @items-selected=${t=>{this.items.forEach(e=>{t.detail.find(r=>r.id===e.id)||this._handleReset([e])})}}
770
+ @click=${t=>{t.stopPropagation()}}
771
+ ></eox-itemfilter-chips>
772
+ <div class="input-container">
773
+ <eox-dropdown .parent=${this} .unstyled=${this.unstyled}>
774
+ <input
775
+ slot="trigger"
776
+ type="text"
777
+ placeholder="Type something..."
778
+ @focus=${()=>{this.inputText="",this.requestUpdate()}}
779
+ @input=${t=>{if(this.inputText=t.target.value.toLowerCase(),this.replaceInput){const e=this.renderRoot.querySelector("[data-filter]").renderRoot.querySelector("input")||this.renderRoot.querySelector("[data-filter]").renderRoot.querySelector("eox-autocomplete").renderRoot.querySelector("input");e&&(e.value=this.inputText,e.dispatchEvent(new Event("input")))}}}
780
+ />
781
+ <div slot="content">
782
+ ${fe(!this.items.find(t=>t._inProgress),()=>X`
783
+ <eox-selectionlist
784
+ .filter=${this.inputText}
785
+ .idProperty=${this.idProperty}
786
+ .titleProperty=${this.titleProperty}
787
+ .items=${this.items.filter(t=>!t.stringifiedState)}
788
+ .multiple=${!1}
789
+ .selectedItems=${this.items.filter(t=>t.stringifiedState)}
790
+ .unstyled=${this.unstyled}
791
+ @click=${t=>{t.stopPropagation()}}
792
+ @items-highlighted=${t=>{}}
793
+ @items-selected=${t=>{const e=t.detail;e.length>0&&(e[e.length-1]._inProgress=!0,this.requestUpdate());const r=this.items.find(i=>i._inProgress);(r&&r.type==="text"||r.type==="multiselect"||r.type==="select")&&(this.replaceInput=!0),this.replaceInput&&(setTimeout(()=>{if(r.type==="text")this.renderRoot.querySelector("[slot=content]").classList.add("hidden");else if(r.type==="multiselect"||r.type==="select"){const i=this.renderRoot.querySelector("[data-filter]").renderRoot.querySelector("eox-autocomplete");i.renderRoot.querySelector("eox-dropdown").open=!0,i.renderRoot.querySelector(".container").classList.add("hidden")}}),this.renderRoot.querySelector("input").select(),this.renderRoot.querySelector("input").focus())}}
794
+ >
795
+ </eox-selectionlist>
796
+ `)}
797
+ ${fe(this.items.find(t=>t._inProgress),()=>ur`
798
+ <eox-itemfilter-${Mt(this.items.find(t=>t._inProgress).type)}
799
+ data-filter=${this.items.find(t=>t._inProgress).id}
800
+ slot="dropdown"
801
+ .filterObject=${this.items.find(t=>t._inProgress)}
802
+ .unstyled=${this.unstyled}
803
+ .inline=${!0}
804
+ @filter=${t=>{this.dispatchEvent(new CustomEvent("filter"))}}
805
+ @click=${t=>{t.stopPropagation()}}
806
+ ></eox-itemfilter-${Mt(this.items.find(t=>t._inProgress).type)}>
807
+ `)}
808
+ </div>
809
+ </eox-dropdown>
810
+ </div>
811
+ </div>
812
+ ${fe(this.items.filter(t=>t.stringifiedState||t._inProgress).length>0,()=>X`
813
+ <div class="button-container">
814
+ <button
815
+ class="icon"
816
+ @click=${()=>{this._handleReset(this.items.filter(t=>t.stringifiedState||t._inProgress))}}
817
+ >
818
+ ✕
819
+ </button>
820
+ </div>
821
+ `)}
822
+ `}};xt([J()],ut.prototype,"idProperty",2),xt([J()],ut.prototype,"items",2),xt([J()],ut.prototype,"titleProperty",2),xt([J()],ut.prototype,"unstyled",2),xt([Ue()],ut.prototype,"inputText",2),xt([Ue()],ut.prototype,"replaceInput",2),ut=xt([Pe("eox-itemfilter-inline")],ut);function it(t){return Array.isArray?Array.isArray(t):As(t)==="[object Array]"}const qa=1/0;function Ua(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-qa?"-0":e}function za(t){return t==null?"":Ua(t)}function Ke(t){return typeof t=="string"}function _s(t){return typeof t=="number"}function Ya(t){return t===!0||t===!1||Va(t)&&As(t)=="[object Boolean]"}function Es(t){return typeof t=="object"}function Va(t){return Es(t)&&t!==null}function Le(t){return t!=null}function Ei(t){return!t.trim().length}function As(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Cu="Extended search is not available",Xa="Incorrect 'index' type",Wa=t=>`Invalid value for key ${t}`,Ka=t=>`Pattern length exceeds max of ${t}.`,Ga=t=>`Missing ${t} property in key`,Ja=t=>`Property 'weight' in key '${t}' must be a positive integer`,Ss=Object.prototype.hasOwnProperty;class Za{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(i=>{let n=Ms(i);r+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,r+=n.weight}),this._keys.forEach(i=>{i.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ms(t){let e=null,r=null,i=null,n=1,s=null;if(Ke(t)||it(t))i=t,e=Os(t),r=Ai(t);else{if(!Ss.call(t,"name"))throw new Error(Ga("name"));const o=t.name;if(i=o,Ss.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Ja(o));e=Os(o),r=Ai(o),s=t.getFn}return{path:e,id:r,weight:n,src:i,getFn:s}}function Os(t){return it(t)?t:t.split(".")}function Ai(t){return it(t)?t.join("."):t}function Qa(t,e){let r=[],i=!1;const n=(s,o,a)=>{if(Le(s))if(!o[a])r.push(s);else{let l=o[a];const c=s[l];if(!Le(c))return;if(a===o.length-1&&(Ke(c)||_s(c)||Ya(c)))r.push(za(c));else if(it(c)){i=!0;for(let f=0,m=c.length;f<m;f+=1)n(c[f],o,a+1)}else o.length&&n(c,o,a+1)}};return n(t,Ke(e)?e.split("."):e,0),i?r:r[0]}var W={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Qa,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const ec=/[^ ]+/g;function tc(t=1,e=3){const r=new Map,i=Math.pow(10,e);return{get(n){const s=n.match(ec).length;if(r.has(s))return r.get(s);const o=1/Math.pow(s,.5*t),a=parseFloat(Math.round(o*i)/i);return r.set(s,a),a},clear(){r.clear()}}}class Si{constructor({getFn:e=W.getFn,fieldNormWeight:r=W.fieldNormWeight}={}){this.norm=tc(r,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((r,i)=>{this._keysMap[r.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ke(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();Ke(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,i=this.size();r<i;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(e,r){return e[this._keysMap[r]]}size(){return this.records.length}_addString(e,r){if(!Le(e)||Ei(e))return;let i={v:e,i:r,n:this.norm.get(e)};this.records.push(i)}_addObject(e,r){let i={i:r,$:{}};this.keys.forEach((n,s)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(Le(o)){if(it(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:f}=l.pop();if(Le(f))if(Ke(f)&&!Ei(f)){let m={v:f,i:c,n:this.norm.get(f)};a.push(m)}else it(f)&&f.forEach((m,y)=>{l.push({nestedArrIndex:y,value:m})})}i.$[s]=a}else if(Ke(o)&&!Ei(o)){let a={v:o,n:this.norm.get(o)};i.$[s]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Ps(t,e,{getFn:r=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){const n=new Si({getFn:r,fieldNormWeight:i});return n.setKeys(t.map(Ms)),n.setSources(e),n.create(),n}function rc(t,{getFn:e=W.getFn,fieldNormWeight:r=W.fieldNormWeight}={}){const{keys:i,records:n}=t,s=new Si({getFn:e,fieldNormWeight:r});return s.setKeys(i),s.setIndexRecords(n),s}function Er(t,{errors:e=0,currentLocation:r=0,expectedLocation:i=0,distance:n=W.distance,ignoreLocation:s=W.ignoreLocation}={}){const o=e/t.length;if(s)return o;const a=Math.abs(i-r);return n?o+a/n:a?1:o}function ic(t=[],e=W.minMatchCharLength){let r=[],i=-1,n=-1,s=0;for(let o=t.length;s<o;s+=1){let a=t[s];a&&i===-1?i=s:!a&&i!==-1&&(n=s-1,n-i+1>=e&&r.push([i,n]),i=-1)}return t[s-1]&&s-i>=e&&r.push([i,s-1]),r}const wt=32;function nc(t,e,r,{location:i=W.location,distance:n=W.distance,threshold:s=W.threshold,findAllMatches:o=W.findAllMatches,minMatchCharLength:a=W.minMatchCharLength,includeMatches:l=W.includeMatches,ignoreLocation:c=W.ignoreLocation}={}){if(e.length>wt)throw new Error(Ka(wt));const f=e.length,m=t.length,y=Math.max(0,Math.min(i,m));let v=s,w=y;const O=a>1||l,q=O?Array(m):[];let j;for(;(j=t.indexOf(e,w))>-1;){let M=Er(e,{currentLocation:j,expectedLocation:y,distance:n,ignoreLocation:c});if(v=Math.min(M,v),w=j+f,O){let L=0;for(;L<f;)q[j+L]=1,L+=1}}w=-1;let p=[],g=1,$=f+m;const S=1<<f-1;for(let M=0;M<f;M+=1){let L=0,R=$;for(;L<R;)Er(e,{errors:M,currentLocation:y+R,expectedLocation:y,distance:n,ignoreLocation:c})<=v?L=R:$=R,R=Math.floor(($-L)/2+L);$=R;let N=Math.max(1,y-R+1),G=o?m:Math.min(y+R,m)+f,ne=Array(G+2);ne[G+1]=(1<<M)-1;for(let E=G;E>=N;E-=1){let P=E-1,F=r[t.charAt(P)];if(O&&(q[P]=+!!F),ne[E]=(ne[E+1]<<1|1)&F,M&&(ne[E]|=(p[E+1]|p[E])<<1|1|p[E+1]),ne[E]&S&&(g=Er(e,{errors:M,currentLocation:P,expectedLocation:y,distance:n,ignoreLocation:c}),g<=v)){if(v=g,w=P,w<=y)break;N=Math.max(1,2*y-w)}}if(Er(e,{errors:M+1,currentLocation:y,expectedLocation:y,distance:n,ignoreLocation:c})>v)break;p=ne}const A={isMatch:w>=0,score:Math.max(.001,g)};if(O){const M=ic(q,a);M.length?l&&(A.indices=M):A.isMatch=!1}return A}function sc(t){let e={};for(let r=0,i=t.length;r<i;r+=1){const n=t.charAt(r);e[n]=(e[n]||0)|1<<i-r-1}return e}class Cs{constructor(e,{location:r=W.location,threshold:i=W.threshold,distance:n=W.distance,includeMatches:s=W.includeMatches,findAllMatches:o=W.findAllMatches,minMatchCharLength:a=W.minMatchCharLength,isCaseSensitive:l=W.isCaseSensitive,ignoreLocation:c=W.ignoreLocation}={}){if(this.options={location:r,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c},this.pattern=l?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(y,v)=>{this.chunks.push({pattern:y,alphabet:sc(y),startIndex:v})},m=this.pattern.length;if(m>wt){let y=0;const v=m%wt,w=m-v;for(;y<w;)f(this.pattern.substr(y,wt),y),y+=wt;if(v){const O=m-wt;f(this.pattern.substr(O),O)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:r,includeMatches:i}=this.options;if(r||(e=e.toLowerCase()),this.pattern===e){let w={isMatch:!0,score:0};return i&&(w.indices=[[0,e.length-1]]),w}const{location:n,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options;let f=[],m=0,y=!1;this.chunks.forEach(({pattern:w,alphabet:O,startIndex:q})=>{const{isMatch:j,score:p,indices:g}=nc(e,w,O,{location:n+q,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});j&&(y=!0),m+=p,j&&g&&(f=[...f,...g])});let v={isMatch:y,score:y?m/this.chunks.length:1};return y&&i&&(v.indices=f),v}}class ht{constructor(e){this.pattern=e}static isMultiMatch(e){return Ls(e,this.multiRegex)}static isSingleMatch(e){return Ls(e,this.singleRegex)}search(){}}function Ls(t,e){const r=t.match(e);return r?r[1]:null}class oc extends ht{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class lc extends ht{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class ac extends ht{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class cc extends ht{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class uc extends ht{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class hc extends ht{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class ks extends ht{constructor(e,{location:r=W.location,threshold:i=W.threshold,distance:n=W.distance,includeMatches:s=W.includeMatches,findAllMatches:o=W.findAllMatches,minMatchCharLength:a=W.minMatchCharLength,isCaseSensitive:l=W.isCaseSensitive,ignoreLocation:c=W.ignoreLocation}={}){super(e),this._bitapSearch=new Cs(e,{location:r,threshold:i,distance:n,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Rs extends ht{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,i;const n=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,r))>-1;)r=i+s,n.push([i,r-1]);const o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}}const Mi=[oc,Rs,ac,cc,hc,uc,lc,ks],Ts=Mi.length,dc=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,fc="|";function pc(t,e={}){return t.split(fc).map(r=>{let i=r.trim().split(dc).filter(s=>s&&!!s.trim()),n=[];for(let s=0,o=i.length;s<o;s+=1){const a=i[s];let l=!1,c=-1;for(;!l&&++c<Ts;){const f=Mi[c];let m=f.isMultiMatch(a);m&&(n.push(new f(m,e)),l=!0)}if(!l)for(c=-1;++c<Ts;){const f=Mi[c];let m=f.isSingleMatch(a);if(m){n.push(new f(m,e));break}}}return n})}const gc=new Set([ks.type,Rs.type]);class mc{constructor(e,{isCaseSensitive:r=W.isCaseSensitive,includeMatches:i=W.includeMatches,minMatchCharLength:n=W.minMatchCharLength,ignoreLocation:s=W.ignoreLocation,findAllMatches:o=W.findAllMatches,location:a=W.location,threshold:l=W.threshold,distance:c=W.distance}={}){this.query=null,this.options={isCaseSensitive:r,includeMatches:i,minMatchCharLength:n,findAllMatches:o,ignoreLocation:s,location:a,threshold:l,distance:c},this.pattern=r?e:e.toLowerCase(),this.query=pc(this.pattern,this.options)}static condition(e,r){return r.useExtendedSearch}searchIn(e){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,o=[],a=0;for(let l=0,c=r.length;l<c;l+=1){const f=r[l];o.length=0,s=0;for(let m=0,y=f.length;m<y;m+=1){const v=f[m],{isMatch:w,indices:O,score:q}=v.search(e);if(w){if(s+=1,a+=q,i){const j=v.constructor.type;gc.has(j)?o=[...o,...O]:o.push(O)}}else{a=0,s=0,o.length=0;break}}if(s){let m={isMatch:!0,score:a/s};return i&&(m.indices=o),m}}return{isMatch:!1,score:1}}}const Oi=[];function vc(...t){Oi.push(...t)}function Pi(t,e){for(let r=0,i=Oi.length;r<i;r+=1){let n=Oi[r];if(n.condition(t,e))return new n(t,e)}return new Cs(t,e)}const Ar={AND:"$and",OR:"$or"},Ci={PATH:"$path",PATTERN:"$val"},Li=t=>!!(t[Ar.AND]||t[Ar.OR]),yc=t=>!!t[Ci.PATH],bc=t=>!it(t)&&Es(t)&&!Li(t),Is=t=>({[Ar.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Ds(t,e,{auto:r=!0}={}){const i=n=>{let s=Object.keys(n);const o=yc(n);if(!o&&s.length>1&&!Li(n))return i(Is(n));if(bc(n)){const l=o?n[Ci.PATH]:s[0],c=o?n[Ci.PATTERN]:n[l];if(!Ke(c))throw new Error(Wa(l));const f={keyId:Ai(l),pattern:c};return r&&(f.searcher=Pi(c,e)),f}let a={children:[],operator:s[0]};return s.forEach(l=>{const c=n[l];it(c)&&c.forEach(f=>{a.children.push(i(f))})}),a};return Li(t)||(t=Is(t)),i(t)}function xc(t,{ignoreFieldNorm:e=W.ignoreFieldNorm}){t.forEach(r=>{let i=1;r.matches.forEach(({key:n,norm:s,score:o})=>{const a=n?n.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:s))}),r.score=i})}function wc(t,e){const r=t.matches;e.matches=[],Le(r)&&r.forEach(i=>{if(!Le(i.indices)||!i.indices.length)return;const{indices:n,value:s}=i;let o={indices:n,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function $c(t,e){e.score=t.score}function _c(t,e,{includeMatches:r=W.includeMatches,includeScore:i=W.includeScore}={}){const n=[];return r&&n.push(wc),i&&n.push($c),t.map(s=>{const{idx:o}=s,a={item:e[o],refIndex:o};return n.length&&n.forEach(l=>{l(s,a)}),a})}class Bt{constructor(e,r={},i){this.options={...W,...r},this.options.useExtendedSearch,this._keyStore=new Za(this.options.keys),this.setCollection(e,i)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof Si))throw new Error(Xa);this._myIndex=r||Ps(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Le(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];e(s,i)&&(this.removeAt(i),i-=1,n-=1,r.push(s))}return r}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:r=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:o,ignoreFieldNorm:a}=this.options;let l=Ke(e)?Ke(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return xc(l,{ignoreFieldNorm:a}),s&&l.sort(o),_s(r)&&r>-1&&(l=l.slice(0,r)),_c(l,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const r=Pi(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:s,i:o,n:a})=>{if(!Le(s))return;const{isMatch:l,score:c,indices:f}=r.searchIn(s);l&&n.push({item:s,idx:o,matches:[{score:c,value:s,norm:a,indices:f}]})}),n}_searchLogical(e){const r=Ds(e,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:m,searcher:y}=a,v=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(l,m),searcher:y});return v&&v.length?[{idx:c,item:l,matches:v}]:[]}const f=[];for(let m=0,y=a.children.length;m<y;m+=1){const v=a.children[m],w=i(v,l,c);if(w.length)f.push(...w);else if(a.operator===Ar.AND)return[]}return f},n=this._myIndex.records,s={},o=[];return n.forEach(({$:a,i:l})=>{if(Le(a)){let c=i(r,a,l);c.length&&(s[l]||(s[l]={idx:l,item:a,matches:[]},o.push(s[l])),c.forEach(({matches:f})=>{s[l].matches.push(...f)}))}}),o}_searchObjectList(e){const r=Pi(e,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:o,i:a})=>{if(!Le(o))return;let l=[];i.forEach((c,f)=>{l.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),l.length&&s.push({idx:a,item:o,matches:l})}),s}_findMatches({key:e,value:r,searcher:i}){if(!Le(r))return[];let n=[];if(it(r))r.forEach(({v:s,i:o,n:a})=>{if(!Le(s))return;const{isMatch:l,score:c,indices:f}=i.searchIn(s);l&&n.push({score:c,key:e,value:s,idx:o,norm:a,indices:f})});else{const{v:s,n:o}=r,{isMatch:a,score:l,indices:c}=i.searchIn(s);a&&n.push({score:l,key:e,value:s,norm:o,indices:c})}return n}}Bt.version="6.6.2",Bt.createIndex=Ps,Bt.parseIndex=rc,Bt.config=W,Bt.parseQuery=Ds,vc(mc);const Ec=(t,e="highlight",r="title")=>{const i=(s,o,a)=>{const l=o.split(".");let c;for(c=0;c<l.length-1;c++)s=s[l[c]];s[l[c]]=a},n=(s,o=[])=>{let a="",l=0;return o.forEach(c=>{const f=c[1]+1;a+=[s.substring(l,c[0]),`<mark class="${e}">`,s.substring(c[0],f),"</mark>"].join(""),l=f}),a+=s.substring(l),a};return t.filter(({matches:s})=>s&&s.length).map(({item:s,matches:o})=>{const a={...s};return o.forEach(l=>{l.key===r&&i(a,l.key,n(l.value,l.indices))}),a})};let Ns;const Ac=(t,e)=>{Ns=new Bt(t,{threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...e})},Sc=async(t,e,r)=>{const i=Object.entries(e).filter(([a,l])=>l.type==="text"||l.type==="select"||l.type==="multiselect").reduce((a,[l,c])=>{const f="$or",m=[],y=(v,w)=>{const O={};c.type==="text"?O[v]=`${w}`:O[l]=`="${v}"`,m.push(O)};return Object.entries(c.state).filter(([v,w])=>w).forEach(([v,w])=>y(v,w)),m.length>0&&a.push({[f]:m}),a},[]);let n;if(!(i.length>0)&&r.matchAllWhenEmpty!==!1)n=t;else{const a={$and:[...i]},l=Ns.search(a);n=r.enableHighlighting?Ec(l,"highlight",r.titleProperty):l.map(c=>c.item)}const s=Object.entries(e).filter(([a,l])=>l.type==="range").reduce((a,[l,c])=>(a[l]={min:c.state.min,max:c.state.max,format:c.format},a),{});if(Object.keys(s).length>0){const a=[];for(let l=0;l<n.length;l++){const c={};for(const[f,m]of Object.entries(s)){const y=v=>m.format==="date"?Pt(v).unix():v;n[l].hasOwnProperty(f)?Array.isArray(n[l][f])?c[f]=s[f].min<=y(n[l][f][1])&&y(n[l][f][0])<=s[f].max:y(n[l][f])>=s[f].min&&y(n[l][f])<=s[f].max?c[f]=!0:c[f]=!1:c[f]=!0}Object.values(c).every(f=>!!f)&&a.push(n[l])}n=[...a]}const o=Object.entries(e).filter(([a,l])=>l.type==="spatial").reduce((a,[l,c])=>(a[l]={geometry:c.state.geometry,mode:c.state.mode},a),{});if(Object.values(o).map(a=>a.geometry).filter(a=>!!a).length>0){const a=[];for(let l=0;l<n.length;l++){const c={};for(const f of Object.keys(o)){const m=o[f].mode||"within";n[l].hasOwnProperty(f)&&(m==="within"?Na(n[l][f],o[f].geometry):Da(n[l][f],o[f].geometry))?c[f]=!0:c[f]=!1}Object.values(c).every(f=>!!f)&&a.push(n[l])}n=[...a]}return n},Mc=async(t,e,r)=>(await(await fetch(`${r.externalFilter(t,e)}`)).json()).features;var Oc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,nt=(t,e,r,i)=>{for(var n=i>1?void 0:i?Pc(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(i?o(e,r,n):o(n))||n);return i&&n&&Oc(e,r,n),n};class ki{constructor(){this.aggregateResults=void 0,this.enableHighlighting=!1,this.filterProperties=[],this.inlineMode=!1,this.matchAllWhenEmpty=!0,this.onFilter=()=>{},this.onSelect=()=>{},this.showResults=!0,this.titleProperty="title",this.expandMultipleFilters=!0,this.expandMultipleResults=!0}}xe.EOxItemFilter=class extends So{constructor(){super(...arguments),this._resultAggregation=[],this.filters={},this.items=[],this._config=new ki,this.apply=e=>{this.items=e.map((i,n)=>({id:`item-${n}`,...i})),this._config.filterProperties.length&&this._config.filterProperties.forEach(i=>{const n={},s=o=>i.format==="date"?Pt(o).unix():parseInt(o);this.items.forEach(o=>{if(i.type==="range"){if(Array.isArray(o[i.key])){const a=[s(o[i.key][0]),s(o[i.key][1])];n.min=n.min!==void 0?Math.min(n.min,a[0]):a[0],n.max=n.max!==void 0?Math.max(n.max,a[1]):a[1]}else{const a=s(o[i.key]);n.min=n.min!==void 0?Math.min(n.min,a):a,n.max=n.max!==void 0?Math.max(n.max,a):a}return}Array.isArray(o[i.key])?o[i.key].forEach(a=>{n[a]=void 0}):i.type==="spatial"?(n.geometry=void 0,n.mode=i.mode||"intersects"):n[o[i.key]]=void 0}),this.filters[i.key||i.keys.join("|")]={...i,type:i.type||"multiselect",state:{...n,...i.state},...i.state&&{dirty:!0},...i.type==="range"&&{min:n.min,max:n.max,format:i.format}}}),this._config.matchAllWhenEmpty!==!1&&(this.results=this.sortResults(this.items),this.requestUpdate()),this._config.aggregateResults&&(this._resultAggregation=[...new Set(this.items.reduce((i,n)=>i.concat(n[this._config.aggregateResults]),[]))].sort((i,n)=>i.localeCompare(n)));const r=[];Object.values(this.filters).forEach(i=>{i.type==="text"?i.keys.forEach(n=>{r.includes(n)||r.push(n)}):(i.type==="select"||i.type==="multiselect")&&(r.includes(i.key)||r.push(i.key))}),Ac(this.items,{keys:r,...this._config.fuseConfig}),this.search()}}set config(e){const r=this._config;this._config={...new ki,...e},this.requestUpdate("config",r)}get config(){return this._config}async search(){let e;this.config.externalFilter?e=await Mc(this.items,this.filters,this._config):e=await Sc(this.items,this.filters,this._config),this.results=this.sortResults(e),this._config.onFilter(this.results,this.filters)}aggregateResults(e,r){return e.filter(i=>{const n=i[this._config.aggregateResults];let s;return this.filters[this._config.aggregateResults]&&(s=Object.keys(this.filters[this._config.aggregateResults]).filter(a=>this.filters[this._config.aggregateResults].state[a])),(s!=null&&s.length?s.includes(r):!0)&&Array.isArray(n)?n.includes(r):n===r})}sortResults(e){return[...e].sort((r,i)=>r[this._config.titleProperty].localeCompare(i[this._config.titleProperty]))}resetFilters(){this.renderRoot.querySelectorAll("[data-type='filter']").forEach(e=>{e.reset()}),this.search()}toggleAccordion(e){let r;if(e.detail?r=e.detail.target:r=e.target,r.classList.contains("details-filter")){if(!r.open||this.config.expandMultipleFilters)return;this.shadowRoot.querySelectorAll("eox-itemfilter-expandcontainer").forEach(i=>{const n=i.shadowRoot.querySelector(".details-filter");n&&n!==r&&n.removeAttribute("open")})}else{if(!r.open||this.config.expandMultipleResults)return;this.shadowRoot.querySelectorAll("details").forEach(i=>{i!==r&&i.removeAttribute("open")})}}render(){return X`
566
823
  <style>
567
- ${Ji}
568
- ${!this.unstyled&&Zi}
824
+ ${ti}
825
+ ${!this.unstyled&&ii}
569
826
  ${this.styleOverride}
570
827
  </style>
571
828
  <form
572
829
  id="itemfilter"
573
830
  @submit="${e=>e.preventDefault()}"
574
831
  >
575
- ${ht(this._config.filterProperties.length,()=>he`
576
- <section class="${this.config.inlineMode?"inline":ne}">
577
- ${ht(!this.config.inlineMode,()=>he`
578
- <slot name="filterstitle"
579
- ><h4 style="margin-top: 8px">Filters</h4></slot
580
- >
581
- `)}
582
- <ul id="filters">
583
- ${dt(Object.values(this.filters),e=>xr`
584
- <li>
585
- ${e.featured?xr`
586
- <eox-itemfilter-${Nt(e.type)}
587
- slot="filter"
588
- data-type="filter"
589
- .filterObject=${e}
590
- @filter="${()=>this.search()}"
591
- ></eox-itemfilter-${Nt(e.type)}>
592
- `:xr`
593
- <eox-itemfilter-expandcontainer
594
- .filterObject=${e}
595
- .unstyled=${this.unstyled}
596
- @details-toggled=${this.toggleAccordion}
597
- >
598
- <eox-itemfilter-${Nt(e.type)}
832
+ ${fe(this._config.inlineMode,()=>X`
833
+ <eox-itemfilter-inline
834
+ .items=${Object.values(this.filters)}
835
+ .unstyled=${this.unstyled}
836
+ @filter=${()=>this.search()}
837
+ >
838
+ </eox-itemfilter-inline>
839
+ `,()=>X`
840
+ ${fe(this._config.filterProperties.length,()=>X`
841
+ <section class="${this.config.inlineMode?"inline":se}">
842
+ ${fe(!this.config.inlineMode,()=>X`
843
+ <slot name="filterstitle"
844
+ ><h4 style="margin-top: 8px">Filters</h4></slot
845
+ >
846
+ `)}
847
+ <ul id="filters">
848
+ ${Kt(Object.values(this.filters),e=>ur`
849
+ <li>
850
+ ${e.featured?ur`
851
+ <eox-itemfilter-${Mt(e.type)}
599
852
  slot="filter"
600
853
  data-type="filter"
601
- data-filter="${e.key}"
602
854
  .filterObject=${e}
855
+ .unstyled=${this.unstyled}
603
856
  @filter="${()=>this.search()}"
604
- ></eox-itemfilter-${Nt(e.type)}>
605
- </eox-itemfilter-expandcontainer>
606
- `}
607
- </li>
608
- `)}
609
- </ul>
610
- ${ht(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>he`
611
- <button
612
- id="filter-reset"
613
- class="outline small"
614
- data-cy="filter-reset"
615
- @click=${()=>this.resetFilters()}
616
- >
617
- Reset filters
618
- </a>
619
- `)}
620
- </section>
621
- `)}
622
- ${ht(this.config.showResults&&this.results,()=>he`
623
- <section id="section-results">
624
- <div>
625
- <slot name="resultstitle"
626
- ><h4 style="margin-top: 8px">Results</h4></slot
627
- >
628
- </div>
629
- <div id="container-results" class="scroll">
630
- ${this.results.length<1?he` <small class="no-results">No matching items</small> `:ne}
631
- <ul id="results" part="results">
632
- ${this._config.aggregateResults?dt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>he`<details
633
- class="details-results"
634
- @toggle=${this.toggleAccordion}
635
- open
636
- >
637
- <summary>
638
- <span class="title">
639
- ${e}
640
- <span class="count"
641
- >${this.aggregateResults(this.results,e).length}</span
642
- >
643
- </span>
644
- </summary>
645
- <ul>
646
- ${Os(this.aggregateResults(this.results,e),t=>t.id,t=>{var i,n;return he`
647
- <li
648
- class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===t[this._config.titleProperty]?"highlighted":ne}
649
- >
650
- <label>
651
- <input
652
- data-cy="result-radio"
653
- type="radio"
654
- class="result-radio"
655
- name="result"
656
- id="${t.id}"
657
- checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===t[this._config.titleProperty]||ne}
658
- @click=${()=>{this.selectedResult=t,this._config.onSelect(t)}}
659
- />
660
- ${ht(this.hasTemplate("result"),()=>this.renderTemplate("result",t,`result-${t.id}`),()=>he`
661
- <span class="title"
662
- >${Wi(t[this._config.titleProperty])}</span
663
- >
664
- `)}
665
- </label>
666
- </li>
667
- `})}
668
- </ul>
669
- </details>`):dt(this.results,e=>he`<li part="result">
670
- <label>
671
- <input
672
- type="radio"
673
- name="result"
674
- id="${e.id}"
675
- @click=${()=>{this.selectedResult=e,this._config.onSelect(e)}}
676
- />
677
- ${ht(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>he`
678
- <span class="title"
679
- >${Wi(e[this._config.titleProperty])}</span
857
+ ></eox-itemfilter-${Mt(e.type)}>
858
+ `:ur`
859
+ <eox-itemfilter-expandcontainer
860
+ .filterObject=${e}
861
+ .unstyled=${this.unstyled}
862
+ @details-toggled=${this.toggleAccordion}
863
+ >
864
+ <eox-itemfilter-${Mt(e.type)}
865
+ slot="filter"
866
+ data-type="filter"
867
+ data-filter="${e.key}"
868
+ .filterObject=${e}
869
+ .unstyled=${this.unstyled}
870
+ @filter="${()=>this.search()}"
871
+ ></eox-itemfilter-${Mt(e.type)}>
872
+ </eox-itemfilter-expandcontainer>
873
+ `}
874
+ </li>
875
+ `)}
876
+ </ul>
877
+ ${fe(this._config.filterProperties&&Object.values(this.filters).map(e=>e.dirty).filter(e=>e).length>0,()=>X`
878
+ <button
879
+ id="filter-reset"
880
+ class="outline small"
881
+ data-cy="filter-reset"
882
+ @click=${()=>this.resetFilters()}
883
+ >
884
+ Reset filters
885
+ </a>
886
+ `)}
887
+ </section>
888
+ `)}
889
+ ${fe(this.config.showResults&&this.results,()=>X`
890
+ <section id="section-results">
891
+ <div>
892
+ <slot name="resultstitle"
893
+ ><h4 style="margin-top: 8px">Results</h4></slot
894
+ >
895
+ </div>
896
+ <div id="container-results" class="scroll">
897
+ ${this.results.length<1?X`
898
+ <small class="no-results">No matching items</small>
899
+ `:se}
900
+ <ul id="results" part="results">
901
+ ${this._config.aggregateResults?Kt(this._resultAggregation.filter(e=>this.aggregateResults(this.results,e).length),e=>X`<details
902
+ class="details-results"
903
+ @toggle=${this.toggleAccordion}
904
+ open
905
+ >
906
+ <summary>
907
+ <span class="title">
908
+ ${e}
909
+ <span class="count"
910
+ >${this.aggregateResults(this.results,e).length}</span
680
911
  >
681
- `)}
682
- </label>
683
- </li>`)}
684
- </ul>
685
- </div>
686
- </section>
912
+ </span>
913
+ </summary>
914
+ <ul>
915
+ ${kn(this.aggregateResults(this.results,e),r=>r.id,r=>{var i,n;return X`
916
+ <li
917
+ class=${((i=this.selectedResult)==null?void 0:i[this._config.titleProperty])===r[this._config.titleProperty]?"highlighted":se}
918
+ >
919
+ <label>
920
+ <input
921
+ data-cy="result-radio"
922
+ type="radio"
923
+ class="result-radio"
924
+ name="result"
925
+ id="${r.id}"
926
+ checked=${((n=this.selectedResult)==null?void 0:n[this._config.titleProperty])===r[this._config.titleProperty]||se}
927
+ @click=${()=>{this.selectedResult=r,this._config.onSelect(r)}}
928
+ />
929
+ ${fe(this.hasTemplate("result"),()=>this.renderTemplate("result",r,`result-${r.id}`),()=>X`
930
+ <span class="title"
931
+ >${Rn(r[this._config.titleProperty])}</span
932
+ >
933
+ `)}
934
+ </label>
935
+ </li>
936
+ `})}
937
+ </ul>
938
+ </details>`):Kt(this.results,e=>X`<li part="result">
939
+ <label>
940
+ <input
941
+ type="radio"
942
+ name="result"
943
+ id="${e.id}"
944
+ @click=${()=>{this.selectedResult=e,this._config.onSelect(e)}}
945
+ />
946
+ ${fe(this.hasTemplate("result"),()=>this.renderTemplate("result",e,`result-${e.id}`),()=>X`
947
+ <span class="title"
948
+ >${Rn(e[this._config.titleProperty])}</span
949
+ >
950
+ `)}
951
+ </label>
952
+ </li>`)}
953
+ </ul>
954
+ </div>
955
+ </section>
956
+ `)}
687
957
  `)}
688
958
  </form>
689
- `}},Ve([Pt()],ye.EOxItemFilter.prototype,"filters",2),Ve([Pt()],ye.EOxItemFilter.prototype,"items",2),Ve([Pt()],ye.EOxItemFilter.prototype,"results",2),Ve([Pt()],ye.EOxItemFilter.prototype,"selectedResult",2),Ve([Ae({attribute:!1})],ye.EOxItemFilter.prototype,"config",1),Ve([Ae()],ye.EOxItemFilter.prototype,"apply",2),Ve([Ae({attribute:!1})],ye.EOxItemFilter.prototype,"styleOverride",2),Ve([Ae({type:Boolean})],ye.EOxItemFilter.prototype,"unstyled",2),ye.EOxItemFilter=Ve([qe("eox-itemfilter")],ye.EOxItemFilter),ye.ElementConfig=Gr,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
959
+ `}},nt([Ue()],xe.EOxItemFilter.prototype,"filters",2),nt([Ue()],xe.EOxItemFilter.prototype,"items",2),nt([Ue()],xe.EOxItemFilter.prototype,"results",2),nt([Ue()],xe.EOxItemFilter.prototype,"selectedResult",2),nt([J({attribute:!1})],xe.EOxItemFilter.prototype,"config",1),nt([J()],xe.EOxItemFilter.prototype,"apply",2),nt([J({attribute:!1})],xe.EOxItemFilter.prototype,"styleOverride",2),nt([J({type:Boolean})],xe.EOxItemFilter.prototype,"unstyled",2),xe.EOxItemFilter=nt([Pe("eox-itemfilter")],xe.EOxItemFilter),xe.ElementConfig=ki,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});