@vaadin-component-factory/vcf-autocomplete
Version:
Web Component with a text input that provides a panel of suggested options.
271 lines (261 loc) • 476 kB
JavaScript
!function(){"use strict";
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),a=new WeakMap;class i{constructor(t,e,a){if(this._$cssResult$=!0,a!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const h=this.t;if(e&&void 0===t){const e=void 0!==h&&1===h.length;e&&(t=a.get(h)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&a.set(h,t))}return t}toString(){return this.cssText}}const s=(t,...e)=>{const a=1===t.length?t[0]:e.reduce(((e,h,a)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(h)+t[a+1]),t[0]);return new i(a,t,h)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const h of t.cssRules)e+=h.cssText;return(t=>new i("string"==typeof t?t:t+"",void 0,h))(e)})(t):t
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/;var o;const l=window,r=l.trustedTypes,d=r?r.emptyScript:"",v=l.reactiveElementPolyfillSupport,c={toAttribute(t,e){switch(e){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let h=t;switch(e){case Boolean:h=null!==t;break;case Number:h=null===t?null:Number(t);break;case Object:case Array:try{h=JSON.parse(t)}catch(t){h=null}}return h}},p=(t,e)=>e!==t&&(e==e||t==t),u={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:p},g="finalized";class z extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,h)=>{const a=this._$Ep(h,e);void 0!==a&&(this._$Ev.set(a,h),t.push(a))})),t}static createProperty(t,e=u){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const h="symbol"==typeof t?Symbol():"__"+t,a=this.getPropertyDescriptor(t,h,e);void 0!==a&&Object.defineProperty(this.prototype,t,a)}}static getPropertyDescriptor(t,e,h){return{get(){return this[e]},set(a){const i=this[t];this[e]=a,this.requestUpdate(t,i,h)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||u}static finalize(){if(this.hasOwnProperty(g))return!1;this[g]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const h of e)this.createProperty(h,t[h])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const h=new Set(t.flat(1/0).reverse());for(const t of h)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Ep(t,e){const h=e.attribute;return!1===h?void 0:"string"==typeof h?h:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,h;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(h=t.hostConnected)||void 0===h||h.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var h;const a=null!==(h=this.shadowRoot)&&void 0!==h?h:this.attachShadow(this.constructor.shadowRootOptions);return((h,a)=>{e?h.adoptedStyleSheets=a.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):a.forEach((e=>{const a=document.createElement("style"),i=t.litNonce;void 0!==i&&a.setAttribute("nonce",i),a.textContent=e.cssText,h.appendChild(a)}))})(a,this.constructor.elementStyles),a}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,h){this._$AK(t,h)}_$EO(t,e,h=u){var a;const i=this.constructor._$Ep(t,h);if(void 0!==i&&!0===h.reflect){const s=(void 0!==(null===(a=h.converter)||void 0===a?void 0:a.toAttribute)?h.converter:c).toAttribute(e,h.type);this._$El=t,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$El=null}}_$AK(t,e){var h;const a=this.constructor,i=a._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=a.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(h=t.converter)||void 0===h?void 0:h.fromAttribute)?t.converter:c;this._$El=i,this[i]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,h){let a=!0;void 0!==t&&(((h=h||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===h.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,h))):a=!1),!this.isUpdatePending&&a&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const h=this._$AL;try{e=this.shouldUpdate(h),e?(this.willUpdate(h),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(h)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(h)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var M;z[g]=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:z}),(null!==(o=l.reactiveElementVersions)&&void 0!==o?o:l.reactiveElementVersions=[]).push("1.6.2");const m=window,f=m.trustedTypes,_=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,b="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,w="?"+y,C=`<${w}>`,A=document,x=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,k="[ \t\n\f\r]",S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,O=/>/g,N=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),I=/'/g,L=/"/g,$=/^(?:script|style|textarea|title)$/i,D=t=>(e,...h)=>({_$litType$:t,strings:e,values:h}),R=D(1),H=D(2),V=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),B=new WeakMap,U=A.createTreeWalker(A,129,null,!1),q=(t,e)=>{const h=t.length-1,a=[];let i,s=2===e?"<svg>":"",n=S;for(let e=0;e<h;e++){const h=t[e];let o,l,r=-1,d=0;for(;d<h.length&&(n.lastIndex=d,l=n.exec(h),null!==l);)d=n.lastIndex,n===S?"!--"===l[1]?n=T:void 0!==l[1]?n=O:void 0!==l[2]?($.test(l[2])&&(i=RegExp("</"+l[2],"g")),n=N):void 0!==l[3]&&(n=N):n===N?">"===l[0]?(n=null!=i?i:S,r=-1):void 0===l[1]?r=-2:(r=n.lastIndex-l[2].length,o=l[1],n=void 0===l[3]?N:'"'===l[3]?L:I):n===L||n===I?n=N:n===T||n===O?n=S:(n=N,i=void 0);const v=n===N&&t[e+1].startsWith("/>")?" ":"";s+=n===S?h+C:r>=0?(a.push(o),h.slice(0,r)+b+h.slice(r)+y+v):h+y+(-2===r?(a.push(void 0),e):v)}const o=s+(t[h]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(o):o,a]};class j{constructor({strings:t,_$litType$:e},h){let a;this.parts=[];let i=0,s=0;const n=t.length-1,o=this.parts,[l,r]=q(t,e);if(this.el=j.createElement(l,h),U.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(a=U.nextNode())&&o.length<n;){if(1===a.nodeType){if(a.hasAttributes()){const t=[];for(const e of a.getAttributeNames())if(e.endsWith(b)||e.startsWith(y)){const h=r[s++];if(t.push(e),void 0!==h){const t=a.getAttribute(h.toLowerCase()+b).split(y),e=/([.?@])?(.*)/.exec(h);o.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?J:"?"===e[1]?X:"@"===e[1]?Q:G})}else o.push({type:6,index:i})}for(const e of t)a.removeAttribute(e)}if($.test(a.tagName)){const t=a.textContent.split(y),e=t.length-1;if(e>0){a.textContent=f?f.emptyScript:"";for(let h=0;h<e;h++)a.append(t[h],x()),U.nextNode(),o.push({type:2,index:++i});a.append(t[e],x())}}}else if(8===a.nodeType)if(a.data===w)o.push({type:2,index:i});else{let t=-1;for(;-1!==(t=a.data.indexOf(y,t+1));)o.push({type:7,index:i}),t+=y.length-1}i++}}static createElement(t,e){const h=A.createElement("template");return h.innerHTML=t,h}}function Y(t,e,h=t,a){var i,s,n,o;if(e===V)return e;let l=void 0!==a?null===(i=h._$Co)||void 0===i?void 0:i[a]:h._$Cl;const r=E(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==r&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===r?l=void 0:(l=new r(t),l._$AT(t,h,a)),void 0!==a?(null!==(n=(o=h)._$Co)&&void 0!==n?n:o._$Co=[])[a]=l:h._$Cl=l),void 0!==l&&(e=Y(t,l._$AS(t,e.values),l,a)),e}class K{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:h},parts:a}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:A).importNode(h,!0);U.currentNode=i;let s=U.nextNode(),n=0,o=0,l=a[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new W(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new tt(s,this,t)),this._$AV.push(e),l=a[++o]}n!==(null==l?void 0:l.index)&&(s=U.nextNode(),n++)}return U.currentNode=A,i}v(t){let e=0;for(const h of this._$AV)void 0!==h&&(void 0!==h.strings?(h._$AI(t,h,e),e+=h.strings.length-2):h._$AI(t[e])),e++}}class W{constructor(t,e,h,a){var i;this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=h,this.options=a,this._$Cp=null===(i=null==a?void 0:a.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),E(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==V&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==F&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){var e;const{values:h,_$litType$:a}=t,i="number"==typeof a?this._$AC(t):(void 0===a.el&&(a.el=j.createElement(a.h,this.options)),a);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(h);else{const t=new K(i,this),e=t.u(this.options);t.v(h),this.$(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new j(t)),e}T(t){P(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let h,a=0;for(const i of t)a===e.length?e.push(h=new W(this.k(x()),this.k(x()),this,this.options)):h=e[a],h._$AI(i),a++;a<e.length&&(this._$AR(h&&h._$AB.nextSibling,a),e.length=a)}_$AR(t=this._$AA.nextSibling,e){var h;for(null===(h=this._$AP)||void 0===h||h.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class G{constructor(t,e,h,a,i){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=a,this.options=i,h.length>2||""!==h[0]||""!==h[1]?(this._$AH=Array(h.length-1).fill(new String),this.strings=h):this._$AH=F}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,h,a){const i=this.strings;let s=!1;if(void 0===i)t=Y(this,t,e,0),s=!E(t)||t!==this._$AH&&t!==V,s&&(this._$AH=t);else{const a=t;let n,o;for(t=i[0],n=0;n<i.length-1;n++)o=Y(this,a[h+n],e,n),o===V&&(o=this._$AH[n]),s||(s=!E(o)||o!==this._$AH[n]),o===F?t=F:t!==F&&(t+=(null!=o?o:"")+i[n+1]),this._$AH[n]=o}s&&!a&&this.j(t)}j(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class J extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===F?void 0:t}}const Z=f?f.emptyScript:"";class X extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==F?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class Q extends G{constructor(t,e,h,a,i){super(t,e,h,a,i),this.type=5}_$AI(t,e=this){var h;if((t=null!==(h=Y(this,t,e,0))&&void 0!==h?h:F)===V)return;const a=this._$AH,i=t===F&&a!==F||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,s=t!==F&&(a===F||i);i&&this.element.removeEventListener(this.name,this,a),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,h;"function"==typeof this._$AH?this._$AH.call(null!==(h=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==h?h:this.element,t):this._$AH.handleEvent(t)}}class tt{constructor(t,e,h){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=h}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const et=m.litHtmlPolyfillSupport;null==et||et(j,W),(null!==(M=m.litHtmlVersions)&&void 0!==M?M:m.litHtmlVersions=[]).push("2.7.4");const ht=(t,e,h)=>{var a,i;const s=null!==(a=null==h?void 0:h.renderBefore)&&void 0!==a?a:e;let n=s._$litPart$;if(void 0===n){const t=null!==(i=null==h?void 0:h.renderBefore)&&void 0!==i?i:null;s._$litPart$=n=new W(e.insertBefore(x(),t),t,void 0,null!=h?h:{})}return n._$AI(t),n
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/};var at,it;class st extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const h=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=h.firstChild),h}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return V}}st.finalized=!0,st._$litElement$=!0,null===(at=globalThis.litElementHydrateSupport)||void 0===at||at.call(globalThis,{LitElement:st});const nt=globalThis.litElementPolyfillSupport;null==nt||nt({LitElement:st}),(null!==(it=globalThis.litElementVersions)&&void 0!==it?it:globalThis.litElementVersions=[]).push("3.3.2");
/**
* @license
* Copyright (c) 2017 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
const ot=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,h){super.attributeChangedCallback(t,e,h),"theme"===t&&this._set_theme(h)}}
/**
* @license
* Copyright (c) 2017 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/,lt=[];function rt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function dt(t,e,h={}){var a;t&&(a=t,rt(customElements.get(a))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`)),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof i||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,h):lt.push({themeFor:t,styles:e,include:h.include,moduleId:h.moduleId})}function vt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():lt}function ct(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function pt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const h=vt().find((e=>e.moduleId===t));h?e.push(...pt(h),...h.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function ut(t){const e=`${t}-default-theme`,h=vt().filter((h=>h.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}(h.themeFor,t))).map((t=>({...t,styles:[...pt(t),...t.styles],includePriority:ct(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return h.length>0?h:vt().filter((t=>t.moduleId===e))}const gt=t=>class extends(ot(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!rt(this)&&function(t,e){const h=document.createElement("style");h.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(h)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype),e=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...ut(this.is)];const h=this.__themes.flatMap((t=>t.styles));return h.filter(((t,e)=>e===h.lastIndexOf(t)))}}
/**
* @license
* Copyright (c) 2017 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/;const zt=new WeakMap;
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
const Mt={},mt=/([A-Z])/gu;function ft(t){return Mt[t]||(Mt[t]=t.replace(mt,"-$1").toLowerCase()),Mt[t]}function _t(t){const[e,h]=t.split("(");return{method:e,observerProps:h.replace(")","").split(",").map((t=>t.trim()))}}function bt(t,e){return Object.prototype.hasOwnProperty.call(t,e)||(t[e]=new Map(t[e])),t[e]}const yt=(wt=t=>class extends t{static createProperty(t,e){[String,Boolean,Number,Array].includes(e)&&(e={type:e}),e.reflectToAttribute&&(e.reflect=!0),super.createProperty(t,e)}static getOrCreateMap(t){return bt(this,t)}static finalize(){if(super.finalize(),Array.isArray(this.observers)){const t=this.getOrCreateMap("__complexObservers");this.observers.forEach((e=>{const{method:h,observerProps:a}=_t(e);t.set(h,a)}))}}static addCheckedInitializer(t){super.addInitializer((e=>{e instanceof this&&t(e)}))}static getPropertyDescriptor(t,e,h){const a=super.getPropertyDescriptor(t,e,h);let i=a;if("value"in h&&this.addCheckedInitializer((e=>{"function"==typeof h.value?e[t]=h.value.call(e):e[t]=h.value})),h.readOnly){const e=a.set;this.addCheckedInitializer((h=>{h[`_set${function(t){return t[0].toUpperCase()+t.substring(1)}(t)}`]=function(t){e.call(h,t)}})),i={get:a.get,set(){},configurable:!0,enumerable:!0}}if(h.observer){const e=h.observer;this.getOrCreateMap("__observers").set(t,e),this.addCheckedInitializer((t=>{t[e]||console.warn(`observer method ${e} not defined`)}))}if(h.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){const t=this.__notifyProps;this.__notifyProps=new Set(t)}}else this.__notifyProps=new Set;this.__notifyProps.add(t)}if(h.computed){const e=`__assignComputed${t}`,a=_t(h.computed);this.prototype[e]=function(...e){this[t]=this[a.method](...e)},this.getOrCreateMap("__complexObservers").set(e,a.observerProps)}return h.attribute||(h.attribute=ft(t)),i}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t}))}ready(){}updated(t){this.constructor.__observers&&this.__runObservers(t,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(t,this.constructor.__complexObservers),this.__dynamicObservers&&this.__runComplexObservers(t,this.__dynamicObservers),this.constructor.__notifyProps&&this.__runNotifyProps(t,this.constructor.__notifyProps),this.__isReadyInvoked||(this.ready(),this.__isReadyInvoked=!0)}_createMethodObserver(t){const e=bt(this,"__dynamicObservers"),{method:h,observerProps:a}=_t(t);e.set(h,a)}__runComplexObservers(t,e){e.forEach(((e,h)=>{e.some((e=>t.has(e)))&&(this[h]?this[h](...e.map((t=>this[t]))):console.warn(`observer method ${h} not defined`))}))}__runObservers(t,e){t.forEach(((t,h)=>{const a=e.get(h);void 0!==a&&this[a]&&this[a](this[h],t)}))}__runNotifyProps(t,e){t.forEach(((t,h)=>{e.has(h)&&this.dispatchEvent(new CustomEvent(`${ft(h)}-changed`,{detail:{value:this[h]}}))}))}_get(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}_set(t,e,h){const a=t.split("."),i=a.pop();a.reduce(((t,e)=>t[e]),h)[i]=e}},t=>{if(function(t,e){let h=e;for(;h;){if(zt.get(h)===t)return!0;h=Object.getPrototypeOf(h)}return!1}(wt,t))return t;const e=wt(t);return zt.set(e,wt),e});var wt;
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
window.JSCompiler_renameProperty=function(t,e){return t};
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
let Ct=0;const At=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let h=Ct++;return function(a){let i=a.__mixinSet;if(i&&i[h])return a;let s=e,n=s.get(a);if(!n){n=t(a),s.set(a,n);let e=Object.create(n.__mixinSet||i||null);e[h]=!0,n.__mixinSet=e}return n}},xt=At((t=>class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Et=At((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,h)=>{this._delegateAttribute(e,t[h])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,h)=>{this._delegateProperty(e,t[h])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),Pt=[];
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/function kt(t,e,h=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=h&&t.removeAttribute("dir")}function St(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=St();Pt.forEach((e=>{kt(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Tt=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),kt(this,St(),null))}attributeChangedCallback(t,e,h){if(super.attributeChangedCallback(t,e,h),"dir"!==t)return;const a=St(),i=h===a&&-1===Pt.indexOf(this),s=!h&&e&&-1===Pt.indexOf(this),n=h!==a&&e===a;i||s?(this.__subscribe(),kt(this,a,h)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Pt.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,h){("dir"!==h||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,h)}_attributeToProperty(t,e,h){"dir"!==t||e?super._attributeToProperty(t,e,h):this.dir=""}__subscribe(){Pt.includes(this)||Pt.push(this)}__unsubscribe(){Pt.includes(this)&&Pt.splice(Pt.indexOf(this),1)}}
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/;let Ot,Nt,It=/(url\()([^)]*)(\))/g,Lt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function $t(t,e){if(t&&Lt.test(t))return t;if("//"===t)return t;if(void 0===Ot){Ot=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ot="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ot)try{return new URL(t,e).href}catch(e){return t}return Nt||(Nt=document.implementation.createHTMLDocument("temp"),Nt.base=Nt.createElement("base"),Nt.head.appendChild(Nt.base),Nt.anchor=Nt.createElement("a"),Nt.body.appendChild(Nt.anchor)),Nt.base.href=e,Nt.anchor.href=t,Nt.anchor.href||t}function Dt(t,e){return t.replace(It,(function(t,h,a,i){return h+"'"+$t(a.replace(/["']/g,""),e)+"'"+i}))}function Rt(t){return t.substring(0,t.lastIndexOf("/")+1)}
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/const Ht=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const Vt=Ht&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Ft=window.Polymer&&window.Polymer.rootPath||Rt(document.baseURI||window.location.href),Bt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;window.Polymer&&window.Polymer.setPassiveTouchGestures;let Ut=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,qt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,jt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Yt=window.Polymer&&window.Polymer.legacyWarnings||!1,Kt=window.Polymer&&window.Polymer.syncInitialRender||!1,Wt=window.Polymer&&window.Polymer.legacyUndefined||!1,Gt=window.Polymer&&window.Polymer.orderedComputed||!1,Jt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Zt=window.Polymer&&window.Polymer.fastDomIf||!1;window.Polymer&&window.Polymer.suppressTemplateNotifications,window.Polymer&&window.Polymer.legacyNoObservedAttributes;let Xt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;const Qt=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,te=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function ee(t,e){if("function"!=typeof t)return;const h=Qt.exec(t.toString());if(h)try{t=new Function(h[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};const he=function(t,e){if(window.Vaadin.developmentMode)return ee(t,e)};function ae(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(te?!(te&&Object.keys(te).map((t=>te[t])).filter((t=>t.productionMode)).length>0):!ee((function(){return!0})))}catch(t){return!1}}());
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
let ie=0,se=0;const ne=[];let oe=!1;const le={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},re={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},de={run(t){oe||(oe=!0,queueMicrotask((()=>function(){oe=!1;const t=ne.length;for(let e=0;e<t;e++){const t=ne[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ne.splice(0,t),se+=t}()))),ne.push(t);const e=ie;return ie+=1,e},cancel(t){const e=t-se;if(e>=0){if(!ne[e])throw new Error(`invalid async handle: ${t}`);ne[e]=null}}},ve=new Set;class ce{static debounce(t,e,h){return t instanceof ce?t._cancelAsync():t=new ce,t.setConfig(e,h),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,ve.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ve.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let pe;
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){he(ae)};const ue=new Set,ge=t=>class extends(Tt(t)){static get version(){return"24.1.2"}static finalize(){super.finalize();const{is:t}=this;var e;t&&!ue.has(t)&&(window.Vaadin.registrations.push(this),ue.add(t),window.Vaadin.developmentModeCallback&&(pe=ce.debounce(pe,re,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),e=pe,ve.add(e)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/,ze=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))}));
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
function Me(t,e,h){return{index:t,removed:e,addedCount:h}}At((t=>class extends t{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),ze.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,ze.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),ze.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&ze.unobserve(t)),this.__parent=null}}_onResize(t){}}));const me=0,fe=1,_e=2,be=3;function ye(t,e,h,a,i,s){let n,o=0,l=0,r=Math.min(h-e,s-i);if(0==e&&0==i&&(o=function(t,e,h){for(let a=0;a<h;a++)if(!we(t[a],e[a]))return a;return h}(t,a,r)),h==t.length&&s==a.length&&(l=function(t,e,h){let a=t.length,i=e.length,s=0;for(;s<h&&we(t[--a],e[--i]);)s++;return s}(t,a,r-o)),i+=o,s-=l,(h-=l)-(e+=o)==0&&s-i==0)return[];if(e==h){for(n=Me(e,[],0);i<s;)n.removed.push(a[i++]);return[n]}if(i==s)return[Me(e,[],h-e)];let d=function(t){let e=t.length-1,h=t[0].length-1,a=t[e][h],i=[];for(;e>0||h>0;){if(0==e){i.push(_e),h--;continue}if(0==h){i.push(be),e--;continue}let s,n=t[e-1][h-1],o=t[e-1][h],l=t[e][h-1];s=o<l?o<n?o:n:l<n?l:n,s==n?(n==a?i.push(me):(i.push(fe),a=n),e--,h--):s==o?(i.push(be),e--,a=o):(i.push(_e),h--,a=l)}return i.reverse(),i}(function(t,e,h,a,i,s){let n=s-i+1,o=h-e+1,l=new Array(n);for(let t=0;t<n;t++)l[t]=new Array(o),l[t][0]=t;for(let t=0;t<o;t++)l[0][t]=t;for(let h=1;h<n;h++)for(let s=1;s<o;s++)if(we(t[e+s-1],a[i+h-1]))l[h][s]=l[h-1][s-1];else{let t=l[h-1][s]+1,e=l[h][s-1]+1;l[h][s]=t<e?t:e}return l}(t,e,h,a,i,s));n=void 0;let v=[],c=e,p=i;for(let t=0;t<d.length;t++)switch(d[t]){case me:n&&(v.push(n),n=void 0),c++,p++;break;case fe:n||(n=Me(c,[],0)),n.addedCount++,c++,n.removed.push(a[p]),p++;break;case _e:n||(n=Me(c,[],0)),n.addedCount++,c++;break;case be:n||(n=Me(c,[],0)),n.removed.push(a[p]),p++}return n&&v.push(n),v}function we(t,e){return t===e}
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/let Ce=0,Ae=0,xe=[],Ee=0,Pe=!1,ke=document.createTextNode("");new window.MutationObserver((function(){Pe=!1;const t=xe.length;for(let e=0;e<t;e++){let t=xe[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}xe.splice(0,t),Ae+=t})).observe(ke,{characterData:!0});const Se={run:t=>(Pe||(Pe=!0,ke.textContent=Ee++),xe.push(t),Ce++),cancel(t){const e=t-Ae;if(e>=0){if(!xe[e])throw new Error("invalid async handle: "+t);xe[e]=null}}},Te=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
function Oe(t){return"slot"===t.localName}let Ne=class{static getFlattenedNodes(t){const e=Te(t);return Oe(t)?e.assignedNodes({flatten:!0}):Array.from(e.childNodes).map((t=>Oe(t)?Te(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){Oe(this._target)?this._listenSlots([this._target]):Te(this._target).children&&(this._listenSlots(Te(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){Oe(this._target)?this._unlistenSlots([this._target]):Te(this._target).children&&(this._unlistenSlots(Te(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,Se.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let h=t[e];h.addedNodes&&this._listenSlots(h.addedNodes),h.removedNodes&&this._unlistenSlots(h.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),h=(a=e,i=this._effectiveNodes,ye(a,0,a.length,i,0,i.length));var a,i;for(let e,a=0;a<h.length&&(e=h[a]);a++)for(let h,a=0;a<e.removed.length&&(h=e.removed[a]);a++)t.removedNodes.push(h);for(let a,i=0;i<h.length&&(a=h[i]);i++)for(let h=a.index;h<a.index+a.addedCount;h++)t.addedNodes.push(e[h]);this._effectiveNodes=e;let s=!1;return(t.addedNodes.length||t.removedNodes.length)&&(s=!0,this.callback.call(this._target,t)),s}_listenSlots(t){for(let e=0;e<t.length;e++){let h=t[e];Oe(h)&&h.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let h=t[e];Oe(h)&&h.removeEventListener("slotchange",this._boundSchedule)}}};
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/function Ie(t){return t?new Set(t.split(" ")):new Set}function Le(t){return t?[...t].join(" "):""}function $e(t,e,h){const a=Ie(t.getAttribute(e));a.add(h),t.setAttribute(e,Le(a))}
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
let De=0;
/**
* @license
* Copyright (c) 2021 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
class Re extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${De++}`}constructor(t,e,h,a={}){super();const{initializer:i,multiple:s,observe:n,useUniqueId:o}=a;this.host=t,this.slotName=e,this.tagName=h,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof s&&s,this.slotInitializer=i,s&&(this.nodes=[]),o&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();this.nodes=[t],this.initNode(t)}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:h}=this;let a=this.defaultNode;return!a&&h&&(a=document.createElement(h),a instanceof Element&&(""!==e&&a.setAttribute("slot",e),this.node=a,this.defaultNode=a)),a&&t.appendChild(a),a}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,h=this.host.shadowRoot.querySelector(e);this.__slotObserver=new Ne(h,(t=>{const e=this.multiple?this.nodes:[this.node],h=t.addedNodes.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!e.includes(t)));t.removedNodes.length&&t.removedNodes.forEach((t=>{this.teardownNode(t)})),h&&h.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...e,...h].filter((t=>t!==this.defaultNode)),h.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=h[0],this.initAddedNode(this.node)))}))}}class He{constructor(t,{target:e,config:h,callback:a,skipInitial:i}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=h,this.o=null!=i?i:this.o,this.callback=a,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}
/**
* @license
* Copyright (c) 2017 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/class Ve extends HTMLElement{static get version(){return"24.1.2"}}customElements.define("vaadin-lumo-styles",Ve);const Fe=(t,...e)=>{((t,...e)=>{const h=document.createElement("style");h.id=t,h.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",h)})(`lumo-${t}`,e)};
/**
* @license
* Copyright (c) 2017 - 2023 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/Fe("color-props",s`
:host {
/* Base (background) */
--lumo-base-color: #fff;
/* Tint */
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
--lumo-tint: #fff;
/* Shade */
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
--lumo-shade: hsl(214, 35%, 15%);
/* Contrast */
--lumo-contrast-5pct: var(--lumo-shade-5pct);
--lumo-contrast-10pct: var(--lumo-shade-10pct);
--lumo-contrast-20pct: var(--lumo-shade-20pct);
--lumo-contrast-30pct: var(--lumo-shade-30pct);
--lumo-contrast-40pct: var(--lumo-shade-40pct);
--lumo-contrast-50pct: var(--lumo-shade-50pct);
--lumo-contrast-60pct: var(--lumo-shade-60pct);
--lumo-contrast-70pct: var(--lumo-shade-70pct);
--lumo-contrast-80pct: var(--lumo-shade-80pct);
--lumo-contrast-90pct: var(--lumo-shade-90pct);
--lumo-contrast: var(--lumo-shade);
/* Text */
--lumo-header-text-color: var(--lumo-contrast);
--lumo-body-text-color: var(--lumo-contrast-90pct);
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
/* Primary */
--lumo-primary-color: hsl(214, 100%, 48%);
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
--lumo-primary-text-color: hsl(214, 100%, 43%);
--lumo-primary-contrast-color: #fff;
/* Error */
--lumo-error-color: hsl(3, 85%, 48%);
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
--lumo-error-text-color: hsl(3, 89%, 42%);
--lumo-error-contrast-color: #fff;
/* Success */
--lumo-success-color: hsl(145, 72%, 30%);
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
--lumo-success-text-color: hsl(145, 85%, 25%);
--lumo-success-contrast-color: #fff;
/* Warning */
--lumo-warning-color: hsl(48, 100%, 50%);
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
--lumo-warning-text-color: hsl(32, 100%, 30%);
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
}
/* forced-colors mode adjustments */
@media (forced-colors: active) {
html {
--lumo-disabled-text-color: GrayText;
}
}
`);dt("",s`
[theme~='dark'] {
/* Base (background) */
--lumo-base-color: hsl(214, 35%, 21%);
/* Tint */
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
--lumo-tint-70pct: