@everymatrix/general-input 1.86.3 → 1.86.5

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.
Files changed (16) hide show
  1. package/dist/cjs/checkbox-group-input_14.cjs.entry.js +140 -140
  2. package/dist/esm/checkbox-group-input_14.entry.js +140 -140
  3. package/dist/general-input/checkbox-group-input_14.entry.js +235 -235
  4. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
  5. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
  6. package/package.json +1 -1
  7. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -2
  8. package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -2
  9. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  10. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/main.d.ts +0 -0
  11. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/preview.d.ts +0 -0
  12. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
  13. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +0 -0
  14. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  15. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  16. /package/dist/types/{Users/maria.bumbar/Desktop/Widgets & Template → builds/emfe-widgets}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -19,34 +19,34 @@ const di=globalThis,ci=di.ShadowRoot&&(void 0===di.ShadyCSS||di.ShadyCSS.nativeS
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
- */,{is:gi,defineProperty:yi,getOwnPropertyDescriptor:wi,getOwnPropertyNames:_i,getOwnPropertySymbols:xi,getPrototypeOf:ki}=Object,Ci=globalThis,Si=Ci.trustedTypes,zi=Si?Si.emptyScript:"",Ai=Ci.reactiveElementPolyfillSupport,Ei={toAttribute(t,e){switch(e){case Boolean:t=t?zi:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Ii=(t,e)=>!gi(t,e),Ti={attribute:!0,type:String,converter:Ei,reflect:!1,hasChanged:Ii};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=Ci.litPropertyMetadata||(Ci.litPropertyMetadata=new WeakMap);class Di extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ti){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&yi(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=wi(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==o?void 0:o.call(this)},set(e){const s=null==o?void 0:o.call(this);r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:Ti}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=ki(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[..._i(t),...xi(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(bi(t))}else void 0!==t&&e.push(bi(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return fi(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:Ei).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:Ei;this._$Em=o,this[o]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){var s;if(void 0!==t){if(null!=i||(i=this.constructor.getPropertyOptions(t)),!(null!=(s=i.hasChanged)?s:Ii)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){var s;this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(null!=(s=this._$Ej)?s:this._$Ej=new Set).add(t)}_$ET(){return ai(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((t=>this._$EC(t,this[t])))),this._$EU()}updated(t){}firstUpdated(t){}}var Mi;Di.elementStyles=[],Di.shadowRootOptions={mode:"open"},Di.elementProperties=new Map,Di.finalized=new Map,null==Ai||Ai({ReactiveElement:Di}),(null!=(Mi=Ci.reactiveElementVersions)?Mi:Ci.reactiveElementVersions=[]).push("2.0.4");
22
+ */,{is:gi,defineProperty:yi,getOwnPropertyDescriptor:wi,getOwnPropertyNames:_i,getOwnPropertySymbols:xi,getPrototypeOf:ki}=Object,Ci=globalThis,Si=Ci.trustedTypes,zi=Si?Si.emptyScript:"",Ai=Ci.reactiveElementPolyfillSupport,Ei={toAttribute(t,e){switch(e){case Boolean:t=t?zi:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Ii=(t,e)=>!gi(t,e),Ti={attribute:!0,type:String,converter:Ei,reflect:!1,useDefault:!1,hasChanged:Ii};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=Ci.litPropertyMetadata||(Ci.litPropertyMetadata=new WeakMap);class Di extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ti){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&yi(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=wi(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:Ti}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=ki(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[..._i(t),...xi(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(bi(t))}else void 0!==t&&e.push(bi(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return fi(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:Ei).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,n=r._$Eh.get(t);if(void 0!==n&&this._$Em!==n){const t=r.getPropertyOptions(n),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:Ei;this._$Em=n;const l=a.fromAttribute(e,t.type);this[n]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(n))?o:l,this._$Em=null}}requestUpdate(t,e,i){var s,o;if(void 0!==t){const r=this.constructor,n=this[t];if(null!=i||(i=r.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:Ii)(n,e)||i.useDefault&&i.reflect&&n===(null==(o=this._$Ej)?void 0:o.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var n,a,l;i&&!(null!=(n=this._$Ej)?n:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(a=null!=r?r:e)?a:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return ai(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}}var Mi;Di.elementStyles=[],Di.shadowRootOptions={mode:"open"},Di.elementProperties=new Map,Di.finalized=new Map,null==Ai||Ai({ReactiveElement:Di}),(null!=(Mi=Ci.reactiveElementVersions)?Mi:Ci.reactiveElementVersions=[]).push("2.1.1");
23
23
  /**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
27
  */
28
- const Pi=globalThis,Fi=Pi.trustedTypes,Oi=Fi?Fi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ni="$lit$",Bi=`lit$${Math.random().toFixed(9).slice(2)}$`,ji="?"+Bi,Li=`<${ji}>`,Vi=document,$i=()=>Vi.createComment(""),Ri=t=>null===t||"object"!=typeof t&&"function"!=typeof t,qi=Array.isArray,Hi="[ \t\n\f\r]",Wi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ui=/-->/g,Yi=/>/g,Gi=RegExp(`>|${Hi}(?:([^\\s"'>=/]+)(${Hi}*=${Hi}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ki=/'/g,Qi=/"/g,Ji=/^(?:script|style|textarea|title)$/i,Zi=Symbol.for("lit-noChange"),Xi=Symbol.for("lit-nothing"),ts=new WeakMap,es=Vi.createTreeWalker(Vi,129);function is(t,e){if(!qi(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Oi?Oi.createHTML(e):e}class ss{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=Wi;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,l=n.exec(i),null!==l);)d=n.lastIndex,n===Wi?"!--"===l[1]?n=Ui:void 0!==l[1]?n=Yi:void 0!==l[2]?(Ji.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=Gi):void 0!==l[3]&&(n=Gi):n===Gi?">"===l[0]?(n=null!=o?o:Wi,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Gi:'"'===l[3]?Qi:Ki):n===Qi||n===Ki?n=Gi:n===Ui||n===Yi?n=Wi:(n=Gi,o=void 0);const c=n===Gi&&t[e+1].startsWith("/>")?" ":"";r+=n===Wi?i+Li:h>=0?(s.push(a),i.slice(0,h)+Ni+i.slice(h)+Bi+c):i+Bi+(-2===h?e:c)}return[is(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=ss.createElement(l,i),es.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=es.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(Ni)){const e=h[r++],i=s.getAttribute(t).split(Bi),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?ls:"?"===n[1]?hs:"@"===n[1]?ds:as}),s.removeAttribute(t)}else t.startsWith(Bi)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(Ji.test(s.tagName)){const t=s.textContent.split(Bi),e=t.length-1;if(e>0){s.textContent=Fi?Fi.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],$i()),es.nextNode(),a.push({type:2,index:++o});s.append(t[e],$i())}}}else if(8===s.nodeType)if(s.data===ji)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(Bi,t+1));)a.push({type:7,index:o}),t+=Bi.length-1}o++}}static createElement(t,e){const i=Vi.createElement("template");return i.innerHTML=t,i}}function os(t,e,i=t,s){var o,r,n;if(e===Zi)return e;let a=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=Ri(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null==(r=null==a?void 0:a._$AO)||r.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,s)),void 0!==s?(null!=(n=i._$Co)?n:i._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=os(t,a._$AS(t,e.values),a,s)),e}class rs{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:i},parts:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:Vi).importNode(i,!0);es.currentNode=o;let r=es.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new ns(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new cs(r,this,t)),this._$AV.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(r=es.nextNode(),n++)}return es.currentNode=Vi,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ns{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=Xi,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}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){var i;t=os(this,t,e),Ri(t)?t===Xi||null==t||""===t?(this._$AH!==Xi&&this._$AR(),this._$AH=Xi):t!==this._$AH&&t!==Zi&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):qi(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Xi&&Ri(this._$AH)?this._$AA.nextSibling.data=t:this.T(Vi.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=ss.createElement(is(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new rs(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=ts.get(t.strings);return void 0===e&&ts.set(t.strings,e=new ss(t)),e}k(t){qi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new ns(this.O($i()),this.O($i()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||i.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._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class as{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=Xi,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Xi}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=os(this,t,e,0),r=!Ri(t)||t!==this._$AH&&t!==Zi,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=os(this,s[i+n],e,n),a===Zi&&(a=this._$AH[n]),r||(r=!Ri(a)||a!==this._$AH[n]),a===Xi?t=Xi:t!==Xi&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===Xi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ls extends as{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Xi?void 0:t}}class hs extends as{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Xi)}}class ds extends as{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=os(this,t,e,0))?i:Xi)===Zi)return;const s=this._$AH,o=t===Xi&&s!==Xi||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==Xi&&(s===Xi||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class cs{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){os(this,t)}}const us=Pi.litHtmlPolyfillSupport;var ps;null==us||us(ss,ns),(null!=(ps=Pi.litHtmlVersions)?ps:Pi.litHtmlVersions=[]).push("3.2.1");const ms=(t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let n=r._$litPart$;if(void 0===n){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=n=new ns(e.insertBefore($i(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n
28
+ const Pi=globalThis,Fi=Pi.trustedTypes,Oi=Fi?Fi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ni="$lit$",Bi=`lit$${Math.random().toFixed(9).slice(2)}$`,ji="?"+Bi,Li=`<${ji}>`,Vi=document,$i=()=>Vi.createComment(""),Ri=t=>null===t||"object"!=typeof t&&"function"!=typeof t,qi=Array.isArray,Hi="[ \t\n\f\r]",Wi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ui=/-->/g,Yi=/>/g,Gi=RegExp(`>|${Hi}(?:([^\\s"'>=/]+)(${Hi}*=${Hi}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ki=/'/g,Qi=/"/g,Ji=/^(?:script|style|textarea|title)$/i,Zi=Symbol.for("lit-noChange"),Xi=Symbol.for("lit-nothing"),ts=new WeakMap,es=Vi.createTreeWalker(Vi,129);function is(t,e){if(!qi(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Oi?Oi.createHTML(e):e}class ss{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=Wi;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,l=n.exec(i),null!==l);)d=n.lastIndex,n===Wi?"!--"===l[1]?n=Ui:void 0!==l[1]?n=Yi:void 0!==l[2]?(Ji.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=Gi):void 0!==l[3]&&(n=Gi):n===Gi?">"===l[0]?(n=null!=o?o:Wi,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Gi:'"'===l[3]?Qi:Ki):n===Qi||n===Ki?n=Gi:n===Ui||n===Yi?n=Wi:(n=Gi,o=void 0);const c=n===Gi&&t[e+1].startsWith("/>")?" ":"";r+=n===Wi?i+Li:h>=0?(s.push(a),i.slice(0,h)+Ni+i.slice(h)+Bi+c):i+Bi+(-2===h?e:c)}return[is(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=ss.createElement(l,i),es.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=es.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(Ni)){const e=h[r++],i=s.getAttribute(t).split(Bi),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?ls:"?"===n[1]?hs:"@"===n[1]?ds:as}),s.removeAttribute(t)}else t.startsWith(Bi)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(Ji.test(s.tagName)){const t=s.textContent.split(Bi),e=t.length-1;if(e>0){s.textContent=Fi?Fi.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],$i()),es.nextNode(),a.push({type:2,index:++o});s.append(t[e],$i())}}}else if(8===s.nodeType)if(s.data===ji)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(Bi,t+1));)a.push({type:7,index:o}),t+=Bi.length-1}o++}}static createElement(t,e){const i=Vi.createElement("template");return i.innerHTML=t,i}}function os(t,e,i=t,s){var o,r,n;if(e===Zi)return e;let a=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=Ri(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null==(r=null==a?void 0:a._$AO)||r.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,s)),void 0!==s?(null!=(n=i._$Co)?n:i._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=os(t,a._$AS(t,e.values),a,s)),e}class rs{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:i},parts:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:Vi).importNode(i,!0);es.currentNode=o;let r=es.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new ns(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new cs(r,this,t)),this._$AV.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(r=es.nextNode(),n++)}return es.currentNode=Vi,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ns{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=Xi,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}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){var i;t=os(this,t,e),Ri(t)?t===Xi||null==t||""===t?(this._$AH!==Xi&&this._$AR(),this._$AH=Xi):t!==this._$AH&&t!==Zi&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):qi(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Xi&&Ri(this._$AH)?this._$AA.nextSibling.data=t:this.T(Vi.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=ss.createElement(is(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new rs(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=ts.get(t.strings);return void 0===e&&ts.set(t.strings,e=new ss(t)),e}k(t){qi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new ns(this.O($i()),this.O($i()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||i.call(this,!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class as{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=Xi,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Xi}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=os(this,t,e,0),r=!Ri(t)||t!==this._$AH&&t!==Zi,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=os(this,s[i+n],e,n),a===Zi&&(a=this._$AH[n]),r||(r=!Ri(a)||a!==this._$AH[n]),a===Xi?t=Xi:t!==Xi&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===Xi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ls extends as{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Xi?void 0:t}}class hs extends as{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Xi)}}class ds extends as{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=os(this,t,e,0))?i:Xi)===Zi)return;const s=this._$AH,o=t===Xi&&s!==Xi||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==Xi&&(s===Xi||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class cs{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){os(this,t)}}const us=Pi.litHtmlPolyfillSupport;var ps;null==us||us(ss,ns),(null!=(ps=Pi.litHtmlVersions)?ps:Pi.litHtmlVersions=[]).push("3.3.1");const ms=(t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let n=r._$litPart$;if(void 0===n){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=n=new ns(e.insertBefore($i(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n
29
29
  /**
30
30
  * @license
31
31
  * Copyright 2017 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */};class vs extends Di{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ms(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return Zi}}var fs;vs._$litElement$=!0,vs.finalized=!0,null==(fs=globalThis.litElementHydrateSupport)||fs.call(globalThis,{LitElement:vs});const bs=globalThis.litElementPolyfillSupport;var gs;null==bs||bs({LitElement:vs}),(null!=(gs=globalThis.litElementVersions)?gs:globalThis.litElementVersions=[]).push("4.1.1");
33
+ */},vs=globalThis;class fs extends Di{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ms(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return Zi}}var bs;fs._$litElement$=!0,fs.finalized=!0,null==(bs=vs.litElementHydrateSupport)||bs.call(vs,{LitElement:fs});const gs=vs.litElementPolyfillSupport;var ys;null==gs||gs({LitElement:fs}),(null!=(ys=vs.litElementVersions)?ys:vs.litElementVersions=[]).push("4.2.1");
34
34
  /**
35
35
  * @license
36
36
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
37
37
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
38
38
  */
39
- const ys=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
39
+ const ws=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
40
40
  /**
41
41
  * @license
42
42
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
43
43
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
44
- */,ws=[],_s=new Set,xs=new Set;function ks(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Cs(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Ss(t){return t.map((t=>t.cssText)).join("\n")}const zs="vaadin-themable-mixin-style";function As(t){t.prototype instanceof vs?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(zs).textContent=Ss(t.getStylesForThis()),xs.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&As(i)}))}function Es(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof mi||(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,i):ws.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&xs.forEach((i=>{if(Cs(t,i)&&function(t){return ks(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),As(t),function(t){_s.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof vs?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),fi(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(zs).textContent=e.prototype._template.content.getElementById(zs).textContent}(i):i||_s.delete(e)}))}(t)}}))}function Is(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ws}function Ts(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Ds(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Is().find((e=>e.moduleId===t));i?e.push(...Ds(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Ms(t){const e=`${t}-default-theme`,i=Is().filter((i=>i.moduleId!==e&&Cs(i.themeFor,t))).map((t=>ri(oi({},t),{styles:[...Ds(t),...t.styles],includePriority:Ts(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Is().filter((t=>t.moduleId===e))}const Ps=t=>class extends(ys(t)){constructor(){super(),_s.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&xs.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||ks(this)||function(t,e){const i=document.createElement("style");i.id=zs,i.textContent=Ss(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...Ms(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
44
+ */,_s=[],xs=new Set,ks=new Set;function Cs(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Ss(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function zs(t){return t.map((t=>t.cssText)).join("\n")}const As="vaadin-themable-mixin-style";function Es(t){t.prototype instanceof fs?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(As).textContent=zs(t.getStylesForThis()),ks.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Es(i)}))}function Is(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof mi||(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,i):_s.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&ks.forEach((i=>{if(Ss(t,i)&&function(t){return Cs(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Es(t),function(t){xs.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof fs?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),fi(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(As).textContent=e.prototype._template.content.getElementById(As).textContent}(i):i||xs.delete(e)}))}(t)}}))}function Ts(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():_s}function Ds(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Ms(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Ts().find((e=>e.moduleId===t));i?e.push(...Ms(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Ps(t){const e=`${t}-default-theme`,i=Ts().filter((i=>i.moduleId!==e&&Ss(i.themeFor,t))).map((t=>ri(oi({},t),{styles:[...Ms(t),...t.styles],includePriority:Ds(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Ts().filter((t=>t.moduleId===e))}const Fs=t=>class extends(ws(t)){constructor(){super(),xs.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&ks.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Cs(this)||function(t,e){const i=document.createElement("style");i.id=As,i.textContent=zs(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...Ps(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
45
45
  /**
46
46
  * @license
47
47
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
48
48
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
49
- */,Fs=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Fs("color-props",vi`
49
+ */,Os=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Os("color-props",vi`
50
50
  :host {
51
51
  /* Base (background) */
52
52
  --lumo-base-color: #fff;
@@ -131,7 +131,7 @@ const ys=t=>class extends t{static get properties(){return{_theme:{type:String,r
131
131
  --lumo-disabled-text-color: GrayText;
132
132
  }
133
133
  }
134
- `),Es("",vi`
134
+ `),Is("",vi`
135
135
  [theme~='dark'] {
136
136
  /* Base (background) */
137
137
  --lumo-base-color: hsl(214, 35%, 21%);
@@ -249,7 +249,7 @@ const ys=t=>class extends t{static get properties(){return{_theme:{type:String,r
249
249
  pre code {
250
250
  background: transparent;
251
251
  }
252
- `,{moduleId:"lumo-color"}),Fs("font-icons",vi`
252
+ `,{moduleId:"lumo-color"}),Os("font-icons",vi`
253
253
  @font-face {
254
254
  font-family: 'lumo-icons';
255
255
  src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)
@@ -302,7 +302,7 @@ const ys=t=>class extends t{static get properties(){return{_theme:{type:String,r
302
302
  --lumo-icons-upload: '\\ea29';
303
303
  --lumo-icons-user: '\\ea2a';
304
304
  }
305
- `),Fs("sizing-props",vi`
305
+ `),Os("sizing-props",vi`
306
306
  :host {
307
307
  --lumo-size-xs: 1.625rem;
308
308
  --lumo-size-s: 1.875rem;
@@ -317,7 +317,7 @@ const ys=t=>class extends t{static get properties(){return{_theme:{type:String,r
317
317
  /* For backwards compatibility */
318
318
  --lumo-icon-size: var(--lumo-icon-size-m);
319
319
  }
320
- `),Fs("spacing-props",vi`
320
+ `),Os("spacing-props",vi`
321
321
  :host {
322
322
  /* Square */
323
323
  --lumo-space-xs: 0.25rem;
@@ -423,7 +423,7 @@ const ys=t=>class extends t{static get properties(){return{_theme:{type:String,r
423
423
  --vaadin-input-field-value-font-size: var(--lumo-font-size-m);
424
424
  --vaadin-input-field-value-font-weight: 500;
425
425
  }
426
- `,Fs("style-props",vi`
426
+ `,Os("style-props",vi`
427
427
  :host {
428
428
  /* Border radius */
429
429
  --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
@@ -446,7 +446,7 @@ const ys=t=>class extends t{static get properties(){return{_theme:{type:String,r
446
446
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
447
447
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
448
448
  */
449
- const Os=vi`
449
+ const Ns=vi`
450
450
  :host {
451
451
  /* prettier-ignore */
452
452
  --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
@@ -466,7 +466,7 @@ const Os=vi`
466
466
  --lumo-line-height-s: 1.375;
467
467
  --lumo-line-height-m: 1.625;
468
468
  }
469
- `;Es("",vi`
469
+ `;Is("",vi`
470
470
  body,
471
471
  :host {
472
472
  font-family: var(--lumo-font-family);
@@ -558,7 +558,7 @@ const Os=vi`
558
558
  border-left: none;
559
559
  border-right: 2px solid var(--lumo-contrast-30pct);
560
560
  }
561
- `,{moduleId:"lumo-typography"}),Fs("typography-props",Os),Es("vaadin-checkbox",vi`
561
+ `,{moduleId:"lumo-typography"}),Os("typography-props",Ns),Is("vaadin-checkbox",vi`
562
562
  :host {
563
563
  color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
564
564
  font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
@@ -882,7 +882,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
882
882
  Code distributed by Google as part of the polymer project is also
883
883
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
884
884
  */
885
- let Ns,Bs,js=/(url\()([^)]*)(\))/g,Ls=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Vs(t,e){if(t&&Ls.test(t)||"//"===t)return t;if(void 0===Ns){Ns=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ns="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ns)try{return new URL(t,e).href}catch(e){return t}return Bs||(Bs=document.implementation.createHTMLDocument("temp"),Bs.base=Bs.createElement("base"),Bs.head.appendChild(Bs.base),Bs.anchor=Bs.createElement("a"),Bs.body.appendChild(Bs.anchor)),Bs.base.href=e,Bs.anchor.href=t,Bs.anchor.href||t}function $s(t,e){return t.replace(js,(function(t,i,s,o){return i+"'"+Vs(s.replace(/["']/g,""),e)+"'"+o}))}function Rs(t){return t.substring(0,t.lastIndexOf("/")+1)}
885
+ let Bs,js,Ls=/(url\()([^)]*)(\))/g,Vs=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function $s(t,e){if(t&&Vs.test(t)||"//"===t)return t;if(void 0===Bs){Bs=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Bs="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Bs)try{return new URL(t,e).href}catch(e){return t}return js||(js=document.implementation.createHTMLDocument("temp"),js.base=js.createElement("base"),js.head.appendChild(js.base),js.anchor=js.createElement("a"),js.body.appendChild(js.anchor)),js.base.href=e,js.anchor.href=t,js.anchor.href||t}function Rs(t,e){return t.replace(Ls,(function(t,i,s,o){return i+"'"+$s(s.replace(/["']/g,""),e)+"'"+o}))}function qs(t){return t.substring(0,t.lastIndexOf("/")+1)}
886
886
  /**
887
887
  @license
888
888
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -891,7 +891,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
891
891
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
892
892
  Code distributed by Google as part of the polymer project is also
893
893
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
894
- */const qs=!window.ShadyDOM||!window.ShadyDOM.inUse,Hs=qs&&"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 Ws=window.Polymer&&window.Polymer.rootPath||Rs(document.baseURI||window.location.href),Us=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Ys=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Gs=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Ks=window.Polymer&&window.Polymer.legacyOptimizations||!1,Qs=window.Polymer&&window.Polymer.legacyWarnings||!1,Js=window.Polymer&&window.Polymer.syncInitialRender||!1,Zs=window.Polymer&&window.Polymer.legacyUndefined||!1,Xs=window.Polymer&&window.Polymer.orderedComputed||!1,to=window.Polymer&&window.Polymer.removeNestedTemplates||!1,eo=window.Polymer&&window.Polymer.fastDomIf||!1,io=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,so=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,oo=0;const ro=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=oo++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
894
+ */const Hs=!window.ShadyDOM||!window.ShadyDOM.inUse,Ws=Hs&&"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 Us=window.Polymer&&window.Polymer.rootPath||qs(document.baseURI||window.location.href),Ys=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Gs=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Ks=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Qs=window.Polymer&&window.Polymer.legacyOptimizations||!1,Js=window.Polymer&&window.Polymer.legacyWarnings||!1,Zs=window.Polymer&&window.Polymer.syncInitialRender||!1,Xs=window.Polymer&&window.Polymer.legacyUndefined||!1,to=window.Polymer&&window.Polymer.orderedComputed||!1,eo=window.Polymer&&window.Polymer.removeNestedTemplates||!1,io=window.Polymer&&window.Polymer.fastDomIf||!1,so=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,oo=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,ro=0;const no=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=ro++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
895
895
  /**
896
896
  @license
897
897
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -900,7 +900,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
900
900
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
901
901
  Code distributed by Google as part of the polymer project is also
902
902
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
903
- */let no={},ao={};function lo(t,e){no[t]=ao[t.toLowerCase()]=e}function ho(t){return no[t]||ao[t.toLowerCase()]}class co extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ho(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Vs(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Rs(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Ys&&void 0!==ho(t))throw lo(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,lo(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}co.prototype.modules=no,customElements.define("dom-module",co);
903
+ */let ao={},lo={};function ho(t,e){ao[t]=lo[t.toLowerCase()]=e}function co(t){return ao[t]||lo[t.toLowerCase()]}class uo extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=co(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=$s(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=qs(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Gs&&void 0!==co(t))throw ho(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,ho(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}uo.prototype.modules=ao,customElements.define("dom-module",uo);
904
904
  /**
905
905
  @license
906
906
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -910,7 +910,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
910
910
  Code distributed by Google as part of the polymer project is also
911
911
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
912
912
  */
913
- const uo="link[rel=import][type~=css]",po="include",mo="shady-unscoped";function vo(t){return co.import(t)}function fo(t){const e=$s((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function bo(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...go(e[t]));return i}function go(t){const e=vo(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...wo(e));const i=e.querySelector("template");i&&t.push(...yo(i,e.assetpath)),e._styles=t}return e._styles}function yo(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(po);r&&i.push(...bo(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=$s(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function wo(t){const e=[],i=t.querySelectorAll(uo);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(mo);if(i&&!t._unscopedStyle){const e=fo(t);e.setAttribute(mo,""),t._unscopedStyle=e}else t._style||(t._style=fo(t));e.push(i?t._unscopedStyle:t._style)}}return e}
913
+ const po="link[rel=import][type~=css]",mo="include",vo="shady-unscoped";function fo(t){return uo.import(t)}function bo(t){const e=Rs((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function go(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...yo(e[t]));return i}function yo(t){const e=fo(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(..._o(e));const i=e.querySelector("template");i&&t.push(...wo(i,e.assetpath)),e._styles=t}return e._styles}function wo(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(mo);r&&i.push(...go(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Rs(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function _o(t){const e=[],i=t.querySelectorAll(po);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(vo);if(i&&!t._unscopedStyle){const e=bo(t);e.setAttribute(vo,""),t._unscopedStyle=e}else t._style||(t._style=bo(t));e.push(i?t._unscopedStyle:t._style)}}return e}
914
914
  /**
915
915
  @license
916
916
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -919,7 +919,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
919
919
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
920
920
  Code distributed by Google as part of the polymer project is also
921
921
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
922
- */const _o=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t
922
+ */const xo=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t
923
923
  /**
924
924
  @license
925
925
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -928,7 +928,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
928
928
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
929
929
  Code distributed by Google as part of the polymer project is also
930
930
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
931
- */;function xo(t){return t.indexOf(".")>=0}function ko(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Co(t,e){return 0===t.indexOf(e+".")}function So(t,e){return 0===e.indexOf(t+".")}function zo(t,e,i){return e+i.slice(t.length)}function Ao(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Eo(t){return Array.isArray(t)?Ao(t).split("."):t.toString().split(".")}function Io(t,e,i){let s=t,o=Eo(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function To(t,e,i){let s=t,o=Eo(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
931
+ */;function ko(t){return t.indexOf(".")>=0}function Co(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function So(t,e){return 0===t.indexOf(e+".")}function zo(t,e){return 0===e.indexOf(t+".")}function Ao(t,e,i){return e+i.slice(t.length)}function Eo(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Io(t){return Array.isArray(t)?Eo(t).split("."):t.toString().split(".")}function To(t,e,i){let s=t,o=Io(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Do(t,e,i){let s=t,o=Io(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
932
932
  /**
933
933
  @license
934
934
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -937,7 +937,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
937
937
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
938
938
  Code distributed by Google as part of the polymer project is also
939
939
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
940
- */const Do={},Mo=/-[a-z]/g,Po=/([A-Z])/g;function Fo(t){return Do[t]||(Do[t]=t.indexOf("-")<0?t:t.replace(Mo,(t=>t[1].toUpperCase())))}function Oo(t){return Do[t]||(Do[t]=t.replace(Po,"-$1").toLowerCase())}
940
+ */const Mo={},Po=/-[a-z]/g,Fo=/([A-Z])/g;function Oo(t){return Mo[t]||(Mo[t]=t.indexOf("-")<0?t:t.replace(Po,(t=>t[1].toUpperCase())))}function No(t){return Mo[t]||(Mo[t]=t.replace(Fo,"-$1").toLowerCase())}
941
941
  /**
942
942
  @license
943
943
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -946,7 +946,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
946
946
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
947
947
  Code distributed by Google as part of the polymer project is also
948
948
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
949
- */let No=0,Bo=0,jo=[],Lo=0,Vo=!1,$o=document.createTextNode("");new window.MutationObserver((function(){Vo=!1;const t=jo.length;for(let e=0;e<t;e++){let t=jo[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}jo.splice(0,t),Bo+=t})).observe($o,{characterData:!0});const Ro={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)}},qo={run:t=>(Vo||(Vo=!0,$o.textContent=Lo++),jo.push(t),No++),cancel(t){const e=t-Bo;if(e>=0){if(!jo[e])throw new Error("invalid async handle: "+t);jo[e]=null}}},Ho=qo,Wo=ro((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ho.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return!!e}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);("class"===i||"name"===i||"slot"===i)&&(t=_o(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Uo={};
949
+ */let Bo=0,jo=0,Lo=[],Vo=0,$o=!1,Ro=document.createTextNode("");new window.MutationObserver((function(){$o=!1;const t=Lo.length;for(let e=0;e<t;e++){let t=Lo[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Lo.splice(0,t),jo+=t})).observe(Ro,{characterData:!0});const qo={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)}},Ho={run:t=>($o||($o=!0,Ro.textContent=Vo++),Lo.push(t),Bo++),cancel(t){const e=t-jo;if(e>=0){if(!Lo[e])throw new Error("invalid async handle: "+t);Lo[e]=null}}},Wo=Ho,Uo=no((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Wo.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return!!e}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);("class"===i||"name"===i||"slot"===i)&&(t=xo(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Yo={};
950
950
  /**
951
951
  @license
952
952
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -955,7 +955,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
955
955
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
956
956
  Code distributed by Google as part of the polymer project is also
957
957
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
958
- */let Yo=HTMLElement.prototype;for(;Yo;){let t=Object.getOwnPropertyNames(Yo);for(let e=0;e<t.length;e++)Uo[t[e]]=!0;Yo=Object.getPrototypeOf(Yo)}const Go=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Ko=ro((t=>{const e=Wo(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Fo(t[e]))}static attributeNameForProperty(t){return Oo(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Go(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){(function(t,e){if(!Uo[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}})(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return!(!this.__dataPending||!(t in this.__dataPending))}}})),Qo={"dom-if":!0,"dom-repeat":!0};let Jo=!1,Zo=!1;const Xo=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function tr(t){let e=t.getAttribute("is");if(e&&Qo[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];Xo(t,i,e),i.removeAttribute(e)}}return t}function er(t,e){let i=e.parentInfo&&er(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function ir(t,e,i,s){s.id&&(e[s.id]=i)}function sr(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function or(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const rr=ro((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=!!e,i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Jo){Jo=!0;const t=document.createElement("textarea");t.placeholder="a",Zo=t.placeholder===t.textContent}return Zo})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=tr(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=er(s,t);ir(0,s.$,i,t),or(0,i,t,e),sr(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
958
+ */let Go=HTMLElement.prototype;for(;Go;){let t=Object.getOwnPropertyNames(Go);for(let e=0;e<t.length;e++)Yo[t[e]]=!0;Go=Object.getPrototypeOf(Go)}const Ko=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Qo=no((t=>{const e=Uo(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Oo(t[e]))}static attributeNameForProperty(t){return No(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Ko(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){(function(t,e){if(!Yo[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}})(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return!(!this.__dataPending||!(t in this.__dataPending))}}})),Jo={"dom-if":!0,"dom-repeat":!0};let Zo=!1,Xo=!1;const tr=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function er(t){let e=t.getAttribute("is");if(e&&Jo[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];tr(t,i,e),i.removeAttribute(e)}}return t}function ir(t,e){let i=e.parentInfo&&ir(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function sr(t,e,i,s){s.id&&(e[s.id]=i)}function or(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function rr(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const nr=no((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=!!e,i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Zo){Zo=!0;const t=document.createElement("textarea");t.placeholder="a",Xo=t.placeholder===t.textContent}return Xo})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=er(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=ir(s,t);sr(0,s.$,i,t),rr(0,i,t,e),or(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
959
959
  /**
960
960
  * @fileoverview
961
961
  * @suppress {checkPrototypalTypes}
@@ -966,7 +966,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
966
966
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
967
967
  * Google as part of the polymer project is also subject to an additional IP
968
968
  * rights grant found at http://polymer.github.io/PATENTS.txt
969
- */let nr=0;const ar=[],lr={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},hr="__computeInfo",dr=/[A-Z]/;function cr(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function ur(t,e,i,s,o,r){if(e){let n=!1;const a=nr++;for(let l in i){let h=e[o?ko(l):l];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==a)&&(!o||mr(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function pr(t,e,i,s,o,r,n,a){let l=!1,h=e[n?ko(s):s];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==i)&&(!n||mr(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function mr(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Co(i,t))||!(!e.wildcard||!So(i,t))}return!0}function vr(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function fr(t,e,i){let s=ko(e);return s!==e&&(br(t,Oo(s)+"-changed",i[e],e),!0)}function br(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),_o(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function gr(t,e,i,s,o,r){let n=(r?ko(e):e)!=e?e:null,a=n?Io(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),br(t,o.eventName,a,n)}function yr(t,e,i,s,o){let r=t.__data[e];Us&&(r=Us(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const wr=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},_r=(t,e,i,s,o)=>{const r=e[o?ko(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun!==nr&&(!o||mr(t,n.trigger))&&(n.info.lastRun=nr,wr(n.info,i,s))}};function xr(t,e,i,s,o){let r=Ir(t,e,i,0,o);if(r===ar)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function kr(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Oo(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Cr(t,e,a,s,l)}}function Cr(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Nr(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Sr,info:n,trigger:s})}}}function Sr(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=zo(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==ar&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),Us&&(o=Us(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[lr.READ_ONLY]||!e[lr.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function zr(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=_o(t)),t[r]=e.literal)}}function Ar(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=zo(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,(!e[lr.READ_ONLY]||!e[lr.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Er(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Ir(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===ar?ar:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Tr=[],Dr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Mr="(?:("+Dr+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Pr=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Dr+"\\s*(?:\\(\\s*(?:(?:"+Mr+"(?:,\\s*"+Mr+")*)?)\\)\\s*)?)(?:]]|}})","g");function Fr(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Or(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Tr};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Nr(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Nr(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ko(e),i.structured=xo(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Br(t,e,i){let s=Io(t,i);return void 0===s&&(s=e[i]),s}function jr(t,e,i,s){const o={indexSplices:s};Zs&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Zs&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Lr(t,e,i,s,o,r){jr(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Vr=ro((t=>{const e=rr(Ko(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return lr}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if($r.length){let t=$r[$r.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[lr.READ_ONLY];for(let i in t)(!e||!e[i])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==lr.READ_ONLY);let s=cr(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=cr(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,lr.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,lr.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,lr.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,lr.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||ko(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Io(this,t);if(!(t=To(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];So(r,e)?(o=zo(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):So(n,e)&&(o=zo(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=_o(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xo(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[lr.NOTIFY]&&this[lr.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)(e||!this[lr.READ_ONLY]||!this[lr.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[lr.COMPUTE];if(o)if(Xs){nr++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[lr.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[hr],i={},s=t[lr.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)_r(t,o,n,r,s);let a;for(;a=n.shift();)xr(t,"",e,0,a)&&_r(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;ur(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),ur(this,this[lr.REFLECT],e,i,o),ur(this,this[lr.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[lr.NOTIFY],l=nr++;for(let n in e)e[n]&&(a&&pr(t,a,l,n,i,s,o)||o&&fr(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[lr.PROPAGATE]&&ur(this,this[lr.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{ur(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ao(t),e=Ao(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ao(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};jr(this,Io(this,t,i),i.path,e)}get(t,e){return Io(e||this,t)}set(t,e,i){i?To(i,t,e):(!this[lr.READ_ONLY]||!this[lr.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Io(this,t,i),o=s.length,r=s.push(...e);return e.length&&Lr(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Io(this,t,e),s=!!i.length,o=i.pop();return s&&Lr(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Io(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Lr(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Io(this,t,e),s=!!i.length,o=i.shift();return s&&Lr(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Io(this,t,i),o=s.unshift(...e);return e.length&&Lr(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Io(this,t,s),i=s.path}else i=Array.isArray(t)?Ao(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,lr.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,lr.OBSERVE,{fn:vr,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,lr.OBSERVE,{fn:vr,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Or(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Er(this,i,lr.OBSERVE,Ir,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,lr.NOTIFY,{fn:gr,info:{eventName:Oo(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,lr.REFLECT,{fn:yr,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Or(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Er(this,s,lr.COMPUTE,xr,t,i);cr(this,hr)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:d}=t[r];if(!d)if(l){const t=So(n,e),o=Br(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Io(s,n):o}}else h=a?Br(s,i,n):s[n];if(Zs&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ar;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),$r.push(this);let i=super._stampTemplate(t,e);if($r.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];zr(o,i),Ar(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];_o(_o(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Fr(e)||" ",kr(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";dr.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Fr(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Fo(o)),kr(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;to&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(eo&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),to||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)kr(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Pr.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",d=-1;"{"==r&&(d=a.indexOf("::"))>0&&(h=a.substring(d+2),a=a.substring(0,d),l=!0);let c=Or(a),u=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(u.push(i),c.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:c,dependencies:u,event:h}),o=Pr.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Ir(t,i,s,0,e.signature):i!=e.source?Io(t,e.source):r&&xo(i)?Io(t,i):t.__data[i],e.negate&&(n=!n),n}}})),$r=[],Rr=ro((t=>{const e=Wo(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
969
+ */let ar=0;const lr=[],hr={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},dr="__computeInfo",cr=/[A-Z]/;function ur(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function pr(t,e,i,s,o,r){if(e){let n=!1;const a=ar++;for(let l in i){let h=e[o?Co(l):l];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==a)&&(!o||vr(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function mr(t,e,i,s,o,r,n,a){let l=!1,h=e[n?Co(s):s];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==i)&&(!n||vr(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function vr(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!So(i,t))||!(!e.wildcard||!zo(i,t))}return!0}function fr(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function br(t,e,i){let s=Co(e);return s!==e&&(gr(t,No(s)+"-changed",i[e],e),!0)}function gr(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),xo(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function yr(t,e,i,s,o,r){let n=(r?Co(e):e)!=e?e:null,a=n?To(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),gr(t,o.eventName,a,n)}function wr(t,e,i,s,o){let r=t.__data[e];Ys&&(r=Ys(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const _r=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},xr=(t,e,i,s,o)=>{const r=e[o?Co(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun!==ar&&(!o||vr(t,n.trigger))&&(n.info.lastRun=ar,_r(n.info,i,s))}};function kr(t,e,i,s,o){let r=Tr(t,e,i,0,o);if(r===lr)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function Cr(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||No(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Sr(t,e,a,s,l)}}function Sr(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Br(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:zr,info:n,trigger:s})}}}function zr(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=Ao(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==lr&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),Ys&&(o=Ys(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[hr.READ_ONLY]||!e[hr.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Ar(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=xo(t)),t[r]=e.literal)}}function Er(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=Ao(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,(!e[hr.READ_ONLY]||!e[hr.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Ir(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Tr(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===lr?lr:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Dr=[],Mr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Pr="(?:("+Mr+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Fr=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Mr+"\\s*(?:\\(\\s*(?:(?:"+Pr+"(?:,\\s*"+Pr+")*)?)\\)\\s*)?)(?:]]|}})","g");function Or(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Nr(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Dr};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Br(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Br(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=Co(e),i.structured=ko(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function jr(t,e,i){let s=To(t,i);return void 0===s&&(s=e[i]),s}function Lr(t,e,i,s){const o={indexSplices:s};Xs&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Xs&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Vr(t,e,i,s,o,r){Lr(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const $r=no((t=>{const e=nr(Qo(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return hr}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Rr.length){let t=Rr[Rr.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[hr.READ_ONLY];for(let i in t)(!e||!e[i])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==hr.READ_ONLY);let s=ur(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=ur(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,hr.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,hr.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,hr.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,hr.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Co(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=To(this,t);if(!(t=Do(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];zo(r,e)?(o=Ao(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):zo(n,e)&&(o=Ao(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=xo(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ko(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[hr.NOTIFY]&&this[hr.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)(e||!this[hr.READ_ONLY]||!this[hr.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[hr.COMPUTE];if(o)if(to){ar++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[hr.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[dr],i={},s=t[hr.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)xr(t,o,n,r,s);let a;for(;a=n.shift();)kr(t,"",e,0,a)&&xr(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;pr(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),pr(this,this[hr.REFLECT],e,i,o),pr(this,this[hr.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[hr.NOTIFY],l=ar++;for(let n in e)e[n]&&(a&&mr(t,a,l,n,i,s,o)||o&&br(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[hr.PROPAGATE]&&pr(this,this[hr.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{pr(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Eo(t),e=Eo(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Eo(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Lr(this,To(this,t,i),i.path,e)}get(t,e){return To(e||this,t)}set(t,e,i){i?Do(i,t,e):(!this[hr.READ_ONLY]||!this[hr.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=To(this,t,i),o=s.length,r=s.push(...e);return e.length&&Vr(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=To(this,t,e),s=!!i.length,o=i.pop();return s&&Vr(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=To(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Vr(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=To(this,t,e),s=!!i.length,o=i.shift();return s&&Vr(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=To(this,t,i),o=s.unshift(...e);return e.length&&Vr(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=To(this,t,s),i=s.path}else i=Array.isArray(t)?Eo(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,hr.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,hr.OBSERVE,{fn:fr,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,hr.OBSERVE,{fn:fr,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Nr(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ir(this,i,hr.OBSERVE,Tr,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,hr.NOTIFY,{fn:yr,info:{eventName:No(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,hr.REFLECT,{fn:wr,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Nr(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Ir(this,s,hr.COMPUTE,kr,t,i);ur(this,dr)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:d}=t[r];if(!d)if(l){const t=zo(n,e),o=jr(s,i,t?e:n);h={path:t?e:n,value:o,base:t?To(s,n):o}}else h=a?jr(s,i,n):s[n];if(Xs&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return lr;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Rr.push(this);let i=super._stampTemplate(t,e);if(Rr.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ar(o,i),Er(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];xo(xo(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Or(e)||" ",Cr(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";cr.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Or(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Oo(o)),Cr(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;eo&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(io&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),eo||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Cr(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Fr.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",d=-1;"{"==r&&(d=a.indexOf("::"))>0&&(h=a.substring(d+2),a=a.substring(0,d),l=!0);let c=Nr(a),u=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(u.push(i),c.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:c,dependencies:u,event:h}),o=Fr.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Tr(t,i,s,0,e.signature):i!=e.source?To(t,e.source):r&&ko(i)?To(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Rr=[],qr=no((t=>{const e=Uo(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
970
970
  /**
971
971
  @license
972
972
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -985,7 +985,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
985
985
  Code distributed by Google as part of the polymer project is also
986
986
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
987
987
  */
988
- function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),qr=window.ShadyCSS&&window.ShadyCSS.cssBuild,Hr=ro((t=>{const e=Rr(Vr(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Ks||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Ys||Gs)&&(e=co.import(t,"template"),Ys&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Rs(t.url);else{const t=co.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Ws,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return $s(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!qr){const o=e.content.querySelectorAll("style"),r=yo(e),n=function(t){let e=vo(t);return e?wo(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),so&&qr&&Hs){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Vs(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=_o(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Js&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Vs(this.importPath)),Vs(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return Qs&&!(i in this._properties)&&!(s.info.part.signature&&s.info.part.signature.static)&&!s.info.part.hostProp&&!t.nestedTemplate&&console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Wr=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Ur{constructor(t,e){Kr(t,e);const i=e.reduce(((e,i,s)=>e+Yr(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Yr(t){if(t instanceof Ur)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Gr=function(t,...e){Kr(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Ur)return Yr(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Wr&&(s=Wr.createHTML(s)),i.innerHTML=s,i},Kr=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Qr=Hr(HTMLElement),Jr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Zr=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
988
+ function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Hr=window.ShadyCSS&&window.ShadyCSS.cssBuild,Wr=no((t=>{const e=qr($r(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Qs||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Gs||Ks)&&(e=uo.import(t,"template"),Gs&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=qs(t.url);else{const t=uo.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Us,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Rs(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Hr){const o=e.content.querySelectorAll("style"),r=wo(e),n=function(t){let e=fo(t);return e?_o(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),oo&&Hr&&Ws){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?$s(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=xo(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Zs&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=$s(this.importPath)),$s(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return Js&&!(i in this._properties)&&!(s.info.part.signature&&s.info.part.signature.static)&&!s.info.part.hostProp&&!t.nestedTemplate&&console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Ur=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Yr{constructor(t,e){Qr(t,e);const i=e.reduce(((e,i,s)=>e+Gr(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Gr(t){if(t instanceof Yr)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Kr=function(t,...e){Qr(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Yr)return Gr(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ur&&(s=Ur.createHTML(s)),i.innerHTML=s,i},Qr=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Jr=Wr(HTMLElement),Zr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Xr=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
989
989
  /**
990
990
  @license
991
991
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -994,7 +994,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
994
994
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
995
995
  Code distributed by Google as part of the polymer project is also
996
996
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
997
- */function Xr(t,e){if("function"!=typeof t)return;const i=Jr.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function tn(){
997
+ */function tn(t,e){if("function"!=typeof t)return;const i=Zr.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function en(){
998
998
  /*! vaadin-dev-mode:start
999
999
  (function () {
1000
1000
  'use strict';
@@ -1473,7 +1473,7 @@ try {
1473
1473
 
1474
1474
  }());
1475
1475
 
1476
- vaadin-dev-mode:end **/}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&&(Zr?!(Zr&&Object.keys(Zr).map((t=>Zr[t])).filter((t=>t.productionMode)).length>0):!Xr((function(){return!0})))}catch(t){return!1}}());
1476
+ vaadin-dev-mode:end **/}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&&(Xr?!(Xr&&Object.keys(Xr).map((t=>Xr[t])).filter((t=>t.productionMode)).length>0):!tn((function(){return!0})))}catch(t){return!1}}());
1477
1477
  /**
1478
1478
  * @license
1479
1479
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1483,7 +1483,7 @@ try {
1483
1483
  * Code distributed by Google as part of the polymer project is also
1484
1484
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1485
1485
  */
1486
- let en=0,sn=0;const on=[];let rn=!1;const nn={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)}},an={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},ln={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},hn={run(t){rn||(rn=!0,queueMicrotask((()=>function(){rn=!1;const t=on.length;for(let e=0;e<t;e++){const t=on[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}on.splice(0,t),sn+=t}()))),on.push(t);const e=en;return en+=1,e},cancel(t){const e=t-sn;if(e>=0){if(!on[e])throw new Error(`invalid async handle: ${t}`);on[e]=null}}},dn=new Set;
1486
+ let sn=0,on=0;const rn=[];let nn=!1;const an={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)}},ln={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},hn={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},dn={run(t){nn||(nn=!0,queueMicrotask((()=>function(){nn=!1;const t=rn.length;for(let e=0;e<t;e++){const t=rn[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}rn.splice(0,t),on+=t}()))),rn.push(t);const e=sn;return sn+=1,e},cancel(t){const e=t-on;if(e>=0){if(!rn[e])throw new Error(`invalid async handle: ${t}`);rn[e]=null}}},cn=new Set;
1487
1487
  /**
1488
1488
  @license
1489
1489
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1492,43 +1492,43 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1492
1492
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1493
1493
  Code distributed by Google as part of the polymer project is also
1494
1494
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1495
- */let cn=class t{static debounce(e,i,s){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,s),e}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,dn.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),dn.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}};function un(t){dn.add(t)}function pn(){const t=!!dn.size;return dn.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const mn=()=>{let t;do{t=pn()}while(t)},vn=[];
1495
+ */let un=class t{static debounce(e,i,s){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,s),e}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,cn.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),cn.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}};function pn(t){cn.add(t)}function mn(){const t=!!cn.size;return cn.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const vn=()=>{let t;do{t=mn()}while(t)},fn=[];
1496
1496
  /**
1497
1497
  * @license
1498
1498
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1499
1499
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1500
- */function fn(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function bn(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=bn();vn.forEach((e=>{fn(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const gn=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(),fn(this,bn(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=bn(),o=i===s&&-1===vn.indexOf(this),r=!i&&e&&-1===vn.indexOf(this);o||r?(this.__subscribe(),fn(this,s,i)):i!==s&&e===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=vn.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){"dir"===i&&""===e&&!t.hasAttribute("dir")||super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){vn.includes(this)||vn.push(this)}__unsubscribe(){vn.includes(this)&&vn.splice(vn.indexOf(this),1)}}
1500
+ */function bn(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function gn(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=gn();fn.forEach((e=>{bn(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const yn=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(),bn(this,gn(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=gn(),o=i===s&&-1===fn.indexOf(this),r=!i&&e&&-1===fn.indexOf(this);o||r?(this.__subscribe(),bn(this,s,i)):i!==s&&e===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=fn.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){"dir"===i&&""===e&&!t.hasAttribute("dir")||super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){fn.includes(this)||fn.push(this)}__unsubscribe(){fn.includes(this)&&fn.splice(fn.indexOf(this),1)}}
1501
1501
  /**
1502
1502
  * @license
1503
1503
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1504
1504
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1505
- */;let yn;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Xr(t,e)}(tn)};const wn=new Set,_n=t=>class extends(gn(t)){static finalize(){super.finalize();const{is:t}=this;t&&!wn.has(t)&&(window.Vaadin.registrations.push(this),wn.add(t),window.Vaadin.developmentModeCallback&&(yn=cn.debounce(yn,ln,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),un(yn)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1505
+ */;let wn;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)tn(t,e)}(en)};const _n=new Set,xn=t=>class extends(yn(t)){static finalize(){super.finalize();const{is:t}=this;t&&!_n.has(t)&&(window.Vaadin.registrations.push(this),_n.add(t),window.Vaadin.developmentModeCallback&&(wn=un.debounce(wn,hn,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),pn(wn)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1506
1506
  /**
1507
1507
  * @license
1508
1508
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1509
1509
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1510
- */;function xn(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...xn(t)))),e}function kn(t){return t?new Set(t.split(" ")):new Set}function Cn(t){return t?[...t].join(" "):""}function Sn(t,e,i){const s=kn(t.getAttribute(e));s.add(i),t.setAttribute(e,Cn(s))}
1510
+ */;function kn(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...kn(t)))),e}function Cn(t){return t?new Set(t.split(" ")):new Set}function Sn(t){return t?[...t].join(" "):""}function zn(t,e,i){const s=Cn(t.getAttribute(e));s.add(i),t.setAttribute(e,Sn(s))}
1511
1511
  /**
1512
1512
  * @license
1513
1513
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
1514
1514
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1515
1515
  */
1516
- class zn{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
1516
+ class An{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
1517
1517
  /**
1518
1518
  * @license
1519
1519
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1520
1520
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1521
- */let An=0;function En(){return An++}
1521
+ */let En=0;function In(){return En++}
1522
1522
  /**
1523
1523
  * @license
1524
1524
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1525
1525
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1526
- */class In extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${En()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||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();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}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=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new zn(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
1526
+ */class Tn extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${In()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||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();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}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=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new An(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
1527
1527
  /**
1528
1528
  * @license
1529
1529
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1530
1530
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1531
- */class Tn extends In{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
1531
+ */class Dn extends Tn{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
1532
1532
  /**
1533
1533
  @license
1534
1534
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1537,12 +1537,12 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1537
1537
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1538
1538
  Code distributed by Google as part of the polymer project is also
1539
1539
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1540
- */const Dn=!1,Mn=t=>t,Pn="string"==typeof document.head.style.touchAction,Fn="__polymerGestures",On="__polymerGesturesHandled",Nn="__polymerGesturesTouchAction",Bn=["mousedown","mousemove","mouseup","click"],jn=[0,1,4,2],Ln=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Vn(t){return Bn.indexOf(t)>-1}let $n=!1;function Rn(t){if(!Vn(t)&&"touchend"!==t&&Pn&&$n&&Dn)return{passive:!0}}!function(){try{const t=Object.defineProperty({},"passive",{get(){$n=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const qn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Hn={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Wn(t){const e=t.type;if(!Vn(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ln&&(e=jn[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const Un={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Yn(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Gn(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Kn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Qn={},Jn=[];function Zn(t){const e=Kn(t);return e.length>0?e[0]:t.target}function Xn(t){const e=t.type,i=t.currentTarget[Fn];if(!i)return;const s=i[e];if(!s)return;if(!t[On]&&(t[On]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Un.touch.id=i.identifier),Un.touch.id!==i.identifier)return;Pn||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Un.touch.x=e.clientX,Un.touch.y=e.clientY,Un.touch.scrollDecided=!1;else if("touchmove"===i){if(Un.touch.scrollDecided)return;Un.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Kn(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Nn]){e=t[Nn];break}return e}(t);let s=!1;const o=Math.abs(Un.touch.x-e.clientX),r=Math.abs(Un.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():oa("track")}}(t)}const o=t[On];if(!o.skip){for(let e,i=0;i<Jn.length;i++)e=Jn[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Jn.length;r++)i=Jn[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function ta(t,e,i){return!!Qn[e]&&(function(t,e,i){const s=Qn[e],o=s.deps,r=s.name;let n=t[Fn];n||(t[Fn]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],(!qn||!Vn(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Xn,Rn(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&ia(t,s.touchAction)}(t,e,i),!0)}function ea(t){Jn.push(t),t.emits.forEach((e=>{Qn[e]=t}))}function ia(t,e){Pn&&t instanceof HTMLElement&&hn.run((()=>{t.style.touchAction=e})),t[Nn]=e}function sa(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Mn(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function oa(t){const e=function(t){for(let e,i=0;i<Jn.length;i++){e=Jn[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function ra(t,e,i,s){e&&sa(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>oa(t)})}function na(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function aa(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),sa(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function la(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Zn(i||e);!r||Hn[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Zn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||sa(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
1540
+ */const Mn=t=>t,Pn="string"==typeof document.head.style.touchAction,Fn="__polymerGestures",On="__polymerGesturesHandled",Nn="__polymerGesturesTouchAction",Bn=["mousedown","mousemove","mouseup","click"],jn=[0,1,4,2],Ln=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Vn(t){return Bn.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const $n=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Rn={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function qn(t){const e=t.type;if(!Vn(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ln&&(e=jn[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const Hn={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Wn(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Un(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Yn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Gn={},Kn=[];function Qn(t){const e=Yn(t);return e.length>0?e[0]:t.target}function Jn(t){const e=t.type,i=t.currentTarget[Fn];if(!i)return;const s=i[e];if(!s)return;if(!t[On]&&(t[On]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Hn.touch.id=i.identifier),Hn.touch.id!==i.identifier)return;Pn||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Hn.touch.x=e.clientX,Hn.touch.y=e.clientY,Hn.touch.scrollDecided=!1;else if("touchmove"===i){if(Hn.touch.scrollDecided)return;Hn.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Yn(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Nn]){e=t[Nn];break}return e}(t);let s=!1;const o=Math.abs(Hn.touch.x-e.clientX),r=Math.abs(Hn.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():ia("track")}}(t)}const o=t[On];if(!o.skip){for(let e,i=0;i<Kn.length;i++)e=Kn[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Kn.length;r++)i=Kn[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function Zn(t,e,i){return!!Gn[e]&&(function(t,e,i){const s=Gn[e],o=s.deps,r=s.name;let n=t[Fn];n||(t[Fn]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],(!$n||!Vn(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Jn,void 0),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&ta(t,s.touchAction)}(t,e,i),!0)}function Xn(t){Kn.push(t),t.emits.forEach((e=>{Gn[e]=t}))}function ta(t,e){Pn&&t instanceof HTMLElement&&dn.run((()=>{t.style.touchAction=e})),t[Nn]=e}function ea(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Mn(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function ia(t){const e=function(t){for(let e,i=0;i<Kn.length;i++){e=Kn[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function sa(t,e,i,s){e&&ea(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>ia(t)})}function oa(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function ra(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),ea(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function na(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Qn(i||e);!r||Rn[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Qn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||ea(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
1541
1541
  /**
1542
1542
  * @license
1543
1543
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1544
1544
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1545
- */ea({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Gn(this.info)},mousedown(t){if(!Wn(t))return;const e=Zn(t),i=this;Yn(this.info,(t=>{Wn(t)||(ra("up",e,t),Gn(i.info))}),(t=>{Wn(t)&&ra("up",e,t),Gn(i.info)})),ra("down",e,t)},touchstart(t){ra("down",Zn(t),t.changedTouches[0],t)},touchend(t){ra("up",Zn(t),t.changedTouches[0],t)}}),ea({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Gn(this.info)},mousedown(t){if(!Wn(t))return;const e=Zn(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;na(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&oa("tap"),i.info.addMove({x:s,y:o}),Wn(t)||(i.info.state="end",Gn(i.info)),e&&aa(i.info,e,t),i.info.started=!0)};Yn(this.info,s,(t=>{i.info.started&&s(t),Gn(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Zn(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;na(this.info,s,o)&&("start"===this.info.state&&oa("tap"),this.info.addMove({x:s,y:o}),aa(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Zn(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),aa(this.info,e,i))}}),ea({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){Wn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Wn(t)&&la(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){la(this.info,t.changedTouches[0],t)}});const ha=ro((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),da=ro((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),ca=t=>class extends(ha(da(t))){get _activeKeys(){return[" "]}ready(){super.ready(),ta(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),ta(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
1545
+ */Xn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Un(this.info)},mousedown(t){if(!qn(t))return;const e=Qn(t),i=this;Wn(this.info,(t=>{qn(t)||(sa("up",e,t),Un(i.info))}),(t=>{qn(t)&&sa("up",e,t),Un(i.info)})),sa("down",e,t)},touchstart(t){sa("down",Qn(t),t.changedTouches[0],t)},touchend(t){sa("up",Qn(t),t.changedTouches[0],t)}}),Xn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Un(this.info)},mousedown(t){if(!qn(t))return;const e=Qn(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;oa(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&ia("tap"),i.info.addMove({x:s,y:o}),qn(t)||(i.info.state="end",Un(i.info)),e&&ra(i.info,e,t),i.info.started=!0)};Wn(this.info,s,(t=>{i.info.started&&s(t),Un(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Qn(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;oa(this.info,s,o)&&("start"===this.info.state&&ia("tap"),this.info.addMove({x:s,y:o}),ra(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Qn(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),ra(this.info,e,i))}}),Xn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){qn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){qn(t)&&na(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){na(this.info,t.changedTouches[0],t)}});const aa=no((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),la=no((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),ha=t=>class extends(aa(la(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Zn(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Zn(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
1546
1546
  /**
1547
1547
  * @license
1548
1548
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1552,64 +1552,64 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1552
1552
  * @license
1553
1553
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1554
1554
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1555
- */let ua=!1;function pa(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ma(){return ua}function va(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}function fa(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function ba(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)fa(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(ba(t.slice(0,i)),ba(t.slice(i)))}function ga(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||va(t)}function ya(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function wa(t){return t.getRootNode().activeElement===t}function _a(t,e){if(t.nodeType!==Node.ELEMENT_NODE||va(t))return!1;const i=t,s=function(t){if(!ya(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=_a(t,e)||o})),o}window.addEventListener("keydown",(()=>{ua=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{ua=!1}),{capture:!0});
1555
+ */let da=!1;function ca(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ua(){return da}function pa(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}function ma(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function va(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)ma(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(va(t.slice(0,i)),va(t.slice(i)))}function fa(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||pa(t)}function ba(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function ga(t){return t.getRootNode().activeElement===t}function ya(t,e){if(t.nodeType!==Node.ELEMENT_NODE||pa(t))return!1;const i=t,s=function(t){if(!ba(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=ya(t,e)||o})),o}window.addEventListener("keydown",(()=>{da=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{da=!1}),{capture:!0});
1556
1556
  /**
1557
1557
  * @license
1558
1558
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1559
1559
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1560
1560
  */
1561
- const xa=ro((t=>class extends t{get _keyboardActive(){return ma()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),ka=t=>class extends(ha(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
1561
+ const wa=no((t=>class extends t{get _keyboardActive(){return ua()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),_a=t=>class extends(aa(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
1562
1562
  /**
1563
1563
  * @license
1564
1564
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1565
1565
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1566
- */,Ca=ro((t=>class extends(xa(ka(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Sa=ro((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,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_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)}})),za=ro((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Aa=ro((t=>class extends(Sa(ha(za(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),Ea=new Map;
1566
+ */,xa=no((t=>class extends(wa(_a(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),ka=no((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,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_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)}})),Ca=no((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Sa=no((t=>class extends(ka(aa(Ca(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),za=new Map;
1567
1567
  /**
1568
1568
  * @license
1569
1569
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1570
1570
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1571
- */function Ia(t){return Ea.has(t)||Ea.set(t,new WeakMap),Ea.get(t)}function Ta(t,e){t&&t.removeAttribute(e)}function Da(t,e){if(!t||!e)return;const i=Ia(e);if(i.has(t))return;const s=kn(t.getAttribute(e));i.set(t,new Set(s))}function Ma(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=Ia(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):Da(t,e),Ta(t,e)),function(t,e,i){const s=kn(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Cn(s)):t.removeAttribute(e)}(t,e,o);const l=s||Cn(a);l&&Sn(t,e,l)}
1571
+ */function Aa(t){return za.has(t)||za.set(t,new WeakMap),za.get(t)}function Ea(t,e){t&&t.removeAttribute(e)}function Ia(t,e){if(!t||!e)return;const i=Aa(e);if(i.has(t))return;const s=Cn(t.getAttribute(e));i.set(t,new Set(s))}function Ta(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=Aa(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):Ia(t,e),Ea(t,e)),function(t,e,i){const s=Cn(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Sn(s)):t.removeAttribute(e)}(t,e,o);const l=s||Sn(a);l&&zn(t,e,l)}
1572
1572
  /**
1573
1573
  * @license
1574
1574
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1575
1575
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1576
1576
  */
1577
- class Pa{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){this.__target&&(t?(function(t,e){Da(t,e),Ta(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Ia(e),s=i.get(t);s&&0!==s.size?Sn(t,e,Cn(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Ma(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Ma(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Ma(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
1577
+ class Da{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){this.__target&&(t?(function(t,e){Ia(t,e),Ea(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Aa(e),s=i.get(t);s&&0!==s.size?zn(t,e,Sn(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Ta(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Ta(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Ta(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
1578
1578
  /**
1579
1579
  * @license
1580
1580
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1581
1581
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1582
- */const Fa=ro((t=>"function"==typeof t.prototype.addController?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)}})),Oa=document.createElement("div");
1582
+ */const Ma=no((t=>"function"==typeof t.prototype.addController?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)}})),Pa=document.createElement("div");
1583
1583
  /**
1584
1584
  * @license
1585
1585
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1586
1586
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1587
- */let Na;function Ba(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(Oa.removeAttribute("aria-live"),Oa.removeAttribute("role"),Na=cn.debounce(Na,an,(()=>{Oa.setAttribute("role","alert")}))):(Na&&Na.cancel(),Oa.removeAttribute("role"),Oa.setAttribute("aria-live",i)),Oa.textContent="",setTimeout((()=>{Oa.textContent=t}),s)}
1587
+ */let Fa;function Oa(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(Pa.removeAttribute("aria-live"),Pa.removeAttribute("role"),Fa=un.debounce(Fa,ln,(()=>{Pa.setAttribute("role","alert")}))):(Fa&&Fa.cancel(),Pa.removeAttribute("role"),Pa.setAttribute("aria-live",i)),Pa.textContent="",setTimeout((()=>{Pa.textContent=t}),s)}
1588
1588
  /**
1589
1589
  * @license
1590
1590
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1591
1591
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1592
- */Oa.style.position="fixed",Oa.style.clip="rect(0px, 0px, 0px, 0px)",Oa.setAttribute("aria-live","polite"),document.body.appendChild(Oa);class ja extends In{constructor(t,e,i,s={}){super(t,e,i,ri(oi({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
1592
+ */Pa.style.position="fixed",Pa.style.clip="rect(0px, 0px, 0px, 0px)",Pa.setAttribute("aria-live","polite"),document.body.appendChild(Pa);class Na extends Tn{constructor(t,e,i,s={}){super(t,e,i,ri(oi({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
1593
1593
  /**
1594
1594
  * @license
1595
1595
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1596
1596
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1597
- */class La extends ja{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=!(!i||!e||""===e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&Ba(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
1597
+ */class Ba extends Na{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=!(!i||!e||""===e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&Oa(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
1598
1598
  /**
1599
1599
  * @license
1600
1600
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1601
1601
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1602
- */class Va extends ja{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1602
+ */class ja extends Na{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1603
1603
  /**
1604
1604
  * @license
1605
1605
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1606
1606
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1607
- */class $a extends ja{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1607
+ */class La extends Na{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1608
1608
  /**
1609
1609
  * @license
1610
1610
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1611
1611
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1612
- */const Ra=ro((t=>class extends(Fa(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new $a(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),qa=ro((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),Ha=t=>class extends(qa(Ra(Fa(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Pa(this),this._helperController=new Va(this),this._errorController=new La(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
1612
+ */const Va=no((t=>class extends(Ma(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new La(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),$a=no((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),Ra=t=>class extends($a(Va(Ma(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Da(this),this._helperController=new ja(this),this._errorController=new Ba(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
1613
1613
  /**
1614
1614
  * @license
1615
1615
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1619,17 +1619,17 @@ class Pa{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1619
1619
  * @license
1620
1620
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1621
1621
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1622
- */class Wa extends In{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
1622
+ */class qa extends Tn{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
1623
1623
  /**
1624
1624
  * @license
1625
1625
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1626
1626
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1627
- */class Ua{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
1627
+ */class Ha{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
1628
1628
  /**
1629
1629
  * @license
1630
1630
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1631
1631
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1632
- */const Ya=t=>class extends(Ha(Aa(Ca(ca(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new Wa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ua(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
1632
+ */const Wa=t=>class extends(Ra(Sa(xa(ha(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new qa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ha(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
1633
1633
  /**
1634
1634
  * @license
1635
1635
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -1640,7 +1640,7 @@ class Pa{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1640
1640
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1641
1641
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1642
1642
  */
1643
- Es("vaadin-checkbox",vi`
1643
+ Is("vaadin-checkbox",vi`
1644
1644
  :host {
1645
1645
  display: inline-block;
1646
1646
  }
@@ -1728,7 +1728,7 @@ Es("vaadin-checkbox",vi`
1728
1728
  outline-width: 2px;
1729
1729
  }
1730
1730
  }
1731
- `,{moduleId:"vaadin-checkbox-styles"});class Ga extends(Ya(_n(Ps(Qr)))){static get is(){return"vaadin-checkbox"}static get template(){return Gr`
1731
+ `,{moduleId:"vaadin-checkbox-styles"});class Ua extends(Wa(xn(Fs(Jr)))){static get is(){return"vaadin-checkbox"}static get template(){return Kr`
1732
1732
  <div class="vaadin-checkbox-container">
1733
1733
  <div part="checkbox" aria-hidden="true"></div>
1734
1734
  <slot name="input"></slot>
@@ -1744,13 +1744,13 @@ Es("vaadin-checkbox",vi`
1744
1744
  </div>
1745
1745
  </div>
1746
1746
  <slot name="tooltip"></slot>
1747
- `}ready(){super.ready(),this._tooltipController=new Tn(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}li(Ga);
1747
+ `}ready(){super.ready(),this._tooltipController=new Dn(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}li(Ua);
1748
1748
  /**
1749
1749
  * @license
1750
1750
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1751
1751
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1752
1752
  */
1753
- const Ka=vi`
1753
+ const Ya=vi`
1754
1754
  :host {
1755
1755
  --_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
1756
1756
  }
@@ -1811,7 +1811,7 @@ const Ka=vi`
1811
1811
  * @license
1812
1812
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1813
1813
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1814
- */,Qa=vi`
1814
+ */,Ga=vi`
1815
1815
  [part='label'] {
1816
1816
  align-self: flex-start;
1817
1817
  color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
@@ -1923,7 +1923,7 @@ const Ka=vi`
1923
1923
  margin-left: 0;
1924
1924
  margin-right: calc(var(--lumo-border-radius-m) / 4);
1925
1925
  }
1926
- `;Es("",Qa,{moduleId:"lumo-required-field"}),Es("vaadin-checkbox-group",[Qa,Ka,vi`
1926
+ `;Is("",Ga,{moduleId:"lumo-required-field"}),Is("vaadin-checkbox-group",[Ga,Ya,vi`
1927
1927
  :host {
1928
1928
  color: var(--lumo-body-text-color);
1929
1929
  font-size: var(--lumo-font-size-m);
@@ -1972,7 +1972,7 @@ const Ka=vi`
1972
1972
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1973
1973
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1974
1974
  */
1975
- const Ja=t=>class extends(Ha(xa(ha(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Tn(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new zn(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
1975
+ const Ka=t=>class extends(Ra(wa(aa(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Dn(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new An(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
1976
1976
  /**
1977
1977
  * @license
1978
1978
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
@@ -1983,7 +1983,7 @@ const Ja=t=>class extends(Ha(xa(ha(t)))){static get properties(){return{value:{t
1983
1983
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1984
1984
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1985
1985
  */
1986
- Es("vaadin-checkbox-group",vi`
1986
+ Is("vaadin-checkbox-group",vi`
1987
1987
  :host {
1988
1988
  display: inline-flex;
1989
1989
  }
@@ -2012,7 +2012,7 @@ Es("vaadin-checkbox-group",vi`
2012
2012
  :host(:not([has-label])) [part='label'] {
2013
2013
  display: none;
2014
2014
  }
2015
- `,{moduleId:"vaadin-checkbox-group-styles"});class Za extends(Ja(_n(Ps(Qr)))){static get is(){return"vaadin-checkbox-group"}static get template(){return Gr`
2015
+ `,{moduleId:"vaadin-checkbox-group-styles"});class Qa extends(Ka(xn(Fs(Jr)))){static get is(){return"vaadin-checkbox-group"}static get template(){return Kr`
2016
2016
  <div class="vaadin-group-field-container">
2017
2017
  <div part="label">
2018
2018
  <slot name="label"></slot>
@@ -2033,13 +2033,13 @@ Es("vaadin-checkbox-group",vi`
2033
2033
  </div>
2034
2034
 
2035
2035
  <slot name="tooltip"></slot>
2036
- `}}li(Za);
2036
+ `}}li(Qa);
2037
2037
  /**
2038
2038
  * @license
2039
2039
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
2040
2040
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2041
2041
  */
2042
- const Xa=vi`
2042
+ const Ja=vi`
2043
2043
  :host {
2044
2044
  top: var(--lumo-space-m);
2045
2045
  right: var(--lumo-space-m);
@@ -2104,13 +2104,13 @@ const Xa=vi`
2104
2104
  opacity: 1;
2105
2105
  }
2106
2106
  }
2107
- `;Es("",Xa,{moduleId:"lumo-overlay"});
2107
+ `;Is("",Ja,{moduleId:"lumo-overlay"});
2108
2108
  /**
2109
2109
  * @license
2110
2110
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
2111
2111
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2112
2112
  */
2113
- const tl=vi`
2113
+ const Za=vi`
2114
2114
  :host([opening]),
2115
2115
  :host([closing]) {
2116
2116
  animation: 0.14s lumo-overlay-dummy-animation;
@@ -2140,7 +2140,7 @@ const tl=vi`
2140
2140
  opacity: 0;
2141
2141
  }
2142
2142
  }
2143
- `;Es("",tl,{moduleId:"lumo-menu-overlay-core"});const el=[Xa,tl,vi`
2143
+ `;Is("",Za,{moduleId:"lumo-menu-overlay-core"});const Xa=[Ja,Za,vi`
2144
2144
  /* Small viewport (bottom sheet) styles */
2145
2145
  /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
2146
2146
  @media (max-width: 450px), (max-height: 450px) {
@@ -2202,7 +2202,7 @@ const tl=vi`
2202
2202
  transform: translateY(150%);
2203
2203
  }
2204
2204
  }
2205
- `];Es("",el,{moduleId:"lumo-menu-overlay"}),Es("vaadin-date-picker-overlay",[el,vi`
2205
+ `];Is("",Xa,{moduleId:"lumo-menu-overlay"}),Is("vaadin-date-picker-overlay",[Xa,vi`
2206
2206
  [part='overlay'] {
2207
2207
  /*
2208
2208
  Width:
@@ -2247,7 +2247,7 @@ const tl=vi`
2247
2247
  max-height: 70vh;
2248
2248
  }
2249
2249
  }
2250
- `],{moduleId:"lumo-date-picker-overlay"});const il=vi`
2250
+ `],{moduleId:"lumo-date-picker-overlay"});const tl=vi`
2251
2251
  :host {
2252
2252
  /* Sizing */
2253
2253
  --lumo-button-size: var(--lumo-size-m);
@@ -2523,7 +2523,7 @@ const tl=vi`
2523
2523
  margin-left: 0;
2524
2524
  margin-right: 0;
2525
2525
  }
2526
- `;Es("vaadin-button",il,{moduleId:"lumo-button"}),Es("vaadin-date-picker-year",vi`
2526
+ `;Is("vaadin-button",tl,{moduleId:"lumo-button"}),Is("vaadin-date-picker-year",vi`
2527
2527
  :host([current]) [part='year-number'] {
2528
2528
  color: var(--lumo-primary-text-color);
2529
2529
  }
@@ -2547,7 +2547,7 @@ const tl=vi`
2547
2547
  color: var(--lumo-disabled-text-color);
2548
2548
  content: '\\2022';
2549
2549
  }
2550
- `,{moduleId:"lumo-date-picker-year"}),Es("vaadin-date-picker-overlay-content",vi`
2550
+ `,{moduleId:"lumo-date-picker-year"}),Is("vaadin-date-picker-overlay-content",vi`
2551
2551
  :host {
2552
2552
  position: relative;
2553
2553
  /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
@@ -2697,7 +2697,7 @@ const tl=vi`
2697
2697
  padding-left: 50px;
2698
2698
  }
2699
2699
  }
2700
- `,{moduleId:"lumo-date-picker-overlay-content"}),Es("vaadin-month-calendar",vi`
2700
+ `,{moduleId:"lumo-date-picker-overlay-content"}),Is("vaadin-month-calendar",vi`
2701
2701
  :host {
2702
2702
  -moz-user-select: none;
2703
2703
  -webkit-user-select: none;
@@ -2844,7 +2844,7 @@ const tl=vi`
2844
2844
  :host([disabled]) * {
2845
2845
  color: var(--lumo-disabled-text-color) !important;
2846
2846
  }
2847
- `,{moduleId:"lumo-month-calendar"}),Es("vaadin-input-container",vi`
2847
+ `,{moduleId:"lumo-month-calendar"}),Is("vaadin-input-container",vi`
2848
2848
  :host {
2849
2849
  background: var(--_background);
2850
2850
  padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
@@ -3028,7 +3028,7 @@ const tl=vi`
3028
3028
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3029
3029
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3030
3030
  */
3031
- const sl=vi`
3031
+ const el=vi`
3032
3032
  [part$='button'] {
3033
3033
  flex: none;
3034
3034
  width: 1em;
@@ -3055,13 +3055,13 @@ const sl=vi`
3055
3055
  font-family: 'lumo-icons';
3056
3056
  display: block;
3057
3057
  }
3058
- `;Es("",sl,{moduleId:"lumo-field-button"});
3058
+ `;Is("",el,{moduleId:"lumo-field-button"});
3059
3059
  /**
3060
3060
  * @license
3061
3061
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3062
3062
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3063
3063
  */
3064
- const ol=[Qa,sl,Ka,vi`
3064
+ const il=[Ga,el,Ya,vi`
3065
3065
  :host {
3066
3066
  --lumo-text-field-size: var(--lumo-size-m);
3067
3067
  color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
@@ -3192,7 +3192,7 @@ const ol=[Qa,sl,Ka,vi`
3192
3192
  [part='clear-button']::before {
3193
3193
  content: var(--lumo-icons-cross);
3194
3194
  }
3195
- `];Es("",ol,{moduleId:"lumo-input-field-shared-styles"}),Es("vaadin-date-picker",[ol,vi`
3195
+ `];Is("",il,{moduleId:"lumo-input-field-shared-styles"}),Is("vaadin-date-picker",[il,vi`
3196
3196
  [part='toggle-button']::before {
3197
3197
  content: var(--lumo-icons-calendar);
3198
3198
  }
@@ -3220,7 +3220,7 @@ const ol=[Qa,sl,Ka,vi`
3220
3220
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3221
3221
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3222
3222
  */
3223
- const rl=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
3223
+ const sl=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
3224
3224
  /**
3225
3225
  * @license
3226
3226
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -3231,7 +3231,7 @@ const rl=t=>class extends t{static get properties(){return{disabled:{type:Boolea
3231
3231
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3232
3232
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3233
3233
  */
3234
- Es("vaadin-input-container",vi`
3234
+ Is("vaadin-input-container",vi`
3235
3235
  :host {
3236
3236
  display: flex;
3237
3237
  align-items: center;
@@ -3296,17 +3296,17 @@ Es("vaadin-input-container",vi`
3296
3296
  /* Override default opacity in Firefox */
3297
3297
  opacity: 1;
3298
3298
  }
3299
- `,{moduleId:"vaadin-input-container-styles"});class nl extends(rl(Ps(gn(Qr)))){static get is(){return"vaadin-input-container"}static get template(){return Gr`
3299
+ `,{moduleId:"vaadin-input-container-styles"});class ol extends(sl(Fs(yn(Jr)))){static get is(){return"vaadin-input-container"}static get template(){return Kr`
3300
3300
  <slot name="prefix"></slot>
3301
3301
  <slot></slot>
3302
3302
  <slot name="suffix"></slot>
3303
- `}}li(nl);
3303
+ `}}li(ol);
3304
3304
  /**
3305
3305
  * @license
3306
3306
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3307
3307
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3308
3308
  */
3309
- const al=vi`
3309
+ const rl=vi`
3310
3310
  :host {
3311
3311
  z-index: 200;
3312
3312
  position: fixed;
@@ -3374,62 +3374,62 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3374
3374
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3375
3375
  Code distributed by Google as part of the polymer project is also
3376
3376
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3377
- */;let ll=!1,hl=[],dl=[];function cl(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function ul(t,e,i){ll||(ll=!0,requestAnimationFrame((function(){ll=!1,function(t){for(;t.length;)cl(t.shift())}(hl),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)cl(t.shift())}(dl)}))}))),dl.push([t,e,i])
3377
+ */;let nl=!1,al=[],ll=[];function hl(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function dl(t,e,i){nl||(nl=!0,requestAnimationFrame((function(){nl=!1,function(t){for(;t.length;)hl(t.shift())}(al),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)hl(t.shift())}(ll)}))}))),ll.push([t,e,i])
3378
3378
  /**
3379
3379
  * @license
3380
3380
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3381
3381
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3382
- */}const pl=t=>t.test(navigator.userAgent),ml=t=>t.test(navigator.platform);pl(/Android/u),pl(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),pl(/Firefox/u);const vl=ml(/^iPad/u)||ml(/^Mac/u)&&navigator.maxTouchPoints>1,fl=ml(/^iPhone/u)||vl,bl=pl(/^((?!chrome|android).)*safari/iu),gl=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
3382
+ */}const cl=t=>t.test(navigator.userAgent),ul=t=>t.test(navigator.platform);cl(/Android/u),cl(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),cl(/Firefox/u);const pl=ul(/^iPad/u)||ul(/^Mac/u)&&navigator.maxTouchPoints>1,ml=ul(/^iPhone/u)||pl,vl=cl(/^((?!chrome|android).)*safari/iu),fl=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
3383
3383
  /**
3384
3384
  * @license
3385
3385
  * Copyright (c) 2017 Anton Korzunov
3386
3386
  * SPDX-License-Identifier: MIT
3387
- */let yl=new WeakMap,wl=new WeakMap,_l={},xl=0;const kl=t=>t&&t.nodeType===Node.ELEMENT_NODE,Cl=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Sl=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>kl(t)?e.map((e=>{if(!kl(e))return Cl(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return Cl(e,"is not contained inside",t),null})).filter((t=>!!t)):(Cl(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);_l[i]||(_l[i]=new WeakMap);const r=_l[i],n=[],a=new Set,l=new Set(o),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.forEach(h);const d=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))d(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(yl.get(t)||0)+1,l=(r.get(t)||0)+1;yl.set(t,a),r.set(t,l),n.push(t),1===a&&o&&wl.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return d(e),a.clear(),xl+=1,()=>{n.forEach((t=>{const e=yl.get(t)-1,o=r.get(t)-1;yl.set(t,e),r.set(t,o),e||(wl.has(t)?wl.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),xl-=1,xl||(yl=new WeakMap,yl=new WeakMap,wl=new WeakMap,_l={})}})(s,e,i,"aria-hidden")
3387
+ */let bl=new WeakMap,gl=new WeakMap,yl={},wl=0;const _l=t=>t&&t.nodeType===Node.ELEMENT_NODE,xl=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},kl=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>_l(t)?e.map((e=>{if(!_l(e))return xl(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return xl(e,"is not contained inside",t),null})).filter((t=>!!t)):(xl(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);yl[i]||(yl[i]=new WeakMap);const r=yl[i],n=[],a=new Set,l=new Set(o),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.forEach(h);const d=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))d(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(bl.get(t)||0)+1,l=(r.get(t)||0)+1;bl.set(t,a),r.set(t,l),n.push(t),1===a&&o&&gl.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return d(e),a.clear(),wl+=1,()=>{n.forEach((t=>{const e=bl.get(t)-1,o=r.get(t)-1;bl.set(t,e),r.set(t,o),e||(gl.has(t)?gl.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),wl-=1,wl||(bl=new WeakMap,bl=new WeakMap,gl=new WeakMap,yl={})}})(s,e,i,"aria-hidden")
3388
3388
  /**
3389
3389
  * @license
3390
3390
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3391
3391
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3392
- */};class zl{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=Sl(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
3392
+ */};class Cl{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=kl(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
3393
3393
  /**
3394
3394
  * @license
3395
3395
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3396
3396
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3397
- */class Al{saveFocus(t){this.focusNode=t||pa()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;pa()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
3397
+ */class Sl{saveFocus(t){this.focusNode=t||ca()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;ca()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
3398
3398
  /**
3399
3399
  * @license
3400
3400
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3401
3401
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3402
- */const El=[];class Il{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return _a(t,e)?ba(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(wa).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");El.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,El.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(El).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
3402
+ */const zl=[];class Al{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return ya(t,e)?va(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(ga).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");zl.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,zl.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(zl).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
3403
3403
  /**
3404
3404
  * @license
3405
3405
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3406
3406
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3407
- */const Tl=t=>class extends(Fa(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new zl(this),this.__focusTrapController=new Il(this),this.__focusRestorationController=new Al}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!ma();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=pa();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
3407
+ */const El=t=>class extends(Ma(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Cl(this),this.__focusTrapController=new Al(this),this.__focusRestorationController=new Sl}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!ua();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ca();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
3408
3408
  /**
3409
3409
  * @license
3410
3410
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3411
3411
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3412
- */,Dl=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Ml=()=>Dl().filter((t=>t.$.overlay)),Pl=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Ml().pop())()}bringToFront(){let t="";const e=Dl().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ml().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Ml();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
3412
+ */,Il=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Tl=()=>Il().filter((t=>t.$.overlay)),Dl=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Tl().pop())()}bringToFront(){let t="";const e=Il().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Tl().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Tl();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
3413
3413
  /**
3414
3414
  * @license
3415
3415
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3416
3416
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3417
- */,Fl=t=>class extends(Tl(Pl(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),fl&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),ul(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
3417
+ */,Ml=t=>class extends(El(Dl(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),ml&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),dl(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
3418
3418
  /**
3419
3419
  * @license
3420
3420
  * Copyright (c) 2024 Vaadin Ltd.
3421
3421
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3422
- */,Ol={start:"top",end:"bottom"},Nl={start:"left",end:"right"},Bl=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),jl=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:d,height:c}=t.getBoundingClientRect();if(n||e(),!d||!c)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+d))}px ${-Math.floor(s.clientHeight-(h+c))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}
3422
+ */,Pl={start:"top",end:"bottom"},Fl={start:"left",end:"right"},Ol=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Nl=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:d,height:c}=t.getBoundingClientRect();if(n||e(),!d||!c)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+d))}px ${-Math.floor(s.clientHeight-(h+c))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}
3423
3423
  /**
3424
3424
  * @license
3425
3425
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3426
3426
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3427
- */(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Bl.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Bl.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Ol,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Nl,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Nl)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Ol)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Ol.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Nl.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),d=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:d,[a]:""}}}
3427
+ */(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Ol.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Ol.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Pl,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Fl,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Fl)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Pl)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Pl.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Fl.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),d=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:d,[a]:""}}}
3428
3428
  /**
3429
3429
  * @license
3430
3430
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
3431
3431
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3432
- */,Ll=t=>class extends(jl(Fl(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!ya(t.composedPath()[0])&&t.preventDefault()}}
3432
+ */,Bl=t=>class extends(Nl(Ml(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!ba(t.composedPath()[0])&&t.preventDefault()}}
3433
3433
  /**
3434
3434
  * @license
3435
3435
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3440,7 +3440,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3440
3440
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3441
3441
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3442
3442
  */
3443
- Es("vaadin-date-picker-overlay",[al,vi`
3443
+ Is("vaadin-date-picker-overlay",[rl,vi`
3444
3444
  [part='overlay'] {
3445
3445
  display: flex;
3446
3446
  flex: auto;
@@ -3455,20 +3455,20 @@ Es("vaadin-date-picker-overlay",[al,vi`
3455
3455
  outline: 3px solid;
3456
3456
  }
3457
3457
  }
3458
- `],{moduleId:"vaadin-date-picker-overlay-styles"});class Vl extends(Ll(gn(Ps(Qr)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Gr`
3458
+ `],{moduleId:"vaadin-date-picker-overlay-styles"});class jl extends(Bl(yn(Fs(Jr)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Kr`
3459
3459
  <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
3460
3460
  <div part="overlay" id="overlay">
3461
3461
  <div part="content" id="content">
3462
3462
  <slot></slot>
3463
3463
  </div>
3464
3464
  </div>
3465
- `}}li(Vl);
3465
+ `}}li(jl);
3466
3466
  /**
3467
3467
  * @license
3468
3468
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3469
3469
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3470
3470
  */
3471
- const $l=vi`
3471
+ const Ll=vi`
3472
3472
  :host {
3473
3473
  display: inline-block;
3474
3474
  position: relative;
@@ -3528,7 +3528,7 @@ const $l=vi`
3528
3528
  outline-color: GrayText;
3529
3529
  }
3530
3530
  }
3531
- `,Rl=t=>class extends(ca(ka(xa(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),!(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)&&this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
3531
+ `,Vl=t=>class extends(ha(_a(wa(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),!(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)&&this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
3532
3532
  /**
3533
3533
  * @license
3534
3534
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -3538,7 +3538,7 @@ const $l=vi`
3538
3538
  * @license
3539
3539
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3540
3540
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3541
- */Es("vaadin-button",$l,{moduleId:"vaadin-button-styles"});class ql extends(Rl(_n(Ps(Fa(Qr))))){static get is(){return"vaadin-button"}static get template(){return Gr`
3541
+ */Is("vaadin-button",Ll,{moduleId:"vaadin-button-styles"});class $l extends(Vl(xn(Fs(Ma(Jr))))){static get is(){return"vaadin-button"}static get template(){return Kr`
3542
3542
  <div class="vaadin-button-container">
3543
3543
  <span part="prefix" aria-hidden="true">
3544
3544
  <slot name="prefix"></slot>
@@ -3551,7 +3551,7 @@ const $l=vi`
3551
3551
  </span>
3552
3552
  </div>
3553
3553
  <slot name="tooltip"></slot>
3554
- `}ready(){super.ready(),this._tooltipController=new Tn(this),this.addController(this._tooltipController)}}function Hl(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function Wl(t,e,i=Hl){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function Ul(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function Yl(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(Ul(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function Gl(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function Kl(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function Ql(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}li(ql);
3554
+ `}ready(){super.ready(),this._tooltipController=new Dn(this),this.addController(this._tooltipController)}}function Rl(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function ql(t,e,i=Rl){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function Hl(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function Wl(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(Hl(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function Ul(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function Yl(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function Gl(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}li($l);
3555
3555
  /**
3556
3556
  @license
3557
3557
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3561,7 +3561,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3561
3561
  Code distributed by Google as part of the polymer project is also
3562
3562
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3563
3563
  */
3564
- class Jl{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,Zl.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Zl.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}static debounce(t,e,i){return t instanceof Jl?t._cancelAsync():t=new Jl,t.setConfig(e,i),t}}let Zl=new Set;const Xl=function(){const t=!!Zl.size;return Zl.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t
3564
+ class Kl{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,Ql.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Ql.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}static debounce(t,e,i){return t instanceof Kl?t._cancelAsync():t=new Kl,t.setConfig(e,i),t}}let Ql=new Set;const Jl=function(){const t=!!Ql.size;return Ql.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t
3565
3565
  /**
3566
3566
  @license
3567
3567
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3570,29 +3570,29 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3570
3570
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3571
3571
  Code distributed by Google as part of the polymer project is also
3572
3572
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3573
- */},th=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Xl()}while(t||e)},eh=document.createElement("template");eh.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class ih extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(eh.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),th()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=cn.debounce(this._debouncerScrollFinish,nn.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=cn.debounce(this._debouncerUpdateClones,nn.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${En()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3573
+ */},Zl=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Jl()}while(t||e)},Xl=document.createElement("template");Xl.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class th extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Xl.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Zl()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=un.debounce(this._debouncerScrollFinish,an.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=un.debounce(this._debouncerUpdateClones,an.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${In()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3574
3574
  /**
3575
3575
  * @license
3576
3576
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3577
3577
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3578
- */const sh=document.createElement("template");sh.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",li(class extends ih{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(sh.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Kl(e)}});
3578
+ */const eh=document.createElement("template");eh.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",li(class extends th{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(eh.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Yl(e)}});
3579
3579
  /**
3580
3580
  * @license
3581
3581
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3582
3582
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3583
3583
  */
3584
- const oh=document.createElement("template");oh.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",li(class extends ih{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(oh.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
3584
+ const ih=document.createElement("template");ih.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",li(class extends th{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(ih.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
3585
3585
  /**
3586
3586
  * @license
3587
3587
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3588
3588
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3589
3589
  */
3590
- const rh=t=>class extends t{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
3590
+ const sh=t=>class extends t{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
3591
3591
  /**
3592
3592
  * @license
3593
3593
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3594
3594
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3595
- */;class nh extends(Ps(rh(Qr))){static get is(){return"vaadin-date-picker-year"}static get template(){return Gr`
3595
+ */;class oh extends(Fs(sh(Jr))){static get is(){return"vaadin-date-picker-year"}static get template(){return Kr`
3596
3596
  <style>
3597
3597
  :host {
3598
3598
  display: block;
@@ -3611,7 +3611,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3611
3611
  Code distributed by Google as part of the polymer project is also
3612
3612
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3613
3613
  */
3614
- function ah(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}li(nh);const lh=ro((t=>class extends t{_shouldPropertyChange(t,e,i){return ah(this,t,e,i,!0)}})),hh=ro((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return ah(this,t,e,i,this.mutableData)}}));lh._mutablePropertyChange=ah;
3614
+ function rh(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}li(oh);const nh=no((t=>class extends t{_shouldPropertyChange(t,e,i){return rh(this,t,e,i,!0)}})),ah=no((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return rh(this,t,e,i,this.mutableData)}}));nh._mutablePropertyChange=rh;
3615
3615
  /**
3616
3616
  @license
3617
3617
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3621,7 +3621,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3621
3621
  Code distributed by Google as part of the polymer project is also
3622
3622
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3623
3623
  */
3624
- let dh=null;function ch(){return dh}ch.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:ch,writable:!0}});const uh=Vr(ch),ph=lh(uh),mh=Vr(class{});class vh extends mh{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(!!t!=!!s.__hideTemplateChildren__)if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),_o(_o(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&_o(_o(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const fh=lh(vh);function bh(t){let e=t.__dataHost;return e&&e._methodHost||e}function gh(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function yh(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function wh(t,e,i){if(Ys&&!bh(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:vh)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?fh:vh;wh.mixin&&(s=wh.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:yh(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=bh(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?ph:uh;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:gh(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);Qs&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)(function(t,e){dh=t,Object.setPrototypeOf(t,e.prototype),new e,dh=null})(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n}
3624
+ let lh=null;function hh(){return lh}hh.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:hh,writable:!0}});const dh=$r(hh),ch=nh(dh),uh=$r(class{});class ph extends uh{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(!!t!=!!s.__hideTemplateChildren__)if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),xo(xo(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&xo(xo(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const mh=nh(ph);function vh(t){let e=t.__dataHost;return e&&e._methodHost||e}function fh(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function bh(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function gh(t,e,i){if(Gs&&!vh(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:ph)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?mh:ph;gh.mixin&&(s=gh.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:bh(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=vh(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?ch:dh;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:fh(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);Js&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)(function(t,e){lh=t,Object.setPrototypeOf(t,e.prototype),new e,lh=null})(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n}
3625
3625
  /**
3626
3626
  @license
3627
3627
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3631,7 +3631,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3631
3631
  Code distributed by Google as part of the polymer project is also
3632
3632
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3633
3633
  */
3634
- let _h=!1;
3634
+ let yh=!1;
3635
3635
  /**
3636
3636
  @license
3637
3637
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3641,13 +3641,13 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3641
3641
  Code distributed by Google as part of the polymer project is also
3642
3642
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3643
3643
  */
3644
- const xh=hh(Qr);class kh extends xh{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!io,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Ks&&!qs){if(!_h){_h=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=_o(_o(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=wh(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||Co(t,e)||So(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=zo(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=Jl.debounce(this.__renderDebouncer,e>0?Ro.after(e):qo,t.bind(this)),Zl.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),th()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),(!io||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=_o(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return _o(_o(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=_o(e).parentNode;return null}(this.template,t)}}customElements.define(kh.is,kh);
3644
+ const wh=ah(Jr);class _h extends wh{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!so,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Qs&&!Hs){if(!yh){yh=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=xo(xo(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=gh(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||So(t,e)||zo(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=Ao(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=Kl.debounce(this.__renderDebouncer,e>0?qo.after(e):Ho,t.bind(this)),Ql.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Zl()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),(!so||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=xo(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return xo(xo(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=xo(e).parentNode;return null}(this.template,t)}}customElements.define(_h.is,_h);
3645
3645
  /**
3646
3646
  * @license
3647
3647
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3648
3648
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3649
3649
  */
3650
- const Ch=t=>class extends(xa(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>Wl(t.date,this.focusedDate)))}ready(){super.ready(),ta(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||Yl(s,e,i)||Yl(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>Wl(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return Wl(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")&&(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
3650
+ const xh=t=>class extends(wa(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>ql(t.date,this.focusedDate)))}ready(){super.ready(),Zn(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||Wl(s,e,i)||Wl(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>ql(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return ql(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")&&(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
3651
3651
  /**
3652
3652
  * @license
3653
3653
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3663,7 +3663,7 @@ const Ch=t=>class extends(xa(t)){static get properties(){return{month:{type:Obje
3663
3663
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3664
3664
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3665
3665
  */
3666
- Es("vaadin-month-calendar",vi`
3666
+ Is("vaadin-month-calendar",vi`
3667
3667
  :host {
3668
3668
  display: block;
3669
3669
  }
@@ -3719,7 +3719,7 @@ Es("vaadin-month-calendar",vi`
3719
3719
  outline: 3px solid;
3720
3720
  }
3721
3721
  }
3722
- `,{moduleId:"vaadin-month-calendar-styles"});class Sh extends(Ch(Ps(Qr))){static get template(){return Gr`
3722
+ `,{moduleId:"vaadin-month-calendar-styles"});class kh extends(xh(Fs(Jr))){static get template(){return Kr`
3723
3723
  <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
3724
3724
  <table
3725
3725
  id="monthGrid"
@@ -3761,18 +3761,18 @@ Es("vaadin-month-calendar",vi`
3761
3761
  </template>
3762
3762
  </tbody>
3763
3763
  </table>
3764
- `}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,o,r){const n=["date"],a=t>Hl(new Date),l=t<Hl(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return Wl(t,e)}__isDaySelected(t,e){return Wl(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!Yl(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s)&&this.__isDayDisabled(t,e,i,s))return"true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}li(Sh);
3764
+ `}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,o,r){const n=["date"],a=t>Rl(new Date),l=t<Rl(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return ql(t,e)}__isDaySelected(t,e){return ql(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!Wl(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s)&&this.__isDayDisabled(t,e,i,s))return"true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}li(kh);
3765
3765
  /**
3766
3766
  * @license
3767
3767
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3768
3768
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3769
3769
  */
3770
- class zh{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
3770
+ class Ch{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
3771
3771
  /**
3772
3772
  * @license
3773
3773
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3774
3774
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3775
- */const Ah=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){ia(this.$.scrollers,"pan-y"),ta(this.$.scrollers,"track",this._track.bind(this)),ta(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),ta(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),ta(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new zh(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new In(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),ta(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new In(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),ta(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new In(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new In(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),ta(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=cn.debounce(this._debouncer,nn.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Ul(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return Kl(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Wl(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Wl(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return ai(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return ai(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{ul(this,(()=>{th(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(Gl(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return Yl(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3775
+ */const Sh=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){ta(this.$.scrollers,"pan-y"),Zn(this.$.scrollers,"track",this._track.bind(this)),Zn(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Zn(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Zn(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Ch(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Tn(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Zn(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Tn(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Zn(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new Tn(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new Tn(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Zn(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=un.debounce(this._debouncer,an.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Hl(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return Yl(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){ql(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&ql(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return ai(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return ai(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{dl(this,(()=>{Zl(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(Ul(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return Wl(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3776
3776
  /**
3777
3777
  * @license
3778
3778
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3783,7 +3783,7 @@ class zh{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
3783
3783
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3784
3784
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3785
3785
  */
3786
- Es("vaadin-date-picker-overlay-content",vi`
3786
+ Is("vaadin-date-picker-overlay-content",vi`
3787
3787
  :host {
3788
3788
  display: flex;
3789
3789
  flex-direction: column;
@@ -3843,7 +3843,7 @@ Es("vaadin-date-picker-overlay-content",vi`
3843
3843
  z-index: 2;
3844
3844
  flex-shrink: 0;
3845
3845
  }
3846
- `,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Eh extends(Ah(Fa(Ps(gn(Qr))))){static get template(){return Gr`
3846
+ `,{moduleId:"vaadin-date-picker-overlay-content-styles"});class zh extends(Sh(Ma(Fs(yn(Jr))))){static get template(){return Kr`
3847
3847
  <div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
3848
3848
  <div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
3849
3849
  <div part="clear-button" hidden$="[[!selectedDate]]"></div>
@@ -3863,23 +3863,23 @@ Es("vaadin-date-picker-overlay-content",vi`
3863
3863
  <slot name="today-button"></slot>
3864
3864
  <slot name="cancel-button"></slot>
3865
3865
  </div>
3866
- `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}li(Eh);
3866
+ `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}li(zh);
3867
3867
  /**
3868
3868
  * @license
3869
3869
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3870
3870
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3871
3871
  */
3872
- const Ih=new WeakMap,Th=ro((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Ih.has(t)||Ih.set(t,new Set),Ih.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),Dh=t=>class extends(za(da(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),gl||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3872
+ const Ah=new WeakMap,Eh=no((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Ah.has(t)||Ah.set(t,new Set),Ah.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),Ih=t=>class extends(Ca(la(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),fl||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3873
3873
  /**
3874
3874
  * @license
3875
3875
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3876
3876
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3877
- */,Mh=ro((t=>class extends(Sa(qa(za(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Ph=t=>class extends(Th(Ca(Mh(Ha(Dh(da(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=cn.debounce(this._preventInputDebouncer,nn.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3877
+ */,Th=no((t=>class extends(ka($a(Ca(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Dh=t=>class extends(Eh(xa(Th(Ra(Ih(la(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=un.debounce(this._preventInputDebouncer,an.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3878
3878
  /**
3879
3879
  * @license
3880
3880
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3881
3881
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3882
- */,Fh=vi`
3882
+ */,Mh=vi`
3883
3883
  :host {
3884
3884
  display: inline-flex;
3885
3885
  outline: none;
@@ -3918,7 +3918,7 @@ const Ih=new WeakMap,Th=ro((t=>class extends t{get slotStyles(){return{}}connect
3918
3918
  * @license
3919
3919
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3920
3920
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3921
- */,Oh=vi`
3921
+ */,Ph=vi`
3922
3922
  [class$='container'] {
3923
3923
  display: flex;
3924
3924
  flex-direction: column;
@@ -3931,7 +3931,7 @@ const Ih=new WeakMap,Th=ro((t=>class extends t{get slotStyles(){return{}}connect
3931
3931
  * @license
3932
3932
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3933
3933
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3934
- */,Nh=[Fh,Oh,vi`
3934
+ */,Fh=[Mh,Ph,vi`
3935
3935
  [part='clear-button'] {
3936
3936
  display: none;
3937
3937
  cursor: default;
@@ -3949,17 +3949,17 @@ const Ih=new WeakMap,Th=ro((t=>class extends t{get slotStyles(){return{}}connect
3949
3949
  * @license
3950
3950
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3951
3951
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3952
- */],Bh=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e||void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
3952
+ */],Oh=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e||void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
3953
3953
  /**
3954
3954
  * @license
3955
3955
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3956
3956
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3957
- */;class jh{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
3957
+ */;class Nh{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
3958
3958
  /**
3959
3959
  * @license
3960
3960
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3961
3961
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3962
- */const Lh=t=>class extends(Bh(Fa(Ca(Mh(da(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?Ql(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:fl},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!ma()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new zh(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new jh(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Ql(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Ul(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Yl(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=Ql(t);!t||i?(t?Wl(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Sl(this._noInput?t:[s,t])}_getInitialPosition(){const t=Ql(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Yl(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Gl(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,Wl(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Ql(t)}}
3962
+ */const Bh=t=>class extends(Oh(Ma(xa(Th(la(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?Gl(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ml},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!ua()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Ch(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Nh(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Gl(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Hl(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Wl(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=Gl(t);!t||i?(t?ql(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=kl(this._noInput?t:[s,t])}_getInitialPosition(){const t=Gl(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Wl(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Ul(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,ql(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Gl(t)}}
3963
3963
  /**
3964
3964
  * @license
3965
3965
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3970,7 +3970,7 @@ const Ih=new WeakMap,Th=ro((t=>class extends t{get slotStyles(){return{}}connect
3970
3970
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3971
3971
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3972
3972
  */
3973
- Es("vaadin-date-picker",[Nh,vi`
3973
+ Is("vaadin-date-picker",[Fh,vi`
3974
3974
  :host([opened]) {
3975
3975
  pointer-events: auto;
3976
3976
  }
@@ -3983,7 +3983,7 @@ Es("vaadin-date-picker",[Nh,vi`
3983
3983
  direction: rtl;
3984
3984
  text-align: left;
3985
3985
  }
3986
- `],{moduleId:"vaadin-date-picker-styles"});class Vh extends(Lh(Ph(Ps(_n(Qr))))){static get is(){return"vaadin-date-picker"}static get template(){return Gr`
3986
+ `],{moduleId:"vaadin-date-picker-styles"});class jh extends(Bh(Dh(Fs(xn(Jr))))){static get is(){return"vaadin-date-picker"}static get template(){return Kr`
3987
3987
  <div class="vaadin-date-picker-container">
3988
3988
  <div part="label">
3989
3989
  <slot name="label"></slot>
@@ -4025,29 +4025,29 @@ Es("vaadin-date-picker",[Nh,vi`
4025
4025
  ></vaadin-date-picker-overlay>
4026
4026
 
4027
4027
  <slot name="tooltip"></slot>
4028
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Wa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new Ua(this.inputElement,this._labelController)),this._tooltipController=new Tn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}li(Vh),
4028
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new qa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new Ha(this.inputElement,this._labelController)),this._tooltipController=new Dn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}li(jh),
4029
4029
  /**
4030
4030
  * @license
4031
4031
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4032
4032
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4033
4033
  */
4034
- Es("vaadin-text-field",ol,{moduleId:"lumo-text-field-styles"});
4034
+ Is("vaadin-text-field",il,{moduleId:"lumo-text-field-styles"});
4035
4035
  /**
4036
4036
  * @license
4037
4037
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4038
4038
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4039
4039
  */
4040
- const $h=t=>class extends(Ph(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
4040
+ const Lh=t=>class extends(Dh(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
4041
4041
  /**
4042
4042
  * @license
4043
4043
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4044
4044
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4045
- */,Rh=t=>class extends($h(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Wa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ua(this.inputElement,this._labelController))}}
4045
+ */,Vh=t=>class extends(Lh(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new qa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ha(this.inputElement,this._labelController))}}
4046
4046
  /**
4047
4047
  * @license
4048
4048
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4049
4049
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4050
- */;Es("vaadin-text-field",Nh,{moduleId:"vaadin-text-field-styles"});class qh extends(Rh(Ps(_n(Qr)))){static get is(){return"vaadin-text-field"}static get template(){return Gr`
4050
+ */;Is("vaadin-text-field",Fh,{moduleId:"vaadin-text-field-styles"});class $h extends(Vh(Fs(xn(Jr)))){static get is(){return"vaadin-text-field"}static get template(){return Kr`
4051
4051
  <div class="vaadin-field-container">
4052
4052
  <div part="label">
4053
4053
  <slot name="label"></slot>
@@ -4076,7 +4076,7 @@ const $h=t=>class extends(Ph(t)){static get properties(){return{autocomplete:{ty
4076
4076
  </div>
4077
4077
  </div>
4078
4078
  <slot name="tooltip"></slot>
4079
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Tn(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}li(qh),Es("vaadin-password-field-button",[il,vi`
4079
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Dn(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}li($h),Is("vaadin-password-field-button",[tl,vi`
4080
4080
  :host {
4081
4081
  position: absolute;
4082
4082
  right: 0;
@@ -4089,7 +4089,7 @@ const $h=t=>class extends(Ph(t)){static get properties(){return{autocomplete:{ty
4089
4089
  background: transparent;
4090
4090
  outline: none;
4091
4091
  }
4092
- `],{moduleId:"lumo-password-field-button"}),Es("vaadin-password-field",[ol,vi`
4092
+ `],{moduleId:"lumo-password-field-button"}),Is("vaadin-password-field",[il,vi`
4093
4093
  [part='reveal-button']::before {
4094
4094
  content: var(--lumo-icons-eye);
4095
4095
  }
@@ -4113,22 +4113,22 @@ const $h=t=>class extends(Ph(t)){static get properties(){return{autocomplete:{ty
4113
4113
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4114
4114
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4115
4115
  */
4116
- Es("vaadin-password-field-button",$l,{moduleId:"vaadin-password-field-button-styles"});class Hh extends(Rl(gn(Ps(Qr)))){static get is(){return"vaadin-password-field-button"}static get template(){return Gr``}}li(Hh);
4116
+ Is("vaadin-password-field-button",Ll,{moduleId:"vaadin-password-field-button-styles"});class Rh extends(Vl(yn(Fs(Jr)))){static get is(){return"vaadin-password-field-button"}static get template(){return Kr``}}li(Rh);
4117
4117
  /**
4118
4118
  * @license
4119
4119
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4120
4120
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4121
4121
  */
4122
- const Wh=t=>class extends(Th(ha(xa(za(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new In(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
4122
+ const qh=t=>class extends(Eh(aa(wa(Ca(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Tn(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
4123
4123
  /**
4124
4124
  * @license
4125
4125
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4126
4126
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4127
- */,Uh=Gr`
4127
+ */,Hh=Kr`
4128
4128
  <div part="reveal-button" slot="suffix">
4129
4129
  <slot name="reveal"></slot>
4130
4130
  </div>
4131
- `;let Yh;class Gh extends(Wh(qh)){static get is(){return"vaadin-password-field"}static get template(){if(!Yh){Yh=super.template.cloneNode(!0);const t=Uh.content.querySelector('[part="reveal-button"]');Yh.content.querySelector('[part="input-field"]').appendChild(t)}return Yh}}li(Gh);const Kh=vi`
4131
+ `;let Wh;class Uh extends(qh($h)){static get is(){return"vaadin-password-field"}static get template(){if(!Wh){Wh=super.template.cloneNode(!0);const t=Hh.content.querySelector('[part="reveal-button"]');Wh.content.querySelector('[part="input-field"]').appendChild(t)}return Wh}}li(Uh);const Yh=vi`
4132
4132
  :host {
4133
4133
  display: flex;
4134
4134
  align-items: center;
@@ -4212,7 +4212,7 @@ const Wh=t=>class extends(Th(ha(xa(za(t))))){static get properties(){return{reve
4212
4212
  width: var(--lumo-icon-size-m);
4213
4213
  height: var(--lumo-icon-size-m);
4214
4214
  }
4215
- `;Es("vaadin-item",Kh,{moduleId:"lumo-item"});const Qh=vi`
4215
+ `;Is("vaadin-item",Yh,{moduleId:"lumo-item"});const Gh=vi`
4216
4216
  :host {
4217
4217
  transition: background-color 100ms;
4218
4218
  overflow: hidden;
@@ -4224,13 +4224,13 @@ const Wh=t=>class extends(Th(ha(xa(za(t))))){static get properties(){return{reve
4224
4224
  :host([focused]:not([disabled])) {
4225
4225
  box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
4226
4226
  }
4227
- `;Es("vaadin-combo-box-item",[Kh,Qh],{moduleId:"lumo-combo-box-item"});
4227
+ `;Is("vaadin-combo-box-item",[Yh,Gh],{moduleId:"lumo-combo-box-item"});
4228
4228
  /**
4229
4229
  * @license
4230
4230
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
4231
4231
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4232
4232
  */
4233
- const Jh=vi`
4233
+ const Kh=vi`
4234
4234
  [part~='loader'] {
4235
4235
  box-sizing: border-box;
4236
4236
  width: var(--lumo-icon-size-s);
@@ -4272,7 +4272,7 @@ const Jh=vi`
4272
4272
  transform: rotate(360deg);
4273
4273
  }
4274
4274
  }
4275
- `,Zh=vi`
4275
+ `,Qh=vi`
4276
4276
  [part='content'] {
4277
4277
  padding: 0;
4278
4278
  }
@@ -4293,7 +4293,7 @@ const Jh=vi`
4293
4293
  :host([bottom-aligned]) [part~='overlay'] {
4294
4294
  margin-bottom: var(--lumo-space-xs);
4295
4295
  }
4296
- `,Xh=vi`
4296
+ `,Jh=vi`
4297
4297
  [part~='loader'] {
4298
4298
  position: absolute;
4299
4299
  z-index: 1;
@@ -4301,12 +4301,12 @@ const Jh=vi`
4301
4301
  top: var(--lumo-space-s);
4302
4302
  margin-inline: auto 0;
4303
4303
  }
4304
- `;Es("vaadin-combo-box-overlay",[Xa,tl,Zh,Jh,Xh,vi`
4304
+ `;Is("vaadin-combo-box-overlay",[Ja,Za,Qh,Kh,Jh,vi`
4305
4305
  :host {
4306
4306
  --_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
4307
4307
  --_vaadin-combo-box-items-container-border-style: solid;
4308
4308
  }
4309
- `],{moduleId:"lumo-combo-box-overlay"}),Es("vaadin-combo-box",[ol,vi`
4309
+ `],{moduleId:"lumo-combo-box-overlay"}),Is("vaadin-combo-box",[il,vi`
4310
4310
  [part='toggle-button']::before {
4311
4311
  content: var(--lumo-icons-dropdown);
4312
4312
  }
@@ -4316,12 +4316,12 @@ const Jh=vi`
4316
4316
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4317
4317
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4318
4318
  */
4319
- const td=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&!this.hidden&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0===i||void 0===e||(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
4319
+ const Zh=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&!this.hidden&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0===i||void 0===e||(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
4320
4320
  /**
4321
4321
  * @license
4322
4322
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4323
4323
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4324
- */;class ed extends(td(Ps(gn(Qr)))){static get template(){return Gr`
4324
+ */;class Xh extends(Zh(Fs(yn(Jr)))){static get template(){return Kr`
4325
4325
  <style>
4326
4326
  :host {
4327
4327
  display: block;
@@ -4335,18 +4335,18 @@ const td=t=>class extends t{static get properties(){return{index:{type:Number},i
4335
4335
  <div part="content">
4336
4336
  <slot></slot>
4337
4337
  </div>
4338
- `}static get is(){return"vaadin-combo-box-item"}}li(ed);
4338
+ `}static get is(){return"vaadin-combo-box-item"}}li(Xh);
4339
4339
  /**
4340
4340
  * @license
4341
4341
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4342
4342
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4343
4343
  */
4344
- const id=t=>class extends(jl(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!ya(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
4344
+ const td=t=>class extends(Nl(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!ba(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
4345
4345
  /**
4346
4346
  * @license
4347
4347
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4348
4348
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4349
- */;Es("vaadin-combo-box-overlay",[al,vi`
4349
+ */;Is("vaadin-combo-box-overlay",[rl,vi`
4350
4350
  #overlay {
4351
4351
  width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
4352
4352
  }
@@ -4356,7 +4356,7 @@ const id=t=>class extends(jl(t)){static get observers(){return["_setOverlayWidth
4356
4356
  flex-direction: column;
4357
4357
  height: 100%;
4358
4358
  }
4359
- `],{moduleId:"vaadin-combo-box-overlay-styles"});class sd extends(id(Fl(gn(Ps(Qr))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Gr`
4359
+ `],{moduleId:"vaadin-combo-box-overlay-styles"});class ed extends(td(Ml(yn(Fs(Jr))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Kr`
4360
4360
  <div id="backdrop" part="backdrop" hidden></div>
4361
4361
  <div part="overlay" id="overlay">
4362
4362
  <div part="loader"></div>
@@ -4368,7 +4368,7 @@ const id=t=>class extends(jl(t)){static get observers(){return["_setOverlayWidth
4368
4368
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
4369
4369
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4370
4370
  */
4371
- function od(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4371
+ function id(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4372
4372
  /**
4373
4373
  * @license
4374
4374
  * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
@@ -4377,17 +4377,17 @@ function od(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4377
4377
  * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
4378
4378
  * Code distributed by Google as part of the polymer project is also
4379
4379
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
4380
- */li(sd);const rd=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),nd=rd&&rd[1]>=8,ad={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),hn)}},_getReusables(t){let e,i,s;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const d=this._scrollPosition,c=this._scrollBottom;for(t?(e=this._physicalStart,i=d-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-c);s=this._getPhysicalSizeIncrement(e),i-=s,!(o.length>=l||i<=r);)if(t){if(a+o.length+1>=this._virtualCount||h+s>=d-this._scrollOffset)break;o.push(e),h+=s,e=(e+1)%l}else{if(n-o.length<=0||h+this._physicalSize-s<=c)break;o.push(e),h-=s,e=0===e?l-1:e-1}return{indexes:o,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),ln):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),hn))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,an))},_iterateItems(t,e){let i,s,o,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],s=this._computeVidx(i),null!=(o=t.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=t.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=t.call(this,i,s)))return o}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!nd&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1||(mn(),0===this._physicalCount))return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const o=this._hiddenContentSize;for(;i<t&&s<=o;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),an)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=cn.debounce(this._debouncers[t],i,e.bind(this)),un(this._debouncers[t])}},ld=1e3;
4380
+ */li(ed);const sd=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),od=sd&&sd[1]>=8,rd={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),dn)}},_getReusables(t){let e,i,s;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const d=this._scrollPosition,c=this._scrollBottom;for(t?(e=this._physicalStart,i=d-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-c);s=this._getPhysicalSizeIncrement(e),i-=s,!(o.length>=l||i<=r);)if(t){if(a+o.length+1>=this._virtualCount||h+s>=d-this._scrollOffset)break;o.push(e),h+=s,e=(e+1)%l}else{if(n-o.length<=0||h+this._physicalSize-s<=c)break;o.push(e),h-=s,e=0===e?l-1:e-1}return{indexes:o,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),hn):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),dn))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,ln))},_iterateItems(t,e){let i,s,o,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],s=this._computeVidx(i),null!=(o=t.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=t.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=t.call(this,i,s)))return o}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!od&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1||(vn(),0===this._physicalCount))return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const o=this._hiddenContentSize;for(;i<t&&s<=o;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),ln)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=un.debounce(this._debouncers[t],i,e.bind(this)),pn(this._debouncers[t])}},nd=1e3;
4381
4381
  /**
4382
4382
  * @license
4383
4383
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4384
4384
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4385
- */class hd{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:o,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=o||s,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<ld?(i=t,this._vidxOffset=0):(i=ld,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),mn(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){mn();let e=0,i=0;const s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=cn.debounce(this.__placeholderClearDebouncer,an,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0!==this.__pendingScrollToIndex&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),mn(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),mn(),this._debounce("_update",this._update,hn)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL="rtl"===t.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=cn.debounce(this.__fixInvalidItemPositioningDebouncer,nn.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=cn.debounce(this.__scrollReorderDebouncer,nn.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=cn.debounce(this.__debouncerWheelAnimationFrame,an,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=cn.debounce(this._debouncerIgnoreNewWheel,nn.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,o=e.indexOf(i)-s;if(o>0)for(let t=0;t<o;t++)this.elementsContainer.appendChild(e[t]);else if(o<0)for(let t=e.length+o;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(bl){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=ld,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(hd.prototype,ad);class dd{constructor(t){this.__adapter=new hd(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
4385
+ */class ad{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:o,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=o||s,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<nd?(i=t,this._vidxOffset=0):(i=nd,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),vn(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){vn();let e=0,i=0;const s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=un.debounce(this.__placeholderClearDebouncer,ln,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0!==this.__pendingScrollToIndex&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),vn(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),vn(),this._debounce("_update",this._update,dn)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL="rtl"===t.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=un.debounce(this.__fixInvalidItemPositioningDebouncer,an.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=un.debounce(this.__scrollReorderDebouncer,an.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=un.debounce(this.__debouncerWheelAnimationFrame,ln,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=un.debounce(this._debouncerIgnoreNewWheel,an.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,o=e.indexOf(i)-s;if(o>0)for(let t=0;t<o;t++)this.elementsContainer.appendChild(e[t]);else if(o<0)for(let t=e.length+o;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(vl){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=nd,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(ad.prototype,rd);class ld{constructor(t){this.__adapter=new ad(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
4386
4386
  /**
4387
4387
  * @license
4388
4388
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4389
4389
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4390
- */const cd=class{toString(){return""}},ud=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${En()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof cd)&&(i&&void 0!==t&&void 0!==e?od(i,t)===od(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new dd({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof cd&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4390
+ */const hd=class{toString(){return""}},dd=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${In()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof hd)&&(i&&void 0!==t&&void 0!==e?id(i,t)===id(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new ld({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof hd&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4391
4391
  /**
4392
4392
  * @license
4393
4393
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
@@ -4397,7 +4397,7 @@ function od(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4397
4397
  * @license
4398
4398
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4399
4399
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4400
- */class pd extends(ud(Qr)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Gr`
4400
+ */class cd extends(dd(Jr)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Kr`
4401
4401
  <style>
4402
4402
  :host {
4403
4403
  display: block;
@@ -4424,48 +4424,48 @@ function od(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4424
4424
  <div id="selector">
4425
4425
  <slot></slot>
4426
4426
  </div>
4427
- `}}li(pd);
4427
+ `}}li(cd);
4428
4428
  /**
4429
4429
  * @license
4430
4430
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4431
4431
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4432
4432
  */
4433
- const md=t=>class extends(Mh(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
4433
+ const ud=t=>class extends(Th(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
4434
4434
  /**
4435
4435
  * @license
4436
4436
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4437
4437
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4438
- */;function vd(t,e,i=0){let s=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(s<=t)break;if(s<=t+e.flatSize)return vd(e,s-t-1,i+1);s-=e.flatSize}return{cache:t,item:t.items[s],index:s,page:Math.floor(s/t.pageSize),level:i}}function fd({getItemId:t},e,i,s=0,o=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&t(n)===t(i))return{cache:e,level:s,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:o+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=fd({getItemId:t},r,i,s+1,o+e.getFlatIndex(r.parentCacheIndex)+1);if(n)return n}}function bd(t,[e,...i],s=0){e===1/0&&(e=t.size-1);const o=t.getFlatIndex(e),r=t.getSubCache(e);return r&&r.flatSize>0&&i.length?bd(r,i,s+o+1):s+o}
4438
+ */;function pd(t,e,i=0){let s=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(s<=t)break;if(s<=t+e.flatSize)return pd(e,s-t-1,i+1);s-=e.flatSize}return{cache:t,item:t.items[s],index:s,page:Math.floor(s/t.pageSize),level:i}}function md({getItemId:t},e,i,s=0,o=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&t(n)===t(i))return{cache:e,level:s,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:o+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=md({getItemId:t},r,i,s+1,o+e.getFlatIndex(r.parentCacheIndex)+1);if(n)return n}}function vd(t,[e,...i],s=0){e===1/0&&(e=t.size-1);const o=t.getFlatIndex(e),r=t.getSubCache(e);return r&&r.flatSize>0&&i.length?vd(r,i,s+o+1):s+o}
4439
4439
  /**
4440
4440
  * @license
4441
4441
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4442
4442
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4443
- */class gd{constructor(t,e,i,s,o){ni(this,"context"),ni(this,"pageSize"),ni(this,"items",[]),ni(this,"pendingRequests",{}),ni(this,"__subCacheByIndex",{}),ni(this,"__size",0),ni(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=o,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e;if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let i=0;i<t;i++)(e=this.items)[i]||(e[i]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new gd(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=vd(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=vd(this,t);return{cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex
4443
+ */class fd{constructor(t,e,i,s,o){ni(this,"context"),ni(this,"pageSize"),ni(this,"items",[]),ni(this,"pendingRequests",{}),ni(this,"__subCacheByIndex",{}),ni(this,"__size",0),ni(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=o,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e;if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let i=0;i<t;i++)(e=this.items)[i]||(e[i]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new fd(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=pd(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=pd(this,t);return{cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex
4444
4444
  /**
4445
4445
  * @license
4446
4446
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4447
4447
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4448
- */}}class yd extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:s,getItemId:o,isPlaceholder:r,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),ni(this,"host"),ni(this,"dataProvider"),ni(this,"dataProviderParams"),ni(this,"pageSize"),ni(this,"isExpanded"),ni(this,"getItemId"),ni(this,"rootCache"),ni(this,"placeholder"),ni(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=o,this.isExpanded=s,this.placeholder=n,this.isPlaceholder=r,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return vd(this.rootCache,t)}getItemContext(t){return fd({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return bd(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:s}=this.getFlatIndexContext(t);this.__isItemLoaded(s)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:s}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(s)){const t=e.createSubCache(s);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new gd(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i=oi(oi({},i),this.dataProviderParams()));const s=(o,r)=>{t.pendingRequests[e]===s&&(void 0!==r?t.size=r:i.parentItem&&(t.size=o.length),t.setPage(e,o),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
4448
+ */}}class bd extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:s,getItemId:o,isPlaceholder:r,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),ni(this,"host"),ni(this,"dataProvider"),ni(this,"dataProviderParams"),ni(this,"pageSize"),ni(this,"isExpanded"),ni(this,"getItemId"),ni(this,"rootCache"),ni(this,"placeholder"),ni(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=o,this.isExpanded=s,this.placeholder=n,this.isPlaceholder=r,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return pd(this.rootCache,t)}getItemContext(t){return md({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return vd(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:s}=this.getFlatIndexContext(t);this.__isItemLoaded(s)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:s}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(s)){const t=e.createSubCache(s);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new fd(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i=oi(oi({},i),this.dataProviderParams()));const s=(o,r)=>{t.pendingRequests[e]===s&&(void 0!==r?t.size=r:i.parentItem&&(t.size=o.length),t.setPage(e,o),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
4449
4449
  /**
4450
4450
  * @license
4451
4451
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4452
4452
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4453
- */const wd=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new yd(this,{placeholder:new cd,isPlaceholder:t=>t instanceof cd,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){!this._shouldFetchData()||!t||(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}}
4453
+ */const gd=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new bd(this,{placeholder:new hd,isPlaceholder:t=>t instanceof hd,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){!this._shouldFetchData()||!t||(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}}
4454
4454
  /**
4455
4455
  * @license
4456
4456
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4457
4457
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4458
- */;function _d(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}
4458
+ */;function yd(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}
4459
4459
  /**
4460
4460
  * @license
4461
4461
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4462
4462
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4463
- */function xd(t){return null!=t}function kd(t,e){return t.findIndex((t=>!(t instanceof cd)&&e(t)))}const Cd=t=>class extends(Bh(Fa(qa(xa(da(za(ha(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),_d(this),this.addController(new jh(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&wa(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?!this._isInputFocused()&&!gl&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?od(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?od(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{gl&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,!this.opened&&!this._isClearButton(t)&&!this.autoOpenDisabled&&(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(xd(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&xd(e)?kd(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?kd(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof cd)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(ma())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
4463
+ */function wd(t){return null!=t}function _d(t,e){return t.findIndex((t=>!(t instanceof hd)&&e(t)))}const xd=t=>class extends(Oh(Ma($a(wa(la(Ca(aa(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),yd(this),this.addController(new Nh(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&ga(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?!this._isInputFocused()&&!fl&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?id(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?id(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{fl&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,!this.opened&&!this._isClearButton(t)&&!this.autoOpenDisabled&&(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(wd(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&wd(e)?_d(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?_d(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof hd)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(ua())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
4464
4464
  /**
4465
4465
  * @license
4466
4466
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4467
4467
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4468
- */;Es("vaadin-combo-box",Nh,{moduleId:"vaadin-combo-box-styles"});class Sd extends(wd(Cd(md(Ph(Ps(_n(Qr))))))){static get is(){return"vaadin-combo-box"}static get template(){return Gr`
4468
+ */;Is("vaadin-combo-box",Fh,{moduleId:"vaadin-combo-box-styles"});class kd extends(gd(xd(ud(Dh(Fs(xn(Jr))))))){static get is(){return"vaadin-combo-box"}static get template(){return Kr`
4469
4469
  <style>
4470
4470
  :host([opened]) {
4471
4471
  pointer-events: auto;
@@ -4510,7 +4510,7 @@ const md=t=>class extends(Mh(t)){static get properties(){return{pattern:{type:St
4510
4510
  ></vaadin-combo-box-overlay>
4511
4511
 
4512
4512
  <slot name="tooltip"></slot>
4513
- `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Wa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ua(this.inputElement,this._labelController)),this._tooltipController=new Tn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}li(Sd),Es("vaadin-multi-select-combo-box-chip",[sl,vi`
4513
+ `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new qa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ha(this.inputElement,this._labelController)),this._tooltipController=new Dn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}li(kd),Is("vaadin-multi-select-combo-box-chip",[el,vi`
4514
4514
  :host {
4515
4515
  font-size: var(--lumo-font-size-xxs);
4516
4516
  line-height: 1;
@@ -4599,23 +4599,23 @@ const md=t=>class extends(Mh(t)){static get properties(){return{pattern:{type:St
4599
4599
  -webkit-text-fill-color: var(--lumo-disabled-text-color);
4600
4600
  pointer-events: none;
4601
4601
  }
4602
- `],{moduleId:"lumo-multi-select-combo-box-chip"}),Es("vaadin-multi-select-combo-box-item",[Kh,Qh,vi`
4602
+ `],{moduleId:"lumo-multi-select-combo-box-chip"}),Is("vaadin-multi-select-combo-box-item",[Yh,Gh,vi`
4603
4603
  @media (any-hover: hover) {
4604
4604
  :host(:hover[readonly]) {
4605
4605
  background-color: transparent;
4606
4606
  cursor: default;
4607
4607
  }
4608
4608
  }
4609
- `],{moduleId:"lumo-multi-select-combo-box-item"}),Es("vaadin-multi-select-combo-box-overlay",[Xa,tl,Zh,Jh,Xh,vi`
4609
+ `],{moduleId:"lumo-multi-select-combo-box-item"}),Is("vaadin-multi-select-combo-box-overlay",[Ja,Za,Qh,Kh,Jh,vi`
4610
4610
  :host {
4611
4611
  --_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
4612
4612
  --_vaadin-multi-select-combo-box-items-container-border-style: solid;
4613
4613
  }
4614
- `],{moduleId:"lumo-multi-select-combo-box-overlay"}),Es("vaadin-multi-select-combo-box-container",vi`
4614
+ `],{moduleId:"lumo-multi-select-combo-box-overlay"}),Is("vaadin-multi-select-combo-box-container",vi`
4615
4615
  :host([auto-expand-vertically]) {
4616
4616
  padding-block: var(--lumo-space-xs);
4617
4617
  }
4618
- `,{moduleId:"lumo-multi-select-combo-box-container"}),Es("vaadin-multi-select-combo-box",[ol,vi`
4618
+ `,{moduleId:"lumo-multi-select-combo-box-container"}),Is("vaadin-multi-select-combo-box",[il,vi`
4619
4619
  :host([has-value]) {
4620
4620
  padding-inline-start: 0;
4621
4621
  }
@@ -4674,7 +4674,7 @@ const md=t=>class extends(Mh(t)){static get properties(){return{pattern:{type:St
4674
4674
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4675
4675
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4676
4676
  */
4677
- class zd extends(Ps(Qr)){static get is(){return"vaadin-multi-select-combo-box-chip"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return Gr`
4677
+ class Cd extends(Fs(Jr)){static get is(){return"vaadin-multi-select-combo-box-chip"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return Kr`
4678
4678
  <style>
4679
4679
  :host {
4680
4680
  display: inline-flex;
@@ -4703,13 +4703,13 @@ class zd extends(Ps(Qr)){static get is(){return"vaadin-multi-select-combo-box-ch
4703
4703
  </style>
4704
4704
  <div part="label">[[label]]</div>
4705
4705
  <div part="remove-button" on-click="_onRemoveClick"></div>
4706
- `}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}let Ad;li(zd),
4706
+ `}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}let Sd;li(Cd),
4707
4707
  /**
4708
4708
  * @license
4709
4709
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4710
4710
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4711
4711
  */
4712
- Es("vaadin-multi-select-combo-box-container",vi`
4712
+ Is("vaadin-multi-select-combo-box-container",vi`
4713
4713
  #wrapper {
4714
4714
  display: flex;
4715
4715
  width: 100%;
@@ -4719,13 +4719,13 @@ Es("vaadin-multi-select-combo-box-container",vi`
4719
4719
  :host([auto-expand-vertically]) #wrapper {
4720
4720
  flex-wrap: wrap;
4721
4721
  }
4722
- `,{moduleId:"vaadin-multi-select-combo-box-container-styles"}),li(class extends nl{static get is(){return"vaadin-multi-select-combo-box-container"}static get template(){if(!Ad){Ad=super.template.cloneNode(!0);const t=Ad.content,e=t.querySelectorAll("slot"),i=document.createElement("div");i.setAttribute("id","wrapper"),t.insertBefore(i,e[2]),i.appendChild(e[0]),i.appendChild(e[1])}return Ad}static get properties(){return{autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}});
4722
+ `,{moduleId:"vaadin-multi-select-combo-box-container-styles"}),li(class extends ol{static get is(){return"vaadin-multi-select-combo-box-container"}static get template(){if(!Sd){Sd=super.template.cloneNode(!0);const t=Sd.content,e=t.querySelectorAll("slot"),i=document.createElement("div");i.setAttribute("id","wrapper"),t.insertBefore(i,e[2]),i.appendChild(e[0]),i.appendChild(e[1])}return Sd}static get properties(){return{autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}});
4723
4723
  /**
4724
4724
  * @license
4725
4725
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4726
4726
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4727
4727
  */
4728
- class Ed extends(td(Ps(gn(Qr)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return Gr`
4728
+ class zd extends(Zh(Fs(yn(Jr)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return Kr`
4729
4729
  <style>
4730
4730
  :host {
4731
4731
  display: block;
@@ -4739,7 +4739,7 @@ class Ed extends(td(Ps(gn(Qr)))){static get is(){return"vaadin-multi-select-comb
4739
4739
  <div part="content">
4740
4740
  <slot></slot>
4741
4741
  </div>
4742
- `}}li(Ed),Es("vaadin-multi-select-combo-box-overlay",[al,vi`
4742
+ `}}li(zd),Is("vaadin-multi-select-combo-box-overlay",[rl,vi`
4743
4743
  #overlay {
4744
4744
  width: var(
4745
4745
  --vaadin-multi-select-combo-box-overlay-width,
@@ -4752,19 +4752,19 @@ class Ed extends(td(Ps(gn(Qr)))){static get is(){return"vaadin-multi-select-comb
4752
4752
  flex-direction: column;
4753
4753
  height: 100%;
4754
4754
  }
4755
- `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Id extends(id(Fl(gn(Ps(Qr))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return Gr`
4755
+ `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Ad extends(td(Ml(yn(Fs(Jr))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return Kr`
4756
4756
  <div id="backdrop" part="backdrop" hidden></div>
4757
4757
  <div part="overlay" id="overlay">
4758
4758
  <div part="loader"></div>
4759
4759
  <div part="content" id="content"><slot></slot></div>
4760
4760
  </div>
4761
- `}}li(Id);
4761
+ `}}li(Ad);
4762
4762
  /**
4763
4763
  * @license
4764
4764
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4765
4765
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4766
4766
  */
4767
- class Td extends(ud(Qr)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return Gr`
4767
+ class Ed extends(dd(Jr)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return Kr`
4768
4768
  <style>
4769
4769
  :host {
4770
4770
  display: block;
@@ -4791,13 +4791,13 @@ class Td extends(ud(Qr)){static get is(){return"vaadin-multi-select-combo-box-sc
4791
4791
  <div id="selector">
4792
4792
  <slot></slot>
4793
4793
  </div>
4794
- `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(t,e,i){return!(t instanceof cd||this.owner.readonly)&&this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly)}}li(Td);
4794
+ `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(t,e,i){return!(t instanceof hd||this.owner.readonly)&&this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly)}}li(Ed);
4795
4795
  /**
4796
4796
  * @license
4797
4797
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4798
4798
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4799
4799
  */
4800
- class Dd extends(wd(Cd(Ps(Qr)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return Gr`
4800
+ class Id extends(gd(xd(Fs(Jr)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return Kr`
4801
4801
  <style>
4802
4802
  :host([opened]) {
4803
4803
  pointer-events: auto;
@@ -4815,18 +4815,18 @@ class Dd extends(wd(Cd(Ps(Qr)))){static get is(){return"vaadin-multi-select-comb
4815
4815
  no-vertical-overlap
4816
4816
  restore-focus-node="[[inputElement]]"
4817
4817
  ></vaadin-multi-select-combo-box-overlay>
4818
- `}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&(!this.readonly||0!==this.selectedItems.length)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(t){if(this.readonly)super._setDropdownItems(this.selectedItems);else if(!this.filter&&this.selectedItemsOnTop)if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter((t=>-1===this._comboBox._findIndex(t,this.topGroup,this.itemIdPath)));super._setDropdownItems(this.topGroup.concat(e))}else super._setDropdownItems(t);else super._setDropdownItems(t)}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems)}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t)}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}}else super._onEnter(t)}_onEscape(t){if(this.readonly)return t.stopPropagation(),void(this.opened&&this.close());super._onEscape(t)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.clear(),void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof cd||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))))}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation()}}li(Dd);
4818
+ `}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&(!this.readonly||0!==this.selectedItems.length)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(t){if(this.readonly)super._setDropdownItems(this.selectedItems);else if(!this.filter&&this.selectedItemsOnTop)if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter((t=>-1===this._comboBox._findIndex(t,this.topGroup,this.itemIdPath)));super._setDropdownItems(this.topGroup.concat(e))}else super._setDropdownItems(t);else super._setDropdownItems(t)}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems)}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t)}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}}else super._onEnter(t)}_onEscape(t){if(this.readonly)return t.stopPropagation(),void(this.opened&&this.close());super._onEscape(t)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.clear(),void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof hd||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))))}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation()}}li(Id);
4819
4819
  /**
4820
4820
  * @license
4821
4821
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4822
4822
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4823
4823
  */
4824
- const Md=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))})),Pd=ro((t=>class extends t{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),Md.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,Md.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),Md.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&Md.unobserve(t)),this.__parent=null}}_onResize(t){}}));
4824
+ const Td=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))})),Dd=no((t=>class extends t{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),Td.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,Td.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),Td.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&Td.unobserve(t)),this.__parent=null}}_onResize(t){}}));
4825
4825
  /**
4826
4826
  * @license
4827
4827
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4828
4828
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4829
- */Es("vaadin-multi-select-combo-box",[Nh,vi`
4829
+ */Is("vaadin-multi-select-combo-box",[Fh,vi`
4830
4830
  :host {
4831
4831
  --input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
4832
4832
  --_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
@@ -4864,7 +4864,7 @@ const Md=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
4864
4864
  :host([auto-expand-horizontally]) [class$='container'] {
4865
4865
  width: auto;
4866
4866
  }
4867
- `],{moduleId:"vaadin-multi-select-combo-box-styles"});class Fd extends(Pd(Ph(Ps(_n(Qr))))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return Gr`
4867
+ `],{moduleId:"vaadin-multi-select-combo-box-styles"});class Md extends(Dd(Dh(Fs(xn(Jr))))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return Kr`
4868
4868
  <div class="vaadin-multi-select-combo-box-container">
4869
4869
  <div part="label">
4870
4870
  <slot name="label"></slot>
@@ -4935,7 +4935,7 @@ const Md=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
4935
4935
  </div>
4936
4936
 
4937
4937
  <slot name="tooltip"></slot>
4938
- `}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new Wa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ua(this.inputElement,this._labelController)),this._tooltipController=new Tn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new In(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),_d(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),Ba(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",o=this.i18n.total.replace("{count}",i||0);Ba(`${t} ${this.i18n[s]} ${o}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let o=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),o=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,o,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const o=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const o=this.__createChip(t[i]);this.insertBefore(o,s),s=o,e.unshift(o)}const r=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),r.unshift(t.pop());const s=r.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(o,s)}px`)}this._overflowItems=r}else{for(let e=t.length-1,i=null;e>=0;e--){const r=this.__createChip(t[e]);if(this.insertBefore(r,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){r.remove();break}r.style.maxWidth=`${Math.max(o,s)}px`}t.pop(),i=r}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const o=e.length;t.label=`${o}`,t.setAttribute("count",`${o}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===o),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&Ba(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}li(Fd),Es("vaadin-notification-card",vi`
4938
+ `}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new qa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ha(this.inputElement,this._labelController)),this._tooltipController=new Dn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new Tn(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),yd(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),Oa(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",o=this.i18n.total.replace("{count}",i||0);Oa(`${t} ${this.i18n[s]} ${o}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let o=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),o=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,o,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const o=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const o=this.__createChip(t[i]);this.insertBefore(o,s),s=o,e.unshift(o)}const r=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),r.unshift(t.pop());const s=r.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(o,s)}px`)}this._overflowItems=r}else{for(let e=t.length-1,i=null;e>=0;e--){const r=this.__createChip(t[e]);if(this.insertBefore(r,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){r.remove();break}r.style.maxWidth=`${Math.max(o,s)}px`}t.pop(),i=r}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const o=e.length;t.label=`${o}`,t.setAttribute("count",`${o}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===o),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&Oa(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}li(Md),Is("vaadin-notification-card",vi`
4939
4939
  :host {
4940
4940
  position: relative;
4941
4941
  margin: var(--lumo-space-s);
@@ -5155,7 +5155,7 @@ const Md=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
5155
5155
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5156
5156
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5157
5157
  */
5158
- class Od extends(Pl(Ps(_n(Qr)))){static get template(){return Gr`
5158
+ class Pd extends(Dl(Fs(xn(Jr)))){static get template(){return Kr`
5159
5159
  <style>
5160
5160
  :host {
5161
5161
  position: fixed;
@@ -5222,7 +5222,7 @@ class Od extends(Pl(Ps(_n(Qr)))){static get template(){return Gr`
5222
5222
  <div region="bottom-end"><slot name="bottom-end"></slot></div>
5223
5223
  </div>
5224
5224
  <div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
5225
- `}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),fl&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}_detectIosNavbar(){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.bottom=e&&i>t?i-t+"px":"0"}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault()}}class Nd extends(Ps(Qr)){static get template(){return Gr`
5225
+ `}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),ml&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}_detectIosNavbar(){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.bottom=e&&i>t?i-t+"px":"0"}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault()}}class Fd extends(Fs(Jr)){static get template(){return Kr`
5226
5226
  <style>
5227
5227
  :host {
5228
5228
  display: block;
@@ -5244,14 +5244,14 @@ class Od extends(Pl(Ps(_n(Qr)))){static get template(){return Gr`
5244
5244
  <slot></slot>
5245
5245
  </div>
5246
5246
  </div>
5247
- `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class Bd extends(Bh(ys(_n(Qr)))){static get template(){return Gr`
5247
+ `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class Od extends(Oh(ws(xn(Jr)))){static get template(){return Kr`
5248
5248
  <style>
5249
5249
  :host {
5250
5250
  display: none !important;
5251
5251
  }
5252
5252
  </style>
5253
5253
  <vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
5254
- `}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return Bd._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{ms(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(Bd.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",(t=>{t.detail.value||i.remove()})),i}get _container(){return Bd._container||(Bd._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Bd._container)),Bd._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),_d(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask((()=>{this.isConnected||(this.opened=!1)}))}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(t,e,i){if(!i)return;const s=this._oldRenderer!==t;this._oldRenderer=t,s&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener)}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`))return void console.warn(`Invalid alignment parameter provided: position=${this.position}`);this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"))}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&"none"!==t?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState()},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}}li(Od),li(Nd),li(Bd);const jd=vi`
5254
+ `}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return Od._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{ms(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(Od.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",(t=>{t.detail.value||i.remove()})),i}get _container(){return Od._container||(Od._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Od._container)),Od._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),yd(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask((()=>{this.isConnected||(this.opened=!1)}))}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(t,e,i){if(!i)return;const s=this._oldRenderer!==t;this._oldRenderer=t,s&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener)}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`))return void console.warn(`Invalid alignment parameter provided: position=${this.position}`);this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"))}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&"none"!==t?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState()},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}}li(Pd),li(Fd),li(Od);const Nd=vi`
5255
5255
  :host {
5256
5256
  -webkit-tap-highlight-color: transparent;
5257
5257
  --_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
@@ -5265,13 +5265,13 @@ class Od extends(Pl(Ps(_n(Qr)))){static get template(){return Gr`
5265
5265
  margin: var(--lumo-space-s) var(--lumo-border-radius-m);
5266
5266
  background-color: var(--lumo-contrast-10pct);
5267
5267
  }
5268
- `;Es("vaadin-list-box",jd,{moduleId:"lumo-list-box"}),
5268
+ `;Is("vaadin-list-box",Nd,{moduleId:"lumo-list-box"}),
5269
5269
  /**
5270
5270
  * @license
5271
5271
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5272
5272
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5273
5273
  */
5274
- Es("vaadin-select-item",Kh,{moduleId:"lumo-select-item"}),Es("vaadin-select-list-box",jd,{moduleId:"lumo-select-list-box"}),Es("vaadin-select",[ol,vi`
5274
+ Is("vaadin-select-item",Yh,{moduleId:"lumo-select-item"}),Is("vaadin-select-list-box",Nd,{moduleId:"lumo-select-list-box"}),Is("vaadin-select",[il,vi`
5275
5275
  :host(:not([theme*='align'])) ::slotted([slot='value']) {
5276
5276
  text-align: start;
5277
5277
  }
@@ -5314,7 +5314,7 @@ Es("vaadin-select-item",Kh,{moduleId:"lumo-select-item"}),Es("vaadin-select-list
5314
5314
  --_lumo-selected-item-height: var(--lumo-size-s);
5315
5315
  --_lumo-selected-item-padding: 0;
5316
5316
  }
5317
- `],{moduleId:"lumo-select"}),Es("vaadin-select-value-button",vi`
5317
+ `],{moduleId:"lumo-select"}),Is("vaadin-select-value-button",vi`
5318
5318
  :host {
5319
5319
  font-family: var(--lumo-font-family);
5320
5320
  font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
@@ -5333,7 +5333,7 @@ Es("vaadin-select-item",Kh,{moduleId:"lumo-select-item"}),Es("vaadin-select-list
5333
5333
  ::slotted(*:hover) {
5334
5334
  background-color: transparent;
5335
5335
  }
5336
- `,{moduleId:"lumo-select-value-button"}),Es("vaadin-select-overlay",[el,vi`
5336
+ `,{moduleId:"lumo-select-value-button"}),Is("vaadin-select-overlay",[Xa,vi`
5337
5337
  :host {
5338
5338
  --_lumo-item-selected-icon-display: block;
5339
5339
  }
@@ -5375,12 +5375,12 @@ Es("vaadin-select-item",Kh,{moduleId:"lumo-select-item"}),Es("vaadin-select-list
5375
5375
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5376
5376
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5377
5377
  */
5378
- const Ld=t=>class extends(ca(xa(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
5378
+ const Bd=t=>class extends(ha(wa(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
5379
5379
  /**
5380
5380
  * @license
5381
5381
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5382
5382
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5383
- */;class Vd extends(Ld(Ps(gn(Qr)))){static get is(){return"vaadin-select-item"}static get template(){return Gr`
5383
+ */;class jd extends(Bd(Fs(yn(Jr)))){static get is(){return"vaadin-select-item"}static get template(){return Kr`
5384
5384
  <style>
5385
5385
  :host {
5386
5386
  display: inline-block;
@@ -5400,23 +5400,23 @@ const Ld=t=>class extends(ca(xa(t))){static get properties(){return{_hasVaadinIt
5400
5400
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
5401
5401
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5402
5402
  */
5403
- function $d(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidth+i}li(Vd);
5403
+ function Ld(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidth+i}li(jd);
5404
5404
  /**
5405
5405
  * @license
5406
5406
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
5407
5407
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5408
5408
  */
5409
- const Rd=t=>class extends(da(t)){get focused(){return(this._getItems()||[]).find(wa)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!ga(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],s=i.indexOf(this.focused);let o,r;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(r=-n,o=s-n):this.__isNextKey(e)?(r=n,o=s+n):"Home"===e?(r=1,o=0):"End"===e&&(r=-1,o=i.length-1),o=this._getAvailableIndex(i,o,r,(t=>!ga(t))),o>=0&&(t.preventDefault(),this._focus(o,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,s){const o=t.length;let r=e;for(let e=0;"number"==typeof r&&e<o;e+=1,r+=i||1){r<0?r=o-1:r>=o&&(r=0);const e=t[r];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,s))return r}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
5409
+ const Vd=t=>class extends(la(t)){get focused(){return(this._getItems()||[]).find(ga)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!fa(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],s=i.indexOf(this.focused);let o,r;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(r=-n,o=s-n):this.__isNextKey(e)?(r=n,o=s+n):"Home"===e?(r=1,o=0):"End"===e&&(r=-1,o=i.length-1),o=this._getAvailableIndex(i,o,r,(t=>!fa(t))),o>=0&&(t.preventDefault(),this._focus(o,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,s){const o=t.length;let r=e;for(let e=0;"number"==typeof r&&e<o;e+=1,r+=i||1){r<0?r=o-1:r>=o&&(r=0);const e=t[r];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,s))return r}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
5410
5410
  /**
5411
5411
  * @license
5412
5412
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5413
5413
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5414
- */,qd=t=>class extends(Rd(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!ga(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new zn(t,(()=>{this._setItems(this._filterItems(xn(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=cn.debounce(this._searchReset,nn.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?n=o[i[1]]-s[i[1]]:(!this._isRTL&&r[i[0]]<=s[i[0]]||this._isRTL&&r[i[0]]>=s[i[0]])&&(n=r[i[0]]-s[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=$d(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
5414
+ */,$d=t=>class extends(Vd(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!fa(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new An(t,(()=>{this._setItems(this._filterItems(kn(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=un.debounce(this._searchReset,an.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?n=o[i[1]]-s[i[1]]:(!this._isRTL&&r[i[0]]<=s[i[0]]||this._isRTL&&r[i[0]]>=s[i[0]])&&(n=r[i[0]]-s[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=Ld(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
5415
5415
  /**
5416
5416
  * @license
5417
5417
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5418
5418
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5419
- */;class Hd extends(qd(Ps(gn(Fa(Qr))))){static get is(){return"vaadin-select-list-box"}static get template(){return Gr`
5419
+ */;class Rd extends($d(Fs(yn(Ma(Jr))))){static get is(){return"vaadin-select-list-box"}static get template(){return Kr`
5420
5420
  <style>
5421
5421
  :host {
5422
5422
  display: flex;
@@ -5436,18 +5436,18 @@ const Rd=t=>class extends(da(t)){get focused(){return(this._getItems()||[]).find
5436
5436
  <div part="items">
5437
5437
  <slot></slot>
5438
5438
  </div>
5439
- `}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}li(Hd);
5439
+ `}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}li(Rd);
5440
5440
  /**
5441
5441
  * @license
5442
5442
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5443
5443
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5444
5444
  */
5445
- const Wd=t=>class extends(jl(Fl(gn(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
5445
+ const qd=t=>class extends(Nl(Ml(yn(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
5446
5446
  /**
5447
5447
  * @license
5448
5448
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5449
5449
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5450
- */;Es("vaadin-select-overlay",[al,vi`
5450
+ */;Is("vaadin-select-overlay",[rl,vi`
5451
5451
  :host {
5452
5452
  align-items: flex-start;
5453
5453
  justify-content: flex-start;
@@ -5462,20 +5462,20 @@ const Wd=t=>class extends(jl(Fl(gn(t)))){static get observers(){return["_updateO
5462
5462
  outline: 3px solid;
5463
5463
  }
5464
5464
  }
5465
- `],{moduleId:"vaadin-select-overlay-styles"});class Ud extends(Wd(Ps(Qr))){static get is(){return"vaadin-select-overlay"}static get template(){return Gr`
5465
+ `],{moduleId:"vaadin-select-overlay-styles"});class Hd extends(qd(Fs(Jr))){static get is(){return"vaadin-select-overlay"}static get template(){return Kr`
5466
5466
  <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
5467
5467
  <div part="overlay" id="overlay" tabindex="0">
5468
5468
  <div part="content" id="content">
5469
5469
  <slot></slot>
5470
5470
  </div>
5471
5471
  </div>
5472
- `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}li(Ud),
5472
+ `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}li(Hd),
5473
5473
  /**
5474
5474
  * @license
5475
5475
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5476
5476
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5477
5477
  */
5478
- Es("vaadin-select-value-button",vi`
5478
+ Is("vaadin-select-value-button",vi`
5479
5479
  :host {
5480
5480
  display: inline-block;
5481
5481
  position: relative;
@@ -5517,19 +5517,19 @@ Es("vaadin-select-value-button",vi`
5517
5517
  width: 100%;
5518
5518
  line-height: inherit;
5519
5519
  }
5520
- `,{moduleId:"vaadin-select-value-button-styles"});class Yd extends(Rl(Ps(Qr))){static get is(){return"vaadin-select-value-button"}static get template(){return Gr`
5520
+ `,{moduleId:"vaadin-select-value-button-styles"});class Wd extends(Vl(Fs(Jr))){static get is(){return"vaadin-select-value-button"}static get template(){return Kr`
5521
5521
  <div class="vaadin-button-container">
5522
5522
  <span part="label">
5523
5523
  <slot></slot>
5524
5524
  </span>
5525
5525
  </div>
5526
- `}}li(Yd);
5526
+ `}}li(Wd);
5527
5527
  /**
5528
5528
  * @license
5529
5529
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
5530
5530
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5531
5531
  */
5532
- const Gd=vi`
5532
+ const Ud=vi`
5533
5533
  .sr-only {
5534
5534
  border: 0 !important;
5535
5535
  clip: rect(1px, 1px, 1px, 1px) !important;
@@ -5548,17 +5548,17 @@ const Gd=vi`
5548
5548
  * @license
5549
5549
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
5550
5550
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5551
- */;class Kd extends In{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
5551
+ */;class Yd extends Tn{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
5552
5552
  /**
5553
5553
  * @license
5554
5554
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5555
5555
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5556
- */const Qd=t=>class extends(Bh(Ca(Sa(da(Ha(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${En()}`,this._srLabelController=new $a(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new Kd(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new zh(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Tn(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=!(!e||void 0===e.value||e.value===this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),Ma(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}__dispatchChange(){return ai(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5556
+ */const Gd=t=>class extends(Oh(xa(ka(la(Ra(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${In()}`,this._srLabelController=new La(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new Yd(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Ch(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Dn(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=!(!e||void 0===e.value||e.value===this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),Ta(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}__dispatchChange(){return ai(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5557
5557
  /**
5558
5558
  * @license
5559
5559
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5560
5560
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5561
- */;Es("vaadin-select",[Fh,Oh,Gd],{moduleId:"vaadin-select-styles"});class Jd extends(Qd(_n(Ps(Qr)))){static get is(){return"vaadin-select"}static get template(){return Gr`
5561
+ */;Is("vaadin-select",[Mh,Ph,Ud],{moduleId:"vaadin-select-styles"});class Kd extends(Gd(xn(Fs(Jr)))){static get is(){return"vaadin-select"}static get template(){return Kr`
5562
5562
  <style>
5563
5563
  :host {
5564
5564
  position: relative;
@@ -5611,7 +5611,7 @@ const Gd=vi`
5611
5611
  <div class="sr-only">
5612
5612
  <slot name="sr-label"></slot>
5613
5613
  </div>
5614
- `}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),_d(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}li(Jd);const Zd=vi`
5614
+ `}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),yd(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}li(Kd);const Qd=vi`
5615
5615
  /* Optical centering */
5616
5616
  :host::before,
5617
5617
  :host::after {
@@ -5711,7 +5711,7 @@ const Gd=vi`
5711
5711
  transform: scale(1.02);
5712
5712
  }
5713
5713
  }
5714
- `;Es("vaadin-dialog-overlay",[Xa,Zd],{moduleId:"lumo-dialog"}),Es("vaadin-confirm-dialog-overlay",[Xa,Zd,vi`
5714
+ `;Is("vaadin-dialog-overlay",[Ja,Qd],{moduleId:"lumo-dialog"}),Is("vaadin-confirm-dialog-overlay",[Ja,Qd,vi`
5715
5715
  [part='header'] ::slotted(h3) {
5716
5716
  margin-top: 0 !important;
5717
5717
  margin-bottom: 0 !important;
@@ -5752,12 +5752,12 @@ const Gd=vi`
5752
5752
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5753
5753
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5754
5754
  */
5755
- const Xd=t=>class extends t{static get properties(){return{opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const t=this.$.overlay;t.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),t.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),t.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=t}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"))}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),setTimeout((()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1)}))}_onOverlayOpened(t){!1===t.detail.value&&(this.opened=!1)}_handleOutsideClick(t){this.noCloseOnOutsideClick&&t.preventDefault()}_handleEscPress(t){this.noCloseOnEsc&&t.preventDefault()}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront()}}
5755
+ const Jd=t=>class extends t{static get properties(){return{opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const t=this.$.overlay;t.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),t.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),t.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=t}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"))}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),setTimeout((()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1)}))}_onOverlayOpened(t){!1===t.detail.value&&(this.opened=!1)}_handleOutsideClick(t){this.noCloseOnOutsideClick&&t.preventDefault()}_handleEscPress(t){this.noCloseOnEsc&&t.preventDefault()}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront()}}
5756
5756
  /**
5757
5757
  * @license
5758
5758
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5759
5759
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5760
- */,tc=vi`
5760
+ */,Zd=vi`
5761
5761
  [part='header'],
5762
5762
  [part='header-content'],
5763
5763
  [part='footer'] {
@@ -5933,7 +5933,7 @@ const Xd=t=>class extends t{static get properties(){return{opened:{type:Boolean,
5933
5933
  * @license
5934
5934
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
5935
5935
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5936
- */;const ec=t=>class extends t{static get properties(){return{ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(t,e,i){const s=`--_vaadin-confirm-dialog-content-${e}`;i?t.style.setProperty(s,i):t.style.removeProperty(s)}__updateContentHeight(t,e){e&&this.__updateDimension(e,"height",t)}__updateContentWidth(t,e){e&&this.__updateDimension(e,"width",t)}}
5936
+ */;const Xd=t=>class extends t{static get properties(){return{ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(t,e,i){const s=`--_vaadin-confirm-dialog-content-${e}`;i?t.style.setProperty(s,i):t.style.removeProperty(s)}__updateContentHeight(t,e){e&&this.__updateDimension(e,"height",t)}__updateContentWidth(t,e){e&&this.__updateDimension(e,"width",t)}}
5937
5937
  /**
5938
5938
  * @license
5939
5939
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
@@ -5944,7 +5944,7 @@ const Xd=t=>class extends t{static get properties(){return{opened:{type:Boolean,
5944
5944
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
5945
5945
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5946
5946
  */
5947
- Es("vaadin-confirm-dialog-overlay",[al,tc,vi`
5947
+ Is("vaadin-confirm-dialog-overlay",[rl,Zd,vi`
5948
5948
  :host {
5949
5949
  --_vaadin-confirm-dialog-content-width: auto;
5950
5950
  --_vaadin-confirm-dialog-content-height: auto;
@@ -5963,7 +5963,7 @@ Es("vaadin-confirm-dialog-overlay",[al,tc,vi`
5963
5963
  [part='footer'] > * {
5964
5964
  pointer-events: all;
5965
5965
  }
5966
- `],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class ic extends(Fl(gn(Ps(Qr)))){static get is(){return"vaadin-confirm-dialog-overlay"}static get template(){return Gr`
5966
+ `],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class tc extends(Ml(yn(Fs(Jr)))){static get is(){return"vaadin-confirm-dialog-overlay"}static get template(){return Kr`
5967
5967
  <div part="backdrop" id="backdrop" hidden$="[[!withBackdrop]]"></div>
5968
5968
  <div part="overlay" id="overlay" tabindex="0">
5969
5969
  <section id="resizerContainer" class="resizer-container">
@@ -5984,7 +5984,7 @@ Es("vaadin-confirm-dialog-overlay",[al,tc,vi`
5984
5984
  </footer>
5985
5985
  </section>
5986
5986
  </div>
5987
- `}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","")}}li(ic);class sc extends(ec(Xd(Bh(ys(Qr))))){static get is(){return"vaadin-confirm-dialog-dialog"}static get template(){return Gr`
5987
+ `}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","")}}li(tc);class ec extends(Xd(Jd(Oh(ws(Jr))))){static get is(){return"vaadin-confirm-dialog-dialog"}static get template(){return Kr`
5988
5988
  <style>
5989
5989
  :host {
5990
5990
  display: none;
@@ -6005,18 +6005,18 @@ Es("vaadin-confirm-dialog-overlay",[al,tc,vi`
6005
6005
  restore-focus-on-close
6006
6006
  focus-trap
6007
6007
  ></vaadin-confirm-dialog-overlay>
6008
- `}}li(sc);
6008
+ `}}li(ec);
6009
6009
  /**
6010
6010
  * @license
6011
6011
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
6012
6012
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6013
6013
  */
6014
- const oc=t=>class extends t{static get properties(){return{accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this)}get __slottedNodes(){return[this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new In(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new In(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${En()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new In(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new In(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new In(this,"confirm-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("confirm",t)}}),this.addController(this._confirmController)}_initOverlay(t){t.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),t.addEventListener("vaadin-overlay-open",(()=>this.__onDialogOpened())),t.addEventListener("vaadin-overlay-closed",(()=>this.__onDialogClosed())),t.setAttribute("role","alertdialog")}__onDialogOpened(){const t=this._overlayElement;this.__slottedNodes.forEach((e=>{t.appendChild(e)}));const e=t.querySelector('[slot="confirm-button"]');e&&e.focus()}__onDialogClosed(){this.__slottedNodes.forEach((t=>{this.appendChild(t)})),this.dispatchEvent(new CustomEvent("closed"))}__accessibleDescriptionRefChanged(t,e,i){!t||!e||(void 0!==i?Ma(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{Ma(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,s=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[s]),this[i]=e}__updateCancelButton(t,e,i,s){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}__updateConfirmButton(t,e,i){t&&t===this._confirmController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i))}__updateHeaderNode(t,e){t&&t===this._headerController.defaultNode&&(t.textContent=e)}__updateMessageNodes(t,e){if(t&&t.length>0){const i=t.find((t=>this._messageController.defaultNode&&t===this._messageController.defaultNode.parentElement));i&&(i.firstChild.textContent=e)}}__updateRejectButton(t,e,i,s){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}_escPressed(t){t.defaultPrevented||this.__cancel()}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1}_getAriaLabel(t){return t||"confirmation"}}
6014
+ const ic=t=>class extends t{static get properties(){return{accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this)}get __slottedNodes(){return[this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new Tn(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new Tn(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${In()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new Tn(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new Tn(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new Tn(this,"confirm-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("confirm",t)}}),this.addController(this._confirmController)}_initOverlay(t){t.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),t.addEventListener("vaadin-overlay-open",(()=>this.__onDialogOpened())),t.addEventListener("vaadin-overlay-closed",(()=>this.__onDialogClosed())),t.setAttribute("role","alertdialog")}__onDialogOpened(){const t=this._overlayElement;this.__slottedNodes.forEach((e=>{t.appendChild(e)}));const e=t.querySelector('[slot="confirm-button"]');e&&e.focus()}__onDialogClosed(){this.__slottedNodes.forEach((t=>{this.appendChild(t)})),this.dispatchEvent(new CustomEvent("closed"))}__accessibleDescriptionRefChanged(t,e,i){!t||!e||(void 0!==i?Ta(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{Ta(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,s=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[s]),this[i]=e}__updateCancelButton(t,e,i,s){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}__updateConfirmButton(t,e,i){t&&t===this._confirmController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i))}__updateHeaderNode(t,e){t&&t===this._headerController.defaultNode&&(t.textContent=e)}__updateMessageNodes(t,e){if(t&&t.length>0){const i=t.find((t=>this._messageController.defaultNode&&t===this._messageController.defaultNode.parentElement));i&&(i.firstChild.textContent=e)}}__updateRejectButton(t,e,i,s){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}_escPressed(t){t.defaultPrevented||this.__cancel()}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1}_getAriaLabel(t){return t||"confirmation"}}
6015
6015
  /**
6016
6016
  * @license
6017
6017
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
6018
6018
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6019
- */;class rc extends(oc(_n(ys(Fa(Qr))))){static get template(){return Gr`
6019
+ */;class sc extends(ic(xn(ws(Ma(Jr))))){static get template(){return Kr`
6020
6020
  <style>
6021
6021
  :host,
6022
6022
  [hidden] {
@@ -6043,7 +6043,7 @@ const oc=t=>class extends t{static get properties(){return{accessibleDescription
6043
6043
  <slot name="reject-button"></slot>
6044
6044
  <slot name="confirm-button"></slot>
6045
6045
  </div>
6046
- `}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}li(rc),Es("vaadin-tab",vi`
6046
+ `}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}li(sc),Is("vaadin-tab",vi`
6047
6047
  :host {
6048
6048
  box-sizing: border-box;
6049
6049
  padding: 0.5rem 0.75rem;
@@ -6282,7 +6282,7 @@ const oc=t=>class extends t{static get properties(){return{accessibleDescription
6282
6282
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
6283
6283
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6284
6284
  */
6285
- const nc=t=>class extends(Ld(t)){ready(){super.ready(),this.setAttribute("role","tab")}_onKeyUp(t){const e=this.hasAttribute("active");if(super._onKeyUp(t),e){const t=this.querySelector("a");t&&t.click()}}}
6285
+ const oc=t=>class extends(Bd(t)){ready(){super.ready(),this.setAttribute("role","tab")}_onKeyUp(t){const e=this.hasAttribute("active");if(super._onKeyUp(t),e){const t=this.querySelector("a");t&&t.click()}}}
6286
6286
  /**
6287
6287
  * @license
6288
6288
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -6293,7 +6293,7 @@ const nc=t=>class extends(Ld(t)){ready(){super.ready(),this.setAttribute("role",
6293
6293
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
6294
6294
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6295
6295
  */
6296
- Es("vaadin-tab",vi`
6296
+ Is("vaadin-tab",vi`
6297
6297
  :host {
6298
6298
  display: block;
6299
6299
  }
@@ -6312,10 +6312,10 @@ Es("vaadin-tab",vi`
6312
6312
  border-bottom: 2px solid;
6313
6313
  }
6314
6314
  }
6315
- `,{moduleId:"vaadin-tab-styles"});class ac extends(_n(Ps(nc(Fa(Qr))))){static get template(){return Gr`
6315
+ `,{moduleId:"vaadin-tab-styles"});class rc extends(xn(Fs(oc(Ma(Jr))))){static get template(){return Kr`
6316
6316
  <slot></slot>
6317
6317
  <slot name="tooltip"></slot>
6318
- `}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new Tn(this),this.addController(this._tooltipController)}}li(ac),Es("vaadin-tabs",vi`
6318
+ `}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new Dn(this),this.addController(this._tooltipController)}}li(rc),Is("vaadin-tabs",vi`
6319
6319
  :host {
6320
6320
  -webkit-tap-highlight-color: transparent;
6321
6321
  }
@@ -6559,7 +6559,7 @@ Es("vaadin-tab",vi`
6559
6559
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
6560
6560
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6561
6561
  */
6562
- const lc=t=>class extends(Pd(qd(t))){static get properties(){return{orientation:{value:"horizontal",type:String,reflectToAttribute:!0,sync:!0},selected:{value:0,type:Number}}}static get observers(){return["__tabsItemsChanged(items)"]}constructor(){super(),this.__itemsResizeObserver=new ResizeObserver((()=>{setTimeout((()=>this._updateOverflow()))}))}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return!this._vertical&&this.__isRTL?1:-1}ready(){super.ready(),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),ul(this,(()=>{this._updateOverflow()}))}_onResize(){this._updateOverflow()}__tabsItemsChanged(t){this.__itemsResizeObserver.disconnect(),(t||[]).forEach((t=>{this.__itemsResizeObserver.observe(t)})),this._updateOverflow()}_scrollForward(){const t=this._getNavigationButtonVisibleWidth("forward-button"),e=this._getNavigationButtonVisibleWidth("back-button"),i=this._scrollerElement.getBoundingClientRect(),s=[...this.items].reverse().find((s=>this._isItemVisible(s,t,e,i))).getBoundingClientRect(),o=20+this.shadowRoot.querySelector('[part="back-button"]').clientWidth;let r;r=this.__isRTL?s.right-(i.right-o):s.left-(i.left+o),-this.__direction*r<1&&(r=-this.__direction*(this._scrollOffset-o)),this._scroll(r)}_scrollBack(){const t=this._getNavigationButtonVisibleWidth("forward-button"),e=this._getNavigationButtonVisibleWidth("back-button"),i=this._scrollerElement.getBoundingClientRect(),s=this.items.find((s=>this._isItemVisible(s,t,e,i))).getBoundingClientRect(),o=20+this.shadowRoot.querySelector('[part="forward-button"]').clientWidth;let r;r=this.__isRTL?s.left-(i.left+o):s.right-(i.right-o),this.__direction*r<1&&(r=this.__direction*(this._scrollOffset-o)),this._scroll(r)}_isItemVisible(t,e,i,s){if(this._vertical)throw new Error("Visibility check is only supported for horizontal tabs.");const o=s.right-(this.__isRTL?i:e),r=s.left+(this.__isRTL?e:i),n=t.getBoundingClientRect();return o>Math.floor(n.left)&&r<Math.ceil(n.right)}_getNavigationButtonVisibleWidth(t){const e=this.shadowRoot.querySelector(`[part="${t}"]`);return"0"===window.getComputedStyle(e).opacity?0:e.clientWidth}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:$d(this._scrollerElement,this.getAttribute("dir")),e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;let i=Math.floor(t)>1?"start":"";Math.ceil(t)<Math.ceil(e-this._scrollOffset)&&(i+=" end"),1===this.__direction&&(i=i.replace(/start|end/giu,(t=>"start"===t?"end":"start"))),i?this.setAttribute("overflow",i.trim()):this.removeAttribute("overflow")}}
6562
+ const nc=t=>class extends(Dd($d(t))){static get properties(){return{orientation:{value:"horizontal",type:String,reflectToAttribute:!0,sync:!0},selected:{value:0,type:Number}}}static get observers(){return["__tabsItemsChanged(items)"]}constructor(){super(),this.__itemsResizeObserver=new ResizeObserver((()=>{setTimeout((()=>this._updateOverflow()))}))}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return!this._vertical&&this.__isRTL?1:-1}ready(){super.ready(),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),dl(this,(()=>{this._updateOverflow()}))}_onResize(){this._updateOverflow()}__tabsItemsChanged(t){this.__itemsResizeObserver.disconnect(),(t||[]).forEach((t=>{this.__itemsResizeObserver.observe(t)})),this._updateOverflow()}_scrollForward(){const t=this._getNavigationButtonVisibleWidth("forward-button"),e=this._getNavigationButtonVisibleWidth("back-button"),i=this._scrollerElement.getBoundingClientRect(),s=[...this.items].reverse().find((s=>this._isItemVisible(s,t,e,i))).getBoundingClientRect(),o=20+this.shadowRoot.querySelector('[part="back-button"]').clientWidth;let r;r=this.__isRTL?s.right-(i.right-o):s.left-(i.left+o),-this.__direction*r<1&&(r=-this.__direction*(this._scrollOffset-o)),this._scroll(r)}_scrollBack(){const t=this._getNavigationButtonVisibleWidth("forward-button"),e=this._getNavigationButtonVisibleWidth("back-button"),i=this._scrollerElement.getBoundingClientRect(),s=this.items.find((s=>this._isItemVisible(s,t,e,i))).getBoundingClientRect(),o=20+this.shadowRoot.querySelector('[part="forward-button"]').clientWidth;let r;r=this.__isRTL?s.left-(i.left+o):s.right-(i.right-o),this.__direction*r<1&&(r=this.__direction*(this._scrollOffset-o)),this._scroll(r)}_isItemVisible(t,e,i,s){if(this._vertical)throw new Error("Visibility check is only supported for horizontal tabs.");const o=s.right-(this.__isRTL?i:e),r=s.left+(this.__isRTL?e:i),n=t.getBoundingClientRect();return o>Math.floor(n.left)&&r<Math.ceil(n.right)}_getNavigationButtonVisibleWidth(t){const e=this.shadowRoot.querySelector(`[part="${t}"]`);return"0"===window.getComputedStyle(e).opacity?0:e.clientWidth}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:Ld(this._scrollerElement,this.getAttribute("dir")),e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;let i=Math.floor(t)>1?"start":"";Math.ceil(t)<Math.ceil(e-this._scrollOffset)&&(i+=" end"),1===this.__direction&&(i=i.replace(/start|end/giu,(t=>"start"===t?"end":"start"))),i?this.setAttribute("overflow",i.trim()):this.removeAttribute("overflow")}}
6563
6563
  /**
6564
6564
  * @license
6565
6565
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -6570,7 +6570,7 @@ const lc=t=>class extends(Pd(qd(t))){static get properties(){return{orientation:
6570
6570
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
6571
6571
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6572
6572
  */
6573
- Es("vaadin-tabs",vi`
6573
+ Is("vaadin-tabs",vi`
6574
6574
  :host {
6575
6575
  display: flex;
6576
6576
  align-items: center;
@@ -6646,7 +6646,7 @@ Es("vaadin-tabs",vi`
6646
6646
  :host([dir='rtl']) [part='forward-button']::after {
6647
6647
  content: '\\25C0';
6648
6648
  }
6649
- `,{moduleId:"vaadin-tabs-styles"});class hc extends(lc(_n(Ps(Qr)))){static get template(){return Gr`
6649
+ `,{moduleId:"vaadin-tabs-styles"});class ac extends(nc(xn(Fs(Jr)))){static get template(){return Kr`
6650
6650
  <div on-click="_scrollBack" part="back-button" aria-hidden="true"></div>
6651
6651
 
6652
6652
  <div id="scroll" part="tabs">
@@ -6654,4 +6654,4 @@ Es("vaadin-tabs",vi`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}li(hc);const dc=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.noValidation=!1,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60,this.haspostalcodelookup=void 0,this.postalcodelength=void 0,this.addresses=[],this.ignoreCountry=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])r[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return this.haspostalcodelookup&&"PostalCode"===this.name?i("postalcode-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,postalcodelength:this.postalcodelength,addresses:this.addresses,ignoreCountry:this.ignoreCountry}):i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,haspostalcodelookup:this.haspostalcodelookup});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,hidePasswordComplexity:this.hidePasswordComplexity,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"twofa":return i("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(o,{key:"ee5eae5b620c2818dda1aa5f547b06efce171360",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};dc.style=":host{display:block;height:100%}";const cc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"f0e6e6edb5d8e3f509474ef5536cb7ef717a5ee9",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c991d1e6ed0f9910104b46105daad5332200ee21",class:"number__wrapper--flex"},i("label",{key:"d6912229dac4712f4f8e77a90f7ba0ebb7dd5548",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"5733806c60cad364e61fc66e25f89a44159e8ad9",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"7ba9ca8048d04c41f800fccf03297e2db9a9115d",class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"32c782d0fd58b6507a0e3fbcc8f934f2c4e8e1d7",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"2167549cb0c3ea2440b72c9219b599b1d49c9026",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};cc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const uc=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.noValidation?[]:this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern);let s=!1;return t&&(s=i.test(t)),{rule:e.displayName,ruleKey:e.errorKey,passed:s}}))}setValidity(){var t,e;return!!this.noValidation||(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,o;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return n("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}return(null===(o=this.passwordComplexity)||void 0===o?void 0:o.every((t=>t.passed)))||this.showPopup?void 0:n("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"db7a6a87af3de451485c603a2f28f25806838d20",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"146ace196e1343f778232c0e2ff07556c0a09e1e",class:"password__wrapper--flex"},i("label",{key:"0d0cb672dfc7a43535a299b45752f43a87f73760",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"1eac72dfdadd0f50bd2db6b0fc44320dd2f287bf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"bb327b9a403c1fc5628c4ba2da8d1a2b62888db5",class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"7962f122d1bfb0ac0a5176a743e1224dccba4910",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!this.noValidation&&i("small",{key:"efadfea8911ba72161aef495d1fb5857f14a319b",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};uc.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}';const pc=class{constructor(i){t(this,i),this.sendAddressValue=e(this,"sendAddressValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=t=>{const e=t.target.value.toUpperCase();this.value=e,this.touched=!0,this.currentPostalCode=e,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=e),this.value.length<this.postalcodelength&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),(""===this.value||this.value.length<1)&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.value.length>=this.postalcodelength&&(sessionStorage.setItem("currentPostalCode",this.value),this.showNoResultsMessage=!1,this.addresses&&this.addresses.length>0&&(this.openAddressDropdown=!0));const t=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),t!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),300)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(t,e)=>{t.stopPropagation();const i=`${e.street}`.trim(),s=`${e.number}`.trim(),o=`${e.city}`.trim();this.sendAddressValue.emit({city:o,address1:i,address2:s}),this.value=this.currentPostalCode.toLocaleUpperCase(),this.touched=!0,this.isValid=!0,this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.isFetchingAddresses=!1,this.valueHandler({name:this.name,value:this.value}),this.validityStateHandler({valid:!0,name:this.name}),this.valueHandler({name:"address1",value:i}),this.valueHandler({name:"City",value:o}),s&&this.valueHandler({name:"address2",value:s}),this.refreshTrigger++},this.enterAddressManually=()=>{const t=window.targetInputRefs;if(!t)return;const e=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"address2",ref:t.address2},{name:"City",ref:t.City}],i=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"City",ref:t.City}].find((t=>{var e;const i=(null===(e=t.ref)||void 0===e?void 0:e.value)||"";return t.minLength?0===i.length||i.length<t.minLength:0===i.length})),s=(null==i?void 0:i.ref)||t.address1||t.PostalCode;s.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,e.forEach((t=>{var e;if(t.ref){const i=(null===(e=t.ref.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||t.ref;if(i){i.classList.add("pulse-border");const t=()=>{i.classList.remove("pulse-border"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t)}}}))),s.focus()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.handleOutsideClick=t=>{if(!this.openAddressDropdown)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.inputReference),s=e.includes(this.addressesDropdownRef),o=e.some((t=>{var e;return t instanceof Element&&(null===(e=t.classList)||void 0===e?void 0:e.contains("option"))}));i||s||o||(this.openAddressDropdown=!1,this.showNoResultsMessage=!1)},this.name="PostalCode",this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.postalcodelength=void 0,this.addresses=void 0,this.ignoreCountry=!1,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode="",this.currentPostalCode="",this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.refreshTrigger=0,this.isFetchingAddresses=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),!0!==t||this.value.length||this.valueHandler({name:this.name,value:this.value})}handleAddresses(t){t&&t.length>0?(this.openAddressDropdown=!0,this.showNoResultsMessage=!1):(this.openAddressDropdown=!1,this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength&&setTimeout((()=>{this.currentPostalCode.length>=this.postalcodelength&&!this.isFetchingAddresses&&(this.showNoResultsMessage=!0)}),200)),this.isFetchingAddresses=!1}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&(this.resetPostalCodeField(),this.refreshTrigger++)}handleFetchStarted(){this.showNoResultsMessage=!1,this.isFetchingAddresses=!0,this.openAddressDropdown=!1}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value})),this.inputReference&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}setValidity(){if(!this.inputReference)return!1;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}return""}resetPostalCodeField(){this.value="",this.currentPostalCode="",this.showNoResultsMessage=!1,this.openAddressDropdown=!1,this.isFetchingAddresses=!1,sessionStorage.removeItem("currentPostalCode"),this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name})}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var t,e;let s="";this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid");let o="UK"===this.selectedCountryCode||"GB"===this.selectedCountryCode||this.ignoreCountry,r=(null===(t=this.addresses)||void 0===t?void 0:t.length)>0&&this.openAddressDropdown&&o,l=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&0===(null===(e=this.addresses)||void 0===e?void 0:e.length)&&o,h=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return i("div",{key:"a7d101d7ad51ca56156726b47b4ff97cdea7fca2",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"74f9b8cfb12094588642e5a56323cea96472f8c9",class:"text__wrapper--flex"},i("label",{key:"b779b88d908598f09a92a7388e0dfe7bda6157ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"b545e7c3f701e1ce10742f96075bcd84d3dccb85",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"3dfbb3f5286d2be08f361f8a6c746b765e5f7901",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"0ce15664e22cf519df696084d6397be11a4c1932",class:"input__text-wrapper"},i("input",{key:"92506c5d469f87ef9a24a7f262d4a8c7dd441526",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${s}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!o&&i("p",{key:"836f5177d7a9013992989e7e8466396164f9dc8e",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},n("enterIEAddressManually",this.language)),r&&i("div",{key:"077e3995330e2471cc9a838e88a35c60d03348aa",class:"input__addresses-container",ref:t=>this.addressesDropdownRef=t},i("div",{key:"2085a2fa95d95b1fcee0d3cbb45c240329cec4e8",class:"options"},this.addresses.map(((t,e)=>i("div",{key:e,class:"option",onClick:e=>this.handlePostalCode(e,t)},t.street," ",t.number," ",t.city))))),h&&i("div",{key:"5fb758ac04ee4a6af58e78d77e6ca024353a4b0e",class:"postalcode__loading-spinner"},i("div",{key:"d134446874122c8cde1070a7d1f4a95b7d0d65c0",class:"loading-spinner"}),i("span",{key:"1b2a451f6a52584f978783d43b60ccc8e0d20e29"},n("searchingForAddresses",this.language))),l&&i("div",{key:"c188c5debee4c194e87971d40ed981b3e095a5ae",class:"postalcode__no-results-message"},n("postalLookUpNoAddressFound",this.language))),i("small",{key:"c3499d3404bf807140815cceafe9104ee23dad25",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};pc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const mc=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"88357307488334074a397c636210575b8af1e2c3",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"25f656d5b155c392cad79c89410833c3491531f8",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"08def575050905f964d6921d4ed4f071fccdf4da",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"485fa4888f626f1cf44f179f498f257af6c41b58",class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};mc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const vc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(this.inputReference.value=this.value)),this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,e;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c23be50b865c381ce6d2bd77ab77f39b96af39d7",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"ec7daae517c439317a8596e835328d17f098eb49",class:"select__wrapper--flex"},i("label",{key:"d35d77810716e1afc25661d9c0679e34f500f751",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"74cb4c953064b2d989e866d2f7537f11f6cf7491",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"388ea5893a4f45e3cf7263a89c2ee93522b46819",class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):i("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(e=this.validation)||void 0===e?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),i("small",{key:"9fa3c3fcac5a26b28a9730ce3a2f57cdecbaaa4a",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};vc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const fc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.setPhoneValue(t.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched||(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(t){const e=t.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue(null!==(t=this.defaultValue.phone)&&void 0!==t?t:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t})),this.disablePhonePrefix=this.phoneCodesOptions.length<=1}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t;let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"9b01d1059b470ec9f57c6f852df12aa17d7a58e2",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"7ad94c73b7b14f63d1b0aa395cd4b2220d80bf7f",class:"tel__wrapper--flex-label"},i("label",{key:"2995bfd5f655c71a454281edf967ab4afff2b61c",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"45c874ffd76f0c56eb971728acc6bcf3c31afc64",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"3ecfbb61507ea4fbe02c804679293adf7961ce18",class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"b2dc1d8af7ea60bc56347ae73c315cf5539d6e7a",class:`tel__wrapper--flex ${e}`},i("vaadin-combo-box",{key:"3ad4d43799026bd4f3b06d9ad94eee17e81daced",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"6773fa69b3f657ccc4798db91b3c9966ef1ad6bc",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:null!==(t=this.phoneValue)&&void 0!==t?t:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"799b137bb4cf96cb7cffa77a6934eeab3e34f4ee",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};fc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden;padding-left:4px}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){height:100%;border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const bc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.haspostalcodelookup=void 0,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&["address1","address2","City"].includes(this.name)&&(this.value="",this.touched=!1,this.errorMessage="",this.isValid=!1,this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name}))}handleAddressSelection(t){const{city:e,address1:i,address2:s}=t.detail;if(!["address1","address2","City"].includes(this.name))return;let o="";"address1"===this.name?o=i:"address2"===this.name?o=s:"City"===this.name&&(o=e),this.value=o,this.touched=!0,this.isValid=!0,this.valueHandler({name:this.name,value:o}),this.validityStateHandler({valid:!0,name:this.name})}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity()}setValidity(){if(!this.inputReference)return!1;if(""===this.value.trim()&&!this.validation.mandatory)return!0;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(""===this.value.trim()&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid");const e=this.value||this.defaultValue;return i("div",{key:"66ee941684d2294250344f156d65cfc740d3b27e",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"1881c5c7e9313d9d08861b3223ffe03227f73d58",class:"text__wrapper--flex"},i("label",{key:"f0059b865e3f2de4bb8f892d559acc4d18443e8e",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bcb10756a212cbf77841eba6437b770c7470e19d",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"72d6f946f788c3ba9a27cde8a21942f9cbeac154",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"6076879f85ab22c0be60ea87f9ae0e24520fe315",name:this.name,id:`${this.name}__input`,value:e,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"75558d8b0709fd01cc8e1cee9baf235f2129ff89",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};bc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const gc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return n("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"58e1c4145712f9547f59eaf43015d46c13e04f2c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"5230bc70f55ee7d3d4db2eed2b17c3e4f3ce9a23",class:"togglecheckbox__wrapper--flex"},i("input",{key:"063c24818b3f4c5fa8362751640c8e51b9ff2868",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"df35a1484f167b4bad9e4c82d82e069260be6608",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"6783791e9d5e882cc47cfdf501737c0309deb9ec",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"8bc868f9d6828fe65a6ad684c0c50d6dbf434239",class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"9258e49a1730b9bcec06ae2be98644a729a8741b",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};gc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const yc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.resendCode=e(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value;if(i.value=s.charAt(s.length>1?1:0),!s)return;this.code[e]=i.value;const o=this.inputRefs[e+1];o&&o.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity()}handleKeyDown(t,e){if("Backspace"===t.key){this.code[e]="",this.inputRefs[e]&&(this.inputRefs[e].value="");const t=this.inputRefs[e-1];t&&(null==t||t.focus())}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text").trim();if(!i)return;const s=i.slice(0,this.validation.maxLength).split("");this.code=[...s,...new Array(this.validation.maxLength-s.length).fill("")],s.forEach(((t,e)=>{this.inputRefs[e].value=t}));const o=this.inputRefs[Math.min(s.length,this.inputRefs.length-1)];o&&o.focus(),this.setValidity(),this.setErrorMessage()}setValidity(){const t=this.code.join(""),e=t.length===this.validation.maxLength,i=null!==t.match(this.validationPattern);this.isValid=e&&i}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const e=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey;e&&(this.errorMessage=n(e,this.language))}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"8672e39d15057a9e866ba1cb79e50f2d319aa989",class:"twofa",ref:t=>this.stylingContainer=t},i("div",{key:"ae7f658dd357340918e6f9565934660b3ef944ac",class:"twofa__error-message"},i("p",{key:"8ef6aecdc7a31b1c4b801f69c8970b8df79bd127"},this.errorMessage)),i("div",{key:"86966527af6e1c3313847f0ae07f89d3ae3411fb",class:"twofa__description",innerHTML:n("twofaDescription",this.language,{values:{destination:this.destination}})}),i("div",{key:"e8ebb1da615c25ddce6e06c4aee158355dc433c3",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,e)=>i("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:t,onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)})))),i("div",{key:"707d2423dd21097dbc591bd15fbf57b5c2e7bddc",class:"twofa__button-wrapper"},i("p",{key:"abc31161f53c6b41aef93b0f27fefced03bac990",class:"twofa__resend-message"},n("twofaResendMessage",this.language)),i("button",{key:"3f7e329e16a524a4849ffb6b98e0df2f4dec136c",class:"twofa__resend-button",onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable},this.isResendButtonAvailable?n("twofaResendButton",this.language):this.formatTime())))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};yc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";export{l as checkbox_group_input,h as checkbox_input,Ke as date_input,Qe as email_input,dc as general_input,cc as number_input,uc as password_input,pc as postalcode_input,mc as radio_input,vc as select_input,fc as tel_input,bc as text_input,gc as toggle_checkbox_input,yc as twofa_input}
6657
+ `}static get is(){return"vaadin-tabs"}}li(ac);const lc=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.noValidation=!1,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60,this.haspostalcodelookup=void 0,this.postalcodelength=void 0,this.addresses=[],this.ignoreCountry=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])r[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return this.haspostalcodelookup&&"PostalCode"===this.name?i("postalcode-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,postalcodelength:this.postalcodelength,addresses:this.addresses,ignoreCountry:this.ignoreCountry}):i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,haspostalcodelookup:this.haspostalcodelookup});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,hidePasswordComplexity:this.hidePasswordComplexity,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"twofa":return i("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(o,{key:"ee5eae5b620c2818dda1aa5f547b06efce171360",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};lc.style=":host{display:block;height:100%}";const hc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"f0e6e6edb5d8e3f509474ef5536cb7ef717a5ee9",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c991d1e6ed0f9910104b46105daad5332200ee21",class:"number__wrapper--flex"},i("label",{key:"d6912229dac4712f4f8e77a90f7ba0ebb7dd5548",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"5733806c60cad364e61fc66e25f89a44159e8ad9",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"7ba9ca8048d04c41f800fccf03297e2db9a9115d",class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"32c782d0fd58b6507a0e3fbcc8f934f2c4e8e1d7",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"2167549cb0c3ea2440b72c9219b599b1d49c9026",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const dc=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.noValidation?[]:this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern);let s=!1;return t&&(s=i.test(t)),{rule:e.displayName,ruleKey:e.errorKey,passed:s}}))}setValidity(){var t,e;return!!this.noValidation||(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,o;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return n("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}return(null===(o=this.passwordComplexity)||void 0===o?void 0:o.every((t=>t.passed)))||this.showPopup?void 0:n("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"db7a6a87af3de451485c603a2f28f25806838d20",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"146ace196e1343f778232c0e2ff07556c0a09e1e",class:"password__wrapper--flex"},i("label",{key:"0d0cb672dfc7a43535a299b45752f43a87f73760",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"1eac72dfdadd0f50bd2db6b0fc44320dd2f287bf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"bb327b9a403c1fc5628c4ba2da8d1a2b62888db5",class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"7962f122d1bfb0ac0a5176a743e1224dccba4910",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!this.noValidation&&i("small",{key:"efadfea8911ba72161aef495d1fb5857f14a319b",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};dc.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}';const cc=class{constructor(i){t(this,i),this.sendAddressValue=e(this,"sendAddressValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=t=>{const e=t.target.value.toUpperCase();this.value=e,this.touched=!0,this.currentPostalCode=e,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=e),this.value.length<this.postalcodelength&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),(""===this.value||this.value.length<1)&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.value.length>=this.postalcodelength&&(sessionStorage.setItem("currentPostalCode",this.value),this.showNoResultsMessage=!1,this.addresses&&this.addresses.length>0&&(this.openAddressDropdown=!0));const t=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),t!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),300)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(t,e)=>{t.stopPropagation();const i=`${e.street}`.trim(),s=`${e.number}`.trim(),o=`${e.city}`.trim();this.sendAddressValue.emit({city:o,address1:i,address2:s}),this.value=this.currentPostalCode.toLocaleUpperCase(),this.touched=!0,this.isValid=!0,this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.isFetchingAddresses=!1,this.valueHandler({name:this.name,value:this.value}),this.validityStateHandler({valid:!0,name:this.name}),this.valueHandler({name:"address1",value:i}),this.valueHandler({name:"City",value:o}),s&&this.valueHandler({name:"address2",value:s}),this.refreshTrigger++},this.enterAddressManually=()=>{const t=window.targetInputRefs;if(!t)return;const e=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"address2",ref:t.address2},{name:"City",ref:t.City}],i=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"City",ref:t.City}].find((t=>{var e;const i=(null===(e=t.ref)||void 0===e?void 0:e.value)||"";return t.minLength?0===i.length||i.length<t.minLength:0===i.length})),s=(null==i?void 0:i.ref)||t.address1||t.PostalCode;s.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,e.forEach((t=>{var e;if(t.ref){const i=(null===(e=t.ref.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||t.ref;if(i){i.classList.add("pulse-border");const t=()=>{i.classList.remove("pulse-border"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t)}}}))),s.focus()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.handleOutsideClick=t=>{if(!this.openAddressDropdown)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.inputReference),s=e.includes(this.addressesDropdownRef),o=e.some((t=>{var e;return t instanceof Element&&(null===(e=t.classList)||void 0===e?void 0:e.contains("option"))}));i||s||o||(this.openAddressDropdown=!1,this.showNoResultsMessage=!1)},this.name="PostalCode",this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.postalcodelength=void 0,this.addresses=void 0,this.ignoreCountry=!1,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode="",this.currentPostalCode="",this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.refreshTrigger=0,this.isFetchingAddresses=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),!0!==t||this.value.length||this.valueHandler({name:this.name,value:this.value})}handleAddresses(t){t&&t.length>0?(this.openAddressDropdown=!0,this.showNoResultsMessage=!1):(this.openAddressDropdown=!1,this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength&&setTimeout((()=>{this.currentPostalCode.length>=this.postalcodelength&&!this.isFetchingAddresses&&(this.showNoResultsMessage=!0)}),200)),this.isFetchingAddresses=!1}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&(this.resetPostalCodeField(),this.refreshTrigger++)}handleFetchStarted(){this.showNoResultsMessage=!1,this.isFetchingAddresses=!0,this.openAddressDropdown=!1}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value})),this.inputReference&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}setValidity(){if(!this.inputReference)return!1;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}return""}resetPostalCodeField(){this.value="",this.currentPostalCode="",this.showNoResultsMessage=!1,this.openAddressDropdown=!1,this.isFetchingAddresses=!1,sessionStorage.removeItem("currentPostalCode"),this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name})}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var t,e;let s="";this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid");let o="UK"===this.selectedCountryCode||"GB"===this.selectedCountryCode||this.ignoreCountry,r=(null===(t=this.addresses)||void 0===t?void 0:t.length)>0&&this.openAddressDropdown&&o,l=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&0===(null===(e=this.addresses)||void 0===e?void 0:e.length)&&o,h=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return i("div",{key:"a7d101d7ad51ca56156726b47b4ff97cdea7fca2",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"74f9b8cfb12094588642e5a56323cea96472f8c9",class:"text__wrapper--flex"},i("label",{key:"b779b88d908598f09a92a7388e0dfe7bda6157ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"b545e7c3f701e1ce10742f96075bcd84d3dccb85",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"3dfbb3f5286d2be08f361f8a6c746b765e5f7901",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"0ce15664e22cf519df696084d6397be11a4c1932",class:"input__text-wrapper"},i("input",{key:"92506c5d469f87ef9a24a7f262d4a8c7dd441526",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${s}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!o&&i("p",{key:"836f5177d7a9013992989e7e8466396164f9dc8e",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},n("enterIEAddressManually",this.language)),r&&i("div",{key:"077e3995330e2471cc9a838e88a35c60d03348aa",class:"input__addresses-container",ref:t=>this.addressesDropdownRef=t},i("div",{key:"2085a2fa95d95b1fcee0d3cbb45c240329cec4e8",class:"options"},this.addresses.map(((t,e)=>i("div",{key:e,class:"option",onClick:e=>this.handlePostalCode(e,t)},t.street," ",t.number," ",t.city))))),h&&i("div",{key:"5fb758ac04ee4a6af58e78d77e6ca024353a4b0e",class:"postalcode__loading-spinner"},i("div",{key:"d134446874122c8cde1070a7d1f4a95b7d0d65c0",class:"loading-spinner"}),i("span",{key:"1b2a451f6a52584f978783d43b60ccc8e0d20e29"},n("searchingForAddresses",this.language))),l&&i("div",{key:"c188c5debee4c194e87971d40ed981b3e095a5ae",class:"postalcode__no-results-message"},n("postalLookUpNoAddressFound",this.language))),i("small",{key:"c3499d3404bf807140815cceafe9104ee23dad25",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};cc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const uc=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"88357307488334074a397c636210575b8af1e2c3",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"25f656d5b155c392cad79c89410833c3491531f8",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"08def575050905f964d6921d4ed4f071fccdf4da",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"485fa4888f626f1cf44f179f498f257af6c41b58",class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};uc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const pc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(this.inputReference.value=this.value)),this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,e;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c23be50b865c381ce6d2bd77ab77f39b96af39d7",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"ec7daae517c439317a8596e835328d17f098eb49",class:"select__wrapper--flex"},i("label",{key:"d35d77810716e1afc25661d9c0679e34f500f751",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"74cb4c953064b2d989e866d2f7537f11f6cf7491",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"388ea5893a4f45e3cf7263a89c2ee93522b46819",class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):i("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(e=this.validation)||void 0===e?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),i("small",{key:"9fa3c3fcac5a26b28a9730ce3a2f57cdecbaaa4a",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};pc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const mc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.setPhoneValue(t.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched||(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(t){const e=t.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue(null!==(t=this.defaultValue.phone)&&void 0!==t?t:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t})),this.disablePhonePrefix=this.phoneCodesOptions.length<=1}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t;let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"9b01d1059b470ec9f57c6f852df12aa17d7a58e2",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"7ad94c73b7b14f63d1b0aa395cd4b2220d80bf7f",class:"tel__wrapper--flex-label"},i("label",{key:"2995bfd5f655c71a454281edf967ab4afff2b61c",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"45c874ffd76f0c56eb971728acc6bcf3c31afc64",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"3ecfbb61507ea4fbe02c804679293adf7961ce18",class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"b2dc1d8af7ea60bc56347ae73c315cf5539d6e7a",class:`tel__wrapper--flex ${e}`},i("vaadin-combo-box",{key:"3ad4d43799026bd4f3b06d9ad94eee17e81daced",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"6773fa69b3f657ccc4798db91b3c9966ef1ad6bc",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:null!==(t=this.phoneValue)&&void 0!==t?t:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"799b137bb4cf96cb7cffa77a6934eeab3e34f4ee",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};mc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden;padding-left:4px}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){height:100%;border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const vc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.haspostalcodelookup=void 0,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&["address1","address2","City"].includes(this.name)&&(this.value="",this.touched=!1,this.errorMessage="",this.isValid=!1,this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name}))}handleAddressSelection(t){const{city:e,address1:i,address2:s}=t.detail;if(!["address1","address2","City"].includes(this.name))return;let o="";"address1"===this.name?o=i:"address2"===this.name?o=s:"City"===this.name&&(o=e),this.value=o,this.touched=!0,this.isValid=!0,this.valueHandler({name:this.name,value:o}),this.validityStateHandler({valid:!0,name:this.name})}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity()}setValidity(){if(!this.inputReference)return!1;if(""===this.value.trim()&&!this.validation.mandatory)return!0;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(""===this.value.trim()&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid");const e=this.value||this.defaultValue;return i("div",{key:"66ee941684d2294250344f156d65cfc740d3b27e",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"1881c5c7e9313d9d08861b3223ffe03227f73d58",class:"text__wrapper--flex"},i("label",{key:"f0059b865e3f2de4bb8f892d559acc4d18443e8e",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bcb10756a212cbf77841eba6437b770c7470e19d",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"72d6f946f788c3ba9a27cde8a21942f9cbeac154",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"6076879f85ab22c0be60ea87f9ae0e24520fe315",name:this.name,id:`${this.name}__input`,value:e,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"75558d8b0709fd01cc8e1cee9baf235f2129ff89",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};vc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}';const fc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return n("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"58e1c4145712f9547f59eaf43015d46c13e04f2c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"5230bc70f55ee7d3d4db2eed2b17c3e4f3ce9a23",class:"togglecheckbox__wrapper--flex"},i("input",{key:"063c24818b3f4c5fa8362751640c8e51b9ff2868",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"df35a1484f167b4bad9e4c82d82e069260be6608",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"6783791e9d5e882cc47cfdf501737c0309deb9ec",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"8bc868f9d6828fe65a6ad684c0c50d6dbf434239",class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"9258e49a1730b9bcec06ae2be98644a729a8741b",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};fc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const bc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.resendCode=e(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value;if(i.value=s.charAt(s.length>1?1:0),!s)return;this.code[e]=i.value;const o=this.inputRefs[e+1];o&&o.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity()}handleKeyDown(t,e){if("Backspace"===t.key){this.code[e]="",this.inputRefs[e]&&(this.inputRefs[e].value="");const t=this.inputRefs[e-1];t&&(null==t||t.focus())}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text").trim();if(!i)return;const s=i.slice(0,this.validation.maxLength).split("");this.code=[...s,...new Array(this.validation.maxLength-s.length).fill("")],s.forEach(((t,e)=>{this.inputRefs[e].value=t}));const o=this.inputRefs[Math.min(s.length,this.inputRefs.length-1)];o&&o.focus(),this.setValidity(),this.setErrorMessage()}setValidity(){const t=this.code.join(""),e=t.length===this.validation.maxLength,i=null!==t.match(this.validationPattern);this.isValid=e&&i}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const e=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey;e&&(this.errorMessage=n(e,this.language))}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"8672e39d15057a9e866ba1cb79e50f2d319aa989",class:"twofa",ref:t=>this.stylingContainer=t},i("div",{key:"ae7f658dd357340918e6f9565934660b3ef944ac",class:"twofa__error-message"},i("p",{key:"8ef6aecdc7a31b1c4b801f69c8970b8df79bd127"},this.errorMessage)),i("div",{key:"86966527af6e1c3313847f0ae07f89d3ae3411fb",class:"twofa__description",innerHTML:n("twofaDescription",this.language,{values:{destination:this.destination}})}),i("div",{key:"e8ebb1da615c25ddce6e06c4aee158355dc433c3",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,e)=>i("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:t,onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)})))),i("div",{key:"707d2423dd21097dbc591bd15fbf57b5c2e7bddc",class:"twofa__button-wrapper"},i("p",{key:"abc31161f53c6b41aef93b0f27fefced03bac990",class:"twofa__resend-message"},n("twofaResendMessage",this.language)),i("button",{key:"3f7e329e16a524a4849ffb6b98e0df2f4dec136c",class:"twofa__resend-button",onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable},this.isResendButtonAvailable?n("twofaResendButton",this.language):this.formatTime())))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};bc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";export{l as checkbox_group_input,h as checkbox_input,Ke as date_input,Qe as email_input,lc as general_input,hc as number_input,dc as password_input,cc as postalcode_input,uc as radio_input,pc as select_input,mc as tel_input,vc as text_input,fc as toggle_checkbox_input,bc as twofa_input}